[GCC][AARCH64] Canonicalize aarch64 widening simd plus insns
[official-gcc.git] / gcc / ChangeLog
blobf1fdb1f35ed9acf2c8c7c148466335a6de3bb8cd
1 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
3         * config/aarch64/aarch64-simd.md
4         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
5         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
6         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
7         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
8         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
9         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
10         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
11         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
12         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
14 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
16         PR middle-end/86627
17         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
18         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
19         and abs_d == d, do the power of two handling if profitable.
21 2018-07-24  Richard Biener  <rguenther@suse.de>
23         * match.pd: Add BIT_FIELD_REF canonicalizations.
25 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
27         PR c/86617
28         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
30 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
32         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
33         terminated STRING_CST object.
35 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
37         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
39 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
41         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
42         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
43         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
44         the elements into a register.
45         (rs6000_split_v4si_init_di_reg): Delete.
46         (rs6000_split_v4si_init): Delete.
47         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
48         (vsx_init_v4si): Rewrite as a define_expand.
50 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
52         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
53         zero_extend argument from memory): New.
55 2018-07-22  Martin Sebor  <msebor@redhat.com>
57         PR bootstrap/86621
58         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
59         diagnosing calls with unknown arguments unless -Walloca-larger-than
60         is restricted to less than PTRDIFF_MAX bytes.
62 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
64         * doc/gcov.texi (Invoking Gcov): Editorial changes.
66 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
68         * pretty-print.c (text_info::set_location): Remove redundant
69         "line_table" parameter from call to rich_location::set_range.
71 2018-07-20  Martin Sebor  <msebor@redhat.com>
73         PR middle-end/82063
74         * builtins.c (expand_builtin_alloca): Adjust.
75         * calls.c (alloc_max_size): Simplify.
76         * cgraphunit.c (cgraph_node::expand): Adjust.
77         * common.opt (larger_than_size, warn_frame_larger_than): Remove
78         variables.
79         (frame_larger_than_size): Same.
80         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
81         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
82         Initialize.
83         * doc/invoke.texi (GCC Command Options): Document option arguments.
84         Explain byte-size arguments and suffixes.
85         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
86         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
87         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
88         * doc/options.texi (UInteger): Expand.
89         (Host_Wide_Int, ByteSize): Document new properties.
90         * final.c (final_start_function_1): Include sizes in an error message.
91         * function.c (frame_offset_overflow): Same.
92         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
93         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
94         Diagnose unbounded alloca calls only for limits of less than
95         PTRDIFF_MAX.
96         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
97         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
98         for alloca(0).
99         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
100         only for limits of less than PTRDIFF_MAX.
101         * langhooks-def.h (lhd_handle_option): Change function argument
102         to HOST_WIDE_INT.
103         * langhooks.c (lhd_handle_option): Same.
104         * langhooks.h (handle_option): Same.
105         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
106         ByteSize flags.
107         (var_type, var_type_struct): Same.
108         (var_set): Handle ByteSize flag.
109         * optc-gen.awk: Add comments to output to ease debugging.  Make
110         use of HOST_WIDE_INT where appropriate.
111         * opts-gen-save.awk:  Use %lx to format unsigned long.
112         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
113         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
114         arguments.  Parse bytes-size suffixes.
115         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
116         (enum_value_to_arg): Same.
117         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
118         (handle_option): Adjust.
119         (generate_option): Change function argument to HOST_WIDE_INT.
120         (cmdline_handle_error): Adjust.
121         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
122         (set_option): Change function argument to HOST_WIDE_INT.
123         (option_enabled): Handle cl_host_wide_int.
124         (get_option_state): Handle CLVC_SIZE.
125         (control_warning_option): Same.
126         * opts.c (common_handle_option): Change function argument to
127         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
128         OPT_Wvla_larger_than_.
129         * opts.h (enum cl_var_type): Add an enumerator.
130         * stor-layout.c (layout_decl): Print a more meaningful warning.
131         * toplev.c (output_stack_usage): Adjust.
133 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
135         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
136         call to inline_expand_builtin_string_cmp.
137         (expand_builtin_strcmp): Likewise.
138         (expand_builtin_strncmp): Likewise.
139         (inline_string_cmp): Delete the last parameter, change char_type_node
140         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
141         two operands.
142         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
143         the inlining expansion on target where the type of the call has same or 
144         narrower precision than unsigned char.
146 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
148         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
149         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
150         * common.opt (fsave-optimization-record): New option.
151         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
152         * doc/invoke.texi (-fsave-optimization-record): New option.
153         * dumpfile.c: Include "optinfo-emit-json.h".
154         (struct kv_pair): Move to coretypes.h.
155         (optgroup_options): Make non-static.
156         (dump_context::end_scope): Call
157         optimization_records_maybe_pop_dump_scope.
158         * dumpfile.h (optgroup_options): New decl.
159         * json.cc: New file.
160         * json.h: New file.
161         * optinfo-emit-json.cc: New file.
162         * optinfo-emit-json.h: New file.
163         * optinfo.cc: Include "optinfo-emit-json.h".
164         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
165         (optinfo_enabled_p): Check optimization_records_enabled_p.
166         (optinfo_wants_inlining_info_p): Likewise.
167         * optinfo.h: Update comment.
168         * profile-count.c (profile_quality_as_string): New function.
169         * profile-count.h (profile_quality_as_string): New decl.
170         (profile_count::quality): New accessor.
171         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
172         and optinfo_emit_json_cc_tests.
173         * selftest.h (selftest::json_cc_tests): New decl.
174         (selftest::optinfo_emit_json_cc_tests): New decl.
175         * toplev.c: Include "optinfo-emit-json.h".
176         (compile_file): Call optimization_records_finish.
177         (do_compile): Call optimization_records_start.
178         * tree-ssa-live.c: Include optinfo.h.
179         (remove_unused_scope_block_p): Retain inlining information if
180         optinfo_wants_inlining_info_p returns true.
182 2018-07-20  Richard Biener  <rguenther@suse.de>
184         PR debug/86585
185         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
186         to cover -flto-partition=none.
188 2018-07-20  Martin Liska  <mliska@suse.cz>
190         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
191         (get_decl_source_range): Remove unused function.
193 2018-07-20  Richard Biener  <rguenther@suse.de>
195         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
196         (struct vn_phi_s): Likewise.
197         (struct vn_reference_s): Likewise.
198         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
199         for searching the slot of an entry known to be in the hash itself.
200         (vn_phi_hasher::equal): Likewise.
201         (vn_reference_hasher::equal): Likewise.
202         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
203         globals.
204         (optimistic_info, current_info): Remove, keeping only valid_info.
205         (vn_reference_lookup_1): Remove fallback lookup.
206         (vn_reference_lookup_2): Likewise.
207         (vn_nary_op_lookup_1): Likewise.
208         (vn_phi_lookup): Likewise.
209         (vn_nary_build_or_lookup_1): Make sure to not chain the built
210         hash element.
211         (vn_reference_insert): Adjust, chain the inserted hash element
212         at last_inserted_ref.
213         (vn_reference_insert_pieces): Likewise.
214         (visit_reference_op_call): Likewise.
215         (vn_nary_op_insert_into): Chain the inserted hash element at
216         last_inserted_nary.
217         (vn_nary_op_insert_pieces): Adjust.
218         (vn_nary_op_insert): Likewise.
219         (vn_nary_op_insert_stmt): Likewise.
220         (vn_phi_insert): Adjust, chain the inserted hash element at
221         last_inserted_phi.
222         (process_scc): Remove clearing and copying the optimistic
223         table.  Instead remove elements inserted during an optimistic
224         iteration from the single table we maintain.
225         (init_scc_vn): Adjust.
226         (free_scc_vn): Likewise.
227         (sccvn_dom_walker::record_cond): Likewise.
228         (sccvn_dom_walker::after_dom_children): Likewise.
230 2018-07-19  Martin Sebor  <msebor@redhat.com>
232         PR tree-optimization/84047
233         PR tree-optimization/83776
234         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
235         (check_array_bounds): Call it.
237 2018-07-19  Martin Sebor  <msebor@redhat.com>
239         * align.h (align_flags): Use member initialization.
241 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
243         * Makefile.in (OBJS): Add optinfo.o.
244         * coretypes.h (class symtab_node): New forward decl.
245         (struct cgraph_node): New forward decl.
246         (class varpool_node): New forward decl.
247         * dump-context.h: New file.
248         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
249         "tree-pass.h".
250         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
251         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
252         (set_alt_dump_file): Likewise.
253         (dump_context::~dump_context): New dtor.
254         (dump_gimple_stmt): Move implementation to...
255         (dump_context::dump_gimple_stmt): ...this new member function.
256         Add the stmt to any pending optinfo, creating one if need be.
257         (dump_gimple_stmt_loc): Move implementation to...
258         (dump_context::dump_gimple_stmt_loc): ...this new member function.
259         Start a new optinfo and add the stmt to it.
260         (dump_gimple_expr): Move implementation to...
261         (dump_context::dump_gimple_expr): ...this new member function.
262         Add the stmt to any pending optinfo, creating one if need be.
263         (dump_gimple_expr_loc): Move implementation to...
264         (dump_context::dump_gimple_expr_loc): ...this new member function.
265         Start a new optinfo and add the stmt to it.
266         (dump_generic_expr): Move implementation to...
267         (dump_context::dump_generic_expr): ...this new member function.
268         Add the tree to any pending optinfo, creating one if need be.
269         (dump_generic_expr_loc): Move implementation to...
270         (dump_context::dump_generic_expr_loc): ...this new member
271         function.  Add the tree to any pending optinfo, creating one if
272         need be.
273         (dump_printf): Move implementation to...
274         (dump_context::dump_printf_va): ...this new member function.  Add
275         the text to any pending optinfo, creating one if need be.
276         (dump_printf_loc): Move implementation to...
277         (dump_context::dump_printf_loc_va): ...this new member function.
278         Start a new optinfo and add the stmt to it.
279         (dump_dec): Move implementation to...
280         (dump_context::dump_dec): ...this new member function.  Add the
281         value to any pending optinfo, creating one if need be.
282         (dump_context::dump_symtab_node): New member function.
283         (dump_context::get_scope_depth): New member function.
284         (dump_context::begin_scope): New member function.
285         (dump_context::end_scope): New member function.
286         (dump_context::ensure_pending_optinfo): New member function.
287         (dump_context::begin_next_optinfo): New member function.
288         (dump_context::end_any_optinfo): New member function.
289         (dump_context::s_current): New global.
290         (dump_context::s_default): New global.
291         (dump_scope_depth): Delete global.
292         (dumpfile_ensure_any_optinfo_are_flushed): New function.
293         (dump_symtab_node): New function.
294         (get_dump_scope_depth): Reimplement in terms of dump_context.
295         (dump_begin_scope): Likewise.
296         (dump_end_scope): Likewise.
297         (selftest::temp_dump_context::temp_dump_context): New ctor.
298         (selftest::temp_dump_context::~temp_dump_context): New dtor.
299         (selftest::verify_item): New function.
300         (ASSERT_IS_TEXT): New macro.
301         (ASSERT_IS_TREE): New macro.
302         (ASSERT_IS_GIMPLE): New macro.
303         (selftest::test_capture_of_dump_calls): New test.
304         (selftest::dumpfile_c_tests): Call it.
305         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
306         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
307         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
308         descriptive comment.
309         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
310         (dump_node, dump_bb): Move these unrelated decls.
311         (class dump_manager): Add leading comment.
312         * optinfo.cc: New file.
313         * optinfo.h: New file.
315 2018-07-19  Michael Collison  <michael.collison@arm.com>
316             Richard Henderson <rth@redhat.com>
318         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
319         (subti): Handle op1 zero.
320         (subvti4, usub4ti4): New.
321         (*sub<GPI>3_compare1_imm): New.
322         (sub<GPI>3_carryinCV): New.
323         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
324         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
326 2018-07-19  Michael Collison  <michael.collison@arm.com>
327             Richard Henderson <rth@redhat.com>
329         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
330         (addti3): Create simpler code if low part is already known to be 0.
331         (addvti4, uaddvti4): New.
332         (*add<GPI>3_compareC_cconly_imm): New.
333         (*add<GPI>3_compareC_cconly): New.
334         (*add<GPI>3_compareC_imm): New.
335         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
336         handle constants within this pattern..
337         (*add<GPI>3_compareV_cconly_imm): New.
338         (*add<GPI>3_compareV_cconly): New.
339         (*add<GPI>3_compareV_imm): New.
340         (add<GPI>3_compareV): New.
341         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
342         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
343         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
344         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
345         with 'comparison' operator.
346         (*add<GPI>3_compareV_cconly_imm): Ditto.
347         (*add<GPI>3_compareV_cconly): Ditto.
348         (*add<GPI>3_compareV_imm): Ditto.
349         (add<GPI>3_compareV): Ditto.
350         (add<mode>3_carryinC): Ditto.
351         (*add<mode>3_carryinC_zero): Ditto.
352         (*add<mode>3_carryinC): Ditto.
353         (add<mode>3_carryinV): Ditto.
354         (*add<mode>3_carryinV_zero): Ditto.
355         (*add<mode>3_carryinV): Ditto.
357 2018-07-19  Michael Collison  <michael.collison@arm.com>
358             Richard Henderson <rth@redhat.com>
360         * config/aarch64/aarch64-modes.def (CC_V): New.
361         * config/aarch64/aarch64-protos.h
362         (aarch64_addti_scratch_regs): Declare
363         (aarch64_subvti_scratch_regs): Declare.
364         (aarch64_expand_subvti): Declare.
365         (aarch64_gen_unlikely_cbranch): Declare
366         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
367         for signed overflow using CC_Vmode.
368         (aarch64_get_condition_code_1): Handle CC_Vmode.
369         (aarch64_gen_unlikely_cbranch): New function.
370         (aarch64_addti_scratch_regs): New function.
371         (aarch64_subvti_scratch_regs): New function.
372         (aarch64_expand_subvti): New function.
374 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
376         * config/aarch64/aarch64-option-extensions.def: New entry for profile
377         extension.
378         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
379         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
380         extension.
382 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
384         PR target/83009
385         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
386         address check not strict.
388 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
390         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
391         Umq with Umn.
392         (store_pair_lanes<mode>): Likewise.
393         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
394         enum value 'ADDR_QUERY_LDP_STP_N'.
395         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
396         (aarch64_print_address_internal): Add declaration.
397         (aarch64_print_ldpstp_address): Remove.
398         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
399         (aarch64_print_operand): Change printing of 'y'.
400         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
401         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
402         'true' rather than '1'.
403         * config/aarch64/constraints.md (Uml): Likewise.
404         (Uml): Rename to Umn.
405         (Umq): Remove.
407 2018-07-19  Richard Biener  <rguenther@suse.de>
409         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
410         a trailing array.
411         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
412         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
413         (vn_reference_hasher): Likewise.
414         (struct vn_tables_s): Remove obstack and alloc-pool members.
415         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
416         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
417         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
418         (vn_reference_insert_pieces): Likewise.
419         (alloc_vn_nary_op_noinit): Adjust.
420         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
421         (vn_phi_eq): Adjust.
422         (shared_lookup_phiargs): Remove.
423         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
424         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
425         (visit_reference_op_call): Likewise.
426         (copy_nary, copy_phi, copy_reference): Remove.
427         (process_scc): Rewind the obstack when iterating.  Do not
428         copy the elements to valid_info but just move them from one
429         hashtable to the other.
430         (allocate_vn_table): Adjust.
431         (free_vn_table): Likewise.
432         (init_scc_vn): Likewise.
433         (free_scc_vn): Likewise.
435 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
437         PR target/86560
438         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
439         indirect_return as function type attribute.
440         (ix86_attribute_table): Change indirect_return to function
441         type attribute.
442         * doc/extend.texi: Update indirect_return attribute.
444 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
446         * wide-int.h (widest2_int): New.
447         * gimple-fold.c (arith_overflowed_p): Use it.
448         * tree.h (widest2_int_cst): New.
449         * tree-vrp.c (wide_int_binop_overflow): Rename from
450         vrp_int_const_binop.
451         Rewrite to work on trees.
452         (extract_range_from_multiplicative_op_1): Abstract code to...
453         (wide_int_range_min_max): ...here.
454         (wide_int_range_cross_product): ...and here.
455         (extract_range_from_binary_expr_1): Abstract overflow code to...
456         (wide_int_range_mult_wrapping): ...here.
457         * tree-vrp.h (wide_int_range_cross_product): New.
458         (wide_int_range_mult_wrapping): New.
460 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
461             Julia Koval  <julia.koval@intel.com>
463         * config/i386/x86-tune-costs.h (skylake_memcpy,
464         skylake_memset): Replace rep_prefix with unrolling for size 512.
466 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
468         PR middle-end/86544
469         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
470         in last stmt.
472 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
474         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
475         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
476         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
477         previously known as "PowerPC AltiVec Built-in Functions".  Move
478         some material to new subsubsections "PowerPC AltiVec Built-in
479         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
480         ISA 2.07".
481         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
482         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
483         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
484         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
486 2018-07-18  Richard Biener  <rguenther@suse.de>
488         PR tree-optimization/86557
489         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
490         EXACT_DIV_EXPR.
492 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
494         * config/s390/s390.c (s390_function_profiler): Generate CFI.
496 2018-07-17  Jeff Law  <law@redhat.com>
498         * config/arm/arm.c (get_label_padding): Update for recent
499         changes to label_to_alignment.
501         PR tree-optimization/86010
502         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
504         * config/mips/mips.c (vr4130_align_insns): Update for recent
505         changes to label_to_alignment.
507         * config/frv/frv.c (frv_label_align): Update for recent changes
508         to label_to_alignment.
510         * config/nios2/nios2.c (nios2_label_align): Update for recent
511         changes which dropped ALIGN_LABELS_LOG.
513 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
515         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
516         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
518 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
520         * config/arc/arc.c (arc_label_align): Use align_labels instead of
521         deprecated align_labels_log.
523 2018-07-17  Richard Biener  <rguenther@suse.de>
525         PR lto/86456
526         * dwarf2out.c (init_sections_and_labels): Always generate
527         a debug_line_str_section for early LTO debug.
528         (dwarf2out_finish): Reset debug_line_str_hash output early.
529         Bump counter for extra dwarf5 .debug_loc labels to not conflict
530         with fat LTO part.
531         (dwarf2out_early_finish): Output debug_line_str.
533 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
535         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
536         index register on z196 or later.
538 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
540         * config/s390/s390.c (s390_default_align): Set default function
541         alignment to 16.
542         (s390_override_options_after_change): Call s390_default align.
543         (s390_option_override_internal): Call s390_default_align.
544         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
546 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
548         PR middle-end/86542
549         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
550         to _looptemp_ clauses, other than the first two.
552 2018-07-17  Martin Liska  <mliska@suse.cz>
554         * opts.c: Do not enable OPT_falign_* for -Os.
556 2018-07-17  Martin Liska  <mliska@suse.cz>
558         * align.h (MAX_CODE_ALIGN): New.
559         (MAX_CODE_ALIGN_VALUE): New.
560         * common/config/i386/i386-common.c (ix86_handle_option):
561         (MAX_CODE_ALIGN): Moved to align.h.
562         * final.c (MAX_CODE_ALIGN): Likewise.
563         * opts.c (parse_and_check_align_values):
564         (MAX_CODE_ALIGN): Likewise.
565         (MAX_CODE_ALIGN_VALUE): Likewise.
567 2018-07-17  Martin Liska  <mliska@suse.cz>
569         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
570         in order to fulfil coding style.
571         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
572         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
573         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
574         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
575         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
576         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
577         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
578         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
579         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
581 2018-07-17  Martin Liska  <mliska@suse.cz>
583         * align.h: New file.
584         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
585         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
586         align_flags of label_to_alignment.
587         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
588         class.
589         * config/m68k/m68k.c: Do not use removed align_labels_value and
590         align_loops_value.
591         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
592         (LOOP_ALIGN): Likewise.
593         (LABEL_ALIGN): Likewise.
594         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
595         Remove not used macro.
596         (rs6000_loop_align): Change return type to align_flags.
597         (rs6000_loop_align_max_skip): Remove.
598         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
599         Change return type to align_flags.
600         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
601         Remove not used macro.
602         (rs6000_loop_align):  Change return type to align_flags.
603         (rs6000_loop_align_max_skip): Remove.
604         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
605         * config/rx/rx-protos.h (rx_align_for_label): Make it
606         static function.
607         * config/rx/rx.c (rx_align_for_label): Change return type
608         to align_flags.
609         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
610         macro definitions.
611         into align_flags class.
612         (LABEL_ALIGN): Likewise.
613         (LOOP_ALIGN): Likewise.
614         * config/s390/s390.c (s390_label_align): Use align_flags
615         class member.
616         (s390_asm_output_function_label): Likewise.
617         * config/sh/sh.c (sh_override_options_after_change):
618         Use align_flags class directly without macros.
619         (find_barrier): Likewise.
620         (barrier_align): Likewise.
621         (sh_loop_align): Likewise.
622         * config/spu/spu.c (spu_option_override):
623         Use align_flags_tuple::get_value instead of removed macros.
624         (spu_sched_init): Likewise.
625         * config/spu/spu.h (GTY): Likewise.
626         * config/visium/visium.c (visium_option_override):
627         Set "8" as default secondary alignment.
628         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
629         in order to guarantee secondary alignment of 8.
630         * coretypes.h: Include align.h header file.
631         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
632         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
633         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
634         * doc/tm.texi.in: Likewise.
635         * final.c (struct label_alignment): Remove not used structure.
636         (LABEL_ALIGN): Change type to align_flags.
637         (LOOP_ALIGN): Likewise.
638         (JUMP_ALIGN): Likewise.
639         (default_loop_align_max_skip): Remove.
640         (default_label_align_max_skip): Likewise.
641         (default_jump_align_max_skip): Likewise.
642         (default_label_align_after_barrier_max_skip):
643         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
644         (LABEL_TO_MAX_SKIP): Remove.
645         (label_to_alignment): Return align_flags type instead of integer.
646         (label_to_max_skip): Remove.
647         (align_fuzz): Use align_flags type.
648         (compute_alignments): Use align_flags type and use align_flags::max
649         to combine multiple alignments.
650         (grow_label_align): Grow vec instead of C array.
651         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
652         (shorten_branches):  Use align_flags type and use align_flags::max
653         to combine multiple alignments.
654         (final_scan_insn_1): Remove usage of secondary alignment that comes
655         from label alignment, but instead use proper secondary alignment
656         which is computed in grow_label_align.
657         * flags.h (struct align_flags_tuple): Move to align.h.
658         (struct align_flags): Likewise.
659         (state_align_loops): Rename to align_loops.
660         (state_align_jumps): Rename to align_jumps.
661         (state_align_labels): Rename to align_labels.
662         (state_align_functions): Rename to align_functions.
663         (align_loops_log): Remove.
664         (align_jumps_log): Remove.
665         (align_labels_log): Remove.
666         (align_functions_log): Remove.
667         (align_loops_max_skip): Remove.
668         (align_jumps_max_skip): Remove.
669         (align_labels_max_skip): Remove.
670         (align_functions_max_skip): Remove.
671         (align_loops_value): Remove.
672         (align_jumps_value): Remove.
673         (align_labels_value): Remove.
674         (align_functions_value): Remove.
675         * output.h (label_to_alignment): Change return type to align_flags.
676         (label_to_max_skip): Remove.
677         * target.def: Remove loop_align_max_skip, label_align_max_skip,
678         jump_align_max_skip macros.
679         * targhooks.h (default_loop_align_max_skip): Remove.
680         (default_label_align_max_skip): Likewise.
681         (default_jump_align_max_skip): Likewise.
682         (default_label_align_after_barrier_max_skip): Remove.
683         * toplev.c (read_log_maxskip): Use ::normalize function.
684         (parse_N_M): Remove not used argument and also call ::normalize.
685         (parse_alignment_opts): Do not pass unused arguments.
686         * varasm.c (assemble_start_function): Use directly align_functions
687         instead of removed macros.
688         * system.h: Do not poison removed macros.
690 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
692         PR middle-end/86539
693         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
694         and cond temporaries don't have reference type if iterator has
695         pointer type.  For init use &for_pre_body instead of pre_p if
696         for_pre_body is non-empty.
698 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
700         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
701         double-double modes to SFmode directly directly.
702         (trunc<mode>sf2_fprs): Delete.
704 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
706         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
707         for conversions between IFmode and the decimal floating point modes.
708         (init_float128_ieee): Use the correct names for conversions between
709         KFmode and the decimal floating point modes.
711 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
713         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
714         for the conversions between TDmode and IFmode.
715         (init_float128_ieee): Use more correct names for the conversions
716         between TDmode and KFmode.
718 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
720         PR tree-optimization/86526
721         * builtins.c (expand_builtin_memcmp): Formatting fixes.
722         (inline_expand_builtin_string_cmp): Likewise.
723         (inline_string_cmp): Likewise.  Use c_readstr instead of
724         builtin_memcpy_read_str.  Add unit_mode temporary.
726 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
728         PR middle-end/86528
729         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
730         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
732 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
734         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
735         Alphabetize prototypes of built-in functions, separating out
736         built-in functions that are listed in this section but should be
737         described elsewhere.
739 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
741         PR target/86511
742         * expmed.c (emit_store_flag): Do not emit setcc followed by a
743         conditional move when trapping comparison was split to a
744         non-trapping one (and vice versa).
746 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
748         * config/s390/s390.c (s390_function_profiler): Generate nops
749         instead of profiler call sequences.
750         * config/s390/s390.opt: Add the new option.
752 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
754         * config/s390/s390.c (s390_function_profiler): Generate
755         __mcount_loc section.
756         * config/s390/s390.opt: Add the new option.
758 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
760         * common.opt: Add the new warning.
761         * config/s390/s390.c (s390_function_profiler): Emit "brasl
762         %r0,__fentry__" when -mfentry is specified.
763         (s390_option_override_internal): Disallow -mfentry for 31-bit
764         CPUs.
765         * config/s390/s390.opt: Add the new option.
767 2018-07-16  Richard Biener  <rguenther@suse.de>
769         PR lto/86523
770         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
771         for function-local FUNCTION_DECL and RESULT_DECL immediately.
773 2018-07-16  Martin Liska  <mliska@suse.cz>
775         PR ipa/86529
776         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
777         to ::get_create.
779 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
781         * config/arc/arcHS.md: Update ARCHS scheduling rules.
783 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
785         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
786         for ARCHS4x.
787         * config/arc/arc-cpus.def (hs4x): New cpu.
788         (hs4xd): Likewise.
789         * config/arc/arc-tables.opt: Regenerate.
790         * config/arc/arc.c (arc_sched_issue_rate): New function.
791         (TARGET_SCHED_ISSUE_RATE): Define.
792         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
793         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
794         fpu_cvt.
795         (attr tune): Add ARCHS4x tune values.
796         (attr tune_dspmpy): Define.
797         (*tst): Correct instruction type.
798         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
799         * config/arc/arcHS4x.md: New file.
800         * config/arc/fpu.md: Update instruction type attributes.
801         * config/arc/t-multilib: Regenerate.
803 2018-07-16  Tom de Vries  <tdevries@suse.de>
805         PR debug/86455
806         * var-tracking.c (vt_initialize): Fix pre_dec handling.
808 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
810         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
811         early clobber.
813 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
815         PR tree-optimization/86514
816         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
817         conversion to a boolean type from a type with greater precision.
819 2018-07-16  Tom de Vries  <tdevries@suse.de>
821         * var-tracking.c (vt_initialize): Print adjusted insn slim if
822         dump_flags request TDF_SLIM.
824 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
826         * fold-const.c (int_const_binop_1): Abstract...
827         (wide_int_binop): ...wide int code here.
828         (poly_int_binop): ...poly int code here.
829         Abstract the rest of int_const_binop_1 into int_const_binop.
830         * fold-const.h (wide_int_binop): New.
831         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
832         Remove useless PLUS/MINUS_EXPR case.
833         (zero_nonzero_bits_from_vr): Move wide int code...
834         (zero_nonzero_bits_from_bounds): ...here.
835         (extract_range_from_binary_expr_1): Move mask optimization code...
836         (range_easy_mask_min_max): ...here.
837         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
838         (range_easy_mask_min_max): New.
840 2018-07-15  Jeff Law  <law@redhat.com>
842         PR target/85993
843         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
844         block.
846 2018-07-14  Jim Wilson  <jimw@sifive.com>
848         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
850 2018-07-14  Paul Koning  <ni1d@arrl.net>
852         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
854 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
856         * lto-streamer-out.c (copy_function_or_variable): Dump info about
857         copying section.
859 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
860             Steve Munroe  <munroesj52@gmail.com>
862         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
863         (_mm_andnot_si128): Likewise.
864         (_mm_or_si128): Likewise.
865         (_mm_xor_si128): Likewise.
867 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
869         PR middle-end/78809
870         * builtins.c (expand_builtin_memcmp): Inline the calls first
871         when result_eq is false.
872         (expand_builtin_strcmp): Inline the calls first.
873         (expand_builtin_strncmp): Likewise.
874         (inline_string_cmp): New routine. Expand a string compare
875         call by using a sequence of char comparison.
876         (inline_expand_builtin_string_cmp): New routine. Inline expansion
877         a call to str(n)cmp/memcmp.
878         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
879         New option.
880         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
882 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
884         * config/arm/driver-arm.c: Include arm-native.h.
885         (host_detect_local_cpu): Use auto-generated data tables.
886         (vendors, arm_cpu_table): Delete.  Move part information to ...
887         * config/arm/arm-cpus.in: ... here.
888         * config/arm/parsecpu.awk (gen_native): New function.
889         (vendor, part): New CPU fields.
890         (END): Add support for building the native CPU detection tables.
891         * config/arm/t-arm (arm-native.h): Add build rule.
892         (driver-arm.o): Add dependency on arm-native.h.
894 2018-07-13  Richard Biener  <rguenther@suse.de>
896         PR middle-end/85974
897         * match.pd (addr1 - addr2): Allow either of the operand to
898         have a conversion.
900 2018-07-13  Tom de Vries  <tdevries@suse.de>
902         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
903         in remap_ssa_name.
905 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
907         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
908         arrays instead of numbered variables.
910 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
912         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
913         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
915 2018-07-13  Richard Biener  <rguenther@suse.de>
917         PR debug/86452
918         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
919         instead of get_context_die.
921 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
922             Richard Biener  <rguenther@suse.de>
924         PR middle-end/86489
925         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
926         that the loop latch destination where phi is defined.
928 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
930         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
931         (riscv_expand_epilogue): Add assertion to check interrupt mode.
932         (riscv_set_current_function): Extract getting interrupt type to new
933         function.
934         (riscv_get_interrupt_type): New function.
935         (riscv_merge_decl_attributes): New function, checking interrupt type is
936         same.
937         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
939 2018-07-12  Paul Koning  <ni1d@arrl.net>
941         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
942         directive.
944 2018-07-12  Paul Koning  <ni1d@arrl.net>
946         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
947         zero reference, add doloop_end instead.
948         * doc/md.texi (decrement_and_branch_until_zero): Remove.
949         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
950         detail for doloop_end.
952 2018-07-12  Martin Sebor  <msebor@redhat.com>
954         PR c/86453
955         * attribs.c (decl_attributes): Reject conflicting attributes before
956         calling attribute handlers.
958 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
960         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
961          parameter.
962         (gcc::dump_manager::get_dump_file_name): likewise.
963         (dump_begin): Likewise.
964         * dumpfile.h (dump_begin): Update prototype.
965         (gcc::dump_manager::get_dump_file_name,
966         gcc::dump_manager::get_dump_file_name): Update prototype.
968 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
970         * internal-fn.h (vectorizable_internal_fn_p): New function.
971         * tree-vect-slp.c (compatible_calls_p): Likewise.
972         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
973         to internal functions.
974         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
976 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
978         * fold-const.h (inverse_conditions_p): Declare.
979         * fold-const.c (inverse_conditions_p): New function.
980         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
981         that test the inverse condition of a conditional internal function.
982         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
983         * internal-fn.c (internal_fn_mask_index): Handle conditional
984         internal functions.
985         (vectorized_internal_fn_supported_p): New function.
986         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
987         (any_pred_load_store): Replace with...
988         (need_to_predicate): ...this new variable.
989         (redundant_ssa_names): New variable.
990         (ifcvt_can_use_mask_load_store): Move initial checks to...
991         (ifcvt_can_predicate): ...this new function.  Handle tree codes
992         for which a conditional internal function exists.
993         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
994         instead of ifcvt_can_use_mask_load_store.  Update after variable
995         name change.
996         (predicate_load_or_store): New function, split out from
997         predicate_mem_writes.
998         (check_redundant_cond_expr): New function.
999         (value_available_p): Likewise.
1000         (predicate_rhs_code): Likewise.
1001         (predicate_mem_writes): Rename to...
1002         (predicate_statements): ...this.  Use predicate_load_or_store
1003         and predicate_rhs_code.
1004         (combine_blocks, tree_if_conversion): Update after above name changes.
1005         (ifcvt_local_dce): Handle redundant_ssa_names.
1006         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
1007         general conditional functions.
1008         * tree-vect-stmts.c (vectorizable_call): Likewise.
1010 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1011             Alan Hayward  <alan.hayward@arm.com>
1012             David Sherwood  <david.sherwood@arm.com>
1014         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
1015         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
1016         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
1017         plus and minus and convert them into IFN_COND_FMA-based sequences.
1018         (convert_mult_to_fma): Handle conditional plus and minus.
1020 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1022         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
1023         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
1024         (cond_fnms_optab): New optabs.
1025         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
1026         internal functions.
1027         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
1028         * internal-fn.h (get_conditional_internal_fn): Declare.
1029         (get_unconditional_internal_fn): Likewise.
1030         * internal-fn.c (cond_ternary_direct): New macro.
1031         (expand_cond_ternary_optab_fn): Likewise.
1032         (direct_cond_ternary_optab_supported_p): Likewise.
1033         (FOR_EACH_COND_FN_PAIR): Likewise.
1034         (get_conditional_internal_fn): New function.
1035         (get_unconditional_internal_fn): Likewise.
1036         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
1037         (gimple_match_op::gimple_match_op): Add a new overload for 5
1038         operands.
1039         (gimple_match_op::set_op): Likewise.
1040         (gimple_resimplify5): Declare.
1041         * genmatch.c (decision_tree::gen): Generate simplifications for
1042         5 operands.
1043         * gimple-match-head.c (gimple_simplify): Define an overload for
1044         5 operands.  Handle calls with 5 arguments in the top-level overload.
1045         (convert_conditional_op): Handle conversions from unconditional
1046         internal functions to conditional ones.
1047         (gimple_resimplify5): New function.
1048         (build_call_internal): Pass a fifth operand.
1049         (maybe_push_res_to_seq): Likewise.
1050         (try_conditional_simplification): Try converting conditional
1051         internal functions to unconditional internal functions.
1052         Handle 3-operand unconditional forms.
1053         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
1054         Define ternary equivalents of the current rules for binary conditional
1055         internal functions.
1056         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
1057         ternary operations.
1058         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
1059         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
1060         (optab): Handle them.
1061         (SVE_COND_FP_TERNARY): New int iterator.
1062         (sve_fmla_op, sve_fmad_op): New int attributes.
1063         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
1064         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
1065         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
1067 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1069         * target.def (preferred_else_value): New target hook.
1070         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
1071         * doc/tm.texi: Regenerate.
1072         * targhooks.h (default_preferred_else_value): Declare.
1073         * targhooks.c (default_preferred_else_value): New function.
1074         * internal-fn.h (conditional_internal_fn_code): Declare.
1075         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
1076         (get_conditional_internal_fn): Use it.
1077         (conditional_internal_fn_code): New function.
1078         * gimple-match.h (gimple_match_cond): New struct.
1079         (gimple_match_op): Add a cond member function.
1080         (gimple_match_op::gimple_match_op): Update all forms to take a
1081         gimple_match_cond.
1082         * genmatch.c (expr::gen_transform): Use the same condition as res_op
1083         for the suboperation, but don't specify a particular else_value.
1084         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
1085         (visit_nary_op, visit_reference_op_load): Pass
1086         gimple_match_cond::UNCOND to the gimple_match_op constructor.
1087         * gimple-match-head.c: Include tree-eh.h
1088         (convert_conditional_op): New function.
1089         (maybe_resimplify_conditional_op): Likewise.
1090         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
1091         (gimple_resimplify2): Likewise.
1092         (gimple_resimplify3): Likewise.
1093         (gimple_resimplify4): Likewise.
1094         (maybe_push_res_to_seq): Return null for conditional operations.
1095         (try_conditional_simplification): New function.
1096         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
1097         constructor.
1098         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
1099         IFN_COND_* call.
1100         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
1101         function.
1102         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
1104 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
1106         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
1107         DECL_FCONTEXT
1108         (hash_tree): Do not hash DECL_FCONTEXT
1109         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
1110         Do not stream DECL_FCONTEXT.
1111         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
1112         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
1114 2018-07-12  Richard Biener  <rguenther@suse.de>
1116         PR debug/86462
1117         * dwarf2out.c (gen_block_die): Only output blocks when they have
1118         at least one !DECL_IGNORED_P variable.
1120 2018-07-12  Richard Biener  <rguenther@suse.de>
1122         PR target/84829
1123         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
1124         Remove -mieee-fp handling.
1126 2018-07-12  Richard Biener  <rguenther@suse.de>
1128         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
1129         left-over from last patch.
1131 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
1133         PR tree-optimization/86492
1134         * gimple-ssa-store-merging.c
1135         (imm_store_chain_info::coalesce_immediate_stores): Call
1136         check_no_overlap even for the merge_overlapping case.  Formatting fix.
1138 2018-07-12  Richard Biener  <rguenther@suse.de>
1140         PR middle-end/86479
1141         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
1142         move possibly trapping operations into the conditional.
1144 2018-07-12  Richard Biener  <rguenther@suse.de>
1146         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
1147         (vn_lookup_simplify_result): Remove recursion limit applied
1148         here.
1149         (vn_nary_build_or_lookup_1): Adjust.
1150         (try_to_simplify): Likewise.
1151         * gimple-match-head.c (gimple_resimplify1): Instead apply one
1152         here.
1153         (gimple_resimplify2): Likewise.
1154         (gimple_resimplify3): Likewise.
1155         (gimple_resimplify4): Likewise.
1157 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
1159         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
1160         Use __mmask64 type instead of __mmask8 for __M argument.
1161         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
1162         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
1163         __U argument.
1164         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
1165         __mmask16 for __M argument.
1166         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
1167         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
1168         to __mmask16 instead of __mmask8.
1169         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
1170         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
1171         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
1172         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
1173         instead of __mmask16 for __U argument.
1174         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
1175         __mmask16 instead of __mmask8 for __U argument.
1176         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
1177         __U argument.
1178         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
1179         __mmask16.
1180         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
1181         argument.
1182         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
1183         __U argument.
1184         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
1185         __mmask16.
1186         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
1187         of __mmask16.
1188         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
1189         __U argument.
1190         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
1191         __U argument.
1192         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
1193         __U argument.
1194         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
1195         __U argument.
1196         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
1197         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
1198         return type as well as __M argument type and all casts from __mmask8
1199         to __mmask32.
1200         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
1201         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
1202         return type as well as __M argument type and all casts from __mmask8
1203         to __mmask16.
1204         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
1205         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
1206         return type as well as __M argument type and all casts from __mmask8
1207         to __mmask32.
1208         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
1209         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
1210         return type as well as __M argument type and all casts from __mmask8
1211         to __mmask16.
1212         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
1213         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
1214         __mmask16.
1216 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
1218         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
1219         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
1220         for __U argument.
1222 2018-07-11  Paul Koning  <ni1d@arrl.net>
1224         * doc/md.texi (define_subst): Document how multiple occurrences of
1225         the same argument in the replacement pattern are handled.
1227 2018-07-11  Paul Koning  <ni1d@arrl.net>
1229         * doc/extend.texi (Common Variable Attributes): Move "mode" into
1230         alphabetical order.
1231         (Common Type Attributes): Add "mode" attribute.
1233 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
1235         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
1236         stream DECL_ORIGINAL_TYPE.
1237         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
1238         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
1239         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
1240         Do not walk original type.
1241         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
1242         external decls.
1243         (write_ts_decl_non_common_tree_pointers): Do not stream
1244         DECL_ORIGINAL_TYPE
1245         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
1246         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
1248 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
1250         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
1251         thread twice from the same starting edge.
1253 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
1255         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
1256         * gimple.c (gimple_call_nonnull_result_p): ...here...
1257         (gimple_call_nonnull_arg): ...and here.
1258         * gimple.h (gimple_call_nonnull_result_p): New.
1259         (gimple_call_nonnull_arg): New.
1261 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
1263         * config/arm/arm-cpus.in: Move information from fpu field of each
1264         cpu definition to the isa field.
1265         * config/arm/parsecpu.awk (fpu): Delete match rule.
1266         (gen_comm_data): Don't add bits from the CPU's FPU entry.
1268 2018-07-11  Richard Biener  <rguenther@suse.de>
1270         PR debug/86457
1271         * dwarf2out.c (init_sections_and_labels): Use
1272         output_asm_line_debug_info consistently.
1273         (dwarf2out_early_finish): Likewise.
1274         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
1275         type units.
1277 2018-07-11  Richard Biener  <rguenther@suse.de>
1279         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
1280         Rework father_bb setting in a way to avoid propagating constants
1281         multiple times on a loop body.
1283 2018-07-10  Mark Wielaard  <mark@klomp.org>
1285         PR debug/86459
1286         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
1288 2018-07-10  Richard Biener  <rguenther@suse.de>
1290         * hash-map.h (hash_map::iterator::operator*): Return
1291         references to key and value.
1293 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
1295         PR c++/86443
1296         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
1297         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
1298         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
1299         (gimplify_omp_for): For composite loops, move outer
1300         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
1301         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
1302         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
1303         TREE_LIST for both the original class iterator and the "last" helper
1304         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
1305         loop, remember has_decl_expr from outer composite loops for the
1306         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
1308 2018-07-09  Martin Sebor  <msebor@redhat.com>
1310         PR middle-end/77357
1311         PR middle-end/86428
1312         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
1313         accessing implicitly initialized array elements.
1314         * expr.c (string_constant): Handle string initializers of
1315         character arrays within aggregates.
1316         * gimple-fold.c (fold_array_ctor_reference): Add argument.
1317         Store element offset.  As a special case, handle zero size.
1318         (fold_nonarray_ctor_reference): Same.
1319         (fold_ctor_reference): Add argument.  Store subobject offset.
1320         * gimple-fold.h (fold_ctor_reference): Add argument.
1322 2018-07-09  Paul Koning  <ni1d@arrl.net>
1324         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
1325         (pdp11_insn_cost): New function.
1326         (pdp11_md_asm_adjust): New function.
1327         (TARGET_INVALID_WITHIN_DOLOOP): Define.
1328         (pdp11_rtx_costs): Update to match machine better.
1329         (output_addr_const_pdp11): Correct format mismatch warnings.
1330         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
1331         * config/pdp11/pdp11.md: General change to add base_cost and/or
1332         length attributes for use by new pdp11_insn_cost function.
1333         (MIN_BRANCH): Correct definition.
1334         (MIN_SOB): Ditto.
1335         (doloop_end): Use standard pattern name for looping pattern.
1336         (doloop_end_nocc): New.
1337         (movsf): Add another constraint alternative.
1338         (zero_extendqihi2): Add constraint alternatives for not in place
1339         extend.
1340         (zero_extendhisi2): Remove.
1341         (shift patterns): Add CC handling variants.
1342         (bswaphi2): New.
1343         (bswapsi2): New.
1344         (rothi3): New.
1345         (define_peephole2): New peephole to recognize mov that sets CC for
1346         subsequent test.
1348 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1350         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
1351         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
1352         wi::add.
1354 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
1356         PR c/86420
1357         * real.c (real_nextafter): Return true if result is denormal.
1359 2018-07-09  Martin Liska  <mliska@suse.cz>
1361         * common.opt: Add back wrongly removed attribute.
1363 2018-07-09  Richard Biener  <rguenther@suse.de>
1365         PR debug/86413
1366         * dwarf2out.c (gen_block_die): For an early generated DIE
1367         always output high/low PC attributes.
1369 2018-07-09  Tom de Vries  <tdevries@suse.de>
1371         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
1372         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
1373         onto VAR_DECL with abstract origin.
1375 2018-07-07  Jim Wilson  <jimw@sifive.com>
1377         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
1379 2018-07-07  Tom de Vries  <tdevries@suse.de>
1381         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
1383 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
1385         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
1386         overflow_type.
1387         (combine_bound): Use wide-int overflow calculation instead of
1388         rolling our own.
1389         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
1390         overflow_type.
1391         * fold-const.c (int_const_binop_2): Same.
1392         (extract_muldiv_1): Same.
1393         (fold_div_compare): Same.
1394         (fold_abs_const): Same.
1395         * match.pd: Same.
1396         * poly-int.h (add): Same.
1397         (sub): Same.
1398         (neg): Same.
1399         (mul): Same.
1400         * predict.c (predict_iv_comparison): Same.
1401         * profile-count.c (slow_safe_scale_64bit): Same.
1402         * simplify-rtx.c (simplify_const_binary_operation): Same.
1403         * tree-chrec.c (tree_fold_binomial): Same.
1404         * tree-data-ref.c (split_constant_offset_1): Same.
1405         * tree-if-conv.c (idx_within_array_bound): Same.
1406         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
1407         * tree-ssa-phiopt.c (minmax_replacement): Same.
1408         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
1409         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
1410         * vr-values.c (vr_values::adjust_range_with_scev): Same.
1411         * wide-int.cc (wi::add_large): Same.
1412         (wi::mul_internal): Same.
1413         (wi::sub_large): Same.
1414         (wi::divmod_internal): Same.
1415         * wide-int.h: Change overflow type to overflow_type for neg, add,
1416         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
1417         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
1418         mul_internal, divmod_internal.
1419         (overflow_type): New enum.
1420         (accumulate_overflow): New.
1422 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
1424         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
1425         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
1427 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
1429         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
1430         argument is checked for zero before entering loop, avoid checking again.
1432 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
1434         * gimplify.h (generic_expr_could_trap_p): Set as global function.
1435         * gimplify.h (generic_expr_could_trap_p): Likwise.
1436         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
1438 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
1440         PR tree-optimization/86401
1441         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
1442         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
1443         (fold_bit_and_mask): ... here.  New helper function for match.pd.
1444         * fold-const.h (fold_bit_and_mask): Declare.
1445         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
1447 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
1449         PR target/86324
1450         * target.def (translate_mode_attribute): New hook.
1451         * targhooks.h (default_translate_mode_attribute): Declare.
1452         * targhooks.c (default_translate_mode_attribute): New function.
1453         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
1454         * doc/tm.texi: Regenerate.
1455         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
1456         (rs6000_translate_mode_attribute): New function.
1458 2018-07-06  Paul Koning  <ni1d@arrl.net>
1460         * doc/md.texi (define_split): Document DONE and FAIL.
1461         (define_peephole2): Ditto.
1463 2018-07-05  Jeff Law  <law@redhat.com>
1465         PR tree-optimization/86010
1466         * tree-ssa-dse.c (compute_trims): More aggressively trim at
1467         both the head and tail of mem* and str* calls.
1469 2018-07-05  Jim Wilson  <jimw@sifive.com>
1471         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
1473 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
1475         * config/aarch64/aarch64-simd.md: correct flags text for
1476         MIN_EXPR replacement.
1478 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
1480         * configure: Regenerated.
1482 2018-07-05  Carl Love  <cel@us.ibm.com>
1484         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
1485         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
1486         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
1487         VSX_BUILTIN_DOUBLEL_V4SF.
1489 2018-07-05  Martin Sebor  <msebor@redhat.com>
1491         PR c++/86400
1492         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
1493         than its domain to compute its the upper bound of a char array.
1495 2018-07-05  Nathan Sidwell  <nathan@acm.org>
1497         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
1498         * doc/cpp.texi: Update comment.
1499         * doc/tm.texi: Rebuilt.
1500         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
1501         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
1502         * doc/extend.texi (Backwards Compatibility): Clarify it is system
1503         headers affected by extern "C".
1504         * system.h: Poison NO_IMPLICIT_EXTERN_C.
1505         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
1506         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
1507         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
1508         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
1509         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
1510         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
1511         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
1512         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
1513         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
1514         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
1515         config/sparc/sp64-elf.h, config/spu/spu.h,
1516         config/stormy16/stormy16.h, config/v850/v850.h,
1517         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
1518         define NO_IMPLICIT_EXTERN_C.
1519         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
1521 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
1523         PR target/84711
1524         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
1525         instead of GET_MODE_SIZE when comparing Units.
1527 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
1529         PR target/84711
1530         * rtlanal.c (set_noop_p): Constrain on mode change,
1531         include hard-reg-set.h
1533 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
1535         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
1537 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
1539         Revert
1540         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
1542         PR sanitizer/84250
1543         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1544         libasan.
1545         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1547 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
1549         PR sanitizer/84250
1550         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1551         libasan.
1552         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1554 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
1556         PR middle-end/86380
1557         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
1559 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
1561         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
1562         neg_*_op* variables.
1564 2018-07-04  Martin Liska  <mliska@suse.cz>
1566         * tree-switch-conversion.c: Define
1567         max_ratio_for_speed and max_ratio_for_size constants.
1569 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
1570             Martin Liska  <mliska@suse.cz>
1572         PR middle-end/66240
1573         PR target/45996
1574         PR c/84100
1575         * common.opt: Rename align options with 'str_' prefix.
1576         * common/config/i386/i386-common.c (set_malign_value): New
1577         function.
1578         (ix86_handle_option): Use it to set -falign-* options/
1579         * config/aarch64/aarch64-protos.h (struct tune_params): Change
1580         type from int to string.
1581         * config/aarch64/aarch64.c: Update default values from int
1582         to string.
1583         * config/alpha/alpha.c (alpha_override_options_after_change):
1584         Likewise.
1585         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
1586         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1587         max skip conditionally.
1588         * config/i386/freebsd.h (SUBALIGN_LOG): New.
1589         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1590         max skip conditionally.
1591         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1592         max skip conditionally.
1593         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
1594         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1595         max skip conditionally.
1596         * config/i386/i386.c (struct ptt): Change type from int to
1597         string.
1598         (ix86_default_align): Set default values.
1599         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
1600         max skip conditionally.
1601         * config/i386/iamcu.h (SUBALIGN_LOG): New.
1602         (ASM_OUTPUT_MAX_SKIP_ALIGN):
1603         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
1604         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1605         max skip conditionally.
1606         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
1607         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
1608         * config/i386/x86-64.h (SUBALIGN_LOG): New.
1609         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1610         max skip conditionally.
1611         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1612         * config/ia64/ia64.c (ia64_option_override): Set default values
1613         for alignment options.
1614         * config/m68k/m68k.c: Handle new str_align_* options.
1615         * config/mips/mips.c (mips_set_compression_mode): Change
1616         type of constants.
1617         (mips_option_override): Set default values for options.
1618         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1619         Likewise.
1620         * config/rs6000/rs6000.c (rs6000_option_override_internal):
1621         Likewise.
1622         * config/rx/rx.c (rx_option_override): Likewise.
1623         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
1624         (LABEL_ALIGN): Use align_labels_log.
1625         (LOOP_ALIGN): Use align_loops_align.
1626         * config/s390/s390.c (s390_asm_output_function_label): Use new
1627         macros.
1628         * config/sh/sh.c (sh_override_options_after_change):
1629         Change type of constants.
1630         * config/spu/spu.c (spu_sched_init): Likewise.
1631         * config/sparc/sparc.c (sparc_option_override): Set default
1632         values for options.
1633         * config/visium/visium.c (visium_option_override): Likewise.
1634         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
1635         emit p2align format with last argument if it's not needed.
1636         * doc/invoke.texi: Document extended format of -falign-*.
1637         * final.c: Use align_labels alignment.
1638         * flags.h (struct target_flag_state): Change type to use
1639         align_flags.
1640         (struct align_flags_tuple): New.
1641         (struct align_flags): Likewise.
1642         (align_loops_log): Redefine macro to use new types.
1643         (align_loops_max_skip): Redefine macro to use new types.
1644         (align_jumps_log): Redefine macro to use new types.
1645         (align_jumps_max_skip): Redefine macro to use new types.
1646         (align_labels_log): Redefine macro to use new types.
1647         (align_labels_max_skip): Redefine macro to use new types.
1648         (align_functions_log): Redefine macro to use new types.
1649         (align_loops): Redefine macro to use new types.
1650         (align_jumps): Redefine macro to use new types.
1651         (align_labels): Redefine macro to use new types.
1652         (align_functions): Redefine macro to use new types.
1653         (align_functions_max_skip): Redefine macro to use new types.
1654         (align_loops_value): New macro.
1655         (align_jumps_value): New macro.
1656         (align_labels_value): New macro.
1657         (align_functions_value): New macro.
1658         * function.c (invoke_set_current_function_hook): Propagate
1659         alignment values from flags to global variables default in
1660         topleev.h.
1661         * ipa-icf.c (sem_function::equals_wpa): Use
1662         cl_optimization_option_eq instead of memcmp.
1663         * lto-streamer.h (cl_optimization_stream_out): Support streaming
1664         of string types.
1665         (cl_optimization_stream_in): Likewise.
1666         * optc-save-gen.awk: Support strings in cl_optimization.
1667         * opth-gen.awk: Likewise.
1668         * opts.c (finish_options): Remove error checking of invalid
1669         value ranges.
1670         (MAX_CODE_ALIGN): Remove.
1671         (MAX_CODE_ALIGN_VALUE): Likewise.
1672         (parse_and_check_align_values): New function.
1673         (check_alignment_argument): Likewise.
1674         (common_handle_option): Use check_alignment_argument.
1675         * opts.h (parse_and_check_align_values): Declare.
1676         * toplev.c (init_alignments): Remove.
1677         (read_log_maxskip): New.
1678         (parse_N_M): Likewise.
1679         (parse_alignment_opts): Likewise.
1680         (backend_init_target): Remove usage of init_alignments.
1681         * toplev.h (parse_alignment_opts): Declare.
1682         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
1683         argument.
1684         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
1685         * tree.c (cl_option_hasher::equal): New.
1686         * varasm.c: Use new global macros.
1688 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
1690         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
1691         Use a simpler align directive also if MAXSKIP = ALIGN-1.
1692         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1693         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1694         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1695         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1696         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
1697         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
1698         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
1699         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1700         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1701         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1702         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1704 2018-07-04  Martin Liska  <mliska@suse.cz>
1705             Jonathan Wakely  <jwakely@redhat.com>
1707         * coverage.c: Use correct type.
1708         * doc/invoke.texi: Language correction.
1710 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
1712         PR target/85620
1713         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
1714         ENDBRANCH for non-tail call which may return via indirect branch.
1715         * doc/extend.texi: Document indirect_return attribute.
1717 2018-07-03  Martin Sebor  <msebor@redhat.com>
1719         PR tree-optimization/86274
1720         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
1721         precondition.
1722         (format_floating): Correct handling of infinities and NaNs.
1724 2018-07-03  Martin Sebor  <msebor@redhat.com>
1726         * print-tree.c (print_real_cst): New function.
1727         (print_node_brief): Call it.
1728         (print_node): Ditto.
1730 2018-07-03  Jeff Law  <law@redhat.com>
1732         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
1733         into a single pattern.
1735         * config/h8300/h8300.md (ors code_iterator): New.
1736         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
1737         a single pattern and single splitter.
1738         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
1739         (iorqi3_1, xorqi3_1): Likewise.
1740         (iorqi3, xorqi3 expanders): Similarly.
1742         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
1743         (movmd_internal) into a single pattern using the P mode iterator.
1744         (movmd splitters): Similarly.
1745         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
1746         (movsd splitters): Similarly.
1748         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
1749         ADDB, ADDW and ADDL into a single ADD attribute which selects the
1750         right table based on the size of the operand.
1751         * config/h8300/h8300.md (length_table): Corresponding changes. All
1752         references to "addb", "addw" and "addl" changed to "add".
1753         (btst patterns): Merge two variants into a single pattern.
1754         (tstqi, tsthi): Likewise.
1755         (addhi3_incdec, addsi3_incdec): Likewise.
1756         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
1757         (mulhi3, mulsi3): Likewise.
1758         (udivhi3, udivsi3): Likewise.
1759         (divhi3, divsi3): Likewise.
1760         (andorqi3, andorhi3, andorsi3): Likewise.
1762 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
1764         PR target/85694
1765         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
1766         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
1768 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1770         PR tree-optimization/85694
1771         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
1772         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
1773         UNSPEC_URHADD.
1774         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
1775         (<u>avg<mode>3_ceil): New patterns.
1777 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
1779         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
1780         scan-tree-dump directive.
1781         * gcc.dg/vect/slp-perm-2.c: Likewise.
1782         * gcc.dg/vect/slp-perm-3.c: Likewise.
1783         * gcc.dg/vect/slp-perm-5.c: Likewise.
1784         * gcc.dg/vect/slp-perm-6.c: Likewise.
1785         * gcc.dg/vect/slp-perm-7.c: Likewise.
1786         * gcc.dg/vect/slp-perm-8.c: Likewise.
1788 2018-07-03  Marek Polacek  <polacek@redhat.com>
1790         PR middle-end/86202
1791         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
1793 2018-07-03  Richard Biener  <rguenther@suse.de>
1795         PR ipa/86389
1796         * tree-ssa-structalias.c (find_func_clobbers): Properly
1797         handle indirect calls.
1799 2018-07-03  Jeff Law  <law@redhat.com>
1801         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
1802         (shifts): New code iterator.
1803         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
1804         expander.  Fix HImode handling on H8/SX.
1805         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
1806         (subqi3, subhi3, subsi3 expanders): Likewise.
1807         (andqi3, andhi3, andsi3 expanders): Likewise.
1808         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
1809         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
1810         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
1811         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
1812         (zero_extendqihi2, zero_extendqisi2): Likewise.
1813         (extendqihi2, extendqisi2): Likewise.
1814         (rotlqi3, rotlhi3, rotlsi3): Likewise.
1815         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
1816         (rotlqi3_1, rotlhi3_1): Likewise.
1817         (logicalhi3_sn, logicalsi3_sn): Likewise.
1818         (logicalhi3, logicalsi3): Likewise.
1820 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1822         * tree-vect-patterns.c (vect_recog_rotate_pattern)
1823         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
1824         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
1825         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
1826         type to append_pattern_def_seq instead of creating a stmt_vec_info
1827         directly.
1828         (build_mask_conversion): Likewise.  Remove vinfo argument.
1829         (vect_add_conversion_to_patterm): Likewise, renaming to...
1830         (vect_add_conversion_to_pattern): ...this.
1831         (vect_recog_mask_conversion_pattern): Update call to
1832         build_mask_conversion.  Pass the vector type to
1833         append_pattern_def_seq here too.
1834         (vect_recog_gather_scatter_pattern): Update call to
1835         vect_add_conversion_to_pattern.
1837 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1839         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
1840         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1841         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
1842         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
1843         STMT_VINFO_PATTERN_DEF_SEQ to null here.
1844         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
1845         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
1846         append_pattern_def_seq instead of new_pattern_def_seq.
1847         (vect_recog_divmod_pattern): Do both of the above.
1848         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
1849         is null.
1851 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1853         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
1854         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
1855         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
1856         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
1857         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
1858         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
1859         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
1860         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
1861         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
1862         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
1863         parameter with a single stmt_vec_info.
1864         (vect_recog_func_ptr): Likewise.
1865         (vect_recog_gather_scatter_pattern): Likewise, folding in...
1866         (vect_try_gather_scatter_pattern): ...this.
1867         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
1868         the stmt_vec_info of the statement to be matched.  Don't clear
1869         STMT_VINFO_RELATED_STMT.
1870         (vect_pattern_recog): Update call accordingly.
1872 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1874         PR tree-optimization/85694
1875         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
1876         (uavgM3_ceil): Document new optabs.
1877         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
1878         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
1879         functions.
1880         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
1881         (savg_ceil_optab): New optabs.
1882         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
1883         (vect_vect_recog_func_ptrs): Add it.
1884         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
1885         constant directly from the associated lhs.
1887 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1889         * tree-vect-patterns.c (vect_split_statement): New function.
1890         (vect_convert_input): Use it to try to split an existing cast.
1892 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1894         * poly-int.h (print_hex): New function.
1895         * dumpfile.h (dump_dec, dump_hex): Declare.
1896         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
1897         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
1898         min_input_precision, operation_precision and operation_sign.
1899         * tree-vect-patterns.c (vect_get_range_info): New function.
1900         (vect_same_loop_or_bb_p, vect_single_imm_use)
1901         (vect_operation_fits_smaller_type): Delete.
1902         (vect_look_through_possible_promotion): Add an optional
1903         single_use_p parameter.
1904         (vect_recog_over_widening_pattern): Rewrite to use new
1905         stmt_vec_info infomration.  Handle one operation at a time.
1906         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
1907         (vect_truncatable_operation_p, vect_set_operation_type)
1908         (vect_set_min_input_precision): New functions.
1909         (vect_determine_min_output_precision_1): Likewise.
1910         (vect_determine_min_output_precision): Likewise.
1911         (vect_determine_precisions_from_range): Likewise.
1912         (vect_determine_precisions_from_users): Likewise.
1913         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
1914         (vect_vect_recog_func_ptrs): Put over_widening first.
1915         Add cast_forwprop.
1916         (vect_pattern_recog): Call vect_determine_precisions.
1918 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
1920         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
1921         statements that have been replaced by further pattern statements.
1922         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
1924 2018-07-03  Richard Biener  <rguenther@suse.de>
1926         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
1927         always set *dt.  Dump vectype in vectype overload.
1928         * dumpfile.h (dump_gimple_expr): New function.
1929         (dump_gimple_expr_loc): Likewise.
1930         * dumpfile.c (dump_gimple_expr): New function.
1931         (dump_gimple_expr_loc): Likewise.
1933 2018-07-02  Jeff Law  <law@redhat.com>
1935         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
1936         the H8/300, H8/300H and H8/S variants into a single pattern.
1937         (movhi_h8300, movqi_h8300hs): Similarly.
1938         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
1939         (QHI mode iterator): New.
1941         * config/h8300/h8300.md: Remove trailing whitespace.
1943 2018-07-02  Jim Wilson  <jimw@sifive.com>
1945         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
1946         instead of emit_insn for interrupt returns.
1947         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
1948         (riscv_sret, riscv_uret): Likewise.
1950 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
1952         * pretty-print.c (selftest::test_pp_format): Move save and restore
1953         of quotes to class auto_fix_quotes, and add an instance.
1954         * selftest.c: Include "intl.h".
1955         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
1956         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
1957         * selftest.h (selftest::auto_fix_quotes): New class.
1959 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
1961         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
1962         (aarch64_sve_prepare_conditional_op): Remove.
1963         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
1964         Allow aarch64_simd_reg_or_zero as select operand; remove
1965         the aarch64_sve_prepare_conditional_op call.
1966         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
1967         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
1968         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
1969         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
1970         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
1971         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
1972         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
1973         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
1974         and a splitters to match all of the *_any patterns.
1975         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
1977         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
1978         (SVE_COND_FP_BINARY_REV): Remove.
1979         (sve_int_op_rev, sve_fp_op_rev): New.
1980         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
1981         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
1982         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
1983         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
1984         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
1985         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
1986         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
1987         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
1988         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
1990         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
1991         Remove match_dup 1 from the inner unspec.
1992         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
1994         * config/aarch64/aarch64.md (movprfx): New attr.
1995         (length): Default movprfx to 8.
1996         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
1997         (*madd<SVE_I>, *msub<SVE_I): Likewise.
1998         (*<su>mul<SVE_I>3_highpart): Likewise.
1999         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
2000         (*v<ASHIFT><SVE_I>3): Likewise.
2001         (*<su><MAXMIN><SVE_I>3): Likewise.
2002         (*<su><MAXMIN><SVE_F>3): Likewise.
2003         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
2004         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
2005         (*div<SVE_F>4): Likewise.
2007 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
2009         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
2010         in dump string.
2012 2018-07-02  Richard Biener  <rguenther@suse.de>
2014         PR tree-optimization/86363
2015         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
2016         memset argument refers to a non-variable address.
2018 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
2020         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
2021         {PLUS,MINUS}_EXPR code to...
2022         (adjust_symbolic_bound): ...here,
2023         (combine_bound): ...here,
2024         (set_value_range_with_overflow): ...and here.
2026 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
2028         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
2029         code...
2030         (extract_range_from_abs_expr): ...here.
2032 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
2034         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
2035         -fno-omit-frame-pointer when not optimizing.
2037 2018-07-02  Martin Liska  <mliska@suse.cz>
2039         PR ipa/86279
2040         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
2041         (propagate_nothrow): Likewise.
2043 2018-07-02  Martin Liska  <mliska@suse.cz>
2045         PR ipa/86323
2046         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
2048 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
2050         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
2051         function in r262149, changing "loc" param from source_location to
2052         const dump_location_t &.
2053         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
2054         declaration, as above.
2056 2018-07-01  Paul Koning  <ni1d@arrl.net>
2058         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
2059         -munit-asm, -mgnu-asm, -mdec-asm.
2060         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
2061         (pdp11_output_labelref): New.
2062         (pdp11_output_def): New.
2063         (pdp11_output_addr_vec_elt): New.
2064         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
2065         %# and %@ format codes.
2066         (pdp11_option_override): New.
2067         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
2068         (pdp11_output_ident): New.
2069         (pdp11_asm_named_section): New.
2070         (pdp11_asm_init_sections): New.
2071         (pdp11_file_start): New.
2072         (pdp11_file_end): New.
2073         (output_ascii): Use .ascii/.asciz for -mdec-asm.
2074         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
2075         %o, like %c but octal.
2076         (pdp11_option_override): New.
2077         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
2078         -mdec-asm.
2079         (DATA_SECTION_ASM_OP): Ditto.
2080         (READONLY_DATA_SECTION_ASM_OP): New.
2081         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
2082         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
2083         (ASM_OUTPUT_LABELREF): Ditto.
2084         (ASM_OUTPUT_DEF): Ditto.
2085         (ASM_OUTPUT_EXTERNAL): New.
2086         (ASM_OUTPUT_SOURCE_FILENAME): New.
2087         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
2088         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
2089         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
2090         %# and %@ format codes.
2091         * config/pdp11/pdp11.opt (mgnu-asm): New.
2092         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
2093         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
2094         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
2096 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
2098         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
2099         dereferencing path[] beyond its length.
2100         (debug_path): New.
2101         (debug_all_paths): New.
2102         (rewire_first_differing_edge): New.
2103         (adjust_paths_after_duplication): New.
2104         (duplicate_thread_path): Call adjust_paths_after_duplication.
2105         Add new argument.
2106         (thread_through_all_blocks): Add new argument to
2107         duplicate_thread_path.
2109 2018-06-30  Jim Wilson  <jimw@sifive.com>
2111         * config/riscv/predicates.md (p2m1_shift_operand): New.
2112         (high_mask_shift_operand): New.
2113         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
2114         pattern using p2m1_shift_operand.
2115         (lshsi3_zero_extend_3+2): New combiner pattern using
2116         high_mask_shift_operand.
2118 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2120         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
2121         split out from...
2122         (vect_recog_rotate_pattern): ...here.
2123         (vect_convert_input): Try to insert casts of invariants in the
2124         preheader.
2125         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
2126         preheader to be empty.
2128 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2130         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
2131         vector type.  If given, install it in the new statement's
2132         STMT_VINFO_VECTYPE.
2133         (vect_element_precision): New function.
2134         (vect_unpromoted_value): New struct.
2135         (vect_unpromoted_value::vect_unpromoted_value): New function.
2136         (vect_unpromoted_value::set_op): Likewise.
2137         (vect_look_through_possible_promotion): Likewise.
2138         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
2139         (vect_widened_op_tree, vect_convert_input): Likewise.
2140         (vect_convert_inputs, vect_convert_output): Likewise.
2141         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
2142         to handle the optional cast of the multiplication result and
2143         vect_widened_op_tree to detect the widened multiplication itself.
2144         Do not require the input and output of promotion casts to have
2145         the same sign, but base the signedness of the operation on the
2146         input rather than the result.  If the pattern includes two
2147         promotions, check that those promotions have the same sign.
2148         Do not restrict the MULT_EXPR handling to a double-width result;
2149         handle quadruple-width results and wider.  Use vect_convert_inputs
2150         to convert the inputs to the common type.
2151         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
2152         to handle the optional cast of the ABS result.  Also allow a sign
2153         change or a sign extension between the ABS and MINUS.
2154         Use vect_widened_op_tree to detect the widened subtraction and use
2155         vect_convert_inputs to convert the inputs to the common type.
2156         (vect_handle_widen_op_by_const): Delete.
2157         (vect_recog_widen_op_pattern): New function.
2158         (vect_recog_widen_mult_pattern): Use it.
2159         (vect_recog_widen_shift_pattern): Likewise.
2160         (vect_recog_widen_sum_pattern): Use
2161         vect_look_through_possible_promotion to handle the promoted
2162         PLUS_EXPR operand.
2164 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2166         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
2167         the containing gimple_seq *.
2168         * gimple-iterator.h (gsi_for_stmt): Declare it.
2169         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
2170         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
2171         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
2172         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
2173         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
2174         checks.
2175         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
2176         split out from...
2177         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
2178         statement being replaced is part of an existing pattern
2179         definition sequence, inserting the new pattern statements before
2180         the original one.
2181         (vect_pattern_recog_1): Don't return a bool.  If the statement
2182         is already part of a pattern, instead apply pattern matching
2183         to the pattern definition statements.  Don't clear the
2184         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
2185         (vect_pattern_recog): Don't break after the first match;
2186         continue processing the pattern definition statements instead.
2187         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
2189 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2191         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
2192         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2193         (vect_recog_widen_sum_pattern): Use it.
2195 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2197         * tree-vect-loop.c (vectorizable_reduction): Assert that the
2198         phi is not a pattern statement and has not been replaced by
2199         a pattern statement.
2200         * tree-vect-patterns.c (type_conversion_p): Don't check
2201         STMT_VINFO_IN_PATTERN_P.
2202         (vect_recog_vector_vector_shift_pattern): Likewise.
2203         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
2204         the pattern statement rather than the original statement; check
2205         directly for a WIDEN_MULT_EXPR here.
2206         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
2207         vect_is_simple_use to return the pattern statement rather
2208         than the original statement; use is_pattern_stmt_p to check
2209         for such a pattern statement.
2210         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
2211         to return the pattern statement rather than the original statement;
2212         don't do the same transformation here.
2213         (vect_is_simple_use): If the defining statement has been replaced
2214         by a pattern statement, return the pattern statement instead.
2215         Remove the corresponding (local) transformation from the vectype
2216         overload.
2218 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2220         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
2221         end and default to null.
2222         * tree-vect-loop.c (vect_create_epilog_for_reduction)
2223         (vectorizable_reduction): Update calls accordingly, dropping the
2224         gimple ** argument if the passed-back statement isn't needed.
2225         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
2226         (vect_recog_rotate_pattern): Likewise.
2227         (vect_recog_mask_conversion_pattern): Likewise.
2228         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2229         (vect_mask_constant_operand_p): Likewise.
2230         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
2231         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
2232         (get_group_load_store_type, get_load_store_type): Likewise.
2233         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
2234         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
2235         (vectorizable_conversion, vectorizable_assignment): Likewise.
2236         (vectorizable_shift, vectorizable_operation): Likewise.
2237         (vectorizable_store, vect_is_simple_cond): Likewise.
2238         (vectorizable_condition, vectorizable_comparison): Likewise.
2239         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
2240         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
2241         and move it to the end.  Cope with null def_stmt_outs.
2243 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2245         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
2247 2018-06-29  Jeff Law  <law@redhat.com>
2249         * config/v850/v850.c (v850_legitimate_address_p): Handle large
2250         displacements for TARGET_V850E2V3 and newer.
2251         (TARGET_LRA_P): Remove.  Defaults to LRA now.
2252         * config/v850/v850.md (sign23byte_load): Remove.
2253         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
2254         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
2256 2018-06-29  Martin Liska  <mliska@suse.cz>
2258         PR lto/85759
2259         * coverage.c (coverage_init): Mangle full path name.
2260         * doc/invoke.texi: Document the change.
2261         * gcov-io.c (mangle_path): New.
2262         * gcov-io.h (mangle_path): Likewise.
2263         * gcov.c (mangle_name): Use mangle_path for path mangling.
2265 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2267         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
2268         if starting source register is not even.
2270 2018-06-29  Martin Liska  <mliska@suse.cz>
2272         PR tree-optimization/86263
2273         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
2274         Make edge redirection.
2276 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
2278         * dumpfile.c (dump_loc): Add indentation based on scope depth.
2279         (dump_scope_depth): New variable.
2280         (get_dump_scope_depth): New function.
2281         (dump_begin_scope): New function.
2282         (dump_end_scope): New function.
2283         * dumpfile.h (get_dump_scope_depth): New declaration.
2284         (dump_begin_scope): New declaration.
2285         (dump_end_scope): New declaration.
2286         (class auto_dump_scope): New class.
2287         (AUTO_DUMP_SCOPE): New macro.
2288         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
2289         AUTO_DUMP_SCOPE.
2291 2018-06-29  Richard Biener  <rguenther@suse.de>
2293         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
2294         compute_all_dependences succeeds.
2295         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
2296         exceed --param loop-max-datarefs-for-datadeps.
2298 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
2300         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
2302 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
2304         PR target/86348
2305         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
2306         alternative 0 in preferred_for_speed attribute.
2308 2018-06-28  Paul Koning  <ni1d@arrl.net>
2310         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
2311         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
2312         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
2313         * config/pdp11/pdp11.md: Correct "length" attribute calculation
2314         for shift insn patterns.
2316 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
2318         * cgraph.c (cgraph_node::get_body): Replace assignments to
2319         "dump_file" with calls to set_dump_file.
2320         * dumpfile.c (alt_dump_file): Make static, and group with...
2321         (alt_flags): ...this definition.
2322         (dumps_are_enabled): New variable.
2323         (refresh_dumps_are_enabled): New function.
2324         (set_dump_file): New function.
2325         (set_alt_dump_file): New function.
2326         (gcc::dump_manager::dump_start): Replace assignments to
2327         "dump_file" and "alt_dump_file" with calls to set_dump_file and
2328         set_alt_dump_file.
2329         (gcc::dump_manager::dump_finish): Likewise.
2330         * dumpfile.h (alt_dump_file): Delete decl.
2331         (dumps_are_enabled): New variable decl.
2332         (set_dump_file): New function decl.
2333         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
2334         global.
2335         * tree-nested.c (lower_nested_functions): Replace assignments to
2336         "dump_file" with calls to set_dump_file.
2338 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
2340         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
2341         goto_locus of each outgoing edge of each basic block.
2343 2018-06-28  Richard Biener  <rguenther@suse.de>
2345         * dwarf2out.c (decl_scope_table): Remove.
2346         (push_decl_scope): Likewise.
2347         (pop_decl_scope): Likewise.
2348         (gen_type_die_for_member): Do not call push/pop_decl_scope.
2349         (gen_struct_or_union_type_die): Likewise.
2350         (gen_tagged_type_die): Likewise.
2351         (dwarf2out_init): Do not initialize decl_scope_table.
2352         (dwarf2out_c_finalize): Do not free it.
2354 2018-06-28  Richard Biener  <rguenther@suse.de>
2356         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
2357         deciding whether to not re-use a DIE.
2359 2018-06-28  Richard Biener  <rguenther@suse.de>
2361         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
2362         DW_AT_abstract_origin attribute.
2364 2018-06-28  Martin Liska  <mliska@suse.cz>
2366         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
2367         Use newly introduced constants.
2368         * tree-switch-conversion.h (struct jump_table_cluster):
2369         Define max_ratio_for_size and max_ratio_for_speed.
2371 2018-06-28  Martin Liska  <mliska@suse.cz>
2373         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2374         Add new checking assert to catch invalid state.
2375         (jump_table_cluster::can_be_handled): Handle single case
2376         clusters.
2377         (jump_table_cluster::is_beneficial): Bail out for such case.
2378         (bit_test_cluster::find_bit_tests):
2379         Add new checking assert to catch invalid state.
2380         (bit_test_cluster::can_be_handled): Handle single case
2381         clusters.
2382         (bit_test_cluster::is_beneficial): Bail out for such case.
2383         (switch_decision_tree::analyze_switch_statement):
2384         Fix comment.
2386 2018-06-28  Martin Liska  <mliska@suse.cz>
2388         * common.opt: Introduce -completion option.
2389         * gcc.c (driver_handle_option): Handle it.
2390         (driver::main): Print completions if completion
2391         is set.
2392         * opt-suggestions.c (option_proposer::get_completions):
2393         New function.
2394         (option_proposer::suggest_completion): Likewise.
2395         (option_proposer::find_param_completions): Likewise.
2396         (verify_autocompletions): Likewise.
2397         (test_completion_valid_options): Likewise.
2398         (test_completion_valid_params): Likewise.
2399         (in_completion_p): Likewise.
2400         (empty_completion_p): Likewise.
2401         (test_completion_partial_match): Likewise.
2402         (test_completion_garbage): Likewise.
2403         (opt_proposer_c_tests): Likewise.
2404         * opt-suggestions.h: Declare new functions.
2405         * opts.c (common_handle_option): Handle OPT__completion_.
2406         * selftest-run-tests.c (selftest::run_tests): Add
2407         opt_proposer_c_tests.
2408         * selftest.c (assert_str_startswith): New.
2409         * selftest.h (assert_str_startswith): Likewise.
2410         (opt_proposer_c_tests): New.
2411         (ASSERT_STR_STARTSWITH): Likewise.
2413 2018-06-28  Martin Liska  <mliska@suse.cz>
2415         * Makefile.in: Add opt-suggestions.o.
2416         * gcc-main.c: Include opt-suggestions.h.
2417         * gcc.c (driver::driver): Likewise.
2418         (driver::~driver): Remove m_option_suggestions.
2419         (driver::build_option_suggestions): Moved to option_proposer.
2420         (driver::suggest_option): Likewise.
2421         (driver::handle_unrecognized_options): Use option_proposer.
2422         * gcc.h (class driver): Add new memver m_option_proposer.
2423         * opt-suggestions.c: New file.
2424         * opt-suggestions.h: New file.
2426 2018-06-28  Martin Liska  <mliska@suse.cz>
2428         * vec.h (class auto_string_vec): New (moved from auto_argvec).
2429         (auto_string_vec::~auto_string_vec): Likewise.
2431 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
2433         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
2434         prevent_decl_creation_for_types fields up and add reset_location field.
2435         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
2436         statement if id->reset_location is true.
2437         (copy_edges_for_bb): Do not set goto_locus on the new edges if
2438         id->reset_location is true.
2439         (copy_phis_for_bb): Force input_location on the arguments if
2440         id->reset_location is true.
2441         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
2442         is set on the function to be inlined.
2444 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
2446         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
2448 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
2450         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
2451         registers for Pmode.
2452         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
2453         hard registers for the clobbered pseudo.
2455 2018-06-27  Paul Koning  <ni1d@arrl.net>
2457         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
2458         mutually exclusive options.
2459         * config/pdp11/constraints.md (h): New constraint.
2460         (O): Update definition to match shift code generation.
2461         (D): New constraint.
2462         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
2463         (CCFP): Remove.
2464         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
2465         function.
2466         (output_jump): Change arguments.
2467         (pdp11_fixed_cc_regs): New function.
2468         (pdp11_cc_mode): Ditto.
2469         (pdp11_expand_shift): Ditto.
2470         (pdp11_assemble_shift): Ditto.
2471         (pdp11_small_shift): Ditto.
2472         (pdp11_branch_cost): Remove.
2473         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
2474         from output.
2475         (pdp11_register_move_cost): Update for CC registers.
2476         (pdp11_rtx_costs): Add case for LSHIFTRT.
2477         (pdp11_output_jump): Add CCNZ mode conditional branches.
2478         (notice_update_cc_on_set): Remove.
2479         (pdp11_cc_mode): New function.
2480         (simple_memory_operand): Correct pre/post decrement case.
2481         (no_side_effect_operand): New function.
2482         (pdp11_regno_reg_class): Add CC_REGS class.
2483         (pdp11_fixed_cc_regs): New function.
2484         (pdp11_small_shift): New function.
2485         (pdp11_expand_shift): New function to expand shift insns.
2486         (pdp11_assemble_shift): New function to output shifts.
2487         (pdp11_branch_cost): Remove.
2488         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
2489         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
2490         (WCHAR_TYPE): Ditto.
2491         (PTRDIFF_TYPE): Ditto.
2492         (ADJUST_INSN_LENGTH): New macro.
2493         (FIXED_REGISTERS): Add CC registers.
2494         (CALL_USED_REGISTERS): Ditto.
2495         (reg_class): Ditto.
2496         (REG_CLASS_NAMES): Ditto.
2497         (REG_CLASS_CONTENTS): Ditto.
2498         (SELECT_CC_MODE): Use new function.
2499         (TARGET_FLAGS_REGNUM): New macro.
2500         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
2501         (cc0_reg_rtx): Remove.
2502         (CC_STATUS_MDEP): Remove.
2503         (CC_STATUS_MDEFP_INIT): Remove.
2504         (CC_IN_FPU): Remove.
2505         (NOTICE_UPDATE_CC): Remove.
2506         (REGISTER_NAMES): Add CC registers.
2507         (BRANCH_COST): Change to constant 1.
2508         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
2509         handling.
2510         * config/pdp11/pdp11.opt (mbcopy): Remove.
2511         (mbcopy-builtin): Remove.
2512         (mbranch-cheap): Remove.
2513         (mbranch-expensive): Remove.
2514         * config/pdp11/predicates.md (expand_shift_operand): Update to
2515         match shift code generation.
2516         (ccnz_operator): New predicate.
2517         * doc/invoke.texi (PDP-11 Options): Remove deleted options
2518         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
2519         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
2520         exclusive options.
2521         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
2522         description of O constraint.
2524 2018-06-27  Jeff Law  <law@redhat.com>
2525             Austin Law  <austinklaw@gmail.com>
2527         * config/v850/v850.md (addsi3_set_flags): New pattern.
2528         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
2529         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
2530         (zero_extendhisi2_v850_set_flags): Likewise.
2531         (zero_extendqisi2_v850_set_flags): Likewise.
2532         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
2533         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
2534         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
2536         * config/v850/v850-protos.h (notice_update_cc): Remove.
2537         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
2538         (v850_print_operand): Handle 'D' and "d".
2539         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
2540         Add handling of arithmetic/logical operations compared against zero.
2541         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
2542         Do not look at v850_compare_op, instead get mode from last argument.
2543         (v850_gen_compare): Remove
2544         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
2545         after reload for prologue insns.
2546         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
2547         patterns.
2548         (construct_save_jarl): Likewise.
2549         (TARGET_FLAGS_REGNUM): Define.
2550         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
2551         (NOTICE_UPDATE_CC): Remove.
2552         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
2553         than cc0.  Conditionalize on reload_completed.
2554         (cmpsi_insn, setfcc_insn): Likewise.
2555         (tst1 splitter): Turn into define_and_split which sets the flags
2556         after reload.
2557         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
2558         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
2559         (cstoresf4, cstoredf4): Clobber the flags.
2560         (cmpsi, cmpsf, cmpdf): Remove expanders.
2561         (setf_insn): Remove pattern.
2562         (addsi3): Turn into define_and_split which clobbers the flags after
2563         reload and a suitable pattern (addsi3_clobber_flags) for use after
2564         reload.
2565         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
2566         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
2567         (ashrsi3, ashrsi3_v850e2): Likewise.
2568         (bins): Clobber the flags.
2569         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
2570         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
2571         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
2572         (call_value_internal_short, call_value_internal_long): Likewise.
2573         (callt_save_interrupt, callt_return_interrupt): Likewise.
2574         (save_interrupt, return_interrupt): Likewise.
2575         (callt_save_all_interrupt, save_all_interrupt): Likewise.
2576         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
2577         (restore_all_interrupt, _restore_all_interrupt): Likewise.
2578         (All FP comparisons): Only allow after reload has completed.
2579         (trfsr): Likewise.
2580         (divh, divhu): Tweak output template.
2581         (branch_z_normal, branch_z_invert): Remove
2582         (branch_nz_normal, branch_nz_invert): Likewise.
2583         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
2585         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
2586         * config/v850/v850.c (notice_update_cc): Remove.
2587         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
2588         (CC_NO_CARRY): Likewise.
2589         (NOTICE_UPDATE_CC): Define to nothing.
2590         * config/v850/v850.md: Remove block comment on cc0 handling
2591         Remove "cc" attribute from all patterns.  Remove cc_status handling
2592         from all patterns.  Minor formatting fixes.
2594 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2596         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
2597         (cortex-a76.cortex-a55): Likewise.
2598         * config/aarch64/aarch64-tune.md: Regenerate.
2599         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
2600         cortex-a76.cortex-a55.
2602 2018-06-27  Jeff Law  <law@redhat.com>
2604         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
2605         (MULTILIB_DIRNAMES): Similarly.
2607 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
2609         * gimple.h (gimple_return_retbnd): Delete.
2610         (gimple_return_set_retbnd): Likewise.
2611         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
2612         gimple_return_set_retbnd.
2613         * gimple-pretty-print.c (dump_gimple_return): Remove call to
2614         gimple_return_retbnd and adjust.
2615         * tree-inline.h (struct copy_body_data): Remove retbnd field.
2616         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
2617         Explicitly return NULL in a couple more cases.  Move assertion
2618         on debug statements and remove unreachable code.
2619         (reset_debug_binding): Do not test id->retbnd.
2620         (expand_call_inline): Do not set it.
2622 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
2624         * configure.ac: Add --disable-gcov option.
2625         * configure: Regenerate.
2626         * Makefile.in: Honour @enable_gcov@.
2627         * doc/install.texi: Document --disable-gcov.
2629 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2631         * config/arm/arm-cpus.in (cortex-a76): New entry.
2632         (cortex-a76.cortex-a55): Likewise.
2633         * config/arm/arm-tables.opt: Regenerate.
2634         * config/arm/arm-tune.md: Likewise.
2635         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
2636         * doc/invoke.texi (ARM Options): Document cortex-a76 and
2637         cortex-a76.cortex-a55.
2639 2018-06-27 Tamar Christina  <tamar.christina@arm.com>
2641         PR target/85769
2642         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
2644 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
2646         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
2647         comment.
2648         (EPILOGUE_USES): Likewise.
2650 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
2652         * tree-inline.c (remap_location): New function extracted from...
2653         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
2654         (copy_phis_for_bb): ...here.  Call remap_location.
2655         (copy_cfg_body): Adjust call to copy_edges_for_bb.
2657 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
2659         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
2660         unaligned vsx for 16B memset.
2662 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
2664         PR target/86285
2665         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
2666         ieee128_float_type_node to long_double_type_node unless
2667         TARGET_LONG_DOUBLE_128 is set.
2669 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
2671         * cfgloop.c (get_loop_location): Convert return type from
2672         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
2673         by implicit construction from rtx_insn *, and using
2674         dump_user_location_t::from_function_decl for the fallback case.
2675         * cfgloop.h (get_loop_location): Convert return type from
2676         location_t to dump_user_location_t.
2677         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
2678         dump_printf_loc to pass in a dump_location_t rather than a
2679         location_t, via the gimple stmt.
2680         * coverage.c (get_coverage_counts): Update calls to
2681         dump_printf_loc to pass in dump_location_t rather than a
2682         location_t.
2683         * doc/optinfo.texi (Dump types): Convert example of
2684         dump_printf_loc from taking "locus" to taking "insn".  Update
2685         description of the "_loc" calls to cover dump_location_t.
2686         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
2687         "selftest.h".
2688         (dump_user_location_t::dump_user_location_t): New constructors,
2689         from gimple *stmt and rtx_insn *.
2690         (dump_user_location_t::from_function_decl): New function.
2691         (dump_loc): Make static.
2692         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
2693         const dump_location_t &.
2694         (dump_generic_expr_loc): Delete.
2695         (dump_printf_loc): Convert param "loc" from location_t to
2696         const dump_location_t &.
2697         (selftest::test_impl_location): New function.
2698         (selftest::dumpfile_c_tests): New function.
2699         * dumpfile.h: Include "profile-count.h".
2700         (class dump_user_location_t): New class.
2701         (struct dump_impl_location_t): New struct.
2702         (class dump_location_t): New class.
2703         (dump_printf_loc): Convert 2nd param from source_location to
2704         const dump_location_t &.
2705         (dump_generic_expr_loc): Delete.
2706         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
2707         const dump_location_t &.
2708         * gimple-fold.c (fold_gimple_assign): Update call to
2709         dump_printf_loc to pass in a dump_location_t rather than a
2710         location_t, via the gimple stmt.
2711         (gimple_fold_call): Likewise.
2712         * gimple-loop-interchange.cc
2713         (loop_cand::analyze_iloop_reduction_var): Update for change to
2714         check_reduction_path.
2715         (tree_loop_interchange::interchange): Update for change to
2716         find_loop_location.
2717         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
2718         change in return-type of find_loop_location.
2719         (graphite_regenerate_ast_isl): Likewise.
2720         * graphite-optimize-isl.c (optimize_isl): Likewise.
2721         * graphite.c (graphite_transform_loops): Likewise.
2722         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
2723         pass in a dump_location_t rather than a location_t, via the
2724         gimple stmt.
2725         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2726         * ipa.c (walk_polymorphic_call_targets): Likewise.
2727         * loop-unroll.c (report_unroll): Convert "locus" param from
2728         location_t to dump_location_t.
2729         (decide_unrolling): Update for change to get_loop_location's
2730         return type.
2731         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
2732         location_t to dump_user_location_t.
2733         (grid_find_single_omp_among_assignments_1): Updates calls to
2734         dump_printf_loc to pass in a dump_location_t rather than a
2735         location_t, via the gimple stmt.
2736         (grid_parallel_clauses_gridifiable): Convert "tloc" from
2737         location_t to dump_location_t.  Updates calls to dump_printf_loc
2738         to pass in a dump_location_t rather than a location_t, via the
2739         gimple stmt.
2740         (grid_inner_loop_gridifiable_p): Likewise.
2741         (grid_dist_follows_simple_pattern): Likewise.
2742         (grid_gfor_follows_tiling_pattern): Likewise.
2743         (grid_target_follows_gridifiable_pattern): Likewise.
2744         (grid_attempt_target_gridification): Convert initialization
2745         of local "grid" from memset to zero-initialization; FIXME: does
2746         this require C++11?  Update call to dump_printf_loc to pass in a
2747         optinfo_location rather than a location_t, via the gimple stmt.
2748         * profile.c (read_profile_edge_counts): Updates call to
2749         dump_printf_loc to pass in a dump_location_t rather than a
2750         location_t
2751         (compute_branch_probabilities): Likewise.
2752         * selftest-run-tests.c (selftest::run_tests): Call
2753         dumpfile_c_tests.
2754         * selftest.h (dumpfile_c_tests): New decl.
2755         * tree-loop-distribution.c (pass_loop_distribution::execute):
2756         Update for change in return type of find_loop_location.
2757         * tree-parloops.c (parallelize_loops): Likewise.
2758         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
2759         "locus" from location_t to dump_user_location_t.
2760         (canonicalize_loop_induction_variables): Likewise.
2761         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
2762         for change in return type of find_loop_location.
2763         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
2764         to dump_printf_loc to pass in a dump_location_t rather than a
2765         location_t, via the stmt.
2766         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
2767         Likewise.
2768         * tree-vect-loop-manip.c (find_loop_location): Convert return
2769         type from source_location to dump_user_location_t.
2770         (vect_do_peeling): Update for above change.
2771         (vect_loop_versioning): Update for change in type of
2772         vect_location.
2773         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
2774         from location_t to dump_user_location_t.
2775         (vect_estimate_min_profitable_iters): Update for change in type
2776         of vect_location.
2777         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
2778         location_t to dump_location_t.
2779         (vect_slp_bb): Update for change in type of vect_location.
2780         * tree-vectorizer.c (vect_location): Convert from source_location
2781         to dump_user_location_t.
2782         (try_vectorize_loop_1): Update for change in vect_location's type.
2783         (vectorize_loops): Likewise.
2784         (increase_alignment): Likewise.
2785         * tree-vectorizer.h (vect_location): Convert from source_location
2786         to dump_user_location_t.
2787         (find_loop_location): Convert return type from source_location to
2788         dump_user_location_t.
2789         (check_reduction_path): Convert 1st param from location_t to
2790         dump_user_location_t.
2791         * value-prof.c (check_counter): Update call to dump_printf_loc to
2792         pass in a dump_user_location_t rather than a location_t; update
2793         call to error_at for change in type of "locus".
2794         (check_ic_target): Update call to dump_printf_loc to
2795         pass in a dump_user_location_t rather than a location_t, via the
2796         call_stmt.
2798 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
2800         * config/s390/s390.h (enum processor_flags): Do not use
2801         default tune parameter when -march was specified.
2803 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
2805         PR target/86314
2806         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
2807         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
2808         operands.
2810 2018-06-26  Richard Biener  <rguenther@suse.de>
2812         PR tree-optimization/86287
2813         PR bootstrap/86316
2814         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
2815         (vect_analyze_loop): Initialize n_stmts.
2817 2018-06-26  Richard Biener  <rguenther@suse.de>
2819         PR middle-end/86271
2820         * fold-const.c (fold_convertible_p): Pointer extension
2821         isn't valid.
2823 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
2825         PR debug/86064
2826         * dwarf2out.c (loc_list_has_views): Adjust comments.
2827         (dw_loc_list): Split single cross-partition range with
2828         nonzero locview.
2830 2018-06-25  Jeff Law  <law@redhat.com>
2832         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
2833         on -mbig-switch by default.
2835         * config/v850/predicates.md (const_float_1_operand): Fix match_code
2836         test.
2837         (const_float_0_operand): Remove unused predicate.
2838         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
2839         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
2840         (recipsf2): New expander.  Original pattern now called
2841         (recipsf2_insn).
2842         (recipdf2, recipdf2_insn): Similarly.
2843         (rsqrtsf2, rsqrtsf2_insn): Similarly
2844         (rsqrtdf2, rsqrtdf2_insn): Similarly
2846 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
2848         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
2849         Simplify logic for FreeBSD (twice).
2851 2018-06-25  Martin Sebor  <msebor@redhat.com>
2853         PR tree-optimization/86204
2854         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
2855         a strnlen result if it's less than the length of the string.
2857 2018-06-25  Martin Sebor  <msebor@redhat.com>
2859         PR tree-optimization/85700
2860         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
2861         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
2862         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
2864 2018-06-25  Martin Sebor  <msebor@redhat.com>
2866         * doc/extend.texi (Zero-length arrays): Update and clarify.
2868 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
2870         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
2871         added IEEE/IBM long double multilib support on PowerPC little
2872         endian Linux systems.
2873         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
2874         (MULTILIB_DEFAULTS): Likewise.
2875         * config/rs6000/rs6000.c (rs6000_option_override_internal):
2876         Likewise.
2877         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
2878         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
2879         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
2881 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
2883         PR middle-end/86311
2884         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
2885         (REORDER_45): Likewise.
2887 2018-06-25  Jeff Law  <law@redhat.com>
2889         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
2890         dividend to 32 bits.  Adjust length.
2891         (udivmodhi4): Cleanup output template.  Fix length.
2893 2018-06-25  Carl Love  <cel@us.ibm.com>
2895         * config/rs6000/vsx.md: Change word selector to prefered location.
2897 2018-06-25  Richard Biener  <rguenther@suse.de>
2899         PR tree-optimization/86304
2900         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
2901         epilogue-if-converted loops as well.
2903 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
2905         * lto-section-out.c (lto_begin_section): Do not print section
2906         name for noaddr and unnumbered dumps.
2908 2018-06-25  Richard Biener  <rguenther@suse.de>
2910         * tree-vectorizer.h (struct vec_info_shared): New structure
2911         with parts split out from struct vec_info and loop_nest from
2912         struct _loop_vec_info.
2913         (struct vec_info): Adjust accordingly.
2914         (struct _loop_vec_info): Likewise.
2915         (LOOP_VINFO_LOOP_NEST): Adjust.
2916         (LOOP_VINFO_DATAREFS): Likewise.
2917         (LOOP_VINFO_DDRS): Likewise.
2918         (struct _bb_vec_info): Likewise.
2919         (BB_VINFO_DATAREFS): Likewise.
2920         (BB_VINFO_DDRS): Likewise.
2921         (struct _stmt_vec_info): Add dr_aux member.
2922         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
2923         (DR_MISALIGNMENT_UNINITIALIZED): New.
2924         (set_dr_misalignment): Adjust.
2925         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
2926         (vect_analyze_loop): Adjust prototype.
2927         (vect_analyze_loop_form): Likewise.
2928         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
2929         Compute dependences lazily.
2930         (vect_record_base_alignments): Use shared datarefs/ddrs.
2931         (vect_verify_datarefs_alignment): Likewise.
2932         (vect_analyze_data_refs_alignment): Likewise.
2933         (vect_analyze_data_ref_accesses): Likewise.
2934         (vect_analyze_data_refs): Likewise.
2935         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
2936         constructor parameter for shared part.
2937         (vect_analyze_loop_form): Pass in shared part and adjust.
2938         (vect_analyze_loop_2): Pass in storage for the number of
2939         stmts.  Move loop nest finding to the caller.  Compute
2940         datarefs lazily.
2941         (vect_analyze_loop): Pass in shared part.
2942         (vect_transform_loop): Verify shared datarefs are unchanged.
2943         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
2944         constructor parameter for shared part.
2945         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
2946         (vect_slp_bb): Verify shared datarefs are unchanged before
2947         transform.
2948         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
2949         change.
2950         (new_stmt_vec_info): Initialize DR_AUX misalignment to
2951         DR_MISALIGNMENT_UNINITIALIZED.
2952         * tree-vectorizer.c (vec_info::vec_info): Add constructor
2953         parameter for shared part.
2954         (vec_info::~vec_info): Adjust.
2955         (vec_info_shared::vec_info_shared): New.
2956         (vec_info_shared::~vec_info_shared): Likewise.
2957         (vec_info_shared::save_datarefs): Likewise.
2958         (vec_info_shared::check_datarefs): Likewise.
2959         (try_vectorize_loop_1): Construct shared part live for analyses
2960         of a single loop for multiple vector sizes.
2961         * tree-parloops.c (gather_scalar_reductions): Adjust.
2963 2018-06-25  Richard Biener  <rguenther@suse.de>
2965         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
2966         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
2967         (vect_analyze_data_refs): Remove similar code from here and
2968         simplify accordingly.
2970 2018-06-25  Richard Biener  <rguenther@suse.de>
2972         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
2973         for reverse storage order accesses rather than asserting
2974         they cannot happen here.
2976 2018-06-25  Tom de Vries  <tdevries@suse.de>
2978         PR debug/86257
2979         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
2980         Use data16 instead of .byte for insn prefix.
2982 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
2984         PR C++/86082
2985         * parser.c (make_char_string_pack): Pass this literal chars
2986         through cpp_interpret_string.
2987         (cp_parser_userdef_numeric_literal): Check the result of
2988         make_char_string_pack.
2990 2018-06-24  Maya Rashish  <coypu@sdf.org>
2992         * ginclude/stddef.h: Simplify conditions around avoiding
2993         re-definition of __size_t.
2995 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
2997         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
2998         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
3000 2018-06-22  Maya Rashish  <coypu@sdf.org>
3002         * doc/invoke.texi (mno-fancy-math-387): Update for changes
3003         made to OpenBSD and NetBSD through the years.
3005 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3007         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3008         behavior of vec_pack (vector double, vector double) to match
3009         behavior of vec_float2 (vector double, vector double).
3011 2018-06-22  Olivier Hainque  <hainque@adacore.com>
3013         * gimplify.c (gimplify_function_tree): Prevent creation
3014         of a trampoline for the address of the current function
3015         passed to entry/exit instrumentation hooks.
3017 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
3019         PR target/86222
3020         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
3021         correctly.
3023 2018-06-22  Martin Liska  <mliska@suse.cz>
3025         PR tree-optimization/86263
3026         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3027         Bail out if is_enabled is false.
3028         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
3029         New declaration.
3030         (jump_table_cluster::is_enabled): New function.
3032 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
3034         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3035         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
3036         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
3037         (lto_input_ts_binfo_tree_pointers): Likewise.
3038         * tree-streamer-out.c (streamer_write_tree_bitfields,
3039         write_ts_binfo_tree_pointers): Likewise.
3040         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
3042 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
3044         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
3046 2018-06-22  Martin Liska  <mliska@suse.cz>
3048         * symbol-summary.h (get): Make it pure and inline move
3049         functionality from ::get function.
3050         (get): Remove and inline into ::get and ::get_create.
3051         (get_create): Move code from ::get function.
3053 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3055         PR target/85994
3056         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
3057         -x assembler-with-cpp.
3059 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3061         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
3062         _FILE_OFFSET_BITS=64 for C++.
3064 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
3066         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
3067         conversion insn that shows up when pr85657-3.c is compiled using
3068         IEEE 128-bit long double.
3069         (neg<mode>2_internal): Use the correct mode to check whether the
3070         mode is IBM extended.
3071         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
3072         multiply and divide external functions from being created more
3073         than once.
3075 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3077         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
3078         functions.
3079         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
3080         the edge can be forwarded.
3081         (cfg_layout_merge_blocks): Likewise.
3083 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3085         * except.c (finish_eh_generation): Commit edge insertions only after
3086         the EH edges have been redirected from post-landing to landing pads.
3088 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3090         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
3091         create_tmp_var_for to create the FRAME decl.
3092         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
3094 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3096         * tree-inline.c (copy_edges_for_bb): Minor tweak.
3097         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
3098         debug statement when resetting its value.
3099         (expand_call_inline): Copy the locus of the call onto the assignment
3100         of the return value, if any.  Use local variable in more cases.
3102 2018-06-21  Martin Liska  <mliska@suse.cz>
3104         * ipa-pure-const.c (propagate_nothrow): Use
3105         funct_state_summaries->get.
3106         (dump_malloc_lattice): Likewise.
3107         (propagate_malloc): Likewise.
3109 2018-06-21  Richard Biener  <rguenther@suse.de>
3111         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
3112         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
3113         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
3114         comment.
3115         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
3116         BLOCK_ABSTRACT_ORIGIN unconditionally.
3118 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
3120         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
3121         deleting it.
3122         * ipa-reference.c (ipa_reference_c_finalize): Delete
3123         ipa_ref_opt_sum_summaries and set it to NULL.
3125 2018-06-21  Tom de Vries  <tdevries@suse.de>
3127         PR tree-optimization/85859
3128         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
3129         test with comment from bb_no_side_effects_p.
3131 2018-06-21  Richard Biener  <rguenther@suse.de>
3133         PR tree-optimization/86232
3134         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
3135         max for constant niter.
3137 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3139         * config/aarch64/aarch64-simd.md
3140         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
3142 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3144         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
3145         Make opernads of the unspec commutative.
3147 2018-06-21  Richard Biener  <rguenther@suse.de>
3149         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
3150         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
3151         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
3152         (vect_analyze_data_ref_dependence): Re-order checks to deal with
3153         NULL DR_STEP.
3154         (vect_record_base_alignments): Do not record base alignment
3155         for gathers or scatters.
3156         (vect_compute_data_ref_alignment): Drop return value that is always
3157         true.  Bail out early for gathers or scatters.
3158         (vect_enhance_data_refs_alignment): Bail out early for gathers
3159         or scatters.
3160         (vect_find_same_alignment_drs): Likewise.
3161         (vect_analyze_data_refs_alignment): Remove dead code.
3162         (vect_slp_analyze_and_verify_node_alignment): Likewise.
3163         (vect_analyze_data_refs): For possible gathers or scatters do
3164         not create an alternate DR, just check their possible validity
3165         and mark them.  Adjust DECL_NONALIASED handling to not rely
3166         on DR_BASE_ADDRESS.
3167         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
3168         update inits of gathers or scatters.
3169         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
3170         Also copy gather/scatter flag to pattern vinfo.
3172 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3174         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3175         behavior of vec_packsu (vector unsigned long long, vector unsigned
3176         long long) to match behavior of vec_packs with same signature.
3178 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
3179             Thomas Schwinge <thomas@codesourcery.com>
3180             Cesar Philippidis  <cesar@codesourcery.com>
3182         * gimplify.c (gimplify_scan_omp_clauses): Add support for
3183         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3184         (gimplify_adjust_omp_clauses): Likewise.
3185         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
3186         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
3187         (gimplify_omp_target_update): Update handling of acc update and
3188         enter/exit data.
3189         * omp-low.c (install_var_field): Remove unused parameter
3190         base_pointers_restrict.
3191         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
3192         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
3193         FINALIZE}
3194         (omp_target_base_pointers_restrict_p): Delete.
3195         (scan_omp_target): Update call to scan_sharing_clauses.
3196         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
3197         FINALIZE}.
3198         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
3199         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3200         (convert_local_omp_clauses): Likewise.
3201         * tree-pretty-print.c (dump_omp_clause): Likewise.
3202         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
3203         FINALIZE}.
3204         (omp_clause_code_name): Likewise.
3206 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
3208         PR debug/86194
3209         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
3210         be narrowed.
3212         PR tree-optimization/86231
3213         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
3214         anti-range don't overwrite *vr0min before using it to compute *vr0max.
3216 2018-06-20  Tom de Vries  <tdevries@suse.de>
3218         PR tree-optimization/86097
3219         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
3220         iv type if signedness of iv type is not the same as that of *nit.
3222 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
3224         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
3225         EDGE_EH edges, verify they are all EDGE_EH.
3227 2018-06-20  Maya Rashish  <coypu@sdf.org>
3229         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
3231 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3233         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
3234         * config/aarch64/aarch64.c (xgene1_tunings): Add
3235         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
3236         (aarch64_mode_valid_for_sched_fusion_p):
3237         Allow 16-byte modes.
3238         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
3239         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
3240         128-bit modes.
3241         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
3242         New pattern.
3243         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
3244         * config/aarch64/iterators.md (VQ2): New mode iterator.
3246 2018-06-20  Martin Liska  <mliska@suse.cz>
3248         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3249         Change default ratio from 10 to 8.
3251 2018-06-20  Martin Liska  <mliska@suse.cz>
3253         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3254         New.
3255         (bit_test_cluster::find_bit_tests): Likewise.
3256         (switch_decision_tree::analyze_switch_statement): Find clusters.
3257         * tree-switch-conversion.h (struct jump_table_cluster): Document
3258         hierarchy.
3260 2018-06-20  Martin Liska  <mliska@suse.cz>
3262         * tree-switch-conversion.c (switch_conversion::collect):
3263         Record m_uniq property.
3264         (switch_conversion::expand): Bail out for special conditions.
3265         (group_cluster::~group_cluster): New.
3266         (group_cluster::group_cluster): Likewise.
3267         (group_cluster::dump): Likewise.
3268         (jump_table_cluster::emit): New.
3269         (switch_decision_tree::fix_phi_operands_for_edges): New.
3270         (struct case_node): Remove struct.
3271         (jump_table_cluster::can_be_handled): New.
3272         (case_values_threshold): Moved to header.
3273         (reset_out_edges_aux): Likewise.
3274         (jump_table_cluster::is_beneficial): New.
3275         (bit_test_cluster::can_be_handled): Likewise.
3276         (add_case_node): Remove.
3277         (bit_test_cluster::is_beneficial): New.
3278         (case_bit_test::cmp): New.
3279         (bit_test_cluster::emit): New.
3280         (expand_switch_as_decision_tree_p): Remove.
3281         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
3282         (fix_phi_operands_for_edge): Likewise.
3283         (switch_decision_tree::analyze_switch_statement): New.
3284         (compute_cases_per_edge): Move ...
3285         (switch_decision_tree::compute_cases_per_edge): ... here.
3286         (try_switch_expansion): Likewise.
3287         (switch_decision_tree::try_switch_expansion): Likewise.
3288         (record_phi_operand_mapping): Likewise.
3289         (switch_decision_tree::record_phi_operand_mapping): Likewise.
3290         (emit_case_decision_tree): Likewise.
3291         (switch_decision_tree::emit): Likewise.
3292         (balance_case_nodes): Likewise.
3293         (switch_decision_tree::balance_case_nodes): Likewise.
3294         (dump_case_nodes): Likewise.
3295         (switch_decision_tree::dump_case_nodes): Likewise.
3296         (emit_jump): Likewise.
3297         (switch_decision_tree::emit_jump): Likewise.
3298         (emit_cmp_and_jump_insns): Likewise.
3299         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
3300         (emit_case_nodes): Likewise.
3301         (switch_decision_tree::emit_case_nodes): Likewise.
3302         (conditional_probability): Remove.
3303         * tree-switch-conversion.h (enum cluster_type): New.
3304         (PRINT_CASE): New.
3305         (struct cluster): Likewise.
3306         (cluster::cluster): Likewise.
3307         (struct simple_cluster): Likewise.
3308         (simple_cluster::simple_cluster): Likewise.
3309         (struct group_cluster): Likewise.
3310         (struct jump_table_cluster): Likewise.
3311         (struct bit_test_cluster): Likewise.
3312         (struct min_cluster_item): Likewise.
3313         (struct case_tree_node): Likewise.
3314         (case_tree_node::case_tree_node): Likewise.
3315         (jump_table_cluster::case_values_threshold): Likewise.
3316         (struct case_bit_test): Likewise.
3317         (struct switch_decision_tree): Likewise.
3318         (struct switch_conversion): Likewise.
3319         (switch_decision_tree::reset_out_edges_aux): Likewise.
3321 2018-06-20  Martin Liska  <mliska@suse.cz>
3323         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
3324         (hoist_edge_and_branch_if_true): Likewise.
3325         (expand_switch_using_bit_tests_p): Likewise.
3326         (struct case_bit_test): Likewise.
3327         (case_bit_test_cmp): Likewise.
3328         (emit_case_bit_tests): Likewise.
3329         (switch_conversion::switch_conversion): New class.
3330         (struct switch_conv_info): Remove old struct.
3331         (collect_switch_conv_info): More to ...
3332         (switch_conversion::collect): ... this.
3333         (check_range): Likewise.
3334         (switch_conversion::check_range): Likewise.
3335         (check_all_empty_except_final): Likewise.
3336         (switch_conversion::check_all_empty_except_final): Likewise.
3337         (check_final_bb): Likewise.
3338         (switch_conversion::check_final_bb): Likewise.
3339         (create_temp_arrays): Likewise.
3340         (switch_conversion::create_temp_arrays): Likewise.
3341         (free_temp_arrays): Likewise.
3342         (gather_default_values): Likewise.
3343         (switch_conversion::gather_default_values): Likewise.
3344         (build_constructors): Likewise.
3345         (switch_conversion::build_constructors): Likewise.
3346         (constructor_contains_same_values_p): Likewise.
3347         (switch_conversion::contains_same_values_p): Likewise.
3348         (array_value_type): Likewise.
3349         (switch_conversion::array_value_type): Likewise.
3350         (build_one_array): Likewise.
3351         (switch_conversion::build_one_array): Likewise.
3352         (build_arrays): Likewise.
3353         (switch_conversion::build_arrays): Likewise.
3354         (gen_def_assigns): Likewise.
3355         (switch_conversion::gen_def_assigns): Likewise.
3356         (prune_bbs): Likewise.
3357         (switch_conversion::prune_bbs): Likewise.
3358         (fix_phi_nodes): Likewise.
3359         (switch_conversion::fix_phi_nodes): Likewise.
3360         (gen_inbound_check): Likewise.
3361         (switch_conversion::gen_inbound_check): Likewise.
3362         (process_switch): Use the newly created class.
3363         (switch_conversion::expand): New.
3364         (switch_conversion::~switch_conversion): New.
3365         * tree-switch-conversion.h: New file.
3367 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3369         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
3370         tree-vect-patterns.c.
3371         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
3372         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
3373         (vect_recog_sad_pattern): Likewise.
3374         (vect_recog_widen_sum_pattern): Likewise.
3375         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
3376         (vect_recog_widen_shift_pattern): Remove the type_in argument.
3377         (vect_recog_rotate_pattern): Likewise.
3378         (vect_recog_mult_pattern): Likewise.
3379         (vect_recog_vector_vector_shift_pattern): Likewise.
3380         (vect_recog_divmod_pattern): Likewise.
3381         (vect_recog_mixed_size_cond_pattern): Likewise.
3382         (vect_recog_bool_pattern): Likewise.
3383         (vect_recog_mask_conversion_pattern): Likewise.
3384         (vect_try_gather_scatter_pattern): Likewise.
3385         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
3386         (vect_recog_over_widening_pattern): Likewise.
3387         (vect_recog_gather_scatter_pattern): Likewise.
3388         (vect_recog_func_ptr): Move from tree-vectorizer.h
3389         (vect_vect_recog_func_ptrs): Move further down the file.
3390         (vect_recog_func): Likewise.  Remove the third argument.
3391         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
3392         (vect_pattern_recog_1): Expect the pattern function to do any
3393         necessary target tests.  Also expect it to provide a vector type.
3394         Remove the type_in handling.
3396 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3398         * tree-vect-patterns.c (vect_pattern_detected): New function.
3399         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
3400         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
3401         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
3402         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
3403         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3404         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3405         (vect_recog_mask_conversion_pattern)
3406         (vect_try_gather_scatter_pattern): Likewise.
3408 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3410         * tree-vect-patterns.c (vect_get_internal_def): New function.
3411         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3412         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
3413         (search_type_for_mask_1): Use it.
3415 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3417         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
3418         redundant WIDEN_SUM_EXPR handling.
3419         (vect_recog_sad_pattern): Likewise.
3421 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3423         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
3424         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
3425         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
3426         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
3427         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
3429 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3431         * tree-vect-stmts.c (vectorizable_call): Make sure that we
3432         use the stmt_vec_info of the original bb statement for the
3433         new zero assignment, even if the call is part of a pattern.
3435 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3437         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
3438         that the sequence is attached to the original statement rather
3439         than the pattern statement.
3440         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
3441         PATTERN_DEF_SEQ from the original statement rather than
3442         the main pattern statement.
3443         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
3444         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
3445         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
3447 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
3449         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
3450         definition statements before the early exit for statements that aren't
3451         live or relevant.
3452         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
3453         split out from...
3454         (vect_transform_loop): ...here.  Process pattern definition
3455         statements without first checking whether the main pattern
3456         statement is live or relevant.
3458 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
3460         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
3461         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
3463 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
3465         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
3466         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
3467         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
3468         (expand_block_compare): Change select_block_compare_mode call.
3469         (expand_strncmp_align_check): Use new functions, fix comment.
3470         (emit_final_str_compare_gpr): New function.
3471         (expand_strn_compare): Refactor and clean up code.
3472         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
3474 2018-06-19  Tony Reix  <tony.reix@atos.com>
3475             Damien Bergamini  <damien.bergamini@atos.com>
3476             David Edelsohn  <dje.gcc@gmail.com>
3478         * collect2.c (static_obj): New variable.
3479         (static_libs): New variable.
3480         (is_in_list): Uncomment declaration.
3481         (main): Track AIX libraries linked statically.
3482         (is_in_list): Uncomment definition.
3483         (scan_prog_file): Don't add AIX shared libraries initializer
3484         to constructor list if linking statically.
3486 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
3488         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
3489         constant.
3490         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
3492 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
3494         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
3495         blocks.
3497 2018-06-19  Martin Liska  <mliska@suse.cz>
3499         * config/i386/i386.c (ix86_can_inline_p): Do not use
3500         ipa_fn_summaries::get_create.
3501         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
3502         get.
3503         (devirtualization_time_bonus): Likewise.
3504         (ipcp_propagate_stage): Likewise.
3505         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
3506         (edge_set_predicate): Likewise.
3507         (evaluate_conditions_for_known_args): Likewise.
3508         (evaluate_properties_for_edge): Likewise.
3509         (ipa_call_summary::reset): Tranform to ...
3510         (ipa_call_summary::~ipa_call_summary): ... this.
3511         (ipa_fn_summary::reset): Transform to ...
3512         (ipa_fn_summary::~ipa_fn_summary): ... this.
3513         (ipa_fn_summary_t::remove): Rename to ...
3514         (ipa_fn_summary_t::remove_callees): ... this.
3515         (ipa_fn_summary_t::duplicate): Use placement new
3516         instead of memory copy.
3517         (ipa_call_summary_t::duplicate): Likewise.
3518         (ipa_call_summary_t::remove): Remove.
3519         (dump_ipa_call_summary): Change get_create to get.
3520         (ipa_dump_fn_summary): Dump only when summary exists.
3521         (analyze_function_body): Use symbol_summary::get instead
3522         of get_create.
3523         (compute_fn_summary): Likewise.
3524         (estimate_edge_devirt_benefit): Likewise.
3525         (estimate_edge_size_and_time): Likewise.
3526         (inline_update_callee_summaries): Likewise.
3527         (remap_edge_change_prob): Likewise.
3528         (remap_edge_summaries): Likewise.
3529         (ipa_merge_fn_summary_after_inlining): Likewise.
3530         (write_ipa_call_summary): Likewise.
3531         (ipa_fn_summary_write): Likewise.
3532         (ipa_free_fn_summary): Likewise.
3533         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
3534         (struct ipa_call_summary): Likewise.
3535         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
3536         of get_create.
3537         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
3538         (estimate_size_after_inlining): Likewise.
3539         (estimate_growth): Likewise.
3540         (growth_likely_positive): Likewise.
3541         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
3542         (inline_call): Likewise.
3543         * ipa-inline.c (caller_growth_limits): Likewise.
3544         (can_inline_edge_p): Likewise.
3545         (can_inline_edge_by_limits_p): Likewise.
3546         (compute_uninlined_call_time): Likewise.
3547         (compute_inlined_call_time): Likewise.
3548         (want_inline_small_function_p): Likewise.
3549         (edge_badness): Likewise.
3550         (update_caller_keys): Likewise.
3551         (update_callee_keys): Likewise.
3552         (inline_small_functions): Likewise.
3553         (inline_to_all_callers_1): Likewise.
3554         (dump_overall_stats): Likewise.
3555         (early_inline_small_functions): Likewise.
3556         (early_inliner): Likewise.
3557         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
3558         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3559         * ipa-pure-const.c (malloc_candidate_p): Likewise.
3560         * ipa-split.c (execute_split_functions): Likewise.
3561         * symbol-summary.h: Likewise.
3562         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
3564 2018-06-19  Richard Biener  <rguenther@suse.de>
3566         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
3567         (vectorize_loops): ... here.  Fix dbgcnt handling.
3568         (try_vectorize_loop): Wrap try_vectorize_loop_1.
3570 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
3572         PR target/86197
3573         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
3574         ieee128 argument takes up only one (vector) register, not two (floating
3575         point) registers.
3577 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
3579         * gimplify.c (gimplify_init_constructor): Really never clear for an
3580         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
3582 2018-06-19  Richard Biener  <rguenther@suse.de>
3584         PR tree-optimization/86179
3585         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
3586         after failed recognition.
3588 2018-06-18  Martin Sebor  <msebor@redhat.com>
3590         PR middle-end/85602
3591         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
3592         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
3593         Handle integer subtraction.
3594         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
3595         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
3597 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
3599         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
3600         param from rtx to rtx_insn *.
3601         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
3602         param.
3603         (frv_ifcvt_modify_insn): Likwise.
3604         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
3605         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
3606         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
3607         as_a <rtx_insn *> cast to local "unprotected_region" once
3608         it's been established that it's not NULL or pc_rtx.
3609         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
3610         param "sethi" from rtx to rtx_insn *.
3611         (nds32_group_float_insns): Likewise for param "insn".
3612         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
3613         param.
3614         (vax_output_int_subtract): Likewise.
3615         * config/vax/vax.c (vax_output_int_add): Likewise for param
3616         "insn".
3617         (vax_output_int_subtract): Likewise.
3618         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
3619         (emit_pattern_after): Likewise for param "after".
3620         (emit_insn_after): Likewise.
3621         (emit_jump_insn_after): Likewise.
3622         (emit_call_insn_after): Likewise.
3623         (emit_debug_insn_after): Likewise.
3624         (emit_pattern_before): Likewise for param "before".
3625         (emit_insn_before): Likewise.
3626         (emit_jump_insn_before): Likewise.
3627         * final.c (get_insn_template): Likewise for param "insn", removing
3628         a cast.
3629         * output.h (get_insn_template): Likewise for 2nd param.
3630         * rtl.h (emit_insn_before): Likewise.
3631         (emit_jump_insn_before): Likewise.
3632         (emit_debug_insn_before_noloc): Likewise.
3633         (emit_insn_after): Likewise.
3634         (emit_jump_insn_after): Likewise.
3635         (emit_call_insn_after): Likewise.
3636         (emit_debug_insn_after): Likewise.
3637         (set_insn_deleted): Likewise for param.
3639 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
3641         PR target/85358
3642         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
3643         floating point modes, so that IFmode is numerically greater than
3644         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
3645         to declare the ordering.  This prevents IFmode from being
3646         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
3647         machine.  Include rs6000-modes.h to share the fractional values
3648         between genmodes* and the rest of the compiler.
3649         (IFmode): Likewise.
3650         (KFmode): Likewise.
3651         (TFmode): Likewise.
3652         * config/rs6000/rs6000-modes.h: New file.
3653         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
3654         meaning of rs6000_long_double_size so that 126..128 selects an
3655         appropriate 128-bit floating point type.
3656         (rs6000_option_override_internal): Likewise.
3657         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
3658         (TARGET_LONG_DOUBLE_128): Change the meaning of
3659         rs6000_long_double_size so that 126..128 selects an appropriate
3660         128-bit floating point type.
3661         (LONG_DOUBLE_TYPE_SIZE): Update comment.
3662         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
3663         source and destination to match the standard usage.
3664         (truncifkf2): Likewise.
3665         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
3666         ISA 2.07 to use an explicit clobber, instead of passing in a
3667         temporary.
3668         (copysign<mode>3_soft): Likewise.
3670 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
3672         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
3673         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
3674         (vect_slp_analyze_instance_dependence): Likewise.
3675         (vect_enhance_data_refs_alignment): Likewise.
3676         (vect_analyze_data_refs_alignment): Likewise.
3677         (vect_slp_analyze_and_verify_instance_alignment
3678         (vect_analyze_data_ref_accesses): Likewise.
3679         (vect_prune_runtime_alias_test_list): Likewise.
3680         (vect_analyze_data_refs): Likewise.
3681         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
3682         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
3683         (vect_analyze_scalar_cycles_1): Likewise.
3684         (vect_get_loop_niters): Likewise.
3685         (vect_analyze_loop_form_1): Likewise.
3686         (vect_update_vf_for_slp): Likewise.
3687         (vect_analyze_loop_operations): Likewise.
3688         (vect_analyze_loop): Likewise.
3689         (vectorizable_induction): Likewise.
3690         (vect_transform_loop): Likewise.
3691         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
3692         * tree-vect-slp.c (vect_analyze_slp): Likewise.
3693         (vect_make_slp_decision): Likewise.
3694         (vect_detect_hybrid_slp): Likewise.
3695         (vect_slp_analyze_operations): Likewise.
3696         (vect_slp_bb): Likewise.
3697         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
3698         (vectorizable_bswap): Likewise.
3699         (vectorizable_call): Likewise.
3700         (vectorizable_simd_clone_call): Likewise.
3701         (vectorizable_conversion): Likewise.
3702         (vectorizable_assignment): Likewise.
3703         (vectorizable_shift): Likewise.
3704         (vectorizable_operation): Likewise.
3705         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
3707 2018-06-18  Martin Sebor  <msebor@redhat.com>
3709         PR tree-optimization/81384
3710         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
3711         * builtins.c (expand_builtin_strnlen): New function.
3712         (expand_builtin): Call it.
3713         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
3714         * builtins.def (BUILT_IN_STRNLEN): New.
3715         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
3716         Warn for bounds in excess of maximum object size.
3717         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
3718         single-value ranges.  Handle strnlen.
3719         (handle_builtin_strlen): Handle strnlen.
3720         (strlen_check_and_optimize_stmt): Same.
3721         * doc/extend.texi (Other Builtins): Document strnlen.
3723 2018-06-18  Maya Rashish  <coypu@sdf.org>
3725         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
3726         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
3727         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
3729         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
3730         here to ...
3731         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
3733 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3735         * tree.c (escaped_string::escape): Replace cast to char * by
3736         const_cast<char *> (unescaped).
3738 2018-06-18  Nick Clifton  <nickc@redhat.com>
3740         PR 84195
3741         * tree.c (escaped_string): New class.  Converts an unescaped
3742         string into its escaped equivalent.
3743         (warn_deprecated_use): Use the new class to convert the
3744         deprecation message, if present.
3745         (test_escaped_strings): New self test.
3746         (test_c_tests): Add test_escaped_strings.
3747         * doc/extend.texi (deprecated): Add a note that the
3748         deprecation message is affected by the -fmessage-length
3749         option, and that control characters will be escaped.
3750         (#pragma GCC error): Document this pragma.
3751         (#pragma GCC warning): Likewise.
3752         * doc/invoke.texi (-fmessage-length): Document this option's
3753         effect on the #warning and #error preprocessor directives and
3754         the deprecated attribute.
3756 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
3758         * tree.c (decl_value_expr_lookup): Revert latest change.
3759         (decl_value_expr_insert): Likewise.
3761 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
3763         * gimplify.c (nonlocal_vlas): Delete.
3764         (nonlocal_vla_vars): Likewise.
3765         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
3766         referenced VLAs.
3767         (gimplify_body): Do not create and destroy nonlocal_vlas.
3768         * tree-nested.c: Include diagnostic.h.
3769         (use_pointer_in_frame): Tweak.
3770         (lookup_field_for_decl): Add assertion and declare the transformation.
3771         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
3772         internal error when the reference is in a wrong context.  Do not
3773         create a debug decl by default.
3774         (note_nonlocal_block_vlas): Delete.
3775         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
3776         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
3777         create a debug decl by default.
3778         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
3779         call is in a wrong context.
3780         (fixup_vla_decls): New function.
3781         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
3782         debug variables were created.
3783         * tree.c (decl_value_expr_lookup): Add checking assertion.
3784         (decl_value_expr_insert): Likewise.
3786 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
3788         PR middle-end/82479
3789         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
3790         * tree-scalar-evolution.c (interpret_expr): Likewise.
3791         (expression_expensive_p): Likewise.
3792         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
3793         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
3794         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
3795         (ssa_defined_by_minus_one_stmt_p): New.
3797 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
3799         PR middle-end/64946
3800         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
3801         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
3802         * dojump.c (do_jump): Likewise.
3803         * expr.c (expand_expr_real_2): Check operand type's sign.
3804         * fold-const.c (const_unop): Handle ABSU_EXPR.
3805         (fold_abs_const): Likewise.
3806         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
3807         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
3808         (strip_sign_op_1): Likesise.
3809         * match.pd: Add new pattern to generate ABSU_EXPR.
3810         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
3811         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
3812         * tree-eh.c (operation_could_trap_helper_p): Likewise.
3813         * tree-inline.c (estimate_operator_cost): Likewise.
3814         * tree-pretty-print.c (dump_generic_node): Likewise.
3815         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
3816         * tree.def (ABSU_EXPR): New.
3818 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
3820         PR middle-end/86095
3821         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
3822         documented as preserved for backward compatibility only.
3823         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
3825         PR rtl-optimization/86108
3826         * bb-reorder.c (create_forwarder_block): Renamed to ...
3827         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
3828         jump from new landing pad to the second part.
3829         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
3830         Adjust callers.
3832 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
3834         PR middle-end/85878
3835         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
3836         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
3837         Only call store_expr for halves if the mode is the same.
3839         PR middle-end/86123
3840         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
3841         Fix up comment formatting.
3843 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3845         * typed-splay-tree.h (typed_splay_tree::remove): New function.
3846         (typed_splay_tree::closure,
3847         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
3848         (typed_splay_tree::typed_splay_tree,
3849         typed_splay_tree::operator =): Declared private.
3850         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
3851         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
3852         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
3853         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
3854         typed_splay_tree::splay_tree_splay,
3855         typed_splay_tree::splay_tree_foreach_helper,
3856         typed_splay_tree::splay_tree_insert,
3857         typed_splay_tree::splay_tree_remove,
3858         typed_splay_tree::splay_tree_lookup,
3859         typed_splay_tree::splay_tree_predecessor,
3860         typed_splay_tree::splay_tree_successor,
3861         typed_splay_tree::splay_tree_min,
3862         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
3863         (typed_splay_tree::root, typed_splay_tree::comp,
3864         typed_splay_tree::delete_key,
3865         typed_splay_tree::delete_value): New data members.
3866         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
3867         typed_splay_tree::remove.
3869 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
3871         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
3872         -mginv and -mno-ginv to the assembler.
3873         * config/mips/mips.opt (-mcrc): New option.
3874         (-mginv): Likewise.
3875         * doc/invoke.text (-mcrc): Document.
3876         (-mginv): Likewise.
3878 2018-06-15  Nick Clifton  <nickc@redhat.com>
3880         PR 84195
3881         * tree.c (escaped_string): New class.  Converts an unescaped
3882         string into its escaped equivalent.
3883         (warn_deprecated_use): Use the new class to convert the
3884         deprecation message, if present.
3885         (test_escaped_strings): New self test.
3886         (test_c_tests): Add test_escaped_strings.
3887         * doc/extend.texi (deprecated): Add a note that the
3888         deprecation message is affected by the -fmessage-length
3889         option, and that control characters will be escaped.
3890         (#pragma GCC error): Document this pragma.
3891         (#pragma GCC warning): Likewise.
3892         * doc/invoke.texi (-fmessage-length): Document this option's
3893         effect on the #warning and #error preprocessor directives and
3894         the deprecated attribute.
3896 2018-06-15  Richard Biener  <rguenther@suse.de>
3898         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
3899         here, also noting vector size used.
3900         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
3901         size used in MSG_OPTIMIZED_LOCATIONS dump.
3902         (pass_slp_vectorize::execute): Adjust.
3904 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
3906         PR target/85968
3907         * config/arc/arc.c (arc_return_address_register): Fix
3908         if-condition.
3910 2018-06-15  Richard Biener  <rguenther@suse.de>
3912         PR middle-end/86159
3913         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
3914         leave useless conversion stripping to force_gimple_operand_gsi.
3915         (gimplify_build2): Likewise.
3916         (gimplify_build1): Likewise.
3918 2018-06-15  Richard Biener  <rguenther@suse.de>
3920         PR middle-end/86076
3921         * tree-cfg.c (move_stmt_op): unshare invariant addresses
3922         before adjusting their block.
3924 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3926         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
3927         multilibs for *-*-rtems*.
3928         * config/riscv/t-rtems: New file.
3930 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
3932         PR middle-end/86122
3933         * match.pd ((A +- CST1) +- CST2): Punt if last resort
3934         unsigned_type_for returns NULL.
3936         PR target/85945
3937         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
3938         subregs of multi-word pseudos unless the float mode has word size.
3940 2018-06-14  Richard Biener  <rguenther@suse.de>
3942         PR middle-end/86139
3943         * tree-vect-generic.c (build_word_mode_vector_type): Remove
3944         duplicate and harmful type_hash_canon.
3945         * tree.c (type_hash_canon): Assert we didn't find ourselves.
3947 2018-06-14  Richard Biener  <rguenther@suse.de>
3949         PR ipa/86124
3950         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
3951         NULL cgraph_node.
3953 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3955         * config/rtems.h (STDINT_LONG32): Define.
3957 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
3958             Prachi Godbole  <prachi.godbole@imgtec.com>
3960         * config/mips/mips-cpus.def: Define P6600.
3961         * config/mips/mips-tables.opt: Regenerate.
3962         * config/mips/mips.c (mips_ucbranch_type): New enum.
3963         (mips_rtx_cost_data): Add support for P6600.
3964         (mips_issue_rate): Likewise.
3965         (mips_multipass_dfa_lookahead): Likewise.
3966         (mips_avoid_hazard): Likewise.
3967         (mips_reorg_process_insns): Likewise.
3968         (mips_classify_branch_p6600): New function.
3969         * config/mips/mips.h (TUNE_P6600): New define.
3970         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
3971         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
3972         * config/mips/mips.md: Include p6600.md.
3973         (processor): Add p6600.
3974         * config/mips/p6600.md: New file.
3975         * doc/invoke.texi: Add p6600 to supported architectures.
3977 2018-06-13  Martin Sebor  <msebor@redhat.com>
3979         PR tree-optimization/86114
3980         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
3981         of integer types.
3982         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
3984 2018-06-13  Richard Biener  <rguenther@suse.de>
3986         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
3987         Properly set vector type of the intermediate stmt.
3988         * tree-vect-stmts.c (vectorizable_operation): The destination
3989         var always has vectype_out type.
3991 2018-06-13  Jeff Law  <law@redhat.com>
3993         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
3994         integer 0 for argument to print_rtl_with_bb.
3995         (rl78_reorg): Likewise.
3997 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
3999         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
4000         from rtx to rtx_insn *.
4001         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
4002         "label".
4003         (add_sched_insns_for_speculation): Likewise for local "target",
4004         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4005         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
4006         from rtx_insn ** to rtx_code_label **.
4007         (reorg_emit_nops): Likewise.
4008         (c6x_reorg): Likewise for local "call_labels".
4009         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
4010         rtx to rtx_insn *.
4011         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
4012         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
4013         the loops over LABEL_REFS.
4014         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
4015         braf_label.
4016         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4017         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
4018         (split_branches): Strengthen local "olabel" from rtx to
4019         rtx_insn *, adding a safe_as_a cast.
4020         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
4021         to "rtx_insn *".
4022         (add_insn_after): Likewise for first two params.
4023         (add_insn_before): Likewise.
4024         (remove_insn): Likewise for param.
4025         (emit_pattern_before_noloc): Likewise for second and third params.
4026         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
4027         (emit_call_insn_before_noloc): Likewise.
4028         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
4029         to "rtx_insn *".
4030         (emit_barrier_before): Likewise.
4031         (emit_label_before): Strengthen "label" param from "rtx" to
4032         "rtx_code_label *".  Strengthen "before" param from "rtx" to
4033         "rtx_insn *".
4034         (emit_insn_after_1): Strengthen "after" param from "rtx" to
4035         "rtx_insn *".
4036         (emit_pattern_after_noloc): Likewise.
4037         (emit_insn_after_noloc): Likewise.
4038         (emit_jump_insn_after_noloc): Likewise.
4039         (emit_call_insn_after_noloc): Likewise.
4040         (emit_debug_insn_after_noloc): Likewise.
4041         (emit_barrier_after): Likewise.
4042         (emit_label_after): Likewise for both params.
4043         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
4044         "loc" param from "int" to "location_t".
4045         (emit_insn_after_setloc): Likewise.
4046         (emit_jump_insn_after_setloc): Likewise.
4047         (emit_call_insn_after_setloc): Likewise.
4048         (emit_debug_insn_after_setloc): Likewise.
4049         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
4050         "loc" param from "int" to "location_t".
4051         (emit_pattern_before): Convert NULL_RTX to NULL.
4052         (emit_insn_before_setloc): Convert "loc" param from "int" to
4053         "location_t".
4054         (emit_jump_insn_before_setloc): Likewise.
4055         (emit_call_insn_before_setloc): Likewise.
4056         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
4057         rtx_insn *.  Convert "loc" param from "int" to "location_t".
4058         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
4059         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
4060         Convert 3rd param from "int" to "location_t".
4061         (emit_barrier_before, emit_barrier_after, next_real_insn):
4062         Strengthen param from rtx to rtx_insn *.
4063         (emit_label_before): Strengthen 1st param from "rtx" to
4064         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
4065         "rtx_insn *".
4066         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
4067         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
4068         Strengthen 2nd param from "rtx" to "rtx_insn *".
4069         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
4070         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
4071         Likewise. Convert 3rd param from "int" to "location_t".
4072         (emit_label_after): Strengthen 1st param from "rtx" to
4073         "rtx_code_label *".
4074         (next_real_insn, remove_insn): Strengthen param from "rtx" to
4075         "rtx_insn *".
4076         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
4077         from "rtx" to "rtx_insn *".
4079 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
4081         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
4082         bodies streamed in with -Q.
4083         * dumpfile.c (dump_files): Add lto-stream-out dump file.
4084         * dumpfile.h (tree_dump_index): Add lto_stream_out.
4085         * gimple-streamer-out.c: Include gimple-pretty-print.h
4086         (output_bb): Dump stmts streamed.
4087         * lto-section-out.c: Include print-tree.h
4088         (lto_begin_section): Dump sections created.
4089         (lto_output_decl_index): Dump decl encoded.
4090         * lto-streamer-out.c: Include print-tree.h
4091         (create_output_block): Dump output block created.
4092         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
4093         (output_function): Dump function output.
4094         (output_constructor): Dump constructor streamed.
4095         (write_global_stream): Output indexes encoded.
4096         (produce_asm_for_decls): Dump streams encoded.
4097         * lto-streamer.c (streamer_dump_file): New global var.
4098         * lto-streamer.h (streamer_dump_file): Declare.
4099         * passes.c (ipa_write_summaries): Initialize streamer dump.
4100         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
4101         in.
4103 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
4105         PR target/86048
4106         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
4107         offsets for register save directives.  Emit a second batch of save
4108         directives, if need be, when the function accesses prior frames.
4110 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4112         * config/arc/fpu.md (fmasf4): Force operand to register.
4113         (fnmasf4): Likewise.
4115 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4117         * config/arc/arc-protos.h (arc_pad_return): Remove.
4118         * config/arc/arc.c (machine_function): Remove force_short_suffix
4119         and size_reason.
4120         (arc_print_operand): Adjust printing of '&'.
4121         (arc_verify_short): Remove conditional printing of short suffix.
4122         (arc_final_prescan_insn): Remove reference to size_reason.
4123         (pad_return): New function.
4124         (arc_reorg): Call pad_return.
4125         (arc_pad_return): Remove.
4126         (arc_init_machine_status): Remove reference to force_short_suffix.
4127         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
4128         (attr length): When attribute iscompact is true force to 2
4129         regardless; in the case of maybe check if we want to force the
4130         instruction to have 4 bytes length.
4131         (nopv): Change it to generate 4 byte long nop as well.
4132         (blockage): New pattern.
4133         (simple_return): Remove call to arc_pad_return.
4134         (p_return_i): Likewise.
4136 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4138         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
4140 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4142         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
4143         ARC cores.
4145 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4147         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
4148         for ARC700 and ARCv2.
4150 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
4152         PR target/86076
4153         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
4154         operands[2] instead of operands[1].
4157 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
4159         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
4160         case, check whether the outer register overlaps an unallocatable
4161         register, not just whether it fits the required class.
4163 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
4165         * poly-int.h (can_div_trunc_p): Add new overload in which all values
4166         are poly_ints.
4167         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
4168         (memrefs_conflict_p): Likewise.
4169         (init_alias_analysis): Likewise.
4170         * cfgexpand.c (expand_debug_expr): Likewise.
4171         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
4172         * cse.c (fold_rtx): Likewise.
4173         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
4174         * expr.c (emit_block_move_hints): Likewise.
4175         (clear_storage_hints, push_block, emit_push_insn): Likewise.
4176         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
4177         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
4178         (emit_group_store): Likewise.
4179         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
4180         to read the PRE/POST_MODIFY increment.
4181         * calls.c (store_one_arg): Use strip_offset.
4182         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
4183         poly_int_rtx_p.
4184         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
4185         by a VEC_SELECT.
4186         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
4187         (simplify_binary_operation_1): Extend CONST_INT handling to
4188         poly_int_rtx_p.
4189         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
4190         than a HOST_WIDE_INT.
4191         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
4192         poly_int64.
4193         (adjust_mems, add_stores): Update accodingly.
4194         (vt_canonicalize_addr): Track polynomial offsets.
4195         (emit_note_insn_var_location): Likewise.
4196         (vt_add_function_parameter): Likewise.
4197         (vt_initialize): Likewise.
4199 2018-06-12  Jeff Law  <law@redhat.com>
4201         * config.gcc (alpha*-*-freebsd*): Remove.
4202         * config/alpha/freebsd.h: Remove.
4204 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
4206         PR other/69968
4207         * spellcheck-tree.c (levenshtein_distance): Rename to...
4208         (get_edit_distance): ...this, and update for underlying renaming.
4209         * spellcheck-tree.h (levenshtein_distance): Rename to...
4210         (get_edit_distance): ...this.
4211         * spellcheck.c (levenshtein_distance): Rename to...
4212         (get_edit_distance): ...this.  Convert from Levenshtein distance
4213         to Damerau-Levenshtein distance by supporting transpositions of
4214         adjacent characters.  Rename "v1" to "v_next" and "v0" to
4215         "v_one_ago".
4216         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
4217         (selftest::test_edit_distance_unit_test_oneway): ...this, and
4218         update for underlying renaming.
4219         (selftest::levenshtein_distance_unit_test): Rename to...
4220         (selftest::test_get_edit_distance_unit): ...this, and update for
4221         underlying renaming.
4222         (selftest::test_find_closest_string): Add example from PR 69968
4223         where transposition helps
4224         (selftest::test_metric_conditions): Update for renaming.
4225         (selftest::test_metric_conditions): Likewise.
4226         (selftest::spellcheck_c_tests): Likewise.
4227         * spellcheck.h (levenshtein_distance): Rename both overloads to...
4228         (get_edit_distance): ...this.
4229         (best_match::consider): Update for renaming.
4231 2018-06-12  Martin Sebor  <msebor@redhat.com>
4233         PR tree-optimization/85259
4234         * builtins.c (compute_objsize): Handle constant offsets.
4235         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
4236         true iff a warning has been issued.
4237         * gimple.h (gimple_nonartificial_location): New function.
4238         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
4239         gimple_nonartificial_location and handle -Wno-system-headers.
4240         (handle_builtin_stxncpy): Same.
4242 2018-06-12  Martin Sebor  <msebor@redhat.com>
4244         PR c/85931
4245         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
4247 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
4249         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
4250         BUILTIN_VEC_XST entries for pointer to double and long long.
4252 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
4254         PR target/85990
4255         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4256         Update comments.
4257         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4258         Likewise.
4260 2018-06-12  Martin Liska  <mliska@suse.cz>
4262         * doc/options.texi: Document IntegerRange.
4264 2018-06-12  Martin Liska  <mliska@suse.cz>
4266         * config/i386/i386.opt: Make MPX-related options as Deprecated.
4267         * opt-functions.awk: Handle Deprecated flag.
4268         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
4269         and report error.
4270         (read_cmdline_option): Report warning for a deprecated option.
4271         * opts.h (struct cl_option): Add new field cl_deprecated.
4272         (CL_ERR_DEPRECATED): New.
4274 2018-06-12  Martin Liska  <mliska@suse.cz>
4276         * doc/options.texi: Document Deprecated option flag.
4278 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4280         * config/arc/arc-arch.h (arc_extras): New enum.
4281         (arc_cpu_t):Add field extra.
4282         (arc_cpu_types): Consider the extras.
4283         * config/arc/arc-cpus.def: Add extras info.
4284         * config/arc/arc-opts.h (processor_type): Consider extra field.
4285         * config/arc/arc.c (arc_override_options): Handle extra field.
4287 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4289         * config/arc/arc-arch.h: Update ARC_OPTX macro.
4290         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
4291         field.
4292         * config/arc/arc.c (arc_init): Update pic warning.
4293         (irq_range): Update irq range parsing warnings.
4294         (arc_override_options): Update various warning messages.
4295         (arc_handle_aux_attribute): Likewise.
4297 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
4299         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
4301 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4303         * doc/sourcebuild.texi: Document usage of line number 0 in verify
4304         compiler messages directives.
4306 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
4308         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
4309         * config/mips/mips-tables.opt: Regenerate.
4310         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
4311         mips64r6.
4312         * doc/invoke.texi: Document -march=i6500.
4314 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
4316         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
4317         (i6400_gpmul): Add cpu_unit.
4318         (i6400_gpdiv): Likewise.
4319         (i6400_msa_add_d): Update reservations.
4320         (i6400_msa_int_add) Likewise.
4321         (i6400_msa_short_logic3) Likewise.
4322         (i6400_msa_short_logic2) Likewise.
4323         (i6400_msa_short_logic) Likewise.
4324         (i6400_msa_move) Likewise.
4325         (i6400_msa_cmp) Likewise.
4326         (i6400_msa_short_float2) Likewise.
4327         (i6400_msa_div_d) Likewise.
4328         (i6400_msa_long_logic1) Likewise.
4329         (i6400_msa_long_logic2) Likewise.
4330         (i6400_msa_mult) Likewise.
4331         (i6400_msa_long_float2) Likewise.
4332         (i6400_msa_long_float4) Likewise.
4333         (i6400_msa_long_float5) Likewise.
4334         (i6400_msa_long_float8) Likewise.
4335         (i6400_fpu_fadd): Include frint type.
4336         (i6400_fpu_store): New define_insn_reservation.
4337         (i6400_fpu_load): Likewise.
4338         (i6400_fpu_move): Likewise.
4339         (i6400_fpu_fcmp): Likewise.
4340         (i6400_fpu_fmadd): Likewise.
4341         (i6400_int_mult): Include imul3nc type and update reservation.
4342         (i6400_int_div): Include idiv3 type and update reservation.
4343         (i6400_int_load): Update to check type not move_type.
4344         (i6400_int_store): Likewise.
4345         (i6400_int_prefetch): Set zero latency.
4347 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
4349         * gcc.c: Document new %@{...} sequence.
4350         (LINK_COMMAND_SPEC): Use it for the -L switches.
4351         (cpp_unique_options): Use it for the -I switches.
4352         (at_file_argbuf): New global variable.
4353         (in_at_file): Likewise.
4354         (alloc_args): Create at_file_argbuf.
4355         (clear_args): Truncate at_file_argbuf.
4356         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
4357         (open_at_file): New function.
4358         (close_at_file): Likewise.
4359         (create_at_file): Delete.
4360         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
4361         <'o'>: Likewise.
4362         <'@'>: New case.
4363         (validate_switches_from_spec): Deal with %@{...} sequence.
4364         (validate_switches): Likewise.
4365         (driver::finalize): Call clear_args.
4367 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
4369         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
4371 2018-06-11  Martin Sebor  <msebor@redhat.com>
4373         * doc/invoke.texi (-Wall): List -Wc++17-compat.
4374         (Wno-class-memaccess): Add @opindex.
4375         (Wno-templates, Wno-multiple-inheritance): Same.
4376         (Wno-virtual-inheritance, Wno-namespaces): Same.
4377         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
4378         (Wno-format-overflow, Wno-format-truncation): Same.
4379         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
4380         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
4381         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
4382         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
4383         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
4384         (Wno-misspelled-isr): Same.
4386 2018-06-11  Martin Sebor  <msebor@redhat.com>
4388         * PR tree-optimization/86083
4389         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
4391 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
4393         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
4395 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
4397         PR target/85755
4398         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
4399         on the correct operand.
4400         (*movdi_internal64): Ditto.
4402 2018-06-11  Martin Liska  <mliska@suse.cz>
4404         PR tree-optimization/86089
4405         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
4407 2018-06-11  Julia Koval  <julia.koval@intel.com>
4409         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
4410         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
4411         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
4413 2018-06-11  Olivier Hainque  <hainque@adacore.com>
4415         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
4416         for Ada with strict dwarf2.
4418 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
4420         PR target/85755
4421         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
4422         addresses.
4424 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
4426         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
4428 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
4430         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
4431         TARGET_ELF.
4433 2018-06-08  Martin Liska  <mliska@suse.cz>
4435         * tree-cfg.h (debug_function): Fix argument type to match
4436         implementation.
4438 2018-06-08  Martin Liska  <mliska@suse.cz>
4440         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
4441         Remove usage of MPX-related (and removed) fields.
4442         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
4444 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
4446         * cfg.c (debug): Use TDF_NONE rather than 0.
4447         * cfghooks.c (debug): Likewise.
4448         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
4449         (struct dump_option_value_info): Convert to...
4450         (struct kv_pair): ...this template type.
4451         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
4452         rather than 0.
4453         (optinfo_verbosity_options): Likewise.
4454         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
4455         OPTGROUP_NONE.
4456         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
4457         than int for "optgroup_flags" param.
4458         (dump_generic_expr_loc): Use dump_flags_t rather than int for
4459         "dump_kind" param.
4460         (dump_dec): Likewise.
4461         (dump_finish): Use TDF_NONE rather than 0.
4462         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
4463         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
4464         than 0.  Update for change to option_ptr.
4465         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
4466         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
4467         0.  Update for changes to optinfo_verbosity_options and
4468         optgroup_options.
4469         (opt_info_switch_p): Convert optgroup_flags from int to
4470         optgroup_flags_t.
4471         (dump_basic_block): Use dump_flags_t rather than int
4472         for "dump_kind" param.
4473         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
4474         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
4475         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
4476         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
4477         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
4478         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
4479         TDF_NONE): Convert from macros to...
4480         (enum dump_flag): ...this new enum.
4481         (dump_flags_t): Update to use enum.
4482         (operator|, operator&, operator~, operator|=, operator&=):
4483         Implement for dump_flags_t.
4484         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
4485         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
4486         Convert from macros to...
4487         (enum optgroup_flag): ...this new enum.
4488         (optgroup_flags_t): New typedef.
4489         (operator|, operator|=): Implement for optgroup_flags_t.
4490         (struct dump_file_info): Convert field "alt_flags" to
4491         dump_flags_t.  Convert field "optgroup_flags" to
4492         optgroup_flags_t.
4493         (dump_basic_block): Use dump_flags_t rather than int for param.
4494         (dump_generic_expr_loc): Likewise.
4495         (dump_dec): Likewise.
4496         (dump_register): Convert param "optgroup_flags" to
4497         optgroup_flags_t.
4498         (opt_info_enable_passes): Likewise.
4499         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
4500         than 0.
4501         * gimple-pretty-print.c (debug): Likewise.
4502         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
4503         (merged_store_group::apply_stores): Likewise.
4504         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
4505         * gimple.c (verify_gimple_pp): Likewise.
4506         * graphite-poly.c (print_pbb_body): Likewise.
4507         * passes.c (pass_manager::register_one_dump_file): Convert
4508         local "optgroup_flags" to optgroup_flags_t.
4509         * print-tree.c (print_node): Use TDF_NONE rather than 0.
4510         (debug): Likewise.
4511         (debug_body): Likewise.
4512         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
4513         to optgroup_flags_t.
4514         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
4515         than 0.
4516         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
4517         (convert_mult_to_fma): Likewise.
4518         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
4519         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
4520         * tree-vect-data-refs.c (dump_lower_bound): Convert param
4521         "dump_kind" to dump_flags_t.
4523 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
4525         * config/rs6000/rs6000.c (min, max): Delete.
4527 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
4529         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
4530         -mabi=spe and -mabi=no-spe.
4532 2018-06-08  Martin Liska  <mliska@suse.cz>
4534         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
4535         where we expect an existing summary.
4537 2018-06-08  Martin Liska  <mliska@suse.cz>
4539         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
4540         * ipa-inline.h (estimate_edge_growth): Likewise.
4542 2018-06-08  Martin Liska  <mliska@suse.cz>
4544         * cgraph.c (function_version_hasher::hash): Use
4545         cgraph_node::get_uid ().
4546         (function_version_hasher::equal):
4547         * cgraph.h (cgraph_node::get_uid): New method.
4548         * ipa-inline.c (update_caller_keys): Use
4549         cgraph_node::get_uid ().
4550         (update_callee_keys): Likewise.
4551         * ipa-utils.c (searchc): Likewise.
4552         (ipa_reduced_postorder): Likewise.
4553         * lto-cgraph.c (input_node): Likewise.
4554         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
4555         * symbol-summary.h (symtab_insertion): Likewise.
4556         (symtab_removal): Likewise.
4557         (symtab_duplication): Likewise.
4558         * tree-pretty-print.c (dump_function_header): Likewise.
4559         * tree-sra.c (convert_callers_for_node): Likewise.
4561 2018-06-08  Martin Liska  <mliska@suse.cz>
4563         * cgraph.c (symbol_table::create_edge): Always assign a new
4564         unique number.
4565         (symbol_table::free_edge): Do not recycle numbers.
4566         * cgraph.h (cgraph_edge::get): New method.
4567         * symbol-summary.h (symtab_removal): Use it.
4568         (symtab_duplication): Likewise.
4569         (call_summary::hashable_uid): Remove.
4571 2018-06-08  Martin Liska  <mliska@suse.cz>
4573         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
4574         (initialize_growth_caches): Remove.
4575         (free_growth_caches): Likewise.
4576         (do_estimate_edge_time): Use edge_growth_cache.
4577         (do_estimate_edge_size): Likewise.
4578         (do_estimate_edge_hints): Likewise.
4579         * ipa-inline.c (reset_edge_caches): Likewise.
4580         (recursive_inlining): Likewise.
4581         (inline_small_functions): Likewise.
4582         * ipa-inline.h (initialize_growth_caches): Remove.
4583         (estimate_edge_size): Likewise.
4584         (estimate_edge_time): Likewise.
4585         (estimate_edge_hints): Likewise.
4586         (reset_edge_growth_cache): Likewise.
4587         * symbol-summary.h (call_summary::remove): New method.
4589 2018-06-08  Martin Liska  <mliska@suse.cz>
4591         * ipa-cp.c (class edge_clone_summary): New summary.
4592         (grow_edge_clone_vectors): Remove.
4593         (ipcp_edge_duplication_hook): Remove.
4594         (class edge_clone_summary_t): New call_summary class.
4595         (ipcp_edge_removal_hook): Remove.
4596         (edge_clone_summary_t::duplicate): New function.
4597         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
4598         (create_specialized_node): Likewise.
4599         (ipcp_driver): Initialize edge_clone_summaries and do not
4600         register hooks.
4602 2018-06-08  Martin Liska  <mliska@suse.cz>
4604         * symbol-summary.h (get): New function.
4605         (call_summary::m_initialize_when_cloning): New class member.
4607 2018-06-08  Martin Liska  <mliska@suse.cz>
4609         * cgraph.c (cgraph_node::remove): Do not recycle uid.
4610         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
4611         (symbol_table::allocate_cgraph_symbol): Do not set uid.
4612         * passes.c (uid_hash_t): Record removed_nodes by their uids.
4613         (remove_cgraph_node_from_order): Use the removed_nodes set.
4614         (do_per_function_toporder): Likwise.
4615         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
4616         instead of summary_uid.
4617         (symtab_removal): Likewise.
4618         (symtab_duplication): Likewise.
4620 2018-06-08  Martin Liska  <mliska@suse.cz>
4622         * ipa-cp.c (ipcp_store_bits_results): Use
4623         ipcp_transformation_sum.
4624         (ipcp_store_vr_results): Likewise.
4625         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
4626         to ...
4627         (ipcp_transformation_initialize): ... this.
4628         (ipa_set_node_agg_value_chain):
4629         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
4630         (write_ipcp_transformation_info): Likewise.
4631         (read_ipcp_transformation_info): Likewise.
4632         (ipcp_update_bits): Likewise.
4633         (ipcp_update_vr): Likewise.
4634         (ipcp_transform_function): Likewise.
4635         * ipa-prop.h: Rename ipcp_transformation_summary to
4636         ipcp_transformation.
4637         (class ipcp_transformation_t): New function summary.
4638         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
4639         (ipa_get_agg_replacements_for_node): Likewise.
4641 2018-06-08  Martin Liska  <mliska@suse.cz>
4643         * ipa-pure-const.c (struct funct_state_d): Do it class instead
4644         of struct.
4645         (class funct_state_summary_t): New function_summary class.
4646         (has_function_state): Remove.
4647         (get_function_state): Likewise.
4648         (set_function_state): Likewise.
4649         (add_new_function): Likewise.
4650         (funct_state_summary_t::insert): New function.
4651         (duplicate_node_data): Remove.
4652         (remove_node_data): Remove.
4653         (funct_state_summary_t::duplicate): New function.
4654         (register_hooks): Create new funct_state_summaries.
4655         (pure_const_generate_summary): Use it.
4656         (pure_const_write_summary): Likewise.
4657         (pure_const_read_summary): Likewise.
4658         (propagate_pure_const): Likewise.
4659         (propagate_nothrow): Likewise.
4660         (dump_malloc_lattice): Likewise.
4661         (propagate_malloc): Likewise.
4662         (execute): Do not register hooks, just remove summary
4663         instead.
4664         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
4665         constructor.
4667 2018-06-08  Martin Liska  <mliska@suse.cz>
4669         * ipa-reference.c (remove_node_data): Remove.
4670         (duplicate_node_data): Likewise.
4671         (class ipa_ref_var_info_summary_t): New class.
4672         (class ipa_ref_opt_summary_t): Likewise.
4673         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
4674         (get_reference_optimization_summary): Use
4675         ipa_ref_opt_sum_summaries.
4676         (set_reference_vars_info): Remove.
4677         (set_reference_optimization_summary): Likewise.
4678         (ipa_init): Create summaries.
4679         (init_function_info): Use function summary.
4680         (ipa_ref_opt_summary_t::duplicate): New function.
4681         (ipa_ref_opt_summary_t::remove): New function.
4682         (get_read_write_all_from_node): Fix GNU coding style.
4683         (propagate): Use function summary.
4684         (write_node_summary_p): Fix GNU coding style.
4685         (stream_out_bitmap): Likewise.
4686         (ipa_reference_read_optimization_summary): Use function summary.
4687         (ipa_reference_c_finalize): Do not release hooks.
4689 2018-06-08  Martin Liska  <mliska@suse.cz>
4691         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
4692         (analyze_function_body): Extract multiple calls of get_create.
4693         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
4694         * ipa-inline.c (recursive_inlining): Use ::get method.
4695         * ipa-inline.h (estimate_edge_growth): Likewise.
4697 2018-06-08  Martin Liska  <mliska@suse.cz>
4699         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
4700         HSA_INVALID.
4701         (hsa_function_summary::hsa_function_summary): Use the new enum
4702         value.
4703         (hsa_gpu_implementation_p): Use hsa_summaries::get.
4704         * hsa-gen.c (hsa_get_host_function): Likewise.
4705         (get_brig_function_name): Likewise.
4706         * ipa-hsa.c (process_hsa_functions): Likewise.
4707         (ipa_hsa_write_summary): Likewise.
4708         * symbol-summary.h (symtab_duplication): Use ::get function/
4709         (get): New function.
4711 2018-06-08  Martin Liska  <mliska@suse.cz>
4713         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
4714         of get.
4715         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
4716         (hsa_register_kernel): Likewise.
4717         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
4718         * hsa-gen.c (hsa_get_host_function): Likewise.
4719         (get_brig_function_name): Likewise.
4720         (generate_hsa): Likewise.
4721         (pass_gen_hsail::execute): Likewise.
4722         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
4723         (devirtualization_time_bonus): Likewise.
4724         (ipcp_propagate_stage): Likewise.
4725         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4726         (edge_set_predicate): Likewise.
4727         (evaluate_conditions_for_known_args): Likewise.
4728         (evaluate_properties_for_edge): Likewise.
4729         (ipa_fn_summary::reset): Likewise.
4730         (ipa_fn_summary_t::duplicate): Likewise.
4731         (dump_ipa_call_summary): Likewise.
4732         (ipa_dump_fn_summary): Likewise.
4733         (analyze_function_body): Likewise.
4734         (compute_fn_summary): Likewise.
4735         (estimate_edge_devirt_benefit): Likewise.
4736         (estimate_edge_size_and_time): Likewise.
4737         (estimate_calls_size_and_time): Likewise.
4738         (estimate_node_size_and_time): Likewise.
4739         (inline_update_callee_summaries): Likewise.
4740         (remap_edge_change_prob): Likewise.
4741         (remap_edge_summaries): Likewise.
4742         (ipa_merge_fn_summary_after_inlining): Likewise.
4743         (ipa_update_overall_fn_summary): Likewise.
4744         (read_ipa_call_summary): Likewise.
4745         (inline_read_section): Likewise.
4746         (write_ipa_call_summary): Likewise.
4747         (ipa_fn_summary_write): Likewise.
4748         (ipa_free_fn_summary): Likewise.
4749         * ipa-hsa.c (process_hsa_functions): Likewise.
4750         (ipa_hsa_write_summary): Likewise.
4751         (ipa_hsa_read_section): Likewise.
4752         * ipa-icf.c (sem_function::merge): Likewise.
4753         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
4754         (do_estimate_edge_time): Likewise.
4755         (estimate_size_after_inlining): Likewise.
4756         (estimate_growth): Likewise.
4757         (growth_likely_positive): Likewise.
4758         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4759         (inline_call): Likewise.
4760         * ipa-inline.c (caller_growth_limits): Likewise.
4761         (can_inline_edge_p): Likewise.
4762         (can_inline_edge_by_limits_p): Likewise.
4763         (compute_uninlined_call_time): Likewise.
4764         (compute_inlined_call_time): Likewise.
4765         (want_inline_small_function_p): Likewise.
4766         (edge_badness): Likewise.
4767         (update_caller_keys): Likewise.
4768         (update_callee_keys): Likewise.
4769         (recursive_inlining): Likewise.
4770         (inline_small_functions): Likewise.
4771         (inline_to_all_callers_1): Likewise.
4772         (dump_overall_stats): Likewise.
4773         (early_inline_small_functions): Likewise.
4774         (early_inliner): Likewise.
4775         * ipa-inline.h (estimate_edge_growth): Likewise.
4776         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4777         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4778         * ipa-prop.h (IPA_NODE_REF): Likewise.
4779         (IPA_EDGE_REF): Likewise.
4780         * ipa-pure-const.c (malloc_candidate_p): Likewise.
4781         (propagate_malloc): Likewise.
4782         * ipa-split.c (execute_split_functions): Likewise.
4783         * symbol-summary.h: Rename get to get_create.
4784         (get): Likewise.
4785         (get_create): Likewise.
4786         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4788 2018-06-08  Martin Liska  <mliska@suse.cz>
4790         * symbol-summary.h (release): Move definition out of class
4791         declaration.
4792         (symtab_removal): Likewise.
4793         (symtab_duplication): Likewise.
4795 2018-06-08  Martin Liska  <mliska@suse.cz>
4797         * symbol-summary.h (function_summary): Move constructor
4798         implementation out of class declaration.
4799         (release): Likewise.
4800         (symtab_insertion): Likewise.
4801         (symtab_removal): Likewise.
4802         (symtab_duplication): Likewise.
4803         (get): Likewise.
4805 2018-06-08  Martin Liska  <mliska@suse.cz>
4807         * Makefile.in: Remove support for MPX (macros, related functions,
4808         fields in cgraph_node, ...).
4809         * builtin-types.def (BT_BND): Likewise.
4810         (BT_FN_BND_CONST_PTR): Likewise.
4811         (BT_FN_CONST_PTR_BND): Likewise.
4812         (BT_FN_VOID_PTR_BND): Likewise.
4813         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
4814         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
4815         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
4816         (expand_builtin_mempcpy_with_bounds): Likewise.
4817         (expand_builtin_memset_with_bounds): Likewise.
4818         (expand_builtin_memset_args): Likewise.
4819         (std_expand_builtin_va_start): Likewise.
4820         (expand_builtin): Likewise.
4821         (expand_builtin_with_bounds): Likewise.
4822         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
4823         (DEF_LIB_BUILTIN_CHKP): Likewise.
4824         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
4825         (DEF_CHKP_BUILTIN): Likewise.
4826         (BUILT_IN_MEMCPY): Likewise.
4827         (BUILT_IN_MEMMOVE): Likewise.
4828         (BUILT_IN_MEMPCPY): Likewise.
4829         (BUILT_IN_MEMSET): Likewise.
4830         (BUILT_IN_STPCPY): Likewise.
4831         (BUILT_IN_STRCAT): Likewise.
4832         (BUILT_IN_STRCHR): Likewise.
4833         (BUILT_IN_STRCPY): Likewise.
4834         (BUILT_IN_STRLEN): Likewise.
4835         (BUILT_IN_MEMCPY_CHK): Likewise.
4836         (BUILT_IN_MEMMOVE_CHK): Likewise.
4837         (BUILT_IN_MEMPCPY_CHK): Likewise.
4838         (BUILT_IN_MEMSET_CHK): Likewise.
4839         (BUILT_IN_STPCPY_CHK): Likewise.
4840         (BUILT_IN_STRCAT_CHK): Likewise.
4841         (BUILT_IN_STRCPY_CHK): Likewise.
4842         * calls.c (store_bounds): Likewise.
4843         (emit_call_1): Likewise.
4844         (special_function_p): Likewise.
4845         (maybe_warn_nonstring_arg): Likewise.
4846         (initialize_argument_information): Likewise.
4847         (finalize_must_preallocate): Likewise.
4848         (compute_argument_addresses): Likewise.
4849         (expand_call): Likewise.
4850         * cfgexpand.c (expand_call_stmt): Likewise.
4851         (expand_return): Likewise.
4852         (expand_gimple_stmt_1): Likewise.
4853         (pass_expand::execute): Likewise.
4854         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
4855         (cgraph_node::remove): Likewise.
4856         (cgraph_node::dump): Likewise.
4857         (cgraph_node::verify_node): Likewise.
4858         * cgraph.h (chkp_function_instrumented_p): Likewise.
4859         (symtab_node::get_alias_target): Likewise.
4860         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
4861         (cgraph_local_p): Likewise.
4862         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
4863         (cgraph_edge::rebuild_references): Likewise.
4864         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
4865         (walk_polymorphic_call_targets): Likewise.
4866         (cgraph_node::expand_thunk): Likewise.
4867         (symbol_table::output_weakrefs): Likewise.
4868         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
4869         (ix86_handle_option): Likewise.
4870         * config/i386/constraints.md: Likewise.
4871         * config/i386/i386-builtin-types.def (BND): Likewise.
4872         (VOID): Likewise.
4873         (PVOID): Likewise.
4874         (ULONG): Likewise.
4875         * config/i386/i386-builtin.def (BDESC_END): Likewise.
4876         (BDESC_FIRST): Likewise.
4877         (BDESC): Likewise.
4878         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
4879         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
4880         * config/i386/i386.c (enum reg_class): Likewise.
4881         (ix86_target_string): Likewise.
4882         (ix86_option_override_internal): Likewise.
4883         (ix86_conditional_register_usage): Likewise.
4884         (ix86_valid_target_attribute_inner_p): Likewise.
4885         (ix86_set_indirect_branch_type): Likewise.
4886         (ix86_set_current_function): Likewise.
4887         (ix86_function_arg_regno_p): Likewise.
4888         (init_cumulative_args): Likewise.
4889         (ix86_function_arg_advance): Likewise.
4890         (ix86_function_arg): Likewise.
4891         (ix86_pass_by_reference): Likewise.
4892         (ix86_function_value_regno_p): Likewise.
4893         (ix86_function_value_1): Likewise.
4894         (ix86_function_value_bounds): Likewise.
4895         (ix86_return_in_memory): Likewise.
4896         (ix86_setup_incoming_vararg_bounds): Likewise.
4897         (ix86_va_start): Likewise.
4898         (indirect_thunk_need_prefix): Likewise.
4899         (print_reg): Likewise.
4900         (ix86_print_operand): Likewise.
4901         (ix86_expand_call): Likewise.
4902         (ix86_output_function_return): Likewise.
4903         (reg_encoded_number): Likewise.
4904         (BDESC_VERIFYS): Likewise.
4905         (ix86_init_mpx_builtins): Likewise.
4906         (ix86_init_builtins): Likewise.
4907         (ix86_emit_cmove): Likewise.
4908         (ix86_emit_move_max): Likewise.
4909         (ix86_expand_builtin): Likewise.
4910         (ix86_builtin_mpx_function): Likewise.
4911         (ix86_get_arg_address_for_bt): Likewise.
4912         (ix86_load_bounds): Likewise.
4913         (ix86_store_bounds): Likewise.
4914         (ix86_load_returned_bounds): Likewise.
4915         (ix86_store_returned_bounds): Likewise.
4916         (ix86_class_likely_spilled_p): Likewise.
4917         (ix86_hard_regno_mode_ok): Likewise.
4918         (x86_order_regs_for_local_alloc): Likewise.
4919         (ix86_mitigate_rop): Likewise.
4920         (ix86_bnd_prefixed_insn_p): Likewise.
4921         (ix86_mpx_bound_mode): Likewise.
4922         (ix86_make_bounds_constant): Likewise.
4923         (ix86_initialize_bounds): Likewise.
4924         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
4925         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
4926         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
4927         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
4928         (TARGET_CHKP_BOUND_MODE): Likewise.
4929         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
4930         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
4931         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
4932         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
4933         * config/i386/i386.h (TARGET_MPX): Likewise.
4934         (TARGET_MPX_P): Likewise.
4935         (VALID_BND_REG_MODE): Likewise.
4936         (FIRST_BND_REG): Likewise.
4937         (LAST_BND_REG): Likewise.
4938         (enum reg_class): Likewise.
4939         (BND_REG_P): Likewise.
4940         (BND_REGNO_P): Likewise.
4941         (BNDmode): Likewise.
4942         (ADJUST_INSN_LENGTH): Likewise.
4943         * config/i386/i386.md: Likewise.
4944         * config/i386/i386.opt: Likewise.
4945         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
4946         (defined): Likewise.
4947         (LINK_MPX): Likewise.
4948         (MPX_SPEC): Likewise.
4949         (LIBMPX_SPEC): Likewise.
4950         (LIBMPXWRAPPERS_SPEC): Likewise.
4951         (CHKP_SPEC): Likewise.
4952         * config/i386/predicates.md: Likewise.
4953         * dbxout.c (dbxout_type): Likewise.
4954         * doc/extend.texi: Likewise.
4955         * doc/invoke.texi: Likewise.
4956         * doc/md.texi: Likewise.
4957         * doc/tm.texi: Likewise.
4958         * doc/tm.texi.in: Likewise.
4959         * dwarf2out.c (is_base_type): Likewise.
4960         (gen_formal_types_die): Likewise.
4961         (gen_subprogram_die): Likewise.
4962         (gen_type_die_with_usage): Likewise.
4963         (gen_decl_die): Likewise.
4964         (dwarf2out_late_global_decl): Likewise.
4965         * expr.c (expand_assignment): Likewise.
4966         (emit_storent_insn): Likewise.
4967         (store_expr_with_bounds): Likewise.
4968         (store_expr): Likewise.
4969         (expand_expr_real_1): Likewise.
4970         * expr.h (store_expr_with_bounds): Likewise.
4971         * function.c (use_register_for_decl): Likewise.
4972         (struct bounds_parm_data): Likewise.
4973         (assign_parms_augmented_arg_list): Likewise.
4974         (assign_parm_find_entry_rtl): Likewise.
4975         (assign_parm_is_stack_parm): Likewise.
4976         (assign_parm_load_bounds): Likewise.
4977         (assign_bounds): Likewise.
4978         (assign_parms): Likewise.
4979         (expand_function_start): Likewise.
4980         * gcc.c (CHKP_SPEC): Likewise.
4981         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
4982         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
4983         (wrestrict_dom_walker::check_call): Likewise.
4984         * gimple.c (gimple_build_call_from_tree): Likewise.
4985         * gimple.h (enum gf_mask): Likewise.
4986         (gimple_call_with_bounds_p): Likewise.
4987         (gimple_call_set_with_bounds): Likewise.
4988         * gimplify.c (gimplify_init_constructor): Likewise.
4989         * ipa-cp.c (initialize_node_lattices): Likewise.
4990         (propagate_constants_across_call): Likewise.
4991         (find_more_scalar_values_for_callers_subset): Likewise.
4992         * ipa-hsa.c (process_hsa_functions): Likewise.
4993         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
4994         * ipa-icf.c (sem_function::merge): Likewise.
4995         * ipa-inline.c (early_inliner): Likewise.
4996         * ipa-pure-const.c (warn_function_noreturn): Likewise.
4997         (warn_function_cold): Likewise.
4998         (propagate_pure_const): Likewise.
4999         * ipa-ref.h (enum GTY): Likewise.
5000         * ipa-split.c (find_retbnd): Likewise.
5001         (consider_split): Likewise.
5002         (split_function): Likewise.
5003         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5004         * ipa.c (walk_polymorphic_call_targets): Likewise.
5005         (symbol_table::remove_unreachable_nodes): Likewise.
5006         (process_references): Likewise.
5007         (cgraph_build_static_cdtor_1): Likewise.
5008         * lto-cgraph.c (lto_output_node): Likewise.
5009         (output_refs): Likewise.
5010         (compute_ltrans_boundary): Likewise.
5011         (input_overwrite_node): Likewise.
5012         (input_node): Likewise.
5013         (input_cgraph_1): Likewise.
5014         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
5015         * passes.c (pass_manager::execute_early_local_passes): Likewise.
5016         (class pass_chkp_instrumentation_passes): Likewise.
5017         (make_pass_chkp_instrumentation_passes): Likewise.
5018         * passes.def: Likewise.
5019         * rtl.h (struct GTY): Likewise.
5020         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
5021         * stor-layout.c (layout_type): Likewise.
5022         * symtab.c: Likewise.
5023         * target.def: Likewise.
5024         * targhooks.c (default_chkp_bound_type): Likewise.
5025         (default_chkp_bound_mode): Likewise.
5026         (default_builtin_chkp_function): Likewise.
5027         (default_chkp_function_value_bounds): Likewise.
5028         (default_chkp_make_bounds_constant): Likewise.
5029         (default_chkp_initialize_bounds): Likewise.
5030         * targhooks.h (default_chkp_bound_type): Likewise.
5031         (default_chkp_bound_mode): Likewise.
5032         (default_builtin_chkp_function): Likewise.
5033         (default_chkp_function_value_bounds): Likewise.
5034         (default_chkp_make_bounds_constant): Likewise.
5035         (default_chkp_initialize_bounds): Likewise.
5036         * toplev.c (compile_file): Likewise.
5037         (process_options): Likewise.
5038         * tree-core.h (DEF_BUILTIN): Likewise.
5039         (DEF_BUILTIN_CHKP): Likewise.
5040         * tree-inline.c (declare_return_variable): Likewise.
5041         (remap_gimple_stmt): Likewise.
5042         (copy_bb): Likewise.
5043         (initialize_inlined_parameters): Likewise.
5044         (expand_call_inline): Likewise.
5045         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
5046         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
5047         (make_pass_ipa_chkp_produce_thunks): Likewise.
5048         (make_pass_chkp): Likewise.
5049         (make_pass_chkp_opt): Likewise.
5050         (make_pass_chkp_instrumentation_passes): Likewise.
5051         * tree-pretty-print.c (dump_generic_node): Likewise.
5052         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
5053         * tree-ssa-dce.c (propagate_necessity): Likewise.
5054         (eliminate_unnecessary_stmts): Likewise.
5055         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
5056         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
5057         * tree-ssa-sccvn.h: Likewise.
5058         * tree-ssa-strlen.c (get_string_length): Likewise.
5059         (valid_builtin_call): Likewise.
5060         (adjust_last_stmt): Likewise.
5061         (handle_builtin_strchr): Likewise.
5062         (handle_builtin_strcpy): Likewise.
5063         (handle_builtin_stxncpy): Likewise.
5064         (handle_builtin_memcpy): Likewise.
5065         (handle_builtin_strcat): Likewise.
5066         (strlen_check_and_optimize_stmt): Likewise.
5067         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
5068         * tree-streamer-in.c: Likewise.
5069         * tree-streamer.c (record_common_node): Likewise.
5070         * tree.c (tree_code_size): Likewise.
5071         (wide_int_to_tree_1): Likewise.
5072         (type_contains_placeholder_1): Likewise.
5073         (build_common_tree_nodes): Likewise.
5074         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
5075         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
5076         (POINTER_BOUNDS_P): Likewise.
5077         (BOUNDED_TYPE_P): Likewise.
5078         (BOUNDED_P): Likewise.
5079         (CALL_WITH_BOUNDS_P): Likewise.
5080         (pointer_bounds_type_node): Likewise.
5081         * value-prof.c (gimple_ic): Likewise.
5082         * var-tracking.c (vt_add_function_parameters): Likewise.
5083         * varasm.c (make_decl_rtl): Likewise.
5084         (assemble_start_function): Likewise.
5085         (output_constant): Likewise.
5086         (maybe_assemble_visibility): Likewise.
5087         * varpool.c (ctor_for_folding): Likewise.
5088         * chkp-builtins.def: Remove.
5089         * ipa-chkp.c: Remove.
5090         * ipa-chkp.h: Remove.
5091         * rtl-chkp.c: Remove.
5092         * rtl-chkp.h: Remove.
5093         * tree-chkp-opt.c: Remove.
5094         * tree-chkp.c: Remove.
5095         * tree-chkp.h: Remove.
5097 2018-06-07  Carl Love  <cel@us.ibm.com>
5099         * config/rs6000/vsx.md (vextract_fp_from_shorth,
5100         vextract_fp_from_shortl): Add BE support.
5102 2018-06-07  Paul Koning  <ni1d@arrl.net>
5104         * compare-elim.c (try_merge_compare): Don't merge compare if
5105         address contains a side effect.
5106         (try_eliminate_compare): Likewise.
5108 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
5110         * config.gcc: Support "tremont".
5111         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
5112         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5113         PROCESSOR_TREMONT.
5114         * config/i386/i386.c (m_TREMONT): Define.
5115         (processor_target_table): Add "tremont".
5116         (PTA_TREMONT): Define.
5117         (ix86_lea_outperforms): Add TARGET_TREMONT.
5118         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
5119         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
5120         and M_INTEL_GOLDMONT_PLUS.
5121         (fold_builtin_cpu): Add "tremont".
5122         (ix86_add_stmt_cost): Add TARGET_TREMONT.
5123         (ix86_option_override_internal): Add "tremont".
5124         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
5125         (processor_type): Add PROCESSOR_TREMONT.
5126         * config/i386/x86-tune.def: Add m_TREMONT.
5127         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
5129 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5131         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
5132         symbol defined for msp430i* devices to be lower case.
5134 2018-06-07  Richard Biener  <rguenther@suse.de>
5136         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
5137         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
5138         Properly wrap signed arithmetic if overflow wraps.
5140 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
5142         PR tree-optimization/69615
5143         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
5144         of a cast from a same precision integral SSA_NAME in a bb dominated
5145         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
5146         cast to utype if rhs2 has already a compatible type.
5148 2018-06-07  Richard Biener  <rguenther@suse.de>
5150         PR tree-optimization/85935
5151         * graphite-scop-detection.c (find_params_in_bb): Analyze
5152         condition operands with respect to the correct loop.  Assert
5153         the analysis doesn't fail.
5155 2018-06-04  Carl Love  <cel@us.ibm.com>
5157         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
5158         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
5159         as it is slightly cheaper.
5160         (first_match_or_eos_index_<mode>):
5161         Calculate index using natural element order.
5162         (first_match_index_<mode>):
5163         Calculate index using natural element order.
5164         (first_match_or_eos_index_<mode>):
5165         Calculate index using natural order.
5166         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
5167         for BE and LE modes.
5168         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
5169         P9V_BUILTIN_VCLZLSBB_V16QI.
5170         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
5171         specific.
5173 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5175         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
5176         indentation and line wrap for many prototypes.  Add missing
5177         @smallexample directives around block of prototypes for vec_xl and
5178         vec_xst.
5180 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
5182         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
5183         track if we pass or return IEEE 128-bit floating point.
5184         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
5185         C++ mangling that is compatible with GCC 8.1.
5186         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
5187         (init_cumulative_args): Note if we pass or return IEEE 128-bit
5188         floating point types.
5189         (rs6000_function_arg_advance_1): Likewise.
5190         (rs6000_mangle_type): Optionally generate mangled names that match
5191         what GCC 8.1 generated for IEEE 128-bit floating point types.
5192         (rs6000_globalize_decl_name): If we have an external function that
5193         passes or returns IEEE 128-bit types, generate a weak reference
5194         from the mangled name used in GCC 8.1 to the current mangled
5195         name.
5196         (rs6000_init_builtins): Make __ibm128 use the long double type if
5197         long double is IBM extended double.  Make __float128 use the long
5198         double type if long double is IEEE 128-bit.
5200         PR target/85657
5201         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
5202         macro for __ibm128 built-in functions.
5203         (PACK_IF): Add __ibm128 pack/unpack functions.
5204         (UNPACK_IF): Likewise.
5205         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
5206         enable long double built-in functions if long double is IEEE
5207         128-bit floating point.
5208         (rs6000_invalid_builtin): Update long double built-in function
5209         error message.
5210         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
5211         functions, adjust the built-in function to use the long double
5212         built-in function if __ibm128 and long double are the same type.
5213         * doc/extend.texi (PowerPC builtins): Update documention for
5214         __builtin_{,un}pack_longdouble.  Add documentation for
5215         __builtin_{,un}pack_ibm128.
5217 2018-06-06  Jim Wilson  <jimw@sifive.com>
5219         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
5220         (struct machine_function): New field interrupt_mode.
5221         (riscv_handle_type_attribute): New function.  Add forward declaration.
5222         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
5223         (riscv_expand_epilogue): Check interrupt_mode field.
5224         (riscv_set_current_function): Check interrupt attribute args and
5225         set interrupt_mode field.
5226         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
5227         (riscv_sret, riscv_uret): New.
5228         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
5229         new arguments to interrupt attribute.
5231 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
5233         PR target/63177
5234         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
5235         Don't handle -mcpu=power8 if -mpower9-vector is also used.
5237 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5239         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
5240         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
5241         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
5242         several redundant entries.
5244 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
5246         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
5247         type from "rtx" to "rtx_insn *".
5248         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
5249         for local "call_insn", removing cast.
5250         (ix86_expand_call): Likewise, introducing a "call_insn" local.
5252 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
5254         PR tree-optimization/86066
5255         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
5256         for BIT_INSERT_EXPR stores.
5258 2018-06-06  Richard Biener  <rguenther@suse.de>
5260         PR tree-optimization/86062
5261         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
5262         component refs ontop
5263         of to be offsetted base.
5265 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5267         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
5268         to be static and remove check on interrupt attribute name.
5270 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5272         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5273         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
5275 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
5277         PR target/79924
5278         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
5279         second argument.
5280         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
5281         Remove second argument, change how error is called.
5282         (aarch64_layout_arg): Remove second argument from
5283         aarch64_err_no_fpadvsimd call.
5284         (aarch64_init_cumulative_args): Ditto.
5285         (aarch64_gimplify_va_arg_expr): Ditto.
5286         * config/aarch64/aarch64.md (mov<mode>): Ditto.
5288 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
5290         * config/i386/i386.md (simple_return_indirect_internal): New expander.
5291         (*simple_return_indirect_internal<mode>): Rename from
5292         simple_return_indirect_internal.  Use W mode iterator.
5293         (rstorssp): New expander.
5294         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
5295         (clrssbsy): New expander.
5296         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
5298 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5300         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
5301         __typeof__.
5302         (cmse_check_pointed_object): Likewise.
5304 2018-06-05  Martin Liska  <mliska@suse.cz>
5306         PR gcov-profile/47618
5307         * doc/invoke.texi: Document how -fprofile-dir format
5308         is extended.
5310 2018-06-05  Richard Biener  <rguenther@suse.de>
5312         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
5313         removal pretend DOM info isn't available so we do not update
5314         it and only remove edges, not dominated blocks.  Actually free
5315         DOM info in case we removed something.  Remove unreachable blocks.
5316         (mfb_keep_latches): Work with either DOM info or marked backedges.
5317         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
5318         first.  Mark backedges if DOM info isn't available.
5319         (Re-)compute DOM info after cleanup_control_flow_pre.
5321 2018-06-05  Richard Biener  <rguenther@suse.de>
5323         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
5324         (locus_discrim_hasher::hash): Adjust.
5325         (locus_discrim_hasher::equal): Likewise.
5326         (next_discriminator_for_locus): Work on line directly.
5327         (same_line_p): Pass in expanded locus1 as well.
5328         (assign_discriminators): Avoid redundant location expansions.
5330 2018-06-05  Richard Biener  <rguenther@suse.de>
5332         PR tree-optimization/86046
5333         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
5334         if required after clearing TREE_ADDRESSABLE.
5336 2018-06-05  Richard Biener  <rguenther@suse.de>
5338         PR tree-optimization/86047
5339         * tree-ssa-loop.c (for_each_index): Glob handling of all
5340         decls and constants and really handle all of them.
5342 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5344         PR target/81497
5345         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
5346         qualifier_void_pointer and qualifier_const_void_pointer.
5347         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
5348         (arm_init_builtins): Handle the above.
5349         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
5350         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
5351         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
5352         void intrinsics.
5354 2018-06-05  Martin Liska  <mliska@suse.cz>
5356         * auto-profile.c (read_autofdo_file): Do not use
5357         gcov_ctr_summary struct.
5358         (afdo_callsite_hot_enough_for_early_inline): Likewise.
5359         * coverage.c (struct counts_entry): Likewise.
5360         (read_counts_file): Read just single summary entry.
5361         (get_coverage_counts): Use gcov_summary struct.
5362         * coverage.h (get_coverage_counts): Likewise.
5363         * gcov-dump.c (dump_working_sets): Likewise.
5364         (tag_summary): Dump just single summary.
5365         * gcov-io.c (gcov_write_summary): Write just histogram
5366         summary.
5367         (gcov_read_summary): Read just single summary.
5368         (compute_working_sets): Use gcov_summary struct.
5369         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
5370         of GCOV_COUNTERS_SUMMABLE.
5371         (GCOV_COUNTERS_SUMMABLE): Remove.
5372         (GCOV_FIRST_VALUE_COUNTER): Replace with
5373         GCOV_COUNTER_V_INTERVAL.
5374         (struct gcov_ctr_summary): Remove.
5375         (struct gcov_summary): Directly use fields of former
5376         gcov_ctr_summary.
5377         (compute_working_sets): Use gcov_summary struct.
5378         * gcov.c (read_count_file): Do not use ctrs fields.
5379         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
5380         struct.
5381         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
5382         struct.
5383         * profile.c: Likewise.
5384         * profile.h: Likewise.
5386 2018-06-05  Martin Liska  <mliska@suse.cz>
5388         PR gcov-profile/84846
5389         * gcov.c (output_lines): Print working directory only
5390         in intermediate format.
5392 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
5394         * config/s390/s390-builtin-types.def: Add void function type.
5395         * config/s390/s390-builtins.def: Use the function type for the
5396         tbeginc builtin.
5398 2018-06-04  Jim Wilson  <jimw@sifive.com>
5400         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
5401         to int.
5402         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
5403         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
5404         handle EH_RETURN_DATA_REGNO registers properly.
5405         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
5406         (riscv_expand_epilogue): Update comment.  Change argument name and
5407         type.  Update code to use new name and type.  Pass new args to
5408         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
5409         EXCEPTION_RETURN.
5410         * config/riscv/riscv.md (NORMAL_RETURN): New.
5411         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
5412         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
5413         (eh_return): Call gen_eh_return_internal and emit barrier.
5414         (eh_return_internal): Call riscv_expand_epilogue.
5416 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
5418         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
5419         bit_insertion field and declare can_be_merged_into method.
5420         (merged_store_group::can_be_merged_into): New method.
5421         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
5422         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
5423         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
5425 2018-06-04  Richard Biener  <rguenther@suse.de>
5427         PR tree-optimization/85955
5428         * builtins.c (fold_builtin_sincos): Convert pointers to
5429         destination to appropriate type before dereferencing.
5431 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
5433         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
5435 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
5437         * expr.c (expand_expr_real_1): Force the operand into memory if
5438         its TYPE_MODE is BLKmode and if there is no integer mode for
5439         the number of bits being extracted.
5441 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
5443         PR target/85832
5444         PR target/86036
5445         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
5446         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
5448 2018-06-04  Richard Biener  <rguenther@suse.de>
5450         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
5451         (cleanup_tree_cfg_noloop): ... single caller.  Do
5452         start_recording_case_labels later.
5454 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
5456         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
5457         to _IMMINTRIN_H_INCLUDED.
5458         * config/i386/pconfigintrin.h: Ditto.
5459         * config/i386/waitpkgintrin.h: Ditto.
5460         * config/i386/immintrin.h: Add includes for sgxintrin.h,
5461         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
5462         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
5463         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
5464         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
5465         waitpkgintrin.h and cldemoteintrin.h.
5467 2018-06-04  Richard Biener  <rguenther@suse.de>
5469         PR tree-optimization/86038
5470         * tracer.c (find_best_successor): Check probability for
5471         being initialized, bail out if not.
5473 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
5475         PR target/86003
5476         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
5477         of bits to ignore when comparing architectures.
5479 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
5481         PR tree-optimization/69615
5482         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
5483         maximum or minimum of the type, try to merge it also as if
5484         range1 is + [-, x - 1] or + [x + 1, -].
5486         PR c++/86025
5487         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
5489 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
5491         PR tree-optimization/86034
5492         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
5493         the unsigned bitfield type in a bit insertion sequence if it does not
5494         have a larger precision than the bitfield size.
5495         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
5497 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
5499         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
5501 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
5503         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
5504         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
5505         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
5506         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
5508 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
5510         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
5511         Disable -fdelete-null-pointer-checks for ELF toolchain.
5513 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
5514             Kito Cheng  <kito.cheng@gmail.com>
5516         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
5517         (nds32le-*-*, nds32be-*-*): Integrate checking process.
5518         (nds32*-*-*): Add glibc and uclibc conditions.
5519         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
5520         (TARGET_EXCEPT_UNWIND_INFO): Define.
5521         * config/nds32/elf.h: New file.
5522         * config/nds32/linux.h: New file.
5523         * config/nds32/nds32-elf.opt: New file.
5524         * config/nds32/nds32-linux.opt: New file.
5525         * config/nds32/nds32-fp-as-gp.c
5526         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
5527         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
5528         TARGET_LINUX_ABI.
5529         (nds32_asm_file_end): Ditto.
5530         (nds32_print_operand): Ditto.
5531         (nds32_insert_attributes): Ditto.
5532         (nds32_init_libfuncs): New function.
5533         (TARGET_HAVE_TLS): Define.
5534         (TARGET_INIT_LIBFUNCS): Define.
5535         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
5536         spec content.
5537         (TARGET_ELF): Apply different mcmodel setting.
5538         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
5539         been migrated into elf.h and linux.h files.
5540         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
5541         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
5542         (mcmodel): The content has been migrated into nds32-elf.opt and
5543         nds32-linux.opt files.
5544         * config/nds32/t-elf: New file.
5545         * config/nds32/t-linux: New file.
5547 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
5548             Shiva Chen  <shiva0217@gmail.com>
5550         * config/nds32/constants.md (unspec_volatile_element): Add
5551         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
5552         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
5553         optimization.
5554         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
5555         (make_pass_nds32_fp_as_gp): Declare.
5556         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
5557         optmization pass.
5558         (nds32_asm_function_end_prologue): Remove unused asm output.
5559         (nds32_asm_function_begin_epilogue): Remove unused asm output.
5560         (nds32_asm_file_start): Output necessary fp_as_gp information.
5561         (nds32_option_override): Adjust register usage.
5562         (nds32_expand_prologue): Consider fp_as_gp situation.
5563         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
5564         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
5565         (epilogue): Ditto.
5566         (return): Ditto.
5567         (simple_return): Ditto.
5568         (omit_fp_begin): Output special directive for fp_as_gp.
5569         (omit_fp_end): Output special directive for fp_as_gp.
5570         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
5571         mforbid-fp-as-gp): New options.
5573 2018-06-01  Mark Wielaard  <mark@klomp.org>
5575         * dwarf2out.c (dwarf2out_finish): Remove generation of
5576         DW_AT_loclists_base.
5578 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
5580         * gimple-ssa-store-merging.c: Include gimple-fold.h.
5581         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
5582         (struct merged_store_group): Add bit_insertion field.
5583         (dump_char_array): Use standard hexadecimal format.
5584         (merged_store_group::merged_store_group): Set bit_insertion to false.
5585         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
5586         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
5587         also print the mask in the dump file.
5588         (pass_store_merging::gate): Minor tweak.
5589         (imm_store_chain_info::coalesce_immediate): Fix wrong association
5590         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
5591         stores with INTEGER_CST stores.
5592         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
5593         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
5594         and use it throughout.  Generate bit insertion sequences if need be.
5595         (pass_store_merging::process_store): Remove redundant condition.
5596         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
5598 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
5600         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
5601         the 128-bit floating point types.  Fix function comment.
5603 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5605         * config/aarch64/aarch64-simd.md
5606         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
5607         mnemonics.
5608         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
5609         mnemonics.
5611 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
5613         PR tree-optimization/85989
5614         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
5615         variable.
5616         (backprop::intersect_uses): Check it when deciding whether this
5617         is a backedge reference.
5618         (backprop::process_block): Add each phi to m_visited_phis
5619         after visiting it, then clear it at the end.
5621 2018-06-01  Richard Biener  <rguenther@suse.de>
5623         * tree-vectorizer.h (vect_dr_stmt): New function.
5624         (vect_get_load_cost): Adjust.
5625         (vect_get_store_cost): Likewise.
5626         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
5627         Use vect_dr_stmt instead of DR_SMTT.
5628         (vect_record_base_alignments): Likewise.
5629         (vect_calculate_target_alignment): Likewise.
5630         (vect_compute_data_ref_alignment): Likewise and make static.
5631         (vect_update_misalignment_for_peel): Likewise.
5632         (vect_verify_datarefs_alignment): Likewise.
5633         (vector_alignment_reachable_p): Likewise.
5634         (vect_get_data_access_cost): Likewise.  Pass down
5635         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
5636         (vect_get_peeling_costs_all_drs): Likewise.
5637         (vect_peeling_hash_get_lowest_cost): Likewise.
5638         (vect_enhance_data_refs_alignment): Likewise.
5639         (vect_find_same_alignment_drs): Likewise.
5640         (vect_analyze_data_refs_alignment): Likewise.
5641         (vect_analyze_group_access_1): Likewise.
5642         (vect_analyze_group_access): Likewise.
5643         (vect_analyze_data_ref_access): Likewise.
5644         (vect_analyze_data_ref_accesses): Likewise.
5645         (vect_vfa_segment_size): Likewise.
5646         (vect_small_gap_p): Likewise.
5647         (vectorizable_with_step_bound_p): Likewise.
5648         (vect_prune_runtime_alias_test_list): Likewise.
5649         (vect_analyze_data_refs): Likewise.
5650         (vect_supportable_dr_alignment): Likewise.
5651         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
5652         (vect_gen_prolog_loop_niters): Likewise.
5653         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
5654         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
5655         modify DR_STMT.
5656         (vect_recog_mask_conversion_pattern): Likewise.
5657         (vect_try_gather_scatter_pattern): Likewise.
5658         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
5659         to vect_get_store_cost.
5660         (vect_get_store_cost): Get stmt_info instead of DR.
5661         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
5662         (vect_get_load_cost): Get stmt_info instead of DR.
5664 2018-06-01  Richard Biener  <rguenther@suse.de>
5666         PR middle-end/86017
5667         * gimple-fold.c (var_decl_component_p): Also allow offsetted
5668         vars wrapped in MEM_REFs.
5670 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
5672         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
5673         Fix subreg tests so that we only return a choice between
5674         GENERAL_REGS and FP_REGS if the original classes included both.
5676 2018-06-01  Richard Biener  <rguenther@suse.de>
5678         PR ipa/85960
5679         * tree-ssa-structalias.c (get_function_part_constraint):
5680         Handle NULL fi->decl.
5681         (find_func_aliases_for_call): Properly handle indirect
5682         fi from direct call.
5683         (find_func_clobbers): Likewise.
5684         (ipa_pta_execute): Likewise.
5685         (create_variable_info_for): For functions that are ifunc_resolver
5686         resolve to a varinfo that contains the result of the resolver call.
5687         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
5688         aliases.
5690 2018-05-31  Michael Collison  <michael.collison@arm.com>
5692         * config/aarch64/aarch64.md:
5693         (*fix_to_zero_extenddfdi2): New pattern.
5694         * gcc.target/aarch64/fix_extend1.c: New testcase.
5696 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
5698         PR middle-end/78809
5699         PR middle-end/83026
5700         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
5701         and BUILT_IN_STRNCMP_EQ.
5702         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
5703         BUILT_IN_STRNCMP_EQ.
5704         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
5705         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
5706         (gimple_fold_builtin): Likewise.
5707         * tree-ssa-strlen.c (compute_string_length): New function.
5708         (determine_min_obsize): New function.
5709         (handle_builtin_string_cmp): New function to handle calls to
5710         string compare functions.
5711         (strlen_optimize_stmt): Add handling to builtin string compare
5712         calls.
5713         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
5714         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
5715         * tree.c (build_common_builtin_nodes): Add new defines of
5716         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
5718 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
5720         PR target/85984
5721         * bb-reorder.c (pass_partition_blocks::gate): Return false for
5722         functions with naked attribute.
5724 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
5726         * config/i386/sse.md (avx_vec_concat<mode>):
5727         Substitute concat_tg_mode mode attribute with xtg_mode.
5728         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
5729         (concat_tg_mode): Remove mode attribute.
5731 2018-05-31  Martin Sebor  <msebor@redhat.com>
5733         PR c/82063
5734         * calls.c (alloc_max_size): Correct a logic error/typo.
5735         Treat excessive arguments as infinite.  Warn for invalid arguments.
5736         * doc/invoke.texi (-Walloc-size-larger-than): Update.
5738 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
5740         PR target/85829
5741         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
5742         and movx for Haswell.
5744 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
5745             Cesar Philippidis  <cesar@codesourcery.com>
5747         PR middle-end/85879
5748         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
5749         when emitting error on private/firstprivate reductions.
5750         * omp-low.c (lower_omp_target): Avoid reference-type processing
5751         on pointers for firstprivate clause.
5753 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5755         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
5756         (st1x2): Likewise.
5757         (st1x3): Likewise.
5758         * config/aarch64/aarch64-simd.md
5759         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
5760         (aarch64_ld1_x3_<mode>): Likewise
5761         (aarch64_st1x2<VALLDIF:mode>): Likewise
5762         (aarch64_st1_x2_<mode>): Likewise
5763         (aarch64_st1x3<VALLDIF:mode>): Likewise
5764         (aarch64_st1_x3_<mode>): Likewise
5765         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
5766         (vld1_s8_x3): Likewise.
5767         (vld1_u16_x3): Likewise.
5768         (vld1_s16_x3): Likewise.
5769         (vld1_u32_x3): Likewise.
5770         (vld1_s32_x3): Likewise.
5771         (vld1_u64_x3): Likewise.
5772         (vld1_s64_x3): Likewise.
5773         (vld1_f16_x3): Likewise.
5774         (vld1_f32_x3): Likewise.
5775         (vld1_f64_x3): Likewise.
5776         (vld1_p8_x3): Likewise.
5777         (vld1_p16_x3): Likewise.
5778         (vld1_p64_x3): Likewise.
5779         (vld1q_u8_x3): Likewise.
5780         (vld1q_s8_x3): Likewise.
5781         (vld1q_u16_x3): Likewise.
5782         (vld1q_s16_x3): Likewise.
5783         (vld1q_u32_x3): Likewise.
5784         (vld1q_s32_x3): Likewise.
5785         (vld1q_u64_x3): Likewise.
5786         (vld1q_s64_x3): Likewise.
5787         (vld1q_f16_x3): Likewise.
5788         (vld1q_f32_x3): Likewise.
5789         (vld1q_f64_x3): Likewise.
5790         (vld1q_p8_x3): Likewise.
5791         (vld1q_p16_x3): Likewise.
5792         (vld1q_p64_x3): Likewise.
5793         (vst1_s64_x2): Likewise.
5794         (vst1_u64_x2): Likewise.
5795         (vst1_f64_x2): Likewise.
5796         (vst1_s8_x2): Likewise.
5797         (vst1_p8_x2): Likewise.
5798         (vst1_s16_x2): Likewise.
5799         (vst1_p16_x2): Likewise.
5800         (vst1_s32_x2): Likewise.
5801         (vst1_u8_x2): Likewise.
5802         (vst1_u16_x2): Likewise.
5803         (vst1_u32_x2): Likewise.
5804         (vst1_f16_x2): Likewise.
5805         (vst1_f32_x2): Likewise.
5806         (vst1_p64_x2): Likewise.
5807         (vst1q_s8_x2): Likewise.
5808         (vst1q_p8_x2): Likewise.
5809         (vst1q_s16_x2): Likewise.
5810         (vst1q_p16_x2): Likewise.
5811         (vst1q_s32_x2): Likewise.
5812         (vst1q_s64_x2): Likewise.
5813         (vst1q_u8_x2): Likewise.
5814         (vst1q_u16_x2): Likewise.
5815         (vst1q_u32_x2): Likewise.
5816         (vst1q_u64_x2): Likewise.
5817         (vst1q_f16_x2): Likewise.
5818         (vst1q_f32_x2): Likewise.
5819         (vst1q_f64_x2): Likewise.
5820         (vst1q_p64_x2): Likewise.
5821         (vst1_s64_x3): Likewise.
5822         (vst1_u64_x3): Likewise.
5823         (vst1_f64_x3): Likewise.
5824         (vst1_s8_x3): Likewise.
5825         (vst1_p8_x3): Likewise.
5826         (vst1_s16_x3): Likewise.
5827         (vst1_p16_x3): Likewise.
5828         (vst1_s32_x3): Likewise.
5829         (vst1_u8_x3): Likewise.
5830         (vst1_u16_x3): Likewise.
5831         (vst1_u32_x3): Likewise.
5832         (vst1_f16_x3): Likewise.
5833         (vst1_f32_x3): Likewise.
5834         (vst1_p64_x3): Likewise.
5835         (vst1q_s8_x3): Likewise.
5836         (vst1q_p8_x3): Likewise.
5837         (vst1q_s16_x3): Likewise.
5838         (vst1q_p16_x3): Likewise.
5839         (vst1q_s32_x3): Likewise.
5840         (vst1q_s64_x3): Likewise.
5841         (vst1q_u8_x3): Likewise.
5842         (vst1q_u16_x3): Likewise.
5843         (vst1q_u32_x3): Likewise.
5844         (vst1q_u64_x3): Likewise.
5845         (vst1q_f16_x3): Likewise.
5846         (vst1q_f32_x3): Likewise.
5847         (vst1q_f64_x3): Likewise.
5848         (vst1q_p64_x3): Likewise.
5850 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5852         * config/msp430/msp430.c (msp430_output_labelref): Prepend
5853         user_label_prefix to name.
5855         * tree-core.h: Update comment about the format of NAME string
5856         passed to handler in attribute_spec.
5858         * config/msp430/msp430.md: Remove erroneous subreg expression from
5859         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
5860         zero_extend{q,h}isi2.
5862 2018-05-30  Borislav Petkov  <bp@suse.de>
5864         * doc/extend.texi: Document some architecture specific
5865         constraints and sort entries.
5867 2018-05-30  Martin Sebor  <msebor@redhat.com>
5869         PR middle-end/85369
5870         * builtins.c (expand_builtin_stpcpy_1): New function.
5871         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
5872         only if the former succeeds.
5874 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5876         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
5877         in saphira.
5879 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
5881         * doc/invoke.texi (-flinker-output): Document
5883 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
5885         * passes.c (ipa_write_summaries): Only modify statements if body
5886         is in memory.
5887         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
5888         incrementally linking.
5889         (ipa_passes): Likewise.
5890         * lto-cgraph.c (lto_output_node): When incrementally linking do not
5891         pass down resolution info.
5892         * common.opt (flag_incremental_link): Update info.
5893         * gcc.c (plugin specs): Turn flinker-output=* to
5894         -plugin-opt=-linker-output-known
5895         * toplev.c (compile_file): Also cut compilation when doing incremental
5896         link.
5897         * flag-types. (enum lto_partition_model): Add
5898         LTO_LINKER_OUTPUT_NOLTOREL.
5899         (invoke.texi): Add -flinker-output docs.
5900         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
5901         link same way as WPA; do not stream in dead initializers.
5903         * dwarf2out.c (dwarf2out_die_ref_for_decl,
5904         darf2out_register_external_decl): Support incremental link.
5906 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
5908         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
5910 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
5912         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
5913         it down to simple_object_copy_lto_debug_sections.
5914         (run_gcc): Determine incremental LTO link time and configure
5915         lto1 into non-wpa mode, disable renaming of debug sections.
5917 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5919         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5920         descriptions of various incorrectly documented functions.
5922 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5924         Revert:
5925         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5926         address check not strict.
5928 2018-05-30  Richard Biener  <rguenther@suse.de>
5930         PR tree-optimization/85964
5931         * tracer.c (better_p): Drop initialized count check, we only
5932         call the function with initialized counts now.
5933         (find_best_successor): Do find a best edge if one
5934         has uninitialized count.
5935         (find_best_predecessor): Likewise.  Do BB frequency check only
5936         if count is initialized.
5938 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
5940         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
5941         (aarch64_ldrstr_offset_compare): New.
5942         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
5943         load/store orderings.
5944         (aarch64_gen_adjusted_ldpstp): Likewise.
5946 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
5948         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
5949         Check for subset of GENERAL_REGS and FP_REGS.
5950         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
5951         r=w alternative.
5953 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
5955         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
5956         and wi::to_poly_offset.  Add the current offset and then check
5957         whether the sum fits, rather than using an unchecked addition of
5958         a checked term.  Check for a shwi rather than a uhwi.
5959         * expr.c (get_bit_range): Use tree_to_poly_uint64.
5960         (store_constructor): Use poly_int_tree_p.
5961         (expand_expr_real_1): Likewise.
5962         * function.c (assign_temp): Likewise.
5963         * fold-const.c (const_binop): Use poly_int_tree_p and
5964         wi::to_poly_offset.
5965         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
5966         division.
5967         * ipa-icf-gimple.c (func_checker::compare_operand): Use
5968         to_poly_offset for MEM offsets.
5969         * ipa-icf.c (sem_variable::equals): Likewise.
5970         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
5971         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
5972         wi::to_poly_offset for BIT_FIELD_REF offsets.
5973         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
5974         wi::to_poly_offset.
5975         * var-tracking.c (emit_note_insn_var_location): Use
5976         tree_to_poly_uint64.
5978 2018-05-29  Jim Wilson  <jimw@sifive.com>
5980         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
5982 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
5984         PR target/85950
5985         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
5986         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
5987         sequence.
5988         (sse4_1_round<mode>2): Use nonimmediate_operand
5989         for operand 1 predicate.
5991 2018-05-29  Martin Sebor  <msebor@redhat.com>
5992             Richard Biener  <rguenther@suse.de>
5994         PR testsuite/85888
5995         * calls.c (get_size_range): Call determine_value_range instead
5996         of get_value_range..
5997         * tree-vrp.h (determine_value_range): Declared new function.
5998         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
6000 2018-05-29  Richard Biener  <rguenther@suse.de>
6002         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
6003         sure to use non-pattern stmts for get_earlier_stmt arguments.
6004         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
6005         called on pattern stmts.
6006         (get_later_stmt): Likewise.
6008 2018-05-29  Martin Liska  <mliska@suse.cz>
6010         PR gcov-profile/85759
6011         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
6012         env variables.
6014 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
6016         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
6017         VEC_UNPACK_*_EXPR.
6018         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
6019         VEC_PACK_*_EXPR.
6021         PR target/85918
6022         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6023         VEC_PACK_FLOAT_EXPR): New tree codes.
6024         * tree-pretty-print.c (op_code_prio): Handle
6025         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6026         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6027         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6028         * tree-inline.c (estimate_operator_cost): Likewise.
6029         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
6030         * fold-const.c (const_binop): Likewise.
6031         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
6032         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6033         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6034         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
6035         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6036         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6037         * expr.c (expand_expr_real_2): Likewise.
6038         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
6039         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
6040         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
6041         optabs.
6042         * optabs.c (expand_widen_pattern_expr): For
6043         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
6044         sign from result type rather than operand's type.
6045         (expand_binop_directly): For vec_packu_float_optab and
6046         vec_packs_float_optab allow result type to be different from operand's
6047         type.
6048         * optabs-tree.c (optab_for_tree_code): Handle
6049         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6050         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
6051         * tree-vect-generic.c (expand_vector_operations_1):  Handle
6052         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6053         VEC_PACK_FLOAT_EXPR.
6054         * tree-vect-stmts.c (supportable_widening_operation): Handle
6055         FIX_TRUNC_EXPR.
6056         (supportable_narrowing_operation): Handle FLOAT_EXPR.
6057         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
6058         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
6059         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
6060         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
6061         mode attributes.
6062         (vec_pack<floatprefix>_float_<mode>): New expander.
6063         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
6064         attributes.
6065         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
6066         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
6067         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
6068         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
6069         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
6070         Document.
6071         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
6072         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
6073         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6074         VEC_PACK_FLOAT_EXPR): Document.
6076 2018-05-29  Richard Biener  <rguenther@suse.de>
6078         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
6079         member.
6080         (stmt_vec_info_vec): Make pointer.
6081         (init_stmt_vec_info_vec): Remove.
6082         (free_stmt_vec_info_vec): Likewise.
6083         (set_stmt_vec_info_vec): New function.
6084         (free_stmt_vec_infos): Likewise.
6085         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
6086         (set_vinfo_for_stmt): Likewise.
6087         (get_earlier_stmt): Likewise.
6088         (get_later_stmt): Likewise.
6089         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
6090         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
6091         (vec_info::~vec_info): Free stmt_vec_infos.
6092         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
6093         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
6094         (pass_slp_vectorize::execute): Likewise.
6095         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
6096         (free_stmt_vec_info_vec): Likewise.
6097         (set_stmt_vec_info_vec): New function.
6098         (free_stmt_vec_infos): Likewise.
6099         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
6100         the global stmt_vec_info_vec.
6101         * tree-parloops.c (gather_scalar_reductions): Use
6102         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
6103         vector.
6105 2018-05-29  Richard Biener  <rguenther@suse.de>
6107         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
6109 2018-05-29  Martin Liska  <mliska@suse.cz>
6110             David Malcolm  <dmalcolm@redhat.com>
6112         * vec.c (test_reverse): New.
6113         (vec_c_tests): Add new test.
6114         * vec.h (vl_ptr>::reverse): New function.
6116 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
6118         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
6120         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
6121         and later.
6123 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6125         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
6127 2018-05-28  Richard Biener  <rguenther@suse.de>
6129         PR tree-optimization/85933
6130         * tree-vect-data-refs.c (vect_record_base_alignments): Only
6131         look at stmts marked as vectorizable.
6133 2018-05-28  Richard Biener  <rguenther@suse.de>
6135         PR tree-optimization/85934
6136         * tree-vect-generic.c (expand_vector_operations_1): Hoist
6137         vector boolean check before scalar optimization.
6139 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
6141         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
6142         for armv5te.
6144 2018-05-28  Mark Wielaard  <mark@klomp.org>
6146         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
6147         if it is an expression containing a minus sign.
6149 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
6151         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
6153 2018-05-27  Paul Koning  <ni1d@arrl.net>
6155         * config/pdp11/pdp11.md (truncsihi2): Remove.
6157 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
6158             Chung-Ju Wu  <jasonwucj@gmail.com>
6160         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
6161         implementation.
6162         (unaligned_store_dw): Ditto.
6163         * config/nds32/nds32-memory-manipulation.c
6164         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
6165         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
6166         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
6167         (emit_setmem_word_loop): Rename to ...
6168         (emit_setmem_doubleword_loop): ... this.
6169         (nds32_gen_dup_4_byte_to_word_value): New function.
6170         (nds32_gen_dup_8_byte_to_double_word_value): New function.
6171         (nds32_expand_setmem_loop): Refine implementation.
6172         (nds32_expand_setmem_loop_v3m): Ditto.
6173         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
6174         pattern.
6176 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
6178         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
6180 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
6182         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
6183         (nds32_init_machine_status): Initialize machine->attr_naked_p and
6184         machine->attr_no_prologue_p.
6185         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
6186         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
6187         (nds32_expand_epilogue): Consider attr_naked_p.
6188         (nds32_expand_epilogue_v3pop): Likewise.
6189         (nds32_can_use_return_insn): Likewise.
6190         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
6191         attr_no_prologue_p fields.
6192         * config/nds32/nds32.opt (mret-in-naked-func): New option.
6194 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
6196         PR target/85918
6197         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
6198         attributes.
6199         * config/i386/sse.md
6200         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
6201         Rename to ...
6202         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
6203         ... this.
6204         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
6205         Rename to ...
6206         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
6207         ... this.
6208         (*<floatsuffix>floatv2div2sf2): Rename to ...
6209         (*float<floatunssuffix>v2div2sf2): ... this.
6210         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
6211         (float<floatunssuffix>v2div2sf2_mask): ... this.
6212         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
6213         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
6214         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
6215         to ...
6216         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
6217         ... this.
6218         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6219         Rename to ...
6220         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6221         ... this.
6222         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6223         Rename to ...
6224         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6225         ... this.
6226         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
6227         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
6228         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
6229         gen_ufix_truncv8dfv8si2.
6230         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
6231         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
6232         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
6233         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
6234         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
6235         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
6236         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
6237         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
6239 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
6241         PR target/85900
6242         PR target/85345
6243         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
6245 2018-05-25  Jim Wilson  <jimw@sifive.com>
6247         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
6248         * config/riscv/riscv.c (struct machine_function): Add
6249         interrupt_handler_p and attribute_checked_p fields.
6250         (riscv_attribute_table): Add interrupt.
6251         (riscv_interrupt_type_p): New.
6252         (riscv_save_reg_p): Save extra regs for interrupt handler.
6253         (riscv_use_save_libcall): Return false  for interrupt handler.
6254         (riscv_first_stack_step): Add forward declaration.
6255         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
6256         for interrupt handler with large frame.  Use it for saved reg list.
6257         (riscv_expand_prologue): Move flag_stack_usage_info support to
6258         eliminate duplication.
6259         (riscv_expand_epilogue): Generate mret for interrupt handler.
6260         (riscv_epilogue_uses): New.
6261         (riscv_can_use_return_insn): Return false for interrupt handler.
6262         (riscv_function_ok_for_sibcall): Likewise.
6263         (riscv_set_current_function): Add interrupt handler support.
6264         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
6265         * config/riscv/riscv.md (UNSPECV_MRET): New.
6266         (GP_REGNUM): New.
6267         (riscv_frflags, riscv_fsflags): Use tab after opcode.
6268         (riscv_mret): New.
6269         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
6271 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
6273         PR tree-optimization/85712
6274         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
6275         this candidate has already been replaced in-situ by a copy.
6277 2018-05-25  Jason Merrill  <jason@redhat.com>
6279         PR c++/80485 - inline function non-zero address.
6280         * symtab.c (nonzero_address): Check DECL_COMDAT.
6282 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
6284         PR target/83628
6285         * config/alpha/alpha.md (ashlsi3): New insn pattern.
6286         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
6287         extension of SImode operation.  Use const123_operand predicate.
6288         (*saddsi_1): Remove.
6289         (*saddl_se_1): Ditto.
6290         (*ssubsi_1): Ditto.
6291         (*ssubl_se_1): Ditto.
6292         * config/alpha/predicates.md (const123_operand): New predicate.
6293         * config/alpha/constraints.md (P): Use IN_RANGE.
6295 2018-05-25  Richard Biener  <rguenther@suse.de>
6297         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
6298         defaulted to true.
6299         (ref_maybe_used_by_stmt_p): Likewise.
6300         (stmt_may_clobber_ref_p): Likewise.
6301         (stmt_may_clobber_ref_p_1): Likewise.
6302         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
6303         and pass it along.
6304         (ref_maybe_used_by_stmt_p): Likewise.
6305         (stmt_may_clobber_ref_p): Likewise.
6306         (stmt_may_clobber_ref_p_1): Likewise.
6307         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
6308         the alias oracle to disambiguate DRs with stmts DR analysis
6309         couldn't handle.
6310         (vect_analyze_data_refs): Do not give up on not analyzable
6311         DRs for BB vectorization.  Remove code truncating the dataref
6312         vector.
6314 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
6316         PR target/85832
6317         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6318         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
6319         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
6321 2018-05-25  Richard Biener  <rguenther@suse.de>
6323         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
6324         function, combining stmt data ref gathering and fatal analysis
6325         parts.
6326         (vect_analyze_data_refs): Remove now redudnant code and simplify.
6327         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
6328         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
6329         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
6330         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
6332 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
6334         PR tree-optimization/85720
6335         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
6336         SCC if all partitions are builtins.
6337         (version_loop_by_alias_check): New parameter.  Generate cancelable
6338         runtime alias check if all partitions are builtins.
6339         (distribute_loop): Update call to above function.
6341 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
6343         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
6344         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
6345         (parm_default_def_partition_arg): Ditto.
6346         (set_parm_default_def_partition): Ditto.
6347         (get_parm_default_def_partitions): Ditto and make it static.
6348         (get_undefined_value_partitions): Ditto and make it static.
6349         (remove_ssa_form): Refactor call to init_var_map here.
6350         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
6351         computation for loop region.
6352         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
6353         (register_default_def): Delete.
6354         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
6355         (parm_default_def_partition_arg): Ditto.
6356         (set_parm_default_def_partition): Ditto.
6357         (get_parm_default_def_partitions): Ditto and make it static.
6358         (get_undefined_value_partitions): Ditto and make it static.
6359         (coalesce_with_default, coalesce_with_default): Update comment.
6360         (create_coalesce_list_for_region): New func factored out from
6361         create_outofssa_var_map.
6362         (populate_coalesce_list_for_outofssa): New func factored out from
6363         create_outofssa_var_map and coalesce_ssa_name.
6364         (create_outofssa_var_map): Delete.
6365         (coalesce_ssa_name): Refactor to support live range computation.
6366         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
6367         (get_parm_default_def_partitions): Delete.
6368         (get_undefined_value_partitions): Ditto.
6369         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
6370         computation for loop region.
6371         (new_tree_live_info, loe_visit_block): Ditto.
6372         (live_worklist, set_var_live_on_entry): Ditto.
6373         (calculate_live_on_exit, verify_live_on_entry): Ditto.
6374         * tree-ssa-live.h (struct _var_map): New fields.
6375         (init_var_map): Change decl.
6376         (region_contains_p): New.
6378 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
6380         * tree-ssa-live.h (live_merge_and_clear): Delete.
6382 2018-05-25  Richard Biener  <rguenther@suse.de>
6384         PR c++/85912
6385         * tree-dump.c (dequeue_and_dump): Remove access to removed
6386         operand 2 of a SWITCH_EXPR.
6388 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6390         * doc/sourcebuild.texi (vect_double_cond_arith): Include
6391         multiplication and division.
6392         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
6393         (cond_udiv@var{m}, cond_umod@var{m}): Document.
6394         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
6395         (cond_udiv_optab, cond_umod_optab): New optabs.
6396         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
6397         (IFN_COND_RDIV): New internal functions.
6398         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
6399         TRUNC_MOD_EXPR and RDIV_EXPR.
6400         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
6401         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
6402         New unspecs.
6403         (SVE_INT_BINARY): Include mult.
6404         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
6405         (optab, sve_int_op): Handle mult.
6406         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
6407         UNSPEC_COND_DIV.
6408         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
6409         for SVE_INT_BINARY_SD.
6411 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6413         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
6414         (optab, sve_int_op): Handle div and udiv.
6415         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
6416         for SVE_INT_BINARY_SD.
6417         (*<optab><mode>3): New insn for the same.
6419 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6421         * tree-vect-patterns.c: Include predict.h.
6422         (vect_recog_divmod_pattern): Restrict check for division support
6423         to when optimizing for size.
6425 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6427         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
6428         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
6429         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
6430         (gimple_match_op::set_op): Likewise.
6431         (gimple_resimplify4): Declare.
6432         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
6433         (expr::gen_transform): Likewise.
6434         (decision_tree::gen): Generate a simplification routine for 4 operands.
6435         * gimple-match-head.c (gimple_simplify): Add an overload for
6436         4 operands.  In the top-level function, handle up to 4 call
6437         arguments and call gimple_resimplify4.
6438         (gimple_resimplify4): New function.
6439         (build_call_internal): Pass a fourth operand.
6440         (maybe_push_to_seq): Likewise.
6441         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
6442         Fold VEC_COND_EXPRs of an operation and a default value into
6443         an IFN_COND_* function if possible.
6444         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
6445         New unspecs.
6446         (SVE_COND_FP_BINARY): Include them.
6447         (optab, sve_fp_op): Handle them.
6448         (SVE_INT_BINARY_REV): New code iterator.
6449         (SVE_COND_FP_BINARY_REV): New int iterator.
6450         (commutative): New int attribute.
6451         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
6452         Declare.
6453         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
6454         function.
6455         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
6456         (*cond_<optab><mode>): New patterns for reversed operands.
6458 2018-05-25  Richard Biener  <rguenther@suse.de>
6460         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
6461         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
6462         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
6463         (STMT_VINFO_GROUPED_ACCESS): Adjust.
6464         * tree-vect-data-refs.c (everywhere): Adjust users.
6465         * tree-vect-loop.c (everywhere): Likewise.
6466         * tree-vect-slp.c (everywhere): Likewise.
6467         * tree-vect-stmts.c (everywhere): Likewise.
6468         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
6470 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6472         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
6473         Rename to...
6474         (gcc_cv_as_section_exclude): ... this.
6475         Try Solaris as #exclude syntax.
6476         * configure: Regenerate.
6477         * config.in: Regenerate.
6478         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
6479         SECTION_EXCLUDE.
6480         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
6481         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
6483         * varasm.c (default_elf_asm_named_section): Don't check if
6484         HAVE_GAS_SECTION_EXCLUDE is defined.
6486 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6488         * doc/md.texi: Update the documentation of the cond_* optabs
6489         to mention the new final operand.  Fix GET_MODE_NUNITS call.
6490         Describe the scalar case too.
6491         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
6492         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
6493         instead of 2.
6494         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
6495         (get_conditional_internal_fn): Update comment.
6496         * tree-vect-loop.c (vectorizable_reduction): Pass the original
6497         accumulator value as a final argument to conditional functions.
6498         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
6499         a define_expand and add an "else" operand.  Assert for now that
6500         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
6501         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
6502         (*cond_<optab><mode>): New patterns.
6503         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
6504         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
6505         (UNSPEC_COND_EOR): Delete.
6506         (optab): Remove associated mappings.
6507         (SVE_INT_BINARY): New code iterator.
6508         (sve_int_op): Remove int attribute and add "minus" to the code
6509         attribute.
6510         (SVE_COND_INT_OP): Delete.
6511         (SVE_COND_FP_OP): Rename to...
6512         (SVE_COND_FP_BINARY): ...this.
6514 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
6516         * optabs.c (can_reuse_operands_p): New function.
6517         (maybe_legitimize_operands): Try to reuse the results for
6518         earlier operands.
6520 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
6522         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
6523         Add {q} suffix to insn mnemonic.
6525 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6527         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
6528         (msp430_warn_func_return): New.
6530 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
6532         * fold-const.c (tree_nonzero_bits): New function.
6533         * fold-const.h (tree_nonzero_bits): Likewise.
6534         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
6535         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
6537 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
6539         PR target/85900
6540         PR target/85345
6541         * varasm.c (assemble_alias): Check ifunc_resolver only on
6542         FUNCTION_DECL.
6544 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
6546         PR target/85903
6547         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
6548         when memory input operand is handled.
6550 2018-05-24  Luis Machado  <luis.machado@linaro.org>
6552         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
6553         global.
6554         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
6556 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
6558         * match.pd: Delay FMA folds until after vectorization.
6560 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6562         PR target/83009
6563         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6564         address check not strict.
6566 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
6568         * gimple-match.h (gimple_match_op): New class.
6569         (mprts_hook): Replace parameters with a gimple_match_op *.
6570         (maybe_build_generic_op): Likewise.
6571         (gimple_simplified_result_is_gimple_val): Replace parameters with
6572         a const gimple_match_op *.
6573         (gimple_simplify): Replace code_helper * and tree * parameters with
6574         a gimple_match_op * parameter.
6575         (gimple_resimplify1): Replace code_helper *, tree and tree *
6576         parameters with a gimple_match_op * parameter.
6577         (gimple_resimplify2): Likewise.
6578         (gimple_resimplify3): Likewise.
6579         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
6580         parameters with a gimple_match_op * parameter.
6581         * gimple-match-head.c (gimple_simplify): Change prototypes of
6582         auto-generated functions to take a gimple_match_op * instead of
6583         separate code_helper * and tree * parameters.  Make the same
6584         change in the top-level overload and update calls to the
6585         gimple_resimplify routines.  Update calls to the auto-generated
6586         functions and to maybe_push_res_to_seq in the publicly-facing
6587         operation-specific gimple_simplify overloads.
6588         (gimple_match_op::MAX_NUM_OPS): Define.
6589         (gimple_resimplify1): Replace rcode and ops with a single res_op
6590         parameter.  Update call to gimple_simplify.
6591         (gimple_resimplify2): Likewise.
6592         (gimple_resimplify3): Likewise.
6593         (mprts_hook): Replace parameters with a gimple_match_op *.
6594         (maybe_build_generic_op): Likewise.
6595         (build_call_internal): Replace type, nargs and ops with
6596         a gimple_match_op *.
6597         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
6598         with a single gimple_match_op *.  Update calls to mprts_hook,
6599         build_call_internal and gimple_simplified_result_is_gimple_val.
6600         Factor out code that is common to the tree_code and combined_fn cases.
6601         * genmatch.c (expr::gen_transform): Replace tem_code and
6602         tem_ops with a gimple_match_op called tem_op.  Update calls
6603         to the gimple_resimplify functions and maybe_push_res_to_seq.
6604         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
6605         res_ops.  Update call to the gimple_resimplify functions.
6606         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
6607         (decision_tree::gen): Make the functions take a gimple_match_op *
6608         called res_op instead of separate res_code and res_ops parameters.
6609         Update call accordingly.
6610         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
6611         and ops with a single res_op parameter.  Update calls to
6612         maybe_build_generic_op and maybe_push_res_to_seq.
6613         (fold_stmt_1): Update calls to gimple_simplify and
6614         replace_stmt_with_simplification.
6615         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
6616         and gimple_simplified_result_is_gimple_val.
6617         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
6618         gimple_simplify.
6619         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
6620         with a gimple_match_op *.
6621         (vn_nary_build_or_lookup): Likewise.  Update call to
6622         vn_nary_build_or_lookup_1.
6623         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
6624         gimple_match_op *.  Update calls to the gimple_resimplify routines
6625         and to gimple_simplified_result_is_gimple_val.
6626         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
6627         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
6628         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
6629         (visit_nary_op): Likewise.
6630         (visit_reference_op_load): Likewise.
6632 2018-05-23  Luis Machado  <luis.machado@linaro.org>
6634         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
6635         modifier for printing the step amount.
6637 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
6639         PR target/78849
6640         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
6641         types.
6643 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
6645         * doc/sourcebuild.texi (Endianness): New subsubsection.
6647 2018-05-23  Luis Machado  <luis.machado@linaro.org>
6649         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6650         <prefetch_dynamic_strides>: New const bool field.
6651         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6652         prefetch_dynamic_strides.
6653         (exynosm1_prefetch_tune): Likewise.
6654         (thunderxt88_prefetch_tune): Likewise.
6655         (thunderx_prefetch_tune): Likewise.
6656         (thunderx2t99_prefetch_tune): Likewise.
6657         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
6658         false.
6659         (aarch64_override_options_internal): Update to set
6660         PARAM_PREFETCH_DYNAMIC_STRIDES.
6661         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6662         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6663         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6664         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6665         prefetch-dynamic-strides setting.
6667 2018-05-23  Luis Machado  <luis.machado@linaro.org>
6669         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6670         <minimum_stride>: New const int field.
6671         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6672         minimum_stride field defaulting to -1.
6673         (exynosm1_prefetch_tune): Likewise.
6674         (thunderxt88_prefetch_tune): Likewise.
6675         (thunderx_prefetch_tune): Likewise.
6676         (thunderx2t99_prefetch_tune): Likewise.
6677         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
6678         <default_opt_level>: Set to 3.
6679         (aarch64_override_options_internal): Update to set
6680         PARAM_PREFETCH_MINIMUM_STRIDE.
6681         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6682         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6683         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6684         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6685         stride is constant and is below the minimum stride threshold.
6687 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6689         * config/arm/arm-cpus.in (mode26): Delete.
6690         (armv4): Delete mode26 reference.
6691         * config/arm/arm.c (arm_configure_build_target): Delete use of
6692         isa_bit_mode26.
6694 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
6696         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
6697         New insn pattern.
6698         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
6699         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
6700         for non-SSE modes.
6701         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
6702         (floatunsdidf2): Ditto.
6704 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
6706         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
6707         (fixuns_trunc<mode>si2_avx512f): Ditto.
6708         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
6709         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
6710         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
6712 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
6714         PR rtl-optimization/79985
6715         * df-scan.c (df_insn_refs_collect): Remove special case for
6716         global registers and asm statements.
6718 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
6720         * extend.texi (Global Register Variables): Rewrite the bullet list.
6721         Note that the register is available for allocation. Note that access
6722         via inline asm must use constraints. Add note about async-signal
6723         handlers. Remove paragraph about automagic register selection.
6725 2018-05-23  Richard Biener  <rguenther@suse.de>
6727         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
6728         of fixed offset from memset VN.
6730 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
6732         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
6733         first_interp field.
6734         (alloc_cand_and_find_basis): Initialize first_interp field.
6735         (slsr_process_mul): Modify first_interp field.
6736         (slsr_process_add): Likewise.
6737         (slsr_process_cast): Modify first_interp field for each new
6738         interpretation.
6739         (slsr_process_copy): Likewise.
6740         (dump_candidate): Dump first_interp field.
6741         (replace_mult_candidate): Process all interpretations, not just
6742         subsequent ones.
6743         (replace_rhs_if_not_dup): Likewise.
6744         (replace_one_candidate): Likewise.
6746 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
6748         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
6749         Add new boolean.
6750         (aarch64_needs_frame_chain): New function.
6751         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
6753 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
6755         PR target/84882
6756         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
6757         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
6758         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
6759         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
6760         as true for strict-align.
6761         (aarch64_can_inline_p): Perform checks even when callee has no
6762         attributes to check for strict alignment.
6763         * doc/extend.texi (AArch64 Function Attributes): Document
6764         no-strict-align.
6765         * doc/invoke.texi: (AArch64 Options): Likewise.
6767 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
6769         PR tree-optimization/85853
6770         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
6771         the handling of the root of the node to...
6772         (vect_slp_analyze_node_operations_1): ...this new function,
6773         and run the whole thing with the child nodes' def types
6774         set according to their SLP node's def type.
6776 2018-05-23  Richard Biener  <rguenther@suse.de>
6778         PR middle-end/85874
6779         * tree-data-ref.c (create_runtime_alias_checks): Defer
6780         and ignore overflow warnings.
6782 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
6784         PR tree-optimization/85822
6785         * tree-vrp.c (is_masked_range_test): Fix handling of negative
6786         constants.
6788 2018-05-23  Richard Biener  <rguenther@suse.de>
6790         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6791         memset constants via native_interpret_expr.
6793 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
6795         PR target/85345
6796         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
6797         attribute.
6798         (cgraph_node::create_alias): Likewise.
6799         (cgraph_node::get_availability): Check ifunc_resolver instead
6800         of looking up ifunc attribute.
6801         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6802         * varasm.c (do_assemble_alias): Likewise.
6803         (assemble_alias): Likewise.
6804         (default_binds_local_p_3): Likewise.
6805         * cgraph.h (cgraph_node): Add ifunc_resolver.
6806         (cgraph_node::only_called_directly_or_aliased_p): Return false
6807         for IFUNC resolver.
6808         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
6809         attribute.
6810         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
6811         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
6812         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
6813         instead of looking up ifunc attribute.
6815 2018-05-22  Luis Machado  <luis.machado@linaro.org>
6817         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
6819 2018-05-22  Martin Sebor  <msebor@redhat.com>
6821         PR middle-end/85359
6822         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
6823         only when expasion succeeds.
6824         (expand_builtin_strcmp): Same.
6825         (expand_builtin_strncmp): Same.
6827 2018-05-22  Martin Sebor  <msebor@redhat.com>
6829         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
6831 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
6832             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6834         * config/aarch64/aarch64-ldpstp.md: Replace uses of
6835         aarch64_mem_pair_operand with memory_operand and delete operand swapping
6836         code.
6837         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6838         Add check for legitimate_address.
6839         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
6840         (aarch64_swap_ldrstr_operands): New.
6841         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
6842         Define prototype.
6844 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
6845             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6847         * config/aarch64/aarch64.md: New patterns to generate stp
6848         and ldp.
6849         (store_pair_sw, store_pair_dw): New patterns to generate stp for
6850         single words and double words.
6851         (load_pair_sw, load_pair_dw): Likewise.
6852         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
6853         Delete.
6854         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
6855         Delete.
6856         * config/aarch64/aarch64-ldpstp.md: Modify peephole
6857         for different mode ldpstp and add peephole for merged zero stores.
6858         Likewise for loads.
6859         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6860         Add size check.
6861         (aarch64_gen_store_pair): Rename calls to match new patterns.
6862         (aarch64_gen_load_pair): Rename calls to match new patterns.
6863         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
6864         (load_pair<DREG:mode><DREG2:mode>): ... This.
6865         (store_pair<mode>): Rename to...
6866         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
6867         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
6868         New mode iterators.
6869         (V_INT_EQUIV): Handle SImode.
6870         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
6871         New predicate.
6873 2018-05-22  Martin Sebor  <msebor@redhat.com>
6875         PR c/85623
6876         * calls.c (maybe_warn_nonstring_arg): Use string length to set
6877         or ajust the presumed bound on an operation to avoid unnecessary
6878         warnings.
6880 2018-05-22  Martin Sebor  <msebor@redhat.com>
6882         PR tree-optimization/85826
6883         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
6884         assuming that a DECL necesarily has a constant size.
6886 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
6888         PR middle-end/85862
6889         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
6891 2018-05-22  Richard Biener  <rguenther@suse.de>
6893         PR tree-optimization/85834
6894         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
6895         non-constant and non-zero memset arguments.
6897 2018-05-22  Martin Liska  <mliska@suse.cz>
6899         PR ipa/85607
6900         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
6902 2018-05-22  Richard Biener  <rguenther@suse.de>
6904         PR tree-optimization/85863
6905         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
6906         comparisons when vectype is specified.
6907         (vectorizable_condition): Do not specify vectype for
6908         vect_is_simple_cond when SLP vectorizing.
6910 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
6912         PR target/85657
6913         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
6914         define __ibm128 as long double.
6915         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
6916         as a distinct type when IEEE 128-bit support is enabled.
6917         (init_float128_ieee): Fix up conversions between IFmode and IEEE
6918         128-bit types to use the correct functions.
6919         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
6920         convert between 128-bit floating point types that have different
6921         modes but the same representation, instead of using gen_lowpart to
6922         makean alias.
6923         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
6924         KFmode.
6925         (IFKF_reg): New attributes to give the register constraints for
6926         IFmode and KFmode.
6927         (extend<mode>tf2_internal): New insns to mark an explicit
6928         conversion between 128-bit floating point types that have a
6929         different mode but share the same representation.
6931 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
6933         PR tree-optimization/85814
6934         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
6935         a null return from get_strinfo when unsharing the next
6936         strinfo in the chain.
6938 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
6940         PR gcc/84923
6941         * varasm.c (weak_finish): Clean up weak_decls.
6943 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6945         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
6946         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
6947         UNSPEC_UADALP values.
6948         * config/aarch64/iterators.md (ABAL): New int iterator.
6949         (ABDL2): Likewise.
6950         (ADALP): Likewise.
6951         (sur): Add mappings for the above.
6952         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
6953         New define_insn.
6954         (aarch64_<sur>abal<mode>_4): Likewise.
6955         (aarch64_<sur>adalp<mode>_3): Likewise.
6956         (<sur>sadv16qi): New define_expand.
6958 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
6960         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
6961         (*movdf_internal): Ditto.
6962         (*rcpsf2_sse): Ditto.
6963         (*rsqrtsf2_sse): Ditto.
6964         (*sqrt<mode>2_sse): Ditto.
6966 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
6968         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
6969         eor3q<mode>4.
6970         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
6971         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
6972         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
6973         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
6974         vbcaxq_s64): New.
6975         * config/aarch64/arm_neon.h: Likewise.
6976         * config/aarch64/iterators.md (VQ_I): New.
6978 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
6980         * config.gcc: Add arc/t-multilib-linux to tmake_file for
6981         arc*-*-linux*.
6982         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
6983         MULTILIB_DIRNAMES
6985 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
6987         * config/nds32/constraints.md (S): New constraint.
6988         * config/nds32/nds32.md (call_internal): Use constraint S.
6989         (call_value_internal): Likewise.
6990         (sibcall_internal): Likewise.
6991         (sibcall_value_internal): Likewise.
6993 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
6994             Chung-Ju Wu  <jasonwucj@gmail.com>
6996         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
6997         into consideration.
6999 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
7000             Chung-Ju Wu  <jasonwucj@gmail.com>
7002         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
7003         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
7004         (nds32_rtx_costs_impl): Simplify.
7005         (nds32_address_cost_impl): Simplify.
7006         (nds32_init_rtx_costs): New function.
7007         (nds32_rtx_costs_speed_prefer): Likewise.
7008         (nds32_rtx_costs_size_prefer): Likewise.
7009         (nds32_address_cost_speed_prefer): Likewise.
7010         (nds32_address_cost_speed_fwprop): Likewise.
7011         (nds32_address_cost_size_prefer): Likewise.
7012         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
7013         * config/nds32/nds32.c (nds32_option_override): Use
7014         nds32_init_rtx_costs function.
7016 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
7018         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
7019         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
7020         (TARGET_PIPELINE_N8): Likewise.
7021         (TARGET_PIPELINE_N10): Likewise.
7022         (TARGET_PIPELINE_N13): Likewise.
7023         (TARGET_PIPELINE_GRAYWOLF): Likewise.
7025 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
7027         * config/nds32/nds32-fpu.md: Update copyright year.
7029 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7031         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
7033 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7035         * config/nds32/nds32.c
7036         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
7037         * config/nds32/nds32.opt (minline-asm-r15): New option.
7039 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7041         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
7042         MASK_HW_ABS.
7043         * config/nds32/nds32.md (abssi2): New pattern.
7045 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
7047         * config/i386/i386.md (rex64namesuffix): New mode attribute.
7048         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
7049         Merge insn pattern from sse_cvtsi2ss<round_name> and
7050         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
7051         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
7052         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
7053         using SWI48 mode iterator.
7054         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
7055         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
7056         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
7057         pattern from sse_cvttss2si<round_saeonly_name>
7058         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
7059         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
7060         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
7061         using SWI48 mode iterator.
7062         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
7063         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
7064         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
7065         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
7066         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
7067         using SWI48 mode iterator.
7068         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
7069         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
7070         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
7071         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
7072         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
7073         SWI48 mode iterator.
7074         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
7075         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
7076         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
7077         pattern from sse_cvttsd2si<round_saeonly_name>
7078         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
7080 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7082         * config/nds32/nds32-md-auxiliary.c
7083         (nds32_valid_smw_lwm_base_p): Refine.
7084         (nds32_output_smw_single_word): Refine.
7085         (nds32_output_smw_double_word): New.
7086         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
7088 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7090         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
7091         (nds32_output_stack_pop): Refine.
7092         (nds32_expand_unaligned_load): Refine.
7093         (nds32_expand_unaligned_store): Refine.
7095 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
7096             Chung-Ju Wu  <jasonwucj@gmail.com>
7098         * config/nds32/constants.md: Add TP_REGNUM constant.
7099         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
7100         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
7101         UNSPEC_ADD32.
7102         * config/nds32/nds32-doubleword.md: Consider flag_pic.
7103         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
7104         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
7105         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
7106         and PIC code generation.
7107         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
7108         code generation.
7109         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
7110         optimization.
7111         * config/nds32/nds32.md: Support TLS and PIC.
7112         * config/nds32/nds32.c: Support TLS and PIC.
7113         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
7114         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
7115         predicate.
7117 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7119         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
7120         mode with E_ prefix.
7122 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
7123             Chung-Ju Wu  <jasonwucj@gmail.com>
7125         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
7126         * config/nds32/nds32-md-auxiliary.c
7127         (symbolic_reference_mentioned_p): New.
7128         (nds32_legitimize_ict_address): New.
7129         (nds32_expand_ict_move): New.
7130         (nds32_indirect_call_referenced_p): New.
7131         (nds32_symbol_binds_local_p): Delete.
7132         (nds32_long_call_p): Modify.
7133         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
7134         * config/nds32/nds32-protos.h
7135         (symbolic_reference_mentioned_p): Declare.
7136         (nds32_legitimize_ict_address): Declare.
7137         (nds32_expand_ict_move): Declare.
7138         (nds32_indirect_call_referenced_p): Declare.
7139         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
7140         (nds32_relax_group): Use nds32_ict_const_p as condition.
7141         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
7142         (nds32_asm_file_start): Output ict_model directive in asm code.
7143         (nds32_legitimate_address_p): Consider indirect call.
7144         (nds32_print_operand): Consider indirect call.
7145         (nds32_print_operand_address): Consider indirect call.
7146         (nds32_insert_attributes): Handle "indirect_call" attribute.
7147         (TARGET_LEGITIMATE_ADDRESS_P): Define.
7148         (TARGET_LEGITIMATE_CONSTANT_P): Define.
7149         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
7150         (TARGET_DELEGITIMIZE_ADDRESS): Define.
7151         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
7152         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
7153         (TARGET_ICT_MODEL_SMALL): Define.
7154         (TARGET_ICT_MODEL_LARGE): Define.
7155         * config/nds32/nds32.md (movsi): Consider ict model.
7156         (call, call_value): Consider ict model.
7157         (sibcall, sibcall_value): Consider ict model.
7158         * config/nds32/nds32.opt (mict-model): New option.
7159         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
7160         model.
7162 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
7163             Monk Chiang  <sh.chiang04@gmail.com>
7164             Jim Wilson <jimw@sifive.com>
7166         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
7167         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
7168         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
7169         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
7170         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
7171         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
7172         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
7173         compute save_libcall_adjustment properly.
7174         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
7175         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
7176         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
7177         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
7178         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
7179         (ABI_SPEC): Handle mabi=ilp32e.
7180         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
7181         (RVE): Add RVE mask.
7182         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
7183         <-march>: Add rv32e as an example.
7185 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
7187         PR c++/82899
7188         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
7189         (intra_create_variable_infos): Handle C++ constructors.
7191 2018-05-18  Martin Liska  <mliska@suse.cz>
7193         * passes.def: Remove a redundant pass.
7195 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
7197         PR bootstrap/85838
7198         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
7200 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7202         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
7203         (ARMv4): Update.
7204         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
7205         (ARMv6m): Update.
7206         (armv2, armv2a, armv3, armv3m): Delete architectures.
7207         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
7208         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
7209         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
7210         Delete cpus.
7211         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
7212         (*mulsidi3adddi): Likewise.
7213         (mulsidi3): Likewise.
7214         (*mulsidi3_nov6): Likewise.
7215         (umulsidi3): Likewise.
7216         (umulsidi3_nov6): Likewise.
7217         (umaddsidi4): Likewise.
7218         (*umulsidi3adddi): Likewise.
7219         (smulsi3_highpart): Likewise.
7220         (*smulsi3_highpart_nov6): Likewise.
7221         (umulsi3_highpart): Likewise.
7222         (*umulsi3_highpart_nov6): Likewise.
7223         * config/arm/arm.h (arm_arch3m): Delete.
7224         * config/arm/arm.c (arm_arch3m): Delete.
7225         (arm_option_override_internal): Update armv3-related comment.
7226         (arm_configure_build_target): Delete use of isa_bit_mode32.
7227         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
7228         (arm_rtx_costs_internal): Delete check of arm_arch3m.
7229         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
7230         (mulsa3): Likewise.
7231         (mulusa3): Likewise.
7232         * config/arm/arm-protos.h (arm_arch3m): Delete.
7233         * config/arm/arm-tables.opt: Regenerate.
7234         * config/arm/arm-tune.md: Likewise.
7235         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
7236         deleted architectures.
7238 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7240         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
7241         (armv5t, armv5te): New features.
7242         (ARMv5, ARMv5e): Delete fgroups.
7243         (ARMv5t, ARMv5te): Adjust for above changes.
7244         (ARMv6m): Likewise.
7245         (armv5, armv5e): Delete arches.
7246         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
7247         arm_arch5.
7248         (*call_reg_arm): Likewise.
7249         (*call_value_reg_armv5): Likewise.
7250         (*call_value_reg_arm): Likewise.
7251         (*call_symbol): Likewise.
7252         (*call_value_symbol): Likewise.
7253         (*sibcall_insn): Likewise.
7254         (*sibcall_value_insn): Likewise.
7255         (clzsi2): Likewise.
7256         (prefetch): Likewise.
7257         (define_split and define_peephole2 dependent on arm_arch5):
7258         Likewise.
7259         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
7260         arm_arch5e.
7261         (TARGET_ARM_QBIT): Likewise.
7262         (TARGET_DSP_MULTIPLY): Likewise.
7263         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
7264         (arm_arch5, arm_arch5e): Delete.
7265         (arm_arch5t, arm_arch5te): Declare.
7266         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
7267         (arm_arch5t): Declare.
7268         (arm_option_reconfigure_globals): Update for the above.
7269         (arm_options_perform_arch_sanity_checks): Update comment, replace
7270         use of arm_arch5 with arm_arch5t.
7271         (use_return_insn): Likewise.
7272         (arm_emit_call_insn): Likewise.
7273         (output_return_instruction): Likewise.
7274         (arm_final_prescan_insn): Likewise.
7275         (arm_coproc_builtin_available): Likewise.
7276         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
7277         arm_arch5e with arm_arch5t and arm_arch5te.
7278         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
7279         (arm_arch5t, arm_arch5te): Declare.
7280         * config/arm/arm-tables.opt: Regenerate.
7281         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
7282         * config/arm/t-multilib: Likewise.
7283         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
7284         instead of arm_arch5.
7285         (*call_reg_thumb1): Likewise.
7286         (*call_value_reg_thumb1_v5): Likewise.
7287         (*call_value_reg_thumb1): Likewise.
7288         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
7289         unreachable path.
7290         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
7292 2018-05-18  Martin Liska  <mliska@suse.cz>
7294         PR gcov-profile/84846
7295         * doc/gcov.texi: Document -t option of gcov tool.
7297 2018-05-18  Martin Liska  <mliska@suse.cz>
7299         PR gcov-profile/84846
7300         * gcov.c (print_usage): Add new -t option.
7301         (process_args): Handle the option.
7302         (generate_results): Use stdout as output when requested by
7303         the option.
7305 2018-05-18  Martin Liska  <mliska@suse.cz>
7307         PR gcov-profile/84846
7308         * coverage.c (coverage_init): Write PWD to .gcno file.
7309         * doc/gcov.texi: Document how working directory is printed.
7310         * gcov-dump.c (dump_gcov_file): Print PWD.
7311         * gcov.c (output_intermediate_file): Likewise.
7312         (read_graph_file): Read PWD string.
7313         (output_lines): Print PWD.
7315 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7317         PR middle-end/85817
7318         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
7319         for retval and return false if all args to phi are zero.
7321 2018-05-18  Richard Biener  <rguenther@suse.de>
7323         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
7324         method.
7325         (evrp_dom_walker::before_dom_children): Call it.
7327 2018-05-18  Richard Biener  <rguenther@suse.de>
7329         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
7330         results when processing array refs with variable index.
7332 2018-05-18  Toon Moene  <toon@moene.org>
7334         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
7335         directly after that of -floop-interchange. Indicate that both
7336         options are enabled by default when specifying -O3.
7338 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7340         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
7341         iterator.  Delete separate integer-mode vec_set<mode> expander.
7342         (aarch64_simd_vec_setv2di): Delete.
7343         (vec_setv2di): Delete.
7344         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
7345         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
7346         the "w, r" alternative.
7348 2018-05-18  Martin Liska  <mliska@suse.cz>
7350         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
7351         * tree-pass.h (make_pass_lower_switch_O0): New function.
7352         * tree-switch-conversion.c (node_has_low_bound): Remove.
7353         (node_has_high_bound): Likewise.
7354         (node_is_bounded): Likewise.
7355         (class pass_lower_switch): Make it a template type and create
7356         two instances.
7357         (pass_lower_switch::execute): Add template argument.
7358         (make_pass_lower_switch): New function.
7359         (make_pass_lower_switch_O0): New function.
7360         (do_jump_if_equal): Remove.
7361         (emit_case_nodes): Simplify to just handle all 3 cases and leave
7362         all the hard work to tree optimization passes.
7364 2018-05-18  Martin Liska  <mliska@suse.cz>
7366         * dbgcnt.c (limit_low): Renamed from limit.
7367         (limit_high): New variable.
7368         (dbg_cnt_is_enabled): Check for upper limit.
7369         (dbg_cnt): Adjust dumping.
7370         (dbg_cnt_set_limit_by_index): Add new argument for high
7371         value.
7372         (dbg_cnt_set_limit_by_name): Likewise.
7373         (dbg_cnt_process_single_pair): Parse new format.
7374         (dbg_cnt_process_opt): Use strtok.
7375         (dbg_cnt_list_all_counters): Remove 'value' and add
7376         'limit_high'.
7377         * doc/invoke.texi: Document changes.
7379 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
7381         * doc/sourcebuild.texi (scalar_all_fma): Document.
7382         * tree.def (FMA_EXPR): Delete.
7383         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
7384         * internal-fn.c (ternary_direct): New macro.
7385         (expand_ternary_optab_fn): Likewise.
7386         (direct_ternary_optab_supported_p): Likewise.
7387         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
7388         * builtins.c (fold_builtin_fma): Delete.
7389         (fold_builtin_3): Don't call it.
7390         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
7391         * expr.c (expand_expr_real_2): Likewise.
7392         * fold-const.c (operand_equal_p): Likewise.
7393         (fold_ternary_loc): Likewise.
7394         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
7395         * gimple.c (DEFTREECODE): Likewise.
7396         * gimplify.c (gimplify_expr): Likewise.
7397         * optabs-tree.c (optab_for_tree_code): Likewise.
7398         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
7399         * tree-eh.c (operation_could_trap_p): Likewise.
7400         (stmt_could_throw_1_p): Likewise.
7401         * tree-inline.c (estimate_operator_cost): Likewise.
7402         * tree-pretty-print.c (dump_generic_node): Likewise.
7403         (op_code_prio): Likewise.
7404         * tree-ssa-loop-im.c (stmt_cost): Likewise.
7405         * tree-ssa-operands.c (get_expr_operands): Likewise.
7406         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
7407         * fold-const-call.h (fold_fma): Delete.
7408         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
7409         CFN_FNMA and CFN_FNMS.
7410         (fold_fma): Delete.
7411         * genmatch.c (combined_fn): New enum.
7412         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
7413         (commutative_op): New function.
7414         (commutate): Use it.  Handle more than 2 operands.
7415         (dt_operand::gen_gimple_expr): Use commutative_op.
7416         (parser::parse_expr): Allow :c to be used with non-binary
7417         operators if the commutative operand is known.
7418         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
7419         CFN_FMS, CFN_FNMA and CFN_FNMS.
7420         (backprop::process_assign_use): Remove FMA_EXPR handling.
7421         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
7422         (gen_hsa_fma): New function.
7423         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
7424         IFN_FNMA and IFN_FNMS.
7425         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
7426         * gimple-fold.h (follow_all_ssa_edges): Declare.
7427         * gimple-fold.c (follow_all_ssa_edges): New function.
7428         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
7429         gimple_build interface and use follow_all_ssa_edges to fold the result.
7430         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
7431         instead of checking for optabs directly.
7432         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
7433         rather than FMA_EXPRs.
7434         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
7435         call to IFN_FMA instead of an FMA_EXPR.
7437 2018-05-17  Jim Wilson  <jimw@sifive.com>
7439         * expr.c (do_tablejump): When converting index to Pmode, if we have a
7440         sign extended promoted subreg, and the range does not have the sign bit
7441         set, then do a sign extend.
7443         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
7444         test, check for sign extended subreg and/or constant operands, and
7445         do a sign extend in that case.
7447 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
7449         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
7450         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
7451         Add untyped.
7452         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
7453         Change logics_shift_reg to logics_shift_imm.
7454         (thunderx2t99_fp_loadpair_basic): Delete.
7455         (thunderx2t99_fp_storepair_basic): Delete.
7456         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
7457         (thunderx2t99_asimd_polynomial): Delete.
7458         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
7459         and neon_fp_mul_d_scalar_q.
7460         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
7461         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
7462         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
7463         (thunderx2t99_asimd_lut): Add missing tbl types.
7464         (thunderx2t99_asimd_ext): Delete.
7465         (thunderx2t99_asimd_load1_1_mult): Delete.
7466         (thunderx2t99_asimd_load1_2_mult): Delete.
7467         (thunderx2t99_asimd_load1_ldp): New.
7468         (thunderx2t99_asimd_load1): New.
7469         (thunderx2t99_asimd_load2): Add missing *load2* types.
7470         (thunderx2t99_asimd_load3): New.
7471         (thunderx2t99_asimd_load4): New.
7472         (thunderx2t99_asimd_store1_1_mult): Delete.
7473         (thunderx2t99_asimd_store1_2_mult): Delete.
7474         (thunderx2t99_asimd_store2_mult): Delete.
7475         (thunderx2t99_asimd_store2_onelane): Delete.
7476         (thunderx2t99_asimd_store_stp): New.
7477         (thunderx2t99_asimd_store1): New.
7478         (thunderx2t99_asimd_store2): New.
7479         (thunderx2t99_asimd_store3): New.
7480         (thunderx2t99_asimd_store4): New.
7482 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
7484         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
7485         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
7487 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
7488             Segher Boessenkool  <segher@kernel.crashing.org>
7490         PR target/85698
7491         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
7492         operand.
7494 2018-05-17  Richard Biener  <rguenther@suse.de>
7496         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
7497         for pruning loop and prune defs feeding only already visited PHIs.
7499 2018-05-17  Richard Biener  <rguenther@suse.de>
7501         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
7503 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
7504             Richard Biener  <rguenther@suse.de>
7506         PR tree-optimization/85793
7507         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
7508         for VMAT_ELEMENTWISE.
7510 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
7512         * internal-fn.h (lookup_internal_fn): Declare
7513         * internal-fn.c (lookup_internal_fn): New function.
7514         * gimple.c (gimple_build_call_from_tree): Handle calls to
7515         internal functions.
7516         * gimple-pretty-print.c (dump_gimple_call): Print "." before
7517         internal function names.
7518         * tree-pretty-print.c (dump_generic_node): Likewise.
7519         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
7521 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
7523         * gimple-fold.h (gimple_build): Make the function forms take
7524         combined_fn rather than built_in_function.
7525         (gimple_simplify): Likewise.
7526         * gimple-match-head.c (gimple_simplify): Likewise.
7527         * gimple-fold.c (gimple_build): Likewise.
7528         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
7529         rather than gimple_build_call_internal.
7530         (get_initial_defs_for_reduction): Likewise.
7531         (vect_create_epilog_for_reduction): Likewise.
7532         (vectorizable_live_operation): Likewise.
7534 2018-05-17  Martin Liska  <mliska@suse.cz>
7536         * gimple-ssa-sprintf.c (format_directive): Do not use
7537         space in between 'G_' and '('.
7539 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
7541         PR target/85323
7542         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
7543         even if the mask is not all ones.
7545         PR target/85323
7546         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
7547         vector.
7548         (ix86_gimple_fold_builtin): Likewise.
7550         PR target/85323
7551         * config/i386/i386.c: Include tree-vector-builder.h.
7552         (ix86_vector_shift_count): New function.
7553         (ix86_fold_builtin): Fold shift builtins by scalar count.
7554         (ix86_gimple_fold_builtin): Likewise.
7556         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
7557         _mm512_setzero): New intrinsics.
7559 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
7560             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7562         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
7563         code generation for cases where splatting a value is not useful.
7564         * simplify-rtx.c (simplify_ternary_operation): Simplify
7565         vec_merge across a vec_duplicate and a paradoxical subreg forming
7566         a vector mode to a vec_concat.
7568 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
7570         * config.gcc: Support "goldmont-plus".
7571         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7572         "goldmont-plus".
7573         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7574         PROCESSOR_GOLDMONT_PLUS.
7575         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
7576         (processor_target_table): Add "goldmont-plus".
7577         (PTA_GOLDMONT_PLUS): Define.
7578         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
7579         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
7580         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
7581         (fold_builtin_cpu): Add "goldmont-plus".
7582         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
7583         (ix86_option_override_internal): Add "goldmont-plus".
7584         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
7585         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
7586         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
7587         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
7589 2018-05-17  Richard Biener  <rguenther@suse.de>
7591         PR tree-optimization/85757
7592         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
7593         remove defs that only feed that PHI from further processing.
7595 2018-05-16  Jim Wilson  <jimw@sifive.com>
7597         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
7598         asterisk to name.
7599         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
7601 2018-05-16  Mark Wielaard  <mark@klomp.org>
7603         * dwarf2out.c (count_index_strings): New function.
7604         (output_indirect_strings): Call count_index_strings and generate
7605         header for dwarf_version >= 5.
7607 2018-05-16  Mark Wielaard  <mark@klomp.org>
7609         * dwarf2out.c (dwarf_FORM): New function.
7610         (set_indirect_string): Use dwarf_FORM.
7611         (reset_indirect_string): Likewise.
7612         (size_of_die): Likewise.
7613         (value_format): Likewise.
7614         (output_die): Likewise.
7615         (add_skeleton_AT_string): Likewise.
7616         (output_macinfo_op): Likewise.
7617         (index_string): Likewise.
7618         (output_index_string_offset): Likewise.
7619         (output_index_string): Likewise.
7620         (count_index_strings): Likewise.
7622 2018-05-16  Carl Love  <cel@us.ibm.com>
7624         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
7625         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
7627 2018-05-16  Martin Jambor  <mjambor@suse.cz>
7629         * ipa-prop.c (ipa_free_all_edge_args): Remove.
7630         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
7632 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
7634         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
7635         (fnma<mode>4): Likewise.
7636         (fms<mode>4): Likewise.
7637         (fnms<mode>4): Likewise.
7638         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
7639         (aarch64_fnma<mode>4): Likewise.
7640         (aarch64_fms<mode>4): Likewise.
7641         (aarch64_fnms<mode>4): Likewise.
7642         (aarch64_fnmadd<mode>4): Likewise.
7644 2018-05-16  Jason Merrill  <jason@redhat.com>
7646         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
7648 2018-05-16  Richard Biener  <rguenther@suse.de>
7650         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
7651         (dump_stmt_cost): Declare.
7652         (add_stmt_cost): Dump cost we add.
7653         (add_stmt_costs): New function.
7654         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
7655         No longer exported.
7656         (vect_analyze_stmt): Adjust prototype.
7657         (vectorizable_condition): Likewise.
7658         (vectorizable_live_operation): Likewise.
7659         (vectorizable_reduction): Likewise.
7660         (vectorizable_induction): Likewise.
7661         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
7662         cost vector to pass to vectorizable_ and record afterwards.
7663         (vect_model_reduction_cost): Take cost vector argument and adjust.
7664         (vect_model_induction_cost): Likewise.
7665         (vectorizable_reduction): Likewise.
7666         (vectorizable_induction): Likewise.
7667         (vectorizable_live_operation): Likewise.
7668         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
7669         SLP_TREE_NUMBER_OF_VEC_STMTS.
7670         (vect_analyze_slp_cost_1): Remove.
7671         (vect_analyze_slp_cost): Likewise.
7672         (vect_slp_analyze_node_operations): Take visited args and
7673         a target cost vector.  Avoid processing already visited stmt sets.
7674         (vect_slp_analyze_operations): Use a local cost vector to gather
7675         costs and register those of non-discarded instances.
7676         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
7677         (vect_schedule_slp_instance): Remove copying of
7678         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
7679         zero.
7680         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
7681         adding cost.  Record cost entry location.
7682         (vect_prologue_cost_for_slp_op): Function to compute cost of
7683         a constant or invariant generated for SLP vect in the prologue,
7684         split out from vect_analyze_slp_cost_1.
7685         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
7686         (vect_model_promotion_demotion_cost): Likewise.
7687         (vect_model_store_cost): Likewise, make static.
7688         (vect_model_load_cost): Likewise.
7689         (vectorizable_bswap): Add cost vector arg and adjust.
7690         (vectorizable_call): Likewise.
7691         (vectorizable_simd_clone_call): Likewise.
7692         (vectorizable_conversion): Likewise.
7693         (vectorizable_assignment): Likewise.
7694         (vectorizable_shift): Likewise.
7695         (vectorizable_operation): Likewise.
7696         (vectorizable_store): Likewise.
7697         (vectorizable_load): Likewise.
7698         (vectorizable_condition): Likewise.
7699         (vectorizable_comparison): Likewise.
7700         (can_vectorize_live_stmts): Likewise.
7701         (vect_analyze_stmt): Likewise.
7702         (vect_transform_stmt): Adjust calls to vectorizable_*.
7703         * tree-vectorizer.c: Include gimple-pretty-print.h.
7704         (dump_stmt_cost): New function.
7706 2018-05-16  Richard Biener  <rguenther@suse.de>
7708         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
7709         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
7710         * tree-ssa-dse.c: Include tree-ssa-loop.h.
7711         (check_name): New callback.
7712         (dse_classify_store): Track cycles via a visited bitmap of PHI
7713         defs and simplify handling of in-loop and across loop dead stores
7714         and properly fail for loop-variant refs.  Handle byte-tracking with
7715         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
7716         limiting the walk.
7718 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
7720         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
7721         (vect_get_mask_type_for_stmt): Likewise.
7722         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
7723         split out from...
7724         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
7725         to determine the statement's vector type and the vector type that
7726         should be used for calculating nunits.  Deal with cases in which
7727         the type has to be deferred.
7728         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
7729         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
7730         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
7731         (vect_determine_vf_for_stmt): New functions, split out from...
7732         (vect_determine_vectorization_factor): ...here.
7733         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
7734         (vect_get_mask_type_for_stmt): New functions, split out from
7735         vect_determine_vectorization_factor.
7737 2018-05-16  Richard Biener  <rguenther@suse.de>
7739         * tree-cfg.c (verify_gimple_assign_ternary): Properly
7740         verify the [VEC_]COND_EXPR embedded comparison.
7742 2018-05-15  Martin Sebor  <msebor@redhat.com>
7744         PR tree-optimization/85753
7745         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
7746         RECORD_TYPE in addition to ARRAY_TYPE.
7748 2018-05-15  Martin Sebor  <msebor@redhat.com>
7750         PR middle-end/85643
7751         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
7753 2018-05-15  Richard Biener  <rguenther@suse.de>
7755         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
7756         add by_clobber_p one.  Change algorithm to collect all defs
7757         representing uses we need to walk and try reducing them to
7758         a single one before failing.
7759         (dse_dom_walker::dse_optimize_stmt): Adjust.
7761 2018-05-13  Mark Wielaard  <mark@klomp.org>
7763         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
7764         (size_of_loc_descr): Likewise.
7765         (output_loc_operands): Likewise.
7766         (output_loc_operands_raw): Likewise.
7767         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
7768         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
7769         (hash_loc_operands): Likewise.
7770         (compare_loc_operands): Likewise.
7772 2018-05-14  Mark Wielaard  <mark@klomp.org>
7774         * dwarf2out.c (count_index_addrs): New function.
7775         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
7777 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7779         PR tree-optimization/83648
7780         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
7781         return value as malloc candidate.
7783 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7785         PR ipa/85734
7786         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
7787         param as true in call to suggest_attribute.
7789 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
7791         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
7792         -mreadonly-in-sdata.
7794 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7796         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
7797         New pattern.
7798         (aarch64_crypto_aesd_fused): Likewise.
7800 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
7802         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
7803         (movsi_aarch64): Likewise.
7804         (load_pairsi): Likewise.
7805         (load_pairdi): Likewise.
7806         (store_pairsi): Likewise.
7807         (store_pairdi): Likewise.
7808         (load_pairsf): Likewise.
7809         (load_pairdf): Likewise.
7810         (store_pairsf): Likewise.
7811         (store_pairdf): Likewise.
7812         (zero_extend): Likewise.
7813         (trunc): Swap alternatives.
7814         (fcvt_target): Add '?' to prefer w over r.
7816 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
7818         PR target/85756
7819         * config/i386/i386.md: Disallow non-commutative arithmetics in
7820         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
7821         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
7822         in the peephole2 before it.
7824 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
7826         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
7827         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
7828         (ix86_handle_option): Handle -mcldemote.
7829         * config.gcc: New header.
7830         * config/i386/cldemoteintrin.h: New file.
7831         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
7832         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7833         -mcldemote.
7834         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7835         OPTION_MASK_ISA_CLDEMOTE.
7836         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
7837         (ix86_valid_target_attribute_inner_p): Ditto.
7838         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
7839         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
7840         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
7841         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
7842         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
7843         (cldemote): New.
7844         * config/i386/i386.opt: Add -mcldemote.
7845         * config/i386/x86intrin.h: New header.
7846         * doc/invoke.texi: Add -mcldemote.
7848 2018-05-14  Richard Biener  <rguenther@suse.de>
7850         * doc/match-and-simplify.texi: Adjust :s documentation.
7852 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
7854         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
7855         intended memcpy size.
7856         (REORDER_45): Likewise.
7858 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
7860         * sort.cc: New file.
7861         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
7862         * vec.c (qsort_chk): Use gcc_qsort.
7863         * Makefile.in (OBJS-libcommon): Add sort.o.
7864         (build/sort.o): New target.  Use it...
7865         (BUILD_RTL): ... here, and...
7866         (build/gencfn-macros): ... here, and...
7867         (build/genmatch): ... here.
7869 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
7870             Chung-Ju Wu  <jasonwucj@gmail.com>
7872         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
7873         * config/nds32/nds32-graywolf.md: New file.
7874         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
7875         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
7876         pipeline.
7877         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
7878         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
7879         * config/nds32/nds32.md (pipeline_model): Add graywolf.
7880         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
7881         * config/nds32/pipelines.md: Include n15 settings.
7883 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
7884             Chung-Ju Wu  <jasonwucj@gmail.com>
7886         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
7887         * config/nds32/nds32-n13.md: New file.
7888         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
7889         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
7890         pipeline.
7891         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
7892         * config/nds32/nds32.md (pipeline_model): Add n13.
7893         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
7894         * config/nds32/pipelines.md: Include n13 settings.
7896 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
7897             Chung-Ju Wu  <jasonwucj@gmail.com>
7899         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
7900         * config/nds32/nds32-n10.md: New file.
7901         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
7902         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
7903         pipeline.
7904         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
7905         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
7906         * config/nds32/nds32.md (pipeline_model): Add n10.
7907         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
7908         * config/nds32/pipelines.md: Include n10 settings.
7910 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
7911             Kito Cheng  <kito.cheng@gmail.com>
7912             Chung-Ju Wu  <jasonwucj@gmail.com>
7914         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
7915         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7916         Add enum values for DSP extension instructions.
7917         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
7918         New constraints.
7919         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
7920         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
7921         New code iterators.
7922         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
7923         * config/nds32/nds32-dspext.md: New file for DSP implementation.
7924         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
7925         * config/nds32/nds32-intrinsic.md: Likewise.
7926         * config/nds32/nds32_intrinsic.h: Likewise.
7927         * config/nds32/nds32-md-auxiliary.c: Likewise.
7928         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
7929         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
7930         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
7931         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
7932         * config/nds32/nds32-protos.h: New declarations for DSP extension.
7933         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
7934         TYPE_DMAC in switch statement.
7935         * config/nds32/nds32.c: New checking and implementation for DSP
7936         extension instructions.
7937         * config/nds32/nds32.h: Likewise.
7938         * config/nds32/nds32.md: Likewise.
7939         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
7940         * config/nds32/predicates.md: Implement new predicates for DSP
7941         extension.
7943 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
7945         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
7946         Reformat alternatives and attributes so it is easier to identify
7947         which constraints/attributes go with which instruction.
7948         (mov<mode>_hardfloat32, FMOVE64): Likewise.
7949         (mov<mode>_softfloat32, FMOVE64): Likewise.
7950         (mov<mode>_hardfloat64, FMOVE64): Likewise.
7951         (mov<mode>_softfloat64, FMOVE64): Likewise.
7953 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7955         * doc/extend.texi (PowerPC Built-in Functions): Rename this
7956         subsection.
7957         (Basic PowerPC Built-in Functions): The new name of the
7958         subsection previously known as "PowerPC Built-in Functions".
7959         (Basic PowerPC Built-in Functions Available on all Configurations):
7960         New subsubsection.
7961         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
7962         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
7963         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
7964         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
7966 2018-05-11  Martin Jambor  <mjambor@suse.cz>
7968         PR ipa/85655
7969         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
7970         single const.
7972 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
7974         PR target/85733
7975         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
7977 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
7979         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
7980         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
7981         (ix86_handle_option): Handle -mwaitpkg.
7982         * config.gcc: New header.
7983         * config/i386/cpuid.h (bit_WAITPKG): New bit.
7984         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
7985         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
7986         function type.
7987         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7988         OPTION_MASK_ISA_WAITPKG.
7989         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
7990         (ix86_option_override_internal): Add PTA_WAITPKG.
7991         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
7992         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
7993         IX86_BUILTIN_TPAUSE.
7994         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
7995         __builtin_ia32_umwait and __builtin_ia32_tpause.
7996         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
7997         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
7998         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
7999         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
8000         UNSPECV_TPAUSE): New.
8001         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
8002         * config/i386/i386.opt: Add -mwaitpkg.
8003         * config/i386/waitpkgintrin.h: New file.
8004         * config/i386/x86intrin.h: New header.
8005         * doc/invoke.texi: Add -mwaitpkg.
8007 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
8009         PR target/85606
8010         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
8011         equivalent.
8012         (cortex-m0): Use armv6s-m isa.
8013         (cortex-m0plus): Likewise.
8014         (cortex-m1): Likewise.
8015         (cortex-m0.small-multiply): Likewise.
8016         (cortex-m0plus.small-multiply): Likewise.
8017         (cortex-m1.small-multiply): Likewise.
8019 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
8020             Jakub Jelinek  <jakub@redhat.com>
8022         PR tree-optimization/85692
8023         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
8024         source permute as well.
8026 2018-05-11  Martin Liska  <mliska@suse.cz>
8028         PR sanitizer/85556
8029         * doc/extend.texi: Document LLVM style format for no_sanitize
8030         attribute.
8032 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
8034         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
8035         mode_supports_vsx_dform_quad to mode_supports_dq_form.
8036         (mode_supports_vsx_dform_quad): Likewise.
8037         (mode_supports_vmx_dform): Move these functions to be next to the
8038         other mode_supports functions.
8039         (mode_supports_dq_form): Likewise.
8040         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
8041         mode_supports_dq_form.
8042         (reg_offset_addressing_ok_p): Likewise.
8043         (offsettable_ok_by_alignment): Likewise.
8044         (rs6000_legitimate_offset_address_p): Likewise.
8045         (legitimate_lo_sum_address_p): Likewise.
8046         (rs6000_legitimize_address): Likewise.
8047         (rs6000_legitimize_reload_address): Likewise.
8048         (rs6000_secondary_reload_inner): Likewise.
8049         (rs6000_preferred_reload_class): Likewise.
8050         (rs6000_output_move_128bit): Likewise.
8052 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
8054         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
8055         Generate SImode target register for null target.
8056         <case IX86_BUILTIN_XGETBV>: Ditto.
8057         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
8058         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
8060 2018-05-10  Carl Love  <cel@us.ibm.com>
8062         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8063         dcbtt and dcbtstt if operands[2] is 0.
8065 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
8067         PR target/85693
8068         * config/i386/sse.md (usadv64qi): New expander.
8070 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
8072         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
8073         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
8074         -maltivec=be support.
8075         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
8076         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
8077         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
8078         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
8079         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
8080         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
8081         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
8082         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
8083         altivec_vsumsws): Adjust.
8084         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
8085         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
8086         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
8087         support.
8088         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
8089         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
8090         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
8091         (altivec_lve<VI_char>x): Delete expand.
8092         (*altivec_lve<VI_char>x_internal): Rename to...
8093         (altivec_lve<VI_char>x): ... this.
8094         (altivec_lvxl_<mode>): Delete expand.
8095         (*altivec_lvxl_<mode>_internal): Rename to ...
8096         (altivec_lvxl_<mode>): ... this.
8097         (altivec_stvxl_<mode>): Delete expand.
8098         (*altivec_stvxl_<mode>_internal): Rename to ...
8099         (altivec_stvxl_<mode>): ... this.
8100         (altivec_stve<VI_char>x): Delete expand.
8101         (*altivec_stve<VI_char>x_internal): Rename to ...
8102         (altivec_stve<VI_char>x): ... this.
8103         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
8104         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
8105         reduc_plus_scal_<mode>): Adjust.
8106         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
8107         comment.
8108         (rs6000_cpu_cpp_builtins): Adjust.
8109         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
8110         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
8111         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
8112         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
8113         -maltivec=be support.
8114         (rs6000_split_vec_extract_var): Adjust.
8115         (rs6000_split_v4si_init): Adjust.
8116         (swap_selector_for_mode): Delete.
8117         (altivec_expand_lvx_be, altivec_expand_stvx_be,
8118         altivec_expand_stvex_be): Delete.
8119         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
8120         -maltivec=be support.
8121         (rs6000_gimple_fold_builtin): Ditto.
8122         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
8123         Adjust.
8124         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
8125         (TARGET_DIRECT_MOVE_64BIT): Adjust.
8126         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
8127         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
8128         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
8129         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
8130         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
8131         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
8132         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
8133         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
8134         anonymous split): Adjust.
8135         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
8136         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
8138 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
8140         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
8141         when --with-gxx-include-dir is also specified.
8142         * configure: Regenerate.
8144 2018-05-09  Jim Wilson  <jimw@sifive.com>
8146         PR target/84797
8147         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
8148         * config/riscv/t-withmultilib: New.
8149         * config/riscv/withmultilib.h: New.
8150         * doc/install.texi: Document RISC-V --with-multilib-list support.
8152 2018-05-09  Richard Biener  <rguenther@suse.de>
8154         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
8155         vector.
8156         (vect_bb_vectorization_profitable_p): Adjust.  Compute
8157         actual scalar cost using the cost vector and the add_stmt_cost
8158         machinery.
8160 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
8162         PR rtl-optimization/85645
8163         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
8164         in the REG_CFA_REGISTER note for LR, don't leave it empty.
8166 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
8168         PR rtl-optimization/85645
8169         * shrink-wrap.c (spread_components): Return a boolean saying if
8170         anything was changed.
8171         (try_shrink_wrapping_separate): Iterate spread_components until
8172         nothing changes anymore.
8174 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
8176         PR rtl-optimization/85645
8177         * regrename.c (build_def_use): Also kill the chains that include the
8178         destination of a REG_CFA_REGISTER note.
8180 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
8182         PR rtl-optimization/85645
8183         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
8184         insn that has a REG_CFA_REGISTER note.
8186 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
8188         * cfgexpand.c (expand_clobber): New function.
8189         (expand_gimple_stmt_1): Use it.
8190         * tree-vect-stmts.c (vect_clobber_variable): New function,
8191         split out from...
8192         (vectorizable_simd_clone_call): ...here.
8193         (vectorizable_store): Emit a clobber either side of an
8194         IFN_STORE_LANES sequence.
8195         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
8197 2018-05-09  Tom de Vries  <tom@codesourcery.com>
8199         PR target/85626
8200         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
8201         (define_insn "trap_if_false"): Add exit after trap.
8203 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
8205         PR rtl-optimization/85638
8206         * bb-reorder.c: Include common/common-target.h.
8207         (create_forwarder_block): New function extracted from...
8208         (fix_up_crossing_landing_pad): ...here.  Rename into...
8209         (dw2_fix_up_crossing_landing_pad): ...this.
8210         (sjlj_fix_up_crossing_landing_pad): New function.
8211         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
8212         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
8213         from both partitions and exit the loop after one iteration.
8215 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8217         Revert:
8218         * doc/extend.texi (PowerPC Built-in Functions): Rename this
8219         subsection.
8220         (Basic PowerPC Built-in Functions): The new name of the
8221         subsection previously known as "PowerPC Built-in Functions".
8222         (Basic PowerPC Built-in Functions Available on all Configurations):
8223         New subsubsection.
8224         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8225         subsubsection.
8226         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8227         subsubsection.
8228         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8229         subsubsection.
8230         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8231         subsubsection.
8233 2018-05-08  Jim Wilson  <jimw@sifive.com>
8235         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
8236         (LD_EMUL_SUFFIX): New.
8237         (LINK_SPEC): Use it.
8239 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8241         * doc/extend.texi (PowerPC Built-in Functions): Rename this
8242         subsection.
8243         (Basic PowerPC Built-in Functions): The new name of the
8244         subsection previously known as "PowerPC Built-in Functions".
8245         (Basic PowerPC Built-in Functions Available on all Configurations):
8246         New subsubsection.
8247         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8248         subsubsection.
8249         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8250         subsubsection.
8251         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8252         subsubsection.
8253         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8254         subsubsection.
8256 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
8258         PR target/85683
8259         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
8260         after cmpelim optimization.
8262 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
8264         * config.gcc: Support "goldmont".
8265         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
8266         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8267         PROCESSOR_GOLDMONT.
8268         * config/i386/i386.c (m_GOLDMONT): Define.
8269         (processor_target_table): Add "goldmont".
8270         (PTA_GOLDMONT): Define.
8271         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
8272         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
8273         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
8274         (fold_builtin_cpu): Add "goldmont".
8275         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
8276         (ix86_option_override_internal): Add "goldmont".
8277         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
8278         (processor_type): Add PROCESSOR_GOLDMONT.
8279         * config/i386/i386.md: Add CPU "glm".
8280         * config/i386/glm.md: New file.
8281         * config/i386/x86-tune.def: Add m_GOLDMONT.
8282         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
8284 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
8286         PR target/85572
8287         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
8288         E_V4DImode.
8289         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
8290         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
8291         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
8293         PR target/85317
8294         * config/i386/i386.c (ix86_fold_builtin): Handle
8295         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
8297         PR target/85480
8298         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
8299         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
8301 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
8303         PR target/85658
8304         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
8305         (check_arch): Likewise.
8306         (check_fpu): Return the result rather than printing it.
8307         (end arch): Fix operator precedence.
8308         (end cpu): Likewise.
8309         (END): Print the result from check_fpu.
8311 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
8312             Alan Hayward  <alan.hayward@arm.com>
8313             David Sherwood  <david.sherwood@arm.com>
8315         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
8316         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
8317         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
8318         (*fcmuo<mode>_and): New patterns.
8320 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
8322         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
8323         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
8324         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
8325         (cmp_op, sve_imm_con): New code attributes.
8326         (SVE_COND_INT_CMP, imm_con): Delete.
8327         (cmp_op): Remove above unspecs from int attribute.
8328         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
8329         to...
8330         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
8331         comparison-specific unspecs.
8332         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
8333         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
8334         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
8335         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
8336         (*vec_fcm<cmp_op><mode>): Rename to...
8337         (*fcm<cmp_op><mode>): ...this and adjust likewise.
8338         (*vec_fcmuo<mode>): Rename to...
8339         (*fcmuo<mode>): ...this and adjust likewise.
8340         (*pred_fcm<cmp_op><mode>): New pattern.
8341         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
8342         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
8343         functions.
8344         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
8345         and UNORDERED.
8346         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
8347         (aarch64_emit_sve_predicated_cond): New function.
8348         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
8349         (aarch64_emit_unspec_cond_or): Replace with...
8350         (aarch64_emit_sve_or_conds): ...this new function.  Use
8351         aarch64_emit_sve_ptrue_op for the individual comparisons and
8352         aarch64_emit_binop to OR them together.
8353         (aarch64_emit_inverted_unspec_cond): Replace with...
8354         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
8355         aarch64_emit_sve_ptrue_op for the comparison and
8356         aarch64_emit_unop to invert the result.
8357         (aarch64_expand_sve_vec_cmp_float): Update after the above
8358         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
8360 2018-05-07  Nathan Sidwell  <nathan@acm.org>
8362         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
8363         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
8364         (Backwards Compatibility): Likewise.
8366 2018-05-07  Luis Machado  <luis.machado@linaro.org>
8368         PR bootstrap/85681
8369         Revert:
8370         2018-05-07  Luis Machado  <luis.machado@linaro.org>
8372         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8373         <prefetch_dynamic_strides>: New const bool field.
8374         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8375         prefetch_dynamic_strides.
8376         (exynosm1_prefetch_tune): Likewise.
8377         (thunderxt88_prefetch_tune): Likewise.
8378         (thunderx_prefetch_tune): Likewise.
8379         (thunderx2t99_prefetch_tune): Likewise.
8380         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
8381         to false.
8382         (aarch64_override_options_internal): Update to set
8383         PARAM_PREFETCH_DYNAMIC_STRIDES.
8384         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8385         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8386         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8387         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8388         prefetch-dynamic-strides setting.
8390         2018-05-07  Luis Machado  <luis.machado@linaro.org>
8392         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8393         <minimum_stride>: New const int field.
8394         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8395         minimum_stride field.
8396         (exynosm1_prefetch_tune): Likewise.
8397         (thunderxt88_prefetch_tune): Likewise.
8398         (thunderx_prefetch_tune): Likewise.
8399         (thunderx2t99_prefetch_tune): Likewise.
8400         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
8401         (aarch64_override_options_internal): Update to set
8402         PARAM_PREFETCH_MINIMUM_STRIDE.
8403         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8404         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8405         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8406         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8407         stride is constant and is below the minimum stride threshold.
8409 2018-05-07  Luis Machado  <luis.machado@linaro.org>
8411         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
8412         to 512.
8414 2018-05-07  Luis Machado  <luis.machado@linaro.org>
8416         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8417         <prefetch_dynamic_strides>: New const bool field.
8418         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8419         prefetch_dynamic_strides.
8420         (exynosm1_prefetch_tune): Likewise.
8421         (thunderxt88_prefetch_tune): Likewise.
8422         (thunderx_prefetch_tune): Likewise.
8423         (thunderx2t99_prefetch_tune): Likewise.
8424         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
8425         to false.
8426         (aarch64_override_options_internal): Update to set
8427         PARAM_PREFETCH_DYNAMIC_STRIDES.
8428         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8429         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8430         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8431         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8432         prefetch-dynamic-strides setting.
8434 2018-05-07  Luis Machado  <luis.machado@linaro.org>
8436         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8437         <minimum_stride>: New const int field.
8438         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8439         minimum_stride field.
8440         (exynosm1_prefetch_tune): Likewise.
8441         (thunderxt88_prefetch_tune): Likewise.
8442         (thunderx_prefetch_tune): Likewise.
8443         (thunderx2t99_prefetch_tune): Likewise.
8444         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
8445         (aarch64_override_options_internal): Update to set
8446         PARAM_PREFETCH_MINIMUM_STRIDE.
8447         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8448         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8449         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8450         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8451         stride is constant and is below the minimum stride threshold.
8453 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
8455         PR c++/85659
8456         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
8457         the type is addressable.  Don't force op into register if it has
8458         BLKmode.
8460 2018-05-05  Roland McGrath  <mcgrathr@google.com>
8462         PR other/77609
8463         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
8464         any section for which we don't know a specific type it should have,
8465         regardless of name.  Previously this was done only for the exact
8466         names ".init_array", ".fini_array", and ".preinit_array".
8467         (default_elf_asm_named_section): Add comment about
8468         relationship with default_section_type_flags and SECTION_NOTYPE.
8469         (get_section): Don't consider it a type conflict if one side has
8470         SECTION_NOTYPE and the other doesn't, as long as neither has the
8471         SECTION_BSS et al used in the default_section_type_flags logic.
8473 2018-05-05  Tom de Vries  <tom@codesourcery.com>
8475         PR target/85653
8476         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
8477         (workaround_barsyncs): New function.
8478         (nvptx_reorg): Use workaround_barsyncs.
8479         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
8480         (define_expand "nvptx_membar_cta"): New define_expand.
8481         (define_insn "*nvptx_membar_cta"): New insn.
8483 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
8485         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
8486         To improve optimization opportunities.
8487         * builtin-types.def: The new needed builtin types for the above.
8489 2018-05-04  Richard Biener  <rguenther@suse.de>
8491         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
8492         * gimple-ssa-store-merging.c
8493         (imm_store_chain_info::output_merged_store): Remove redundant create,
8494         release split_store vector contents on failure.
8495         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
8496         scalar stmt vector on cache hit.
8498 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
8500         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
8501         Xilinx FP support.
8502         * config.gcc (powerpc-xilinx-eabi*): Remove.
8503         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
8504         support.
8505         (fusion_addis_mem_combo_load): Ditto.
8506         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
8507         FP support.
8508         (rs6000_cpu_cpp_builtins): Ditto.
8509         * config/rs6000/rs6000-linux.c
8510         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
8511         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
8512         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
8513         support.
8514         (rs6000_setup_reg_addr_masks): Ditto.
8515         (rs6000_init_hard_regno_mode_ok): Ditto.
8516         (rs6000_option_override_internal): Ditto.
8517         (legitimate_lo_sum_address_p): Ditto.
8518         (rs6000_legitimize_address): Ditto.
8519         (rs6000_legitimize_reload_address): Ditto.
8520         (rs6000_legitimate_address_p): Ditto.
8521         (abi_v4_pass_in_fpr): Ditto.
8522         (setup_incoming_varargs): Ditto.
8523         (rs6000_gimplify_va_arg): Ditto.
8524         (rs6000_split_multireg_move): Ditto.
8525         (rs6000_savres_strategy): Ditto.
8526         (rs6000_emit_prologue_components): Ditto.
8527         (rs6000_emit_epilogue_components): Ditto.
8528         (rs6000_emit_prologue): Ditto.
8529         (rs6000_emit_epilogue): Ditto.
8530         (rs6000_elf_file_end): Ditto.
8531         (rs6000_function_value): Ditto.
8532         (rs6000_libcall_value): Ditto.
8533         * config/rs6000/rs6000.h: Ditto.
8534         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
8535         (TARGET_MINMAX): ... this.  New.
8536         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
8537         * config/rs6000/rs6000.md: Remove Xilinx FP support.
8538         (*movsi_internal1_single): Delete.
8539         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
8540         mfpu=, mxilinx-fpu): Delete.
8541         * config/rs6000/singlefp.h: Delete.
8542         * config/rs6000/sysv4.h: Remove Xilinx FP support.
8543         * config/rs6000/t-rs6000: Ditto.
8544         * config/rs6000/t-xilinx: Delete.
8545         * config/rs6000/titan.md: Adjust for fp_type removal.
8546         * config/rs6000/vsx.md: Remove Xilinx FP support.
8547         (VStype_simple): Delete.
8548         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
8549         * config/rs6000/xfpu.h: Delete.
8550         * config/rs6000/xfpu.md: Delete.
8551         * config/rs6000/xilinx.h: Delete.
8552         * config/rs6000/xilinx.opt: Delete.
8553         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
8554         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
8556 2018-05-04  Tom de Vries  <tom@codesourcery.com>
8558         PR libgomp/85639
8559         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
8560         if ignore == 0.
8562 2018-05-04  Richard Biener  <rguenther@suse.de>
8564         PR middle-end/85627
8565         * tree-complex.c (update_complex_assignment): We are always in SSA form.
8566         (expand_complex_div_wide): Likewise.
8567         (expand_complex_operations_1): Likewise.
8568         (expand_complex_libcall): Preserve EH info of the original stmt.
8569         (tree_lower_complex): Handle removed blocks.
8570         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
8571         on complex multiplication and division libcall builtins.
8573 2018-05-04  Richard Biener  <rguenther@suse.de>
8575         PR middle-end/85574
8576         * fold-const.c (negate_expr_p): Restrict negation of operand
8577         zero of a division to when we know that can happen without
8578         overflow.
8579         (fold_negate_expr_1): Likewise.
8581 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
8583         PR libstdc++/85466
8584         * real.h (real_nextafter): Declare.
8585         * real.c (real_nextafter): New function.
8586         * fold-const-call.c (fold_const_nextafter): New function.
8587         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
8588         CASE_CFN_NEXTTOWARD.
8589         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
8590         even when arg1_mode is different from arg0_mode.
8592 2018-05-03  Nathan Sidwell  <nathan@acm.org>
8594         * doc/extend.texi (Deprecated Features): Remove
8595         -ffriend-injection.
8596         (Backwards Compatibility): Likewise.
8597         * doc/invoke.texi (C++ Language Options): Likewise.
8598         (C++ Dialect Options): Likewise.
8600 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
8602         PR target/85530
8603         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
8604         _mm512_mask_mullox_epi64): New intrinsics.
8606 2018-05-03  Tom de Vries  <tom@codesourcery.com>
8608         PR testsuite/85106
8609         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8610         dump files): Add offload-tree.
8612 2018-05-03  Richard Biener  <rguenther@suse.de>
8614         PR tree-optimization/85615
8615         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
8616         to loops not nested in BBs loop father to avoid creating multi-entry
8617         loops.
8619 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8621         PR tree-optimization/70291
8622         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
8623         arguments.  Change return type to tree.  Emit libcall as a new
8624         statement rather than replacing existing one when inplace_p is true.
8625         (expand_complex_multiplication_components): New function.
8626         (expand_complex_multiplication): Expand floating-point complex
8627         multiplication using the above.
8628         (expand_complex_division): Rename inner_type parameter to type.
8629         Update expand_complex_libcall call-site.
8630         (expand_complex_operations_1): Update expand_complex_multiplication
8631         and expand_complex_division call-sites.
8633 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
8635         PR target/85582
8636         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
8637         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
8638         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
8639         the highest significant bit of the shift count mask is clear.  In
8640         check whether and[sq]i3 is needed verify that all significant bits
8641         of the shift count other than the highest are set.
8643 2018-05-02  Tom de Vries  <tom@codesourcery.com>
8645         PR libgomp/82428
8646         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
8647         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
8648         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
8649         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
8650         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
8651         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
8652         __builtin_goacc_parlevel_size.
8654 2018-05-02  Richard Biener  <rguenther@suse.de>
8656         PR tree-optimization/85597
8657         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
8658         do not use split vect_get_vec_defs call but call vect_get_slp_defs
8659         directly.
8661 2018-05-02  Tom de Vries  <tom@codesourcery.com>
8663         PR testsuite/85106
8664         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8665         dump files): Add ltrans-tree.
8667 2018-05-02  Tom de Vries  <tom@codesourcery.com>
8669         PR testsuite/85106
8670         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8671         dump files): Add wpa-ipa.
8673 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
8675         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
8676         powerpc*-*-linux*paired* target.
8677         * config/rs6000/750cl.h: Delete.
8678         * config/rs6000/paired.h: Delete.
8679         * config/rs6000/paired.md: Delete.
8680         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
8681         float support.
8682         * config/rs6000/rs6000-builtin.def: Remove paired float support.
8683         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
8684         comment.  Remove paired float support.
8685         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
8686         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
8687         VECTOR_PAIRED.
8688         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
8689         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
8690         declarations.
8691         * config/rs6000/rs6000.c: Remove paired float support.
8692         (paired_expand_vector_init, paired_expand_vector_move,
8693         paired_emit_vector_compare, paired_emit_vector_cond_expr,
8694         (paired_expand_lv_builtin, paired_expand_stv_builtin,
8695         paired_expand_builtin, paired_expand_predicate_builtin,
8696         paired_init_builtins): Delete.
8697         * config/rs6000/rs6000.h: Remove paired float support.
8698         * config/rs6000/rs6000.md: Remove paired float support.
8699         (move_from_CR_ov_bit): Delete.
8700         * config/rs6000/rs6000.opt (mpaired): Delete.
8701         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
8702         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
8704 2018-05-02  Richard Biener  <rguenther@suse.de>
8706         PR middle-end/85567
8707         * gimplify.c (gimplify_save_expr): When in SSA form allow
8708         SAVE_EXPRs to compute to SSA vars.
8710 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
8712         PR target/85582
8713         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
8714         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
8715         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
8716         clobber operands[2], instead use a new pseudo.  Formatting fixes.
8718 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
8720         PR tree-optimization/85586
8721         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
8722         exit early for statements in the same group if the accesses are
8723         not strided.
8725 2018-05-02  Tom de Vries  <tom@codesourcery.com>
8727         PR lto/85451
8728         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
8729         error message.
8731 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
8733         PR tree-optimization/85143
8734         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
8736 2018-05-01  Tom de Vries  <tom@codesourcery.com>
8738         PR lto/85451
8739         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
8740         not found" error message.
8742 2018-05-01  Tom de Vries  <tom@codesourcery.com>
8744         PR other/83786
8745         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
8746         * vec.c (test_ordered_remove_if): New function.
8747         (vec_c_tests): Call test_ordered_remove_if.
8748         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
8749         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
8750         * tree-vect-patterns.c (vect_pattern_recog_1): Use
8751         VEC_ORDERED_REMOVE_IF.
8753 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8755         PR tree-optimization/82665
8756         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
8757         pointer subtraction where arguments come from a memchr call.
8759 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
8761         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
8762         --push-state --as-needed and --pop-state instead of --as-needed and
8763         --no-as-needed if ld supports it.
8764         * configure: Regenerated.
8766         PR web/85578
8767         * doc/install.texi2html: Replace _002d with - and _002a with * in
8768         generated html files using sed.
8770 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
8772         PR c++/85523
8773         * gcc-rich-location.c (blank_line_before_p): New function.
8774         (use_new_line): New function.
8775         (gcc_rich_location::add_fixit_insert_formatted): New function.
8776         * gcc-rich-location.h
8777         (gcc_rich_location::add_fixit_insert_formatted): New function.
8779 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
8781         * selftest.c (assert_streq): Rename "expected" and "actual" to
8782         "val1" and "val2".  Extend NULL-handling to cover both inputs
8783         symmetrically, while still requiring both to be non-NULL for a pass.
8784         * selftest.h (assert_streq): Rename "expected" and "actual" to
8785         "val1" and "val2".
8786         (ASSERT_EQ): Likewise.
8787         (ASSERT_EQ_AT): Likewise.
8788         (ASSERT_KNOWN_EQ): Likewise.
8789         (ASSERT_KNOWN_EQ_AT): Likewise.
8790         (ASSERT_NE): Likewise.
8791         (ASSERT_MAYBE_NE): Likewise.
8792         (ASSERT_MAYBE_NE_AT): Likewise.
8793         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
8794         the assertion to pass.
8795         (ASSERT_STREQ_AT): Likewise.
8797 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
8799         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
8800         interaction with -pie.
8802 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
8804         * selftest.h: Fix alphabetization of per-source-file selftest
8805         declarations.
8807 2018-04-30  Jason Merrill  <jason@redhat.com>
8809         PR c++/61982 - dead stores to destroyed objects.
8810         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
8811         of clobber.
8813 2018-04-30  Jason Merrill  <jason@redhat.com>
8815         * tree.c (build_clobber): New.
8816         * tree.h: Declare it.
8817         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
8819 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
8821         * diagnostic-show-locus.c (layout::layout): Update for
8822         location_get_source_line returning a char_span.
8823         (struct char_span): Move to input.h.
8824         (struct correction): Update for fields in char_span becoming
8825         private.
8826         (struct source_line): Update for location_get_source_line
8827         returning a char_span.
8828         (layout::print_line): Likewise.
8829         * edit-context.c (edited_file::print_content): Likewise.
8830         (edited_file::print_diff_hunk): Likewise.
8831         (edited_file::print_run_of_changed_lines): Likewise.
8832         (edited_file::get_num_lines): Likewise.
8833         (edited_line::edited_line): Likewise.
8834         * final.c (asm_show_source): Likewise.
8835         * input.c (location_get_source_line): Convert return type
8836         from const char * to char_span, losing the final "line_len"
8837         param.
8838         (dump_location_info): Update for the above.
8839         (get_substring_ranges_for_loc): Likewise.  Use a char_span
8840         when handling the literal within the line.
8841         (test_reading_source_line): Update for location_get_source_line
8842         returning a char_span.
8843         * input.h (class char_span): Move here from
8844         diagnostic-show-locus.c, converting from a struct to a class.
8845         Make data members private.
8846         (char_span::operator bool): New.
8847         (char_span::length): New.
8848         (char_span::get_buffer): New.
8849         (char_span::operator[]): New.
8850         (char_span::subspan): Make const.
8851         (char_span::xstrdup): New.
8852         (location_get_source_line): Convert return type from const char *
8853         to char_span, losing the final "line_size" param.
8855 2018-04-30  Jan Hubicka  <jh@suse.cz>
8857         * lto-wrapper.c (ltrans_priorities): New static var.
8858         (cmp_priority): New.
8859         (run_gcc): Read priorities and if doing parallel build order
8860         the Makefile by them.
8862 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
8864         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
8866 2018-04-30  Richard Biener  <rguenther@suse.de>
8868         * tree-cfg.c (verify_address): Remove base argument, add
8869         flag whether to check TREE_ADDRESSABLE and do that.
8870         (verify_expr): Remove.
8871         (verify_types_in_gimple_reference): Add pieces from verify_expr.
8872         (verify_gimple_assign_single): Likewise.
8873         (verify_gimple_switch): Likewise.
8874         (verify_expr_location_1): Dereference tp once.  Add (disabled)
8875         piece from verify_expr.
8876         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
8878 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
8880         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
8882 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
8884         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
8885         (small_data_pattern): Likewise.
8886         (arc_rewrite_small_data): Likewise.
8887         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
8888         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
8889         (get_symbol_alignment): New function.
8890         (legitimate_small_data_address_p): Likewise.
8891         (legitimate_scaled_address): Update, call
8892         legitimate_small_data_address_p.
8893         (output_sdata): New static variable.
8894         (arc_print_operand): Update how we handle small data operands.
8895         (arc_print_operand_address): Likewise.
8896         (arc_legitimate_address_p): Update, use
8897         legitimate_small_data_address_p.
8898         (arc_rewrite_small_data_p): Remove.
8899         (arc_rewrite_small_data_1): Likewise.
8900         (arc_rewrite_small_data): Likewise.
8901         (small_data_pattern): Likewise.
8902         (compact_sda_memory_operand): Update to use
8903         legitimate_small_data_address_p and get_symbol_alignment.
8904         (prepare_move_operands): Don't rewite sdata pattern.
8905         (prepare_extend_operands): Remove.
8906         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
8907         pattern.
8908         (zero_extendqisi2): Likewise.
8909         (zero_extendhisi2): Likewise.
8910         (extendqihi2): Likewise.
8911         (extendqisi2): Likewise.
8912         (extendhisi2): Likewise.
8913         (addsi3): Likewise.
8914         (subsi3): Likewise.
8915         (andsi3): Likewise.
8916         * config/arc/constraints.md (Usd): Change it to memory constraint.
8918 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
8920         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
8921         as source of std instructions.
8922         * config/arc/arc.md (movsi_insn): Update pattern predicate to
8923         allow 6-bit constants as source for store instructions.
8924         (movdi_insn): Update instruction pattern to allow 6-bit constants
8925         as source for store instructions.
8927 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
8929         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
8931 2018-04-30  Nathan Sidwell  <nathan@acm.org>
8932             Sandra Loosemore <sandra@codesourcery.com>
8934         * dumpfile.c (dump_open): Allow '-' for stdout.
8935         * doc/invoke.texi (Developer Options): Document dump filename
8936         determination early.  Document stdin/stdout selection.
8938 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
8940         Microblaze Target: PIC data text relative
8942         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
8943         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
8944         Add declaration.
8945         * config/microblaze/microblaze.h (microblaze_constant_address_p):
8946         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
8947         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
8948         New addressing mode for data-text relative position indepenedent code.
8949         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
8950         'ADDRESS_SYMBOLIC_TXT_REL'.
8951         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
8952         (microblaze_legitimate_pic_operand): Exclude function calls from
8953         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
8954         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
8955         addresses cases.
8956         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
8957         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
8958         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
8959         for 'address + offset'.
8960         (microblaze_expand_prologue): Add new function prologue call for
8961         'r20' assignation.
8962         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
8963         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
8964         table in case of TARGET_PIC_DATA_TEXT_REL.
8965         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
8966         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
8967         Add new macros 'UNSPEC_TEXT',
8968         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
8969         + exclude function calls from 'UNSPEC_PLT' in case of data text
8970         relative mode.
8971         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
8972         new target hook for generating address diff vector tables in case of
8973         flag_pic.
8974         * doc/tm.texi : Regenerate.
8975         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
8976         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
8977         of addr diff vector generation.
8978         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
8979         target hook definition.
8980         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
8981         Add default function for generate_pic_addr_diff_vec -> flag_pic.
8982         * doc/invoke.texi (Add new pic option): Add new microblaze pic
8983         option for data text relative.
8985 2018-04-30  Richard Biener  <rguenther@suse.de>
8987         * tree-chrec.h (evolution_function_is_constant_p): Remove
8988         redundant check.
8989         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
8991 2018-04-30  Richard Biener  <rguenther@suse.de>
8993         PR bootstrap/85571
8994         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
8996 2018-04-30  Richard Biener  <rguenther@suse.de>
8998         PR tree-optimization/28364
8999         PR tree-optimization/85275
9000         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
9001         copying first exit test.
9003 2018-04-28  Mark Wielaard  <mark@klomp.org>
9005         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
9006         dwarf_version >= 5.
9007         (dwarf_AT): Handle DW_AT_addr_base.
9008         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
9010 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
9012         PR target/84431
9013         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
9014         (*ashl<dwi>3_doubleword_mask_1): Ditto.
9015         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
9016         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
9018 2018-04-28  Richard Biener  <rguenther@suse.de>
9020         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
9021         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
9022         to reflect use.  Only add interesting stmts.
9024 2018-04-27  Martin Jambor  <mjambor@suse.cz>
9026         PR ipa/85549
9027         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
9028         the jump function allows for passing through aggregate values.
9030 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
9032         * input.h (in_system_header_at): Convert from macro to inline
9033         function.
9034         (from_macro_expansion_at): Likewise.
9035         (from_macro_definition_at): Likewise.
9037 2018-04-27  Jeff Law  <law@redhat.com>
9039         * config.gcc: Mark tile* targets as deprecated/obsolete.
9041 2018-04-27  Richard Biener  <rguenther@suse.de>
9043         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
9044         fix for ILP32.
9046 2018-04-27  Richard Biener  <rguenther@suse.de>
9048         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
9050 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
9052         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
9053         with Yd constraint. Set "preferred_for_speed" attribute from
9054         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
9055         with Yd constraint.
9056         (*movdi_internal): Ditto.
9057         (movti_interunit splitters): Remove
9058         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
9059         (movdi_interunit splitters): Ditto.
9060         * config/i386/constraints.md (Ye): Remove.
9061         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
9063 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9065         PR target/85512
9066         * config/aarch64/constraints.md (Usg): Limit to 31.
9067         (Usj): Limit to 63.
9069 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
9071         PR tree-optimization/85529
9072         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
9073         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
9074         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
9075         zero extension or masking of the MSB bit.
9076         (optimize_range_tests): Add FIRST_BB argument, pass it through
9077         to optimize_range_tests_var_bound.
9078         (maybe_optimize_range_tests, reassociate_bb): Adjust
9079         optimize_range_tests callers.
9081 2018-04-26  Richard Biener  <rguenther@suse.de>
9082             Jakub Jelinek  <jakub@redhat.com>
9084         * cgraph.h (symbol_table): Just declare debug method here.
9085         * symtab.c (symbol_table::debug): Define.
9087 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
9089         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
9091 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
9093         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
9094         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
9095         (*movdi_internal): Substitute Yi and Yj constraint with x
9096         and Ym and Yn constraint with y constraint.  Update "isa"
9097         attribute and set "preferred_for_speed" attribute from
9098         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
9099         (*movsi_internal): Ditto.
9100         (*movdf_internal): Ditto.
9101         (*movsf_internal): Ditto.
9102         (*zero_extendsidi2): Ditto.
9103         * config/i386/sse.md (vec_set<mode>_0): Ditto.
9104         (sse2_loadld): Ditto.
9105         (*vec_extract<ssevecmodelower>_0): Ditto.
9106         (*vec_extractv4si_0_zext_sse4): Ditto.
9107         (vec_concatv2di): Ditto.
9108         (*vec_dup<mode>): Ditto.
9109         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
9110         * config/i386/constraints.md (Yi): Remove.
9111         (Yj): Remove.
9112         (Ym): Remove.
9113         (Yn): Remove.
9115 2018-04-26  Nathan Sidwell  <nathan@acm.org>
9117         * dumpfile.c (dump_open): New.
9118         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
9119         (dump_finish): Detect stdio/stderr by value not name.
9121 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
9123         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
9125 2018-04-26  Tom de Vries  <tom@codesourcery.com>
9127         PR target/84952
9128         * config/nvptx/nvptx.c (verify_neutering_jumps)
9129         (verify_neutering_labels): New function
9130         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
9132 2018-04-26  Tom de Vries  <tom@codesourcery.com>
9134         PR target/84025
9135         * config/nvptx/nvptx.c (needs_neutering_p): New function.
9136         (nvptx_single): Use needs_neutering_p to skip over insns that do not
9137         need neutering.
9139 2018-04-26  Richard Biener <rguenther@suse.de>
9140             Tom de Vries  <tom@codesourcery.com>
9142         PR lto/85422
9143         * lto-streamer-out.c (output_function): Fixup loops if required to match
9144         discovery done in the reader.
9146 2018-04-26  Richard Biener  <rguenther@suse.de>
9148         PR tree-optimization/85116
9149         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
9150         have a loop exit from the single latch predecessor.  Remove
9151         case of header with just condition.
9152         (ch_base::copy_headers): Exclude infinite loops from any
9153         processing.
9154         (pass_ch::execute): Record exits.
9156 2018-04-26  Richard Biener  <rguenther@suse.de>
9158         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
9159         prologue cost vector and pass it to vect_get_load_cost.
9160         (vect_get_peeling_costs_all_drs): Likewise.
9161         (vect_peeling_hash_get_lowest_cost): Likewise.
9162         (vect_enhance_data_refs_alignment): Likewise.
9164 2018-04-26  Richard Biener  <rguenther@suse.de>
9166         PR middle-end/85450
9167         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
9168         checking of integer<->pointer conversions.
9169         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
9170         sign-/zero-extending pointer types.
9171         (expand_omp_for_static_chunk): Likewise.
9173 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
9174             Jean Lee  <xiaoyur347@gmail.com>
9176         * config/mips/mips.c (mips_asan_shadow_offset): New function.
9177         (TARGET_ASAN_SHADOW_OFFSET): Define.
9178         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
9179         true for -fsanitize=address.
9181 2018-04-25  Mark Wielaard  <mark@klomp.org>
9183         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
9184         shorter ones.
9186 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
9188         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
9189         than "alu", remove explicit "memory" and "imm_disp" attributes.
9190         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
9192         PR middle-end/85414
9193         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
9194         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
9195         gen_lowpart_no_emit.
9197 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
9199         PR target/85473
9200         * config/i386/i386.c (ix86_expand_builtin): Change memory
9201         operand to XI, extend p0 to Pmode.
9202         * config/i386/i386.md: Change unspec volatile and operand
9203         1 mode to XI, change operand 0 mode to P.
9205 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
9207         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
9208         GET_MODE_MASK before any checking.
9209         (nds32_can_use_bset_p): Likewise.
9210         (nds32_can_use_btgl_p): Likewise.
9212 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
9214         * config/nds32/nds32-doubleword.md: New define_split pattern for
9215         illegal register number.
9217 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
9219         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
9221 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
9223         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
9225 2018-04-25  Richard Biener  <rguenther@suse.de>
9227         * lto-streamer.h (LTO_major_version): Bump to 8.
9229 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
9231         * BASE-VER: Set to 9.0.0.
9233 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
9235         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
9236         in __abskf2 and __powikf2.
9238 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9240         PR target/85512
9241         * config/aarch64/constraints.md (Usg, Usj): New constraints.
9242         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
9243         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
9244         Use the above on operand 2.  Reindent.
9245         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
9247 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
9249         PR target/85485
9250         * common/config/i386/i386-common.c (ix86_handle_option): Don't
9251         handle OPT_mcet.
9252         * config/i386/i386.opt (mcet): Removed.
9253         * doc/install.texi: Remove -mcet documentation.
9254         * doc/invoke.texi: Likewise.
9256 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
9258         PR target/85485
9259         * doc/install.texi: Remove -mcet from bootstrap-cet.
9261 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
9263         PR target/85511
9264         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
9265         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
9266         if TARGET_64BIT.
9268         PR target/85503
9269         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
9270         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
9271         containing a CONST_VECTOR.
9273 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
9275         * doc/install.texi: Update newlib dependency for nvptx.
9277 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
9279         PR target/85508
9280         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
9281         instead of INTVAL when shifting x left.
9283 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
9285         PR tree-optimization/85478
9286         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
9287         vect_grouped_store_supported for single element vectors.
9289 2018-04-24  Richard Biener  <rguenther@suse.de>
9291         PR target/85491
9292         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
9293         load cost increase to the case of non-constant step.
9295 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
9297         PR target/84828
9298         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
9299         destination if any_malformed_asm.
9301 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
9303         PR middle-end/85496
9304         * expr.c (store_field): In the bitfield case, if the value comes from
9305         a function call and is returned in registers by means of a PARALLEL,
9306         do not change the mode of the temporary unless BLKmode and VOIDmode.
9308 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
9310         PR rtl-optimization/85423
9311         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
9312         dependencies to debug insns when the previous insn is non-debug.
9314 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
9316         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
9317         enums into a single definition.
9318         (fls): Fix predicates and printing.
9319         (seti): Likewise.
9321 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
9323         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
9324         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
9325         and short u6 immediate.
9326         (check_if_valid_sleep_operand): Remove.
9327         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
9329 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
9331         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
9332         flag_always_save_lp condition.
9333         * config/nds32/nds32.opt (malways-save-lp): New option.
9335 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
9337         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
9338         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
9339         * config/nds32/nds32.h
9340         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
9341         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
9343 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
9345         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
9346         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
9348 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
9349             Chung-Ju Wu  <jasonwucj@gmail.com>
9351         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
9352         Declare.
9353         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
9354         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
9356 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
9358         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
9360 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
9362         * config/nds32/nds32-protos.h (nds32_data_alignment,
9363         nds32_local_alignment): Declare.
9364         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
9365         nds32_local_alignment): New functions.
9366         (TARGET_CONSTANT_ALIGNMENT): Define.
9367         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
9369 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
9371         * config/nds32/nds32.c
9372         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
9373         (TARGET_MODES_TIEABLE_P): Likewise.
9375 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
9377         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
9378         level Ofast and Og.
9380 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
9381             Chung-Ju Wu  <jasonwucj@gmail.com>
9383         * config/nds32/constants.md (unspec_volatile_element): Add enum values
9384         for unaligned access.
9385         * config/nds32/nds32-intrinsic.c: Implementation of expanding
9386         unaligned access.
9387         * config/nds32/nds32-intrinsic.md: Likewise.
9388         * config/nds32/nds32_intrinsic.h: Likewise.
9389         * config/nds32/nds32.h (nds32_builtins): Likewise.
9390         * config/nds32/nds32.opt (munaligned-access): New option.
9391         * config/nds32/nds32.c (nds32_asm_file_start): Display
9392         flag_unaligned_access status.
9394 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
9396         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
9397         -mno-relax is present.
9398         * config/riscv/linux.h (LINK_SPEC): Ditto.
9400 2018-04-20  Martin Sebor  <msebor@redhat.com>
9402         PR c/85365
9403         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
9404         for null pointers.
9405         (gimple_fold_builtin_stxcpy_chk): Same.
9406         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
9408 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
9410         PR target/85456
9411         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
9412         __powikf2 when long double is IEEE 128-bit.
9414 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
9416         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
9417         step to make sure stack always aligned.
9419 2018-04-20  Carl Love  <cel@us.ibm.com>
9421         PR target/83402
9422         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
9423         size check for arg0.
9425 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
9426             Tom de Vries  <tom@codesourcery.com>
9428         PR target/85445
9429         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
9430         Emit insns for calls too.
9431         (nvptx_find_par): Always look for worker-level predecessor insn.
9432         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
9433         calls.
9434         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
9435         (nvptx_process_pars): Propagate frames for calls.
9437 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
9439         PR target/85469
9440         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
9441         Removed.
9442         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
9443         (ix86_handle_option): Don't handle OPT_mibt.
9444         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
9445         __SHSTK__.
9446         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
9447         has_ibt and ibt.
9448         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
9449         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
9450         (ix86_target_macros): Define __CET__ with flag_cf_protection
9451         for -fcf-protection.
9452         * config/i386/i386.c (isa2_opts): Remove -mibt.
9453         * config/i386/i386.h (TARGET_IBT): Removed.
9454         (TARGET_IBT_P): Likewise.
9455         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
9456         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
9457         * config/i386/i386.opt (mcet): Update help message.
9458         (mshstk): Likewise.
9459         (mibt): Removed.
9460         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
9461         -mcet as an alias for -mshstk.
9463 2018-04-20  Richard Biener <rguenther@suse.de>
9465         PR middle-end/85475
9466         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
9467         complexity by forcing a single use of the multiply operand.
9469 2018-04-20  Martin Jambor  <mjambor@suse.cz>
9471         ipa/85449
9472         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
9473         recursion dependency to only apply to non-clones.
9475 2018-04-20  Martin Jambor  <mjambor@suse.cz>
9477         ipa/85447
9478         * ipa-cp.c (create_specialized_node): Check that clones of
9479         self-recursive edges exist during IPA-CP.
9481 2018-04-19  Toon Moene  <toon@moene.org>
9483         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
9484         by -O3.
9486 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
9488         PR tree-optimization/85467
9489         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
9490         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
9491         VECTOR_CST element to type.
9493 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
9495         PR target/85397
9496         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
9497         * config/i386/i386.md (builtin_setjmp_setup): Removed.
9498         (builtin_longjmp): Likewise.
9499         (save_stack_nonlocal): New pattern.
9500         (restore_stack_nonlocal): Likewise.
9502 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
9504         PR target/85404
9505         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9506         Replace ASM_OUTPUT_LABEL with fprintf.
9508 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
9510         PR target/85417
9511         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9512         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
9513         * config/i386/i386-c.c (ix86_target_macros_internal): Also
9514         define __IBT__ and __SHSTK__ for -fcf-protection.
9515         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
9516         TARGET_IBT.
9517         (ix86_trampoline_init): Likewise.
9518         (x86_output_mi_thunk): Likewise.
9519         (ix86_notrack_prefixed_insn_p): Likewise.
9520         (ix86_option_override_internal): Don't disallow -fcf-protection.
9521         * config/i386/i386.md (rdssp<mode>): Also enable for
9522         -fcf-protection.
9523         (incssp<mode>): Likewise.
9524         (nop_endbr): Likewise.
9525         * config/i386/i386.opt (mcet): Change help message to built-in
9526         functions only.
9527         (mibt): Likewise.
9528         (mshstk): Likewise.
9529         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
9530         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
9531         enable CET built-in functions.
9533 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
9535         * common/config/i386/i386-common.c
9536         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
9537         OPTION_MASK_ISA_MOVDIRI_UNSET,
9538         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
9539         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
9540         * config.gcc (movdirintrin.h): New header.
9541         * config/i386/cpuid.h (bit_MOVDIRI,
9542         bit_MOVDIR64B): New bits.
9543         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
9544         and -mmvodir64b.
9545         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
9546         (VOID, PVOID, PCVOID)): New function types.
9547         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
9548         __builtin_ia32_directstoreu_u64,
9549         __builtin_ia32_movdir64b): New builtins.
9550         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
9551         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
9552         and -mmovdiri.
9553         (ix86_valid_target_attribute_inner_p): Ditto.
9554         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
9555         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
9556         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
9557         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
9558         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
9559         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
9560         (movdiri<mode>, movdir64b_<mode>): New.
9561         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
9562         * config/i386/immintrin.h: Include movdirintrin.h.
9563         * config/i386/movdirintrin.h: New file.
9564         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
9566 2018-04-19  Richard Biener  <rguenther@suse.de>
9568         PR middle-end/85455
9569         * cfg.c (clear_bb_flags): When loop state says we have
9570         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
9572 2018-04-19  Richard Biener  <rguenther@suse.de>
9574         PR tree-optimization/84737
9575         * tree-vect-data-refs.c (vect_copy_ref_info): New function
9576         copying restrict info.
9577         (vect_setup_realignment): Use it.
9578         * tree-vectorizer.h (vect_copy_ref_info): Declare.
9579         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
9580         the first DR to all generated stores.
9581         (vectorizable_load): Likewise for loads.
9583 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
9585         PR tree-optimization/85446
9586         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
9587         the integral and pointer types to have the same precision.
9589         * doc/install.texi: Document --disable-cet being the default and
9590         --enable-cet=auto.
9592 2018-04-18  Martin Liska  <mliska@suse.cz>
9594         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
9595         style.
9597 2018-04-18  Martin Liska  <mliska@suse.cz>
9599         Revert
9600         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
9602         PR ipa/83983
9603         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
9604         arguments if they are comparable.
9606 2018-04-18  Martin Liska  <mliska@suse.cz>
9608         Revert
9609         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
9611         PR lto/84805
9612         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
9613         incomplete types.
9615 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
9617         PR target/85388
9618         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
9619         ENDBR after calling __morestack.
9621 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
9623         PR jit/85384
9624         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
9625         by using gcc_base_ver to generate a gcc_driver_version, and use
9626         it when generating GCC_DRIVER_NAME.
9627         * configure: Regenerate.
9629 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
9631         PR target/81084
9632         * config.gcc: Obsolete powerpc*-*-*spe*.
9634 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
9636         PR debug/84637
9637         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
9638         (stabstr_D): Change type of unum from unsigned int to
9639         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
9640         type.
9642 2018-04-17  Jim Wilson  <jimw@sifive.com>
9644         PR 84856
9645         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
9646         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
9647         Set arg_pointer_offset after using pretend_args_size.
9649 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
9651         PR rtl-optimization/85431
9652         * dse.c (record_store): Ignore zero width stores.
9654         PR sanitizer/85230
9655         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
9656         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
9657         __builtin_stack_restore rather than after it.
9658         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
9659         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
9660         argument instead of virtual_dynamic_stack_rtx.
9662 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9664         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
9665         New prototype.
9666         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
9667         Add note to error message to explain internal mapping of overloaded
9668         built-in function name to non-overloaded built-in function name.
9669         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
9670         function.
9672 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
9674         PR target/85424
9675         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
9676         where the inputs overlap with the output.
9678 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
9680         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
9681         (=v, v) alternative and explicit "memory" attribute.
9682         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
9683         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9684         attributes.
9685         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
9686         "sselog1" type instead of "sselog".
9687         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
9688         "sselog".  Remove explicit "memory" attribute.
9689         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
9690         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9691         attributes.
9692         (vec_extract_hi_v32hi): Merge all alternatives into one, use
9693         "sselog1" type instead of "sselog".  Remove explicit "memory"
9694         attribute.
9695         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
9696         use "sselog1" type instead of "sselog".  Remove explicit "memory"
9697         attribute.
9698         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
9699         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9700         attributes.
9701         (vec_extract_hi_v64qi): Merge all alternatives into one, use
9702         "sselog1" type instead of "sselog".  Remove explicit "memory"
9703         attribute.
9704         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
9705         use "sselog1" type instead of "sselog".  Remove explicit "memory"
9706         attribute.
9708         PR target/85430
9709         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
9711         PR middle-end/85414
9712         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
9713         on a SUBREG.
9715 2018-04-17  Martin Jambor  <mjambor@suse.cz>
9717         PR ipa/85421
9718         * ipa-cp.c (create_specialized_node): Call
9719         expand_all_artificial_thunks if necessary.
9721 2018-04-17  Martin Liska  <mliska@suse.cz>
9723         PR lto/85405
9724         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
9725         in message, remote space in between '_G' and '('.
9727 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
9729         PR target/85281
9730         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
9731         avx512f_vmcmp<mode>3<round_saeonly_name>,
9732         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
9733         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
9734         avx512f_rndscale<mode><round_saeonly_name>,
9735         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
9736         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
9737         Use %<iptr>2 instead of %2 for -masm=intel.
9738         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
9739         avx512f_vcvttss2usi<round_saeonly_name>,
9740         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
9741         -masm=intel.
9742         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
9743         avx512f_vcvttsd2usi<round_saeonly_name>,
9744         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
9745         Use %q1 instead of %1 for -masm=intel.
9746         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
9747         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
9748         of %3 for -masm=intel.
9749         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
9750         -masm=intel.
9751         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
9752         -masm=intel.
9753         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
9754         -masm=intel.
9755         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
9756         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
9757         %g1.
9758         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
9759         -masm=intel.
9760         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
9761         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
9762         %g1 and one with %0 and %1.
9763         (avx512er_vmrcp28<mode><round_saeonly_name>,
9764         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
9765         %1 for -masm=intel.
9766         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
9767         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
9768         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
9769         of %0 and %{%4%} for -masm=intel.
9770         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
9771         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
9772         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
9773         order of %0 and %{%5%}%{z%} for -masm=intel.
9775 2018-04-17  Jan Hubicka  <jh@suse.cz>
9777         PR lto/85405
9778         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
9780 2018-04-17  Martin Liska  <mliska@suse.cz>
9782         PR ipa/85329
9783         * multiple_target.c (create_dispatcher_calls): Set apostrophes
9784         for target_clone error message.  Make default implementation
9785         clone to be a local declaration.
9786         (separate_attrs): Add new argument and check for an empty
9787         string.
9788         (expand_target_clones): Handle it.
9789         (ipa_target_clone): Make redirection just for target_clones
9790         functions.
9792 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
9793             Tom de Vries  <tom@codesourcery.com>
9795         PR middle-end/84955
9796         * omp-expand.c (expand_oacc_for): Add dummy false branch for
9797         tiled basic blocks without omp continue statements.
9799 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
9801         PR target/83660
9802         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
9803         vec_extract expression as having side effects to make sure it gets
9804         a cleanup point.
9806 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
9808         PR target/85403
9809         * config/i386/i386.c (get_builtin_code_for_version): Check
9810         error_mark_node.
9812 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
9814         PR target/84331
9815         * config.gcc: Support "skylake".
9816         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9817         PROCESSOR_SKYLAKE.
9818         * config/i386/i386.c (m_SKYLAKE): Define.
9819         (processor_target_table): Add "skylake".
9820         (ix86_option_override_internal): Add "skylake".
9821         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
9822         PROCESSOR_CANNONLAKE.
9823         (get_builtin_code_for_version): Fix priority for
9824         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
9825         PROCESSOR_SKYLAKE-AVX512.
9826         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
9827         (processor_type): Add PROCESSOR_SKYLAKE.
9829 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
9830             Jason Merrill  <jason@redhat.com>
9832         PR c++/85112
9833         * convert.c (convert_to_integer_1): Use direct recursion for
9834         enumeral types and types with a precision less than the number
9835         of bits in their mode.
9837 2018-04-16  Julia Koval  <julia.koval@intel.com>
9839         PR target/84413
9840         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
9841         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
9843 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
9845         PR target/85293
9846         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
9847         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
9848         and -mno-direct-move.
9850 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
9852         PR target/83402
9853         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
9854         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
9855         Ensure negative shifts result in {0}.
9857 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
9859         PR rtl-optimization/79916
9860         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
9861         regs (if any) to define how to gnerate SD moves when LRA is in
9862         progress.
9864 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
9866         PR rtl-optimization/85393
9867         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
9868         * except.c (expand_dw2_landing_pad_for_region): Make static.
9869         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
9870         a label and unconditional jump to old_bb, rather than
9871         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
9872         basic block.
9874         PR rtl-optimization/85376
9875         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
9876         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
9877         instead of a specific value.
9879 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
9880             Bin Cheng  <bin.cheng@arm.com>
9882         PR tree-optimization/82965
9883         PR tree-optimization/83991
9884         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
9885         by_profile_only parameter.
9886         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
9887         information if the loop was predicted to iterate too many times.
9888         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
9890 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
9892         PR lto/71991
9893         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
9894         always inline.
9896 2018-04-13  Martin Liska  <mliska@suse.cz>
9897             Jakub Jelinek  <jakub@redhat.com>
9899         PR middle-end/81657
9900         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
9901         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
9902         * builtins.c (expand_builtin_memory_copy_args): Use
9903         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
9904         handle dest_addr == pc_rtx.
9906 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
9908         PR target/85291
9909         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
9910         asked to not generate direct moves.
9911         (fix_trunc<mode>si2_stfiwx): Similar.
9912         (fix_trunc<mode>si2_internal): Similar.
9914 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
9916         PR debug/83157
9917         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
9918         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
9919         lookup if dest in some wider mode is known to be const0_rtx and
9920         if so, record permanent equivalence for it to be ZERO_EXTEND of
9921         the narrower mode destination.
9923 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
9925         * lto-streamer-out.c (output_function): Revert 259346.
9926         * omp-expand.c (expand_oacc_for): Likewise.
9928 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
9930         PR rtl-optimization/85354
9931         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
9932         * sel-sched.c (sel_global_init): ... here.
9934 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
9936         PR target/85238
9937         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
9938         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
9939         mode for PE-COFF targets.
9940         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
9941         (i386_pe_asm_lto_end): Likewise.
9942         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
9943         (TARGET_ASM_LTO_END): Likewise.
9944         * config/i386/winnt.c (saved_debug_info_level): New static variable.
9945         (i386_pe_asm_lto_start): New function.
9946         (i386_pe_asm_lto_end): Likewise.
9948 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
9949             Richard Biener  <rguenther@suse.de>
9951         PR middle-end/84955
9952         * lto-streamer-out.c (output_function): Fix CFG loop state before
9953         streaming out.
9954         * omp-expand.c (expand_oacc_for): Handle calls to internal
9955         functions like regular functions.
9957 2018-04-12  Richard Biener  <rguenther@suse.de>
9959         PR lto/85371
9960         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
9961         for the early LTO debug to properly generate references to it
9962         during DIE emission.  Do not re-use that for the skeleton for
9963         split-dwarf.
9964         (dwarf2out_early_finish): Likewise.
9966 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
9968         PR target/85328
9969         * config/i386/sse.md
9970         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
9971         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
9972         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
9973         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
9974         and output is a reg, avoid creating invalid lowpart subreg, but
9975         instead split into a 512-bit move.  Don't split if not AVX512VL,
9976         input is xmm16+ reg and output is a mem.
9977         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
9978         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
9979         xmm16+ reg and output is a mem.
9981 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9983         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
9984         also for flag_dwarf2_cfi_asm.
9986 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
9988         PR rtl-optimization/85342
9989         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
9990         a bool scalar var inside of the loop instead.  Don't try to update
9991         recog_data.operand after failed apply_change_group.
9993 2018-04-12  Tom de Vries  <tom@codesourcery.com>
9995         PR target/85296
9996         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
9997         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
9998         array with flexible array member as array without given dimension.
9999         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
10000         argument for undefined param to true.
10002 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
10004         PR target/85321
10005         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10006         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
10007         from PowerPC section.
10008         * config/rs6000/sysv4.opt (mcall-): Improve help text.
10009         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
10010         help text that is too long.
10011         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
10012         help text that is too long.
10013         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
10014         help text that is too long.
10016 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
10018         * config/alpha/alpha.md (stack_probe_internal): Rename
10019         from "probe_stack".  Update all callers.
10021 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
10023         PR rtl-optimization/84566
10024         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
10025         sched_macro_fuse_insns.
10027 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
10029         PR target/84301
10030         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
10031         (compute_block_dependences): ... from here.
10033 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
10035         PR tree-optimization/85331
10036         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
10037         from int to HOST_WIDE_INT.
10039 2018-04-11  Martin Jambor  <mjambor@suse.cz>
10041         PR ipa/84149
10042         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
10043         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
10044         not the same as the source val.
10045         (cgraph_edge_brings_value_p): New parameter.
10046         (gather_edges_for_value): Pass destination value to
10047         cgraph_edge_brings_value_p.
10048         (perhaps_add_new_callers): Likewise.
10049         (get_info_about_necessary_edges): Likewise and exclude values brought
10050         only by self-recursive edges.
10051         (create_specialized_node): Redirect only clones of self-calling edges.
10052         (+self_recursive_pass_through_p): New function.
10053         (find_more_scalar_values_for_callers_subset): Use it.
10054         (find_aggregate_values_for_callers_subset): Likewise.
10055         (known_aggs_to_agg_replacement_list): Removed.
10056         (decide_whether_version_node): Re-calculate known constants for all
10057         remaining context clones.
10059 2018-04-11  Richard Biener  <rguenther@suse.de>
10061         PR lto/85339
10062         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
10063         from early DWARF output.
10064         (dwarf2out_early_finish): Output line info unconditionally into
10065         early DWARF and add reference to it.
10067 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
10069         PR target/85281
10070         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
10071         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
10072         other than V2DFmode using iptr mode attribute.
10073         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
10075 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
10077         PR rtl-optimization/84659
10078         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
10080 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
10082         PR debug/85302
10083         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
10084         SIZEP is NULL.
10085         (output_loc_list): Pass address of a dummy size variable even in the
10086         locview handling loop.
10087         (index_location_lists): Add comment on why skip_loc_list_entry can't
10088         call size_of_locs.
10090 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10092         PR target/85261
10093         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
10094         into register.
10096 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
10098         PR target/85321
10099         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10100         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
10101         and -mstring-compare-inline-limit.
10103 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
10105         PR target/85287
10106         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
10107         for stack clash protection in a register whenever we need it to be in
10108         a register.
10110 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
10112         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
10113         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
10115 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
10117         PR target/85321
10118         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
10119         the help text.
10120         (mlong-double-): Ditto.
10121         * config/rs6000/sysv4.opt (msdata=): Ditto.
10122         (mtls-size=): Ditto.
10124 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10126         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10127         erroneous entries for
10128         "vector int vec_ldl (int, long int *)", and
10129         "vector unsigned int vec_ldl (int, unsigned long int *)".
10130         Add comments and entries for
10131         "vector bool char vec_ldl (int, bool char *)",
10132         "vector bool short vec_ldl (int, bool short *)",
10133         "vector bool int vec_ldl (int, bool int *)",
10134         "vector bool long long vec_ldl (int, bool long long *)",
10135         "vector pixel vec_ldl (int, pixel *)",
10136         "vector long long vec_ldl (int, long long *)",
10137         "vector unsigned long long vec_ldl (int, unsigned long long *)".
10138         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
10139         type tree bool_long_long_type_node and correct definition of
10140         bool_V2DI_type_node to make reference to this new type tree.
10141         (rs6000_mangle_type): Replace erroneous reference to
10142         bool_long_type_node with bool_long_long_type_node.
10143         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
10144         comments to emphasize sign distinctions for char and int types and
10145         replace RS6000_BTI_bool_long constant with
10146         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
10147         use of RS6000_BTI_pixel.
10148         (bool_long_type_node): Remove this macro definition.
10149         (bool_long_long_type_node): New macro definition
10151 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
10153         PR rtl-optimization/85300
10154         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
10155         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
10156         simplify_unary_operation fails.
10158 2018-04-10  Martin Liska  <mliska@suse.cz>
10160         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
10161         cgraph_edge and ipa_ref.
10163 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
10165         PR target/85177
10166         PR target/85255
10167         * config/i386/sse.md
10168         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
10169         computation of the VEC_MERGE selector from mask.
10170         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
10171         Fix decoding of the VEC_MERGE selector into mask.
10173 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
10175         PR tree-optimization/85286
10176         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
10178 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
10180         * final.c (final_1): Set insn_last_address as well as
10181         insn_current_address.
10183 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10185         PR target/85173
10186         * explow.c (emit_stack_probe): Call validize_mem on memory location
10187         before passing it to gen_probe_stack.  Create address operand and
10188         legitimize it for the probe_stack_address case.
10190 2018-04-09  Jan Hubicka  <jh@suse.cz>
10192         PR lto/85078
10193         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
10194         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
10195         * tree.c (free_lang_data_in_type): Fix handling of binfos;
10196         walk basetypes.
10197         (free_lang_data): Rebuild type inheritance graph.
10199 2018-04-09  Martin Sebor  <msebor@redhat.com>
10201         * invoke.texi (-finline-small-functions): Mention other optimization
10202         options.
10203         (-findirect-inlining, -fpartial-inlining): Same.
10204         (-finline-functions-called-once): Same.
10205         (-freorder-blocks-and-partition): Same.
10207 2018-04-09  Jan Hubicka  <jh@suse.cz>
10209         PR rtl/84058
10210         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
10211         jumps; choose last target that matches the criteria (i.e.
10212         no partition changes for non-crossing jumps).
10213         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
10214         support for redirecting crossing jumps to non-crossing.
10216 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
10218         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
10219         also for naked functions.
10221 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
10223         * config/arc/arc.md (add_shift): New pattern.
10224         (add_shift2): Likewise.
10225         (sub_shift): Likewise.
10226         (sub_shift_cmp0_noout): Likewise.
10227         (compare_si_ashiftsi): Likewise.
10228         (xbfu_cmp0_noout): New combine pattern.
10229         (xbfu_cmp0"): Likewise.
10230         (movsi_set_cc_insn): Place the predicable variant first.
10231         (commutative_binary_cmp0_noout): Remove clobber.
10232         (commutative_binary_cmp0): New pattern.
10233         (noncommutative_binary_cmp0): Likewise.
10234         (noncommutative_binary_cmp0_noout): Likewise.
10235         (noncommutative_binary_comparison_result_used): Removed.
10236         (rsub_cmp0): New pattern.
10237         (rsub_cmp0_noout): Likewise.
10238         (extzvsi): Changed, keep only meaningful variants.
10239         (SQH, SEZ): New iterators.
10240         (SQH_postfix): New mode attribute.
10241         (SEZ_prefix): New code attribute.
10242         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
10243         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
10244         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
10245         of numerical value.
10246         (noncommutative_operator): Check the availability of barrel
10247         shifter option.
10249 2018-04-09  Richard Biener  <rguenther@suse.de>
10251         PR tree-optimization/85284
10252         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
10253         Only use the niter constraining form of simple_iv when the exit
10254         is always executed.
10256 2018-04-09  Tom de Vries  <tom@codesourcery.com>
10258         PR target/84041
10259         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10260         (define_expand "*memory_barrier"): New define_expand.
10261         (define_insn "memory_barrier"): New insn.
10263 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
10265         PR rtl-optimization/80463
10266         PR rtl-optimization/83972
10267         PR rtl-optimization/83480
10269         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
10270         correct producer for the insn.
10271         (tidy_control_flow): Fixup seqnos in case of debug insns.
10273 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
10275         PR rtl-optimization/83913
10277         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
10278         different sched-times when merging exprs.
10280 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
10282         PR rtl-optimization/83962
10284         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
10285         tidy_fallthru_edge and tidy_control_flow.
10287 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
10289         PR rtl-optimization/83530
10291         * sel-sched.c (force_next_insn): New global variable.
10292         (remove_insn_for_debug): When force_next_insn is true, also leave only
10293         next insn in the ready list.
10294         (sel_sched_region): When the region wasn't scheduled, make another pass
10295         over it with force_next_insn set to 1.
10297 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
10299         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
10300         into tm_file.
10301         * config/nds32/constants.md (unspec_volatile_element): Add enum values
10302         for interrupt control.
10303         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
10304         functions for interrupt control.
10305         * config/nds32/nds32-intrinsic.md: Likewise.
10306         * config/nds32/nds32_intrinsic.h: Likewise.
10307         * config/nds32/nds32.h (nds32_builtins): Likewise.
10309 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
10311         * config/nds32/nds32.c (nds32_init_machine_status,
10312         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
10313         strict_aligned_p field.
10314         (nds32_expand_to_rtl_hook): New function.
10315         (TARGET_EXPAND_TO_RTL_HOOK): Define.
10316         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
10318 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
10319             Chung-Ju Wu  <jasonwucj@gmail.com>
10321         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
10322         * config/nds32/nds32-n7.md: New file.
10323         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
10324         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
10325         pipeline.
10326         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
10327         * config/nds32/nds32.md (pipeline_model): Add n7.
10328         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
10329         * config/nds32/pipelines.md: Include n7 settings.
10331 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
10332             Chung-Ju Wu  <jasonwucj@gmail.com>
10334         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
10335         * config/nds32/nds32-e8.md: New file.
10336         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
10337         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
10338         pipeline.
10339         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
10340         * config/nds32/nds32.md (pipeline_model): Add e8.
10341         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
10342         * config/nds32/pipelines.md: Include e8 settings.
10344 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
10345             Chung-Ju Wu  <jasonwucj@gmail.com>
10347         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
10348         * config/nds32/nds32-n8.md: New file.
10349         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
10350         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
10351         pipeline.
10352         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
10353         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
10354         * config/nds32/nds32.md (pipeline_model): Add n8.
10355         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
10356         * config/nds32/pipelines.md: Include n8 settings.
10358 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
10359             Chung-Ju Wu  <jasonwucj@gmail.com>
10361         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
10362         * config/nds32/nds32-n9-2r1w.md: New file.
10363         * config/nds32/nds32-n9-3r2w.md: New file.
10364         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
10365         nds32_register_ports): New or modify for cpu n9.
10366         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
10367         pipeline.
10368         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
10369         * config/nds32/nds32-utils.c: New file.
10370         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
10371         TARGET_MUL_SLOW): Define.
10372         * config/nds32/nds32.md (pipeline_model): New attribute.
10373         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
10374         New options that support cpu n9.
10375         * config/nds32/pipelines.md: Include n9 settings.
10376         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
10378 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
10380         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
10381         information if necessary.
10382         (output_cond_branch_compare_zero): Likewise.
10383         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
10384         (nds32_target_alignment): Refine for alignment.
10385         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
10386         (FUNCTION_BOUNDARY): Modify.
10387         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
10388         align case.
10389         * config/nds32/nds32.opt (malways-align, malign-functions): New.
10391 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
10393         * config/nds32/constants.md (unspec_volatile_element): Add values for
10394         TLB operation and data prefetch.
10395         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
10396         functions for TLB operation and data prefetch.
10397         * config/nds32/nds32-intrinsic.md: Likewise.
10398         * config/nds32/nds32_intrinsic.h: Likewise.
10399         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
10400         (nds32_print_operand): Likewise.
10401         * config/nds32/nds32.h (nds32_builtins): Likewise.
10403 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
10404         Andrew Pinski <pinsika@gcc.gnu.org>
10406         PR middle-end/82976
10407         * match.pd: Use constant_boolean_node of correct type instead of
10408         boolean_true_node or boolean_false_node for simplifying
10409         pointer comparisons to zero.
10411 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
10413         PR tree-optimization/80021
10414         * tree.c (verify_type_variant): Make error call in verify_variant_match
10415         translatable and remove final full stop.
10417 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
10419         * config/nds32/constants.md (unspec_volatile_element): Add
10420         UNSPEC_VOLATILE_EH_RETURN.
10421         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
10422         nds32_output_stack_pop): Support dwarf exception handling process.
10423         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
10424         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
10425         exception handling process.
10426         (nds32_compute_stack_frame): Likewise.
10427         (nds32_return_addr_rtx): Likewise.
10428         (nds32_initial_elimination_offset): Likewise.
10429         (nds32_expand_prologue): Likewise.
10430         (nds32_expand_epilogue): Likewise.
10431         (nds32_dynamic_chain_address): New function.
10432         * config/nds32/nds32.h (machine_function): Add fields for dwarf
10433         exception handling.
10434         (DYNAMIC_CHAIN_ADDRESS): Define.
10435         (EH_RETURN_DATA_REGNO): Define.
10436         (EH_RETURN_STACKADJ_RTX): Define.
10437         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
10438         patterns for dwarf exception handling.
10440 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
10442         * config/nds32/nds32.h: Clean up obsolete macros.
10444 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
10446         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10447         Add enum values for particular instructions.
10448         * config/nds32/nds32-intrinsic.c: Implementation of expanding
10449         particular intrinsic functions.
10450         * config/nds32/nds32-intrinsic.md: Likewise.
10451         * config/nds32/nds32_intrinsic.h: Likewise.
10452         * config/nds32/nds32.h (nds32_builtins): Likewise.
10453         * config/nds32/nds32.md (type): Add pbsad and pbsada.
10454         (btst, ave): New patterns for particular instructions.
10456 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
10458         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10459         Add enum values for atomic load/store and memory sync.
10460         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
10461         and memory sync.
10462         * config/nds32/nds32-intrinsic.md: Likewise.
10463         * config/nds32/nds32_intrinsic.h: Likewise.
10464         * config/nds32/nds32.h (nds32_builtins): Likewise.
10466 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
10468         PR tree-optimization/85257
10469         * fold-const.c (native_encode_vector): If not all elts could fit
10470         and off is -1, return 0 rather than offset.
10471         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
10472         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
10473         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
10474         adjust buffer in native_interpret_expr call.
10476 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
10478         * config/nds32/constants.md (unspec_volatile_element): Add cache
10479         control enum values.
10480         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
10481         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
10482         * config/nds32/nds32.c (nds32_cctl_names): New.
10483         (nds32_print_operand): Handle cache control register names.
10484         * config/nds32/nds32.h (nds32_builtins): New enum values.
10485         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
10486         macros.
10487         * config/nds32/nds32.md (type): Add mmu.
10488         * config/nds32/pipelines.md (simple_insn): Add mmu.
10490 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
10492         * config/nds32/nds32.md (type): Remove call.
10493         * config/nds32/pipelines.md (simple_insn): Likewise.
10495 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
10497         * config/nds32/constants.md (unspec_volatile_element): Add
10498         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
10499         UNSPEC_VOLATILE_FMFCFG.
10500         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
10501         description for fmfcfg and fmfcsr.
10502         (bdesc_1arg): Add fmtcsr.
10503         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
10504         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
10505         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
10506         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
10507         unspec_fmfcfg): New patterns.
10508         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
10509         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
10510         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
10511         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
10512         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
10513         __nds32__fmfcfg): Define.
10515 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
10517         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
10518         intrinsic register names.
10519         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
10520         intrinsic register enum values and macros.
10522 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
10524         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
10525         for load/store addressing form.
10526         (nds32_print_operand_address): Likewise.
10528 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
10530         PR target/85196
10531         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
10532         based on LABEL_REF.  Remove useless assertion.
10533         (pic_address_needs_scratch): Fix formatting.
10534         (sparc_legitimize_pic_address): Minor tweaks.
10535         (sparc_delegitimize_address): Adjust assertion accordingly.
10536         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
10537         into symbolic_operand.
10538         (movsi_high_pic_label_ref): Likewise.
10539         (movsi_lo_sum_pic_label_ref): Likewise.
10540         (movdi_pic_label_ref): Likewise.
10541         (movdi_high_pic_label_ref): Likewise.
10542         (movdi_lo_sum_pic_label_ref): Likewise.
10544 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
10546         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
10547         custom LIB_SPEC setup.
10549 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
10550             Kito Cheng  <kito.cheng@gmail.com>
10552         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
10553         * config/riscv/freebsd.h: New.
10555 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
10557         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
10558         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
10559         file.
10561 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
10562             Kito Cheng  <kito.cheng@gmail.com>
10564         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
10565         nds32_output_call, nds32_symbol_binds_local_p): New functions.
10566         * config/nds32/nds32-protos.h (nds32_output_call,
10567         nds32_output_return): Declare.
10568         * config/nds32/nds32.md: Refine all the call and return patterns.
10570 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
10572         PR debug/85252
10573         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
10574         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
10576         PR rtl-optimization/84872
10577         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
10578         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
10579         EDGE_CROSSING edge.
10581 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
10583         * expr.c (copy_blkmode_to_reg): Revert 254862.
10584         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
10586 2018-04-06  Richard Biener  <rguenther@suse.de>
10588         PR middle-end/85244
10589         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
10590         after seeing a component reference with an adjacent field.  Treat
10591         refs to arrays at struct end of external decls similar to
10592         refs to unconstrained commons.
10594 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
10596         PR sanitizer/85213
10597         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
10598         look through SAVE_EXPRs with non-side-effects argument.  Adjust
10599         recursive calls.
10600         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
10601         save_p here.
10603 2018-04-06  Richard Biener  <rguenther@suse.de>
10605         PR middle-end/85180
10606         * alias.c (find_base_term): New wrapper around find_base_term
10607         unwinding CSELIB_VAL_PTR changes.
10608         (find_base_term): Do not restore CSELIB_VAL_PTR during the
10609         recursion.
10611 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10613         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
10614         instructions.
10615         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
10616         constant definitions.
10617         ("nop"): lr 0,0 -> nopr r0
10618         ("nop_lr0", "nop_lr1"): New insn definitions.
10620 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
10622         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
10623         NDS32_V3PUSH_AVAILABLE_P macro.
10625 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
10626             Chung-Ju Wu  <jasonwucj@gmail.com>
10628         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
10629         (nds32*-*-*): Add float and fpu_config into supported_defaults.
10630         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
10631         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
10632         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
10633         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
10634         * config/nds32/constraints.md: New constraints and checking for hard
10635         float configuration.
10636         * config/nds32/iterators.md: New mode iterator and attribute for hard
10637         float configuration.
10638         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
10639         patterns.
10640         * config/nds32/nds32-fpu.md: New file.
10641         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
10642         deal with hard float code generation.
10643         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
10644         ARCH_V3S.
10645         (abi_type, float_reg_number): New enum type.
10646         * config/nds32/nds32-predicates.c: New predicates for hard float.
10647         * config/nds32/nds32-protos.h: Declare functions for hard float.
10648         * config/nds32/nds32.c: Implementation for hard float configuration.
10649         * config/nds32/nds32.h: Definitions for hard float configuration.
10650         * config/nds32/nds32.md: Include hard float machine description and
10651         modify patterns for hard float configuration.
10652         * config/nds32/nds32.opt: New options for hard float configuration.
10653         * config/nds32/predicates.md: New predicates for hard float
10654         configuration.
10656 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
10658         * common/config/nds32/nds32-common.c
10659         (nds32_option_optimization_table): Enable -mreleax-hint by default.
10661 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
10663         PR middle-end/85195
10664         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
10665         CONSTRUCTOR_ELT (ctor, ...)->value.
10667 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
10669         PR target/85193
10670         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
10672 2018-04-05  Tom de Vries  <tom@codesourcery.com>
10674         PR target/85204
10675         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
10676         cond jump.
10678 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
10679             Kito Cheng  <kito.cheng@gmail.com>
10681         * config/nds32/constraints.md (U33): Fine-tune checking condition.
10682         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
10683         * config/nds32/nds32.h (nds32_16bit_address_type): Add
10684         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
10686 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
10687             Kito Cheng  <kito.cheng@gmail.com>
10689         * config/nds32/constraints.md (Ufe): New memory constraint.
10690         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
10691         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
10692         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
10693         operands.
10694         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
10695         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
10697 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10699         * config/nds32/nds32.md: Use optimize_size in the condition for
10700         alu-shift instructions.
10702 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10704         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
10706 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10708         * config/nds32/nds32.md (negsi2): Refine pattern.
10710 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
10711             Chung-Ju Wu  <jasonwucj@gmail.com>
10713         * config/nds32/iterators.md (shift_rotate): New code iterator.
10714         (shift): New code attribute.
10715         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
10716         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
10717         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
10718         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
10719         bit-wise operations.
10720         (andsi3, *andsi3): Ditto.
10721         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
10722         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
10723         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
10724         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
10725         nds32_ior_operand, nds32_xor_operand): New predicates.
10727 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10729         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
10730         (addsi3, subsi3): ... this.
10732 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10734         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
10736 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10738         * config/nds32/nds32.md: Adjust indention.
10740 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
10742         * config/nds32/nds32.md (feature): New attribute.
10744 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
10746         * config/nds32/nds32.md (subtype): New attribute.
10748 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10750         PR target/85203
10751         * config/arm/arm-builtins.c (arm_expand_builtin): Change
10752         expansion to perform a bitwise AND of the argument followed by a
10753         boolean negation of the result.
10755 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
10757         PR rtl-optimization/84878
10758         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
10759         the basic block.  Assert the use reference is not artificial and that
10760         it has an associated insn.
10762 2018-04-04  Michael Matz  <matz@suse.de>
10764         * builtins.c (compute_objsize): Pass correct operand
10765         to array_at_struct_end_p.
10767 2018-04-04  Richard Biener  <rguenther@suse.de>
10769         PR lto/85176
10770         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
10771         from contexts for DINFO_LEVEL_TERSE and below.
10773 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
10775         * config/nds32/nds32-doubleword.md (move_<mode>): Require
10776         resiter_operand condition.
10777         * config/nds32/nds32.md (*move<mode>): Ditto.
10779 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
10780             Monk Chiang  <sh.chiang04@gmail.com>
10782         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
10784 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
10786         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
10788 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
10789             Kito Cheng  <kito.cheng@gmail.com>
10791         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
10792         nds32_cond_code_str, output_cond_branch,
10793         output_cond_branch_compare_zero, nds32_expand_cbranch,
10794         nds32_expand_cstore, nds32_expand_movcc,
10795         nds32_output_cbranchsi4_equality_zero,
10796         nds32_output_cbranchsi4_equality_reg,
10797         nds32_output_cbranchsi4_equality_reg_or_const_int,
10798         nds32_output_cbranchsi4_greater_less_zero: New functions.
10799         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
10800         nds32_expand_cstore, nds32_expand_movcc,
10801         nds32_output_cbranchsi4_equality_zero,
10802         nds32_output_cbranchsi4_equality_reg,
10803         nds32_output_cbranchsi4_equality_reg_or_const_int,
10804         nds32_output_cbranchsi4_greater_less_zero): Declare.
10805         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
10806         nds32_rimm11s_operand): New predicates.
10807         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
10808         * config/nds32/nds32.md: Rewrite all the branch and conditional move
10809         patterns.
10811 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
10813         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
10814         * config/nds32/nds32.md: Ditto.
10815         * config/nds32/pipelines.md: Ditto.
10817 2018-04-04  Richard Biener  <rguenther@suse.de>
10819         PR tree-optimization/85168
10820         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
10821         propagating abnormals.
10823 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
10825         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
10827 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
10828             Kito Cheng  <kito.cheng@gmail.com>
10830         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
10831         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
10832         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
10833         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
10834         * config/nds32/nds32.md (sibcall_internal): New.
10835         (sibcall_register): Remove.
10836         (sibcall_immediate): Remove.
10837         (sibcall_value_internal): New.
10838         (sibcall_value_register): Remove.
10839         (sibcall_value_immediate): Remove.
10840         * config/nds32/predicates.md (nds32_general_register_operand): New.
10841         (nds32_call_address_operand): New.
10843 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
10845         PR rtl-optimization/85167
10846         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
10847         bb_defs if *split_p, instead preinitialize it to NULL.
10849         PR tree-optimization/85156
10850         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
10851         evaluating the argument multiple times.
10853 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
10855         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
10856         than vector.
10857         (_mm_cvtpd_ps): Likewise.
10858         (_mm_cvttpd_epi32): Likewise.
10859         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
10860         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
10861         vector, pixel, and bool following altivec.h include.
10863 2018-04-03  Martin Sebor  <msebor@redhat.com>
10865         * doc/extend.texi (Common Function Attributes): Clarify.
10866         (const attribute): Likewise.
10867         (pure attribute): Likewise.
10869 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
10871         PR target/85169
10872         * config/i386/i386.c (ix86_expand_vector_set): Use
10873         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
10875 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
10877         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
10878         instructions when changing rounding bits to preserve precision bits
10879         in the x87 control word.
10881 2018-04-03  Martin Liska  <mliska@suse.cz>
10883         PR tree-optimization/82491
10884         * rtl.h (strip_offset_and_add): Replace += suboffset with
10885         poly_uint64 () + suboffset.
10887 2018-03-29  Martin Liska  <mliska@suse.cz>
10888             Martin Jambor  <mjambor@suse.cz>
10890         PR ipa/84947
10891         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
10892         param_type is not an integral or pointer type.
10894 2018-04-03  Richard Biener  <rguenther@suse.de>
10896         * sese.h (recompute_all_dominators): Remove.
10898 2018-04-02  Martin Sebor  <msebor@redhat.com>
10900         * doc/invoke.texi (-Wrestrict): Fix typos.
10902 2018-04-02  Jim Wilson  <jimw@sifive.com>
10904         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
10905         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
10906         (<optab>di3, <optab>si3_extend): Likewise.
10907         (<optab>si3_mask, <optab>si3_mask_1): New.
10908         (<optab>di3_mask, <optab>di3_mask_1): New.
10909         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
10910         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
10911         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
10913 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
10915         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
10916         example.
10918 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
10920         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
10921         (nds32_canonicalize_comparison): New function.
10923 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
10924             Kito Cheng  <kito.cheng@gmail.com>
10925             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
10927         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
10928         * config/nds32/constants.md (unspec_volatile_element): Add
10929         UNSPEC_VOLATILE_RELAX_GROUP.
10930         * config/nds32/nds32-relax-opt.c: New file.
10931         * config/nds32/nds32-predicates.c
10932         (nds32_symbol_load_store_p): New function.
10933         * config/nds32/nds32-protos.h
10934         (nds32_symbol_load_store_p): Declare function.
10935         (make_pass_nds32_relax_opt): Declare new rtl pass function.
10936         * config/nds32/nds32.c
10937         (nds32_register_pass): New function to register pass.
10938         (nds32_register_passes): New function to register passes.
10939         * config/nds32/nds32.md (relax_group): New pattern.
10940         * config/nds32/nds32.opt (mrelax-hint): New option.
10941         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
10943 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
10945         * config/nds32/t-nds32: Modify files dependency.
10947 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
10949         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
10950         (PROFILE_HOOK): Define its implementation.
10952 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
10954         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
10955         type and 32-bit size.
10957 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
10959         PR middle-end/85090
10960         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
10961         (V_128_256): New mode iterator.
10962         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
10963         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
10964         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
10965         of V.
10966         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
10967         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
10969 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
10971         PR target/83315
10972         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
10973         NaN inputs correctly.
10975 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
10977         PR target/80546
10978         * config/rs6000/vsx.md (??r): New mode attribute.
10979         (*vsx_mov<mode>_64bit): Use it.
10980         (*vsx_mov<mode>_32bit): Likewise.
10982 2018-03-30  Martin Sebor  <msebor@redhat.com>
10984         PR tree-optimization/84818
10985         * builtins.c (check_access): Use warning_n.
10987 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
10989         PR target/83822
10990         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
10991         condition.
10992         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
10993         condition.
10995 2018-03-30  Julia Koval  <julia.koval@intel.com>
10997         PR target/84413
10998         * x86-tune.def (movx, partial_reg_dependency): Enable for
10999         m_SKYLAKE_AVX512.
11001 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
11003         PR inline-asm/84985
11004         * lra-constraints.c (process_alt_operands): Move setting
11005         this_alternative_matches below.
11007 2018-03-29  Martin Liska  <mliska@suse.cz>
11009         PR lto/84995.
11010         * doc/invoke.texi: Document how LTO works with debug info.
11011         Describe auto-load support of binutils.  Mention 'x86-64'
11012         as valid option value of -march option.
11014 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
11016         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
11018         PR c/85094
11019         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
11020         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
11021         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
11022         checking.
11024 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
11026         PR target/84912
11027         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
11028         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
11029         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
11030         for RS6000_BTM_POWERPC64.
11031         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
11032         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
11033         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
11034         definition.
11035         (DIVDE): Use it.
11036         (DIVDEU): Likewise.
11038 2018-03-28 Carl Love  <cel@us.ibm.com>
11040         Revert
11041         2017-09-27  Carl Love  <cel@us.ibm.com>
11043         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
11044         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
11045         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
11046         fctiw instruction.
11048 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11050         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
11051         instead of __vector bool.
11052         (_mm_max_pu8): Likewise.
11053         (_mm_min_pi16): Likewise.
11055 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
11057         PR target/84912
11058         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
11059         (DIVWEUO): Likewise.
11060         (DIVDEO): Likewise.
11061         (DIVDEUO): Likewise.
11062         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
11063         DIVWEUO and DIVDEUO.
11064         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
11065         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
11066         (div_extend): Likewise.
11067         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
11068         builtin function.
11069         (__builtin_divweuo): Likewise.
11070         (__builtin_divdeo): Likewise.
11071         (__builtin_divdeuo): Likewise.
11073 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
11075         PR target/85095
11076         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
11077         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
11079         PR tree-optimization/82004
11080         * gimple-match-head.c (optimize_pow_to_exp): New function.
11081         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
11082         Don't fold to exp if optimize_pow_to_exp is false.
11084 2018-03-28  Martin Liska  <mliska@suse.cz>
11086         PR other/84819
11087         * calls.c (initialize_argument_information): Fix trailing space.
11088         * common.opt: Fix typo and provide better explanation for
11089         -fsanitize-coverage option.
11090         * config/i386/i386.opt: Fix typo.
11092 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
11093             Martin Liska  <mliska@suse.cz>
11095         PR sanitizer/85081
11096         * gimplify.c (asan_poison_variable): Don't do the check for
11097         gimplify_omp_ctxp here.
11098         (gimplify_decl_expr): Do it here.
11099         (gimplify_target_expr): Likewise.
11101 2018-03-28  Martin Liska  <mliska@suse.cz>
11103         PR target/84988
11104         * config/i386/i386.c (ix86_function_arg_advance): Do not call
11105         chkp_type_bounds_count if MPX is not enabled.
11107 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
11109         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
11111 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
11113         PR target/84914
11114         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
11115         function to create the function decl for complex long double
11116         multiply and divide for -mabi=ieeelongdouble.
11117         (init_float128_ieee): Call it.
11119 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
11121         PR target/85044
11122         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
11123         -fcf-protection=branch -mibt.
11124         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
11126 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
11128         PR target/81863
11129         * config/arm/arm.c (arm_valid_symbolic_address): Handle
11130         arm_word_relocations.
11132 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
11134         PR target/85056
11135         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
11136         extern array declarations.
11138 2018-03-27  Richard Biener  <rguenther@suse.de>
11140         PR middle-end/84067
11141         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
11142         explicit single_use checks.
11144 2018-03-27  Richard Biener  <rguenther@suse.de>
11146         PR tree-optimization/85082
11147         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
11148         Valueize the VUSE.
11150 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
11152         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
11153         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
11154         Turn on fasynchronous-unwind-tables and funwind-tables.
11156 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
11158         PR target/85073
11159         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
11160         (*bmi_blsr_<mode>_ccz): Ditto.
11162 2018-03-26  Tom de Vries  <tom@codesourcery.com>
11164         PR tree-optimization/85063
11165         * omp-general.c (offloading_function_p): New function.  Factor out
11166         of ...
11167         * omp-offload.c (pass_omp_target_link::gate): ... here.
11168         * omp-general.h (offloading_function_p): Declare.
11169         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
11170         with attribute omp declare target for offloading functions.
11172 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
11174         PR tree-optimization/84005
11175         * tree-data-ref.h (get_base_for_alignment): Declare.
11176         * tree-data-ref.c (get_base_for_alignment_1): New function.
11177         (get_base_for_alignment): Likewise.
11178         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
11179         get_base_for_alignment to find a suitable base object, instead
11180         of always using drb->base_address.
11182 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
11184         PR inline-asm/85022
11185         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
11186         known size by default.
11188 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
11190         PR inline-asm/85030
11191         * lra-constraints.c (process_alt_operands): Don't match BLKmode
11192         and non BLKmode operands.
11194 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11196         PR target/85026
11197         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
11198         Clean up attributes.
11200 2018-03-23  Richard Biener  <rguenther@suse.de>
11202         PR debug/85020
11203         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
11204         we are going to emit early debug for LTO.
11206 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
11208         PR inline-asm/85034
11209         * function.c (match_asm_constraints_1): Don't optimize if input
11210         doesn't satisfy general_operand predicate for output's mode.
11212         PR inline-asm/85022
11213         * alias.c (write_dependence_p): Don't require for x_canonicalized
11214         non-VOIDmode if x has VOIDmode.
11216         PR sanitizer/85029
11217         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
11218         just don't try to optimize it rather than assert it never happens.
11220 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11222         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
11223         macro expansions for definition of ST_INTERNAL_<mode> and
11224         LD_INTERNAL_<mode> builtins.
11225         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
11226         Remove prototype.
11227         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
11228         function.
11229         (altivec_expand_st_builtin): Likewise.
11230         (altivec_expand_builtin): Remove calls to deleted functions.
11231         (rs6000_address_for_altivec): Delete this function.
11232         * config/rs6000/vector.md: Remove expands for
11233         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
11235 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
11237         PR target/84826
11238         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
11239         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
11240         re-computing once computed.
11241         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
11242         (arm_init_machine_status): Initialize
11243         machine->static_chain_stack_bytes.
11245 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11247         PR target/84760
11248         * doc/extend.texi: Add four new prototypes for vec_ld.
11249         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
11250         definitions for more logical presentation.
11251         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
11252         entries for V1TI variants of __builtin_altivec_ld builtin.
11253         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
11254         handling of V1TI variant of LVX icode pattern.
11255         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
11256         (rs6000_gimple_fold_builtin): Likewise.
11257         (altivec_init_builtins): Add code to define
11258         __builtin_altivec_lvx_v1ti function.
11260 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
11262         PR inline-asm/84941
11263         * function.c (match_asm_constraints_1): Don't do the optimization
11264         if input isn't a REG, SUBREG, MEM or constant.
11266 2018-03-22  Tom de Vries  <tom@codesourcery.com>
11268         PR tree-optimization/84956
11269         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
11270         bb_has_abnormal_pred.
11272 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
11274         PR sanitizer/85018
11275         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
11276         DECL_INITIAL (decl) to decl at the end.
11277         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
11278         adjust the comment.
11280 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
11282         * doc/extend.texi (__builtin_tgmath): Document when complex
11283         integer types are treated as _Complex _Float64.
11285 2018-03-21  Tom de Vries  <tom@codesourcery.com>
11287         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
11289 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
11291         PR tree-optimization/84960
11292         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
11293         if it is ENTRY block, move them into single succ of ENTRY in that case.
11295 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
11297         PR tree-optimization/84811
11298         * poly-int.h (poly_span_traits): Remove the T3 parameter and
11299         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
11300         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
11301         (known_subrange_p): Update accordingly.  Cast each value involved
11302         in the size comparison, rather than casting the result of the
11303         subtraction.
11305 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
11307         PR tree-optimization/84982
11308         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
11309         by flipping the least significant bit rather than all bits from
11310         bitpos to bitpos + bitsize - 1.
11312 2018-03-21  Nathan Sidwell  <nathan@acm.org>
11314         * doc/extend.texi (Deprecated Features): Remove mention of
11315         long-deleted deprecations.
11317 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11319         PR jit/84288
11320         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
11321         * configure: Regenerate.
11323 2018-03-21  Tom de Vries  <tom@codesourcery.com>
11325         PR tree-optimization/83126
11326         * tree-parloops.c (num_phis): New function.
11327         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
11329 2018-03-21  Nathan Sidwell  <nathan@acm.org>
11331         * doc/extend.texi (Deprecated Features): Update deprecated flags,
11332         mention anon-struct/union members and trailing attributes.
11334 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
11336         PR tree-optimization/84969
11337         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
11338         builtin memset partitions if they set different rhs values.
11340 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
11342         PR rtl-optimization/84989
11343         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
11344         VEC_DUPLICATE with scalar result mode.
11346 2018-03-21  Martin Liska  <mliska@suse.cz>
11348         PR ipa/84963
11349         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
11350         not intended return statement.
11352 2018-03-21  Martin Liska  <mliska@suse.cz>
11354         PR target/84988
11355         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
11356         (chkp_find_bound_slots_1): Limit number of iterations.
11358 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
11360         PR target/84838
11361         * Minor grammar fixes for x86 options.
11363 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
11365         PR debug/84875
11366         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
11367         holding REG_CFA_RESTORE notes, instead turn them into a USE.
11369 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
11371         PR target/83789
11372         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
11373         (altivec_lvx_<mode>_1op): Likewise.
11374         (altivec_stvx_<mode>_2op): Likewise.
11375         (altivec_stvx_<mode>_1op): Likewise.
11376         (altivec_lvx_<VM2:mode>): New define_expand.
11377         (altivec_stvx_<VM2:mode>): Likewise.
11378         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
11379         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
11380         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
11381         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
11382         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
11383         (rs6000_gen_lvx): Likewise.
11384         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
11385         (altivec_expand_stv_builtin): Likewise.
11386         (altivec_expand_builtin): Likewise.
11387         * config/rs6000/vector.md: Likewise.
11389 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11391         PR target/82518
11392         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
11393         BYTES_BIG_ENDIAN.
11395 2018-03-20  Richard Biener  <rguenther@suse.de>
11397         PR target/84986
11398         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
11399         sign-conversions as zero, fall back to standard scalar_stmt
11400         cost for the rest.
11402 2018-03-20  Martin Liska  <mliska@suse.cz>
11404         PR ipa/84825
11405         * predict.c (rebuild_frequencies): Handle case when we have
11406         PROFILE_ABSENT, but flag_guess_branch_prob is false.
11408 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
11410         PR target/84990
11411         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
11412         flag_section_anchors.
11413         * varasm.c (use_blocks_for_decl_p): Remove hack for
11414         dw2_force_const_mem.
11416         PR target/84845
11417         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
11418         to ...
11419         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
11420         be created, use lowpart_subreg of operands[0] rather than operands[0]
11421         itself.
11422         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
11423         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
11424         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
11425         and n constraint instead of aarch64_shift_imm_di and Usd.
11426         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
11427         (*aarch64_<optab>_reg_minus<mode>3): ... this.
11429 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
11431         PR target/82989
11432         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
11433         to favor GPR over NEON registers.
11434         (<shift>di3_neon): Likewise.
11436 2018-03-20  Tom de Vries  <tom@codesourcery.com>
11438         PR target/84952
11439         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
11440         (nvptx_process_pars): Emit bar.sync asap and alap.
11442 2018-03-20  Tom de Vries  <tom@codesourcery.com>
11444         PR target/84954
11445         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
11446         seen_label if seen_label is already set.
11448 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
11450         PR target/84945
11451         * config/i386/i386.c (fold_builtin_cpu): For features above 31
11452         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
11453         Use 1U instead of 1.  Formatting fixes.
11455         PR c/84953
11456         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
11457         instead of TREE_TYPE (s1) for the return value.
11459 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
11461         PR tree-optimization/84946
11462         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
11463         bitsize + bitsize in poly_uint64 rather than poly_int64.
11465         PR sanitizer/78651
11466         * dwarf2asm.c: Include fold-const.c.
11467         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
11468         of decl rather than decl itself.
11470         PR rtl-optimization/84643
11471         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
11473 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
11475         PR sanitizer/78651
11476         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
11477         calling assemble_variable.
11479 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
11481         PR target/81647
11482         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
11483         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
11485 2018-03-19  Jim Wilson  <jimw@sifive.com>
11487         PR bootstrap/84856
11488         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
11489         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
11490         (riscv_first_stack_step): Likewise.
11491         (riscv_option_override): Use STACK_BOUNDARY instead of
11492         MIN_STACK_BOUNDARY.
11493         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
11494         MIN_STACK_BOUNDARY.
11495         (BIGGEST_ALIGNMENT): Set to 128.
11496         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
11497         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
11498         STACK_BOUNDARY.
11500 2018-03-19  Richard Biener  <rguenther@suse.de>
11502         PR tree-optimization/84933
11503         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
11504         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
11506 2018-03-19  Richard Biener  <rguenther@suse.de>
11508         PR tree-optimization/84859
11509         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
11510         (cond_if_else_store_replacement): Perform sinking operation on
11511         single-store BBs regardless of MAX_STORES_TO_SINK setting.
11512         Generalize what a BB with a single eligible store is.
11514 2018-03-19  Richard Biener  <rguenther@suse.de>
11516         PR tree-optimization/84929
11517         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
11518         chrec_is_positive against non-chrec arg.
11520 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
11522         PR target/84711
11523         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
11525 2018-03-18  Martin Liska  <mliska@suse.cz>
11527         PR rtl-optimization/84635
11528         * regrename.c (build_def_use): Use matches_mode only when
11529         matches >= 0.
11531 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
11533         PR tree-optimization/84913
11534         * tree-vect-loop.c (vectorizable_reduction): Don't try to
11535         vectorize chains of COND_EXPRs.
11537 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
11539         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
11541 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
11543         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
11545 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
11547         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
11549 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
11550             Kito Cheng  <kito.cheng@gmail.com>
11552         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
11553         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
11554         (nds32_adjust_reg_alloc_order): New function.
11555         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
11557 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
11559         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
11560         nds32_print_operand, nds32_print_operand_address): Use
11561         HOST_WIDE_INT_PRINT_DEC instead.
11563 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
11565         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
11567 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
11569         PR target/84902
11570         * config/i386/i386.c (initial_ix86_tune_features,
11571         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
11572         unsigned long long.
11573         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
11574         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
11575         rather than 1u << ix86_tune.  Formatting fix.
11576         (ix86_option_override_internal): Change ix86_arch_mask from
11577         unsigned int to unsigned HOST_WIDE_INT, initialize to
11578         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
11579         (ix86_function_specific_restore): Likewise.
11581 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
11583         PR target/84899
11584         * postreload.c (reload_combine_recognize_pattern): Perform
11585         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
11586         truncate_int_for_mode the result for the destination's mode.
11588         PR c/84909
11589         * hsa-gen.c (mem_type_for_type): Fix comment typo.
11590         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
11591         Likewise.
11592         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
11593         Likewise.
11595 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
11597         PR target/84876
11598         * lra-assigns.c (lra_split_hard_reg_for): Don't use
11599         regno_allocno_class_array and sorted_pseudos.
11600         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
11601         insns where regno is used.
11603 2018-03-16  Martin Liska  <mliska@suse.cz>
11605         PR ipa/84833
11606         * multiple_target.c (create_dispatcher_calls): Redirect
11607         reference in the symbol table.
11609 2018-03-16  Martin Liska  <mliska@suse.cz>
11611         PR ipa/84722
11612         * multiple_target.c (create_dispatcher_calls): Redirect also
11613         an alias.
11615 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
11617         PR c++/79937
11618         PR c++/82410
11619         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
11620         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
11621         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
11623 2018-03-16  Julia Koval  <julia.koval@intel.com>
11625         * doc/invoke.texi (Skylake Server): Add CLWB.
11626         Cannonlake): Remove CLWB.
11628 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
11630         PR tree-optimization/84841
11631         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
11632         1 << 3.
11633         (FLOAT_ONE_CONST_TYPE): Define.
11634         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
11635         (sort_by_operand_rank): Put entries with higher constant_type last
11636         rather than first to match comments.
11638 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
11640         * config/nios2/nios2.md (movsi_internal): Fix thinko in
11641         split predicate.
11643 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
11645         PR c++/79085
11646         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
11647         check and use address of target always.
11649 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
11651         PR target/84574
11652         * config/i386/i386.c (indirect_thunk_needed): Update comments.
11653         (indirect_thunk_bnd_needed): Likewise.
11654         (indirect_thunks_used): Likewise.
11655         (indirect_thunks_bnd_used): Likewise.
11656         (indirect_return_needed): New.
11657         (indirect_return_bnd_needed): Likewise.
11658         (output_indirect_thunk_function): Add a bool argument for
11659         function return.
11660         (output_indirect_thunk_function): Don't generate alias for
11661         function return thunk.
11662         (ix86_code_end): Call output_indirect_thunk_function to generate
11663         function return thunks.
11664         (ix86_output_function_return): Set indirect_return_bnd_needed
11665         and indirect_return_needed instead of indirect_thunk_bnd_needed
11666         and indirect_thunk_needed.
11668 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
11670         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
11671         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
11672         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
11674 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
11675             Paul Hua <paul.hua.gm@gmail.com>
11677         PR c/84852
11678         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
11680 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
11682         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
11683         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
11684         resp. SFmode cases.
11686 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
11688         PR target/84711
11689         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
11690         instead of GET_MODE_SIZE when comparing Units.
11692 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
11694         PR target/68256
11695         * varasm.c (hash_section): Return an unchangeble hash value
11696         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
11697         Return !aarch64_can_use_per_function_literal_pools_p ().
11699 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
11701         PR target/84860
11702         * optabs.c (emit_conditional_move): Pass address of cmode's copy
11703         rather than address of cmode as last argument to prepare_cmp_insn.
11705 2018-03-15  Julia Koval  <julia.koval@intel.com>
11707         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
11708         F_AVX512VNNI, F_AVX512BITALG): New.
11710 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
11712         PR target/83451
11713         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
11714         insn for floating-point loads and stores.
11716 2018-03-14  Carl Love  <cel@us.ibm.com>
11718         * config/rs6000/rs6000-c.c: Add macro definitions for
11719         ALTIVEC_BUILTIN_VEC_PERMXOR.
11720         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
11721         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
11722         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
11723         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
11724         UNSPEC_VPERMXOR.
11725         * config/doc/extend.texi: Add prototypes for vec_permxor.
11727 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
11729         PR c/84852
11730         * diagnostic-show-locus.c (class layout_point): Convert m_line
11731         from int to linenum_type.
11732         (line_span::comparator): Use linenum "compare" function when
11733         comparing line numbers.
11734         (test_line_span): New function.
11735         (layout_range::contains_point): Convert param "row" from int to
11736         linenum_type.
11737         (layout_range::intersects_line_p): Likewise.
11738         (layout::will_show_line_p): Likewise.
11739         (layout::print_source_line): Likewise.
11740         (layout::should_print_annotation_line_p): Likewise.
11741         (layout::print_annotation_line): Likewise.
11742         (layout::print_leading_fixits): Likewise.
11743         (layout::annotation_line_showed_range_p): Likewise.
11744         (struct line_corrections): Likewise for field m_row.
11745         (line_corrections::line_corrections): Likewise for param "row".
11746         (layout::print_trailing_fixits): Likewise.
11747         (layout::get_state_at_point): Likewise.
11748         (layout::get_x_bound_for_row): Likewise.
11749         (layout::print_line): Likewise.
11750         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
11751         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
11752         * input.c (selftest::test_linenum_comparisons): New function.
11753         (selftest::input_c_tests): Call it.
11754         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
11755         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
11756         * selftest.h (ASSERT_GT): New macro.
11757         (ASSERT_GT_AT): New macro.
11758         (ASSERT_LT): New macro.
11759         (ASSERT_LT_AT): New macro.
11761 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
11763         PR rtl-optimization/84780
11764         * combine.c (distribute_links): Don't make a link based on pc_rtx.
11766 2018-03-14  Martin Liska  <mliska@suse.cz>
11768         * tree.c (record_node_allocation_statistics): Use
11769         get_stats_node_kind.
11770         (get_stats_node_kind): New function extracted from
11771         record_node_allocation_statistics.
11772         (free_node): Use get_stats_node_kind.
11774 2018-03-14  Richard Biener  <rguenther@suse.de>
11776         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
11777         that the value-set of ANTIC_IN doesn't grow.
11779         Revert
11780         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
11781         member.
11782         (BB_VISITED_WITH_VISITED_SUCCS): New define.
11783         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
11785 2018-03-14  Julia Koval  <julia.koval@intel.com>
11787         * config.gcc (icelake-client, icelake-server): New.
11788         (icelake): Remove.
11789         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
11790         (initial_ix86_arch_features): Ditto.
11791         (PTA_SKYLAKE): Add SGX.
11792         (PTA_ICELAKE): Remove.
11793         (PTA_ICELAKE_CLIENT): New.
11794         (PTA_ICELAKE_SERVER): New.
11795         (ix86_option_override_internal): Split up icelake on icelake client and
11796         icelake server.
11797         (get_builtin_code_for_version): Ditto.
11798         (fold_builtin_cpu): Ditto.
11799         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
11800         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
11801         * config/i386/i386.h (processor_type): Ditto.
11802         * doc/invoke.texi: Ditto.
11804 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
11806         PR sanitizer/83392
11807         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
11808         INTEGER_CST offset, add it together with bitpos / 8 and
11809         sign extend based on POINTER_SIZE.
11811         PR target/84844
11812         Revert
11813         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
11815         PR target/78090
11816         * config/i386/constraints.md (Yc): New register constraint.
11817         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
11818         Use Yc constraint for alternative 2 of operand 0.  Remove
11819         preferred_for_speed attribute.
11821 2018-03-14  Richard Biener  <rguenther@suse.de>
11823         PR tree-optimization/84830
11824         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
11825         with the old one to avoid oscillations.
11827 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
11829         PR target/83712
11830         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
11831         pseudos.
11832         (assign_by_spills): Return a flag of reload assignment failure.
11833         Do not process the reload assignment failures.  Do not spill other
11834         reload pseudos if they has the same reg class.  Update n if
11835         necessary.
11836         (lra_assign): Add a return arg.  Set up from the result of
11837         assign_by_spills call.
11838         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11839         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
11840         usage_insns if it is not NULL.
11841         (spill_hard_reg_in_range): New function.
11842         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11843         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11844         function prototypes.
11845         (lra_assign): Change prototype.
11846         * lra.c (lra): Add code to deal with fails by splitting hard reg
11847         live ranges.
11849 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
11851         * config/riscv/riscv.opt (mrelax): New option.
11852         * config/riscv/riscv.c (riscv_file_start): Emit ".option
11853         "norelax" when riscv_mrelax is disabled.
11854         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
11856 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
11858         PR target/84743
11859         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
11860         reassociation for int modes.
11862 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
11864         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
11865         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
11866         for big-endian.
11867         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
11868         * config/aarch64/aarch64-sve.md
11869         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
11870         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
11871         (*extend<mode><Vwide>2): Rename to...
11872         (aarch64_sve_extend<mode><Vwide>2): ...this.
11873         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
11874         renaming the old pattern to...
11875         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
11876         unsigned packs.
11877         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
11878         define_expand, renaming the old pattern to...
11879         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
11880         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
11881         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
11882         account when deciding which SVE instruction the optab should use.
11883         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
11885 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
11887         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
11888         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
11889         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
11890         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
11891         (tlsdesc_small_<mode>): Turn a define_expand and use
11892         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
11893         (tlsdesc_small_advsimd_<mode>): ...this.
11894         (tlsdesc_small_sve_<mode>): New pattern.
11896 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
11898         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
11899         (UNSPEC_UMUL_HIGHPART): New constants.
11900         (MUL_HIGHPART): New int iteraor.
11901         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
11902         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
11903         define_expand.
11904         (*<su>mul<mode>3_highpart): New define_insn.
11906 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
11908         PR lto/84805
11909         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11910         incomplete types.
11912 2018-03-13  Martin Liska  <mliska@suse.cz>
11914         PR ipa/84658.
11915         * (sem_item_optimizer::sem_item_optimizer): Initialize new
11916         vector.
11917         (sem_item_optimizer::~sem_item_optimizer): Release it.
11918         (sem_item_optimizer::merge_classes): Register variable aliases.
11919         (sem_item_optimizer::fixup_pt_set): New function.
11920         (sem_item_optimizer::fixup_points_to_sets): Likewise.
11921         * ipa-icf.h: Declare new variables and functions.
11923 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
11925         PR middle-end/84834
11926         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
11927         integer_pow2p@2 and test integer_pow2p in condition.
11928         (A < 0 ? C : 0): Similarly for @1.
11930         PR middle-end/84831
11931         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
11932         characters starting at p contain '\0' character, don't look beyond
11933         that.
11935         PR target/84827
11936         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
11937         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
11939         PR target/84828
11940         * reg-stack.c (change_stack): Change update_end var from int to
11941         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
11942         also call set_block_for_insn on the newly added insns and rescan.
11944         PR target/84786
11945         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
11946         on the last operand.
11948         PR c++/84704
11949         * tree.c (stabilize_reference_1): Return save_expr (e) for
11950         STATEMENT_LIST even if it doesn't have side-effects.
11952 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
11954         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
11956 2018-03-12  Renlin Li  <renlin.li@arm.com>
11958         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
11959         aarch64_output_scalar_simd_mov_immediate.
11961 2018-03-12  Martin Sebor  <msebor@redhat.com>
11963         PR tree-optimization/83456
11964         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
11965         for perfectly overlapping calls to memcpy.
11966         (gimple_fold_builtin_memory_chk): Same.
11967         (gimple_fold_builtin_strcpy): Handle no-warning.
11968         (gimple_fold_builtin_stxcpy_chk): Same.
11969         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
11971 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
11973         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
11974         parameter.  Use it for SFmode.
11975         (rs6000_function_arg_advance_1): Adjust.
11976         (rs6000_function_arg): Adjust.
11977         (rs6000_gimplify_va_arg): Pass false for that new parameter.
11979 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
11981         PR rtl-optimization/84169
11982         PR rtl-optimization/84780
11983         * combine.c (can_combine_p): Check for a 2-insn combination whether
11984         the destination register is used between the two insns, too.
11986 2018-03-12  Richard Biener  <rguenther@suse.de>
11988         PR tree-optimization/84803
11989         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
11990         for refs DR analysis didn't process.
11992 2018-03-12  Richard Biener  <rguenther@suse.de>
11994         PR tree-optimization/84777
11995         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
11996         force-vectorize loops ignore whether we are optimizing for size.
11998 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
12000         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
12001         (TARGET_MD_ASM_ADJUST): Define.
12003 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
12004             Kito Cheng  <kito.cheng@gmail.com>
12005             Chung-Ju Wu  <jasonwucj@gmail.com>
12007         * config/nds32/nds32.c (nds32_compute_stack_frame,
12008         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
12009         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
12010         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
12011         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
12012         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
12013         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
12014         * config/nds32/nds32.md (prologue, epilogue): Use macro
12015         NDS32_V3PUSH_AVAILABLE_P to do checking.
12017 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
12019         PR debug/58150
12020         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
12021         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
12022         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
12023         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
12024         addition of most attributes on !orig_type_die or the attribute not
12025         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
12027 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
12028             Chung-Ju Wu  <jasonwucj@gmail.com>
12030         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
12031         __NDS32_VH__ macro.
12032         * config/nds32/nds32.opt (mvh): New option.
12034 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
12035             Chung-Ju Wu  <jasonwucj@gmail.com>
12037         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
12038         function.
12039         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
12040         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
12041         definition.
12043 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
12044             Chung-Ju Wu  <jasonwucj@gmail.com>
12046         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
12047         function.
12048         * config/nds32/nds32-multiple.md (strlensi): New pattern.
12049         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
12051 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
12052             Kito Cheng  <kito.cheng@gmail.com>
12053             Chung-Ju Wu  <jasonwucj@gmail.com>
12055         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
12056         UNSPEC_FFMISM and UNSPEC_FLMISM.
12057         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
12058         for ffb, ffmism and flmism.
12059         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
12060         (unspec_ffmism): Ditto.
12061         (unspec_flmism): Ditto.
12062         (nds32_expand_builtin_impl): Check if string extension is available.
12063         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
12064         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
12066 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
12068         Reverting patch:
12069         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
12071         PR target/83712
12072         * lra-assigns.c (assign_by_spills): Return a flag of reload
12073         assignment failure.  Do not process the reload assignment
12074         failures.  Do not spill other reload pseudos if they has the same
12075         reg class.
12076         (lra_assign): Add a return arg.  Set up from the result of
12077         assign_by_spills call.
12078         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12079         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
12080         usage_insns if it is not NULL.
12081         (spill_hard_reg_in_range): New function.
12082         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12083         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12084         function prototypes.
12085         (lra_assign): Change prototype.
12086         * lra.c (lra): Add code to deal with fails by splitting hard reg
12087         live ranges.
12089 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
12091         PR target/84807
12092         * config/i386/i386.opt: Replace Enforcment with Enforcement.
12094 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
12096         PR debug/84620
12097         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
12098         (dw_val_node): Add val_symbolic_view.
12099         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
12100         (symview_upper_bound): New.
12101         (new_line_info_table): Initialize symviews_since_reset.
12102         (dwarf2out_source_line): Count symviews_since_reset and set
12103         symview_upper_bound.
12104         (dw_val_equal_p): Handle symview.
12105         (add_AT_symview): New.
12106         (print_dw_val): Handle symview.
12107         (attr_checksum, attr_checksum_ordered): Likewise.
12108         (same_dw_val_p, size_of_die): Likewise.
12109         (value_format, output_die): Likewise.
12110         (add_high_low_attributes): Use add_AT_symview for entry_view.
12111         (dwarf2out_finish): Reset symview_upper_bound, clear
12112         zero_view_p.
12114 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
12116         PR target/83969
12117         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
12118         Add strict argument and use it.
12119         (rs6000_split_multireg_move): Update for new strict argument.
12120         (mem_operand_gpr): Disallow all non-offsettable addresses.
12121         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
12123 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
12125         PR target/84772
12126         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
12127         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
12128         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
12130         PR c++/84767
12131         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
12132         decl, use remap_type if we want to use the type.
12134 2018-03-09  Martin Sebor  <msebor@redhat.com>
12136         PR tree-optimization/84526
12137         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12138         Remove dead code.
12139         (builtin_access::generic_overlap): Be prepared to handle non-array
12140         base objects.
12142 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
12144         PR rtl-optimization/84682
12145         * lra-constraints.c (process_address_1): Check is_address flag
12146         for address constraints.
12147         (process_alt_operands): Likewise.
12148         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
12149         preprocess_constraints.
12150         * recog.h (preprocess_constraints): Add oploc parameter.
12151         Adjust callers.
12152         * recog.c (preprocess_constraints): Test address_operand for
12153         CT_ADDRESS constraints.
12155 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
12157         PR target/83712
12158         * lra-assigns.c (assign_by_spills): Return a flag of reload
12159         assignment failure.  Do not process the reload assignment
12160         failures.  Do not spill other reload pseudos if they has the same
12161         reg class.
12162         (lra_assign): Add a return arg.  Set up from the result of
12163         assign_by_spills call.
12164         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12165         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
12166         usage_insns if it is not NULL.
12167         (spill_hard_reg_in_range): New function.
12168         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12169         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12170         function prototypes.
12171         (lra_assign): Change prototype.
12172         * lra.c (lra): Add code to deal with fails by splitting hard reg
12173         live ranges.
12175 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12177         PR target/83193
12178         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
12179         Accept complain bool parameter.  Only emit errors if it is true.
12180         (arm_parse_cpu_option_name): Likewise.
12181         (arm_target_thumb_only): Adjust callers of the above.
12182         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
12183         prototype to take a default true bool parameter.
12184         (arm_parse_arch_option_name): Likewise.
12186 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
12187             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
12189         PR jit/64089
12190         PR jit/84288
12191         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
12192         * configure: Regenerate.
12193         * configure.ac ("linker --version-script option"): New.
12194         ("linker soname option"): New.
12196 2018-03-09  Richard Biener  <rguenther@suse.de>
12198         PR tree-optimization/84775
12199         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
12200         immediate uses of predicate stmts and mark them modified.
12202         Revert
12203         PR tree-optimization/84178
12204         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12205         to caller.
12206         (version_loop_for_if_conversion): Delay update_ssa call.
12207         (tree_if_conversion): Delay update_ssa until after predicate
12208         insertion.
12210 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
12212         PR target/84763
12213         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
12214         when the function accesses prior frames.
12216 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
12218         PR debug/84456
12219         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
12220         gen_llsym, otherwise call maybe_gen_llsym.
12222         PR inline-asm/84742
12223         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
12224         has ',' character inside of it.
12226 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12228         PR target/84748
12229         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
12230         as clobbering CC_REGNUM.
12232 2018-03-08  Richard Biener  <rguenther@suse.de>
12234         PR middle-end/84552
12235         * tree-scalar-evolution.c: Include tree-into-ssa.h.
12236         (follow_copies_to_constant): Do not follow SSA names registered
12237         for update.
12239 2018-03-08  Richard Biener  <rguenther@suse.de>
12241         PR tree-optimization/84178
12242         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12243         to caller.
12244         (version_loop_for_if_conversion): Delay update_ssa call.
12245         (tree_if_conversion): Delay update_ssa until after predicate
12246         insertion.
12248 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
12250         PR tree-optimization/84178
12251         * tree-if-conv.c (release_bb_predicate): Remove the
12252         the assertion that the stmts have NULL use_ops.
12253         Discard the statements, asserting that they haven't
12254         yet been added to a BB.
12256 2018-03-08  Richard Biener  <rguenther@suse.de>
12258         PR tree-optimization/84746
12259         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
12260         (phi_translate): Pass in destination ANTIC_OUT set.
12261         (phi_translate_1): Likewise.  For a simplified result lookup
12262         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
12263         (phi_translate_set): Adjust.
12264         (do_pre_regular_insertion): Likewise.
12265         (do_pre_partial_partial_insertion): Likewise.
12267 2018-03-08  Martin Liska  <mliska@suse.cz>
12269         PR gcov-profile/84735
12270         * doc/gcov.texi: Document usage of profile files.
12271         * gcov-io.h: Document changes in the format.
12273 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
12275         PR debug/84404
12276         PR debug/84408
12277         * dwarf2out.c (struct dw_line_info_table): Update comments for
12278         view == -1.
12279         (FORCE_RESET_NEXT_VIEW): New.
12280         (FORCE_RESETTING_VIEW_P): New.
12281         (RESETTING_VIEW_P): Check for -1 too.
12282         (ZERO_VIEW_P): Likewise.
12283         (new_line_info_table): Force-reset next view.
12284         (dwarf2out_begin_function): Likewise.
12285         (dwarf2out_source_line): Simplify zero_view_p initialization.
12286         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
12287         view directly.  Omit view when omitting .loc at line 0.
12289 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
12291         PR tree-optimization/84740
12292         * tree-switch-conversion.c (process_switch): Call build_constructors
12293         only if info.phi_count is non-zero.
12295         PR tree-optimization/84739
12296         * tree-tailcall.c (find_tail_calls): Check call arguments against
12297         DECL_ARGUMENTS (current_function_decl) rather than
12298         DECL_ARGUMENTS (func) when checking for tail recursion.
12300 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
12302         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
12303         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
12304         Volker Reichelt's entry and add entries for people that perform
12305         GCC fuzzy testing and report numerous bugs.
12307 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
12309         PR target/82411
12310         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
12311         readonly data in sdata, if that is disabled.
12312         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
12313         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
12314         -mreadonly-in-sdata option.
12316 2018-03-07  Martin Sebor  <msebor@redhat.com>
12318         PR tree-optimization/84468
12319         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
12320         basic block when looking for nul assignment.
12322 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
12324         PR target/84277
12325         * except.h (output_function_exception_table): Adjust prototype.
12326         * except.c (output_function_exception_table): Remove FNNAME parameter
12327         and add SECTION parameter.  Ouput one part of the table at a time.
12328         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
12329         the first part of the exception table and emit unwind directives.
12330         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
12331         (i386_pe_seh_cold_init): Likewise.
12332         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
12333         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
12334         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
12335         (ix86_output_call_insn): Emit a nop in one more case for SEH.
12336         * config/i386/winnt.c: Include except.h.
12337         (struct seh_frame_state): Add reg_offset, after_prologue and
12338         in_cold_section fields.
12339         (i386_pe_seh_end_prologue): Set seh->after_prologue.
12340         (i386_pe_seh_cold_init): New function.
12341         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
12342         to seh->in_cold_section.
12343         (seh_emit_push): Record the offset of the push.
12344         (seh_emit_save): Record the offet of the save.
12345         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
12346         Test seh->after_prologue to disregard the epilogue.
12347         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
12348         (i386_pe_end_cold_function): New function.
12350 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
12352         PR fortran/84565
12353         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
12354         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
12356         PR c++/84704
12357         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
12358         on tmp_var.
12359         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
12360         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
12362         PR middle-end/84723
12363         * multiple_target.c: Include tree-inline.h and intl.h.
12364         (expand_target_clones): Diagnose and fail if node->definition and
12365         !tree_versionable_function_p (node->decl).
12367 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
12369         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
12370         sprint_ul.
12371         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
12372         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
12373         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
12375 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
12377         PR target/84710
12378         * combine.c (try_combine): Use reg_or_subregno instead of handling
12379         just paradoxical SUBREGs and REGs.
12381 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
12383         * config/arc/arc.c (arc_finalize_pic): Remove function.
12384         (arc_must_save_register): We use single base PIC register, remove
12385         checks to save/restore the PIC register.
12386         (arc_expand_prologue): Likewise.
12387         * config/arc/arc-protos.h (arc_set_default_type_attributes):
12388         Remove.
12389         (arc_verify_short): Likewise.
12390         (arc_attr_type): Likewise.
12391         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
12392         (walk_stores): Likewise.
12393         (arc_address_cost): Make it static.
12394         (arc_verify_short): Likewise.
12395         (branch_dest): Likewise.
12396         (arc_attr_type): Likewise.
12397         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
12398         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
12399         (arc_final_prescan_insn): Remove inserting the nops due to
12400         hardware hazards.  It is done in reorg step.
12401         (insn_length_variant_t): Remove.
12402         (insn_length_parameters_t): Likewise.
12403         (arc_insn_length_parameters): Likewise.
12404         (arc_get_insn_variants): Likewise.
12405         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
12407 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
12409         PR inline-asm/84683
12410         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
12411         assertion failure.
12413         PR tree-optimization/84687
12414         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
12415         on new_node->decl.
12416         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
12418 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12420         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
12421         Rename to ppc_speculation_barrier.
12422         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
12423         __builtin_ppc_speculation_barrier.
12425 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
12427         PR target/84700
12428         * combine.c (combine_simplify_rtx): Don't try to simplify if
12429         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
12430         are equal to x.
12432 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
12434         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
12435         to 32 bytes when compiling for POWER9.
12437 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
12439         PR target/84564
12440         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
12441         regparm >= 3 with no arg reg available also for calls with
12442         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
12444         PR target/84524
12445         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
12446         orig,vex.
12447         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
12449 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
12451         PR target/84264
12452         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
12454 2018-03-05  Richard Biener  <rguenther@suse.de>
12456         PR tree-optimization/84486
12457         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
12458         When inserting a __builtin_assume_aligned call set the LHS
12459         SSA name alignment info accordingly.
12461 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
12463         PR tree-optimization/84114
12464         * config/aarch64/aarch64.c (aarch64_reassociation_width)
12465         Avoid reassociation of FLOAT_MODE addition.
12467 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
12469         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
12470         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
12471         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
12472         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
12473         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
12474         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
12475         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
12476         and -mwbnoinvd.
12477         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
12478         __builtin_ia32_wbinvd): New builtins.
12479         (SPECIAL_ARGS2): New.
12480         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
12481         (SPECIAL_ARGS2): New.
12482         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
12483         (ix86_valid_target_attribute_inner_p): Ditto.
12484         (ix86_init_mmx_sse_builtins): Add special_args2.
12485         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
12486         TARGET_WBNOINVD_P): New.
12487         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
12488         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
12489         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
12490         * config/i386/immintrin.h (_wbinvd): New intrinsic.
12491         * config/i386/pconfigintrin.h: New file.
12492         * config/i386/wbnoinvdintrin.h: Ditto.
12493         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
12494         wbnoinvdintrin.h.
12495         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
12497 2018-03-05  Richard Biener  <rguenther@suse.de>
12499         PR tree-optimization/84670
12500         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12501         member.
12502         (BB_VISITED_WITH_VISITED_SUCCS): New define.
12503         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12504         (compute_antic_aux): Only assert the number of values in ANTIC_IN
12505         doesn't grow if all successors (recursively) were visited at least
12506         once.
12508 2018-03-05  Richard Biener  <rguenther@suse.de>
12510         PR tree-optimization/84650
12511         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
12512         if executed in the loop pipeline.
12514 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
12516         * doc/configfiles.texi (Configuration Files): Move info about
12517         conditionalizing $target-protos.h to...
12518         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
12519         differs from $target-protos.h.
12521 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
12522             Chung-Ju Wu  <jasonwucj@gmail.com>
12524         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
12525         * config/nds32/nds32-multiple.md (setmemsi): Define.
12526         * config/nds32/nds32-memory-manipulation.c
12527         (nds32_gen_dup_4_byte_to_word_value): New.
12528         (emit_setmem_word_loop): New.
12529         (emit_setmem_byte_loop): New.
12530         (nds32_expand_setmem_loop): New.
12531         (nds32_expand_setmem_loop_v3m): New.
12532         (nds32_expand_setmem_unroll): New.
12533         (nds32_expand_setmem): New.
12535 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
12536             Chung-Ju Wu  <jasonwucj@gmail.com>
12538         * config/nds32/nds32-memory-manipulation.c
12539         (nds32_emit_load_store): New.
12540         (nds32_emit_post_inc_load_store): New.
12541         (nds32_emit_mem_move): New.
12542         (nds32_emit_mem_move_block): New.
12543         (nds32_expand_movmemsi_loop_unknown_size): New.
12544         (nds32_expand_movmemsi_loop_known_size): New.
12545         (nds32_expand_movmemsi_loop): New.
12546         (nds32_expand_movmemsi_unroll): New.
12547         (nds32_expand_movmemqi): Rename ...
12548         (nds32_expand_movmemsi): ... to this.
12549         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
12550         (movmemsi): ... to this.
12551         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
12552         (nds32_expand_movmemsi): ... to this.
12554 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
12555             Monk Chiang  <sh.chiang04@gmail.com>
12556             Chung-Ju Wu  <jasonwucj@gmail.com>
12558         * config/nds32/nds32-protos.h
12559         (nds32_expand_load_multiple): New arguments.
12560         (nds32_expand_store_multiple): Ditto.
12561         (nds32_valid_multiple_load_store): Rename ...
12562         (nds32_valid_multiple_load_store_p): ... to this.
12563         * config/nds32/nds32-memory-manipulation.c
12564         (nds32_expand_load_multiple): Refine implementation.
12565         (nds32_expand_store_multiple): Ditto.
12566         * config/nds32/nds32-multiple.md
12567         (load_multiple): Update nds32_expand_load_multiple interface.
12568         (store_multiple): Update nds32_expand_store_multiple interface.
12569         * config/nds32/nds32-predicates.c
12570         (nds32_valid_multiple_load_store): Rename ...
12571         (nds32_valid_multiple_load_store_p): ... to this and refine
12572         implementation.
12573         * config/nds32/predicates.md
12574         (nds32_load_multiple_and_update_address_operation): New predicate.
12575         (nds32_store_multiple_and_update_address_operation): New predicate.
12577 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
12578             Chung-Ju Wu  <jasonwucj@gmail.com>
12580         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
12581         (combo): New attribute.
12582         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
12584 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
12586         * config/nds32/nds32.opt: Change -mcmodel= default value.
12588 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
12589             Monk Chiang  <sh.chiang04@gmail.com>
12590             Chung-Ju Wu  <jasonwucj@gmail.com>
12592         * config/nds32/constants.md (unspec_element): New enum.
12593         * config/nds32/constraints.md (Umw): New constraint.
12594         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
12595         * config/nds32/nds32-intrinsic.md: Likewise.
12596         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
12597         (nds32_valid_smw_lwm_base_p): New.
12598         (nds32_output_smw_single_word): New.
12599         (nds32_output_lmw_single_word): New.
12600         (nds32_expand_unaligned_load): New.
12601         (nds32_expand_unaligned_store): New.
12602         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
12603         (nds32_output_smw_single_word): Declare.
12604         (nds32_output_lmw_single_word): Declare.
12605         (nds32_expand_unaligned_load): Declare.
12606         (nds32_expand_unaligned_store): Declare.
12607         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
12608         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
12609         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
12610         NDS32_BUILTIN_UASTORE_DW.
12611         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
12612         predicate.
12614 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
12615             Kito Cheng  <kito.cheng@gmail.com>
12616             Chung-Ju Wu  <jasonwucj@gmail.com>
12618         * config/nds32/nds32-intrinsic.c
12619         (nds32_expand_builtin_null_ftype_reg): Delete.
12620         (nds32_expand_builtin_reg_ftype_imm): Ditto.
12621         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
12622         (nds32_read_argument): New.
12623         (nds32_legitimize_target): Ditto.
12624         (nds32_legitimize_argument): Ditto.
12625         (nds32_check_constant_argument): Ditto.
12626         (nds32_expand_unop_builtin): Ditto.
12627         (nds32_expand_unopimm_builtin): Ditto.
12628         (nds32_expand_binop_builtin): Ditto.
12629         (nds32_builtin_decl_impl): Ditto.
12630         (builtin_description): Ditto.
12631         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
12632         (nds32_init_builtins_impl): Ditto.
12633         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
12634         (nds32_builtin_decl): New.
12635         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
12636         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
12638 2018-03-02  Jeff Law  <law@redhat.com>
12640         * reorg.c (stop_search_p): Handle DEBUG_INSN.
12641         (redundant_insn, fill_simple_delay_slots): Likewise.
12642         (fill_slots_from_thread): Likewise.
12643         * resource.c (mark_referenced_resources): Likewise.
12644         (mark_set_resources, find_dead_or_set_registers): Likewise.
12646 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
12648         * substring-locations.h (format_warning_va): Formatting fix for
12649         ATTRIBUTE_GCC_DIAG.
12650         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
12651         argument.
12652         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
12653         * substring-locations.c: Include intl.h.
12654         (format_warning_va): Turned into small wrapper around
12655         format_warning_n_va, renamed to ...
12656         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
12657         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
12658         use ngettext.
12659         (format_warning_at_substring_n): New function.
12660         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
12661         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
12662         format_warning_at_substring with just a shorter name instead of
12663         const function pointer.
12664         (fmtwarn_n): New function.
12665         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
12666         appropriate, get rid of all the fmtstr temporaries, move conditionals
12667         with G_() wrapped string literals directly into fmtwarn arguments,
12668         cast dir.len to (int), formatting fixes.
12670 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
12672         * doc/invoke.texi: Remove "Cilk Plus" references.
12674 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
12675             Richard Biener  <rguenther@suse.de>
12677         PR ipa/84628
12678         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
12679         for error or warning attributes if CALL_FROM_THUNK_P is set.
12680         Formatting fixes.
12682 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
12684         PR target/56540
12685         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
12686         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
12688         PR target/56540
12689         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
12690         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
12692         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
12693         instead of -1U in last predictors element's probability member.
12695 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
12697         PR ipa/83983
12698         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12699         arguments if they are comparable.
12701 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
12703         PR tree-optimization/84634
12704         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
12705         masks and masked_loop_p with a single loop_masks, making sure it's
12706         null for bb vectorization.
12708 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
12710         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
12711         (vect_analyze_data_ref_access): Use loop->safe_len rather than
12712         loop->force_vectorize to check whether there is no alias.
12714 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
12716         PR target/84614
12717         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
12718         prototypes.
12719         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
12720         comments.
12721         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
12722         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
12723         instead of a loop around prev_real_insn.
12724         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
12725         prev_real_insn.
12727         PR inline-asm/84625
12728         * config/i386/i386.c (ix86_print_operand): Use conditional
12729         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
12730         zero vector.
12732 2018-03-02  Richard Biener  <rguenther@suse.de>
12734         PR tree-optimization/84427
12735         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
12736         (bitmap_set_subtract_values): Rewrite to handle multiple
12737         exprs per value.
12738         (clean): Likewise.
12739         (prune_clobbered_mems): Likewise.
12740         (phi_translate): Take edge instead of pred/phiblock.
12741         (phi_translate_1): Likewise.
12742         (phi_translate_set): Likewise.  Insert all translated
12743         exprs for a value into the set, keeping possibly multiple
12744         expressions per value.
12745         (compute_antic_aux): Adjust for phi_translate changes.
12746         When intersecting union the expressions and prune those
12747         not in the final value set, keeping possibly multiple
12748         expressions per value.  Do not use value-insertion
12749         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
12750         all expressions.  Add verification that the value-sets
12751         only shrink during iteration.
12752         (compute_partial_antic_aux): Adjust for the phi_translate changes.
12753         (do_pre_regular_insertion): Likewise.
12754         (do_pre_partial_partial_insertion): Likewise.
12756 2018-03-02  Richard Biener  <rguenther@suse.de>
12758         PR target/82005
12759         * config/darwin.c (saved_debug_info_level): New static global.
12760         (darwin_asm_lto_start): Disable debug info generation for LTO out.
12761         (darwin_asm_lto_end): Restore debug info generation settings.
12763 2018-03-01  Martin Liska  <mliska@suse.cz>
12765         PR sanitizer/82484
12766         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
12767         volatile arguments.
12769 2018-03-01  Richard Biener  <rguenther@suse.de>
12771         PR debug/84645
12772         * dwarf2out.c (gen_variable_die): Properly handle late VLA
12773         type annotation with LTO when debug was disabled at compile-time.
12775 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
12777         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
12778         XINT with INTVAL.
12779         (mips_final_postscan_insn): Likewise.
12781 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
12783         PR rtl-optimization/84528
12784         * alias.c (init_alias_target): Add commentary.
12785         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
12786         a unique base value if the frame pointer is not eliminated
12787         to the stack pointer.
12789 2018-03-01  Tom de Vries  <tom@codesourcery.com>
12791         PR rtl-optimization/83327
12792         * lra-int.h (hard_regs_spilled_into): Declare.
12793         * lra.c (hard_regs_spilled_into): Define.
12794         (init_reg_info): Init hard_regs_spilled_into.
12795         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
12796         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
12797         (process_bb_lives): Handle hard_regs_spilled_into.
12798         (lra_create_live_ranges_1): Before doing liveness propagation, clear
12799         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
12801 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
12803         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
12804         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
12805         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
12806         * config/rs6000/aix72.h: New file.
12808 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
12810         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
12811         instead of warning_at with conditional singular and plural messages
12812         where possible.
12814         PR target/52991
12815         * stor-layout.c (update_alignment_for_field): For
12816         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
12817         && !DECL_PACKED (field), do the alignment update, just use
12818         only desired_align instead of MAX (type_align, desired_align)
12819         as the alignment.
12820         (place_field): Don't do known_align < desired_align handling
12821         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
12822         is non-NULL, instead do it after rli->prev_field handling and
12823         only if not within a bitfield word.  For DECL_PACKED (field)
12824         use type_align of BITS_PER_UNIT.
12826 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
12828         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
12829         superfluous parentheses and trailing spaces.
12831 2018-02-28  Richard Biener  <rguenther@suse.de>
12833         PR tree-optimization/84584
12834         * graphite-scop-detection.c (scop_detection::add_scop): Discard
12835         SCoPs with fake exit edge.
12837 2018-02-28  Martin Liska  <mliska@suse.cz>
12839         PR testsuite/84597
12840         * timevar.c (timer::print): Fix format to properly print 100%
12841         values.
12843 2018-02-28  Richard Biener  <rguenther@suse.de>
12845         PR middle-end/84607
12846         * genmatch.c (capture_info::walk_match): Do not mark
12847         captured expressions without operands as expr_p given
12848         they act more like predicates and should be subject to
12849         "lost tail" side-effect preserving.
12851 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
12853         PR rtl-optimization/81611
12854         * auto-inc-dec.c (attempt_change): Move dead note from
12855         mem_insn if it's the next use of regno
12856         (find_address): Take address use of reg holding
12857         non-incremented value.  Add parm to limit search to the named
12858         reg only.
12859         (merge_in_block): Attempt to use a mem insn that is the next
12860         use of the original regno.
12862 2018-02-27  Martin Sebor  <msebor@redhat.com>
12864         PR c++/83871
12865         * doc/invoke.texi (-Wmissing-attributes): New option.
12866         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
12868 2018-02-27  Martin Sebor  <msebor@redhat.com>
12870         PR translation/84207
12871         * diagnostic-core.h (warning_n, error_n, inform_n): Change
12872         n argument to unsigned HOST_WIDE_INT.
12873         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
12874         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
12875         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
12876         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
12878 2018-02-27  Richard Biener  <rguenther@suse.de>
12880         PR tree-optimization/84512
12881         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
12882         Do not use the estimate returned from record_stmt_cost for
12883         the scalar iteration cost but sum properly using add_stmt_cost.
12885 2018-02-27  Richard Biener  <rguenther@suse.de>
12887         PR tree-optimization/84466
12888         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
12889         Adjust last change to less strictly validate use operands.
12891 2018-02-27  Martin Liska  <mliska@suse.cz>
12893         PR gcov-profile/84548
12894         * gcov.c (process_file): Allow partial overlap and consider it
12895         also as group functions.
12896         (output_lines): Properly calculate range of lines for a group.
12898 2018-02-27  Martin Liska  <mliska@suse.cz>
12900         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
12901         'ggc' suffixes.  Change first column width.
12902         (timer::print): Fix formatting of the column.
12904 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
12906         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
12907         preserve inline entry blocks for the sake of debug inline
12908         entry point markers alone.
12909         (remove_unused_locals): Suggest in comments a better place to
12910         force the preservation of inline entry blocks that are
12911         otherwise unused, but do not preserve them.
12913 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
12915         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
12917 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
12919         PR target/84039
12920         * config/i386/constraints.md (Bs): Replace
12921         ix86_indirect_branch_register with
12922         TARGET_INDIRECT_BRANCH_REGISTER.
12923         (Bw): Likewise.
12924         * config/i386/i386.md (indirect_jump): Likewise.
12925         (tablejump): Likewise.
12926         (*sibcall_memory): Likewise.
12927         (*sibcall_value_memory): Likewise.
12928         Peepholes of indirect call and jump via memory: Likewise.
12929         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
12930         (*sibcall_value_GOT_32): Likewise.
12931         * config/i386/predicates.md (indirect_branch_operand): Likewise.
12932         (GOT_memory_operand): Likewise.
12933         (call_insn_operand): Likewise.
12934         (sibcall_insn_operand): Likewise.
12935         (GOT32_symbol_operand): Likewise.
12936         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
12938 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
12940         PR rtl-optimization/83496
12941         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
12942         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
12943         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
12944         redundant insn, if any.
12945         (relax_delay_slots): Likewise.
12946         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
12948 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
12950         PR tree-optimization/83965
12951         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
12952         that grouped statements are part of a reduction chain.  Return
12953         true if the statement is not marked as a reduction itself but
12954         is part of a group.
12955         (vect_recog_dot_prod_pattern): Don't check whether the statement
12956         is part of a group here.
12957         (vect_recog_sad_pattern): Likewise.
12958         (vect_recog_widen_sum_pattern): Likewise.
12960 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
12962         PR debug/84545
12963         * final.c (rest_of_clean_state): Also look for calls inside sequences.
12965 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
12967         PR target/84530
12968         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
12969         the bool argument.
12970         (ix86_output_indirect_function_return): New prototype.
12971         (ix86_split_simple_return_pop_internal): Likewise.
12972         * config/i386/i386.c (indirect_return_via_cx): New.
12973         (indirect_return_via_cx_bnd): Likewise.
12974         (indirect_thunk_name): Handle return va CX_REG.
12975         (output_indirect_thunk_function): Create alias for
12976         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
12977         (ix86_output_indirect_jmp): Remove the bool argument.
12978         (ix86_output_indirect_function_return): New function.
12979         (ix86_split_simple_return_pop_internal): Likewise.
12980         * config/i386/i386.md (*indirect_jump): Don't pass false
12981         to ix86_output_indirect_jmp.
12982         (*tablejump_1): Likewise.
12983         (simple_return_pop_internal): Change it to define_insn_and_split.
12984         Call ix86_split_simple_return_pop_internal to split it for
12985         -mfunction-return=.
12986         (simple_return_indirect_internal): Call
12987         ix86_output_indirect_function_return instead of
12988         ix86_output_indirect_jmp.
12990 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
12992         PR bootstrap/84405
12993         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
12994         memset and value initialization afterwards.
12996 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
12998         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
13000 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13002         PR target/84521
13003         * common/config/aarch64/aarch64-common.c
13004         (aarch_option_optimization_table[]): Switch
13005         off fomit-frame-pointer
13007 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
13008             Chung-Ju Wu  <jasonwucj@gmail.com>
13010         * config/nds32/nds32-multiple.md (load_multiple): Disallow
13011         volatile memory.
13012         (store_multiple): Ditto.
13014 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
13016         * config.gcc: Add --with-cpu support for nds32 target.
13017         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
13018         * config/nds32/nds32.opt: Add -mcpu= option.
13020 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
13022         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
13023         isel=yes): Warn for these deprecated options.
13025 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
13027         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
13028         ISA_2_5_MASKS_EMBEDDED.
13030 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
13032         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
13033         p->max as pointers rather than using iterative_hash_expr.
13035 2018-02-23  Carl Love  <cel@us.ibm.com>
13037         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
13038         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
13039         BU_P8V_OVERLOAD_2.
13040         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
13041         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
13042         P8V_BUILTIN_VEC_VUNSIGNED2.
13044 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
13046         PR target/81572
13047         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
13048         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
13049         LRA_UNKNOWN_ALT.
13050         * lra-constraints.c (curr_insn_transform): Set up
13051         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
13052         LRA_UNKNOWN_ALT.
13053         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
13054         * lra-eliminations.c (spill_pseudos): Ditto.
13055         (process_insn_for_elimination): Ditto.
13056         * lra-lives.c (reg_early_clobber_p): Use the new macros.
13057         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
13058         LRA_NON_CLOBBERED_ALT.
13060 2018-02-22  Martin Sebor  <msebor@redhat.com>
13062         PR tree-optimization/84480
13063         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
13064         to maybe_diag_stxncpy_trunc.  Call it.
13065         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
13066         from gimple_fold_builtin_strcpy.  Print inlining stack.
13067         (handle_builtin_stxncpy): Print inlining stack.
13068         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
13070 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
13072         PR target/84176
13073         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
13074         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
13075         and -fcheck-pointer-bounds are used together.
13076         (indirect_thunk_prefix): New enum.
13077         (indirect_thunk_need_prefix): New function.
13078         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
13079         "_nt" instead of "_bnd" for NOTRACK prefix.
13080         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
13081         (output_indirect_thunk_function): Likewise.
13082         (): Likewise.
13083         (ix86_code_end): Update output_indirect_thunk_function calls.
13084         (ix86_output_indirect_branch_via_reg): Replace
13085         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
13086         (ix86_output_indirect_branch_via_push): Likewise.
13087         (ix86_output_function_return): Likewise.
13088         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
13089         incompatible with -fcf-protection=branch and
13090         -fcheck-pointer-bounds.
13092 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
13094         PR target/83335
13095         * config/aarch64/aarch64.c (aarch64_print_address_internal):
13096         Change gcc_assert call to output_operand_lossage.
13098 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
13100         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
13102 2018-02-22  DJ Delorie  <dj@redhat.com>
13103             Sebastian Perta  <sebastian.perta@renesas.com>
13104             Oleg Endo  <olegendo@gcc.gnu.org>
13106         * config/rx/rx.c (rx_rtx_costs): New function.
13107         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
13109 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13111         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
13113 2018-02-22  Martin Liska  <mliska@suse.cz>
13115         PR driver/83193
13116         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
13117         Add "native" as a possible value.
13119 2018-02-22  Martin Liska  <mliska@suse.cz>
13121         PR driver/83193
13122         * config/i386/i386.c (ix86_option_override_internal):
13123         Add "native" as a possible value for -march and -mtune.
13125 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
13127         PR target/84502
13128         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
13129         to all type variants.
13131         PR tree-optimization/84503
13132         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
13133         width as info->bitpos + info->bitsize - start.
13134         (merged_store_group::merge_overlapping): Simplify width computation.
13135         (check_no_overlap): New function.
13136         (imm_store_chain_info::try_coalesce_bswap): Compute expected
13137         start + width and last_order of the group, fail if check_no_overlap
13138         fails.
13139         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
13140         to group if check_no_overlap fails.
13142 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
13144         * config/rs6000/altivec.md: Delete contraint arguments to
13145         define_expand, define_split, and define_peephole2, and in
13146         define_insn_and_split if always unused.
13147         * config/rs6000/darwin.md: Ditto.
13148         * config/rs6000/dfp.md: Ditto.
13149         * config/rs6000/rs6000.md: Ditto.
13150         * config/rs6000/sync.md: Ditto.
13151         * config/rs6000/vector.md: Ditto.
13152         * config/rs6000/vsx.md: Ditto.
13154 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
13156         * config/rs6000/altivec.md: Write output control strings as braced
13157         blocks instead of double-quoted strings.
13158         * config/rs6000/darwin.md: Ditto.
13159         * config/rs6000/rs6000.md: Ditto.
13160         * config/rs6000/vector.md: Ditto.
13161         * config/rs6000/vsx.md: Ditto.
13163 2018-02-21  Jason Merrill  <jason@redhat.com>
13165         PR c++/84314 - ICE with templates and fastcall attribute.
13166         * attribs.c (build_type_attribute_qual_variant): Remove assert.
13168 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
13170         * ipa-cp.c (determine_versionability): Fix comment typos.
13172 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
13174         PR c/84229
13175         * ipa-cp.c (determine_versionability): Do not version functions caling
13176         va_arg_pack.
13178 2018-02-21  Martin Liska  <mliska@suse.cz>
13180         PR driver/83193
13181         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
13182         Add "native" as a possible value.
13183         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
13184         the macro when native cpu detection is available.
13186 2018-02-21  Martin Liska  <mliska@suse.cz>
13188         PR driver/83193
13189         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
13190         Add "native" as a possible value.
13191         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
13192         when native cpu detection is available.
13194 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
13195             Martin Sebor  <msebor@redhat.com>
13197         PR tree-optimization/84478
13198         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
13199         false.
13200         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
13201         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
13202         support which is conservatively correct, for 2 only stay conservative
13203         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
13204         argument to the 2 argument get_range_strlen, adjust 6 arg
13205         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
13206         false.
13207         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
13208         (gimple_fold_builtin_strlen): Pass true as last argument to
13209         get_range_strlen.
13211 2018-02-20  Martin Sebor  <msebor@redhat.com>
13213         PR middle-end/84095
13214         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
13215         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
13216         (builtin_memref::builtin_memref): Factor out parts into
13217         set_base_and_offset and call it.
13219 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
13221         PR middle-end/84406
13222         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
13223         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
13224         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
13225         search at the associated MODE_INT.
13227 2018-02-20  Jeff Law  <law@redhat.com>
13229         PR middle-end/82123
13230         PR tree-optimization/81592
13231         PR middle-end/79257
13232         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
13233         for range data rather than using global data.
13234         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
13235         range data rather than using global data.
13236         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
13237         pass it to children as needed.
13238         (struct directive::fmtresult): Similarly.
13239         (struct directive::set_width): Similarly.
13240         (struct directive::set_precision): Similarly.
13241         (format_integer, format_directive, parse_directive): Similarly.
13242         (format_none): Accept unnamed vr_values parameter.
13243         (format_percent, format_floating, format_character): Similarly.
13244         (format_string, format_plain): Similarly.
13245         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
13246         the EVRP range analyzer for range data rather than using global data.
13247         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
13248         gimple-ssa-evrp-analyze.h
13249         (class sprintf_dom_walker): Add after_dom_children member function.
13250         Add evrp_range_analyzer member.
13251         (sprintf_dom_walker::before_dom_children): Call into the EVRP
13252         range analyzer as needed.
13253         (sprintf_dom_walker::after_dom_children): New member function.
13254         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
13255         if not optimizing.
13256         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
13257         (evrp_range_analyzer::pop_to_marker): Likewise.
13259 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
13261         PR tree-optimization/84419
13262         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
13263         with the required type if its current type is compatible but
13264         different.
13266 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
13268         PR middle-end/82004
13269         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
13270         after vectorization.
13272 2018-02-20  Martin Liska  <mliska@suse.cz>
13274         PR driver/83193
13275         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
13276         possible values if we don't have a hint.
13278 2018-02-20  Martin Liska  <mliska@suse.cz>
13280         PR c/84310
13281         PR target/79747
13282         * final.c (shorten_branches): Build align_tab array with one
13283         more element.
13284         * opts.c (finish_options): Add alignment option limit check.
13285         (MAX_CODE_ALIGN): Likewise.
13286         (MAX_CODE_ALIGN_VALUE): Likewise.
13287         * doc/invoke.texi: Document maximum allowed option value for
13288         all -falign-* options.
13290 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
13292         PR target/84146
13293         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
13294         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
13295         * var-tracking.c (emit_note_insn_var_location): Remove all references
13296         to NOTE_INSN_CALL_ARG_LOCATION.
13297         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
13298         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
13299         Use copy_rtx_if_shared.
13300         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
13301         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
13302         (dwarf2out_var_location): Remove handling of
13303         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
13304         on call_insn.
13305         * final.c (final_scan_insn): Remove all references to
13306         NOTE_INSN_CALL_ARG_LOCATION.
13307         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
13308         before dumping final insns.
13309         * except.c (emit_note_eh_region_end): Remove all references to
13310         NOTE_INSN_CALL_ARG_LOCATION.
13311         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
13312         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
13313         * config/arc/arc.c (hwloop_optimize): Likewise.
13314         * config/arm/arm.c (create_fix_barrier): Likewise.
13315         * config/s390/s390.c (s390_chunkify_start): Likewise.
13316         * config/sh/sh.c (find_barrier): Likewise.
13317         * config/i386/i386.c (rest_of_insert_endbranch,
13318         ix86_seh_fixup_eh_fallthru): Likewise.
13319         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
13320         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
13321         * config/frv/frv.c (frv_function_prologue): Likewise.
13322         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
13323         reg note.
13324         (note_outside_basic_block_p): Remove all references to
13325         NOTE_INSN_CALL_ARG_LOCATION.
13326         * gengtype.c (adjust_field_rtx_def): Likewise.
13327         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
13328         Likewise.
13329         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
13330         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
13332         PR c++/84444
13333         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
13334         is ADDR_EXPR.
13336         PR tree-optimization/84452
13337         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
13338         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
13339         is NULL.
13341 2018-02-19  Martin Liska  <mliska@suse.cz>
13343         PR sanitizer/82183
13344         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
13346 2018-02-19  Martin Liska  <mliska@suse.cz>
13347             Richard Sandiford  <richard.sandiford@linaro.org>
13349         PR tree-optimization/82491
13350         * gimple-fold.c (get_base_constructor): Make earlier bail out
13351         to prevent ubsan.
13353 2018-02-19  Carl Love  <cel@us.ibm.com>
13355         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
13356         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
13357         BU_P8V_OVERLOAD_1.
13358         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
13359         P8V_BUILTIN_VEC_NEG.
13361 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
13363         * config/rl78/rl78.md (movdf): New define expand.
13365 2018-02-19  Martin Liska  <mliska@suse.cz>
13367         PR other/80589
13368         * doc/invoke.texi: Fix typo.
13369         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
13371 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
13373         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
13374         handle rs6000_single_float and rs6000_double_float specially for
13375         e500 family CPUs.
13377 2018-02-16  Jeff Law  <law@redhat.com>
13379         * config/rx/rx.c (add_pop_cfi_notes): New function.;
13380         (pop_regs): Use it.
13382 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
13384         PR ipa/84425
13385         * ipa-inline.c (inline_small_functions): Fix a typo.
13387 2018-02-16  Nathan Sidwell  <nathan@acm.org>
13389         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
13391 2018-02-16  Carl Love  <cel@us.ibm.com>
13393         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
13394         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
13395         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
13396         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
13397         expansion to P8V_BUILTIN_VEC_FLOAT2.
13399 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
13401         PR rtl-optimization/70023
13402         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
13403         src_regno into account.
13405 2018-02-16  Carl Love  <cel@us.ibm.com>
13407         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
13408         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
13409         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
13410         * config/rs6000/rs6000.c: Remove case statements for
13411         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
13412         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
13413         and P9V_BUILTIN_VEC_VINSERT4B.
13414         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
13415         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
13416         * config/rs6000/vsx.md:
13417         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
13418         vec_insert4b.
13420 2018-02-16  Carl Love  <cel@us.ibm.com>
13422         * config/rs6000/altivec.h: Add builtin names vec_extract4b
13423         vec_insert4b.
13424         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
13425         definitions.
13426         * config/rs6000/rs6000-c.c: Add the definitions for
13427         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
13428         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
13429         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
13430         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
13431         definition for insert4b and define insn *insert3b_internal.
13432         * doc/extend.texi: Add documentation for vec_extract4b.
13434 2018-02-16  Nathan Sidwell  <nathan@acm.org>
13436         * doc/extend.texi (Backwards Compatibility): Mention friend
13437         injection.  Note for-scope is deprecated.
13438         * doc/invoke.texi (-ffriend-injection): Deprecate.
13440 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
13442         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
13443         that moved to I2, also allow destinations that are a paradoxical
13444         subreg (instead of a normal reg).
13446 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
13448         PR target/83831
13449         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
13450         to QImode.
13452 2018-02-16  Richard Biener  <rguenther@suse.de>
13454         PR tree-optimization/84037
13455         PR tree-optimization/84016
13456         PR target/82862
13457         * config/i386/i386.c (ix86_builtin_vectorization_cost):
13458         Adjust vec_construct for the fact we need additional higher latency
13459         128bit inserts for AVX256 and AVX512 vector builds.
13460         (ix86_add_stmt_cost): Scale vector construction cost for
13461         elementwise loads.
13463 2018-02-16  Richard Biener  <rguenther@suse.de>
13465         PR tree-optimization/84417
13466         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
13467         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
13468         (non_rewritable_lvalue_p): Likewise, use poly-ints.
13470 2018-02-16  Martin Liska  <mliska@suse.cz>
13472         PR sanitizer/84307
13473         * internal-fn.def (ASAN_CHECK): Set proper flags.
13474         (ASAN_MARK): Likewise.
13476 2018-02-16  Julia Koval  <julia.koval@intel.com>
13478         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
13479         from PTA_CANNONLAKE.
13481 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
13483         PR target/84272
13484         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
13485         Use ++iter rather than iter++ for std::list iterators.
13486         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
13487         defer deleting them until all nodes in the forest are processed.  Do
13488         free even leaf nodes.  Change to_process into auto_vec.
13490         PR bootstrap/84405
13491         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
13492         * vec.h (vec_default_construct): Use memset instead of placement new
13493         if BROKEN_VALUE_INITIALIZATION is defined.
13494         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
13495         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
13496         is defined.
13498         PR rtl-optimization/83723
13499         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
13500         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
13501         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
13502         recursive calls.
13503         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
13504         callers.
13505         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
13507 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
13509         PR rtl-optimization/81443
13510         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
13511         from inner REGs to paradoxical SUBREGs.
13513 2018-02-16  Richard Biener  <rguenther@suse.de>
13515         PR tree-optimization/84399
13516         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
13517         For operands we can analyze at their definition make sure we can
13518         analyze them at each use as well.
13520 2018-02-16  Richard Biener  <rguenther@suse.de>
13522         PR tree-optimization/84190
13523         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
13524         volatile accesses if the decl isn't volatile.
13526 2018-02-15  Jason Merrill  <jason@redhat.com>
13528         PR c++/84314 - ICE with templates and fastcall attribute.
13529         * attribs.c (build_type_attribute_qual_variant): Don't clobber
13530         TYPE_CANONICAL on an existing type.
13532 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
13534         PR tree-optimization/84383
13535         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
13536         dstoff nor call operand_equal_p if dstbase is NULL.
13538         PR tree-optimization/84334
13539         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
13540         also a CONSTANT_CLASS_P, punt.
13542 2018-02-14  Jim Wilson  <jimw@sifive.com>
13544         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
13545         first SMALL_OPERAND check.  New local min_second_step.  Move assert
13546         to where locals are set.  Add TARGET_RVC support.
13547         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
13549 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
13551         * doc/invoke.texi: Correct -Wformat-overflow code sample.
13553 2018-02-14  Martin Sebor  <msebor@redhat.com>
13555         PR tree-optimization/83698
13556         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
13557         arrays constrain the offset range to their bounds.
13558         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
13559         (builtin_access::overlap): Avoid setting the size of overlap if it's
13560         already been set.
13561         (maybe_diag_overlap): Also consider arrays when deciding what values
13562         of offsets to include in diagnostics.
13564 2018-02-14  Martin Sebor  <msebor@redhat.com>
13566         PR c/84108
13567         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
13568         that correspond to the kind of a declaration.
13570 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
13572         PR target/83984
13573         * config/pa/pa.md: Load address of PIC label using the linkage table
13574         if the label is nonlocal.
13576 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13578         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
13579         warning message if user requests -maltivec=be.
13580         * doc/invoke.texi: Document deprecation of -maltivec=be.
13582 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
13584         PR target/84220
13585         * config/rs6000/rs6000-c.c: Update definitions for
13586         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
13587         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
13589 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
13591         PR target/84239
13592         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
13593         add _get_ssp intrinsics. Remove argument from
13594         __builtin_ia32_rdssp[d|q].
13595         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
13596         * config/i386/i386-builtin.def: Remove argument from
13597         __builtin_ia32_rdssp[d|q].
13598         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
13599         ix86_expand_special_args_builtin for _rdssp[d|q].
13600         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
13601         Clear register before usage.
13602         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
13603         Add documentation for new _get_ssp and _inc_ssp intrinsics.
13605 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
13607         PR tree-optimization/84357
13608         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
13609         operand 1 of an ARRAY_REF too.
13611 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
13613         PR target/83831
13614         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
13615         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13616         declarations.
13617         (set_of_reg): New struct.
13618         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
13619         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
13620         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13621         functions.
13622         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
13623         Split into bitclr, bitset, bitinvert patterns if appropriate.
13624         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
13625         use rx_fuse_in_memory_bitop.
13626         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
13627         to named insn, correct maximum insn length.
13629 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
13631         PR target/79242
13632         * machmode.def: Define a complex mode for PARTIAL_INT.
13633         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
13634         MODE_PARTIAL_INT.
13635         * doc/rtl.texi: Document CSPImode.
13636         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
13637         handling.
13638         (msp430_hard_regno_nregs_with_padding): Likewise.
13640 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
13642         PR target/84279
13643         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
13645 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
13647         PR rtl-optimization/84169
13648         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
13649         we generated a parallel as new i3 and we split that to new i2 and i3
13650         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
13651         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
13652         those to i2, not i1.  Partially rewrite this scan code.
13654 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
13656         PR c/82210
13657         * stor-layout.c (place_field): For variable length fields, adjust
13658         offset_align afterwards not just based on the field's alignment,
13659         but also on the size.
13661         PR middle-end/84309
13662         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
13663         of exps and logs in the use_exp2 case.
13665 2018-02-13  Jeff Law  <law@redhat.com>
13667         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
13668         entry for "vector".
13670         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
13671         ARGS as unused.
13673 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
13675         PR debug/84342
13676         PR debug/84319
13677         * common.opt (gas-loc-support, gas-locview-support): New.
13678         (ginline-points, ginternal-reset-location-views): New.
13679         * doc/invoke.texi: Document them.  Use @itemx where intended.
13680         (gvariable-location-views): Adjust.
13681         * target.def (reset_location_view): New.
13682         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
13683         (TARGET_RESET_LOCATION_VIEW): New.
13684         * doc/tm.texi: Rebuilt.
13685         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
13686         (dwarf2out_default_as_locview_support): New.
13687         (output_asm_line_debug_info): Use option variables.
13688         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
13689         (output_loc_list): Likewise.
13690         (add_high_low_attributes): Check option variables.
13691         Don't output entry view attribute in strict mode.
13692         (gen_inlined_subroutine_die): Check option variables.
13693         (dwarf2out_inline_entry): Likewise.
13694         (init_sections_and_labels): Likewise.
13695         (dwarf2out_early_finish): Likewise.
13696         (maybe_reset_location_view): New, from...
13697         (dwarf2out_var_location): ... here.  Call it.
13698         * debug.h (dwarf2out_default_as_loc_support): Declare.
13699         (dwarf2out_default_as_locview_support): Declare.
13700         * hooks.c (hook_int_rtx_insn_0): New.
13701         * hooks.h (hook_int_rtx_insn_0): Declare.
13702         * toplev.c (process_options): Take -gas-loc-support and
13703         -gas-locview-support from dwarf2out.  Enable
13704         -gvariable-location-views by default only with locview
13705         assembler support.  Enable -ginternal-reset-location-views by
13706         default only if the target defines the corresponding hook.
13707         Enable -ginline-points by default if location views are
13708         enabled; force it disabled if statement frontiers are
13709         disabled.
13710         * tree-inline.c (expand_call_inline): Check option variables.
13711         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
13713 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
13715         PR tree-optimization/84321
13716         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
13717         handling.  Also check whether the anti-range contains any values
13718         that satisfy the mask; switch to a VR_RANGE if not.
13720 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
13722         PR sanitizer/84340
13723         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
13725 2018-02-13  Martin Jambor  <mjambor@suse.cz>
13727         PR c++/83990
13728         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
13729         of call statements, also set location of a load to a temporary.
13731 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
13733         * config/rl78/rl78.c (add_vector_labels): New function.
13734         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
13735         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
13736         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
13737         which checks that no arguments are passed.
13738         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
13739         * doc/extend.texi: Documentation for the new attribute.
13741 2018-02-13  Andreas Schwab  <schwab@suse.de>
13743         * config/riscv/linux.h (CPP_SPEC): Define.
13745 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
13747         PR target/84335
13748         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
13749         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
13750         OPTION_MASK_ISA_AES as first argument to def_builtin_const
13751         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
13752         instead of OPTION_MASK_ISA_PCLMUL as first argument to
13753         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
13754         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
13755         temporarily for AES and PCLMUL builtins.
13757         PR tree-optimization/84339
13758         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
13759         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
13760         Formatting fixes.
13762         PR middle-end/84309
13763         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
13764         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
13765         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
13766         inline function.
13767         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
13768         inline function.
13769         * omp-simd-clone.h: New file.
13770         * omp-simd-clone.c: Include omp-simd-clone.h.
13771         (expand_simd_clones): No longer static.
13772         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
13773         cgraph.h and omp-simd-clone.h.
13774         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
13775         (vect_recog_widen_shift_pattern): Formatting fix.
13776         (vect_pattern_recog_1): Don't check optab for calls.
13778         PR target/84336
13779         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
13780         operands[2] into a REG before using gen_lowpart on it.
13782 2018-02-12  Jeff Law  <law@redhat.com>
13784         PR target/83760
13785         * config/sh/sh.c (find_barrier): Consider a sibling call
13786         a barrier as well.
13788         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
13789         successfully back substituting a reg.
13791 2018-02-12  Richard Biener  <rguenther@suse.de>
13793         PR tree-optimization/84037
13794         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
13795         parameter, move visited init to caller.
13796         (vect_slp_analyze_operations): Separate cost from validity
13797         check, initialize visited once for all instances.
13798         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
13799         for all instances.
13800         * tree-vect-stmts.c (vect_model_simple_cost): Make early
13801         out an assert.
13802         (vect_model_promotion_demotion_cost): Likewise.
13803         (vectorizable_bswap): Guard cost modeling with !slp_node
13804         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
13805         SLP stmts.
13806         (vectorizable_call): Likewise.
13807         (vectorizable_conversion): Likewise.
13808         (vectorizable_assignment): Likewise.
13809         (vectorizable_shift): Likewise.
13810         (vectorizable_operation): Likewise.
13811         (vectorizable_store): Likewise.
13812         (vectorizable_load): Likewise.
13813         (vectorizable_condition): Likewise.
13814         (vectorizable_comparison): Likewise.
13816 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
13818         PR sanitizer/84307
13819         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
13820         (ASAN_MARK): Fix fnspec to account for return value, change pointer
13821         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
13823 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
13825         PR middle-end/83665
13826         * params.def (inline-min-speedup): Increase from 8 to 15.
13827         (max-inline-insns-auto): Decrease from 40 to 30.
13828         * ipa-split.c (consider_split): Add some buffer for function to
13829         be considered inlining candidate.
13830         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
13831         default values.
13833 2018-02-12  Richard Biener  <rguenther@suse.de>
13835         PR tree-optimization/84037
13836         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
13837         matched stmts if we cannot swap the non-matched ones.
13839 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
13841         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
13842         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
13843         _mm_maskz_scalef_round_ss): New intrinsics.
13844         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
13845         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
13846         __builtin_ia32_scalefss_round): Remove.
13847         (__builtin_ia32_scalefsd_mask_round,
13848         __builtin_ia32_scalefss_mask_round): New intrinsics.
13849         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
13850         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
13851         ((match_operand:VF_128 2 "<round_nimm_predicate>"
13852         "<round_constraint>")): Changed to ...
13853         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
13854         "<round_scalar_constraint>")): ... this.
13855         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
13856         %0, %1, %2<round_op3>}"): Changed to ...
13857         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
13858         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
13859         %2<round_scalar_mask_op3>}"): ... this.
13860         * config/i386/subst.md (round_scalar_nimm_predicate): New.
13862 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
13864         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
13865         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
13866         (_mm_maskz_sqrt_round_ss): New intrinsics.
13867         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
13868         (__builtin_ia32_sqrtsd_mask_round)
13869         (__builtin_ia32_sqrtss_mask_round): New builtins.
13870         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
13871         (__builtin_ia32_sqrtss_round): Remove.
13872         (__builtin_ia32_sqrtsd_mask_round)
13873         (__builtin_ia32_sqrtss_mask_round): New builtins.
13874         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
13875         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
13876         ((match_operand:VF_128 1 "vector_operand"
13877         "xBm,<round_constraint>")): Changed to ...
13878         ((match_operand:VF_128 1 "vector_operand"
13879         "xBm,<round_scalar_constraint>")): ... this.
13880         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
13881         %0, %2, %<iptr>1<round_op3>}): Changed to ...
13882         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
13883         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
13884         %<iptr>1<round_scalar_mask_op3>}): ... this.
13885         ((set_attr "prefix" "<round_prefix>")): Changed to ...
13886         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
13888 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
13890         PR target/84266
13891         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
13892         Cast vec_cmpeq result to correct type.
13893         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
13894         Cast vec_cmpgt result to correct type.
13896 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
13898         * final.c (final_scan_insn_1): Renamed from...
13899         (final_scan_insn): ... this.  New wrapper, to recover
13900         seen from the outermost call in recursive ones.
13901         * config/sparc/sparc.c (output_return): Drop seen from call.
13902         (output_sibcall): Likewise.
13903         * config/visium/visium.c (output_branch): Likewise.
13905 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
13907         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
13908         function label.
13910 2018-02-10  Alan Modra  <amodra@gmail.com>
13912         PR target/84300
13913         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
13914         Specify LR as an input.
13916 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
13918         PR sanitizer/83987
13919         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
13920         remove_member_access_dummy_vars): New functions.
13921         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
13922         lower_omp_1, execute_lower_omp): Use them.
13924         PR rtl-optimization/84308
13925         * shrink-wrap.c (spread_components): Release todo vector.
13927 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
13929         PR rtl-optimization/57193
13930         * ira-color.c (struct allocno_color_data): Add member
13931         conflict_allocno_hard_prefs.
13932         (update_conflict_allocno_hard_prefs): New.
13933         (bucket_allocno_compare_func): Add a preference based on
13934         conflict_allocno_hard_prefs.
13935         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
13936         (color_allocnos): Remove a dead code.  Initiate
13937         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
13939 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
13941         PR target/84226
13942         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
13943         constraint from =wa to wa.  Avoid a subreg on the output operand,
13944         instead use a pseudo and subreg it in a move.
13945         (p9_xxbrd_<mode>): Changed to ...
13946         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
13947         (p9_xxbrd_v2df): New expander.
13948         (p9_xxbrw_<mode>): Changed to ...
13949         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
13950         (p9_xxbrw_v4sf): New expander.
13952 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
13954         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
13956 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
13958         PR target/83926
13959         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
13960         multiply in 32-bit mode.
13961         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
13962         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
13963         mode.
13965 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
13967         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
13968         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
13969         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
13970         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
13972 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
13974         PR lto/84213
13975         * dwarf2out.c (is_trivial_indirect_ref): New function.
13976         (dwarf2out_late_global_decl): Do not generate a location
13977         attribute for variables that have a non-trivial DECL_VALUE_EXPR
13978         and that are not defined in the current unit.
13980 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
13982         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
13983         instead of a libcall for UNORDERED.
13985 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
13987         PR target/82641
13988         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
13989         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
13991 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13993         PR target/PR84295
13994         * config/s390/s390.c (s390_set_current_function): Invoke
13995         s390_indirect_branch_settings also if fndecl didn't change.
13997 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
13999         * config/rs6000/rs6000.md (blockage): Set length to zero.
14001 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
14003         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
14005 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
14007         PR sanitizer/84285
14008         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
14009         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
14010         -static-lib*san.
14012         PR debug/84252
14013         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
14014         PARALLEL incoming that failed vt_get_decl_and_offset check.
14016         PR middle-end/84237
14017         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
14018         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
14019         TREE_READONLY bit.
14020         (get_variable_section): For decls in named .bss* sections pass true as
14021         second argument to bss_initializer_p.
14023 2018-02-09  Marek Polacek  <polacek@redhat.com>
14024             Jakub Jelinek  <jakub@redhat.com>
14026         PR c++/83659
14027         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
14028         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
14029         Sync some changes from cxx_fold_indirect_ref.
14031 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
14033         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
14034         markers.
14035         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
14036         (BLOCK_INLINE_ENTRY_LABEL): New.
14037         (dwarf2out_var_location): Disregard inline entry markers.
14038         (inline_entry_data): New struct.
14039         (inline_entry_data_hasher): New hashtable type.
14040         (inline_entry_data_hasher::hash): New.
14041         (inline_entry_data_hasher::equal): New.
14042         (inline_entry_data_table): New variable.
14043         (add_high_low_attributes): Add DW_AT_entry_pc and
14044         DW_AT_GNU_entry_view attributes if a pending entry is found
14045         in inline_entry_data_table.  Add old entry_pc attribute only
14046         if debug nonbinding markers are disabled.
14047         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
14048         markers are enabled.
14049         (block_within_block_p, dwarf2out_inline_entry): New.
14050         (dwarf2out_finish): Check that no entries remained in
14051         inline_entry_data_table.
14052         * final.c (reemit_insn_block_notes): Handle inline entry notes.
14053         (final_scan_insn, notice_source_line): Likewise.
14054         (rest_of_clean_state): Skip inline entry markers.
14055         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
14056         markers.
14057         * gimple.c (gimple_build_debug_inline_entry): New.
14058         * gimple.h (enum gimple_debug_subcode): Add
14059         GIMPLE_DEBUG_INLINE_ENTRY.
14060         (gimple_build_debug_inline_entry): Declare.
14061         (gimple_debug_inline_entry_p): New.
14062         (gimple_debug_nonbind_marker_p): Adjust.
14063         * insn-notes.def (INLINE_ENTRY): New.
14064         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
14065         inline entry marker notes.
14066         (print_insn): Likewise.
14067         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
14068         (INSN_DEBUG_MARKER_KIND): Likewise.
14069         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
14070         * tree-inline.c (expand_call_inline): Build and insert
14071         debug_inline_entry stmt.
14072         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
14073         inline entry blocks early, if nonbind markers are enabled.
14074         (dump_scope_block): Dump fragment info.
14075         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
14076         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
14077         (gimple_build_debug_inline_entry): New.
14078         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
14079         Enable/disable inline entry points too.
14080         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
14081         (DEBUG_INSN): Describe inline entry markers.
14083         * common.opt (gvariable-location-views): New.
14084         (gvariable-location-views=incompat5): New.
14085         * config.in: Rebuilt.
14086         * configure: Rebuilt.
14087         * configure.ac: Test assembler for view support.
14088         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
14089         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
14090         * dwarf2out.c (var_loc_view): New typedef.
14091         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
14092         (dwarf2out_locviews_in_attribute): New.
14093         (dwarf2out_locviews_in_loclist): New.
14094         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
14095         (enum dw_line_info_opcode): Add LI_adv_address.
14096         (struct dw_line_info_table): Add view.
14097         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
14098         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
14099         (zero_view_p): New variable.
14100         (ZERO_VIEW_P): New macro.
14101         (output_asm_line_debug_info): New.
14102         (struct var_loc_node): Add view.
14103         (add_AT_view_list, AT_loc_list): New.
14104         (add_var_loc_to_decl): Add view param.  Test it against last.
14105         (new_loc_list): Add view params.  Record them.
14106         (AT_loc_list_ptr): Handle loc and view lists.
14107         (view_list_to_loc_list_val_node): New.
14108         (print_dw_val): Handle dw_val_class_view_list.
14109         (size_of_die): Likewise.
14110         (value_format): Likewise.
14111         (loc_list_has_views): New.
14112         (gen_llsym): Set vl_symbol too.
14113         (maybe_gen_llsym, skip_loc_list_entry): New.
14114         (dwarf2out_maybe_output_loclist_view_pair): New.
14115         (output_loc_list): Output view list or entries too.
14116         (output_view_list_offset): New.
14117         (output_die): Handle dw_val_class_view_list.
14118         (output_dwarf_version): New.
14119         (output_compilation_unit_header): Use it.
14120         (output_skeleton_debug_sections): Likewise.
14121         (output_rnglists, output_line_info): Likewise.
14122         (output_pubnames, output_aranges): Update version comments.
14123         (output_one_line_info_table): Output view numbers in asm comments.
14124         (dw_loc_list): Determine current endview, pass it to new_loc_list.
14125         Call maybe_gen_llsym.
14126         (loc_list_from_tree_1): Adjust.
14127         (add_AT_location_description): Create view list attribute if
14128         needed, check it's absent otherwise.
14129         (convert_cfa_to_fb_loc_list): Adjust.
14130         (maybe_emit_file): Call output_asm_line_debug_info for test.
14131         (dwarf2out_var_location): Reset views as needed.  Precompute
14132         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
14133         attribute.  Set view.
14134         (new_line_info_table): Reset next view.
14135         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
14136         (dwarf2out_source_line): Likewise.  Output view resets and labels to
14137         the assembler, or select appropriate line info opcodes.
14138         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
14139         (optimize_string_length): Catch it.  Adjust.
14140         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
14141         dw_val_class_view_list, and remove it if no longer needed.
14142         (hash_loc_list): Hash view numbers.
14143         (loc_list_hasher::equal): Compare them.
14144         (optimize_location_lists): Check whether a view list symbol is
14145         needed, and whether the locview attribute is present, and
14146         whether they match.  Remove the locview attribute if no longer
14147         needed.
14148         (index_location_lists): Call skip_loc_list_entry for test.
14149         (dwarf2out_finish): Call output_asm_line_debug_info for test.
14150         Use output_dwarf_version.
14151         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
14152         (struct dw_val_node): Add val_view_list.
14153         * final.c (SEEN_NEXT_VIEW): New.
14154         (set_next_view_needed): New.
14155         (clear_next_view_needed): New.
14156         (maybe_output_next_view): New.
14157         (final_start_function): Rename to...
14158         (final_start_function_1): ... this.  Take pointer to FIRST,
14159         add SEEN parameter.  Emit param bindings in the initial view.
14160         (final_start_function): Reintroduce SEEN-less interface.
14161         (final): Rename to...
14162         (final_1): ... this.  Take SEEN parameter.  Output final pending
14163         next view at the end.
14164         (final): Reintroduce seen-less interface.
14165         (final_scan_insn): Output pending next view before switching
14166         sections or ending a block.  Mark the next view as needed when
14167         outputting variable locations.  Notify debug backend of section
14168         changes, and of location view changes.
14169         (rest_of_handle_final): Adjust.
14170         * toplev.c (process_options): Autodetect value for debug variable
14171         location views option.  Warn on incompat5 without -gdwarf-5.
14172         * doc/invoke.texi (gvariable-location-views): New.
14173         (gvariable-location-views=incompat5): New.
14174         (gno-variable-location-views): New.
14176 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
14178         PR tree-optimization/84136
14179         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
14180         that the result of find_edge is non-NULL.
14182 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
14184         PR target/83008
14185         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
14186         storing integer register in SImode.  Fix cost of 256 and 512
14187         byte aligned SSE register store.
14189 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
14191         * config/i386/i386.c (ix86_multiplication_cost): Fix
14192         multiplication cost for TARGET_AVX512DQ.
14194 2018-02-08  Marek Polacek  <polacek@redhat.com>
14196         PR tree-optimization/84238
14197         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
14198         get_range_strlen.
14200 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
14202         PR tree-optimization/84265
14203         * tree-vect-stmts.c (vectorizable_store): Don't treat
14204         VMAT_CONTIGUOUS accesses as grouped.
14205         (vectorizable_load): Likewise.
14207 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
14209         PR tree-optimization/81635
14210         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
14211         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
14212         (test_round_for_mask): New functions.
14213         (wide_int_cc_tests): Call test_round_for_mask.
14214         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
14215         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
14216         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
14217         range returned by get_range_info.
14219 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
14221         PR ipa/81360
14222         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
14223         * symtab.c: Include builtins.h
14224         (symtab_node::output_to_lto_symbol_table_p): Move here
14225         from lto-streamer-out.c:output_symbol_p.
14226         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
14227         (output_symbol_p): Move all logic to symtab.c
14228         (produce_symtab): Update.
14230 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14232         * config/s390/s390-opts.h (enum indirect_branch): Define.
14233         * config/s390/s390-protos.h (s390_return_addr_from_memory)
14234         (s390_indirect_branch_via_thunk)
14235         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
14236         (enum s390_indirect_branch_type): Define.
14237         * config/s390/s390.c (struct s390_frame_layout, struct
14238         machine_function): Remove.
14239         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
14240         (indirect_branch_table_label_no, indirect_branch_table_name):
14241         Define variables.
14242         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
14243         (enum s390_indirect_branch_option): Define.
14244         (s390_return_addr_from_memory): New function.
14245         (s390_handle_string_attribute): New function.
14246         (s390_attribute_table): Add new attribute handler.
14247         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
14248         (s390_indirect_branch_via_thunk): New function.
14249         (s390_indirect_branch_via_inline_thunk): New function.
14250         (s390_function_ok_for_sibcall): When jumping via thunk disallow
14251         sibling call optimization for non z10 compiles.
14252         (s390_emit_call): Force indirect branch target to be a single
14253         register.  Add r1 clobber for non-z10 compiles.
14254         (s390_emit_epilogue): Emit return jump via return_use expander.
14255         (s390_reorg): Handle JUMP_INSNs as execute targets.
14256         (s390_option_override_internal): Perform validity checks for the
14257         new command line options.
14258         (s390_indirect_branch_attrvalue): New function.
14259         (s390_indirect_branch_settings): New function.
14260         (s390_set_current_function): Invoke s390_indirect_branch_settings.
14261         (s390_output_indirect_thunk_function):  New function.
14262         (s390_code_end): Implement target hook.
14263         (s390_case_values_threshold): Implement target hook.
14264         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
14265         macros.
14266         * config/s390/s390.h (struct s390_frame_layout)
14267         (struct machine_function): Move here from s390.c.
14268         (TARGET_INDIRECT_BRANCH_NOBP_RET)
14269         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
14270         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
14271         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
14272         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
14273         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
14274         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
14275         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
14276         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
14277         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
14278         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
14279         (mnemonic attribute): Add values which aren't recognized
14280         automatically.
14281         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
14282         pattern for branch conversion.  Fix mnemonic attribute.
14283         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
14284         indirect branch via thunk if requested.
14285         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
14286         ("*indirect_jump"): Disable for branch conversion using out of
14287         line thunks.
14288         ("indirect_jump_via_thunk<mode>_z10")
14289         ("indirect_jump_via_thunk<mode>")
14290         ("indirect_jump_via_inlinethunk<mode>_z10")
14291         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
14292         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
14293         ("casesi_jump_via_inlinethunk<mode>_z10")
14294         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
14295         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
14296         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
14297         ("*indirect2_jump"): Disable for branch conversion.
14298         ("casesi_jump"): Turn into expander and expand patterns for branch
14299         conversion.
14300         ("return_use"): New expander.
14301         ("*return"): Emit return via thunk and rename it to ...
14302         ("*return<mode>"): ... this one.
14303         * config/s390/s390.opt: Add new options and and enum for the
14304         option values.
14306 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
14308         * lra-constraints.c (match_reload): Unconditionally use
14309         gen_lowpart_SUBREG, rather than selecting between that
14310         and equivalent gen_rtx_SUBREG code.
14312 2018-02-08  Richard Biener  <rguenther@suse.de>
14314         PR tree-optimization/84233
14315         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
14316         changed flag instead of boguously re-using phi_inserted.
14318 2018-02-08  Martin Jambor  <mjambor@suse.cz>
14320         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
14321         static local variables.
14323 2018-02-08  Richard Biener  <rguenther@suse.de>
14325         PR tree-optimization/84278
14326         * tree-vect-stmts.c (vectorizable_store): When looking for
14327         smaller vector types to perform grouped strided loads/stores
14328         make sure the mode is supported by the target.
14329         (vectorizable_load): Likewise.
14331 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
14333         * config/aarch64/aarch64.c (aarch64_components_for_bb):
14334         Increase LDP/STP opportunities by adding adjacent callee-saves.
14336 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
14338         PR rtl-optimization/84068
14339         PR rtl-optimization/83459
14340         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
14342 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
14344         PR tree-optimization/84224
14345         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
14346         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
14347         non-zero arguments.
14349 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
14351         PR target/84113
14352         * config/rs6000/altivec.md (*restore_world): Remove LR use.
14353         * config/rs6000/predicates.md (restore_world_operation): Adjust op
14354         count, remove one USE.
14356 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
14358         * doc/install.texi (Configuration): Document the
14359         --with-long-double-format={ibm,ieee} PowerPC configuration
14360         options.
14362         PR target/84154
14363         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
14364         Convert from define_expand to be define_insn_and_split.  Rework
14365         float/double/_Float128 conversions to QI/HI/SImode to work with
14366         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
14367         conversions to QI/HImode types did a store and then a load to
14368         truncate the value.  For conversions to VSX registers, don't split
14369         the insn, instead emit the code directly.  Use the code iterator
14370         any_fix to combine signed and unsigned conversions.
14371         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
14372         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
14373         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
14374         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
14375         (fix_<mode>di2_hw): Likewise.
14376         (fixuns_<mode>di2_hw): Likewise.
14377         (fix_<mode>si2_hw): Likewise.
14378         (fixuns_<mode>si2_hw): Likewise.
14379         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
14380         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
14381         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
14382         fix<uns>_trunc<SFDF:mode>si2_p8.
14383         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
14384         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
14385         (fix<uns>_<mode>_mem): Likewise.
14386         (fctiw<u>z_<mode>_mem): Likewise.
14387         (fix<uns>_<mode>_mem): Likewise.
14388         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
14389         the register allocator from doing a direct move to the GPRs to do
14390         a store, and instead use the ISA 3.0 store byte/half-word from
14391         vector register instruction.  For IEEE 128-bit floating point,
14392         also optimize stores of 32-bit ints.
14393         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
14395 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
14397         * genextract.c (push_pathstr_operand): New function to support
14398         [a-zA-Z].
14399         (walk_rtx): Call push_pathstr_operand.
14400         (print_path): Support [a-zA-Z].
14402 2018-02-07  Richard Biener  <rguenther@suse.de>
14404         PR tree-optimization/84037
14405         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
14406         (cse_and_gimplify_to_preheader): Declare.
14407         (vect_get_place_in_interleaving_chain): Likewise.
14408         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14409         ivexpr_map.
14410         (_loop_vec_info::~_loop_vec_info): Delete it.
14411         (cse_and_gimplify_to_preheader): New function.
14412         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
14413         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
14414         (vectorizable_load): Likewise.  For grouped stores always base
14415         the IV on the first element.
14416         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
14417         condition before gimplifying.
14419 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
14421         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
14422         *DIV_EXPR and *MOD_EXPR.
14424 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
14426         PR target/84248
14427         * config/i386/i386.c (ix86_option_override_internal): Mask out
14428         the CF_SET bit when checking -fcf-protection.
14430 2018-02-07  Tom de Vries  <tom@codesourcery.com>
14432         PR libgomp/84217
14433         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
14434         enough.
14436 2018-02-07  Richard Biener  <rguenther@suse.de>
14438         PR tree-optimization/84204
14439         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
14440         this place.
14442         PR tree-optimization/84205
14443         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
14444         special-case isl_ast_op_zdiv_r.
14446         PR tree-optimization/84223
14447         * graphite-scop-detection.c (gather_bbs::before_dom_children):
14448         Only add conditions from within the region.
14449         (gather_bbs::after_dom_children): Adjust.
14451 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
14453         PR target/84209
14454         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
14455         * config/avr/avr.md: Only post-reload split REG-REG moves if
14456         either register is GENERAL_REG_P.
14458 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
14460         PR tree-optimization/84235
14461         * tree-ssa-scopedtables.c
14462         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
14463         if the subtraction is performed in floating point type where NaNs are
14464         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
14465         build 1.  Formatting fix.
14467 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
14469         PR target/84146
14470         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
14471         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
14472         and skip it regardless of bb boundaries.  Use CALL_P macro,
14473         don't test INSN_P (insn) together with CALL_P or JUMP_P check
14474         unnecessarily, formatting fix.
14476 2018-02-06  Michael Collison  <michael.collison@arm.com>
14478         * config/arm/thumb2.md:
14479         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
14480         (*thumb_mov_notscc): Ditto.
14482 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
14484         PR target/84154
14485         * config/rs6000/rs6000.md (su code attribute): Use "u" for
14486         unsigned_fix, not "s".
14488 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14490         * configure.ac (gcc_fn_eh_frame_ro): New function.
14491         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
14492         correct .eh_frame permissions.
14493         * configure: Regenerate.
14495 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
14497         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
14498         irrelevant options.
14500 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14502         * config/rs6000/rs6000.c (rs6000_option_override_internal):
14503         Display warning message for -mno-speculate-indirect-jumps.
14505 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
14507         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
14508         Undocumented.
14509         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
14511 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
14513         PR tree-optimization/84225
14514         * tree-eh.c (find_trapping_overflow): Only call
14515         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
14517 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
14519         PR target/84145
14520         * config/i386/i386.c: Reimplement the check of possible options
14521         -mibt/-mshstk conbination. Change error messages.
14522         * doc/invoke.texi: Fix a typo: remove extra '='.
14524 2018-02-06  Marek Polacek  <polacek@redhat.com>
14526         PR tree-optimization/84228
14527         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
14529 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
14531         PR target/82641
14532         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
14533         emitted arch directives.
14534         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
14535         __ARM_FEATURE_COPROC before changing architectures.
14537 2018-02-06  Richard Biener  <rguenther@suse.de>
14539         * config/i386/i386.c (print_reg): Fix typo.
14540         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
14542 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
14544         * configure: Regenerate.
14546 2018-02-05  Martin Sebor  <msebor@redhat.com>
14548         PR tree-optimization/83369
14549         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
14550         inlining context.
14552 2018-02-05  Martin Liska  <mliska@suse.cz>
14554         * doc/invoke.texi: Cherry-pick upstream r323995.
14556 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
14558         * ira.c (ira_init_register_move_cost): Adjust comment.
14560 2018-02-05  Martin Liska  <mliska@suse.cz>
14562         PR gcov-profile/84137
14563         * doc/gcov.texi: Fix typo in documentation.
14565 2018-02-05  Martin Liska  <mliska@suse.cz>
14567         PR gcov-profile/83879
14568         * doc/gcov.texi: Document necessity of --dynamic-list-data when
14569         using dlopen functionality.
14571 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
14573         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
14574         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
14575         _mm_maskz_range_ss, _mm_mask_range_round_ss,
14576         _mm_maskz_range_round_ss): New intrinsics.
14577         (__builtin_ia32_rangesd128_round)
14578         (__builtin_ia32_rangess128_round): Remove.
14579         (__builtin_ia32_rangesd128_mask_round,
14580         __builtin_ia32_rangess128_mask_round): New builtins.
14581         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
14582         __builtin_ia32_rangess128_round): Remove.
14583         (__builtin_ia32_rangesd128_mask_round,
14584         __builtin_ia32_rangess128_mask_round): New builtins.
14585         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
14586         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
14587         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
14588         "<round_saeonly_constraint>")): Changed to ...
14589         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
14590         "<round_saeonly_scalar_constraint>")): ... this.
14591         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
14592         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
14593         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
14594         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
14595         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
14597 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
14599         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
14600         options.
14601         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
14602         Remove all values except native, 8540 and 8548.
14604 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
14606         * config/i386/i386.c (ix86_output_function_return): Pass
14607         INVALID_REGNUM, instead of -1, as invalid register number to
14608         indirect_thunk_name and output_indirect_thunk.
14610 2018-02-02  Julia Koval  <julia.koval@intel.com>
14612         * config.gcc: Add -march=icelake.
14613         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
14614         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
14615         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
14616         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
14617         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
14618         (processor_target_table): Add icelake.
14619         (ix86_option_override_internal): Handle new PTAs.
14620         (get_builtin_code_for_version): Handle icelake.
14621         (M_INTEL_COREI7_ICELAKE): New.
14622         (fold_builtin_cpu): Handle icelake.
14623         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
14624         * doc/invoke.texi: Add -march=icelake.
14626 2018-02-02  Julia Koval  <julia.koval@intel.com>
14628         * config/i386/i386.c (ix86_option_override_internal): Change flags type
14629         to wide_int_bitmask.
14630         * wide-int-bitmask.h: New.
14632 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
14634         PR target/84066
14635         * config/i386/i386.md: Replace Pmode with word_mode in
14636         builtin_setjmp_setup and builtin_longjmp to support x32.
14638 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
14640         PR target/56010
14641         PR target/83743
14642         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
14643         #include "opts.h".
14644         (rs6000_supported_cpu_names): New static variable.
14645         (linux_cpu_translation_table): Likewise.
14646         (elf_platform) <cpu>: Define new static variable and use it.
14647         Translate kernel AT_PLATFORM name to canonical name if needed.
14648         Error if platform name is unknown.
14650 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
14652         PR target/84089
14653         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
14655 2018-02-01  Jeff Law  <law@redhat.com>
14657         PR target/84128
14658         * config/i386/i386.c (release_scratch_register_on_entry): Add new
14659         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
14660         the scratch if RELEASE_VIA_POP is false.
14661         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
14662         If we have to save a temporary register, decrement SIZE appropriately.
14663         Pass new arguments to release_scratch_register_on_entry.
14664         (ix86_adjust_stack_and_probe): Likewise.
14665         (ix86_emit_probe_stack_range): Pass new arguments to
14666         release_scratch_register_on_entry.
14668 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
14670         PR rtl-optimization/84157
14671         * combine.c (change_zero_ext): Use REG_P predicate in
14672         front of HARD_REGISTER_P predicate.
14674 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
14676         * config/avr/avr.c (avr_option_override): Move disabling of
14677         -fdelete-null-pointer-checks to...
14678         * common/config/avr/avr-common.c (avr_option_optimization_table):
14679         ...here.
14681 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14683         PR tree-optimization/81635
14684         * tree-data-ref.c (split_constant_offset_1): For types that
14685         wrap on overflow, try to use range info to prove that wrapping
14686         cannot occur.
14688 2018-02-01  Renlin Li  <renlin.li@arm.com>
14690         PR target/83370
14691         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
14692         TAILCALL_ADDR_REGS.
14693         (aarch64_register_move_cost): Likewise.
14694         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
14695         TAILCALL_ADDR_REGS.
14696         (REG_CLASS_NAMES): Likewise.
14697         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
14698         TAILCALL_ADDR_REGS. Remove IP registers.
14699         * config/aarch64/aarch64.md (Ucs): Update register constraint.
14701 2018-02-01  Richard Biener  <rguenther@suse.de>
14703         * domwalk.h (dom_walker::dom_walker): Add additional constructor
14704         for specifying RPO order and allow NULL for that.
14705         * domwalk.c (dom_walker::dom_walker): Likewise.
14706         (dom_walker::walk): Handle NULL RPO order.
14707         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
14708         in RPO order.
14709         (rewrite_update_dom_walker): Likewise.
14710         (mark_def_dom_walker): Likewise.
14712 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14714         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
14715         (aarch64_maybe_expand_sve_subreg_move): Declare.
14716         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
14717         * config/aarch64/predicates.md (aarch64_any_register_operand): New
14718         predicate.
14719         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
14720         that are semantically a reverse operation.
14721         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
14722         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
14723         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
14724         functions.
14725         (aarch64_can_change_mode_class): For big-endian, forbid changes
14726         between two SVE modes if they have different element sizes.
14728 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14730         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
14731         the TImode handling for big-endian targets.
14733 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14735         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
14736         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
14737         not just bytes.
14738         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
14739         Remove BSWAP handing for big-endian targets and use the form of
14740         LD1RQ appropariate for the mode.
14742 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14744         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
14745         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
14746         duplicated element.
14748 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
14750         PR tearget/83845
14751         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
14752         check for operands that need to go through aarch64_sve_reload_be.
14754 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
14756         PR tree-optimization/81661
14757         PR tree-optimization/84117
14758         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
14759         * tree-eh.c: Include gimplify.h.
14760         (find_trapping_overflow, replace_trapping_overflow,
14761         rewrite_to_non_trapping_overflow): New functions.
14762         * tree-vect-loop.c: Include tree-eh.h.
14763         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
14764         * tree-data-ref.c: Include tree-eh.h.
14765         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
14767 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
14769         PR rtl-optimization/84123
14770         * combine.c (change_zero_ext): Check if hard register satisfies
14771         can_change_dest_mode before calling gen_lowpart_SUBREG.
14773 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
14775         PR target/82444
14776         * ira.c (ira_init_register_move_cost): Remove assert.
14778 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
14780         PR rtl-optimization/84071
14781         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
14782         * doc/tm.texi: Regenerate.
14784 2018-01-31  Richard Biener  <rguenther@suse.de>
14786         PR tree-optimization/84132
14787         * tree-data-ref.c (analyze_miv_subscript): Properly
14788         check whether evolution_function_is_affine_multivariate_p
14789         before calling gcd_of_steps_may_divide_p.
14791 2018-01-31  Julia Koval  <julia.koval@intel.com>
14793         PR target/83618
14794         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
14795         * config/i386/i386.md (rdpid_rex64) New.
14796         (rdpid): Make 32bit only.
14798 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
14800         PR lto/84105
14801         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
14802         an IDENTIFIER_NODE for FUNCTION_TYPE's.
14804 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
14806         Revert
14807         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
14809         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
14811 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
14813         PR rtl-optimization/84071
14814         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
14815         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
14817 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
14819         * config/arc/arc.c (arc_handle_aux_attribute): New function.
14820         (arc_attribute_table): Add 'aux' attribute.
14821         (arc_in_small_data_p): Consider aux like variables.
14822         (arc_is_aux_reg_p): New function.
14823         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
14824         (arc_get_aux_arg): New function.
14825         (prepare_move_operands): Handle aux-register access.
14826         (arc_handle_aux_attribute): New function.
14827         * doc/extend.texi (ARC Variable attributes): Add subsection.
14829 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
14831         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
14832         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
14833         (arc_attribute_table): Add 'uncached' attribute.
14834         (arc_print_operand): Print '.di' flag for uncached memory
14835         accesses.
14836         (arc_in_small_data_p): Do not consider for small data the uncached
14837         types.
14838         (arc_is_uncached_mem_p): New function.
14839         * config/arc/predicates.md (compact_store_memory_operand): Check
14840         for uncached memory accesses.
14841         (nonvol_nonimm_operand): Likewise.
14842         * doc/extend.texi (ARC Type Attribute): New subsection.
14844 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
14846         PR c/84100
14847         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
14848         falign-loops=): Add Optimization flag.
14850 2018-01-30  Jeff Law  <law@redhat.com>
14852         PR target/84064
14853         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
14854         INT_REGISTERS_SAVED.  Check it prior to calling
14855         get_scratch_register_on_entry.
14856         (ix86_adjust_stack_and_probe): Similarly.
14857         (ix86_emit_probe_stack_range): Similarly.
14858         (ix86_expand_prologue): Corresponding changes.
14860 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14862         PR target/40411
14863         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
14864         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
14866 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
14868         PR target/84112
14869         * lra-constraints.c (curr_insn_transform): Process AND in the
14870         address.
14872 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
14874         PR rtl-optimization/83986
14875         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
14876         dependence against last_pending_memory_flush in addition to
14877         pending_jump_insns.
14879 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
14881         PR tree-optimization/81611
14882         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
14883         copies.
14885 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14887         PR target/83758
14888         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
14889         a reg rtx.
14891 2018-01-30  Richard Biener  <rguenther@suse.de>
14892             Jakub Jelinek  <jakub@redhat.com>
14894         PR tree-optimization/84111
14895         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
14896         inner loops added during recursion, as they don't have up-to-date
14897         SSA form.
14899 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
14901         PR ipa/81360
14902         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
14903         (can_inline_edge_by_limits_p): ... here.
14904         (can_early_inline_edge_p, check_callers,
14905         update_caller_keys, update_callee_keys, recursive_inlining,
14906         add_new_edges_to_heap, speculation_useful_p,
14907         inline_small_functions,
14908         inline_small_functions, flatten_function,
14909         inline_to_all_callers_1): Update.
14911 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
14913         * profile-count.c (profile_count::combine_with_ipa_count): Handle
14914         zeros correctly.
14916 2018-01-30  Richard Biener  <rguenther@suse.de>
14918         PR tree-optimization/83008
14919         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
14920         invariant and constant vector uses in stmts when they need
14921         more than one stmt.
14923 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14925         PR bootstrap/84017
14926         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
14927         * configure: Regenerate.
14929 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
14931         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
14932         pattern.
14933         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
14934         Use gen_rtx_REG rather than gen_lowpart.
14936 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
14938         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
14939         rather than 0 when creating partial subregs.
14941 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
14943         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
14944         of usage.
14946 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
14948         PR target/81550
14949         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
14950         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
14951         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
14952         flags.  This restores the settings used before the 2017-07-24.
14953         Turning off pre increment/decrement/modify allows IVOPTS to
14954         optimize DF/SF loops where the index is an int.
14956 2018-01-29  Richard Biener  <rguenther@suse.de>
14957             Kelvin Nilsen  <kelvin@gcc.gnu.org>
14959         PR bootstrap/80867
14960         * tree-vect-stmts.c (vectorizable_call): Don't call
14961         targetm.vectorize_builtin_md_vectorized_function if callee is
14962         NULL.
14964 2018-01-22  Carl Love  <cel@us.ibm.com>
14966         * doc/extend.tex: Fix typo in second arg in
14967         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
14969 2018-01-29  Richard Biener  <rguenther@suse.de>
14971         PR tree-optimization/84086
14972         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
14973         (flush_ssaname_freelist): When SSA names were released reset
14974         the SCEV hash table.
14976 2018-01-29  Richard Biener  <rguenther@suse.de>
14978         PR tree-optimization/84057
14979         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
14980         removed paths when removing edges.
14982 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
14984         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
14985         -mfunction-return=@var{choice}.
14987 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14989         PR diagnostic/84034
14990         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
14991         Handle CR like TAB.
14992         (layout::print_source_line): Likewise.
14993         (test_get_line_width_without_trailing_whitespace): Add test cases.
14995 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
14997         PR middle-end/84040
14998         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
14999         debug insns.
15001 2018-01-26  Jim Wilson  <jimw@sifive.com>
15003         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
15005         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
15006         specified.
15008 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15010         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
15011         and CMP + SUB-immediate -> SUBS.
15013 2018-01-26  Martin Sebor  <msebor@redhat.com>
15015         PR tree-optimization/83896
15016         * tree-ssa-strlen.c (get_string_len): Rename...
15017         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
15018         Avoid assuming length is constant.
15019         (handle_char_store): Use HOST_WIDE_INT for string length.
15021 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
15023         PR target/81763
15024         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
15025         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
15027 2018-01-26  Richard Biener  <rguenther@suse.de>
15029         PR rtl-optimization/84003
15030         * dse.c (record_store): Only record redundant stores when
15031         the earlier store aliases at least all accesses the later one does.
15033 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
15035         PR rtl-optimization/83985
15036         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
15037         REG_CFA_RESTORE insns.
15038         (delete_unmarked_insns): Don't ignore separate shrink wrapping
15039         REG_CFA_RESTORE insns here.
15041         PR c/83989
15042         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
15043         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
15045 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15047         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
15048         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
15049         (arc_init): Likewise.
15050         (arc_override_options): Likewise.
15051         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
15052         value.
15053         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
15054         support.
15055         * config/arc/arc.h (TARGET_DBNZ): Define.
15056         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
15057         properly set the tune attribute.
15058         (dbnz): Use TARGET_DBNZ guard.
15059         * config/arc/arc.opt (mtune): Add core3 option.
15061 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15063         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
15064         recognize new pic like addresses.
15065         (arc_delegitimize_address): Clean up.
15067 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15069         * config/arc/arc-arches.def: Option mrf16 valid for all
15070         architectures.
15071         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
15072         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
15073         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
15074         * config/arc/arc-tables.opt: Regenerate.
15075         * config/arc/arc.c (arc_conditional_register_usage): Handle
15076         reduced register file case.
15077         (arc_file_start): Set must have build attributes.
15078         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
15079         mrf16 option value.
15080         * config/arc/arc.opt (mrf16): Add new option.
15081         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
15082         * config/arc/genmultilib.awk: Handle new mrf16 option.
15083         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
15084         * config/arc/t-multilib: Regenerate.
15085         * doc/invoke.texi (ARC Options): Document mrf16 option.
15087 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15089         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
15090         * config/arc/arc.c (arc_handle_secure_attribute): New function.
15091         (arc_attribute_table): Add 'secure_call' attribute.
15092         (arc_print_operand): Print secure call operand.
15093         (arc_function_ok_for_sibcall): Don't optimize tail calls when
15094         secure.
15095         (arc_is_secure_call_p): New function.  * config/arc/arc.md
15096         (call_i): Add support for sjli instruction.
15097         (call_value_i): Likewise.
15098         * config/arc/constraints.md (Csc): New constraint.
15100 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15101             John Eric Martin  <John.Martin@emmicro-us.com>
15103         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
15104         * config/arc/arc.c (_arc_jli_section): New struct.
15105         (arc_jli_section): New type.
15106         (rc_jli_sections): New static variable.
15107         (arc_handle_jli_attribute): New function.
15108         (arc_attribute_table): Add jli_always and jli_fixed attribute.
15109         (arc_file_end): New function.
15110         (TARGET_ASM_FILE_END): Define.
15111         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
15112         (arc_add_jli_section): New function.
15113         (jli_call_scan): Likewise.
15114         (arc_reorg): Call jli_call_scan.
15115         (arc_output_addsi): Remove 'S' from printing asm operand.
15116         (arc_is_jli_call_p): New function.
15117         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
15118         operand.
15119         (movhi_insn): Likewise.
15120         (movsi_insn): Likewise.
15121         (movsi_set_cc_insn): Likewise.
15122         (loadqi_update): Likewise.
15123         (load_zeroextendqisi_update): Likewise.
15124         (load_signextendqisi_update): Likewise.
15125         (loadhi_update): Likewise.
15126         (load_zeroextendhisi_update): Likewise.
15127         (load_signextendhisi_update): Likewise.
15128         (loadsi_update): Likewise.
15129         (loadsf_update): Likewise.
15130         (movsicc_insn): Likewise.
15131         (bset_insn): Likewise.
15132         (bxor_insn): Likewise.
15133         (bclr_insn): Likewise.
15134         (bmsk_insn): Likewise.
15135         (bicsi3_insn): Likewise.
15136         (cmpsi_cc_c_insn): Likewise.
15137         (movsi_ne): Likewise.
15138         (movsi_cond_exec): Likewise.
15139         (clrsbsi2): Likewise.
15140         (norm_f): Likewise.
15141         (normw): Likewise.
15142         (swap): Likewise.
15143         (divaw): Likewise.
15144         (flag): Likewise.
15145         (sr): Likewise.
15146         (kflag): Likewise.
15147         (ffs): Likewise.
15148         (ffs_f): Likewise.
15149         (fls): Likewise.
15150         (call_i): Remove 'S' asm letter, add jli instruction.
15151         (call_value_i): Likewise.
15152         * config/arc/arc.op (mjli-always): New option.
15153         * config/arc/constraints.md (Cji): New constraint.
15154         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
15155         operand.
15156         (subsf3_fpx): Likewise.
15157         (mulsf3_fpx): Likewise.
15158         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
15159         asm operand.
15160         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
15161         function attrbutes.
15162         * doc/invoke.texi (ARC): Document mjli-always option.
15164 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
15166         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
15167         avoid addition with 0 and use incw and decw where possible.
15169 2018-01-26  Richard Biener  <rguenther@suse.de>
15171         PR tree-optimization/81082
15172         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
15173         association if it requires casting to unsigned.
15174         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
15175         from fold_plusminus_mult_expr to catch important cases late when
15176         range info is available.
15178 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15180         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
15181         * configure.ac (hidden_linkonce): New test.
15182         * configure: Regenerate.
15183         * config.in: Regenerate.
15185 2018-01-26  Julia Koval  <julia.koval@intel.com>
15187         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
15188         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
15189         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
15190         _mm_mask_bitshuffle_epi64_mask): Fix type.
15191         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
15192         USI_FTYPE_V4DI_V4DI_USI): Remove.
15193         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
15194         __builtin_ia32_vpshufbitqmb256_mask,
15195         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
15196         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
15197         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
15199 2018-01-26  Alan Modra  <amodra@gmail.com>
15201         PR target/84033
15202         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
15203         UNSPEC_VBPERMQ.  Sort other unspecs.
15205 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
15207         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
15209 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
15211         PR middle-end/83055
15212         * predict.c (drop_profile): Do not push/pop cfun; update also
15213         node->count.
15214         (handle_missing_profiles): Fix logic looking for zero profiles.
15216 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
15218         PR middle-end/83977
15219         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
15220         on functions with #pragma omp declare simd or functions with simd
15221         attribute.
15222         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
15223         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
15224         Remove trailing \n from warning_at calls.
15226 2018-01-25  Tom de Vries  <tom@codesourcery.com>
15228         PR target/84028
15229         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15230         for neutered workers.
15232 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
15234         PR target/68467
15235         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
15236         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
15238 2018-01-24  Jeff Law  <law@redhat.com>
15240         PR target/83994
15241         * i386.c (get_probe_interval): Move to earlier point.
15242         (ix86_compute_frame_layout): If -fstack-clash-protection and
15243         the frame is larger than the probe interval, then use pushes
15244         to save registers rather than reg->mem moves.
15245         (ix86_expand_prologue): Remove conditional for int_registers_saved
15246         assertion.
15248 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
15250         PR target/84014
15251         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
15252         min/max for never referenced object.
15254 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
15256         PR middle-end/83977
15257         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
15258         here.
15259         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
15260         attributes from DECL_ATTRIBUTES (decl) without affecting
15261         DECL_ATTRIBUTES (current_function_decl).
15262         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
15263         functions with non-NULL DECL_ABSTRACT_ORIGIN.
15265 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
15267         PR tree-optimization/83979
15268         * fold-const.c (fold_comparison): Use constant_boolean_node
15269         instead of boolean_{true,false}_node.
15271 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
15273         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
15274         with zero counts.
15276 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15278         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15279         Simplify the clause that sets the length attribute.
15280         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15281         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
15282         clause that sets the length attribute.
15283         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15285 2018-01-24  Tom de Vries  <tom@codesourcery.com>
15287         PR target/83589
15288         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
15289         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
15290         Add strict parameter.
15291         (prevent_branch_around_nothing): Insert dummy insn between branch to
15292         label and label with no ptx insn inbetween.
15293         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
15295 2018-01-24  Tom de Vries  <tom@codesourcery.com>
15297         PR target/81352
15298         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15299         for neutered threads in warp.
15300         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
15302 2018-01-24  Richard Biener  <rguenther@suse.de>
15304         PR tree-optimization/83176
15305         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
15306         operands.
15308 2018-01-24  Richard Biener  <rguenther@suse.de>
15310         PR tree-optimization/82819
15311         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
15312         code generating pluses that are no-ops in the target precision.
15314 2018-01-24  Richard Biener  <rguenther@suse.de>
15316         PR middle-end/84000
15317         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
15319 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
15321         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
15322         to merge probabilities.
15323         * predict.c (probably_never_executed): Also mark as cold functions
15324         with global 0 profile and guessed local profile.
15325         * profile-count.c (profile_probability::combine_with_count): New
15326         member function.
15327         * profile-count.h (profile_probability::operator*,
15328         profile_probability::operator*=, profile_probability::operator/,
15329         profile_probability::operator/=): Reduce precision to adjusted
15330         and set value to guessed on contradictory divisions.
15331         (profile_probability::combine_with_freq): Remove.
15332         (profile_probability::combine_wiht_count): Declare.
15333         (profile_count::force_nonzero):: Set to adjusted.
15334         (profile_count::probability_in):: Set quality to adjusted.
15335         * tree-ssa-tail-merge.c (replace_block_by): Use
15336         combine_with_count.
15338 2018-01-23  Andrew Waterman  <andrew@sifive.com>
15339             Jim Wilson  <jimw@sifive.com>
15341         * config/riscv/riscv.c (riscv_stack_boundary): New.
15342         (riscv_option_override): Set riscv_stack_boundary.  Handle
15343         riscv_preferred_stack_boundary_arg.
15344         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
15345         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
15346         (STACK_BOUNDARY): Set to riscv_stack_boundary.
15347         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
15348         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
15349         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
15351 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
15353         PR target/83905
15354         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
15355         of struct ix86_frame.
15356         (ix86_expand_epilogue): Likewise.  Add a local variable for
15357         the reg_save_offset field in struct ix86_frame.
15359 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
15361         PR tree-optimization/82604
15362         * tree-loop-distribution.c (enum partition_kind): New enum item
15363         PKIND_PARTIAL_MEMSET.
15364         (partition_builtin_p): Support above new enum item.
15365         (generate_code_for_partition): Ditto.
15366         (compute_access_range): Differentiate cases that equality can be
15367         proven at all loops, the innermost loops or no loops.
15368         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
15369         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
15370         (finalize_partitions, distribute_loop): Don't fuse partition of
15371         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
15372         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
15373         parloop is enabled.
15375 2018-01-23  Martin Liska  <mliska@suse.cz>
15377         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
15378         order to ignore the predictor.
15379         (PRED_POLYMORPHIC_CALL): Likewise.
15380         (PRED_RECURSIVE_CALL): Likewise.
15382 2018-01-23  Martin Liska  <mliska@suse.cz>
15384         * tree-profile.c (tree_profiling): Print function header to
15385         aware reader which function we are working on.
15386         * value-prof.c (gimple_find_values_to_profile): Do not print
15387         not interesting value histograms.
15389 2018-01-23  Martin Liska  <mliska@suse.cz>
15391         * profile-count.h (enum profile_quality): Add
15392         profile_uninitialized as the first value. Do not number values
15393         as they are zero based.
15394         (profile_count::verify): Update sanity check.
15395         (profile_probability::verify): Likewise.
15397 2018-01-23  Nathan Sidwell  <nathan@acm.org>
15399         * doc/invoke.texi (ffor-scope): Deprecate.
15401 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
15403         PR tree-optimization/83510
15404         * domwalk.c (set_all_edges_as_executable): New function.
15405         (dom_walker::dom_walker): Convert bool param
15406         "skip_unreachable_blocks" to enum reachability.  Move setup of
15407         edge flags to set_all_edges_as_executable and only do it when
15408         reachability is REACHABLE_BLOCKS.
15409         * domwalk.h (enum dom_walker::reachability): New enum.
15410         (dom_walker::dom_walker): Convert bool param
15411         "skip_unreachable_blocks" to enum reachability.
15412         (set_all_edges_as_executable): New decl.
15413         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
15414         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
15415         "reachability".
15416         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
15417         but converting true to REACHABLE_BLOCKS.
15418         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
15419         * tree-vrp.c
15420         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
15421         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
15422         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
15423         REACHABLE_BLOCKS.
15424         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
15425         if check_all_array_refs will be called.
15427 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
15429         * tree.c (selftest::test_location_wrappers): Add more test
15430         coverage.
15432 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
15434         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
15435         (selftest::test_bit_in_range): Likewise.
15437 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
15439         PR testsuite/83888
15440         * doc/sourcebuild.texi (vect_float): Say that the selector
15441         only describes the situation when -funsafe-math-optimizations is on.
15442         (vect_float_strict): Document.
15444 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
15446         PR tree-optimization/83965
15447         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
15448         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
15449         instead of checking only for a reduction.
15450         (vect_recog_widen_sum_pattern): Likewise.
15452 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
15454         * predict.c (probably_never_executed): Only use precise profile info.
15455         (compute_function_frequency): Skip after inlining hack since we now
15456         have quality checking.
15458 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
15460         * profile-count.h (profile_probability::very_unlikely,
15461         profile_probability::unlikely, profile_probability::even): Set
15462         precision to guessed.
15464 2018-01-23  Richard Biener  <rguenther@suse.de>
15466         PR tree-optimization/83963
15467         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
15468         Properly terminate dominator walk when crossing the exit edge not
15469         when visiting its source block.
15471 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
15473         PR c++/83918
15474         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
15475         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
15477 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
15479         PR tree-optimization/83957
15480         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
15481         semicolon after for body surrounded by braces.
15483         PR tree-optimization/83081
15484         * profile-count.h (profile_probability::split): New method.
15485         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
15486         Use profile_probability::split.
15487         (do_compare_rtx_and_jump): Fix adjustment of probabilities
15488         when splitting a single conditional jump into 2.
15490 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
15492         PR tree-optimization/69452
15493         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
15494         decl.
15496 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15498         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
15499         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
15500         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
15502 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15504         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
15505         declaration.
15506         * config/rl78/rl78.md (movdi): New define_expand.
15507         * config/rl78/rl78.c (rl78_split_movdi): New function.
15509 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
15511         PR target/83862
15512         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
15513         no longer used.
15514         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
15515         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
15516         128-bit to produce an UNSPEC move to get the double word with the
15517         signbit and then a shift directly to do signbit.
15518         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
15519         implementation with a new version that just does either a direct
15520         move or a regular move.  Move memory interface to separate insns.
15521         Move insns so they are next to the expander.
15522         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
15523         with signbit move.  Split big and little endian case.
15524         (signbit<mode>2_dm_mem_le): Likewise.
15525         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
15526         (signbit<mode>2_dm2): Likewise.
15528 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15530         * config/rl78/rl78.md (anddi3): New define_expand.
15532 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15534         * config/rl78/rl78.md (umindi3): New define_expand.
15536 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15538         * config/rl78/rl78.md (smindi3): New define_expand.
15540 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15542         * config/rl78/rl78.md (smaxdi3): New define_expand.
15544 2018-01-22  Carl Love  <cel@us.ibm.com>
15546         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
15547         LVX_V1TI): Add macro expansion.
15548         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
15549         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
15550         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
15551         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
15552         Change check to determine if the instruction is a byte reversing
15553         entry.  Fix typo in comment.
15554         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
15555         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
15556         Add def_builtin calls for new builtins.
15557         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
15558         Add define_insn expansion.
15560 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15562         * config/rl78/rl78.md (umaxdi3): New define_expand.
15564 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
15566         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
15567         for non-QImode registers.
15569 2018-01-22  Richard Biener  <rguenther@suse.de>
15571         PR tree-optimization/83963
15572         * graphite-scop-detection.c (scop_detection::get_sese): Delay
15573         including the loop exit block.
15574         (scop_detection::merge_sese): Likewise.
15575         (scop_detection::add_scop): Do it here instead.
15577 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15579         * doc/sourcebuild.texi (arm_softfloat): Document.
15581 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
15583         PR gcc/77734
15584         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
15585         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
15586         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
15588 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15589             David Edelsohn  <dje.gcc@gmail.com>
15591         PR target/83946
15592         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15593         Change "crset eq" to "crset 2".
15594         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15595         (*call_indirect_aix<mode>_nospec): Likewise.
15596         (*call_value_indirect_aix<mode>_nospec): Likewise.
15597         (*call_indirect_elfv2<mode>_nospec): Likewise.
15598         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
15599         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
15600         change assembly output from . to $.
15601         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15602         (indirect_jump<mode>_nospec): Change assembly output from . to $.
15603         (*tablejump<mode>_internal1_nospec): Likewise.
15605 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
15607         PR target/80870
15608         * config/sh/sh_optimize_sett_clrt.cc:
15609         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
15611 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
15613         PR tree-optimization/83940
15614         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
15615         offset_dt to vect_constant_def rather than vect_unknown_def_type.
15616         (vect_check_load_store_mask): Add a mask_dt_out parameter and
15617         use it to pass back the definition type.
15618         (vect_check_store_rhs): Likewise rhs_dt_out.
15619         (vect_build_gather_load_calls): Add a mask_dt argument and use
15620         it instead of a call to vect_is_simple_use.
15621         (vectorizable_store): Update calls to vect_check_load_store_mask
15622         and vect_check_store_rhs.  Use the dt returned by the latter instead
15623         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
15624         instead of calls to vect_is_simple_use.  Pass the scalar rather
15625         than the vector operand to vect_is_simple_use when handling
15626         second and subsequent copies of an rhs value.
15627         (vectorizable_load): Update calls to vect_check_load_store_mask
15628         and vect_build_gather_load_calls.  Use the cached mask_dt and
15629         gs_info.offset_dt instead of calls to vect_is_simple_use.
15631 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
15633         PR middle-end/83945
15634         * tree-emutls.c: Include gimplify.h.
15635         (lower_emutls_2): New function.
15636         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
15637         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
15638         it before further processing.
15640         PR target/83930
15641         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
15642         UINTVAL (trueop1) instead of INTVAL (op1).
15644 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
15646         PR debug/81570
15647         PR debug/83728
15648         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
15649         INCOMING_FRAME_SP_OFFSET if not defined.
15650         (scan_trace): Add ENTRY argument.  If true and
15651         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
15652         emit a note to adjust the CFA offset.
15653         (create_cfi_notes): Adjust scan_trace callers.
15654         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
15655         INCOMING_FRAME_SP_OFFSET in the CIE.
15656         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
15657         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
15658         Likewise.
15659         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
15660         * doc/tm.texi: Regenerated.
15662 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15664         PR rtl-optimization/83147
15665         * lra-constraints.c (remove_inheritance_pseudos): Use
15666         lra_substitute_pseudo_within_insn.
15668 2018-01-19  Tom de Vries  <tom@codesourcery.com>
15669             Cesar Philippidis  <cesar@codesourcery.com>
15671         PR target/83920
15672         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
15674 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
15676         PR target/83790
15677         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
15678         spaces for function labels.
15680 2018-01-19  Martin Liska  <mliska@suse.cz>
15682         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
15683         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
15684         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
15685         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
15686         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
15687         (PRED_CONST_RETURN): Change from 69 to 65.
15688         (PRED_NULL_RETURN): Change from 91 to 71.
15689         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
15690         (PRED_LOOP_GUARD): Change from 66 to 73.
15692 2018-01-19  Martin Liska  <mliska@suse.cz>
15694         * predict.c (predict_insn_def): Add new assert.
15695         (struct branch_predictor): Change type to signed integer.
15696         (test_prediction_value_range): Amend test to cover
15697         PROB_UNINITIALIZED.
15698         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
15699         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
15700         (PRED_LOOP_ITERATIONS_MAX): Likewise.
15701         (PRED_LOOP_IV_COMPARE): Likewise.
15702         * predict.h (PROB_UNINITIALIZED): Define new constant.
15704 2018-01-19  Martin Liska  <mliska@suse.cz>
15706         * predict.c (dump_prediction): Add new format for
15707         analyze_brprob.py script which is enabled with -details
15708         suboption.
15709         * profile-count.h (precise_p): New function.
15711 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
15713         PR tree-optimization/83922
15714         * tree-vect-loop.c (vect_verify_full_masking): Return false if
15715         there are no statements that need masking.
15716         (vect_active_double_reduction_p): New function.
15717         (vect_analyze_loop_operations): Use it when handling phis that
15718         are not in the loop header.
15720 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
15722         PR tree-optimization/83914
15723         * tree-vect-loop.c (vectorizable_induction): Don't convert
15724         init_expr or apply the peeling adjustment for inductions
15725         that are nested within the vectorized loop.
15727 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15729         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
15730         instead of NEG.
15732 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
15734         PR sanitizer/81715
15735         PR testsuite/83882
15736         * function.h (gimplify_parameters): Add gimple_seq * argument.
15737         * function.c: Include gimple.h and options.h.
15738         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
15739         for the added local temporaries if needed.
15740         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
15741         if there are any parameter cleanups, wrap whole body into a
15742         try/finally with the cleanups.
15744 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
15746         PR target/82964
15747         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
15748         Use GET_MODE_CLASS for scalar floating point.
15750 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
15752         PR ipa/82256
15753         patch by PaX Team
15754         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
15755         Fix call of call_cgraph_insertion_hooks.
15757 2018-01-18  Martin Sebor  <msebor@redhat.com>
15759         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
15761 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
15763         PR ipa/83619
15764         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
15765         frequencies.
15767 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
15769         PR other/70268
15770         * common.opt: (-ffile-prefix-map): New option.
15771         * opts.c (common_handle_option): Defer it.
15772         * opts-global.c (handle_common_deferred_options): Handle it.
15773         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
15774         * file-prefix-map.h: New file.
15775         (remap_debug_filename, add_debug_prefix_map): ...here.
15776         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
15777         * final.c (debug_prefix_map, add_debug_prefix_map
15778         remap_debug_filename): Move to...
15779         * file-prefix-map.c: New file.
15780         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
15781         generalize, get rid of alloca(), use strrchr() instead of strchr().
15782         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
15783         Implement in terms of add_prefix_map().
15784         (remap_macro_filename, remap_debug_filename): Implement in term of
15785         remap_filename().
15786         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
15787         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
15788         * dbxout.c: Include file-prefix-map.h.
15789         * varasm.c: Likewise.
15790         * vmsdbgout.c: Likewise.
15791         * xcoffout.c: Likewise.
15792         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
15793         * doc/cppopts.texi (-fmacro-prefix-map): Document.
15794         * doc/invoke.texi (-ffile-prefix-map): Document.
15795         (-fdebug-prefix-map): Update description.
15797 2018-01-18  Martin Liska  <mliska@suse.cz>
15799         * config/i386/i386.c (indirect_thunk_name): Document that also
15800         lfence is emitted.
15801         (output_indirect_thunk): Document why both instructions
15802         (pause and lfence) are generated.
15804 2018-01-18  Richard Biener  <rguenther@suse.de>
15806         PR tree-optimization/83887
15807         * graphite-scop-detection.c
15808         (scop_detection::get_nearest_dom_with_single_entry): Remove.
15809         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
15810         (scop_detection::merge_sese): Re-implement with a flood-fill
15811         algorithm that properly finds a SESE region if it exists.
15813 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
15815         PR c/61240
15816         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
15817         pointer_diff optimizations use view_convert instead of convert.
15819 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15821         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15822         Generate different code for -mno-speculate-indirect-jumps.
15823         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15824         (*call_indirect_aix<mode>): Disable for
15825         -mno-speculate-indirect-jumps.
15826         (*call_indirect_aix<mode>_nospec): New define_insn.
15827         (*call_value_indirect_aix<mode>): Disable for
15828         -mno-speculate-indirect-jumps.
15829         (*call_value_indirect_aix<mode>_nospec): New define_insn.
15830         (*sibcall_nonlocal_sysv<mode>): Generate different code for
15831         -mno-speculate-indirect-jumps.
15832         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15834 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
15836         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
15837         long double type, set the flags for noting the default long double
15838         type, even if we don't pass or return a long double type.
15840 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
15842         PR ipa/83051
15843         * ipa-inline.c (flatten_function): Do not overwrite final inlining
15844         failure.
15846 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
15848         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
15849         support for merge[hl].
15850         (fold_mergehl_helper): New helper function.
15851         (tree-vector-builder.h): New #include for tree_vector_builder usage.
15852         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
15853         (altivec_vmrglw_direct): Add xxmrglw insn.
15855 2018-01-17  Andrew Waterman  <andrew@sifive.com>
15857         * config/riscv/riscv.c (riscv_conditional_register_usage): If
15858         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
15860 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
15862         PR lto/83121
15863         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
15864         call the lto_location_cache before reading the
15865         DECL_SOURCE_LOCATION of the types.
15867 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
15868             Richard Sandiford  <richard.sandiford@linaro.org>
15870         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
15871         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
15872         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
15873         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
15874         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
15875         Add declaration.
15876         * config/aarch64/constraints.md (aarch64_movti_operand):
15877         Limit immediates.
15878         * config/aarch64/predicates.md (Uti): Add new constraint.
15880 2018-01-17 Carl Love  <cel@us.ibm.com>
15882         * config/rs6000/vsx.md (define_expand xl_len_r,
15883         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
15884         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
15885         lxvll.
15886         (define_expand, define_insn): Move the shift left from  the
15887         define_insn to the define_expand for lxvl and stxvl instructions.
15888         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
15889         and XL_LEN_R definitions to PURE.
15891 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
15893         * config/i386/i386.c (indirect_thunk_name): Declare regno
15894         as unsigned int.  Compare regno with INVALID_REGNUM.
15895         (output_indirect_thunk): Ditto.
15896         (output_indirect_thunk_function): Ditto.
15897         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
15898         in the call to output_indirect_thunk_function.
15900 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
15902         PR middle-end/83884
15903         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
15904         rather than the size of inner_type to determine the stack slot size
15905         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
15907 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
15909         PR target/83546
15910         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
15911         to PTA_SILVERMONT.
15913 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
15915         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
15916         endian Linux systems to optionally enable multilibs for selecting
15917         the long double type if the user configured an explicit type.
15918         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
15919         have no long double multilibs if not defined.
15920         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
15921         warn if the user used -mabi={ieee,ibm}longdouble and we built
15922         multilibs for long double.
15923         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
15924         appropriate multilib option.
15925         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
15926         multilib options.
15927         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
15928         for building long double multilibs.
15929         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
15931 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
15933         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
15934         copies.
15936         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
15937         64 bits.
15938         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
15939         128 bits.
15941         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
15942         variables.
15944         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
15945         return value.
15947 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
15949         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
15950         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
15952 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15954         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
15955         different rtl trees depending on TARGET_64BIT.
15956         (rs6000_gen_lvx): Likewise.
15958 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
15960         * config/visium/visium.md (nop): Tweak comment.
15961         (hazard_nop): Likewise.
15963 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15965         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
15966         -mspeculate-indirect-jumps.
15967         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
15968         for -mno-speculate-indirect-jumps.
15969         (*call_indirect_elfv2<mode>_nospec): New define_insn.
15970         (*call_value_indirect_elfv2<mode>): Disable for
15971         -mno-speculate-indirect-jumps.
15972         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
15973         (indirect_jump): Emit different RTL for
15974         -mno-speculate-indirect-jumps.
15975         (*indirect_jump<mode>): Disable for
15976         -mno-speculate-indirect-jumps.
15977         (*indirect_jump<mode>_nospec): New define_insn.
15978         (tablejump): Emit different RTL for
15979         -mno-speculate-indirect-jumps.
15980         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
15981         (tablejumpsi_nospec): New define_expand.
15982         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
15983         (tablejumpdi_nospec): New define_expand.
15984         (*tablejump<mode>_internal1): Disable for
15985         -mno-speculate-indirect-jumps.
15986         (*tablejump<mode>_internal1_nospec): New define_insn.
15987         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
15988         option.
15990 2018-01-16  Artyom Skrobov tyomitch@gmail.com
15992         * caller-save.c (insert_save): Drop unnecessary parameter.  All
15993         callers updated.
15995 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
15996             Richard Biener  <rguenth@suse.de>
15998         PR libgomp/83590
15999         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
16000         return early, inline manually is_gimple_sizepos.  Make sure if we
16001         call gimplify_expr we don't end up with a gimple constant.
16002         * tree.c (variably_modified_type_p): Don't return true for
16003         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
16004         * gimplify.h (is_gimple_sizepos): Remove.
16006 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
16008         PR tree-optimization/83857
16009         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
16010         vectorizable_live_operation for pure SLP statements.
16011         (vectorizable_live_operation): Handle PHIs.
16013 2018-01-16  Richard Biener  <rguenther@suse.de>
16015         PR tree-optimization/83867
16016         * tree-vect-stmts.c (vect_transform_stmt): Precompute
16017         nested_in_vect_loop_p since the scalar stmt may get invalidated.
16019 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
16021         PR c/83844
16022         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
16023         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
16024         If off is not INTEGER_CST, issue a may not be aligned warning
16025         rather than isn't aligned.  Use isn%'t rather than isn't.
16026         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
16027         into MULT_EXPR.
16028         <case MULT_EXPR>: Improve the case when bottom and one of the
16029         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
16030         operand, in that case check if the other operand is multiple of
16031         bottom divided by the INTEGER_CST operand.
16033 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
16035         PR target/83858
16036         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
16037         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
16038         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
16039         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
16040         * config/pa/pa.c (pa_function_arg_advance): Likewise.
16041         (pa_function_arg, pa_arg_partial_bytes): Likewise.
16042         (pa_function_arg_size): New function.
16044 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
16046         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
16047         in a separate statement.
16049 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
16051         PR tree-optimization/83847
16052         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
16053         group gathers and scatters.
16055 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
16057         PR rtl-optimization/86620
16058         * params.def (max-sched-ready-insns): Bump minimum value to 1.
16060         PR rtl-optimization/83213
16061         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
16062         to last if both are JUMP_INSNs.
16064         PR tree-optimization/83843
16065         * gimple-ssa-store-merging.c
16066         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
16067         store_immediate_info for bswap/nop orig_stores.
16069 2018-01-15  Andrew Waterman  <andrew@sifive.com>
16071         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
16072         !TARGET_MUL.
16073         <UDIV>: Increase cost if !TARGET_DIV.
16075 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
16077         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
16078         (define_attr "cr_logical_3op"): New.
16079         (cceq_ior_compare): Adjust.
16080         (cceq_ior_compare_complement): Adjust.
16081         (*cceq_rev_compare): Adjust.
16082         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
16083         (is_cracked_insn): Adjust.
16084         (insn_must_be_first_in_group): Adjust.
16085         * config/rs6000/40x.md: Adjust.
16086         * config/rs6000/440.md: Adjust.
16087         * config/rs6000/476.md: Adjust.
16088         * config/rs6000/601.md: Adjust.
16089         * config/rs6000/603.md: Adjust.
16090         * config/rs6000/6xx.md: Adjust.
16091         * config/rs6000/7450.md: Adjust.
16092         * config/rs6000/7xx.md: Adjust.
16093         * config/rs6000/8540.md: Adjust.
16094         * config/rs6000/cell.md: Adjust.
16095         * config/rs6000/e300c2c3.md: Adjust.
16096         * config/rs6000/e500mc.md: Adjust.
16097         * config/rs6000/e500mc64.md: Adjust.
16098         * config/rs6000/e5500.md: Adjust.
16099         * config/rs6000/e6500.md: Adjust.
16100         * config/rs6000/mpc.md: Adjust.
16101         * config/rs6000/power4.md: Adjust.
16102         * config/rs6000/power5.md: Adjust.
16103         * config/rs6000/power6.md: Adjust.
16104         * config/rs6000/power7.md: Adjust.
16105         * config/rs6000/power8.md: Adjust.
16106         * config/rs6000/power9.md: Adjust.
16107         * config/rs6000/rs64.md: Adjust.
16108         * config/rs6000/titan.md: Adjust.
16110 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16112         * config/i386/predicates.md (indirect_branch_operand): Rewrite
16113         ix86_indirect_branch_register logic.
16115 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16117         * config/i386/constraints.md (Bs): Update
16118         ix86_indirect_branch_register check.  Don't check
16119         ix86_indirect_branch_register with GOT_memory_operand.
16120         (Bw): Likewise.
16121         * config/i386/predicates.md (GOT_memory_operand): Don't check
16122         ix86_indirect_branch_register here.
16123         (GOT32_symbol_operand): Likewise.
16125 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16127         * config/i386/predicates.md (constant_call_address_operand):
16128         Rewrite ix86_indirect_branch_register logic.
16129         (sibcall_insn_operand): Likewise.
16131 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16133         * config/i386/constraints.md (Bs): Replace
16134         ix86_indirect_branch_thunk_register with
16135         ix86_indirect_branch_register.
16136         (Bw): Likewise.
16137         * config/i386/i386.md (indirect_jump): Likewise.
16138         (tablejump): Likewise.
16139         (*sibcall_memory): Likewise.
16140         (*sibcall_value_memory): Likewise.
16141         Peepholes of indirect call and jump via memory: Likewise.
16142         * config/i386/i386.opt: Likewise.
16143         * config/i386/predicates.md (indirect_branch_operand): Likewise.
16144         (GOT_memory_operand): Likewise.
16145         (call_insn_operand): Likewise.
16146         (sibcall_insn_operand): Likewise.
16147         (GOT32_symbol_operand): Likewise.
16149 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
16151         PR middle-end/83837
16152         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
16153         type rather than type addr's type points to.
16154         (expand_omp_atomic_mutex): Likewise.
16155         (expand_omp_atomic): Likewise.
16157 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16159         PR target/83839
16160         * config/i386/i386.c (output_indirect_thunk_function): Use
16161         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
16162         for  __x86_return_thunk.
16164 2018-01-15  Richard Biener  <rguenther@suse.de>
16166         PR middle-end/83850
16167         * expmed.c (extract_bit_field_1): Fix typo.
16169 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16171         PR target/83687
16172         * config/arm/iterators.md (VF): New mode iterator.
16173         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
16174         Remove integer-related logic from pattern.
16175         (neon_vabd<mode>_3): Likewise.
16177 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
16179         PR middle-end/82694
16180         * common.opt (fstrict-overflow): No longer an alias.
16181         (fwrapv-pointer): New option.
16182         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
16183         also for pointer types based on flag_wrapv_pointer.
16184         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
16185         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
16186         opts->x_flag_wrapv got set.
16187         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
16188         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
16189         POINTER_TYPE_OVERFLOW_UNDEFINED.
16190         * match.pd: Likewise in address comparison pattern.
16191         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
16193 2018-01-15  Richard Biener  <rguenther@suse.de>
16195         PR lto/83804
16196         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
16197         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
16198         Reset type names to their identifier if their TYPE_DECL doesn't
16199         have linkage (and thus is used for ODR and devirt).
16200         (save_debug_info_for_decl): Remove.
16201         (save_debug_info_for_type): Likewise.
16202         (add_tree_to_fld_list): Adjust.
16203         * tree-pretty-print.c (dump_generic_node): Make dumping of
16204         type names more robust.
16206 2018-01-15  Richard Biener  <rguenther@suse.de>
16208         * BASE-VER: Bump to 8.0.1.
16210 2018-01-14  Martin Sebor  <msebor@redhat.com>
16212         PR other/83508
16213         * builtins.c (check_access): Avoid warning when the no-warning bit
16214         is set.
16216 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
16218         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
16219         * ira-color (allocno_hard_regs_compare): Likewise.
16221 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
16223         PR target/83013
16224         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
16225         Use .pushsection/.popsection.
16227 2018-01-14  Martin Sebor  <msebor@redhat.com>
16229         PR c++/81327
16230         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
16232 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
16234         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
16235         entry from extra_headers.
16236         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
16237         extra_headers, make the list bitwise identical to the i?86-*-* one.
16239 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
16241         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
16242         -mcmodel=large with -mindirect-branch=thunk,
16243         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
16244         -mfunction-return=thunk-extern.
16245         * doc/invoke.texi: Document -mcmodel=large is incompatible with
16246         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
16247         -mfunction-return=thunk and -mfunction-return=thunk-extern.
16249 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
16251         * config/i386/i386.c (print_reg): Print the name of the full
16252         integer register without '%'.
16253         (ix86_print_operand): Handle 'V'.
16254         * doc/extend.texi: Document 'V' modifier.
16256 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
16258         * config/i386/constraints.md (Bs): Disallow memory operand for
16259         -mindirect-branch-register.
16260         (Bw): Likewise.
16261         * config/i386/predicates.md (indirect_branch_operand): Likewise.
16262         (GOT_memory_operand): Likewise.
16263         (call_insn_operand): Likewise.
16264         (sibcall_insn_operand): Likewise.
16265         (GOT32_symbol_operand): Likewise.
16266         * config/i386/i386.md (indirect_jump): Call convert_memory_address
16267         for -mindirect-branch-register.
16268         (tablejump): Likewise.
16269         (*sibcall_memory): Likewise.
16270         (*sibcall_value_memory): Likewise.
16271         Disallow peepholes of indirect call and jump via memory for
16272         -mindirect-branch-register.
16273         (*call_pop): Replace m with Bw.
16274         (*call_value_pop): Likewise.
16275         (*sibcall_pop_memory): Replace m with Bs.
16276         * config/i386/i386.opt (mindirect-branch-register): New option.
16277         * doc/invoke.texi: Document -mindirect-branch-register option.
16279 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
16281         * config/i386/i386-protos.h (ix86_output_function_return): New.
16282         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
16283         set function_return_type.
16284         (indirect_thunk_name): Add ret_p to indicate thunk for function
16285         return.
16286         (output_indirect_thunk_function): Pass false to
16287         indirect_thunk_name.
16288         (ix86_output_indirect_branch_via_reg): Likewise.
16289         (ix86_output_indirect_branch_via_push): Likewise.
16290         (output_indirect_thunk_function): Create alias for function
16291         return thunk if regno < 0.
16292         (ix86_output_function_return): New function.
16293         (ix86_handle_fndecl_attribute): Handle function_return.
16294         (ix86_attribute_table): Add function_return.
16295         * config/i386/i386.h (machine_function): Add
16296         function_return_type.
16297         * config/i386/i386.md (simple_return_internal): Use
16298         ix86_output_function_return.
16299         (simple_return_internal_long): Likewise.
16300         * config/i386/i386.opt (mfunction-return=): New option.
16301         (indirect_branch): Mention -mfunction-return=.
16302         * doc/extend.texi: Document function_return function attribute.
16303         * doc/invoke.texi: Document -mfunction-return= option.
16305 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
16307         * config/i386/i386-opts.h (indirect_branch): New.
16308         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
16309         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
16310         with local indirect jump when converting indirect call and jump.
16311         (ix86_set_indirect_branch_type): New.
16312         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
16313         (indirectlabelno): New.
16314         (indirect_thunk_needed): Likewise.
16315         (indirect_thunk_bnd_needed): Likewise.
16316         (indirect_thunks_used): Likewise.
16317         (indirect_thunks_bnd_used): Likewise.
16318         (INDIRECT_LABEL): Likewise.
16319         (indirect_thunk_name): Likewise.
16320         (output_indirect_thunk): Likewise.
16321         (output_indirect_thunk_function): Likewise.
16322         (ix86_output_indirect_branch_via_reg): Likewise.
16323         (ix86_output_indirect_branch_via_push): Likewise.
16324         (ix86_output_indirect_branch): Likewise.
16325         (ix86_output_indirect_jmp): Likewise.
16326         (ix86_code_end): Call output_indirect_thunk_function if needed.
16327         (ix86_output_call_insn): Call ix86_output_indirect_branch if
16328         needed.
16329         (ix86_handle_fndecl_attribute): Handle indirect_branch.
16330         (ix86_attribute_table): Add indirect_branch.
16331         * config/i386/i386.h (machine_function): Add indirect_branch_type
16332         and has_local_indirect_jump.
16333         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
16334         to true.
16335         (tablejump): Likewise.
16336         (*indirect_jump): Use ix86_output_indirect_jmp.
16337         (*tablejump_1): Likewise.
16338         (simple_return_indirect_internal): Likewise.
16339         * config/i386/i386.opt (mindirect-branch=): New option.
16340         (indirect_branch): New.
16341         (keep): Likewise.
16342         (thunk): Likewise.
16343         (thunk-inline): Likewise.
16344         (thunk-extern): Likewise.
16345         * doc/extend.texi: Document indirect_branch function attribute.
16346         * doc/invoke.texi: Document -mindirect-branch= option.
16348 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
16350         PR ipa/83051
16351         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
16353 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
16355         * ipa-inline.c (want_inline_small_function_p): Return false if
16356         inlining has already failed with CIF_FINAL_ERROR.
16357         (update_caller_keys): Call want_inline_small_function_p before
16358         can_inline_edge_p.
16359         (update_callee_keys): Likewise.
16361 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16363         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
16364         New function.
16365         (rs6000_quadword_masked_address_p): Likewise.
16366         (quad_aligned_load_p): Likewise.
16367         (quad_aligned_store_p): Likewise.
16368         (const_load_sequence_p): Add comment to describe the outer-most loop.
16369         (mimic_memory_attributes_and_flags): New function.
16370         (rs6000_gen_stvx): Likewise.
16371         (replace_swapped_aligned_store): Likewise.
16372         (rs6000_gen_lvx): Likewise.
16373         (replace_swapped_aligned_load): Likewise.
16374         (replace_swapped_load_constant): Capitalize argument name in
16375         comment describing this function.
16376         (rs6000_analyze_swaps): Add a third pass to search for vector loads
16377         and stores that access quad-word aligned addresses and replace
16378         with stvx or lvx instructions when appropriate.
16379         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
16380         New function prototype.
16381         (rs6000_quadword_masked_address_p): Likewise.
16382         (rs6000_gen_lvx): Likewise.
16383         (rs6000_gen_stvx): Likewise.
16384         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
16385         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
16386         when memory address is aligned.
16387         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
16388         this split to select lvx instruction when memory address is aligned.
16389         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
16390         instruction when memory address is aligned.
16391         (*vsx_le_perm_load_v16qi): Likewise.
16392         (four unnamed splitters): Modify to select the stvx instruction
16393         when memory is aligned.
16395 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
16397         * predict.c (determine_unlikely_bbs): Handle correctly BBs
16398         which appears in the queue multiple times.
16400 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16401             Alan Hayward  <alan.hayward@arm.com>
16402             David Sherwood  <david.sherwood@arm.com>
16404         * tree-vectorizer.h (vec_lower_bound): New structure.
16405         (_loop_vec_info): Add check_nonzero and lower_bounds.
16406         (LOOP_VINFO_CHECK_NONZERO): New macro.
16407         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
16408         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
16409         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
16410         fields.  Make seg_len the distance travelled, not including the
16411         access size.
16412         (dr_direction_indicator): Declare.
16413         (dr_zero_step_indicator): Likewise.
16414         (dr_known_forward_stride_p): Likewise.
16415         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
16416         tree-ssanames.h.
16417         (runtime_alias_check_p): Allow runtime alias checks with
16418         variable strides.
16419         (operator ==): Compare access_size and align.
16420         (prune_runtime_alias_test_list): Rework for new distinction between
16421         the access_size and seg_len.
16422         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
16423         segment lengths.
16424         (get_segment_min_max): New function.
16425         (create_intersect_range_checks): Use it.
16426         (dr_step_indicator): New function.
16427         (dr_direction_indicator): Likewise.
16428         (dr_zero_step_indicator): Likewise.
16429         (dr_known_forward_stride_p): Likewise.
16430         * tree-loop-distribution.c (data_ref_segment_size): Return
16431         DR_STEP * (niters - 1).
16432         (compute_alias_check_pairs): Update call to the dr_with_seg_len
16433         constructor.
16434         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
16435         (vect_preserves_scalar_order_p): New function, split out from...
16436         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
16437         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
16438         (vect_vfa_access_size): New function.
16439         (vect_vfa_align): Likewise.
16440         (vect_compile_time_alias): Take access_size_a and access_b arguments.
16441         (dump_lower_bound): New function.
16442         (vect_check_lower_bound): Likewise.
16443         (vect_small_gap_p): Likewise.
16444         (vectorizable_with_step_bound_p): Likewise.
16445         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
16446         depencies if the vectorization factor is 1.  Convert the checks
16447         for nonzero steps into checks on the bounds of DR_STEP.  Try using
16448         a bunds check for variable steps if the minimum required step is
16449         relatively small. Update calls to the dr_with_seg_len
16450         constructor and to vect_compile_time_alias.
16451         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
16452         function.
16453         (vect_loop_versioning): Call it.
16454         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
16455         when retrying.
16456         (vect_estimate_min_profitable_iters): Account for any bounds checks.
16458 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16459             Alan Hayward  <alan.hayward@arm.com>
16460             David Sherwood  <david.sherwood@arm.com>
16462         * doc/sourcebuild.texi (vect_scatter_store): Document.
16463         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
16464         optabs.
16465         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
16466         Document.
16467         * genopinit.c (main): Add supports_vec_scatter_store and
16468         supports_vec_scatter_store_cached to target_optabs.
16469         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
16470         IFN_MASK_SCATTER_STORE.
16471         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
16472         functions.
16473         * internal-fn.h (internal_store_fn_p): Declare.
16474         (internal_fn_stored_value_index): Likewise.
16475         * internal-fn.c (scatter_store_direct): New macro.
16476         (expand_scatter_store_optab_fn): New function.
16477         (direct_scatter_store_optab_supported_p): New macro.
16478         (internal_store_fn_p): New function.
16479         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
16480         IFN_MASK_SCATTER_STORE.
16481         (internal_fn_mask_index): Likewise.
16482         (internal_fn_stored_value_index): New function.
16483         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
16484         for scatter stores.
16485         * optabs-query.h (supports_vec_scatter_store_p): Declare.
16486         * optabs-query.c (supports_vec_scatter_store_p): New function.
16487         * tree-vectorizer.h (vect_get_store_rhs): Declare.
16488         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
16489         true for scatter stores.
16490         (vect_gather_scatter_fn_p): Handle scatter stores too.
16491         (vect_check_gather_scatter): Consider using scatter stores if
16492         supports_vec_scatter_store_p.
16493         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
16494         scatter stores too.
16495         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16496         internal_fn_stored_value_index.
16497         (check_load_store_masking): Handle scatter stores too.
16498         (vect_get_store_rhs): Make public.
16499         (vectorizable_call): Use internal_store_fn_p.
16500         (vectorizable_store): Handle scatter store internal functions.
16501         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
16502         when deciding whether the end of the group has been reached.
16503         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
16504         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
16505         (mask_scatter_store<mode>): New insns.
16507 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16508             Alan Hayward  <alan.hayward@arm.com>
16509             David Sherwood  <david.sherwood@arm.com>
16511         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
16512         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
16513         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
16514         function.
16515         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
16516         Use vect_truncate_gather_scatter_offset if we can't treat the
16517         operation as a normal gather load or scatter store.
16518         (get_group_load_store_type): Take the gather_scatter_info
16519         as argument.  Try using a gather load or scatter store for
16520         single-element groups.
16521         (get_load_store_type): Update calls to get_group_load_store_type
16522         and vect_use_strided_gather_scatters_p.
16524 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16525             Alan Hayward  <alan.hayward@arm.com>
16526             David Sherwood  <david.sherwood@arm.com>
16528         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
16529         optional tree argument.
16530         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
16531         null target hooks.
16532         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
16533         but continue to use the current value as a fallback.
16534         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
16535         to compare the updates.
16536         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
16537         (get_load_store_type): Use it when handling a strided access.
16538         (vect_get_strided_load_store_ops): New function.
16539         (vect_get_data_ptr_increment): Likewise.
16540         (vectorizable_load): Handle strided gather loads.  Always pass
16541         a step to vect_create_data_ref_ptr and bump_vector_ptr.
16543 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16544             Alan Hayward  <alan.hayward@arm.com>
16545             David Sherwood  <david.sherwood@arm.com>
16547         * doc/md.texi (gather_load@var{m}): Document.
16548         (mask_gather_load@var{m}): Likewise.
16549         * genopinit.c (main): Add supports_vec_gather_load and
16550         supports_vec_gather_load_cached to target_optabs.
16551         * optabs-tree.c (init_tree_optimization_optabs): Use
16552         ggc_cleared_alloc to allocate target_optabs.
16553         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
16554         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
16555         functions.
16556         * internal-fn.h (internal_load_fn_p): Declare.
16557         (internal_gather_scatter_fn_p): Likewise.
16558         (internal_fn_mask_index): Likewise.
16559         (internal_gather_scatter_fn_supported_p): Likewise.
16560         * internal-fn.c (gather_load_direct): New macro.
16561         (expand_gather_load_optab_fn): New function.
16562         (direct_gather_load_optab_supported_p): New macro.
16563         (direct_internal_fn_optab): New function.
16564         (internal_load_fn_p): Likewise.
16565         (internal_gather_scatter_fn_p): Likewise.
16566         (internal_fn_mask_index): Likewise.
16567         (internal_gather_scatter_fn_supported_p): Likewise.
16568         * optabs-query.c (supports_at_least_one_mode_p): New function.
16569         (supports_vec_gather_load_p): Likewise.
16570         * optabs-query.h (supports_vec_gather_load_p): Declare.
16571         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
16572         and memory_type field.
16573         (NUM_PATTERNS): Bump to 15.
16574         * tree-vect-data-refs.c: Include internal-fn.h.
16575         (vect_gather_scatter_fn_p): New function.
16576         (vect_describe_gather_scatter_call): Likewise.
16577         (vect_check_gather_scatter): Try using internal functions for
16578         gather loads.  Recognize existing calls to a gather load function.
16579         (vect_analyze_data_refs): Consider using gather loads if
16580         supports_vec_gather_load_p.
16581         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
16582         (vect_get_gather_scatter_offset_type): Likewise.
16583         (vect_convert_mask_for_vectype): Likewise.
16584         (vect_add_conversion_to_patterm): Likewise.
16585         (vect_try_gather_scatter_pattern): Likewise.
16586         (vect_recog_gather_scatter_pattern): New pattern recognizer.
16587         (vect_vect_recog_func_ptrs): Add it.
16588         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16589         internal_fn_mask_index and internal_gather_scatter_fn_p.
16590         (check_load_store_masking): Take the gather_scatter_info as an
16591         argument and handle gather loads.
16592         (vect_get_gather_scatter_ops): New function.
16593         (vectorizable_call): Check internal_load_fn_p.
16594         (vectorizable_load): Likewise.  Handle gather load internal
16595         functions.
16596         (vectorizable_store): Update call to check_load_store_masking.
16597         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
16598         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
16599         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
16600         (aarch64_gather_scale_operand_d): New predicates.
16601         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
16602         (mask_gather_load<mode>): New insns.
16604 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16605             Alan Hayward  <alan.hayward@arm.com>
16606             David Sherwood  <david.sherwood@arm.com>
16608         * optabs.def (fold_left_plus_optab): New optab.
16609         * doc/md.texi (fold_left_plus_@var{m}): Document.
16610         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
16611         * internal-fn.c (fold_left_direct): Define.
16612         (expand_fold_left_optab_fn): Likewise.
16613         (direct_fold_left_optab_supported_p): Likewise.
16614         * fold-const-call.c (fold_const_fold_left): New function.
16615         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
16616         * tree-parloops.c (valid_reduction_p): New function.
16617         (gather_scalar_reductions): Use it.
16618         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
16619         (vect_finish_replace_stmt): Declare.
16620         * tree-vect-loop.c (fold_left_reduction_fn): New function.
16621         (needs_fold_left_reduction_p): New function, split out from...
16622         (vect_is_simple_reduction): ...here.  Accept reductions that
16623         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
16624         (vect_force_simple_reduction): Also store the reduction type in
16625         the assignment's STMT_VINFO_REDUC_TYPE.
16626         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
16627         (merge_with_identity): New function.
16628         (vect_expand_fold_left): Likewise.
16629         (vectorize_fold_left_reduction): Likewise.
16630         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
16631         scalar phi in place for it.  Check for target support and reject
16632         cases that would reassociate the operation.  Defer the transform
16633         phase to vectorize_fold_left_reduction.
16634         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
16635         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
16636         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
16638 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16640         * tree-if-conv.c (predicate_mem_writes): Remove redundant
16641         call to ifc_temp_var.
16643 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16644             Alan Hayward  <alan.hayward@arm.com>
16645             David Sherwood  <david.sherwood@arm.com>
16647         * target.def (legitimize_address_displacement): Take the original
16648         offset as a poly_int.
16649         * targhooks.h (default_legitimize_address_displacement): Update
16650         accordingly.
16651         * targhooks.c (default_legitimize_address_displacement): Likewise.
16652         * doc/tm.texi: Regenerate.
16653         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
16654         as an argument, moving assert of ad->disp == ad->disp_term to...
16655         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
16656         Try calling targetm.legitimize_address_displacement before expanding
16657         the address rather than afterwards, and adjust for the new interface.
16658         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
16659         Match the new hook interface.  Handle SVE addresses.
16660         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
16661         new hook interface.
16663 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16665         * Makefile.in (OBJS): Add early-remat.o.
16666         * target.def (select_early_remat_modes): New hook.
16667         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
16668         * doc/tm.texi: Regenerate.
16669         * targhooks.h (default_select_early_remat_modes): Declare.
16670         * targhooks.c (default_select_early_remat_modes): New function.
16671         * timevar.def (TV_EARLY_REMAT): New timevar.
16672         * passes.def (pass_early_remat): New pass.
16673         * tree-pass.h (make_pass_early_remat): Declare.
16674         * early-remat.c: New file.
16675         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
16676         function.
16677         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
16679 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16680             Alan Hayward  <alan.hayward@arm.com>
16681             David Sherwood  <david.sherwood@arm.com>
16683         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
16684         vfm1 with a bound_epilog parameter.
16685         (vect_do_peeling): Update calls accordingly, and move the prologue
16686         call earlier in the function.  Treat the base bound_epilog as 0 for
16687         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
16688         this base when peeling for gaps.
16689         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
16690         with fully-masked loops.
16691         (vect_estimate_min_profitable_iters): Handle the single peeled
16692         iteration in that case.
16694 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16695             Alan Hayward  <alan.hayward@arm.com>
16696             David Sherwood  <david.sherwood@arm.com>
16698         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
16699         single-element interleaving even if the size is not a power of 2.
16700         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
16701         accesses for single-element interleaving if the group size is
16702         not a power of 2.
16704 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16705             Alan Hayward  <alan.hayward@arm.com>
16706             David Sherwood  <david.sherwood@arm.com>
16708         * doc/md.texi (fold_extract_last_@var{m}): Document.
16709         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
16710         * optabs.def (fold_extract_last_optab): New optab.
16711         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
16712         * internal-fn.c (fold_extract_direct): New macro.
16713         (expand_fold_extract_optab_fn): Likewise.
16714         (direct_fold_extract_optab_supported_p): Likewise.
16715         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
16716         * tree-vect-loop.c (vect_model_reduction_cost): Handle
16717         EXTRACT_LAST_REDUCTION.
16718         (get_initial_def_for_reduction): Do not create an initial vector
16719         for EXTRACT_LAST_REDUCTION reductions.
16720         (vectorizable_reduction): Leave the scalar phi in place for
16721         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
16722         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
16723         epilogue code for EXTRACT_LAST_REDUCTION and defer the
16724         transform phase to vectorizable_condition.
16725         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
16726         split out from...
16727         (vect_finish_stmt_generation): ...here.
16728         (vect_finish_replace_stmt): New function.
16729         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
16730         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
16731         pattern.
16732         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
16734 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16735             Alan Hayward  <alan.hayward@arm.com>
16736             David Sherwood  <david.sherwood@arm.com>
16738         * doc/md.texi (extract_last_@var{m}): Document.
16739         * optabs.def (extract_last_optab): New optab.
16740         * internal-fn.def (EXTRACT_LAST): New internal function.
16741         * internal-fn.c (cond_unary_direct): New macro.
16742         (expand_cond_unary_optab_fn): Likewise.
16743         (direct_cond_unary_optab_supported_p): Likewise.
16744         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
16745         loops using EXTRACT_LAST.
16746         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
16747         (extract_last_<mode>): ...this optab.
16748         (vec_extract<mode><Vel>): Update accordingly.
16750 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16751             Alan Hayward  <alan.hayward@arm.com>
16752             David Sherwood  <david.sherwood@arm.com>
16754         * target.def (empty_mask_is_expensive): New hook.
16755         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
16756         * doc/tm.texi: Regenerate.
16757         * targhooks.h (default_empty_mask_is_expensive): Declare.
16758         * targhooks.c (default_empty_mask_is_expensive): New function.
16759         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
16760         if the target says that empty masks are expensive.
16761         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
16762         New function.
16763         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
16765 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16766             Alan Hayward  <alan.hayward@arm.com>
16767             David Sherwood  <david.sherwood@arm.com>
16769         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
16770         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
16771         (vect_use_loop_mask_for_alignment_p): New function.
16772         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
16773         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
16774         niters_skip argument.  Make sure that the first niters_skip elements
16775         of the first iteration are inactive.
16776         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
16777         Update call to vect_set_loop_masks_directly.
16778         (get_misalign_in_elems): New function, split out from...
16779         (vect_gen_prolog_loop_niters): ...here.
16780         (vect_update_init_of_dr): Take a code argument that specifies whether
16781         the adjustment should be added or subtracted.
16782         (vect_update_init_of_drs): Likewise.
16783         (vect_prepare_for_masked_peels): New function.
16784         (vect_do_peeling): Skip prologue peeling if we're using a mask
16785         instead.  Update call to vect_update_inits_of_drs.
16786         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16787         mask_skip_niters.
16788         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
16789         alignment.  Do not include the number of peeled iterations in
16790         the minimum threshold in that case.
16791         (vectorizable_induction): Adjust the start value down by
16792         LOOP_VINFO_MASK_SKIP_NITERS iterations.
16793         (vect_transform_loop): Call vect_prepare_for_masked_peels.
16794         Take the number of skipped iterations into account when calculating
16795         the loop bounds.
16796         * tree-vect-stmts.c (vect_gen_while_not): New function.
16798 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16799             Alan Hayward  <alan.hayward@arm.com>
16800             David Sherwood  <david.sherwood@arm.com>
16802         * doc/sourcebuild.texi (vect_fully_masked): Document.
16803         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
16804         default value to 0.
16805         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
16806         split out from...
16807         (vect_analyze_loop_2): ...here. Don't check the vectorization
16808         factor against the number of loop iterations if the loop is
16809         fully-masked.
16811 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16812             Alan Hayward  <alan.hayward@arm.com>
16813             David Sherwood  <david.sherwood@arm.com>
16815         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
16816         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
16817         (dump_groups): Update accordingly.
16818         (iv_use::mem_type): New member variable.
16819         (address_p): New function.
16820         (record_use): Add a mem_type argument and initialize the new
16821         mem_type field.
16822         (record_group_use): Add a mem_type argument.  Use address_p.
16823         Remove obsolete null checks of base_object.  Update call to record_use.
16824         (find_interesting_uses_op): Update call to record_group_use.
16825         (find_interesting_uses_cond): Likewise.
16826         (find_interesting_uses_address): Likewise.
16827         (get_mem_type_for_internal_fn): New function.
16828         (find_address_like_use): Likewise.
16829         (find_interesting_uses_stmt): Try find_address_like_use before
16830         calling find_interesting_uses_op.
16831         (addr_offset_valid_p): Use the iv mem_type field as the type
16832         of the addressed memory.
16833         (add_autoinc_candidates): Likewise.
16834         (get_address_cost): Likewise.
16835         (split_small_address_groups_p): Use address_p.
16836         (split_address_groups): Likewise.
16837         (add_iv_candidate_for_use): Likewise.
16838         (autoinc_possible_for_pair): Likewise.
16839         (rewrite_groups): Likewise.
16840         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
16841         (determine_group_iv_cost): Update after split of USE_ADDRESS.
16842         (get_alias_ptr_type_for_ptr_address): New function.
16843         (rewrite_use_address): Rewrite address uses in calls that were
16844         identified by find_address_like_use.
16846 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16847             Alan Hayward  <alan.hayward@arm.com>
16848             David Sherwood  <david.sherwood@arm.com>
16850         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
16851         TARGET_MEM_REFs.
16852         * gimple-expr.h (is_gimple_addressable: Likewise.
16853         * gimple-expr.c (is_gimple_address): Likewise.
16854         * internal-fn.c (expand_call_mem_ref): New function.
16855         (expand_mask_load_optab_fn): Use it.
16856         (expand_mask_store_optab_fn): Likewise.
16858 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16859             Alan Hayward  <alan.hayward@arm.com>
16860             David Sherwood  <david.sherwood@arm.com>
16862         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
16863         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
16864         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
16865         (cond_umax@var{mode}): Document.
16866         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
16867         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
16868         (cond_umin_optab, cond_umax_optab): New optabs.
16869         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
16870         (COND_IOR, COND_XOR): New internal functions.
16871         * internal-fn.h (get_conditional_internal_fn): Declare.
16872         * internal-fn.c (cond_binary_direct): New macro.
16873         (expand_cond_binary_optab_fn): Likewise.
16874         (direct_cond_binary_optab_supported_p): Likewise.
16875         (get_conditional_internal_fn): New function.
16876         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
16877         Cope with reduction statements that are vectorized as calls rather
16878         than assignments.
16879         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
16880         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
16881         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
16882         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
16883         (UNSPEC_COND_EOR): New unspecs.
16884         (optab): Add mappings for them.
16885         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
16886         (sve_int_op, sve_fp_op): New int attributes.
16888 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16889             Alan Hayward  <alan.hayward@arm.com>
16890             David Sherwood  <david.sherwood@arm.com>
16892         * optabs.def (while_ult_optab): New optab.
16893         * doc/md.texi (while_ult@var{m}@var{n}): Document.
16894         * internal-fn.def (WHILE_ULT): New internal function.
16895         * internal-fn.h (direct_internal_fn_supported_p): New override
16896         that takes two types as argument.
16897         * internal-fn.c (while_direct): New macro.
16898         (expand_while_optab_fn): New function.
16899         (convert_optab_supported_p): Likewise.
16900         (direct_while_optab_supported_p): New macro.
16901         * wide-int.h (wi::udiv_ceil): New function.
16902         * tree-vectorizer.h (rgroup_masks): New structure.
16903         (vec_loop_masks): New typedef.
16904         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
16905         and fully_masked_p.
16906         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
16907         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
16908         (vect_max_vf): New function.
16909         (slpeel_make_loop_iterate_ntimes): Delete.
16910         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
16911         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
16912         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
16913         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
16914         internal-fn.h, stor-layout.h and optabs-query.h.
16915         (vect_set_loop_mask): New function.
16916         (add_preheader_seq): Likewise.
16917         (add_header_seq): Likewise.
16918         (interleave_supported_p): Likewise.
16919         (vect_maybe_permute_loop_masks): Likewise.
16920         (vect_set_loop_masks_directly): Likewise.
16921         (vect_set_loop_condition_masked): Likewise.
16922         (vect_set_loop_condition_unmasked): New function, split out from
16923         slpeel_make_loop_iterate_ntimes.
16924         (slpeel_make_loop_iterate_ntimes): Rename to..
16925         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
16926         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
16927         (vect_do_peeling): Update call accordingly.
16928         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
16929         loops.
16930         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16931         mask_compare_type, can_fully_mask_p and fully_masked_p.
16932         (release_vec_loop_masks): New function.
16933         (_loop_vec_info): Use it to free the loop masks.
16934         (can_produce_all_loop_masks_p): New function.
16935         (vect_get_max_nscalars_per_iter): Likewise.
16936         (vect_verify_full_masking): Likewise.
16937         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
16938         retries, and free the mask rgroups before retrying.  Check loop-wide
16939         reasons for disallowing fully-masked loops.  Make the final decision
16940         about whether use a fully-masked loop or not.
16941         (vect_estimate_min_profitable_iters): Do not assume that peeling
16942         for the number of iterations will be needed for fully-masked loops.
16943         (vectorizable_reduction): Disable fully-masked loops.
16944         (vectorizable_live_operation): Likewise.
16945         (vect_halve_mask_nunits): New function.
16946         (vect_double_mask_nunits): Likewise.
16947         (vect_record_loop_mask): Likewise.
16948         (vect_get_loop_mask): Likewise.
16949         (vect_transform_loop): Handle the case in which the final loop
16950         iteration might handle a partial vector.  Call vect_set_loop_condition
16951         instead of slpeel_make_loop_iterate_ntimes.
16952         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
16953         (check_load_store_masking): New function.
16954         (prepare_load_store_mask): Likewise.
16955         (vectorizable_store): Handle fully-masked loops.
16956         (vectorizable_load): Likewise.
16957         (supportable_widening_operation): Use vect_halve_mask_nunits for
16958         booleans.
16959         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
16960         (vect_gen_while): New function.
16961         * config/aarch64/aarch64.md (umax<mode>3): New expander.
16962         (aarch64_uqdec<mode>): New insn.
16964 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16965             Alan Hayward  <alan.hayward@arm.com>
16966             David Sherwood  <david.sherwood@arm.com>
16968         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
16969         (reduc_xor_scal_optab): New optabs.
16970         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
16971         (reduc_xor_scal_@var{m}): Document.
16972         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
16973         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
16974         internal functions.
16975         * fold-const-call.c (fold_const_call): Handle them.
16976         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
16977         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
16978         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
16979         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
16980         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
16981         (UNSPEC_XORV): New unspecs.
16982         (optab): Add entries for them.
16983         (BITWISEV): New int iterator.
16984         (bit_reduc_op): New int attributes.
16986 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16987             Alan Hayward  <alan.hayward@arm.com>
16988             David Sherwood  <david.sherwood@arm.com>
16990         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
16991         * internal-fn.def (VEC_SHL_INSERT): New internal function.
16992         * optabs.def (vec_shl_insert_optab): New optab.
16993         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
16994         (duplicate_and_interleave): Likewise.
16995         * tree-vect-loop.c: Include internal-fn.h.
16996         (neutral_op_for_slp_reduction): New function, split out from
16997         get_initial_defs_for_reduction.
16998         (get_initial_def_for_reduction): Handle option 2 for variable-length
16999         vectors by loading the neutral value into a vector and then shifting
17000         the initial value into element 0.
17001         (get_initial_defs_for_reduction): Replace the code argument with
17002         the neutral value calculated by neutral_op_for_slp_reduction.
17003         Use gimple_build_vector for constant-length vectors.
17004         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
17005         but the first group_size elements have a neutral value.
17006         Use duplicate_and_interleave otherwise.
17007         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
17008         Update call to get_initial_defs_for_reduction.  Handle SLP
17009         reductions for variable-length vectors by creating one vector
17010         result for each scalar result, with the elements associated
17011         with other scalar results stubbed out with the neutral value.
17012         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
17013         Require IFN_VEC_SHL_INSERT for double reductions on
17014         variable-length vectors, or SLP reductions that have
17015         a neutral value.  Require can_duplicate_and_interleave_p
17016         support for variable-length unchained SLP reductions if there
17017         is no neutral value, such as for MIN/MAX reductions.  Also require
17018         the number of vector elements to be a multiple of the number of
17019         SLP statements when doing variable-length unchained SLP reductions.
17020         Update call to vect_create_epilog_for_reduction.
17021         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
17022         and remove initial values.
17023         (duplicate_and_interleave): Make public.
17024         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
17025         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
17027 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17028             Alan Hayward  <alan.hayward@arm.com>
17029             David Sherwood  <david.sherwood@arm.com>
17031         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
17032         (can_duplicate_and_interleave_p): New function.
17033         (vect_get_and_check_slp_defs): Take the vector of statements
17034         rather than just the current one.  Remove excess parentheses.
17035         Restriction rejectinon of vect_constant_def and vect_external_def
17036         for variable-length vectors to boolean types, or types for which
17037         can_duplicate_and_interleave_p is false.
17038         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
17039         (duplicate_and_interleave): New function.
17040         (vect_get_constant_vectors): Use gimple_build_vector for
17041         constant-length vectors and suitable variable-length constant
17042         vectors.  Use duplicate_and_interleave for other variable-length
17043         vectors.  Don't defer the update when inserting new statements.
17045 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17046             Alan Hayward  <alan.hayward@arm.com>
17047             David Sherwood  <david.sherwood@arm.com>
17049         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
17050         min_profitable_iters doesn't go negative.
17052 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17053             Alan Hayward  <alan.hayward@arm.com>
17054             David Sherwood  <david.sherwood@arm.com>
17056         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
17057         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
17058         * optabs.def (vec_mask_load_lanes_optab): New optab.
17059         (vec_mask_store_lanes_optab): Likewise.
17060         * internal-fn.def (MASK_LOAD_LANES): New internal function.
17061         (MASK_STORE_LANES): Likewise.
17062         * internal-fn.c (mask_load_lanes_direct): New macro.
17063         (mask_store_lanes_direct): Likewise.
17064         (expand_mask_load_optab_fn): Handle masked operations.
17065         (expand_mask_load_lanes_optab_fn): New macro.
17066         (expand_mask_store_optab_fn): Handle masked operations.
17067         (expand_mask_store_lanes_optab_fn): New macro.
17068         (direct_mask_load_lanes_optab_supported_p): Likewise.
17069         (direct_mask_store_lanes_optab_supported_p): Likewise.
17070         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
17071         parameter.
17072         (vect_load_lanes_supported): Likewise.
17073         * tree-vect-data-refs.c (strip_conversion): New function.
17074         (can_group_stmts_p): Likewise.
17075         (vect_analyze_data_ref_accesses): Use it instead of checking
17076         for a pair of assignments.
17077         (vect_store_lanes_supported): Take a masked_p parameter.
17078         (vect_load_lanes_supported): Likewise.
17079         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
17080         vect_store_lanes_supported and vect_load_lanes_supported.
17081         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
17082         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
17083         parameter.  Don't allow gaps for masked accesses.
17084         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
17085         and vect_load_lanes_supported.
17086         (get_load_store_type): Take a masked_p parameter and update
17087         call to get_group_load_store_type.
17088         (vectorizable_store): Update call to get_load_store_type.
17089         Handle IFN_MASK_STORE_LANES.
17090         (vectorizable_load): Update call to get_load_store_type.
17091         Handle IFN_MASK_LOAD_LANES.
17093 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17094             Alan Hayward  <alan.hayward@arm.com>
17095             David Sherwood  <david.sherwood@arm.com>
17097         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
17098         modes for SVE.
17099         * config/aarch64/aarch64-protos.h
17100         (aarch64_sve_struct_memory_operand_p): Declare.
17101         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
17102         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
17103         (VPRED, vpred): Handle SVE structure modes.
17104         * config/aarch64/constraints.md (Utx): New constraint.
17105         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
17106         (aarch64_sve_struct_nonimmediate_operand): New predicates.
17107         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
17108         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
17109         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
17110         structure modes.  Split into pieces after RA.
17111         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
17112         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
17113         New patterns.
17114         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
17115         SVE structure modes.
17116         (aarch64_classify_address): Likewise.
17117         (sizetochar): Move earlier in file.
17118         (aarch64_print_operand): Handle SVE register lists.
17119         (aarch64_array_mode): New function.
17120         (aarch64_sve_struct_memory_operand_p): Likewise.
17121         (TARGET_ARRAY_MODE): Redefine.
17123 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17124             Alan Hayward  <alan.hayward@arm.com>
17125             David Sherwood  <david.sherwood@arm.com>
17127         * target.def (array_mode): New target hook.
17128         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
17129         * doc/tm.texi: Regenerate.
17130         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
17131         * hooks.c (hook_optmode_mode_uhwi_none): New function.
17132         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
17133         targetm.array_mode.
17134         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
17135         type sizes.
17137 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17138             Alan Hayward  <alan.hayward@arm.com>
17139             David Sherwood  <david.sherwood@arm.com>
17141         * fold-const.c (fold_binary_loc): Check the argument types
17142         rather than the result type when testing for a vector operation.
17144 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17146         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
17147         * doc/tm.texi: Regenerate.
17149 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17150             Alan Hayward  <alan.hayward@arm.com>
17151             David Sherwood  <david.sherwood@arm.com>
17153         * doc/invoke.texi (-msve-vector-bits=): Document new option.
17154         (sve): Document new AArch64 extension.
17155         * doc/md.texi (w): Extend the description of the AArch64
17156         constraint to include SVE vectors.
17157         (Upl, Upa): Document new AArch64 predicate constraints.
17158         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
17159         enum.
17160         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
17161         (msve-vector-bits=): New option.
17162         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
17163         SVE when these are disabled.
17164         (sve): New extension.
17165         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
17166         modes.  Adjust their number of units based on aarch64_sve_vg.
17167         (MAX_BITSIZE_MODE_ANY_MODE): Define.
17168         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
17169         aarch64_addr_query_type.
17170         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
17171         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
17172         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
17173         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
17174         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
17175         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
17176         (aarch64_simd_imm_zero_p): Delete.
17177         (aarch64_check_zero_based_sve_index_immediate): Declare.
17178         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17179         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17180         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17181         (aarch64_sve_float_mul_immediate_p): Likewise.
17182         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17183         rather than an rtx.
17184         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
17185         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
17186         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
17187         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
17188         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
17189         (aarch64_regmode_natural_size): Likewise.
17190         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
17191         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
17192         left one place.
17193         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
17194         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
17195         for VG and the SVE predicate registers.
17196         (V_ALIASES): Add a "z"-prefixed alias.
17197         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
17198         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
17199         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
17200         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
17201         (REG_CLASS_NAMES): Add entries for them.
17202         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
17203         and the predicate registers.
17204         (aarch64_sve_vg): Declare.
17205         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
17206         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
17207         (REGMODE_NATURAL_SIZE): Define.
17208         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
17209         SVE macros.
17210         * config/aarch64/aarch64.c: Include cfgrtl.h.
17211         (simd_immediate_info): Add a constructor for series vectors,
17212         and an associated step field.
17213         (aarch64_sve_vg): New variable.
17214         (aarch64_dbx_register_number): Handle VG and the predicate registers.
17215         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
17216         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
17217         (VEC_ANY_DATA, VEC_STRUCT): New constants.
17218         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
17219         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
17220         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
17221         (aarch64_get_mask_mode): New functions.
17222         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
17223         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
17224         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
17225         predicate modes and predicate registers.  Explicitly restrict
17226         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
17227         to store a vector mode if it is recognized by
17228         aarch64_classify_vector_mode.
17229         (aarch64_regmode_natural_size): New function.
17230         (aarch64_hard_regno_caller_save_mode): Return the original mode
17231         for predicates.
17232         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
17233         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
17234         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
17235         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
17236         functions.
17237         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
17238         does not overlap dest if the function is frame-related.  Handle
17239         SVE constants.
17240         (aarch64_split_add_offset): New function.
17241         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
17242         them aarch64_add_offset.
17243         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
17244         and update call to aarch64_sub_sp.
17245         (aarch64_add_cfa_expression): New function.
17246         (aarch64_expand_prologue): Pass extra temporary registers to the
17247         functions above.  Handle the case in which we need to emit new
17248         DW_CFA_expressions for registers that were originally saved
17249         relative to the stack pointer, but now have to be expressed
17250         relative to the frame pointer.
17251         (aarch64_output_mi_thunk): Pass extra temporary registers to the
17252         functions above.
17253         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
17254         IP0 and IP1 values for SVE frames.
17255         (aarch64_expand_vec_series): New function.
17256         (aarch64_expand_sve_widened_duplicate): Likewise.
17257         (aarch64_expand_sve_const_vector): Likewise.
17258         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
17259         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
17260         into the register, rather than emitting a SET directly.
17261         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
17262         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
17263         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
17264         (offset_9bit_signed_scaled_p): New functions.
17265         (aarch64_replicate_bitmask_imm): New function.
17266         (aarch64_bitmask_imm): Use it.
17267         (aarch64_cannot_force_const_mem): Reject expressions involving
17268         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
17269         (aarch64_classify_index): Handle SVE indices, by requiring
17270         a plain register index with a scale that matches the element size.
17271         (aarch64_classify_address): Handle SVE addresses.  Assert that
17272         the mode of the address is VOIDmode or an integer mode.
17273         Update call to aarch64_classify_symbol.
17274         (aarch64_classify_symbolic_expression): Update call to
17275         aarch64_classify_symbol.
17276         (aarch64_const_vec_all_in_range_p): New function.
17277         (aarch64_print_vector_float_operand): Likewise.
17278         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
17279         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
17280         and the FP immediates 1.0 and 0.5.
17281         (aarch64_print_address_internal): Handle SVE addresses.
17282         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
17283         (aarch64_regno_regclass): Handle predicate registers.
17284         (aarch64_secondary_reload): Handle big-endian reloads of SVE
17285         data modes.
17286         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
17287         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
17288         (aarch64_convert_sve_vector_bits): New function.
17289         (aarch64_override_options): Use it to handle -msve-vector-bits=.
17290         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17291         rather than an rtx.
17292         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
17293         Handle SVE vector and predicate modes.  Accept VL-based constants
17294         that need only one temporary register, and VL offsets that require
17295         no temporary registers.
17296         (aarch64_conditional_register_usage): Mark the predicate registers
17297         as fixed if SVE isn't available.
17298         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
17299         Return true for SVE vector and predicate modes.
17300         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
17301         rather than an unsigned int.  Handle SVE modes.
17302         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
17303         SVE modes.
17304         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
17305         if SVE is enabled.
17306         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17307         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17308         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17309         (aarch64_sve_float_mul_immediate_p): New functions.
17310         (aarch64_sve_valid_immediate): New function.
17311         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
17312         Explicitly reject structure modes.  Check for INDEX constants.
17313         Handle PTRUE and PFALSE constants.
17314         (aarch64_check_zero_based_sve_index_immediate): New function.
17315         (aarch64_simd_imm_zero_p): Delete.
17316         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
17317         vector modes.  Accept constants in the range of CNT[BHWD].
17318         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
17319         ask for an Advanced SIMD mode.
17320         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
17321         (aarch64_simd_vector_alignment): Handle SVE predicates.
17322         (aarch64_vectorize_preferred_vector_alignment): New function.
17323         (aarch64_simd_vector_alignment_reachable): Use it instead of
17324         the vector size.
17325         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
17326         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
17327         functions.
17328         (MAX_VECT_LEN): Delete.
17329         (expand_vec_perm_d): Add a vec_flags field.
17330         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
17331         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
17332         (aarch64_evpc_ext): Don't apply a big-endian lane correction
17333         for SVE modes.
17334         (aarch64_evpc_rev): Rename to...
17335         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
17336         (aarch64_evpc_rev_global): New function.
17337         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
17338         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
17339         MAX_VECT_LEN.
17340         (aarch64_evpc_sve_tbl): New function.
17341         (aarch64_expand_vec_perm_const_1): Update after rename of
17342         aarch64_evpc_rev.  Handle SVE permutes too, trying
17343         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
17344         than aarch64_evpc_tbl.
17345         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
17346         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
17347         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
17348         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
17349         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
17350         (aarch64_expand_sve_vcond): New functions.
17351         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
17352         of aarch64_vector_mode_p.
17353         (aarch64_dwarf_poly_indeterminate_value): New function.
17354         (aarch64_compute_pressure_classes): Likewise.
17355         (aarch64_can_change_mode_class): Likewise.
17356         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
17357         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
17358         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
17359         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
17360         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
17361         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
17362         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
17363         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
17364         constraints.
17365         (Dn, Dl, Dr): Accept const as well as const_vector.
17366         (Dz): Likewise.  Compare against CONST0_RTX.
17367         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
17368         of "vector" where appropriate.
17369         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
17370         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
17371         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
17372         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
17373         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
17374         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
17375         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
17376         (v_int_equiv): Extend to SVE modes.
17377         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
17378         mode attributes.
17379         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
17380         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
17381         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
17382         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
17383         (SVE_COND_FP_CMP): New int iterators.
17384         (perm_hilo): Handle the new unpack unspecs.
17385         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
17386         attributes.
17387         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
17388         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
17389         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
17390         (aarch64_equality_operator, aarch64_constant_vector_operand)
17391         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
17392         (aarch64_sve_nonimmediate_operand): Likewise.
17393         (aarch64_sve_general_operand): Likewise.
17394         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
17395         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
17396         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
17397         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
17398         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
17399         (aarch64_sve_float_arith_immediate): Likewise.
17400         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
17401         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
17402         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
17403         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
17404         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
17405         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
17406         (aarch64_sve_float_arith_operand): Likewise.
17407         (aarch64_sve_float_arith_with_sub_operand): Likewise.
17408         (aarch64_sve_float_mul_operand): Likewise.
17409         (aarch64_sve_vec_perm_operand): Likewise.
17410         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
17411         (aarch64_mov_operand): Accept const_poly_int and const_vector.
17412         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
17413         as well as const_vector.
17414         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
17415         in file.  Use CONST0_RTX and CONSTM1_RTX.
17416         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
17417         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
17418         Use aarch64_simd_imm_zero.
17419         * config/aarch64/aarch64-sve.md: New file.
17420         * config/aarch64/aarch64.md: Include it.
17421         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
17422         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
17423         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
17424         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
17425         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
17426         (sve): New attribute.
17427         (enabled): Disable instructions with the sve attribute unless
17428         TARGET_SVE.
17429         (movqi, movhi): Pass CONST_POLY_INT operaneds through
17430         aarch64_expand_mov_immediate.
17431         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
17432         CNT[BHSD] immediates.
17433         (movti): Split CONST_POLY_INT moves into two halves.
17434         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
17435         Split additions that need a temporary here if the destination
17436         is the stack pointer.
17437         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
17438         (*add<mode>3_poly_1): New instruction.
17439         (set_clobber_cc): New expander.
17441 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17443         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
17444         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
17445         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
17446         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
17447         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
17448         Change innermode from fixed_mode_size to machine_mode.
17449         (simplify_subreg): Update call accordingly.  Handle a constant-sized
17450         subreg of a variable-length CONST_VECTOR.
17452 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17453             Alan Hayward  <alan.hayward@arm.com>
17454             David Sherwood  <david.sherwood@arm.com>
17456         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
17457         (add_offset_to_base): New function, split out from...
17458         (create_mem_ref): ...here.  When handling a scale other than 1,
17459         check first whether the address is valid without the offset.
17460         Add it into the base if so, leaving the index and scale as-is.
17462 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
17464         PR c++/83778
17465         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
17466         fold_for_warn before checking if arg2 is INTEGER_CST.
17468 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
17470         * config/rs6000/predicates.md (load_multiple_operation): Delete.
17471         (store_multiple_operation): Delete.
17472         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
17473         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
17474         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
17475         guarded by TARGET_STRING.
17476         (rs6000_output_load_multiple): Delete.
17477         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
17478         OPTION_MASK_STRING / TARGET_STRING handling.
17479         (print_operand) <'N', 'O'>: Add comment that these are unused now.
17480         (const rs6000_opt_masks) <"string">: Change mask to 0.
17481         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
17482         (MASK_STRING): Delete.
17483         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
17484         parts.  Simplify.
17485         (load_multiple): Delete.
17486         (*ldmsi8): Delete.
17487         (*ldmsi7): Delete.
17488         (*ldmsi6): Delete.
17489         (*ldmsi5): Delete.
17490         (*ldmsi4): Delete.
17491         (*ldmsi3): Delete.
17492         (store_multiple): Delete.
17493         (*stmsi8): Delete.
17494         (*stmsi7): Delete.
17495         (*stmsi6): Delete.
17496         (*stmsi5): Delete.
17497         (*stmsi4): Delete.
17498         (*stmsi3): Delete.
17499         (movmemsi_8reg): Delete.
17500         (corresponding unnamed define_insn): Delete.
17501         (movmemsi_6reg): Delete.
17502         (corresponding unnamed define_insn): Delete.
17503         (movmemsi_4reg): Delete.
17504         (corresponding unnamed define_insn): Delete.
17505         (movmemsi_2reg): Delete.
17506         (corresponding unnamed define_insn): Delete.
17507         (movmemsi_1reg): Delete.
17508         (corresponding unnamed define_insn): Delete.
17509         * config/rs6000/rs6000.opt (mno-string): New.
17510         (mstring): Replace by deprecation warning stub.
17511         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
17513 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
17515         * regrename.c (regrename_do_replace): If replacing the same
17516         reg multiple times, try to reuse last created gen_raw_REG.
17518         PR debug/81155
17519         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
17520         main to workaround a bug in GDB.
17522 2018-01-12  Tom de Vries  <tom@codesourcery.com>
17524         PR target/83737
17525         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
17527 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
17529         PR rtl-optimization/80481
17530         * ira-color.c (get_cap_member): New function.
17531         (allocnos_conflict_by_live_ranges_p): Use it.
17532         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
17533         (setup_slot_coalesced_allocno_live_ranges): Ditto.
17535 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
17537         PR target/83628
17538         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
17539         (*saddl_se_1): Ditto.
17540         (*ssubsi_1): Ditto.
17541         (*ssubl_se_1): Ditto.
17543 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
17545         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
17546         rather than wi::to_widest for DR_INITs.
17547         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
17548         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
17549         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
17550         INTEGER_CSTs.
17551         (vect_analyze_group_access_1): Note that here.
17553 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
17555         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
17556         polynomial type sizes.
17558 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
17560         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
17561         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
17562         (gimple_add_tmp_var): Likewise.
17564 2018-01-12  Martin Liska  <mliska@suse.cz>
17566         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
17567         (gimple_alloc_sizes): Likewise.
17568         (dump_gimple_statistics): Use PRIu64 in printf format.
17569         * gimple.h: Change uint64_t to int.
17571 2018-01-12  Martin Liska  <mliska@suse.cz>
17573         * tree-core.h: Use uint64_t instead of int.
17574         * tree.c (tree_node_counts): Likewise.
17575         (tree_node_sizes): Likewise.
17576         (dump_tree_statistics): Use PRIu64 in printf format.
17578 2018-01-12  Martin Liska  <mliska@suse.cz>
17580         * Makefile.in: As qsort_chk is implemented in vec.c, add
17581         vec.o to linkage of gencfn-macros.
17582         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
17583         passing the info to record_node_allocation_statistics.
17584         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
17585         and pass the info.
17586         * ggc-common.c (struct ggc_usage): Add operator== and use
17587         it in operator< and compare function.
17588         * mem-stats.h (struct mem_usage): Likewise.
17589         * vec.c (struct vec_usage): Remove operator< and compare
17590         function. Can be simply inherited.
17592 2018-01-12  Martin Jambor  <mjambor@suse.cz>
17594         PR target/81616
17595         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
17596         * tree-ssa-math-opts.c: Include domwalk.h.
17597         (convert_mult_to_fma_1): New function.
17598         (fma_transformation_info): New type.
17599         (fma_deferring_state): Likewise.
17600         (cancel_fma_deferring): New function.
17601         (result_of_phi): Likewise.
17602         (last_fma_candidate_feeds_initial_phi): Likewise.
17603         (convert_mult_to_fma): Added deferring logic, split actual
17604         transformation to convert_mult_to_fma_1.
17605         (math_opts_dom_walker): New type.
17606         (math_opts_dom_walker::after_dom_children): New method, body moved
17607         here from pass_optimize_widening_mul::execute, added deferring logic
17608         bits.
17609         (pass_optimize_widening_mul::execute): Moved most of code to
17610         math_opts_dom_walker::after_dom_children.
17611         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
17612         * config/i386/i386.c (ix86_option_override_internal): Added
17613         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
17615 2018-01-12  Richard Biener  <rguenther@suse.de>
17617         PR debug/83157
17618         * dwarf2out.c (gen_variable_die): Do not reset old_die for
17619         inline instance vars.
17621 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
17623         PR target/81819
17624         * config/rx/rx.c (rx_is_restricted_memory_address):
17625         Handle SUBREG case.
17627 2018-01-12  Richard Biener  <rguenther@suse.de>
17629         PR tree-optimization/80846
17630         * target.def (split_reduction): New target hook.
17631         * targhooks.c (default_split_reduction): New function.
17632         * targhooks.h (default_split_reduction): Declare.
17633         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
17634         target requests first reduce vectors by combining low and high
17635         parts.
17636         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
17637         (get_vectype_for_scalar_type_and_size): Export.
17638         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
17639         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
17640         * doc/tm.texi: Regenerate.
17641         * config/i386/i386.c (ix86_split_reduction): Implement
17642         TARGET_VECTORIZE_SPLIT_REDUCTION.
17644 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17646         PR target/83368
17647         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
17648         in PIC mode except for TARGET_VXWORKS_RTP.
17649         * config/sparc/sparc.c: Include cfgrtl.h.
17650         (TARGET_INIT_PIC_REG): Define.
17651         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
17652         (sparc_pic_register_p): New predicate.
17653         (sparc_legitimate_address_p): Use it.
17654         (sparc_legitimize_pic_address): Likewise.
17655         (sparc_delegitimize_address): Likewise.
17656         (sparc_mode_dependent_address_p): Likewise.
17657         (gen_load_pcrel_sym): Remove 4th parameter.
17658         (load_got_register): Adjust call to above.  Remove obsolete stuff.
17659         (sparc_expand_prologue): Do not call load_got_register here.
17660         (sparc_flat_expand_prologue): Likewise.
17661         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
17662         (sparc_use_pseudo_pic_reg): New function.
17663         (sparc_init_pic_reg): Likewise.
17664         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17665         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
17667 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
17669         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
17670         Add item for branch_cost.
17672 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17674         PR rtl-optimization/83565
17675         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
17676         not extend the result to a larger mode for rotate operations.
17677         (num_sign_bit_copies1): Likewise.
17679 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17681         PR target/40411
17682         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
17683         -symbolic.
17684         Use values-Xc.o for -pedantic.
17685         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
17687 2018-01-12  Martin Liska  <mliska@suse.cz>
17689         PR ipa/83054
17690         * ipa-devirt.c (final_warning_record::grow_type_warnings):
17691         New function.
17692         (possible_polymorphic_call_targets): Use it.
17693         (ipa_devirt): Likewise.
17695 2018-01-12  Martin Liska  <mliska@suse.cz>
17697         * profile-count.h (enum profile_quality): Use 0 as invalid
17698         enum value of profile_quality.
17700 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
17702         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
17703         -mext-string options.
17705 2018-01-12  Richard Biener  <rguenther@suse.de>
17707         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
17708         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
17709         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
17710         Likewise.
17711         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
17713 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
17715         * configure.ac (--with-long-double-format): Add support for the
17716         configuration option to change the default long double format on
17717         PowerPC systems.
17718         * config.gcc (powerpc*-linux*-*): Likewise.
17719         * configure: Regenerate.
17720         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
17721         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
17722         used without modification.
17724 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17726         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
17727         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
17728         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
17729         MISC_BUILTIN_SPEC_BARRIER.
17730         (rs6000_init_builtins): Likewise.
17731         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
17732         enum value.
17733         (speculation_barrier): New define_insn.
17734         * doc/extend.texi: Document __builtin_speculation_barrier.
17736 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
17738         PR target/83203
17739         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
17740         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
17741         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
17742         iterators.
17743         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
17744         integral modes instead of "ss" and "sd".
17745         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
17746         vectors with 32-bit and 64-bit elements.
17747         (vecdupssescalarmodesuffix): New mode attribute.
17748         (vec_dup<mode>): Use it.
17750 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
17752         PR target/83330
17753         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
17754         frame if argument is passed on stack.
17756 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
17758         PR target/82682
17759         * ree.c (combine_reaching_defs): Optimize also
17760         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
17761         reg2=any_extend(exp); reg1=reg2;, formatting fix.
17763 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
17765         PR middle-end/83189
17766         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
17768 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
17770         PR middle-end/83718
17771         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
17772         after they are computed.
17774 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
17776         PR tree-optimization/83695
17777         * gimple-loop-linterchange.cc
17778         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
17779         reset cached scev information after interchange.
17780         (pass_linterchange::execute): Remove call to scev_reset_htab.
17782 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17784         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
17785         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
17786         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
17787         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
17788         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
17789         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
17790         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
17791         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
17792         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
17793         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
17794         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
17795         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
17796         (V_lane_reg): Likewise.
17797         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
17798         New define_expand.
17799         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
17800         (vfmal_lane_low<mode>_intrinsic,
17801         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
17802         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
17803         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
17804         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
17805         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
17806         vfmsl_lane_high<mode>_intrinsic): New define_insns.
17808 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17810         * config/arm/arm-cpus.in (fp16fml): New feature.
17811         (ALL_SIMD): Add fp16fml.
17812         (armv8.2-a): Add fp16fml as an option.
17813         (armv8.3-a): Likewise.
17814         (armv8.4-a): Add fp16fml as part of fp16.
17815         * config/arm/arm.h (TARGET_FP16FML): Define.
17816         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
17817         when appropriate.
17818         * config/arm/arm-modes.def (V2HF): Define.
17819         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
17820         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
17821         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
17822         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
17823         vfmsl_low, vfmsl_high): New set of builtins.
17824         * config/arm/iterators.md (PLUSMINUS): New code iterator.
17825         (vfml_op): New code attribute.
17826         (VFMLHALVES): New int iterator.
17827         (VFML, VFMLSEL): New mode attributes.
17828         (V_reg): Define mapping for V2HF.
17829         (V_hi, V_lo): New mode attributes.
17830         (VF_constraint): Likewise.
17831         (vfml_half, vfml_half_selector): New int attributes.
17832         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
17833         define_expand.
17834         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
17835         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
17836         New define_insn.
17837         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
17838         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
17839         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
17840         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
17841         documentation.
17842         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
17843         Document new effective target and option set.
17845 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17847         * config/arm/arm-cpus.in (armv8_4): New feature.
17848         (ARMv8_4a): New fgroup.
17849         (armv8.4-a): New arch.
17850         * config/arm/arm-tables.opt: Regenerate.
17851         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
17852         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
17853         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
17854         Add matching rules for -march=armv8.4-a and extensions.
17855         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
17857 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
17859         PR target/81821
17860         * config/rx/rx.md (BW): New mode attribute.
17861         (sync_lock_test_and_setsi): Add mode suffix to insn output.
17863 2018-01-11  Richard Biener  <rguenther@suse.de>
17865         PR tree-optimization/83435
17866         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
17867         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
17868         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
17870 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
17871             Alan Hayward  <alan.hayward@arm.com>
17872             David Sherwood  <david.sherwood@arm.com>
17874         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
17875         field.
17876         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
17877         (aarch64_print_address_internal): Use it to check for a zero offset.
17879 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
17880             Alan Hayward  <alan.hayward@arm.com>
17881             David Sherwood  <david.sherwood@arm.com>
17883         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
17884         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
17885         Return a poly_int64 rather than a HOST_WIDE_INT.
17886         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
17887         rather than a HOST_WIDE_INT.
17888         * config/aarch64/aarch64.h (aarch64_frame): Protect with
17889         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
17890         hard_fp_offset, frame_size, initial_adjust, callee_offset and
17891         final_offset from HOST_WIDE_INT to poly_int64.
17892         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
17893         to_constant when getting the number of units in an Advanced SIMD
17894         mode.
17895         (aarch64_builtin_vectorized_function): Check for a constant number
17896         of units.
17897         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
17898         GET_MODE_SIZE.
17899         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
17900         attribute instead of GET_MODE_NUNITS.
17901         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
17902         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
17903         GET_MODE_SIZE for fixed-size registers.
17904         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
17905         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
17906         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
17907         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
17908         (aarch64_print_operand, aarch64_print_address_internal)
17909         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
17910         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
17911         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
17912         Handle polynomial GET_MODE_SIZE.
17913         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
17914         wider than SImode without modification.
17915         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
17916         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
17917         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
17918         passing and returning SVE modes.
17919         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
17920         rather than GEN_INT.
17921         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
17922         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
17923         (aarch64_allocate_and_probe_stack_space): Likewise.
17924         (aarch64_layout_frame): Cope with polynomial offsets.
17925         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
17926         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
17927         polynomial offsets.
17928         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
17929         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
17930         poly_int64 rather than a HOST_WIDE_INT.
17931         (aarch64_get_separate_components, aarch64_process_components)
17932         (aarch64_expand_prologue, aarch64_expand_epilogue)
17933         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
17934         (aarch64_anchor_offset): New function, split out from...
17935         (aarch64_legitimize_address): ...here.
17936         (aarch64_builtin_vectorization_cost): Handle polynomial
17937         TYPE_VECTOR_SUBPARTS.
17938         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
17939         GET_MODE_NUNITS.
17940         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
17941         number of elements from the PARALLEL rather than the mode.
17942         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
17943         rather than GET_MODE_BITSIZE.
17944         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
17945         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
17946         (aarch64_expand_vec_perm_const_1): Handle polynomial
17947         d->perm.length () and d->perm elements.
17948         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
17949         Apply to_constant to d->perm elements.
17950         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
17951         polynomial CONST_VECTOR_NUNITS.
17952         (aarch64_move_pointer): Take amount as a poly_int64 rather
17953         than an int.
17954         (aarch64_progress_pointer): Avoid temporary variable.
17955         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
17956         the mode attribute instead of GET_MODE.
17958 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
17959             Alan Hayward  <alan.hayward@arm.com>
17960             David Sherwood  <david.sherwood@arm.com>
17962         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
17963         x exists before using it.
17964         (aarch64_add_constant_internal): Rename to...
17965         (aarch64_add_offset_1): ...this.  Replace regnum with separate
17966         src and dest rtxes.  Handle the case in which they're different,
17967         including when the offset is zero.  Replace scratchreg with an rtx.
17968         Use 2 additions if there is no spare register into which we can
17969         move a 16-bit constant.
17970         (aarch64_add_constant): Delete.
17971         (aarch64_add_offset): Replace reg with separate src and dest
17972         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
17973         Use aarch64_add_offset_1.
17974         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
17975         an rtx rather than an int.  Take the delta as a poly_int64
17976         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
17977         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
17978         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
17979         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
17980         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
17981         and aarch64_add_sp.
17982         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
17983         aarch64_add_constant.
17985 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
17987         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
17988         Use scalar_float_mode.
17990 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
17992         * config/aarch64/aarch64-simd.md
17993         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
17994         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
17995         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
17996         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
17997         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
17998         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
17999         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
18000         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
18001         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
18002         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
18004 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18006         PR target/83514
18007         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
18008         targ_options->x_arm_arch_string is non NULL.
18010 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
18012         * config/aarch64/aarch64.h
18013         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
18015 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
18017         PR target/82096
18018         * expmed.c (emit_store_flag_force): Swap if const op0
18019         and change VOIDmode to mode of op0.
18021 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18023         PR rtl-optimization/83761
18024         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
18025         than bytes to mode_for_size.
18027 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
18029         PR middle-end/83189
18030         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
18031         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
18032         profile.
18034 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
18036         PR middle-end/83575
18037         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
18038         when in layout mode.
18039         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
18040         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
18041         partition fixup.
18043 2018-01-10  Michael Collison  <michael.collison@arm.com>
18045         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
18046         * config/aarch64/aarch64-option-extension.def: Add
18047         AARCH64_OPT_EXTENSION of 'fp16fml'.
18048         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18049         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
18050         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
18051         * config/aarch64/constraints.md (Ui7): New constraint.
18052         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
18053         (VFMLA_SEL_W): Ditto.
18054         (f16quad): Ditto.
18055         (f16mac1): Ditto.
18056         (VFMLA16_LOW): New int iterator.
18057         (VFMLA16_HIGH): Ditto.
18058         (UNSPEC_FMLAL): New unspec.
18059         (UNSPEC_FMLSL): Ditto.
18060         (UNSPEC_FMLAL2): Ditto.
18061         (UNSPEC_FMLSL2): Ditto.
18062         (f16mac): New code attribute.
18063         * config/aarch64/aarch64-simd-builtins.def
18064         (aarch64_fmlal_lowv2sf): Ditto.
18065         (aarch64_fmlsl_lowv2sf): Ditto.
18066         (aarch64_fmlalq_lowv4sf): Ditto.
18067         (aarch64_fmlslq_lowv4sf): Ditto.
18068         (aarch64_fmlal_highv2sf): Ditto.
18069         (aarch64_fmlsl_highv2sf): Ditto.
18070         (aarch64_fmlalq_highv4sf): Ditto.
18071         (aarch64_fmlslq_highv4sf): Ditto.
18072         (aarch64_fmlal_lane_lowv2sf): Ditto.
18073         (aarch64_fmlsl_lane_lowv2sf): Ditto.
18074         (aarch64_fmlal_laneq_lowv2sf): Ditto.
18075         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
18076         (aarch64_fmlalq_lane_lowv4sf): Ditto.
18077         (aarch64_fmlsl_lane_lowv4sf): Ditto.
18078         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
18079         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
18080         (aarch64_fmlal_lane_highv2sf): Ditto.
18081         (aarch64_fmlsl_lane_highv2sf): Ditto.
18082         (aarch64_fmlal_laneq_highv2sf): Ditto.
18083         (aarch64_fmlsl_laneq_highv2sf): Ditto.
18084         (aarch64_fmlalq_lane_highv4sf): Ditto.
18085         (aarch64_fmlsl_lane_highv4sf): Ditto.
18086         (aarch64_fmlalq_laneq_highv4sf): Ditto.
18087         (aarch64_fmlsl_laneq_highv4sf): Ditto.
18088         * config/aarch64/aarch64-simd.md:
18089         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
18090         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18091         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
18092         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18093         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
18094         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
18095         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
18096         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
18097         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
18098         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
18099         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
18100         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
18101         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
18102         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
18103         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
18104         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
18105         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
18106         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
18107         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
18108         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
18109         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
18110         (vfmlsl_low_u32): Ditto.
18111         (vfmlalq_low_u32): Ditto.
18112         (vfmlslq_low_u32): Ditto.
18113         (vfmlal_high_u32): Ditto.
18114         (vfmlsl_high_u32): Ditto.
18115         (vfmlalq_high_u32): Ditto.
18116         (vfmlslq_high_u32): Ditto.
18117         (vfmlal_lane_low_u32): Ditto.
18118         (vfmlsl_lane_low_u32): Ditto.
18119         (vfmlal_laneq_low_u32): Ditto.
18120         (vfmlsl_laneq_low_u32): Ditto.
18121         (vfmlalq_lane_low_u32): Ditto.
18122         (vfmlslq_lane_low_u32): Ditto.
18123         (vfmlalq_laneq_low_u32): Ditto.
18124         (vfmlslq_laneq_low_u32): Ditto.
18125         (vfmlal_lane_high_u32): Ditto.
18126         (vfmlsl_lane_high_u32): Ditto.
18127         (vfmlal_laneq_high_u32): Ditto.
18128         (vfmlsl_laneq_high_u32): Ditto.
18129         (vfmlalq_lane_high_u32): Ditto.
18130         (vfmlslq_lane_high_u32): Ditto.
18131         (vfmlalq_laneq_high_u32): Ditto.
18132         (vfmlslq_laneq_high_u32): Ditto.
18133         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
18134         (AARCH64_FL_FOR_ARCH8_4): New.
18135         (AARCH64_ISA_F16FML): New ISA flag.
18136         (TARGET_F16FML): New feature flag for fp16fml.
18137         (doc/invoke.texi): Document new fp16fml option.
18139 2018-01-10  Michael Collison  <michael.collison@arm.com>
18141         * config/aarch64/aarch64-builtins.c:
18142         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
18143         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18144         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
18145         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
18146         (AARCH64_ISA_SHA3): New ISA flag.
18147         (TARGET_SHA3): New feature flag for sha3.
18148         * config/aarch64/iterators.md (sha512_op): New int attribute.
18149         (CRYPTO_SHA512): New int iterator.
18150         (UNSPEC_SHA512H): New unspec.
18151         (UNSPEC_SHA512H2): Ditto.
18152         (UNSPEC_SHA512SU0): Ditto.
18153         (UNSPEC_SHA512SU1): Ditto.
18154         * config/aarch64/aarch64-simd-builtins.def
18155         (aarch64_crypto_sha512hqv2di): New builtin.
18156         (aarch64_crypto_sha512h2qv2di): Ditto.
18157         (aarch64_crypto_sha512su0qv2di): Ditto.
18158         (aarch64_crypto_sha512su1qv2di): Ditto.
18159         (aarch64_eor3qv8hi): Ditto.
18160         (aarch64_rax1qv2di): Ditto.
18161         (aarch64_xarqv2di): Ditto.
18162         (aarch64_bcaxqv8hi): Ditto.
18163         * config/aarch64/aarch64-simd.md:
18164         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
18165         (aarch64_crypto_sha512su0qv2di): Ditto.
18166         (aarch64_crypto_sha512su1qv2di): Ditto.
18167         (aarch64_eor3qv8hi): Ditto.
18168         (aarch64_rax1qv2di): Ditto.
18169         (aarch64_xarqv2di): Ditto.
18170         (aarch64_bcaxqv8hi): Ditto.
18171         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
18172         (vsha512h2q_u64): Ditto.
18173         (vsha512su0q_u64): Ditto.
18174         (vsha512su1q_u64): Ditto.
18175         (veor3q_u16): Ditto.
18176         (vrax1q_u64): Ditto.
18177         (vxarq_u64): Ditto.
18178         (vbcaxq_u16): Ditto.
18179         * config/arm/types.md (crypto_sha512): New type attribute.
18180         (crypto_sha3): Ditto.
18181         (doc/invoke.texi): Document new sha3 option.
18183 2018-01-10  Michael Collison  <michael.collison@arm.com>
18185         * config/aarch64/aarch64-builtins.c:
18186         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
18187         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18188         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
18189         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
18190         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
18191         (AARCH64_ISA_SM4): New ISA flag.
18192         (TARGET_SM4): New feature flag for sm4.
18193         * config/aarch64/aarch64-simd-builtins.def
18194         (aarch64_sm3ss1qv4si): Ditto.
18195         (aarch64_sm3tt1aq4si): Ditto.
18196         (aarch64_sm3tt1bq4si): Ditto.
18197         (aarch64_sm3tt2aq4si): Ditto.
18198         (aarch64_sm3tt2bq4si): Ditto.
18199         (aarch64_sm3partw1qv4si): Ditto.
18200         (aarch64_sm3partw2qv4si): Ditto.
18201         (aarch64_sm4eqv4si): Ditto.
18202         (aarch64_sm4ekeyqv4si): Ditto.
18203         * config/aarch64/aarch64-simd.md:
18204         (aarch64_sm3ss1qv4si): Ditto.
18205         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
18206         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
18207         (aarch64_sm4eqv4si): Ditto.
18208         (aarch64_sm4ekeyqv4si): Ditto.
18209         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
18210         (sm3part_op): Ditto.
18211         (CRYPTO_SM3TT): Ditto.
18212         (CRYPTO_SM3PART): Ditto.
18213         (UNSPEC_SM3SS1): New unspec.
18214         (UNSPEC_SM3TT1A): Ditto.
18215         (UNSPEC_SM3TT1B): Ditto.
18216         (UNSPEC_SM3TT2A): Ditto.
18217         (UNSPEC_SM3TT2B): Ditto.
18218         (UNSPEC_SM3PARTW1): Ditto.
18219         (UNSPEC_SM3PARTW2): Ditto.
18220         (UNSPEC_SM4E): Ditto.
18221         (UNSPEC_SM4EKEY): Ditto.
18222         * config/aarch64/constraints.md (Ui2): New constraint.
18223         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
18224         * config/arm/types.md (crypto_sm3): New type attribute.
18225         (crypto_sm4): Ditto.
18226         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
18227         (vsm3tt1aq_u32): Ditto.
18228         (vsm3tt1bq_u32): Ditto.
18229         (vsm3tt2aq_u32): Ditto.
18230         (vsm3tt2bq_u32): Ditto.
18231         (vsm3partw1q_u32): Ditto.
18232         (vsm3partw2q_u32): Ditto.
18233         (vsm4eq_u32): Ditto.
18234         (vsm4ekeyq_u32): Ditto.
18235         (doc/invoke.texi): Document new sm4 option.
18237 2018-01-10  Michael Collison  <michael.collison@arm.com>
18239         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
18240         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
18241         (AARCH64_FL_FOR_ARCH8_4): New.
18242         (AARCH64_FL_V8_4): New flag.
18243         (doc/invoke.texi): Document new armv8.4-a option.
18245 2018-01-10  Michael Collison  <michael.collison@arm.com>
18247         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18248         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
18249         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
18250         * config/aarch64/aarch64-option-extension.def: Add
18251         AARCH64_OPT_EXTENSION of 'sha2'.
18252         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
18253         (crypto): Disable sha2 and aes if crypto disabled.
18254         (crypto): Enable aes and sha2 if enabled.
18255         (simd): Disable sha2 and aes if simd disabled.
18256         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
18257         New flags.
18258         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
18259         (TARGET_SHA2): New feature flag for sha2.
18260         (TARGET_AES): New feature flag for aes.
18261         * config/aarch64/aarch64-simd.md:
18262         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
18263         conditional on TARGET_AES.
18264         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
18265         (aarch64_crypto_sha1hsi): Make pattern conditional
18266         on TARGET_SHA2.
18267         (aarch64_crypto_sha1hv4si): Ditto.
18268         (aarch64_be_crypto_sha1hv4si): Ditto.
18269         (aarch64_crypto_sha1su1v4si): Ditto.
18270         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
18271         (aarch64_crypto_sha1su0v4si): Ditto.
18272         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
18273         (aarch64_crypto_sha256su0v4si): Ditto.
18274         (aarch64_crypto_sha256su1v4si): Ditto.
18275         (doc/invoke.texi): Document new aes and sha2 options.
18277 2018-01-10  Martin Sebor  <msebor@redhat.com>
18279         PR tree-optimization/83781
18280         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
18281         as string arrays.
18283 2018-01-11  Martin Sebor  <msebor@gmail.com>
18284             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18286         PR tree-optimization/83501
18287         PR tree-optimization/81703
18289         * tree-ssa-strlen.c (get_string_cst): Rename...
18290         (get_string_len): ...to this.  Handle global constants.
18291         (handle_char_store): Adjust.
18293 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
18294             Jim Wilson  <jimw@sifive.com>
18296         * config/riscv/riscv-protos.h (riscv_output_return): New.
18297         * config/riscv/riscv.c (struct machine_function): New naked_p field.
18298         (riscv_attribute_table, riscv_output_return),
18299         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
18300         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
18301         (riscv_compute_frame_info): Only compute frame->mask if not a naked
18302         function.
18303         (riscv_expand_prologue): Add early return for naked function.
18304         (riscv_expand_epilogue): Likewise.
18305         (riscv_function_ok_for_sibcall): Return false for naked function.
18306         (riscv_set_current_function): New.
18307         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
18308         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
18309         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
18310         * doc/extend.texi (RISC-V Function Attributes): New.
18312 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
18314         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
18315         check for 128-bit long double before checking TCmode.
18316         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
18317         128-bit long doubles before checking TFmode or TCmode.
18318         (FLOAT128_IBM_P): Likewise.
18320 2018-01-10  Martin Sebor  <msebor@redhat.com>
18322         PR tree-optimization/83671
18323         * builtins.c (c_strlen): Unconditionally return zero for the empty
18324         string.
18325         Use -Warray-bounds for warnings.
18326         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
18327         for non-constant array indices with COMPONENT_REF, arrays of
18328         arrays, and pointers to arrays.
18329         (gimple_fold_builtin_strlen): Determine and set length range for
18330         non-constant character arrays.
18332 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
18334         PR middle-end/81897
18335         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
18336         empty blocks.
18338 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
18340         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
18342 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
18344         PR target/83399
18345         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
18346         VECTOR_MEM_ALTIVEC_OR_VSX_P.
18347         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
18348         indexed_or_indirect_operand predicate.
18349         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
18350         (*vsx_le_perm_load_v8hi): Likewise.
18351         (*vsx_le_perm_load_v16qi): Likewise.
18352         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
18353         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
18354         (*vsx_le_perm_store_v8hi): Likewise.
18355         (*vsx_le_perm_store_v16qi): Likewise.
18356         (eight unnamed splitters): Likewise.
18358 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
18360         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
18361         * config/rs6000/emmintrin.h: Likewise.
18362         * config/rs6000/mmintrin.h: Likewise.
18363         * config/rs6000/xmmintrin.h: Likewise.
18365 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
18367         PR c++/43486
18368         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
18369         "public_flag".
18370         * tree.c (tree_nop_conversion): Return true for location wrapper
18371         nodes.
18372         (maybe_wrap_with_location): New function.
18373         (selftest::check_strip_nops): New function.
18374         (selftest::test_location_wrappers): New function.
18375         (selftest::tree_c_tests): Call it.
18376         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
18377         (maybe_wrap_with_location): New decl.
18378         (EXPR_LOCATION_WRAPPER_P): New macro.
18379         (location_wrapper_p): New inline function.
18380         (tree_strip_any_location_wrapper): New inline function.
18382 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
18384         PR target/83735
18385         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
18386         stack_realign_offset for the largest alignment of stack slot
18387         actually used.
18388         (ix86_find_max_used_stack_alignment): New function.
18389         (ix86_finalize_stack_frame_flags): Use it.  Set
18390         max_used_stack_alignment if we don't realign stack.
18391         * config/i386/i386.h (machine_function): Add
18392         max_used_stack_alignment.
18394 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
18396         * config/arm/arm.opt (-mbranch-cost): New option.
18397         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
18398         account.
18400 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
18402         PR target/83629
18403         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
18404         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
18406 2018-01-10  Richard Biener  <rguenther@suse.de>
18408         PR debug/83765
18409         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
18410         early out so it also covers the case where we have a non-NULL
18411         origin.
18413 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
18415         PR tree-optimization/83753
18416         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
18417         for non-strided grouped accesses if the number of elements is 1.
18419 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
18421         PR target/81616
18422         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
18423         * i386.h (TARGET_USE_GATHER): Define.
18424         * x86-tune.def (X86_TUNE_USE_GATHER): New.
18426 2018-01-10  Martin Liska  <mliska@suse.cz>
18428         PR bootstrap/82831
18429         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
18430         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
18431         partitioning.
18432         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
18433         CLEANUP_NO_PARTITIONING is not set.
18435 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
18437         * doc/rtl.texi: Remove documentation of (const ...) wrappers
18438         for vectors, as a partial revert of r254296.
18439         * rtl.h (const_vec_p): Delete.
18440         (const_vec_duplicate_p): Don't test for vector CONSTs.
18441         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
18442         * expmed.c (make_tree): Likewise.
18444         Revert:
18445         * common.md (E, F): Use CONSTANT_P instead of checking for
18446         CONST_VECTOR.
18447         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
18448         checking for CONST_VECTOR.
18450 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
18452         PR middle-end/83575
18453         * predict.c (force_edge_cold): Handle in more sane way edges
18454         with no prediction.
18456 2018-01-09  Carl Love  <cel@us.ibm.com>
18458         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
18459         V4SI, V4SF types.
18460         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
18461         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
18462         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
18463         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
18464         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
18465         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
18466         * config/rs6000/rs6000-protos.h: Add extern defition for
18467         rs6000_generate_float2_double_code.
18468         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
18469         function.
18470         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
18471         (float2_v2df): Add define_expand.
18473 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
18475         PR target/83628
18476         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
18477         op_mode in the force_to_mode call.
18479 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
18481         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
18482         instead of checking each element individually.
18483         (aarch64_evpc_uzp): Likewise.
18484         (aarch64_evpc_zip): Likewise.
18485         (aarch64_evpc_ext): Likewise.
18486         (aarch64_evpc_rev): Likewise.
18487         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
18488         instead of checking each element individually.  Return true without
18489         generating rtl if
18490         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
18491         whether all selected elements come from the same input, instead of
18492         checking each element individually.  Remove calls to gen_rtx_REG,
18493         start_sequence and end_sequence and instead assert that no rtl is
18494         generated.
18496 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
18498         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
18499         order of HIGH and CONST checks.
18501 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
18503         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
18504         if the destination isn't an SSA_NAME.
18506 2018-01-09  Richard Biener  <rguenther@suse.de>
18508         PR tree-optimization/83668
18509         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
18510         move prologue...
18511         (canonicalize_loop_form): ... here, renamed from ...
18512         (canonicalize_loop_closed_ssa_form): ... this and amended to
18513         swap successor edges for loop exit blocks to make us use
18514         the RPO order we need for initial schedule generation.
18516 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
18518         PR tree-optimization/64811
18519         * match.pd: When optimizing comparisons with Inf, avoid
18520         introducing or losing exceptions from comparisons with NaN.
18522 2018-01-09  Martin Liska  <mliska@suse.cz>
18524         PR sanitizer/82517
18525         * asan.c (shadow_mem_size): Add gcc_assert.
18527 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
18529         Don't save registers in main().
18531         PR target/83738
18532         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
18533         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
18534         * config/avr/avr.c (avr_set_current_function): Don't error if
18535         naked, OS_task or OS_main are specified at the same time.
18536         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
18537         OS_main.
18538         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
18539         attribute.
18540         * common/config/avr/avr-common.c (avr_option_optimization_table):
18541         Switch on -mmain-is-OS_task for optimizing compilations.
18543 2018-01-09  Richard Biener  <rguenther@suse.de>
18545         PR tree-optimization/83572
18546         * graphite.c: Include cfganal.h.
18547         (graphite_transform_loops): Connect infinite loops to exit
18548         and remove fake edges at the end.
18550 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
18552         * ipa-inline.c (edge_badness): Revert accidental checkin.
18554 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
18556         PR ipa/80763
18557         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
18558         symbols; not inline clones.
18560 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
18562         PR target/83507
18563         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
18564         hard registers.  Formatting fixes.
18566         PR preprocessor/83722
18567         * gcc.c (try_generate_repro): Pass
18568         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
18569         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
18570         do_report_bug.
18572 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
18573             Kito Cheng  <kito.cheng@gmail.com>
18575         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
18576         (riscv_leaf_function_p): Delete.
18577         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
18579 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18581         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
18582         function.
18583         (do_ifelse): New function.
18584         (do_isel): New function.
18585         (do_sub3): New function.
18586         (do_add3): New function.
18587         (do_load_mask_compare): New function.
18588         (do_overlap_load_compare): New function.
18589         (expand_compare_loop): New function.
18590         (expand_block_compare): Call expand_compare_loop() when appropriate.
18591         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
18592         option description.
18593         (-mblock-compare-inline-loop-limit): New option.
18595 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18597         PR target/83677
18598         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
18599         Reverse order of second and third operands in first alternative.
18600         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
18601         of first and second elements in UNSPEC_VPERMR vector.
18602         (altivec_expand_vec_perm_le): Likewise.
18604 2018-01-08  Jeff Law  <law@redhat.com>
18606         PR rtl-optimizatin/81308
18607         * tree-switch-conversion.c (cfg_altered): New file scoped static.
18608         (process_switch): If group_case_labels makes a change, then set
18609         cfg_altered.
18610         (pass_convert_switch::execute): If a switch is converted, then
18611         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
18613         PR rtl-optimization/81308
18614         * recog.c (split_all_insns): Conditionally cleanup the CFG after
18615         splitting insns.
18617 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
18619         PR target/83663 - Revert r255946
18620         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
18621         generation for cases where splatting a value is not useful.
18622         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
18623         across a vec_duplicate and a paradoxical subreg forming a vector
18624         mode to a vec_concat.
18626 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18628         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
18629         -march=armv8.3-a variants.
18630         * config/arm/t-multilib: Likewise.
18631         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
18633 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18635         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
18636         to generate rtl.
18637         (cceq_ior_compare_complement): Give it a name so I can use it, and
18638         change boolean_or_operator predicate to boolean_operator so it can
18639         be used to generate a crand.
18640         (eqne): New code iterator.
18641         (bd/bd_neg): New code_attrs.
18642         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
18643         a single define_insn.
18644         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
18645         decrement (bdnzt/bdnzf/bdzt/bdzf).
18646         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
18647         with the new names of the branch decrement patterns, and added the
18648         names of the branch decrement conditional patterns.
18650 2018-01-08  Richard Biener  <rguenther@suse.de>
18652         PR tree-optimization/83563
18653         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
18654         cache.
18656 2018-01-08  Richard Biener  <rguenther@suse.de>
18658         PR middle-end/83713
18659         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
18661 2018-01-08  Richard Biener  <rguenther@suse.de>
18663         PR tree-optimization/83685
18664         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
18665         references to abnormals.
18667 2018-01-08  Richard Biener  <rguenther@suse.de>
18669         PR lto/83719
18670         * dwarf2out.c (output_indirect_strings): Handle empty
18671         skeleton_debug_str_hash.
18672         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
18674 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
18676         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
18677         (emit_store_direct): Likewise.
18678         (arc_trampoline_adjust_address): Likewise.
18679         (arc_asm_trampoline_template): New function.
18680         (arc_initialize_trampoline): Use asm_trampoline_template.
18681         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
18682         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
18683         * config/arc/arc.md (flush_icache): Delete pattern.
18685 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
18687         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
18688         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
18689         munaligned-access.
18691 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18693         PR target/83681
18694         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
18695         by not USED_FOR_TARGET.
18696         (make_pass_resolve_sw_modes): Likewise.
18698 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18700         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
18701         USED_FOR_TARGET.
18703 2018-01-08  Richard Biener  <rguenther@suse.de>
18705         PR middle-end/83580
18706         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
18708 2018-01-08  Richard Biener  <rguenther@suse.de>
18710         PR middle-end/83517
18711         * match.pd ((t * 2) / 2) -> t): Add missing :c.
18713 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
18715         PR middle-end/81897
18716         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
18717         basic blocks with a small number of successors.
18718         (convert_control_dep_chain_into_preds): Improve handling of
18719         forwarder blocks.
18720         (dump_predicates): Split apart into...
18721         (dump_pred_chain): ...here...
18722         (dump_pred_info): ...and here.
18723         (can_one_predicate_be_invalidated_p): Add debugging printfs.
18724         (can_chain_union_be_invalidated_p): Improve check for invalidation
18725         of paths.
18726         (uninit_uses_cannot_happen): Avoid unnecessary if
18727         convert_control_dep_chain_into_preds yielded nothing.
18729 2018-01-06  Martin Sebor  <msebor@redhat.com>
18731         PR tree-optimization/83640
18732         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
18733         subtracting negative offset from size.
18734         (builtin_access::overlap): Adjust offset bounds of the access to fall
18735         within the size of the object if possible.
18737 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
18739         PR rtl-optimization/83699
18740         * expmed.c (extract_bit_field_1): Restrict the vector usage of
18741         extract_bit_field_as_subreg to cases in which the extracted
18742         value is also a vector.
18744         * lra-constraints.c (process_alt_operands): Test for the equivalence
18745         substitutions when detecting a possible reload cycle.
18747 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
18749         PR debug/83480
18750         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
18751         by default if flag_selective_schedling{,2}.  Formatting fixes.
18753         PR rtl-optimization/83682
18754         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
18755         if it has non-VECTOR_MODE element mode.
18756         (vec_duplicate_p): Likewise.
18758         PR middle-end/83694
18759         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
18760         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
18762 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
18764         PR target/83604
18765         * config/i386/i386-builtin.def
18766         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
18767         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
18768         Require also OPTION_MASK_ISA_AVX512F in addition to
18769         OPTION_MASK_ISA_GFNI.
18770         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
18771         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
18772         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
18773         to OPTION_MASK_ISA_GFNI.
18774         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
18775         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
18776         OPTION_MASK_ISA_AVX512BW.
18777         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
18778         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
18779         addition to OPTION_MASK_ISA_GFNI.
18780         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
18781         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
18782         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
18783         to OPTION_MASK_ISA_GFNI.
18784         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
18785         a requirement for all ISAs rather than any of them with a few
18786         exceptions.
18787         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
18788         processing.
18789         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
18790         bitmasks to be enabled with 3 exceptions, instead of requiring any
18791         enabled ISA with lots of exceptions.
18792         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
18793         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
18794         Change avx512bw in isa attribute to avx512f.
18795         * config/i386/sgxintrin.h: Add license boilerplate.
18796         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
18797         to __AVX512F__ and __AVX512VL to __AVX512VL__.
18798         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
18799         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
18800         defined.
18801         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
18802         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
18803         temporarily sse2 rather than sse if not enabled already.
18805         PR target/83604
18806         * config/i386/sse.md (VI248_VLBW): Rename to ...
18807         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
18808         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
18809         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
18810         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
18811         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
18812         mode iterator instead of VI248_VLBW.
18814 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
18816         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
18817         (record_modified): Skip clobbers; add debug output.
18818         (param_change_prob): Use sreal frequencies.
18820 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
18822         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
18823         punt for user-aligned variables.
18825 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
18827         * tree-chrec.c (chrec_contains_symbols): Return true for
18828         POLY_INT_CST.
18830 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
18832         PR target/82439
18833         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
18834         of (x|y) == x for BICS pattern.
18836 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
18838         PR tree-optimization/83605
18839         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
18840         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
18841         can throw.
18843 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18845         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
18846         * config/epiphany/rtems.h: New file.
18848 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
18849             Uros Bizjak  <ubizjak@gmail.com>
18851         PR target/83554
18852         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
18853         QIreg_operand instead of register_operand predicate.
18854         * config/i386/i386.c (ix86_rop_should_change_byte_p,
18855         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
18856         comments instead of -fmitigate[-_]rop.
18858 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18860         PR bootstrap/81926
18861         * cgraphunit.c (symbol_table::compile): Switch to text_section
18862         before calling assembly_start debug hook.
18863         * run-rtl-passes.c (run_rtl_passes): Likewise.
18864         Include output.h.
18866 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
18868         * tree-vrp.c (extract_range_from_binary_expr_1): Check
18869         range_int_cst_p rather than !symbolic_range_p before calling
18870         extract_range_from_multiplicative_op_1.
18872 2018-01-04  Jeff Law  <law@redhat.com>
18874         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
18875         redundant test in assertion.
18877 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
18879         * doc/rtl.texi: Document machine_mode wrapper classes.
18881 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
18883         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
18884         using tree_to_uhwi.
18886 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
18888         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
18889         the VEC_PERM_EXPR fold to fail.
18891 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
18893         PR debug/83585
18894         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
18895         to switched_sections.
18897 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
18899         PR target/83680
18900         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
18901         test for d.testing.
18903 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
18905         PR target/83387
18906         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
18907         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
18909 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
18911         PR debug/83666
18912         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
18913         is BLKmode and bitpos not zero or mode change is needed.
18915 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
18917         PR target/83675
18918         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
18919         TARGET_VIS2.
18921 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
18923         PR target/83628
18924         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
18925         instead of MULT rtx.  Update all corresponding splitters.
18926         (*saddl_se): Ditto.
18927         (*ssub<modesuffix>): Ditto.
18928         (*ssubl_se): Ditto.
18929         (*cmp_sadd_di): Update split patterns.
18930         (*cmp_sadd_si): Ditto.
18931         (*cmp_sadd_sidi): Ditto.
18932         (*cmp_ssub_di): Ditto.
18933         (*cmp_ssub_si): Ditto.
18934         (*cmp_ssub_sidi): Ditto.
18935         * config/alpha/predicates.md (const23_operand): New predicate.
18936         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
18937         Look for ASHIFT, not MULT inner operand.
18938         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
18940 2018-01-04  Martin Liska  <mliska@suse.cz>
18942         PR gcov-profile/83669
18943         * gcov.c (output_intermediate_file): Add version to intermediate
18944         gcov file.
18945         * doc/gcov.texi: Document new field 'version' in intermediate
18946         file format. Fix location of '-k' option of gcov command.
18948 2018-01-04  Martin Liska  <mliska@suse.cz>
18950         PR ipa/82352
18951         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
18953 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
18955         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
18957 2018-01-03  Martin Sebor  <msebor@redhat.com>
18959         PR tree-optimization/83655
18960         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
18961         checking calls with invalid arguments.
18963 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18965         * tree-vect-stmts.c (vect_get_store_rhs): New function.
18966         (vectorizable_mask_load_store): Delete.
18967         (vectorizable_call): Return false for masked loads and stores.
18968         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
18969         instead of gimple_assign_rhs1.
18970         (vectorizable_load): Handle IFN_MASK_LOAD.
18971         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
18973 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18975         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
18976         split out from..,
18977         (vectorizable_mask_load_store): ...here.
18978         (vectorizable_load): ...and here.
18980 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18982         * tree-vect-stmts.c (vect_build_all_ones_mask)
18983         (vect_build_zero_merge_argument): New functions, split out from...
18984         (vectorizable_load): ...here.
18986 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18988         * tree-vect-stmts.c (vect_check_store_rhs): New function,
18989         split out from...
18990         (vectorizable_mask_load_store): ...here.
18991         (vectorizable_store): ...and here.
18993 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18995         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
18996         split out from...
18997         (vectorizable_mask_load_store): ...here.
18999 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19001         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
19002         (vect_model_store_cost): Take a vec_load_store_type instead of a
19003         vect_def_type.
19004         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
19005         (vect_model_store_cost): Take a vec_load_store_type instead of a
19006         vect_def_type.
19007         (vectorizable_mask_load_store): Update accordingly.
19008         (vectorizable_store): Likewise.
19009         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
19011 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19013         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
19014         IFN_MASK_LOAD calls here rather than...
19015         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
19017 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19018             Alan Hayward  <alan.hayward@arm.com>
19019             David Sherwood  <david.sherwood@arm.com>
19021         * expmed.c (extract_bit_field_1): For vector extracts,
19022         fall back to extract_bit_field_as_subreg if vec_extract
19023         isn't available.
19025 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19026             Alan Hayward  <alan.hayward@arm.com>
19027             David Sherwood  <david.sherwood@arm.com>
19029         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
19030         they are variable or constant sized.
19031         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
19032         slots for constant-sized data.
19034 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19035             Alan Hayward  <alan.hayward@arm.com>
19036             David Sherwood  <david.sherwood@arm.com>
19038         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
19039         handling COND_EXPRs with boolean comparisons, try to find a better
19040         basis for the mask type than the boolean itself.
19042 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19044         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
19045         is calculated and how it can be overridden.
19046         * genmodes.c (max_bitsize_mode_any_mode): New variable.
19047         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
19048         if defined.
19049         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
19050         if nonzero.
19052 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19053             Alan Hayward  <alan.hayward@arm.com>
19054             David Sherwood  <david.sherwood@arm.com>
19056         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
19057         Remove the mode argument.
19058         (aarch64_simd_valid_immediate): Remove the mode and inverse
19059         arguments.
19060         * config/aarch64/iterators.md (bitsize): New iterator.
19061         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
19062         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
19063         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
19064         aarch64_simd_valid_immediate.
19065         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
19066         (aarch64_reg_or_bic_imm): Likewise.
19067         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
19068         with an insn_type enum and msl with a modifier_type enum.
19069         Replace element_width with a scalar_mode.  Change the shift
19070         to unsigned int.  Add constructors for scalar_float_mode and
19071         scalar_int_mode elements.
19072         (aarch64_vect_float_const_representable_p): Delete.
19073         (aarch64_can_const_movi_rtx_p)
19074         (aarch64_simd_scalar_immediate_valid_for_move)
19075         (aarch64_simd_make_constant): Update call to
19076         aarch64_simd_valid_immediate.
19077         (aarch64_advsimd_valid_immediate_hs): New function.
19078         (aarch64_advsimd_valid_immediate): Likewise.
19079         (aarch64_simd_valid_immediate): Remove mode and inverse
19080         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
19081         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
19082         and aarch64_float_const_representable_p on the result.
19083         (aarch64_output_simd_mov_immediate): Remove mode argument.
19084         Update call to aarch64_simd_valid_immediate and use of
19085         simd_immediate_info.
19086         (aarch64_output_scalar_simd_mov_immediate): Update call
19087         accordingly.
19089 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19090             Alan Hayward  <alan.hayward@arm.com>
19091             David Sherwood  <david.sherwood@arm.com>
19093         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
19094         (mode_nunits): Likewise CONST_MODE_NUNITS.
19095         * machmode.def (ADJUST_NUNITS): Document.
19096         * genmodes.c (mode_data::need_nunits_adj): New field.
19097         (blank_mode): Update accordingly.
19098         (adj_nunits): New variable.
19099         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
19100         parameter.
19101         (emit_mode_size_inline): Set need_bytesize_adj for all modes
19102         listed in adj_nunits.
19103         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
19104         listed in adj_nunits.  Don't emit case statements for such modes.
19105         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
19106         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
19107         nothing if adj_nunits is nonnull.
19108         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
19109         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
19110         (emit_mode_fbit): Update use of print_maybe_const_decl.
19111         (emit_move_size): Likewise.  Treat the array as non-const
19112         if adj_nunits.
19113         (emit_mode_adjustments): Handle adj_nunits.
19115 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19117         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
19118         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
19119         (VECTOR_MODES): Use it.
19120         (make_vector_modes): Take the prefix as an argument.
19122 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19123             Alan Hayward  <alan.hayward@arm.com>
19124             David Sherwood  <david.sherwood@arm.com>
19126         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
19127         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
19128         for MODE_VECTOR_BOOL.
19129         * machmode.def (VECTOR_BOOL_MODE): Document.
19130         * genmodes.c (VECTOR_BOOL_MODE): New macro.
19131         (make_vector_bool_mode): New function.
19132         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
19133         MODE_VECTOR_BOOL.
19134         * lto-streamer-in.c (lto_input_mode_table): Likewise.
19135         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
19136         Likewise.
19137         * stor-layout.c (int_mode_for_mode): Likewise.
19138         * tree.c (build_vector_type_for_mode): Likewise.
19139         * varasm.c (output_constant_pool_2): Likewise.
19140         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
19141         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
19142         for MODE_VECTOR_BOOL.
19143         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
19144         of mode class checks.
19145         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
19146         instead of a list of mode class checks.
19147         (expand_vector_scalar_condition): Likewise.
19148         (type_for_widest_vector_mode): Handle BImode as an inner mode.
19150 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19151             Alan Hayward  <alan.hayward@arm.com>
19152             David Sherwood  <david.sherwood@arm.com>
19154         * machmode.h (mode_size): Change from unsigned short to
19155         poly_uint16_pod.
19156         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
19157         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19158         or if measurement_type is not polynomial.
19159         (fixed_size_mode::includes_p): Check for constant-sized modes.
19160         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
19161         return a poly_uint16 rather than an unsigned short.
19162         (emit_mode_size): Change the type of mode_size from unsigned short
19163         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
19164         (emit_mode_adjustments): Cope with polynomial vector sizes.
19165         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19166         for GET_MODE_SIZE.
19167         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19168         for GET_MODE_SIZE.
19169         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
19170         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
19171         * caller-save.c (setup_save_areas): Likewise.
19172         (replace_reg_with_saved_mem): Likewise.
19173         * calls.c (emit_library_call_value_1): Likewise.
19174         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
19175         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
19176         (gen_lowpart_for_combine): Likewise.
19177         * convert.c (convert_to_integer_1): Likewise.
19178         * cse.c (equiv_constant, cse_insn): Likewise.
19179         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
19180         (cselib_subst_to_values): Likewise.
19181         * dce.c (word_dce_process_block): Likewise.
19182         * df-problems.c (df_word_lr_mark_ref): Likewise.
19183         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
19184         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
19185         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
19186         (rtl_for_decl_location): Likewise.
19187         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
19188         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
19189         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
19190         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
19191         (expand_expr_real_1): Likewise.
19192         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
19193         (pad_below): Likewise.
19194         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19195         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
19196         * ira.c (get_subreg_tracking_sizes): Likewise.
19197         * ira-build.c (ira_create_allocno_objects): Likewise.
19198         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
19199         (ira_sort_regnos_for_alter_reg): Likewise.
19200         * ira-costs.c (record_operand_costs): Likewise.
19201         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
19202         (resolve_simple_move): Likewise.
19203         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
19204         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
19205         (lra_constraints): Likewise.
19206         (CONST_POOL_OK_P): Reject variable-sized modes.
19207         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
19208         (add_pseudo_to_slot, lra_spill): Likewise.
19209         * omp-low.c (omp_clause_aligned_alignment): Likewise.
19210         * optabs-query.c (get_best_extraction_insn): Likewise.
19211         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
19212         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
19213         (expand_mult_highpart, valid_multiword_target_p): Likewise.
19214         * recog.c (offsettable_address_addr_space_p): Likewise.
19215         * regcprop.c (maybe_mode_change): Likewise.
19216         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
19217         * regrename.c (build_def_use): Likewise.
19218         * regstat.c (dump_reg_info): Likewise.
19219         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
19220         (find_reloads, find_reloads_subreg_address): Likewise.
19221         * reload1.c (eliminate_regs_1): Likewise.
19222         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
19223         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
19224         (simplify_binary_operation_1, simplify_subreg): Likewise.
19225         * targhooks.c (default_function_arg_padding): Likewise.
19226         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
19227         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
19228         (verify_gimple_assign_ternary): Likewise.
19229         * tree-inline.c (estimate_move_cost): Likewise.
19230         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19231         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
19232         (get_address_cost_ainc): Likewise.
19233         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
19234         (vect_supportable_dr_alignment): Likewise.
19235         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19236         (vectorizable_reduction): Likewise.
19237         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
19238         (vectorizable_operation, vectorizable_load): Likewise.
19239         * tree.c (build_same_sized_truth_vector_type): Likewise.
19240         * valtrack.c (cleanup_auto_inc_dec): Likewise.
19241         * var-tracking.c (emit_note_insn_var_location): Likewise.
19242         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
19243         (ADDR_VEC_ALIGN): Likewise.
19245 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19246             Alan Hayward  <alan.hayward@arm.com>
19247             David Sherwood  <david.sherwood@arm.com>
19249         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
19250         unsigned short.
19251         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19252         or if measurement_type is polynomial.
19253         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
19254         * combine.c (make_extraction): Likewise.
19255         * dse.c (find_shift_sequence): Likewise.
19256         * dwarf2out.c (mem_loc_descriptor): Likewise.
19257         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
19258         (extract_bit_field, extract_low_bits): Likewise.
19259         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
19260         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
19261         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
19262         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
19263         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19264         * reload.c (find_reloads): Likewise.
19265         * reload1.c (alter_reg): Likewise.
19266         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
19267         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
19268         * tree-if-conv.c (predicate_mem_writes): Likewise.
19269         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
19270         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
19271         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
19272         * valtrack.c (dead_debug_insert_temp): Likewise.
19273         * varasm.c (mergeable_constant_section): Likewise.
19274         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
19276 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19277             Alan Hayward  <alan.hayward@arm.com>
19278             David Sherwood  <david.sherwood@arm.com>
19280         * expr.c (expand_assignment): Cope with polynomial mode sizes
19281         when assigning to a CONCAT.
19283 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19284             Alan Hayward  <alan.hayward@arm.com>
19285             David Sherwood  <david.sherwood@arm.com>
19287         * machmode.h (mode_precision): Change from unsigned short to
19288         poly_uint16_pod.
19289         (mode_to_precision): Return a poly_uint16 rather than an unsigned
19290         short.
19291         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
19292         or if measurement_type is not polynomial.
19293         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
19294         in which the mode is already known to be a scalar_int_mode.
19295         * genmodes.c (emit_mode_precision): Change the type of mode_precision
19296         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
19297         initializer.
19298         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19299         for GET_MODE_PRECISION.
19300         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19301         for GET_MODE_PRECISION.
19302         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
19303         as polynomial.
19304         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
19305         (expand_field_assignment, make_extraction): Likewise.
19306         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
19307         (get_last_value): Likewise.
19308         * convert.c (convert_to_integer_1): Likewise.
19309         * cse.c (cse_insn): Likewise.
19310         * expr.c (expand_expr_real_1): Likewise.
19311         * lra-constraints.c (simplify_operand_subreg): Likewise.
19312         * optabs-query.c (can_atomic_load_p): Likewise.
19313         * optabs.c (expand_atomic_load): Likewise.
19314         (expand_atomic_store): Likewise.
19315         * ree.c (combine_reaching_defs): Likewise.
19316         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
19317         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
19318         * tree.h (type_has_mode_precision_p): Likewise.
19319         * ubsan.c (instrument_si_overflow): Likewise.
19321 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19322             Alan Hayward  <alan.hayward@arm.com>
19323             David Sherwood  <david.sherwood@arm.com>
19325         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
19326         polynomial numbers of units.
19327         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
19328         (valid_vector_subparts_p): New function.
19329         (build_vector_type): Remove temporary shim and take the number
19330         of units as a poly_uint64 rather than an int.
19331         (build_opaque_vector_type): Take the number of units as a
19332         poly_uint64 rather than an int.
19333         * tree.c (build_vector_from_ctor): Handle polynomial
19334         TYPE_VECTOR_SUBPARTS.
19335         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
19336         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
19337         (build_vector_from_val): If the number of units is variable,
19338         use build_vec_duplicate_cst for constant operands and
19339         VEC_DUPLICATE_EXPR otherwise.
19340         (make_vector_type): Remove temporary is_constant ().
19341         (build_vector_type, build_opaque_vector_type): Take the number of
19342         units as a poly_uint64 rather than an int.
19343         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
19344         VECTOR_CST_NELTS.
19345         * cfgexpand.c (expand_debug_expr): Likewise.
19346         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
19347         (store_constructor, expand_expr_real_1): Likewise.
19348         (const_scalar_mask_from_tree): Likewise.
19349         * fold-const-call.c (fold_const_reduction): Likewise.
19350         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
19351         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
19352         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
19353         (fold_relational_const): Likewise.
19354         (native_interpret_vector): Likewise.  Change the size from an
19355         int to an unsigned int.
19356         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
19357         TYPE_VECTOR_SUBPARTS.
19358         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
19359         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
19360         duplicating a non-constant operand into a variable-length vector.
19361         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
19362         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
19363         * ipa-icf.c (sem_variable::equals): Likewise.
19364         * match.pd: Likewise.
19365         * omp-simd-clone.c (simd_clone_subparts): Likewise.
19366         * print-tree.c (print_node): Likewise.
19367         * stor-layout.c (layout_type): Likewise.
19368         * targhooks.c (default_builtin_vectorization_cost): Likewise.
19369         * tree-cfg.c (verify_gimple_comparison): Likewise.
19370         (verify_gimple_assign_binary): Likewise.
19371         (verify_gimple_assign_ternary): Likewise.
19372         (verify_gimple_assign_single): Likewise.
19373         * tree-pretty-print.c (dump_generic_node): Likewise.
19374         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19375         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
19376         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
19377         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
19378         (vect_shift_permute_load_chain): Likewise.
19379         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
19380         (expand_vector_condition, optimize_vector_constructor): Likewise.
19381         (lower_vec_perm, get_compute_type): Likewise.
19382         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19383         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
19384         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
19385         (vect_recog_mask_conversion_pattern): Likewise.
19386         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
19387         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
19388         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19389         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
19390         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
19391         (vectorizable_shift, vectorizable_operation, vectorizable_store)
19392         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
19393         (supportable_widening_operation): Likewise.
19394         (supportable_narrowing_operation): Likewise.
19395         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
19396         Likewise.
19397         * varasm.c (output_constant): Likewise.
19399 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19400             Alan Hayward  <alan.hayward@arm.com>
19401             David Sherwood  <david.sherwood@arm.com>
19403         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
19404         so that both the length == 3 and length != 3 cases set up their
19405         own permute vectors.  Add comments explaining why we know the
19406         number of elements is constant.
19407         (vect_permute_load_chain): Likewise.
19409 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19410             Alan Hayward  <alan.hayward@arm.com>
19411             David Sherwood  <david.sherwood@arm.com>
19413         * machmode.h (mode_nunits): Change from unsigned char to
19414         poly_uint16_pod.
19415         (ONLY_FIXED_SIZE_MODES): New macro.
19416         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
19417         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
19418         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
19419         New typedefs.
19420         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
19421         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
19422         or if measurement_type is not polynomial.
19423         * genmodes.c (ZERO_COEFFS): New macro.
19424         (emit_mode_nunits_inline): Make mode_nunits_inline return a
19425         poly_uint16.
19426         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
19427         Use ZERO_COEFFS when emitting initializers.
19428         * data-streamer.h (bp_pack_poly_value): New function.
19429         (bp_unpack_poly_value): Likewise.
19430         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19431         for GET_MODE_NUNITS.
19432         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19433         for GET_MODE_NUNITS.
19434         * tree.c (make_vector_type): Remove temporary shim and make
19435         the real function take the number of units as a poly_uint64
19436         rather than an int.
19437         (build_vector_type_for_mode): Handle polynomial nunits.
19438         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
19439         * emit-rtl.c (const_vec_series_p_1): Likewise.
19440         (gen_rtx_CONST_VECTOR): Likewise.
19441         * fold-const.c (test_vec_duplicate_folding): Likewise.
19442         * genrecog.c (validate_pattern): Likewise.
19443         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
19444         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
19445         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
19446         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
19447         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
19448         * rtlanal.c (subreg_get_info): Likewise.
19449         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19450         (vect_grouped_load_supported): Likewise.
19451         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
19452         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
19453         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
19454         (simplify_const_unary_operation, simplify_binary_operation_1)
19455         (simplify_const_binary_operation, simplify_ternary_operation)
19456         (test_vector_ops_duplicate, test_vector_ops): Likewise.
19457         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
19458         instead of CONST_VECTOR_NUNITS.
19459         * varasm.c (output_constant_pool_2): Likewise.
19460         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
19461         explicit-encoded elements in the XVEC for variable-length vectors.
19463 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19465         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
19467 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19468             Alan Hayward  <alan.hayward@arm.com>
19469             David Sherwood  <david.sherwood@arm.com>
19471         * coretypes.h (fixed_size_mode): Declare.
19472         (fixed_size_mode_pod): New typedef.
19473         * builtins.h (target_builtins::x_apply_args_mode)
19474         (target_builtins::x_apply_result_mode): Change type to
19475         fixed_size_mode_pod.
19476         * builtins.c (apply_args_size, apply_result_size, result_vector)
19477         (expand_builtin_apply_args_1, expand_builtin_apply)
19478         (expand_builtin_return): Update accordingly.
19480 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19482         * cse.c (hash_rtx_cb): Hash only the encoded elements.
19483         * cselib.c (cselib_hash_rtx): Likewise.
19484         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
19485         CONST_VECTOR encoding.
19487 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
19488             Jeff Law  <law@redhat.com>
19490         PR target/83641
19491         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
19492         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
19493         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
19494         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
19496         PR target/83641
19497         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
19498         explicitly probe *sp in a noreturn function if there were any callee
19499         register saves or frame pointer is needed.
19501 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
19503         PR debug/83621
19504         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
19505         BLKmode for ternary, binary or unary expressions.
19507         PR debug/83645
19508         * var-tracking.c (delete_vta_debug_insn): New inline function.
19509         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
19510         insns from get_insns () to NULL instead of each bb separately.
19511         Use delete_vta_debug_insn.  No longer static.
19512         (vt_debug_insns_local, variable_tracking_main_1): Adjust
19513         delete_vta_debug_insns callers.
19514         * rtl.h (delete_vta_debug_insns): Declare.
19515         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
19516         instead of variable_tracking_main.
19518 2018-01-03  Martin Sebor  <msebor@redhat.com>
19520         PR tree-optimization/83603
19521         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
19522         arguments past the endof the argument list in functions declared
19523         without a prototype.
19524         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
19525         Avoid checking when arguments are null.
19527 2018-01-03  Martin Sebor  <msebor@redhat.com>
19529         PR c/83559
19530         * doc/extend.texi (attribute const): Fix a typo.
19531         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
19532         issuing -Wsuggest-attribute for void functions.
19534 2018-01-03  Martin Sebor  <msebor@redhat.com>
19536         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
19537         offset_int::from instead of wide_int::to_shwi.
19538         (maybe_diag_overlap): Remove assertion.
19539         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
19540         * gimple-ssa-sprintf.c (format_directive): Same.
19541         (parse_directive): Same.
19542         (sprintf_dom_walker::compute_format_length): Same.
19543         (try_substitute_return_value): Same.
19545 2018-01-03  Jeff Law  <law@redhat.com>
19547         PR middle-end/83654
19548         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
19549         non-constant residual for zero at runtime and avoid probing in
19550         that case.  Reorganize code for trailing problem to mirror handling
19551         of the residual.
19553 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
19555         PR tree-optimization/83501
19556         * tree-ssa-strlen.c (get_string_cst): New.
19557         (handle_char_store): Call get_string_cst.
19559 2018-01-03  Martin Liska  <mliska@suse.cz>
19561         PR tree-optimization/83593
19562         * tree-ssa-strlen.c: Include tree-cfg.h.
19563         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
19564         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
19565         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
19566         to false.
19567         (strlen_dom_walker::before_dom_children): Call
19568         gimple_purge_dead_eh_edges. Dump tranformation with details
19569         dump flags.
19570         (strlen_dom_walker::before_dom_children): Update call by adding
19571         new argument cleanup_eh.
19572         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
19574 2018-01-03  Martin Liska  <mliska@suse.cz>
19576         PR ipa/83549
19577         * cif-code.def (VARIADIC_THUNK): New enum value.
19578         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
19579         thunks.
19581 2018-01-03  Jan Beulich  <jbeulich@suse.com>
19583         * sse.md (mov<mode>_internal): Tighten condition for when to use
19584         vmovdqu<ssescalarsize> for TI and OI modes.
19586 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
19588         Update copyright years.
19590 2018-01-03  Martin Liska  <mliska@suse.cz>
19592         PR ipa/83594
19593         * ipa-visibility.c (function_and_variable_visibility): Skip
19594         functions with noipa attribure.
19596 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
19598         * gcc.c (process_command): Update copyright notice dates.
19599         * gcov-dump.c (print_version): Ditto.
19600         * gcov.c (print_version): Ditto.
19601         * gcov-tool.c (print_version): Ditto.
19602         * gengtype.c (create_file): Ditto.
19603         * doc/cpp.texi: Bump @copying's copyright year.
19604         * doc/cppinternals.texi: Ditto.
19605         * doc/gcc.texi: Ditto.
19606         * doc/gccint.texi: Ditto.
19607         * doc/gcov.texi: Ditto.
19608         * doc/install.texi: Ditto.
19609         * doc/invoke.texi: Ditto.
19611 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19613         * vector-builder.h (vector_builder::m_full_nelts): Change from
19614         unsigned int to poly_uint64.
19615         (vector_builder::full_nelts): Update prototype accordingly.
19616         (vector_builder::new_vector): Likewise.
19617         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
19618         (vector_builder::operator ==): Likewise.
19619         (vector_builder::finalize): Likewise.
19620         * int-vector-builder.h (int_vector_builder::int_vector_builder):
19621         Take the number of elements as a poly_uint64 rather than an
19622         unsigned int.
19623         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
19624         from unsigned int to poly_uint64.
19625         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
19626         (vec_perm_indices::new_vector): Likewise.
19627         (vec_perm_indices::length): Likewise.
19628         (vec_perm_indices::nelts_per_input): Likewise.
19629         (vec_perm_indices::input_nelts): Likewise.
19630         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
19631         number of elements per input as a poly_uint64 rather than an
19632         unsigned int.  Use the original encoding for variable-length
19633         vectors, rather than clamping each individual element.
19634         For the second and subsequent elements in each pattern,
19635         clamp the step and base before clamping their sum.
19636         (vec_perm_indices::series_p): Handle polynomial element counts.
19637         (vec_perm_indices::all_in_range_p): Likewise.
19638         (vec_perm_indices_to_tree): Likewise.
19639         (vec_perm_indices_to_rtx): Likewise.
19640         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
19641         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
19642         (tree_vector_builder::new_binary_operation): Handle polynomial
19643         element counts.  Return false if we need to know the number
19644         of elements at compile time.
19645         * fold-const.c (fold_vec_perm): Punt if the number of elements
19646         isn't known at compile time.
19648 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19650         * vec-perm-indices.h (vec_perm_builder): Change element type
19651         from HOST_WIDE_INT to poly_int64.
19652         (vec_perm_indices::element_type): Update accordingly.
19653         (vec_perm_indices::clamp): Handle polynomial element_types.
19654         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
19655         (vec_perm_indices::all_in_range_p): Likewise.
19656         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
19657         than shwi trees.
19658         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
19659         polynomial vec_perm_indices element types.
19660         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
19661         * fold-const.c (fold_vec_perm): Likewise.
19662         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
19663         * tree-vect-generic.c (lower_vec_perm): Likewise.
19664         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
19665         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
19666         element type to HOST_WIDE_INT.
19668 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19669             Alan Hayward  <alan.hayward@arm.com>
19670             David Sherwood  <david.sherwood@arm.com>
19672         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
19673         rather than an int.  Use plus_constant.
19674         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
19675         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
19677 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19678             Alan Hayward  <alan.hayward@arm.com>
19679             David Sherwood  <david.sherwood@arm.com>
19681         * calls.c (emit_call_1, expand_call): Change struct_value_size from
19682         a HOST_WIDE_INT to a poly_int64.
19684 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19685             Alan Hayward  <alan.hayward@arm.com>
19686             David Sherwood  <david.sherwood@arm.com>
19688         * calls.c (load_register_parameters): Cope with polynomial
19689         mode sizes.  Require a constant size for BLKmode parameters
19690         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
19691         forces a parameter to be padded at the lsb end in order to
19692         fill a complete number of words, require the parameter size
19693         to be ordered wrt UNITS_PER_WORD.
19695 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19696             Alan Hayward  <alan.hayward@arm.com>
19697             David Sherwood  <david.sherwood@arm.com>
19699         * reload1.c (spill_stack_slot_width): Change element type
19700         from unsigned int to poly_uint64_pod.
19701         (alter_reg): Treat mode sizes as polynomial.
19703 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19704             Alan Hayward  <alan.hayward@arm.com>
19705             David Sherwood  <david.sherwood@arm.com>
19707         * reload.c (complex_word_subreg_p): New function.
19708         (reload_inner_reg_of_subreg, push_reload): Use it.
19710 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19711             Alan Hayward  <alan.hayward@arm.com>
19712             David Sherwood  <david.sherwood@arm.com>
19714         * lra-constraints.c (process_alt_operands): Reject matched
19715         operands whose sizes aren't ordered.
19716         (match_reload): Refer to this check here.
19718 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19719             Alan Hayward  <alan.hayward@arm.com>
19720             David Sherwood  <david.sherwood@arm.com>
19722         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
19723         that the mode size is in the set {1, 2, 4, 8, 16}.
19725 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19726             Alan Hayward  <alan.hayward@arm.com>
19727             David Sherwood  <david.sherwood@arm.com>
19729         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
19730         Use plus_constant instead of gen_rtx_PLUS.
19732 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19733             Alan Hayward  <alan.hayward@arm.com>
19734             David Sherwood  <david.sherwood@arm.com>
19736         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
19737         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
19738         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
19739         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
19740         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
19741         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
19742         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
19743         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
19744         * config/i386/i386.c (ix86_push_rounding): ...this new function.
19745         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
19746         a poly_int64.
19747         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
19748         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
19749         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
19750         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
19751         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
19752         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
19753         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
19754         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
19755         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
19756         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
19757         function.
19758         * expr.c (emit_move_resolve_push): Treat the input and result
19759         of PUSH_ROUNDING as a poly_int64.
19760         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
19761         (emit_push_insn): Likewise.
19762         * lra-eliminations.c (mark_not_eliminable): Likewise.
19763         * recog.c (push_operand): Likewise.
19764         * reload1.c (elimination_effects): Likewise.
19765         * rtlanal.c (nonzero_bits1): Likewise.
19766         * calls.c (store_one_arg): Likewise.  Require the padding to be
19767         known at compile time.
19769 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19770             Alan Hayward  <alan.hayward@arm.com>
19771             David Sherwood  <david.sherwood@arm.com>
19773         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
19774         Use plus_constant instead of gen_rtx_PLUS.
19776 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19777             Alan Hayward  <alan.hayward@arm.com>
19778             David Sherwood  <david.sherwood@arm.com>
19780         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
19781         rather than an int.
19783 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19784             Alan Hayward  <alan.hayward@arm.com>
19785             David Sherwood  <david.sherwood@arm.com>
19787         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
19788         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
19789         via stack temporaries.  Treat the mode size as polynomial too.
19791 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19792             Alan Hayward  <alan.hayward@arm.com>
19793             David Sherwood  <david.sherwood@arm.com>
19795         * expr.c (expand_expr_real_2): When handling conversions involving
19796         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
19797         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
19798         as a poly_uint64 too.
19800 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19801             Alan Hayward  <alan.hayward@arm.com>
19802             David Sherwood  <david.sherwood@arm.com>
19804         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
19806 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19807             Alan Hayward  <alan.hayward@arm.com>
19808             David Sherwood  <david.sherwood@arm.com>
19810         * combine.c (can_change_dest_mode): Handle polynomial
19811         REGMODE_NATURAL_SIZE.
19812         * expmed.c (store_bit_field_1): Likewise.
19813         * expr.c (store_constructor): Likewise.
19814         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
19815         and polynomial REGMODE_NATURAL_SIZE.
19816         (gen_lowpart_common): Likewise.
19817         * reginfo.c (record_subregs_of_mode): Likewise.
19818         * rtlanal.c (read_modify_subreg_p): Likewise.
19820 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19821             Alan Hayward  <alan.hayward@arm.com>
19822             David Sherwood  <david.sherwood@arm.com>
19824         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
19825         numbers of elements.
19827 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19828             Alan Hayward  <alan.hayward@arm.com>
19829             David Sherwood  <david.sherwood@arm.com>
19831         * match.pd: Cope with polynomial numbers of vector elements.
19833 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19834             Alan Hayward  <alan.hayward@arm.com>
19835             David Sherwood  <david.sherwood@arm.com>
19837         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
19838         in a POINTER_PLUS_EXPR.
19840 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19841             Alan Hayward  <alan.hayward@arm.com>
19842             David Sherwood  <david.sherwood@arm.com>
19844         * omp-simd-clone.c (simd_clone_subparts): New function.
19845         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
19846         (ipa_simd_modify_function_body): Likewise.
19848 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19849             Alan Hayward  <alan.hayward@arm.com>
19850             David Sherwood  <david.sherwood@arm.com>
19852         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
19853         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
19854         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
19855         (expand_vector_condition, vector_element): Likewise.
19856         (subparts_gt): New function.
19857         (get_compute_type): Use subparts_gt.
19858         (count_type_subparts): Delete.
19859         (expand_vector_operations_1): Use subparts_gt instead of
19860         count_type_subparts.
19862 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19863             Alan Hayward  <alan.hayward@arm.com>
19864             David Sherwood  <david.sherwood@arm.com>
19866         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
19867         (vect_compile_time_alias): ...this new function.  Do the calculation
19868         on poly_ints rather than trees.
19869         (vect_prune_runtime_alias_test_list): Update call accordingly.
19871 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19872             Alan Hayward  <alan.hayward@arm.com>
19873             David Sherwood  <david.sherwood@arm.com>
19875         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
19876         numbers of units.
19877         (vect_schedule_slp_instance): Likewise.
19879 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19880             Alan Hayward  <alan.hayward@arm.com>
19881             David Sherwood  <david.sherwood@arm.com>
19883         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
19884         constant and extern definitions for variable-length vectors.
19885         (vect_get_constant_vectors): Note that the number of units
19886         is known to be constant.
19888 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19889             Alan Hayward  <alan.hayward@arm.com>
19890             David Sherwood  <david.sherwood@arm.com>
19892         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
19893         of units as polynomial.  Choose between WIDE and NARROW based
19894         on multiple_p.
19896 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19897             Alan Hayward  <alan.hayward@arm.com>
19898             David Sherwood  <david.sherwood@arm.com>
19900         * tree-vect-stmts.c (simd_clone_subparts): New function.
19901         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
19903 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19904             Alan Hayward  <alan.hayward@arm.com>
19905             David Sherwood  <david.sherwood@arm.com>
19907         * tree-vect-stmts.c (vectorizable_call): Treat the number of
19908         vectors as polynomial.  Use build_index_vector for
19909         IFN_GOMP_SIMD_LANE.
19911 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19912             Alan Hayward  <alan.hayward@arm.com>
19913             David Sherwood  <david.sherwood@arm.com>
19915         * tree-vect-stmts.c (get_load_store_type): Treat the number of
19916         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
19917         for variable-length vectors.
19918         (vectorizable_mask_load_store): Treat the number of units as
19919         polynomial, asserting that it is constant if the condition has
19920         already been enforced.
19921         (vectorizable_store, vectorizable_load): Likewise.
19923 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19924             Alan Hayward  <alan.hayward@arm.com>
19925             David Sherwood  <david.sherwood@arm.com>
19927         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
19928         of units as polynomial.  Punt if we can't tell at compile time
19929         which vector contains the final result.
19931 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19932             Alan Hayward  <alan.hayward@arm.com>
19933             David Sherwood  <david.sherwood@arm.com>
19935         * tree-vect-loop.c (vectorizable_induction): Treat the number
19936         of units as polynomial.  Punt on SLP inductions.  Use an integer
19937         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
19938         cast of such a series for variable-length floating-point
19939         reductions.
19941 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19942             Alan Hayward  <alan.hayward@arm.com>
19943             David Sherwood  <david.sherwood@arm.com>
19945         * tree.h (build_index_vector): Declare.
19946         * tree.c (build_index_vector): New function.
19947         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
19948         of units as polynomial, forcibly converting it to a constant if
19949         vectorizable_reduction has already enforced the condition.
19950         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
19951         to create a {1,2,3,...} vector.
19952         (vectorizable_reduction): Treat the number of units as polynomial.
19953         Choose vectype_in based on the largest scalar element size rather
19954         than the smallest number of units.  Enforce the restrictions
19955         relied on above.
19957 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19958             Alan Hayward  <alan.hayward@arm.com>
19959             David Sherwood  <david.sherwood@arm.com>
19961         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
19962         number of units as polynomial.
19964 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19965             Alan Hayward  <alan.hayward@arm.com>
19966             David Sherwood  <david.sherwood@arm.com>
19968         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
19969         * target.def (autovectorize_vector_sizes): Return the vector sizes
19970         by pointer, using vector_sizes rather than a bitmask.
19971         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
19972         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
19973         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
19974         Likewise.
19975         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
19976         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
19977         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
19978         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
19979         * omp-general.c (omp_max_vf): Likewise.
19980         * omp-low.c (omp_clause_aligned_alignment): Likewise.
19981         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
19982         * tree-vect-loop.c (vect_analyze_loop): Likewise.
19983         * tree-vect-slp.c (vect_slp_bb): Likewise.
19984         * doc/tm.texi: Regenerate.
19985         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
19986         to a poly_uint64.
19987         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
19988         the vector size as a poly_uint64 rather than an unsigned int.
19989         (current_vector_size): Change from an unsigned int to a poly_uint64.
19990         (get_vectype_for_scalar_type): Update accordingly.
19991         * tree.h (build_truth_vector_type): Take the size and number of
19992         units as a poly_uint64 rather than an unsigned int.
19993         (build_vector_type): Add a temporary overload that takes
19994         the number of units as a poly_uint64 rather than an unsigned int.
19995         * tree.c (make_vector_type): Likewise.
19996         (build_truth_vector_type): Take the number of units as a poly_uint64
19997         rather than an unsigned int.
19999 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20000             Alan Hayward  <alan.hayward@arm.com>
20001             David Sherwood  <david.sherwood@arm.com>
20003         * target.def (get_mask_mode): Take the number of units and length
20004         as poly_uint64s rather than unsigned ints.
20005         * targhooks.h (default_get_mask_mode): Update accordingly.
20006         * targhooks.c (default_get_mask_mode): Likewise.
20007         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
20008         * doc/tm.texi: Regenerate.
20010 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20011             Alan Hayward  <alan.hayward@arm.com>
20012             David Sherwood  <david.sherwood@arm.com>
20014         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
20015         * omp-general.c (omp_max_vf): Likewise.
20016         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
20017         (expand_omp_simd): Handle polynomial safelen.
20018         * omp-low.c (omplow_simd_context): Add a default constructor.
20019         (omplow_simd_context::max_vf): Change from int to poly_uint64.
20020         (lower_rec_simd_input_clauses): Update accordingly.
20021         (lower_rec_input_clauses): Likewise.
20023 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20024             Alan Hayward  <alan.hayward@arm.com>
20025             David Sherwood  <david.sherwood@arm.com>
20027         * tree-vectorizer.h (vect_nunits_for_cost): New function.
20028         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
20029         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
20030         (vect_analyze_slp_cost): Likewise.
20031         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
20032         (vect_model_load_cost): Likewise.
20034 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20035             Alan Hayward  <alan.hayward@arm.com>
20036             David Sherwood  <david.sherwood@arm.com>
20038         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
20039         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
20040         from an unsigned int * to a poly_uint64_pod *.
20041         (calculate_unrolling_factor): New function.
20042         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
20044 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20045             Alan Hayward  <alan.hayward@arm.com>
20046             David Sherwood  <david.sherwood@arm.com>
20048         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
20049         from an unsigned int to a poly_uint64.
20050         (_loop_vec_info::slp_unrolling_factor): Likewise.
20051         (_loop_vec_info::vectorization_factor): Change from an int
20052         to a poly_uint64.
20053         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
20054         (vect_get_num_vectors): New function.
20055         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
20056         (vect_get_num_copies): Use vect_get_num_vectors.
20057         (vect_analyze_data_ref_dependences): Change max_vf from an int *
20058         to an unsigned int *.
20059         (vect_analyze_data_refs): Change min_vf from an int * to a
20060         poly_uint64 *.
20061         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20062         than an unsigned HOST_WIDE_INT.
20063         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
20064         (vect_analyze_data_ref_dependence): Change max_vf from an int *
20065         to an unsigned int *.
20066         (vect_analyze_data_ref_dependences): Likewise.
20067         (vect_compute_data_ref_alignment): Handle polynomial vf.
20068         (vect_enhance_data_refs_alignment): Likewise.
20069         (vect_prune_runtime_alias_test_list): Likewise.
20070         (vect_shift_permute_load_chain): Likewise.
20071         (vect_supportable_dr_alignment): Likewise.
20072         (dependence_distance_ge_vf): Take the vectorization factor as a
20073         poly_uint64 rather than an unsigned HOST_WIDE_INT.
20074         (vect_analyze_data_refs): Change min_vf from an int * to a
20075         poly_uint64 *.
20076         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
20077         vfm1 as a poly_uint64 rather than an int.  Make the same change
20078         for the returned bound_scalar.
20079         (vect_gen_vector_loop_niters): Handle polynomial vf.
20080         (vect_do_peeling): Likewise.  Update call to
20081         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
20082         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
20083         be constant.
20084         * tree-vect-loop.c (vect_determine_vectorization_factor)
20085         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
20086         (vect_get_known_peeling_cost): Likewise.
20087         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
20088         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
20089         (vect_transform_loop): Likewise.  Use the lowest possible VF when
20090         updating the upper bounds of the loop.
20091         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
20092         rather than an int.
20093         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
20094         polynomial unroll factors.
20095         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
20096         (vect_make_slp_decision): Likewise.
20097         (vect_supported_load_permutation_p): Likewise, and polynomial
20098         vf too.
20099         (vect_analyze_slp_cost): Handle polynomial vf.
20100         (vect_slp_analyze_node_operations): Likewise.
20101         (vect_slp_analyze_bb_1): Likewise.
20102         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20103         than an unsigned HOST_WIDE_INT.
20104         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
20105         (vectorizable_load): Handle polynomial vf.
20106         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
20107         a poly_uint64.
20108         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
20110 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20111             Alan Hayward  <alan.hayward@arm.com>
20112             David Sherwood  <david.sherwood@arm.com>
20114         * match.pd: Handle bit operations involving three constants
20115         and try to fold one pair.
20117 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20119         * tree-vect-loop-manip.c: Include gimple-fold.h.
20120         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
20121         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
20122         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
20123         Add a path that uses a step of VF instead of 1, but disable it
20124         for now.
20125         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
20126         and niters_no_overflow parameters.  Update calls to
20127         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
20128         Create a new SSA name if the latter choses to use a ste other
20129         than zero, and return it via niters_vector_mult_vf_var.
20130         * tree-vect-loop.c (vect_transform_loop): Update calls to
20131         vect_do_peeling, vect_gen_vector_loop_niters and
20132         slpeel_make_loop_iterate_ntimes.
20133         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
20134         (vect_gen_vector_loop_niters): Update declarations after above changes.
20136 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
20138         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
20139         128-bit round to integer instructions.
20140         (ceil<mode>2): Likewise.
20141         (btrunc<mode>2): Likewise.
20142         (round<mode>2): Likewise.
20144 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20146         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
20147         unaligned VSX load/store on P8/P9.
20148         (expand_block_clear): Allow the use of unaligned VSX
20149         load/store on P8/P9.
20151 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20153         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
20154         New function.
20155         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
20156         swap associated with both a load and a store.
20158 2018-01-02  Andrew Waterman  <andrew@sifive.com>
20160         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
20161         * config/riscv/riscv.md (clear_cache): Use it.
20163 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
20165         * web.c: Remove out-of-date comment.
20167 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20169         * expr.c (fixup_args_size_notes): Check that any existing
20170         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
20171         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
20172         (emit_single_push_insn): ...here.
20174 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20176         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
20177         (const_vector_encoded_nelts): New function.
20178         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
20179         (const_vector_int_elt, const_vector_elt): Declare.
20180         * emit-rtl.c (const_vector_int_elt_1): New function.
20181         (const_vector_elt): Likewise.
20182         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
20183         of CONST_VECTOR_ELT.
20185 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20187         * expr.c: Include rtx-vector-builder.h.
20188         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
20189         directly on the tree encoding.
20190         (const_vector_from_tree): Likewise.
20191         * optabs.c: Include rtx-vector-builder.h.
20192         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
20193         sequence of "u" values.
20194         * vec-perm-indices.c: Include rtx-vector-builder.h.
20195         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
20196         directly on the vec_perm_indices encoding.
20198 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20200         * doc/rtl.texi (const_vector): Describe new encoding scheme.
20201         * Makefile.in (OBJS): Add rtx-vector-builder.o.
20202         * rtx-vector-builder.h: New file.
20203         * rtx-vector-builder.c: Likewise.
20204         * rtl.h (rtx_def::u2): Add a const_vector field.
20205         (CONST_VECTOR_NPATTERNS): New macro.
20206         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
20207         (CONST_VECTOR_DUPLICATE_P): Likewise.
20208         (CONST_VECTOR_STEPPED_P): Likewise.
20209         (CONST_VECTOR_ENCODED_ELT): Likewise.
20210         (const_vec_duplicate_p): Check for a duplicated vector encoding.
20211         (unwrap_const_vec_duplicate): Likewise.
20212         (const_vec_series_p): Check for a non-duplicated vector encoding.
20213         Say that the function only returns true for integer vectors.
20214         * emit-rtl.c: Include rtx-vector-builder.h.
20215         (gen_const_vec_duplicate_1): Delete.
20216         (gen_const_vector): Call gen_const_vec_duplicate instead of
20217         gen_const_vec_duplicate_1.
20218         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
20219         (gen_const_vec_duplicate): Use rtx_vector_builder.
20220         (gen_const_vec_series): Likewise.
20221         (gen_rtx_CONST_VECTOR): Likewise.
20222         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
20223         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20224         Build a new vector rather than modifying a CONST_VECTOR in-place.
20225         (handle_special_swappables): Update call accordingly.
20226         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
20227         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20228         Build a new vector rather than modifying a CONST_VECTOR in-place.
20229         (handle_special_swappables): Update call accordingly.
20231 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20233         * simplify-rtx.c (simplify_const_binary_operation): Use
20234         CONST_VECTOR_ELT instead of XVECEXP.
20236 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20238         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
20239         the selector elements to be different from the data elements
20240         if the selector is a VECTOR_CST.
20241         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
20242         ssizetype for the selector.
20244 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20246         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
20247         before testing each element individually.
20248         * tree-vect-generic.c (lower_vec_perm): Likewise.
20250 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20252         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
20253         * selftest-run-tests.c (selftest::run_tests): Call it.
20254         * vector-builder.h (vector_builder::operator ==): New function.
20255         (vector_builder::operator !=): Likewise.
20256         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
20257         (vec_perm_indices::all_from_input_p): New function.
20258         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
20259         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
20260         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
20261         instead of reading the VECTOR_CST directly.  Detect whether both
20262         vector inputs are the same before constructing the vec_perm_indices,
20263         and update the number of inputs argument accordingly.  Use the
20264         utility functions added above.  Only construct sel2 if we need to.
20266 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20268         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
20269         the broadcast of the low byte.
20270         (expand_mult_highpart): Use an explicit encoding for the permutes.
20271         * optabs-query.c (can_mult_highpart_p): Likewise.
20272         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
20273         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20274         (vectorizable_bswap): Likewise.
20275         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
20276         explicit encoding for the power-of-2 permutes.
20277         (vect_permute_store_chain): Likewise.
20278         (vect_grouped_load_supported): Likewise.
20279         (vect_permute_load_chain): Likewise.
20281 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20283         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
20284         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
20285         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
20286         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
20287         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
20288         (vect_gen_perm_mask_any): Likewise.
20290 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20292         * int-vector-builder.h: New file.
20293         * vec-perm-indices.h: Include int-vector-builder.h.
20294         (vec_perm_indices): Redefine as an int_vector_builder.
20295         (auto_vec_perm_indices): Delete.
20296         (vec_perm_builder): Redefine as a stand-alone class.
20297         (vec_perm_indices::vec_perm_indices): New function.
20298         (vec_perm_indices::clamp): Likewise.
20299         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
20300         (vec_perm_indices::new_vector): New function.
20301         (vec_perm_indices::new_expanded_vector): Update for new
20302         vec_perm_indices class.
20303         (vec_perm_indices::rotate_inputs): New function.
20304         (vec_perm_indices::all_in_range_p): Operate directly on the
20305         encoded form, without computing elided elements.
20306         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
20307         encoding.  Update for new vec_perm_indices class.
20308         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
20309         the given vec_perm_builder.
20310         (expand_vec_perm_var): Update vec_perm_builder constructor.
20311         (expand_mult_highpart): Use vec_perm_builder instead of
20312         auto_vec_perm_indices.
20313         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
20314         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
20315         or double series encoding as appropriate.
20316         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
20317         vec_perm_indices instead of auto_vec_perm_indices.
20318         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20319         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20320         (vect_permute_store_chain): Likewise.
20321         (vect_grouped_load_supported): Likewise.
20322         (vect_permute_load_chain): Likewise.
20323         (vect_shift_permute_load_chain): Likewise.
20324         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20325         (vect_transform_slp_perm_load): Likewise.
20326         (vect_schedule_slp_instance): Likewise.
20327         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20328         (vectorizable_mask_load_store): Likewise.
20329         (vectorizable_bswap): Likewise.
20330         (vectorizable_store): Likewise.
20331         (vectorizable_load): Likewise.
20332         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
20333         vec_perm_indices instead of auto_vec_perm_indices.  Use
20334         tree_to_vec_perm_builder to read the vector from a tree.
20335         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
20336         vec_perm_builder instead of a vec_perm_indices.
20337         (have_whole_vector_shift): Use vec_perm_builder and
20338         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
20339         truncation to calc_vec_perm_mask_for_shift.
20340         (vect_create_epilog_for_reduction): Likewise.
20341         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
20342         from auto_vec_perm_indices to vec_perm_indices.
20343         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
20344         instead of changing individual elements.
20345         (aarch64_vectorize_vec_perm_const): Use new_vector to install
20346         the vector in d.perm.
20347         * config/arm/arm.c (expand_vec_perm_d::perm): Change
20348         from auto_vec_perm_indices to vec_perm_indices.
20349         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
20350         instead of changing individual elements.
20351         (arm_vectorize_vec_perm_const): Use new_vector to install
20352         the vector in d.perm.
20353         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
20354         Update vec_perm_builder constructor.
20355         (rs6000_expand_interleave): Likewise.
20356         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
20357         (rs6000_expand_interleave): Likewise.
20359 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20361         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
20362         to qimode could truncate the indices.
20363         * optabs.c (expand_vec_perm_var): Likewise.
20365 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20367         * Makefile.in (OBJS): Add vec-perm-indices.o.
20368         * vec-perm-indices.h: New file.
20369         * vec-perm-indices.c: Likewise.
20370         * target.h (vec_perm_indices): Replace with a forward class
20371         declaration.
20372         (auto_vec_perm_indices): Move to vec-perm-indices.h.
20373         * optabs.h: Include vec-perm-indices.h.
20374         (expand_vec_perm): Delete.
20375         (selector_fits_mode_p, expand_vec_perm_var): Declare.
20376         (expand_vec_perm_const): Declare.
20377         * target.def (vec_perm_const_ok): Replace with...
20378         (vec_perm_const): ...this new hook.
20379         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
20380         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
20381         * doc/tm.texi: Regenerate.
20382         * optabs.def (vec_perm_const): Delete.
20383         * doc/md.texi (vec_perm_const): Likewise.
20384         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
20385         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
20386         expand_vec_perm for constant permutation vectors.  Assert that
20387         the mode of variable permutation vectors is the integer equivalent
20388         of the mode that is being permuted.
20389         * optabs-query.h (selector_fits_mode_p): Declare.
20390         * optabs-query.c: Include vec-perm-indices.h.
20391         (selector_fits_mode_p): New function.
20392         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
20393         is defined, instead of checking whether the vec_perm_const_optab
20394         exists.  Use targetm.vectorize.vec_perm_const instead of
20395         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
20396         fit in the vector mode before using a variable permute.
20397         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
20398         vec_perm_indices instead of an rtx.
20399         (expand_vec_perm): Replace with...
20400         (expand_vec_perm_const): ...this new function.  Take the selector
20401         as a vec_perm_indices rather than an rtx.  Also take the mode of
20402         the selector.  Update call to shift_amt_for_vec_perm_mask.
20403         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
20404         Use vec_perm_indices::new_expanded_vector to expand the original
20405         selector into bytes.  Check whether the indices fit in the vector
20406         mode before using a variable permute.
20407         (expand_vec_perm_var): Make global.
20408         (expand_mult_highpart): Use expand_vec_perm_const.
20409         * fold-const.c: Includes vec-perm-indices.h.
20410         * tree-ssa-forwprop.c: Likewise.
20411         * tree-vect-data-refs.c: Likewise.
20412         * tree-vect-generic.c: Likewise.
20413         * tree-vect-loop.c: Likewise.
20414         * tree-vect-slp.c: Likewise.
20415         * tree-vect-stmts.c: Likewise.
20416         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
20417         Delete.
20418         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
20419         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
20420         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
20421         (aarch64_vectorize_vec_perm_const): ...this new function.
20422         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20423         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20424         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
20425         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
20426         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20427         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20428         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
20429         into...
20430         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
20431         check for NEON modes.
20432         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
20433         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
20434         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
20435         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
20436         into...
20437         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
20438         the old VEC_PERM_CONST conditions.
20439         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
20440         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
20441         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
20442         (ia64_vectorize_vec_perm_const_ok): Merge into...
20443         (ia64_vectorize_vec_perm_const): ...this new function.
20444         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
20445         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
20446         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
20447         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
20448         * config/mips/mips.c (mips_expand_vec_perm_const)
20449         (mips_vectorize_vec_perm_const_ok): Merge into...
20450         (mips_vectorize_vec_perm_const): ...this new function.
20451         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
20452         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
20453         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
20454         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
20455         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
20456         (rs6000_expand_vec_perm_const): Delete.
20457         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
20458         Delete.
20459         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20460         (altivec_expand_vec_perm_const_le): Take each operand individually.
20461         Operate on constant selectors rather than rtxes.
20462         (altivec_expand_vec_perm_const): Likewise.  Update call to
20463         altivec_expand_vec_perm_const_le.
20464         (rs6000_expand_vec_perm_const): Delete.
20465         (rs6000_vectorize_vec_perm_const_ok): Delete.
20466         (rs6000_vectorize_vec_perm_const): New function.
20467         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
20468         an element count and rtx array.
20469         (rs6000_expand_extract_even): Update call accordingly.
20470         (rs6000_expand_interleave): Likewise.
20471         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
20472         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
20473         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
20474         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
20475         (rs6000_expand_vec_perm_const): Delete.
20476         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20477         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20478         (altivec_expand_vec_perm_const_le): Take each operand individually.
20479         Operate on constant selectors rather than rtxes.
20480         (altivec_expand_vec_perm_const): Likewise.  Update call to
20481         altivec_expand_vec_perm_const_le.
20482         (rs6000_expand_vec_perm_const): Delete.
20483         (rs6000_vectorize_vec_perm_const_ok): Delete.
20484         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
20485         reference to the SPE evmerge intructions.
20486         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
20487         an element count and rtx array.
20488         (rs6000_expand_extract_even): Update call accordingly.
20489         (rs6000_expand_interleave): Likewise.
20490         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
20491         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
20492         new function.
20493         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20495 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20497         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
20498         vector mode and that that mode matches the mode of the data
20499         being permuted.
20500         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
20501         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
20502         directly using expand_vec_perm_1 when forcing selectors into
20503         registers.
20504         (expand_vec_perm_var): New function, split out from expand_vec_perm.
20506 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20508         * optabs-query.h (can_vec_perm_p): Delete.
20509         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
20510         * optabs-query.c (can_vec_perm_p): Split into...
20511         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
20512         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
20513         particular selector is valid.
20514         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20515         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20516         (vect_grouped_load_supported): Likewise.
20517         (vect_shift_permute_load_chain): Likewise.
20518         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20519         (vect_transform_slp_perm_load): Likewise.
20520         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20521         (vectorizable_bswap): Likewise.
20522         (vect_gen_perm_mask_checked): Likewise.
20523         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
20524         implementations of variable permutation vectors into account
20525         when deciding which selector to use.
20526         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
20527         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
20528         with a false third argument.
20529         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
20530         to test whether the constant selector is valid and can_vec_perm_var_p
20531         to test whether a variable selector is valid.
20533 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20535         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
20536         * optabs-query.c (can_vec_perm_p): Likewise.
20537         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
20538         instead of vec_perm_indices.
20539         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
20540         (vect_gen_perm_mask_checked): Likewise,
20541         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
20542         (vect_gen_perm_mask_checked): Likewise,
20544 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20546         * optabs-query.h (qimode_for_vec_perm): Declare.
20547         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
20548         (qimode_for_vec_perm): ...this new function.
20549         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
20551 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20553         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
20554         does not have a conditional at the top.
20556 2018-01-02  Richard Biener  <rguenther@suse.de>
20558         * ipa-inline.c (big_speedup_p): Fix expression.
20560 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
20562         PR target/81616
20563         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
20564         for generic 4->6.
20566 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
20568         PR target/81616
20569         Generic tuning.
20570         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
20571         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
20572         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
20573         cond_taken_branch_cost 3->4.
20575 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
20577         PR tree-optimization/83581
20578         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
20579         TODO_cleanup_cfg if any changes have been made.
20581         PR middle-end/83608
20582         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
20583         convert_modes if target mode has the right side, but different mode
20584         class.
20586         PR middle-end/83609
20587         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
20588         last argument when extracting from CONCAT.  If either from_real or
20589         from_imag is NULL, use expansion through memory.  If result is not
20590         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
20591         the parts directly to inner mode, if even that fails, use expansion
20592         through memory.
20594         PR middle-end/83623
20595         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
20596         check for bswap in mode rather than HImode and use that in expand_unop
20597         too.
20599 Copyright (C) 2018 Free Software Foundation, Inc.
20601 Copying and distribution of this file, with or without modification,
20602 are permitted in any medium without royalty provided the copyright
20603 notice and this notice are preserved.