poly_int: C++ bitfield regions
[official-gcc.git] / gcc / ChangeLog
blobe4f5430f3969cb2247a348f95a38d132cbe205a4
1 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
2             Alan Hayward  <alan.hayward@arm.com>
3             David Sherwood  <david.sherwood@arm.com>
5         * expmed.h (store_bit_field): Change bitregion_start and
6         bitregion_end from unsigned HOST_WIDE_INT to poly_uint64.
7         * expmed.c (adjust_bit_field_mem_for_reg, strict_volatile_bitfield_p)
8         (store_bit_field_1, store_integral_bit_field, store_bit_field)
9         (store_fixed_bit_field, store_split_bit_field): Likewise.
10         * expr.c (store_constructor_field, store_field): Likewise.
11         (optimize_bitfield_assignment_op): Likewise.  Make the same change
12         to bitsize and bitpos.
13         * machmode.h (bit_field_mode_iterator): Change m_bitregion_start
14         and m_bitregion_end from HOST_WIDE_INT to poly_int64.  Make the
15         same change in the constructor arguments.
16         (get_best_mode): Change bitregion_start and bitregion_end from
17         unsigned HOST_WIDE_INT to poly_uint64.
18         * stor-layout.c (bit_field_mode_iterator::bit_field_mode_iterator):
19         Change bitregion_start and bitregion_end from HOST_WIDE_INT to
20         poly_int64.
21         (bit_field_mode_iterator::next_mode): Update for new types
22         of m_bitregion_start and m_bitregion_end.
23         (get_best_mode): Change bitregion_start and bitregion_end from
24         unsigned HOST_WIDE_INT to poly_uint64.
26 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
27             Alan Hayward  <alan.hayward@arm.com>
28             David Sherwood  <david.sherwood@arm.com>
30         * rtl.h (simplify_gen_subreg): Add a temporary overload that
31         accepts poly_uint64 offsets.
32         * expmed.h (extract_bit_field): Take bitsize and bitnum as
33         poly_uint64s rather than unsigned HOST_WIDE_INTs.
34         * expmed.c (lowpart_bit_field_p): Likewise.
35         (extract_bit_field_as_subreg): New function, split out from...
36         (extract_bit_field_1): ...here.  Take bitsize and bitnum as
37         poly_uint64s rather than unsigned HOST_WIDE_INTs.  For vector
38         extractions, check that BITSIZE matches the size of the extracted
39         value and that BITNUM is an exact multiple of that size.
40         If all else fails, try forcing the value into memory if
41         BITNUM is variable, and adjusting the address so that the
42         offset is constant.  Split the part that can only handle constant
43         bitsize and bitnum out into...
44         (extract_integral_bit_field): ...this new function.
45         (extract_bit_field): Take bitsize and bitnum as poly_uint64s
46         rather than unsigned HOST_WIDE_INTs.
48 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
49             Alan Hayward  <alan.hayward@arm.com>
50             David Sherwood  <david.sherwood@arm.com>
52         * expmed.h (store_bit_field): Take bitsize and bitnum as
53         poly_uint64s rather than unsigned HOST_WIDE_INTs.
54         * expmed.c (simple_mem_bitfield_p): Likewise.  Add a parameter
55         that returns the byte size.
56         (store_bit_field_1): Take bitsize and bitnum as
57         poly_uint64s rather than unsigned HOST_WIDE_INTs.  Update call
58         to simple_mem_bitfield_p.  Split the part that can only handle
59         constant bitsize and bitnum out into...
60         (store_integral_bit_field): ...this new function.
61         (store_bit_field): Take bitsize and bitnum as poly_uint64s rather
62         than unsigned HOST_WIDE_INTs.
63         (extract_bit_field_1): Update call to simple_mem_bitfield_p.
65 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
66             Alan Hayward  <alan.hayward@arm.com>
67             David Sherwood  <david.sherwood@arm.com>
69         * lra-int.h (lra_reg): Change offset from int to poly_int64.
70         (lra_insn_recog_data): Change sp_offset from HOST_WIDE_INT
71         to poly_int64.
72         (lra_eliminate_regs_1, eliminate_regs_in_insn): Change
73         update_sp_offset from a HOST_WIDE_INT to a poly_int64.
74         (lra_update_reg_val_offset, lra_reg_val_equal_p): Take the
75         offset as a poly_int64 rather than an int.
76         * lra-assigns.c (find_hard_regno_for_1): Handle poly_int64 offsets.
77         (setup_live_pseudos_and_spill_after_risky_transforms): Likewise.
78         * lra-constraints.c (equiv_address_substitution): Track offsets
79         as poly_int64s.
80         (emit_inc): Check poly_int_rtx_p instead of CONST_INT_P.
81         (curr_insn_transform): Handle the new form of sp_offset.
82         * lra-eliminations.c (lra_elim_table): Change previous_offset
83         and offset from HOST_WIDE_INT to poly_int64.
84         (print_elim_table, update_reg_eliminate): Update accordingly.
85         (self_elim_offsets): Change from HOST_WIDE_INT to poly_int64_pod.
86         (get_elimination): Update accordingly.
87         (form_sum): Check poly_int_rtx_p instead of CONST_INT_P.
88         (lra_eliminate_regs_1, eliminate_regs_in_insn): Change
89         update_sp_offset from a HOST_WIDE_INT to a poly_int64.  Handle
90         poly_int64 offsets generally.
91         (curr_sp_change): Change from HOST_WIDE_INT to poly_int64.
92         (mark_not_eliminable, init_elimination): Update accordingly.
93         (remove_reg_equal_offset_note): Return a bool and pass the new
94         offset back by pointer as a poly_int64.
95         * lra-remat.c (change_sp_offset): Take sp_offset as a poly_int64
96         rather than a HOST_WIDE_INT.
97         (do_remat): Track offsets poly_int64s.
98         * lra.c (lra_update_insn_recog_data, setup_sp_offset): Likewise.
100 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
101             Alan Hayward  <alan.hayward@arm.com>
102             David Sherwood  <david.sherwood@arm.com>
104         * rtl.h (mem_attrs): Add a default constructor.  Change size and
105         offset from HOST_WIDE_INT to poly_int64.
106         * emit-rtl.h (set_mem_offset, set_mem_size, adjust_address_1)
107         (adjust_automodify_address_1, set_mem_attributes_minus_bitpos)
108         (widen_memory_access): Take the sizes and offsets as poly_int64s
109         rather than HOST_WIDE_INTs.
110         * alias.c (ao_ref_from_mem): Handle the new form of MEM_OFFSET.
111         (offset_overlap_p): Take poly_int64s rather than HOST_WIDE_INTs
112         and ints.
113         (adjust_offset_for_component_ref): Change the offset from a
114         HOST_WIDE_INT to a poly_int64.
115         (nonoverlapping_memrefs_p): Track polynomial offsets and sizes.
116         * cfgcleanup.c (merge_memattrs): Update after mem_attrs changes.
117         * dce.c (find_call_stack_args): Likewise.
118         * dse.c (record_store): Likewise.
119         * dwarf2out.c (tls_mem_loc_descriptor, dw_sra_loc_expr): Likewise.
120         * print-rtl.c (rtx_writer::print_rtx): Likewise.
121         * read-rtl-function.c (test_loading_mem): Likewise.
122         * rtlanal.c (may_trap_p_1): Likewise.
123         * simplify-rtx.c (delegitimize_mem_from_attrs): Likewise.
124         * var-tracking.c (int_mem_offset, track_expr_p): Likewise.
125         * emit-rtl.c (mem_attrs_eq_p, get_mem_align_offset): Likewise.
126         (mem_attrs::mem_attrs): New function.
127         (set_mem_attributes_minus_bitpos): Change bitpos from a
128         HOST_WIDE_INT to poly_int64.
129         (set_mem_alias_set, set_mem_addr_space, set_mem_align, set_mem_expr)
130         (clear_mem_offset, clear_mem_size, change_address)
131         (get_spill_slot_decl, set_mem_attrs_for_spill): Directly
132         initialize mem_attrs.
133         (set_mem_offset, set_mem_size, adjust_address_1)
134         (adjust_automodify_address_1, offset_address, widen_memory_access):
135         Likewise.  Take poly_int64s rather than HOST_WIDE_INT.
137 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
138             Alan Hayward  <alan.hayward@arm.com>
139             David Sherwood  <david.sherwood@arm.com>
141         * rtlanal.c (rtx_addr_can_trap_p_1): Take the offset and size
142         as poly_int64s rather than HOST_WIDE_INTs.  Use a size of -1
143         rather than 0 to represent an unknown size.  Assert that the size
144         is known when the mode isn't BLKmode.
145         (may_trap_p_1): Use -1 for unknown sizes.
146         (rtx_addr_can_trap_p): Likewise.  Pass BLKmode rather than VOIDmode.
148 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
149             Alan Hayward  <alan.hayward@arm.com>
150             David Sherwood  <david.sherwood@arm.com>
152         * dse.c (store_info): Change offset and width from HOST_WIDE_INT
153         to poly_int64.  Update commentary for positions_needed.large.
154         (read_info_type): Change offset and width from HOST_WIDE_INT
155         to poly_int64.
156         (set_usage_bits): Likewise.
157         (canon_address): Return the offset as a poly_int64 rather than
158         a HOST_WIDE_INT.  Use strip_offset_and_add.
159         (set_all_positions_unneeded, any_positions_needed_p): Use
160         positions_needed.large to track stores with non-constant widths.
161         (all_positions_needed_p): Likewise.  Take the offset and width
162         as poly_int64s rather than ints.  Assert that rhs is nonnull.
163         (record_store): Cope with non-constant offsets and widths.
164         Nullify the rhs of an earlier store if we can't tell which bytes
165         of it are needed.
166         (find_shift_sequence): Take the access_size and shift as poly_int64s
167         rather than ints.
168         (get_stored_val): Take the read_offset and read_width as poly_int64s
169         rather than HOST_WIDE_INTs.
170         (check_mem_read_rtx, scan_stores, scan_reads, dse_step5): Handle
171         non-constant offsets and widths.
173 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
174             Alan Hayward  <alan.hayward@arm.com>
175             David Sherwood  <david.sherwood@arm.com>
177         * inchash.h (inchash::hash::add_poly_int): New function.
178         * tree-ssa-alias.h (ao_ref::offset, ao_ref::size, ao_ref::max_size):
179         Use poly_int64 rather than HOST_WIDE_INT.
180         (ao_ref::max_size_known_p): New function.
181         * tree-ssa-sccvn.h (vn_reference_op_struct::off): Use poly_int64_pod
182         rather than HOST_WIDE_INT.
183         * tree-ssa-alias.c (ao_ref_base): Apply get_ref_base_and_extent
184         to temporaries until its interface is adjusted to match.
185         (ao_ref_init_from_ptr_and_size): Handle polynomial offsets and sizes.
186         (aliasing_component_refs_p, decl_refs_may_alias_p)
187         (indirect_ref_may_alias_decl_p, indirect_refs_may_alias_p): Take
188         the offsets and max_sizes as poly_int64s instead of HOST_WIDE_INTs.
189         (refs_may_alias_p_1, stmt_kills_ref_p): Adjust for changes to
190         ao_ref fields.
191         * alias.c (ao_ref_from_mem): Likewise.
192         * tree-ssa-dce.c (mark_aliased_reaching_defs_necessary_1): Likewise.
193         * tree-ssa-dse.c (valid_ao_ref_for_dse, normalize_ref)
194         (clear_bytes_written_by, setup_live_bytes_from_ref, compute_trims)
195         (maybe_trim_complex_store, maybe_trim_constructor_store)
196         (live_bytes_read, dse_classify_store): Likewise.
197         * tree-ssa-sccvn.c (vn_reference_compute_hash, vn_reference_eq):
198         (copy_reference_ops_from_ref, ao_ref_init_from_vn_reference)
199         (fully_constant_vn_reference_p, valueize_refs_1): Likewise.
200         (vn_reference_lookup_3): Likewise.
201         * tree-ssa-uninit.c (warn_uninitialized_vars): Likewise.
203 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
204             Alan Hayward  <alan.hayward@arm.com>
205             David Sherwood  <david.sherwood@arm.com>
207         * tree-ssa-alias.c (indirect_ref_may_alias_decl_p)
208         (indirect_refs_may_alias_p): Use ranges_may_overlap_p
209         instead of ranges_overlap_p.
211 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
212             Alan Hayward  <alan.hayward@arm.com>
213             David Sherwood  <david.sherwood@arm.com>
215         * tree-ssa-alias.c (same_addr_size_stores_p): Take the offsets and
216         sizes as poly_int64s rather than HOST_WIDE_INTs.
218 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
219             Alan Hayward  <alan.hayward@arm.com>
220             David Sherwood  <david.sherwood@arm.com>
222         * gimple-fold.h (fold_ctor_reference): Take the offset and size
223         as poly_uint64 rather than unsigned HOST_WIDE_INT.
224         * gimple-fold.c (fold_ctor_reference): Likewise.
226 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
227             Alan Hayward  <alan.hayward@arm.com>
228             David Sherwood  <david.sherwood@arm.com>
230         * target.def (dwarf_poly_indeterminate_value): New hook.
231         * targhooks.h (default_dwarf_poly_indeterminate_value): Declare.
232         * targhooks.c (default_dwarf_poly_indeterminate_value): New function.
233         * doc/tm.texi.in (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Document.
234         * doc/tm.texi: Regenerate.
235         * dwarf2out.h (build_cfa_loc, build_cfa_aligned_loc): Take the
236         offset as a poly_int64.
237         * dwarf2out.c (new_reg_loc_descr): Move later in file.  Take the
238         offset as a poly_int64.
239         (loc_descr_plus_const, loc_list_plus_const, build_cfa_aligned_loc):
240         Take the offset as a poly_int64.
241         (build_cfa_loc): Likewise.  Use loc_descr_plus_const.
242         (frame_pointer_fb_offset): Change to a poly_int64.
243         (int_loc_descriptor): Take the offset as a poly_int64.  Use
244         targetm.dwarf_poly_indeterminate_value for polynomial offsets.
245         (based_loc_descr): Take the offset as a poly_int64.
246         Use strip_offset_and_add to handle (plus X (const)).
247         Use new_reg_loc_descr instead of an open-coded version of the
248         previous implementation.
249         (mem_loc_descriptor): Handle CONST_POLY_INT.
250         (compute_frame_pointer_to_fb_displacement): Take the offset as a
251         poly_int64.  Use strip_offset_and_add to handle (plus X (const)).
253 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
254             Alan Hayward  <alan.hayward@arm.com>
255             David Sherwood  <david.sherwood@arm.com>
257         * rtl.h (reg_attrs::offset): Change from HOST_WIDE_INT to poly_int64.
258         (gen_rtx_REG_offset): Take the offset as a poly_int64.
259         * inchash.h (inchash::hash::add_poly_hwi): New function.
260         * gengtype.c (main): Register poly_int64.
261         * emit-rtl.c (reg_attr_hasher::hash): Use inchash.  Treat the
262         offset as a poly_int.
263         (reg_attr_hasher::equal): Use must_eq to compare offsets.
264         (get_reg_attrs, update_reg_offset, gen_rtx_REG_offset): Take the
265         offset as a poly_int64.
266         (set_reg_attrs_from_value): Treat the offset as a poly_int64.
267         * print-rtl.c (print_poly_int): New function.
268         (rtx_writer::print_rtx_operand_code_r): Treat REG_OFFSET as
269         a poly_int.
270         * var-tracking.c (track_offset_p, get_tracked_reg_offset): New
271         functions.
272         (var_reg_set, var_reg_delete_and_set, var_reg_delete): Use them.
273         (same_variable_part_p, track_loc_p): Take the offset as a poly_int64.
274         (vt_get_decl_and_offset): Return the offset as a poly_int64.
275         Enforce track_offset_p for parts of a PARALLEL.
276         (vt_add_function_parameter): Use const_offset for the final
277         offset to track.  Use get_tracked_reg_offset for the parts
278         of a PARALLEL.
280 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
281             Alan Hayward  <alan.hayward@arm.com>
282             David Sherwood  <david.sherwood@arm.com>
284         * target.def (truly_noop_truncation): Take poly_uint64s instead of
285         unsigned ints.  Change default to hook_bool_puint64_puint64_true.
286         * doc/tm.texi: Regenerate.
287         * hooks.h (hook_bool_uint_uint_true): Delete.
288         (hook_bool_puint64_puint64_true): Declare.
289         * hooks.c (hook_bool_uint_uint_true): Delete.
290         (hook_bool_puint64_puint64_true): New function.
291         * config/mips/mips.c (mips_truly_noop_truncation): Take poly_uint64s
292         instead of unsigned ints.
293         * config/spu/spu.c (spu_truly_noop_truncation): Likewise.
294         * config/tilegx/tilegx.c (tilegx_truly_noop_truncation): Likewise.
296 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
297             Alan Hayward  <alan.hayward@arm.com>
298             David Sherwood  <david.sherwood@arm.com>
300         * optabs.h (expand_operand): Add an int_value field.
301         (create_expand_operand): Add an int_value parameter and use it
302         to initialize the new expand_operand field.
303         (create_integer_operand): Replace with a declaration of a function
304         that accepts poly_int64s.  Move the implementation to...
305         * optabs.c (create_integer_operand): ...here.
306         (maybe_legitimize_operand): For EXPAND_INTEGER, check whether
307         the mode preserves the value of int_value, instead of calling
308         const_int_operand on the rtx.  Use gen_int_mode to generate
309         the new rtx.
311 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
312             Alan Hayward  <alan.hayward@arm.com>
313             David Sherwood  <david.sherwood@arm.com>
315         * dumpfile.h (dump_dec): Declare.
316         * dumpfile.c (dump_dec): New function.
317         * pretty-print.h (pp_wide_integer): Turn into a function and
318         declare a poly_int version.
319         * pretty-print.c (pp_wide_integer): New function for poly_ints.
321 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
322             Alan Hayward  <alan.hayward@arm.com>
323             David Sherwood  <david.sherwood@arm.com>
325         * doc/generic.texi (POLY_INT_CST): Document.
326         * tree.def (POLY_INT_CST): New tree code.
327         * treestruct.def (TS_POLY_INT_CST): New tree layout.
328         * tree-core.h (tree_poly_int_cst): New struct.
329         (tree_node): Add a poly_int_cst field.
330         * tree.h (POLY_INT_CST_P, POLY_INT_CST_COEFF): New macros.
331         (wide_int_to_tree, force_fit_type): Take a poly_wide_int_ref
332         instead of a wide_int_ref.
333         (build_int_cst, build_int_cst_type): Take a poly_int64 instead
334         of a HOST_WIDE_INT.
335         (build_int_cstu, build_array_type_nelts): Take a poly_uint64
336         instead of an unsigned HOST_WIDE_INT.
337         (build_poly_int_cst, tree_fits_poly_int64_p, tree_fits_poly_uint64_p)
338         (ptrdiff_tree_p): Declare.
339         (tree_to_poly_int64, tree_to_poly_uint64): Likewise.  Provide
340         extern inline implementations if the target doesn't use POLY_INT_CST.
341         (poly_int_tree_p): New function.
342         (wi::unextended_tree): New class.
343         (wi::int_traits <unextended_tree>): New override.
344         (wi::extended_tree): Add a default constructor.
345         (wi::extended_tree::get_tree): New function.
346         (wi::widest_extended_tree, wi::offset_extended_tree): New typedefs.
347         (wi::tree_to_widest_ref, wi::tree_to_offset_ref): Use them.
348         (wi::tree_to_poly_widest_ref, wi::tree_to_poly_offset_ref)
349         (wi::tree_to_poly_wide_ref): New typedefs.
350         (wi::ints_for): Provide overloads for extended_tree and
351         unextended_tree.
352         (poly_int_cst_value, wi::to_poly_widest, wi::to_poly_offset)
353         (wi::to_wide): New functions.
354         (wi::fits_to_boolean_p, wi::fits_to_tree_p): Handle poly_ints.
355         * tree.c (poly_int_cst_hasher): New struct.
356         (poly_int_cst_hash_table): New variable.
357         (tree_node_structure_for_code, tree_code_size, simple_cst_equal)
358         (valid_constant_size_p, add_expr, drop_tree_overflow): Handle
359         POLY_INT_CST.
360         (initialize_tree_contains_struct): Handle TS_POLY_INT_CST.
361         (init_ttree): Initialize poly_int_cst_hash_table.
362         (build_int_cst, build_int_cst_type, build_invariant_address): Take
363         a poly_int64 instead of a HOST_WIDE_INT.
364         (build_int_cstu, build_array_type_nelts): Take a poly_uint64
365         instead of an unsigned HOST_WIDE_INT.
366         (wide_int_to_tree): Rename to...
367         (wide_int_to_tree_1): ...this.
368         (build_new_poly_int_cst, build_poly_int_cst): New functions.
369         (force_fit_type): Take a poly_wide_int_ref instead of a wide_int_ref.
370         (wide_int_to_tree): New function that takes a poly_wide_int_ref.
371         (ptrdiff_tree_p, tree_to_poly_int64, tree_to_poly_uint64)
372         (tree_fits_poly_int64_p, tree_fits_poly_uint64_p): New functions.
373         * lto-streamer-out.c (DFS::DFS_write_tree_body, hash_tree): Handle
374         TS_POLY_INT_CST.
375         * tree-streamer-in.c (lto_input_ts_poly_tree_pointers): Likewise.
376         (streamer_read_tree_body): Likewise.
377         * tree-streamer-out.c (write_ts_poly_tree_pointers): Likewise.
378         (streamer_write_tree_body): Likewise.
379         * tree-streamer.c (streamer_check_handled_ts_structures): Likewise.
380         * asan.c (asan_protect_global): Require the size to be an INTEGER_CST.
381         * cfgexpand.c (expand_debug_expr): Handle POLY_INT_CST.
382         * expr.c (expand_expr_real_1, const_vector_from_tree): Likewise.
383         * gimple-expr.h (is_gimple_constant): Likewise.
384         * gimplify.c (maybe_with_size_expr): Likewise.
385         * print-tree.c (print_node): Likewise.
386         * tree-data-ref.c (data_ref_compare_tree): Likewise.
387         * tree-pretty-print.c (dump_generic_node): Likewise.
388         * tree-ssa-address.c (addr_for_mem_ref): Likewise.
389         * tree-vect-data-refs.c (dr_group_sort_cmp): Likewise.
390         * tree-vrp.c (compare_values_warnv): Likewise.
391         * tree-ssa-loop-ivopts.c (determine_base_object, constant_multiple_of)
392         (get_loop_invariant_expr, add_candidate_1, get_computation_aff_1)
393         (force_expr_to_var_cost): Likewise.
394         * tree-ssa-loop.c (for_each_index): Likewise.
395         * fold-const.h (build_invariant_address, size_int_kind): Take a
396         poly_int64 instead of a HOST_WIDE_INT.
397         * fold-const.c (fold_negate_expr_1, const_binop, const_unop)
398         (fold_convert_const, multiple_of_p, fold_negate_const): Handle
399         POLY_INT_CST.
400         (size_binop_loc): Likewise.  Allow int_const_binop_1 to fail.
401         (int_const_binop_2): New function, split out from...
402         (int_const_binop_1): ...here.  Handle POLY_INT_CST.
403         (size_int_kind): Take a poly_int64 instead of a HOST_WIDE_INT.
404         * expmed.c (make_tree): Handle CONST_POLY_INT_P.
405         * gimple-ssa-strength-reduction.c (slsr_process_add)
406         (slsr_process_mul): Check for INTEGER_CSTs before using them
407         as candidates.
408         * stor-layout.c (bits_from_bytes): New function.
409         (bit_from_pos): Use it.
410         (layout_type): Likewise.  For vectors, multiply the TYPE_SIZE_UNIT
411         by BITS_PER_UNIT to get the TYPE_SIZE.
412         * tree-cfg.c (verify_expr, verify_types_in_gimple_reference): Allow
413         MEM_REF and TARGET_MEM_REF offsets to be a POLY_INT_CST.
415 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
416             Alan Hayward  <alan.hayward@arm.com>
417             David Sherwood  <david.sherwood@arm.com>
419         * doc/rtl.texi (const_poly_int): Document.  Also document the
420         rtl sharing behavior.
421         * gengenrtl.c (excluded_rtx): Return true for CONST_POLY_INT.
422         * rtl.h (const_poly_int_def): New struct.
423         (rtx_def::u): Add a cpi field.
424         (CASE_CONST_UNIQUE, CASE_CONST_ANY): Add CONST_POLY_INT.
425         (CONST_POLY_INT_P, CONST_POLY_INT_COEFFS): New macros.
426         (wi::rtx_to_poly_wide_ref): New typedef
427         (const_poly_int_value, wi::to_poly_wide, rtx_to_poly_int64)
428         (poly_int_rtx_p): New functions.
429         (trunc_int_for_mode): Declare a poly_int64 version.
430         (plus_constant): Take a poly_int64 instead of a HOST_WIDE_INT.
431         (immed_wide_int_const): Take a poly_wide_int_ref rather than
432         a wide_int_ref.
433         (strip_offset): Declare.
434         (strip_offset_and_add): New function.
435         * rtl.def (CONST_POLY_INT): New rtx code.
436         * rtl.c (rtx_size): Handle CONST_POLY_INT.
437         (shared_const_p): Use poly_int_rtx_p.
438         * emit-rtl.h (gen_int_mode): Take a poly_int64 instead of a
439         HOST_WIDE_INT.
440         (gen_int_shift_amount): Likewise.
441         * emit-rtl.c (const_poly_int_hasher): New class.
442         (const_poly_int_htab): New variable.
443         (init_emit_once): Initialize it when NUM_POLY_INT_COEFFS > 1.
444         (const_poly_int_hasher::hash): New function.
445         (const_poly_int_hasher::equal): Likewise.
446         (gen_int_mode): Take a poly_int64 instead of a HOST_WIDE_INT.
447         (immed_wide_int_const): Rename to...
448         (immed_wide_int_const_1): ...this and make static.
449         (immed_wide_int_const): New function, taking a poly_wide_int_ref
450         instead of a wide_int_ref.
451         (gen_int_shift_amount): Take a poly_int64 instead of a HOST_WIDE_INT.
452         (gen_lowpart_common): Handle CONST_POLY_INT.
453         * cse.c (hash_rtx_cb, equiv_constant): Likewise.
454         * cselib.c (cselib_hash_rtx): Likewise.
455         * dwarf2out.c (const_ok_for_output_1): Likewise.
456         * expr.c (convert_modes): Likewise.
457         * print-rtl.c (rtx_writer::print_rtx, print_value): Likewise.
458         * rtlhash.c (add_rtx): Likewise.
459         * explow.c (trunc_int_for_mode): Add a poly_int64 version.
460         (plus_constant): Take a poly_int64 instead of a HOST_WIDE_INT.
461         Handle existing CONST_POLY_INT rtxes.
462         * expmed.h (expand_shift): Take a poly_int64 instead of a
463         HOST_WIDE_INT.
464         * expmed.c (expand_shift): Likewise.
465         * rtlanal.c (strip_offset): New function.
466         (commutative_operand_precedence): Give CONST_POLY_INT the same
467         precedence as CONST_DOUBLE and put CONST_WIDE_INT between that
468         and CONST_INT.
469         * rtl-tests.c (const_poly_int_tests): New struct.
470         (rtl_tests_c_tests): Use it.
471         * simplify-rtx.c (simplify_const_unary_operation): Handle
472         CONST_POLY_INT.
473         (simplify_const_binary_operation): Likewise.
474         (simplify_binary_operation_1): Fold additions of symbolic constants
475         and CONST_POLY_INTs.
476         (simplify_subreg): Handle extensions and truncations of
477         CONST_POLY_INTs.
478         (simplify_const_poly_int_tests): New struct.
479         (simplify_rtx_c_tests): Use it.
480         * wide-int.h (storage_ref): Add default constructor.
481         (wide_int_ref_storage): Likewise.
482         (trailing_wide_ints): Use GTY((user)).
483         (trailing_wide_ints::operator[]): Add a const version.
484         (trailing_wide_ints::get_precision): New function.
485         (trailing_wide_ints::extra_size): Likewise.
487 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
488             Alan Hayward  <alan.hayward@arm.com>
489             David Sherwood  <david.sherwood@arm.com>
491         * emit-rtl.h (gen_int_shift_amount): Declare.
492         * emit-rtl.c (gen_int_shift_amount): New function.
493         * asan.c (asan_emit_stack_protection): Use gen_int_shift_amount
494         instead of GEN_INT.
495         * calls.c (shift_return_value): Likewise.
496         * cse.c (fold_rtx): Likewise.
497         * dse.c (find_shift_sequence): Likewise.
498         * expmed.c (init_expmed_one_mode, store_bit_field_1, expand_shift_1)
499         (expand_shift, expand_smod_pow2): Likewise.
500         * lower-subreg.c (shift_cost): Likewise.
501         * optabs.c (expand_superword_shift, expand_doubleword_mult)
502         (expand_unop, expand_binop, shift_amt_for_vec_perm_mask)
503         (expand_vec_perm_var): Likewise.
504         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
505         (simplify_binary_operation_1): Likewise.
506         * combine.c (try_combine, find_split_point, force_int_to_mode)
507         (simplify_shift_const_1, simplify_shift_const): Likewise.
508         (change_zero_ext): Likewise.  Use simplify_gen_binary.
510 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
512         * poly-int.h (multiple_p): Fix handling of two non-poly_ints.
514 2017-12-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
516         * doc/invoke.texi (ARM Options): Document accepted extension options
517         for -march=armv8.3-a.
519 2017-12-20  Richard Earnshaw  <rearnsha@arm.com>
521         PR target/83105
522         * config.gcc (arm*-*-linux*): When configured with --with-float=hard
523         or --with-float=softfp, set the default CPU to arm10e.
525 2017-12-20  Eric Botcazou  <ebotcazou@adacore.com>
527         * config/visium/constraints.md (J, K, L): Use IN_RANGE macro.
528         * config/visium/predicates.md (const_shift_operand): Likewise.
529         * config/visium/visium.c (visium_legitimize_address): Fix oversight.
530         (visium_legitimize_reload_address): Likewise.
532 2017-12-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
534         PR target/82975
535         * config/arm/arm.h (TEST_REGNO): Adjust comment as expected in r255830.
537 2017-12-20  Jakub Jelinek  <jakub@redhat.com>
539         PR c++/83490
540         * calls.c (compute_argument_addresses): Ignore TYPE_EMPTY_P arguments.
542 2017-12-20  Julia Koval  <julia.koval@intel.com>
544         * common/config/i386/i386-common.c (OPTION_MASK_ISA_VPCLMULQDQ_SET,
545         OPTION_MASK_ISA_VPCLMULQDQ_UNSET): New.
546         (ix86_handle_option): Handle -mvpclmulqdq, move cx6 to flags2.
547         * config.gcc: Include vpclmulqdqintrin.h.
548         * config/i386/cpuid.h: Handle bit_VPCLMULQDQ.
549         * config/i386/driver-i386.c (host_detect_local_cpu): Handle
550         -mvpclmulqdq.
551         * config/i386/i386-builtin.def (__builtin_ia32_vpclmulqdq_v2di,
552         __builtin_ia32_vpclmulqdq_v4di, __builtin_ia32_vpclmulqdq_v8di): New.
553         * config/i386/i386-c.c (__VPCLMULQDQ__): New.
554         * config/i386/i386.c (isa2_opts): Add -mcx16.
555         (isa_opts): Add -mpclmulqdq, remove -mcx16.
556         (ix86_option_override_internal): Move mcx16 to flags2.
557         (ix86_valid_target_attribute_inner_p): Add vpclmulqdq.
558         (ix86_expand_builtin): Handle OPTION_MASK_ISA_VPCLMULQDQ.
559         * config/i386/i386.h (TARGET_VPCLMULQDQ, TARGET_VPCLMULQDQ_P): New.
560         * config/i386/i386.opt: Add mvpclmulqdq, move mcx16 to flags2.
561         * config/i386/immintrin.h: Include vpclmulqdqintrin.h.
562         * config/i386/sse.md (vpclmulqdq_<mode>): New pattern.
563         * config/i386/vpclmulqdqintrin.h (_mm512_clmulepi64_epi128,
564         _mm_clmulepi64_epi128, _mm256_clmulepi64_epi128): New intrinsics.
565         * doc/invoke.texi: Add -mvpclmulqdq.
567 2017-12-20  Tom de Vries  <tom@codesourcery.com>
569         PR middle-end/83423
570         * config/i386/i386.c (ix86_static_chain): Move DECL_STATIC_CHAIN test ...
571         * calls.c (rtx_for_static_chain): ... here.  New function.
572         * calls.h (rtx_for_static_chain): Declare.
573         * builtins.c (expand_builtin_setjmp_receiver): Use rtx_for_static_chain
574         instead of targetm.calls.static_chain.
575         * df-scan.c (df_get_entry_block_def_set): Same.
577 2017-12-19  Tom de Vries  <tom@codesourcery.com>
579         PR tree-optimization/83493
580         * graphite-isl-ast-to-gimple.c (translate_isl_ast_node_for): Unshare ub
581         and lb.
583 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
585         * gimple-ssa-sprintf.c (format_directive): Use inform_n instead of
586         inform with hardcoded english plural handling.
588 2017-12-18  Jeff Law  <law@redhat.com>
590         PR tree-optimization/83477
591         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis): For
592         a non-virtual PHI, always push a new range.
594 2017-12-19  Martin Sebor  <msebor@redhat.com>
596         PR middle-end/77608
597         * builtins.c (compute_objsize): Handle non-constant offsets.
599 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
601         PR tree-optimization/83444
602         * tree-ssa-strlen.c (strlen_check_and_optimize_stmt): For the
603         character load case, if get_stridx on MEM_REF's operand doesn't
604         look usable, retry with get_addr_stridx.
606 2017-12-19  Alexandre Oliva <aoliva@redhat.com>
608         PR debug/83422
609         * var-tracking.c (vt_debug_insns_local): Do not drop markers.
610         (variable_tracking_main_1): Keep markers even when VTA fails.
612         PR bootstrap/83396
613         * cfgexpand.c (expand_gimple_basic_block): Expand label first,
614         even if there are markers before it.
615         * cfgrtl.c (rtl_verify_bb_layout): Reject DEBUG_INSNs outside BBs.
617 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
619         * read-rtl.c (parse_reg_note_name): Replace Yoda conditions with
620         typical order conditions.
621         * sel-sched.c (extract_new_fences_from): Likewise.
622         * config/visium/constraints.md (J, K, L): Likewise.
623         * config/visium/predicates.md (const_shift_operand): Likewise.
624         * config/visium/visium.c (visium_legitimize_address,
625         visium_legitimize_reload_address): Likewise.
626         * config/m68k/m68k.c (output_reg_adjust, emit_reg_adjust): Likewise.
627         * config/arm/arm.c (arm_block_move_unaligned_straight): Likewise.
628         * config/avr/constraints.md (Y01, Ym1, Y02, Ym2): Likewise.
629         * config/avr/avr-log.c (avr_vdump, avr_log_set_avr_log,
630         SET_DUMP_DETAIL): Likewise.
631         * config/avr/predicates.md (const_8_16_24_operand): Likewise.
632         * config/avr/avr.c (STR_PREFIX_P, avr_popcount_each_byte,
633         avr_is_casesi_sequence, avr_casei_sequence_check_operands,
634         avr_set_core_architecture, avr_set_current_function,
635         avr_legitimize_reload_address, avr_asm_len, avr_print_operand,
636         output_movqi, output_movsisf, avr_out_plus, avr_out_bitop,
637         avr_out_fract, avr_adjust_insn_length, avr_encode_section_info,
638         avr_2word_insn_p, output_reload_in_const, avr_has_nibble_0xf,
639         avr_map_decompose, avr_fold_builtin): Likewise.
640         * config/avr/driver-avr.c (avr_devicespecs_file): Likewise.
641         * config/avr/gen-avr-mmcu-specs.c (str_prefix_p, print_mcu): Likewise.
642         * config/i386/i386.c (ix86_parse_stringop_strategy_string): Likewise.
643         * config/m32c/m32c-pragma.c (m32c_pragma_memregs): Likewise.
644         * config/m32c/m32c.c (m32c_conditional_register_usage,
645         m32c_address_cost): Likewise.
646         * config/m32c/predicates.md (shiftcount_operand,
647         longshiftcount_operand): Likewise.
648         * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise.
649         * config/nios2/nios2.c (nios2_handle_custom_fpu_insn_option,
650         can_use_cdx_ldstw): Likewise.
651         * config/nios2/nios2.h (CDX_REG_P): Likewise.
652         * config/cr16/cr16.h (RETURN_ADDR_RTX, REGNO_MODE_OK_FOR_BASE_P):
653         Likewise.
654         * config/cr16/cr16.md (*mov<mode>_double): Likewise.
655         * config/cr16/cr16.c (cr16_create_dwarf_for_multi_push): Likewise.
656         * config/h8300/h8300.c (h8300_rtx_costs, get_shift_alg): Likewise.
657         * config/vax/constraints.md (U06, U08, U16, CN6, S08, S16): Likewise.
658         * config/vax/vax.c (adjacent_operands_p): Likewise.
659         * config/ft32/constraints.md (L, b, KA): Likewise.
660         * config/ft32/ft32.c (ft32_load_immediate, ft32_expand_prologue):
661         Likewise.
662         * cfgexpand.c (expand_stack_alignment): Likewise.
663         * gcse.c (insert_expr_in_table): Likewise.
664         * print-rtl.c (rtx_writer::print_rtx_operand_codes_E_and_V): Likewise.
665         * cgraphunit.c (cgraph_node::expand): Likewise.
666         * ira-build.c (setup_min_max_allocno_live_range_point): Likewise.
667         * emit-rtl.c (add_insn): Likewise.
668         * input.c (dump_location_info): Likewise.
669         * passes.c (NEXT_PASS): Likewise.
670         * read-rtl-function.c (parse_note_insn_name,
671         function_reader::read_rtx_operand_r, function_reader::parse_mem_expr):
672         Likewise.
673         * sched-rgn.c (sched_rgn_init): Likewise.
674         * diagnostic-show-locus.c (layout::show_ruler): Likewise.
675         * combine.c (find_split_point, simplify_if_then_else, force_to_mode,
676         if_then_else_cond, simplify_shift_const_1, simplify_comparison): Likewise.
677         * explow.c (eliminate_constant_term): Likewise.
678         * final.c (leaf_renumber_regs_insn): Likewise.
679         * cfgrtl.c (print_rtl_with_bb): Likewise.
680         * genhooks.c (emit_init_macros): Likewise.
681         * poly-int.h (maybe_ne, maybe_le, maybe_lt): Likewise.
682         * tree-data-ref.c (conflict_fn): Likewise.
683         * selftest.c (assert_streq): Likewise.
684         * expr.c (store_constructor_field, expand_expr_real_1): Likewise.
685         * fold-const.c (fold_range_test, extract_muldiv_1, fold_truth_andor,
686         fold_binary_loc, multiple_of_p): Likewise.
687         * reload.c (push_reload, find_equiv_reg): Likewise.
688         * et-forest.c (et_nca, et_below): Likewise.
689         * dbxout.c (dbxout_symbol_location): Likewise.
690         * reorg.c (relax_delay_slots): Likewise.
691         * dojump.c (do_compare_rtx_and_jump): Likewise.
692         * gengtype-parse.c (type): Likewise.
693         * simplify-rtx.c (simplify_gen_ternary, simplify_gen_relational,
694         simplify_const_relational_operation): Likewise.
695         * reload1.c (do_output_reload): Likewise.
696         * dumpfile.c (get_dump_file_info_by_switch): Likewise.
697         * gengtype.c (type_for_name): Likewise.
698         * gimple-ssa-sprintf.c (format_directive): Likewise.
700 2017-12-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
702         PR target/82975
703         * config/arm/arm.h (TEST_REGNO): Check reg_renumber is set before
704         accessing it.  Adjust comment.
706 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
708         PR middle-end/81914
709         * predict.c (zero_one_minusone): New function.
710         (apply_return_prediction): Avoid return prediction for functions
711         returning only -1, 0 and 1 values, unless they only return -1 and 0
712         or 0 and 1.
714 2017-12-19  Claudiu Zissulescu  <claziss@synopsys.com>
716         * config/arc/arc.c (legitimate_scaled_address_p): Clean
717         fall-through warning.
718         (arc_compute_frame_size): Remove unused variables.
719         (arc_print_operand): Fix fprintif format.
720         (arc_can_follow_jump): Clean fall-through warning.
722 2017-12-19  Marek Polacek  <polacek@redhat.com>
724         PR c++/83489
725         * config/i386/i386.c (init_cumulative_args): Don't check TYPE_EMPTY_P
726         on an error node.                                                    
728 2017-12-19  Claudiu Zissulescu  <claziss@synopsys.com>
730         * config/arc/arc.c (overriderregs): New variable.
731         (arc_override_options): Track fixed/call saved/call options.
732         (arc_conditional_register_usage): Check against overrideregs
733         variable whenever we change register properties.
735 2017-12-19  Nathan Sidwell  <nathan@acm.org>
737         * opts.c (finish_options): Don't prefix dump_base_name if it
738         already contains directories.
740 2017-12-19  Martin Liska  <mliska@suse.cz>
742         PR rtl-optimization/82675
743         * loop-unroll.c (unroll_loop_constant_iterations): Allocate one
744         more element in sbitmap.
746 2017-12-19  Paolo Carlini  <paolo.carlini@oracle.com>
748         * gimplify.c (gimplify_expr): Use error_operand_p.
750 2017-12-19  Sebastian Huber  <sebastian.huber@embedded-brains.de>
752         PR target/83387
753         * config/rs6000/t-rtems (MULTILIB_REQUIRED): Remove 64-bit soft-float
754         multilib.
756 2017-12-19  Daniel Cederman  <cederman@gaisler.com>
758         * config/sparc/sparc.c (sparc_do_work_around_errata): Make sure
759         the jump is to a label.
761 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
763         PR tree-optimization/83444
764         * tree-ssa-strlen.c (strlen_check_and_optimize_stmt): Optimize
765         character loads.
767         PR ipa/82801
768         PR ipa/83346
769         * ipa-inline.c (flatten_remove_node_hook): New function.
770         (ipa_inline): Keep only nodes with flatten attribute at the end of
771         the array in the order from ipa_reverse_postorder, only walk that
772         portion of array for flattening, if there is more than one such
773         node, temporarily register a removal hook and ignore removed nodes.
775         PR tree-optimization/80631
776         * tree-vect-loop.c (vect_create_epilog_for_reduction): Compare
777         induc_code against MAX_EXPR or MIN_EXPR instead of reduc_fn against
778         IFN_REDUC_MAX or IFN_REDUC_MIN.
780 2017-12-18  Jeff Law  <law@redhat.com>
782         * tree-ssa-dom.c (record_equivalences_from_phis): Do not
783         record symbolic equivalences from backedges in the CFG.
785         Revert
786         2017-11-19  Jeff Law  <law@redhat.com>
788         * tree-ssa-dom.c (record_equivalences_from_phis): Fix handling
789         of degenerates resulting from ignoring an edge.
791 2017-12-18  Martin Sebor  <msebor@redhat.com>
793         PR middle-end/83373
794         PR tree-optimization/78450
795         * tree-ssa-strlen.c (maybe_set_strlen_range): New function.
796         (handle_builtin_strlen): Call it.
798 2017-12-18  Segher Boessenkool  <segher@kernel.crashing.org>
800         PR rtl-optimization/83424
801         * rtlanal.c (dead_or_set_regno_p): Handle CLOBBER just like SET.
803 2017-12-18  Marek Polacek  <polacek@redhat.com>
805         PR middle-end/83463
806         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref):
807         Check if TYPE is INTEGRAL_TYPE_P before accessing its min/max
808         values.
810 2017-12-18  Claudiu Zissulescu  <claziss@synopsys.com>
812         * config/arc/arc.md (maddsidi4, maddsidi4_split): Update pattern.
813         (umaddsidi4, umaddsidi_split): Likewise.
815 2017-12-18  Claudiu Zissulescu  <claziss@synopsys.com>
817         * config/arc/arc.c (arc_legitimate_constant_p): Always check all
818         constants.
820 2017-12-18  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
822         PR target/83420
823         * config/s390/s390.c (s390_option_override): Avoid strncpy.
825 2017-12-18  Richard Biener  <rguenther@suse.de>
827         PR tree-optimization/81877
828         * tree-ssa-loop-im.c (ref_indep_loop_p): Remove safelen parameters.
829         (outermost_indep_loop): Adjust.
830         (ref_indep_loop_p_1): Likewise.  Remove safelen handling again.
831         (can_sm_ref_p): Adjust.
833 2017-12-18  Richard Biener  <rguenther@suse.de>
835         PR middle-end/77291
836         * tree.c (array_at_struct_end_p): Return true if the underlying
837         object has space for at least one element in excess of what
838         the array domain specifies.
840 2017-12-17  Sandra Loosemore  <sandra@codesourcery.com>
842         * doc/extend.texi (x86 Function Attributes): Reformat nocf_check
843         example to avoid overfull hbox.
844         * doc/invoke.texi (Option Summary): Add missing @gol.
845         (C++ Dialect Options): Reformat -Wnoexcept-type example to avoid 
846         overfull hbox.
847         
848 2017-12-17  Sandra Loosemore  <sandra@codesourcery.com>
849             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
851         * doc/invoke.texi (Option Summary): Add -mverbose-cost-dump
852         to AArch64 and ARM lists, plus missing -mflip-thumb for ARM.
853         (AArch64 Options): Document -mverbose-cost-dump.
854         (ARM Options): Likewise, plus -mflip-thumb.
856 2017-12-17  Martin Sebor  <msebor@redhat.com>
858         PR bootstrap/83446
859         * gimple-ssa-warn-restrict.c
860         (builtin_memref::offset_out_of_bounds): Correct the handling of
861         anti-ranges.
863 2017-12-17  Sandra Loosemore  <sandra@codesourcery.com>
865         * doc/invoke.texi (ARC Options): Add missing -mlra entry.
867 2017-12-17  John David Anglin  <danglin@gcc.gnu.org>
869         * config/pa/pa.c (pa_som_asm_init_sections): Fix comment.
871 2017-12-17  Markus Trippelsdorf  <markus@trippelsdorf.de>
873         * x86-tune-costs.h (skylake_cost, core_cost): Decrease r64 multiply
874         latencies.
876 2017-12-16  Sandra Loosemore  <sandra@codesourcery.com>
878         * doc/invoke.texi: Fix some typos.
880 2017-12-16  Martin Sebor  <msebor@redhat.com>
882         PR tree-optimization/78918
883         * Makefile.in (OBJS): Add gimple-ssa-warn-restrict.o.
884         * builtins.c (check_sizes): Rename...
885         (check_access): ...to this.  Rename function arguments for clarity.
886         (check_memop_sizes): Adjust names.
887         (expand_builtin_memchr, expand_builtin_memcpy): Same.
888         (expand_builtin_memmove, expand_builtin_mempcpy): Same.
889         (expand_builtin_strcat, expand_builtin_stpncpy): Same.
890         (check_strncat_sizes, expand_builtin_strncat): Same.
891         (expand_builtin_strncpy, expand_builtin_memset): Same.
892         (expand_builtin_bzero, expand_builtin_memcmp): Same.
893         (expand_builtin_memory_chk, maybe_emit_chk_warning): Same.
894         (maybe_emit_sprintf_chk_warning): Same.
895         (expand_builtin_strcpy): Adjust.
896         (expand_builtin_stpcpy): Same.
897         (expand_builtin_with_bounds): Detect out-of-bounds accesses
898         in pointer-checking forms of memcpy, memmove, and mempcpy.
899         (gcall_to_tree_minimal, max_object_size): Define new functions.
900         * builtins.h (max_object_size): Declare.
901         * calls.c (alloc_max_size): Call max_object_size instead of
902         hardcoding ssizetype limit.
903         (get_size_range): Handle new argument.
904         * calls.h (get_size_range): Add a new argument.
905         * cfgexpand.c (expand_call_stmt): Propagate no-warning bit.
906         * doc/invoke.texi (-Wrestrict): Adjust, add example.
907         * gimple-fold.c (gimple_fold_builtin_memory_op): Detect overlapping
908         operations.
909         (gimple_fold_builtin_memory_chk): Same.
910         (gimple_fold_builtin_stxcpy_chk): New function.
911         * gimple-ssa-warn-restrict.c: New source.
912         * gimple-ssa-warn-restrict.h: New header.
913         * gimple.c (gimple_build_call_from_tree): Propagate location.
914         * passes.def (pass_warn_restrict): Add new pass.
915         * tree-pass.h (make_pass_warn_restrict): Declare.
916         * tree-ssa-strlen.c (handle_builtin_strcpy): Detect overlapping
917         operations.
918         (handle_builtin_strcat): Same.
919         (strlen_optimize_stmt): Rename...
920         (strlen_check_and_optimize_stmt): ...to this.  Handle strncat,
921         stpncpy, strncpy, and their checking forms.
923 2017-12-16  Jan Hubicka  <hubicka@ucw.cz>
925         PR rtl-optimization/82849
926         * modulo-sched.c (sms_schedule): Use get_estimated_loop_iterations_int
927         and get_max_loop_iterations_int.
929 2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
930             Alan Hayward  <alan.hayward@arm.com>
931             David Sherwood  <david.sherwood@arm.com>
933         * machmode.h (mode_for_size, int_mode_for_size, float_mode_for_size)
934         (smallest_mode_for_size, smallest_int_mode_for_size): Take the mode
935         size as a poly_uint64.
936         (mode_for_vector, mode_for_int_vector): Take the number of vector
937         elements as a poly_uint64.
938         * stor-layout.c (mode_for_size, smallest_mode_for_size): Take the mode
939         size as a poly_uint64.
940         (mode_for_vector, mode_for_int_vector): Take the number of vector
941         elements as a poly_uint64.
943 2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
944             Alan Hayward  <alan.hayward@arm.com>
945             David Sherwood  <david.sherwood@arm.com>
947         * machmode.h (MACRO_MODE): New macro.
948         * addresses.h (base_reg_class, ok_for_base_p_1): Use it.
949         * targhooks.c (default_libcall_value, default_secondary_reload)
950         (default_memory_move_cost, default_register_move_cost)
951         (default_class_max_nregs): Likewise.
953 2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
954             Alan Hayward  <alan.hayward@arm.com>
955             David Sherwood  <david.sherwood@arm.com>
957         * doc/sourcebuild.texi: Document IN_TARGET_CODE.
958         * genattrtab.c (write_header): Define IN_TARGET_CODE to 1 in the
959         target C file.
960         * genautomata.c (main): Likewise.
961         * genconditions.c (write_header): Likewise.
962         * genemit.c (main): Likewise.
963         * genextract.c (print_header): Likewise.
964         * genopinit.c (main): Likewise.
965         * genoutput.c (output_prologue): Likewise.
966         * genpeep.c (main): Likewise.
967         * genpreds.c (write_insn_preds_c): Likewise.
968         * genrecog.c (writer_header): Likewise.
969         * config/aarch64/aarch64-builtins.c (IN_TARGET_CODE): Define.
970         * config/aarch64/aarch64-c.c (IN_TARGET_CODE): Likewise.
971         * config/aarch64/aarch64.c (IN_TARGET_CODE): Likewise.
972         * config/aarch64/cortex-a57-fma-steering.c (IN_TARGET_CODE): Likewise.
973         * config/aarch64/driver-aarch64.c (IN_TARGET_CODE): Likewise.
974         * config/alpha/alpha.c (IN_TARGET_CODE): Likewise.
975         * config/alpha/driver-alpha.c (IN_TARGET_CODE): Likewise.
976         * config/arc/arc-c.c (IN_TARGET_CODE): Likewise.
977         * config/arc/arc.c (IN_TARGET_CODE): Likewise.
978         * config/arc/driver-arc.c (IN_TARGET_CODE): Likewise.
979         * config/arm/aarch-common.c (IN_TARGET_CODE): Likewise.
980         * config/arm/arm-builtins.c (IN_TARGET_CODE): Likewise.
981         * config/arm/arm-c.c (IN_TARGET_CODE): Likewise.
982         * config/arm/arm.c (IN_TARGET_CODE): Likewise.
983         * config/arm/driver-arm.c (IN_TARGET_CODE): Likewise.
984         * config/avr/avr-c.c (IN_TARGET_CODE): Likewise.
985         * config/avr/avr-devices.c (IN_TARGET_CODE): Likewise.
986         * config/avr/avr-log.c (IN_TARGET_CODE): Likewise.
987         * config/avr/avr.c (IN_TARGET_CODE): Likewise.
988         * config/avr/driver-avr.c (IN_TARGET_CODE): Likewise.
989         * config/avr/gen-avr-mmcu-specs.c (IN_TARGET_CODE): Likewise.
990         * config/bfin/bfin.c (IN_TARGET_CODE): Likewise.
991         * config/c6x/c6x.c (IN_TARGET_CODE): Likewise.
992         * config/cr16/cr16.c (IN_TARGET_CODE): Likewise.
993         * config/cris/cris.c (IN_TARGET_CODE): Likewise.
994         * config/darwin.c (IN_TARGET_CODE): Likewise.
995         * config/epiphany/epiphany.c (IN_TARGET_CODE): Likewise.
996         * config/epiphany/mode-switch-use.c (IN_TARGET_CODE): Likewise.
997         * config/epiphany/resolve-sw-modes.c (IN_TARGET_CODE): Likewise.
998         * config/fr30/fr30.c (IN_TARGET_CODE): Likewise.
999         * config/frv/frv.c (IN_TARGET_CODE): Likewise.
1000         * config/ft32/ft32.c (IN_TARGET_CODE): Likewise.
1001         * config/h8300/h8300.c (IN_TARGET_CODE): Likewise.
1002         * config/i386/djgpp.c (IN_TARGET_CODE): Likewise.
1003         * config/i386/driver-i386.c (IN_TARGET_CODE): Likewise.
1004         * config/i386/driver-mingw32.c (IN_TARGET_CODE): Likewise.
1005         * config/i386/host-cygwin.c (IN_TARGET_CODE): Likewise.
1006         * config/i386/host-i386-darwin.c (IN_TARGET_CODE): Likewise.
1007         * config/i386/host-mingw32.c (IN_TARGET_CODE): Likewise.
1008         * config/i386/i386-c.c (IN_TARGET_CODE): Likewise.
1009         * config/i386/i386.c (IN_TARGET_CODE): Likewise.
1010         * config/i386/intelmic-mkoffload.c (IN_TARGET_CODE): Likewise.
1011         * config/i386/msformat-c.c (IN_TARGET_CODE): Likewise.
1012         * config/i386/winnt-cxx.c (IN_TARGET_CODE): Likewise.
1013         * config/i386/winnt-stubs.c (IN_TARGET_CODE): Likewise.
1014         * config/i386/winnt.c (IN_TARGET_CODE): Likewise.
1015         * config/i386/x86-tune-sched-atom.c (IN_TARGET_CODE): Likewise.
1016         * config/i386/x86-tune-sched-bd.c (IN_TARGET_CODE): Likewise.
1017         * config/i386/x86-tune-sched-core.c (IN_TARGET_CODE): Likewise.
1018         * config/i386/x86-tune-sched.c (IN_TARGET_CODE): Likewise.
1019         * config/ia64/ia64-c.c (IN_TARGET_CODE): Likewise.
1020         * config/ia64/ia64.c (IN_TARGET_CODE): Likewise.
1021         * config/iq2000/iq2000.c (IN_TARGET_CODE): Likewise.
1022         * config/lm32/lm32.c (IN_TARGET_CODE): Likewise.
1023         * config/m32c/m32c-pragma.c (IN_TARGET_CODE): Likewise.
1024         * config/m32c/m32c.c (IN_TARGET_CODE): Likewise.
1025         * config/m32r/m32r.c (IN_TARGET_CODE): Likewise.
1026         * config/m68k/m68k.c (IN_TARGET_CODE): Likewise.
1027         * config/mcore/mcore.c (IN_TARGET_CODE): Likewise.
1028         * config/microblaze/microblaze-c.c (IN_TARGET_CODE): Likewise.
1029         * config/microblaze/microblaze.c (IN_TARGET_CODE): Likewise.
1030         * config/mips/driver-native.c (IN_TARGET_CODE): Likewise.
1031         * config/mips/frame-header-opt.c (IN_TARGET_CODE): Likewise.
1032         * config/mips/mips.c (IN_TARGET_CODE): Likewise.
1033         * config/mmix/mmix.c (IN_TARGET_CODE): Likewise.
1034         * config/mn10300/mn10300.c (IN_TARGET_CODE): Likewise.
1035         * config/moxie/moxie.c (IN_TARGET_CODE): Likewise.
1036         * config/msp430/driver-msp430.c (IN_TARGET_CODE): Likewise.
1037         * config/msp430/msp430-c.c (IN_TARGET_CODE): Likewise.
1038         * config/msp430/msp430.c (IN_TARGET_CODE): Likewise.
1039         * config/nds32/nds32-cost.c (IN_TARGET_CODE): Likewise.
1040         * config/nds32/nds32-fp-as-gp.c (IN_TARGET_CODE): Likewise.
1041         * config/nds32/nds32-intrinsic.c (IN_TARGET_CODE): Likewise.
1042         * config/nds32/nds32-isr.c (IN_TARGET_CODE): Likewise.
1043         * config/nds32/nds32-md-auxiliary.c (IN_TARGET_CODE): Likewise.
1044         * config/nds32/nds32-memory-manipulation.c (IN_TARGET_CODE): Likewise.
1045         * config/nds32/nds32-pipelines-auxiliary.c (IN_TARGET_CODE): Likewise.
1046         * config/nds32/nds32-predicates.c (IN_TARGET_CODE): Likewise.
1047         * config/nds32/nds32.c (IN_TARGET_CODE): Likewise.
1048         * config/nios2/nios2.c (IN_TARGET_CODE): Likewise.
1049         * config/nvptx/mkoffload.c (IN_TARGET_CODE): Likewise.
1050         * config/nvptx/nvptx.c (IN_TARGET_CODE): Likewise.
1051         * config/pa/pa.c (IN_TARGET_CODE): Likewise.
1052         * config/pdp11/pdp11.c (IN_TARGET_CODE): Likewise.
1053         * config/powerpcspe/driver-powerpcspe.c (IN_TARGET_CODE): Likewise.
1054         * config/powerpcspe/host-darwin.c (IN_TARGET_CODE): Likewise.
1055         * config/powerpcspe/host-ppc64-darwin.c (IN_TARGET_CODE): Likewise.
1056         * config/powerpcspe/powerpcspe-c.c (IN_TARGET_CODE): Likewise.
1057         * config/powerpcspe/powerpcspe-linux.c (IN_TARGET_CODE): Likewise.
1058         * config/powerpcspe/powerpcspe.c (IN_TARGET_CODE): Likewise.
1059         * config/riscv/riscv-builtins.c (IN_TARGET_CODE): Likewise.
1060         * config/riscv/riscv-c.c (IN_TARGET_CODE): Likewise.
1061         * config/riscv/riscv.c (IN_TARGET_CODE): Likewise.
1062         * config/rl78/rl78-c.c (IN_TARGET_CODE): Likewise.
1063         * config/rl78/rl78.c (IN_TARGET_CODE): Likewise.
1064         * config/rs6000/driver-rs6000.c (IN_TARGET_CODE): Likewise.
1065         * config/rs6000/host-darwin.c (IN_TARGET_CODE): Likewise.
1066         * config/rs6000/host-ppc64-darwin.c (IN_TARGET_CODE): Likewise.
1067         * config/rs6000/rs6000-c.c (IN_TARGET_CODE): Likewise.
1068         * config/rs6000/rs6000-linux.c (IN_TARGET_CODE): Likewise.
1069         * config/rs6000/rs6000-p8swap.c (IN_TARGET_CODE): Likewise.
1070         * config/rs6000/rs6000-string.c (IN_TARGET_CODE): Likewise.
1071         * config/rs6000/rs6000.c (IN_TARGET_CODE): Likewise.
1072         * config/rx/rx.c (IN_TARGET_CODE): Likewise.
1073         * config/s390/driver-native.c (IN_TARGET_CODE): Likewise.
1074         * config/s390/s390-c.c (IN_TARGET_CODE): Likewise.
1075         * config/s390/s390.c (IN_TARGET_CODE): Likewise.
1076         * config/sh/sh-c.c (IN_TARGET_CODE): Likewise.
1077         * config/sh/sh-mem.cc (IN_TARGET_CODE): Likewise.
1078         * config/sh/sh.c (IN_TARGET_CODE): Likewise.
1079         * config/sh/sh_optimize_sett_clrt.cc (IN_TARGET_CODE): Likewise.
1080         * config/sh/sh_treg_combine.cc (IN_TARGET_CODE): Likewise.
1081         * config/sparc/driver-sparc.c (IN_TARGET_CODE): Likewise.
1082         * config/sparc/sparc-c.c (IN_TARGET_CODE): Likewise.
1083         * config/sparc/sparc.c (IN_TARGET_CODE): Likewise.
1084         * config/spu/spu-c.c (IN_TARGET_CODE): Likewise.
1085         * config/spu/spu.c (IN_TARGET_CODE): Likewise.
1086         * config/stormy16/stormy16.c (IN_TARGET_CODE): Likewise.
1087         * config/tilegx/mul-tables.c (IN_TARGET_CODE): Likewise.
1088         * config/tilegx/tilegx-c.c (IN_TARGET_CODE): Likewise.
1089         * config/tilegx/tilegx.c (IN_TARGET_CODE): Likewise.
1090         * config/tilepro/mul-tables.c (IN_TARGET_CODE): Likewise.
1091         * config/tilepro/tilepro-c.c (IN_TARGET_CODE): Likewise.
1092         * config/tilepro/tilepro.c (IN_TARGET_CODE): Likewise.
1093         * config/v850/v850-c.c (IN_TARGET_CODE): Likewise.
1094         * config/v850/v850.c (IN_TARGET_CODE): Likewise.
1095         * config/vax/vax.c (IN_TARGET_CODE): Likewise.
1096         * config/visium/visium.c (IN_TARGET_CODE): Likewise.
1097         * config/vms/vms-c.c (IN_TARGET_CODE): Likewise.
1098         * config/vms/vms-f.c (IN_TARGET_CODE): Likewise.
1099         * config/vms/vms.c (IN_TARGET_CODE): Likewise.
1100         * config/xtensa/xtensa.c (IN_TARGET_CODE): Likewise.
1102 2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
1103             Alan Hayward  <alan.hayward@arm.com>
1104             David Sherwood  <david.sherwood@arm.com>
1106         * tree-ssa-sccvn.c (vn_reference_lookup_3): Avoid repeated
1107         checks for MEM_REF.
1109 2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
1110             Alan Hayward  <alan.hayward@arm.com>
1111             David Sherwood  <david.sherwood@arm.com>
1113         * doc/generic.texi (VEC_SERIES_EXPR): Document.
1114         * doc/md.texi (vec_series@var{m}): Document.
1115         * tree.def (VEC_SERIES_EXPR): New tree code.
1116         * tree.h (build_vec_series): Declare.
1117         * tree.c (build_vec_series): New function.
1118         * cfgexpand.c (expand_debug_expr): Handle VEC_SERIES_EXPR.
1119         * tree-pretty-print.c (dump_generic_node): Likewise.
1120         * gimple-pretty-print.c (dump_binary_rhs): Likewise.
1121         * tree-inline.c (estimate_operator_cost): Likewise.
1122         * expr.c (expand_expr_real_2): Likewise.
1123         * optabs-tree.c (optab_for_tree_code): Likewise.
1124         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
1125         * fold-const.c (const_binop): Fold VEC_SERIES_EXPRs of constants.
1126         * expmed.c (make_tree): Handle VEC_SERIES.
1127         * optabs.def (vec_series_optab): New optab.
1128         * optabs.h (expand_vec_series_expr): Declare.
1129         * optabs.c (expand_vec_series_expr): New function.
1130         * tree-vect-generic.c (expand_vector_operations_1): Check that
1131         the operands also have vector type.
1133 2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
1134             Alan Hayward  <alan.hawyard@arm.com>
1135             David Sherwood  <david.sherwood@arm.com>
1137         * doc/generic.texi (VEC_DUPLICATE_EXPR): Document.
1138         (VEC_COND_EXPR): Add missing @tindex.
1139         * doc/md.texi (vec_duplicate@var{m}): Document.
1140         * tree.def (VEC_DUPLICATE_EXPR): New tree codes.
1141         * tree.c (build_vector_from_val): Add stubbed-out handling of
1142         variable-length vectors, using VEC_DUPLICATE_EXPR.
1143         (uniform_vector_p): Handle VEC_DUPLICATE_EXPR.
1144         * cfgexpand.c (expand_debug_expr): Likewise.
1145         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
1146         * tree-inline.c (estimate_operator_cost): Likewise.
1147         * tree-pretty-print.c (dump_generic_node): Likewise.
1148         * tree-vect-generic.c (ssa_uniform_vector_p): Likewise.
1149         * fold-const.c (const_unop): Fold VEC_DUPLICATE_EXPRs of a constant.
1150         (test_vec_duplicate_folding): New function.
1151         (fold_const_c_tests): Call it.
1152         * optabs.def (vec_duplicate_optab): New optab.
1153         * optabs-tree.c (optab_for_tree_code): Handle VEC_DUPLICATE_EXPR.
1154         * optabs.h (expand_vector_broadcast): Declare.
1155         * optabs.c (expand_vector_broadcast): Make non-static.  Try using
1156         vec_duplicate_optab.
1157         * expr.c (store_constructor): Try using vec_duplicate_optab for
1158         uniform vectors.
1159         (expand_expr_real_2): Handle VEC_DUPLICATE_EXPR.
1161 2017-12-15  Markus Trippelsdorf  <markus@trippelsdorf.de>
1163         PR target/83358
1164         * config/i386/x86-tune-costs.h (skylake_cost, core_cost): Increase
1165         div/mod latencies a bit.
1167 2017-12-15  Jeff Law  <law@redhat.com>
1169         PR tree-optimization/36550
1170         * tree-ssa-threadupdate.c (count_stmts_and_phis_in_block): New.
1171         (mark_threaded_blocks): Rewrite code to avoid block copying when
1172         optimizing for size.  Don't pessimize blocks which will be
1173         copied, but all the statements will be dead.
1175 2017-12-15  Alexandre Oliva <aoliva@redhat.com>
1177         PR tree-optimization/81165
1178         * tree-ssa-threadupdate.c (uses_in_bb): New.
1179         (estimate_threading_killed_stmts): New.
1180         * tree-ssa-threadupdate.h (estimate_threading_killed_stmts): Prototype.
1181         * tree-ssa-threadedge.c 
1182         (record_temporary_equivalences_from_stmts_at_dest): Expand limit
1183         when its hit.
1185 2017-12-15  Jeff Law  <law@redhat.com>
1187         PR tree-optimization/83410
1188         * tree-ssa-threadupdate.c (thread_block_1): Avoid certain jump
1189         threads when parallelizing loops.
1191 2017-12-15  Jakub Jelinek  <jakub@redhat.com>
1193         * tree-core.h (struct attribute_spec): Swap affects_type_identity and
1194         handler fields.
1195         * config/alpha/alpha.c (vms_attribute_table): Swap
1196         affects_type_identity and handler fields, adjust comments.
1197         * config/mips/mips.c (mips_attribute_table): Likewise.
1198         * config/visium/visium.c (visium_attribute_table): Likewise.
1199         * config/epiphany/epiphany.c (epiphany_attribute_table): Likewise.
1200         * config/microblaze/microblaze.c (microblaze_attribute_table):
1201         Likewise.
1202         * config/spu/spu.c (spu_attribute_table): Likewise.
1203         * config/mcore/mcore.c (mcore_attribute_table): Likewise.
1204         * config/arc/arc.c (arc_attribute_table): Likewise.
1205         * config/m68k/m68k.c (m68k_attribute_table): Likewise.
1206         * config/v850/v850.c (v850_handle_interrupt_attribute,
1207         v850_handle_data_area_attribute): Formatting fixes.
1208         (v850_attribute_table): Swap affects_type_identity and handler
1209         fields, adjust comments.
1210         * config/m32r/m32r.c (m32r_attribute_table): Likewise.
1211         * config/arm/arm.c (arm_attribute_table): Likewise.
1212         * config/avr/avr.c (avr_attribute_table): Likewise.
1213         * config/s390/s390.c (s390_attribute_table): Likewise.
1214         * config/sh/sh.c (sh_attribute_table): Likewise.
1215         * config/i386/i386.c (ix86_handle_cconv_attribute,
1216         ix86_handle_callee_pop_aggregate_return): Formatting fixes.
1217         (ix86_attribute_table): Swap affects_type_identity and handler
1218         fields, adjust comments.
1219         * config/i386/cygming.h (SUBTARGET_ATTRIBUTE_TABLE): Likewise.
1220         * config/sparc/sparc.c (sparc_attribute_table): Likewise.
1221         * config/m32c/m32c.c (m32c_attribute_table): Likewise.
1222         * config/sol2.h (SOLARIS_ATTRIBUTE_TABLE): Likewise.
1223         * config/ia64/ia64.c (ia64_attribute_table): Likewise.
1224         * config/msp430/msp430.c (msp430_attribute_table): Likewise.
1225         * config/rx/rx.c (rx_attribute_table): Likewise.
1226         * config/cr16/cr16.c (cr16_attribute_table): Likewise.
1227         * config/h8300/h8300.c (h8300_attribute_table): Likewise.
1228         * config/nvptx/nvptx.c (nvptx_attribute_table): Likewise.
1229         * config/powerpcspe/powerpcspe.c (rs6000_attribute_table): Likewise.
1230         * config/darwin.h (SUBTARGET_ATTRIBUTE_TABLE): Likewise.
1231         * config/stormy16/stormy16.c (xstormy16_attribute_table): Likewise.
1232         * config/bfin/bfin.c (bfin_attribute_table): Likewise.
1233         * config/rs6000/rs6000.c (rs6000_attribute_table): Likewise.
1234         * config/rl78/rl78.c (rl78_attribute_table): Likewise.
1235         * config/nds32/nds32.c (nds32_attribute_table): Likewise.
1236         * doc/plugins.texi (user_attr): Likewise.  Add NULL for
1237         exclude.
1238         * attribs.c (empty_attribute_table): Swap affects_type_identity and
1239         handler fields.
1240         (register_scoped_attributes, decl_attributes): Formatting fixes.
1242         PR tree-optimization/83269
1243         * fold-const.c (fold_binary_loc): Perform (-A) - B -> (-B) - A
1244         subtraction in arg0's type if type is signed and arg0 is unsigned.
1245         Formatting fix.
1247         PR sanitizer/81281
1248         * match.pd ((T)(P + A) - (T)P -> (T) A): Use @@0 instead of @0 and
1249         convert? on @0 instead of convert.  Check type of @1, not @0.
1250         ((T)P - (T)(P + A) -> -(T) A): Use @@0 instead of @0 and
1251         convert? on @0 instead of convert.  Check type of @1, not @0.
1252         ((T)(P + A) - (T)(P + B) -> (T)A - (T)B): Use @@0 instead of @0,
1253         only optimize if either both @1 and @2 types are narrower
1254         precision, or both are wider or equal precision, and in the former
1255         case only if both have undefined overflow.
1257 2017-12-15  Richard Biener  <rguenther@suse.de>
1259         PR lto/83388
1260         * internal-fn.def (IFN_NOP): Add.
1261         * internal-fn.c (expand_NOP): Do nothing.
1262         * lto-streamer-in.c (input_function): Instead of removing
1263         sanitizer calls replace them with IFN_NOP calls.
1265 2017-12-15  Richard Sandiford  <richard.sandiford@linaro.org>
1266             Alan Hayward  <alan.hayward@arm.com>
1267             David Sherwood  <david.sherwood@arm.com>
1269         * dse.c (store_info, read_info_type): Replace begin and end with
1270         offset and width.
1271         (print_range): New function.
1272         (set_all_positions_unneeded, any_positions_needed_p)
1273         (check_mem_read_rtx, scan_stores, scan_reads, dse_step5): Update
1274         accordingly.
1275         (record_store): Likewise.  Optimize the case in which all positions
1276         are unneeded.
1277         (get_stored_val): Replace read_begin and read_end with read_offset
1278         and read_width.
1279         (replace_read): Update call accordingly.
1281 2017-12-15  Bin Cheng  <bin.cheng@arm.com>
1283         * gimple-loop-interchange.cc (STMT_COST_RATIO): New macro.
1284         (loop_cand::m_num_stmts, loop_cand::m_const_init_reduc): New members.
1285         (loop_cand::loop_cand): Initialize above members.
1286         (loop_cand::supported_operations): Delete.
1287         (loop_cand::can_interchange_p): Inline above function.
1288         (loop_cand::classify_simple_reduction): Record number of constant
1289         initialized simple reductions.
1290         (should_interchange_loops): New parameters.  Check stmt cost of loops
1291         to be interchange.
1292         (tree_loop_interchange::interchange): Prepare stmt cost of outer loop.
1293         Update call to should_interchange_loops.
1294         (should_interchange_loop_nest): Update call to
1295         should_interchange_loops.
1297 2017-12-15  Eric Botcazou  <ebotcazou@adacore.com>
1299         PR target/66488
1300         * ggc-page.c (HOST_BITS_PER_PTR): Do not define here...
1301         * hwint.h (HOST_BITS_PER_PTR): ...but here instead.
1302         * config/i386/xm-mingw32.h (HOST_BITS_PER_PTR): Delete.
1304 2017-12-15  Julia Koval  <julia.koval@intel.com>
1306         * config/i386/i386-builtin.def (__builtin_ia32_vaesenclast_v16qi,
1307         __builtin_ia32_vaesenclast_v32qi, __builtin_ia32_vaesenclast_v64qi): New.
1308         * config/i386/sse.md (vaesenclast_<mode>): New pattern.
1309         * config/i386/vaesintrin.h (_mm256_aesenclast_epi128,
1310         _mm512_aesenclast_epi128, _mm_aesenclast_epi128): New intrinsics.
1312 2017-12-15  Julia Koval  <julia.koval@intel.com>
1314         * config/i386/i386-builtin.def (__builtin_ia32_vaesenc_v16qi,
1315         __builtin_ia32_vaesenc_v32qi, __builtin_ia32_vaesenc_v64qi): New.
1316         * config/i386/sse.md (vaesenc_<mode>): New pattern.
1317         * config/i386/vaesintrin.h (_mm256_aesenc_epi128, _mm512_aesenc_epi128,
1318         _mm_aesenc_epi128): New intrinsics.
1320 2017-12-15  Julia Koval  <julia.koval@intel.com>
1322         * config/i386/i386-builtin.def (__builtin_ia32_vaesdeclast_v16qi,
1323         __builtin_ia32_vaesdeclast_v32qi, __builtin_ia32_vaesdeclast_v64qi): New.
1324         * config/i386/sse.md (vaesdeclast_<mode>): New pattern.
1325         * config/i386/vaesintrin.h (_mm256_aesdeclast_epi128,
1326         _mm512_aesdeclast_epi128, _mm_aesdeclast_epi128): New intrinsics.
1328 2017-12-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
1330         * gimple-ssa-strength-reduction.c (analyze_increments):
1331         Distinguish replacement costs for constant strides from those for
1332         unknown strides.
1334 2017-12-14  Jakub Jelinek  <jakub@redhat.com>
1336         * var-tracking.c (variable_tracking_main_1): Formatting fix.
1338 2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1340         * doc/invoke.texi: Document -Wcast-function-type.
1341         * recog.h (stored_funcptr): Change signature.
1342         * tree-dump.c (dump_node): Avoid warning.
1343         * typed-splay-tree.h (typed_splay_tree): Avoid warning.
1345 2017-12-14  Qing Zhao  <qing.zhao@oracle.com>
1347         PR middle_end/79538
1348         * gimple-fold.c (get_range_strlen): Add the handling of non-member 
1349         array.
1351 2017-12-14  David Malcolm  <dmalcolm@redhat.com>
1353         PR tree-optimization/83312
1354         * domwalk.h (dom_walker::dom_walker): Fix typo in comment.
1355         * tree-cfg.c (find_taken_edge): Update to handle NULL_TREE for
1356         "val" param, and to cope with arbitrary basic blocks.
1357         (find_taken_edge_cond_expr): Add "cond_stmt" param and use it to
1358         handle NULL_TREE for "val", dropping "bb" param.
1359         (find_taken_edge_switch_expr): Make "switch_stmt" param const and
1360         drop "bb" param.  Handle NULL_TREE for "val".
1361         (find_case_label_for_value): Make "switch_stmt" param const.
1362         * tree-vrp.c (class check_array_bounds_dom_walker): New subclass
1363         of dom_walker.
1364         (vrp_prop::check_all_array_refs): Reimplement as...
1365         (check_array_bounds_dom_walker::before_dom_children): ...this new
1366         vfunc.  Replace linear search through BB block list, excluding
1367         those with non-executable in-edges via dominator walk.
1369 2017-12-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1371         * config/arm/arm.opt (mverbose-cost-dump): New option.
1372         * config/arm/arm.c (arm_rtx_costs): Use it.
1374 2017-12-14  Andreas Schwab  <schwab@linux-m68k.org>
1376         PR bootstrap/83396
1377         * reload1.c (emit_input_reload_insns): Skip debug markers.
1379 2017-12-14  Alexandre Oliva <aoliva@redhat.com>
1381         * config/i386/i386.c (rest_of_insert_endbranch): Use call loc
1382         for its nop_endbr.
1384         PR bootstrap/83396
1385         * config/arc/arc.c (hwloop_optimize): Skip debug insns.
1386         * config/sh/sh-protos.h (sh_find_set_of_reg): Adjust.
1387         * config/sh/sh.c: Skip debug insns besides notes.
1388         * config/sh/sh.md: Likewise.
1389         * config/sh/sh_treg_combine.cc: Likewise.
1390         * config/sh/sync.md: Likewise.
1392 2017-12-14  Tom de Vries  <tom@codesourcery.com>
1394         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
1395         Add item for weak_undefined.
1397 2017-12-14  Richard Biener  <rguenther@suse.de>
1399         PR tree-optimization/67842
1400         * sese.h (bb_in_region): Remove #if 0'ed code.
1402 2017-12-14  Richard Biener  <rguenther@suse.de>
1404         PR tree-optimization/83326
1405         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Add
1406         may_be_zero parameter and handle it by not marking the first
1407         peeled copy as not exiting the loop.
1408         (try_peel_loop): Likewise.
1409         (canonicalize_loop_induction_variables): Use number_of_iterations_exit
1410         to handle the case of constant or zero iterations and perform
1411         loop header copying on-the-fly.
1413 2017-12-14  Richard Biener  <rguenther@suse.de>
1415         PR tree-optimization/83418
1416         * vr-values.c (vr_values::extract_range_for_var_from_comparison_expr):
1417         Instead of asserting we don't get unfolded comparisons deal with
1418         them.
1420 2017-12-14  Jakub Jelinek  <jakub@redhat.com>
1422         PR bootstrap/83396
1423         * var-tracking.c (vt_initialize): Ignore non-DEBUG_INSNs outside of
1424         basic blocks.  Assert debug bind insns don't appear outside of bbs,
1425         don't reset them.  Assert insns without BLOCK_FOR_INSN are outside of
1426         bb.  Simplify.
1428         PR tree-optimization/83198
1429         * gimple-ssa-sprintf.c (format_floating): Set type solely based on
1430         dir.modifier, regardless of TREE_TYPE (arg).  Assume non-REAL_CST
1431         value if arg is a REAL_CST with incompatible type.
1433 2017-12-14  Sudakshina Das  <sudi.das@arm.com>
1434             Bin Cheng  <bin.cheng@arm.com>
1436         PR target/81228
1437         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Move LTGT
1438         to CCFPEmode.
1439         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Add
1440         LTGT.
1442 2017-12-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1444         * config/aarch64/aarch64-cores.def (cortex-a55, cortex-a75,
1445         cortex-a75.cortex-a55): Specify AARCH64_FL_F16 in the arch features.
1447 2017-12-14  Richard Sandiford  <richard.sandiford@linaro.org>
1448             Alan Hayward  <alan.hayward@arm.com>
1449             David Sherwood  <david.sherwood@arm.com>
1451         * poly-int.h: New file.
1452         * poly-int-types.h: Likewise.
1453         * coretypes.h: Include them.
1454         (POLY_INT_CONVERSION): Define.
1455         * target.def (estimated_poly_value): New hook.
1456         * doc/tm.texi.in (TARGET_ESTIMATED_POLY_VALUE): New hook.
1457         * doc/tm.texi: Regenerate.
1458         * doc/poly-int.texi: New file.
1459         * doc/gccint.texi: Include it.
1460         * doc/rtl.texi: Describe restrictions on subreg modes.
1461         * Makefile.in (TEXI_GCCINT_FILES): Add poly-int.texi.
1462         * genmodes.c (NUM_POLY_INT_COEFFS): Provide a default definition.
1463         (emit_insn_modes_h): Emit a definition of NUM_POLY_INT_COEFFS.
1464         * targhooks.h (default_estimated_poly_value): Declare.
1465         * targhooks.c (default_estimated_poly_value): New function.
1466         * target.h (estimated_poly_value): Likewise.
1467         * wide-int.h (WI_UNARY_RESULT): Use wi::binary_traits.
1468         (wi::unary_traits): Delete.
1469         (wi::binary_traits::signed_shift_result_type): Define for
1470         offset_int << HOST_WIDE_INT, etc.
1471         (generic_wide_int::operator <<=): Define for all types and use
1472         wi::lshift instead of <<.
1473         (wi::hwi_with_prec): Add a default constructor.
1474         (wi::ints_for): New class.
1475         (operator <<): Define for all wide-int types.
1476         (operator /): New function.
1477         (operator %): Likewise.
1478         * selftest.h (ASSERT_KNOWN_EQ, ASSERT_KNOWN_EQ_AT, ASSERT_MAYBE_NE)
1479         (ASSERT_MAYBE_NE_AT): New macros.
1481 2017-12-13  Eric Botcazou  <ebotcazou@adacore.com>
1482             Dominik Vogt  <vogt@linux.vnet.ibm.com>
1484         PR middle-end/78468
1485         * emit-rtl.c (init_emit): Remove ??? comment.
1486         * explow.c (get_dynamic_stack_size): Take known alignment of stack
1487         pointer + STACK_DYNAMIC_OFFSET into account in lieu of STACK_BOUNDARY.
1488         * config/sparc/sparc.h (INIT_EXPANDERS): In 32-bit mode, lower the
1489         alignment of 3 virtual registers to BITS_PER_WORD.
1491         * config/sparc/sparc.c (sparc_compute_frame_size): Simplify.
1493 2017-12-13  Peter Bergner  <bergner@vnet.ibm.com>
1495         * config/rs6000/ppc-auxv.h (PPC_FEATURE2_HTM_NO_SUSPEND): New define.
1496         * config/rs6000/rs6000.c (cpu_supports_info): Use it.
1498 2017-12-13  Alexandre Oliva <aoliva@redhat.com>
1500         PR bootstrap/83396
1501         * reload1.c (eliminate_regs_in_insn): Skip debug markers.
1503 2017-12-13  Jakub Jelinek  <jakub@redhat.com>
1505         * tree-cfg.c (verify_gimple_in_cfg): Verify no non-label stmts
1506         with the exception of debug begin stmt markers appear before
1507         labels.
1509         PR bootstrap/83396
1510         * final.c (rest_of_handle_final): Call variable_tracking_main only
1511         if !flag_var_tracking.
1513 2017-12-13  Alexandre Oliva  <aoliva@redhat.com>
1514             Jakub Jelinek  <jakub@redhat.com>
1516         PR bootstrap/83396
1517         PR debug/83391
1518         * tree-cfgcleanup.c (remove_forwarder_block): Keep after
1519         labels debug stmts that can only appear after labels.
1521 2017-12-13  Alexander Monakov  <amonakov@ispras.ru>
1523         PR rtl-optimization/82398
1524         * sel-sched.c (sel_rank_for_schedule): Fix check for zero
1525         EXPR_USEFULNESS in priority comparison.
1527 2017-12-13  Segher Boessenkool  <segher@kernel.crashing.org>
1529         PR rtl-optimization/83393
1530         * combine.c (move_deaths): If reg_stat points to a too new insn in
1531         last_death, do not use it: find the proper insn instead.
1533 2017-12-12  Jeff Law  <law@redhat.com>
1535         PR tree-optimization/83298
1536         PR tree-optimization/83362
1537         PR tree-optimization/83383
1538         * gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Make
1539         push_value_range a public interface.  Add new argument to
1540         record_ranges_from_stmt.
1541         * gimple-ssa-evrp-analyze.c
1542         (evrp_range_analyzer::record_ranges_from_stmt): Add new argument.
1543         Update comments.  Handle recording temporary equivalences.
1544         * tree-ssa-dom.c (dom_opt_opt_walker::before_dom_children): Add
1545         new argument to call to evrp_range_analyzer::record_ranges_from_stmt.
1546         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Likewise.
1547         * tree-ssa-threadedge.c: Include alloc-pool.h, vr-values.h and
1548         gimple-ssa-evrp-analyze.h.
1549         (record_temporary_equivalences_from_phis): Add new argument.  When
1550         the PHI arg is an SSA_NAME, set the result's range to the range
1551         of the PHI arg.
1552         (record_temporary_equivalences_from_stmts_at_dest): Record ranges
1553         from statements too.
1554         (thread_through_normal_block): Accept new argument, evrp_range_analyzer.
1555         Pass it down to children as needed.
1556         (thread_outgoing_edges): Likewise.
1557         (thread_across_edge): Likewise.   Push/pop range state as needed.
1558         * tree-ssa-threadedge.h (thread_outgoing_edges): Update prototype.
1560 2017-12-12  Julia Koval  <julia.koval@intel.com>
1562         * config/i386/i386.c (PTA_SKYLAKE_AVX512): Add PTA_CLWB.
1563         (PTA_CANNONLAKE): Remove PTA_CLWB.
1565 2017-12-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
1567         PR target/83332
1568         * config/rs6000/vector.md (vcondv2dfv2di): New define_expand.
1569         (vcondv2div2df): Likewise.
1570         (vconduv2dfv2di): Likewise.
1572 2017-12-12  Jakub Jelinek  <jakub@redhat.com>
1574         * builtins.def (BUILT_IN_NEXTAFTER, BUILT_IN_NEXTAFTERF,
1575         BUILT_IN_NEXTAFTERL, BUILT_IN_NEXTTOWARD, BUILT_IN_NEXTTOWARDF,
1576         BUILT_IN_NEXTTOWARDL): Use ATTR_MATHFN_ERRNO instead of
1577         ATTR_MATHFN_FPROUNDING_ERRNO.
1579 2017-12-12  Richard Biener  <rguenther@suse.de>
1581         PR tree-optimization/83385
1582         * graphite-scop-detection.c (get_order, order): Remove.
1583         (bb_to_rpo): New global.
1584         (cmp_pbbs): Adjust.
1585         (build_scops): Sort pbbs in RPO order.
1587 2017-12-12  James Greenhalgh  <james.greenhalgh@arm.com>
1589         * combine.c (simplify_set): Do not transform subregs to zero_extends
1590         if the destination mode is a vector mode.
1592 2017-12-12  Jakub Jelinek  <jakub@redhat.com>
1594         PR tree-optimization/83359
1595         * tree-cfg.h (fold_loop_internal_call): Declare.
1596         * tree-vectorizer.c (fold_loop_internal_call): Moved to ...
1597         * tree-cfg.c (fold_loop_internal_call): ... here.  No longer static.
1598         (find_loop_dist_alias): New function.
1599         (move_sese_region_to_fn): If any dloop->orig_loop_num value is
1600         updated, also adjust any corresponding LOOP_DIST_ALIAS internal
1601         calls.
1603         PR tree-optimization/80631
1604         * tree-vect-loop.c (get_initial_def_for_reduction): Fix comment typo.
1605         (vect_create_epilog_for_reduction): Add INDUC_VAL and INDUC_CODE
1606         arguments, for INTEGER_INDUC_COND_REDUCTION use INDUC_VAL instead of
1607         hardcoding zero as the value if COND_EXPR is never true.  For
1608         INTEGER_INDUC_COND_REDUCTION don't emit the final COND_EXPR if
1609         INDUC_VAL is equal to INITIAL_DEF, and use INDUC_CODE instead of
1610         hardcoding MAX_EXPR as the reduction operation.
1611         (is_nonwrapping_integer_induction): Allow negative step.
1612         (vectorizable_reduction): Compute INDUC_VAL and INDUC_CODE for
1613         vect_create_epilog_for_reduction, if no value is suitable, don't
1614         use INTEGER_INDUC_COND_REDUCTION for now.  Formatting fixes.
1616 2017-12-12  Richard Biener  <rguenther@suse.de>
1618         PR tree-optimization/81889
1619         * tree-ssa-loop-niter.c (infer_loop_bounds_from_signedness): Use
1620         range info from the non-wrapping IV instead of just the range
1621         of the type.
1623 2017-12-12  Julia Koval  <julia.koval@intel.com>
1625         * config.gcc: Add vaesintrin.h.
1626         * config/i386/i386-builtin-types.def (V64QI_FTYPE_V64QI_V64QI):
1627         New type.
1628         * config/i386/i386-builtin.def (__builtin_ia32_vaesdec_v16qi,
1629         __builtin_ia32_vaesdec_v32qi, __builtin_ia32_vaesdec_v64qi):
1630         New builtins.
1631         * config/i386/i386.c (ix86_expand_args_builtin): Handle new type.
1632         * config/i386/immintrin.h: Include vaesintrin.h.
1633         * config/i386/sse.md (vaesdec_<mode>): New pattern.
1634         * config/i386/vaesintrin.h (_mm256_aesdec_epi128, _mm512_aesdec_epi128,
1635         _mm_aesdec_epi128): New intrinsics.
1637 2017-12-12  Julia Koval  <julia.koval@intel.com>
1639         * common/config/i386/i386-common.c (OPTION_MASK_ISA_VAES_SET,
1640         OPTION_MASK_ISA_VAES_UNSET): New.
1641         (ix86_handle_option): Handle -mvaes.
1642         * config/i386/cpuid.h: Define bit_VAES.
1643         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mvaes.
1644         * config/i386/i386-c.c (__VAES__): New.
1645         * config/i386/i386.c (ix86_target_string): Add -mvaes.
1646         (ix86_valid_target_attribute_inner_p): Ditto.
1647         * config/i386/i386.h (TARGET_VAES, TARGET_VAES_P): New.
1648         * config/i386/i386.opt: Add -mvaes.
1649         * doc/invoke.texi: Ditto.
1651 2017-12-12  Alexandre Oliva  <aoliva@redhat.com>
1653         * debug.h (gcc_debug_hooks): Add inline_entry.
1654         * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
1655         * debug.c (do_nothing_debug_hooks): Likewise.
1656         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
1657         * dwarf2out.c (dwarf2_debug_hooks): Likewise.
1658         (dwarf2_lineno_debug_hooks): Likewise.
1660         * common.opt (gstatement-frontiers): New, setting
1661         debug_nonbind_markers_p.
1662         * rtl.h (MAY_HAVE_DEBUG_MARKER_INSNS): Activate.
1663         * toplev.c (process_options): Autodetect value for debug statement
1664         frontiers option.
1665         * tree.h (MAY_HAVE_DEBUG_MARKER_STMTS): Activate.
1666         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers): New.
1668         * cfgexpand.c (expand_gimple_basic_block): Handle begin stmt
1669         markers.  Integrate source bind into debug stmt expand loop.
1670         (pass_expand::execute): Check debug marker limit.  Avoid deep
1671         TER and expand debug locations for debug bind insns only.
1672         * cse.c (insn_live_p): Keep nonbind markers and debug bindings
1673         followed by them.
1674         * df-scan.c (df_insn_delete): Accept out-of-block debug insn.
1675         * final.c (reemit_insn_block_notes): Take current block from
1676         nonbind markers.  Declare note where it's first set.
1677         (final_scan_insn): Handle begin stmt notes.  Emit is_stmt according to
1678         begin stmt markers if enabled.
1679         (notice_source_line): Handle nonbind markers.  Fail if their
1680         location is unknown or that of builtins.
1681         (rest_of_handle_final): Convert begin stmt markers to notes if
1682         var-tracking didn't run.
1683         (rest_of_clean_state): Skip begin stmt markers.
1684         * gimple-pretty-print.c (dump_gimple_debug): Handle begin stmt
1685         markers.
1686         * function.c (allocate_struct_function): Set begin_stmt_markers.
1687         * function.h (struct function): Add debug_marker_count counter
1688         and debug_nonbind_markers flag.
1689         * gimple-iterator.c (gsi_remove): Adjust debug_marker_count.
1690         * gimple-low.c (lower_function_body): Adjust
1691         debug_nonbind_markers.
1692         (lower_stmt): Drop or skip gimple debug stmts.
1693         (lower_try_catch): Skip debug stmts.
1694         * gimple.c (gimple_build_debug_begin_stmt): New.
1695         (gimple_copy): Increment debug_marker_count if copying one.
1696         * gimple.h (gimple_build_debug_begin_stmt): Declare.
1697         * gimplify.c (rexpr_location): New.
1698         (rexpr_has_location): New.
1699         (warn_switch_unreachable_r): Handle gimple debug stmts.
1700         (shortcut_cond_r): Call expr_location.
1701         (find_goto): New.
1702         (find_goto_label): New.
1703         (shortcut_cond_expr): Call expr_has_location, expr_location, and
1704         find_goto_label.
1705         (gimplify_cond_expr): Call find_goto_label, expr_has_location, and
1706         expr_location.
1707         (gimplify_expr): Handle begin stmt markers.  Reject debug expr decls.
1708         * langhooks-def.h (LANG_HOOKS_EMITS_BEGIN_STMT): New.  Add to...
1709         (LANG_HOOKS_INITIALIZER): ... this.
1710         * langhooks.h (struct lang_hooks): Add emits_begin_stmt.
1711         * lra-contraints.c (inherit_reload_reg): Tolerate between-blocks
1712         debug insns.
1713         (update_ebb_live_info): Skip debug insn markers.
1714         * lra.c (debug_insn_static_data): Rename to...
1715         (debug_bind_static_data): ... this.
1716         (debug_marker_static_data): New.
1717         (lra_set_insn_recog_data): Select one of the above depending
1718         on debug insn kind.
1719         (lra_update_isn_regno_info): Don't assume debug insns have
1720         freqs.
1721         (push_insns): Skip debug insns.
1722         * lto-streamer-in.c (input_function): Drop debug stmts
1723         depending on active options.  Adjust debug_nonbind_markers.
1724         * params.def (PARAM_MAX_DEBUG_MARKER_COUNT): New.
1725         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
1726         begin stmt marker notes.
1727         (print_insn): Likewise.
1728         * recog.c (extract_insn): Recognize rtl for debug markers.
1729         * rtl.def (DEBUG_MARKER): New.
1730         * tree-inline.c: Include params.h.
1731         (remap_gimple_stmt): Handle nonbind markers.
1732         (maybe_move_debug_stmts_to_successors): Likewise.
1733         (copy_debug_stmt): Likewise.
1734         * tree-iterator.c (append_to_statement_list_1): Append begin stmt
1735         markers regardless of no side effects.
1736         (tsi_link_before): Don't update container's side effects when adding
1737         a begin stmt marker.
1738         (tsi_link_after): Likewise.
1739         (expr_first): Skip begin stmt markers.
1740         (expr_last): Likewise.
1741         * tree-pretty-print (dump_generic_node): Handle begin stmt markers.
1742         * tree-ssa-threadedge.c (propagate_threaded_block_debug_info):
1743         Disregard nonbind markers.
1744         * tree.c (make_node_stat): Don't set side effects for begin stmt
1745         markers.
1746         (build1_stat): Likewise.
1747         * tree.def (DEBUG_BEGIN_STMT): New.
1748         * tree.h (GOTO_DESTINATION): Require a GOTO_EXPR.
1749         * var-tracking.c (delete_debug_insns): Renamed to...
1750         (delete_vta_debug_insns): ... this.
1751         (reemit_marker_as_note): New.
1752         (vt_initialize): Reemit markers.
1753         (delete_vta_debug_insns): Likewise.
1754         (vt_debug_insns_local): Reemit or delete markers.
1755         (variable_tracking_main_1): Likewise.
1756         * doc/generic.texi (DEBUG_BEGIN_STMT): Document.
1757         * doc/gimple.texi (gimple_debug_begin_stmt_p): New.
1758         (gimple_debug_nonbind_marker_p): New.
1759         (gimple_build_debug_bind): Adjust.
1760         (gimple_build_debug_begin_stmt): New.
1761         * doc/invoke.texi (max-debug-marker-count): New param.
1762         * doc/rtl.texi (debug_implicit_ptr, entry_value): New.
1763         (debug_parameter_ref, debug_marker): New.
1764         (NOTE_INSN_BEGIN_STMT): New.
1765         (DEBUG_INSN): Describe begin stmt markers.
1767         * cfgbuild.c (find_bb_boundaries): Don't purge dead edges if,
1768         without debug insns, we wouldn't, but clean up debug insns
1769         after a control flow insn nevertheless.
1771         * cfgcleanup.c (delete_unreachable_blocks): Use alternate
1772         block removal order if MAY_HAVE_DEBUG_BIND_INSNS.
1773         * cfgexpand.c (label_rtx_for_bb): Skip debug insns.
1774         * cfgrtl.c (try_redirect_by_replacing_jump): Skip debug insns.
1775         (rtl_tidy_fallthru_edge): Likewise.
1776         (rtl_verify_fallthru): Likewise.
1777         (rtl_verify_bb_layout): Likewise.
1778         (skip_insns_after_block): Likewise.
1779         (duplicate_insn_chain): Use DEBUG_BIND_INSN_P.
1780         * dwarf2out.c: Include print-rtl.h.
1781         (dwarf2out_next_real_insn): New.
1782         (dwarf2out_var_location): Call it.  Disregard begin stmt markers.
1783         Dump debug binds in asm comments.
1784         * gimple-iterator.c (gimple_find_edge_insert_loc): Skip debug stmts.
1785         * gimple-iterator.h (gsi_start_bb_nondebug): Remove; adjust
1786         callers to use gsi_start_nondebug_bb instead.
1787         (gsi_after_labels): Skip gimple debug stmts.
1788         (gsi_start_nondebug): New.
1789         * gimple-loop-interchange.c (find_deps_in_bb_for_stmt): Adjust.
1790         (proper_loop_form_for_interchange): Adjust.
1791         * gimple-low.c (gimple_seq_may_fallthru): Take last nondebug stmt.
1792         * gimple.h (gimple_seq_last_nondebug_stmt): New.
1793         * gimplify.c (last_stmt_in_scope): Skip debug stmts.
1794         (collect_fallthrough_labels): Likewise.
1795         (should_warn_for_implicit_fallthrough): Likewise.
1796         (warn_implicit_fallthrough_r): Likewise.
1797         (expand_FALLTHROUGH_r): Likewise.
1798         * graphite-isl-ast-to-gimple.c (gsi_insert_earliest): Adjust.
1799         (graphite_copy_stmts_from_block): Skip nonbind markers.
1800         * haifa-sched.c (sched_extend_bb): Skip debug insns.
1801         * ipa-icf-gimple.c (func_checker::compare_bb): Adjust.
1802         * jump.c (clean_barriers): Skip debug insns.
1803         * omp-expand.c (expand_parallel_call): Skip debug insns.
1804         (expand_task_call): Likewise.
1805         (remove_exit_barrier): Likewise.
1806         (expand_omp_taskreg): Likewise.
1807         (expand_omp_for_init_counts): Likewise.
1808         (expand_omp_for_generic): Likewise.
1809         (expand_omp_for_static_nochunk): Likewise.
1810         (expand_omp_for_static_chunk): Likewise.
1811         (expand_omp_simd): Likewise.
1812         (expand_omp_taskloop_for_outer): Likewise.
1813         (expand_omp_taskloop_for_inner): Likewise.
1814         (expand_oacc_for): Likewise.
1815         (expand_omp_sections): Likewise.
1816         (expand_omp_single): Likewise.
1817         (expand_omp_synch): Likewise.
1818         (expand_omp_atomic_load): Likewise.
1819         (expand_omp_atomic_store): Likewise.
1820         (expand_omp_atomic_fetch_op): Likewise.
1821         (expand_omp_atomic_pipeline): Likewise.
1822         (expand_omp_atomic_mutex): Likewise.
1823         (expand_omp_target): Likewise.
1824         (grid_expand_omp_for_loop): Likewise.
1825         (grid_expand_target_grid_body): Likewise.
1826         (build_omp_regions_1): Likewise.
1827         * omp-low.c (check_combined_parallel): Skip debug stmts.
1828         * postreload.c (fixup_debug_insns): Skip nonbind debug insns.
1829         * regcprop.c (find_oldest_value_reg): Ensure REGNO is not a pseudo.
1830         * sese.c (sese_trivially_empty_bb_p): Call is_gimple_debug in
1831         test.
1832         * tree-cfg.c (make_blobs_1): Skip debug stmts.
1833         (make_edges): Likewise.
1834         (cleanup_dead_labels): Likewise.
1835         (gimple_can_merge_blocks_p): Likewise.
1836         (stmt_starts_bb_p): Likewise.
1837         (gimple_block_label): Likewise.
1838         (gimple_redirect_edge_and_branch): Likewise.
1839         * tree-cfgcleanup.c (remove_forwarder_block): Rearrange skipping
1840         of debug stmts.
1841         (execute_cleanup_cfg_post_optimizing): Dump enumerated decls with
1842         TDF_SLIM.
1843         * tree-pretty-print (print_declaration): Omit initializer in slim
1844         dumps.
1845         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Mark begin stmt
1846         markers.
1847         (eliminate_unnecessary_stmts): Stabilize block removal order.
1848         * tree-ssa-tail-merge.c (find_duplicate): Skip debug stmts.
1849         * var-tracking.c (get_first_insn): New.
1850         (vt_emit_notes): Call it.
1851         (vt_initialize): Walk any insns before the first BB.
1852         (delete_debug_insns): Likewise.
1854         * gimple.h (enum gimple_debug_subcode): Add
1855         GIMPLE_DEBUG_BEGIN_STMT.
1856         (gimple_debug_begin_stmt_p): New.
1857         (gimple_debug_nonbind_marker_p): New.
1858         * tree.h (MAY_HAVE_DEBUG_MARKER_STMTS): New.
1859         (MAY_HAVE_DEBUG_BIND_STMTS): Renamed from....
1860         (MAY_HAVE_DEBUG_STMTS): ... this.  Check both.
1861         * insn-notes.def (BEGIN_STMT): New.
1862         * rtl.h (MAY_HAVE_DEBUG_MARKER_INSNS): New.
1863         (MAY_HAVE_DEBUG_BIND_INSNS): Renamed from....
1864         (MAY_HAVE_DEBUG_INSNS): ... this.  Check both.
1865         (NOTE_MARKER_LOCATION, NOTE_MARKER_P): New.
1866         (DEBUG_BIND_INSN_P, DEBUG_MARKER_INSN_P): New.
1867         (INSN_DEBUG_MARKER_KIND): New.
1868         (GEN_RTX_DEBUG_MARKER_BEGIN_STMT_PAT): New.
1869         (INSN_VAR_LOCATION): Check for VAR_LOCATION.
1870         (INSN_VAR_LOCATION_PTR): New.
1871         * cfgexpand.c (expand_debug_locations): Handle debug bind insns
1872         only.
1873         (expand_gimple_basic_block): Likewise.  Emit debug temps for TER
1874         deps only if debug bind insns are enabled.
1875         (pass_expand::execute): Avoid deep TER and expand
1876         debug locations for debug bind insns only.
1877         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Narrow
1878         debug stmts special handling down to debug bind stmts.
1879         * combine.c (try_combine): Narrow debug insns special handling
1880         down to debug bind insns.
1881         * cse.c (delete_trivially_dead_insns): Handle debug bindings.
1882         Narrow debug insns preexisting special handling down to debug
1883         bind insns.
1884         * dce.c (rest_of_handle_ud_dce): Narrow debug insns special
1885         handling down to debug bind insns.
1886         * function.c (instantiate_virtual_regs): Skip debug markers,
1887         adjust handling of debug binds.
1888         * gimple-ssa-backprop.c (backprop::prepare_change): Try debug
1889         temp insertion iff MAY_HAVE_DEBUG_BIND_STMTS.
1890         * haifa-sched.c (schedule_insn): Narrow special handling of debug
1891         insns to debug bind insns.
1892         * ipa-param-manipulation.c (ipa_modify_call_arguments): Narrow
1893         special handling of debug stmts to debug bind stmts.
1894         * ipa-split.c (split_function): Likewise.
1895         * ira.c (combine_and_move_insns): Adjust debug bind insns only.
1896         * loop-unroll.c (apply_opt_in_copies): Adjust tests on bind
1897         debug insns.
1898         * reg-stack.c (convert_regs_1): Use DEBUG_BIND_INSN_P.
1899         * regrename.c (build_def_use): Likewise.
1900         * regcprop.c (copyprop_hardreg_forward_1): Likewise.
1901         (pass_cprop_hardreg): Narrow special casing of debug insns to
1902         debug bind insns.
1903         * regstat.c (regstat_init_n_sets_and_refs): Likewise.
1904         * reload1.c (reload): Likewise.
1905         * sese.c (sese_insert_phis_for_liveouts): Narrow special
1906         casing of debug stmts to debug bind stmts.
1907         * shrink-wrap.c (move_insn_for_shrink_wrap): Likewise.
1908         * ssa-iterators.h (num_imm_uses): Likewise.
1909         * tree-cfg.c (gimple_merge_blocks): Narrow special casing of
1910         debug stmts to debug bind stmts.
1911         * tree-inline.c (tree_function_versioning): Narrow special casing
1912         of debug stmts to debug bind stmts.
1913         * tree-loop-distribution.c (generate_loops_for_partition):
1914         Narrow special casing of debug stmts to debug bind stmts.
1915         * tree-sra.c (analyze_access_subtree): Narrow special casing
1916         of debug stmts to debug bind stmts.
1917         * tree-ssa-dce.c (remove_dead_stmt): Narrow special casing of debug
1918         stmts to debug bind stmts.
1919         * tree-ssa-loop-ivopt.c (remove_unused_ivs): Narrow special
1920         casing of debug stmts to debug bind stmts.
1921         * tree-ssa-reassoc.c (reassoc_remove_stmt): Likewise.
1922         * tree-ssa-tail-merge.c (tail_merge_optimize): Narrow special
1923         casing of debug stmts to debug bind stmts.
1924         * tree-ssa-threadedge.c (propagate_threaded_block_debug_info):
1925         Likewise.
1926         * tree-ssa.c (flush_pending_stmts): Narrow special casing of
1927         debug stmts to debug bind stmts.
1928         (gimple_replace_ssa_lhs): Likewise.
1929         (insert_debug_temp_for_var_def): Likewise.
1930         (insert_debug_temps_for_defs): Likewise.
1931         (reset_debug_uses): Likewise.
1932         * tree-ssanames.c (release_ssa_name_fn): Likewise.
1933         * tree-vect-loop-manip.c (adjust_debug_stmts_now): Likewise.
1934         (adjust_debug_stmts): Likewise.
1935         (adjust_phi_and_debug_stmts): Likewise.
1936         (vect_do_peeling): Likewise.
1937         * tree-vect-loop.c (vect_transform_loop): Likewise.
1938         * valtrack.c (propagate_for_debug): Use BIND_DEBUG_INSN_P.
1939         * var-tracking.c (adjust_mems): Narrow special casing of debug
1940         insns to debug bind insns.
1941         (dv_onepart_p, dataflow_set_clar_at_call, use_type): Likewise.
1942         (compute_bb_dataflow, vt_find_locations): Likewise.
1943         (vt_expand_loc, emit_notes_for_changes): Likewise.
1944         (vt_init_cfa_base): Likewise.
1945         (vt_emit_notes): Likewise.
1946         (vt_initialize): Likewise.
1947         (vt_finalize): Likewise.
1949         * emit-rtl.c (next_nondebug_insn, prev_nondebug_insn): Reorder.
1950         (next_nonnote_nondebug_insn, prev_nonnote_nondebug_insn): Reorder.
1951         (next_nonnote_nondebug_insn_bb): New.
1952         (prev_nonnote_nondebug_insn_bb): New.
1953         (prev_nonnote_insn_bb, next_nonnote_insn_bb): Remove.
1954         * rtl.h (prev_nonnote_insn_bb, next_nonnote_insn_bb): Remove decls.
1955         (prev_nonnote_nondebug_insn_bb): Declare.
1956         (next_nonnote_nondebug_insn_bb): Declare.
1957         * cfgbuild.c (find_bb_boundaries): Adjust to skip debug insns.
1958         * cfgrtl.c (get_last_bb_insn): Likewise.
1959         * lra.c (push_insns): Likewise.
1961 2017-12-11  David Malcolm  <dmalcolm@redhat.com>
1963         PR c/82050
1964         * selftest-run-tests.c (selftest::run_tests): Move start/finish code
1965         to...
1966         * selftest.c (selftest::test_runner::test_runner): New ctor.
1967         (selftest::test_runner::~test_runner): New dtor.
1968         * selftest.h (class selftest::test_runner): New class.
1970 2017-12-11  Carl Love  <cel@us.ibm.com>
1972         * config/rs6000/altivec.h (vec_extract_fp32_from_shorth,
1973         vec_extract_fp32_from_shortl]): Add #defines.
1974         * config/rs6000/rs6000-builtin.def (VSLDOI_2DI): Add macro expansion.
1975         * config/rs6000/rs6000-c.c (ALTIVEC_BUILTIN_VEC_UNPACKH,
1976         ALTIVEC_BUILTIN_VEC_UNPACKL, ALTIVEC_BUILTIN_VEC_AND,
1977         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SRL,
1978         ALTIVEC_BUILTIN_VEC_SRO, ALTIVEC_BUILTIN_VEC_SLD,
1979         ALTIVEC_BUILTIN_VEC_SLL): Add expansions.
1980         * doc/extend.texi: Add documentation for the added builtins.
1982 2017-12-11  Alexandre Oliva  <aoliva@redhat.com>
1984         PR rtl-optimization/80693
1985         PR rtl-optimization/81019
1986         PR rtl-optimization/81020
1987         * combine.c (distribute_notes): Reset any REG_UNUSED REGs that
1988         are not mentioned in i3.  Place the REG_UNUSED note on i2,
1989         possibly modified to REG_DEAD, if it did not originate in i3.
1991 2017-12-11  Jakub Jelinek  <jakub@redhat.com>
1993         * recog.c (store_data_bypass_p_1): New function.
1994         (store_data_bypass_p): Handle USE in a PARALLEL like CLOBBER.  Use
1995         store_data_bypass_p_1 to avoid code duplication.  Formatting fixes.
1997 2017-12-11  Segher Boessenkool  <segher@kernel.crashing.org>
1999         PR rtl-optimization/83361
2000         * ifcvt.c (if_convert): Call fixup_partitions.
2002 2017-12-11  Will Schmidt  <will_schmidt@vnet.ibm.com>
2004         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
2005         early folding of splat_u{8,16,32}.
2007 2017-12-11  Jakub Jelinek  <jakub@redhat.com>
2009         * config/aarch64/aarch64.c (aarch64_print_operand): Don't start
2010         output_operand_lossage first argument with capital letter.
2011         (aarch64_override_options): Don't start error and sorry first argument
2012         with capital letter.
2014 2017-12-11  Andi Kleen  <ak@linux.intel.com>
2016         PR gcov-profile/83355
2017         * auto-profile.c (string_table::get_index_by_decl): Don't
2018         recurse when abstract origin points to itself.
2020 2017-12-11  Bin Cheng  <bin.cheng@arm.com>
2022         PR tree-optimization/83320
2023         * gimple-loop-interchange.cc (free_data_refs_with_aux): Use delete.
2024         (prune_datarefs_not_in_loop): Ditto.
2026 2017-12-10  Gerald Pfeifer  <gerald@pfeifer.com>
2028         * doc/install.texi (Specific): Tweak link to mkssoftware.com.
2030 2017-12-10  Jakub Jelinek  <jakub@redhat.com>
2032         PR tree-optimization/83337
2033         * gimple-loop-interchange.cc (compute_access_stride): Handle
2034         bitfield DRs properly.
2036 2017-12-09  Jakub Jelinek  <jakub@redhat.com>
2038         PR tree-optimization/83338
2039         * tree-vect-stmts.c (vectorizable_operation): Handle POINTER_DIFF_EXPR
2040         vectorization as MINUS_EXPR with a subsequent VIEW_CONVERT_EXPR from
2041         vector of unsigned integers to vector of signed integers.
2043 2017-12-08  Vladimir Makarov  <vmakarov@redhat.com>
2045         PR rtl-optimization/83317
2046         * lra-constraints.c (process_address_1): Add insn code check.
2048 2017-12-08  Michael Matz  <matz@suse.de>
2050         Fix PR tree-optimization/83323
2051         * gimple-loop-jam (unroll_jam_possible_p): Correct test for
2052         head-controlled loops and loop BBs.
2053         * common.opt (funroll-and-jam): Remove, instead ...
2054         (floop-unroll-and-jam): ... reuse this option.
2055         * opts.c (default_options_table): Use OPT_floop_unroll_and_jam.
2056         * doc/invoke.texi (-funroll-and-jam): Move docu to ...
2057         (-floop-unroll-and-jam): ... this option.
2059 2017-12-08  Jakub Jelinek  <jakub@redhat.com>
2061         * ipa-polymorphic-call.c (noncall_stmt_may_be_vtbl_ptr_store): Fix
2062         a comment typo, get_base_ref_and_offset -> get_ref_base_and_extent.
2063         * ipa-prop.c (stmt_may_be_vtbl_ptr_store): Likewise.
2065 2017-12-08  Richard Biener  <rguenther@suse.de>
2067         PR middle-end/81782
2068         * tree-ssa-uninit.c (warn_uninitialized_vars): Properly
2069         handle accesses outside of zero-sized vars.
2071 2017-12-08  Martin Jambor  <mjambor@suse.cz>
2073         PR tree-optimization/83141
2074         * tree-sra.c (contains_vce_or_bfcref_p): Move up in the file, also
2075         test for MEM_REFs implicitely changing types with padding.  Remove
2076         inline keyword.
2077         (build_accesses_from_assign): Added contains_vce_or_bfcref_p checks.
2079 2017-12-08  Jakub Jelinek  <jakub@redhat.com>
2081         * config/arc/arc.c (arc_attribute_table): Add exclusions to
2082         the comment.
2083         * config/avr/avr.c (avr_attribute_table): Likewise.
2084         * config/msp430/msp430.c (msp430_attribute_table): Likewise.
2085         * config/rl78/rl78.c (rl78_attribute_table): Likewise.
2086         * config/nds32/nds32.c (nds32_attribute_table): Likewise.
2087         * config/darwin.h (SUBTARGET_ATTRIBUTE_TABLE): Initialize new member
2088         of struct attribute_spec.
2089         * config/i386/cygming.h (SUBTARGET_ATTRIBUTE_TABLE): Likewise.
2091 2017-12-08  Ulrich Weigand  <uweigand@de.ibm.com>
2093         PR target/82960
2094         * config/spu/spu.c (pad_bb): Only check INSN_CODE when INSN_P is true.
2096 2017-12-08  Jan Hubicka  <hubicka@ucw.cz>
2098         PR middle-end/83609
2099         * profile-count.c (profile_count::from_gcov_type): Move from
2100         profile-count.h; handle overflow.
2101         * profile-count.h (profile_count::from_gcov_type): Move offline.
2103 2017-12-08  Segher Boessenkool  <segher@kernel.crashing.org>
2105         PR rtl-optimization/83304
2106         * combine.c (move_deaths): If we do not know where a register died,
2107         search for it.
2109 2017-12-08  Richard Biener  <rguenther@suse.de>
2111         * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
2112         Provide -fopt-info-loop feedback when we interchange in a nest.
2114 2017-06-08  Richard Earnshaw  <rearnsha@arm.com>
2116         * config/arm/driver-arm.c (arm_cpu_table): Use fp-capable product names
2117         for armv6 ARM CPU IDs.
2119 2017-06-08  Richard Earnshaw  <rearnsha@arm.com>
2121         * common/config/arm/arm-common.c: Include <algorithm>.
2122         (INCLUDE_VECTOR): Define.
2123         (compare_opt_names): New function.
2124         (arm_rewrite_selected_arch): Only strip out extensions that can be
2125         expressed through -mfpu.  Sort the remaining extensions
2126         alphabetically.
2128 2017-06-08  Richard Earnshaw  <rearnsha@arm.com>
2130         * config/arm/arm.h (arm_asm_auto_mfpu): Declare.
2131         (ASM_CPU_SPEC_FUNCTIONS): Add new rule asm_auto_mfpu.
2132         (ASM_CPU_SPEC): Use it if -mfpu is set to auto.
2133         * common/config/arm/arm-common.c (arm_asm_auto_mfpu): New function.
2135 2017-06-08  Tristan Gingold  <gindold@adacore.com>
2137         PR ada/81470
2138         * dwarf2out.c (dwarf2out_do_cfi_startproc): Only emit
2139         .cfi_personality or .cfi_lsda if the eh data format is dwarf2.
2141 2017-12-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2143         * config/sol2.h (SOLARIS_ATTRIBUTE_TABLE): Initialize new member
2144         of struct attribute_spec.
2146 2017-12-08  Julia Koval  <julia.koval@intel.com>
2148         * config/i386/avx512vnniintrin.h (_mm512_dpwssds_epi32,
2149         _mm512_mask_dpwssds_epi32, _mm512_maskz_dpwssds_epi32): New intrinsics.
2150         * config/i386/avx512vnnivlintrin.h (_mm256_dpwssds_epi32,
2151         _mm256_mask_dpwssds_epi32, _mm256_maskz_dpwssds_epi32,
2152         _mm_dpwssds_epi32, _mm_mask_dpwssds_epi32,
2153         _mm_maskz_dpwssds_epi32): Ditto.
2155 2017-12-08  Richard Biener  <rguenther@suse.de>
2157         PR tree-optimization/81303
2158         * tree-vect-stmts.c (vect_is_simple_cond): For invariant
2159         conditions try to create a comparison vector type matching
2160         the data vector type.
2161         (vectorizable_condition): Adjust.
2162         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
2163         Leave invariant conditions alone in case we can vectorize those.
2165 2017-12-08  Julia Koval  <julia.koval@intel.com>
2167         * config/i386/avx512vnniintrin.h (_mm512_dpwssd_epi32,
2168         _mm512_mask_dpwssd_epi32, _mm512_maskz_dpwssd_epi32): New intrinsics.
2169         * config/i386/avx512vnnivlintrin.h (_mm256_dpwssd_epi32,
2170         _mm256_mask_dpwssd_epi32, _mm256_maskz_dpwssd_epi32, _mm_dpwssd_epi32,
2171         _mm_mask_dpwssd_epi32, _mm_maskz_dpwssd_epi32): Ditto.
2173 2017-12-08  Julia Koval  <julia.koval@intel.com>
2175         * config/i386/avx512vnniintrin.h (_mm512_dpbusds_epi32,
2176         _mm512_mask_dpbusds_epi32, _mm512_maskz_dpbusds_epi32): New.
2177         * config/i386/avx512vnnivlintrin.h (_mm256_dpbusds_epi32,
2178         _mm256_mask_dpbusds_epi32, _mm256_maskz_dpbusds_epi32,
2179         _mm_dpbusds_epi32, _mm_mask_dpbusds_epi32,
2180         _mm_maskz_dpbusds_epi32): New intrinsics.
2182 2017-12-07  Sandra Loosemore  <sandra@codesourcery.com>
2184         * config/nios2/nios2.md (ld<bhw_uns>io): Add splitter for memory
2185         operand.
2186         (ld<bh>io_signed): Likewise.
2187         (st<bhw>io): Likewise.
2188         * config/nios2/predicates.md (ldstio_memory_operand): Allow
2189         SMALL_INT12 constant integer operand.
2191 2017-12-07  Sandra Loosemore  <sandra@codesourcery.com>
2193         * config/nios2/nios2.c (nios2_symbolic_constant_allowed):
2194         Rename to...
2195         (nios2_large_constant_allowed): ...this.  Adjust uses.
2196         (nios2_plus_symbolic_constant_p): Rename to...
2197         (nios2_plus_large_constant_p): ...this.  Adjust uses.
2198         (nios2_legitimate_address_p): Correct CONST_INT handling.
2199         (nios2_symbolic_memory_operand_p): Rename to...
2200         (nios2_large_constant_memory_operand_p): ...this.  Adjust uses.
2201         (nios2_large_constant_p): Check for large constant integers too.
2202         (nios2_split_large_constant): Handle constant integers.
2203         (nios2_split_symbolic_memory_operand): Rename to...
2204         (nios2_split_large_constant_memory_operand): ...this.  Adjust uses.
2205         (nios2_legitimize_constant_address): Handle constant integers.
2206         (r0rel_constant_p): Handle small constant integers.
2207         (nios2_print_operand_address): Handle r0-relative integer addresses.
2208         * config/nios2/nios2-protos.h: Adjust for renamed functions.
2209         * config/nios2/nios2.md: Adjust for renamed functions.
2211 2017-12-07  Andrew Waterman  <andrew@sifive.com>
2213         * config/riscv/riscv.c (TARGET_ASM_SELECT_SECTION): New define.
2214         (TARGET_HAVE_SRODATA_SECTION): New define.
2215         (riscv_select_section): New function.
2217 2017-12-08  Joseph Myers  <joseph@codesourcery.com>
2218             Alexander Monakov  <amonakov@ispras.ru>
2219             Jakub Jelinek  <jakub@redhat.com>
2221         PR target/81906
2222         * config/i386/i386.c (ix86_expand_rint): Handle flag_rounding_math.
2224 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
2226         * config/aarch64/aarch64.c (aarch64_print_address_internal): Return
2227         a bool success value.  Don't call output_operand_lossage here.
2228         (aarch64_print_ldpstp_address): Return a bool success value.
2229         (aarch64_print_operand_address): Call output_addr_const if
2230         aarch64_print_address_internal fails.
2231         (aarch64_print_operand): Don't assert that the mode is 16 bytes for
2232         'y'; call output_operand_lossage instead.  Call output_operand_lossage
2233         if aarch64_print_ldpstp_address fails.
2235 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
2237         * tree-vector-builder.h
2238         (tree_vector_builder::binary_encoded_nelts): Declare.
2239         * tree-vector-builder.c
2240         (tree_vector_builder::binary_encoded_nelts): New function.
2241         * fold-const.c (negate_expr_p): Likewise.
2242         (operand_equal_p, fold_checksum_tree): Likewise.
2243         * tree-loop-distribution.c (const_with_all_bytes_same): Likewise.
2244         * tree.c (integer_zerop, integer_onep, integer_all_onesp, real_zerop)
2245         (real_onep, real_minus_onep, add_expr, initializer_zerop): Likewise.
2246         (uniform_vector_p): Likewise.
2247         * varasm.c (const_hash_1, compare_constant): Likewise.
2248         * tree-ssa-ccp.c: Include tree-vector-builder.h.
2249         (valid_lattice_transition): Operate directly on the VECTOR_CST
2250         encoding.
2251         * ipa-icf.c: Include tree-vector-builder.h.
2252         (sem_variable::equals): Operate directly on the VECTOR_CST encoding.
2253         * print-tree.c (print_node): Print encoding of VECTOR_CSTs.
2255 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
2257         * tree.c (build_vector): Delete.
2258         * tree.h (build_vector): Make static and move into the self-testing
2259         block.
2261 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
2263         * vector-builder.h (vector_builder::derived): New const overload.
2264         (vector_builder::elt): New function.
2265         * tree-vector-builder.h (tree_vector_builder::type): New function.
2266         (tree_vector_builder::apply_step): Declare.
2267         * tree-vector-builder.c (tree_vector_builder::apply_step): New
2268         function.
2269         * gimple-fold.h (tree_vector_builder): Declare.
2270         (gimple_build_vector): Take a tree_vector_builder instead of a
2271         type and vector of elements.
2272         * gimple-fold.c (gimple_build_vector): Likewise.
2273         * tree-vect-loop.c (get_initial_def_for_reduction): Update call
2274         accordingly.
2275         (get_initial_defs_for_reduction): Likewise.
2276         (vectorizable_induction): Likewise.
2278 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
2280         * tree-vector-builder.h
2281         (tree_vector_builder::new_binary_operation): Declare.
2282         * tree-vector-builder.c
2283         (tree_vector_builder::new_binary_operation): New function.
2284         * fold-const.c (fold_relational_const): Use it.
2285         (const_binop): Likewise.  Check that both input vectors have
2286         the same number of elements, thus excluding things like WIDEN_SUM.
2287         Check whether it is possible to operate directly on the encodings
2288         of stepped inputs.
2290 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
2292         * fold-const.c (fold_negate_expr_1): Use tree_vector_builder and
2293         new_unary_operation, operating only on the encoded elements.
2294         (const_unop): Likewise.
2295         (exact_inverse): Likewise.
2296         (distributes_over_addition_p): New function.
2297         (const_binop): Use tree_vector_builder and new_unary_operation
2298         for combinations of VECTOR_CST and INTEGER_CST.  Operate only
2299         on the encoded elements unless the encoding is strided and the
2300         operation does not distribute over addition.
2301         (fold_convert_const):  Use tree_vector_builder and
2302         new_unary_operation.  Operate only on the encoded elements
2303         for truncating integer conversions, or for non-stepped encodings.
2305 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
2307         * config/sparc/sparc.c: Include tree-vector-builder.h.
2308         (sparc_fold_builtin): Use tree_vector_builder instead of build_vector.
2309         * expmed.c: Include tree-vector-builder.h.
2310         (make_tree): Use tree_vector_builder instead of build_vector.
2311         * fold-const.c: Include tree-vector-builder.h.
2312         (const_binop): Use tree_vector_builder instead of build_vector.
2313         (const_unop): Likewise.
2314         (native_interpret_vector): Likewise.
2315         (fold_vec_perm): Likewise.
2316         (fold_ternary_loc): Likewise.
2317         * gimple-fold.c: Include tree-vector-builder.h.
2318         (gimple_fold_stmt_to_constant_1): Use tree_vector_builder instead
2319         of build_vector.
2320         * tree-ssa-forwprop.c: Include tree-vector-builder.h.
2321         (simplify_vector_constructor): Use tree_vector_builder instead
2322         of build_vector.
2323         * tree-vect-generic.c: Include tree-vector-builder.h.
2324         (add_rshift): Use tree_vector_builder instead of build_vector.
2325         (expand_vector_divmod): Likewise.
2326         (optimize_vector_constructor): Likewise.
2327         * tree-vect-loop.c: Include tree-vector-builder.h.
2328         (vect_create_epilog_for_reduction): Use tree_vector_builder instead
2329         of build_vector.  Explicitly use a stepped encoding for
2330         { 1, 2, 3, ... }.
2331         * tree-vect-slp.c: Include tree-vector-builder.h.
2332         (vect_get_constant_vectors): Use tree_vector_builder instead
2333         of build_vector.
2334         (vect_transform_slp_perm_load): Likewise.
2335         (vect_schedule_slp_instance): Likewise.
2336         * tree-vect-stmts.c: Include tree-vector-builder.h.
2337         (vectorizable_bswap): Use tree_vector_builder instead of build_vector.
2338         (vect_gen_perm_mask_any): Likewise.
2339         (vectorizable_call): Likewise.  Explicitly use a stepped encoding.
2340         * tree.c: (build_vector_from_ctor): Use tree_vector_builder instead
2341         of build_vector.
2342         (build_vector_from_val): Likewise.  Explicitly use a duplicate
2343         encoding.
2345 2017-12-07  Richard Sandiford  <richard.sandiford@arm.com>
2347         * doc/generic.texi (VECTOR_CST): Describe new representation of
2348         vector constants.
2349         * vector-builder.h: New file.
2350         * tree-vector-builder.h: Likewise.
2351         * tree-vector-builder.c: Likewise.
2352         * Makefile.in (OBJS): Add tree-vector-builder.o.
2353         * tree.def (VECTOR_CST): Update comment to refer to generic.texi.
2354         * tree-core.h (tree_base): Add a vector_cst field to the u union.
2355         (tree_vector): Change the number of elements to
2356         vector_cst_encoded_nelts.
2357         * tree.h (VECTOR_CST_NELTS): Redefine using TYPE_VECTOR_SUBPARTS.
2358         (VECTOR_CST_ELTS): Delete.
2359         (VECTOR_CST_ELT): Redefine using vector_cst_elt.
2360         (VECTOR_CST_LOG2_NPATTERNS, VECTOR_CST_NPATTERNS): New macros.
2361         (VECTOR_CST_NELTS_PER_PATTERN, VECTOR_CST_DUPLICATE_P): Likewise.
2362         (VECTOR_CST_STEPPED_P, VECTOR_CST_ENCODED_ELTS): Likewise.
2363         (VECTOR_CST_ENCODED_ELT): Likewise.
2364         (vector_cst_encoded_nelts): New function.
2365         (make_vector): Take the values of VECTOR_CST_LOG2_NPATTERNS and
2366         VECTOR_CST_NELTS_PER_PATTERN as arguments.
2367         (vector_cst_int_elt, vector_cst_elt): Declare.
2368         * tree.c: Include tree-vector-builder.h.
2369         (tree_code_size): Abort if passed VECTOR_CST.
2370         (tree_size): Update for new VECTOR_CST layout.
2371         (make_vector): Take the values of VECTOR_CST_LOG2_NPATTERNS and
2372         VECTOR_CST_NELTS_PER_PATTERN as arguments.
2373         (build_vector): Use tree_vector_builder.
2374         (vector_cst_int_elt, vector_cst_elt): New functions.
2375         (drop_tree_overflow): For VECTOR_CST, drop the TREE_OVERFLOW from the
2376         encoded elements and then create the vector in the canonical form.
2377         (check_vector_cst, check_vector_cst_duplicate, check_vector_cst_fill)
2378         (check_vector_cst_stepped, test_vector_cst_patterns): New functions.
2379         (tree_c_tests): Call test_vector_cst_patterns.
2380         * lto-streamer-out.c (DFS::DFS_write_tree_body): Handle the new
2381         VECTOR_CST fields.
2382         (hash_tree): Likewise.
2383         * tree-streamer-out.c (write_ts_vector_tree_pointers): Likewise.
2384         (streamer_write_tree_header): Likewise.
2385         * tree-streamer-in.c (lto_input_ts_vector_tree_pointers): Likewise.
2386         (streamer_alloc_tree): Likewise.  Update call to make_vector.
2387         * fold-const.c (fold_ternary_loc): Avoid using VECTOR_CST_ELTS.
2389 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
2391         * selftest.h (ASSERT_TRUE_AT, ASSERT_FALSE_AT, ASSERT_EQ_AT)
2392         (ASSERT_NE, ASSERT_PRED1): Add underscores to local variable names
2393         * selftest-rtl.h (ASSERT_RTX_EQ, ASSERT_RTX_PTR_EQ): Likewise.
2395 2017-12-07  Bin Cheng  <bin.cheng@arm.com>
2396             Richard Biener  <rguenther@suse.de>
2398         PR tree-optimization/81303
2399         * Makefile.in (gimple-loop-interchange.o): New object file.
2400         * common.opt (floop-interchange): Reuse the option from graphite.
2401         * doc/invoke.texi (-floop-interchange): Ditto.  New document for
2402         -floop-interchange and mention it for -O3.
2403         * opts.c (default_options_table): Enable -floop-interchange at -O3.
2404         * gimple-loop-interchange.cc: New file.
2405         * params.def (PARAM_LOOP_INTERCHANGE_MAX_NUM_STMTS): New parameter.
2406         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): New parameter.
2407         * passes.def (pass_linterchange): New pass.
2408         * timevar.def (TV_LINTERCHANGE): New time var.
2409         * tree-pass.h (make_pass_linterchange): New declaration.
2410         * tree-ssa-loop-ivcanon.c (create_canonical_iv): Change to external
2411         interchange.  Record IV before/after increment in new parameters.
2412         * tree-ssa-loop-ivopts.h (create_canonical_iv): New declaration.
2413         * tree-vect-loop.c (vect_is_simple_reduction): Factor out reduction
2414         path check into...
2415         (check_reduction_path): ...New function here.
2416         * tree-vectorizer.h (check_reduction_path): New declaration.
2418 2017-12-07  Vladimir Makarov  <vmakarov@redhat.com>
2420         PR target/83252
2421         PR rtl-optimization/80818
2422         * lra.c (add_regs_to_insn_regno_info): Make a hard reg in CLOBBER
2423         always early clobbered.
2424         * lra-lives.c (process_bb_lives): Check input hard regs for early
2425         clobbered non-operand hard reg.
2427 2017-12-07  Jakub Jelinek  <jakub@redhat.com>
2429         PR middle-end/83164
2430         * tree-cfg.c (verify_gimple_assign_binary): Don't require
2431         types_compatible_p, just that TYPE_MODE is the same.
2433 2017-12-07  Martin Sebor  <msebor@redhat.com>
2435         PR c/81544
2436         * attribs.c (empty_attribute_table): Initialize new member of
2437         struct attribute_spec.
2438         (decl_attributes): Add argument.  Handle mutually exclusive
2439         combinations of attributes.
2440         (selftests::test_attribute_exclusions): New function.
2441         (selftests::attribute_c_tests): Ditto.
2442         * attribs.h (decl_attributes): Add default argument.
2443         * selftest.h (attribute_c_tests): Declare.
2444         * selftest-run-tests.c (selftest::run_tests): Call attribute_c_tests.
2445         * tree-core.h (attribute_spec::exclusions, exclude): New type and
2446         member.
2447         * doc/extend.texi (Common Function Attributes): Update const and pure.
2448         * config/alpha/alpha.c (vms_attribute_table): Initialize new member
2449         of struct attribute_spec.
2450         * config/arc/arc.c (arc_attribute_table): Same.
2451         * config/arm/arm.c (arm_attribute_table): Same.
2452         * config/avr/avr.c ( avr_attribute_table): Same.
2453         * config/bfin/bfin.c (bfin_attribute_table): Same.
2454         * config/cr16/cr16.c (cr16_attribute_table): Same.
2455         * config/epiphany/epiphany.c (epiphany_attribute_table): Same.
2456         * config/h8300/h8300.c (h8300_attribute_table): Same.
2457         * config/i386/i386.c (ix86_attribute_table): Same.
2458         * config/ia64/ia64.c (ia64_attribute_table): Same.
2459         * config/m32c/m32c.c (m32c_attribute_table): Same.
2460         * config/m32r/m32r.c (m32r_attribute_table): Same.
2461         * config/m68k/m68k.c (m68k_attribute_table): Same.
2462         * config/mcore/mcore.c (mcore_attribute_table): Same.
2463         * config/microblaze/microblaze.c (microblaze_attribute_table): Same.
2464         * config/mips/mips.c (mips_attribute_table): Same.
2465         * config/msp430/msp430.c (msp430_attribute_table): Same.
2466         * config/nds32/nds32.c (nds32_attribute_table): Same.
2467         * config/nvptx/nvptx.c (nvptx_attribute_table): Same.
2468         * config/powerpcspe/powerpcspe.c (rs6000_attribute_table): Same.
2469         * config/rl78/rl78.c (rl78__attribute_table): Same.
2470         * config/rs6000/rs6000.c (rs6000_attribute_table): Same.
2471         * onfig/rx/rx.c (rx_attribute_table): Same.
2472         * config/s390/s390.c (s390_handle_vectorbool_attribute): Same.
2473         * config/sh/sh.c (sh_attribute_table): Same.
2474         * config/sparc/sparc.c (sparc_attribute_table): Same.
2475         * config/spu/spu.c (spu_attribute_table): Same.
2476         * config/stormy16/stormy16.c (xstormy16_attribute_table): Same.
2477         * config/v850/v850.c (v850_attribute_table): Same.
2478         * config/visium/visium.c (visium_attribute_table): Same.
2480 2017-12-07  Tamar Christina  <tamar.christina@arm.com>
2482         PR target/82641
2483         * config/arm/arm.c (INCLUDE_STRING): Define.
2484         (arm_last_printed_arch_string, arm_last_printed_fpu_string): New.
2485         (arm_declare_function_name): Conservatively emit .arch, .arch_extensions
2486         and .fpu.
2488 2017-12-07  Michael Matz  <matz@suse.de>
2490         Add unroll and jam pass
2492         * gimple-loop-jam.c: New file.
2493         * Makefile.in (OBJS): Add gimple-loop-jam.o.
2494         * common.opt (funroll-and-jam): New option.
2495         * opts.c (default_options_table): Add unroll-and-jam at -O3.
2496         * params.def (PARAM_UNROLL_JAM_MIN_PERCENT): New param.
2497         (PARAM_UNROLL_JAM_MAX_UNROLL): Ditto.
2498         * passes.def: Add pass_loop_jam.
2499         * timevar.def (TV_LOOP_JAM): Add.
2500         * tree-pass.h (make_pass_loop_jam): Declare.
2501         * cfgloop.c (flow_loop_tree_node_add): Add AT argument.
2502         * cfgloop.h (flow_loop_tree_node_add): Adjust declaration.
2503         * cfgloopmanip.c (duplicate_loop): Add AT argument, adjust call
2504         to flow_loop_tree_node_add.
2505         (duplicate_subloops, copy_loops_to): Append to sibling list.
2506         * cfgloopmanip.h: (duplicate_loop): Adjust declaration.
2507         * doc/invoke.texi (-funroll-and-jam): Document new option.
2508         (unroll-jam-min-percent, unroll-jam-max-unroll): Document new params.
2510 2017-12-07  Richard Biener  <rguenther@suse.de>
2512         PR tree-optimization/83296
2513         PR tree-optimization/67769
2514         * tree-ssa-phiopt.c (conditional_replacement): Do not reset
2515         flow sensitive info in an unrelated BB.
2516         (value_replacement): Use reset_flow_sensitive_info.
2517         (minmax_replacement): Reset flow sensitive info on the def
2518         we move.  Do not reset flow sensitive info in the whole BB
2519         we move the stmt to.
2520         (abs_replacement): Likewise.
2522 2017-12-07  Segher Boessenkool  <segher@kernel.crashing.org>
2524         PR target/43871
2525         * config/rs6000/rs6000.c (rs6000_option_override_internal): Set
2526         rs6000_cpu to the given -mcpu=, or to the default processor.
2528 2017-12-07  Segher Boessenkool  <segher@kernel.crashing.org>
2530         * config/rs6000/rs6000.h (rs6000_cpu_attr): Delete.
2531         * config/rs6000/rs6000.c (rs6000_variable_issue_1): Use rs6000_tune
2532         instead of rs6000_cpu_attr.
2533         (rs6000_adjust_cost): Ditto.
2534         (is_microcoded_insn): Ditto.
2535         (rs6000_adjust_priority): Ditto.
2536         (rs6000_issue_rate): Ditto.
2537         (rs6000_use_sched_lookahead): Ditto.
2538         (rs6000_use_sched_lookahead_guard): Ditto.
2539         (rs6000_sched_reorder): Ditto.
2540         (force_new_group): Ditto.
2541         * config/rs6000/rs6000.md (cpu attribute): Ditto.
2542         (group_ending_nop): Ditto.
2544 2017-12-07  Segher Boessenkool  <segher@kernel.crashing.org>
2546         * config/rs6000/rs6000.opt (rs6000_tune): New variable.
2547         * config/rs6000/rs6000.c (rs6000_option_override_internal): Also set
2548         rs6000_tune.  Use rs6000_tune instead of rs6000_cpu where appropriate.
2549         (rs6000_loop_align): Use rs6000_tune instead of rs6000_cpu where
2550         appropriate.
2551         (rs6000_reassociation_width): Ditto.
2552         (rs6000_emit_epilogue): Ditto.
2553         (rs6000_adjust_cost): Ditto.
2554         (is_microcoded_insn): Ditto.
2555         (is_cracked_insn): Ditto.
2556         (rs6000_adjust_priority): Ditto.
2557         (rs6000_sched_reorder): Ditto.
2558         (rs6000_sched_reorder2): Ditto.
2559         (insn_must_be_first_in_group): Ditto.
2560         (insn_must_be_last_in_group): Ditto.
2561         (rs6000_register_move_cost): Ditto.
2562         * config/rs6000/rs6000.h (rs6000_cpu_attr): Use rs6000_tune instead of
2563         rs6000_cpu.
2565 2017-12-07  Julia Koval  <julia.koval@intel.com>
2567         * config.gcc: Add vaesintrin.h.
2568         * config/i386/i386-builtin-types.def (V64QI_FTYPE_V64QI_V64QI):
2569         New type.
2570         * config/i386/i386-builtin.def (__builtin_ia32_vaesdec_v16qi,
2571         __builtin_ia32_vaesdec_v32qi, __builtin_ia32_vaesdec_v64qi):
2572         New builtins.
2573         * config/i386/i386.c (ix86_expand_args_builtin): Handle new type.
2574         * config/i386/immintrin.h: Include vaesintrin.h.
2575         * config/i386/sse.md (vaesdec_<mode>): New pattern.
2576         * config/i386/vaesintrin.h (_mm256_aesdec_epi128, _mm512_aesdec_epi128,
2577         _mm_aesdec_epi128): New intrinsics.
2579 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
2581         * Makefile.in (C_COMMON_OBJS): Add c-family/c-spellcheck.o.
2582         * spellcheck-tree.c (find_closest_macro_cpp_cb): Move to
2583         c-family/c-spellcheck.cc.
2584         (best_macro_match::best_macro_match): Likewise.
2585         * spellcheck-tree.h
2586         (struct edit_distance_traits<cpp_hashnode *>): Move to
2587         c-family/c-spellcheck.h.
2588         (class best_macro_match): Likewise.
2590 2017-12-06  Jakub Jelinek  <jakub@redhat.com>
2592         PR tree-optimization/83293
2593         * gimple-ssa-strength-reduction.c (insert_initializers): Use
2594         GSI_NEW_STMT instead of GSI_SAME_STMT in gsi_insert_after that
2595         might insert into empty bb.
2597         PR sanitizer/81281
2598         * match.pd ((T)(P + A) - (T)P -> (T) A): Split into separate
2599         simplify for plus with :c added, and pointer_plus without that.
2600         ((T)P - (T)(P + A) -> -(T) A): Likewise.  If type is integral
2601         with undefined overflow and the conversion is not widening,
2602         perform negation in utype and only convert to type afterwards.
2603         ((T)(P + A) - (T)(P + B) -> (T)A - (T)B): Split into separate
2604         simplify for plus with :c added, and pointer_plus without that.
2605         If type is integral with undefined overflow and the conversion is
2606         not widening, perform minus in utype and only convert to type
2607         afterwards.  Move the last pointer_diff_expr simplify into the
2608         two outermost ifs.
2610 2017-12-06  Martin Sebor  <msebor@redhat.com>
2612         PR tree-optimization/82646
2613         * builtins.c (maybe_emit_chk_warning): Use size as the bound for
2614         strncpy, not maxlen.
2616 2017-12-06  Martin Sebor  <msebor@redhat.com>
2618         * doc/invoke.texi (-Wstringop-truncation): Mention attribute
2619         nonstring.
2621         PR tree-optimization/83075
2622         * tree-ssa-strlen.c (handle_builtin_stxncpy): Avoid assuming
2623         strncat/strncpy don't change length of source string.
2625 2017-12-06  Eric Botcazou  <ebotcazou@adacore.com>
2627         Revert
2628         2017-11-29  Martin Aberg  <maberg@gaisler.com>
2630         * config/sparc/sparc.md (divdf3_fix): Add NOP and adjust length
2631         to prevent b2bst errata sequence.
2632         (sqrtdf2_fix): Likewise.
2634 2017-12-06  Jakub Jelinek  <jakub@redhat.com>
2636         PR tree-optimization/81945
2637         * cfgloop.h (FOR_EACH_LOOP_FN): Use FN instead of hardcoding fn.
2638         * tree-cfg.c (move_sese_region_to_fn): If any of the loops moved
2639         to dest_cfun has orig_loop_num set, either remap it to the new
2640         loop number if the loop got moved too, or clear it.
2642 2017-12-05  Steve Ellcey  <sellcey@cavium.com>
2644         * config/aarch64/thunderx2-t99.md (thunderx2t99_branch): Add trap
2645         to reservation.
2646         (thunderx2t99_nothing): New insn reservation.
2647         (thunderx2t99_mrs): New insn reservation.
2648         (thunderx2t99_multiple): New insn reservation.
2649         (thunderx2t99_alu_basi): Add bfx to reservation.
2650         (thunderx2t99_fp_cmp): Add fccmps and fccmpd to reservation.
2652 2017-12-05  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
2654         PR target/82248
2655         * config/arm/arm.md (probe_stack) : Use the 'o' constraint.
2657 2017-12-05  Bin Cheng  <bin.cheng@arm.com>
2659         * tree-ssa-dce.c (simple_dce_from_worklist): Move and rename from
2660         tree-ssa-pre.c::remove_dead_inserted_code.
2661         * tree-ssa-dce.h: New file.
2662         * tree-ssa-pre.c (tree-ssa-dce.h): Include new header file.
2663         (remove_dead_inserted_code): Move and rename to function
2664         tree-ssa-dce.c::simple_dce_from_worklist.
2665         (pass_pre::execute): Update use.
2667 2017-12-05  Richard Biener  <rguenther@suse.de>
2669         PR tree-optimization/83277
2670         * graphite-isl-ast-to-gimple.c (should_copy_to_new_region): Make sure
2671         to code-gen liveout vars.
2673 2017-12-05  Richard Sandiford  <richard.sandiford@linaro.org>
2675         * config/aarch64/aarch64-simd.md (aarch64_simd_bsldi_internal)
2676         (aarch64_simd_bsldi_alt): Check REG_P before GP_REGNUM_P.
2677         (aarch64_cm<optab>di, aarch64_cmtstdi): Add leading "&&" to
2678         split condition.
2680 2017-12-05  Max Filippov  <jcmvbkbc@gmail.com>
2682         * config/xtensa/xtensa.c (xtensa_asan_shadow_offset): New
2683         function.
2684         (TARGET_ASAN_SHADOW_OFFSET): New macro definition.
2685         * config/xtensa/xtensa.h (FRAME_GROWS_DOWNWARD): Set to 1 if
2686         ASAN is enabled.
2688 2017-12-05  Richard Biener   <rguenther@suse.de>
2690         * timevar.def (TV_TREE_RECIP, TV_TREE_SINCOS, TV_TREE_WIDEN_MUL): Add.
2691         * tree-ssa-math-opts.c (pass_data_cse_reciprocal): Use TV_TREE_RECIP.
2692         (pass_data_cse_sincos): Use TV_TREE_SINCOS.
2693         (pass_data_optimize_widening_mul): Use TV_TREE_WIDEN_MUL.
2695 2017-12-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2697         * dbxout.c (dbxout_block): Grow buf to 30 bytes.
2699 2017-12-05  Martin Liska  <mliska@suse.cz>
2700             Jakub Jelinek  <jakub@redhat.com>
2702         * doc/invoke.texi: Document the options.
2703         * flag-types.h (enum sanitize_code): Add
2704         SANITIZE_POINTER_COMPARE and SANITIZE_POINTER_SUBTRACT.
2705         * ipa-inline.c (sanitize_attrs_match_for_inline_p): Add handling
2706         of SANITIZE_POINTER_COMPARE and SANITIZE_POINTER_SUBTRACT.
2707         * opts.c: Define new sanitizer options.
2708         * sanitizer.def (BUILT_IN_ASAN_POINTER_COMPARE): Likewise.
2709         (BUILT_IN_ASAN_POINTER_SUBTRACT): Likewise.
2711 2017-12-05  Julia Koval  <julia.koval@intel.com>
2713         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VNNI_SET,
2714         OPTION_MASK_ISA_AVX512VNNI_UNSET): New.
2715         (ix86_handle_option): Handle -mavx512vnni.
2716         * config/i386/cpuid.h (bit_AVX512VNNI): New bit.
2717         * config/i386/driver-i386.c (host_detect_local_cpu): Handle new bit.
2718         * config/i386/i386-c (__AVX512VNNI__): New.
2719         * config/i386/i386.c (ix86_target_string): Handle new option.
2720         (ix86_valid_target_attribute_inner_p): Handle new option.
2721         * config/i386/i386.h (TARGET_AVX512VNNI, TARGET_AVX512VNNI_P): New.
2722         * config/i386/i386.opt (mavx512vnni): New option.
2724 2017-12-01  Jan Hubicka  <hubicka@ucw.cz>
2726         PR target/81616
2727         * athlon.md: Disable for generic.
2728         * haswell.md: Enable for generic.
2729         * i386.c (ix86_sched_init_global): Add core hooks for generic.
2730         * x86-tune-sched.c (ix86_issue_rate): Increase issue rate for generic
2731         to 4.
2732         (ix86_adjust_cost): Move generic to haswell path.
2734 2017-12-04  Eric Botcazou  <ebotcazou@adacore.com>
2736         * config/sparc/sparc.c (sparc_do_work_around_errata): Use mem_ref
2737         instead of MEM_P in a couple more places.  Fix formatting issues.
2739 2017-12-04  Jim Wilson  <jimw@sifive.com>
2741         * config/riscv/riscv.c (riscv_for_each_saved_reg): Use GP_REG_LAST
2742         instead of GP_REG_LAST-1.
2743         (riscv_adjust_libcall_cfi_prologue): Likewise.
2744         (riscv_adjust_libcall_cri_epilogue): Likewise.
2745         * config/riscv/riscv.h (CALL_USED_REGISTERS): Change a6 to t6 in
2746         comment.
2748 2017-12-04  Luis Machado  <luis.machado@linaro.org>
2750         * ipa-pure-const.c (check_decl): Add missing newline.
2751         (state_from_flags): Likewise.
2753 2017-12-04  Jeff Law  <law@redhat.com>
2755         PR tree-optimizatin/78496
2756         * gimple-ssa-evrp-analyze.h
2757         (evrp_range_analyzer::get_vr_values): Simplify.
2758         * gimple-ssa-evrp-analyze.c: Corresponding changes.
2759         * tree-ssa-dom.c: Include alloc-pool.h, tree-vrp.h, vr-values.h
2760         and gimple-ssa-evrp-analyze.h.
2761         (dom_opt_dom_walker class): Add evrp_range_analyzer member.
2762         (simplify_stmt_for_jump_threading): Copy a blob of code from
2763         tree-vrp.c to use ranges to simplify statements.
2764         (dom_opt_dom_walker::before_dom_children): Call
2765         evrp_range_analyzer::{enter,record_ranges_from_stmt} methods.
2766         (dom_opt_dom_walker::after_dom_children): Similarly for
2767         evrp_range_analyzer::leave.
2768         (dom_opt_dom_walker::optimize_stmt): Use EVRP ranges to optimize
2769         conditionals.
2771         * gimple-ssa-evrp-analyze.c
2772         (evrp_range_analyzer::extract_range_from_stmt):  Always use
2773         vr_values::update_value_range so preexisting range info is
2774         medged with new range info, even if the new range is VR_VARYING.
2776 2017-12-04  Segher Boessenkool  <segher@kernel.crashing.org>
2778         * combine.c: Adjust comment.
2779         (use_crosses_set_p): Delete.
2780         (can_combine_p): Use modified_between_p instead of use_crosses_set_p.
2781         (try_combine): Ditto.
2783 2017-12-04  Richard Biener  <rguenther@suse.de>
2785         PR tree-optimization/83255
2786         * graphite-isl-ast-to-gimple.c (translate_isl_ast_node_for):
2787         Re-add zero-iteration check.
2789 2017-12-04  Segher Boessenkool  <segher@kernel.crashing.org>
2791         PR rtl-optimization/83245
2792         * lra.c (collect_non_operand_hard_regs): Treat clobbers of non-operand
2793         hard registers as earlyclobber, also if not in an asm.
2795 2017-12-04  Segher Boessenkool  <segher@kernel.crashing.org>
2797         PR bootstrap/83265
2798         Revert
2799         2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
2801         PR target/43871
2802         * config/rs6000/rs6000.c (rs6000_option_override_internal): Set
2803         rs6000_cpu based on cpu_index, not tune_index.
2805 2017-12-04  Richard Biener  <rguenther@suse.de>
2807         PR tree-optimization/83238
2808         * graphite-scop-detection.c (scop_detection::merge_sese): Make
2809         code match comment, rejecting invalid SESE regions.
2811 2017-12-03  John David Anglin  <danglin@gcc.gnu.org>
2813         * config/pa/pa.c (pa_legitimate_address_p): For scaled indexing,
2814         require base operand is a REG_POINTER prior to reload on targets
2815         with non-equivalent space registers.
2817 2017-12-01  Jan Hubicka  <hubicka@ucw.cz>
2819         * ipa-cp.c (ipcp_lattice<valtype>::print): Update dumping.
2820         (update_specialized_profile): Fix updating of counts.
2821         (perhaps_add_new_callers): Likewise.
2823 2017-12-01  Jan Hubicka  <hubicka@ucw.cz>
2825         PR target/81616
2826         * x86-tune.def: Remove obsolette FIXMEs.
2827         (X86_TUNE_PARTIAL_FLAG_REG_STALL): Disable for generic
2828         (X86_TUNE_FUSE_CMP_AND_BRANCH_32, X86_TUNE_FUSE_CMP_AND_BRANCH_64,
2829         X86_TUNE_FUSE_CMP_AND_BRANCH_SOFLAGS, X86_TUNE_FUSE_ALU_AND_BRANCH):
2830         Enable for generic.
2831         (X86_TUNE_PAD_RETURNS): Disable for generic.
2833 2017-12-02  Jakub Jelinek  <jakub@redhat.com>
2835         PR tree-optimization/83170
2836         PR tree-optimization/83241
2837         * gimple-ssa-store-merging.c
2838         (imm_store_chain_info::try_coalesce_bswap): Update vuse field from
2839         gimple_vuse (ins_stmt) in case it has changed.
2840         (imm_store_chain_info::output_merged_store): Likewise.
2842         * tree-chkp.c (chkp_compute_bounds_for_assignment): Handle
2843         POINTER_DIFF_EXPR.
2845         PR c++/81212
2846         * tree-cfg.c (pass_warn_function_return::execute): Handle
2847         __builtin_ubsan_handle_missing_return like __builtin_unreachable
2848         with BUILTINS_LOCATION.
2850         PR target/78643
2851         PR target/80583
2852         * expr.c (get_inner_reference): If DECL_MODE of a non-bitfield
2853         is BLKmode for vector field with vector raw mode, use TYPE_MODE
2854         instead of DECL_MODE.
2856         * config/i386/i386-protos.h (standard_sse_constant_opcode): Change
2857         last argument to rtx pointer.
2858         * config/i386/i386.c (standard_sse_constant_opcode): Replace X argument
2859         with OPERANDS.  For AVX+ 128-bit VEX encoded instructions over 256-bit
2860         or 512-bit.  If setting EXT_REX_SSE_REG_P, use EVEX encoded insn
2861         depending on the chosen ISAs.
2862         * config/i386/i386.md (*movxi_internal_avx512f, *movoi_internal_avx,
2863         *movti_internal, *movdi_internal, *movsi_internal, *movtf_internal,
2864         *movdf_internal, *movsf_internal): Adjust standard_sse_constant_opcode
2865         callers.
2866         * config/i386/sse.md (mov<mode>_internal): Likewise.
2867         * config/i386/mmx.md (*mov<mode>_internal): Likewise.
2869 2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
2871         * doc/invoke.texi (-dp): Say that instruction cost is printed as well.
2873 2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
2875         * config/rs6000/rs6000-protos.h (emit_fusion_addis): Remove last two
2876         parameters from prototype.
2877         * config/rs6000/rs6000.c (emit_fusion_addis): Remove last two
2878         parameters.  Don't print a comment.
2879         (emit_fusion_gpr_load): Adjust.
2880         (emit_fusion_load_store): Adjust.
2881         * config/rs6000/rs6000.md (*fusion_p9_<mode>_constant): Adjust.
2882         * config/rs6000/vsx.md (two peepholes): Print the "vector load fusion"
2883         comment on the second line.
2885 2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
2887         PR target/43871
2888         * config/rs6000/rs6000.c (rs6000_option_override_internal): Set
2889         rs6000_cpu based on cpu_index, not tune_index.
2891 2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
2893         * final.c (output_asm_name): Print insn_cost.  Shorten output.  Print
2894         which_alternative instead of which_alternative + 1.
2895         (output_asm_insn): Print an extra tab if the template is short.
2897 2017-12-01  Jim Wilson  <jimw@sifive.com>
2899         * common.opt (use_gnu_debug_info_extensions): Delete DWARF_DEBUG from
2900         comment.
2901         * config/vx-common.h (DWARF_DEBUGGING_INFO): Delete undef.
2902         * doc/tm.texi.in (PREFERRED_DEBUGGING_TYPE): Delete DWARF_DEBUG
2903         reference.
2904         * doc/tm.texi: Regenerate.
2906 2017-12-01  Michael Meissner  <meissner@linux.vnet.ibm.com>
2908         PR target/81959
2909         * config/rs6000/rs6000.c (rs6000_address_for_fpconvert): Check for
2910         whether we can allocate pseudos before trying to fix an address.
2911         * config/rs6000/rs6000.md (float_<mode>si2_hw): Make sure the
2912         memory address is indexed or indirect.
2913         (floatuns_<mode>si2_hw2): Likewise.
2915 2017-12-01  Jason Merrill  <jason@redhat.com>
2917         * Makefile.in (TAGS): Add c-family/*.cc.
2919 2017-12-01  Wilco Dijkstra  <wdijkstr@arm.com>
2921         * config/aarch64/aarch64.md (call_insn): Use %c rather than %a.
2922         (call_value_insn): Likewise.
2923         (sibcall_insn): Likewise.
2924         (sibcall_value_insn): Likewise.
2925         (movsi_aarch64): Likewise.
2926         (movdi_aarch64): Likewise.
2927         (add_losym_): Likewise.
2928         (ldr_got_small_): Likewise.
2929         (ldr_got_small_sidi): Likewise.
2930         (ldr_got_small_28k_): Likewise.
2931         (ldr_got_small_28k_sidi): Likewise.
2932         * config/aarch64/aarch64.c (aarch64_print_address_internal):
2933         Move output_addr_const to symbolic case. Add error check.
2935 2017-12-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2937         * config/s390/predicates.md (plus16_Q_operand): New predicate.
2938         * config/s390/s390.md: Disable MVC merging peephole if it would
2939         disable operand forwarding.
2940         (new peephole2): Split MVCs if it would turn them into up to 2
2941         forwardable MVCs.
2943 2017-12-01  Richard Biener  <rguenther@suse.de>
2945         PR tree-optimization/83232
2946         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Fix
2947         detection of same access. Instead of breaking the group here
2948         do not consider the duplicate.  Add comment explaining real fix.
2950 2017-12-01  Jonathan Wakely  <jwakely@redhat.com>
2952         * doc/md.texi (Insn Splitting): Fix "central flowgraph" typo.
2954 2017-12-01  Sudakshina Das  <sudi.das@arm.com>
2956         * config/arm/vfp.md (*movhf_vfp_fp16): Add conds attribute.
2958 2017-12-01  Jakub Jelinek  <jakub@redhat.com>
2960         * function.h (struct function): Remove cilk_frame_decl,
2961         is_cilk_function and calls_cilk_spawn fields.
2962         * tree-inline.h (struct copy_body_data): Remove remap_var_for_cilk
2963         field.
2964         * omp-simd-clone.c (simd_clone_clauses_extract): Don't clear
2965         cilk_elemental field.
2966         * cgraph.h (struct cgraph_simd_clone): Remove cilk_elemental field.
2967         * target.def: Adjust comment.
2968         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
2969         Don't test cilk_elemental.
2971         PR tree-optimization/83233
2972         * gimple-ssa-store-merging.c (nop_stats, bswap_stats): Use
2973         bswap_stat name for the struct.
2975         PR c/79153
2976         * tree.h (SWITCH_BREAK_LABEL_P): Define.
2977         * gimplify.c (collect_fallthrough_labels): Handle GIMPLE_BIND
2978         starting with a GIMPLE_SWITCH and ending with GIMPLE_LABEL with
2979         SWITCH_BREAK_LABEL_P set on the label.
2980         (gimplify_switch_expr): Set SWITCH_BREAK_LABEL_P on the label
2981         added for default case if it was missing and not all cases covered.
2982         Wrap GIMPLE_SWITCH and the switch_body_seq into a GIMPLE_BIND if
2983         switch_body_seq ends with a GIMPLE_LABEL with SWITCH_BREAK_LABEL_P
2984         set on the label.
2985         * tree-chrec.c (evolution_function_is_univariate_p): Add return true;
2986         to avoid -Wimplicit-fallthrough warning.
2987         * config/i386/i386.c (ix86_expand_special_args_builtin): Add
2988         FALLTHRU comment to avoid -Wimplicit-fallthrough warning.
2990         PR tree-optimization/83221
2991         * tree-ssa-reassoc.c (sort_by_operand_rank): Shift bb_rank
2992         down by 16.
2993         (init_reassoc): Formatting fix.
2995         PR sanitizer/81275
2996         * tree-cfg.c (group_case_labels_stmt): Don't optimize away
2997         C++ FE implicitly added __builtin_unreachable () until -Wreturn-type
2998         is diagnosed.
3000         PR sanitizer/83219
3001         * tree-cfg.c: Include asan.h.
3002         (gimple_seq_unreachable_p): Return false for -fsanitize=unreachable.
3004 2017-12-01  Sergey Shalnov  <Sergey.Shalnov@intel.com>
3006         * config/i386/i386.md: Fix AVX512 register width in AVX512 instruction.
3008 2017-12-01  Sergey Shalnov  <Sergey.Shalnov@intel.com>
3010         * config/i386/i386.c (standard_sse_constant_opcode): Fix wrong form for
3011         vpcmpeqd instruction.
3013 2017-12-01  Sergey Shalnov  <Sergey.Shalnov@intel.com>
3015         * config/i386/i386.c (standard_sse_constant_opcode): Fix
3016         registers type for 128bit mode.
3018 2017-11-30  Jakub Jelinek  <jakub@redhat.com>
3020         * spellcheck-tree.c (test_find_closest_identifier): Use ; instead
3021         of ;;.
3022         * gengtype-state.c (read_state_pair): Likewise.
3023         * gimple-fold.c (gimple_fold_builtin_string_compare): Likewise.
3024         * sel-sched-dump.c (dump_insn_rtx_1): Likewise.
3025         * ipa-cp.c (intersect_aggregates_with_edge): Likewise.
3026         * ifcvt.c (noce_try_store_flag_constants): Likewise.
3027         * tree-ssa-ccp.c (ccp_finalize): Likewise.
3028         * omp-grid.c (grid_process_kernel_body_copy): Likewise.
3029         * builtins.c (fold_builtin_3): Likewise.
3030         * graphite-scop-detection.c
3031         (scop_detection::stmt_has_simple_data_refs_p): Likewise.
3032         * hsa-gen.c (hsa_function_representation::hsa_function_representation):
3033         Likewise.
3035 2017-12-01  Maxim Ostapenko  <m.ostapenko@samsung.com>
3037         PR sanitizer/81697
3038         * asan.c (asan_protect_global): Add new ignore_decl_rtl_set_p
3039         parameter. Return true if ignore_decl_rtl_set_p is true and other
3040         conditions are satisfied.
3041         * asan.h (asan_protect_global): Add new parameter.
3042         * varasm.c (categorize_decl_for_section): Pass true as second parameter
3043         to asan_protect_global calls.
3045 2017-11-30  Jim Wilson  <jimw@sifive.com>
3047         * doc/invoke.texi (RISC-V Options): Delete nonexistent -mmemcpy and
3048         -mno-memcpy options.  For -mplt, -mfdiv, -mdiv, -msave-restore, and
3049         -mstrict-align, add info on default value.  Delete redundant lines for
3050         -mabi.  Add missing -mexplicit-relocs docs.
3052 2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>
3054         * config/arc/arc.md (trap): New pattern.
3056 2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>
3058         * config/arc/arc.c (hwloop_optimize): Prevent the last ZOL
3059         instruction to end into a delay slot.
3060         * config/arc/arc.md (cond_delay_insn): Check if the instruction
3061         can be placed into a delay slot against reg_note.
3063 2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>
3065         * config/arc/arc.c (hwloop_optimize): Update hw-loop's end/start
3066         labels number of usages.
3068 2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>
3070         * config/arc/arc.c (arc_cannot_substitue_mem_equiv_p): New
3071         function.
3072         (TARGET_CANNOT_SUBSTITUTE_MEM_EQUIV_P): Define.
3074 2017-11-30  Jakub Jelinek  <jakub@redhat.com>
3076         PR target/83210
3077         * internal-fn.c (expand_mul_overflow): Optimize unsigned
3078         multiplication by power of 2 constant into two shifts + comparison.
3080 2017-11-30  Jan Hubicka  <hubicka@ucw.cz>
3082         PR target/81616
3083         * config/i386/x86-tune-costs.h (generic_cost): Revise for modern CPUs.
3085 2017-11-30  Richard Biener  <rguenther@suse.de>
3087         PR tree-optimization/83202
3088         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Add
3089         allow_peel argument and guard peeling.
3090         (canonicalize_loop_induction_variables): Likewise.
3091         (canonicalize_induction_variables): Pass false.
3092         (tree_unroll_loops_completely_1): Pass unroll_outer to disallow
3093         peeling from cunrolli.
3095 2017-11-29  Segher Boessenkool  <segher@kernel.crashing.org>
3097         * combine.c (try_combine): Print a message to dump file whenever
3098         I0, I1, or I2 cannot be combined into I3.
3100 2017-11-29  Segher Boessenkool  <segher@kernel.crashing.org>
3102         PR rtl-optimization/83156
3103         PR rtl-optimization/82621
3104         * combine.c (try_combine): Don't split an I2 if one of the dests is
3105         set again before I3.  Allow unused dests.
3107 2017-11-29  Segher Boessenkool  <segher@kernel.crashing.org>
3109         * config/rs6000/rs6000.md (*add<mode>3_carry_in_internal2): New.
3111 2017-11-29  Vladimir Makarov  <vmakarov@redhat.com>
3113         PR rtl-optimization/80818
3114         * lra.c (collect_non_operand_hard_regs): New arg insn.  Pass it
3115         recursively.  Use insn code for clobber.
3116         (lra_set_insn_recog_data): Pass the new arg to
3117         collect_non_operand_hard_regs.
3118         (add_regs_to_insn_regno_info): Pass insn instead of uid.  Use insn
3119         code for clobber.
3120         (lra_update_insn_regno_info): Pass insn to
3121         add_regs_to_insn_regno_info.
3123 2017-11-29  Jim Wilson  <jimw@sifive.com>
3124             Andrew Waterman  <andrew@sifive.com>
3126         * config/riscv/riscv.c (SINGLE_SHIFT_COST): New.
3127         (riscv_rtx_costs): Case ZERO_EXTRACT, match new pattern, and return
3128         SINGLE_SHIFT_COST.  Case LT and ZERO_EXTEND, likewise.  Case ASHIFT,
3129         use SINGLE_SHIFT_COST.
3130         * config/riscv/riscv.md (lshrsi3_zero_extend_1): New.
3131         (lshrsi3_zero_extend_2, lshrsi3_zero_extend_3): New.
3133 2017-11-29  Julia Koval  <julia.koval@intel.com>
3135         * config/i386/avx512vbmi2intrin.h (_mm512_shldv_epi16,
3136         _mm512_mask_shldv_epi16, _mm512_maskz_shldv_epi16, _mm512_shldv_epi32,
3137         _mm512_mask_shldv_epi32, _mm512_maskz_shldv_epi32, _mm512_shldv_epi64,
3138         _mm512_mask_shldv_epi64, _mm512_maskz_shldv_epi64): New intrinsics.
3139         * config/i386/avx512vbmi2vlintrin.h (_mm256_shldv_epi16,
3140         _mm256_mask_shldv_epi16, _mm256_maskz_shldv_epi16, _mm256_shldv_epi32,
3141         _mm256_mask_shldv_epi32, _mm256_maskz_shldv_epi32, _mm256_shldv_epi64,
3142         _mm256_mask_shldv_epi64, _mm256_maskz_shldv_epi64, _mm_shldv_epi16,
3143         _mm_mask_shldv_epi16, _mm_maskz_shldv_epi16, _mm_shldv_epi32,
3144         _mm_mask_shldv_epi32, _mm_maskz_shldv_epi32, _mm_shldv_epi64,
3145         _mm_mask_shldv_epi64, _mm_maskz_shldv_epi64): Ditto.
3146         * config/i386/i386-builtin.def (__builtin_ia32_vpshldv_v32hi,
3147         __builtin_ia32_vpshldv_v32hi_mask, __builtin_ia32_vpshldv_v32hi_maskz,
3148         __builtin_ia32_vpshldv_v16hi, __builtin_ia32_vpshldv_v16hi_mask,
3149         __builtin_ia32_vpshldv_v16hi_maskz, __builtin_ia32_vpshldv_v8hi,
3150         __builtin_ia32_vpshldv_v8hi_mask, __builtin_ia32_vpshldv_v8hi_maskz,
3151         __builtin_ia32_vpshldv_v16si, __builtin_ia32_vpshldv_v16si_mask,
3152         __builtin_ia32_vpshldv_v16si_maskz, __builtin_ia32_vpshldv_v8si,
3153         __builtin_ia32_vpshldv_v8si_mask, __builtin_ia32_vpshldv_v8si_maskz,
3154         __builtin_ia32_vpshldv_v4si, __builtin_ia32_vpshldv_v4si_mask,
3155         __builtin_ia32_vpshldv_v4si_maskz, __builtin_ia32_vpshldv_v8di,
3156         __builtin_ia32_vpshldv_v8di_mask, __builtin_ia32_vpshldv_v8di_maskz,
3157         __builtin_ia32_vpshldv_v4di, __builtin_ia32_vpshldv_v4di_mask,
3158         __builtin_ia32_vpshldv_v4di_maskz, __builtin_ia32_vpshldv_v2di,
3159         __builtin_ia32_vpshldv_v2di_mask,
3160         __builtin_ia32_vpshldv_v2di_maskz): New builtins.
3161         * config/i386/sse.md (vpshldv_<mode>, vpshldv_<mode>_mask,
3162         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): New patterns.
3164 2017-11-29  Julia Koval  <julia.koval@intel.com>
3166         * config/i386/avx512vbmi2intrin.h (_mm512_shrdv_epi16,
3167         _mm512_mask_shrdv_epi16, _mm512_maskz_shrdv_epi16, _mm512_shrdv_epi32,
3168         _mm512_mask_shrdv_epi32, _mm512_maskz_shrdv_epi32, _mm512_shrdv_epi64,
3169         _mm512_mask_shrdv_epi64, _mm512_maskz_shrdv_epi64): New intrinsics.
3170         * config/i386/avx512vbmi2vlintrin.h (_mm256_shrdv_epi16,
3171         _mm256_mask_shrdv_epi16, _mm256_maskz_shrdv_epi16, _mm256_shrdv_epi32,
3172         _mm256_mask_shrdv_epi32, _mm256_maskz_shrdv_epi32, _mm256_shrdv_epi64,
3173         _mm256_mask_shrdv_epi64, _mm256_maskz_shrdv_epi64, _mm_shrdv_epi16,
3174         _mm_mask_shrdv_epi16, _mm_maskz_shrdv_epi16, _mm_shrdv_epi32,
3175         _mm_mask_shrdv_epi32, _mm_maskz_shrdv_epi32, _mm_shrdv_epi64,
3176         _mm_mask_shrdv_epi64, _mm_maskz_shrdv_epi64): Ditto.
3177         * config/i386/i386-builtin-types.def (V32HI_FTYPE_V32HI_V32HI_V32HI,
3178         V32HI_FTYPE_V32HI_V32HI_V32HI_INT, V16HI_FTYPE_V16HI_V16HI_V16HI_INT,
3179         V8HI_FTYPE_V8HI_V8HI_V8HI_INT, V8SI_FTYPE_V8SI_V8SI_V8SI_INT,
3180         V4SI_FTYPE_V4SI_V4SI_V4SI_INT, V8DI_FTYPE_V8DI_V8DI_V8DI,
3181         V8DI_FTYPE_V8DI_V8DI_V8DI_INT, V4DI_FTYPE_V4DI_V4DI_V4DI_INT,
3182         V16SI_FTYPE_V16SI_V16SI_V16SI, V16SI_FTYPE_V16SI_V16SI_V16SI_INT,
3183         V2DI_FTYPE_V2DI_V2DI_V2DI_INT): New types.
3184         * config/i386/i386.c (ix86_expand_args_builtin): Handle new types.
3185         * config/i386/sse.md (vpshrdv_<mode>, vpshrdv_<mode>_mask,
3186         vpshrdv_<mode>_maskz, vpshrdv_<mode>_maskz_1): New pattern.
3188 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
3190         * config/sparc/sparc.c (sparc_do_work_around_errata): Treat the
3191         movsi_pic_gotdata_op instruction as a load for the UT699 errata
3192         workaround.
3194 2017-11-29  Martin Aberg  <maberg@gaisler.com>
3196         * config/sparc/sparc.md (divdf3_fix): Add NOP and adjust length
3197         to prevent b2bst errata sequence.
3198         (sqrtdf2_fix): Likewise.
3200 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
3202         * config/sparc/sparc.c (fpop_reg_depend_p): New function.
3203         (div_sqrt_insn_p): New function.
3204         (sparc_do_work_around_errata): Insert NOP instructions to
3205         prevent sequences that could trigger the TN-0013 errata for
3206         certain LEON3 processors.
3207         (pass_work_around_errata::gate): Also test sparc_fix_lost_divsqrt.
3208         (sparc_option_override): Set sparc_fix_lost_divsqrt appropriately.
3209         * config/sparc/sparc.md (fix_lost_divsqrt): New attribute.
3210         (in_branch_delay): Prevent div and sqrt in delay slot if
3211         fix_lost_divsqrt.
3212         * config/sparc/sparc.opt (sparc_fix_lost_divsqrt): New variable.
3214 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
3216         * config/sparc/sparc.c (atomic_insn_p): New function.
3217         (sparc_do_work_around_errata): Insert NOP instructions to
3218         prevent sequences that could trigger the TN-0010 errata for
3219         UT700.
3220         * config/sparc/sync.md (atomic_compare_and_swap_leon3_1): Make
3221         instruction referable in atomic_insns_p.
3223 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
3225         * config/sparc/sync.md (swapsi): 16-byte align if sparc_fix_gr712rc.
3226         (atomic_compare_and_swap_leon3_1): Likewise.
3227         (ldstub): Likewise.
3229 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
3231         * config/sparc/sparc.c (fpop_insn_p): New function.
3232         (sparc_do_work_around_errata): Insert NOP instructions to
3233         prevent sequences that could trigger the TN-0012 errata for
3234         GR712RC.
3235         (pass_work_around_errata::gate): Also test sparc_fix_gr712rc.
3236         * config/sparc/sparc.md (fix_gr712rc): New attribute.
3237         (in_branch_annul_delay): Prevent floating-point instructions
3238         in delay slot of annulled integer branch.
3240 2017-11-29  Richard Biener  <rguenther@suse.de>
3242         PR tree-optimization/83202
3243         * tree-vect-slp.c (scalar_stmts_set_t): New typedef.
3244         (bst_fail): Use it.
3245         (vect_analyze_slp_cost_1): Add visited set, do not account SLP
3246         nodes vectorized to the same stmts multiple times.
3247         (vect_analyze_slp_cost): Allocate a visited set and pass it down.
3248         (vect_analyze_slp_instance): Adjust.
3249         (scalar_stmts_to_slp_tree_map_t): New typedef.
3250         (vect_schedule_slp_instance): Add a map recording the SLP node
3251         representing the vectorized stmts for a set of scalar stmts.
3252         Avoid code-generating redundancies.
3253         (vect_schedule_slp): Allocate map and pass it down.
3255 2017-11-29  Nathan Sidwell  <nathan@acm.org>
3257         PR c++/83187
3258         * tree.c (build_complex_type): Fix canonicalization.  Only fill in
3259         type if it is new.
3261 2017-11-29  Wilco Dijkstra  <wdijkstr@arm.com>
3263         * config/aarch64/aarch64.c (aarch64_print_operand): Add new
3264         cases for printing LDP/STP memory addresses.
3265         (aarch64_print_address_internal): Renamed from
3266         aarch64_print_operand_address, added parameter, add Pmode check.
3267         (aarch64_print_ldpstp_address): New function for LDP/STP addresses.
3268         (aarch64_print_operand_address): Indirect to
3269         aarch64_print_address_internal.
3270         * config/aarch64/aarch64-simd.md (store_pair_lanes): Use new
3271         'y' operand output specifier.
3273 2017-11-29  Jakub Jelinek  <jakub@redhat.com>
3275         PR middle-end/83185
3276         * tree.c (build_simple_mem_ref_loc): Handle
3277         get_addr_base_and_unit_offset returning a MEM_REF.
3279         PR middle-end/80929
3280         * rtlanal.c (seq_cost): For non-single_set insns try to use insn_cost.
3282         PR target/80819
3283         * config/i386/sse.md (vec_concatv2di): Remove * from (=Yr,0,*rm)
3284         alternative.
3286 2017-11-28  David Malcolm  <dmalcolm@redhat.com>
3288         * diagnostic-show-locus.c (layout::print_trailing_fixits): Handle
3289         m_x_offset.
3290         (layout::move_to_column): Likewise.
3292 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
3294         PR sanitizer/81275
3295         * tree.c (block_may_fallthru): Return false if SWITCH_ALL_CASES_P
3296         is set on SWITCH_EXPR and !block_may_fallthru (SWITCH_BODY ()).
3298 2017-11-28  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3299             Martin Jambor  <mjambor@suse.cz>
3301         PR ipa/82808
3302         * tree.h (expr_type_first_operand_type_p): Declare
3303         * tree.c (expr_type_first_operand_type_p): New function.
3304         * ipa-prop.h (ipa_get_type): Allow i to be out of bounds.
3305         (ipa_value_from_jfunc): Adjust declaration.
3306         * ipa-cp.c (ipa_get_jf_pass_through_result): New parameter RES_TYPE.
3307         Use it as result type for arithmetics, unless it is NULL in which case
3308         be more conservative.
3309         (ipa_value_from_jfunc): New parameter PARM_TYPE, pass it to
3310         ipa_get_jf_pass_through_result.
3311         (propagate_vals_across_pass_through): Likewise.
3312         (propagate_scalar_across_jump_function): New parameter PARM_TYPE, pass
3313         is to propagate_vals_across_pass_through.
3314         (propagate_constants_across_call): Pass PARM_TYPE to
3315         propagate_scalar_across_jump_function.
3316         (find_more_scalar_values_for_callers_subset): Pass parameter type to
3317         ipa_value_from_jfunc.
3318         (cgraph_edge_brings_all_scalars_for_node): Likewise.
3319         * ipa-fnsummary.c (evaluate_properties_for_edge): Renamed parms_info
3320         to caller_parms_info, pass parameter type to ipa_value_from_jfunc.
3321         * ipa-prop.c (try_make_edge_direct_simple_call): New parameter
3322         target_type, pass it to ipa_value_from_jfunc.
3323         (update_indirect_edges_after_inlining): Pass parameter type to
3324         try_make_edge_direct_simple_call.
3326 2017-11-28  Jeff Law  <law@redhat.com>
3328         * gimple-ssa-evrp-analyze.c
3329         (evrp_range_analyzer::record_ranges_from_phis): Only use SCEV to
3330         refine ranges if scev_initialized_p returns true.
3331         * vr-values.c (vr_values::extract_range_from_phi_node): Likewise.
3333 2017-11-28  Julia Koval  <julia.koval@intel.com>
3335         * config/i386/avx512vbmi2intrin.h (_mm512_shrdi_epi16,
3336         _mm512_mask_shrdi_epi16, _mm512_maskz_shrdi_epi16, _mm512_shrdi_epi32,
3337         _mm512_mask_shrdi_epi32, _mm512_maskz_shrdi_epi32, _mm512_shrdi_epi64,
3338         _mm512_mask_shrdi_epi64, _mm512_maskz_shrdi_epi64): New intrinsics.
3339         * config/i386/avx512vbmi2vlintrin.h (_mm256_shrdi_epi16,
3340         _mm256_mask_shrdi_epi16, _mm256_maskz_shrdi_epi16,
3341         _mm256_mask_shrdi_epi32, _mm256_maskz_shrdi_epi32, _mm256_shrdi_epi32,
3342         _mm256_mask_shrdi_epi64, _mm256_maskz_shrdi_epi64, _mm256_shrdi_epi64,
3343         _mm_mask_shrdi_epi16, _mm_maskz_shrdi_epi16, _mm_shrdi_epi16,
3344         _mm_mask_shrdi_epi32, _mm_maskz_shrdi_epi32, _mm_shrdi_epi32,
3345         _mm_mask_shrdi_epi64, _mm_maskz_shrdi_epi64, _mm_shrdi_epi64): Ditto.
3346         * config/i386/i386-builtin.def (__builtin_ia32_vpshrd_v32hi,
3347         __builtin_ia32_vpshrd_v32hi_mask, __builtin_ia32_vpshrd_v16hi,
3348         __builtin_ia32_vpshrd_v16hi_mask, __builtin_ia32_vpshrd_v8hi,
3349         __builtin_ia32_vpshrd_v8hi_mask, __builtin_ia32_vpshrd_v16si,
3350         __builtin_ia32_vpshrd_v16si_mask, __builtin_ia32_vpshrd_v8si,
3351         __builtin_ia32_vpshrd_v8si_mask, __builtin_ia32_vpshrd_v4si,
3352         __builtin_ia32_vpshrd_v4si_mask, __builtin_ia32_vpshrd_v8di,
3353         __builtin_ia32_vpshrd_v8di_mask, __builtin_ia32_vpshrd_v4di,
3354         __builtin_ia32_vpshrd_v4di_mask, __builtin_ia32_vpshrd_v2di,
3355         __builtin_ia32_vpshrd_v2di_mask): New builtins.
3356         * config/i386/sse.md (vpshrd_<mode><mask_name>): New pattern.
3358 2017-11-28  Julia Koval  <julia.koval@intel.com>
3360         * config/i386/avx512vbmi2intrin.h (_mm512_shldi_epi16,
3361         _mm512_mask_shldi_epi16, _mm512_maskz_shldi_epi16, _mm512_shldi_epi32,
3362         _mm512_mask_shldi_epi32, _mm512_maskz_shldi_epi32, _mm512_shldi_epi64,
3363         _mm512_mask_shldi_epi64, _mm512_maskz_shldi_epi64): New intrinsics.
3364         * config/i386/avx512vbmi2vlintrin.h (_mm256_shldi_epi16,
3365         _mm256_mask_shldi_epi16, _mm256_maskz_shldi_epi16,
3366         _mm256_mask_shldi_epi32, _mm256_maskz_shldi_epi32, _mm256_shldi_epi32,
3367         _mm256_mask_shldi_epi64, _mm256_maskz_shldi_epi64, _mm256_shldi_epi64,
3368         _mm_mask_shldi_epi16, _mm_maskz_shldi_epi16, _mm_shldi_epi16,
3369         _mm_mask_shldi_epi32, _mm_maskz_shldi_epi32, _mm_shldi_epi32,
3370         _mm_mask_shldi_epi64, _mm_maskz_shldi_epi64, _mm_shldi_epi64): Ditto.
3371         * config/i386/i386-builtin-types.def (V32HI_FTYPE_V32HI_V32HI_INT,
3372         V32HI_FTYPE_V32HI_V32HI_INT_V32HI_INT, V16SI_FTYPE_V16SI_V16SI_INT,
3373         V16SI_FTYPE_V16SI_V16SI_INT_V16SI_INT,
3374         V8DI_FTYPE_V8DI_V8DI_INT_V8DI_INT, V8SI_FTYPE_V8SI_V8SI_INT_V8SI_INT,
3375         V16HI_FTYPE_V16HI_V16HI_INT_V16HI_INT,
3376         V4DI_FTYPE_V4DI_V4DI_INT_V4DI_INT,
3377         V8HI_FTYPE_V8HI_V8HI_INT_V8HI_INT,
3378         V4SI_FTYPE_V4SI_V4SI_INT_V4SI_INT,
3379         V2DI_FTYPE_V2DI_V2DI_INT_V2DI_INT): New types.
3380         * config/i386/i386-builtin.def (__builtin_ia32_vpshld_v32hi,
3381         __builtin_ia32_vpshld_v32hi_mask, __builtin_ia32_vpshld_v16hi,
3382         __builtin_ia32_vpshld_v16hi_mask, __builtin_ia32_vpshld_v8hi,
3383         __builtin_ia32_vpshld_v8hi_mask, __builtin_ia32_vpshld_v16si,
3384         __builtin_ia32_vpshld_v16si_mask, __builtin_ia32_vpshld_v8si,
3385         __builtin_ia32_vpshld_v8si_mask, __builtin_ia32_vpshld_v4si,
3386         __builtin_ia32_vpshld_v4si_mask, __builtin_ia32_vpshld_v8di,
3387         __builtin_ia32_vpshld_v8di_mask, __builtin_ia32_vpshld_v4di,
3388         __builtin_ia32_vpshld_v4di_mask, __builtin_ia32_vpshld_v2di,
3389         __builtin_ia32_vpshld_v2di_mask): New builtins.
3390         * config/i386/i386.c (ix86_expand_args_builtin): Handle new types.
3391         * config/i386/sse.md (vpshld_<mode><mask_name>): New pattern.
3393 2017-11-28  Richard Biener  <rguenther@suse.de>
3395         PR tree-optimization/80776
3396         * gimple-ssa-evrp-analyze.h (evrp_range_analyzer::set_ssa_range_info):
3397         Declare.
3398         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::set_ssa_range_info):
3399         New function.
3400         (evrp_range_analyzer::record_ranges_from_incoming_edges):
3401         If the incoming edge is an effective fallthru because the other
3402         edge only reaches a __builtin_unreachable () then record ranges
3403         derived from the controlling condition in SSA info.
3404         (evrp_range_analyzer::record_ranges_from_phis): Use set_ssa_range_info.
3405         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
3407 2017-11-28  Olivier Hainque  <hainque@adacore.com>
3409         * Makefile.in (SELFTEST_FLAGS): Use nul instead of /dev/null
3410         on mingw build hosts.
3412 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
3414         PR debug/81307
3415         * dbxout.c (dbx_block_with_cold_children): Fix function comment.
3417 2017-11-28  Richard Biener  <rguenther@suse.de>
3419         PR middle-end/83141
3420         * gimple-fold.c (gimple_fold_builtin_memory_op): For aggregate
3421         copies generated from memcpy use a character array as reference
3422         type.
3424 2017-11-28  Julia Koval  <julia.koval@intel.com>
3425             Sebastian Peryt  <sebastian.peryt@intel.com>
3427         * Makefile.in (cilkplus.def, cilk-builtins.def, c-family/cilk.o,
3428         c-family/c-cilkplus.o, c-family/array-notation-common.o,
3429         cilk-common.o, cilk.h, cilk-common.c): Remove.
3430         * builtin-types.def
3431         (BT_FN_INT_PTR_PTR_PTR_FTYPE_BT_INT_BT_PTR_BT_PTR_BT_PTR): Remove.
3432         * builtins.c (is_builtin_name): Remove cilkplus condition.
3433         (BUILT_IN_CILK_DETACH, BUILT_IN_CILK_POP_FRAME): Remove.
3434         * builtins.def (DEF_CILK_BUILTIN_STUB, DEF_CILKPLUS_BUILTIN,
3435         cilk-builtins.def, cilkplus.def): Remove.
3436         * cif-code.def (CILK_SPAWN): Remove.
3437         * cilk-builtins.def: Delete.
3438         * cilk-common.c: Ditto.
3439         * cilk.h: Ditto.
3440         * cilkplus.def: Ditto.
3441         * config/darwin.h (fcilkplus): Delete.
3442         * cppbuiltin.c: Ditto.
3443         * doc/extend.texi: Remove cilkplus doc.
3444         * doc/generic.texi: Ditto.
3445         * doc/invoke.texi: Ditto.
3446         * doc/passes.texi: Ditto.
3447         * gcc.c (fcilkplus): Remove.
3448         * gengtype.c (cilk.h): Remove.
3449         * gimple-pretty-print.c (dump_gimple_omp_for): Remove cilkplus
3450         support.
3451         * gimple.h (GF_OMP_FOR_KIND_CILKFOR, GF_OMP_FOR_KIND_CILKSIMD):
3452         Remove.
3453         * gimplify.c (gimplify_return_expr, maybe_fold_stmt,
3454         gimplify_call_expr,
3455         is_gimple_stmt, gimplify_modify_expr, gimplify_scan_omp_clauses,
3456         gimplify_adjust_omp_clauses, gimplify_omp_for, gimplify_expr): Remove
3457         cilkplus conditions.
3458         * ipa-fnsummary.c (ipa_dump_fn_summary, compute_fn_summary,
3459         inline_read_section): Ditto.
3460         * ipa-inline-analysis.c (cilk.h): Remove.
3461         * ira.c (ira_setup_eliminable_regset): Remove cilkplus support.
3462         * lto-wrapper.c (merge_and_complain, append_compiler_options,
3463         append_linker_options): Remove condition for fcilkplus.
3464         * lto/lto-lang.c (cilk.h): Remove.
3465         (lto_init): Remove condition for fcilkplus.
3466         * omp-expand.c (expand_cilk_for_call): Delete.
3467         (expand_omp_taskreg, expand_omp_for_static_chunk,
3468         expand_omp_for): Remove cilkplus
3469         conditions.
3470         (expand_cilk_for): Delete.
3471         * omp-general.c (omp_extract_for_data): Remove cilkplus support.
3472         * omp-low.c (scan_sharing_clauses, create_omp_child_function,
3473         execute_lower_omp, diagnose_sb_0): Ditto.
3474         * omp-simd-clone.c (simd_clone_clauses_extract): Ditto.
3475         * tree-core.h (OMP_CLAUSE__CILK_FOR_COUNT_): Delete.
3476         * tree-nested.c: Ditto.
3477         * tree-pretty-print.c (dump_omp_clause): Remove cilkplus support.
3478         (dump_generic_node): Ditto.
3479         * tree.c (OMP_CLAUSE__CILK_FOR_COUNT_): Delete.
3480         * tree.def (cilk_simd, cilk_for, cilk_spawn_stmt, cilk_sync_stmt):
3481         Delete.
3482         * tree.h (CILK_SPAWN_FN, EXPR_CILK_SPAWN): Delete.
3484 2017-11-28  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3486         * config/aarch64/aarch64.md (div<mode>3): Change check to TARGET_FLOAT.
3487         * config/aarch64/aarch64.c (aarch64_emit_approx_div): Add early exit
3488         for vector mode and !TARGET_SIMD.
3490 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
3492         * tree.def (SWITCH_EXPR): Change from 3 operand to 2 operand tree.
3493         Adjust comment.
3494         * tree.h (SWITCH_LABELS): Remove.
3495         * gimplify.c (gimplify_switch_expr): Don't test SWITCH_LABELS,
3496         assert SWITCH_BODY is non-NULL.
3497         * tree-pretty-print.c (dump_generic_node): Remove SWITCH_LABELS
3498         handling.
3499         * tree.c (block_may_fallthru): Always return true; for SWITCH_EXPR.
3501         PR tree-optimization/80788
3502         * match.pd (X +- C1 CMP C2 -> X CMP C2 -+ C1): If res
3503         has TREE_OVERFLOW set, call drop_tree_overflow.
3505 2017-11-28  Richard Biener  <rguenther@suse.de>
3507         PR tree-optimization/83158
3508         * tree-vrp.c (intersect_ranges): Prefer ~[0, 0] in a few more cases.
3510 2017-11-28  Segher Boessenkool  <segher@kernel.crashing.org>
3512         PR 81288/target
3513         * config/rs6000/rs6000.c (rs6000_rtx_costs): Do not handle
3514         TARGET_ISEL && !TARGET_MFCRF differently.  Simplify code.
3516 2017-11-27  Segher Boessenkool  <segher@kernel.crashing.org>
3518         * config/rs6000/rs6000.md (<code><GPR:mode><GPR2:mode>2_isel): Change
3519         LT/GT/LTU/GTU to LE/GE/LEU/GEU where possible.
3521 2017-11-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
3523         PR middle_end/82333
3524         * varasm.c (compare_constant): Take the mode of the constants into
3525         account when comparing floating point constants.
3527 2017-11-27  Gerald Pfeifer  <gerald@pfeifer.com>
3529         * hash-set.h (DEFINE_DEBUG_HASH_SET): Remove static qualifier
3530         from explicit instantiation of debug_helper.
3531         * vec.h (DEFINE_DEBUG_VEC): Ditto.
3533 2017-11-27  Richard Biener  <rguenther@suse.de>
3535         * gimple-fold.c (gimple_fold_builtin_memory_op): Remove dead code,
3536         refactor a bit.
3538 2017-11-27  Richard Biener  <rguenther@suse.de>
3540         * tree.c (wide_int_to_tree): Free discarded INTEGER_CST.
3541         (type_hash_canon): Also clear int_cst_hash_table entry for
3542         TYPE_MIN/MAX_VALUE.
3543         (build_nonstandard_integer_type): Hash all TYPE_MAX_VALUEs.
3545 2017-11-27  Tamar Christina  <tamar.christina@arm.com>
3547         * doc/extend.texi: Add -A suffix (ARMv8*-A, ARMv7-A).
3548         * doc/invoke.texi: Add -A suffix (ARMv8*-A, ARMv7-A).
3549         * doc/sourcebuild.texi: Add -A suffix (ARMv8*-A, ARMv7-A).
3551 2017-11-27  Markus Trippelsdorf  <markus@trippelsdorf.de>
3553         * hash-map.h (gt_cleare_cache): Avoid UB.
3555 2017-11-27  Eric Botcazou  <ebotcazou@adacore.com>
3557         * cfgloop.h (struct loop): Document usage of USHRT_MAX for unroll.
3558         * loop-unroll.c (decide_unroll_constant_iterations): Implement it.
3559         (decide_unroll_runtime_iterations): Likewise.
3560         (decide_unroll_stupid): Likewise.
3562 2017-11-27  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
3564         PR target/83109
3565         * config/i386/i386.md: Add a loop with incssp.
3567 2017-11-27  Martin Jambor  <mjambor@suse.cz>
3569         PR tree-optimization/81248
3570         * tree-sra.c (splice_param_accesses): Remove size check.
3571         (decide_one_param_reduction): Fix size check.
3572         * gimple-pretty-print.c (dump_profile): Silence warning.
3573         * params.def (PARAM_IPA_SRA_PTR_GROWTH_FACTOR): Adjust description.
3575 2017-11-27  Jakub Jelinek  <jakub@redhat.com>
3577         PR debug/81307
3578         * dbxout.c (lastlineno): New variable.
3579         (dbx_debug_hooks): Use dbxout_switch_text_section as
3580         switch_text_section debug hook.
3581         (dbxout_function_end): Switch to current_function_section
3582         rather than function_section.  If crtl->has_bb_partition,
3583         output just one N_FUN, depending on in_cold_section_p.
3584         (dbxout_source_line): Remember last lineno in lastlineno.
3585         (dbxout_switch_text_section): New function.
3586         (dbxout_function_decl): Adjust dbxout_block caller.
3587         (dbx_block_with_cold_children): New function.
3588         (dbxout_block): Return true if any LBRAC/RBRAC have been
3589         emitted.  Use dbx_block_with_cold_children at depth == 0
3590         in second partition.  Add PARENT_BLOCKNUM argument, pass
3591         it optionally adjusted to children.  Output LBRAC/RBRAC
3592         around recursive call only if the block is in the current
3593         partition, if not and anything was output, emit empty
3594         range LBRAC/RBRAC.
3595         * final.c (final_scan_insn): Compute cold_function_name
3596         before calling switch_text_section debug hook.  Call
3597         that hook even if dwarf2out_do_frame if not emitting
3598         dwarf debug info.
3600         PR target/83100
3601         * varasm.c (bss_initializer_p): Return true for DECL_COMMON
3602         TREE_READONLY decls.
3604 2017-11-27  Markus Trippelsdorf  <markus@trippelsdorf.de>
3606         PR rtl-optimization/82488
3607         * expr.c (fixup_args_size_notes): Avoid signed integer overflow.
3609 2017-11-26  Julia Koval  <julia.koval@intel.com>
3611         * config/i386/i386.c (processor_target_table): Add skylake_cost for
3612         skylake-avx512.
3613         * config/i386/x86-tune-costs.h (skylake_memcpy, skylake_memset,
3614         skylake_cost): New.
3616 2017-11-26  Julia Koval  <julia.koval@intel.com>
3618         * config/i386/driver-i386.c (host_detect_local_cpu):
3619         Detect skylake-avx512.
3621 2017-11-26  Julia Koval  <julia.koval@intel.com>
3623         * config.gcc: Add -march=cannonlake.
3624         * config/i386/driver-i386.c (host_detect_local_cpu): Detect cannonlake.
3625         * config/i386/i386-c.c (ix86_target_macros_internal): Handle cannonlake.
3626         * config/i386/i386.c (processor_costs): Add m_CANNONLAKE.
3627         (PTA_CANNONLAKE): New.
3628         (processor_target_table): Add cannonlake.
3629         (ix86_option_override_internal): Ditto.
3630         (fold_builtin_cpu): Ditto.
3631         (get_builtin_code_for_version): Handle cannonlake.
3632         (M_INTEL_COREI7_CANNONLAKE): New.
3633         * config/i386/i386.h (TARGET_CANNONLAKE, PROCESSOR_CANNONLAKE): New.
3634         * doc/invoke.texi: Add -march=cannonlake.
3636 2017-11-14  Boris Kolpackov  <boris@codesynthesis.com>
3638         * plugin.c (add_new_plugin): Use platform-specific library extensions.
3639         (try_init_one_plugin): Alternative implementation for MinGW.
3640         * Makefile.in (plugin_implib): New.
3641         (gengtype-lex.c): Fix broken AIX workaround.
3642         * configure: Regenerate.
3643         * doc/plugins.texi: Document support for MinGW.
3645 2017-11-25  Jakub Jelinek  <jakub@redhat.com>
3647         PR rtl-optimization/81553
3648         * combine.c (simplify_if_then_else): In (if_then_else COND (OP Z C1) Z)
3649         to (OP Z (mult COND (C1 * STORE_FLAG_VALUE))) optimization, if OP
3650         is a shift where C1 has different mode than the whole shift, use C1's
3651         mode for MULT rather than the shift's mode.
3653         PR target/82848
3654         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Don't fold
3655         builtins not enabled in the currently selected ISA.
3657 2017-11-24  Jackson Woodruff  <jackson.woodruff@arm.com>
3659         PR tree-optimization/71026
3660         * tree-ssa-math-opts (is_division_by_square, is_square_of): New.
3661         (insert_reciprocals): Change to insert reciprocals before a division
3662         by a square and to insert the square of a reciprocal.
3663         (execute_cse_reciprocals_1): Change to consider division by a square.
3664         (register_division_in): Add importance parameter.
3666 2017-11-24  Richard Biener  <rguenther@suse.de>
3668         PR tree-optimization/82402
3669         * tree-vect-loop-manip.c (create_lcssa_for_virtual_phi): Properly
3670         set SSA_NAME_OCCURS_IN_ABNORMAL_PHI.
3672 2017-11-24  Marc Glisse  <marc.glisse@inria.fr>
3674         * match.pd (0-ptr): New transformation.
3676 2017-11-24  Jan Hubicka  <hubicka@ucw.cz>
3678         PR bootstrap/83015
3679         * ipa-inline.c (inline_small_functions): Set current badnes correctly
3680         when skipping checking.
3682 2017-11-24  Richard Biener  <rguenther@suse.de>
3684         PR tree-optimization/83128
3685         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Handle STRING_CSTs.
3686         (vn_reference_lookup_3): Likewise.
3688 2017-11-24  Jakub Jelinek  <jakub@redhat.com>
3690         PR sanitizer/83014
3691         * ubsan.c (ubsan_type_descriptor): Use pp_unsigned_wide_integer
3692         instead of pp_printf with HOST_WIDE_INT_PRINT_DEC.  Avoid calling
3693         tree_to_uhwi twice.
3695         * tree-object-size.c (pass_through_call): Use gimple_call_return_flags
3696         ERF_RETURN*ARG* for builtins other than BUILT_IN_ASSUME_ALIGNED,
3697         check for the latter with gimple_call_builtin_p.  Do not handle
3698         BUILT_IN_STPNCPY_CHK which is not a pass through call.
3700 2017-11-24  Christophe Lyon  <christophe.lyon@linaro.org>
3702         * config/arm/arm_neon.h: Fix pragma GCC push_options before
3703         vdot_u32.
3705 2017-11-23  Julia Koval  <julia.koval@intel.com>
3707         * config/i386/avx512vbmi2intrin.h (_mm512_mask_expand_epi8,
3708         _mm512_maskz_expand_epi8, _mm512_mask_expandloadu_epi8,
3709         _mm512_maskz_expandloadu_epi8, _mm512_mask_expand_epi16,
3710         _mm512_maskz_expand_epi16, _mm512_mask_expandloadu_epi16,
3711         _mm512_maskz_expandloadu_epi16): New intrinsics.
3712         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_expand_epi8,
3713         _mm_maskz_expand_epi8, _mm_mask_expandloadu_epi8,
3714         _mm_maskz_expandloadu_epi8, _mm_mask_expand_epi16,
3715         _mm_maskz_expand_epi16, _mm_mask_expandloadu_epi16,
3716         _mm_maskz_expandloadu_epi16, _mm256_mask_expand_epi16,
3717         _mm256_maskz_expand_epi16, _mm256_mask_expandloadu_epi16,
3718         _mm256_maskz_expandloadu_epi16, _mm256_mask_expand_epi8,
3719         _mm256_maskz_expand_epi8, _mm256_mask_expandloadu_epi8,
3720         _mm256_maskz_expandloadu_epi8): New intrinsics.
3721         * config/i386/i386-builtin-types.def (V64QI_FTYPE_PCV64QI_V64QI_UDI,
3722         V32HI_FTYPE_PCV32HI_V32HI_USI, V32QI_FTYPE_PCV32QI_V32QI_USI,
3723         V16HI_FTYPE_PCV16HI_V16HI_UHI, V16QI_FTYPE_PCV16QI_V16QI_UHI,
3724         V8HI_FTYPE_PCV8HI_V8HI_UQI): New types.
3725         * config/i386/i386.c (ix86_expand_special_args_builtin): Use new types.
3726         * config/i386/sse.md (VI248_VLBW): New iterator.
3727         (expand<mode>_mask, expand<mode>_maskz): New patterns.
3729 2017-11-23  Julia Koval  <julia.koval@intel.com>
3731         * config.gcc (avx512vbmi2intrin.h, avx512vbmi2vlintrin): New headers.
3732         * config/i386/avx512vbmi2intrin.h (_mm512_mask_compress_epi8,
3733         _mm512_maskz_compress_epi8, _mm512_mask_compressstoreu_epi8,
3734         _mm512_mask_compress_epi16, _mm512_maskz_compress_epi16,
3735         _mm512_mask_compressstoreu_epi16): New.
3736         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_compress_epi8,
3737         _mm_maskz_compress_epi8, _mm256_mask_compressstoreu_epi16,
3738         _mm_mask_compress_epi16, _mm_maskz_compress_epi16,
3739         _mm256_mask_compress_epi16, _mm256_maskz_compress_epi16,
3740         _mm_mask_compressstoreu_epi8, _mm_mask_compressstoreu_epi16,
3741         _mm256_mask_compress_epi8, _mm256_maskz_compress_epi8,
3742         _mm256_mask_compressstoreu_epi8): New.
3743         * config/i386/i386-builtin-types.def (VOID_FTYPE_PV64QI_V64QI_UDI,
3744         VOID_FTYPE_PV32HI_V32HI_USI, VOID_FTYPE_PV32QI_V32QI_USI,
3745         VOID_FTYPE_PV16QI_V16QI_UHI, VOID_FTYPE_PV16HI_V16HI_UHI,
3746         VOID_FTYPE_PV8HI_V8HI_UQI): New types.
3747         * config/i386/i386-builtin.def (__builtin_ia32_compressqi512_mask,
3748         __builtin_ia32_compresshi512_mask, __builtin_ia32_compressqi256_mask,
3749         __builtin_ia32_compressqi128_mask, __builtin_ia32_compresshi256_mask,
3750         __builtin_ia32_compresshi128_mask,
3751         __builtin_ia32_compressstoreuqi512_mask,
3752         __builtin_ia32_compressstoreuhi512_mask,
3753         __builtin_ia32_compressstoreuqi256_mask,
3754         __builtin_ia32_compressstoreuqi128_mask,
3755         __builtin_ia32_compressstoreuhi256_mask,
3756         __builtin_ia32_compressstoreuhi128_mask): New builtins.
3757         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Create special args
3758         array for flags2.
3759         (ix86_expand_special_args_builtin): Handle new types.
3760         (s4fma_expand): Handle new builtin array.
3761         * config/i386/immintrin.h: Include new headers.
3762         * config/i386/sse.md (VI12_AVX512VLBW): New iterator.
3763         (compress<mode>_mask, compressstore<mode>_mask): New patterns.
3765 2017-11-23  Jakub Jelinek  <jakub@redhat.com>
3767         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Formatting
3768         fixes.  Declare temp and g variables at the top in order to avoid
3769         {} in most of the cases.
3771 2017-11-23  Marc Glisse  <marc.glisse@inria.fr>
3773         * match.pd (ptr-0): New transformation.
3775 2017-11-23  Charles Baylis  <charles.baylis@linaro.org>
3777         * config/arm/arm-protos.h (enum arm_addr_mode_op): New.
3778         (struct addr_mode_cost_table): New.
3779         (struct tune_params): Add field addr_mode_costs.
3780         * config/arm/arm.c (generic_addr_mode_costs): New.
3781         (arm_slowmul_tune): Initialise addr_mode_costs field.
3782         (arm_fastmul_tune): Likewise.
3783         (arm_strongarm_tune): Likewise.
3784         (arm_xscale_tune): Likewise.
3785         (arm_9e_tune): Likewise.
3786         (arm_marvell_pj4_tune): Likewise.
3787         (arm_v6t2_tune): Likewise.
3788         (arm_cortex_tune): Likewise.
3789         (arm_cortex_a8_tune): Likewise.
3790         (arm_cortex_a7_tune): Likewise.
3791         (arm_cortex_a15_tune): Likewise.
3792         (arm_cortex_a35_tune): Likewise.
3793         (arm_cortex_a53_tune): Likewise.
3794         (arm_cortex_a57_tune): Likewise.
3795         (arm_exynosm1_tune): Likewise.
3796         (arm_xgene1_tune): Likewise.
3797         (arm_cortex_a5_tune): Likewise.
3798         (arm_cortex_a9_tune): Likewise.
3799         (arm_cortex_a12_tune): Likewise.
3800         (arm_cortex_a73_tune): Likewise.
3801         (arm_v7m_tune): Likewise.
3802         (arm_cortex_m7_tune): Likewise.
3803         (arm_v6m_tune): Likewise.
3804         (arm_fa726te_tune): Likewise.
3805         (arm_mem_costs): Use table lookup to calculate cost of addressing mode.
3807 2017-11-23  Charles Baylis  <charles.baylis@linaro.org>
3809         * config/arm/arm.c (arm_mem_costs): New function.
3810         (arm_rtx_costs_internal): Use arm_mem_costs.
3812 2017-11-23  Mark Wielaard  <mark@klomp.org>
3814         * dwarf2out.c (init_sections_and_labels): Use generation to create
3815         unique ranges_section_label and ranges_base_label. Return generation.
3816         (output_rnglists): Add generation argument. Use generation to create
3817         unique ranges labels.
3818         (dwarf2out_finish): Get generation from init_sections_and_labels
3819         and pass generation to output_rnglists.
3821 2017-11-23  Mike Stump  <mikestump@comcast.net>
3822             Eric Botcazou  <ebotcazou@adacore.com>
3824         * doc/generic.texi (ANNOTATE_EXPR): Document 3rd operand.
3825         * cfgloop.h (struct loop): Add unroll field.
3826         * function.h (struct function): Add has_unroll bitfield.
3827         * gimplify.c (gimple_boolify) <ANNOTATE_EXPR>: Deal with unroll kind.
3828         (gimplify_expr) <ANNOTATE_EXPR>: Propagate 3rd operand.
3829         * loop-init.c (pass_loop2::gate): Return true if cfun->has_unroll.
3830         (pass_rtl_unroll_loops::gate): Likewise.
3831         * loop-unroll.c (decide_unrolling): Tweak note message.  Skip loops
3832         for which loop->unroll==1.
3833         (decide_unroll_constant_iterations): Use note for consistency and
3834         take loop->unroll into account.  Return early if loop->unroll is set.
3835         Fix thinko in existing test.
3836         (decide_unroll_runtime_iterations): Use note for consistency and
3837         take loop->unroll into account.
3838         (decide_unroll_stupid): Likewise.
3839         * lto-streamer-in.c (input_cfg): Read loop->unroll.
3840         * lto-streamer-out.c (output_cfg): Write loop->unroll.
3841         * tree-cfg.c (replace_loop_annotate_in_block) <annot_expr_unroll_kind>:
3842         New case.
3843         (replace_loop_annotate) <annot_expr_unroll_kind>: Likewise.
3844         (print_loop): Print loop->unroll if set.
3845         * tree-core.h (enum annot_expr_kind): Add annot_expr_unroll_kind.
3846         * tree-inline.c (copy_loops): Copy unroll and set cfun->has_unroll.
3847         * tree-pretty-print.c (dump_generic_node) <annot_expr_unroll_kind>:
3848         New case.
3849         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Bail out if
3850         loop->unroll is set and smaller than the trip count.  Otherwise bypass
3851         entirely the heuristics if loop->unroll is set.  Remove dead note.
3852         Fix off-by-one bug in other note.
3853         (try_peel_loop): Bail out if loop->unroll is set.  Fix formatting.
3854         (tree_unroll_loops_completely_1): Force unrolling if loop->unroll
3855         is greater than 1.
3856         (tree_unroll_loops_completely): Make static.
3857         (pass_complete_unroll::execute): Use correct type for variable.
3858         (pass_complete_unrolli::execute): Fix formatting.
3859         * tree.def (ANNOTATE_EXPR): Add 3rd operand.
3861 2017-11-23  Sergey Shalnov  <Sergey.Shalnov@intel.com>
3863         * config/i386/i386.h (TARGET_PREFER_AVX256): Also
3864         enable when TARGET_PREFER_AVX128 is set.
3866 2017-11-23  Jan Hubicka  <hubicka@ucw.cz>
3868         * ipa-profile.c (ipa_propagate_frequency_1): Use count instead of
3869         frequency.
3870         * cgraph.c (cgraph_edge::dump_edge_flags): Dump sreal frequencies.
3871         (cgraph_edge::maybe_hot_p): Use sreal frequencies.
3873 2017-11-23  Jan Hubicka  <hubicka@ucw.cz>
3875         * ipa-fnsummary.c (record_modified_bb_info): Use sreal
3876         frequencies. Fix estimation of aggregate parameters.
3878 2017-11-23  Jan Hubicka  <hubicka@ucw.cz>
3880         * cgraphclones.c (cgraph_node::create_clone): Fix updating of profile
3881         when inlining.
3883 2017-11-23  Tom de Vries  <tom@codesourcery.com>
3885         * config/sh/sh.h (ASM_OUTPUT_ADDR_VEC_ELT): Wrap in "do {} while (0)".
3887 2017-11-23  Tom de Vries  <tom@codesourcery.com>
3889         * config/ft32/ft32.h (ASM_OUTPUT_ADDR_VEC_ELT): Remove semicolon after
3890         macro.
3892 2017-11-23  Oleg Endo  <olegendo@gcc.gnu.org>
3894         PR target/83111
3895         * config/sh/sh.md (udivsi3, divsi3, sibcall_value_pcrel,
3896         sibcall_value_pcrel_fdpic): Use local variable instead of
3897         operands[3].
3898         (calli_tbr_rel): Add missing operand 2.
3899         (call_valuei_tbr_rel): Add missing operand 3.
3901 2017-11-23  Jakub Jelinek  <jakub@redhat.com>
3903         PR middle-end/82253
3904         * expr.c (expand_assignment): For CONCAT to_rtx, complex type from and
3905         bitpos/bitsize covering the whole destination, use store_expr only if
3906         the complex mode is the same.  Otherwise, use expand_normal and if
3907         it returns CONCAT, subreg each part separately instead of trying to
3908         subreg the whole result.
3910 2017-11-23  Richard Biener  <rguenther@suse.de>
3912         PR tree-optimization/23094
3913         * tree-ssa-sccvn.c (vuse_ssa_val): Handle VN_TOP when we
3914         come here from walking over backedges in the first iteration.
3915         (vn_reference_lookup_3): Skip clobbers that store the same value.
3917 2017-11-23  Richard Biener  <rguenther@suse.de>
3919         PR tree-optimization/81403
3920         * tree-ssa-pre.c (get_representative_for): Add parameter specifying
3921         a block we need a leader relative to.
3922         (phi_translate_1): For nary processing require a leader from
3923         get_representative_for given we run expression simplification
3924         using match-and-simplify.  Remove previous fix.
3926 2017-11-22  Jeff Law  <law@redhat.com>
3928         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
3929         Use new method allocate_value_range rather than accessing the
3930         vrp_value_range_pool data member directly.
3931         * tree-vrp.c (simplify_stmt_for_jump_threading): Tweak slightly
3932         to use extract_range_from_stmt method to avoid need for
3933         extract_range_from_assignment method.
3934         (vrp_prop::vrp_finalize): Use set_lattice_propagation_complete
3935         method rather than setting values_propgated data member directly.
3936         * vr-values.h (class vr_values): Privatize vrp_value_range_pool,
3937         and values propagated data members and extract_range_from_assignment
3938         method.  Reorder private data members to conform to standards.
3939         Add new methods set_lattice_propagation_complete and
3940         allocate_value_range.
3942 2017-11-22  Eric Botcazou  <ebotcazou@adacore.com>
3944         PR rtl-optimization/83030
3945         * doc/rtl.texi (Flags in an RTL Expression): Alphabetize, add entry
3946         for CROSSING_JUMP_P and mention usage of 'jump' for JUMP_INSNs.
3947         (Insns): Delete entry for REG_CROSSING_JUMP in register notes.
3948         * bb-reorder.c (update_crossing_jump_flags): Do not test whether the
3949         CROSSING_JUMP_P flag is already set before setting it.
3950         * cfgrtl.c (fixup_partition_crossing): Likewise.
3951         * reorg.c (relax_delay_slots): Do not consider a CROSSING_JUMP_P
3952         insn as useless.
3954 2017-11-22  Jakub Jelinek  <jakub@redhat.com>
3956         * simplify-rtx.c (simplify_binary_operation_1) <case VEC_SERIES>:
3957         Handle the case where both arguments are using gen_const_vec_series.
3959 2017-11-22  David Malcolm  <dmalcolm@redhat.com>
3961         PR c++/62170
3962         * pretty-print.c (pp_format): Move quoting implementation to
3963         pp_begin_quote and pp_end_quote.  Update pp_format_decoder call
3964         to pass address of "quote" local.
3965         (pp_begin_quote): New function.
3966         (pp_end_quote): New function.
3967         * pretty-print.h (printer_fn): Convert penultimate param from bool
3968         to bool *.
3969         (pp_begin_quote): New decl.
3970         (pp_end_quote): New decl.
3971         * tree-diagnostic.c (default_tree_printer): Convert penultimate
3972         param from bool to bool *.
3973         * tree-diagnostic.h (default_tree_printer): Likewise.
3975 2017-11-22  Jeff Law  <law@redhat.com>
3977         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::evrp_range_analyzer)
3978         Initialize vr_values.
3979         (evrp_range_analyzer::try_find_new_range): Call methods attached to
3980         vr_values via vr_values class instance rather than delegators.
3981         (evrp_range_analyzer::record_ranges_from_phis): Likewise.
3982         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
3983         (evrp_range_analyzer::push_value_range): Likewise.
3984         (evrp_range_analyzer::pop_value_range): Likewise.
3985         * gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Remove
3986         most delegators.  Those remaining are exposed as public interfaces.
3987         Make vr_values a pointer and private.
3988         (evrp_range_analyzer::~evrp_range_analyzer): Delete the attached
3989         vr_values.
3990         (evrp_range_analyzer::get_vr_value): New method.
3991         * gimple-ssa-evrp.c (class evrp_folder): Use DISABLE_COPY_AND_ASSIGN.
3992         (evrp_folder::evrp_folder): New ctor to initialize vr_values.
3993         (class evrp_dom_walker): Attach evrp_folder class, initialize
3994         it in the ctor.  Remove temporary delegators.
3995         (evrp_dom_walker::before_dom_children): Call methods in attached
3996         evrp_range_analyzer class via class instance pointer.  Use
3997         free value_range_constant_singleton to remove need for
3998         op_with_constant_singleton_value delegator method.  Do not
3999         create a vrp_prop class instance for every call!  Narrow
4000         scope of a couple variables.
4001         (evrp_dom_walker::cleanup): Call methods in attached
4002         evrp_range_analyzer class via class instance pointer.
4003         * vr-values.h (class vr_values): Privatize many methods and
4004         data members.
4006 2017-11-22  Richard Sandiford  <richard.sandiford@linaro.org>
4008         * tree.def (REDUC_MAX_EXPR, REDUC_MIN_EXPR, REDUC_PLUS_EXPR): Delete.
4009         * cfgexpand.c (expand_debug_expr): Remove handling for them.
4010         * expr.c (expand_expr_real_2): Likewise.
4011         * fold-const.c (const_unop): Likewise.
4012         * optabs-tree.c (optab_for_tree_code): Likewise.
4013         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
4014         * tree-inline.c (estimate_operator_cost): Likewise.
4015         * tree-pretty-print.c (dump_generic_node): Likewise.
4016         (op_code_prio): Likewise.
4017         (op_symbol_code): Likewise.
4018         * internal-fn.def (DEF_INTERNAL_SIGNED_OPTAB_FN): Define.
4019         (IFN_REDUC_PLUS, IFN_REDUC_MAX, IFN_REDUC_MIN): New internal functions.
4020         * internal-fn.c (direct_internal_fn_optab): New function.
4021         (direct_internal_fn_array, direct_internal_fn_supported_p
4022         (internal_fn_expanders): Handle DEF_INTERNAL_SIGNED_OPTAB_FN.
4023         * fold-const-call.c (fold_const_reduction): New function.
4024         (fold_const_call): Handle CFN_REDUC_PLUS, CFN_REDUC_MAX and
4025         CFN_REDUC_MIN.
4026         * tree-vect-loop.c: Include internal-fn.h.
4027         (reduction_code_for_scalar_code): Rename to...
4028         (reduction_fn_for_scalar_code): ...this and return an internal
4029         function.
4030         (vect_model_reduction_cost): Take an internal_fn rather than
4031         a tree_code.
4032         (vect_create_epilog_for_reduction): Likewise.  Build calls rather
4033         than assignments.
4034         (vectorizable_reduction): Use internal functions rather than tree
4035         codes for the reduction operation.  Update calls to the functions
4036         above.
4037         * config/aarch64/aarch64-builtins.c (aarch64_gimple_fold_builtin):
4038         Use calls to internal functions rather than REDUC tree codes.
4039         * config/aarch64/aarch64-simd.md: Update comment accordingly.
4041 2017-11-22  Olivier Hainque  <hainque@adacore.com>
4043         * config/vxworks.c (vxworks_override_options): Pick default
4044         dwarf version from macro value, VXWORKS_DWARF_VERSION_DEFAULT.
4045         * config/vxworks.h: Define VXWORKS_DWARF_VERSION_DEFAULT and
4046         DWARF_GNAT_ENCODINGS_DEFAULT.
4047         * config/vxworksae.h: Likewise.
4049 2017-11-22  Marc Glisse  <marc.glisse@inria.fr>
4051         PR tree-optimization/83104
4052         * vr-values.c (simplify_stmt_using_ranges): Check integral argument,
4053         not result.
4055 2017-11-22  Marek Polacek  <polacek@redhat.com>
4056             H.J. Lu  <hongjiu.lu@intel.com>
4057             Jason Merrill  <jason@redhat.com>
4059         PR c++/60336
4060         PR middle-end/67239
4061         PR target/68355
4062         * calls.c (initialize_argument_information): Call
4063         warn_parameter_passing_abi target hook.
4064         (store_one_arg): Use 0 for empty record size.  Don't push 0 size
4065         argument onto stack.
4066         (must_pass_in_stack_var_size_or_pad): Return false for empty types.
4067         * common.opt: Update -fabi-version description.
4068         * config/i386/i386.c (init_cumulative_args): Set cum->warn_empty.
4069         (ix86_gimplify_va_arg): Call arg_int_size_in_bytes instead of
4070         int_size_in_bytes.
4071         (ix86_is_empty_record): New function.
4072         (ix86_warn_parameter_passing_abi): New function.
4073         (TARGET_EMPTY_RECORD_P): Redefine.
4074         (TARGET_WARN_PARAMETER_PASSING_ABI): Redefine.
4075         * config/i386/i386.h (CUMULATIVE_ARGS): Add warn_empty.
4076         * doc/tm.texi: Regenerated.
4077         * doc/tm.texi.in (TARGET_EMPTY_RECORD_P,
4078         TARGET_WARN_PARAMETER_PASSING_ABI): Add.
4079         * dwarf2out.c (get_ultimate_context): Move to tree.c.
4080         * explow.c (hard_function_value): Call arg_int_size_in_bytes
4081         instead of int_size_in_bytes.
4082         * expr.c (copy_blkmode_to_reg): Likewise.
4083         * function.c (aggregate_value_p): Return 0 for empty types.
4084         (assign_parm_find_entry_rtl): Call warn_parameter_passing_abi
4085         target hook.
4086         (locate_and_pad_parm): Call arg size_in_bytes instead
4087         size_in_bytes.
4088         * lto-streamer-out.c (hash_tree): Hash TYPE_EMPTY_P and DECL_PADDING_P.
4089         * stor-layout.c (finalize_type_size): Set TYPE_EMPTY_P.
4090         * target.def (empty_record_p, warn_parameter_passing_abi): New target
4091         hooks.
4092         * targhooks.c (hook_void_CUMULATIVE_ARGS_tree): New hook.
4093         (std_gimplify_va_arg_expr): Skip empty records.  Call
4094         arg_size_in_bytes instead size_in_bytes.
4095         * targhooks.h (hook_void_CUMULATIVE_ARGS_tree): Declare.
4096         * tree-core.h (tree_type_common): Add empty_flag.
4097         (tree_decl_common): Update comments.
4098         * tree-streamer-in.c (unpack_ts_decl_common_value_fields): Stream
4099         DECL_PADDING_P.
4100         (unpack_ts_type_common_value_fields): Stream TYPE_EMPTY_P.
4101         * tree-streamer-out.c (pack_ts_decl_common_value_fields): Stream
4102         DECL_PADDING_P.
4103         (pack_ts_type_common_value_fields): Stream TYPE_EMPTY_P.
4104         * tree.c (default_is_empty_type): New function.
4105         (default_is_empty_record): New function.
4106         (arg_int_size_in_bytes): New function.
4107         (arg_size_in_bytes): New function.
4108         (get_ultimate_context): New function.
4109         * tree.h: Define TYPE_EMPTY_P, DECL_PADDING_P and
4110         TRANSLATION_UNIT_WARN_EMPTY_P.
4111         (default_is_empty_record, arg_int_size_in_bytes,
4112         arg_size_in_bytes, get_ultimate_context): Declare.
4114 2017-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4116         * config/arm/arm.c (cmse_clear_registers): New function.
4117         (cmse_nonsecure_call_clear_caller_saved): Replace register clearing
4118         code by call to cmse_clear_registers.
4119         (cmse_nonsecure_entry_clear_before_return): Likewise.
4121 2017-11-22  Tamar Christina  <tamar.christina@arm.com>
4123         * config/arm/arm_neon.h (vdot_u32, vdotq_u32)
4124         (vdot_s32, vdotq_s32): New.
4125         (vdot_lane_u32, vdotq_lane_u32): New.
4126         (vdot_lane_s32, vdotq_lane_s32): New.
4129 2017-11-22  Richard Sandiford  <richard.sandiford@linaro.org>
4131         PR middle-end/82547
4132         * wide-int.cc (wi::add_large, wi::sub_large): Fix overflow detection
4133         for unsigned values with fewer HWIs than the precision.
4134         (test_overflow): New function.
4135         (wide_int_cc_tests): Call it.
4137 2017-11-22  Richard Sandiford  <richard.sandiford@linaro.org>
4139         * emit-rtl.c (init_derived_machine_modes): Make sure ptr_mode
4140         has the same mode class as Pmode.
4142 2017-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4144         * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Get rid of
4145         padding_bits_to_clear_ptr.
4146         (cmse_nonsecure_entry_clear_before_return): Likewise.
4148 2017-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4150         * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Use
4151         auto_sbitap instead of integer bitfield to control register needing
4152         clearing.
4154 2017-11-22  Jakub Jelinek  <jakub@redhat.com>
4156         PR tree-optimization/83044
4157         * tree-vrp.c (vrp_prop::check_array_ref): If eltsize is not
4158         INTEGER_CST or is 0, clear up_bound{,_p1} and later ignore tests
4159         that need the upper bound.  Subtract offset from
4160         get_addr_base_and_unit_offset only if positive and subtract it
4161         before division by eltsize rather than after it.
4163         PR debug/83084
4164         * valtrack.c (propagate_for_debug_subst, propagate_for_debug): Reset
4165         debug insns if they would contain UNSPEC_VOLATILE or volatile asm.
4166         (dead_debug_insert_temp): Likewise, but also ignore even non-volatile
4167         asm.
4169         PR middle-end/82875
4170         * optabs.c (expand_doubleword_mult, expand_binop): Before calling
4171         expand_binop with *mul_widen_optab, make sure at least one of the
4172         operands doesn't have VOIDmode.
4174         PR debug/83034
4175         * dwarf2out.c (mem_loc_descriptor): Handle VEC_SERIES.
4177         PR rtl-optimization/82044
4178         PR tree-optimization/82042
4179         * dse.c (record_store): Check for overflow.
4180         (check_mem_read_rtx): Properly check for overflow if width == -1, call
4181         add_wild_read instead of clear_rhs_from_active_local_stores on
4182         overflow and log it into dump_file.
4184 2017-11-22  Richard Biener  <rguenther@suse.de>
4186         * gimple-iterator.c (gimple_find_edge_insert_loc): Ignore
4187         fake edges to exit when looking for a place to insert.
4188         * tree-ssa-pre.c (clear_expression_ids): Inline into callers
4189         and remove.
4190         (insert_into_preds_of_block): Commit edge insertion immediately,
4191         assert that doesn't require new BBs.
4192         (fini_pre): Release expressions.
4193         (pass_pre::execute): Shuffle things around a bit, if the fn
4194         is too large do not compute AVAIL either as this is really the
4195         quadratic bit.
4197 2017-11-22  Richard Biener  <rguenther@suse.de>
4199         PR tree-optimization/83089
4200         * tree-if-conv.c (pass_if_conversion::execute): If anything
4201         changed reset SCEV and free the number of iteration estimates.
4203 2017-11-21  Martin Sebor  <msebor@redhat.com>
4205         PR tree-optimization/82945
4206         * calls.h (warn_nonstring_bound): Remove unused function.
4208 2017-11-21  Martin Sebor  <msebor@redhat.com>
4210         PR tree-optimization/82945
4211         * builtins.c (expand_builtin_strlen): Call maybe_warn_nonstring_arg.
4212         * calls.h (maybe_warn_nonstring_arg): Declare new function.
4213         * calls.c (get_attr_nonstring_decl, maybe_warn_nonstring_arg): New
4214         functions.
4215         (initialize_argument_information): Call maybe_warn_nonstring_arg.
4216         * calls.h (get_attr_nonstring_decl): Declare new function.
4217         * doc/extend.texi (attribute nonstring): Update.
4218         * gimple-fold.c (gimple_fold_builtin_strncpy): Call
4219         get_attr_nonstring_decl and handle it.
4220         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Same.  Improve
4221         detection of nul-termination.
4222         (strlen_to_stridx): Change to a pointer.
4223         (handle_builtin_strlen, handle_builtin_stxncpy): Adjust.
4224         (pass_strlen::execute): Same.
4226 2017-11-21  Sergey Shalnov  <Sergey.Shalnov@intel.com>
4228         * config/i386/i386-opts.h (enum prefer_vector_width): Added new enum
4229         for the new option -mprefer-vector-width=[none|128|256|512].
4230         * config/i386/i386.c (ix86_target_string): remove old style options
4231         -mprefer-avx256 and make -mprefer-avx128 as alias.
4232         (ix86_option_override_internal):  Apply defaults for the
4233         -mprefer-vector-width=[128|256] option.
4234         * config/i386/i386.h (TARGET_PREFER_AVX128, TARGET_PREFER_AVX256):
4235         Implement macros to work with -mprefer-vector-width=.
4236         * config/i386/i386.opt: Implemented option
4237         -mprefer-vector-width=[none|128|256|512].
4238         * doc/invoke.texi: Documentation for
4239         -mprefer-vector-width=[none|128|256|512].
4241 2017-11-21  Pat Haugen  <pthaugen@us.ibm.com>
4243         * config/rs6000/ppc-asm.h (f50, vs50): Fix values.
4245 2017-11-21  Jonathan Wakely  <jwakely@redhat.com>
4247         * doc/invoke.texi (-Wmaybe-uninitialized): Rephrase for clarity.
4249 2017-11-21  Marc Glisse  <marc.glisse@inria.fr>
4251         * doc/generic.texi: Document POINTER_DIFF_EXPR, update
4252         POINTER_PLUS_EXPR.
4253         * cfgexpand.c (expand_debug_expr): Handle POINTER_DIFF_EXPR.
4254         * expr.c (expand_expr_real_2): Likewise.
4255         * fold-const.c (const_binop, fold_addr_of_array_ref_difference,
4256         fold_binary_loc): Likewise.
4257         * match.pd (X-X, P+(Q-P), &D-P, (P+N)-P, P-(P+N), (P+M)-(P+N),
4258         P-Q==0, -(A-B), X-Z<Y-Z, (X-Z)-(Y-Z), Z-X<Z-Y, (Z-X)-(Z-Y),
4259         (A-B)+(C-A)): New transformations for POINTER_DIFF_EXPR, based on
4260         MINUS_EXPR transformations.
4261         * optabs-tree.c (optab_for_tree_code): Handle POINTER_DIFF_EXPR.
4262         * tree-cfg.c (verify_expr, verify_gimple_assign_binary): Likewise.
4263         * tree-inline.c (estimate_operator_cost): Likewise.
4264         * tree-pretty-print.c (dump_generic_node, op_code_prio,
4265         op_symbol_code): Likewise.
4266         * tree-vect-stmts.c (vectorizable_operation): Likewise.
4267         * vr-values.c (extract_range_from_binary_expr): Likewise.
4268         * varasm.c (initializer_constant_valid_p_1): Likewise.
4269         * tree.def: New tree code POINTER_DIFF_EXPR.
4271 2017-11-21  Uros Bizjak  <ubizjak@gmail.com>
4273         * config/i386/i386.md (*bswap<mode>2_movbe): Add
4274         integer suffix to movbe mnemonic.
4275         (*bswaphi2_movbe): Ditto.
4276         (bswaphi_lowpart): Merge with *bswaphi_lowpart_1.
4278 2017-11-21  Jakub Jelinek  <jakub@redhat.com>
4280         PR c++/83045
4281         * tree-cfg.c (pass_warn_function_return::execute): Formatting fix.
4282         Also warn if seen __builtin_unreachable () call with BUILTINS_LOCATION.
4283         Use LOCATION_LOCUS when comparing against UNKNOWN_LOCATION.
4285 2017-11-21  Martin Liska  <mliska@suse.cz>
4287         * tree-inline.c (expand_call_inline): Remove not needed
4288         xstrdup_for_dump.
4290 2017-11-21  James Cowgill  <James.Cowgill@imgtec.com>
4291             Jakub Jelinek  <jakub@redhat.com>
4293         PR target/82880
4294         * config/mips/frame-header-opt.c (mips_register_frame_header_opt):
4295         Remove static keyword from f variable.
4297 2017-11-21  Jakub Jelinek  <jakub@redhat.com>
4299         PR tree-optimization/83086
4300         * gimple-ssa-store-merging.c
4301         (imm_store_chain_info::try_coalesce_bswap): Test this_n.base_addr
4302         rather than n.base_addr.
4304 2017-11-21  Martin Liska  <mliska@suse.cz>
4306         PR rtl-optimization/82044
4307         PR tree-optimization/82042
4308         * dse.c (check_mem_read_rtx): Check for overflow.
4310 2017-11-21  Aldy Hernandez  <aldyh@redhat.com>
4312         * tree-ssa-threadbackward.c (find_jump_threads_backwards): Fix
4313         typo in comment.
4315 2017-11-21  Claudiu Zissulescu  <claziss@synopsys.com>
4317         * cfgrtl.c (force_nonfallthru_and_redirect): Don't split a call
4318         and its corresponding call arg location note.
4320 2017-11-21  Claudiu Zissulescu  <claziss@synopsys.com>
4321             Andrew Burgess  <andrew.burgess@embecosm.com>
4323         * config/arc/arc-protos.h (arc_compute_frame_size): Delete
4324         declaration.
4325         (arc_return_slot_offset): Likewise.
4326         (arc_eh_return_address_location): New declaration.
4327         * config/arc/arc.c (TARGET_BUILTIN_SETJMP_FRAME_VALUE): Define.
4328         (MUST_SAVE_REGISTER): Add exception handler case.
4329         (MUST_SAVE_RETURN_ADDR): Likewise.
4330         (arc_frame_pointer_required): Likewise.
4331         (arc_frame_pointer_needed): New function.
4332         (arc_compute_frame_size): Changed.
4333         (arc_expand_prologue): Likewise.
4334         (arc_expand_epilogue): Likewise.
4335         (arc_initial_elimination_offset): Likewise.
4336         (arc_return_slot_offset): Delete.
4337         (arc_eh_return_address_location): New function.
4338         (arc_builtin_setjmp_frame_value): Likewise.
4339         * config/arc/arc.h (EH_RETURN_DATA_REGNO): Use 2 registers.
4340         (EH_RETURN_STACKADJ_RTX): Define.
4341         (EH_RETURN_HANDLER_RTX): Likewise.
4342         * config/arc/arc.md (eh_return): Delete.
4344 2017-11-21  Aldy Hernandez  <aldyh@redhat.com>
4346         * print-tree.h (debug_vec_tree): Remove prototype.
4347         * gdbinit.in (pvt): Remove macro.
4349 2017-11-21  Jakub Jelinek  <jakub@redhat.com>
4351         PR tree-optimization/83047
4352         * gimple-ssa-store-merging.c
4353         (imm_store_chain_info::output_merged_store): If the loads with the
4354         same vuse are in different basic blocks, for load_gsi pick a load
4355         location that is dominated by the other loads.
4357         PR c++/83059
4358         * config/i386/i386.c (ix86_memmodel_check): Start
4359         -Winvalid-memory-model diagnostics with lowercase letter.
4361         PR debug/82718
4362         * dwarf2out.c (dw_loc_list): If crtl->has_bb_partition, temporarily
4363         set in_cold_section_p to the partition containing loc_list->first.
4364         When seeing loc_list->last_before_switch node, update secname and
4365         perform range_across_switch second partition handling only after that.
4367         PR debug/82933
4368         * run-rtl-passes.c: Include debug.h.
4369         (run_rtl_passes): Call debug_hooks->assembly_start.
4370         * dwarf2out.c (dwarf2out_assembly_start): Return early if invoked
4371         multiple times.
4373         PR target/82981
4374         * internal-fn.c (expand_mul_overflow): Use OPTAB_WIDEN instead of
4375         OPTAB_DIRECT in calls to expand_simple_binop.
4377 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
4379         PR c/81404
4380         * Makefile.in (C_COMMON_OBJS): Add c-family/known-headers.o.
4382 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
4384         PR c++/72786
4385         * spellcheck.h (best_match::blithely_get_best_candidate): New
4386         accessor.
4388 2017-11-20  Jakub Jelinek  <jakub@redhat.com>
4390         * config/i386/i386.c (parse_mtune_ctrl_str): Start diagnostics
4391         with lower case letter.
4393 2017-11-20  Uros Bizjak  <ubizjak@gmail.com>
4395         * config/i386/i386.md (bswaphi2): New expander.
4396         (*bswaphi2_movbe): New insn pattern.
4397         (bswaphi -> rorhi pepehole2): New peephole pattern.
4399 2017-11-20  Jeff Law  <law@redhat.com>
4401         * Makefile.in (OBJS): Add gimple-ssa-evrp-analyze.o.
4402         * gimple-ssa-evrp-analyze.c: New file pulled from gimple-ssa-evrp.c.
4403         * gimple-ssa-evrp-analyze.h: New file pulled from gimple-ssa-evrp.c.
4404         * gimple-ssa-evrp.c: Remove bits moved into new files.  Include
4405         gimple-ssa-evrp-analyze.h.
4407         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Do not
4408         set BB_VISITED here.
4409         (evrp_range_analyzer::enter): Set BB_VISITED here instead.
4411 2017-11-20  Bin Cheng  <bin.cheng@arm.com>
4413         * tree-predcom.c: Add general comment on Store-Store chains.
4414         (split_data_refs_to_components): Postpone clearing eliminate_store_p
4415         flag in component.
4416         (get_chain_last_ref_at): Rename into...
4417         (get_chain_last_write_at): ...this.
4418         (get_chain_last_write_before_load): New function.
4419         (add_ref_to_chain): Promote type of chain from CT_STORE_LOAD to
4420         CT_STORE_STORE when write reference is added.
4421         (determine_roots_comp): Support load ref in CT_STORE_STORE chains.
4422         (is_inv_store_elimination_chain): Update get_chain_last_write_at call.
4423         (initialize_root_vars_store_elim_1): Ditto.
4424         (initialize_root_vars_store_elim_2): Ditto.  Replace rhs once default
4425         definition is created.
4426         (execute_pred_commoning_chain): Support load ref in CT_STORE_STORE
4427         chain by replacing it with dominant stored value.
4429 2017-11-20  Bin Cheng  <bin.cheng@arm.com>
4431         * tree-predcom.c (add_ref_to_chain): Remove check on distance.
4433 2017-11-20  Marc Glisse  <marc.glisse@inria.fr>
4435         * vr-values.c (extract_range_from_binary_expr): Use a full range
4436         for VR_VARYING.
4438 2017-11-20  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4440         * config/arm/arm.md (R4_REGNUM): Define constant.
4441         (nonsecure_call_internal): Remove r4 clobber.
4442         (nonsecure_call_value_internal): Likewise.
4443         * config/arm/thumb1.md (nonsecure_call_reg_thumb1_v5): Remove second
4444         clobber and resequence match_operands.
4445         (nonsecure_call_value_reg_thumb1_v5): Likewise.
4446         * config/arm/thumb2.md (nonsecure_call_reg_thumb2): Likewise.
4447         (nonsecure_call_value_reg_thumb2): Likewise.
4449 2017-11-20  Jakub Jelinek  <jakub@redhat.com>
4451         PR tree-optimization/78821
4452         * gimple-ssa-store-merging.c (find_bswap_or_nop_load): Give up
4453         if base is TARGET_MEM_REF.  If base is not MEM_REF, set base_addr
4454         to the address of the base rather than the base itself.
4455         (find_bswap_or_nop_1): Just use pointer comparison for vuse check.
4456         (find_bswap_or_nop_finalize): New function.
4457         (find_bswap_or_nop): Use it.
4458         (bswap_replace): Return a tree rather than bool, change first
4459         argument from gimple * to gimple_stmt_iterator, allow inserting
4460         into an empty sequence, allow ins_stmt to be NULL - then emit
4461         all stmts into gsi.  Fix up MEM_REF address gimplification.
4462         (pass_optimize_bswap::execute): Adjust bswap_replace caller.
4463         (struct store_immediate_info): Add N and INS_STMT non-static
4464         data members.
4465         (store_immediate_info::store_immediate_info): Initialize them
4466         from newly added ctor args.
4467         (merged_store_group::apply_stores): Formatting fixes.  Sort by
4468         bitpos at the end.
4469         (stmts_may_clobber_ref_p): For stores call also
4470         refs_anti_dependent_p.
4471         (gather_bswap_load_refs): New function.
4472         (imm_store_chain_info::try_coalesce_bswap): New method.
4473         (imm_store_chain_info::coalesce_immediate_stores): Use it.
4474         (split_group): Handle LROTATE_EXPR and NOP_EXPR rhs_code specially.
4475         (imm_store_chain_info::output_merged_store): Fail if number of
4476         new estimated stmts is bigger or equal than old.  Handle LROTATE_EXPR
4477         and NOP_EXPR rhs_code.
4478         (pass_store_merging::process_store): Compute n and ins_stmt, if
4479         ins_stmt is non-NULL and the store rhs is otherwise invalid, use
4480         LROTATE_EXPR rhs_code.  Pass n and ins_stmt to store_immediate_info
4481         ctor.
4482         (pass_store_merging::execute): Calculate dominators.
4484         * tree-ssa-math-opts.c (nop_stats, bswap_stats, struct symbolic_number,
4485         BITS_PER_MARKER, MARKER_MASK, MARKER_BYTE_UNKNOWN, HEAD_MARKER, CMPNOP,
4486         CMPXCHG, do_shift_rotate, verify_symbolic_number_p,
4487         init_symbolic_number, find_bswap_or_nop_load, perform_symbolic_merge,
4488         find_bswap_or_nop_1, find_bswap_or_nop, pass_data_optimize_bswap,
4489         class pass_optimize_bswap, bswap_replace,
4490         pass_optimize_bswap::execute): Moved to ...
4491         * gimple-ssa-store-merging.c: ... this file.
4492         Include optabs-tree.h.
4493         (nop_stats, bswap_stats, do_shift_rotate, verify_symbolic_number_p,
4494         init_symbolic_number, find_bswap_or_nop_load, perform_symbolic_merge,
4495         find_bswap_or_nop_1, find_bswap_or_nop, bswap_replace): Put into
4496         anonymous namespace, remove static keywords.
4497         (pass_optimize_bswap::gate): Test BITS_PER_UNIT == 8 here...
4498         (pass_optimize_bswap::execute): ... rather than here.  Formatting fix.
4500 2017-11-20  Jan Hubicka  <hubicka@ucw.cz>
4502         PR bootstrap/83062
4503         * ipa-inline.c (can_inline_edge_p): Fix typo in previous patch.
4505 2017-11-20  Aldy Hernandez  <aldyh@redhat.com>
4507         * vec.h (debug_helper): New function.
4508         (DEFINE_DEBUG_VEC): New macro.
4509         * hash-set.h (debug_helper): New function.
4510         (DEFINE_DEBUG_HASH_SET): New macro.
4511         * cfg.c (debug_slim (edge)): New function.
4512         Call DEFINE_DEBUG_VEC for edges.
4513         Call DEFINE_DEBUG_HASH_SET for edges.
4514         * cfghooks.c (debug_slim (basic_block)): New function.
4515         Call DEFINE_DEBUG_VEC for basic blocks.
4516         Call DEFINE_DEBUG_HASH_SET for basic blocks.
4517         * print-tree.c (debug_slim): New function to handle trees.
4518         Call DEFINE_DEBUG_VEC for trees.
4519         Call DEFINE_DEBUG_HASH_SET for trees.
4520         (debug (vec<tree, va_gc>) &): Remove.
4521         (debug (<vec<tree, va_gc>) *): Remove.
4522         * print-rtl.c (debug_slim): New function to handle const_rtx.
4523         Call DEFINE_DEBUG_VEC for rtx_def.
4524         Call DEFINE_DEBUG_VEC for rtx_insn.
4525         Call DEFINE_DEBUG_HASH_SET for rtx_def.
4526         Call DEFINE_DEBUG_HASH_SET for rtx_insn.
4527         * sel-sched-dump.c (debug (vec<rtx_insn *> &): Remove.
4528         (debug (vec<rtx_insn *> *ptr): Remove.
4529         (debug_insn_vector): Remove.
4530         * stor-layout.c (debug_rli): Call debug() instead of debug_vec_tree.
4532 2017-11-20  Tom de Vries  <tom@codesourcery.com>
4534         PR rtl-optimization/82020
4535         * simplify-rtx.c (simplify_ternary_operation): Fix comparison mode of
4536         IF_THEN_ELSE condition.
4538 2017-11-19  Jeff Law  <law@redhat.com>
4540         * tree-ssa-dom.c (record_equivalences_from_phis): Fix handling
4541         of degenerates resulting from ignoring an edge.
4543 2017-11-19  Jan Hubicka  <hubicka@ucw.cz>
4545         PR ipa/81360
4546         * ipa-inline.c (can_inline_edge_p): Also check that caller is optimized
4548 2017-11-19  Jan Hubicka  <hubicka@ucw.cz>
4550         PR ipa/83001
4551         * profile-count.c (profile_count::to_sreal_scale): Fix return value
4552         for uninitialied counts.
4554 2017-11-19  Jan Hubicka  <hubicka@ucw.cz>
4556         PR ipa/60243
4557         * tree-inline.c (estimate_num_insns): Set to 1 at least.
4559 2017-11-19  Jan Hubicka  <hubicka@ucw.cz>
4561         PR target/82713
4562         * i386.c (ix86_builtin_vectorization_cost): Be ready for insane types.
4564 2017-11-19  Tom de Vries  <tom@codesourcery.com>
4566         * config/arc/arc.h (FUNCTION_PROFILER): Remove semicolon after
4567         "do while (0)".
4569 2017-11-19  Tom de Vries  <tom@codesourcery.com>
4571         * config/phoenix.h (TARGET_OS_CPP_BUILTINS): Remove semicolon after
4572         "do {} while (0)".
4574 2017-11-19  Tom de Vries  <tom@codesourcery.com>
4576         * config/visium/visium.h (ASM_OUTPUT_CASE_END): Remove semicolon after
4577         macro body.
4579 2017-11-19  Tom de Vries  <tom@codesourcery.com>
4581         * config/ft32/ft32.h (REGISTER_TARGET_PRAGMAS): Remove semicolon after
4582         "do {} while (0)".
4583         * config/spu/spu.h (REGISTER_TARGET_PRAGMAS): Same.
4585 2017-11-19  Tom de Vries  <tom@codesourcery.com>
4587         * config/mcore/mcore-elf.h (MCORE_EXPORT_NAME): Remove semicolon after
4588         "do {} while (0)".
4589         * config/mcore/mcore.h (ASM_OUTPUT_ALIGNED_COMMON): After missing
4590         semicolon after MCORE_EXPORT_NAME call.
4592 2017-11-19  Tom de Vries  <tom@codesourcery.com>
4594         PR target/82961
4595         * vmsdbgout.c (vmsdbgout_early_finish): New function.
4596         (vmsdbg_debug_hooks): Set early_finish field to vmsdbgout_early_finish.
4598 2017-11-18  Jan Hubicka  <hubicka@ucw.cz>
4600         * cgraphclones.c (cgraph_edge::clone): Rename gcov_count to prof_count.
4601         (cgraph_edge::clone): Cleanup updating of profile.
4602         * ipa-cp.c (update_profiling_info): Likewise.
4603         * ipa-inline-transform.c (inline_transform): Likewise.
4604         * ipa-inline.c (inline_small_functions): Add missing space to dump.
4605         * ipa-split.c (execute_split_functions): Do not split when function
4606         is cold.
4607         * predict.c (estimate_bb_frequencies): Cleanup updating of profile.
4608         * profile-count.c (profile_count::dump): Add global0.
4609         (profile_count::to_cgraph_frequency): Do not ICE when entry is
4610         undefined.
4611         (profile_count::to_sreal_scale): Likewise.
4612         (profile_count::adjust_for_ipa_scaling): Fix typo in comment.
4613         (profile_count::combine_with_ipa_count): New function.
4614         * profile-count.h (profile_guessed_global0adjusted): New.
4615         (profile_count::adjusted_zero): New.
4616         (profile_count::global0adjusted): New.
4617         (profile_count::combine_with_ipa_count): New.
4618         * tree-inline.c (copy_edges_for_bb): Add NUM/DEN arugment;
4619         correct profile of return block of split functions.
4620         (copy_cfg_body): Remove unused profile_count.
4621         (copy_body): Likewise.
4622         (expand_call_inline): Update.
4623         (tree_function_versioning): Update.
4625 2017-11-18  Aldy Hernandez  <aldyh@redhat.com>
4627         * hash-set.h (hash_set::empty): New.
4628         * tree-ssa-threadbackward.h: Delete.
4629         * tree-ssa-threadbackward.c (class thread_jumps): New.
4630         Move max_threaded_paths into class.
4631         (fsm_find_thread_path): Remove arguments that are now in class.
4632         (profitable_jump_thread_path): Rename to...
4633         (thread_jumps::profitable_jump_thread_path): ...this.
4634         (convert_and_register_jump_thread_path): Rename to...
4635         (thread_jumps::convert_and_register_current_path): ...this.
4636         (check_subpath_and_update_thread_path): Rename to...
4637         (thread_jumps::check_subpath_and_update_thread_path): ...this.
4638         (register_jump_thread_path_if_profitable): Rename to...
4639         (thread_jumps::register_jump_thread_path_if_profitable): ...this.
4640         (handle_phi): Rename to...
4641         (thread_jumps::handle_phi): ...this.
4642         (handle_assignment): Rename to...
4643         (thread_jumps::handle_assignment): ...this.
4644         (fsm_find_control_statement_thread_paths): Rename to...
4645         (thread_jumps::fsm_find_control_statement_thread_paths): ...this.
4646         (find_jump_threads_backwards): Rename to...
4647         (thread_jumps::find_jump_threads_backwards): ...this.
4648         Initialize path local data.
4649         (pass_thread_jumps::execute): Call find_jump_threads_backwards
4650         from within thread_jumps class.
4651         (pass_early_thread_jumps::execute): Same.
4653 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
4655         * cgraph.c (cgraph_node::dump): Do IPA sanity checking on IPA counts.
4657 2017-11-17  Steve Ellcey  <sellcey@cavium.com>
4659         * config/aarch64/aarch64-simd.md (fnma<mode>4): Move neg operator
4660         to canonical location.
4662 2017-11-17  Steve Ellcey  <sellcey@cavium.com>
4664         PR target/81356
4665         * config/aarch64/aarch64.c (aarch64_use_by_pieces_infrastructure_p):
4666         Remove.
4667         (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): Remove define.
4669 2017-11-17  H.J. Lu  <hongjiu.lu@intel.com>
4671         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Use
4672         rcrt1.o%s/grcrt1.o%s for -static-pie.
4674 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
4676         * i386.c (ix86_multiplication_cost, ix86_division_cost,
4677         ix86_shift_rotate_cost): Break out from ...
4678         (ix86_rtx_costs): ... here.
4679         (ix86_add_stmt_cost): Use rtx cost machinery to compute cost of
4680         vector operations.
4682 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
4684         * predict.c (determine_unlikely_bbs): Set cgraph node count to 0
4685         when entry block was promoted unlikely.
4686         (estimate_bb_frequencies): Increase frequency scale.
4687         * profile-count.h (profile_count): Export precision info.
4689 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
4691         * tree-tailcall.c (eliminate_tail_call): Be more careful about not
4692         disturbin profile of entry block.
4694 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
4696         * ipa-fnsummary.c (estimate_node_size_and_time): Be more tolerant for
4697         roundoff errors.
4699 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
4701         * ipa-cp.c (update_profiling_info): Handle conversion to local profile.
4702         * tree-cfg.c (execute_fixup_cfg): Do fixup same way as inliner does.
4704 2017-11-17  Jeff Law  <law@redhat.com>
4706         * gimple-ssa-evrp.c (class evrp_range_analyzer): New class extracted
4707         from evrp_dom_walker class.  Various methods moved into new class.
4708         (evrp_range_analyzer::evrp_range_analyzer): Constructor for new class.
4709         (evrp_range_analyzer::enter): New method.
4710         (evrp_range_analyzer::leave): New method.
4711         (evrp_dom_walker): Remove delegators no longer needed by this class.
4712         Replace vr_values data member with evrp_range_analyzer
4714         * gimple-ssa-evrp.c (evrp_dom_walker::record_ranges_from_phis): New
4715         method extracted from evrp_dom_walker::before_dom_children.
4716         (evrp_dom_walker::record_ranges_from_stmt): Likewise.
4717         (evrp_dom_walker::record_ranges_from_incoming_edge): Likewise.
4719         * gimple-ssa-evrp.c (evrp_dom_walker): Add cleanup method.
4720         Add private copy constructor and move assignment operators.
4721         Privatize methods and class data where trivially possible.
4722         (evrp_dom_walker::cleanup): New function, extracted from
4723         execute_early_vrp.  Simplify access to class data.
4725         * vr-values.h (get_output_for_vrp): Prototype.
4726         * vr-values.c (get_output_for_vrp): New function extracted from
4727         vrp_visit_assignment_or_call and extract_range_from_stmt.
4728         (vrp_visit_assignment_or_call): Use get_output_for_vrp.  Simplify.
4730 2017-11-17  Luis Machado  <luis.machado@linaro.org>
4732         * config/aarch64/aarch64.c
4733         (qdf24xx_prefetch_tune) <default_opt_level>: Set to -1.
4734         (qdf24xx_tunings) <autoprefetcher_model>: Set to
4735         tune_params::AUTOPREFETCHER_WEAK.
4737 2017-11-17  Tamar Christina  <tamar.christina@arm.com>
4739         PR target/82641
4740         * config/arm/arm.c (arm_valid_target_attribute_rec):
4741         Parse "arch=" and "+<ext>".
4742         (arm_valid_target_attribute_tree): Re-init global options.
4743         (arm_option_override): Make non-static.
4744         (arm_options_perform_arch_sanity_checks): Make errors fatal.
4745         * gcc/config/arm/arm-c.c (__ARM_FEATURE_CMSE): Support undef.
4746         (__ARM_FEATURE_CRC32): Support undef.
4747         * config/arm/arm_acle.h (__ARM_FEATURE_CRC32): Replace with pragma.
4748         * doc/extend.texi (ARM Function Attributes): Add pragma and target.
4750 2017-11-17  David Malcolm  <dmalcolm@redhat.com>
4752         * gdbinit.in (break-on-diagnostic): New command.
4754 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
4756         * config/i386/i386.c (ix86_expand_epilogue): Change simple
4757         return to indirect jump for EH return if control-flow
4758         protection is enabled. Change explicit 'false' argument in
4759         pro_epilogue_adjust_stack with a value of
4760         flag_cf_protection.
4761         * config/i386/i386.md (simple_return_indirect_internal):
4762         Remove SImode restriction to support 64-bit.
4764 2017-11-17  Segher Boessenkool  <segher@kernel.crashing.org>
4766         * combine.c (added_notes_insn): New.
4767         (try_combine): Handle added_notes_insn like added_links_insn.
4768         Rewrite return value code.
4769         (distribute_notes): Set added_notes_insn to the earliest insn we added
4770         a note to.
4772 2017-11-17  Segher Boessenkool  <segher@kernel.crashing.org>
4774         PR rtl-optimization/82621
4775         * combine.c (try_combine): Do not split PARALLELs of two SETs if the
4776         dest of one of those SETs is unused.
4778 2017-11-17  Richard Biener  <rguenther@suse.de>
4780         PR fortran/83017
4781         * tree-core.h (enum annot_expr_kind): Add annot_expr_parallel_kind.
4782         * tree-pretty-print.c (dump_generic_node): Handle
4783         annot_expr_parallel_kind.
4784         * tree-cfg.c (replace_loop_annotate_in_block): Likewise.
4785         * gimplify.c (gimple_boolify): Likewise.
4787 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
4789         * config.gcc (extra_headers): Add cet.h for x86 targets.
4790         * config/i386/cet.h: New file.
4791         * doc/install.texi: Add --enable-cet/--disable-cet.
4793 2017-11-17  Richard Biener  <rguenther@suse.de>
4795         PR tree-optimization/83017
4796         * tree-parloops.c (MIN_PER_THREAD): Use --param parloops-min-per-thread.
4797         (gen_parallel_loop): Properly count iterations.
4798         (parallelize_loops): Handle loop->can_be_parallel independent
4799         of flag_loop_parallelize_all.  Make static profitability test match
4800         the runtime one.
4801         * params.def (PARAM_PARLOOPS_MIN_PER_THREAD): New.
4802         * invoke.texi (parloops-min-per-thread): Document.
4804 2017-11-17  Vineet Gupta  <vgupta@synopsys.com>
4806         * config/arc/linux.h: GLIBC_DYNAMIC_LINKER update per glibc
4807         upstreaming review comments.
4809 2017-11-17  Tamar Christina  <tamar.christina@arm.com>
4811         * expr.c (copy_blkmode_to_reg): Fix bitsize for targets
4812         with fast unaligned access.
4813         * doc/sourcebuild.texi (word_mode_no_slow_unalign): New.
4815 2017-11-17  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4817         * config/arm/arm.c (cmse_nonsecure_entry_clear_before_return): Allocate
4818         to_clear_arg_regs_bitmap to the same size as to_clear_bitmap.
4820 2017-11-17  Richard Biener  <rguenther@suse.de>
4822         * tree-ssa-pre.c (phi_translate_1): Remove redundant constant
4823         folding of references.
4825 2017-11-17  Qing Zhao  <qing.zhao@oracle.com>
4827         PR middle-end/78809
4828         * gimple-fold.c (gimple_fold_builtin_string_compare): Add handling
4829         of replacing call to strncmp with corresponding call to strcmp when
4830         meeting conditions.
4832 2017-11-17  Sergey Shalnov  <Sergey.Shalnov@intel.com>
4834         * config/i386/x86-tune.def (X86_TUNE_AVX256_OPTIMAL): Add tuning
4835         option prefer-avx256 for skylake-avx512 configuration.
4836         * config/i386/i386.c (ix86_option_override_internal): Ditto.
4837         (get_builtin_code_for_version): Ditto.
4839 2017-11-17  Chung-Ju Wu  <jasonwucj@gmail.com>
4840             Monk Chiang  <sh.chiang04@gmail.com>
4842         * config/nds32/nds32.h (FIRST_PSEUDO_REGISTER): Modify.
4843         (FIXED_REGISTERS): Reserve more register numbers.
4844         (CALL_USED_REGISTERS): Likewise.
4845         (REG_ALLOC_ORDER): Likewise.
4846         (REG_CLASS_CONTENTS): Likewise.
4847         (REGISTER_NAMES): Likewise.
4849 2017-11-17  Chung-Ju Wu  <jasonwucj@gmail.com>
4850             Kito Cheng  <kito.cheng@gmail.com>
4852         * config/nds32/nds32-modes.def: Add vector mode V4QI V2HI V8QI V4HI
4853         V2SI.
4854         * config/nds32/iterators.md: Add vector mode iterators and attributes.
4856 2017-11-16  Steven Munroe  <munroesj@gcc.gnu.org>
4858         * config/rs6000/mmintrin.h (_mm_add_pi32[_ARCH_PWR]): Correct
4859         parameter list for vec_splats.
4861 2017-11-16  Joseph Myers  <joseph@codesourcery.com>
4863         * doc/invoke.texi (-std=c17): Refer to 2018 expected publication
4864         date of C17.
4865         (-std=c18, -std=iso9899:2018, -std=gnu18): Document option aliases.
4867 2017-11-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
4869         PR bootstrap/82856
4870         * doc/install.texi: Document incompatibility of Perl >=5.6.26
4871         with the required version of automake 1.11.6.
4873 2017-11-16  Pat Haugen  <pthaugen@us.ibm.com>
4875         * rs6000/power9.md (power9fpdiv): New automaton and cpu_unit defined
4876         for it.
4877         (DU_C2_3_power9): Correct reservation combinations.
4878         (FP_DIV_power9, VEC_DIV_power9): New.
4879         (power9-alu): Split out rotate/shift...
4880         (power9-rot): ...to here, correct dispatch resource.
4881         (power9-cracked-alu, power9-mul, power9-mul-compare): Correct dispatch
4882         resource.
4883         (power9-fp): Correct latency.
4884         (power9-sdiv): Add div/sqrt resource.
4885         (power9-ddiv): Correct latency, add div/sqrt resource.
4886         (power9-sqrt, power9-dsqrt): Add div/sqrt resource.
4887         (power9-vecfdiv, power9-vecdiv): Correct latency, add div/sqrt
4888         resource.
4889         (power9-qpdiv, power9-qpmul): Adjust resource usage.
4891 2017-11-15  Michael Meissner  <meissner@linux.vnet.ibm.com>
4893         * config/rs6000/rs6000.c (rs6000_expand_builtin): Do not do the
4894         switch statement mapping KF built-ins to TF built-ins if we don't
4895         have the proper ISA 3.0 assembler support.
4897 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
4899         * tree-emutls.c (lower_emutls_data): Remove unused bb_freq.
4900         (lower_emutls_function_body): Do not compute it.
4902 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
4904         * ipa-split.c (split_bb_info): Turn time to sreal.
4905         (split_point): Likewise.
4906         (dump_split_point): Likewise.
4907         (fine_split_points): Likewise.
4908         (execute_split_functions): Only zero split_bbs; turn time to sreals.
4910 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
4912         * ipa-fnsummary.c (analyze_function_body): Accumulate time consistently
4913         in sreal.
4915 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
4917         * predict.c (combine_predictions_for_bb): Preserve zero predicted
4918         edges.
4919         (expensive_function_p): Remove useless assert.
4920         (determine_unlikely_bbs): Propagate also forward; determine cold blocks
4922 2017-11-16  Martin Sebor  <msebor@redhat.com>
4924         PR tree-optimization/82588
4925         PR tree-optimization/82583
4926         * tree-vrp.c (check_array_ref): Handle flexible array members,
4927         string literals, and inner indices.
4928         (search_for_addr_array): Add detail to diagnostics.
4930 2017-11-16  Nathan Sidwell  <nathan@acm.org>
4932         PR c++/82836
4933         PR c++/82737
4934         * tree.h (COPY_DECL_RTL): Rename parms for clarity.
4935         (SET_DECL_ASSEMBLER_NAME): Forward to
4936         overwrite_decl_assembler_name.
4937         (COPY_DECL_ASSEMBLER_NAME): Rename parms for clarity.
4938         (overwrite_decl_assembler_name): Declare.
4939         * tree.c (overwrite_decl_assembler_name): New.
4940         * langhooks-def.h (lhd_overwrite_decl_assembler_name): Declare.
4941         (LANG_HOOKS_OVERWRITE_DECL_ASSEMBLER_NAME): Provide default.
4942         (LANG_HOOKS_INITIALIZER): Add it.
4943         * langhooks.h (struct lang_hooks): Add overwrite_decl_assembler_name.
4944         * langhooks.c (lhd_set_decl_assembler_name): Use
4945         SET_DECL_ASSEMBLER_NAME.
4946         (lhd_overwrite_decl_assembler_name): Default implementation.
4948 2017-11-16  Wilco Dijkstra  <wdijkstr@arm.com>
4949             Jackson Woodruff  <jackson.woodruff@arm.com>
4951         PR tree-optimization/71026
4952         * match.pd: Canonicalize constant multiplies in division.
4954 2017-11-16  Wilco Dijkstra  <wdijkstr@arm.com>
4956         * opts.c (default_options_table): Add OPT_fomit_frame_pointer entry.
4957         * common/config/alpha/alpha-common.c (TARGET_OPTION_OPTIMIZATION_TABLE):
4958         Remove OPT_fomit_frame_pointer entry.
4959         * common/config/arc/arc-common.c: Likewise.
4960         * common/config/arm/arm-common.c: Likewise.
4961         * common/config/avr/avr-common.c: Likewise.
4962         * common/config/c6x/c6x-common.c: Likewise.
4963         * common/config/cr16/cr16-common.c: Likewise.
4964         * common/config/cris/cris-common.c: Likewise.
4965         * common/config/epiphany/epiphany-common.c: Likewise.
4966         * common/config/fr30/fr30-common.c: Likewise.
4967         * common/config/frv/frv-common.c: Likewise.
4968         * common/config/ia64/ia64-common.c: Likewise.
4969         * common/config/iq2000/iq2000-common.c: Likewise.
4970         * common/config/lm32/lm32-common.c: Likewise.
4971         * common/config/m32r/m32r-common.c: Likewise.
4972         * common/config/mcore/mcore-common.c: Likewise.
4973         * common/config/microblaze/microblaze-common.c: Likewise.
4974         * common/config/mips/mips-common.c: Likewise.
4975         * common/config/mmix/mmix-common.c: Likewise.
4976         * common/config/mn10300/mn10300-common.c: Likewise.
4977         * common/config/nios2/nios2-common.c: Likewise.
4978         * common/config/pa/pa-common.c: Likewise.
4979         * common/config/pdp11/pdp11-common.c: Likewise.
4980         * common/config/powerpcspe/powerpcspe-common.c: Likewise.
4981         * common/config/riscv/riscv-common.c: Likewise.
4982         * common/config/rs6000/rs6000-common.c: Likewise.
4983         * common/config/rx/rx-common.c: Likewise.
4984         * common/config/s390/s390-common.c: Likewise.
4985         * common/config/sh/sh-common.c: Likewise.
4986         * common/config/sparc/sparc-common.c: Likewise.
4987         * common/config/tilegx/tilegx-common.c: Likewise.
4988         * common/config/tilepro/tilepro-common.c: Likewise.
4989         * common/config/v850/v850-common.c: Likewise.
4990         * common/config/visium/visium-common.c: Likewise.
4991         * common/config/xstormy16/xstormy16-common.c: Likewise.
4992         * common/config/xtensa/xtensa-common.c: Likewise.
4993         * invoke.texi (-fomit-frame-pointer): Update documentation.
4995 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
4997         * tree-cfg.c (gimple_find_sub_bbs): Do not compute freq.
4999 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
5001         * cfg.c (scale_bbs_frequencies_int,
5002         cale_bbs_frequencies_gcov_type): Remove.
5003         * cfg.h (scale_bbs_frequencies_int,
5004         cale_bbs_frequencies_gcov_type): Remove.
5006 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
5008         * tree-ssa-loop-manip.c
5009         (scale_dominated_blocks_in_loop): Update to profile counts.
5010         (tree_transform_and_unroll_loop): Likewise.
5012 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
5014         * tree-vect-loop-manip.c (vect_do_peeling): Do not use
5015         scale_bbs_frequencies_int.
5017 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
5019         * final.c (compute_alignments): Use counts rather than frequencies.
5021 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
5023         * cfgloopanal.c: Include sreal.h
5024         (average_num_loop_insns): Use counts and sreal for accounting.
5026 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
5028         * cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
5029         manipulation.
5031 2017-11-16  Chung-Ju Wu  <jasonwucj@gmail.com>
5032             Kito Cheng  <kito.cheng@gmail.com>
5034         * config/nds32/constraints.md: Provide more constraints.
5035         * config/nds32/nds32.h (enum reg_class, REG_CLASS_NAMES,
5036         REG_CLASS_CONTENTS): Define R5_REG, R8_REG, and FRAME_POINTER_REG to
5037         support constraints usage.
5039 2017-11-16  Chung-Ju Wu  <jasonwucj@gmail.com>
5041         * config/nds32/constants.md (UNSPEC_VOLATILE_FUNC_RETURN): Remove.
5043 2017-11-16  Chung-Ju Wu  <jasonwucj@gmail.com>
5044             Kito Cheng  <kito.cheng@gmail.com>
5046         * config/nds32/nds32.opt: Add mext-perf, mext-perf2, mext-string.
5047         * config/nds32/nds32.opt: Refine the layout.
5048         * config/nds32/nds32.c (TARGET_EXT_PERF, TARGET_EXT_PERF2,
5049         TARGET_EXT_STRING): Support new options.
5050         * config/nds32/nds32.h: Likewise.
5051         * config/nds32/nds32.md: Likewise.
5052         * config/nds32/nds32-predicates.c: Likewise.
5053         * config/nds32/constraints.md: Likewise.
5054         * common/config/nds32/nds32-common.c: Likewise.
5056 2017-11-16  Julia Koval  <julia.koval@intel.com>
5058         PR target/82983
5059         * config/i386/gfniintrin.h: Add sse check.
5060         * config/i386/i386.c (ix86_expand_builtin): Fix gfni check.
5062 2017-11-16  Julia Koval  <julia.koval@intel.com>
5064         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VBMI2_SET,
5065         OPTION_MASK_ISA_AVX512VBMI2_UNSET): New.
5066         (ix86_handle_option): Handle -mavx512vbmi2.
5067         * config/i386/cpuid.h: Add bit_AVX512VBMI2.
5068         * config/i386/driver-i386.c (host_detect_local_cpu): Handle new bit.
5069         * config/i386/i386-c.c (__AVX512VBMI2__): New.
5070         * config/i386/i386.c (ix86_target_string): Handle -mavx512vbmi2.
5071         (ix86_valid_target_attribute_inner_p): Ditto.
5072         * config/i386/i386.h (TARGET_AVX512VBMI2, TARGET_AVX512VBMI2_P): New.
5073         * config/i386/i386.opt (mavx512vbmi2): New option.
5074         * doc/invoke.texi: Add new option.
5076 2017-11-16  Julia Koval  <julia.koval@intel.com>
5078         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8, _mm256_gf2p8mul_epi8,
5079         _mm_mask_gf2p8mul_epi8, _mm_maskz_gf2p8mul_epi8,
5080         _mm256_mask_gf2p8mul_epi8, _mm256_maskz_gf2p8mul_epi8,
5081         _mm512_mask_gf2p8mul_epi8, _mm512_maskz_gf2p8mul_epi8,
5082         _mm512_gf2p8mul_epi8): New intrinsics.
5083         * config/i386/i386-builtin-types.def
5084         (V64QI_FTYPE_V64QI_V64QI): New type.
5085         * config/i386/i386-builtin.def (__builtin_ia32_vgf2p8mulb_v64qi,
5086         __builtin_ia32_vgf2p8mulb_v64qi_mask, __builtin_ia32_vgf2p8mulb_v32qi,
5087         __builtin_ia32_vgf2p8mulb_v32qi_mask, __builtin_ia32_vgf2p8mulb_v16qi,
5088         __builtin_ia32_vgf2p8mulb_v16qi_mask): New builtins.
5089         * config/i386/sse.md (vgf2p8mulb_*): New pattern.
5090         * config/i386/i386.c (ix86_expand_args_builtin): Handle new type.
5092 2017-11-15  Uros Bizjak  <ubizjak@gmail.com>
5094         * config/i386/i386.c (x86_print_call_or_nop): Emit 5 byte nop
5095         explicitly as a stream of bytes.
5097 2017-11-15  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
5099         * config/rs6000/altivec.h (vec_xst_be): New #define.
5100         * config/rs6000/altivec.md (altivec_vperm_<mode>_direct): Rename
5101         and externalize from *altivec_vperm_<mode>_internal.
5102         * config/rs6000/rs6000-builtin.def (XL_BE_V16QI): Remove macro
5103         instantiation.
5104         (XL_BE_V8HI): Likewise.
5105         (XL_BE_V4SI): Likewise.
5106         (XL_BE_V4SI): Likewise.
5107         (XL_BE_V2DI): Likewise.
5108         (XL_BE_V4SF): Likewise.
5109         (XL_BE_V2DF): Likewise.
5110         (XST_BE): Add BU_VSX_OVERLOAD_X macro instantiation.
5111         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Correct
5112         all array entries with these keys: VSX_BUILTIN_VEC_XL,
5113         VSX_BUILTIN_VEC_XL_BE, VSX_BUILTIN_VEC_XST.  Add entries for key
5114         VSX_BUILTIN_VEC_XST_BE.
5115         * config/rs6000/rs6000.c (altivec_expand_xl_be_builtin): Remove.
5116         (altivec_expand_builtin): Remove handling for VSX_BUILTIN_XL_BE_*
5117         built-ins.
5118         (altivec_init_builtins): Replace conditional calls to def_builtin
5119         for __builtin_vsx_ld_elemrev_{v8hi,v16qi} and
5120         __builtin_vsx_st_elemrev_{v8hi,v16qi} based on TARGET_P9_VECTOR
5121         with unconditional calls.  Remove calls to def_builtin for
5122         __builtin_vsx_le_be_<mode>.  Add a call to def_builtin for
5123         __builtin_vec_xst_be.
5124         * config/rs6000/vsx.md (vsx_ld_elemrev_v8hi): Convert define_insn
5125         to define_expand, and add alternate RTL generation for P8.
5126         (*vsx_ld_elemrev_v8hi_internal): New define_insn based on
5127         vsx_ld_elemrev_v8hi.
5128         (vsx_ld_elemrev_v16qi): Convert define_insn to define_expand, and
5129         add alternate RTL generation for P8.
5130         (*vsx_ld_elemrev_v16qi_internal): New define_insn based on
5131         vsx_ld_elemrev_v16qi.
5132         (vsx_st_elemrev_v8hi): Convert define_insn
5133         to define_expand, and add alternate RTL generation for P8.
5134         (*vsx_st_elemrev_v8hi_internal): New define_insn based on
5135         vsx_st_elemrev_v8hi.
5136         (vsx_st_elemrev_v16qi): Convert define_insn to define_expand, and
5137         add alternate RTL generation for P8.
5138         (*vsx_st_elemrev_v16qi_internal): New define_insn based on
5139         vsx_st_elemrev_v16qi.
5141 2017-11-15  H.J. Lu  <hongjiu.lu@intel.com>
5143         PR target/82990
5144         * config/i386/i386.c (pass_insert_vzeroupper::gate): Remove
5145         TARGET_AVX512ER check.
5146         (ix86_option_override_internal): Set MASK_VZEROUPPER if
5147         neither -mzeroupper nor -mno-zeroupper is used and
5148         TARGET_EMIT_VZEROUPPER is set.
5149         * config/i386/i386.h (TARGET_EMIT_VZEROUPPER): New.
5150         * config/i386/x86-tune.def: Add X86_TUNE_EMIT_VZEROUPPER.
5152 2017-11-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
5154         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
5155         folding of vector compares.
5156         (fold_build_vec_cmp): New helper function.
5157         (fold_compare_helper): New helper function.
5158         (builtin_function_type): Add compare builtins to the list of functions
5159         having unsigned arguments.  Cosmetic updates to comment indentation.
5160         * config/rs6000/vsx.md (vcmpneb, vcmpneh, vcmpnew): Update to specify
5161         the not+eq combination.
5163 2017-11-15  Bin Cheng  <bin.cheng@arm.com>
5165         PR tree-optimization/82726
5166         PR tree-optimization/70754
5167         * tree-predcom.c (order_drefs_by_pos): New function.
5168         (combine_chains): Move code setting has_max_use_after to...
5169         (try_combine_chains): ...here.  New parameter.  Sort combined chains
5170         according to position information.
5171         (tree_predictive_commoning_loop): Update call to above function.
5172         (update_pos_for_combined_chains, pcom_stmt_dominates_stmt_p): New.
5174 2017-11-15  Bin Cheng  <bin.cheng@arm.com>
5176         PR tree-optimization/82726
5177         Revert
5178         2017-01-23  Bin Cheng  <bin.cheng@arm.com>
5180         PR tree-optimization/70754
5181         * tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE.
5182         (reassociate_to_the_same_stmt): New parameter INSERT_BEFORE.  Insert
5183         combined stmt before it if not NULL.
5184         (combine_chains): Process refs reversely and compute dominance point
5185         for root ref.
5187         Revert
5188         2017-02-23  Bin Cheng  <bin.cheng@arm.com>
5190         PR tree-optimization/79663
5191         * tree-predcom.c (combine_chains): Process refs in reverse order
5192         only for ZERO length chains, and add explaining comment.
5194 2017-11-15  Tamar Christina  <tamar.christina@arm.com>
5196         * config/arm/arm-cpus.in (armv8_3, ARMv8_3a, armv8.3-a): New
5197         * config/arm/arm-tables.opt (armv8.3-a): Regenerated.
5198         * doc/invoke.texi (ARM Options): Add armv8.3-a.
5200 2017-11-15  Tamar Christina  <tamar.christina@arm.com>
5202         * config/arm/arm.h (TARGET_DOTPROD): Add arm_arch8_2.
5204 2017-11-15  Martin Liska  <mliska@suse.cz>
5206         * tree-cfg.c (pass_warn_function_return::execute):
5207         Compare warn_return_type for greater than zero.
5209 2017-11-15  Sebastian Peryt  <sebastian.peryt@intel.com>
5211         PR target/82941
5212         PR target/82942
5213         * config/i386/i386.c (pass_insert_vzeroupper): Modify gate condition
5214         to return true on Xeon and not on Xeon Phi.
5215         (ix86_check_avx256_register): Changed to ...
5216         (ix86_check_avx_upper_register): ... this. Add extra check for
5217         VALID_AVX512F_REG_OR_XI_MODE.
5218         (ix86_avx_u128_mode_needed): Changed
5219         ix86_check_avx256_register to ix86_check_avx_upper_register.
5220         (ix86_check_avx256_stores): Changed to ...
5221         (ix86_check_avx_upper_stores): ... this. Changed
5222         ix86_check_avx256_register to ix86_check_avx_upper_register.
5223         (ix86_avx_u128_mode_after): Changed
5224         avx_reg256_found to avx_upper_reg_found. Changed
5225         ix86_check_avx256_stores to ix86_check_avx_upper_stores.
5226         (ix86_avx_u128_mode_entry): Changed
5227         ix86_check_avx256_register to ix86_check_avx_upper_register.
5228         (ix86_avx_u128_mode_exit): Ditto.
5229         * config/i386/i386.h: (host_detect_local_cpu): New define.
5231 2017-11-15  Dominik Infuehr  <dominik.infuehr@theobroma-systems.com>
5233         * config/arm/xgene1.md (xgene1): Split into automatons
5234         xgene1_main, xgene1_decoder, xgene1_div, xgene1_simd.
5235         (xgene1_f_load): Adjust reservations and/or types.
5236         (xgene1_f_store): Likewise.
5237         (xgene1_load_pair): Likewise.
5238         (xgene1_store_pair): Likewise.
5239         (xgene1_fp_load1): Likewise.
5240         (xgene1_load1): Likewise.
5241         (xgene1_store1): Likewise.
5242         (xgene1_move): Likewise.
5243         (xgene1_alu): Likewise.
5244         (xgene1_simd): Likewise.
5245         (xgene1_bfm): Likewise.
5246         (xgene1_neon_load1): Likewise.
5247         (xgene1_neon_store1): Likewise.
5248         (xgene1_neon_logic): Likewise.
5249         (xgene1_neon_st1): Likewise.
5250         (xgene1_neon_ld1r): Likewise.
5251         (xgene1_alu_cond): Added.
5252         (xgene1_shift_reg): Likwise.
5253         (xgene1_bfx): Likewise.
5254         (xgene1_mul): Split into xgene1_mul32, xgene1_mul64.
5256 2017-11-15  Jakub Jelinek  <jakub@redhat.com>
5258         PR target/82981
5259         * internal-fn.c: Include gimple-ssa.h, tree-phinodes.h and
5260         ssa-iterators.h.
5261         (can_widen_mult_without_libcall): New function.
5262         (expand_mul_overflow): If only checking unsigned mul overflow,
5263         not result, and can do efficiently MULT_HIGHPART_EXPR, emit that.
5264         Don't use WIDEN_MULT_EXPR if it would involve a libcall, unless
5265         no other way works.  Add MULT_HIGHPART_EXPR + MULT_EXPR support.
5266         (expand_DIVMOD): Formatting fix.
5267         * expmed.h (expand_mult): Add NO_LIBCALL argument.
5268         * expmed.c (expand_mult): Likewise.  Use OPTAB_WIDEN rather
5269         than OPTAB_LIB_WIDEN if NO_LIBCALL is true, and allow it to fail.
5271         PR tree-optimization/82977
5272         * tree-ssa-strlen.c (strlen_optimize_stmt): Pass a reference to a copy
5273         constructed temporary to strlen_to_stridx.put.
5275 2017-11-15  Martin Liska  <mliska@suse.cz>
5277         * configure.ac: Remove -fkeep-inline-functions from coverage_flags.
5278         * configure: Regenerate.
5280 2017-11-15  Martin Liska  <mliska@suse.cz>
5282         PR target/82927
5283         * config/sh/sh-mem.cc: Use proper probability for
5284         REG_BR_PROB_NOTE.
5286 2017-11-14  Jeff Law  <law@redhat.com>
5288         * explow.c (anti_adjust_stack_and_probe_stack_clash): Avoid probing
5289         the red zone for stack_clash_protection_final_dynamic_probe targets
5290         when the total dynamic stack size is zero bytes.
5292         * tree-ssa-threadupdate.c (thread_through_all_blocks): Thread
5293         blocks is post order.
5295 2017-11-15  Alexandre Oliva  <aoliva@redhat.com>
5297         * dumpfile.h (TDF_COMPARE_DEBUG): New.
5298         * final.c (rest_of_clean_state): Set it for the
5299         -fcompare-debug dump.
5300         * tree-pretty-print.c (dump_generic_node): Omit OBJ_TYPE_REF
5301         class when TDF_COMPARE_DEBUG is set.
5303         * dwarf2out.c (gen_producer_string): Discard
5304         OPT_fcompare_debug.
5306 2017-11-15  Joseph Myers  <joseph@codesourcery.com>
5308         PR c/81156
5309         * doc/extend.texi (Other Builtins): Document __builtin_tgmath.
5310         * ginclude/tgmath.h (__tg_cplx, __tg_ldbl, __tg_dbl, __tg_choose)
5311         (__tg_choose_2, __tg_choose_3, __TGMATH_REAL_1_2)
5312         (__TGMATH_REAL_2_3): Remove macros.
5313         (__TGMATH_CPLX, __TGMATH_CPLX_2, __TGMATH_REAL, __TGMATH_REAL_2)
5314         (__TGMATH_REAL_3, __TGMATH_CPLX_ONLY): Define using
5315         __builtin_tgmath.
5316         (frexp, ldexp, nexttoward, scalbn, scalbln): Define using
5317         __TGMATH_REAL_2.
5318         (remquo): Define using __TGMATH_REAL_3.
5320 2017-11-14  Jeff Law  <law@redhat.com>
5322         * vr-values.c: New file with contents extracted from tree-vrp.c.
5323         * Makefile.in (OBJS): Add vr-values.o
5324         * tree-vrp.h (set_value_range_to_nonnull): Prototype.
5325         (set_value_range, set_and_canonicalize_value_range): Likewise.
5326         (vrp_bitmap_equal_p, range_is_nonnull): Likewise.
5327         (value_range_constant_singleton, symbolic_range_p): Likewise.
5328         (compare_values, compare_values_warnv, vrp_val_is_min): Likewise.
5329         (vrp_val_is_max, copy_value_range, set_value_range_to_value): Likewise.
5330         (extract_range_from_binary_expr_1, vrp_val_min, vrp_val_max): Likewise.
5331         (set_value_range_to_null, range_int_cst_p, opreand_less_p): Likewise.
5332         (find_case_label_range, find_case_label_index): Likewise.
5333         (zero_nonzero_bits_from_vr, overflow_comparison_p): Likewise.
5334         (range_int_cst_singleton_p, value_inside_range): Likewise.
5335         (get_single_symbol): Likewise.
5336         (switch_update): Move structure definition here.
5337         (to_remove_edges, to_update_switch_stmts): Provide externs.
5338         * tree-vrp.c: Move all methods for vr-values class to vr-values.c
5339         (vrp_val_max, vrp_val_min, vrp_val_is_max): Make externally visible.
5340         (vrp_val_is_min, set_value_range): Likewise.
5341         (set_and_canonicalize_value_range, copy_value_range): Likewise.
5342         (set_value_range_to_value, set_value_range_to_nonnull): Likewise.
5343         (set_value_range_to_null, vrp_bitmap_equal_p): Likewise.
5344         (range_is_nonnull, range_int_cst_p): Likewwise.
5345         (range_int_cst_singleton_p, symbolic_range_p): Likewise.
5346         (get_single_symbol, operand_less_p): Likewise
5347         (compare_values_warnv, compare_values): Likewise.
5348         (value_inside_range, value_range_constant_singleton): Likewise.
5349         (zero_nonzero_bitgs_from_vr): Likewise.
5350         (extract_range_from_binary_expr_1): Likewise.
5351         (overflow_comparison_p): Likewise.
5352         (to_remove_edges, to_update_switch_stmts): Likewise.
5353         (find_case_label-index, find_case_label_range): Likewise.
5354         (switch_update, set_value_range_to_nonnegative): Remove.
5355         (set_value_range_to_truthvalue): Likewise.
5356         (symbolic_range_based_on_p, gimple_assign_nonzero_p): Likewise.
5357         (gimple_stmt_nonzero_p, compare_ranges): Likewise.
5358         (compare_range_with_value, vrp_valueize, vrp_valueize_1): Likewise.
5359         (find_case_label_ranges, test_for_singularity): Likewise.
5360         (range_fits_type_p, simplify_conversion_using_ranges): LIkewise.
5361         (x_vr_values): Move to its remaining use site.
5363 2017-11-10  Jeff Law  <law@redhat.com>
5365         * vr-values.h (VR_INITIALIZER): Move #define here.
5366         * gimple-ssa-evrp.c: New file with contents extracted from tree-vrp.c
5367         * Makefile.in (OBJS): Add tree-evrp.o
5368         * tree-vrp.h (assert_info): Move structure definition here.
5369         (set_value_range_to_varying): Prototype.
5370         (vrp_operand_equal_p, range_includes_zero_p): Likewise.
5371         (infer_value_range, register_edge_assert_for): Likewise.
5372         (stmt_interesting_for_vrp): Likewise.
5373         * tree-vrp.c: Move all methods for evrp class into gimple-ssa-evrp.c.
5374         (set_value_range_to_varying): No longer static.
5375         (vrp_operand_equal_p, range_includes_zero_p): Likewise.
5376         (infer_value_range, register_edge_assert_for): Likewise.
5378 2017-11-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
5380         * config/rs6000/rs6000.md (bswapdi2): On 32-bit ISA 3.0, don't
5381         generate the XXBRD instruction.
5383         * config/rs6000/rs6000-c.c (is_float128_p): New helper function.
5384         (rs6000_builtin_type_compatible): Treat _Float128 and long double
5385         as being compatible if -mabi=ieeelongdouble.
5386         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_HW_1): New macros
5387         to setup float128 built-ins with hardware support.
5388         (BU_FLOAT128_HW_2): Likewise.
5389         (BU_FLOAT128_HW_3): Likewise.
5390         (BU_FLOAT128_HW_VSX_1): Likewise.
5391         (BU_FLOAT128_HW_VSX_2): Likewise.
5392         (scalar_extract_expq): Change float128 built-in functions to
5393         accommodate having both KFmode and TFmode functions.  Use the
5394         KFmode variant as the default.
5395         (scalar_extract_sigq): Likewise.
5396         (scalar_test_neg_qp): Likewise.
5397         (scalar_insert_exp_q): Likewise.
5398         (scalar_insert_exp_qp): Likewise.
5399         (scalar_test_data_class_qp): Likewise.
5400         (sqrtf128_round_to_odd): Delete processing the round to odd
5401         built-in functions as special built-in functions, and define them
5402         as float128 built-ins.  Use the KFmode variant as the default.
5403         (truncf128_round_to_odd): Likewise.
5404         (addf128_round_to_odd): Likewise.
5405         (subf128_round_to_odd): Likewise.
5406         (mulf128_round_to_odd): Likewise.
5407         (divf128_round_to_odd): Likewise.
5408         (fmaf128_round_to_odd): Likewise.
5409         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Add
5410         support for KFmode and TFmode xststdcqp calls.
5411         (rs6000_expand_builtin): If long double is IEEE 128-bit floating
5412         point, switch the built-in handlers for the get/set float128
5413         exponent, get float128 mantissa, float128 test built-ins, and the
5414         float128 round to odd built-in functions.  Eliminate creating the
5415         float128 round to odd built-in functions as special built-ins.
5416         (rs6000_init_builtins): Eliminate special creation of the float128
5417         round to odd built-in functions.
5418         * config/rs6000/vsx.md (xsxexpqp_<mode>): Change float128 built-in
5419         function insns to support both TFmode and KFmode variants.
5420         (xsxsigqp_<mode>): Likewise.
5421         (xsiexpqpf_<mode>): Likewise.
5422         (xsiexpqp_<mode>): Likewise.
5423         (xststdcqp_<mode>): Likewise.
5424         (xststdcnegqp_<mode>): Likewise.
5425         (xststdcqp_<mode>): Likewise.
5427 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
5429         * tree-ssa-threadupdate.c (compute_path_counts): Remove
5430         unused path_in_freq_ptr parameter.
5431         (ssa_fix_duplicate_block_edges): Do not pass around path_in_freq
5433 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
5435         * ipa-inline.c (edge_badness): Dump sreal frequency.
5436         (compute_inlined_call_time): Match natural implementaiton ...
5437         * ipa-fnsummary.c (estimate_edge_size_and_time): ... here; remove
5438         forgotten division by CGRAPH_FREQ_BASE.
5440 2017-11-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5442         * config.gcc (*-*-solaris2*): Enable default_use_cxa_atexit since
5443         Solaris 11.  Update comment.
5444         * configure.ac (gcc_cv_ld_pid): Adapt comment for Solaris 12
5445         renaming.
5446         * config/sol2.h (STARTFILE_SPEC): Likewise.
5447         * configure: Regenerate.
5449 2017-11-14  Carl Love  <cel@us.ibm.com>
5451         * config/rs6000/rs6000.c (swap_endian_selector_for_mode): Remove
5452         le_ and be_ prefixes to swap* variables.  Remove
5453         if (VECTOR_ELT_ORDER_BIG) statement. Remove E_V16QImode case
5454         statements.
5456 2017-11-14  Jason Merrill  <jason@redhat.com>
5458         Support GTY((cache)) on hash_map.
5459         * hash-traits.h (ggc_remove): Add ggc_maybe_mx member function.
5460         (ggc_cache_remove): Override it instead of ggc_mx.
5461         * hash-table.h (gt_ggc_mx): Call it instead of ggc_mx.
5462         (gt_cleare_cache): Call ggc_mx instead of gt_ggc_mx.
5463         * hash-map-traits.h (simple_hashmap_traits): Add maybe_mx member.
5464         (simple_cache_map_traits): Override maybe_mx.
5465         * hash-map.h (hash_entry): Add ggc_maybe_mx and keep_cache_entry.
5466         (hash_map): Friend gt_cleare_cache.
5467         (gt_cleare_cache): New.
5468         * tree.h (tree_cache_traits): New hash_map traits class.
5469         (tree_cache_map): New typedef.
5471 2017-11-14  Richard Biener  <rguenther@suse.de>
5473         * tree-cfgcleanup.c (cleanup_control_expr_graph): Remove first_p
5474         paramter and handling.
5475         (cleanup_control_flow_bb): Likewise.
5476         (cleanup_control_flow_pre): New helper performing a DFS walk
5477         to call cleanup_control_flow_bb in PRE order.
5478         (cleanup_tree_cfg_1): Do the first phase of cleanup_control_flow_bb
5479         via cleanup_control_flow_pre.
5481 2017-11-14  James Greenhalgh  <james.greenhalgh@arm.com>
5483         * config/aarch64/aarch64-simd.md
5484         (aarch64_simd_bsl<mode>_internal): Remove DImode.
5485         (*aarch64_simd_bsl<mode>_alt): Likewise.
5486         (aarch64_simd_bsldi_internal): New.
5487         (aarch64_simd_bsldi_alt): Likewise.
5489 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
5491         * tracer.c (better_p): Do not compare frequencies.
5492         * reg-stack.c (better_edge): Likewise.
5493         * shrink-wrap.c (try_shrink_wrapping): Do not convert to gcov counts
5494         and back.
5496 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
5498         * auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
5499         * cgraphunit.c (cgraph_node::expand_thunk): Use update_max_bb_count.
5500         * ipa-utils.c (ipa_merge_profiles): Use update_max_bb_count.
5501         * lto-streamer-in.c (input_function): Use update_max_bb_count.
5502         * omp-expand.c (expand_omp_taskreg): Use update_max_bb_count.
5503         * predict.c (maybe_hot_frequency_p): Inline to ...
5504         (maybe_hot_count_p): ... here; rewrite to counts.
5505         (counts_to_freqs): Rename to ...
5506         (update_max_bb_count): ... this one.
5507         (expensive_function_p): Use counts.
5508         (estimate_bb_frequencies): Update.
5509         (rebuild_frequencies): Update.
5510         * predict.h (counts_to_freqs): Rename to ...
5511         (update_max_bb_count): ... this one.
5512         * profile.c (compute_branch_probabilities): Add debug info
5513         * tree-inline.c (expand_call_inline): Update debug info.
5514         (optimize_inline_calls): Use update_max_bb_count..
5515         (tree_function_versioning): Use update_max_bb_count..
5516         * value-prof.c (gimple_value_profile_transformations):
5517         Do not use update_max_bb_count.
5519 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
5521         * ipa-inline.c (compute_uninlined_call_time, compute_inlined_call_time):
5522         always use frequencies.
5524 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
5526         * bb-reorder.c: Remove frequencies from comments.
5527         (better_edge_p): Use profile counts.
5528         (find_traces): Dump profile counts.
5529         (rotate_loop): Use profile counts.
5530         (find_traces_1_round): Likewise.
5531         (connect_better_edge_p): Use counts instead of probabilities for
5532         reverse walk.
5533         (copy_bb_p): Drop early check for non-0 frequency.
5534         (sanitize_hot_paths): Update comments.
5536 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
5538         * ipa-split.c (struct split_point): Add count.
5539         (consider_split): Do not compute incoming frequency; compute incoming
5540         count and store it to split_point.
5541         (split_function): Set count of the call to split part correctly.
5543 2017-11-13  Carl Love  <cel@us.ibm.com>
5545         * config/rs6000/altivec.md (altivec_vsumsws_be): Add define_expand.
5547 2017-11-13  Tom Tromey  <tom@tromey.com>
5549         * doc/cpp.texi (Variadic Macros): Document __VA_OPT__.
5551 2017-11-13  Carl Love  <cel@us.ibm.com>
5553         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins):
5554         Add support for builtins:
5555         unsigned int vec_first_{,miss}_match_{,or_eos}index,
5556         vector {un,}signed {char,int,short},
5557         vector {un,}signed {char,int,short}) arguments.
5558         * config/rs6000/rs6000-builtin.def (VFIRSTMATCHINDEX,
5559         VFIRSTMATCHOREOSINDEX, VFIRSTMISMATCHINDEX, VFIRSTMISMATCHOREOSINDEX):
5560         Add BU_P9V_AV_2 expansions for the builtins.
5561         * config/rs6000/altivec.h (vec_first_match_index,
5562         vec_first_mismatch_index, vec_first_match_or_eos_index,
5563         vec_first_mismatch_or_eos_index): Add #defines for the builtins.
5564         * config/rs6000/rs6000-protos.h (bytes_in_mode): Add
5565         new extern declaration.
5566         * config/rs6000/rs6000.c (bytes_in_mode): Add new function.
5567         * config/rs6000/vsx.md (first_match_index_<mode>,
5568         first_match_or_eos_index_<mode>, first_mismatch_index_<mode>,
5569         first_mismatch_or_eos_index_<mode>): Add define expand.
5570         (vctzlsbb_<mode>): Add mode field to define_insn for vctzlsbb.
5571         * doc/extend.texi: Update the built-in documenation file for the new
5572         built-in functions.
5574 2017-11-13  Michael Meissner  <meissner@linux.vnet.ibm.com>
5576         * match.pd: Convert fminf<N>, fminf<N>x, fmax<N>, and fmax<N>x
5577         into the min/max operations for _Float<N> and _Float<N>X types.
5579 2017-11-13  Eric Botcazou  <ebotcazou@adacore.com>
5581         PR lto/81351
5582         * dwarf2out.c (do_eh_frame): New static variable.
5583         (dwarf2out_begin_prologue): Set it.
5584         (dwarf2out_frame_finish): Test it instead of dwarf2out_do_eh_frame.
5586 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
5588         * tree-ssa-coalesce.c (coalesce_cost): Fix formating.
5590         * tree-ssa-sink.c (select_best_block): Do not use frequencies.
5592 2017-11-13  Eric Botcazou  <ebotcazou@adacore.com>
5594         PR lto/81351
5595         * debug.h (dwarf2out_do_eh_frame): Declare.
5596         * dwarf2cfi.c (dwarf2out_do_eh_frame): New predicate.
5597         (dwarf2out_do_frame): Use it.
5598         (dwarf2out_do_cfi_asm): Likewise.
5599         * dwarf2out.c (dwarf2out_frame_finish): Likewise.
5600         (dwarf2out_assembly_start): Likewise.
5601         (dwarf2out_begin_prologue): Fix comment.
5602         * toplev.c (compile_file): Always call dwarf2out_frame_finish
5603         if the target needs either debug or unwind DWARF2 info.
5604         * lto-opts.c (lto_write_options): Do not save -fexceptions,
5605         -fnon-call-exceptions, -ffp-contract, -fmath-errno, -fsigned-zeros,
5606         -ftrapping-math, -ftrapv and -fwrapv.
5608 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
5610         * cgraph.c (cgraph_edge::sreal_frequency): New function.
5611         * cgraph.h (cgraph_edge::sreal_frequency): Declare.
5612         * ipa-fnsummary.c (dump_ipa_call_summary): Use sreal_frequency.
5613         (estimate_edge_size_and_time): Likewise.
5614         (ipa_merge_fn_summary_after_inlining): Likewise.
5615         * ipa-inline.c (cgraph_freq_base_rec): Remove.
5616         (compute_uninlined_call_time): Use sreal_frequency.
5617         (compute_inlined_call_time): Likewise.
5618         (ipa_inline): Do not initialize cgraph_freq_base_rec.
5619         * profile-count.c: Include sreal.h.
5620         (profile_count::to_sreal_scale): New.
5621         * profile-count.h: Forward declare sreal.
5622         (profile_count::to_sreal_scale): Declare.
5624 2017-11-13  Nathan Sidwell  <nathan@acm.org>
5626         * diagnostic.c (maybe_line_and_column): New.
5627         (diagnostic_get_location_text): Use it.
5628         (diagnostic_report_current_module): Likewise.
5629         (test_diagnostic_get_location_text): Add tests.
5631 2017-11-13  Luis Machado  <luis.machado@linaro.org>
5633         * doc/md.texi (Specifying processor pipeline description): Fix
5634         incorrect latency for the div instruction example.
5636 2017-11-13  Jakub Jelinek  <jakub@redhat.com>
5638         PR tree-optimization/78821
5639         * gimple-ssa-store-merging.c (compatible_load_p): Don't require
5640         that bit_not_p is the same.
5641         (imm_store_chain_info::coalesce_immediate_stores): Likewise.
5642         (split_group): Count precisely bit_not_p bits in each statement.
5643         (invert_op): New function.
5644         (imm_store_chain_info::output_merged_store): Use invert_op to
5645         emit BIT_XOR_EXPR with a xor_mask instead of BIT_NOT_EXPR if some
5646         but not all orig_stores have BIT_NOT_EXPR in the corresponding spots.
5648 2017-11-13  Martin Liska  <mliska@suse.cz>
5650         * gcov.c (struct coverage_info): Remove typedef of coverage_t.
5651         (struct source_info): Likewise.
5652         (add_branch_counts): Likewise.
5653         (add_line_counts): Likewise.
5654         (function_summary): Likewise.
5655         (output_intermediate_line): Likewise.
5656         (generate_results): Likewise.
5658 2017-11-13  Martin Liska  <mliska@suse.cz>
5660         * gcov.c (struct block_info): Remove typedef for block_t.
5661         (struct line_info): Likewise.
5662         (line_info::has_block): Likewise.
5663         (EXIT_BLOCK): Likewise.
5664         (unblock): Likewise.
5665         (circuit): Likewise.
5666         (get_cycles_count): Likewise.
5667         (process_file): Likewise.
5668         (read_graph_file): Likewise.
5669         (solve_flow_graph): Likewise.
5670         (find_exception_blocks): Likewise.
5671         (add_line_counts): Likewise.
5672         (accumulate_line_info): Likewise.
5673         (output_line_details): Likewise.
5675 2017-11-13  Martin Liska  <mliska@suse.cz>
5677         * gcov.c (struct arc_info): Remove typedef for arc_t.
5678         (struct line_info): Likewise.
5679         (add_branch_counts): Likewise.
5680         (output_branch_count): Likewise.
5681         (function_info::~function_info): Likewise.
5682         (circuit): Likewise.
5683         (output_intermediate_line): Likewise.
5684         (read_graph_file): Likewise.
5685         (solve_flow_graph): Likewise.
5686         (find_exception_blocks): Likewise.
5687         (add_line_counts): Likewise.
5688         (accumulate_line_info): Likewise.
5689         (output_line_details): Likewise.
5690         (output_function_details): Likewise.
5692 2017-11-13  Martin Liska  <mliska@suse.cz>
5694         * gcov.c (struct function_info): Remove typedef for function_t.
5695         (struct source_info): Likewise.
5696         (source_info::get_functions_at_location): Likewise.
5697         (solve_flow_graph): Likewise.
5698         (find_exception_blocks): Likewise.
5699         (add_line_counts): Likewise.
5700         (output_intermediate_file): Likewise.
5701         (process_file): Likewise.
5702         (generate_results): Likewise.
5703         (release_structures): Likewise.
5704         (read_graph_file): Likewise.
5705         (read_count_file): Likewise.
5706         (accumulate_line_counts): Likewise.
5707         (output_lines): Likewise.
5709 2017-11-13  Martin Liska  <mliska@suse.cz>
5711         * gcov.c (function_info::function_info): Remove num_counts
5712         and add vector<gcov_type>.
5713         (function_info::~function_info): Use the vector.
5714         (process_file): Likewise.
5715         (read_graph_file): Likewise.
5716         (read_count_file): Likewise.
5717         (solve_flow_graph): Likewise.
5719 2017-11-13  Martin Liska  <mliska@suse.cz>
5721         * gcov.c (function_info::is_artificial): New function.
5722         (process_file): Erase all artificial early.
5723         (generate_results): Skip as all artificial are already
5724         removed.
5726 2017-11-13  Martin Liska  <mliska@suse.cz>
5728         * gcov.c (read_graph_file): Store to global vector of functions.
5729         (read_count_file): Iterate the vector.
5730         (process_file): Likewise.
5731         (generate_results): Likewise.
5732         (release_structures): Likewise.
5734 2017-11-13  Jakub Jelinek  <jakub@redhat.com>
5736         PR tree-optimization/82954
5737         * gimple-ssa-store-merging.c
5738         (imm_store_chain_info::coalesce_immediate_stores): If
5739         !infof->ops[N].base_addr, split group if info->ops[N].base_addr.
5741 2017-11-13  Richard Sandiford  <richard.sandiford@linaro.org>
5743         * config/aarch64/aarch64-simd.md (aarch64_store_lane0<mode>):
5744         Upddate call to ENDIAN_LANE_N.
5745         (aarch64_<sur>dot_lane<vsi2qi>): Use aarch64_endian_lane_rtx.
5746         (aarch64_<sur>dot_laneq<vsi2qi>): Likewise.
5747         (*aarch64_simd_vec_copy_lane<mode>): Update calls to ENDIAN_LANE_N
5748         and use aarch64_endian_lane_rtx.
5749         (*aarch64_simd_vec_copy_lane_<vswap_width_name><mode>): Likewise.
5751 2017-11-12  Tom de Vries  <tom@codesourcery.com>
5753         * config/riscv/riscv.h (ASM_OUTPUT_LABELREF): Wrap in do {} while (0).
5755 2017-11-12  Tom de Vries  <tom@codesourcery.com>
5757         * config/elfos.h (ASM_OUTPUT_ASCII): Remove semicolon after macro body.
5759 2017-11-12  Tom de Vries  <tom@codesourcery.com>
5761         * config/cr16/cr16.h (ASM_OUTPUT_LABELREF): Remove semicolon after macro
5762         body.
5763         * config/powerpcspe/xcoff.h (ASM_OUTPUT_LABELREF): Same.
5764         * config/rs6000/xcoff.h (ASM_OUTPUT_LABELREF): Same.
5765         * defaults.h (ASM_OUTPUT_LABELREF): Same.
5767 2017-11-11  Martin Sebor  <msebor@redhat.com>
5769         PR c/81117
5770         * doc/extend.texi (attribute nonstring): Remove spurious argument.
5772         PR bootstrap/82948
5773         * prefic.c (translate_name): Replace strncpy with memcpy to
5774         avoid -Wstringop-truncation.
5776 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
5778         * tree-ssa-loop-im.c (execute_sm_if_changed): Do not compute freq_sum.
5780 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
5782         * predict.c (maybe_hot_frequency_p): Do not use cfun.
5784 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
5786         * tree-ssa-tail-merge.c (replace_block_by): Fix and re-enable profile
5787         merging.
5789 2017-11-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
5791         * config/rs6000/rs6000.md (bswaphi2_reg): On ISA 3.0 systems,
5792         enable generating XXBRH if the value is in a vector register.
5793         (bswapsi2_reg): On ISA 3.0 systems, enable generating XXBRW if the
5794         value is in a vector register.
5795         (bswapdi2_reg): On ISA 3.0 systems, always use XXBRD to do
5796         register to register bswap64's instead of doing the GPR sequence
5797         used on previous machines.
5798         (bswapdi2_xxbrd): New insn.
5799         (bswapdi2_reg): Disallow on ISA 3.0.
5800         (register to register bswap64 splitter): Do not split the insn on
5801         ISA 3.0 systems that use XXBRD.
5803 2017-11-10  Martin Sebor  <msebor@redhat.com>
5805         PR c/81117
5806         * config/darwin-c.c (framework_construct_pathname): Replace strncpy
5807         with memcpy.
5808         (find_subframework_file): Same.
5810 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
5812         * auto-profile.c (afdo_indirect_call): Drop frequency.
5813         * cgraph.c (symbol_table::create_edge): Drop frequency argument.
5814         (cgraph_node::create_edge): Drop frequency argument.
5815         (cgraph_node::create_indirect_edge): Drop frequency argument.
5816         (cgraph_edge::make_speculative): Drop frequency arguments.
5817         (cgraph_edge::resolve_speculation): Do not update frequencies
5818         (cgraph_edge::dump_edge_flags): Do not dump frequency.
5819         (cgraph_node::dump): Check consistency in IPA mode.
5820         (cgraph_edge::maybe_hot_p): Use IPA counter.
5821         (cgraph_edge::verify_count_and_frequency): Rename to ...
5822         (cgraph_edge::verify_count): ... this one; drop frequency checking.
5823         (cgraph_node::verify_node): Update.
5824         * cgraph.h (struct cgraph_edge): Drop frequency.
5825         (cgraph_edge::frequency): New function.
5826         * cgraphbuild.c (pass_build_cgraph_edges::execute): Donot pass
5827         frequencies.
5828         (cgraph_edge::rebuild_edges): Likewise.
5829         * cgraphclones.c (cgraph_edge::clone): Scale only counts.
5830         (duplicate_thunk_for_node): Do not pass frequency.
5831         (cgraph_node::create_clone): Scale only counts.
5832         (cgraph_node::create_virtual_clone): Do not pass frequency.
5833         (cgraph_node::create_edge_including_clones): Do not pass frequency.
5834         (cgraph_node::create_version_clone): Do not pass frequency.
5835         * cgraphunit.c (cgraph_node::analyze): Do not pass frequency.
5836         (cgraph_node::expand_thunk): Do not pass frequency.
5837         (cgraph_node::create_wrapper): Do not pass frequency.
5838         * gimple-iterator.c (update_call_edge_frequencies): Do not pass
5839         frequency.
5840         * gimple-streamer-in.c (input_bb): Scale only IPA counts.
5841         * ipa-chkp.c (chkp_produce_thunks): Do not pass frequency.
5842         * ipa-cp.c (ipcp_lattice::print): Use frequency function.
5843         (gather_caller_stats): Use frequency function.
5844         (ipcp_cloning_candidate_p): Use frequency function.
5845         (ipcp_propagate_stage): Use frequency function.
5846         (get_info_about_necessary_edges): Use frequency function.
5847         (update_profiling_info): Update only IPA profile.
5848         (update_specialized_profile): Use frequency functoin.
5849         (perhaps_add_new_callers): Update only IPA profile.
5850         * ipa-devirt.c (ipa_devirt): Use IPA profile.
5851         * ipa-fnsummary.c (redirect_to_unreachable): Do not set frequrency.
5852         (dump_ipa_call_summary): Use frequency function.
5853         (estimate_edge_size_and_time): Use frequency function.
5854         (ipa_merge_fn_summary_after_inlining): Use frequency function.
5855         * ipa-inline-analysis.c (do_estimate_edge_time): Use IPA profile.
5856         * ipa-inline-transform.c (update_noncloned_frequencies): Rename to ..
5857         (update_noncloned_counts): ... ths one; scale counts only.
5858         (clone_inlined_nodes): Do not scale frequency.
5859         (inline_call): Do not pass frequency.
5860         * ipa-inline.c (compute_uninlined_call_time): Use IPA profile.
5861         (compute_inlined_call_time): Use IPA profile.
5862         (want_inline_small_function_p): Use IPA profile.
5863         (want_inline_self_recursive_call_p): Use IPA profile.
5864         (edge_badness): Use IPA profile.
5865         (lookup_recursive_calls): Use IPA profile.
5866         (recursive_inlining): Do not pass frequency.
5867         (resolve_noninline_speculation): Do not update frequency.
5868         (inline_small_functions): Collect max of IPA profile.
5869         (dump_overall_stats): Dump IPA porfile.
5870         (dump_inline_stats): Dump IPA porfile.
5871         (ipa_inline): Collect IPA stats.
5872         * ipa-inline.h (clone_inlined_nodes): Update prototype.
5873         * ipa-profile.c (ipa_propagate_frequency_1): Use frequency function.
5874         (ipa_propagate_frequency): Use frequency function.
5875         (ipa_profile): Cleanup.
5876         * ipa-prop.c (ipa_make_edge_direct_to_target): Do not pass frequency
5877         * ipa-utils.c (ipa_merge_profiles): Merge all profiles.
5878         * lto-cgraph.c (lto_output_edge): Do not stream frequency.
5879         (input_node): Do not stream frequency.
5880         (input_edge): Do not stream frequency.
5881         (merge_profile_summaries): Scale only IPA profiles.
5882         * omp-simd-clone.c (simd_clone_adjust): Do not pass frequency.
5883         * predict.c (drop_profile): Do not recompute frequency.
5884         * trans-mem.c (ipa_tm_insert_irr_call): Do not pass frequency.
5885         (ipa_tm_insert_gettmclone_call): Do not pass frequency.
5886         * tree-cfg.c (execute_fixup_cfg): Drop profile to global0 if needed.
5887         * tree-chkp.c (chkp_copy_bounds_for_assign): Do not pass frequency.
5888         * tree-emutls.c (gen_emutls_addr): Do not pass frequency.
5889         * tree-inline.c (copy_bb): Do not scale frequency.
5890         (expand_call_inline): Do not scale frequency.
5891         (tree_function_versioning): Do not scale frequency.
5892         * ubsan.c (ubsan_create_edge): Do not pass frequency.
5894 2017-11-10  Julia Koval  <julia.koval@intel.com>
5896         * config/i386/gfniintrin.h (_mm_gf2p8affine_epi64_epi8)
5897         (_mm256_gf2p8affine_epi64_epi8, _mm_mask_gf2p8affine_epi64_epi8)
5898         (_mm_maskz_gf2p8affine_epi64_epi8, _mm256_mask_gf2p8affine_epi64_epi8)
5899         (_mm256_maskz_gf2p8affine_epi64_epi8)
5900         (_mm512_mask_gf2p8affine_epi64_epi8, _mm512_gf2p8affine_epi64_epi8)
5901         (_mm512_maskz_gf2p8affine_epi64_epi8): New intrinsics.
5902         * config/i386/i386-builtin.def (__builtin_ia32_vgf2p8affineqb_v64qi)
5903         (__builtin_ia32_vgf2p8affineqb_v32qi)
5904         (__builtin_ia32_vgf2p8affineqb_v16qi): New builtins.
5905         * config/i386/sse.md (vgf2p8affineqb_<mode><mask_name>): New pattern.
5907 2017-11-10  Tamar Christina  <tamar.christina@arm.com>
5909         PR target/82641
5910         * config/arm/arm.c
5911         (arm_option_override): Refactor.
5912         (arm_option_reconfigure_globals): New.
5913         (arm_options_perform_arch_sanity_checks): New.
5914         * config/arm/arm-protos.h (arm_option_reconfigure_globals):
5915         New prototype.
5916         (arm_options_perform_arch_sanity_checks): Likewise
5918 2017-11-10  Pat Haugen  <pthaugen@us.ibm.com>
5920         * rs6000/power9.md (power9-qpdiv): Correct DFU pipe usage.
5921         (power9-qpmul): New.
5922         * rs6000/rs6000.md ("type" attr): Add qmul.
5923         (mul<mode>3, fma<mode>4_hw, *fms<mode>4_hw, *nfma<mode>4_hw,
5924         *nfms<mode>4_hw, mul<mode>3_odd, fma<mode>4_odd, *fms<mode>4_odd,
5925         *nfma<mode>4_odd, *nfms<mode>4_odd): Change type to qmul.
5927 2017-11-10  Martin Sebor  <msebor@redhat.com>
5929         PR c/81117
5930         * builtins.c (compute_objsize): Handle arrays that
5931         compute_builtin_object_size likes to fail for.  Make extern.
5932         * builtins.h (compute_objsize): Declare.
5933         (check_strncpy_sizes): New function.
5934         (expand_builtin_strncpy): Call check_strncpy_sizes.
5935         * gimple-fold.c (gimple_fold_builtin_strncpy): Implement
5936         -Wstringop-truncation.
5937         (gimple_fold_builtin_strncat): Same.
5938         * gimple.c (gimple_build_call_from_tree): Set call location.
5939         * tree-ssa-strlen.c (strlen_to_stridx): New global variable.
5940         (maybe_diag_bound_equal_length, is_strlen_related_p): New functions.
5941         (handle_builtin_stxncpy, handle_builtin_strncat): Same.
5942         (handle_builtin_strlen): Use strlen_to_stridx.
5943         (strlen_optimize_stmt): Handle flavors of strncat, strncpy, and
5944         stpncpy.
5945         Use strlen_to_stridx.
5946         (pass_strlen::execute): Release strlen_to_stridx.
5947         * doc/invoke.texi (-Wsizeof-pointer-memaccess): Document enhancement.
5948         (-Wstringop-truncation): Document new option.
5950 2017-11-10  Martin Liska  <mliska@suse.cz>
5952         PR gcov-profile/82702
5953         * gcov.c (main): Handle intermediate files in a different
5954         way.
5955         (get_gcov_intermediate_filename): New function.
5956         (output_gcov_file): Remove support of intermediate files.
5957         (generate_results): Allocate intermediate file.
5958         (release_structures): Clean-up properly fn_end.
5959         (output_intermediate_file): Start iterating with line 1.
5961 2017-11-10  Jakub Jelinek  <jakub@redhat.com>
5963         PR tree-optimization/82929
5964         * gimple-ssa-store-merging.c (struct store_immediate_info): Add
5965         ops_swapped_p non-static data member.
5966         (store_immediate_info::store_immediate_info): Clear it.
5967         (imm_store_chain_info::coalesce_immediate_stores): If swapping
5968         ops set ops_swapped_p.
5969         (count_multiple_uses): Handle ops_swapped_p.
5971 2017-11-10  Martin Liska  <mliska@suse.cz>
5973         * coverage.c (coverage_init): Stream information about
5974         support of has_unexecuted_blocks.
5975         * doc/gcov.texi: Document that.
5976         * gcov-dump.c (dump_gcov_file): Support it in gcov_dump tool.
5977         * gcov.c (read_graph_file): Likewise.
5978         (output_line_beginning): Fix a small issue with
5979         color output.
5981 2017-11-10  Bin Cheng  <bin.cheng@arm.com>
5983         * tree-predcom.c (determine_roots_comp): Avoid memory leak by freeing
5984         reference of trivial component.
5986 2017-11-10  Jakub Jelinek  <jakub@redhat.com>
5988         PR bootstrap/82916
5989         * gimple-ssa-store-merging.c
5990         (pass_store_merging::terminate_all_aliasing_chains): For
5991         gimple_store_p stmts also call refs_output_dependent_p.
5993         PR rtl-optimization/82913
5994         * compare-elim.c (try_merge_compare): Punt if def_insn is not
5995         single set.
5997 2017-11-09  Jeff Law  <law@redhat.com>
5999         * vr-values.h: New file with vr_values class.
6000         * tree-vrp.c: Include vr-values.h
6001         (vrp_value_range_pool, vrp_equiv_obstack, num_vr_values): Move static
6002         data objects into the vr_values class.
6003         (vr_value, values_propagated, vr_phi_edge_counts): Likewise.
6004         (get_value_range): Make it a member function within vr_values class.
6005         (set_defs_to_varying, update_value_range, add_equivalence): Likewise.
6006         (vrp_stmt_computes_nonzero_p, op_with_boolean_value_range_p): Likewise.
6007         (op_with_constant_singleton_value_range): Likewise.
6008         (extract_range_for_var_from_comparison_expr): Likewise.
6009         (extract_range_from_assert, extract_range_from_ssa_name): Likewise.
6010         (extract_range_from_binary_expr): Likewise.
6011         (extract_range_from_unary_expr): Likewise.
6012         (extract_range_from_cond_expr, extrat_range_from_comparison): Likewise.
6013         (check_for_binary_op_overflow, extract_range_basic): Likewise.
6014         (extract_range_from_assignment, adjust_range_with_scev): Likewise.
6015         (dump_all_value_ranges, get_vr_for_comparison): Likewise.
6016         (compare_name_with_value, compare_names): Likewise.
6017         (vrp_evaluate_conditional_warnv_with_ops_using_ranges): Likewise.
6018         (vrp_evaluate_conditional_warnv_with_ops): Likewise.  Remove prototype.
6019         (vrp_evaluate_conditional, vrp_visit_cond_stmt): Likewise.
6020         (vrp_visit_switch_stmt, extract_range_from_stmt): Likewise.
6021         (extract_range_from_phi_node): Likewise.
6022         (simplify_truth_ops_using_ranges): Likewise.
6023         (simplify_div_or_mod_using_ranges): Likewise.
6024         (simplify_min_or_max_using_ranges, simplify_abs_using_ranges): Likewise.
6025         (simplify_bit_ops_using_ranges, simplify_cond_using_ranges_1): Likewise.
6026         (simplify_cond_using_ranges_2, simplify_switch_using_ranges): Likewise.
6027         (simplify_float_conversion_using_ranges): Likewise.
6028         (simplify_internal_call_using_ranges): Likewise.
6029         (two_valued_val_range_p, simplify_stmt_using_ranges): Likewise.
6030         (vrp_visit_assignment_or_call): Likewise.  Smuggle class instance
6031         poitner via x_vr_values for calls into gimple folder.
6032         (vrp_initialize_lattice): Make this the vr_values ctor.
6033         (vrp_free_lattice): Make this the vr_values dtor.
6034         (set_vr_value): New function.
6035         (class vrp_prop): Add vr_values data member.  Add various member
6036         functions as well as member functions that delegate to vr_values.
6037         (check_array_ref): Make a member function within vrp_prop class.
6038         (search_for_addr_array, vrp_initialize): Likewise.
6039         (vrp_finalize): Likewise.  Revamp to avoid direct access to
6040         vr_value, values_propagated, etc.
6041         (check_array_bounds): Extract vrp_prop class instance pointer from
6042         walk info structure.  Use it to call member functions.
6043         (check_all_array_refs): Make a member function within vrp_prop class.
6044         Smuggle class instance pointer via walk info structure.
6045         (x_vr_values): New local static.
6046         (vrp_valueize): Use x_vr_values to get class instance.
6047         (vr_valueize_1): Likewise.
6048         (class vrp_folder): Add vr_values data member.  Add various member
6049         functions as well as member functions that delegate to vr_values.
6050         (fold_predicate_in): Make a mber fucntion within vrp_folder class.
6051         (simplify_stmt_for_jump_threading): Extract smuggled vr_values
6052         class instance from vr_values.  Use it to call member functions.
6053         (vrp_dom_walker): Add vr_values data member.
6054         (vrp_dom_walker::after_dom_children): Smuggle vr_values class
6055         instance via x_vr_values.
6056         (identify_jump_threads): Accept vr_values as argument.  Store
6057         it into the walker structure.
6058         (evrp_dom_walker): Add vr_values class data member.  Add various
6059         delegators.
6060         (evrp_dom_walker::try_find_new_range): Use vr_values data
6061         member to access the memory allocator.
6062         (evrp_dom_walker::before_dom_children): Store vr_values class
6063         instance into the vrp_folder class.
6064         (evrp_dom_walker::push_value_range): Rework to avoid direct
6065         access to num_vr_values and vr_value.
6066         (evrp_dom_walker::pop_value_range): Likewise.
6067         (execute_early_vrp): Remove call to vrp_initialize_lattice.
6068         Use vr_values to get to dump_all_value_ranges member function.
6069         Remove call to vrp_free_lattice.  Call vrp_initialize, vrp_finalize,
6070         and simplify_cond_using_ranges_2 via vrp_prop class instance.
6071         Pass vr_values class instance down to identify_jump_threads.
6072         Remove call to vrp_free_lattice.
6073         (debug_all_value_ranges): Remove.
6075         * tree-vrp.c (vrp_prop): Move class to earlier point in the file.
6076         (vrp_folder): Likewise.
6078         * tree-vrp.c (set_value_range): Do not reference vrp_equiv_obstack.
6079         Get it from the existing bitmap instead.
6080         (vrp_intersect_ranges_1): Likewise.
6082 2017-11-09  Jakub Jelinek  <jakub@redhat.com>
6084         * gimple-ssa-store-merging.c (struct store_immediate_info): Add
6085         bit_not_p field.
6086         (store_immediate_info::store_immediate_info): Add bitnotp argument,
6087         set bit_not_p to it.
6088         (imm_store_chain_info::coalesce_immediate_stores): Break group
6089         if bit_not_p is different.
6090         (count_multiple_uses, split_group,
6091         imm_store_chain_info::output_merged_store): Handle info->bit_not_p.
6092         (handled_load): Avoid multiple chained BIT_NOT_EXPRs.
6093         (pass_store_merging::process_store): Handle BIT_{AND,IOR,XOR}_EXPR
6094         result inverted using BIT_NOT_EXPR, compute bit_not_p, pass it
6095         to store_immediate_info ctor.
6097 2017-11-09  Jim Wilson  <jimw@sifive.com>
6099         * collect2.c (OBJECT_FORMAT_COFF): Remove EXTENDED_COFF support.
6100         (scan_prog_file): Likewise.
6102 2017-11-09  Jan Hubicka  <hubicka@ucw.cz>
6104         * bb-reorder.c (max_entry_frequency): Remove.
6105         (find_traces, rotate_loop, mark_bb_visited, connect_better_edge_p,
6106         connect_traces, push_to_next_round_p): Remove prototypes.
6107         (find_traces_1_round): Use counts only.
6108         (push_to_next_round_p): Likewise.
6109         (find_traces): Likewise.
6110         (rotate_loop): Likewise.
6111         (find_traces_1_round): Likewise.
6112         (connect_traces): Likewise.
6113         (edge_order): Likewise.
6115 2017-11-09  Thomas Preud'homme  <thomas.preudhomme@arm.com>
6117         * config/arm/arm.c (output_return_instruction): Add comments to
6118         indicate requirement for cmse_nonsecure_entry return to account
6119         for the size of clearing instruction output here.
6120         (thumb_exit): Likewise.
6121         * config/arm/thumb2.md (thumb2_cmse_entry_return): Fix length for
6122         return in hardfloat mode.
6124 2017-11-09  Segher Boessenkool  <segher@kernel.crashing.org>
6126         * config/rs6000/rs6000.c (machine_function): Add a bool,
6127         "toc_is_wrapped_separately".
6128         (rs6000_option_override_internal): Enable OPTION_MASK_SAVE_TOC_INDIRECT
6129         if it wasn't explicitly set or unset, we are optimizing for speed, and
6130         doing separate shrink-wrapping.
6131         (rs6000_get_separate_components): Enable the TOC component if
6132         saving the TOC register in the prologue.
6133         (rs6000_components_for_bb): Handle the TOC component.
6134         (rs6000_emit_prologue_components): Store the TOC register where needed.
6135         (rs6000_set_handled_components): Mark TOC as handled, if handled.
6136         (rs6000_emit_prologue): Don't save the TOC if that is already done.
6138 2017-11-09  Martin Jambor  <mjambor@suse.cz>
6140         * ipa-param-manipulation.c: New file.
6141         * ipa-param-manipulation.h: Likewise.
6142         * Makefile.in (OBJS): Add ipa-param-manipulation.o.
6143         (PLUGIN_HEADERS): Addded ipa-param-manipulation.h
6144         * ipa-param.h (ipa_parm_op): Moved to ipa-param-manipulation.h.
6145         (ipa_parm_adjustment): Likewise.
6146         (ipa_parm_adjustment_vec): Likewise.
6147         (ipa_get_vector_of_formal_parms): Moved declaration to
6148         ipa-param-manipulation.h.
6149         (ipa_get_vector_of_formal_parm_types): Likewise.
6150         (ipa_modify_formal_parameters): Likewise.
6151         (ipa_modify_call_arguments): Likewise.
6152         (ipa_combine_adjustments): Likewise.
6153         (ipa_dump_param_adjustments): Likewise.
6154         (ipa_modify_expr): Likewise.
6155         (ipa_get_adjustment_candidate): Likewise.
6156         * ipa-prop.c (ipa_get_vector_of_formal_parms): Moved to
6157         ipa-param-manipulation.c.
6158         (ipa_get_vector_of_formal_parm_types): Likewise.
6159         (ipa_modify_formal_parameters): Likewise.
6160         (ipa_modify_call_arguments): Likewise.
6161         (ipa_modify_expr): Likewise.
6162         (get_ssa_base_param): Likewise.
6163         (ipa_get_adjustment_candidate): Likewise.
6164         (index_in_adjustments_multiple_times_p): Likewise.
6165         (ipa_combine_adjustments): Likewise.
6166         (ipa_dump_param_adjustments): Likewise.
6167         * tree-sra.c: Also include ipa-param-manipulation.h
6168         * omp-simd-clone.c: Include ipa-param-manipulation.h instead of
6169         ipa-param.h.
6171 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
6172             Alan Hayward  <alan.hayward@arm.com>
6173             David Sherwood  <david.sherwood@arm.com>
6175         * doc/sourcebuild.texi (vect_masked_store): Document.
6177 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
6178             Alan Hayward  <alan.hayward@arm.com>
6179             David Sherwood  <david.sherwood@arm.com>
6181         * doc/sourcebuild.texi (vect_align_stack_vars): Document.
6183 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
6184             Alan Hayward  <alan.hayward@arm.com>
6185             David Sherwood  <david.sherwood@arm.com>
6187         * doc/sourcebuild.texi (vect_variable_length): Document.
6189 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
6190             Alan Hayward  <alan.hayward@arm.com>
6191             David Sherwood  <david.sherwood@arm.com>
6193         * doc/sourcebuild.texi (vect_unaligned_possible): Document.
6195 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
6196             Alan Hayward  <alan.hayward@arm.com>
6197             David Sherwood  <david.sherwood@arm.com>
6199         * doc/sourcebuild.texi (vect_element_align_preferred): Document.
6201 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
6202             Alan Hayward  <alan.hayward@arm.com>
6203             David Sherwood  <david.sherwood@arm.com>
6205         * doc/sourcebuild.texi (vect_perm_short, vect_perm_byte): Document
6206         previously undocumented selectors.
6207         (vect_perm3_byte, vect_perm3_short, vect_perm3_int): Document.
6209 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
6211         * doc/rtl.texi (const_vector): Say that elements can be
6212         const_wide_ints too.
6213         * emit-rtl.h (valid_for_const_vec_duplicate_p): Declare.
6214         * emit-rtl.c (valid_for_const_vec_duplicate_p): New function.
6215         (gen_vec_duplicate): Use it instead of CONSTANT_P.
6216         * optabs.c (expand_vector_broadcast): Likewise.
6218 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
6219             Alan Hayward  <alan.hayward@arm.com>
6220             David Sherwood  <david.sherwood@arm.com>
6222         * tree-ssa-loop-ivopts.c (get_address_cost): Try using a
6223         scaled index even if the unscaled address was invalid.
6224         Don't increase the complexity of using a scale in that case.
6226 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
6227             Alan Hayward  <alan.hayward@arm.com>
6228             David Sherwood  <david.sherwood@arm.com>
6230         * doc/rtl.texi: Rewrite the subreg rules so that they partition
6231         the inner register into REGMODE_NATURAL_SIZE bytes rather than
6232         UNITS_PER_WORD bytes.
6233         * emit-rtl.c (validate_subreg): Divide subregs into blocks
6234         based on REGMODE_NATURAL_SIZE of the inner mode.
6235         (gen_lowpart_common): Split the SCALAR_FLOAT_MODE_P and
6236         !SCALAR_FLOAT_MODE_P cases.  Use REGMODE_NATURAL_SIZE for the latter.
6237         * expmed.c (lowpart_bit_field_p): Divide the value up into
6238         chunks of REGMODE_NATURAL_SIZE rather than UNITS_PER_WORD.
6239         * expr.c (store_constructor): Use REGMODE_NATURAL_SIZE to test
6240         whether something is likely to occupy more than one register.
6242 2017-11-09  Jan Hubicka  <hubicka@ucw.cz>
6244         PR ipa/82879
6245         * ipa-inline-transform.c (update_noncloned_frequencies): Use
6246         profile_count::adjust_for_ipa_scaling.
6247         * tree-inline.c (copy_bb, copy_cfg_body): Likewise.
6248         * profile-count.c (profile_count::adjust_for_ipa_scaling): New member
6249         function.
6250         * profile-count.h (profile_count::adjust_for_ipa_scaling): Declare.
6252 2017-11-09  Jakub Jelinek  <jakub@redhat.com>
6254         * gimple-ssa-store-merging.c (count_multiple_uses): New function.
6255         (split_group): Add total_orig and total_new arguments, estimate the
6256         number of statements related to the store group without store merging
6257         and with store merging.
6258         (imm_store_chain_info::output_merged_store): Adjust split_group
6259         callers, punt if estimated number of statements with store merging
6260         is not smaller than estimated number of statements without it.
6261         Formatting fix.
6262         (handled_load): Remove has_single_use checks.
6263         (pass_store_merging::process_store): Likewise.
6265 2017-11-09  Richard Biener  <rguenther@suse.de>
6267         PR tree-optimization/82902
6268         * tree-ssa-phiprop.c (propagate_with_phi): Test proper type.
6270 2017-11-09  Martin Liska  <mliska@suse.cz>
6272         PR target/82863
6273         * emit-rtl.c (init_emit_regs): Initialize split_branch_probability to
6274         uninitialized.
6276 2017-11-09  Martin Liska  <mliska@suse.cz>
6278         PR tree-optimization/82669
6279         * sbitmap.h (bmp_iter_set_init): Remove non needed check.
6281 2017-11-09  Martin Liska  <mliska@suse.cz>
6283         PR gcov-profile/48463
6284         * coverage.c (coverage_begin_function): Output also end locus
6285         of a function and information whether the function is
6286         artificial.
6287         * gcov-dump.c (tag_function): Parse and print the information.
6288         * gcov.c (INCLUDE_MAP): Add include.
6289         (INCLUDE_SET): Likewise.
6290         (struct line_info): Move earlier in the source file because
6291         of vector<line_info> in function_info structure.
6292         (line_info::line_info): Likewise.
6293         (line_info::has_block): Likewise.
6294         (struct source_info): Add new member index.
6295         (source_info::get_functions_at_location): New function.
6296         (function_info::group_line_p): New function.
6297         (output_intermediate_line): New function.
6298         (output_intermediate_file): Use the mentioned function.
6299         (struct function_start): New.
6300         (struct function_start_pair_hash): Likewise.
6301         (process_file): Add code that identifies group functions.
6302         Assign lines either to global or function scope.
6303         (generate_results): Skip artificial functions.
6304         (find_source): Assign index for each source file.
6305         (read_graph_file): Read new flag artificial and end_line.
6306         (add_line_counts): Assign it either to global of function scope.
6307         (accumulate_line_counts): Isolate core of the function to
6308         accumulate_line_info and call it for both function and global
6309         scope lines.
6310         (accumulate_line_info): New function.
6311         (output_line_beginning): Fix GNU coding style.
6312         (print_source_line): New function.
6313         (output_line_details): Likewise.
6314         (output_function_details): Likewise.
6315         (output_lines): Iterate both source (global) scope and function
6316         scope.
6317         (struct function_line_start_cmp): New class.
6318         * doc/gcov.texi: Reflect changes in documentation.
6320 2017-11-09  Jakub Jelinek  <jakub@redhat.com>
6322         PR debug/82837
6323         * dwarf2out.c (const_ok_for_output_1): Reject NEG in addition to NOT.
6324         (mem_loc_descriptor): Handle (const (neg (...))) as (neg (const (...)))
6325         and similarly for not instead of neg.
6327 2017-11-08  Andi Kleen  <ak@linux.intel.com>
6329         * config/i386/i386.opt: Add -mforce-indirect-call.
6330         * config/i386/predicates.md: Check for flag_force_indirect_call.
6331         * doc/invoke.texi: Document -mforce-indirect-call
6333 2017-11-08  Kito Cheng  <kito.cheng@gmail.com>
6335         * config/riscv/riscv-protos.h (riscv_slow_unaligned_access_p):
6336         New extern.
6337         (MOVE_RATIO): Use riscv_slow_unaligned_access_p.
6338         config/riscv/riscv.c (predict.h): New include.
6339         (riscv_slow_unaligned_access_p): No longer static.
6340         (riscv_block_move_straight): Add require.
6341         * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): Delete.
6343 2017-11-08  Jakub Jelinek  <jakub@redhat.com>
6345         PR target/82855
6346         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>,
6347         <avx512>_eq<mode>3<mask_scalar_merge_name>_1): Use
6348         nonimmediate_operand predicate for operand 1 instead of
6349         register_operand.
6351 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6353         * config/aarch64/aarch64-simd.md (store_pair_lanes<mode>):
6354         New pattern.
6355         * config/aarch64/constraints.md (Uml): New constraint.
6356         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): New
6357         predicate.
6359 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6361         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
6362         of two vec_duplicates into a vec_concat.
6364 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6366         * simplify-rtx.c (simplify_ternary_operation, VEC_MERGE):
6367         Simplify vec_merge of vec_duplicate and vec_concat.
6368         * config/aarch64/constraints.md (Utq): New constraint.
6369         * config/aarch64/aarch64-simd.md (load_pair_lanes<mode>): New
6370         define_insn.
6372 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6374         * simplify-rtx.c (simplify_ternary_operation, VEC_MERGE):
6375         Simplify vec_merge of vec_duplicate and const_vector.
6376         * config/aarch64/predicates.md (aarch64_simd_or_scalar_imm_zero):
6377         New predicate.
6378         * config/aarch64/aarch64-simd.md (*aarch64_combinez<mode>): Use VDC
6379         mode iterator.  Update predicate on operand 1 to
6380         handle non-const_vec constants.  Delete constraints.
6381         (*aarch64_combinez_be<mode>): Likewise for operand 2.
6383 2017-11-08  Jakub Jelinek  <jakub@redhat.com>
6385         PR tree-optimization/78821
6386         * gimple-ssa-store-merging.c (struct store_operand_info): Add bit_not_p
6387         data member.
6388         (store_operand_info::store_operand_info): Initialize it to false.
6389         (pass_store_merging::terminate_all_aliasing_chains): Rewritten to use
6390         ref_maybe_used_by_stmt_p and stmt_may_clobber_ref_p on lhs of each
6391         store in the group, and if chain_info is non-NULL, to ignore altogether
6392         that chain.
6393         (compatible_load_p): Fail if bit_not_p does not match.
6394         (imm_store_chain_info::output_merged_store): Handle bit_not_p loads.
6395         (handled_load): Fill in bit_not_p.  Handle BIT_NOT_EXPR.
6396         (pass_store_merging::process_store): Adjust
6397         terminate_all_aliasing_chains calls to pass NULL in all current spots,
6398         call terminate_all_aliasing_chains newly when adding a store into
6399         a chain with non-NULL chain_info.
6401 2017-11-08  Wilco Dijkstra  <wdijkstr@arm.com>
6403         * config/aarch64/aarch64.c (aarch64_can_eliminate): Simplify logic.
6405 2017-11-08  Wilco Dijkstra  <wdijkstr@arm.com>
6407         * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
6408         Remove.
6409         (aarch64_layout_frame): Initialise emit_frame_chain.
6410         (aarch64_can_eliminate): Remove omit leaf frame pointer code.
6411         (TARGET_FRAME_POINTER_REQUIRED): Remove define.
6413 2017-11-08  Martin Liska  <mliska@suse.cz>
6415         * gimplify.c (expand_FALLTHROUGH_r): Simplify usage
6416         of gimple_call_internal_p.
6418 2017-11-07  Tom de Vries  <tom@codesourcery.com>
6420         * config/mips/mips.h (ASM_OUTPUT_LABELREF): Wrap in "do {} while (0)".
6422 2017-11-07  Tom de Vries  <tom@codesourcery.com>
6424         * config/mips/mips.h (ASM_OUTPUT_CASE_END): Remove semicolon after
6425         "do {} while (0)".
6427 2017-11-08  Martin Liska  <mliska@suse.cz>
6429         PR sanitizer/82792
6430         * gimplify.c (expand_FALLTHROUGH_r): Skip IFN_ASAN_MARK.
6432 2017-11-07  Eric Botcazou  <ebotcazou@adacore.com>
6434         * gimple-pretty-print.c (dump_profile): Return "" instead of NULL.
6436 2017-11-07  Jakub Jelinek  <jakub@redhat.com>
6438         PR target/82855
6439         * config/i386/i386.md (SWI1248_AVX512BWDQ2_64): New mode iterator.
6440         (*cmp<mode>_ccz_1): New insn with $k alternative.
6442         PR target/82855
6443         * config/i386/i386.c (ix86_swap_binary_operands_p): Treat
6444         RTX_COMM_COMPARE as commutative as well.
6445         (ix86_binary_operator_ok): Formatting fix.
6446         * config/i386/sse.md (*mul<mode>3<mask_name><round_name>,
6447         *<code><mode>3<mask_name><round_saeonly_name>,
6448         *<code><mode>3<mask_name>, *<code>tf3, *mul<mode>3<mask_name>,
6449         *<s>mul<mode>3_highpart<mask_name>,
6450         *vec_widen_umult_even_v16si<mask_name>,
6451         *vec_widen_umult_even_v8si<mask_name>,
6452         *vec_widen_umult_even_v4si<mask_name>,
6453         *vec_widen_smult_even_v16si<mask_name>,
6454         *vec_widen_smult_even_v8si<mask_name>, *sse4_1_mulv2siv2di3<mask_name>,
6455         *avx2_pmaddwd, *sse2_pmaddwd, *<sse4_1_avx2>_mul<mode>3<mask_name>,
6456         *avx2_<code><mode>3, *avx512f_<code><mode>3<mask_name>,
6457         *sse4_1_<code><mode>3<mask_name>, *<code>v8hi3,
6458         *sse4_1_<code><mode>3<mask_name>, *<code>v16qi3, *avx2_eq<mode>3,
6459         <avx512>_eq<mode>3<mask_scalar_merge_name>_1, *sse4_1_eqv2di3,
6460         *sse2_eq<mode>3, <mask_codefor><code><mode>3<mask_name>,
6461         *<code><mode>3, *<sse2_avx2>_uavg<mode>3<mask_name>,
6462         *<ssse3_avx2>_pmulhrsw<mode>3<mask_name>, *ssse3_pmulhrswv4hi3): Use
6463         !(MEM_P (operands[1]) && MEM_P (operands[2])) condition instead of
6464         ix86_binary_operator_ok.  Formatting fixes.
6465         (*<plusminus_insn><mode>3<mask_name><round_name>,
6466         *<plusminus_insn><mode>3, *<plusminus_insn><mode>3_m): Formatting
6467         fixes.
6469 2017-11-07  Segher Boessenkool  <segher@kernel.crashing.org>
6471         * config/rs6000/rs6000.md (GPR2): New mode_iterator.
6472         ("cstore<mode>4"): Don't always expand with rs6000_emit_int_cmove for
6473         eq and ne if TARGET_ISEL.
6474         (cmp): New code_iterator.
6475         (UNS, UNSU_, UNSIK): New code_attrs.
6476         (<code><GPR:mode><GPR2:mode>2_isel): New define_insn_and_split.
6477         ("eq<mode>3"): New define_expand, rename the define_insn_and_split
6478         to...
6479         ("eq<mode>3"): ... this.
6480         ("ne<mode>3"): New define_expand, rename the define_insn_and_split
6481         to...
6482         ("ne<mode>3"): ... this.
6484 2017-11-07  Julia Koval  <julia.koval@intel.com>
6486         PR target/82812
6487         * common/config/i386/i386-common.c
6488         (OPTION_MASK_ISA_GENERAL_REGS_ONLY_UNSET): Remove MPX from flag.
6489         (ix86_handle_option): Move MPX to isa_flags2 and GFNI to isa_flags.
6490         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto.
6491         * config/i386/i386.opt: Ditto.
6492         * config/i386/i386.c (ix86_target_string): Ditto.
6493         (ix86_option_override_internal): Ditto.
6494         (ix86_init_mpx_builtins): Move MPX to args2.
6495         (ix86_expand_builtin): Special handling for OPTION_MASK_ISA_GFNI.
6496         * config/i386/i386-builtin.def (__builtin_ia32_vgf2p8affineinvqb_v64qi,
6497         __builtin_ia32_vgf2p8affineinvqb_v64qi_mask,
6498         __builtin_ia32_vgf2p8affineinvqb_v32qi,
6499         __builtin_ia32_vgf2p8affineinvqb_v32qi_mask,
6500         __builtin_ia32_vgf2p8affineinvqb_v16qi,
6501         __builtin_ia32_vgf2p8affineinvqb_v16qi_mask): Move to ARGS array.
6503 2017-11-07  Uros Bizjak  <ubizjak@gmail.com>
6505         PR target/80425
6506         * config/i386.i386.md (*zero_extendsidi2): Change (?r,*Yj), (?*Yi,r)
6507         and (*x,m) to ($r,Yj), ($Yi,r) and ($x,m).
6508         (zero-extendsidi peephole2): Remove peephole.
6510 2017-11-07  Eric Botcazou  <ebotcazou@adacore.com>
6512         PR c/53037
6513         * stor-layout.c: Include attribs.h.
6514         (handle_warn_if_not_align): Replace test on TYPE_USER_ALIGN with
6515         explicit lookup of "aligned" attribute.
6517 2017-11-07  Andrew Waterman  <andrew@sifive.com>
6519         * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): New prototype.
6520         (riscv_expand_block_move): Likewise.
6521         * config/riscv/riscv.h (MOVE_RATIO): Tune cost to movmemsi
6522         implementation.
6523         (RISCV_MAX_MOVE_BYTES_PER_LOOP_ITER): New define.
6524         (RISCV_MAX_MOVE_BYTES_STRAIGHT): New define.
6525         * config/riscv/riscv.c (riscv_block_move_straight): New function.
6526         (riscv_adjust_block_mem): Likewise.
6527         (riscv_block_move_loop): Likewise.
6528         (riscv_expand_block_move): Likewise.
6529         * config/riscv/riscv.md (movmemsi): New pattern.
6531 2017-11-07  Michael Clark  <michaeljclark@mac.com>
6533         * config/riscv/linux.h (MUSL_ABI_SUFFIX): New define.
6534         (MUSL_DYNAMIC_LINKER): Likewise.
6536 2017-11-07  Richard Sandiford  <richard.sandiford@linaro.org>
6538         * config/aarch64/aarch64.md (ashl<mode>3, ashr<mode>3, lshr<mode>3)
6539         (rotr<mode>3, rotl<mode>3): Use aarch64_reg_or_imm instead of
6540         nonmmory_operand.
6542 2017-11-07  Richard Biener  <rguenther@suse.de>
6544         * match.pd: Fix build.
6546 2017-11-07  Wilco Dijkstra  <wdijkstr@arm.com>
6547             Jackson Woodruff  <jackson.woodruff@arm.com>
6549         PR tree-optimization/71026
6550         * match.pd: Canonicalize negate in division.
6552 2017-11-07  Sudakshina Das  <sudi.das@arm.com>
6554         PR middle-end/80131
6555         * match.pd: Simplify 1 << (C - x) where C = precision (x) - 1.
6557 2017-11-07  Marc Glisse  <marc.glisse@inria.fr>
6559         * match.pd ((a&~b)|(a^b),(a&~b)^~a,(a|b)&~(a^b),a|~(a^b),
6560         (a|b)|(a&^b),(a&b)|~(a^b),~(~a&b),~X^Y): New transformations.
6562 2017-11-07  Marc Glisse  <marc.glisse@inria.fr>
6564         * fold-const.c (negate_expr_p) [PLUS_EXPR, MINUS_EXPR]: Handle
6565         non-scalar integral types.
6566         * match.pd (negate_expr_p): Handle MINUS_EXPR.
6567         (-(A-B), -(~A)): New transformations.
6569 2017-11-07  Tom de Vries  <tom@codesourcery.com>
6571         * config/powerpcspe/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Remove
6572         semicolon after "do {} while (0)".
6573         * config/powerpcspe/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
6574         * config/powerpcspe/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
6575         * config/powerpcspe/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
6576         * config/powerpcspe/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
6577         * config/powerpcspe/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
6579 2017-11-07  Tom de Vries  <tom@codesourcery.com>
6581         * config/rs6000/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Remove semicolon
6582         after "do {} while (0)".
6583         * config/rs6000/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
6584         * config/rs6000/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
6585         * config/rs6000/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
6586         * config/rs6000/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
6587         * config/rs6000/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
6589 2017-11-07  Tom de Vries  <tom@codesourcery.com>
6591         PR other/82784
6592         * config/arm/arm.c (HANDLE_NARROW_SHIFT_ARITH): Remove semicolon after
6593         "while {} do (0)".
6594         (arm_rtx_costs_internal): Add missing semicolon after
6595         HANDLE_NARROW_SHIFT_ARITH call.
6597 2017-11-06  Segher Boessenkool  <segher@kernel.crashing.org>
6599         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
6600         disable isel if it was not set explicitly.
6602 2017-11-06  James Bowman  <james.bowman@ftdichip.com>
6604         * gcc/dwarf2out.c (modified_type_die): Retain ADDR_SPACE qualifiers.
6605         (add_type_attribute) likewise.
6607 2017-11-06  H.J. Lu  <hongjiu.lu@intel.com>
6609         * config/i386/i386.c (ix86_can_use_return_insn_p): Use reference
6610         of struct ix86_frame.
6611         (ix86_initial_elimination_offset): Likewise.
6612         (ix86_expand_split_stack_prologue): Likewise.
6614 2017-11-06  Marc Glisse  <marc.glisse@inria.fr>
6616         * tree-vrp.h (enum value_range_type): Update stale comment.
6618 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
6619             Alan Hayward  <alan.hayward@arm.com>
6620             David Sherwood  <david.sherwood@arm.com>
6622         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm)
6623         (aarch64_expand_vec_perm_const): Take the number of units too.
6624         * config/aarch64/aarch64.c (aarch64_expand_vec_perm)
6625         (aarch64_expand_vec_perm_const): Likewise.
6626         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>)
6627         (vec_perm<mode>): Update accordingly.
6629 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
6630             Alan Hayward  <alan.hayward@arm.com>
6631             David Sherwood  <david.sherwood@arm.com>
6633         * config/aarch64/aarch64-protos.h (aarch64_simd_vect_par_cnst_half):
6634         Take the number of units too.
6635         * config/aarch64/aarch64.c (aarch64_simd_vect_par_cnst_half): Likewise.
6636         (aarch64_simd_check_vect_par_cnst_half): Update call accordingly,
6637         but check for a vector mode before rather than after the call.
6638         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
6639         (move_hi_quad_<mode>, vec_unpack<su>_hi_<mode>)
6640         (vec_unpack<su>_lo_<mode, vec_widen_<su>mult_lo_<mode>)
6641         (vec_widen_<su>mult_hi_<mode>, vec_unpacks_lo_<mode>)
6642         (vec_unpacks_hi_<mode>, aarch64_saddl2<mode>, aarch64_uaddl2<mode>)
6643         (aarch64_ssubl2<mode>, aarch64_usubl2<mode>, widen_ssum<mode>3)
6644         (widen_usum<mode>3, aarch64_saddw2<mode>, aarch64_uaddw2<mode>)
6645         (aarch64_ssubw2<mode>, aarch64_usubw2<mode>, aarch64_sqdmlal2<mode>)
6646         (aarch64_sqdmlsl2<mode>, aarch64_sqdmlal2_lane<mode>)
6647         (aarch64_sqdmlal2_laneq<mode>, aarch64_sqdmlsl2_lane<mode>)
6648         (aarch64_sqdmlsl2_laneq<mode>, aarch64_sqdmlal2_n<mode>)
6649         (aarch64_sqdmlsl2_n<mode>, aarch64_sqdmull2<mode>)
6650         (aarch64_sqdmull2_lane<mode>, aarch64_sqdmull2_laneq<mode>)
6651         (aarch64_sqdmull2_n<mode>): Update accordingly.
6653 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
6654             Alan Hayward  <alan.hayward@arm.com>
6655             David Sherwood  <david.sherwood@arm.com>
6657         * config/aarch64/aarch64-protos.h (aarch64_reverse_mask): Take
6658         the number of units too.
6659         * config/aarch64/aarch64.c (aarch64_reverse_mask): Likewise.
6660         * config/aarch64/aarch64-simd.md (vec_load_lanesoi<mode>)
6661         (vec_store_lanesoi<mode>, vec_load_lanesci<mode>)
6662         (vec_store_lanesci<mode>, vec_load_lanesxi<mode>)
6663         (vec_store_lanesxi<mode>): Update accordingly.
6665 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
6666             Alan Hayward  <alan.hayward@arm.com>
6667             David Sherwood  <david.sherwood@arm.com>
6669         * config/aarch64/aarch64-protos.h (aarch64_endian_lane_rtx): Declare.
6670         * config/aarch64/aarch64.c (aarch64_endian_lane_rtx): New function.
6671         * config/aarch64/aarch64.h (ENDIAN_LANE_N): Take the number
6672         of units rather than the mode.
6673         * config/aarch64/iterators.md (nunits): New mode attribute.
6674         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args):
6675         Use aarch64_endian_lane_rtx instead of GEN_INT (ENDIAN_LANE_N ...).
6676         * config/aarch64/aarch64-simd.md (aarch64_dup_lane<mode>)
6677         (aarch64_dup_lane_<vswap_width_name><mode>, *aarch64_mul3_elt<mode>)
6678         (*aarch64_mul3_elt_<vswap_width_name><mode>): Likewise.
6679         (*aarch64_mul3_elt_to_64v2df, *aarch64_mla_elt<mode>): Likewise.
6680         (*aarch64_mla_elt_<vswap_width_name><mode>, *aarch64_mls_elt<mode>)
6681         (*aarch64_mls_elt_<vswap_width_name><mode>, *aarch64_fma4_elt<mode>)
6682         (*aarch64_fma4_elt_<vswap_width_name><mode>):: Likewise.
6683         (*aarch64_fma4_elt_to_64v2df, *aarch64_fnma4_elt<mode>): Likewise.
6684         (*aarch64_fnma4_elt_<vswap_width_name><mode>): Likewise.
6685         (*aarch64_fnma4_elt_to_64v2df, reduc_plus_scal_<mode>): Likewise.
6686         (reduc_plus_scal_v4sf, reduc_<maxmin_uns>_scal_<mode>): Likewise.
6687         (reduc_<maxmin_uns>_scal_<mode>): Likewise.
6688         (*aarch64_get_lane_extend<GPI:mode><VDQQH:mode>): Likewise.
6689         (*aarch64_get_lane_zero_extendsi<mode>): Likewise.
6690         (aarch64_get_lane<mode>, *aarch64_mulx_elt_<vswap_width_name><mode>)
6691         (*aarch64_mulx_elt<mode>, *aarch64_vgetfmulx<mode>): Likewise.
6692         (aarch64_sq<r>dmulh_lane<mode>, aarch64_sq<r>dmulh_laneq<mode>)
6693         (aarch64_sqrdml<SQRDMLH_AS:rdma_as>h_lane<mode>): Likewise.
6694         (aarch64_sqrdml<SQRDMLH_AS:rdma_as>h_laneq<mode>): Likewise.
6695         (aarch64_sqdml<SBINQOPS:as>l_lane<mode>): Likewise.
6696         (aarch64_sqdml<SBINQOPS:as>l_laneq<mode>): Likewise.
6697         (aarch64_sqdml<SBINQOPS:as>l2_lane<mode>_internal): Likewise.
6698         (aarch64_sqdml<SBINQOPS:as>l2_laneq<mode>_internal): Likewise.
6699         (aarch64_sqdmull_lane<mode>, aarch64_sqdmull_laneq<mode>): Likewise.
6700         (aarch64_sqdmull2_lane<mode>_internal): Likewise.
6701         (aarch64_sqdmull2_laneq<mode>_internal): Likewise.
6702         (aarch64_vec_load_lanesoi_lane<mode>): Likewise.
6703         (aarch64_vec_store_lanesoi_lane<mode>): Likewise.
6704         (aarch64_vec_load_lanesci_lane<mode>): Likewise.
6705         (aarch64_vec_store_lanesci_lane<mode>): Likewise.
6706         (aarch64_vec_load_lanesxi_lane<mode>): Likewise.
6707         (aarch64_vec_store_lanesxi_lane<mode>): Likewise.
6708         (aarch64_simd_vec_set<mode>): Update use of ENDIAN_LANE_N.
6709         (aarch64_simd_vec_setv2di): Likewise.
6711 2017-11-06  Carl Love  <cel@us.ibm.com>
6713         * config/rs6000/rs6000-c.c (P8V_BUILTIN_VEC_REVB): Add power 8
6714         definitions.
6715         (P9V_BUILTIN_VEC_REVB): Remove the power 9 instance definitions.
6716         * config/rs6000/altivec.h (vec_revb): Change the #define from power 9
6717         to power 8.
6718         * config/rs6000/r6000-protos.h (swap_endian_selector_for_mode): Add new
6719         extern declaration.
6720         * config/rs6000/rs6000.c (swap_endian_selector_for_mode): Add function.
6721         * config/rs6000/rs6000-builtin.def (BU_P8V_VSX_1, BU_P8V_OVERLOAD_1):
6722         Add power 8 macro expansions.
6723         (BU_P9V_OVERLOAD_1): Remove power 9 overload expansion.
6724         * config/rs6000/vsx.md (revb_<mode>): Add define_expand to generate
6725         power 8 instructions.  (VSX_XXBR): Add iterator.
6727 2017-11-06  Wilco Dijkstra  <wdijkstr@arm.com>
6729         * config/arm/arm.md (predicable_short_it): Change default to "no",
6730         improve documentation, remove uses that are identical to the default.
6731         (enabled_for_depr_it): Rename to enabled_for_short_it.
6732         * gcc/config/arm/arm-fixed.md (predicable_short_it):
6733         Remove default uses.
6734         * gcc/config/arm/ldmstm.md (predicable_short_it): Likewise.
6735         * gcc/config/arm/sync.md (predicable_short_it): Likewise.
6736         * gcc/config/arm/thumb2.md (predicable_short_it): Likewise.
6737         * gcc/config/arm/vfp.md (predicable_short_it): Likewise.
6739 2017-11-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
6741         PR target/82748
6742         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_1): Delete
6743         float128 helper macros, which are no longer used after deleting
6744         the old 'q' built-in functions, and moving the round to odd
6745         built-in functions to being special built-in functions.
6746         (BU_FLOAT128_2): Likewise.
6747         (BU_FLOAT128_1_HW): Likewise.
6748         (BU_FLOAT128_2_HW): Likewise.
6749         (BU_FLOAT128_3_HW): Likewise.
6750         (FABSQ): Delete old 'q' built-in functions.
6751         (COPYSIGNQ): Likewise.
6752         (SQRTF128_ODD): Move round to odd built-in functions to be
6753         special built-in functions, so that we can handle
6754         -mabi=ieeelongdouble.
6755         (TRUNCF128_ODD): Likewise.
6756         (ADDF128_ODD): Likewise.
6757         (SUBF128_ODD): Likewise.
6758         (MULF128_ODD): Likewise.
6759         (DIVF128_ODD): Likewise.
6760         (FMAF128_ODD): Likewise.
6761         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Map old 'q'
6762         built-in names to 'f128'.
6763         * config/rs6000/rs6000.c (rs6000_fold_builtin): Remove folding the
6764         old 'q' built-in functions, as the machine independent code for
6765         'f128' built-in functions handles this.
6766         (rs6000_expand_builtin): Add expansion for float128 round to odd
6767         functions, keying off on -mabi=ieeelongdouble of whether to use
6768         the KFmode or TFmode variant.
6769         (rs6000_init_builtins): Initialize the _Float128 round to odd
6770         built-in functions.
6771         * doc/extend.texi (PowerPC Built-in Functions): Document the old
6772         _Float128 'q' built-in functions are now mapped into the new
6773         'f128' built-in functions.
6775 2017-11-06  David Edelsohn  <dje.gcc@gmail.com>
6777         * collect2.c (add_lto_object): Compile for OBJECT_COFF.
6778         (scan_prog_file): Don't skip PASS_LTOINFO. Scan for LTO objects.
6780 2017-11-06  David Malcolm  <dmalcolm@redhat.com>
6782         PR jit/82826
6783         * ipa-fnsummary.c (ipa_fnsummary_c_finalize): New function.
6784         * ipa-fnsummary.h (ipa_fnsummary_c_finalize): New decl.
6785         * toplev.c: Include "ipa-fnsummary.h".
6786         (toplev::finalize): Call ipa_fnsummary_c_finalize.
6788 2017-11-06  Jakub Jelinek  <jakub@redhat.com>
6790         PR tree-optimization/82838
6791         * gimple-ssa-store-merging.c
6792         (imm_store_chain_info::output_merged_store): Call force_gimple_operand_1
6793         on a separate gimple_seq which is then appended to seq.
6795 2017-11-06  Jeff Law  <law@redhat.com>
6797         PR target/82788
6798         * config/i386/i386.c (PROBE_INTERVAL): Remove.
6799         (get_probe_interval): New functions.
6800         (ix86_adjust_stack_and_probe_stack_clash): Use get_probe_interval.
6801         (ix86_adjust_stack_and_probe): Likewise.
6802         (output_adjust_stack_and_probe): Likewise.
6803         (ix86_emit_probe_stack_range): Likewise.
6804         (ix86_expand_prologue): Likewise.
6806 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
6808         PR tree-optimization/82816
6809         * tree-ssa-math-opts.c (convert_mult_to_widen): Return false
6810         if the modes of the two types are the same.
6811         (convert_plusminus_to_widen): Likewise.
6813 2017-11-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
6815         * config/rs6000/altivec.md (*p9_vadu<mode>3) Rename to
6816         p9_vadu<mode>3.
6817         (usadv16qi): New define_expand.
6818         (usadv8hi): New define_expand.
6820 2017-11-06  Jan Hubicka  <hubicka@ucw.cz>
6822         PR bootstrap/82832
6823         * ipa-inline-transform.c (update_noncloned_frequencies): Always
6824         scale.
6825         (inline_transform): Likewise.
6826         * predict.c (counts_to_freqs): Remove useless conditional.
6827         * profile-count.h (profile_count::apply_scale): Move sanity check.
6828         * tree-inline.c (copy_bb): Always scale.
6829         (copy_cfg_body): Likewise.
6831 2017-11-06  Christophe Lyon  <christophe.lyon@linaro.org>
6833         PR target/67591
6834         * config/arm/arm.md (*sub_shiftsi): Add predicable_short_it
6835         attribute.
6836         (*cmp_ite0): Add enabled_for_depr_it attribute.
6837         (*cmp_ite1): Likewise.
6839 2017-11-06  Segher Boessenkool  <segher@kernel.crashing.org>
6841         * config/rs6000/rs6000.c (rs6000_insn_cost): Handle TYPE_MFCR and
6842         TYPE_MFCRF.
6844 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
6846         * tree-vrp.c (vrp_int_const_binop): Return true on success and
6847         return the value by pointer.
6848         (extract_range_from_multiplicative_op_1): Update accordingly.
6849         Return as soon as an operation fails.
6851 2017-11-05  Tom de Vries  <tom@codesourcery.com>
6853         PR other/82784
6854         * asan.c (DEF_SANITIZER_BUILTIN_1): Factor out of ...
6855         (DEF_SANITIZER_BUILTIN): ... here.
6856         (initialize_sanitizer_builtins): Use DEF_SANITIZER_BUILTIN_1 instead of
6857         DEF_SANITIZER_BUILTIN in if stmt.  Add missing semicolon.
6859 2017-11-05  Tom de Vries  <tom@codesourcery.com>
6861         PR other/82784
6862         * config/elfos.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove semicolon after
6863         macro body.
6864         (ASM_OUTPUT_CASE_LABEL): Add semicolon after
6865         ASM_OUTPUT_BEFORE_CASE_LABEL call.
6866         * config/arc/arc.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove semicolon
6867         after macro body.
6868         * config/m68k/m68kelf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
6869         * config/mips/mips.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
6870         * config/v850/v850.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
6872 2017-11-05  Tom de Vries  <tom@codesourcery.com>
6874         PR other/82784
6875         * graphite-scop-detection.c (DEBUG_PRINT): Remove semicolon after
6876         "do {} while (0)".
6878 2017-11-04  Michael Clark  <michaeljclark@mac.com>
6880         * config/riscv/riscv.c (riscv_print_operand): Add a 'i' format.
6881         config/riscv/riscv.md (addsi3): Use 'i' for immediates.
6882         (adddi3): Likewise.
6883         (*addsi3_extended): Likewise.
6884         (*addsi3_extended2): Likewise.
6885         (<optab>si3): Likewise.
6886         (<optab>di3): Likewise.
6887         (<optab><mode>3): Likewise.
6888         (<*optabe>si3_internal): Likewise.
6889         (zero_extendqi<SUPERQI:mode>2): Likewise.
6890         (*add<mode>hi3): Likewise.
6891         (*xor<mode>hi3): Likewise.
6892         (<optab>di3): Likewise.
6893         (*<optab>si3_extend): Likewise.
6894         (*sge<u>_<X:mode><GPR:mode>): Likewise.
6895         (*slt<u>_<X:mode><GPR:mode>): Likewise.
6896         (*sle<u>_<X:mode><GPR:mode>): Likewise.
6898 2017-11-04  Andrew Waterman  <andrew@sifive.com>
6900         * config/riscv/riscv.c (riscv_option_override): Conditionally set
6901         TARGET_STRICT_ALIGN based upon -mtune argument.
6903 2017-11-04  Andrew Waterman  <andrew@sifive.com>
6905         * config/riscv/riscv.h (SLOW_BYTE_ACCESS): Change to 1.
6907 2017-11-04  Daniel Santos  <daniel.santos@pobox.com>
6909         * config/i386/i386.c (choose_basereg): Use optional scratch
6910         register and add assertion.
6911         (x86_emit_outlined_ms2sysv_save): Use scratch register when
6912         needed, and don't allocate stack.
6913         (ix86_expand_prologue): Rearrange where SSE saves/stub call is
6914         emitted, correct wrong allocation with -mcall-ms2sysv-xlogues.
6915         (ix86_emit_outlined_ms2sysv_restore): Fix non-immediate offsets.
6917 2017-11-03  Jeff Law  <law@redhat.com>
6919         * config/i386/i386.c (ix86_emit_restore_reg_using_pop): Prototype.
6920         (ix86_adjust_stack_and_probe_stack_clash): Use a push/pop sequence
6921         to probe at the start of a noreturn function.
6923 2017-11-03  Jakub Jelinek  <jakub@redhat.com>
6925         PR tree-optimization/78821
6926         * gimple-ssa-store-merging.c: Update the file comment.
6927         (MAX_STORE_ALIAS_CHECKS): Define.
6928         (struct store_operand_info): New type.
6929         (store_operand_info::store_operand_info): New constructor.
6930         (struct store_immediate_info): Add rhs_code and ops data members.
6931         (store_immediate_info::store_immediate_info): Add rhscode, op0r
6932         and op1r arguments to the ctor, initialize corresponding data members.
6933         (struct merged_store_group): Add load_align_base and load_align
6934         data members.
6935         (merged_store_group::merged_store_group): Initialize them.
6936         (merged_store_group::do_merge): Update them.
6937         (merged_store_group::apply_stores): Pick the constant for
6938         encode_tree_to_bitpos from one of the two operands, or skip
6939         encode_tree_to_bitpos if neither operand is a constant.
6940         (class pass_store_merging): Add process_store method decl.  Remove
6941         bool argument from terminate_all_aliasing_chains method decl.
6942         (pass_store_merging::terminate_all_aliasing_chains): Remove
6943         var_offset_p argument and corresponding handling.
6944         (stmts_may_clobber_ref_p): New function.
6945         (compatible_load_p): New function.
6946         (imm_store_chain_info::coalesce_immediate_stores): Terminate group
6947         if there is overlap and rhs_code is not INTEGER_CST.  For
6948         non-overlapping stores terminate group if rhs is not mergeable.
6949         (get_alias_type_for_stmts): Change first argument from
6950         auto_vec<gimple *> & to vec<gimple *> &.  Add IS_LOAD, CLIQUEP and
6951         BASEP arguments.  If IS_LOAD is true, look at rhs1 of the stmts
6952         instead of lhs.  Compute *CLIQUEP and *BASEP in addition to the
6953         alias type.
6954         (get_location_for_stmts): Change first argument from
6955         auto_vec<gimple *> & to vec<gimple *> &.
6956         (struct split_store): Remove orig_stmts data member, add orig_stores.
6957         (split_store::split_store): Create orig_stores rather than orig_stmts.
6958         (find_constituent_stmts): Renamed to ...
6959         (find_constituent_stores): ... this.  Change second argument from
6960         vec<gimple *> * to vec<store_immediate_info *> *, push pointers
6961         to info structures rather than the statements.
6962         (split_group): Rename ALLOW_UNALIGNED argument to
6963         ALLOW_UNALIGNED_STORE, add ALLOW_UNALIGNED_LOAD argument and handle
6964         it.  Adjust find_constituent_stores caller.
6965         (imm_store_chain_info::output_merged_store): Handle rhs_code other
6966         than INTEGER_CST, adjust split_group, get_alias_type_for_stmts and
6967         get_location_for_stmts callers.  Set MR_DEPENDENCE_CLIQUE and
6968         MR_DEPENDENCE_BASE on the MEM_REFs if they are the same in all stores.
6969         (mem_valid_for_store_merging): New function.
6970         (handled_load): New function.
6971         (pass_store_merging::process_store): New method.
6972         (pass_store_merging::execute): Use process_store method.  Adjust
6973         terminate_all_aliasing_chains caller.
6975 2017-11-03  Wilco Dijkstra  <wdijkstr@arm.com>
6977         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
6978         Return true for more constants, symbols and label references.
6979         (aarch64_valid_floating_const): Remove unused function.
6981 2017-11-03  Wilco Dijkstra  <wdijkstr@arm.com>
6983         PR target/82786
6984         * config/aarch64/aarch64.c (aarch64_layout_frame):
6985         Undo forcing of LR at bottom of frame.
6987 2017-11-03  Jeff Law  <law@redhat.com>
6989         PR target/82823
6990         * config/i386/i386.c (ix86_expand_prologue): Tighten assert
6991         for int_registers_saved.
6993         * cfganal.c (single_pred_edge_ignoring_loop_edges): New function
6994         extracted from tree-ssa-dom.c.
6995         * cfganal.h (single_pred_edge_ignoring_loop_edges): Prototype.
6996         * tree-ssa-dom.c (single_incoming_edge_ignoring_loop_edges): Remove.
6997         (record_equivalences_from_incoming_edge): Add additional argument
6998         to single_pred_edge_ignoring_loop_edges call.
6999         * tree-ssa-uncprop.c (single_incoming_edge_ignoring_loop_edges): Remove.
7000         (uncprop_dom_walker::before_dom_children): Add additional argument
7001         to single_pred_edge_ignoring_loop_edges call.
7002         * tree-ssa-sccvn.c (sccvn_dom_walker::before_dom_children): Use
7003         single_pred_edge_ignoring_loop_edges rather than open coding.
7004         * tree-vrp.c (evrp_dom_walker::before_dom_children): Similarly.
7006 2017-11-03  Marc Glisse  <marc.glisse@inria.fr>
7008         * match.pd (-(-A)): Rewrite.
7010 2017-11-03  Segher Boessenkool  <segher@kernel.crashing.org>
7012         * config/rs6000/rs60000-protos.h (rs6000_emit_sISEL): Delete.
7013         (rs6000_emit_int_cmove): New declaration.
7014         * config/rs6000/rs6000.c (rs6000_emit_int_cmove): Delete declaration.
7015         (rs6000_emit_sISEL): Delete.
7016         (rs6000_emit_int_cmove): Make non-static.
7017         * config/rs6000/rs6000.md (cstore<mode>4): Use rs6000_emit_int_cmove
7018         instead of rs6000_emit_sISEL.
7020 2017-11-03  Jan Hubicka  <hubicka@ucw.cz>
7022         * asan.c (create_cond_insert_point): Maintain profile.
7023         * ipa-utils.c (ipa_merge_profiles): Be sure only IPA profiles are
7024         merged.
7025         * basic-block.h (struct basic_block_def): Remove frequency.
7026         (EDGE_FREQUENCY): Use to_frequency
7027         * bb-reorder.c (push_to_next_round_p): Use only IPA counts for global
7028         heuristics.
7029         (find_traces): Update to use to_frequency.
7030         (find_traces_1_round): Likewise; use only IPA counts.
7031         (bb_to_key): Likewise.
7032         (connect_traces): Use IPA counts only.
7033         (copy_bb_p): Update to use to_frequency.
7034         (fix_up_crossing_landing_pad): Likewise.
7035         (sanitize_hot_paths): Likewise.
7036         * bt-load.c (basic_block_freq): Likewise.
7037         * cfg.c (init_flow): Set count_max to uninitialized.
7038         (check_bb_profile): Remove frequencies; check counts.
7039         (dump_bb_info): Do not dump frequencies.
7040         (update_bb_profile_for_threading): Update counts only.
7041         (scale_bbs_frequencies_int): Likewise.
7042         (MAX_SAFE_MULTIPLIER): Remove.
7043         (scale_bbs_frequencies_gcov_type): Update counts only.
7044         (scale_bbs_frequencies_profile_count): Update counts only.
7045         (scale_bbs_frequencies): Update counts only.
7046         * cfg.h (struct control_flow_graph): Add count-max.
7047         (update_bb_profile_for_threading): Update prototype.
7048         * cfgbuild.c (find_bb_boundaries): Do not update frequencies.
7049         (find_many_sub_basic_blocks): Likewise.
7050         * cfgcleanup.c (try_forward_edges): Likewise.
7051         (try_crossjump_to_edge): Likewise.
7052         * cfgexpand.c (expand_gimple_cond): Likewise.
7053         (expand_gimple_tailcall): Likewise.
7054         (construct_init_block): Likewise.
7055         (construct_exit_block): Likewise.
7056         * cfghooks.c (verify_flow_info): Check consistency of counts.
7057         (dump_bb_for_graph): Do not dump frequencies.
7058         (split_block_1): Do not update frequencies.
7059         (split_edge): Do not update frequencies.
7060         (make_forwarder_block): Do not update frequencies.
7061         (duplicate_block): Do not update frequencies.
7062         (account_profile_record): Do not update frequencies.
7063         * cfgloop.c (find_subloop_latch_edge_by_profile): Use IPA counts
7064         for global heuristics.
7065         * cfgloopanal.c (average_num_loop_insns): Update to use to_frequency.
7066         (expected_loop_iterations_unbounded): Use counts only.
7067         * cfgloopmanip.c (scale_loop_profile): Simplify.
7068         (create_empty_loop_on_edge): Simplify
7069         (loopify): Simplify
7070         (duplicate_loop_to_header_edge): Simplify
7071         * cfgrtl.c (force_nonfallthru_and_redirect): Update profile.
7072         (update_br_prob_note): Take care of removing note when profile
7073         becomes undefined.
7074         (relink_block_chain): Do not dump frequency.
7075         (rtl_account_profile_record): Use to_frequency.
7076         * cgraph.c (symbol_table::create_edge): Convert count to ipa count.
7077         (cgraph_edge::redirect_call_stmt_to_calle): Conver tcount to ipa count.
7078         (cgraph_update_edges_for_call_stmt_node): Likewise.
7079         (cgraph_edge::verify_count_and_frequency): Update.
7080         (cgraph_node::verify_node): Temporarily disable frequency verification.
7081         * cgraphbuild.c (compute_call_stmt_bb_frequency): Use
7082         to_cgraph_frequency.
7083         (cgraph_edge::rebuild_edges): Convert to ipa counts.
7084         * cgraphunit.c (init_lowered_empty_function): Do not initialize
7085         frequencies.
7086         (cgraph_node::expand_thunk): Update profile.
7087         * except.c (dw2_build_landing_pads): Do not update frequency.
7088         * final.c (compute_alignments): Use to_frequency.
7089         (dump_basic_block_info): Do not dump frequency.
7090         * gimple-pretty-print.c (dump_profile): Do not dump frequency.
7091         (dump_gimple_bb_header): Do not dump frequency.
7092         * gimple-ssa-isolate-paths.c (isolate_path): Do not update frequency;
7093         do update count.
7094         * gimple-streamer-in.c (input_bb): Do not stream frequency.
7095         * gimple-streamer-out.c (output_bb): Do not stream frequency.
7096         * haifa-sched.c (sched_pressure_start_bb): Use to_freuqency.
7097         (init_before_recovery): Do not update frequency.
7098         (sched_create_recovery_edges): Do not update frequency.
7099         * hsa-gen.c (convert_switch_statements): Do not update frequency.
7100         * ipa-cp.c (ipcp_propagate_stage): Update search for max_count.
7101         (ipa_cp_c_finalize): Set max_count to uninitialized.
7102         * ipa-fnsummary.c (get_minimal_bb): Use counts.
7103         (param_change_prob): Use counts.
7104         * ipa-profile.c (ipa_profile_generate_summary): Do not summarize
7105         local profiles.
7106         * ipa-split.c (consider_split): Use to_frequency.
7107         (split_function): Use to_frequency.
7108         * ira-build.c (loop_compare_func): Likewise.
7109         (mark_loops_for_removal): Likewise.
7110         (mark_all_loops_for_removal): Likewise.
7111         * loop-doloop.c (doloop_modify): Do not update frequency.
7112         * loop-unroll.c (unroll_loop_runtime_iterations): Do not update
7113         frequency.
7114         * lto-streamer-in.c (input_function): Update count_max.
7115         * omp-expand.c (expand_omp_taskreg): Update count_max.
7116         * omp-simd-clone.c (simd_clone_adjust): Update profile.
7117         * predict.c (maybe_hot_frequency_p): Use to_frequency.
7118         (maybe_hot_count_p): Use ipa counts only.
7119         (maybe_hot_bb_p): Simplify.
7120         (maybe_hot_edge_p): Simplify.
7121         (probably_never_executed): Do not take frequency argument.
7122         (probably_never_executed_bb_p): Do not pass frequency.
7123         (probably_never_executed_edge_p): Likewise.
7124         (combine_predictions_for_bb): Check that profile is nonzero.
7125         (propagate_freq): Do not set frequency.
7126         (drop_profile): Simplify.
7127         (counts_to_freqs): Simplify.
7128         (expensive_function_p): Use to_frequency.
7129         (propagate_unlikely_bbs_forward): Simplify.
7130         (determine_unlikely_bbs): Simplify.
7131         (estimate_bb_frequencies): Add hack to silence graphite issues.
7132         (compute_function_frequency): Use ipa counts.
7133         (pass_profile::execute): Update.
7134         (rebuild_frequencies): Use counts only.
7135         (force_edge_cold): Use counts only.
7136         * profile-count.c (profile_count::dump): Dump new count types.
7137         (profile_count::differs_from_p): Check compatiblity.
7138         (profile_count::to_frequency): New function.
7139         (profile_count::to_cgraph_frequency): New function.
7140         * profile-count.h (struct function): Declare.
7141         (enum profile_quality): Add profile_guessed_local and
7142         profile_guessed_global0.
7143         (class profile_proability): Decrease number of bits to 29;
7144         update from_reg_br_prob_note and to_reg_br_prob_note.
7145         (class profile_count: Update comment; decrease number of bits
7146         to 61. Check compatibility.
7147         (profile_count::compatible_p): New private member function.
7148         (profile_count::ipa_p): New member function.
7149         (profile_count::operator<): Handle global zero correctly.
7150         (profile_count::operator>): Handle global zero correctly.
7151         (profile_count::operator<=): Handle global zero correctly.
7152         (profile_count::operator>=): Handle global zero correctly.
7153         (profile_count::nonzero_p): New member function.
7154         (profile_count::force_nonzero): New member function.
7155         (profile_count::max): New member function.
7156         (profile_count::apply_scale): Handle IPA scalling.
7157         (profile_count::guessed_local): New member function.
7158         (profile_count::global0): New member function.
7159         (profile_count::ipa): New member function.
7160         (profile_count::to_frequency): Declare.
7161         (profile_count::to_cgraph_frequency): Declare.
7162         * profile.c (OVERLAP_BASE): Delete.
7163         (compute_frequency_overlap): Delete.
7164         (compute_branch_probabilities): Do not use compute_frequency_overlap.
7165         * regs.h (REG_FREQ_FROM_BB): Use to_frequency.
7166         * sched-ebb.c (rank): Use counts only.
7167         * shrink-wrap.c (handle_simple_exit): Use counts only.
7168         (try_shrink_wrapping): Use counts only.
7169         (place_prologue_for_one_component): Use counts only.
7170         * tracer.c (find_best_predecessor): Use to_frequency.
7171         (find_trace): Use to_frequency.
7172         (tail_duplicate): Use to_frequency.
7173         * trans-mem.c (expand_transaction): Do not update frequency.
7174         * tree-call-cdce.c: Do not update frequency.
7175         * tree-cfg.c (gimple_find_sub_bbs): Likewise.
7176         (gimple_merge_blocks): Likewise.
7177         (gimple_split_edge): Likewise.
7178         (gimple_duplicate_sese_region): Likewise.
7179         (gimple_duplicate_sese_tail): Likewise.
7180         (move_sese_region_to_fn): Likewise.
7181         (gimple_account_profile_record): Likewise.
7182         (insert_cond_bb): Likewise.
7183         * tree-complex.c (expand_complex_div_wide): Likewise.
7184         * tree-eh.c (lower_resx): Update profile.
7185         * tree-inline.c (copy_bb): Simplify count scaling; do not scale
7186         frequencies.
7187         (initialize_cfun): Do not initialize frequencies
7188         (freqs_to_counts): Delete.
7189         (copy_cfg_body): Ignore count parameter.
7190         (copy_body): Update.
7191         (expand_call_inline): Update count_max.
7192         (optimize_inline_calls): Update count_max.
7193         (tree_function_versioning): Update count_max.
7194         * tree-ssa-coalesce.c (coalesce_cost_bb): Use to_frequency.
7195         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Do not update
7196         frequency.
7197         * tree-ssa-loop-im.c (execute_sm_if_changed): Use counts only.
7198         * tree-ssa-loop-ivcanon.c (unloop_loops): Do not update freuqency.
7199         (try_peel_loop): Likewise.
7200         * tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Use
7201         to_frequency.
7202         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): Pass -1.
7203         (tree_transform_and_unroll_loop): Do not use frequencies
7204         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations):
7205         Use reliable prediction only.
7206         * tree-ssa-loop-unswitch.c (hoist_guard): Do not use frequencies.
7207         * tree-ssa-sink.c (select_best_block): Use to_frequency.
7208         * tree-ssa-tail-merge.c (replace_block_by): Temporarily disable
7209         probability scaling.
7210         * tree-ssa-threadupdate.c (create_block_for_threading): Do
7211         not update frequency
7212         (any_remaining_duplicated_blocks): Likewise.
7213         (update_profile): Likewise.
7214         (estimated_freqs_path): Delete.
7215         (freqs_to_counts_path): Delete.
7216         (clear_counts_path): Delete.
7217         (ssa_fix_duplicate_block_edges): Likewise.
7218         (duplicate_thread_path): Likewise.
7219         * tree-switch-conversion.c (gen_inbound_check): Use counts.
7220         * tree-tailcall.c (decrease_profile): Do not update frequency.
7221         (eliminate_tail_call): Likewise.
7222         * tree-vect-loop-manip.c (vect_do_peeling): Likewise.
7223         * tree-vect-loop.c (scale_profile_for_vect_loop): Likewise.
7224         (optimize_mask_stores): Likewise.
7225         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
7226         * ubsan.c (ubsan_expand_null_ifn): Update profile.
7227         (ubsan_expand_ptr_ifn): Update profile.
7228         * value-prof.c (gimple_ic): Simplify.
7229         * value-prof.h (gimple_ic): Update prototype.
7230         * ipa-inline-transform.c (inline_transform): Fix scaling conditoins.
7231         * ipa-inline.c (compute_uninlined_call_time): Be sure that
7232         counts are nonzero.
7233         (want_inline_self_recursive_call_p): Likewise.
7234         (resolve_noninline_speculation): Only cummulate defined counts.
7235         (inline_small_functions): Use nonzero_p.
7236         (ipa_inline): Do not access freed node.
7238 2017-11-03  Wilco Dijkstra  <wdijkstr@arm.com>
7240         * config/aarch64/aarch64.c (aarch64_override_options_internal):
7241         Set PARAM_SCHED_PRESSURE_ALGORITHM to SCHED_PRESSURE_MODEL.
7243 2017-11-03  Kito Cheng  <kito.cheng@gmail.com>
7245         * config/riscv/riscv.c (riscv_legitimize_move): Handle
7246         non-legitimate address.
7248 2017-11-03  Segher Boessenkool  <segher@kernel.crashing.org>
7250         * config/rs6000/rs6000.md (*lt0_disi): Delete.
7251         (*lt0_<mode>di, *lt0_<mode>si): New.
7253 2017-11-03  Segher Boessenkool  <segher@kernel.crashing.org>
7255         * config/rs6000/rs6000.md (move_from_CR_ov_bit): Change condition to
7256         TARGET_PAIRED_FLOAT.
7258 2017-11-03  Siddhesh Poyarekar  <siddhesh.poyarekar@linaro.org>
7259             Jim Wilson  <jim.wilson@linaro.org>
7261         * config/aarch64/aarch64-cores.def (saphira): New CPU.
7262         * config/aarch64/aarch64-tune.md: Regenerated.
7263         * doc/invoke.texi (AArch64 Options/-mtune): Add "saphira".
7264         * gcc/config/aarch64/aarch64.c (saphira_tunings): New tuning table.
7266 2017-11-03  Cupertino Miranda  <cmiranda@synopsys.com>
7268         * config/arc/arc.c (arc_save_restore): Corrected CFA note.
7269         (arc_expand_prologue): Restore blink for millicode.
7270         * config/arc/linux.h (LINK_EH_SPEC): Defined.
7272 2017-11-03  Richard Sandiford  <richard.sandiford@linaro.org>
7274         PR target/82809
7275         * config/i386/i386.c (ix86_vector_duplicate_value): Use
7276         gen_vec_duplicate after forcing the scalar into a register.
7278 2017-11-02  Segher Boessenkool  <segher@kernel.crashing.org>
7280         * combine (try_combine): Print the insns input to try_combine to the
7281         dump file.
7283 2017-11-02  Steve Ellcey  <sellcey@cavium.com>
7285         PR target/79868
7286         * config/aarch64/aarch64-c.c (aarch64_pragma_target_parse):
7287         Remove second argument from aarch64_process_target_attr call.
7288         * config/aarch64/aarch64-protos.h (aarch64_process_target_attr):
7289         Ditto.
7290         * config/aarch64/aarch64.c (aarch64_attribute_info): Change
7291         field type.
7292         (aarch64_handle_attr_arch): Remove second argument.
7293         (aarch64_handle_attr_cpu): Ditto.
7294         (aarch64_handle_attr_tune): Ditto.
7295         (aarch64_handle_attr_isa_flags): Ditto.
7296         (aarch64_process_one_target_attr): Ditto.
7297         (aarch64_process_target_attr): Ditto.
7298         (aarch64_option_valid_attribute_p): Remove second argument.
7299         on aarch64_process_target_attr call.
7301 2017-11-02  David Malcolm  <dmalcolm@redhat.com>
7303         * diagnostic.c: Include "selftest-diagnostic.h".
7304         (selftest::assert_location_text): New function.
7305         (selftest::test_diagnostic_get_location_text): New function.
7306         (selftest::diagnostic_c_tests): Call it.
7308 2017-11-02  David Malcolm  <dmalcolm@redhat.com>
7310         * Makefile.in (OBJS-libcommon): Add selftest-diagnostic.o.
7311         * diagnostic-show-locus.c: Include "selftest-diagnostic.h".
7312         (class selftest::test_diagnostic_context): Move to...
7313         * selftest-diagnostic.c: New file.
7314         * selftest-diagnostic.h: New file.
7316 2017-11-02  James Bowman  <james.bowman@ftdichip.com>
7318         * config/ft32/ft32.c (ft32_addr_space_legitimate_address_p): increase
7319         offset range for FT32B.
7320         * config/ft32/ft32.h: option "mcompress" enables relaxation.
7321         * config/ft32/ft32.md: Add TARGET_NOPM.
7322         * config/ft32/ft32.opt: Add mft32b, mcompress, mnopm.
7323         * gcc/doc/invoke.texi: Add mft32b, mcompress, mnopm.
7325 2017-11-02  Wilco Dijkstra  <wdijkstr@arm.com>
7327         * config/aarch64/aarch64.h (MALLOC_ABI_ALIGNMENT): New define.
7329 2017-11-02  Jeff Law  <law@redhat.com>
7331         * gimple-ssa-sprintf.c (sprintf_dom_walker): Remove
7332         virtual keyword on FINAL OVERRIDE members.
7334         * tree-ssa-propagate.h (ssa_propagation_engine): Group
7335         virtuals together.  Add virtual destructor.
7336         (substitute_and_fold_engine): Similarly.
7338 2017-11-02  Jan Hubicka  <hubicka@ucw.cz>
7340         * x86-tune.def (X86_TUNE_USE_INCDEC): Enable for Haswell+.
7342 2017-11-02  Richard Biener  <rguenther@suse.de>
7344         PR tree-optimization/82795
7345         * tree-if-conv.c (predicate_mem_writes): Remove bogus assert.
7347 2017-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7349         * acinclude.m4 (gcc_AC_INITFINI_ARRAY): Don't require
7350         gcc_SUN_LD_VERSION.
7351         (gcc_GAS_CHECK_FEATURE): Remove.
7352         * configure.ac (ld_vers) <*-*-solaris2*>: Move comments from
7353         gcc_AC_INITFINI_ARRAY here.  Update for Solaris 11.4 changes.
7354         * configure: Regenerate.
7356 2017-11-02  Claudiu Zissulescu <claziss@synopsys.com>
7358         * config/arc/arc.c (hwloop_optimize): Account for empty
7359         body loops.
7361 2017-11-02  Richard Biener  <rguenther@suse.de>
7363         PR middle-end/82765
7364         * varasm.c (decode_addr_const): Make offset HOST_WIDE_INT.
7365         Truncate ARRAY_REF index and element size.
7367 2017-11-01  Palmer Dabbelt  <palmer@dabbelt.com>
7369         * doc/invoke.texi (RISC-V Options): Use "@minus{}2 GB", not "-2 GB".
7371 2017-11-01  Jeff Law  <law@redhat.com>
7373         * tree-ssa-ccp.c (ccp_folder): New class derived from
7374         substitute_and_fold_engine.
7375         (ccp_folder::get_value): New member function.
7376         (ccp_folder::fold_stmt): Renamed from ccp_fold_stmt.
7377         (ccp_fold_stmt): Remove prototype.
7378         (ccp_finalize): Call substitute_and_fold from the ccp_class.
7379         * tree-ssa-copy.c (copy_folder): New class derived from
7380         substitute_and_fold_engine.
7381         (copy_folder::get_value): Renamed from get_value.
7382         (fini_copy_prop): Call substitute_and_fold from copy_folder class.
7383         * tree-vrp.c (vrp_folder): New class derived from
7384         substitute_and_fold_engine.
7385         (vrp_folder::fold_stmt): Renamed from vrp_fold_stmt.
7386         (vrp_folder::get_value): New member function.
7387         (vrp_finalize): Call substitute_and_fold from vrp_folder class.
7388         (evrp_dom_walker::before_dom_children): Similarly for replace_uses_in.
7389         * tree-ssa-propagate.h (substitute_and_fold_engine): New class to
7390         provide a class interface to folder/substitute routines.
7391         (ssa_prop_fold_stmt_fn): Remove typedef.
7392         (ssa_prop_get_value_fn): Likewise.
7393         (subsitute_and_fold): Remove prototype.
7394         (replace_uses_in): Likewise.
7395         * tree-ssa-propagate.c (substitute_and_fold_engine::replace_uses_in):
7396         Renamed from replace_uses_in.  Call the virtual member function
7397         (substitute_and_fold_engine::replace_phi_args_in): Similarly.
7398         (substitute_and_fold_dom_walker): Remove initialization of
7399         data member entries for calbacks.  Add substitute_and_fold_engine
7400         member and initialize it.
7401         (substitute_and_fold_dom_walker::before_dom_children0: Use the
7402         member functions for get_value, replace_phi_args_in c
7403         replace_uses_in, and fold_stmt calls.
7404         (substitute_and_fold_engine::substitute_and_fold): Renamed from
7405         substitute_and_fold.  Remove assert.   Update ctor call.
7407         * tree-ssa-propagate.h (ssa_prop_visit_stmt_fn): Remove typedef.
7408         (ssa_prop_visit_phi_fn): Likewise.
7409         (class ssa_propagation_engine): New class to provide an interface
7410         into ssa_propagate.
7411         * tree-ssa-propagate.c (ssa_prop_visit_stmt): Remove file scoped
7412         variable.
7413         (ssa_prop_visit_phi): Likewise.
7414         (ssa_propagation_engine::simulate_stmt): Moved into class.
7415         Call visit_phi/visit_stmt from the class rather than via
7416         file scoped static variables.
7417         (ssa_propagation_engine::simulate_block): Moved into class.
7418         (ssa_propagation_engine::process_ssa_edge_worklist): Similarly.
7419         (ssa_propagation_engine::ssa_propagate): Similarly.  No longer
7420         set file scoped statics for the visit_stmt/visit_phi callbacks.
7421         * tree-complex.c (complex_propagate): New class derived from
7422         ssa_propagation_engine.
7423         (complex_propagate::visit_stmt): Renamed from complex_visit_stmt.
7424         (complex_propagate::visit_phi): Renamed from complex_visit_phi.
7425         (tree_lower_complex): Call ssa_propagate via the complex_propagate
7426         class.
7427         * tree-ssa-ccp.c: (ccp_propagate): New class derived from
7428         ssa_propagation_engine.
7429         (ccp_propagate::visit_phi): Renamed from ccp_visit_phi_node.
7430         (ccp_propagate::visit_stmt): Renamed from ccp_visit_stmt.
7431         (do_ssa_ccp): Call ssa_propagate from the ccp_propagate class.
7432         * tree-ssa-copy.c (copy_prop): New class derived from
7433         ssa_propagation_engine.
7434         (copy_prop::visit_stmt): Renamed from copy_prop_visit_stmt.
7435         (copy_prop::visit_phi): Renamed from copy_prop_visit_phi_node.
7436         (execute_copy_prop): Call ssa_propagate from the copy_prop class.
7437         * tree-vrp.c (vrp_prop): New class derived from ssa_propagation_engine.
7438         (vrp_prop::visit_stmt): Renamed from vrp_visit_stmt.
7439         (vrp_prop::visit_phi): Renamed from vrp_visit_phi_node.
7440         (execute_vrp): Call ssa_propagate from the vrp_prop class.
7442 2017-11-01  Jakub Jelinek  <jakub@redhat.com>
7444         PR rtl-optimization/82778
7445         PR rtl-optimization/82597
7446         * compare-elim.c (struct comparison): Add in_a_setter field.
7447         (find_comparison_dom_walker::before_dom_children): Remove killed
7448         bitmap and df_simulate_find_defs call, instead walk the defs.
7449         Compute last_setter and initialize in_a_setter.  Merge definitions
7450         with first initialization for a few variables.
7451         (try_validate_parallel): Use insn_invalid_p instead of
7452         recog_memoized.  Return insn rather than just the pattern.
7453         (try_merge_compare): Fix up comment.  Don't uselessly test if
7454         in_a is a REG_P.  Use cmp->in_a_setter instead of walking UD
7455         chains.
7456         (execute_compare_elim_after_reload): Remove df_chain_add_problem
7457         call.
7459 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
7460             Alan Hayward  <alan.hayward@arm.com>
7461             David Sherwood  <david.sherwood@arm.com>
7463         * config/aarch64/aarch64.c (aarch64_rtx_costs): Use
7464         aarch64_hard_regno_nregs to get the number of registers
7465         in a mode.
7467 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
7468             Alan Hayward  <alan.hayward@arm.com>
7469             David Sherwood  <david.sherwood@arm.com>
7471         * config/aarch64/constraints.md (Upl): Rename to...
7472         (Uaa): ...this.
7473         * config/aarch64/aarch64.md
7474         (*zero_extend<SHORT:mode><GPI:mode>2_aarch64, *addsi3_aarch64_uxtw):
7475         Update accordingly.
7477 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
7478             Alan Hayward  <alan.hayward@arm.com>
7479             David Sherwood  <david.sherwood@arm.com>
7481         * config/aarch64/aarch64.c (aarch64_add_constant_internal)
7482         (aarch64_add_constant, aarch64_add_sp, aarch64_sub_sp): Move
7483         earlier in file.
7485 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
7486             Alan Hayward  <alan.hayward@arm.com>
7487             David Sherwood  <david.sherwood@arm.com>
7489         * config/aarch64/aarch64.c (aarch64_evpc_trn, aarch64_evpc_uzp)
7490         (aarch64_evpc_zip, aarch64_evpc_ext, aarch64_evpc_rev)
7491         (aarch64_evpc_dup): Generate rtl direcly, rather than using
7492         named expanders.
7493         (aarch64_expand_vec_perm_const_1): Explicitly check for permutes
7494         of a single element.
7495         * config/aarch64/iterators.md: Add a comment above the permute
7496         unspecs to say that they are generated directly by
7497         aarch64_expand_vec_perm_const.
7498         * config/aarch64/aarch64-simd.md: Likewise the permute instructions.
7500 2017-11-01  Nathan Sidwell  <nathan@acm.org>
7502         * tree-dump.c (dequeue_and_dump): Use HAS_DECL_ASSEMBLER_NAME_P.
7504 2017-11-01  Palmer Dabbelt  <palmer@dabbelt.com>
7506         * doc/invoke.texi (RISC-V Options): Explicitly name the medlow
7507         and medany code models, and describe what they do.
7509 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
7511         Revert accidental duplicate:
7513         * combine.c (can_change_dest_mode): Reject changes in
7514         REGMODE_NATURAL_SIZE.
7516 2017-11-01  Segher Boessenkool  <segher@kernel.crashing.org>
7518         PR rtl-optimization/64682
7519         PR rtl-optimization/69567
7520         PR rtl-optimization/69737
7521         PR rtl-optimization/82683
7522         * combine.c (distribute_notes) <REG_DEAD>: If the new I2 sets the same
7523         register mentioned in the note, drop the note, unless it came from I3,
7524         in which case it should go to I3 again.
7526 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
7528         * tree-ssa-dse.c (normalize_ref): Check whether the ranges overlap
7529         and return false if not.
7530         (clear_bytes_written_by, live_bytes_read): Update accordingly.
7532 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
7534         * tree-ssa-alias.h (ranges_overlap_p): Return false if either
7535         range is known to be empty.
7537 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
7538             Alan Hayward  <alan.hayward@arm.com>
7539             David Sherwood  <david.sherwood@arm.com>
7541         * simplify-rtx.c (simplify_const_unary_operation): Use GET_MODE_NUNITS
7542         and CONST_VECTOR_NUNITS instead of computing the number of units from
7543         the byte sizes of the vector and element.
7544         (simplify_binary_operation_1): Likewise.
7545         (simplify_const_binary_operation): Likewise.
7546         (simplify_ternary_operation): Likewise.
7548 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
7549             Alan Hayward  <alan.hayward@arm.com>
7550             David Sherwood  <david.sherwood@arm.com>
7552         * var-tracking.c (INT_MEM_OFFSET): Replace with...
7553         (int_mem_offset): ...this new function.
7554         (var_mem_set, var_mem_delete_and_set, var_mem_delete)
7555         (find_mem_expr_in_1pdv, dataflow_set_preserve_mem_locs)
7556         (same_variable_part_p, use_type, add_stores, vt_get_decl_and_offset):
7557         Update accordingly.
7559 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
7560             Alan Hayward  <alan.hayward@arm.com>
7561             David Sherwood  <david.sherwood@arm.com>
7563         * lower-subreg.c (interesting_mode_p): New function.
7564         (compute_costs, find_decomposable_subregs, decompose_register)
7565         (simplify_subreg_concatn, can_decompose_p, resolve_simple_move)
7566         (resolve_clobber, dump_choices): Use it.
7568 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
7569             Alan Hayward  <alan.hayward@arm.com>
7570             David Sherwood  <david.sherwood@arm.com>
7572         * rtlhash.c (add_rtx): Use add_hwi for 'w' and add_int for 'i'.
7574 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
7575             Alan Hayward  <alan.hayward@arm.com>
7576             David Sherwood  <david.sherwood@arm.com>
7578         * alias.c (find_base_value, find_base_term): Only process integer
7579         truncations.  Check the precision rather than the size.
7581 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
7582             Alan Hayward  <alan.hayward@arm.com>
7583             David Sherwood  <david.sherwood@arm.com>
7585         * machmode.h (is_narrower_int_mode): New function
7586         * optabs.c (expand_float, expand_fix): Use it.
7587         * dwarf2out.c (rotate_loc_descriptor): Likewise.
7589 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
7590             Alan Hayward  <alan.hayward@arm.com>
7591             David Sherwood  <david.sherwood@arm.com>
7593         * rtl.h (narrower_subreg_mode): New function.
7594         * ira-color.c (update_costs_from_allocno): Use it.
7596 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
7597             Alan Hayward  <alan.hayward@arm.com>
7598             David Sherwood  <david.sherwood@arm.com>
7600         * optabs-query.h (convert_optab_p): New function, split out from...
7601         (convert_optab_handler): ...here.
7602         (widening_optab_handler): Delete.
7603         (find_widening_optab_handler): Remove permit_non_widening parameter.
7604         (find_widening_optab_handler_and_mode): Likewise.  Provide an
7605         override that operates on mode class wrappers.
7606         * optabs-query.c (widening_optab_handler): Delete.
7607         (find_widening_optab_handler_and_mode): Remove permit_non_widening
7608         parameter.  Assert that the two modes are the same class and that
7609         the "from" mode is narrower than the "to" mode.  Use
7610         convert_optab_handler instead of widening_optab_handler.
7611         * expmed.c (expmed_mult_highpart_optab): Use convert_optab_handler
7612         instead of widening_optab_handler.
7613         * expr.c (expand_expr_real_2): Update calls to
7614         find_widening_optab_handler.
7615         * optabs.c (expand_widen_pattern_expr): Likewise.
7616         (expand_binop_directly): Take the insn_code as a parameter.
7617         (expand_binop): Only call find_widening_optab_handler for
7618         conversion optabs; use optab_handler otherwise.  Update calls
7619         to find_widening_optab_handler and expand_binop_directly.
7620         Use convert_optab_handler instead of widening_optab_handler.
7621         * tree-ssa-math-opts.c (convert_mult_to_widen): Update calls to
7622         find_widening_optab_handler and use scalar_mode rather than
7623         machine_mode.
7624         (convert_plusminus_to_widen): Likewise.
7626 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
7627             Alan Hayward  <alan.hayward@arm.com>
7628             David Sherwood  <david.sherwood@arm.com>
7630         * machmode.h (fixed_size_mode): New class.
7631         * rtl.h (get_pool_mode): Return fixed_size_mode.
7632         * gengtype.c (main): Add fixed_size_mode.
7633         * target.def (get_raw_result_mode): Return a fixed_size_mode.
7634         (get_raw_arg_mode): Likewise.
7635         * doc/tm.texi: Regenerate.
7636         * targhooks.h (default_get_reg_raw_mode): Return a fixed_size_mode.
7637         * targhooks.c (default_get_reg_raw_mode): Likewise.
7638         * config/ia64/ia64.c (ia64_get_reg_raw_mode): Likewise.
7639         * config/mips/mips.c (mips_get_reg_raw_mode): Likewise.
7640         * config/msp430/msp430.c (msp430_get_raw_arg_mode): Likewise.
7641         (msp430_get_raw_result_mode): Likewise.
7642         * config/avr/avr-protos.h (regmask): Use as_a <fixed_side_mode>
7643         * dbxout.c (dbxout_parms): Require fixed-size modes.
7644         * expr.c (copy_blkmode_from_reg, copy_blkmode_to_reg): Likewise.
7645         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Likewise.
7646         * omp-low.c (lower_oacc_reductions): Likewise.
7647         * simplify-rtx.c (simplify_immed_subreg): Take fixed_size_modes.
7648         (simplify_subreg): Update accordingly.
7649         * varasm.c (constant_descriptor_rtx::mode): Change to fixed_size_mode.
7650         (force_const_mem): Update accordingly.  Return NULL_RTX for modes
7651         that aren't fixed-size.
7652         (get_pool_mode): Return a fixed_size_mode.
7653         (output_constant_pool_2): Take a fixed_size_mode.
7655 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
7656             Alan Hayward  <alan.hayward@arm.com>
7657             David Sherwood  <david.sherwood@arm.com>
7659         * doc/rtl.texi (vec_series): Document.
7660         (const): Say that the operand can be a vec_series.
7661         * rtl.def (VEC_SERIES): New rtx code.
7662         * rtl.h (const_vec_series_p_1): Declare.
7663         (const_vec_series_p): New function.
7664         * emit-rtl.h (gen_const_vec_series): Declare.
7665         (gen_vec_series): Likewise.
7666         * emit-rtl.c (const_vec_series_p_1, gen_const_vec_series)
7667         (gen_vec_series): Likewise.
7668         * optabs.c (expand_mult_highpart): Use gen_const_vec_series.
7669         * simplify-rtx.c (simplify_unary_operation): Handle negations
7670         of vector series.
7671         (simplify_binary_operation_series): New function.
7672         (simplify_binary_operation_1): Use it.  Handle VEC_SERIES.
7673         (test_vector_ops_series): New function.
7674         (test_vector_ops): Call it.
7675         * config/powerpcspe/altivec.md (altivec_lvsl): Use
7676         gen_const_vec_series.
7677         (altivec_lvsr): Likewise.
7678         * config/rs6000/altivec.md (altivec_lvsl, altivec_lvsr): Likewise.
7680 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
7681             Alan Hayward  <alan.hayward@arm.com>
7682             David Sherwood  <david.sherwood@arm.com>
7684         * doc/rtl.texi (const): Update description of address constants.
7685         Say that vector constants are allowed too.
7686         * common.md (E, F): Use CONSTANT_P instead of checking for
7687         CONST_VECTOR.
7688         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
7689         checking for CONST_VECTOR.
7690         * expmed.c (make_tree): Use build_vector_from_val for a CONST
7691         VEC_DUPLICATE.
7692         * expr.c (expand_expr_real_2): Check for vector modes instead
7693         of checking for CONST_VECTOR.
7694         * rtl.h (const_vec_p): New function.
7695         (const_vec_duplicate_p): Check for a CONST VEC_DUPLICATE.
7696         (unwrap_const_vec_duplicate): Handle them here too.
7698 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
7699             David Malcolm  <dmalcolm@redhat.com>
7700             Alan Hayward  <alan.hayward@arm.com>
7701             David Sherwood  <david.sherwood@arm.com>
7703         * rtl.h (vec_duplicate_p): New function.
7704         * selftest-rtl.c (assert_rtx_eq_at): New function.
7705         * selftest-rtl.h (ASSERT_RTX_EQ): New macro.
7706         (assert_rtx_eq_at): Declare.
7707         * selftest.h (selftest::simplify_rtx_c_tests): Declare.
7708         * selftest-run-tests.c (selftest::run_tests): Call it.
7709         * simplify-rtx.c: Include selftest.h and selftest-rtl.h.
7710         (simplify_unary_operation_1): Recursively handle vector duplicates.
7711         (simplify_binary_operation_1): Likewise.  Handle VEC_SELECTs of
7712         vector duplicates.
7713         (simplify_subreg): Handle subregs of vector duplicates.
7714         (make_test_reg, test_vector_ops_duplicate, test_vector_ops)
7715         (selftest::simplify_rtx_c_tests): New functions.
7717 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
7718             Alan Hayward  <alan.hayward@arm.com>
7719             David Sherwood  <david.sherwood@arm.com>
7721         * emit-rtl.h (gen_const_vec_duplicate): Declare.
7722         (gen_vec_duplicate): Likewise.
7723         * emit-rtl.c (gen_const_vec_duplicate_1): New function, split
7724         out from...
7725         (gen_const_vector): ...here.
7726         (gen_const_vec_duplicate, gen_vec_duplicate): New functions.
7727         (gen_rtx_CONST_VECTOR): Use gen_const_vec_duplicate for constants
7728         whose elements are all equal.
7729         * optabs.c (expand_vector_broadcast): Use gen_const_vec_duplicate.
7730         * simplify-rtx.c (simplify_const_unary_operation): Likewise.
7731         (simplify_relational_operation): Likewise.
7732         * config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup):
7733         Likewise.
7734         (aarch64_simd_dup_constant): Use gen_vec_duplicate.
7735         (aarch64_expand_vector_init): Likewise.
7736         * config/arm/arm.c (neon_vdup_constant): Likewise.
7737         (neon_expand_vector_init): Likewise.
7738         (arm_expand_vec_perm): Use gen_const_vec_duplicate.
7739         (arm_block_set_unaligned_vect): Likewise.
7740         (arm_block_set_aligned_vect): Likewise.
7741         * config/arm/neon.md (neon_copysignf<mode>): Likewise.
7742         * config/i386/i386.c (ix86_expand_vec_perm): Likewise.
7743         (expand_vec_perm_even_odd_pack): Likewise.
7744         (ix86_vector_duplicate_value): Use gen_vec_duplicate.
7745         * config/i386/sse.md (one_cmpl<mode>2): Use CONSTM1_RTX.
7746         * config/ia64/ia64.c (ia64_expand_vecint_compare): Use
7747         gen_const_vec_duplicate.
7748         * config/ia64/vect.md (addv2sf3, subv2sf3): Use CONST1_RTX.
7749         * config/mips/mips.c (mips_gen_const_int_vector): Use
7750         gen_const_vec_duplicate.
7751         (mips_expand_vector_init): Use CONST0_RTX.
7752         * config/powerpcspe/altivec.md (abs<mode>2, nabs<mode>2): Likewise.
7753         (define_split): Use gen_const_vec_duplicate.
7754         * config/rs6000/altivec.md (abs<mode>2, nabs<mode>2): Use CONST0_RTX.
7755         (define_split): Use gen_const_vec_duplicate.
7756         * config/s390/vx-builtins.md (vec_genmask<mode>): Likewise.
7757         (vec_ctd_s64, vec_ctd_u64, vec_ctsl, vec_ctul): Likewise.
7758         * config/spu/spu.c (spu_const): Likewise.
7760 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
7761             Alan Hayward  <alan.hayward@arm.com>
7762             David Sherwood  <david.sherwood@arm.com>
7764         * combine.c (can_change_dest_mode): Reject changes in
7765         REGMODE_NATURAL_SIZE.
7767 2017-10-31  Sandra Loosemore  <sandra@codesourcery.com>
7769         * configure.ac (--enable-libssp): New.
7770         (gcc_cv_libc_provides_ssp): Check for explicit setting before
7771         trying to determine target-specific default.  Adjust indentation.
7772         * configure: Regenerated.
7773         * doc/install.texi (Configuration): Expand --disable-libssp
7774         documentation.
7776 2017-10-31  Daniel Santos  <daniel.santos@pobox.com>
7778         config/i386/i386.c (ix86_expand_epilogue): Correct stack
7779         calculation.
7781 2017-10-31  Martin Jambor  <mjambor@suse.cz>
7783         PR c++/81702
7784         * gimple-fold.c (gimple_get_virt_method_for_vtable): Remove assert.
7786 2017-10-31  David Malcolm  <dmalcolm@redhat.com>
7788         * auto-profile.c (autofdo_source_profile::read): Use
7789         UNKNOWN_LOCATION rather than 0.
7790         * diagnostic-core.h (warning_at_rich_loc): Rename to...
7791         (warning_at): ...this overload.
7792         (warning_at_rich_loc_n): Rename to...
7793         (warning_n): ...this overload.
7794         (error_at_rich_loc): Rename to...
7795         (error_at): ...this overload.
7796         (pedwarn_at_rich_loc): Rename to...
7797         (pedwarn): ...this overload.
7798         (permerror_at_rich_loc): Rename to...
7799         (permerror): ...this overload.
7800         (inform_at_rich_loc): Rename to...
7801         (inform): ...this overload.
7802         * diagnostic.c: (diagnostic_n_impl): Delete location_t-based decl.
7803         (diagnostic_n_impl_richloc): Rename to...
7804         (diagnostic_n_impl): ...this rich_location *-based decl.
7805         (inform_at_rich_loc): Rename to...
7806         (inform): ...this, and add an assertion.
7807         (inform_n): Update for removal of location_t-based diagnostic_n_impl.
7808         (warning_at_rich_loc): Rename to...
7809         (warning_at): ...this, and add an assertion.
7810         (warning_at_rich_loc_n): Rename to...
7811         (warning_n): ...this, and add an assertion.
7812         (warning_n): Update location_t-based implementation for removal of
7813         location_t-based diagnostic_n_impl.
7814         (pedwarn_at_rich_loc): Rename to...
7815         (pedwarn): ...this, and add an assertion.
7816         (permerror_at_rich_loc): Rename to...
7817         (permerror): ...this, and add an assertion.
7818         (error_n): Update for removal of location_t-based diagnostic_n_impl.
7819         (error_at_rich_loc): Rename to...
7820         (error_at): ...this, and add an assertion.
7821         * gcc.c (do_spec_1): Use UNKNOWN_LOCATION rather than 0.
7822         (driver::do_spec_on_infiles): Likewise.
7823         * substring-locations.c (format_warning_va): Update for renaming
7824         of inform_at_rich_loc.
7826 2017-10-31  Michael Meissner  <meissner@linux.vnet.ibm.com>
7828         * builtins.def (DEF_FLOATN_BUILTIN): Change most _Float<N> and
7829         _Float<N>X built-in functions so that the variant without the
7830         "__builtin_" prefix is only enabled for the GNU C and Objective C
7831         languages when they are in non-strict ANSI/ISO mode.
7832         (DEF_EXT_LIB_FLOATN_NX_BUILTINS): Likewise.
7833         * target.def (floatn_builtin_p): Add a target hook to control
7834         whether _Float<N> and _Float<N>X built-in functions without the
7835         "__builtin_" prefix are enabled, and return true for C and
7836         Objective C in the default hook.  Include langhooks.h in
7837         targhooks.c.
7838         * targhooks.h (default_floatn_builtin_p): Likewise.
7839         * targhooks.c (default_floatn_builtin_p): Likewise.
7840         * doc/tm.texi.in (TARGET_FLOATN_BUILTIN_P): Document the
7841         floatn_builtin_p target hook.
7842         * doc/tm.texi (TARGET_FLOATN_BUILTIN_P): Likewise.
7844 2017-10-31  Matthew Fortune  <matthew.fortune@imgtec.com>
7845             Eric Botcazou  <ebotcazou@adacore.com>
7847         PR rtl-optimization/81803
7848         * lra-constraints.c (curr_insn_transform): Also reload the whole
7849         register for a strict subreg no wider than a word if this is for
7850         a WORD_REGISTER_OPERATIONS target.
7852 2017-10-31  Jason Merrill  <jason@redhat.com>
7854         * gdbinit.in: Skip over inlines from timevar.h.
7856 2017-10-31  Martin Liska  <mliska@suse.cz>
7858         * doc/gcov.texi: Document new option.
7859         * gcov.c (print_usage): Likewise print it.
7860         (process_args): Support the argument.
7861         (format_count): New function.
7862         (format_gcov): Use the function.
7864 2017-10-31  Martin Liska  <mliska@suse.cz>
7866         * gcov.c (struct name_map): do not use typedef.
7867         Define operator== and operator<.
7868         (name_search): Remove.
7869         (name_sort): Remove.
7870         (main): Do not allocate names.
7871         (process_file): Add vertical space.
7872         (generate_results): Use std::find.
7873         (release_structures): Do not release memory.
7874         (find_source): Use std::find.
7876 2017-10-31  Martin Liska  <mliska@suse.cz>
7878         * gcov.c (struct line_info): Remove it's typedef.
7879         (line_info::line_info): Add proper ctor.
7880         (line_info::has_block): Do not use a typedef.
7881         (struct source_info): Do not use typedef.
7882         (circuit): Likewise.
7883         (get_cycles_count): Likewise.
7884         (output_intermediate_file): Iterate via vector iterator.
7885         (add_line_counts): Use std::vector methods.
7886         (accumulate_line_counts): Likewise.
7887         (output_lines): Likewise.
7889 2017-10-31  Martin Liska  <mliska@suse.cz>
7891         * gcov.c (struct source_info): Remove typedef.
7892         (source_info::source_info): Add proper ctor.
7893         (accumulate_line_counts): Use struct, not it's typedef.
7894         (output_gcov_file): Likewise.
7895         (output_lines): Likewise.
7896         (main): Do not allocate an array.
7897         (output_intermediate_file): Use size of vector container.
7898         (process_file): Resize the vector.
7899         (generate_results): Do not preallocate, use newly added vector
7900         lines.
7901         (release_structures): Do not release sources.
7902         (find_source): Use vector methods.
7903         (add_line_counts): Do not use typedef.
7905 2017-10-31  Martin Liska  <mliska@suse.cz>
7907         * doc/gcov.texi: Document that.
7908         * gcov.c (add_line_counts): Mark lines with a non-executed
7909         statement.
7910         (output_line_beginning): Handle such lines.
7911         (output_lines): Pass new argument.
7912         (output_intermediate_file): Print it in intermediate format.
7914 2017-10-31  Martin Liska  <mliska@suse.cz>
7916         * color-macros.h: New file.
7917         * diagnostic-color.c: Factor out color related to macros to
7918         color-macros.h.
7919         * doc/gcov.texi: Document -k option.
7920         * gcov.c (INCLUDE_STRING): Include string.h.
7921         (print_usage): Add -k option.
7922         (process_args): Parse it.
7923         (pad_count_string): New function.
7924         (output_line_beginning): Likewise.
7925         (DEFAULT_LINE_START): New macro.
7926         (output_lines): Support color output.
7928 2017-10-31  Martin Liska  <mliska@suse.cz>
7930         PR gcov-profile/82633
7931         * doc/gcov.texi: Document -fkeep-{static,inline}-functions and
7932         their interaction with GCOV infrastructure.
7933         * configure.ac: Add -fkeep-{inline,static}-functions to
7934         coverage_flags.
7935         * configure: Regenerate.
7937 2017-10-31  Uros Bizjak  <ubizjak@gmail.com>
7939         PR target/82772
7940         * config/alpha/sync.md (fetchop_constr) <and>: Change to "rINM".
7942 2017-10-31  Segher Boessenkool  <segher@kernel.crashing.org>
7944         PR target/82674
7945         * config/rs6000/rs6000.md (allocate_stack): Force update interval
7946         into a register if it does not fit into an immediate offset field.
7948 2017-10-31  Olivier Hainque  <hainque@adacore.com>
7950         * gcc/Makefile.in (FLAGS_TO_PASS): Pass libsubdir as well.
7952 2017-10-31  Julia Koval  <julia.koval@intel.com>
7954         * config.gcc: Add gfniintrin.h.
7955         * config/i386/gfniintrin.h: New.
7956         * config/i386/i386-builtin-types.def
7957         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
7958         __builtin_ia32_vgf2p8affineinvqb_v64qi_mask,
7959         __builtin_ia32_vgf2p8affineinvqb_v32qi,
7960         __builtin_ia32_vgf2p8affineinvqb_v32qi_mask,
7961         __builtin_ia32_vgf2p8affineinvqb_v16qi,
7962         __builtin_ia32_vgf2p8affineinvqb_v16qi_mask): New builtins.
7963         * config/i386/i386-builtin.def (V64QI_FTYPE_V64QI_V64QI_INT_V64QI_UDI,
7964         V32QI_FTYPE_V32QI_V32QI_INT_V32QI_USI,
7965         V16QI_FTYPE_V16QI_V16QI_INT_V16QI_UHI,
7966         V64QI_FTYPE_V64QI_V64QI_INT): New types.
7967         * config/i386/i386.c (ix86_expand_args_builtin): Handle new types.
7968         * config/i386/immintrin.h: Include gfniintrin.h.
7969         * config/i386/sse.md (vgf2p8affineinvqb_*) New pattern.
7971 2017-10-30  Eric Botcazou  <ebotcazou@adacore.com>
7973         * gcc.c (HAVE_TARGET_EXECUTABLE_SUFFIX): Remove old kludge.
7975 2017-10-30  Wilco Dijkstra  <wdijkstr@arm.com>
7977         * config/arm/arm.md (ashldi3): Remove shift by 1 expansion.
7978         (arm_ashldi3_1bit): Remove pattern.
7979         (ashrdi3): Remove shift by 1 expansion.
7980         (arm_ashrdi3_1bit): Remove pattern.
7981         (lshrdi3): Remove shift by 1 expansion.
7982         (arm_lshrdi3_1bit): Remove pattern.
7983         * config/arm/arm.c (arm_rtx_costs_internal): Slightly increase
7984         cost of ashldi3 by 1.
7985         * config/arm/neon.md (ashldi3_neon): Remove shift by 1 expansion.
7986         (<shift>di3_neon): Likewise.
7988 2017-10-30  Dominik Infuehr  <dominik.infuehr@theobroma-systems.com>
7990         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov): Rename
7991         both identically named patterns to (*aarch64_simd_mov<VD:mode>)
7992         and (*aarch64_simd_mov<VQ:mode>).
7993         (*aarch64_simd_mov<VD:mode>): Change type attribute to match
7994         pattern alternative.
7995         (*aarch64_simd_mov<VQ:mode>): Re-order and change type
7996         attributes to match pattern alternative.
7998 2017-10-30  Steven Munroe  <munroesj@gcc.gnu.org>
8000         * config.gcc (powerpc*-*-*): Add emmintrin.h.
8001         * config/rs6000/emmintrin.h: New file.
8002         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include emmintrin.h.
8004 2017-10-30  Wilco Dijkstra  <wdijkstr@arm.com>
8006         * config/arm/vfp.md (movdi_vfp): Merge changes from movdi_vfp_cortexa8.
8007         * (movdi_vfp_cortexa8): Remove pattern.
8009 2017-10-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8011         * doc/install.texi (Specific, alpha*-*-*): Remove DEC OSF/1
8012         etc. reference.
8013         (Specific, alpha*-dec-osf5.1): Remove.
8014         (Specific, mips-sgi-irix5): Remove.
8015         (Specific, mips-sgi-irix6): Remove.
8017 2017-10-30  Jakub Jelinek  <jakub@redhat.com>
8019         PR middle-end/22141
8020         * gimple-ssa-store-merging.c (merged_store_group::apply_stores): Fix
8021         arguments to clear_bit_region_be.
8023 2017-10-30  Jim Wilson  <wilson@tuliptree.org>
8025         * gimplify.c: Include memmodel.h.
8027 2017-10-30  Martin Jambor  <mjambor@suse.cz>
8029         * omp-grid.c (grid_attempt_target_gridification): Also insert a
8030         condition whether loop should be executed at all.
8032 2017-10-30  Will Schmidt  <will_schmidt@vnet.ibm.com>
8034         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
8035         gimple folding of vec_madd() intrinsics.
8036         * config/rs6000/altivec.md (mulv8hi3): Rename altivec_vmladduhm to
8037         fmav8hi4.  (altivec_vmladduhm): Rename to fmav8hi4.
8038         * config/rs6000/rs6000-builtin.def: Rename vmladduhm to fmav8hi4
8040 2017-10-30  Richard Biener  <rguenther@suse.de>
8042         PR tree-optimization/82762
8043         Revert
8044         2017-10-23  Richard Biener  <rguenther@suse.de>
8046         PR tree-optimization/82129
8047         Revert
8048         2017-08-01  Richard Biener  <rguenther@suse.de>
8050         PR tree-optimization/81181
8051         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
8052         (compute_antic): ... end of iteration here.
8054 2017-10-30  Joseph Myers  <joseph@codesourcery.com>
8056         * doc/invoke.texi (C Dialect Options): Document -std=c17,
8057         -std=iso9899:2017 and -std=gnu17.
8058         * doc/standards.texi (C Language): Document C17 support.
8059         * doc/cpp.texi (Overview): Mention -std=c17.
8060         (Standard Predefined Macros): Document C11 and C17 values of
8061         __STDC_VERSION__.  Do not refer to C99 support as incomplete.
8062         * doc/extend.texi (Inline): Do not list individual options for
8063         standards newer than C99.
8064         * dwarf2out.c (highest_c_language, gen_compile_unit_die): Handle
8065         "GNU C17".
8066         * config/rl78/rl78.c (rl78_option_override): Handle "GNU C17"
8067         language name.
8069 2017-10-30  Maxim Ostapenko  <m.ostapenko@samsung.com>
8071         * asan.c (asan_finish_file): Align asan globals array by shadow
8072         granularity.
8074 2017-10-30  Jakub Jelinek  <jakub@redhat.com>
8076         PR middle-end/22141
8077         * gimple-ssa-store-merging.c: Include rtl.h and expr.h.
8078         (struct store_immediate_info): Add bitregion_start and bitregion_end
8079         fields.
8080         (store_immediate_info::store_immediate_info): Add brs and bre
8081         arguments and initialize bitregion_{start,end} from those.
8082         (struct merged_store_group): Add bitregion_start, bitregion_end,
8083         align_base and mask fields.  Drop unnecessary struct keyword from
8084         struct store_immediate_info.  Add do_merge method.
8085         (clear_bit_region_be): Use memset instead of loop storing zeros.
8086         (merged_store_group::do_merge): New method.
8087         (merged_store_group::merge_into): Use do_merge.  Allow gaps in between
8088         stores as long as the surrounding bitregions have no gaps.
8089         (merged_store_group::merge_overlapping): Use do_merge.
8090         (merged_store_group::apply_stores): Test that bitregion_{start,end}
8091         is byte aligned, rather than requiring that start and width are
8092         byte aligned.  Drop unnecessary struct keyword from
8093         struct store_immediate_info.  Allocate and populate also mask array.
8094         Make start of the arrays relative to bitregion_start rather than
8095         start and size them according to bitregion_{end,start} difference.
8096         (struct imm_store_chain_info): Drop unnecessary struct keyword from
8097         struct store_immediate_info.
8098         (pass_store_merging::gate): Punt if BITS_PER_UNIT or CHAR_BIT is not 8.
8099         (pass_store_merging::terminate_all_aliasing_chains): Drop unnecessary
8100         struct keyword from struct store_immediate_info.
8101         (imm_store_chain_info::coalesce_immediate_stores): Allow gaps in
8102         between stores as long as the surrounding bitregions have no gaps.
8103         Formatting fixes.
8104         (struct split_store): Add orig non-static data member.
8105         (split_store::split_store): Initialize orig to false.
8106         (find_constituent_stmts): Return store_immediate_info *, non-NULL
8107         if there is exactly a single original stmt.  Change stmts argument
8108         to pointer from reference, if NULL, don't push anything to it.  Add
8109         first argument, use it to optimize skipping over orig stmts that
8110         are known to be before bitpos already.  Simplify.
8111         (split_group): Return unsigned int count how many stores are or
8112         would be needed rather than a bool.  Add allow_unaligned argument.
8113         Change split_stores argument from reference to pointer, if NULL,
8114         only do a dry run computing how many stores would be produced.
8115         Rewritten algorithm to use both alignment and misalign if
8116         !allow_unaligned and handle bitfield stores with gaps.
8117         (imm_store_chain_info::output_merged_store): Set start_byte_pos
8118         from bitregion_start instead of start.  Compute allow_unaligned
8119         here, if true, do 2 split_group dry runs to compute which one
8120         produces fewer stores and prefer aligned if equal.  Punt if
8121         new count is bigger or equal than original before emitting any
8122         statements, rather than during that.  Remove no longer needed
8123         new_ssa_names tracking.  Replace num_stmts with
8124         split_stores.length ().  Use 32-bit stack allocated entries
8125         in split_stores auto_vec.  Try to reuse original store lhs/rhs1
8126         if possible.  Handle bitfields with gaps.
8127         (pass_store_merging::execute): Ignore bitsize == 0 stores.
8128         Compute bitregion_{start,end} for the stores and construct
8129         store_immediate_info with that.  Formatting fixes.
8131 2017-10-30  Uros Bizjak  <ubizjak@gmail.com>
8133         PR target/82725
8134         * config/i386/i386.c (legitimate_pic_address_disp_p): Allow
8135         UNSPEC_DTPOFF and UNSPEC_NTPOFF with SImode immediate offset.
8137 2017-10-29  Jim Wilson  <wilson@tuliptree.org>
8139         * gimplify.c: Include tm_p.h.
8141         * common.opt (gcoff): Re-add as ignored option.
8142         (gcoff1, gcoff2, gcoff3): Likewise.
8144         * Makefile.in (OBJS): Delete sdbout.o.
8145         (GTFILES): Delete $(srcdir)/sdbout.c.
8146         * debug.h: Delete sdb_debug_hooks.
8147         * final.c: Delete sdbout.h include.
8148         (final_scan_insn): Delete SDB_DEBUG check.
8149         (rest_of_clean_state): Likewise.
8150         * output.h: Delete sdb_begin_function_line.
8151         * sdbout.c: Delete.
8152         * sdbout.h: Delete.
8153         * toplev.c: Delete sdbout.h include.
8154         (process_options): Delete SDB_DEBUG check.
8155         * tree-core.h (tree_type_common): Delete pointer field of
8156         tree_type_symtab.
8157         * tree.c (copy_node): Clear TYPE_SYMTAB_DIE instead of
8158         TYPE_SYMTAB_POINTER.
8159         * tree.h (TYPE_SYMTAB_POINTER): Delete.
8160         (TYPE_SYMTAB_IS_POINTER): Delete.
8161         (TYPE_SYMTAB_IS_DIE): Renumber.
8162         * xcoffout.c: Refer to former sdbout.c file.
8163         (xcoffout_begin_prologue): Use past tense for sdbout.c reference.
8165         * doc/install.texi (--with-stabs): Delete COFF and ECOFF info.
8166         * doc/invoke.texi (SEEALSO): Delete adb and sdb references.
8167         (Debugging Options): Delete -gcoff.
8168         (-gstabs): Delete SDB reference.
8169         (-gcoff): Delete.
8170         (-gcoff@var{level}): Delete.
8171         * doc/passes.texi (Debugging information output): Delete SDB and
8172         sdbout.c references.
8173         * doc/tm.texi: Regenerate.
8174         * doc/tm.texi.in (DWARF_CIE_DATA_ALIGNMENT): Delete SDB from xref.
8175         (SDB and DWARF): Change node name to DWARF and delete SDB and COFF
8176         references.
8177         (DEBUGGER_AUTO_OFFSET): Delete COFF and SDB references.
8178         (PREFERRED_DEBUGGING_TYPE): Delete SDB_DEBUG and -gcoff references.
8179         (SDB_DEBUGGING_INFO): Delete.
8180         (PUT_SDB_@dots{}, SDB_DELIM, SDB_ALLOW_UNKNOWN_REFERENCES)
8181         SDB_ALLOW_FORWARD_REFERENCES, SDB_OUTPUT_SOURCE_LINE): Delete.
8182         * target.def (output_source_filename): Delete COFF reference.
8184         * common.opt (gcoff): Delete.
8185         (gxcoff+): Update Negative chain.
8186         * defaults.h: Delete all references to SDB_DEBUGGING_INFO and
8187         SDB_DEBUG.
8188         * dwarf2out.c (gen_array_type_die): Change SDB to debuggers.
8189         * flag-types.h (enum debug_info_type): Delete SDB_DEBUG.
8190         * function.c (number_blocks): Delete SDB_DEBUGGING_INFO, SDB_DEBUG,
8191         and SDB references.
8192         (expand_function_start): Change sdb reference to past tense.
8193         (expand_function_end): Change sdb reference to past tense.
8194         * gcc.c (cpp_unique_options): Delete gcoff3 reference.
8195         * opts.c (debug_type_names): Delete coff entry.
8196         (common_handle_option): Delete OPT_gcoff case.
8197         * system.h (SDB_DEBUG, SDB_DEBUGGING_INFO): Poison.
8199         * config/dbxcoff.h (PREFERRED_DEBUGGING_TYPE): Set to DBX_DEBUG.
8200         * config/cris/cris.h: Delete SDB reference in comment.
8201         * config/i386/cygming.h: Don't define SDB_DEBUGGING_INFO.
8202         (ASM_DECLARE_FUNCTION_NAME): Delete SDB reference from comment.
8203         * config/i386/gas.h: Don't define SDB_DEBUGGING_INFO.
8204         * config/i386/i386.c (svr4_dbx_register_map): Change SDB references
8205         to past tense.
8206         (ix86_expand_prologue): Likewise.
8207         * config/i386/winnt.c (i386_pe_start_function): Don't check SDB_DEBUG.
8208         * config/ia64/ia64.h: Likewise.
8209         * config/m68k/m68kelf.h (DBX_REGISTER_NUMBER): Delete SDB reference.
8210         * config/mips/mips.h (SUBTARGET_ASM_DEBUGGING_SPEC): Delete gcoff*
8211         support.
8212         * config/mmix/mmix.h: Likewise.
8213         * config/nds32/nds32.c: Likewise.
8214         * config/stormy/storym16.h: Likewise.
8215         * config/visium/visium.h: Likewise.
8216         * config/vx-common.h (SDB_DEBUGGING_INFO): Delete undef.
8218 2017-10-28  Sandra Loosemore  <sandra@codesourcery.com>
8220         * config/nios2/nios2.h (FRAME_GROWS_DOWNWARD): Define to 1.
8221         * config/nios2/nios2.c (nios2_initial_elimination_offset):  Make
8222         FRAME_POINTER_REGNUM point at high end of local var area.
8224 2017-10-27  Eric Botcazou  <ebotcazou@adacore.com>
8226         * bb-reorder.c (find_traces_1_round): Fix off-by-one index.
8227         Move comment around.  Do not reset best_edge for a copiable
8228         destination if the copy would cause a partition change.
8229         (better_edge_p): Remove redundant check.
8231 2017-10-27  Uros Bizjak  <ubizjak@gmail.com>
8233         * config/i386/i386-protos.h (ix86_fp_compare_mode): Remove prototype.
8235 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
8237         * builtins.c (CASE_MATHFN_FLOATN): New helper macro to add cases
8238         for math functions that have _Float<N> and _Float<N>X variants.
8239         (mathfn_built_in_2): Add support for math functions that have
8240         _Float<N> and _Float<N>X variants.
8241         (DEF_INTERNAL_FLT_FLOATN_FN): New helper macro.
8242         (expand_builtin_mathfn_ternary): Add support for fma with
8243         _Float<N> and _Float<N>X variants.
8244         (expand_builtin): Likewise.
8245         (fold_builtin_3): Likewise.
8246         * builtins.def (DEF_EXT_LIB_FLOATN_NX_BUILTINS): New macro to
8247         create math function _Float<N> and _Float<N>X variants as external
8248         library builtins.
8249         (BUILT_IN_COPYSIGN _Float<N> and _Float<N>X variants) Use
8250         DEF_EXT_LIB_FLOATN_NX_BUILTINS to make built-in functions using
8251         the __builtin_ prefix and if not strict ansi, without the prefix.
8252         (BUILT_IN_FABS _Float<N> and _Float<N>X variants): Likewise.
8253         (BUILT_IN_FMA _Float<N> and _Float<N>X variants): Likewise.
8254         (BUILT_IN_FMAX _Float<N> and _Float<N>X variants): Likewise.
8255         (BUILT_IN_FMIN _Float<N> and _Float<N>X variants): Likewise.
8256         (BUILT_IN_NAN _Float<N> and _Float<N>X variants): Likewise.
8257         (BUILT_IN_SQRT _Float<N> and _Float<N>X variants): Likewise.
8258         * builtin-types.def (BT_FN_FLOAT16_FLOAT16_FLOAT16_FLOAT16): New
8259         function signatures for fma _Float<N> and _Float<N>X variants.
8260         (BT_FN_FLOAT32_FLOAT32_FLOAT32_FLOAT32): Likewise.
8261         (BT_FN_FLOAT64_FLOAT64_FLOAT64_FLOAT64): Likewise.
8262         (BT_FN_FLOAT128_FLOAT128_FLOAT128_FLOAT128): Likewise.
8263         (BT_FN_FLOAT32X_FLOAT32X_FLOAT32X_FLOAT32X): Likewise.
8264         (BT_FN_FLOAT64X_FLOAT64X_FLOAT64X_FLOAT64X): Likewise.
8265         (BT_FN_FLOAT128X_FLOAT128X_FLOAT128X_FLOAT128X): Likewise.
8266         * gencfn-macros.c (print_case_cfn): Add support for math functions
8267         that have _Float<N> and _Float<N>X variants.
8268         (print_define_operator_list): Likewise.
8269         (fltfn_suffixes): Likewise.
8270         (main): Likewise.
8271         * internal-fn.def (DEF_INTERNAL_FLT_FLOATN_FN): New helper macro
8272         for math functions that have _Float<N> and _Float<N>X variants.
8273         (SQRT): Add support for sqrt, copysign, fmin and fmax _Float<N>
8274         and _Float<N>X variants.
8275         (COPYSIGN): Likewise.
8276         (FMIN): Likewise.
8277         (FMAX): Likewise.
8278         * fold-const.c (tree_call_nonnegative_warnv_p): Add support for
8279         copysign, fma, fmax, fmin, and sqrt _Float<N> and _Float<N>X
8280         variants.
8281         (integer_valued_read_call_p): Likewise.
8282         * fold-const-call.c (fold_const_call_ss): Likewise.
8283         (fold_const_call_sss): Add support for copysign, fmin, and fmax
8284         _Float<N> and _Float<N>X variants.
8285         (fold_const_call_ssss): Add support for fma _Float<N> and
8286         _Float<N>X variants.
8287         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Add
8288         support for copysign and fma _Float<N> and _Float<N>X variants.
8289         (backprop::process_builtin_call_use): Likewise.
8290         * tree-call-cdce.c (can_test_argument_range); Add support for
8291         sqrt _Float<N> and _Float<N>X variants.
8292         (edom_only_function): Likewise.
8293         (get_no_error_domain): Likewise.
8294         * tree-ssa-math-opts.c (internal_fn_reciprocal): Likewise.
8295         * tree-ssa-reassoc.c (attempt_builtin_copysign): Add support for
8296         copysign _Float<N> and _Float<N>X variants.
8297         * config/rs6000/rs6000-builtin.def (SQRTF128): Delete, this is now
8298         handled by machine independent code.
8299         (FMAF128): Likewise.
8300         * doc/cpp.texi (Common Predefined Macros): Document defining
8301         __FP_FAST_FMAF<N> and __FP_FAST_FMAF<N>X if the backend supports
8302         fma _Float<N> and _Float<N>X variants.
8304 2017-10-27  Uros Bizjak  <ubizjak@gmail.com>
8306         PR target/82692
8307         * config/i386/i386-modes.def (CCFPU): Remove definition.
8308         * config/i386/i386.c (put_condition_mode): Remove CCFPU mode handling.
8309         (ix86_cc_modes_compatible): Ditto.
8310         (ix86_expand_carry_flag_compare): Ditto.
8311         (ix86_expand_int_movcc): Ditto.
8312         (ix86_expand_int_addcc): Ditto.
8313         (ix86_reverse_condition): Ditto.
8314         (ix86_unordered_fp_compare): Rename from ix86_fp_compare_mode.
8315         Return true/false for unordered/ordered fp comparisons.
8316         (ix86_cc_mode): Always return CCFPmode for float mode comparisons.
8317         (ix86_prepare_fp_compare_args): Update for rename.
8318         (ix86_expand_fp_compare): Update for rename.  Generate unordered
8319         compare RTXes wrapped with UNSPEC_NOTRAP unspec.
8320         (ix86_expand_sse_compare_and_jump): Ditto.
8321         * config/i386/predicates.md (fcmov_comparison_operator):
8322         Remove CCFPU mode handling.
8323         (ix86_comparison_operator): Ditto.
8324         (ix86_carry_flag_operator): Ditto.
8325         * config/i386/i386.md (UNSPEC_NOTRAP): New unspec.
8326         (*cmpu<mode>_i387): Wrap compare RTX with UNSPEC_NOTRAP unspec.
8327         (*cmpu<mode>_cc_i387): Ditto.
8328         (FPCMP): Remove mode iterator.
8329         (unord): Remove mode attribute.
8330         (unord_subst): New define_subst transformation
8331         (unord): New define_subst attribute.
8332         (unordered): Ditto.
8333         (*cmpi<unord><MODEF:mode>): Rewrite using unord_subst transformation.
8334         (*cmpi<unord>xf_i387): Ditto.
8335         * config/i386/sse.md (<sse>_<unord>comi<round_saeonly_name>): Merge
8336         from <sse>_comi<round_saeonly_name> and <sse>_ucomi<round_saeonly_name>
8337         using unord_subst transformation.
8338         * config/i386/subst.md (SUBST_A): Remove CCFP and CCFPU modes.
8339         (round_saeonly): Also handle CCFP mode.
8340         * reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_NOTRAP unspec.
8341         Remove UNSPEC_SAHF unspec handling.
8343 2017-10-27  Jan Hubicka  <hubicka@ucw.cz>
8345         * x86-tune.def (X86_TUNE_INTER_UNIT_MOVES_TO_VEC): Disable for Zen.
8347 2017-10-27  Jeff Law  <law@redhat.com>
8349         * gimple-ssa-sprintf.c: Include domwalk.h.
8350         (class sprintf_dom_walker): New class, derived from dom_walker.
8351         (sprintf_dom_walker::before_dom_children): New function.
8352         (struct call_info): Moved into sprintf_dom_walker class
8353         (compute_formath_length, handle_gimple_call): Likewise.
8354         (sprintf_length::execute): Call the dominator walker rather
8355         than walking the statements.
8357         * tree-vrp.c (check_all_array_refs): Do not use wi->info to smuggle
8358         gimple statement locations.
8359         (check_array_bounds): Corresponding changes.  Get the statement's
8360         location directly from wi->stmt.
8362 2017-10-27  Palmer Dabbelt  <palmer@dabbelt.com>
8364         PR target/82717
8365         * doc/invoke.texi (RISC-V) <-mabi>: Correct and improve.
8367 2017-10-27  Jan Hubicka  <hubicka@ucw.cz>
8369         * config/i386/x86-tune.def (X86_TUNE_PARTIAL_REG_DEPENDENCY,
8370         X86_TUNE_MOVX): Disable for Haswell and newer CPUs.
8372 2017-10-27  Jakub Jelinek  <jakub@redhat.com>
8374         PR target/82703
8375         * config/i386/i386-protos.h (maybe_get_pool_constant): Removed.
8376         * config/i386/i386.c (maybe_get_pool_constant): Removed.
8377         (ix86_split_to_parts): Use avoid_constant_pool_reference instead of
8378         maybe_get_pool_constant.
8379         * config/i386/predicates.md (zero_extended_scalar_load_operand):
8380         Likewise.
8382 2017-10-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8384         * doc/install.texi (Specific, i?86-*-solaris2.10): Simplify gas
8385         2.26 caveat.  Update gas and gld versions.
8386         (Specific, *-*-solaris2*): Update binutils version.  Remove caveat
8387         reference.
8389 2017-10-27  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8391         * cgraph.h (set_malloc_flag): Declare.
8392         * cgraph.c (set_malloc_flag_1): New function.
8393         (set_malloc_flag): Likewise.
8394         * ipa-fnsummary.h (ipa_call_summary): Add new field is_return_callee.
8395         * ipa-fnsummary.c (ipa_call_summary::reset): Set is_return_callee to
8396         false.
8397         (read_ipa_call_summary): Add support for reading is_return_callee.
8398         (write_ipa_call_summary): Stream is_return_callee.
8399         * ipa-inline.c (ipa_inline): Remove call to ipa_free_fn_summary.
8400         * ipa-pure-const.c: Add headers ssa.h, alloc-pool.h, symbol-summary.h,
8401         ipa-prop.h, ipa-fnsummary.h.
8402         (pure_const_names): Change to static.
8403         (malloc_state_e): Define.
8404         (malloc_state_names): Define.
8405         (funct_state_d): Add field malloc_state.
8406         (varying_state): Set malloc_state to STATE_MALLOC_BOTTOM.
8407         (check_retval_uses): New function.
8408         (malloc_candidate_p): Likewise.
8409         (analyze_function): Add support for malloc attribute.
8410         (pure_const_write_summary): Stream malloc_state.
8411         (pure_const_read_summary): Add support for reading malloc_state.
8412         (dump_malloc_lattice): New function.
8413         (propagate_malloc): New function.
8414         (warn_function_malloc): New function.
8415         (ipa_pure_const::execute): Call propagate_malloc and
8416         ipa_free_fn_summary.
8417         (pass_local_pure_const::execute): Add support for malloc attribute.
8418         * ssa-iterators.h (RETURN_FROM_IMM_USE_STMT): New macro.
8419         * doc/invoke.texi: Document Wsuggest-attribute=malloc.
8421 2017-10-27  Martin Liska  <mliska@suse.cz>
8423         PR gcov-profile/82457
8424         * doc/invoke.texi: Document that one needs a non-strict ISO mode
8425         for fork-like functions to be properly instrumented.
8427 2017-10-27  Richard Biener  <rguenther@suse.de>
8429         PR middle-end/81659
8430         * tree-eh.c (pass_lower_eh_dispatch::execute): Free dominator
8431         info when we redirected EH.
8433 2017-10-26  Michael Collison  <michael.collison@arm.com>
8435         * config/aarch64/aarch64.md(<optab>_trunc><vf><GPI:mode>2):
8436         New pattern.
8437         (<optab>_trunchf<GPI:mode>2: New pattern.
8438         (<optab>_trunc<vgp><GPI:mode>2: New pattern.
8439         * config/aarch64/iterators.md (wv): New mode attribute.
8440         (vf, VF): New mode attributes.
8441         (vgp, VGP): New mode attributes.
8442         (s): Update attribute with SImode and DImode prefixes.
8444 2017-10-26  Sandra Loosemore  <sandra@codesourcery.com>
8446         * config/nios2/constraints.md ("S"): Match r0rel_constant_p too.
8447         * config/nios2/nios2-protos.h (r0rel_constant_p): Declare.
8448         * config/nios2/nios2.c: (nios2_r0rel_sec_regex): New.
8449         (nios2_option_overide): Initialize it.  Don't allow R0-relative
8450         addressing with PIC.
8451         (nios2_rtx_costs): Handle r0rel_constant_p like gprel_constant_p.
8452         (nios2_symbolic_constant_p): Likewise.
8453         (nios2_legitimate_address_p): Likewise.
8454         (nios2_r0rel_section_name_p): New.
8455         (nios2_symbol_ref_in_r0rel_data_p): New.
8456         (nios2_emit_move_sequence): Handle r0rel_constant_p.
8457         (r0rel_constant_p): New.
8458         (nios2_print_operand_address): Handle r0rel_constant_p.
8459         (nios2_cdx_narrow_form_p): Likewise.
8460         * config/nios2/nios2.opt (mr0rel-sec=): New option.
8461         * doc/invoke.texi (Option Summary): Add -mr0rel-sec.
8462         (Nios II Options): Document -mr0rel-sec.
8464 2017-10-26  Sandra Loosemore  <sandra@codesourcery.com>
8466         * config/nios2/nios2.c: Include xregex.h.
8467         (nios2_gprel_sec_regex): New.
8468         (nios2_option_overide): Initialize it.  Don't allow GP-relative
8469         addressing with PIC.
8470         (nios2_small_section_name_p): Check for regex match.
8471         * config/nios2/nios2.opt (mgprel-sec=): New option.
8472         * doc/invoke.texi (Option Summary): Add -mgprel-sec.
8473         (Nios II Options): Document -mgprel-sec.
8475 2017-10-26  Jim Wilson  <wilson@tuliptree.org>
8477         * doc/invoke.texi (-fdebug-prefix-map): Expand documentation.
8479 2017-10-26  Tom de Vries  <tom@codesourcery.com>
8481         PR tree-optimization/82707
8482         * gimple.c (gimple_copy): Fix unsharing of
8483         GIMPLE_OMP_{SINGLE,TARGET,TEAMS}.
8485 2017-10-26  Olga Makhotina  <olga.makhotina@intel.com>
8487         * config/i386/avx512fintrin.h (_mm512_cmpeq_pd_mask,
8488         _mm512_cmple_pd_mask, _mm512_cmplt_pd_mask,
8489         _mm512_cmpneq_pd_mask, _mm512_cmpnle_pd_mask,
8490         _mm512_cmpnlt_pd_mask, _mm512_cmpord_pd_mask,
8491         _mm512_cmpunord_pd_mask, _mm512_mask_cmpeq_pd_mask,
8492         _mm512_mask_cmple_pd_mask, _mm512_mask_cmplt_pd_mask,
8493         _mm512_mask_cmpneq_pd_mask, _mm512_mask_cmpnle_pd_mask,
8494         _mm512_mask_cmpnlt_pd_mask, _mm512_mask_cmpord_pd_mask,
8495         _mm512_mask_cmpunord_pd_mask, _mm512_cmpeq_ps_mask,
8496         _mm512_cmple_ps_mask, _mm512_cmplt_ps_mask,
8497         _mm512_cmpneq_ps_mask, _mm512_cmpnle_ps_mask,
8498         _mm512_cmpnlt_ps_mask, _mm512_cmpord_ps_mask,
8499         _mm512_cmpunord_ps_mask, _mm512_mask_cmpeq_ps_mask,
8500         _mm512_mask_cmple_ps_mask, _mm512_mask_cmplt_ps_mask,
8501         _mm512_mask_cmpneq_ps_mask, _mm512_mask_cmpnle_ps_mask,
8502         _mm512_mask_cmpnlt_ps_mask, _mm512_mask_cmpord_ps_mask,
8503         _mm512_mask_cmpunord_ps_mask): New intrinsics.
8505 2017-10-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
8507         * config/rs6000/aix.h (TARGET_IEEEQUAD_DEFAULT): Set long double
8508         default to IBM.
8509         * config/rs6000/darwin.h (TARGET_IEEEQUAD_DEFAULT): Likewise.
8510         * config/rs6000/rs6000.opt (-mabi=ieeelongdouble): Move the
8511         warning to rs6000.c.  Remove the Undocumented flag, since it has
8512         been documented.
8513         (-mabi=ibmlongdouble): Likewise.
8514         * config/rs6000/rs6000.c (TARGET_IEEEQUAD_DEFAULT): If it is not
8515         already set, set the default format for long double.
8516         (rs6000_debug_reg_global): Print whether long double is IBM or
8517         IEEE.
8518         (rs6000_option_override_internal): Rework setting long double
8519         format.  Only warn if the user is changing the long double default
8520         and they did not use -Wno-psabi.
8521         * doc/invoke.texi (PowerPC options): Update the documentation for
8522         -mabi=ieeelongdouble and -mabi=ibmlongdouble.
8524 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
8525             Alan Hayward  <alan.hayward@arm.com>
8526             David Sherwood  <david.sherwood@arm.com>
8528         * rtl.h (wider_subreg_mode): New function.
8529         * ira.h (ira_sort_regnos_for_alter_reg): Take a machine_mode *
8530         rather than an unsigned int *.
8531         * ira-color.c (regno_max_ref_width): Replace with...
8532         (regno_max_ref_mode): ...this new variable.
8533         (coalesced_pseudo_reg_slot_compare): Update accordingly.
8534         Use wider_subreg_mode.
8535         (ira_sort_regnos_for_alter_reg): Likewise.  Take a machine_mode *
8536         rather than an unsigned int *.
8537         * lra-constraints.c (uses_hard_regs_p): Use wider_subreg_mode.
8538         (process_alt_operands): Likewise.
8539         (invariant_p): Likewise.
8540         * lra-spills.c (assign_mem_slot): Likewise.
8541         (add_pseudo_to_slot): Likewise.
8542         * lra.c (collect_non_operand_hard_regs): Likewise.
8543         (add_regs_to_insn_regno_info): Likewise.
8544         * reload1.c (regno_max_ref_width): Replace with...
8545         (regno_max_ref_mode): ...this new variable.
8546         (reload): Update accordingly.  Update call to
8547         ira_sort_regnos_for_alter_reg.
8548         (alter_reg): Update to use regno_max_ref_mode.  Call wider_subreg_mode.
8549         (init_eliminable_invariants): Update to use regno_max_ref_mode.
8550         (scan_paradoxical_subregs): Likewise.
8552 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
8554         * config/aarch64/aarch64.h (EXIT_IGNORE_STACK): Set if alloca is used.
8555         (aarch64_frame): Add emit_frame_chain boolean.
8556         * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
8557         Move eh_return case to aarch64_layout_frame.
8558         (aarch64_layout_frame): Initialize emit_frame_chain.
8559         (aarch64_expand_prologue): Use emit_frame_chain.
8561 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
8563         * config/aarch64/aarch64.c (aarch64_layout_frame):
8564         Ensure LR is always stored at the bottom of the callee-saves.
8565         Remove rarely used frame layout which saves callee-saves at top of
8566         frame, so the store of LR can be used as a valid probe in all cases.
8568 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
8570         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
8571         Improve unaligned TImode/TFmode base/offset split.
8573 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
8574             Alan Hayward  <alan.hayward@arm.com>
8575             David Sherwood  <david.sherwood@arm.com>
8577         * caller-save.c (mark_referenced_regs):  Use read_modify_subreg_p.
8578         * combine.c (find_single_use_1): Likewise.
8579         (expand_field_assignment): Likewise.
8580         (move_deaths): Likewise.
8581         * lra-constraints.c (simplify_operand_subreg): Likewise.
8582         (curr_insn_transform): Likewise.
8583         * lra.c (collect_non_operand_hard_regs): Likewise.
8584         (add_regs_to_insn_regno_info): Likewise.
8585         * rtlanal.c (reg_referenced_p): Likewise.
8586         (covers_regno_no_parallel_p): Likewise.
8588 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
8590         * wide-int-print.cc (print_hex): Loop based on extract_uhwi.
8591         Don't print any bits outside the precision of the value.
8592         * wide-int.cc (test_printing): Add some new tests.
8594 2017-10-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8596         * configure.ac (gcc_cv_as_ix86_xbrace_comment): Check if assembler
8597         supports -xbrace_comment option.
8598         * configure: Regenerate.
8599         * config.in: Regenerate.
8600         * config/i386/sol2.h (ASM_XBRACE_COMMENT_SPEC): Define.
8601         (ASM_CPU_SPEC): Use it.
8603 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
8605         * target.def (static_rtx_alignment): New hook.
8606         * targhooks.h (default_static_rtx_alignment): Declare.
8607         * targhooks.c (default_static_rtx_alignment): New function.
8608         * doc/tm.texi.in (TARGET_STATIC_RTX_ALIGNMENT): New hook.
8609         * doc/tm.texi: Regenerate.
8610         * varasm.c (force_const_mem): Use targetm.static_rtx_alignment
8611         instead of targetm.constant_alignment.  Remove call to
8612         set_mem_attributes.
8613         * config/cris/cris.c (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
8614         (cris_preferred_mininum_alignment): New function, split out from...
8615         (cris_constant_alignment): ...here.
8616         (cris_static_rtx_alignment): New function.
8617         * config/i386/i386.c (ix86_static_rtx_alignment): New function,
8618         split out from...
8619         (ix86_constant_alignment): ...here.
8620         (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
8621         * config/mmix/mmix.c (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
8622         (mmix_static_rtx_alignment): New function.
8623         * config/spu/spu.c (spu_static_rtx_alignment): New function.
8624         (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
8626 2017-10-26  Tamar Christina  <tamar.christina@arm.com>
8628         PR target/81800
8629         * config/aarch64/aarch64.md (lrint<GPF:mode><GPI:mode>2):
8630         Add flag_trapping_math and flag_fp_int_builtin_inexact.
8632 2017-10-25  Palmer Dabbelt  <palmer@dabbelt.com>
8634         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Define.
8635         * config/riscv/pic.md (local_pic_load): Rename to local_pic_load_s,
8636         mark as a sign-extending load.
8637         (local_pic_load_u): Define.
8639 2017-10-25  Eric Botcazou  <ebotcazou@adacore.com>
8641         PR middle-end/82062
8642         * fold-const.c (operand_equal_for_comparison_p): Also return true
8643         if ARG0 is a simple variant of ARG1 with narrower precision.
8644         (fold_ternary_loc): Always pass unstripped operands to the predicate.
8646 2017-10-25  Jan Hubicka  <hubicka@ucw.cz>
8648         * i386.c (ix86_builtin_vectorization_cost): Compute scatter/gather
8649         cost correctly.
8650         * i386.h (processor_costs): Add gather_static, gather_per_elt,
8651         scatter_static, scatter_per_elt.
8652         * x86-tune-costs.h: Add new cost entries.
8654 2017-10-25  Richard Biener  <rguenther@suse.de>
8656         * tree-ssa-sccvn.h (vn_eliminate): Declare.
8657         * tree-ssa-pre.c (class eliminate_dom_walker, eliminate,
8658         class pass_fre): Move to ...
8659         * tree-ssa-sccvn.c (class eliminate_dom_walker, vn_eliminate,
8660         class pass_fre): ... here and adjust for statistics.
8662 2017-10-25  Jakub Jelinek  <jakub@redhat.com>
8664         PR libstdc++/81706
8665         * attribs.c (attribute_value_equal): Use omp_declare_simd_clauses_equal
8666         for comparison of OMP_CLAUSEs regardless of flag_openmp{,_simd}.
8667         (duplicate_one_attribute, copy_attributes_to_builtin): New functions.
8668         * attribs.h (duplicate_one_attribute, copy_attributes_to_builtin): New
8669         declarations.
8671 2017-10-25  Richard Biener  <rguenther@suse.de>
8673         * tree-ssa-pre.c (need_eh_cleanup, need_ab_cleanup, el_to_remove,
8674         el_to_fixup, el_todo, el_avail, el_avail_stack, eliminate_avail,
8675         eliminate_push_avail, eliminate_insert): Move inside...
8676         (class eliminate_dom_walker): ... this class in preparation
8677         of move.
8678         (fini_eliminate): Remove by merging with ...
8679         (eliminate): ... this function.  Adjust for class changes.
8680         (pass_pre::execute): Remove fini_eliminate call.
8681         (pass_fre::execute): Likewise.
8683 2017-10-24  Jakub Jelinek  <jakub@redhat.com>
8685         PR target/82460
8686         * config/i386/sse.md (UNSPEC_VPERMI2, UNSPEC_VPERMI2_MASK): Remove.
8687         (VPERMI2, VPERMI2I): New mode iterators.
8688         (<avx512>_vpermi2var<mode>3_maskz): Remove 3 define_expand patterns.
8689         (<avx512>_vpermi2var<mode>3<sd_maskz_name>): Remove 3 define_insn
8690         patterns.
8691         (<avx512>_vpermi2var<mode>3_mask): New define_expand using VPERMI2
8692         mode iterator.  Remove 3 old define_insn patterns.
8693         (*<avx512>_vpermi2var<mode>3_mask): 2 new define_insn patterns.
8694         (<avx512>_vpermt2var<mode>3_maskz): Adjust 1 define_expand to use
8695         VPERMI2 mode iterator, remove the other two expanders.
8696         (<avx512>_vpermt2var<mode>3<sd_maskz_name>): Adjust 1 define_insn
8697         to use VPERMI2 mode iterator, add another alternative for vpermi2*
8698         instructions, remove the other two patterns.
8699         (<avx512>_vpermt2var<mode>3_mask): Adjust 1 define_insn to use VPERMI2
8700         mode iterator, remove the other two patterns.
8701         * config/i386/i386.c (ix86_expand_vec_perm_vpermi2): Renamed to ...
8702         (ix86_expand_vec_perm_vpermt2): ... this.  Swap mask and op0
8703         arguments, use gen_*vpermt2* expanders instead of gen_*vpermi2*
8704         and adjust argument order accordingly.
8705         (ix86_expand_vec_perm): Adjust caller.
8706         (expand_vec_perm_1): Likewise.
8707         (expand_vec_perm_vpermi2_vpshub2): Rename to ...
8708         (expand_vec_perm_vpermt2_vpshub2): ... this.
8709         (ix86_expand_vec_perm_const_1): Adjust caller.
8710         (ix86_vectorize_vec_perm_const_ok): Adjust comments.
8712         PR target/82370
8713         * config/i386/sse.md (VIMAX_AVX2): Remove V4TImode.
8714         (VIMAX_AVX2_AVX512BW, VIMAX_AVX512VL): New mode iterators.
8715         (vec_shl_<mode>): Remove unused expander.
8716         (avx512bw_<shift_insn><mode>3): New define_insn.
8717         (<sse2_avx2>_ashl<mode>3, <sse2_avx2>_lshr<mode>3): Replaced by ...
8718         (<sse2_avx2>_<shift_insn><mode>3): ... this.  New define_insn.
8720 2017-10-24  Paolo Carlini  <paolo.carlini@oracle.com>
8722         PR c++/82466
8723         * doc/invoke.texi ([Wbuiltin-declaration-mismatch]): Extend
8724         description.
8726 2017-10-24  Wilco Dijkstra  <wdijkstr@arm.com>
8728         PR rtl-optimization/82396
8729         * gcc/haifa-sched.c (ready_sort_real): Remove qsort workaround.
8730         (autopref_multipass_init): Simplify initialization.
8731         (autopref_rank_data): Simplify sort order.
8732         * gcc/sched-int.h (autopref_multipass_data_): Remove
8733         multi_mem_insn_p, min_offset and max_offset.
8735 2017-10-24  Wilco Dijkstra  <wdijkstr@arm.com>
8737         PR middle-end/60580
8738         * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
8739         Check special value of flag_omit_frame_pointer.
8740         (aarch64_can_eliminate): Likewise.
8741         (aarch64_override_options_after_change_1): Simplify handling of
8742         -fomit-frame-pointer and -fomit-leaf-frame-pointer.
8744 2017-10-24  Richard Biener  <rguenther@suse.de>
8746         PR tree-optimization/82697
8747         * tree-ssa-phiopt.c (cond_store_replacement): Use alias-set
8748         zero for conditional load and unconditional store.
8750 2017-10-24  H.J. Lu  <hongjiu.lu@intel.com>
8752         * doc/install.texi: Document bootstrap-cet.
8754 2017-10-24  H.J. Lu  <hongjiu.lu@intel.com>
8756         PR target/82659
8757         * config/i386/i386.c (rest_of_insert_endbranch): Don't insert
8758         ENDBR instruction at function entrance if function is only
8759         called directly.
8761 2017-10-24  Jakub Jelinek  <jakub@redhat.com>
8763         PR target/82628
8764         * config/i386/i386.md (addcarry<mode>, subborrow<mode>): Change
8765         patterns to better describe from which operation the CF is computed.
8766         (addcarry<mode>_0, subborrow<mode>_0): New patterns.
8767         * config/i386/i386.c (ix86_expand_builtin) <case handlecarry>: Pass
8768         one LTU with [DT]Imode and another one with [SD]Imode.  If arg0
8769         is 0, use _0 suffixed expanders instead of emitting a comparison
8770         before it.
8772 2017-10-06  Sergey Shalnov  <Sergey.Shalnov@intel.com>
8774         * config/i386/i386.md(*movsf_internal, *movdf_internal):
8775         Avoid 512-bit AVX modes for TARGET_PREFER_AVX256.
8777 2017-10-24  Eric Botcazou  <ebotcazou@adacore.com>
8779         PR middle-end/82569
8780         * tree-outof-ssa.h (always_initialized_rtx_for_ssa_name_p): Delete.
8781         * expr.c (expand_expr_real_1) <expand_decl_rtl>: Revert latest change.
8782         * loop-iv.c (iv_get_reaching_def): Likewise.
8783         * cfgexpand.c (expand_one_ssa_partition): Initialize the RTX if the
8784         variable is promoted and the partition contains undefined values.
8786 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
8788         * config/nios2/nios2.c (nios2_rtx_costs): Make costs better
8789         reflect reality.
8790         (nios2_address_cost): Define.
8791         (nios2_legitimize_address): Recognize (exp + constant) directly.
8792         (TARGET_ADDRESS_COST): Define.
8794 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
8796         * config/nios2/nios2-protos.h (nios2_large_constant_p): Declare.
8797         (nios2_symbolic_memory_operand_p): Declare.
8798         (nios2_split_large_constant): Declare.
8799         (nios2_split_symbolic_memory_operand): Declare.
8800         * config/nios2/nios2.c: Adjust includes.
8801         (nios2_symbolic_constant_allowed): New.
8802         (nios2_symbolic_constant_p): New.
8803         (nios2_plus_symbolic_constant_p): New.
8804         (nios2_valid_addr_expr_p): Recognize addresses involving
8805         symbolic constants.
8806         (nios2_legitimate_address_p): Likewise, also LO_SUM.
8807         (nios2_symbolic_memory_operand_p): New.
8808         (nios2_large_constant_p): New.
8809         (nios2_split_large_constant): New.
8810         (nios2_split_plus_large_constant): New.
8811         (nios2_split_symbolic_memory_operand): New.
8812         (nios2_legitimize_address): Code refactoring.  Handle addresses
8813         involving symbolic constants.
8814         (nios2_emit_move_sequence): Likewise.
8815         (nios2_print_operand): Improve error output.
8816         (nios2_print_operand_address): Handle LO_SUM.
8817         (nios2_cdx_narrow_form_p): Likewise.
8818         * config/nios2/nios2.md (movqi_internal): Add splitter for memory
8819         operands involving symbolic constants.
8820         (movhi_internal, movsi_internal): Likewise.
8821         (zero_extendhisi2, zero_extendqi<mode>2): Likewise.
8822         (extendhisi2, extendqi<mode>2): Likewise.
8824 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
8826         * tree-pass.h (PROP_rtl_split_insns): Define.
8827         * recog.c (pass_data_split_all_insns): Provide PROP_rtl_split_insns.
8829 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
8831         * config/nios2/nios2.c (TARGET_LRA_P): Don't override.
8833 2017-10-23  Jakub Jelinek  <jakub@redhat.com>
8835         PR debug/82630
8836         * target.def (const_not_ok_for_debug_p): Default to
8837         default_const_not_ok_for_debug_p instead of hook_bool_rtx_false.
8838         * targhooks.h (default_const_not_ok_for_debug_p): New declaration.
8839         * targhooks.c (default_const_not_ok_for_debug_p): New function.
8840         * dwarf2out.c (const_ok_for_output_1): Only reject UNSPECs for
8841         which targetm.const_not_ok_for_debug_p returned true.
8842         * config/arm/arm.c (arm_const_not_ok_for_debug_p): Return true
8843         for UNSPECs.
8844         * config/powerpcspe/powerpcspe.c (rs6000_const_not_ok_for_debug_p):
8845         Likewise.
8846         * config/rs6000/rs6000.c (rs6000_const_not_ok_for_debug_p): Likewise.
8847         * config/i386/i386.c (ix86_delegitimize_address_1): Don't delegitimize
8848         UNSPEC_GOTOFF with addend into addend - _GLOBAL_OFFSET_TABLE_ + symbol
8849         if !base_term_p.
8850         (ix86_const_not_ok_for_debug_p): New function.
8851         (i386_asm_output_addr_const_extra): Handle UNSPEC_GOTOFF.
8852         (TARGET_CONST_NOT_OK_FOR_DEBUG_P): Redefine.
8854 2017-10-23  David Malcolm  <dmalcolm@redhat.com>
8856         PR bootstrap/82610
8857         * system.h: Conditionally include "unique-ptr.h" if
8858         INCLUDE_UNIQUE_PTR is defined.
8859         * unique-ptr-tests.cc: Remove include of "unique-ptr.h" in favor
8860         of defining INCLUDE_UNIQUE_PTR before including "system.h".
8862 2017-10-23  Sebastian Perta  <sebastian.perta@renesas.com>
8864         * config/rl78/rl78.md: New define_expand "subdi3".
8866 2017-10-23  H.J. Lu  <hongjiu.lu@intel.com>
8868         PR target/82673
8869         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Skip
8870         DF_REF_INSN if DF_REF_INSN_INFO is false.
8872 2017-10-23  Jan Hubicka  <hubicka@ucw.cz>
8874         * i386.c (dimode_scalar_chain::compute_convert_gain): Use
8875         xmm_move instead of sse_move.
8876         (sse_store_index): New function.
8877         (ix86_register_move_cost): Be more sensible about mismatch stall;
8878         model AVX moves correctly; make difference between sse->integer and
8879         integer->sse.
8880         (ix86_builtin_vectorization_cost): Model correctly aligned and unaligned
8881         moves; make difference between SSE and AVX.
8882         * i386.h (processor_costs): Remove sse_move; add xmm_move, ymm_move
8883         and zmm_move. Increase size of sse load and store tables;
8884         add unaligned load and store tables; add ssemmx_to_integer.
8885         * x86-tune-costs.h: Update all entries according to real
8886         move latencies from Agner Fog's manual and chip documentation.
8888 2017-10-23  Jakub Jelinek  <jakub@redhat.com>
8890         PR target/82628
8891         * config/i386/predicates.md (x86_64_dwzext_immediate_operand): New.
8892         * config/i386/constraints.md (Wf): New constraint.
8893         * config/i386/i386.md (UNSPEC_SBB): New unspec.
8894         (cmp<dwi>_doubleword): Removed.
8895         (sub<mode>3_carry_ccc, *sub<mode>3_carry_ccc_1): New patterns.
8896         (sub<mode>3_carry_ccgz): Use unspec instead of compare.
8897         * config/i386/i386.c (ix86_expand_branch) <case E_TImode>: Don't
8898         expand with cmp<dwi>_doubleword.  For LTU and GEU use
8899         sub<mode>3_carry_ccc instead of sub<mode>3_carry_ccgz and use CCCmode.
8901         * common.opt (gcolumn-info): Enable by default.
8902         * doc/invoke.texi (gcolumn-info): Document new default.
8904 2017-10-23  Richard Biener  <rguenther@suse.de>
8906         PR tree-optimization/82672
8907         * graphite-isl-ast-to-gimple.c (graphite_copy_stmts_from_block):
8908         Fold the stmt if we propagated into it.
8910 2017-10-23  Richard Biener  <rguenther@suse.de>
8912         * tree-ssa-pre.c (bitmap_remove_from_set): Rename to...
8913         (bitmap_remove_expr_from_set): ... this.  All callers call this
8914         for non-constant values.
8915         (bitmap_set_subtract): Rename to...
8916         (bitmap_set_subtract_expressions): ... this.  Adjust and
8917         optimize.
8918         (bitmap_set_contains_value): Remove superfluous check.
8919         (bitmap_set_replace_value): Inline into single caller ...
8920         (bitmap_value_replace_in_set): ... here and simplify.
8921         (dependent_clean): Merge into ...
8922         (clean): ... this using an overload.  Adjust.
8923         (prune_clobbered_mems): Adjust.
8924         (compute_antic_aux): Likewise.
8925         (compute_partial_antic_aux): Likewise.
8927 2017-10-23  Richard Biener  <rguenther@suse.de>
8929         PR tree-optimization/82129
8930         Revert
8931         2017-08-01  Richard Biener  <rguenther@suse.de>
8933         PR tree-optimization/81181
8934         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
8935         (compute_antic): ... end of iteration here.
8937 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
8939         * target.def (starting_frame_offset): New hook.
8940         * doc/tm.texi (STARTING_FRAME_OFFSET): Remove in favor of...
8941         (TARGET_STARTING_FRAME_OFFSET): ...this new hook.
8942         * doc/tm.texi.in: Regenerate.
8943         * hooks.h (hook_hwi_void_0): Declare.
8944         * hooks.c (hook_hwi_void_0): New function.
8945         * doc/rtl.texi: Refer to TARGET_STARTING_FRAME_OFFSET instead of
8946         STARTING_FRAME_OFFSET.
8947         * builtins.c (expand_builtin_setjmp_receiver): Likewise.
8948         * reload1.c (reload): Likewise.
8949         * cfgexpand.c (expand_used_vars): Use targetm.starting_frame_offset
8950         instead of STARTING_FRAME_OFFSET.
8951         * function.c (try_fit_stack_local): Likewise.
8952         (assign_stack_local_1): Likewise
8953         (instantiate_virtual_regs): Likewise.
8954         * rtlanal.c (rtx_addr_can_trap_p_1): Likewise.
8955         * config/avr/avr.md (nonlocal_goto_receiver): Likewise.
8956         * config/aarch64/aarch64.h (STARTING_FRAME_OFFSET): Delete.
8957         * config/alpha/alpha.h (STARTING_FRAME_OFFSET): Likewise.
8958         * config/arc/arc.h (STARTING_FRAME_OFFSET): Likewise.
8959         * config/arm/arm.h (STARTING_FRAME_OFFSET): Likewise.
8960         * config/bfin/bfin.h (STARTING_FRAME_OFFSET): Likewise.
8961         * config/c6x/c6x.h (STARTING_FRAME_OFFSET): Likewise.
8962         * config/cr16/cr16.h (STARTING_FRAME_OFFSET): Likewise.
8963         * config/cris/cris.h (STARTING_FRAME_OFFSET): Likewise.
8964         * config/fr30/fr30.h (STARTING_FRAME_OFFSET): Likewise.
8965         * config/frv/frv.h (STARTING_FRAME_OFFSET): Likewise.
8966         * config/ft32/ft32.h (STARTING_FRAME_OFFSET): Likewise.
8967         * config/h8300/h8300.h (STARTING_FRAME_OFFSET): Likewise.
8968         * config/i386/i386.h (STARTING_FRAME_OFFSET): Likewise.
8969         * config/ia64/ia64.h (STARTING_FRAME_OFFSET): Likewise.
8970         * config/m32c/m32c.h (STARTING_FRAME_OFFSET): Likewise.
8971         * config/m68k/m68k.h (STARTING_FRAME_OFFSET): Likewise.
8972         * config/mcore/mcore.h (STARTING_FRAME_OFFSET): Likewise.
8973         * config/mn10300/mn10300.h (STARTING_FRAME_OFFSET): Likewise.
8974         * config/moxie/moxie.h (STARTING_FRAME_OFFSET): Likewise.
8975         * config/msp430/msp430.h (STARTING_FRAME_OFFSET): Likewise.
8976         * config/nds32/nds32.h (STARTING_FRAME_OFFSET): Likewise.
8977         * config/nios2/nios2.h (STARTING_FRAME_OFFSET): Likewise.
8978         * config/nvptx/nvptx.h (STARTING_FRAME_OFFSET): Likewise.
8979         * config/pdp11/pdp11.h (STARTING_FRAME_OFFSET): Likewise.
8980         * config/riscv/riscv.h (STARTING_FRAME_OFFSET): Likewise.
8981         * config/rl78/rl78.h (STARTING_FRAME_OFFSET): Likewise.
8982         * config/rx/rx.h (STARTING_FRAME_OFFSET): Likewise.
8983         * config/s390/s390.h (STARTING_FRAME_OFFSET): Likewise.
8984         * config/sh/sh.h (STARTING_FRAME_OFFSET): Likewise.
8985         * config/sparc/sparc.c (sparc_compute_frame_size): Likewise.
8986         * config/sparc/sparc.h (STARTING_FRAME_OFFSET): Likewise.
8987         * config/spu/spu.h (STARTING_FRAME_OFFSET): Likewise.
8988         * config/stormy16/stormy16.h (STARTING_FRAME_OFFSET): Likewise.
8989         * config/tilegx/tilegx.h (STARTING_FRAME_OFFSET): Likewise.
8990         * config/tilepro/tilepro.h (STARTING_FRAME_OFFSET): Likewise.
8991         * config/v850/v850.h (STARTING_FRAME_OFFSET): Likewise.
8992         * config/visium/visium.h (STARTING_FRAME_OFFSET): Likewise.
8993         * config/avr/avr.h (STARTING_FRAME_OFFSET): Likewise.
8994         * config/avr/avr-protos.h (avr_starting_frame_offset): Likewise.
8995         * config/avr/avr.c (avr_starting_frame_offset): Make static and
8996         return a HOST_WIDE_INT.
8997         (avr_builtin_setjmp_frame_value): Use it instead of
8998         STARTING_FRAME_OFFSET.
8999         (TARGET_STARTING_FRAME_OFFSET): Redefine.
9000         * config/epiphany/epiphany.h (STARTING_FRAME_OFFSET): Delete.
9001         * config/epiphany/epiphany.c (epiphany_starting_frame_offset):
9002         New function.
9003         (TARGET_STARTING_FRAME_OFFSET): Redefine.
9004         * config/iq2000/iq2000.h (STARTING_FRAME_OFFSET): Delete.
9005         * config/iq2000/iq2000.c (iq2000_starting_frame_offset): New function.
9006         (TARGET_CONSTANT_ALIGNMENT): Redefine.
9007         * config/lm32/lm32.h (STARTING_FRAME_OFFSET): Delete.
9008         * config/lm32/lm32.c (lm32_starting_frame_offset): New function.
9009         (TARGET_STARTING_FRAME_OFFSET): Redefine.
9010         * config/m32r/m32r.h (STARTING_FRAME_OFFSET): Delete.
9011         * config/m32r/m32r.c (m32r_starting_frame_offset): New function.
9012         (TARGET_STARTING_FRAME_OFFSET): Redefine.
9013         * config/microblaze/microblaze.h (STARTING_FRAME_OFFSET): Delete.
9014         * config/microblaze/microblaze.c (microblaze_starting_frame_offset):
9015         New function.
9016         (TARGET_STARTING_FRAME_OFFSET): Redefine.
9017         * config/mips/mips.h (STARTING_FRAME_OFFSET): Delete.
9018         * config/mips/mips.c (mips_compute_frame_info): Refer to
9019         TARGET_STARTING_FRAME_OFFSET instead of STARTING_FRAME_OFFSET.
9020         (mips_starting_frame_offset): New function.
9021         (TARGET_STARTING_FRAME_OFFSET): Redefine.
9022         * config/mmix/mmix.h (STARTING_FRAME_OFFSET): Delete.
9023         * config/mmix/mmix-protos.h (mmix_starting_frame_offset): Delete.
9024         * config/mmix/mmix.c (mmix_starting_frame_offset): Make static
9025         and return a HOST_WIDE_INT.
9026         (TARGET_STARTING_FRAME_OFFSET): Redefine.
9027         (mmix_initial_elimination_offset): Refer to
9028         TARGET_STARTING_FRAME_OFFSET instead of STARTING_FRAME_OFFSET.
9029         * config/pa/pa.h (STARTING_FRAME_OFFSET): Delete.
9030         * config/pa/pa.c (pa_starting_frame_offset): New function.
9031         (pa_compute_frame_size): Use it instead of STARTING_FRAME_OFFSET.
9032         (pa_expand_prologue): Likewise.
9033         (TARGET_STARTING_FRAME_OFFSET): Redefine.
9034         * config/powerpcspe/aix.h (STARTING_FRAME_OFFSET): Split out
9035         !FRAME_GROWS_DOWNWARD handling to...
9036         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
9037         * config/powerpcspe/darwin.h (STARTING_FRAME_OFFSET): Split out
9038         !FRAME_GROWS_DOWNWARD handling to...
9039         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
9040         * config/powerpcspe/powerpcspe.h (STARTING_FRAME_OFFSET): Split out
9041         !FRAME_GROWS_DOWNWARD handling to...
9042         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
9043         * config/powerpcspe/powerpcspe.c (TARGET_STARTING_FRAME_OFFSET):
9044         Redefine.
9045         (rs6000_starting_frame_offset): New function.
9046         * config/rs6000/aix.h (STARTING_FRAME_OFFSET): Split out
9047         !FRAME_GROWS_DOWNWARD handling to...
9048         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
9049         * config/rs6000/darwin.h (STARTING_FRAME_OFFSET): Split out
9050         !FRAME_GROWS_DOWNWARD handling to...
9051         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
9052         * config/rs6000/rs6000.h (STARTING_FRAME_OFFSET): Split out
9053         !FRAME_GROWS_DOWNWARD handling to...
9054         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
9055         * config/rs6000/rs6000.c (TARGET_STARTING_FRAME_OFFSET): Refine.
9056         (rs6000_starting_frame_offset): New function.
9057         * config/vax/elf.h (STARTING_FRAME_OFFSET): Delete.
9058         * config/vax/vax.h (STARTING_FRAME_OFFSET): Delete.
9059         * config/vax/vax.c (vax_starting_frame_offset): New function.
9060         (vax_expand_prologue): Use it instead of STARTING_FRAME_OFFSET.
9061         (TARGET_STARTING_FRAME_OFFSET): Redefine.
9062         * config/xtensa/xtensa.h (STARTING_FRAME_OFFSET): Delete.
9063         * config/xtensa/xtensa.c (xtensa_starting_frame_offset): New function.
9064         (TARGET_STARTING_FRAME_OFFSET): Redefine.
9065         * system.h (STARTING_FRAME_OFFSET): Poison.
9067 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
9069         * tree-vect-loop.c (vect_create_epilog_for_reduction): Use
9070         SCALAR_TYPE_MODE instead of TYPE_MODE.
9072 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
9073             Alan Hayward  <alan.hayward@arm.com>
9074             David Sherwood  <david.sherwood@arm.com>
9076         * dwarf2out.c (loc_list_from_tree_1): Use SCALAR_INT_TYPE_MODE
9078 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
9079             Alan Hayward  <alan.hayward@arm.com>
9080             David Sherwood  <david.sherwood@arm.com>
9082         * expmed.c (expand_shift_1): Use scalar_mode for scalar_mode.
9084 2017-10-23  Richard Biener  <rguenther@suse.de>
9086         PR tree-optimization/82129
9087         * tree-ssa-pre.c (bitmap_set_and): Remove.
9088         (compute_antic_aux): Compute ANTIC_OUT intersection in a way
9089         canonicalizing expressions in the set to those with lowest
9090         ID rather than taking that from the first edge.
9092 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
9094         * combine.c (rtx_equal_for_field_assignment_p): Use
9095         byte_lowpart_offset.
9097 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
9098             Alan Hayward  <alan.hayward@arm.com>
9099             David Sherwood  <david.sherwood@arm.com>
9101         * internal-fn.c (expand_direct_optab_fn): Don't assign directly
9102         to a SUBREG_PROMOTED_VAR.
9104 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
9105             Alan Hayward  <alan.hayward@arm.com>
9106             David Sherwood  <david.sherwood@arm.com>
9108         * cfgexpand.c (expand_debug_expr): Use GET_MODE_UNIT_PRECISION.
9109         (expand_debug_source_expr): Likewise.
9110         * combine.c (combine_simplify_rtx): Likewise.
9111         * cse.c (fold_rtx): Likewise.
9112         * optabs.c (expand_float): Likewise.
9113         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
9114         (simplify_binary_operation_1): Likewise.
9116 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
9117             Alan Hayward  <alan.hayward@arm.com>
9118             David Sherwood  <david.sherwood@arm.com>
9120         * combine.c (simplify_comparison): Use HWI_COMPUTABLE_MODE_P.
9121         (record_promoted_value): Likewise.
9122         * expr.c (expand_expr_real_2): Likewise.
9123         * ree.c (update_reg_equal_equiv_notes): Likewise.
9124         (combine_set_extension): Likewise.
9125         * rtlanal.c (low_bitmask_len): Likewise.
9126         * simplify-rtx.c (neg_const_int): Likewise.
9127         (simplify_binary_operation_1): Likewise.
9129 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
9130             Alan Hayward  <alan.hayward@arm.com>
9131             David Sherwood  <david.sherwood@arm.com>
9133         * lra-spills.c (assign_mem_slot): Use subreg_size_lowpart_offset.
9134         * regcprop.c (maybe_mode_change): Likewise.
9135         * reload1.c (alter_reg): Likewise.
9137 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
9139         * inchash.h (inchash::hash::add_wide_int): New function.
9140         * lto-streamer-out.c (hash_tree): Use it.
9142 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
9144         * inchash.h (inchash::hash::add_wide_int): Rename to...
9145         (inchash::hash::add_hwi): ...this.
9146         * ipa-devirt.c (hash_odr_vtable): Update accordingly.
9147         (polymorphic_call_target_hasher::hash): Likewise.
9148         * ipa-icf.c (sem_function::get_hash, sem_function::init): Likewise.
9149         (sem_item::add_expr, sem_item::add_type, sem_variable::get_hash)
9150         (sem_item_optimizer::update_hash_by_addr_refs): Likewise.
9151         * lto-streamer-out.c (hash_tree): Likewise.
9152         * optc-save-gen.awk: Likewise.
9153         * tree.c (add_expr): Likewise.
9155 2017-10-22  Uros Bizjak  <ubizjak@gmail.com>
9157         PR target/52451
9158         * config/i386/i386.c (ix86_fp_compare_mode): Return CCFPmode
9159         for ordered inequality comparisons even with TARGET_IEEE_FP.
9161 2017-10-22  Uros Bizjak  <ubizjak@gmail.com>
9163         PR target/82628
9164         * config/i386/i386.md (cmp<dwi>_doubleword): New pattern.
9165         * config/i386/i386.c (ix86_expand_branch) <case E_TImode>:
9166         Expand with cmp<dwi>_doubleword.
9168 2017-10-21  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
9170         * extend.texi: Add x86 specific to 'nocf_check' attribute.
9171         List CET intrinsics.
9172         * invoke.texi: Add -mcet, -mibt, -mshstk options.  Add x86
9173         specific to -fcf-protection option.
9175 2017-10-21  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
9177         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET): New.
9178         (OPTION_MASK_ISA_SHSTK_SET): Likewise.
9179         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
9180         (OPTION_MASK_ISA_SHSTK_UNSET): Likewise.
9181         (ix86_handle_option): Add -mibt, -mshstk, -mcet handling.
9182         * config.gcc (extra_headers): Add cetintrin.h for x86 targets.
9183         (extra_objs): Add cet.o for Linux/x86 targets.
9184         (tmake_file): Add i386/t-cet for Linux/x86 targets.
9185         * config/i386/cet.c: New file.
9186         * config/i386/cetintrin.h: Likewise.
9187         * config/i386/t-cet: Likewise.
9188         * config/i386/cpuid.h (bit_SHSTK): New.
9189         (bit_IBT): Likewise.
9190         * config/i386/driver-i386.c (host_detect_local_cpu): Detect and
9191         pass IBT and SHSTK bits.
9192         * config/i386/i386-builtin-types.def
9193         (VOID_FTYPE_UNSIGNED_PVOID): New.
9194         (VOID_FTYPE_UINT64_PVOID): Likewise.
9195         * config/i386/i386-builtin.def: Add CET intrinsics.
9196         * config/i386/i386-c.c (ix86_target_macros_internal): Add
9197         OPTION_MASK_ISA_IBT, OPTION_MASK_ISA_SHSTK handling.
9198         * config/i386/i386-passes.def: Add pass_insert_endbranch pass.
9199         * config/i386/i386-protos.h (make_pass_insert_endbranch): New
9200         prototype.
9201         * config/i386/i386.c (rest_of_insert_endbranch): New.
9202         (pass_data_insert_endbranch): Likewise.
9203         (pass_insert_endbranch): Likewise.
9204         (make_pass_insert_endbranch): Likewise.
9205         (ix86_notrack_prefixed_insn_p): Likewise.
9206         (ix86_target_string): Add -mibt, -mshstk flags.
9207         (ix86_option_override_internal): Add flag_cf_protection
9208         processing.
9209         (ix86_valid_target_attribute_inner_p): Set OPT_mibt, OPT_mshstk.
9210         (ix86_print_operand): Add 'notrack' prefix output.
9211         (ix86_init_mmx_sse_builtins): Add CET intrinsics.
9212         (ix86_expand_builtin): Expand CET intrinsics.
9213         (x86_output_mi_thunk): Add 'endbranch' instruction.
9214         * config/i386/i386.h (TARGET_IBT): New.
9215         (TARGET_IBT_P): Likewise.
9216         (TARGET_SHSTK): Likewise.
9217         (TARGET_SHSTK_P): Likewise.
9218         * config/i386/i386.md (unspecv): Add UNSPECV_NOP_RDSSP,
9219         UNSPECV_INCSSP, UNSPECV_SAVEPREVSSP, UNSPECV_RSTORSSP,
9220         UNSPECV_WRSS, UNSPECV_WRUSS, UNSPECV_SETSSBSY, UNSPECV_CLRSSBSY.
9221         (builtin_setjmp_setup): New pattern.
9222         (builtin_longjmp): Likewise.
9223         (rdssp<mode>): Likewise.
9224         (incssp<mode>): Likewise.
9225         (saveprevssp): Likewise.
9226         (rstorssp): Likewise.
9227         (wrss<mode>): Likewise.
9228         (wruss<mode>): Likewise.
9229         (setssbsy): Likewise.
9230         (clrssbsy): Likewise.
9231         (nop_endbr): Likewise.
9232         * config/i386/i386.opt: Add -mcet, -mibt, -mshstk and -mcet-switch
9233         options.
9234         * config/i386/immintrin.h: Include <cetintrin.h>.
9235         * config/i386/linux-common.h
9236         (file_end_indicate_exec_stack_and_cet): New prototype.
9237         (TARGET_ASM_FILE_END): New.
9239 2017-10-20  Jan Hubicka  <hubicka@ucw.cz>
9241         * i386.c (ix86_builtin_vectorization_cost): Use existing rtx_cost
9242         latencies instead of having separate table; make difference between
9243         integer and float costs.
9244         * i386.h (processor_costs): Remove scalar_stmt_cost,
9245         scalar_load_cost, scalar_store_cost, vec_stmt_cost, vec_to_scalar_cost,
9246         scalar_to_vec_cost, vec_align_load_cost, vec_unalign_load_cost,
9247         vec_store_cost.
9248         * x86-tune-costs.h: Remove entries which has been removed in
9249         procesor_costs from all tables; make cond_taken_branch_cost
9250         and cond_not_taken_branch_cost COST_N_INSNS based.
9252 2017-10-20  Jan Hubicka  <hubicka@ucw.cz>
9254         * x86-tune-costs.h (intel_cost, generic_cost): Fix move costs.
9256 2017-10-20  Jakub Jelinek  <jakub@redhat.com>
9258         * config/i386/i386.md (isa): Remove fma_avx512f.
9259         * config/i386/sse.md (<avx512>_fmadd_<mode>_mask<round_name>,
9260         <avx512>_fmadd_<mode>_mask3<round_name>,
9261         <avx512>_fmsub_<mode>_mask<round_name>,
9262         <avx512>_fmsub_<mode>_mask3<round_name>,
9263         <avx512>_fnmadd_<mode>_mask<round_name>,
9264         <avx512>_fnmadd_<mode>_mask3<round_name>,
9265         <avx512>_fnmsub_<mode>_mask<round_name>,
9266         <avx512>_fnmsub_<mode>_mask3<round_name>,
9267         <avx512>_fmaddsub_<mode>_mask<round_name>,
9268         <avx512>_fmaddsub_<mode>_mask3<round_name>,
9269         <avx512>_fmsubadd_<mode>_mask<round_name>,
9270         <avx512>_fmsubadd_<mode>_mask3<round_name>): Remove isa attribute.
9271         (*vec_widen_umult_even_v16si<mask_name>,
9272         *vec_widen_smult_even_v16si<mask_name>): Likewise.
9273         (<mask_codefor>avx512bw_dbpsadbw<mode><mask_name>): Likewise.
9275 2017-10-20  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
9277         * extend.texi: Add 'nocf_check' documentation.
9278         * gimple.texi: Add second parameter to
9279         gimple_build_call_from_tree.
9280         * invoke.texi: Add -fcf-protection documentation.
9281         * rtl.texi: Add REG_CALL_NOTRACK documenation.
9283 2017-10-20  Richard Biener  <rguenther@suse.de>
9285         PR tree-optimization/82473
9286         * tree-vect-loop.c (vectorizable_reduction): Properly get at
9287         the largest input type.
9289 2017-10-20  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
9291         * c-attribs.c (handle_nocf_check_attribute): New function.
9292         (c_common_attribute_table): Add 'nocf_check' handling.
9293         * gimple-parser.c: Add second argument NULL to
9294         gimple_build_call_from_tree.
9295         * attrib.c (comp_type_attributes): Check nocf_check attribute.
9296         * cfgexpand.c (expand_call_stmt): Set REG_CALL_NOCF_CHECK for
9297         call insn.
9298         * combine.c (distribute_notes): Add REG_CALL_NOCF_CHECK handling.
9299         * common.opt: Add fcf-protection flag.
9300         * emit-rtl.c (try_split): Add REG_CALL_NOCF_CHECK handling.
9301         * flag-types.h: Add enum cf_protection_level.
9302         * gimple.c (gimple_build_call_from_tree): Add second parameter.
9303         Add 'nocf_check' attribute propagation to gimple call.
9304         * gimple.h (gf_mask): Add GF_CALL_NOCF_CHECK.
9305         (gimple_build_call_from_tree): Update prototype.
9306         (gimple_call_nocf_check_p): New function.
9307         (gimple_call_set_nocf_check): Likewise.
9308         * gimplify.c: Add second argument to gimple_build_call_from_tree.
9309         * ipa-icf.c: Add nocf_check attribute in statement hash.
9310         * recog.c (peep2_attempt): Add REG_CALL_NOCF_CHECK handling.
9311         * reg-notes.def: Add REG_NOTE (CALL_NOCF_CHECK).
9312         * toplev.c (process_options): Add flag_cf_protection handling.
9314 2017-10-19  Jan Hubicka  <hubicka@ucw.cz>
9316         * x86-tune-costs.h (core_cost): Fix div, move and sqrt latencies.
9318 2017-10-20  Richard Biener  <rguenther@suse.de>
9320         PR tree-optimization/82603
9321         * tree-if-conv.c (predicate_mem_writes): Make sure to only
9322         remove false predicated stores.
9324 2017-10-20  Richard Biener  <rguenther@suse.de>
9326         * graphite-isl-ast-to-gimple.c
9327         (translate_isl_ast_to_gimple::graphite_copy_stmts_from_block):
9328         Remove return value and simplify, dump copied stmt after lhs
9329         adjustment.
9330         (translate_isl_ast_to_gimple::translate_isl_ast_node_user):
9331         Reduce dump verbosity.
9332         (gsi_insert_earliest): Likewise.
9333         (translate_isl_ast_to_gimple::copy_bb_and_scalar_dependences): Adjust.
9334         * graphite.c (print_global_statistics): Adjust dumping.
9335         (print_graphite_scop_statistics): Likewise.
9336         (print_graphite_statistics): Do not dump loops here.
9337         (graphite_transform_loops): But here.
9339 2017-10-20  Nicolas Roche  <roche@adacore.com>
9341         * configure.ac (ACX_PROG_GNAT): Append "libgnat" to include search dir.
9342         * configure: Regenerate.
9344 2017-10-20  Jakub Jelinek  <jakub@redhat.com>
9346         PR target/82158
9347         * tree-cfg.c (pass_warn_function_return::execute): In noreturn
9348         functions when optimizing replace GIMPLE_RETURN stmts with
9349         calls to __builtin_unreachable ().
9351         PR sanitizer/82595
9352         * config/gnu-user.h (LIBTSAN_EARLY_SPEC): Add libtsan_preinit.o
9353         for -fsanitize=thread link of executables.
9354         (LIBLSAN_EARLY_SPEC): Add liblsan_preinit.o for -fsanitize=leak
9355         link of executables.
9357         PR target/82370
9358         * config/i386/sse.md (VI248_AVX2, VI248_AVX512BW, VI248_AVX512BW_2):
9359         New mode iterators.
9360         (<shift_insn><mode>3<mask_name>): Change the last of the 3
9361         define_insns for logical vector shifts to use VI248_AVX512BW
9362         iterator instead of VI48_AVX512, remove <mask_mode512bit_condition>
9363         condition, useless isa and prefix attributes.  Change the first
9364         2 of these define_insns to ...
9365         (<mask_codefor><shift_insn><mode>3<mask_name>): ... this, new
9366         define_insn for avx512vl.
9367         (<shift_insn><mode>3): ... and this, new define_insn without
9368         masking for non-avx512vl.
9370         PR target/82370
9371         * config/i386/sse.md (*andnot<mode>3,
9372         <mask_codefor><code><mode>3<mask_name>, *<code><mode>3): Split
9373         (=v,v,vm) alternative into (=x,x,xm) and (=v,v,vm), for 128-bit
9374         and 256-bit vectors, the (=x,x,xm) alternative and when mask is
9375         not applied use empty suffix even for TARGET_AVX512VL.
9376         * config/i386/subst.md (mask_prefix3, mask_prefix4): When mask
9377         is applied, supply evex,evex or evex,evex,evex instead of just
9378         evex.
9380 2017-10-20  Julia Koval  <julia.koval@intel.com>
9382         * common/config/i386/i386-common.c (OPTION_MASK_ISA_GFNI_SET,
9383         (OPTION_MASK_ISA_GFNI_UNSET): New.
9384         (ix86_handle_option): Handle OPT_mgfni.
9385         * config/i386/cpuid.h (bit_GFNI): New.
9386         * config/i386/driver-i386.c (host_detect_local_cpu): Detect gfni.
9387         * config/i386/i386-c.c (ix86_target_macros_internal): Define __GFNI__.
9388         * config/i386/i386.c (ix86_target_string): Add -mgfni.
9389         (ix86_valid_target_attribute_inner_p): Add OPT_mgfni.
9390         * config/i386/i386.h (TARGET_GFNI, TARGET_GFNI_P): New.
9391         * config/i386/i386.opt: Add mgfni.
9393 2017-10-20  Orlando Arias  <oarias@knights.ucf.edu>
9395         * config/msp430/msp430.c (msp430_option_override): Disable
9396         -fdelete-null-pointer-checks.
9397         * doc/invoke.text (-fdelete-null-pointer-checks): Document that.
9399 2017-10-19  Jan Hubicka  <hubicka@ucw.cz>
9401         * x86-tune-costs.h (generic_cost, core_cost): Correct costs
9402         of x87 and SSE instructions.
9404 2017-10-19  Jan Hubicka  <hubicka@ucw.cz>
9406         * asan.c (create_cond_insert_point): Do not update edge count.
9407         * auto-profile.c (afdo_propagate_edge): Update for edge count removal.
9408         (afdo_propagate_circuit): Likewise.
9409         (afdo_calculate_branch_prob): Likewise.
9410         (afdo_annotate_cfg): Likewise.
9411         * basic-block.h (struct edge_def): Remove count.
9412         (edge_def::count): New accessor.
9413         * bb-reorder.c (rotate_loop): Update.
9414         (find_traces_1_round): Update.
9415         (connect_traces): Update.
9416         (sanitize_hot_paths): Update.
9417         * cfg.c (unchecked_make_edge): Update.
9418         (make_single_succ_edge): Update.
9419         (check_bb_profile): Update.
9420         (dump_edge_info): Update.
9421         (update_bb_profile_for_threading): Update.
9422         (scale_bbs_frequencies_int): Update.
9423         (scale_bbs_frequencies_gcov_type): Update.
9424         (scale_bbs_frequencies_profile_count): Update.
9425         (scale_bbs_frequencies): Update.
9426         * cfganal.c (connect_infinite_loops_to_exit): Update.
9427         * cfgbuild.c (compute_outgoing_frequencies): Update.
9428         (find_many_sub_basic_blocks): Update.
9429         * cfgcleanup.c (try_forward_edges): Update.
9430         (try_crossjump_to_edge): Update
9431         * cfgexpand.c (expand_gimple_cond): Update
9432         (expand_gimple_tailcall): Update
9433         (construct_exit_block): Update
9434         * cfghooks.c (verify_flow_info): Update
9435         (redirect_edge_succ_nodup): Update
9436         (split_edge): Update
9437         (make_forwarder_block): Update
9438         (duplicate_block): Update
9439         (account_profile_record): Update
9440         * cfgloop.c (find_subloop_latch_edge_by_profile): Update.
9441         * cfgloopanal.c (expected_loop_iterations_unbounded): Update.
9442         * cfgloopmanip.c (scale_loop_profile): Update.
9443         (loopify): Update.
9444         (lv_adjust_loop_entry_edge): Update.
9445         * cfgrtl.c (try_redirect_by_replacing_jump): Update.
9446         (force_nonfallthru_and_redirect): Update.
9447         (purge_dead_edges): Update.
9448         (rtl_flow_call_edges_add): Update.
9449         * cgraphunit.c (init_lowered_empty_function): Update.
9450         (cgraph_node::expand_thunk): Update.
9451         * gimple-pretty-print.c (dump_probability): Update.
9452         (dump_edge_probability): Update.
9453         * gimple-ssa-isolate-paths.c (isolate_path): Update.
9454         * haifa-sched.c (sched_create_recovery_edges): Update.
9455         * hsa-gen.c (convert_switch_statements): Update.
9456         * ifcvt.c (dead_or_predicable): Update.
9457         * ipa-inline-transform.c (inline_transform): Update.
9458         * ipa-split.c (split_function): Update.
9459         * ipa-utils.c (ipa_merge_profiles): Update.
9460         * loop-doloop.c (add_test): Update.
9461         * loop-unroll.c (unroll_loop_runtime_iterations): Update.
9462         * lto-streamer-in.c (input_cfg): Update.
9463         (input_function): Update.
9464         * lto-streamer-out.c (output_cfg): Update.
9465         * modulo-sched.c (sms_schedule): Update.
9466         * postreload-gcse.c (eliminate_partially_redundant_load): Update.
9467         * predict.c (maybe_hot_edge_p): Update.
9468         (unlikely_executed_edge_p): Update.
9469         (probably_never_executed_edge_p): Update.
9470         (dump_prediction): Update.
9471         (drop_profile): Update.
9472         (propagate_unlikely_bbs_forward): Update.
9473         (determine_unlikely_bbs): Update.
9474         (force_edge_cold): Update.
9475         * profile.c (compute_branch_probabilities): Update.
9476         * reg-stack.c (better_edge): Update.
9477         * shrink-wrap.c (handle_simple_exit): Update.
9478         * tracer.c (better_p): Update.
9479         * trans-mem.c (expand_transaction): Update.
9480         (split_bb_make_tm_edge): Update.
9481         * tree-call-cdce.c: Update.
9482         * tree-cfg.c (gimple_find_sub_bbs): Update.
9483         (gimple_split_edge): Update.
9484         (gimple_duplicate_sese_region): Update.
9485         (gimple_duplicate_sese_tail): Update.
9486         (gimple_flow_call_edges_add): Update.
9487         (insert_cond_bb): Update.
9488         (execute_fixup_cfg): Update.
9489         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update.
9490         * tree-complex.c (expand_complex_div_wide): Update.
9491         * tree-eh.c (lower_resx): Update.
9492         (unsplit_eh): Update.
9493         (cleanup_empty_eh_move_lp): Update.
9494         * tree-inline.c (copy_edges_for_bb): Update.
9495         (freqs_to_counts): Update.
9496         (copy_cfg_body): Update.
9497         * tree-ssa-dce.c (remove_dead_stmt): Update.
9498         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
9499         * tree-ssa-loop-im.c (execute_sm_if_changed): Update.
9500         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update.
9501         (unloop_loops): Update.
9502         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
9503         * tree-ssa-loop-split.c (connect_loops): Update.
9504         (split_loop): Update.
9505         * tree-ssa-loop-unswitch.c (hoist_guard): Update.
9506         * tree-ssa-phionlycprop.c (propagate_rhs_into_lhs): Update.
9507         * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Update.
9508         * tree-ssa-reassoc.c (branch_fixup): Update.
9509         * tree-ssa-tail-merge.c (replace_block_by): Update.
9510         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Update.
9511         (compute_path_counts): Update.
9512         (update_profile): Update.
9513         (recompute_probabilities): Update.
9514         (update_joiner_offpath_counts): Update.
9515         (estimated_freqs_path): Update.
9516         (freqs_to_counts_path): Update.
9517         (clear_counts_path): Update.
9518         (ssa_fix_duplicate_block_edges): Update.
9519         (duplicate_thread_path): Update.
9520         * tree-switch-conversion.c (hoist_edge_and_branch_if_true): Update.
9521         (case_bit_test_cmp): Update.
9522         (collect_switch_conv_info): Update.
9523         (gen_inbound_check): Update.
9524         (do_jump_if_equal): Update.
9525         (emit_cmp_and_jump_insns): Update.
9526         * tree-tailcall.c (decrease_profile): Update.
9527         (eliminate_tail_call): Update.
9528         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
9529         (vect_do_peeling): Update.
9530         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
9531         * ubsan.c (ubsan_expand_null_ifn): Update.
9532         (ubsan_expand_ptr_ifn): Update.
9533         * value-prof.c (gimple_divmod_fixed_value): Update.
9534         (gimple_mod_pow2): Update.
9535         (gimple_mod_subtract): Update.
9536         (gimple_ic): Update.
9537         (gimple_stringop_fixed_value): Update.
9539 2017-10-19  Uros Bizjak  <ubizjak@gmail.com>
9541         PR target/82618
9542         * config/i386/i386.md (sub to cmp): New peephole2 pattern.
9544 2017-10-19  Alexander Monakov  <amonakov@ispras.ru>
9546         PR rtl-optimization/82395
9547         * ira-color.c (allocno_priority_compare_func): Fix comparison step
9548         based on non_spilled_static_chain_regno_p.
9550 2017-10-19  Uros Bizjak  <ubizjak@gmail.com>
9552         * config/i386/i386.c (output_387_binary_op): Rewrite SSE part.
9553         (ix86_emit_mode_set): Rewrite insn mnemonic construction.
9554         (ix86_prepare_fp_compare_args): Redefine is_sse as bool.
9556 2017-10-19  Martin Sebor  <msebor@redhat.com>
9558         PR tree-optimization/82596
9559         * tree.c (array_at_struct_end_p): Handle STRING_CST.
9561 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
9563         * asan.c (handle_builtin_alloca): Deal with all alloca variants.
9564         (get_mem_refs_of_builtin_call): Likewise.
9565         * builtins.c (expand_builtin_apply): Adjust call to
9566         allocate_dynamic_stack_space.
9567         (expand_builtin_alloca): For __builtin_alloca_with_align_and_max, pass
9568         the third argument to allocate_dynamic_stack_space, otherwise -1.
9569         (expand_builtin): Deal with all alloca variants.
9570         (is_inexpensive_builtin): Likewise.
9571         * builtins.def (BUILT_IN_ALLOCA_WITH_ALIGN_AND_MAX): New.
9572         * calls.c (special_function_p): Deal with all alloca variants.
9573         (initialize_argument_information): Adjust call to
9574         allocate_dynamic_stack_space.
9575         (expand_call): Likewise.
9576         * cfgexpand.c (expand_call_stmt): Deal with all alloca variants.
9577         * doc/extend.texi (Built-ins): Add __builtin_alloca_with_align_and_max
9578         * explow.c (allocate_dynamic_stack_space): Add MAX_SIZE parameter and
9579         use it for the stack usage computation.
9580         * explow.h (allocate_dynamic_stack_space): Adjust prototype.
9581         * function.c (gimplify_parameters): Call build_alloca_call_expr.
9582         * gimple-ssa-warn-alloca.c (alloca_call_type): Simplify control flow.
9583         Take into account 3rd argument of __builtin_alloca_with_align_and_max.
9584         (in_loop_p): Remove first argument and useless check.
9585         (pass_walloca::execute): Remove useless test and adjust call to above.
9586         * gimple.c (gimple_build_call_from_tree): Deal with all alloc variants
9587         * gimplify.c (gimplify_vla_decl): Call build_alloca_call_expr.
9588         (gimplify_call_expr): Deal with all alloca variants.
9589         * hsa-gen.c (gen_hsa_alloca): Likewise.
9590         (gen_hsa_insns_for_call): Likewise.
9591         * ipa-pure-const.c (special_builtin_state): Likewise.
9592         * tree-chkp.c (chkp_build_returned_bound): Likewise.
9593         * tree-object-size.c (alloc_object_size): Likewise.
9594         * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Likewise.
9595         (call_may_clobber_ref_p_1): Likewise.
9596         * tree-ssa-ccp.c (evaluate_stmt): Likewise.
9597         (ccp_fold_stmt): Likewise.
9598         (optimize_stack_restore): Likewise.
9599         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
9600         (mark_all_reaching_defs_necessary_1): Likewise.
9601         (propagate_necessity): Likewise.
9602         (eliminate_unnecessary_stmts): Likewise.
9603         * tree.c (build_common_builtin_nodes): Build
9604         BUILT_IN_ALLOCA_WITH_ALIGN_AND_MAX.
9605         (build_alloca_call_expr): New function.
9606         * tree.h (ALLOCA_FUNCTION_CODE_P): New macro.
9607         (CASE_BUILT_IN_ALLOCA): Likewise.
9608         (build_alloca_call_expr): Declare.
9609         * varasm.c (incorporeal_function_p): Deal with all alloca variants.
9611 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
9613         PR debug/82509
9614         * dwarf2out.c (new_die_raw): New static inline function.
9615         (new_die): Use it to create the DIE.
9616         (add_AT_external_die_ref): Likewise.
9617         (clone_die): Likewise.
9618         (clone_as_declaration): Likewise.
9619         (dwarf2out_vms_debug_main_pointer): Likewise.
9620         (base_type_die): Likewise.  Remove early return for corner cases.
9621         Do not call add_pubtype on the DIE here.
9622         (is_base_type): Remove ERROR_MARK and return 0 for VOID_TYPE.
9623         (modified_type_die): Adjust the lookup for reverse order DIEs.  Skip
9624         typedefs for base types with DW_AT_endianity.  Make sure a DIE with
9625         native order exists for base types, attach the DIE manually and call
9626         add_pubtype on it.  Do not equate a reverse order DIE to the type.
9628 2017-10-19  Richard Earnshaw  <rearnsha@arm.com>
9630         * config/arm/arm.c (align_ok_ldrd_strd): New function.
9631         (mem_ok_for_ldrd_strd): New parameter align.  Extract the alignment of
9632         the mem into it.
9633         (gen_operands_ldrd_strd): Validate the alignment of the accesses.
9635 2017-10-19  Jakub Jelinek  <jakub@redhat.com>
9637         * flag-types.h (enum sanitize_code): Add SANITIZE_BUILTIN.  Or
9638         SANITIZE_BUILTIN into SANITIZE_UNDEFINED.
9639         * sanitizer.def (BUILT_IN_UBSAN_HANDLE_INVALID_BUILTIN,
9640         BUILT_IN_UBSAN_HANDLE_INVALID_BUILTIN_ABORT): New builtins.
9641         * opts.c (sanitizer_opts): Add builtin.
9642         * ubsan.c (instrument_builtin): New function.
9643         (pass_ubsan::execute): Call it.
9644         (pass_ubsan::gate): Enable even for SANITIZE_BUILTIN.
9645         * doc/invoke.texi: Document -fsanitize=builtin.
9647         * ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch
9648         builtins, store max (log2 (align), 0) into uchar field instead of
9649         align into uptr field.
9650         (ubsan_expand_objsize_ifn): Use _v1 suffixed type mismatch builtins,
9651         store uchar 0 field instead of uptr 0 field.
9652         (instrument_nonnull_return): Use _v1 suffixed nonnull return builtin,
9653         instead of passing one address of struct with 2 locations pass
9654         two addresses of structs with 1 location each.
9655         * sanitizer.def (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH,
9656         BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_ABORT,
9657         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN,
9658         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_ABORT): Removed.
9659         (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1,
9660         BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1_ABORT,
9661         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1,
9662         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1_ABORT): New builtins.
9664 2017-10-19  Martin Liska  <mliska@suse.cz>
9666         PR driver/81829
9667         * file-find.c (remove_prefix): Remove.
9668         * file-find.h (remove_prefix): Likewise.
9669         * gcc-ar.c: Remove smartness of lookup.
9671 2017-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
9673         * config/rs6000/rs6000.md (*call_indirect_aix<mode>,
9674         *call_value_indirect_aix<mode>, *call_indirect_elfv2<mode>,
9675         *call_value_indirect_elfv2<mode>): Add correct mode to the unspec.
9677 2017-10-19  Jakub Jelinek  <jakub@redhat.com>
9679         PR target/82580
9680         * config/i386/i386.md (setcc + movzbl to xor + setcc): New peephole2.
9681         (setcc + and to xor + setcc): New peephole2.
9683 2017-10-19  Tom de Vries  <tom@codesourcery.com>
9685         * doc/sourcebuild.texi (Test Directives, Variants of
9686         dg-require-support): Add dg-require-stack-size.
9688 2017-10-19  Martin Liska  <mliska@suse.cz>
9690         PR sanitizer/82517
9691         * gimplify.c (gimplify_decl_expr): Do not instrument variables
9692         that have a large alignment.
9693         (gimplify_target_expr): Likewise.
9695 2017-10-18  Segher Boessenkool  <segher@kernel.crashing.org>
9697         PR rtl-optimization/82602
9698         * ira.c (rtx_moveable_p): Return false for volatile asm.
9700 2017-10-18  Uros Bizjak  <ubizjak@gmail.com>
9702         PR target/82580
9703         * config/i386/i386-modes.def (CCGZ): New CC mode.
9704         * config/i386/i386.md (sub<mode>3_carry_ccgz): New insn pattern.
9705         * config/i386/predicates.md (ix86_comparison_operator):
9706         Handle CCGZmode.
9707         * config/i386/i386.c (ix86_expand_branch) <case E_TImode>:
9708         Emulate LE, LEU, GT, GTU, LT, LTU, GE and GEU double-word comparisons
9709         with double-word subtraction.
9710         (put_condition_code): Handle CCGZmode.
9712 2017-10-18  Aldy Hernandez  <aldyh@redhat.com>
9714         * wide-int.cc (debug (const wide_int &)): New.
9715         (debug (const wide_int *)): New.
9716         (debug (const widest_int &)): New.
9717         (debug (const widest_int *)): New.
9719 2017-10-18  Vladimir Makarov  <vmakarov@redhat.com>
9721         PR middle-end/82556
9722         * lra-constraints.c (curr_insn_transform): Use non-input operand
9723         instead of output one for matched reload.
9725 2017-10-18  Bin Cheng  <bin.cheng@arm.com>
9727         * tree-loop-distribution.c (INCLUDE_ALGORITHM): New header file.
9728         (tree-ssa-loop-ivopts.h): New header file.
9729         (struct builtin_info): New fields.
9730         (classify_builtin_1): Compute and record base and offset parts for
9731         memset builtin partition by calling strip_offset.
9732         (offset_cmp, fuse_memset_builtins): New functions.
9733         (finalize_partitions): Fuse adjacent memset partitions by calling
9734         above function.
9735         * tree-ssa-loop-ivopts.c (strip_offset): Delete static declaration.
9736         Expose the interface.
9737         * tree-ssa-loop-ivopts.h (strip_offset): New declaration.
9739 2017-10-18  Bin Cheng  <bin.cheng@arm.com>
9741         PR tree-optimization/82574
9742         * tree-loop-distribution.c (find_single_drs): New parameter.  Check
9743         that data reference must be executed exactly once per iteration
9744         against the outermost loop in nest.
9745         (classify_partition): Update call to above function.
9747 2017-10-18  Richard Biener  <rguenther@suse.de>
9749         PR tree-optimization/82591
9750         * graphite.c (graphite_transform_loops): Move code gen message
9751         printing ...
9752         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
9753         Here.  Handle scop_to_isl_ast failing.
9754         (scop_to_isl_ast): Limit the number of ISL operations.
9756 2017-10-18  Richard Biener  <rguenther@suse.de>
9758         * graphite-isl-ast-to-gimple.c
9759         (translate_isl_ast_to_gimple::set_rename): Simplify.
9760         (translate_isl_ast_to_gimple::set_rename_for_each_def): Inline...
9761         (graphite_copy_stmts_from_block): ... here.
9762         (copy_bb_and_scalar_dependences): Simplify.
9763         (add_parameters_to_ivs_params): Canonicalize.
9764         (generate_entry_out_of_ssa_copies): Simplify.
9765         * graphite-sese-to-poly.c (extract_affine_name): Simplify
9766         by passing in ISL dimension.
9767         (parameter_index_in_region_1): Rename to ...
9768         (parameter_index_in_region): ... this.
9769         (extract_affine): Adjust assert, pass down parameter index.
9770         (add_param_constraints): Use range-info when available.
9771         (build_scop_context): Adjust.
9772         * sese.c (new_sese_info): Adjust.
9773         (free_sese_info): Likewise.
9774         * sese.h (bb_map_t, rename_map_t, phi_rename, init_back_edge_pair_t):
9775         Remove unused typedefs.
9776         (struct sese_info_t): Simplify rename_map, remove incomplete_phis.
9778 2017-10-18  Martin Liska  <mliska@suse.cz>
9780         * combine.c (simplify_compare_const): Add gcc_fallthrough.
9782 2017-10-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
9784         * config/s390/s390.c (s390_bb_fallthru_entry_likely): New function.
9785         (s390_sched_init): Do not reset s390_sched_state if we entered the
9786         current basic block via a fallthru edge and all others are unlikely.
9788 2017-10-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
9790         * config/s390/s390.c (NUM_SIDES): New variable.
9791         (LONGRUNNING_THRESHOLD): New variable.
9792         (LATENCY_FACTOR): New variable.
9793         (s390_sched_score): Decrease score for long-running instructions on
9794         wrong side.
9795         (s390_sched_variable_issue): Perform bookkeeping for long-running
9796         instructions.
9798 2017-10-18  Richard Biener  <rguenther@suse.de>
9800         * graphite-isl-ast-to-gimple.c (gcc_expression_from_isl_ast_expr_id):
9801         Simplify with removal of the parameter rename map.
9802         (set_rename): Likewise.
9803         (should_copy_to_new_region): Likewise.
9804         (graphite_copy_stmts_from_block): Likewise.
9805         (copy_bb_and_scalar_dependences): Remove initialization of
9806         unused copied_bb_map.
9807         (copy_def): Remove.
9808         (copy_internal_parameters): Likewise.
9809         (graphite_regenerate_ast_isl): Do not call copy_internal_parameters.
9810         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
9811         Use INTEGRAL_TYPE_P.
9812         (parameter_index_in_region_1): Rename to ...
9813         (assign_parameter_index_in_region): ... this.  Assert we have
9814         a parameter we handle.
9815         (scan_tree_for_params): Adjust.
9816         * sese.h (parameter_rename_map_t): Remove.
9817         (struct sese_info_t): Remove unused parameter_rename_map and
9818         copied_bb_map members.
9819         * sese.c (new_sese_info): Adjust.
9820         (free_sese_info): Likewise.
9822 2017-10-18  Martin Liska  <mliska@suse.cz>
9824         PR sanitizer/82545
9825         * asan.c (asan_expand_poison_ifn): Do not put gimple stmt
9826         on an abnormal edge.
9828 2017-10-18  Sebastian Huber  <sebastian.huber@embedded-brains.de>
9830         * doc/invoke.texi (ffunction-sections and fdata-sections):
9831         Update.
9833 2017-10-17  Eric Botcazou  <ebotcazou@adacore.com>
9835         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Bail out only if
9836         the use statement can throw internally.
9838 2017-10-17  Eric Botcazou  <ebotcazou@adacore.com>
9840         * config/visium/visium.c (visium_select_cc_mode): Return CCmode for
9841         any RTX present on the RHS of a SET.
9842         * compare-elim.c (try_eliminate_compare): Restore comment.
9844 2017-10-17  Jakub Jelinek  <jakub@redhat.com>
9846         * langhooks.h (struct lang_hooks): Document that tree_size langhook
9847         may be also called on tcc_type nodes.
9848         * langhooks.c (lhd_tree_size): Likewise.
9850 2017-10-17  David Malcolm  <dmalcolm@redhat.com>
9852         * gimple-ssa-sprintf.c (fmtwarn): Update for changed signature of
9853         format_warning_at_substring.
9854         (maybe_warn): Convert source_range * param to a location_t.  Pass
9855         UNKNOWN_LOCATION rather than NULL to fmtwarn.
9856         (format_directive): Remove code to extract source_ranges and
9857         source_range * in favor of just a location_t.
9858         (parse_directive): Pass UNKNOWN_LOCATION rather than NULL to
9859         fmtwarn.
9860         * substring-locations.c (format_warning_va): Convert
9861         source_range * param to a location_t.
9862         (format_warning_at_substring): Likewise.
9863         * substring-locations.h (format_warning_va): Likewise.
9864         (format_warning_at_substring): Likewise.
9866 2017-10-17  Jan Hubicka  <hubicka@ucw.cz>
9868         * target.h (enum vect_cost_for_stmt): Add vec_gather_load and
9869         vec_scatter_store
9870         * tree-vect-stmts.c (record_stmt_cost): Make difference between normal
9871         and scatter/gather ops.
9873         * aarch64/aarch64.c (aarch64_builtin_vectorization_cost): Add
9874         vec_gather_load and vec_scatter_store.
9875         * arm/arm.c (arm_builtin_vectorization_cost): Likewise.
9876         * powerpcspe/powerpcspe.c (rs6000_builtin_vectorization_cost): Likewise.
9877         * rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Likewise.
9878         * s390/s390.c (s390_builtin_vectorization_cost): Likewise.
9879         * spu/spu.c (spu_builtin_vectorization_cost): Likewise.
9880         * i386/i386.c (x86_builtin_vectorization_cost): Likewise.
9882 2017-10-17  Uros Bizjak  <ubizjak@gmail.com>
9884         * reg-stack.c (compare_for_stack_reg): Add bool argument.
9885         Detect FTST instruction and handle its register pops.  Only pop
9886         second operand if can_pop_second_op is true.
9887         (subst_stack_regs_pat) <case COMPARE>: Detect FCOMI instruction to
9888         set can_pop_second_op to false in the compare_for_stack_reg call.
9890         * config/i386/i386.md (*cmpi<FPCMP:unord><MODEF:mode>): Only call
9891         output_fp_compare for stack register operands.
9892         * config/i386/i386.c (output_fp_compare): Do not output SSE compare
9893         instructions here.  Do not emit stack register pops here.  Assert
9894         that FCOMPP pops next to top stack register.  Rewrite function.
9896 2017-10-17  Nathan Sidwell  <nathan@acm.org>
9898         PR middle-end/82577
9899         * alias.c (compare_base_decls): Check HAS_DECL_ASSEMBLER_NAME_P,
9900         use DECL_ASSEMBLER_NAME_RAW.
9902         PR middle-end/82546
9903         * tree.c (tree_code_size): Reformat.  Punt to lang hook for unknown
9904         TYPE nodes.
9906 2017-10-17  Qing Zhao <qing.zhao@oracle.com>
9907             Wilco Dijkstra <wilco.dijkstra@arm.com>
9909         * builtins.c (expand_builtin_update_setjmp_buf): Add a
9910         converstion to Pmode from the buf_addr.
9912 2017-10-17  Richard Biener  <rguenther@suse.de>
9914         * graphite-dependences.c (scop_get_reads_and_writes): Change
9915         output parameters to references.
9917 2017-10-17  Jackson Woodruff  <jackson.woodruff@arm.com>
9919         PR 71026/tree-optimization
9920         * fold-const.c (distribute_real_division): Removed.
9921         (fold_binary_loc): Remove calls to distribute_real_divison.
9923 2017-10-17  Richard Biener  <rguenther@suse.de>
9925         * graphite-scop-detection.c
9926         (scop_detection::stmt_has_simple_data_refs_p): Always use
9927         the full nest as region.
9928         (try_generate_gimple_bb): Likewise.
9929         * sese.c (scalar_evolution_in_region): Simplify now that
9930         SCEV can handle instantiation in regions.
9931         * tree-scalar-evolution.c (instantiate_scev_name): Also instantiate
9932         in the non-loop part of a function if requested.
9934 2017-10-17  Richard Biener  <rguenther@suse.de>
9936         PR tree-optimization/82563
9937         * graphite-isl-ast-to-gimple.c (generate_entry_out_of_ssa_copies):
9938         New function.
9939         (graphite_regenerate_ast_isl): Call it.
9940         * graphite-scop-detection.c (build_scops): Remove entry edge split.
9942 2017-10-17  Jakub Jelinek  <jakub@redhat.com>
9944         PR tree-optimization/82549
9945         * fold-const.c (optimize_bit_field_compare, fold_truth_andor_1):
9946         Formatting fixes.  Instead of calling make_bit_field_ref with negative
9947         bitpos return 0.
9949 2017-10-17  Olga Makhotina  <olga.makhotina@intel.com>
9951         * config/i386/avx512dqintrin.h (_mm_mask_reduce_sd,
9952         _mm_maskz_reduce_sd, _mm_mask_reduce_ss,=20
9953         _mm_maskz_reduce_ss): New.
9954         * config/i386/i386-builtin.def (__builtin_ia32_reducesd_mask,
9955         __builtin_ia32_reducess_mask): Ditto..
9956         (__builtin_ia32_reducesd, __builtin_ia32_reducess): Remove.
9957         * config/i386/sse.md (reduces<mode>): Renamed to ...
9958         (reduces<mode><mask_scalar_name>): ... this.
9959         (vreduce<ssescalarmodesuffix>\t{%3, %2, %1, %0|%0, %1, %2, %3}):
9960         Changed to ...
9961         (vreduce<ssescalarmodesuffix>\t{%3, %2, %1, %0<mask_scalar_operand4>|
9962         %0<mask_scalar_operand4>, %1, %2, %3}): ... this.
9964 2017-10-16  David Malcolm  <dmalcolm@redhat.com>
9966         * Makefile.in (OBJS): Add unique-ptr-tests.o.
9967         * selftest-run-tests.c (selftest::run_tests): Call
9968         selftest::unique_ptr_tests_cc_tests.
9969         * selftest.h (selftest::unique_ptr_tests_cc_tests): New decl.
9970         * unique-ptr-tests.cc: New file.
9972 2017-10-16  Vladimir Makarov  <vmakarov@redhat.com>
9974         PR sanitizer/82353
9975         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
9976         locations.
9977         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
9978         (make_hard_regno_born, make_hard_regno_dead): Update
9979         bb_killed_pseudos and bb_gen_pseudos for fixed regs.
9981 2017-10-16  Jeff Law  <law@redhat.com>
9983         * tree-ssa-dse.c (live_bytes_read): Fix thinko.
9985 2017-10-16  Jan Hubicka  <hubicka@ucw.cz>
9987         * x86-tune-costs.h (znver1_cost): Fix move cost tables.
9989 2017-10-16  Olivier Hainque  <hainque@adacore.com>
9991         * gcc/config.gcc (powerpc*-*-*spe*): Pick 8548 as the default
9992         with_cpu if we were configured for an e500v2 target cpu name.
9994 2017-10-16  Thomas Preud'homme  <thomas.preudhomme@arm.com>
9996         * config/arm/arm-cpus.in (cortex-m33): Add nodsp option.
9997         * doc/invoke.texi: Document +nodsp as a valid extension for
9998         -mcpu=cortex-m33.
10000 2017-10-16  Martin Liska  <mliska@suse.cz>
10002         * sbitmap.c (bitmap_bit_in_range_p_checking): New function.
10003         (test_set_range): Likewise.
10004         (test_range_functions): Rename to ...
10005         (test_bit_in_range): ... this.
10006         (sbitmap_c_tests): Add new test.
10008 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
10010         * config/aarch64/arm_neon.h (vdot_u32, vdotq_u32, vdot_s32, vdotq_s32):
10011         New.
10012         (vdot_lane_u32, vdot_laneq_u32, vdotq_lane_u32, vdotq_laneq_u32): New.
10013         (vdot_lane_s32, vdot_laneq_s32, vdotq_lane_s32, vdotq_laneq_s32): New.
10015 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
10017         * config/aarch64/aarch64-builtins.c
10018         (aarch64_types_quadopu_lane_qualifiers): New.
10019         (TYPES_QUADOPU_LANE): New.
10020         * config/aarch64/aarch64-simd.md (aarch64_<sur>dot<vsi2qi>): New.
10021         (<sur>dot_prod<vsi2qi>, aarch64_<sur>dot_lane<vsi2qi>): New.
10022         (aarch64_<sur>dot_laneq<vsi2qi>): New.
10023         * config/aarch64/aarch64-simd-builtins.def (sdot, udot): New.
10024         (sdot_lane, udot_lane, sdot_laneq, udot_laneq): New.
10025         * config/aarch64/iterators.md (sur): Add UNSPEC_SDOT, UNSPEC_UDOT.
10026         (Vdottype, DOTPROD): New.
10027         (sur): Add SDOT and UDOT.
10029 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
10031         * config/aarch64/aarch64.h (AARCH64_FL_DOTPROD): New.
10032         (AARCH64_ISA_DOTPROD, TARGET_DOTPROD): New.
10033         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
10034         Add TARGET_DOTPROD.
10035         * config/aarch64/aarch64-option-extensions.def (dotprod): New.
10036         * config/aarch64/aarch64-cores.def (cortex-a55, cortex-a75):
10037         Enable TARGET_DOTPROD.
10038         (cortex-a75.cortex-a55): Likewise.
10039         * doc/invoke.texi (aarch64-feature-modifiers): Document dotprod.
10041 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
10043         * config/arm/arm-builtins.c (arm_unsigned_uternop_qualifiers): New.
10044         (UTERNOP_QUALIFIERS, arm_umac_lane_qualifiers, UMAC_LANE_QUALIFIERS):
10045         New.
10046         * config/arm/arm_neon_builtins.def (sdot, udot, sdot_lane, udot_lane):
10047         New.
10048         * config/arm/iterators.md (DOTPROD, VSI2QI, vsi2qi): New.
10049         (UNSPEC_DOT_S, UNSPEC_DOT_U, opsuffix): New.
10050         * config/arm/neon.md (neon_<sup>dot<vsi2qi>): New.
10051         (neon_<sup>dot_lane<vsi2qi>, <sup>dot_prod<vsi2qi>): New.
10052         * config/arm/types.md (neon_dot, neon_dot_q): New.
10053         * config/arm/unspecs.md (sup): Add UNSPEC_DOT_S, UNSPEC_DOT_U.
10055 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
10057         * config/arm/arm.h (TARGET_DOTPROD): New.
10058         * config/arm/arm.c (arm_arch_dotprod): New.
10059         (arm_option_reconfigure_globals): Add arm_arch_dotprod.
10060         * config/arm/arm-c.c (__ARM_FEATURE_DOTPROD): New.
10061         * config/arm/arm-cpus.in (armv8.2-a): Enabled +dotprod.
10062         (feature dotprod, group dotprod, ALL_SIMD_INTERNAL): New.
10063         (ALL_FPU_INTERNAL): Use ALL_SIMD_INTERNAL.
10064         * config/arm/t-multilib (v8_2_a_simd_variants): Add dotprod.
10065         * doc/invoke.texi (armv8.2-a): Document dotprod
10067 2017-10-14  Jan Hubicka  <hubicka@ucw.cz>
10069         * i386.c (ix86_vec_cost): New function.
10070         (ix86_rtx_costs): Handle vector operations better.
10071         * i386.h (struct processor_costs): Add sse_op, fmasd, fmass.
10072         * x86-tune-costs.h: Add new costs to all tables.
10074 2017-10-14  Jan Hubicka  <hubicka@ucw.cz>
10076         * i386.c (ix86_rtx_costs): Make difference between x87 and SSE
10077         operations.
10078         * i386.h (struct processor_costs): Add addss, mulss, mulsd, divss,
10079         divsd, sqrtss and sqrtsd
10080         * x86-tune-costs.h: Add new entries to all costs.
10081         (znver1_cost): Fix to match real instruction latencies.
10083 2017-10-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10084             Michael Collison <michael.collison@arm.com>
10086         * compare-elim.c: Include emit-rtl.h.
10087         (can_merge_compare_into_arith): New function.
10088         (try_validate_parallel): Likewise.
10089         (try_merge_compare): Likewise.
10090         (try_eliminate_compare): Call the above when no previous clobber
10091         is available.
10092         (execute_compare_elim_after_reload): Add DF_UD_CHAIN and DF_DU_CHAIN
10093         dataflow problems.
10095 2017-10-14  Jakub Jelinek  <jakub@redhat.com>
10097         PR middle-end/62263
10098         PR middle-end/82498
10099         * tree-ssa-phiopt.c (value_replacement): Comment fix.  Handle
10100         up to 2 preparation statements for ASSIGN in MIDDLE_BB.
10102         PR middle-end/62263
10103         PR middle-end/82498
10104         * tree-ssa-forwprop.c (simplify_rotate): Allow def_arg1[N]
10105         to be any operand_equal_p operands.  For & (B - 1) require
10106         B to be power of 2.  Recognize
10107         (X << (Y & (B - 1))) | (X >> ((-Y) & (B - 1))) and similar patterns.
10109 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
10111         PR bootstrap/82553
10112         * optabs.c (expand_memory_blockage): Fix call of
10113         targetm.have_memory_blockage.
10115 2017-10-14  Jakub Jelinek  <jakub@redhat.com>
10117         PR bootstrap/82548
10118         * config.gcc (*-*-solaris2*, i[34567]86-*-cygwin*,
10119         x86_64-*-cygwin*, i[34567]86-*-mingw* | x86_64-*-mingw*): Append
10120         objects to extra_objs instead of overwriting it.
10122 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
10124         * config/i386/sync.md (FILD_ATOMIC/FIST_ATOMIC FP load peephole2):
10125         Use any_fp_register_operand as operand[3] predicate.  Simplify
10126         equality test for operands[2] and operands[4] memory location.
10127         (LDX_ATOMIC/STX_ATOMIC FP load peephole2): Ditto.
10128         (FILD_ATOMIC/FIST_ATOMIC FP load peephole2 with mem blockage): New.
10129         (LDX_ATOMIC/LDX_ATOMIC FP load peephole2 with mem blockage): Ditto.
10130         (FILD_ATOMIC/FIST_ATOMIC FP store peephole2): Use
10131         any_fp_register_operand as operand[1] predicate.  Simplify
10132         equality test for operands[0] and operands[3] memory location.
10133         (LDX_ATOMIC/STX_ATOMIC FP store peephole2): Ditto.
10134         (FILD_ATOMIC/FIST_ATOMIC FP store peephole2 with mem blockage): New.
10135         (LDX_ATOMIC/LDX_ATOMIC FP storepeephole2 with mem blockage): Ditto.
10137 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
10139         * target-insns.def: Add memory_blockage.
10140         * optabs.c (expand_memory_blockage): New function.
10141         (expand_asm_memory_barrier): Rename ...
10142         (expand_asm_memory_blockage): ... to this.
10143         (expand_mem_thread_fence): Call expand_memory_blockage
10144         instead of expand_asm_memory_barrier.
10145         (expand_mem_singnal_fence): Ditto.
10146         (expand_atomic_load): Ditto.
10147         (expand_atomic_store): Ditto.
10148         * doc/md.texi (Standard Pattern Names For Generation):
10149         Document memory_blockage instruction pattern.
10151 2017-10-13  Sebastian Perta  <sebastian.perta@renesas.com>
10153         * config/rl78/rl78.c (rl78_emit_libcall): New function.
10154         * config/rl78/rl78-protos.h (rl78_emit_libcall): New function.
10155         * config/rl78/rl78.md: New define_expand "adddi3".
10157 2017-10-13  Jan Hubicka  <hubicka@ucw.cz>
10159         * cfghooks.c (verify_flow_info): Disable check that all probabilities
10160         are set correctly.
10162 2017-10-13  Jeff Law  <law@redhat.com>
10164         * tree-ssa-reassoc.c (reassociate_bb): Clarify code slighly.
10166 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
10168         PR target/82274
10169         * internal-fn.c (expand_mul_overflow): If both operands have
10170         the same highpart of -1 or 0 and the topmost bit of lowpart
10171         is different, overflow is if res <= 0 rather than res < 0.
10173 2017-10-13  Pat Haugen  <pthaugen@us.ibm.com>
10175         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Remove
10176         TARGET_P9_VECTOR code for unaligned_load case.
10178 2017-10-13  Jan Hubicka  <hubicka@ucw.cz>
10180         * cfghooks.c (verify_flow_info): Check that edge probabilities are set.
10182 2017-10-13  Nathan Sidwell  <nathan@acm.org>
10184         * tree-core.h (tree_contains_struct): Make bool.
10185         * tree.c (tree_contains_struct): Likewise.
10186         * tree.h (MARK_TS_BASE): Remove do ... while (0) idiom.
10187         (MARK_TS_TYPED, MARK_TS_COMMON, MARK_TS_TYPE_COMMON,
10188         MARK_TS_TYPE_WITH_LANG_SPECIFIC, MARK_TS_DECL_MINIMAL,
10189         MARK_TS_DECL_COMMON, MARK_TS_DECL_WRTL, MARK_TS_DECL_WITH_VIS,
10190         MARK_TS_DECL_NON_COMMON): Likewise, use comma operator.
10192 2017-10-13  Richard Biener  <rguenther@suse.de>
10194         * graphite-isl-ast-to-gimple.c
10195         (translate_isl_ast_to_gimple::get_rename_from_scev): Remove unused
10196         parameters and dominance check.
10197         (translate_isl_ast_to_gimple::graphite_copy_stmts_from_block): Adjust.
10198         (translate_isl_ast_to_gimple::copy_bb_and_scalar_dependences): Likewise.
10199         (translate_isl_ast_to_gimple::graphite_regenerate_ast_isl):
10200         Do not update SSA form here or do intermediate IL verification.
10201         * graphite.c: Include tree-ssa.h and tree-into-ssa.h.
10202         (graphite_initialize): Remove check on the number of loops in
10203         the function and inline into graphite_transform_loops.
10204         (graphite_finalize): Inline into graphite_transform_loops.
10205         (graphite_transform_loops): Perform SSA update and IL verification
10206         here.
10207         * params.def (PARAM_GRAPHITE_MIN_LOOPS_PER_FUNCTION): Remove.
10209 2017-10-13  Richard Biener  <rguenther@suse.de>
10211         * graphite-isl-ast-to-gimple.c (max_mode_int_precision,
10212         graphite_expression_type_precision): Avoid global constructor
10213         by moving ...
10214         (translate_isl_ast_to_gimple::translate_isl_ast_to_gimple): Here.
10215         (translate_isl_ast_to_gimple::graphite_expr_type): Add type member.
10216         (translate_isl_ast_to_gimple::translate_isl_ast_node_for): Use it.
10217         (translate_isl_ast_to_gimple::build_iv_mapping): Likewise.
10218         (translate_isl_ast_to_gimple::graphite_create_new_guard): Likewise.
10219         * graphite-sese-to-poly.c (build_original_schedule): Return nothing.
10221 2017-10-13  H.J. Lu  <hongjiu.lu@intel.com>
10223         PR target/82499
10224         * config/i386/i386.h (ix86_red_zone_size): New.
10225         * config/i386/i386.md (push peephole2s): Replace
10226         "!ix86_using_red_zone ()" with "ix86_red_zone_size == 0".
10228 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
10229             Alan Hayward  <alan.hayward@arm.com>
10230             David Sherwood  <david.sherwood@arm.com>
10232         * combine.c (can_change_dest_mode): Reject changes in
10233         REGMODE_NATURAL_SIZE.
10235 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
10236             Alan Hayward  <alan.hayward@arm.com>
10237             David Sherwood  <david.sherwood@arm.com>
10239         * cfgexpand.c (expand_debug_expr): Use GET_MODE_UNIT_BITSIZE.
10240         (expand_debug_source_expr): Likewise.
10241         * combine.c (combine_simplify_rtx): Likewise.
10242         * cse.c (fold_rtx): Likewise.
10243         * fwprop.c (canonicalize_address): Likewise.
10244         * targhooks.c (default_shift_truncation_mask): Likewise.
10246 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
10247             Alan Hayward  <alan.hayward@arm.com>
10248             David Sherwood  <david.sherwood@arm.com>
10250         * optabs.c (add_equal_note): Use GET_MODE_UNIT_SIZE.
10251         (widened_mode): Likewise.
10252         (expand_unop): Likewise.
10253         * ree.c (transform_ifelse): Likewise.
10254         (merge_def_and_ext): Likewise.
10255         (combine_reaching_defs): Likewise.
10256         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
10258 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
10259             Alan Hayward  <alan.hayward@arm.com>
10260             David Sherwood  <david.sherwood@arm.com>
10262         * caller-save.c (replace_reg_with_saved_mem): Use byte_lowpart_offset.
10263         * combine.c (gen_lowpart_for_combine): Likewise.
10264         * dwarf2out.c (rtl_for_decl_location): Likewise.
10265         * final.c (alter_subreg): Likewise.
10266         * rtlhooks.c (gen_lowpart_general): Likewise.
10267         (gen_lowpart_if_possible): Likewise.
10269 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
10270             Alan Hayward  <alan.hayward@arm.com>
10271             David Sherwood  <david.sherwood@arm.com>
10273         * calls.c (expand_call): Use subreg_lowpart_offset.
10274         * cse.c (cse_insn): Likewise.
10275         * regcprop.c (copy_value): Likewise.
10276         (copyprop_hardreg_forward_1): Likewise.
10278 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
10280         PR target/82524
10281         * config/i386/i386.md (addqi_ext_1, andqi_ext_1,
10282         *andqi_ext_1_cc, *<code>qi_ext_1, *xorqi_ext_1_cc): Change
10283         =Q constraints to +Q and into insn condition add check
10284         that operands[0] and operands[1] are equal.
10285         (*addqi_ext_2, *andqi_ext_2, *<code>qi_ext_2): Change
10286         =Q constraints to +Q and into insn condition add check
10287         that operands[0] is equal to either operands[1] or operands[2].
10289         PR target/82498
10290         * fold-const.c (fold_binary_loc) <bit_rotate>: Code cleanups,
10291         instead of handling MINUS_EXPR twice (once for each argument),
10292         canonicalize operand order and handle just once, use rtype where
10293         possible.  Handle (A << B) | (A >> (-B & (Z - 1))).
10295         PR target/82498
10296         * config/i386/ia32intrin.h (__rold, __rord, __rolq, __rorq): Allow
10297         any values of __C while still being pattern recognizable as a simple
10298         rotate instruction.
10300 2017-10-13  Richard Biener  <rguenther@suse.de>
10302         PR tree-optimization/82451
10303         Revert
10304         2017-10-02  Richard Biener  <rguenther@suse.de>
10306         PR tree-optimization/82355
10307         * graphite-isl-ast-to-gimple.c (build_iv_mapping): Also build
10308         a mapping for the enclosing loop but avoid generating one for
10309         the loop tree root.
10310         (copy_bb_and_scalar_dependences): Remove premature codegen
10311         error on PHIs in blocks duplicated into multiple places.
10312         * graphite-scop-detection.c
10313         (scop_detection::stmt_has_simple_data_refs_p): For a loop not
10314         in the region use it as loop and nest to analyze the DR in.
10315         (try_generate_gimple_bb): Likewise.
10316         * graphite-sese-to-poly.c (extract_affine_chrec): Adjust.
10317         (add_loop_constraints): For blocks in a loop not in the region
10318         create a dimension with a single iteration.
10319         * sese.h (gbb_loop_at_index): Remove assert.
10321         * cfgloop.c (loop_preheader_edge): For the loop tree root
10322         return the single successor of the entry block.
10323         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
10324         Reset the SCEV hashtable and niters.
10325         * graphite-scop-detection.c
10326         (scop_detection::graphite_can_represent_scev): Add SCOP parameter,
10327         assert that we only have POLYNOMIAL_CHREC that vary in loops
10328         contained in the region.
10329         (scop_detection::graphite_can_represent_expr): Adjust.
10330         (scop_detection::stmt_has_simple_data_refs_p): For loops
10331         not in the region set loop to NULL.  The nest is now the
10332         entry edge to the region.
10333         (try_generate_gimple_bb): Likewise.
10334         * sese.c (scalar_evolution_in_region): Adjust for
10335         instantiate_scev change.
10336         * tree-data-ref.h (graphite_find_data_references_in_stmt):
10337         Make nest parameter the edge into the region.
10338         (create_data_ref): Likewise.
10339         * tree-data-ref.c (dr_analyze_indices): Make nest parameter an
10340         entry edge into a region and adjust instantiate_scev calls.
10341         (create_data_ref): Likewise.
10342         (graphite_find_data_references_in_stmt): Likewise.
10343         (find_data_references_in_stmt): Pass the loop preheader edge
10344         from the nest argument.
10345         * tree-scalar-evolution.h (instantiate_scev): Make instantiate_below
10346         parameter the edge into the region.
10347         (instantiate_parameters): Use the loop preheader edge as entry.
10348         * tree-scalar-evolution.c (analyze_scalar_evolution): Handle
10349         NULL loop.
10350         (get_instantiated_value_entry): Make instantiate_below parameter
10351         the edge into the region.
10352         (instantiate_scev_name): Likewise.  Adjust dominance checks,
10353         when we cannot use loop-based instantiation instantiate by
10354         walking use-def chains.
10355         (instantiate_scev_poly): Adjust.
10356         (instantiate_scev_binary): Likewise.
10357         (instantiate_scev_convert): Likewise.
10358         (instantiate_scev_not): Likewise.
10359         (instantiate_array_ref): Remove.
10360         (instantiate_scev_3): Likewise.
10361         (instantiate_scev_2): Likewise.
10362         (instantiate_scev_1): Likewise.
10363         (instantiate_scev_r): Do not blindly handle N-operand trees.
10364         Do not instantiate array-refs.  Handle all constants and invariants.
10365         (instantiate_scev): Make instantiate_below parameter
10366         the edge into the region.
10367         (resolve_mixers): Use the loop preheader edge for the region
10368         parameter to instantiate_scev_r.
10369         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Adjust.
10371 2017-10-13  Richard Biener  <rguenther@suse.de>
10373         PR tree-optimization/82525
10374         * graphite-isl-ast-to-gimple.c
10375         (translate_isl_ast_to_gimple::widest_int_from_isl_expr_int): Split
10376         out from ...
10377         (translate_isl_ast_to_gimple::gcc_expression_from_isl_expr_int): Here.
10378         Fail code generation when we cannot represent the isl integer.
10379         (binary_op_to_tree): Elide modulo operations that are no-ops
10380         in the type we code generate.  Remove now superfluous code
10381         generation errors.
10383 2017-10-13  Richard Biener  <rguenther@suse.de>
10385         * graphite-scop-detection.c (loop_ivs_can_be_represented): Remove.
10386         (scop_detection::harmful_loop_in_region): Remove premature
10387         IV type restriction.
10388         (scop_detection::graphite_can_represent_scev): We can handle
10389         pointer IVs just fine.
10391 2017-10-13  Alan Modra  <amodra@gmail.com>
10393         * doc/extend.texi (Extended Asm <Clobbers>): Rename to
10394         "Clobbers and Scratch Registers".  Add paragraph on
10395         alternative to clobbers for scratch registers and OpenBLAS
10396         example.
10398 2017-10-13  Alan Modra  <amodra@gmail.com>
10400         * doc/extend.texi (Clobbers): Correct vax example.  Delete old
10401         example of a memory input for a string of known length.  Move
10402         commentary out of table.  Add a number of new examples
10403         covering array memory inputs.
10405 2017-10-12  Martin Liska  <mliska@suse.cz>
10407         PR tree-optimization/82493
10408         * sbitmap.c (bitmap_bit_in_range_p): Fix the implementation.
10409         (test_range_functions): New function.
10410         (sbitmap_c_tests): Likewise.
10411         * selftest-run-tests.c (selftest::run_tests): Run new tests.
10412         * selftest.h (sbitmap_c_tests): New function.
10414         * tree-ssa-dse.c (live_bytes_read): Fix thinko.
10416 2017-10-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
10418         * config/rs6000/amo.h: Fix spacing issue.
10420 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
10422         PR target/82498
10423         * config/i386/i386.md (*ashl<mode>3_mask_1,
10424         *<shift_insn><mode>3_mask_1, *<rotate_insn><mode>3_mask_1,
10425         *<btsc><mode>_mask_1, *btr<mode>_mask_1): New define_insn_and_split
10426         patterns.
10428 2017-10-12  Jan Hubicka  <hubicka@ucw.cz>
10430         * profile-count.h (safe_scale_64bit): Fix GCC4.x path.
10431         (profile_probability): Set max_probability
10432         to (uint32_t) 1 << (n_bits - 2) and update accessors to avoid overlfows
10433         in temporaries.
10434         * profile-count.c (profile_probability::differs_from_p): Do not
10435         rely on max_probaiblity == 10000
10437 2017-10-12  Jeff Law  <law@redhat.com>
10439         * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject ao_refs with
10440         negative offsets.
10442 2017-10-12  Martin Sebor  <msebor@redhat.com>
10444         PR other/82301
10445         PR c/82435
10446         * cgraphunit.c (maybe_diag_incompatible_alias): New function.
10447         (handle_alias_pairs): Call it.
10448         * common.opt (-Wattribute-alias): New option.
10449         * doc/extend.texi (ifunc attribute): Discuss C++ specifics.
10450         * doc/invoke.texi (-Wattribute-alias): Document.
10452 2017-10-12  Vladimir Makarov  <vmakarov@redhat.com>
10454         Revert
10455         2017-10-11  Vladimir Makarov  <vmakarov@redhat.com>
10456         PR sanitizer/82353
10457         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
10458         locations.
10459         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
10460         (make_hard_regno_born, make_hard_regno_dead): Update
10461         bb_killed_pseudos and bb_gen_pseudos.
10463 2017-10-12  Jan Hubicka  <hubicka@ucw.cz>
10465         * config/i386/x86-tune-sched.c (ix86_adjust_cost): Fix Zen support.
10467 2017-10-12  Uros Bizjak  <ubizjak@gmail.com>
10469         * config/alpha/alpha.c (alpha_split_conditional_move):
10470         Use std::swap instead of manually swapping.
10471         (alpha_stdarg_optimize_hook): Ditto.
10472         (alpha_canonicalize_comparison): Ditto.
10474 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
10476         * tree-loop-distribution.c (struct builtin_info): New struct.
10477         (struct partition): Refactor fields into struct builtin_info.
10478         (partition_free): Free struct builtin_info.
10479         (build_size_arg_loc, build_addr_arg_loc): Delete.
10480         (generate_memset_builtin, generate_memcpy_builtin): Get memory range
10481         information from struct builtin_info.
10482         (find_single_drs): New function refactored from classify_partition.
10483         Also moved builtin validity checks to this function.
10484         (compute_access_range, alloc_builtin): New functions.
10485         (classify_builtin_st, classify_builtin_ldst): New functions.
10486         (classify_partition): Refactor code into functions find_single_drs,
10487         classify_builtin_st and classify_builtin_ldst.
10488         (distribute_loop): Don't do runtime alias check when distributing
10489         loop nest.
10490         (find_seed_stmts_for_distribution): New function.
10491         (pass_loop_distribution::execute): Refactor code finding seed
10492         stmts into above function.  Support distribution for the innermost
10493         two-level loop nest.  Adjust dump information.
10495 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
10497         * tree-loop-distribution.c: Adjust the general comment.
10498         (NUM_PARTITION_THRESHOLD): New macro.
10499         (ssa_name_has_uses_outside_loop_p): Support loop nest distribution.
10500         (classify_partition): Skip builtin pattern of loop nest's inner loop.
10501         (merge_dep_scc_partitions): New parameter ignore_alias_p and use it
10502         in call to build_partition_graph.
10503         (finalize_partitions): New parameter.  Make loop distribution more
10504         conservative by fusing more partitions.
10505         (distribute_loop): Don't do runtime alias check in case of loop nest
10506         distribution.
10507         (find_seed_stmts_for_distribution): New function.
10508         (prepare_perfect_loop_nest): New function.
10509         (pass_loop_distribution::execute): Refactor code finding seed stmts
10510         and loop nest into above functions.  Support loop nest distribution.
10511         Adjust dump information accordingly.
10513 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
10515         * tree-loop-distribution.c (break_alias_scc_partitions): Add comment
10516         and set PTYPE_SEQUENTIAL for merged partition.
10518 2017-10-12  Richard Biener  <rguenther@suse.de>
10520         PR tree-optimization/69728
10521         Revert
10522         2017-09-19  Richard Biener  <rguenther@suse.de>
10524         PR tree-optimization/69728
10525         * graphite-sese-to-poly.c (schedule_error): New global.
10526         (add_loop_schedule): Handle empty domain by failing the
10527         schedule.
10528         (build_original_schedule): Handle schedule_error.
10530         * graphite-sese-to-poly.c (add_loop_schedule): Handle empty
10531         domain by returning an unchanged schedule.
10533 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
10535         * genrecog.c (validate_pattern): For VEC_SELECT verify that
10536         CONST_INT selectors are 0 to GET_MODE_NUNITS (imode) - 1.
10538 2017-10-12  Aldy Hernandez  <aldyh@redhat.com>
10540         * Makefile.in (TAGS): Merge all the *.def files into one pattern.
10541         Handle params.def.
10543 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
10545         PR c++/82159
10546         * expr.c (store_field): Don't optimize away bitsize == 0 store
10547         from CALL_EXPR with addressable return type.
10549 2017-10-11  Segher Boessenkool  <segher@kernel.crashing.org>
10551         * config/rs6000/rs6000.h (TARGET_ISEL64): Delete.
10552         * config/rs6000/rs6000.md (sel): Delete mode attribute.
10553         (mov<mode>cc, isel_signed_<mode>, isel_unsigned_<mode>,
10554         *isel_reversed_signed_<mode>, *isel_reversed_unsigned_<mode>): Use
10555         TARGET_ISEL instead of TARGET_ISEL<sel>.
10557 2017-10-11  David Edelsohn  <dje.gcc@gmail.com>
10559         * config/rs6000/rs6000.c
10560         (rs6000_xcoff_asm_output_aligned_decl_common): Test for NULL decl.
10562 2017-10-11  Segher Boessenkool  <segher@kernel.crashing.org>
10564         * config/rs6000/predicates.md (zero_constant, all_ones_constant):
10565         Move up in file.
10566         (reg_or_cint_operand): Fix comment.
10567         (reg_or_zero_operand): New predicate.
10568         * config/rs6000/rs6000-protos.h (output_isel): Delete.
10569         * config/rs6000/rs6000.c (output_isel): Delete.
10570         * config/rs6000/rs6000.md (isel_signed_<mode>): Use reg_or_zero_operand
10571         instead of reg_or_cint_operand.  Output instruction directly (not via
10572         output_isel).
10573         (isel_unsigned_<mode>): Ditto.
10574         (*isel_reversed_signed_<mode>): Use reg_or_zero_operand instead of
10575         gpc_reg_operand.  Add an instruction alternative for this.  Output
10576         instruction directly.
10577         (*isel_reversed_unsigned_<mode>): Ditto.
10579 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
10581         * config/i386/i386.c (ix86_canonicalize_comparison): New function.
10582         (TARGET_CANONICALIZE_COMPARISON): Define.
10584 2017-10-11  Qing Zhao  <qing.zhao@oracle.com>
10586         PR target/81422
10587         * config/aarch64/aarch64.c (aarch64_load_symref_appropriately):
10588         Check whether the dest is REG before adding REG_EQUIV note.
10590 2017-10-11  Vladimir Makarov  <vmakarov@redhat.com>
10592         PR sanitizer/82353
10593         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
10594         locations.
10595         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
10596         (make_hard_regno_born, make_hard_regno_dead): Update
10597         bb_killed_pseudos and bb_gen_pseudos.
10599 2017-10-11  Nathan Sidwell  <nathan@acm.org>
10601         * incpath.h (enum incpath_kind): Name enum, prefix values.
10602         (add_path, add_cpp_dir_path, get_added_cpp_dirs): Use incpath_kind.
10603         * incpath.c (heads, tails): Use INC_MAX.
10604         (add_env_var_paths, add_standard_paths): Use incpath_kind.
10605         (merge_include_chains, split_quote_chain,
10606         register_include_chains): Update incpath_kind names.
10607         (add_cpp_dir_path, add_path, get_added_cpp_dirs): Use incpath_kind.
10608         * config/darwin-c.c (add_system_framework_path): Update incpath_kind
10609         names.
10610         (add_framework_path, darwin_register_objc_includes): Likewise.
10611         * config/vms/vms-c.c (vms_c_register_includes): Likewise.
10613 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
10615         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
10616         Do not use float_operator operator predicate.
10617         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
10618         * config/i386/predicates.md (float_operator): Remove predicate.
10620 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
10622         * config/i386/i386.md (*jcc<mode>_0_i387): Remove insn pattern.
10623         (*jccxf_i387): Ditto.
10624         (*jcc<mode>_i387): Ditto.
10625         (*jccu<mode>_i387): Ditto.
10626         (*jcc<X87MODEF:mode>_<SWI24:mode>_i387): Ditto.
10627         (*jcc_*_i387 splitters): Remove.
10628         * config/i386/i386-protos.h (ix86_split_fp_branch): Remove prototype.
10629         * config/i386/i386.c (ix86_split_fp_branch): Remove.
10630         * config/i386/predicates.md (ix86_swapped_fp_comparison_operator):
10631         Remove predicate.
10633 2017-10-11  Jan Hubicka  <hubicka@ucw.cz>
10635         * profile-count.h (slow_safe_scale_64bit): New function.
10636         (safe_scale_64bit): New inline.
10637         (profile_count::max_safe_multiplier): Remove; use safe_scale_64bit.
10638         * profile-count.c: Include wide-int.h
10639         (slow_safe_scale_64bit): New.
10641 2017-10-11  Nathan Sidwell  <nathan@acm.org>
10643         * tree.h (DECL_ASSEMBLER_NAME_SET_P): Don't check
10644         HAS_DECL_ASSEMBLER_NAME_P.
10645         * gimple-expr.c (gimple_decl_printable_name: Check
10646         HAS_DECL_ASSEMBLER_NAME_P too.
10647         * ipa-utils.h (type_in_anonymous_namespace_p): Check
10648         DECL_ASSEMBLER_NAME_SET_P of TYPE_NAME.
10649         (odr_type_p): No need to assert TYPE_NAME is a TYPE_DECL.
10650         * passes.c (rest_of_decl_compilation): Check
10651         HAS_DECL_ASSEMBLER_NAME_P too.
10652         * recog.c (verify_changes): Likewise.
10653         * tree-pretty-print.c (dump_decl_name): Likewise.
10654         * tree-ssa-structalias.c (alias_get_name): Likewise.  Reimplement.
10656         * tree.h (DECL_ASSEMBLER_NAME_RAW): New.
10657         (SET_DECL_ASSEMBLER_NAME): Use it.
10658         (DECL_ASSEMBLER_NAME_SET_P): Likewise.
10659         (COPY_DECL_ASSEMBLER_NAME): Likewise.
10660         * tree.c (decl_assembler_name): Use DECL_ASSEMBLER_NAME_RAW.
10662 2017-10-11  Jan Hubicka  <hubicka@ucw.cz>
10664         * config.gcc (i386, x86_64): Add extra objects.
10665         * config/i386/i386-protos.h (ix86_rip_relative_addr_p): Declare.
10666         (ix86_min_insn_size): Declare.
10667         (ix86_issue_rate): Declare.
10668         (ix86_adjust_cost): Declare.
10669         (ia32_multipass_dfa_lookahead): Declare.
10670         (ix86_macro_fusion_p): Declare.
10671         (ix86_macro_fusion_pair_p): Declare.
10672         (ix86_bd_has_dispatch): Declare.
10673         (ix86_bd_do_dispatch): Declare.
10674         (ix86_core2i7_init_hooks): Declare.
10675         (ix86_atom_sched_reorder): Declare.
10676         * config/i386/i386.c Move all CPU cost tables to x86-tune-costs.h.
10677         (COSTS_N_BYTES): Move to x86-tune-costs.h.
10678         (DUMMY_STRINGOP_ALGS):Move to x86-tune-costs.h.
10679         (rip_relative_addr_p): Rename to ...
10680         (ix86_rip_relative_addr_p): ... this one; export.
10681         (memory_address_length): Update.
10682         (ix86_issue_rate): Move to x86-tune-sched.c.
10683         (ix86_flags_dependent): Move to x86-tune-sched.c.
10684         (ix86_agi_dependent): Move to x86-tune-sched.c.
10685         (exact_dependency_1): Move to x86-tune-sched.c.
10686         (exact_store_load_dependency): Move to x86-tune-sched.c.
10687         (ix86_adjust_cost): Move to x86-tune-sched.c.
10688         (ia32_multipass_dfa_lookahead): Move to x86-tune-sched.c.
10689         (ix86_macro_fusion_p): Move to x86-tune-sched.c.
10690         (ix86_macro_fusion_pair_p): Move to x86-tune-sched.c.
10691         (do_reorder_for_imul): Move to x86-tune-sched-atom.c.
10692         (swap_top_of_ready_list): Move to x86-tune-sched-atom.c.
10693         (ix86_sched_reorder): Move to x86-tune-sched-atom.c.
10694         (core2i7_first_cycle_multipass_init): Move to x86-tune-sched-core.c.
10695         (core2i7_dfa_post_advance_cycle): Move to x86-tune-sched-core.c.
10696         (min_insn_size): Rename to ...
10697         (ix86_min_insn_size): ... this one; export.
10698         (core2i7_first_cycle_multipass_begin): Move to x86-tune-sched-core.c.
10699         (core2i7_first_cycle_multipass_issue): Move to x86-tune-sched-core.c.
10700         (core2i7_first_cycle_multipass_backtrack): Move to
10701         x86-tune-sched-core.c.
10702         (core2i7_first_cycle_multipass_end): Move to x86-tune-sched-core.c.
10703         (core2i7_first_cycle_multipass_fini): Move to x86-tune-sched-core.c.
10704         (ix86_sched_init_global): Break up logic to ix86_core2i7_init_hooks.
10705         (ix86_avoid_jump_mispredicts): Update.
10706         (TARGET_SCHED_DISPATCH): Move to ix86-tune-sched-bd.c.
10707         (TARGET_SCHED_DISPATCH_DO): Move to ix86-tune-sched-bd.c.
10708         (TARGET_SCHED_REORDER): Move to ix86-tune-sched-bd.c.
10709         (DISPATCH_WINDOW_SIZE): Move to ix86-tune-sched-bd.c.
10710         (MAX_DISPATCH_WINDOWS): Move to ix86-tune-sched-bd.c.
10711         (MAX_INSN): Move to ix86-tune-sched-bd.c.
10712         (MAX_IMM): Move to ix86-tune-sched-bd.c.
10713         (MAX_IMM_SIZE): Move to ix86-tune-sched-bd.c.
10714         (MAX_IMM_32): Move to ix86-tune-sched-bd.c.
10715         (MAX_IMM_64): Move to ix86-tune-sched-bd.c.
10716         (MAX_LOAD): Move to ix86-tune-sched-bd.c.
10717         (MAX_STORE): Move to ix86-tune-sched-bd.c.
10718         (BIG): Move to ix86-tune-sched-bd.c.
10719         (enum dispatch_group): Move to ix86-tune-sched-bd.c.
10720         (enum insn_path): Move to ix86-tune-sched-bd.c.
10721         (get_mem_group): Move to ix86-tune-sched-bd.c.
10722         (is_cmp): Move to ix86-tune-sched-bd.c.
10723         (dispatch_violation): Move to ix86-tune-sched-bd.c.
10724         (is_branch): Move to ix86-tune-sched-bd.c.
10725         (is_prefetch): Move to ix86-tune-sched-bd.c.
10726         (init_window): Move to ix86-tune-sched-bd.c.
10727         (allocate_window): Move to ix86-tune-sched-bd.c.
10728         (init_dispatch_sched): Move to ix86-tune-sched-bd.c.
10729         (is_end_basic_block): Move to ix86-tune-sched-bd.c.
10730         (process_end_window): Move to ix86-tune-sched-bd.c.
10731         (allocate_next_window): Move to ix86-tune-sched-bd.c.
10732         (find_constant): Move to ix86-tune-sched-bd.c.
10733         (get_num_immediates): Move to ix86-tune-sched-bd.c.
10734         (has_immediate): Move to ix86-tune-sched-bd.c.
10735         (get_insn_path): Move to ix86-tune-sched-bd.c.
10736         (get_insn_group): Move to ix86-tune-sched-bd.c.
10737         (count_num_restricted): Move to ix86-tune-sched-bd.c.
10738         (fits_dispatch_window): Move to ix86-tune-sched-bd.c.
10739         (add_insn_window): Move to ix86-tune-sched-bd.c.
10740         (add_to_dispatch_window): Move to ix86-tune-sched-bd.c.
10741         (debug_dispatch_window_file): Move to ix86-tune-sched-bd.c.
10742         (debug_dispatch_window): Move to ix86-tune-sched-bd.c.
10743         (debug_insn_dispatch_info_file): Move to ix86-tune-sched-bd.c.
10744         (debug_ready_dispatch): Move to ix86-tune-sched-bd.c.
10745         (do_dispatch): Move to ix86-tune-sched-bd.c.
10746         (has_dispatch): Move to ix86-tune-sched-bd.c.
10747         * config/i386/t-i386: Add new object files.
10748         * config/i386/x86-tune-costs.h: New file.
10749         * config/i386/x86-tune-sched-atom.c: New file.
10750         * config/i386/x86-tune-sched-bd.c: New file.
10751         * config/i386/x86-tune-sched-core.c: New file.
10752         * config/i386/x86-tune-sched.c: New file.
10754 2017-10-11  Liu Hao  <lh_mouse@126.com>
10756         * pretty-print.c [_WIN32] (colorize_init): Remove.  Use
10757         the generic version below instead.
10758         (should_colorize): Recognize Windows consoles as terminals
10759         for MinGW targets.
10760         * pretty-print.c [__MINGW32__] (write_all): New function.
10761         [__MINGW32__] (find_esc_head): Likewise.
10762         [__MINGW32__] (find_esc_terminator): Likewise.
10763         [__MINGW32__] (eat_esc_sequence): Likewise.
10764         [__MINGW32__] (mingw_ansi_fputs): New function that handles
10765         ANSI escape codes.
10766         (pp_write_text_to_stream): Use mingw_ansi_fputs instead of fputs
10767         for MinGW targets.
10769 2017-10-11  Richard Biener  <rguenther@suse.de>
10771         * tree-ssa-loop-niter.c (infer_loop_bounds_from_pointer_arith):
10772         Properly call analyze_scalar_evolution with the loop of the stmt.
10774 2017-10-11  Richard Biener  <rguenther@suse.de>
10776         * tree.def (POLYNOMIAL_CHREC): Remove CHREC_VARIABLE tree operand.
10777         * tree-core.h (tree_base): Add chrec_var union member.
10778         * tree.h (CHREC_VAR): Remove.
10779         (CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): Adjust.
10780         * tree-chrec.h (build_polynomial_chrec): Adjust.
10781         * tree-chrec.c (reset_evolution_in_loop): Use build_polynomial_chrec.
10782         * tree-pretty-print.c (dump_generic_node): Use CHREC_VARIABLE.
10784 2017-10-11  Marc Glisse  <marc.glisse@inria.fr>
10786         * fold-const.c (fold_binary_loc) [X +- Y CMP X]: Move ...
10787         * match.pd: ... here.
10788         ((T) X == (T) Y): Relax condition.
10790 2017-10-11  Bin Cheng  <bin.cheng@arm.com>
10792         PR tree-optimization/82472
10793         * tree-loop-distribution.c (sort_partitions_by_post_order): Refine
10794         comment.
10795         (break_alias_scc_partitions): Update postorder number.
10797 2017-10-11  Martin Liska  <mliska@suse.cz>
10799         PR sanitizer/82490
10800         * opts.c (parse_no_sanitize_attribute): Do not use error_value
10801         variable.
10802         * opts.h (parse_no_sanitize_attribute): Remove last argument.
10804 2017-10-11  Martin Liska  <mliska@suse.cz>
10806         * print-rtl.c (print_insn): Move declaration of idbuf
10807         to same scope as name.
10809 2017-10-11  Martin Liska  <mliska@suse.cz>
10811         Revert r253637:
10813         PR sanitizer/82484
10814         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
10815         volatile arguments.
10817 2017-10-11  Martin Liska  <mliska@suse.cz>
10819         PR sanitizer/82484
10820         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
10821         volatile arguments.
10823 2017-10-11  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
10825         * config.gcc (default_gnu_indirect_function): Default to yes for
10826         arm*-*-linux* with glibc.
10828 2017-10-11  Richard Biener  <rguenther@suse.de>
10830         * tree-scalar-evolution.c (get_scalar_evolution): Handle
10831         default-defs and types we do not want to analyze.
10832         (interpret_loop_phi): Replace unreachable code with an assert.
10833         (compute_scalar_evolution_in_loop): Remove and inline ...
10834         (analyze_scalar_evolution_1): ... here, replacing condition with
10835         what makes the intent clearer.  Remove handling of cases
10836         get_scalar_evolution now handles.
10838 2017-10-10  Jim Wilson  <wilson@tuliptree.org>
10840         PR rtl-optimization/81434
10841         * haifa-sched.c (prune_ready_list): Init min_cost_group to 0.  Update
10842         comment for main loop.  In sched_group_found if, also add checks for
10843         pass and min_cost_group.
10845 2017-10-10  Segher Boessenkool  <segher@kernel.crashing.org>
10847         * config/rs6000/rs6000.c (TARGET_INSN_COST): New.
10848         (rs6000_insn_cost): New function.
10849         * config/rs6000/rs6000.md (cost): New attribute.
10851 2017-10-10  Jakub Jelinek  <jakub@redhat.com>
10852             H.J. Lu  <hongjiu.lu@intel.com>
10854         PR target/79565
10855         PR target/82483
10856         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Add
10857         OPTION_MASK_ISA_MMX for __builtin_ia32_maskmovq,
10858         __builtin_ia32_vec_ext_v4hi and __builtin_ia32_vec_set_v4hi.
10859         (ix86_expand_builtin): Treat OPTION_MASK_ISA_MMX similarly
10860         to OPTION_MASK_ISA_AVX512VL - builtins that have both
10861         OPTION_MASK_ISA_MMX and some other bit set require both
10862         mmx and the ISAs without the mmx bit.
10863         * config/i386/i386-builtin.def (__builtin_ia32_cvtps2pi,
10864         __builtin_ia32_cvttps2pi, __builtin_ia32_cvtpi2ps,
10865         __builtin_ia32_pavgb, __builtin_ia32_pavgw, __builtin_ia32_pmulhuw,
10866         __builtin_ia32_pmaxub, __builtin_ia32_pmaxsw, __builtin_ia32_pminub,
10867         __builtin_ia32_pminsw, __builtin_ia32_psadbw, __builtin_ia32_pmovmskb,
10868         __builtin_ia32_pshufw, __builtin_ia32_cvtpd2pi,
10869         __builtin_ia32_cvttpd2pi, __builtin_ia32_cvtpi2pd,
10870         __builtin_ia32_pmuludq, __builtin_ia32_pabsb, __builtin_ia32_pabsw,
10871         __builtin_ia32_pabsd, __builtin_ia32_phaddw, __builtin_ia32_phaddd,
10872         __builtin_ia32_phaddsw, __builtin_ia32_phsubw, __builtin_ia32_phsubd,
10873         __builtin_ia32_phsubsw, __builtin_ia32_pmaddubsw,
10874         __builtin_ia32_pmulhrsw, __builtin_ia32_pshufb, __builtin_ia32_psignb,
10875         __builtin_ia32_psignw, __builtin_ia32_psignd, __builtin_ia32_movntq,
10876         __builtin_ia32_paddq, __builtin_ia32_psubq, __builtin_ia32_palignr):
10877         Add OPTION_MASK_ISA_MMX.
10879 2017-10-10  Andreas Tobler  <andreast@gcc.gnu.org>
10881         * config.gcc (armv7*-*-freebsd*): New target.
10882         (armv6*-*-freebsd*): Remove obsolete TARGET_FREEBSD_ARMv6 define.
10884 2017-10-10  Jan Hubicka  <hubicka@ucw.cz>
10886         * x86-tune.def (X86_TUNE_AVOID_FALSE_DEP_FOR_BMI,
10887         X86_TUNE_ADJUST_UNROLL, X86_TUNE_ONE_IF_CONV_INSN): Move to right
10888         spot in the file.
10890 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
10892         * wide-int.h (wide_int_ref_storage): Make host_dependent_precision
10893         a template parameter.
10894         (WIDE_INT_REF_FOR): Update accordingly.
10895         * tree.h (wi::int_traits <const_tree>): Delete.
10896         (wi::tree_to_widest_ref, wi::tree_to_offset_ref): New typedefs.
10897         (wi::to_widest, wi::to_offset): Use them.  Expand commentary.
10898         (wi::tree_to_wide_ref): New typedef.
10899         (wi::to_wide): New function.
10900         * calls.c (get_size_range): Use wi::to_wide when operating on
10901         trees as wide_ints.
10902         * cgraph.c (cgraph_node::create_thunk): Likewise.
10903         * config/i386/i386.c (ix86_data_alignment): Likewise.
10904         (ix86_local_alignment): Likewise.
10905         * dbxout.c (stabstr_O): Likewise.
10906         * dwarf2out.c (add_scalar_info, gen_enumeration_type_die): Likewise.
10907         * expr.c (const_vector_from_tree): Likewise.
10908         * fold-const-call.c (host_size_t_cst_p, fold_const_call_1): Likewise.
10909         * fold-const.c (may_negate_without_overflow_p, negate_expr_p)
10910         (fold_negate_expr_1, int_const_binop_1, const_binop)
10911         (fold_convert_const_int_from_real, optimize_bit_field_compare)
10912         (all_ones_mask_p, sign_bit_p, unextend, extract_muldiv_1)
10913         (fold_div_compare, fold_single_bit_test, fold_plusminus_mult_expr)
10914         (pointer_may_wrap_p, expr_not_equal_to, fold_binary_loc)
10915         (fold_ternary_loc, multiple_of_p, fold_negate_const, fold_abs_const)
10916         (fold_not_const, round_up_loc): Likewise.
10917         * gimple-fold.c (gimple_fold_indirect_ref): Likewise.
10918         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Likewise.
10919         (alloca_call_type): Likewise.
10920         * gimple.c (preprocess_case_label_vec_for_gimple): Likewise.
10921         * godump.c (go_output_typedef): Likewise.
10922         * graphite-sese-to-poly.c (tree_int_to_gmp): Likewise.
10923         * internal-fn.c (get_min_precision): Likewise.
10924         * ipa-cp.c (ipcp_store_vr_results): Likewise.
10925         * ipa-polymorphic-call.c
10926         (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Likewise.
10927         * ipa-prop.c (ipa_print_node_jump_functions_for_edge): Likewise.
10928         (ipa_modify_call_arguments): Likewise.
10929         * match.pd: Likewise.
10930         * omp-low.c (scan_omp_1_op, lower_omp_ordered_clauses): Likewise.
10931         * print-tree.c (print_node_brief, print_node): Likewise.
10932         * stmt.c (expand_case): Likewise.
10933         * stor-layout.c (layout_type): Likewise.
10934         * tree-affine.c (tree_to_aff_combination): Likewise.
10935         * tree-cfg.c (group_case_labels_stmt): Likewise.
10936         * tree-data-ref.c (dr_analyze_indices): Likewise.
10937         (prune_runtime_alias_test_list): Likewise.
10938         * tree-dump.c (dequeue_and_dump): Likewise.
10939         * tree-inline.c (remap_gimple_op_r, copy_tree_body_r): Likewise.
10940         * tree-predcom.c (is_inv_store_elimination_chain): Likewise.
10941         * tree-pretty-print.c (dump_generic_node): Likewise.
10942         * tree-scalar-evolution.c (iv_can_overflow_p): Likewise.
10943         (simple_iv_with_niters): Likewise.
10944         * tree-ssa-address.c (addr_for_mem_ref): Likewise.
10945         * tree-ssa-ccp.c (ccp_finalize, evaluate_stmt): Likewise.
10946         * tree-ssa-loop-ivopts.c (constant_multiple_of): Likewise.
10947         * tree-ssa-loop-niter.c (split_to_var_and_offset)
10948         (refine_value_range_using_guard, number_of_iterations_ne_max)
10949         (number_of_iterations_lt_to_ne, number_of_iterations_lt)
10950         (get_cst_init_from_scev, record_nonwrapping_iv)
10951         (scev_var_range_cant_overflow): Likewise.
10952         * tree-ssa-phiopt.c (minmax_replacement): Likewise.
10953         * tree-ssa-pre.c (compute_avail): Likewise.
10954         * tree-ssa-sccvn.c (vn_reference_fold_indirect): Likewise.
10955         (vn_reference_maybe_forwprop_address, valueized_wider_op): Likewise.
10956         * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Likewise.
10957         * tree-ssa-uninit.c (is_pred_expr_subset_of): Likewise.
10958         * tree-ssanames.c (set_nonzero_bits, get_nonzero_bits): Likewise.
10959         * tree-switch-conversion.c (collect_switch_conv_info, array_value_type)
10960         (dump_case_nodes, try_switch_expansion): Likewise.
10961         * tree-vect-loop-manip.c (vect_gen_vector_loop_niters): Likewise.
10962         (vect_do_peeling): Likewise.
10963         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
10964         * tree-vect-stmts.c (vectorizable_load): Likewise.
10965         * tree-vrp.c (compare_values_warnv, vrp_int_const_binop): Likewise.
10966         (zero_nonzero_bits_from_vr, ranges_from_anti_range): Likewise.
10967         (extract_range_from_binary_expr_1, adjust_range_with_scev): Likewise.
10968         (overflow_comparison_p_1, register_edge_assert_for_2): Likewise.
10969         (is_masked_range_test, find_switch_asserts, maybe_set_nonzero_bits)
10970         (vrp_evaluate_conditional_warnv_with_ops, intersect_ranges): Likewise.
10971         (range_fits_type_p, two_valued_val_range_p, vrp_finalize): Likewise.
10972         (evrp_dom_walker::before_dom_children): Likewise.
10973         * tree.c (cache_integer_cst, real_value_from_int_cst, integer_zerop)
10974         (integer_all_onesp, integer_pow2p, integer_nonzerop, tree_log2)
10975         (tree_floor_log2, tree_ctz, mem_ref_offset, tree_int_cst_sign_bit)
10976         (tree_int_cst_sgn, get_unwidened, int_fits_type_p): Likewise.
10977         (get_type_static_bounds, num_ending_zeros, drop_tree_overflow)
10978         (get_range_pos_neg): Likewise.
10979         * ubsan.c (ubsan_expand_ptr_ifn): Likewise.
10980         * config/darwin.c (darwin_mergeable_constant_section): Likewise.
10981         * config/aarch64/aarch64.c (aapcs_vfp_sub_candidate): Likewise.
10982         * config/arm/arm.c (aapcs_vfp_sub_candidate): Likewise.
10983         * config/avr/avr.c (avr_fold_builtin): Likewise.
10984         * config/bfin/bfin.c (bfin_local_alignment): Likewise.
10985         * config/msp430/msp430.c (msp430_attr): Likewise.
10986         * config/nds32/nds32.c (nds32_insert_attributes): Likewise.
10987         * config/powerpcspe/powerpcspe-c.c
10988         (altivec_resolve_overloaded_builtin): Likewise.
10989         * config/powerpcspe/powerpcspe.c (rs6000_aggregate_candidate)
10990         (rs6000_expand_ternop_builtin): Likewise.
10991         * config/rs6000/rs6000-c.c
10992         (altivec_resolve_overloaded_builtin): Likewise.
10993         * config/rs6000/rs6000.c (rs6000_aggregate_candidate): Likewise.
10994         (rs6000_expand_ternop_builtin): Likewise.
10995         * config/s390/s390.c (s390_handle_hotpatch_attribute): Likewise.
10997 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
10999         * tree-vect-loop-manip.c (rename_variables_in_bb): Rename PHI nodes
11000         when copying loop nest with only one inner loop.
11002 2017-10-10  Richard Biener  <rguenther@suse.de>
11004         * tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Avoid compacting
11005         blocks if SCEV is active.
11006         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Remove
11007         dead code.
11008         (analyze_scalar_evolution): Handle cached evolutions the obvious way.
11009         (scev_initialize): Assert we are not yet initialized.
11011 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
11013         * tree-loop-distribution.c (generate_loops_for_partition): Remove
11014         inner loop's exit stmt by making it always exit the loop, otherwise
11015         we would generate an infinite empty loop.
11017 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
11019         * tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg): Skip
11020         renaming variables in new preheader if it's deleted.
11022 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
11024         * tree-loop-distribution.c (struct partition): Remove unused field
11025         loops of the structure.
11026         (partition_alloc, partition_free): Ditto.
11027         (build_rdg_partition_for_vertex): Ditto.
11029 2017-10-09  Jeff Law  <law@redhat.com>
11031         * targhooks.c (default_stack_clash_protection_final_dynamic_probe): Fix
11032         return type to match prototype and documentation.
11034 2010-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
11036         * config/rs6000/rs6000.c (processor_costs): Move to ...
11037         * config/rs6000/rs6000.h: ... here.
11038         (rs6000_cost): Declare.
11040 2017-10-09  Eric Botcazou  <ebotcazou@adacore.com>
11042         * except.c (setjmp_fn): New global variable.
11043         (init_eh): Initialize it if DONT_USE_BUILTIN_SETJMP is defined.
11044         (sjlj_emit_function_enter): Call it instead of BUILTIN_SETJMP
11045         if DONT_USE_BUILTIN_SETJMP is defined.
11047 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
11049         * target.def (insn_cost): New hook.
11050         * doc/tm.texi.in (TARGET_INSN_COST): New hook.
11051         * doc/tm.texi: Regenerate.
11052         * rtlanal.c (insn_cost): Use the new hook.
11054 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
11056         * combine.c (combine_validate_cost): Compute the new insn_cost,
11057         not just pattern_cost.
11058         (try_combine): Adjust comment.
11060 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
11062         * cfgrtl.c (rtl_account_profile_record): Replace insn_rtx_cost with
11063         insn_cost.
11064         * combine.c (uid_insn_cost): Adjust comment.
11065         (combine_validate_cost): Adjust comment.  Use pattern_cost instead
11066         of insn_rtx_cost
11067         (combine_instructions): Use insn_cost instead of insn_rtx_cost.
11068         * dse.c (find_shift_sequence): Ditto.
11069         * ifcvt.c (cheap_bb_rtx_cost_p): Ditto.
11070         (bb_valid_for_noce_process_p): Use pattern_cost.
11071         * rtl.h (insn_rtx_cost): Delete.
11072         (pattern_cost): New prototype.
11073         (insn_cost): New prototype.
11074         * rtlanal.c (insn_rtx_cost): Rename to...
11075         (pattern_cost): ... this.
11076         (insn_cost): New.
11078 2017-10-09  Uros Bizjak  <ubizjak@gmail.com>
11080         * config/i386/i386.md (*jcc_2): Remove insn pattern.
11081         (*jcc<mode>_0_r_i387): Ditto.
11082         (*jccxf_r_i387): Ditto.
11083         (*jcc<mode>_r_i387): Ditto.
11084         (*jccu<mode>_r_i387): Ditto.
11085         (*jcc<X87MODEF:mode>_<SWI24:mode>_r_i387): Ditto.
11086         (*jcc): Rename from *jcc_1.
11088 2017-10-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11090         * config/rs6000/rs6000-p8swap.c (rs6000_analyze_swaps): Process
11091         deferred rescans after the lvx/stvx recombination pre-pass.
11093 2017-10-09  Michael Meissner  <meissner@linux.vnet.ibm.com>
11095         * config/rs6000/amo.h: New include file to provide ISA 3.0 atomic
11096         memory operation instruction support.
11097         * config.gcc (powerpc*-*-*): Include amo.h as an extra header.
11098         (rs6000-ibm-aix[789]*): Likewise.
11099         * doc/extend.texi (PowerPC Atomic Memory Operation Functions):
11100         Document new functions.
11102 2017-10-09  Richard Biener  <rguenther@suse.de>
11104         PR tree-optimization/82397
11105         * tree-data-ref.c (data_ref_compare_tree): Make sure to return
11106         equality only for semantically equal trees.
11108 2017-10-09  Richard Biener  <rguenther@suse.de>
11110         PR tree-optimization/82449
11111         * sese.c (scev_analyzable_p): Check whether the SCEV is linear.
11112         * tree-chrec.h (evolution_function_is_constant_p): Adjust to
11113         allow constant addresses.
11114         * tree-chrec.c (scev_is_linear_expression): Constant evolutions
11115         are linear.
11117 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11119         * config/s390/s390-builtins.def (vec_nabs, vec_vfi): Fix builtin
11120         flags.
11122 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11124         PR target/82463
11125         * config/s390/vecintrin.h (vec_madd, vec_msub): Fix macro
11126         definitions.
11128 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11130         PR target/82465
11131         * config/s390/s390-builtins.def (vec_sqrt): Fix builtin flags.
11133 2017-10-09  Jakub Jelinek  <jakub@redhat.com>
11135         PR target/82464
11136         * config/s390/s390-builtins.def (s390_vec_xor_flt_a,
11137         s390_vec_xor_flt_b, s390_vec_xor_flt_c): New.
11139 2017-10-09  Richard Sandiford  <richard.sandiford@linaro.org>
11141         * wide-int.h (WI_BINARY_OPERATOR_RESULT): New macro.
11142         (WI_BINARY_PREDICATE_RESULT): Likewise.
11143         (wi::binary_traits::operator_result): New type.
11144         (wi::binary_traits::predicate_result): Likewise.
11145         (generic_wide_int::operator~, unary generic_wide_int::operator-)
11146         (generic_wide_int::operator==, generic_wide_int::operator!=)
11147         (generic_wide_int::operator&, generic_wide_int::and_not)
11148         (generic_wide_int::operator|, generic_wide_int::or_not)
11149         (generic_wide_int::operator^, generic_wide_int::operator+
11150         (binary generic_wide_int::operator-, generic_wide_int::operator*):
11151         Delete.
11152         (operator~, unary operator-, operator==, operator!=, operator&)
11153         (operator|, operator^, operator+, binary operator-, operator*): New
11154         functions.
11155         * expr.c (get_inner_reference): Use wi::bit_and_not.
11156         * fold-const.c (fold_binary_loc): Likewise.
11157         * ipa-prop.c (ipa_compute_jump_functions_for_edge): Likewise.
11158         * tree-ssa-ccp.c (get_value_from_alignment): Likewise.
11159         (bit_value_binop): Likewise.
11160         * tree-ssa-math-opts.c (find_bswap_or_nop_load): Likewise.
11161         * tree-vrp.c (zero_nonzero_bits_from_vr): Likewise.
11162         (extract_range_from_binary_expr_1): Likewise.
11163         (masked_increment): Likewise.
11164         (simplify_bit_ops_using_ranges): Likewise.
11166 2017-10-09  Martin Jambor  <mjambor@suse.cz>
11168         PR hsa/82416
11169         * hsa-common.h (hsa_op_with_type): New method extend_int_to_32bit.
11170         * hsa-gen.c (hsa_extend_inttype_to_32bit): New function.
11171         (hsa_type_for_scalar_tree_type): Use it.  Always force min32int for
11172         COMPLEX types.
11173         (hsa_fixup_mov_insn_type): New function.
11174         (hsa_op_with_type::get_in_type): Use it.
11175         (hsa_build_append_simple_mov): Likewise.  Allow sub-32bit
11176         immediates in an assert.
11177         (hsa_op_with_type::extend_int_to_32bit): New method.
11178         (gen_hsa_insns_for_bitfield): Fixup instruction and intermediary
11179         types.  Convert to dest type if necessary.
11180         (gen_hsa_insns_for_bitfield_load): Fixup load type if necessary.
11181         (reg_for_gimple_ssa): Pass false as min32int to
11182         hsa_type_for_scalar_tree_type.
11183         (gen_hsa_addr): Fixup type when creating addresable temporary.
11184         (gen_hsa_cmp_insn_from_gimple): Extend operands if necessary.
11185         (gen_hsa_unary_operation): Extend operands and convert to dest type if
11186         necessary.  Call hsa_fixup_mov_insn_type.
11187         (gen_hsa_binary_operation): Changed operand types to hsa_op_with_type,
11188         extend operands and convert to dest type if necessary.
11189         (gen_hsa_insns_for_operation_assignment): Extend operands and convert
11190         to dest type if necessary.
11191         (set_output_in_type): Call hsa_fixup_mov_insn_type.  Just ude dest
11192         if conversion nt necessary and size matches.
11193         (gen_hsa_insns_for_load): Call hsa_fixup_mov_insn_type, convert
11194         to dest type if necessary.
11195         (gen_hsa_insns_for_store): Call hsa_fixup_mov_insn_type.
11196         (gen_hsa_insns_for_switch_stmt): Likewise. Also extend operands if
11197         necessary.
11198         (gen_hsa_clrsb): Likewise.
11199         (gen_hsa_ffs): Likewise.
11200         (gen_hsa_divmod): Extend operands and convert to dest type if
11201         necessary.
11202         (gen_hsa_atomic_for_builtin): Change type of op to hsa_op_with_type.
11204 2017-10-08  Segher Boessenkool  <segher@kernel.crashing.org>
11206         * config/rs6000/rs6000.md (conditional branch): Clean up formatting.
11207         Remove empty default arguments.  Use a brace block as output
11208         statement.
11209         (conditional return): Ditto.
11210         (jump): Ditto.
11211         (indirect_jump): Ditto.  Use b%T0 instead of bctr/blr.
11212         (tablejump, tablejumpsi, tablejumpdi, *tablejump<mode>_internal1):
11213         Ditto.
11214         (group_ending_nop): Ditto.
11215         (doloop_end): Ditto.
11216         (ctr<mode>, ctr<mode>_internal1, ctr<mode>_internal2): Ditto.
11217         (splitters for those): Ditto.
11219 2017-10-08  Segher Boessenkool  <segher@kernel.crashing.org>
11221         * config/rs6000/rs6000-string.c (expand_strncmp_align_check): Invert
11222         a conditional jump (and the compare for it) so that pc_rtx is the
11223         last operand.
11224         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Adjust
11225         for the deleted and renamed ctr<mode>_internal[234] patterns.
11226         * config/rs6000/rs6000.md: Delete second conditional branch pattern.
11227         Delete second conditional return pattern.
11228         (ctr<mode>_internal2): Delete this second bdnz pattern.
11229         (ctr<mode>_internal3): Rename to ctr<mode>_internal2.
11230         (ctr<mode>_internal4): Delete this second bdz pattern.
11232 2017-10-08  Eric Botcazou  <ebotcazou@adacore.com>
11234         * tree-outof-ssa.h (ssaexpand): Add partitions_for_undefined_values.
11235         (always_initialized_rtx_for_ssa_name_p): New predicate.
11236         * tree-outof-ssa.c (remove_ssa_form): Initialize new field of SA.
11237         (finish_out_of_ssa): Free new field of SA.
11238         * tree-ssa-coalesce.h (get_undefined_value_partitions): Declare.
11239         * tree-ssa-coalesce.c: Include tree-ssa.h.
11240         (get_parm_default_def_partitions): Remove extern keyword.
11241         (get_undefined_value_partitions): New function.
11242         * expr.c (expand_expr_real_1) <expand_decl_rtl>: For a SSA_NAME, do
11243         not set SUBREG_PROMOTED_VAR_P on the sub-register if it may contain
11244         uninitialized bits.
11245         * loop-iv.c (iv_get_reaching_def): Disqualify all subregs.
11247 2017-10-08  Eric Botcazou  <ebotcazou@adacore.com>
11249         * builtins.def (BUILT_IN_SETJMP): Revert latest change.
11251 2017-10-08  Jan Hubicka  <hubicka@ucw.cz>
11253         * config/i386/i386.c (ix86_expand_set_or_movmem): Disable 512bit loops
11254         for targets that preffer 128bit.
11256 2017-10-08  Jan Hubicka  <hubicka@ucw.cz>
11258         * config/i386/i386.c (has_dispatch): Disable for Ryzen.
11260 2017-10-08  Olivier Hainque  <hainque@adacore.com>
11262         * config/arm/arm.c (arm_set_return_address): Use MEM_VOLATILE_P
11263         on the target mem instead of RTX_FRAME_RELATED_P on the insn to
11264         prevent DSE.
11265         (thumb_set_return_address): Likewise.
11267 2017-10-08  Olivier Hainque  <hainque@adacore.com>
11269         * common/config/arm/arm-common.c (arm_except_unwind_info):
11270         Handle DWARF2_UNWIND_INFO.
11272 2017-10-07  Michael Collison <michael.collison@arm.com>
11274         * config/aarch64/aarch64.md (*aarch64_reg_<optab>_minus<mode>3):
11275         New pattern.
11277 2017-10-07  Eric Botcazou  <ebotcazou@adacore.com>
11279         * builtins.def (BUILT_IN_SETJMP): Declare as library builtin instead
11280         of GCC builtin if DONT_USE_BUILTIN_SETJMP is defined.
11281         * except.c (sjlj_emit_function_enter): If DONT_USE_BUILTIN_SETJMP is
11282         defined, force the creation of a new block for a dispatch label.
11284 2017-10-07  Jan Hubicka  <hubicka@ucw.cz>
11286         * invoke.texi (Wsuggest-attribute=cold): Document.
11287         * common.opt (Wsuggest-attribute=cold): New
11288         * ipa-pure-const.c (warn_function_cold): New function.
11289         * predict.c (compute_function_frequency): Use it.
11290         * predict.h (warn_function_cold): Declare.
11292 2017-10-06  Jan Hubicka  <hubicka@ucw.cz>
11294         * tree-switch-conversion.c (do_jump_if_equal, emit_cmp_and_jump_insns):
11295         Update profile.
11297 2017-10-06  Martin Liska  <mliska@suse.cz>
11299         * sanopt.c (struct sanopt_tree_triplet_hash): Remove inline
11300         keyword for member functions.
11301         (struct sanopt_tree_couple): New struct.
11302         (struct sanopt_tree_couple_hash): New function.
11303         (struct sanopt_ctx): Add new hash_map.
11304         (has_dominating_ubsan_ptr_check): New function.
11305         (record_ubsan_ptr_check_stmt): Likewise.
11306         (maybe_optimize_ubsan_ptr_ifn): Likewise.
11307         (sanopt_optimize_walker): Handle IFN_UBSAN_PTR.
11308         (pass_sanopt::execute): Handle also SANITIZE_POINTER_OVERFLOW.
11310 2017-10-06  Sudakshina Das  <sudi.das@arm.com>
11312         PR target/82440
11313         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Only call
11314         aarch64_simd_valid_immediate on CONST_VECTORs.
11315         (aarch64_reg_or_bic_imm): Likewise.
11317 2017-10-06  Wilco Dijkstra  <wdijkstr@arm.com>
11319         PR rtl-optimization/82396
11320         * haifa-sched.c (ready_sort_real): Disable qsort checking.
11322 2017-10-06  Sebastian Pop  <sebpop@gmail.com>
11324         * graphite-dependences.c (scop_get_reads): Move code to...
11325         (scop_get_must_writes): Move code to...
11326         (scop_get_may_writes): Move code to...
11327         (scop_get_reads_and_writes): ... here.
11328         (scop_get_dependences): Call scop_get_reads_and_writes.
11330 2017-10-06  Jakub Jelinek  <jakub@redhat.com>
11332         PR tree-optimization/82434
11333         * fold-const.h (can_native_encode_type_p,
11334         can_native_encode_string_p): Remove.
11335         * fold-const.c (native_encode_int): Formatting fixes.  If ptr is NULL,
11336         don't encode anything, just return what would be otherwise returned.
11337         (native_encode_fixed, native_encode_complex, native_encode_vector):
11338         Likewise.
11339         (native_encode_string): Likewise.  Inline by hand
11340         can_native_encode_string_p.
11341         (can_native_encode_type_p): Remove.
11342         (can_native_encode_string_p): Remove.
11343         * tree-vect-stmts.c (vectorizable_store): Instead of testing just
11344         STRING_CSTs using can_native_encode_string_p, test all
11345         CONSTANT_CLASS_P values using native_encode_expr with NULL ptr.
11346         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Remove last
11347         argument from native_encode_expr.
11348         (rhs_valid_for_store_merging_p): Use native_encode_expr with NULL ptr.
11349         (pass_store_merging::execute): Don't unnecessarily look for 3 stmts,
11350         but just 2.
11352 2017-10-06  Richard Biener  <rguenther@suse.de>
11354         PR tree-optimization/82397
11355         * tree-vect-data-refs.c (dr_group_sort_cmp): Do not use
11356         operand_equal_p but rely on data_ref_compare_tree for detecting
11357         equalities.
11358         (vect_analyze_data_ref_accesses): Use data_ref_compare_tree
11359         to match up with dr_group_sort_cmp.
11361 2017-10-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11363         PR target/82322
11364         * config/s390/s390-builtins.def (s390_vfi): Define new overloaded
11365         builtin.
11366         * config/s390/s390-builtin-types.def: Regenerate.
11368 2017-10-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11370         PR target/82317
11371         * config/s390/s390-builtin-types.def: Regenerate.
11372         * config/s390/s390-builtins.def (s390_vfmaxdb_4, s390_vfmindb_4):
11373         Change flag from B_VXE to B_VX.
11374         (s390_vec_min_dbl): Remove B_VXE flag.
11376 2017-10-06  Richard Biener  <rguenther@suse.de>
11378         * graphite-isl-ast-to-gimple.c: Include ssa.h and tree-ssa.h.
11379         (translate_isl_ast_to_gimple::translate_pending_phi_nodes,
11380         translate_isl_ast_to_gimple::is_valid_rename,
11381         translate_isl_ast_to_gimple::get_rename,
11382         translate_isl_ast_to_gimple::get_def_bb_for_const,
11383         translate_isl_ast_to_gimple::get_new_name,
11384         translate_isl_ast_to_gimple::collect_all_ssa_names,
11385         translate_isl_ast_to_gimple::copy_loop_phi_args,
11386         translate_isl_ast_to_gimple::collect_all_ssa_names,
11387         translate_isl_ast_to_gimple::copy_loop_phi_args,
11388         translate_isl_ast_to_gimple::copy_loop_phi_nodes,
11389         translate_isl_ast_to_gimple::add_close_phis_to_merge_points,
11390         translate_isl_ast_to_gimple::add_close_phis_to_outer_loops,
11391         translate_isl_ast_to_gimple::copy_loop_close_phi_args,
11392         translate_isl_ast_to_gimple::copy_loop_close_phi_nodes,
11393         translate_isl_ast_to_gimple::copy_cond_phi_args,
11394         translate_isl_ast_to_gimple::copy_cond_phi_nodes,
11395         translate_isl_ast_to_gimple::edge_for_new_close_phis,
11396         translate_isl_ast_to_gimple::add_phi_arg_for_new_expr,
11397         translate_isl_ast_to_gimple::rename_uses,
11398         translate_isl_ast_to_gimple::rename_all_uses): Remove.
11399         (translate_isl_ast_to_gimple::get_rename_from_scev): Simplify.
11400         (set_rename_for_each_def): Likewise.
11401         (graphite_copy_stmts_from_block): Handle debug stmt resetting
11402         here.  Handle rewriting SCEV analyzable uses here.
11403         (copy_bb_and_scalar_dependences): Generate code for PHI
11404         copy-in/outs.
11405         (graphite_regenerate_ast_isl): Adjust.
11406         * graphite-scop-detection.c (trivially_empty_bb_p): Move to sese.[ch].
11407         (add_write, add_read): New functions.
11408         (build_cross_bb_scalars_def): Use it and simplify.
11409         (build_cross_bb_scalars_use): Likewise.
11410         (graphite_find_cross_bb_scalar_vars): Inline into...
11411         (try_generate_gimple_bb): ...here.  Add dependences for PHIs,
11412         simulating out-of-SSA.  Compute liveout and add dependencies.
11413         (build_scops): Force an empty entry block.
11414         * sese.h (sese_info_t::liveout, sese_info_t::debug_liveout): New
11415         members.
11416         (sese_build_liveouts): Declare.
11417         (sese_trivially_empty_bb_p): Likewise.
11418         * sese.c (sese_build_liveouts_bb): Properly handle PHIs,
11419         compute liveout and debug_liveout.
11420         (sese_bad_liveouts_use): Remove.
11421         (sese_reset_debug_liveouts_bb): Likewise.
11422         (sese_reset_debug_liveouts): Rewrite in terms of debug_liveout.
11423         (sese_build_liveouts): Build liveout and debug_liveout and store
11424         it in region.
11425         (new_sese_info): Adjust.
11426         (free_sese_info): Likewise.
11427         (sese_insert_phis_for_liveouts): Reset debug stmts from here,
11428         do not build liveout here.
11429         (move_sese_in_condition): Adjust region entry.
11430         (scev_analyzable_p): Match up with chrec_apply requirements.
11431         (sese_trivially_empty_bb_p): New.
11432         * tree-into-ssa.c (get_reaching_def): Properly support generating
11433         default-defs for incremental rewrite of anonymous names.
11435 2017-10-06  Richard Biener  <rguenther@suse.de>
11437         * graphite-sese-to-poly.c (extract_affine): For casts increasing
11438         precision do not perform modulo reduction.
11440 2017-10-06  Richard Biener  <rguenther@suse.de>
11442         PR tree-optimization/82436
11443         * tree-vect-slp.c (vect_supported_load_permutation_p): More
11444         conservatively choose the vectorization factor when checking
11445         whether we can perform the required load permutation.
11446         (vect_transform_slp_perm_load): Assert when we may not fail.
11448 2017-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
11450         * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Correct error
11451         message for incompatible -msdata=* and -mcall-* options.
11453 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
11455         * config/i386/i386.c (ia32_multipass_dfa_lookahead): Default to issue
11456         rate for post-reload scheduling.
11458 2017-10-05  Tamar Christina  <tamar.christina@arm.com>
11460         * doc/sourcebuild.texi (vect_sizes_16B_8B, vect_sizes_32B_16B): New.
11462 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
11464         * config/i386/i386.c (znver1_cost): Set branch_cost to 3 (instead of 2)
11465         to improve monte carlo in scimark.
11467 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
11469         * config/i386/i386.c (ix86_size_cost, i386_cost, i486_cost,
11470         pentium_cost, lakemont_cost, pentiumpro_cost, geode_cost, k6_cost,
11471         athlon_cost, k8_cost, amdfam10_cost, btver1_cost, btver2_cost,
11472         pentium4_cost, nocona_cost): Set reassociation width to 1.
11473         (bdver1_cost, bdver2_cost, bdver3_cost, bdver4_cost): Set reassociation
11474         width to 2 for fp operations and 1 otherwise.
11475         (znver1_cost): Set scalar reassoc width to 4 and vector to 3 and 6
11476         for int and fp.
11477         (atom_cost): Set reassociation width to 2.
11478         (slm_cost, generic_cost): Set fp reassociation width
11479         to 2 and 1 otherwise.
11480         (intel_cost): Set fp reassociation width to 4 and 1 otherwise.
11481         (core_cost): Set fp reassociation width to 4 and vector to 2.
11482         (ix86_reassociation_width): Rewrite using cost table; special case
11483         plus/minus on Zen; honor X86_TUNE_SSE_SPLIT_REGS
11484         and TARGET_AVX128_OPTIMAL.
11485         * config/i386/i386.h (processor_costs): Add
11486         reassoc_int, reassoc_fp, reassoc_vec_int, reassoc_vec_fp.
11487         (TARGET_VECTOR_PARALLEL_EXECUTION, TARGET_REASSOC_INT_TO_PARALLEL,
11488         TARGET_REASSOC_FP_TO_PARALLEL): Remove.
11489         * x86-tune.def (X86_TUNE_REASSOC_INT_TO_PARALLEL): Remove.
11490         (X86_TUNE_REASSOC_FP_TO_PARALLEL): Remove.
11491         (X86_TUNE_VECTOR_PARALLEL_EXECUTION):  Remove.
11493 2017-10-05  Nathan Sidwell  <nathan@acm.org>
11495         * doc/invoke.texi (Wparentheses): Document C++ MVP behaviour.
11497 2017-10-05  Tamar Christina  <tamar.christina@arm.com>
11499         * config/arm/arm.c (arm_test_fpu_data): New.
11500         (arm_run_selftests): Call arm_test_fpu_data.
11502 2017-10-04  Nathan Sidwell  <nathan@acm.org>
11504         * toplev.c (toplev::main): Remove excess parens on pretty_printer
11505         decl.
11506         * caller-save.c (insert_save): Remove excess parens on TO_SAVE parm.
11508 2017-10-04  Sudakshina Das  <sudi.das@arm.com>
11510         * config/aarch64/aarch64-protos.h (enum simd_immediate_check): New
11511         check type for aarch64_simd_valid_immediate.
11512         (aarch64_output_simd_mov_immediate): Update prototype.
11513         (aarch64_simd_valid_immediate): Update prototype.
11514         * config/aarch64/aarch64-simd.md (orr<mode>3): modified pattern to add
11515         support for ORR-immediate.
11516         (and<mode>3): modified pattern to add support for BIC-immediate.
11517         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Function
11518         now checks for valid immediate for BIC and ORR based on new enum
11519         argument.
11520         (aarch64_output_simd_mov_immediate): Function now used to output
11521         BIC/ORR imm as well based on new enum argument.
11522         * config/aarch64/constraints.md (Do): New vector immediate constraint.
11523         (Db) : Likewise.
11524         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): New predicate.
11525         (aarch64_reg_or_bic_imm): Likewise.
11527 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11529         * config/s390/vx-builtins.md ("vec_mergeh<mode>")
11530         ("vec_mergel<mode>"): Change mode iterator to V_128_NOSINGLE.
11532 2017-10-04  Wilco Dijkstra  <wdijkstr@arm.com>
11534         Revert r253399:
11536         PR rtl-optimization/82396
11537         * haifa-sched.c (autopref_multipass_init): Simplify
11538         initialization.
11539         (autopref_rank_data): Simplify sort order.
11540         * sched-int.h (autopref_multipass_data_): Remove
11541         multi_mem_insn_p, min_offset and max_offset.
11543 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11545         * doc/sourcebuild.texi: Document vect_peeling_profitable.
11547 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11549         * doc/sourcebuild.texi: Document vect_intdouble_cvt and
11550         vect_doubleint_cvt.
11552 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11554         * doc/sourcebuild.texi: Document vect_long_mult.
11556 2017-10-04  Richard Sandiford  <richard.sandiford@linaro.org>
11558         PR tree-optimization/82413
11559         * fold-const.c (build_range_check): Use widest_int when comparing
11560         the maximum ETYPE value with HIGH.
11562 2017-10-04  Wilco Dijkstra  <wdijkstr@arm.com>
11564         PR rtl-optimization/82396
11565         * haifa-sched.c (autopref_multipass_init): Simplify
11566         initialization.
11567         (autopref_rank_data): Simplify sort order.
11568         * sched-int.h (autopref_multipass_data_): Remove
11569         multi_mem_insn_p, min_offset and max_offset.
11571 2017-10-04  Jakub Jelinek  <jakub@redhat.com>
11573         PR tree-optimization/82381
11574         * tree-ssa-reassoc.c (sort_by_operand_rank): Check for different
11575         oeN->rank first.  Return 1 or -1 if one op is SSA_NAME and the other
11576         is not.
11578         PR tree-optimization/82374
11579         * omp-low.c (create_omp_child_function): Copy DECL_ATTRIBUTES,
11580         DECL_FUNCTION_SPECIFIC_OPTIMIZATION,
11581         DECL_FUNCTION_SPECIFIC_TARGET and DECL_FUNCTION_VERSIONED from
11582         current_function_decl to the new decl.
11584 2017-10-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
11586         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_2_HW): Define new
11587         helper macro for IEEE float128 hardware built-in functions.
11588         (SQRTF128_ODD): Add built-in functions with the round-to-odd
11589         semantics.
11590         (TRUNCF128_ODD): Likewise.
11591         (ADDF128_ODD): Likewise.
11592         (SUBF128_ODD): Likewise.
11593         (MULF128_ODD): Likewise.
11594         (DIVF128_ODD): Likewise.
11595         (FMAF128_ODD): Likewise.
11596         * config/rs6000/rs6000.md (UNSPEC_ROUND_TO_ODD): Rename to
11597         UNSPEC_TRUNC_ROUND_TO_ODD.
11598         (UNSPEC_TRUNC_ROUND_TO_ODD): Likewise.
11599         (UNSPEC_ADD_ROUND_TO_ODD): New unspec codes for the IEEE 128-bit
11600         floating point round to odd instructions.
11601         (UNSPEC_SUB_ROUND_TO_ODD): Likewise.
11602         (UNSPEC_MUL_ROUND_TO_ODD): Likewise.
11603         (UNSPEC_DIV_ROUND_TO_ODD): Likewise.
11604         (UNSPEC_FMA_ROUND_TO_ODD): Likewise.
11605         (UNSPEC_SQRT_ROUND_TO_ODD): Likewise.
11606         (trunc<mode>sf2_hw): Change the truncate with round to odd
11607         expansion to use UNSPEC_TRUNC_ROUND_TO_ODD.
11608         (add<mode>3_odd): Add insns for IEEE 128-bit floating point round
11609         to odd hardware instructions.
11610         (sub<mode>3_odd): Likewise.
11611         (mul<mode>3_odd): Likewise.
11612         (div<mode>3_odd): Likewise.
11613         (sqrt<mode>2_odd): Likewise.
11614         (fma<mode>4_odd): Likewise.
11615         (fms<mode>4_odd): Likewise.
11616         (nfma<mode>4_odd): Likewise.
11617         (nfms<mode>4_odd): Likewise.
11618         (trunc<mode>df2_odd): Change the truncate with round to odd
11619         expansion to use UNSPEC_TRUNC_ROUND_TO_ODD.  Add a generator
11620         function.
11621         * doc/extend.texi (PowerPC built-in functions): Update documentation
11622         for existing IEEE float128-bit built-in functions.  Add built-in
11623         functions that generate the IEEE 128-bit floating point round to
11624         odd instructions.
11626 2017-10-03  Segher Boessenkool  <segher@kernel.crashing.org>
11628         PR rtl-optimization/77729
11629         * simplify-rtx.c (simplify_binary_operation_1): Delete the (X&C1)|C2
11630         to (X&(C1&~C2))|C2 transformations.
11632 2017-10-03  Martin Jambor  <mjambor@suse.cz>
11634         PR tree-optimization/82363
11635         * tree-sra.c (propagate_subaccesses_across_link): In unrecoverable
11636         mismatch, mark lacc written regardless of racc.
11638 2017-10-03  Jakub Jelinek  <jakub@redhat.com>
11640         PR tree-optimization/82381
11641         * tree-ssa-reassoc.c (sort_by_operand_rank): Don't check
11642         stmt_to_insert nor wheather SSA_NAMEs are default defs.
11643         Return 1 or -1 if one of bba and bbb is NULL. If bb_rank is equal,
11644         fallthrough into reassoc_stmt_dominates_stmt_p.
11646         PR target/82386
11647         * combine.c (combine_instructions): Don't combine in unreachable
11648         basic blocks.
11650 2017-10-02  Peter Bergner  <bergner@vnet.ibm.com>
11652         PR target/80210
11653         * config/rs6000/rs6000.c (rs6000_option_override_internal): Rewrite
11654         function to not use the have_cpu variable.  Do not set cpu_index,
11655         rs6000_cpu_index or rs6000_tune_index if we end up using TARGET_DEFAULT
11656         or the default cpu.
11657         (rs6000_valid_attribute_p): Remove duplicate initializations of
11658         old_optimize and func_optimize.
11659         (rs6000_pragma_target_parse): Call rs6000_activate_target_options ().
11660         (rs6000_activate_target_options): Make global.
11661         * config/rs6000/rs6000-protos.h (rs6000_activate_target_options): Add
11662         prototype.
11664 2017-10-02  Jakub Jelinek  <jakub@redhat.com>
11666         * tree-dfa.c (get_ref_base_and_extent): Set *pmax_size to -1
11667         if *poffset + *pmax_size overflows in HOST_WIDE_INT.
11668         Set *poffset to 0 and *psize and *pmax_size to -1 if
11669         *poffset + *psize overflows in HOST_WIDE_INT.
11671         PR tree-optimization/82387
11672         PR tree-optimization/82388
11673         PR tree-optimization/82389
11674         * tree-ssa-dse.c (dse_classify_store): Test byte_tracking_enabled
11675         instead of live_bytes non-NULL.
11677 2017-10-02  Georg-Johann Lay  <avr@gjlay.de>
11679         PR target/41076
11680         * confg/avr/avr.md (*iorhi3.ashift8-ext.zerox): Add "r,r,0"
11681         alternative.
11683 2017-10-02  Richard Biener  <rguenther@suse.de>
11685         * graphite-isl-ast-to-gimple.c (set_codegen_error): With
11686         -fchecking and --param graphite-allow-codegen-errors=0 ICE.
11687         * params.def (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): New param.
11689 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
11691         * tree.h (wi::int_traits <const_tree>::decompose): Assert that the
11692         requested precision matches the type's.
11693         * calls.c (alloc_max_size): Calculate the new candidate size as
11694         a widest_int and use wi::to_widest when comparing it with the
11695         current candidate size.
11696         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Compare with
11697         zero rather than integer_zero_node.
11698         * match.pd: Check for a no-op conversion before using wi::add
11699         rather than after.  Use tree_to_uhwi when summing small shift
11700         counts into an unsigned int.
11702 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
11703             Alan Hayward  <alan.hayward@arm.com>
11704             David Sherwood  <david.sherwood@arm.com>
11706         PR target/71307
11707         * config/aarch64/aarch64.h (POINTER_AND_FP_REGS): New reg class.
11708         (REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update accordingly.
11709         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
11710         POINTER_AND_FP_REGS.
11712 2017-10-02  Richard Biener  <rguenther@suse.de>
11714         PR tree-optimization/82355
11715         * graphite-isl-ast-to-gimple.c (build_iv_mapping): Also build
11716         a mapping for the enclosing loop but avoid generating one for
11717         the loop tree root.
11718         (copy_bb_and_scalar_dependences): Remove premature codegen
11719         error on PHIs in blocks duplicated into multiple places.
11720         * graphite-scop-detection.c
11721         (scop_detection::stmt_has_simple_data_refs_p): For a loop not
11722         in the region use it as loop and nest to analyze the DR in.
11723         (try_generate_gimple_bb): Likewise.
11724         * graphite-sese-to-poly.c (extract_affine_chrec): Adjust.
11725         (add_loop_constraints): For blocks in a loop not in the region
11726         create a dimension with a single iteration.
11727         * sese.h (gbb_loop_at_index): Remove assert.
11729 2017-10-01  Kevin Buettner  <kevinb@redhat.com>
11731         * omp-expand.c (adjust_context_scope): New function.
11732         (expand_parallel_call): Call adjust_context_scope.
11734 2017-10-01  Jeff Law  <law@redhat.com>
11736         * tree-ssa-dom.c (optimize_stmt): Make this a method within the
11737         dom_opt_dom_walker class with direct access to private members.
11738         Add comments.  Call test_for_singularity.
11739         (dom_opt_dom_walker::before_dom_children): Corresponding changes.
11740         (dom_opt_dom_walker::after_dom_children): Do not lazily initialize
11741         m_dummy_cond anymore.
11742         (class dom_opt_dom_walker): Initialize m_dummy_cond member in the
11743         class ctor.
11744         (pass_dominator:execute): Build the dummy_cond here and pass it
11745         to the dom_opt_dom_walker ctor.
11746         (test_for_singularity): New function.
11748 2017-09-30  Krister Walfridsson  <krister.walfridsson@gmail.com>
11749             Maya Rashish  <coypu@sdf.org>
11751         * config.gcc (*-*-netbsd*): New variable nbsd_tm_file containing
11752         netbsd.h, netbsd-stdint.h, and netbsd-elf.h.
11753         (alpha*-*-netbsd*) Use nbsd_tm_file.
11754         (arm*-*-netbsdelf*) Likewise.
11755         (i[34567]86-*-netbsdelf*) Likewise.
11756         (x86_64-*-netbsd*) Likewise.
11757         (mips*-*-netbsd*) Likewise.
11758         (powerpc-*-netbsd*) Likewise.
11759         (sh*-*-netbsd*) Likewise.
11760         (sparc-*-netbsdelf*) Likewise.
11761         (sparc64-*-netbsd*) Likewise.
11762         (m68k*-*-netbsdelf*) Use nbsd_tm_file and add CHAR_FAST8/SHORT_FAST16
11763         to tm_defines.
11764         (vax-*-netbsdelf*) Likewise.
11765         * config/netbsd-stdint.h (INT_FAST8_TYPE): Check CHAR_FAST8.
11766         (UINT_FAST8_TYPE) Likewise.
11767         (INT_FAST16_TYPE) Check CHAR_FAST16.
11768         (UINT_FAST16_TYPE) Likewise.
11770 2017-09-30  Jakub Jelinek  <jakub@redhat.com>
11772         PR target/82361
11773         * config/i386/i386.md
11774         (TARGET_USE_8BIT_IDIV zext divmodsi4 splitter): New define_split.
11775         (divmodsi4_zext_1, divmodsi4_zext_2, *divmodsi4_zext_1,
11776         *divmodsi4_zext_2): New define_insn_and_split.
11777         (*divmodsi4_noext_zext_1, *divmodsi4_noext_zext_2): New define_insn.
11778         (TARGET_USE_8BIT_IDIV zext udivmodsi4 splitter): New define_split.
11779         (udivmodsi4_zext_1, udivmodsi4_zext_2, *udivmodsi4_zext_1,
11780         *udivmodsi4_zext_2, *udivmodsi4_pow2_zext_1, *udivmodsi4_pow2_zext_2):
11781         New define_insn_and_split.
11782         (*udivmodsi4_noext_zext_1, *udivmodsi4_noext_zext_2): New define_insn.
11783         * config/i386/i386.c (ix86_split_idivmod): Handle operands[0] or
11784         operands[1] having DImode when mode is SImode.
11786         * config/i386/i386.c (ix86_split_idivmod): Use mode instead of
11787         always SImode for DIV and MOD in REG_EQUAL notes.
11789 2017-09-29  Yury Gribov  <tetra2005@gmail.com>
11791         PR middle-end/82319
11792         * match.pd: Fix handling of NaNs in pattern.
11794 2017-09-29  Jeff Law  <law@redhat.com>
11796         * sbitmap.c (bitmap_bit_in_range_p): New function.
11797         * sbitmap.h (bitmap_bit_in_range_p): Prototype.
11798         * tree-ssa-dse.c (live_bytes_read): New function.
11799         (dse_classify_store): Ignore reads of dead bytes.
11801         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Fix
11802         typos and whitespace errors.
11803         * config/i386/predicates.md (address_no_seg_operand): Likewise.
11804         * config/s390/s390.c (s390_emit_prologue): Likewise.
11806 2017-09-29  Vladimir Makarov  <vmakarov@redhat.com>
11808         PR target/81481
11809         * ira-costs.c (scan_one_insn): Don't take into account PIC equiv
11810         with a symbol for LRA.
11812 2017-09-29  Vladimir Makarov  <vmakarov@redhat.com>
11814         PR rtl-optimization/82338
11815         * lra-constraints.c (inherit_in_ebb): Check usage_insns check.
11817 2017-09-29  Alexander Monakov  <amonakov@ispras.ru>
11819         * genmodes.c (calc_wider_mode): Suppress qsort macro.
11820         * system.h [CHECKING_P] (qsort): Redirect to qsort_chk.
11821         (qsort_chk): Declare.
11822         * vec.c [CHECKING_P] (qsort_chk_error): New static function.
11823         (qsort_chk): New function.
11825 2017-09-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11827         PR tree-optimization/82337
11828         * gimple-ssa-strength-reduction.c (find_phi_def): Don't record a
11829         phi definition if the PHI result appears in an abnormal PHI.
11830         (find_basis_for_base_expr): Don't record a basis if the LHS of the
11831         basis appears in an abnormal PHI.
11833 2017-09-29  Richard Biener  <rguenther@suse.de>
11835         * graphite-isl-ast-to-gimple.c
11836         (translate_isl_ast_to_gimple::set_codegen_error): New function.
11837         (binary_op_to_tree): Use it.
11838         (get_rename_from_scev): Likewise.
11839         (copy_loop_phi_nodes): Likewise.
11840         (copy_bb_and_scalar_dependences): Likewise.
11841         (translate_pending_phi_nodes): Likewise.
11843 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
11845         PR target/82339
11846         * config/i386/i386.md (*movdi_internal peephole2): New -Os peephole
11847         for movabsq $(i32 << shift), r64.
11849 2017-09-28  Uros Bizjak  <ubizjak@gmail.com>
11851         * config/i386/i386.c (ix86_print_operand_address_as): Do not check
11852         index when encoding %esp as %rsp to avoid 0x67 prefix.
11854 2017-09-28  Sergey Shalnov  <Sergey.Shalnov@intel.com>
11856         * config/i386/i386.md (*movsf_internal, *movdf_internal):
11857         Return 256-bit AVX modes for TARGET_PREFER_AVX256.
11859 2017-09-28  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11861         * config/arm/arm.c (arm_option_override): Forbid ARMv8-M Security
11862         Extensions with more than 16 double VFP registers.
11863         (cmse_nonsecure_entry_clear_before_return): Remove second entry of
11864         to_clear_mask and all code related to it.  Replace the remaining
11865         entry by a sbitmap and adapt code accordingly.
11867 2017-09-28  Henry Linjamäki  <henry.linjamaki@parmance.com>
11869         * brig-builtins.def: Change pure attributes to const.
11871 2017-09-28  Joseph Myers  <joseph@codesourcery.com>
11873         * config.gcc (default_gnu_indirect_function): Default to yes for
11874         sparc*-*-linux* with glibc.
11876 2017-09-28  Joseph Myers  <joseph@codesourcery.com>
11878         * config/aarch64/aarch64.c (aarch64_elf_asm_constructor)
11879         (aarch64_elf_asm_destructor): Pass SECTION_NOTYPE to get_section
11880         when creating .init_array and .fini_array sections with priority
11881         specified.
11883 2017-09-27  Christophe Lyon  <christophe.lyon@linaro.org>
11885         PR target/71727
11886         * config/aarch64/aarch64.c
11887         (aarch64_builtin_support_vector_misalignment): Always return false
11888         when misalignment is unknown.
11890 2017-09-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11892         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Revise
11893         this function to return false if the definition used by the swap
11894         instruction is artificial, or if the memory address from which the
11895         constant value is loaded is not represented by a base address held
11896         in a register or if the base address register is a frame or stack
11897         pointer.  Additionally, return false if the base address of the
11898         loaded constant is a SYMBOL_REF but is not considered to be a
11899         constant.
11900         (replace_swapped_load_constant): New function.
11901         (rs6000_analyze_swaps): Add a new pass to replace a swap of a
11902         loaded constant vector with a load of a swapped constant vector.
11904 2017-09-27  Carl Love  <cel@us.ibm.com>
11906         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
11907         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
11908         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
11909         fctiw instruction.
11911 2017-09-27  Alexander Monakov  <amonakov@ispras.ru>
11913         * haifa-sched.c (autopref_rank_for_schedule): Order 'irrelevant' insns
11914         first, always call autopref_rank_data otherwise.
11916 2017-09-27  Richard Biener  <rguenther@suse.de>
11918         * graphite-scop-detection.c (find_scop_parameters): Move
11919         loop bound handling ...
11920         (gather_bbs::before_dom_children): ... here, avoiding the need
11921         to build scop_info->loop_nest.
11922         (record_loop_in_sese): Remove.
11923         * sese.h (sese_info_t::loop_nest): Remove.
11924         * sese.c (new_sese_info): Do not allocate loop_nest.
11925         (free_sese_info): Do not free loop_nest.
11927 2017-09-27  Jakub Jelinek  <jakub@redhat.com>
11929         PR c++/82159
11930         * gimplify.c (gimplify_modify_expr): Don't optimize away zero sized
11931         lhs from calls if the lhs has addressable type.
11933 2017-09-27  Richard Biener  <rguenther@suse.de>
11935         * graphite.h (scop::max_alias_set): New member.
11936         * graphite-scop-detection.c: Remove references to non-existing
11937         --param in comments.
11938         (build_alias_sets): Record the maximum alias set used for drs.
11939         (build_scops): Support zero as unlimited for
11940         --param graphite-max-arrays-per-scop.
11941         * graphite-sese-to-poly.c (add_scalar_version_numbers): Remove
11942         and inline into ...
11943         (build_poly_sr_1): ... here.  Compute alias set based on the
11944         maximum alias set used for drs rather than
11945         PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP
11947 2017-09-27  Richard Biener  <rguenther@suse.de>
11949         * graphite-optimize-isl.c (get_schedule_for_node_st): Allow
11950         --param loop-block-tile-size=0 to disable tiling.
11952 2017-09-27  Richard Biener  <rguenther@suse.de>
11954         * doc/invoke.texi (graphite-max-bbs-per-function): Remove.
11955         (graphite-max-nb-scop-params): Document special value zero.
11956         * domwalk.h (dom_walker::STOP): New symbolical constant.
11957         (dom_walker::dom_walker): Add optional parameter for bb to
11958         RPO mapping.
11959         (dom_walker::~dom_walker): Declare.
11960         (dom_walker::before_dom_children): Document STOP return value.
11961         (dom_walker::m_user_bb_to_rpo): New member.
11962         (dom_walker::m_bb_to_rpo): Likewise.
11963         * domwalk.c (dom_walker::dom_walker): Compute bb to RPO
11964         mapping here if not provided by the user.
11965         (dom_walker::~dom_walker): Free bb to RPO mapping if not
11966         provided by the user.
11967         (dom_walker::STOP): Define.
11968         (dom_walker::walk): Do not compute bb to RPO mapping here.
11969         Support STOP return value from before_dom_children to stop
11970         walking.
11971         * graphite-optimize-isl.c (optimize_isl): If the schedule
11972         is the same still generate code if -fgraphite-identity
11973         or -floop-parallelize-all are given.
11974         * graphite-scop-detection.c: Include cfganal.h.
11975         (gather_bbs::gather_bbs): Get and pass through bb to RPO
11976         mapping.
11977         (gather_bbs::before_dom_children): Return STOP for BBs
11978         not in the region.
11979         (build_scops): Compute bb to RPO mapping and pass it to
11980         the domwalk.  Treat --param graphite-max-nb-scop-params=0
11981         as not limiting the number of params.
11982         * graphite.c (graphite_initialize): Remove limit on the
11983         number of basic-blocks in a function.
11984         * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Remove.
11985         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Adjust to documented
11986         default value of 10.
11988 2017-09-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
11990         * config/rs6000/vsx.md (peephole for optimizing move SF to GPR):
11991         Adjust code to eliminate needing to do the shift right 32-bits
11992         operation after XSCVDPSPN.
11994 2017-09-26  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11996         * match.pd ((X / Y) == 0 -> X < Y): New pattern.
11997         ((X / Y) != 0 -> X >= Y): Likewise.
11999 2017-09-26  Carl Love  <cel@us.ibm.com>
12001         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_XL_LEN_R,
12002         P9V_BUILTIN_VEC_XST_LEN_R): Add support for builtins
12003         vector unsigned char vec_xl_len_r (unsigned char *, size_t);
12004         void vec_xst_len_r (vector unsigned char, unsigned char *, size_t);
12005         * config/rs6000/altivec.h (vec_xl_len_r, vec_xst_len_r): Add defines.
12006         * config/rs6000/rs6000-builtin.def (XL_LEN_R, XST_LEN_R): Add
12007         definitions and overloading.
12008         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case
12009         statement for P9V_BUILTIN_XST_LEN_R.
12010         (altivec_init_builtins): Add def_builtin for P9V_BUILTIN_STXVLL.
12011         * config/rs6000/vsx.md (lxvll, stxvll, xl_len_r, xst_len_r): Add
12012         define_expand and define_insn for the instructions and builtins.
12013         * doc/extend.texi: Update the built-in documentation file for the new
12014         built-in functions.
12015         * config/rs6000/altivec.md (altivec_lvsl_reg, altivec_lvsr_reg): Add
12016         define_insn for the instructions
12018 2017-09-26  Krister Walfridsson  <krister.walfridsson@gmail.com>
12020         PR target/39570
12021         * gcc/config/netbsd-protos.h: New file.
12022         * gcc/config/netbsd.c: New file.
12023         * gcc/config/netbsd.h (SUBTARGET_INIT_BUILTINS): Define.
12024         * gcc/config/t-netbsd: New file.
12025         * gcc/config.gcc (tm_p_file): Add netbsd-protos.h.
12026         (tmake_file) Add t-netbsd.
12027         (extra_objs) Add netbsd.o.
12029 2017-09-26  Janus Weil  <janus@gcc.gnu.org>
12031         PR fortran/82143
12032         PR fortran/82324
12033         * doc/sourcebuild.texi: Document fortran_real_10 and fortran_real_16.
12035 2017-09-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
12037         * config/rs6000/rs6000.md (extendsi<mode>2): Add a splitter to do
12038         sign extension from a vector register to a GPR by doing a 32-bit
12039         direct move and then an EXTSW.
12040         (extendsi<mode>2 splitter): Likewise.
12041         (movsi_from_sf): Adjust code to eliminate doing a 32-bit shift
12042         right or vector extract after doing XSCVDPSPN.  Use
12043         zero_extendsidi2 instead of p8_mfvsrd_4_disf to move the value to
12044         the GPRs.
12045         (movdi_from_sf_zero_ext): Likewise.
12046         (reload_gpr_from_vsxsf): Likewise.
12047         (p8_mfvsrd_4_disf): Delete, no longer used.
12048         (movsi_from_df): Optimize converting a DFmode to a SFmode, and
12049         then needing to move the SFmode to a GPR to use the XSCVDPSP
12050         instruction instead of FRSP and XSCVDPSPN.
12051         * config/rs6000/vsx.md (vsx_xscvspdp_scalar2): Move insn so that
12052         it is adjacent to the other XSCVSPDP insns.
12053         (vsx_xscvdpsp_scalar): Use "ww" constraint instead of "f" to allow
12054         SFmode to be in traditional Altivec registers.
12055         (vsx_xscvdpspn): Eliminate useless alternative constraint.
12056         (vsx_xscvspdpn): Likewise.
12057         (vsx_xscvspdpn_scalar): Likewise.
12059 2017-09-26  Martin Jambor  <mjambor@suse.cz>
12061         * tree-sra.c (compare_access_positions): Put integral types first,
12062         stabilize sorting of integral types, remove conditions putting
12063         non-full-precision integers last.
12064         (sort_and_splice_var_accesses): Disable scalarization if a
12065         non-integert would be represented by a non-full-precision integer.
12067 2017-09-26  Joseph Myers  <joseph@codesourcery.com>
12069         * config/microblaze/linux.h (TARGET_ASM_FILE_END): Likewise.
12070         * config/pa/pa.h (NEED_INDICATE_EXEC_STACK): Likewise.
12071         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Likewise.
12072         * config/pa/pa.c (pa_hpux_file_end): Rename to pa_file_end.
12073         Define unconditionally, with [ASM_OUTPUT_EXTERNAL_REAL]
12074         conditionals inside the function instead of around it.  Call
12075         file_end_indicate_exec_stack if NEED_INDICATE_EXEC_STACK.
12076         (TARGET_ASM_FILE_END): Define unconditionally to pa_file_end.
12078 2017-09-26  Richard Biener  <rguenther@suse.de>
12080         * graphite-scop-detection.c (scop_detection::build_scop_depth): Rewrite,
12081         fold in ...
12082         (scop_detection::build_scop_breadth): ... this.  Removed.
12083         (scop_detection::loop_is_valid_in_scop): Fold into single caller.
12084         (scop_detection::harmful_stmt_in_bb): Likewise.
12085         (scop_detection::graphite_can_represent_stmt): Likewise.
12086         (scop_detection::loop_body_is_valid_scop): Likewise.  Remove recursion.
12087         (scop_detection::can_represent_loop): Remove recursion, fold in ...
12088         (scop_detection::can_represent_loop_1): ... this.  Removed.
12089         (scop_detection::harmful_loop_in_region): Simplify after inlining
12090         the above and remove more quadraticness.
12091         (build_scops): Adjust.
12092         * tree-data-ref.c (loop_nest_has_data_refs): Remove pointless
12093         quadraticness.
12095 2017-09-26  Jakub Jelinek  <jakub@redhat.com>
12097         PR target/82267
12098         * config/i386/i386.c (ix86_print_operand_address_as): Only test
12099         REGNO (base) == SP_REG if base is a REG.
12101         PR middle-end/35691
12102         * tree-ssa-reassoc.c (update_range_test): Dump r->exp each time
12103         if it is different SSA_NAME.
12104         (optimize_range_tests_cmp_bitwise): New function.
12105         (optimize_range_tests): Call it.
12107 2017-09-26  Richard Biener  <rguenther@suse.de>
12109         PR tree-optimization/82321
12110         * graphite.c (canonicalize_loop_closed_ssa): Properly check
12111         for the def being inside the loop.
12113 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12115         * config/s390/vx-builtins.md ("vmslg"): Add missing operand in
12116         assembler output.
12117         * config/s390/s390-builtins.def: Fix constraint on op4.
12119 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12121         * config/s390/s390.c (s390_expand_vec_compare): Use the new mode
12122         independent expanders.
12123         * config/s390/vector.md ("vec_cmpuneq", "vec_cmpltgt")
12124         ("vec_ordered", "vec_unordered"): New expanders.
12126 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12128         * config/s390/s390.c (s390_preferred_simd_mode): Return V4SFmode
12129         for SFmode.
12131 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12133         * config/s390/vector.md ("vec_unpacks_low_v16qi"): Rename to
12134         vec_unpacks_lo_v16qi.
12135         ("vec_unpacku_low_v16qi"): Rename to vec_unpacku_lo_v16qi.
12137 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12139         * config/s390/vector.md ("vec_unpacks_lo_v4sf")
12140         ("vec_unpacks_hi_v4sf", "vec_unpacks_lo_v2df")
12141         ("vec_unpacks_hi_v2df", "vec_pack_trunc_v2df"): New expanders.
12143 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12145         * config/s390/predicates.md ("const_shift_by_byte_operand"): New
12146         predicate.
12147         * config/s390/vector.md ("*vec_srb<mode>"): Change modes to V_128
12148         and V16QI.
12149         ("*vec_slb<mode>"): New insn pattern.
12150         ("vec_shr_<mode>"): New expander.
12151         * config/s390/vx-builtins.md ("vec_slb<mode>"): Turn into expander
12152         and force the shift count operand to V16QImode.
12153         ("vec_srb<mode>"): Set shift count mode to V16QI.
12155 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12157         * config/s390/vector.md ("vec_widen_umult_lo_<mode>")
12158         ("vec_widen_umult_hi_<mode>", "vec_widen_smult_lo_<mode>")
12159         ("vec_widen_smult_hi_<mode>"): New expander definitions.
12161 2017-09-26  Richard Earnshaw  <rearnsha@arm.com>
12163         PR target/82175
12164         * config/arm/arm.h (DRIVER_SELF_SPECS): Separate sub-rules with commas.
12166 2017-09-26  Richard Biener  <rguenther@suse.de>
12168         PR tree-optimization/82320
12169         * tree-ssa-sccvn.c (set_ssa_val_to): Changing undef to undef
12170         isn't a change.
12172 2017-09-25  Jeff Law  <law@redhat.com>
12174         * config/rs6000/rs6000-protos.h (output_probe_stack_range): Update
12175         prototype for new argument.
12176         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack_1): New function,
12177         mostly extracted from rs6000_emit_allocate_stack.
12178         (rs6000_emit_probe_stack_range_stack_clash): New function.
12179         (rs6000_emit_allocate_stack): Call
12180         rs6000_emit_probe_stack_range_stack_clash as needed.
12181         (rs6000_emit_probe_stack_range): Add additional argument
12182         to call to gen_probe_stack_range{si,di}.
12183         (output_probe_stack_range): New.
12184         (output_probe_stack_range_1): Renamed from output_probe_stack_range.
12185         (output_probe_stack_range_stack_clash): New.
12186         (rs6000_emit_prologue): Emit notes into dump file as requested.
12187         * rs6000.md (allocate_stack): Handle -fstack-clash-protection.
12188         (probe_stack_range<P:mode>): Operand 0 is now early-clobbered.
12189         Add additional operand and pass it to output_probe_stack_range.
12191 2017-09-25  Bin Cheng  <bin.cheng@arm.com>
12193         PR tree-optimization/82163
12194         * tree-ssa-loop-manip.h (verify_loop_closed_ssa): New parameter.
12195         (checking_verify_loop_closed_ssa): New parameter.
12196         * tree-ssa-loop-manip.c (check_loop_closed_ssa_use): Delete.
12197         (check_loop_closed_ssa_stmt): Delete.
12198         (check_loop_closed_ssa_def, check_loop_closed_ssa_bb): New functions.
12199         (verify_loop_closed_ssa): Check loop closed ssa form for LOOP.
12200         (tree_transform_and_unroll_loop): Check loop closed ssa form only for
12201         changed loops.
12203 2017-09-25  Pekka Jaaskelainen <pekka@parmance.com>
12205         * brig-builtins.def: Treat HSAIL barrier builtins as
12206         setjmp/longjump style functions.
12208 2017-09-25  Richard Sandiford  <richard.sandiford@linaro.org>
12210         * target.def (constant_alignment): New hook.
12211         * defaults.h (CONSTANT_ALIGNMENT): Delete.
12212         * doc/tm.texi.in (CONSTANT_ALIGNMENT): Replace with...
12213         (TARGET_CONSTANT_ALIGNMENT): ...this new hook.
12214         * doc/tm.texi: Regenerate.
12215         * targhooks.h (default_constant_alignment): Declare.
12216         (constant_alignment_word_strings): Likewise.
12217         * targhooks.c (default_constant_alignment): New function.
12218         (constant_alignment_word_strings): Likewise.
12219         * builtins.c (get_object_alignment_2): Use targetm.constant_alignment
12220         instead of CONSTANT_ALIGNMENT.
12221         * varasm.c (align_variable, get_variable_align, build_constant_desc)
12222         (force_const_mem): Likewise.
12223         * config/aarch64/aarch64.h (CONSTANT_ALIGNMENT): Delete.
12224         * config/aarch64/aarch64.c (aarch64_constant_alignment): New function.
12225         (aarch64_classify_address): Call it instead of CONSTANT_ALIGNMENT.
12226         (TARGET_CONSTANT_ALIGNMENT): Redefine.
12227         * config/alpha/alpha.h (CONSTANT_ALIGNMENT): Delete commented-out
12228         definition.
12229         * config/arc/arc.h (CONSTANT_ALIGNMENT): Delete.
12230         * config/arc/arc.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
12231         constant_alignment_word_strings.
12232         * config/arm/arm.h (CONSTANT_ALIGNMENT_FACTOR): Delete.
12233         (CONSTANT_ALIGNMENT): Likewise.
12234         * config/arm/arm.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
12235         (arm_constant_alignment): New function.
12236         * config/bfin/bfin.h (CONSTANT_ALIGNMENT): Delete.
12237         * config/bfin/bfin.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
12238         constant_alignment_word_strings.
12239         * config/cr16/cr16.h (CONSTANT_ALIGNMENT): Delete.
12240         * config/cr16/cr16.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
12241         constant_alignment_word_strings.
12242         * config/cris/cris.h (CONSTANT_ALIGNMENT): Delete.
12243         * config/cris/cris.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
12244         (cris_constant_alignment): New function.
12245         * config/epiphany/epiphany.h (CONSTANT_ALIGNMENT): Delete.
12246         * config/epiphany/epiphany.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
12247         (epiphany_constant_alignment): New function.
12248         * config/fr30/fr30.h (CONSTANT_ALIGNMENT): Delete.
12249         * config/fr30/fr30.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
12250         constant_alignment_word_strings.
12251         * config/frv/frv.h (CONSTANT_ALIGNMENT): Delete.
12252         * config/frv/frv.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
12253         constant_alignment_word_strings.
12254         * config/ft32/ft32.h (CONSTANT_ALIGNMENT): Delete.
12255         * config/ft32/ft32.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
12256         constant_alignment_word_strings.
12257         * config/i386/i386.h (CONSTANT_ALIGNMENT): Delete.
12258         * config/i386/i386-protos.h (ix86_constant_alignment): Delete.
12259         * config/i386/i386.c (ix86_constant_alignment): Make static.
12260         Use the same interface as the target hook.
12261         (TARGET_CONSTANT_ALIGNMENT): Redefine.
12262         * config/ia64/ia64.h (CONSTANT_ALIGNMENT): Delete.
12263         * config/ia64/ia64.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
12264         constant_alignment_word_strings.
12265         * config/iq2000/iq2000.h (CONSTANT_ALIGNMENT): Delete.
12266         * config/iq2000/iq2000.c (iq2000_constant_alignment): New function.
12267         (TARGET_CONSTANT_ALIGNMENT): Redefine.
12268         * config/lm32/lm32.h (CONSTANT_ALIGNMENT): Delete.
12269         * config/lm32/lm32.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
12270         constant_alignment_word_strings.
12271         * config/m32r/m32r.h (CONSTANT_ALIGNMENT): Delete.
12272         * config/m32r/m32r.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
12273         constant_alignment_word_strings.
12274         * config/mcore/mcore.h (CONSTANT_ALIGNMENT): Delete.
12275         * config/mcore/mcore.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
12276         constant_alignment_word_strings.
12277         * config/microblaze/microblaze.h (CONSTANT_ALIGNMENT): Delete.
12278         * config/microblaze/microblaze.c (microblaze_constant_alignment):
12279         New function.
12280         (TARGET_CONSTANT_ALIGNMENT): Redefine.
12281         * config/mips/mips.h (CONSTANT_ALIGNMENT): Delete.
12282         * config/mips/mips.c (mips_constant_alignment): New function.
12283         (TARGET_CONSTANT_ALIGNMENT): Redefine.
12284         * config/mmix/mmix.h (CONSTANT_ALIGNMENT): Delete.
12285         * config/mmix/mmix-protos.h (mmix_constant_alignment): Delete.
12286         * config/mmix/mmix.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
12287         (mmix_constant_alignment): Make static.  Use the same interface
12288         as the target hook.
12289         * config/moxie/moxie.h (CONSTANT_ALIGNMENT): Delete.
12290         * config/moxie/moxie.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
12291         constant_alignment_word_strings.
12292         * config/nios2/nios2.h (CONSTANT_ALIGNMENT): Delete.
12293         * config/nios2/nios2.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
12294         constant_alignment_word_strings.
12295         * config/pa/pa.h (CONSTANT_ALIGNMENT): Delete.
12296         * config/pa/pa.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
12297         constant_alignment_word_strings.
12298         * config/powerpcspe/powerpcspe.h (CONSTANT_ALIGNMENT): Delete.
12299         * config/powerpcspe/powerpcspe.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
12300         (rs6000_constant_alignment): New function.
12301         * config/riscv/riscv.h (CONSTANT_ALIGNMENT): Delete.
12302         * config/riscv/riscv.c (riscv_constant_alignment): New function.
12303         (TARGET_CONSTANT_ALIGNMENT): Redefine.
12304         * config/rs6000/rs6000.h (CONSTANT_ALIGNMENT): Delete.
12305         * config/rs6000/rs6000.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
12306         (rs6000_constant_alignment): New function.
12307         * config/s390/s390.h (CONSTANT_ALIGNMENT): Delete.
12308         * config/s390/s390.c (s390_constant_alignment): New function.
12309         (TARGET_CONSTANT_ALIGNMENT): Redefine.
12310         * config/sh/sh.h (CONSTANT_ALIGNMENT): Delete.
12311         * config/sh/sh.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
12312         constant_alignment_word_strings.
12313         * config/sparc/sparc.h (CONSTANT_ALIGNMENT): Delete.
12314         * config/sparc/sparc.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
12315         (sparc_constant_alignment): New function.
12316         * config/spu/spu.h (CONSTANT_ALIGNMENT): Delete.
12317         * config/spu/spu.c (spu_constant_alignment): New function.
12318         (TARGET_CONSTANT_ALIGNMENT): Redefine.
12319         * config/stormy16/stormy16.h (CONSTANT_ALIGNMENT): Delete.
12320         * config/stormy16/stormy16.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
12321         constant_alignment_word_strings.
12322         * config/tilegx/tilegx.h (CONSTANT_ALIGNMENT): Delete.
12323         * config/tilegx/tilegx.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
12324         constant_alignment_word_strings.
12325         * config/tilepro/tilepro.h (CONSTANT_ALIGNMENT): Delete.
12326         * config/tilepro/tilepro.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
12327         constant_alignment_word_strings.
12328         * config/visium/visium.h (CONSTANT_ALIGNMENT): Delete.
12329         * config/visium/visium.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
12330         (visium_constant_alignment): New function.
12331         * config/xtensa/xtensa.h (CONSTANT_ALIGNMENT): Delete.
12332         * config/xtensa/xtensa.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
12333         (xtensa_constant_alignment): New function.
12334         * system.h (CONSTANT_ALIGNMENT): Poison.
12336 2017-09-25  Will Schmidt  <will_schmidt@vnet.ibm.com>
12338         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
12339         for early folding of vector stores (ALTIVEC_BUILTIN_ST_*).
12340         (rs6000_builtin_valid_without_lhs): New helper function.
12341         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
12342         Remove obsoleted code for handling ALTIVEC_BUILTIN_VEC_ST.
12344 2017-09-25  Richard Sandiford  <richard.sandiford@linaro.org>
12346         * target.h (vec_perm_indices): Use unsigned short rather than
12347         unsigned char.
12348         (auto_vec_perm_indices): Likewise.
12349         * config/aarch64/aarch64.c (aarch64_vectorize_vec_perm_const_ok):
12350         Use unsigned int rather than unsigned char.
12351         * config/arm/arm.c (arm_vectorize_vec_perm_const_ok): Likewise.
12353 2017-09-25  Richard Biener  <rguenther@suse.de>
12355         * cfgloop.h (sort_sibling_loops): Declare.
12356         * cfgloop.c (sort_sibling_loops_cmp): New helper.
12357         (sort_sibling_loops): New function sorting the sibling loop list
12358         in RPO order.
12359         * graphite.c (graphite_transform_loops): Sort sibling loops.
12361 2017-09-25  Richard Sandiford  <richard.sandifird@linaro.org>
12363         * target.def (vec_perm_const_ok): Change sel parameter to
12364         vec_perm_indices.
12365         * optabs-query.c (can_vec_perm_p): Update accordingly.
12366         * doc/tm.texi: Regenerate.
12367         * config/aarch64/aarch64.c (expand_vec_perm_d): Change perm to
12368         auto_vec_perm_indices and remove separate nelt field.
12369         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
12370         (aarch64_evpc_ext, aarch64_evpc_rev, aarch64_evpc_dup)
12371         (aarch64_evpc_tbl, aarch64_expand_vec_perm_const_1)
12372         (aarch64_expand_vec_perm_const): Update accordingly.
12373         (aarch64_vectorize_vec_perm_const_ok): Likewise.  Change sel
12374         to vec_perm_indices.
12375         * config/arm/arm.c (expand_vec_perm_d): Change perm to
12376         auto_vec_perm_indices and remove separate nelt field.
12377         (arm_evpc_neon_vuzp, arm_evpc_neon_vzip, arm_evpc_neon_vrev)
12378         (arm_evpc_neon_vtrn, arm_evpc_neon_vext, arm_evpc_neon_vtbl)
12379         (arm_expand_vec_perm_const_1, arm_expand_vec_perm_const): Update
12380         accordingly.
12381         (arm_vectorize_vec_perm_const_ok): Likewise.  Change sel
12382         to vec_perm_indices.
12383         * config/i386/i386.c (ix86_vectorize_vec_perm_const_ok): Change
12384         sel to vec_perm_indices.
12385         * config/ia64/ia64.c (ia64_vectorize_vec_perm_const_ok): Likewise.
12386         * config/mips/mips.c (mips_vectorize_vec_perm_const_ok): Likewise.
12387         * config/powerpcspe/powerpcspe.c (rs6000_vectorize_vec_perm_const_ok):
12388         Likewise.
12389         * config/rs6000/rs6000.c (rs6000_vectorize_vec_perm_const_ok):
12390         Likewise.
12392 2017-09-25  Pierre-Marie de Rodat  <derodat@adacore.com>
12394         PR debug/82155
12395         * dwarf2out.c (dwarf2out_early_global_decl): Call dwarf2out_decl
12396         on the FUNCTION_DECL function context if it has a DIE that is a
12397         declaration.
12399 2017-09-25  Richard Biener  <rguenther@suse.de>
12401         PR tree-optimization/82285
12402         * tree-vect-patterns.c (vect_recog_bool_pattern): Also handle
12403         enumeral types.
12405 2017-09-25  Tom de Vries  <tom@codesourcery.com>
12407         PR target/80035
12408         PR target/81069
12409         * config/nvptx/nvptx.c (nvptx_output_call_insn): Add exit after call to
12410         noreturn function.
12412 2017-09-25  Richard Biener  <rguenther@suse.de>
12414         * graphite-optimize-isl.c (optimize_isl): Fail and dump if
12415         ISL errors other than isl_error_quota happen.  Dump if the
12416         schedule is the same.
12417         * graphite-sese-to-poly.c (build_poly_scop): Fail on ISL
12418         errors instead of aborting inside ISL.
12420 2017-09-25  Iain Sandoe  <iain@codesourcery.com>
12422         PR target/80556
12423         * config/i386/darwin.h (REAL_LIB_SPEC): New; put libSystem ahead
12424         of libgcc_eh for m64.
12425         * config/i386/darwin64.h: Likewise.
12427 2017-09-25  Richard Biener  <rguenther@suse.de>
12429         PR middle-end/82144
12430         * dwarf2out.c (gen_enumeration_type_die): Do not add alignment
12431         attribute for incomplete types nor twice for complete ones.
12433 2017-09-24  Uros Bizjak  <ubizjak@gmail.com>
12435         PR target/82267
12436         * config/i386/i386.c (ix86_print_operand_address_as): Encode
12437         %esp as %rsp to avoid 0x67 prefix if there is no index or base
12438         register.
12440 2017-09-23  Uros Bizjak  <ubizjak@gmail.com>
12442         PR bootstrap/82306
12443         * config/i386/i386.opt (mprefer-avx256): Use
12444         ix86_target_flags variable.
12445         * config/i386/i386.c (ix86_target_string): Move
12446         -mprefer-avx256 to flag2_opts.
12448 2017-09-22  Jakub Jelinek  <jakub@redhat.com>
12450         PR middle-end/35691
12451         * match.pd: Simplify x == -1 & y == -1 into (x & y) == -1
12452         and x != -1 | y != -1 into (x & y) != -1.
12454 2017-09-22  Steve Ellcey  <sellcey@cavium.com>
12456         * config.gcc: Add new case statement to set
12457         default_gnu_indirect_function.  Remove it from x86_64-*-linux*,
12458         i[34567]86-*, powerpc*-*-linux*spe*, powerpc*-*-linux*, s390-*-linux*,
12459         s390x-*-linux* case statements.   Added aarch64 to the list of
12460         supported architectures.
12462 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
12464         PR tree-optimization/82289
12465         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Check
12466         STMT_VINFO_RELEVANT_P.
12468 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
12469             Alan Hayward  <alan.hayward@arm.com>
12470             David Sherwood  <david.sherwood@arm.com>
12472         * tree-vrp.c (extract_range_from_multiplicative_op_1): Assert
12473         for VR_RANGE only; don't allow VR_ANTI_RANGE.
12474         (extract_range_from_binary_expr_1): Don't call
12475         extract_range_from_multiplicative_op_1 if !range_int_cst_p.
12477 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
12478             Alan Hayward  <alan.hayward@arm.com>
12479             David Sherwood  <david.sherwood@arm.com>
12481         * target.def (preferred_vector_alignment): New hook.
12482         * doc/tm.texi.in (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): New
12483         hook.
12484         * doc/tm.texi: Regenerate.
12485         * targhooks.h (default_preferred_vector_alignment): Declare.
12486         * targhooks.c (default_preferred_vector_alignment): New function.
12487         * tree-vectorizer.h (dataref_aux): Add a target_alignment field.
12488         Expand commentary.
12489         (DR_TARGET_ALIGNMENT): New macro.
12490         (aligned_access_p): Update commentary.
12491         (vect_known_alignment_in_bytes): New function.
12492         * tree-vect-data-refs.c (vect_calculate_required_alignment): New
12493         function.
12494         (vect_compute_data_ref_alignment): Set DR_TARGET_ALIGNMENT.
12495         Calculate the misalignment based on the target alignment rather than
12496         the vector size.
12497         (vect_update_misalignment_for_peel): Use DR_TARGET_ALIGMENT
12498         rather than TYPE_ALIGN / BITS_PER_UNIT to update the misalignment.
12499         (vect_enhance_data_refs_alignment): Mask the byte misalignment with
12500         the target alignment, rather than masking the element misalignment
12501         with the number of elements in a vector.  Also use the target
12502         alignment when calculating the maximum number of peels.
12503         (vect_find_same_alignment_drs): Use vect_calculate_required_alignment
12504         instead of TYPE_ALIGN_UNIT.
12505         (vect_duplicate_ssa_name_ptr_info): Remove stmt_info parameter.
12506         Measure DR_MISALIGNMENT relative to DR_TARGET_ALIGNMENT.
12507         (vect_create_addr_base_for_vector_ref): Update call accordingly.
12508         (vect_create_data_ref_ptr): Likewise.
12509         (vect_setup_realignment): Realign by ANDing with
12510         -DR_TARGET_MISALIGNMENT.
12511         * tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Calculate
12512         the number of peels based on DR_TARGET_ALIGNMENT.
12513         * tree-vect-stmts.c (get_group_load_store_type): Compare the gap
12514         with the guaranteed alignment boundary when deciding whether
12515         overrun is OK.
12516         (vectorizable_mask_load_store): Interpret DR_MISALIGNMENT
12517         relative to DR_TARGET_ALIGNMENT instead of TYPE_ALIGN_UNIT.
12518         (ensure_base_align): Remove stmt_info parameter.  Get the
12519         target base alignment from DR_TARGET_ALIGNMENT.
12520         (vectorizable_store): Update call accordingly.   Interpret
12521         DR_MISALIGNMENT relative to DR_TARGET_ALIGNMENT instead of
12522         TYPE_ALIGN_UNIT.
12523         (vectorizable_load): Likewise.
12525 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
12526             Alan Hayward  <alan.hayward@arm.com>
12527             David Sherwood  <david.sherwood@arm.com>
12529         * tree-vectorizer.h (vect_get_scalar_dr_size): New function.
12530         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Use it.
12531         (vect_enhance_data_refs_alignment): Likewise.
12533 2017-09-22  Richard Earnshaw  <richard.earnshaw@arm.com>
12535         * config/arm/parsecpu.awk (fatal): Note that we've encountered an
12536         error.  Only quit immediately if parsing is complete.
12537         (BEGIN): Initialize fatal_err and parse_done.
12538         (begin fpu, end fpu): Check number of arguments.
12539         (begin arch, end arch): Likewise.
12540         (begin cpu, end cpu): Likewise.
12541         (cname, tune for, tune flags, architecture, fpu, option): Likewise.
12542         (optalias): Likewise.
12544 2017-09-22  Richard Earnshaw  <richard.earnshaw@arm.com>
12546         * config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.
12547         * config/arm/arm-isa.h: Delete.  Move definitions to ...
12548         * arm-cpus.in: ... here.  Use new feature and fgroup values.
12549         * config/arm/arm.c (arm_option_override): Use lower case for feature
12550         bit names.
12551         * config/arm/arm.h (TARGET_HARD_FLOAT): Likewise.
12552         (TARGET_VFP3, TARGET_VFP5, TARGET_FMA): Likewise.
12553         * config/arm/parsecpu.awk (END): Add new command 'isa'.
12554         (isa_pfx): Delete.
12555         (print_isa_bits_for): New function.
12556         (gen_isa): New function.
12557         (gen_comm_data): Use print_isa_bits_for.
12558         (define feature): New keyword.
12559         (define fgroup): New keyword.
12560         * config/arm/t-arm (TM_H): Remove.
12561         (GTM_H): Add arm-isa.h.
12562         (arm-isa.h): Add rule to generate file.
12563         * common/config/arm/arm-common.c: (arm_canon_arch_option): Use lower
12564         case for feature bit names.
12566 2017-09-22  Richard Biener  <rguenther@suse.de>
12568         * graphite-isl-ast-to-gimple.c (graphite_verify): Inline into
12569         single caller.
12570         (graphite_regenerate_ast_isl): Do not reset SCEV.  Move debug
12571         print of no dependency loops ...
12572         * graphite.c (graphite_transform_loops): ... here.
12573         (canonicalize_loop_closed_ssa_form): Work from inner to outer
12574         loops.
12575         (same_close_phi_node, remove_duplicate_close_phi,
12576         make_close_phi_nodes_unique, defined_in_loop_p): Fold into ...
12577         (canonicalize_loop_closed_ssa): ... here and simplify.
12578         * graphite-optimize-isl.c: Include tree-vectorizer.h.
12579         (optimize_isl): Use dump_printf_loc to tell when we stopped
12580         optimizing because of an ISL timeout.
12582 2017-09-22  Richard Biener  <rguenther@suse.de>
12584         PR tree-optimization/82291
12585         * tree-if-conv.c (predicate_mem_writes): Make sure to
12586         remove writes in blocks predicated with false.
12588 2017-09-22  Richard Biener  <rguenther@suse.de>
12590         * sese.c: Include cfganal.h.
12591         (if_region_set_false_region): Remove.
12592         (create_if_region_on_edge): Likewise.
12593         (move_sese_in_condition): Re-implement without destroying
12594         dominators.
12596 2017-09-22  Richard Biener  <rguenther@suse.de>
12598         * graphite-isl-ast-to-gimple.c (translate_pending_phi_nodes):
12599         Verify both BBs contain loop PHI nodes before dispatching to
12600         copy_loop_phi_args.
12601         (graphite_regenerate_ast_isl): Do not recompute dominators,
12602         do not verify three times.  Restructure for clarity.
12603         * graphite-scop-detection.c (same_close_phi_node,
12604         remove_duplicate_close_phi, make_close_phi_nodes_unique,
12605         defined_in_loop_p, canonicalize_loop_closed_ssa,
12606         canonicalize_loop_closed_ssa_form): Simplify, remove excess
12607         checking and SSA rewrite, move to ...
12608         * graphite.c: ... here.  Include ssa.h and tree-ssa-loop-manip.h.
12609         (graphite_initialize): Do not pass in ctx, do not reset the
12610         SCEV cache, compute only dominators.
12611         (graphite_transform_loops): Allocate ISL ctx after
12612         graphite_initialize.  Call canonicalize_loop_closed_ssa_form.
12613         Maintain post-dominators only around build_scops.
12614         * sese.c (if_region_set_false_region): Make static.  Free
12615         and recompute dominators.
12616         (move_sese_in_condition): Assert we don't get called with
12617         post-dominators computed.
12618         * sese.h (if_region_set_false_region): Remove.
12620 2017-09-22  Sergey Shalnov  <sergey.shalnov@intel.com>
12622         * config/i386/sse.md ("mov<mode>_internal"): Use <sseinsnmode>
12623         mode attribute for TARGET_AVX512VL.
12625 2017-09-21  Sergey Shalnov  <sergey.shalnov@intel.com>
12627         * config/i386/i386.opt (mprefer-avx256): New option.
12628         * config/i386/i386.c (ix86_target_string): Add -mprefer-avx256
12629         to flag_opts.
12630         (ix86_preferred_simd_mode): Return 256-bit AVX modes
12631         for TARGET_PREFER_AVX256.
12632         * doc/invoke.texi (x86 Options): Document -mprefer-avx256.
12634 2017-09-21  Jeff Law  <law@redhat.com>
12636         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash):
12637         Fix dump output if the only stack space is for pushed registers.
12639 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
12641         * config/spu/spu.c (spu_sched_adjust_cost): Update after renaming
12642         of insn_cost.
12644 2017-09-21  Martin Sebor  <msebor@redhat.com>
12646         PR c/81882
12647         * doc/extend.texi (attribute ifunc): Avoid relying on ill-formed
12648         code (in C++) or code that triggers warnings.
12650 2017-09-21  Eric Botcazou  <ebotcazou@adacore.com>
12652         * stor-layout.c (bit_from_pos): Do not distribute the conversion.
12654 2017-09-21  Segher Boessenkool  <segher@kernel.crashing.org>
12656         * haifa-sched.c: Rename insn_cost to insn_sched_cost.
12657         * sched-rgn.c: Ditto.
12658         * sel-sched-ir.c: Ditto.
12660 2017-09-21  Alexander Monakov  <amonakov@ispras.ru>
12662         * toplev.h (set_random_seed): Adjust return type.
12663         * toplev.c (init_local_tick): Move eager initialization of random_seed
12664         to get_random_seed.  Adjust comment.
12665         (init_random_seed): Inline to get_random_seed, delete.
12666         (get_random_seed): Initialize random_seed lazily.
12667         (set_random_seed): Do not return previous value.
12668         (print_switch_value): Do not call get_random_seed.
12670 2017-09-21  Evgeny Kudryashov  <kudryashov@ispras.ru>
12672         * cgraph.c (delete_function_version): New, broken out from...
12673         (cgraph_node::delete_function_version): ...here.  Rename to
12674         cgraph_node::delete_function_version_by_decl.  Update all uses.
12675         (cgraph_node::remove): Call delete_function_version.
12677 2017-09-21  Jakub Jelinek  <jakub@redhat.com>
12679         PR sanitizer/81715
12680         * tree-inline.c (expand_call_inline): Emit clobber stmts for
12681         VAR_DECLs to which addressable non-volatile parameters are mapped
12682         and for id->retvar after the return value assignment.  Clear
12683         id->retval and id->retbnd after inlining.
12685 2017-09-21  Richard Biener  <rguenther@suse.de>
12687         PR tree-optimization/82276
12688         PR tree-optimization/82244
12689         * tree-vrp.c (build_assert_expr_for): Set
12690         SSA_NAME_OCCURS_IN_ABNORMAL_PHI if the variable we assert on
12691         has it set.
12692         (remove_range_assertions): Revert earlier change.
12694 2017-09-21  Wilco Dijkstra  <wdijkstr@arm.com>
12696         PR target/71951
12697         * config/aarch64/aarch64.h (LIBGCC2_UNWIND_ATTRIBUTE): Define.
12699 2017-09-21  Richard Biener  <rguenther@suse.de>
12701         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
12702         Restore valid IL after code generation errors.
12703         * graphite.c (graphite_transform_loops): Diagnose code
12704         generation issues as MSG_MISSED_OPTIMIZATION and continue
12705         with processing SCOPs.
12707 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
12708             Alan Hayward  <alan.hayward@arm.com>
12709             David Sherwood  <david.sherwood@arm.com>
12711         * calls.c (compute_argument_addresses): Use simplify_gen_binary
12712         rather than choosing between plus_constant and gen_rtx_<CODE>.
12713         * expr.c (emit_push_insn): Likewise.
12714         (expand_expr_real_2): Likewise.
12716 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
12717             Alan Hayward  <alan.hayward@arm.com>
12718             David Sherwood  <david.sherwood@arm.com>
12720         * loop-unroll.c (split_iv): Call copy_rtx on the step.
12722 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
12723             Alan Hayward  <alan.hayward@arm.com>
12724             David Sherwood  <david.sherwood@arm.com>
12726         * tree.c (find_atomic_core_type): Check tree_fits_uhwi_p before
12727         calling tree_to_uhwi.
12729 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
12730             Alan Hayward  <alan.hayward@arm.com>
12731             David Sherwood  <david.sherwood@arm.com>
12733         * tree-ssa-ccp.c (get_value_for_expr): Use a positive test for
12734         INTEGER_CST rather than a negative test for ADDR_EXPR.
12736 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
12737             Alan Hayward  <alan.hayward@arm.com>
12738             David Sherwood  <david.sherwood@arm.com>
12740         * tree-vrp.c (extract_range_from_binary_expr_1): Check
12741         int_cst_rangeN before calling value_range_constant_singleton (&vrN).
12743 2017-09-21  Richard Biener  <rguenther@suse.de>
12745         PR tree-optimization/71351
12746         * graphite-isl-ast-to-gimple.c (translate_isl_ast_to_gimple::
12747         graphite_create_new_loop_guard): Remove, fold remaining parts
12748         into caller ...
12749         (translate_isl_ast_node_for): ... here and simplify.
12751 2017-09-21  Jakub Jelinek  <jakub@redhat.com>
12753         PR target/82260
12754         * config/i386/i386.md (*movqi_internal): Replace (=q,q) alternative
12755         with (=Q,Q), (=R,R) and (=r,r) alternatives, only enable the
12756         latter two for 64-bit, renumber alternatives, for -Os imov (=q,n)
12757         alternative always use QI mode, for -Os imov (=R,R) alternative
12758         always use SI mode, for imov (=Q,Q) or (=r,r) alternatives
12759         ignore -Os.
12761 2017-09-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12762             Jeff Law  <law@redhat.com>
12764         * config/s390/s390.c (MIN_UNROLL_PROBES): Define.
12765         (allocate_stack_space): New function, partially extracted from
12766         s390_emit_prologue.
12767         (s390_emit_prologue): Track offset to most recent stack probe.
12768         Code to allocate space moved into allocate_stack_space.
12769         Dump actions when no stack is allocated.
12770         (s390_prologue_plus_offset): New function.
12771         (s390_emit_stack_probe): Likewise.
12773 2017-09-20  Alexandre Oliva  <aoliva@redhat.com>
12775         * common.opt (Wa, Wl, Wp, g, gz=): Add
12776         RejectNegative.
12777         (gno-column-info): Remove.
12778         (gcolumn-info): Drop RejectNegative.
12779         (gno-): New prefix.
12780         (gno-record-gcc-switches): Remove.
12781         (grecord-gcc-switches): Drop RejectNegative.
12782         (gno-split-dwarf): Remove.
12783         (gsplit-dwarf): Drop RejectNegative.
12784         (gno-strict-dwarf): Remove.
12785         (gstrict-dwarf): Drop RejectNegative.
12786         * config/darwin.opt (gfull, gused): Add RejectNegative.
12787         * dwarf2out.c (gen_producer_string): Drop
12788         gno-record-gcc-switches handler.
12789         * optc-gen.awk: Add g to prefixes with negative forms.
12790         * opts-common.c (remapping_prefix_p): New.
12791         (find_opt): Check it.
12792         (generate_canonical_option): Test g prefix.
12793         (option_map): Add -gno- mapping.
12794         (add_misspelling_candidates): Check remapping_prefix_p.
12796 2017-09-20  Jeff Law  <law@redhat.com>
12798         * config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Fix
12799         thinko in stack clash protection support.
12801         * explow.c (compute_stack_clash_protection_loop_data): Use
12802         CONST_INT_P instead of explicit test.  Verify object is a
12803         CONST_INT_P before looking at INTVAL.
12804         (anti_adjust_stack_and_probe_stack_clash): Use CONST_INT_P
12805         instead of explicit test.
12807 2017-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
12809         PR target/77687
12810         * config/rs6000/rs6000.md (stack_restore_tie): Store to a scratch
12811         address instead of to r1 and r11.
12813 2017-09-20  Sebastian Peryt  <sebastian.peryt@intel.com>
12815         * config.gcc: Support "knm".
12816         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "knm".
12817         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12818         PROCESSOR_KNM.
12819         * config/i386/i386.c (m_KNM): Define.
12820         (processor_target_table): Add "knm".
12821         (PTA_KNM): Define.
12822         (ix86_option_override_internal): Add "knm".
12823         (ix86_issue_rate): Add PROCESSOR_KNM.
12824         (ix86_adjust_cost): Ditto.
12825         (ia32_multipass_dfa_lookahead): Ditto.
12826         (get_builtin_code_for_version): Handle PROCESSOR_KNM.
12827         (fold_builtin_cpu): Add M_INTEL_KNM.
12828         * config/i386/i386.h (processor_costs): Define TARGET_KNM.
12829         (processor_type): Add PROCESSOR_KNM.
12830         * config/i386/x86-tune.def: Add m_KNM.
12831         * doc/invoke.texi: Add knm as x86 -march=/-mtune= CPU type.
12833 2017-09-20  Richard Biener  <rguenther@suse.de>
12835         PR tree-optimization/80213
12836         * graphite-scop-detection.c (trivially_empty_bb_p): Labels
12837         are allowed in empty BBs as well.
12838         (canonicalize_loop_closed_ssa): Also look for other complex
12839         edges.
12840         (scop_detection::get_sese): Include the loop-closed PHI block
12841         in loop SESEs.
12842         (scop_detection::merge_sese): Remove code adding extra blocks.
12843         (scop_detection::region_has_one_loop): Adjust for get_sese changes.
12844         (build_scops): Assert the final returned scop is invalid.
12846 2017-09-20  Richard Biener  <rguenther@suse.de>
12848         PR tree-optimization/82264
12849         * tree-ssa-sccvn.c (vn_phi_eq): Use safe_dyn_cast to check
12850         for GIMPLE_CONDs.
12851         (vn_phi_lookup): Likewise.
12852         (vn_phi_insert): Likewise.
12854 2017-09-20  Jakub Jelinek  <jakub@redhat.com>
12856         * dwarf2out.c (tree_add_const_value_attribute): For INTEGER_CST
12857         that fits into uhwi or shwi, add DW_AT_const_value regardless
12858         of early_dwarf without going through RTL, using add_AT_unsigned
12859         or add_AT_int.
12861         * dwarf2out.c (DEBUG_LTO_DWO_INFO_SECTION): Reorder defines.
12862         (DEBUG_LTO_ABBREV_SECTION): Likewise.
12863         (DEBUG_LTO_MACINFO_SECTION): Likewise.
12864         (DEBUG_MACRO_SECTION): Likewise.
12865         (DEBUG_LTO_MACRO_SECTION): Likewise.
12866         (DEBUG_STR_DWO_SECTION): Likewise.
12867         (DEBUG_LTO_STR_DWO_SECTION): Likewise.
12868         (DEBUG_LTO_LINE_SECTION): Drop .dwo suffix from the name.
12869         (DEBUG_LTO_DWO_LINE_SECTION): Define.
12870         (DEBUG_LTO_LINE_STR_SECTION): Define.
12871         (init_sections_and_labels): Initialize debug_line_str_section
12872         variable.  Initialize debug_loc_section for -gdwarf-5 to
12873         DEBUG_LOCLISTS_SECTION.  Formatting fixes.
12875 2017-09-20  Richard Biener  <rguenther@suse.de>
12877         * graphite-sese-to-poly.c (extract_affine): Properly handle
12878         POINTER_PLUS_EXPR, BIT_NOT_EXPR and conversion to signed.
12880 2017-09-20  Richard Biener  <rguenther@suse.de>
12882         PR tree-optimization/81373
12883         * graphite-scop-detection.c (build_cross_bb_scalars_def):
12884         Force SESE live-out defs to be handled even if they are
12885         scev_analyzable_p.
12887 2017-09-19  Jeff Law  <law@redhat.com>
12889         * combine-stack-adj.c (combine_stack_adjustments_for_block): Do
12890         nothing for stack adjustments with REG_STACK_CHECK.
12891         * sched-deps.c (parse_add_or_inc): Reject insns with
12892         REG_STACK_CHECK from dependency breaking.
12893         * config/i386/i386.c (pro_epilogue_adjust_stack): Return insn.
12894         (ix86_adjust_satck_and_probe_stack_clash): Add REG_STACK_NOTEs.
12895         * reg-notes.def (STACK_CHECK): New note.
12897         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): New.
12898         (ix86_expand_prologue): Dump stack clash info as needed.
12899         Call ix86_adjust_stack_and_probe_stack_clash as needed.
12901         * function.c (dump_stack_clash_frame_info): New function.
12902         * function.h (dump_stack_clash_frame_info): Prototype.
12903         (enum stack_clash_probes): New enum.
12905         * config/alpha/alpha.c (alpha_expand_prologue): Also check
12906         flag_stack_clash_protection.
12907         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Likewise.
12908         (arm_expand_prologue, thumb1_expand_prologue): Likewise.
12909         (arm_frame_pointer_required): Likewise.
12910         * config/ia64/ia64.c (ia64_compute_frame_size): Likewise.
12911         (ia64_expand_prologue): Likewise.
12912         * config/mips/mips.c (mips_expand_prologue): Likewise.
12913         * config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Likewise.
12914         * config/sparc/sparc.c (sparc_expand_prologue): Likewise.
12915         (sparc_flat_expand_prologue): Likewise.
12916         * config/spu/spu.c (spu_expand_prologue): Likewise.
12918         * explow.c: Include "params.h".
12919         (anti_adjust_stack_and_probe_stack_clash): New function.
12920         (get_stack_check_protect): Likewise.
12921         (compute_stack_clash_protection_loop_data): Likewise.
12922         (emit_stack_clash_protection_loop_start): Likewise.
12923         (emit_stack_clash_protection_loop_end): Likewise.
12924         (allocate_dynamic_stack_space): Use get_stack_check_protect.
12925         Use anti_adjust_stack_and_probe_stack_clash.
12926         * explow.h (compute_stack_clash_protection_loop_data): Prototype.
12927         (emit_stack_clash_protection_loop_start): Likewise.
12928         (emit_stack_clash_protection_loop_end): Likewise.
12929         * rtl.h (get_stack_check_protect): Prototype.
12930         * target.def (stack_clash_protection_final_dynamic_probe): New hook.
12931         * targhooks.c (default_stack_clash_protection_final_dynamic_probe): New.
12932         * targhooks.h (default_stack_clash_protection_final_dynamic_probe):
12933         Prototype.
12934         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE):
12935         Add @hook.
12936         * doc/tm.texi: Rebuilt.
12937         * config/aarch64/aarch64.c (aarch64_expand_prologue): Use
12938         get_stack_check_protect.
12939         * config/alpha/alpha.c (alpha_expand_prologue): Likewise.
12940         * config/arm/arm.c (arm_expand_prologue): Likewise.
12941         (arm_frame_pointer_required): Likewise.
12942         * config/i386/i386.c (ix86_expand_prologue): Likewise.
12943         * config/ia64/ia64.c (ia64_expand_prologue): Likewise.
12944         * config/mips/mips.c (mips_expand_prologue): Likewise.
12945         * config/powerpcspe/powerpcspe.c (rs6000_emit_prologue): Likewise.
12946         * config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise.
12947         * config/sparc/sparc.c (sparc_expand_prologue): Likewise.
12948         (sparc_flat_expand_prologue): Likewise.
12950         * common.opt (-fstack-clash-protection): New option.
12951         * flag-types.h (enum stack_check_type): Note difference between
12952         -fstack-check= and -fstack-clash-protection.
12953         * params.def (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE): New PARAM.
12954         (PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Likewise.
12955         * toplev.c (process_options): Issue warnings/errors for cases
12956         not handled with -fstack-clash-protection.
12957         * doc/invoke.texi (-fstack-clash-protection): Document new option.
12958         (-fstack-check): Note additional problem with -fstack-check=generic.
12959         Note that -fstack-check is primarily for Ada and refer users
12960         to -fstack-clash-protection for stack-clash-protection.
12961         Document new params for stack clash protection.
12963 2017-09-19  Uros Bizjak  <ubizjak@gmail.com>
12965         * config/i386/i386.c (ix86_split_long_move): Do not handle
12966         address used for LEA in a special way.
12968 2017-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
12970         * simplify-rtx.c (simplify_binary_operation_1): Fix typo in comment.
12972 2017-09-19  Martin Sebor  <msebor@redhat.com>
12974         PR c/81854
12975         * cgraphunit.c (handle_alias_pairs): Reject aliases between functions
12976         of incompatible types.
12978 2017-09-19  Will Schmidt  <will_schmidt@vnet.ibm.com>
12980         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
12981         for early folding of vector loads (ALTIVEC_BUILTIN_LVX_*).
12982         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
12983         Remove obsoleted code for handling ALTIVEC_BUILTIN_VEC_LD.
12985 2017-09-19  Richard Biener  <rguenther@suse.de>
12987         PR tree-optimization/82244
12988         * tree-vrp.c (remove_range_assertions): Do not propagate
12989         a constant to abnormals but replace the assert with a copy.
12991 2017-09-19  Alexander Monakov  <amonakov@ispras.ru>
12993         PR rtl-optimization/57878
12994         PR rtl-optimization/68988
12995         * lra-assigns.c (reload_pseudo_compare_func): Remove fragmentation
12996         avoidance test involving non_reload_pseudos.  Move frequency test
12997         below the general fragmentation avoidance test.
12999 2017-09-19  Richard Biener  <rguenther@suse.de>
13001         PR tree-optimization/69728
13002         * graphite-sese-to-poly.c (schedule_error): New global.
13003         (add_loop_schedule): Handle empty domain by failing the
13004         schedule.
13005         (build_original_schedule): Handle schedule_error.
13007 2017-09-19  Richard Biener  <rguenther@suse.de>
13009         * graphite-scop-detection.c (scop_detection::can_represent_loop):
13010         Do not iterate to sibling loops but only to siblings of inner
13011         loops.
13013 2017-09-18  Andreas Schwab  <schwab@linux-m68k.org>
13015         PR target/81613
13016         * config/m68k/m68k.md (moveq feeding equality comparison): Check
13017         that the registers are different.
13019 2017-09-18  Uros Bizjak  <ubizjak@gmail.com>
13021         * config/i386/i386.c (fold_builtin_cpu): Add M_AMDFAM17H
13022         to processor_model and "amdfam17h" to arch_names_table.
13023         * doc/extend.texi (__builtin_cpu_is): Document amdfam17h CPU name.
13025 2017-09-18  Jakub Jelinek  <jakub@redhat.com>
13027         PR c/82234
13028         * doc/extend.texi: Add @findex entry for __builtin_shuffle.
13030 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
13031             Alan Hayward  <alan.hayward@arm.com>
13032             David Sherwood  <david.sherwood@arm.com>
13034         * tree-vectorizer.h (vect_slp_analyze_operations): Replace parameters
13035         with a vec_info *.
13036         * tree-vect-loop.c (vect_analyze_loop_operations): Update call
13037         accordingly.
13038         * tree-vect-slp.c (vect_slp_analyze_node_operations): Add vec_info *
13039         parameter.  Set SLP_TREE_NUMBER_OF_VEC_STMTS here rather than in
13040         vect_schedule_slp_instance.
13041         (vect_slp_analyze_operations): Replace parameters with a vec_info *.
13042         Update call to vect_slp_analyze_node_operations.  Simplify return
13043         value.
13044         (vect_slp_analyze_bb_1): Update call accordingly.
13045         (vect_schedule_slp_instance): Remove vectorization_factor parameter.
13046         Don't calculate SLP_TREE_NUMBER_OF_VEC_STMTS here.
13047         (vect_schedule_slp): Update call accordingly.
13049 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
13050             Alan Hayward  <alan.hayward@arm.com>
13051             David Sherwood  <david.sherwood@arm.com>
13053         * tree-vect-data-refs.c (vect_get_smallest_scalar_type): Cope
13054         with types that aren't in fact scalar.
13056 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
13058         * tree-vect-slp.c (vect_record_max_nunits): New function,
13059         split out from...
13060         (vect_build_slp_tree_1): ...here.
13061         (vect_build_slp_tree_2): Call it for phis too.
13063 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
13065         * tree-vect-stmts.c (vectorizable_mask_load_store): Pass mask_vectype
13066         to vect_get_vec_def_for_operand when getting the mask operand.
13068 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
13069             Alan Hayward  <alan.hayward@arm.com>
13070             David Sherwood  <david.sherwood@arm.com>
13072         * tree-vect-loop.c (vectorizable_live_operation): Fix type of
13073         bitstart.
13075 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
13076             Alan Hayward  <alan.hayward@arm.com>
13077             David Sherwood  <david.sherwood@arm.com>
13079         * tree-vect-loop.c (vectorizable_live_operation): Fix element size
13080         calculation for vector booleans.
13082 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
13083             Alan Hayward  <alan.hayward@arm.com>
13084             David Sherwood  <david.sherwood@arm.com>
13086         * tree-vect-stmts.c (can_vectorize_live_stmts): New function,
13087         split out from...
13088         (vect_transform_stmt): ...here.
13089         (vect_analyze_stmt): Use it instead of calling
13090         vectorizable_live_operation directly.
13092 2017-09-18  Cesar Philippidis  <cesar@codesourcery.com>
13094         * omp-offload.c (oacc_xform_loop): Enable SIMD vectorization on
13095         non-SIMT targets in acc vector loops.
13097 2017-09-18  Claudiu Zissulescu  <claziss@synopsys.com>
13099         * configure.ac: Add arc and check if assembler supports gdwarf2.
13100         * configure: Regenerate.
13102 2017-09-18  Richard Biener  <rguenther@suse.de>
13104         PR tree-optimization/82220
13105         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Exclude
13106         epilogue niters from the min_profitable_iters compute.
13108 2017-09-18  Jakub Jelinek  <jakub@redhat.com>
13110         PR target/82145
13111         * config/i386/i386.c (ix86_init_large_pic_reg): Revert 2017-09-01
13112         changes.  Turn CODE_LABEL into NOTE_INSN_DELETED_LABEL immediately.
13113         (ix86_init_pic_reg): Revert 2017-09-01 changes.
13115 2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>
13117         PR target/81361
13118         * dwarf2cfi.c (add_cfis_to_fde): Do not generate DW_CFA_set_loc after
13119         switching to a new text section.
13121 2017-09-18  Richard Biener  <rguenther@suse.de>
13123         * graphite-scop-detection.c (scop_detection::stmt_has_simple_data_ref):
13124         Simplify.
13125         (build_alias_set): Reject aliases with no access function.
13127 2017-09-18  Richard Biener  <rguenther@suse.de>
13129         PR tree-optimization/79622
13130         * graphite-scop-detection.c (build_cross_bb_scalars_def): Properly
13131         handle PHIs.
13132         (build_cross_bb_scalars_use): Likewise.
13134 2017-09-18  Pierre-Marie de Rodat  <derodat@adacore.com>
13136         * cgraph.h (cgraph_thunk_info): Fix a typo in a comment.
13138 2017-09-18  Alan Modra  <amodra@gmail.com>
13140         PR target/81996
13141         * gcc/config/rs6000/rs6000.c (rs6000_return_addr): Use
13142         stack_pointer_rtx for count 0.  Update comments.  Break up
13143         large rtl expression.
13145 2017-09-17  Daniel Santos  <daniel.santos@pobox.com>
13147         * config/i386/i386.c (xlogue_layout::STUB_NAME_MAX_LEN):
13148         Increase to 20 bytes.
13149         (xlogue_layout::s_stub_names): Add an additional size-2 diminsion.
13150         (xlogue_layout::get_stub_name): Modify to select the appropairate sse
13151         or avx version of the stub.
13153 2017-09-17  H.J. Lu  <hongjiu.lu@intel.com>
13155         PR target/82166
13156         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Properly
13157         compute the minimum stack alignment.  Also update preferred stack
13158         boundary for leaf functions.
13160 2017-09-16  Richard Sandiford  <richard.sandiford@linaro.org>
13162         PR tree-optimization/82228
13163         * tree-vect-loop.c (vectorizable_live_operation): Move initialization
13164         of ncopies.
13166 2017-09-16  Chung-Ju Wu  <jasonwucj@gmail.com>
13168         * common/config/nds32/nds32-common.c
13169         (nds32_option_optimization_table): Refine formatting.
13170         (nds32_option_optimization_table): Use -fsched-pressure and
13171         -fomit-frame-pointer for specific optimization level.
13173 2017-09-16  Chung-Ju Wu  <jasonwucj@gmail.com>
13175         * config/nds32/nds32.c: Refine formatting and comments.
13176         * config/nds32/nds32.h: Likewise.
13177         * config/nds32/nds32.md: Likewise.
13178         * config/nds32/nds32-cost.c: Likewise.
13179         * config/nds32/nds32-isr.c: Likewise.
13180         * config/nds32/nds32-md-auxiliary.c: Likewise.
13181         * config/nds32/nds32-multiple.md: Likewise.
13182         * config/nds32/nds32-predicates.c: Likewise.
13184 2017-09-15  Andrew Sutton  <andrew.n.sutton@gmail.com>
13185             Jakub Jelinek  <jakub@redhat.com>
13187         Add support for -std=c++2a.
13188         * doc/cpp.texi (__cplusplus): Document value for -std=c++2a
13189         or -std=gnu+2a.
13190         * doc/invoke.texi: Document -std=c++2a and -std=gnu++2a.
13192 2017-09-15  Steve Ellcey  <sellcey@cavium.com>
13194         PR target/82066
13195         * doc/extend.texi (Common Function Attributes): Add 
13196         references to ARM, AArch64, and S/390 specific attributes.
13197         (Function Specific Option Pragmas): Add AArch64 and S/390
13198         to list of back ends that support the target pragma.
13200 2017-09-15  Nathan Sidwell  <nathan@acm.org>
13202         * doc/standards.texi: Fix C++17 description.  Update URLs for
13203         C++11 & 14.
13205 2017-09-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13207         * common.opt (Wcast-align=strict): New warning option.
13208         * doc/invoke.texi: Document -Wcast-align=strict. 
13210 2017-09-15  Pierre-Marie de Rodat  <derodat@adacore.com>
13212         * cgraph.h (cgraph_thunk_info): Add comments.
13213         * cgraph.c (cgraph_node::create_thunk): Adjust comment, make
13214         assert for VIRTUAL_* arguments stricter.
13216 2017-09-15  Jackson Woodruff  <jackson.woodruff@arm.com>
13218         PR tree-optimization/71026
13219         * match.pd: Move RDIV patterns from fold-const.c
13220         * fold-const.c (distribute_real_division): Removed.
13221         (fold_binary_loc): Remove calls to distribute_real_divison.
13223 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
13225         * doc/invoke.texi: Document -std=c++17 and -std=gnu++17 and document
13226         c++1z and gnu++1z as deprecated.  Change other references to
13227         -std=c++1z to -std=c++17 and -std=gnu++1z to -std=gnu++17.
13228         Change -Wc++1z-compat to -Wc++17-compat.
13229         * doc/cpp.texi: Document -std=c++17 defines __cplusplus 201703L.
13230         * dwarf2out.c (highest_c_language): Handle C++17.
13231         (gen_compile_unit_die): Likewise.
13233 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
13235         PR rtl-optimization/82192
13236         * combine.c (make_extraction): Don't look through non-paradoxical
13237         SUBREGs or TRUNCATE if pos + len is or might be bigger than
13238         inner's mode.
13240 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
13241             Alan Hayward  <alan.hayward@arm.com>
13242             David Sherwood  <david.sherwood@arm.com>
13244         * target.def (function_arg_offset): New hook.
13245         * targhooks.h (default_function_arg_offset): Declare.
13246         * targhooks.c (default_function_arg_offset): New function.
13247         * function.c (locate_and_pad_parm): Use
13248         targetm.calls.function_arg_offset instead of FUNCTION_ARG_OFFSET.
13249         * doc/tm.texi.in (FUNCTION_ARG_OFFSET): Replace with...
13250         (TARGET_FUNCTION_ARG_OFFSET): ...this.
13251         * doc/tm.texi: Regenerate.
13252         * config/spu/spu.h (FUNCTION_ARG_OFFSET): Delete.
13253         * config/spu/spu.c (spu_function_arg_offset): New function.
13254         (TARGET_FUNCTION_ARG_OFFSET): Redefine.
13255         * system.h (FUNCTION_ARG_OFFSET): Poison.
13257 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
13258             Alan Hayard  <alan.hayward@arm.com>
13259             David Sherwood  <david.sherwood@arm.com>
13261         * target.def (truly_noop_truncation): New hook.
13262         (mode_rep_extended): Refer to TARGET_TRULY_NOOP_TRUNCATION rather
13263         than TRULY_NOOP_TRUNCATION.
13264         * hooks.h (hook_bool_uint_uint_true): Declare.
13265         * hooks.c (hook_bool_uint_uint_true): New function.
13266         * doc/tm.texi.in (TRULY_NOOP_TRUNCATION): Replace with...
13267         (TARGET_TRULY_NOOP_TRUNCATION): ...this.
13268         * doc/tm.texi: Regenerate.
13269         * combine.c (make_extraction): Refer to TARGET_TRULY_NOOP_TRUNCATION
13270         rather than TRULY_NOOP_TRUNCATION in comments.
13271         (simplify_comparison): Likewise.
13272         (record_truncated_value): Likewise.
13273         * expmed.c (extract_bit_field_1): Likewise.
13274         (extract_split_bit_field): Likewise.
13275         * convert.c (convert_to_integer_1): Use targetm.truly_noop_truncation
13276         instead of TRULY_NOOP_TRUNCATION.
13277         * function.c (assign_parm_setup_block): Likewise.
13278         * machmode.h (TRULY_NOOP_TRUNCATION_MODES_P): Likewise.
13279         * rtlhooks.c: Include target.h.
13280         * config/aarch64/aarch64.h (TRULY_NOOP_TRUNCATION): Delete.
13281         * config/alpha/alpha.h (TRULY_NOOP_TRUNCATION): Delete.
13282         * config/arc/arc.h (TRULY_NOOP_TRUNCATION): Delete.
13283         * config/arm/arm.h (TRULY_NOOP_TRUNCATION): Delete.
13284         * config/avr/avr.h (TRULY_NOOP_TRUNCATION): Delete.
13285         * config/bfin/bfin.h (TRULY_NOOP_TRUNCATION): Delete.
13286         * config/c6x/c6x.h (TRULY_NOOP_TRUNCATION): Delete.
13287         * config/cr16/cr16.h (TRULY_NOOP_TRUNCATION): Delete.
13288         * config/cris/cris.h (TRULY_NOOP_TRUNCATION): Delete.
13289         * config/epiphany/epiphany.h (TRULY_NOOP_TRUNCATION): Delete.
13290         * config/fr30/fr30.h (TRULY_NOOP_TRUNCATION): Delete.
13291         * config/frv/frv.h (TRULY_NOOP_TRUNCATION): Delete.
13292         * config/ft32/ft32.h (TRULY_NOOP_TRUNCATION): Delete.
13293         * config/h8300/h8300.h (TRULY_NOOP_TRUNCATION): Delete.
13294         * config/i386/i386.h (TRULY_NOOP_TRUNCATION): Delete.
13295         * config/ia64/ia64.h (TRULY_NOOP_TRUNCATION): Delete.
13296         * config/iq2000/iq2000.h (TRULY_NOOP_TRUNCATION): Delete.
13297         * config/lm32/lm32.h (TRULY_NOOP_TRUNCATION): Delete.
13298         * config/m32c/m32c.h (TRULY_NOOP_TRUNCATION): Delete.
13299         * config/m32r/m32r.h (TRULY_NOOP_TRUNCATION): Delete.
13300         * config/m68k/m68k.h (TRULY_NOOP_TRUNCATION): Delete.
13301         * config/mcore/mcore.h (TRULY_NOOP_TRUNCATION): Delete.
13302         * config/microblaze/microblaze.h (TRULY_NOOP_TRUNCATION): Delete.
13303         * config/mips/mips.h (TRULY_NOOP_TRUNCATION): Delete.
13304         * config/mips/mips.c (mips_truly_noop_truncation): New function.
13305         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
13306         * config/mips/mips.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
13307         rather than TRULY_NOOP_TRUNCATION in comments.
13308         * config/mmix/mmix.h (TRULY_NOOP_TRUNCATION): Delete.
13309         * config/mn10300/mn10300.h (TRULY_NOOP_TRUNCATION): Delete.
13310         * config/moxie/moxie.h (TRULY_NOOP_TRUNCATION): Delete.
13311         * config/msp430/msp430.h (TRULY_NOOP_TRUNCATION): Delete.
13312         * config/nds32/nds32.h (TRULY_NOOP_TRUNCATION): Delete.
13313         * config/nios2/nios2.h (TRULY_NOOP_TRUNCATION): Delete.
13314         * config/nvptx/nvptx.h (TRULY_NOOP_TRUNCATION): Delete.
13315         * config/pa/pa.h (TRULY_NOOP_TRUNCATION): Delete.
13316         * config/pdp11/pdp11.h (TRULY_NOOP_TRUNCATION): Delete.
13317         * config/powerpcspe/powerpcspe.h (TRULY_NOOP_TRUNCATION): Delete.
13318         * config/riscv/riscv.h (TRULY_NOOP_TRUNCATION): Delete.
13319         * config/riscv/riscv.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
13320         rather than TRULY_NOOP_TRUNCATION in comments.
13321         * config/rl78/rl78.h (TRULY_NOOP_TRUNCATION): Delete.
13322         * config/rs6000/rs6000.h (TRULY_NOOP_TRUNCATION): Delete.
13323         * config/rx/rx.h (TRULY_NOOP_TRUNCATION): Delete.
13324         * config/s390/s390.h (TRULY_NOOP_TRUNCATION): Delete.
13325         * config/sh/sh.h (MAYBE_BASE_REGISTER_RTX_P): Remove
13326         TRULY_NOOP_TRUNCATION condition.
13327         (MAYBE_INDEX_REGISTER_RTX_P): Likewise.
13328         (TRULY_NOOP_TRUNCATION): Delete.
13329         * config/sparc/sparc.h (TRULY_NOOP_TRUNCATION): Delete.
13330         * config/spu/spu.h (TRULY_NOOP_TRUNCATION): Delete.
13331         * config/spu/spu.c (spu_truly_noop_truncation): New function.
13332         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
13333         * config/stormy16/stormy16.h (TRULY_NOOP_TRUNCATION): Delete.
13334         * config/tilegx/tilegx.h (TRULY_NOOP_TRUNCATION): Delete.
13335         * config/tilegx/tilegx.c (tilegx_truly_noop_truncation): New fuction.
13336         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
13337         * config/tilegx/tilegx.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
13338         rather than TRULY_NOOP_TRUNCATION in comments.
13339         * config/tilepro/tilepro.h (TRULY_NOOP_TRUNCATION): Delete.
13340         * config/v850/v850.h (TRULY_NOOP_TRUNCATION): Delete.
13341         * config/vax/vax.h (TRULY_NOOP_TRUNCATION): Delete.
13342         * config/visium/visium.h (TRULY_NOOP_TRUNCATION): Delete.
13343         * config/xtensa/xtensa.h (TRULY_NOOP_TRUNCATION): Delete.
13344         * system.h (TRULY_NOOP_TRUNCATION): Poison.
13346 2017-09-15  Christophe Lyon  <christophe.lyon@linaro.org>
13348         PR target/67591
13349         * config/arm/arm.md (*cmp_and): Add enabled_for_depr_it attribute.
13350         (*cmp_ior): Likewise.
13351         (*ior_scc_scc): Add alternative for enabled_for_depr_it attribute.
13352         (*ior_scc_scc_cmp): Likewise.
13353         (*and_scc_scc): Likewise.
13354         (*and_scc_scc_cmp): Likewise.
13356 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
13357             Alan Hayard  <alan.hayward@arm.com>
13358             David Sherwood  <david.sherwood@arm.com>
13360         * target.def (can_change_mode_class): New hook.
13361         (mode_rep_extended): Refer to it instead of CANNOT_CHANGE_MODE_CLASS.
13362         (hard_regno_nregs): Likewise.
13363         * hooks.h (hook_bool_mode_mode_reg_class_t_true): Declare.
13364         * hooks.c (hook_bool_mode_mode_reg_class_t_true): New function.
13365         * doc/tm.texi.in (CANNOT_CHANGE_MODE_CLASS): Replace with...
13366         (TARGET_CAN_CHANGE_MODE_CLASS): ...this.
13367         (LOAD_EXTEND_OP): Update accordingly.
13368         * doc/tm.texi: Regenerate.
13369         * doc/rtl.texi: Refer to TARGET_CAN_CHANGE_MODE_CLASS instead of
13370         CANNOT_CHANGE_MODE_CLASS.
13371         * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): Replace with...
13372         (REG_CAN_CHANGE_MODE_P): ...this new macro.
13373         * combine.c (simplify_set): Update accordingly.
13374         * emit-rtl.c (validate_subreg): Likewise.
13375         * recog.c (general_operand): Likewise.
13376         * regcprop.c (mode_change_ok): Likewise.
13377         * reload1.c (choose_reload_regs): Likewise.
13378         (inherit_piecemeal_p): Likewise.
13379         * rtlanal.c (simplify_subreg_regno): Likewise.
13380         * postreload.c (reload_cse_simplify_set): Use REG_CAN_CHANGE_MODE_P
13381         instead of CANNOT_CHANGE_MODE_CLASS.
13382         (reload_cse_simplify_operands): Likewise.
13383         * reload.c (push_reload): Use targetm.can_change_mode_class
13384         instead of CANNOT_CHANGE_MODE_CLASS.
13385         (push_reload): Likewise.  Also use REG_CAN_CHANGE_MODE_P instead of
13386         REG_CANNOT_CHANGE_MODE_P.
13387         * config/alpha/alpha.h (CANNOT_CHANGE_MODE_CLASS): Delete.
13388         * config/alpha/alpha.c (alpha_can_change_mode_class): New function.
13389         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
13390         * config/arm/arm.h (CANNOT_CHANGE_MODE_CLASS): Delete.
13391         * config/arm/arm.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
13392         (arm_can_change_mode_class): New function.
13393         * config/arm/neon.md: Refer to TARGET_CAN_CHANGE_MODE_CLASS rather
13394         than CANNOT_CHANGE_MODE_CLASS in comments.
13395         * config/i386/i386.h (CANNOT_CHANGE_MODE_CLASS): Delete.
13396         * config/i386/i386-protos.h (ix86_cannot_change_mode_class): Delete.
13397         * config/i386/i386.c (ix86_cannot_change_mode_class): Replace with...
13398         (ix86_can_change_mode_class): ...this new function, inverting the
13399         sense of the return value.
13400         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
13401         * config/ia64/ia64.h (CANNOT_CHANGE_MODE_CLASS): Delete.
13402         * config/ia64/ia64.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
13403         (ia64_can_change_mode_class): New function.
13404         * config/m32c/m32c.h (CANNOT_CHANGE_MODE_CLASS): Delete.
13405         * config/m32c/m32c-protos.h (m32c_cannot_change_mode_class): Delete.
13406         * config/m32c/m32c.c (m32c_cannot_change_mode_class): Replace with...
13407         (m32c_can_change_mode_class): ...this new function, inverting the
13408         sense of the return value.
13409         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
13410         * config/mips/mips.h (CANNOT_CHANGE_MODE_CLASS): Delete.
13411         * config/mips/mips-protos.h (mips_cannot_change_mode_class): Delete.
13412         * config/mips/mips.c (mips_cannot_change_mode_class): Replace with...
13413         (mips_can_change_mode_class): ...this new function, inverting the
13414         sense of the return value.
13415         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
13416         * config/msp430/msp430.h (CANNOT_CHANGE_MODE_CLASS): Delete.
13417         * config/msp430/msp430.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
13418         (msp430_can_change_mode_class): New function.
13419         * config/nvptx/nvptx.h (CANNOT_CHANGE_MODE_CLASS): Delete.
13420         * config/nvptx/nvptx.c (nvptx_can_change_mode_class): New function.
13421         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
13422         * config/pa/pa32-regs.h (CANNOT_CHANGE_MODE_CLASS): Delete.
13423         * config/pa/pa64-regs.h (CANNOT_CHANGE_MODE_CLASS): Delete.
13424         * config/pa/pa-protos.h (pa_cannot_change_mode_class): Delete.
13425         * config/pa/pa.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
13426         (pa_cannot_change_mode_class): Replace with...
13427         (pa_can_change_mode_class): ...this new function, inverting the
13428         sense of the return value.
13429         (pa_modes_tieable_p): Refer to TARGET_CAN_CHANGE_MODE_CLASS rather
13430         than CANNOT_CHANGE_MODE_CLASS in comments.
13431         * config/pdp11/pdp11.h (CANNOT_CHANGE_MODE_CLASS): Delete.
13432         * config/pdp11/pdp11-protos.h (pdp11_cannot_change_mode_class): Delete.
13433         * config/pdp11/pdp11.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
13434         (pdp11_cannot_change_mode_class): Replace with...
13435         (pdp11_can_change_mode_class): ...this new function, inverting the
13436         sense of the return value.
13437         * config/powerpcspe/powerpcspe.h (CANNOT_CHANGE_MODE_CLASS): Delete.
13438         * config/powerpcspe/powerpcspe-protos.h
13439         (rs6000_cannot_change_mode_class_ptr): Delete.
13440         * config/powerpcspe/powerpcspe.c
13441         (rs6000_cannot_change_mode_class_ptr): Delete.
13442         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
13443         (rs6000_option_override_internal): Assign to
13444         targetm.can_change_mode_class instead of
13445         rs6000_cannot_change_mode_class_ptr.
13446         (rs6000_cannot_change_mode_class): Replace with...
13447         (rs6000_can_change_mode_class): ...this new function, inverting the
13448         sense of the return value.
13449         (rs6000_debug_cannot_change_mode_class): Replace with...
13450         (rs6000_debug_can_change_mode_class): ...this new function.
13451         * config/riscv/riscv.h (CANNOT_CHANGE_MODE_CLASS): Delete.
13452         * config/riscv/riscv.c (riscv_can_change_mode_class): New function.
13453         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
13454         * config/rs6000/rs6000.h (CANNOT_CHANGE_MODE_CLASS): Delete.
13455         * config/rs6000/rs6000-protos.h (rs6000_cannot_change_mode_class_ptr):
13456         Delete.
13457         * config/rs6000/rs6000.c (rs6000_cannot_change_mode_class_ptr): Delete.
13458         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
13459         (rs6000_option_override_internal): Assign to
13460         targetm.can_change_mode_class instead of
13461         rs6000_cannot_change_mode_class_ptr.
13462         (rs6000_cannot_change_mode_class): Replace with...
13463         (rs6000_can_change_mode_class): ...this new function, inverting the
13464         sense of the return value.
13465         (rs6000_debug_cannot_change_mode_class): Replace with...
13466         (rs6000_debug_can_change_mode_class): ...this new function.
13467         * config/s390/s390.h (CANNOT_CHANGE_MODE_CLASS): Delete.
13468         * config/s390/s390-protos.h (s390_cannot_change_mode_class): Delete.
13469         * config/s390/s390.c (s390_cannot_change_mode_class): Replace with...
13470         (s390_can_change_mode_class): ...this new function, inverting the
13471         sense of the return value.
13472         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
13473         * config/sh/sh.h (CANNOT_CHANGE_MODE_CLASS): Delete.
13474         * config/sh/sh-protos.h (sh_cannot_change_mode_class): Delete.
13475         * config/sh/sh.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
13476         (sh_cannot_change_mode_class): Replace with...
13477         (sh_can_change_mode_class): ...this new function, inverting the
13478         sense of the return value.
13479         * config/sparc/sparc.h (CANNOT_CHANGE_MODE_CLASS): Delete.
13480         * config/sparc/sparc.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
13481         (sparc_can_change_mode_class): New function.
13482         * config/spu/spu.h (CANNOT_CHANGE_MODE_CLASS): Delete.
13483         * config/spu/spu.c (spu_can_change_mode_class): New function.
13484         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
13485         * config/visium/visium.h (CANNOT_CHANGE_MODE_CLASS): Delete.
13486         * config/visium/visium.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
13487         (visium_can_change_mode_class): New function.
13488         * system.h (CANNOT_CHANGE_MODE_CLASS): Poison.
13490 2017-09-15  Richard Biener  <rguenther@suse.de>
13492         PR tree-optimization/82217
13493         * tree-ssa-sccvn.c (visit_phi): Properly handle all VN_TOP
13494         but not undefined case.
13496 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
13498         PR target/82145
13499         * postreload.c (reload_cse_simplify_operands): Skip
13500         NOTE_INSN_DELETED_LABEL similarly to skipping CODE_LABEL.
13502 2017-09-15  Richard Biener  <rguenther@suse.de>
13504         PR tree-optimization/68823
13505         * graphite-scop-detection.c (build_alias_set): If we have a
13506         possible dependence check whether we can handle them by just
13507         looking at the DRs DR_ACCESS_FNs.
13508         (build_scops): If build_alias_set fails, fail the SCOP.
13510 2017-09-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
13512         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_1_HW): New macros
13513         to support float128 built-in functions that require the ISA 3.0
13514         hardware.
13515         (BU_FLOAT128_3_HW): Likewise.
13516         (SQRTF128): Add support for the IEEE 128-bit square root and fma
13517         built-in functions.
13518         (FMAF128): Likewise.
13519         (FMAQ): Likewise.
13520         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
13521         support for built-in functions that need the ISA 3.0 IEEE 128-bit
13522         floating point instructions.
13523         (rs6000_invalid_builtin): Likewise.
13524         (rs6000_builtin_mask_names): Likewise.
13525         * config/rs6000/rs6000.h (MASK_FLOAT128_HW): Likewise.
13526         (RS6000_BTM_FLOAT128_HW): Likewise.
13527         (RS6000_BTM_COMMON): Likewise.
13528         * config/rs6000/rs6000.md (fma<mode>4_hw): Add a generator
13529         function.
13530         * doc/extend.texi (RS/6000 built-in functions): Document the
13531         IEEE 128-bit floating point square root and fused multiply-add
13532         built-in functions.
13534 2017-09-14  Pat Haugen  <pthaugen@us.ibm.com>
13536         * config/rs6000/rs6000.c (rs6000_set_up_by_prologue): Make sure the TOC
13537         reg (r2) isn't in the set of registers defined in the prologue.
13539 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
13540             Alan Hayward  <alan.hayward@arm.com>
13541             David Sherwood  <david.sherwood@arm.com>
13543         * tree-vectorizer.h (_loop_vec_info): Add max_vectorization_factor.
13544         (LOOP_VINFO_MAX_VECT_FACTOR): New macro.
13545         (LOOP_VINFO_ORIG_VECT_FACTOR): Replace with...
13546         (LOOP_VINFO_ORIG_MAX_VECT_FACTOR): ...this new macro.
13547         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Update
13548         accordingly.
13549         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
13550         max_vectorization_factor.
13551         (vect_analyze_loop_2): Set LOOP_VINFO_MAX_VECT_FACTOR.
13553 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
13554             Alan Hayward  <alan.hayward@arm.com>
13555             David Sherwood  <david.sherwood@arm.com>
13557         * tree-vectorizer.h (vect_min_worthwhile_factor): Delete.
13558         (vect_worthwhile_without_simd_p): Declare.
13559         * tree-vect-loop.c (vect_worthwhile_without_simd_p): New function.
13560         (vectorizable_reduction): Use it.
13561         * tree-vect-stmts.c (vectorizable_shift): Likewise.
13562         (vectorizable_operation): Likewise.
13564 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
13565             Alan Hayward  <alan.hayward@arm.com>
13566             David Sherwood  <david.sherwood@arm.com>
13568         * tree-vectorizer.h (vect_get_num_copies): New function.
13569         * tree-vect-data-refs.c (vect_get_data_access_cost): Use it.
13570         * tree-vect-loop.c (vectorizable_reduction): Likewise.
13571         (vectorizable_induction): Likewise.
13572         (vectorizable_live_operation): Likewise.
13573         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
13574         (vectorizable_bswap): Likewise.
13575         (vectorizable_call): Likewise.
13576         (vectorizable_conversion): Likewise.
13577         (vectorizable_assignment): Likewise.
13578         (vectorizable_shift): Likewise.
13579         (vectorizable_operation): Likewise.
13580         (vectorizable_store): Likewise.
13581         (vectorizable_load): Likewise.
13582         (vectorizable_condition): Likewise.
13583         (vectorizable_comparison): Likewise.
13584         (vect_analyze_stmt): Pass the slp node to vectorizable_live_operation.
13586 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
13587             Alan Hayward  <alan.hayward@arm.com>
13588             David Sherwood  <david.sherwood@arm.com>
13590         * tree-vect-loop.c (vectorizable_induction): Use gimple_build instead
13591         of vect_init_vector.
13593 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
13594             Alan Hayward  <alan.hayward@arm.com>
13595             David Sherwood  <david.sherwood@arm.com>
13597         * gimple-fold.h (gimple_build_vector_from_val): Declare, and provide
13598         an inline wrapper that provides a location.
13599         (gimple_build_vector): Likewise.
13600         * gimple-fold.c (gimple_build_vector_from_val): New function.
13601         (gimple_build_vector): Likewise.
13602         * tree-vect-loop.c (get_initial_def_for_reduction): Use the new
13603         functions to build the initial value.  Always return a gimple value.
13604         (get_initial_defs_for_reduction): Likewise.  Only compute
13605         neutral_vec once.
13606         (vect_create_epilog_for_reduction): Don't call force_gimple_operand or
13607         vect_init_vector on the results from get_initial_def(s)_for_reduction.
13608         (vectorizable_induction): Use gimple_build_vector rather than
13609         vect_init_vector.
13611 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
13612             Alan Hayward  <alan.hayward@arm.com>
13613             David Sherwood  <david.sherwood@arm.com>
13615         * target.h (vec_perm_indices): New typedef.
13616         (auto_vec_perm_indices): Likewise.
13617         * optabs-query.h: Include target.h
13618         (can_vec_perm_p): Take a vec_perm_indices *.
13619         * optabs-query.c (can_vec_perm_p): Likewise.
13620         (can_mult_highpart_p): Update accordingly.  Use auto_vec_perm_indices.
13621         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13622         * tree-vect-generic.c (lower_vec_perm): Likewise.
13623         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
13624         (vect_grouped_load_supported): Likewise.
13625         (vect_shift_permute_load_chain): Likewise.
13626         (vect_permute_store_chain): Use auto_vec_perm_indices.
13627         (vect_permute_load_chain): Likewise.
13628         * fold-const.c (fold_vec_perm): Take vec_perm_indices.
13629         (fold_ternary_loc): Update accordingly.  Use auto_vec_perm_indices.
13630         Update uses of can_vec_perm_p.
13631         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Replace the
13632         mode with a number of elements.  Take a vec_perm_indices *.
13633         (vect_create_epilog_for_reduction): Update accordingly.
13634         Use auto_vec_perm_indices.
13635         (have_whole_vector_shift): Likewise.  Update call to can_vec_perm_p.
13636         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
13637         (vect_transform_slp_perm_load): Likewise.
13638         (vect_schedule_slp_instance): Use auto_vec_perm_indices.
13639         * tree-vectorizer.h (vect_gen_perm_mask_any): Take a vec_perm_indices.
13640         (vect_gen_perm_mask_checked): Likewise.
13641         * tree-vect-stmts.c (vect_gen_perm_mask_any): Take a vec_perm_indices.
13642         (vect_gen_perm_mask_checked): Likewise.
13643         (vectorizable_mask_load_store): Use auto_vec_perm_indices.
13644         (vectorizable_store): Likewise.
13645         (vectorizable_load): Likewise.
13646         (perm_mask_for_reverse): Likewise.  Update call to can_vec_perm_p.
13647         (vectorizable_bswap): Likewise.
13649 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
13650             Alan Hayward  <alan.hayward@arm.com>
13651             David Sherwood  <david.sherwood@arm.com>
13653         * tree.h (build_vector): Take a vec<tree> instead of a tree *.
13654         * tree.c (build_vector): Likewise.
13655         (build_vector_from_ctor): Update accordingly.
13656         (build_vector_from_val): Likewise.
13657         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
13658         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13659         * tree-vect-generic.c (add_rshift): Likewise.
13660         (expand_vector_divmod): Likewise.
13661         (optimize_vector_constructor): Likewise.
13662         * tree-vect-slp.c (vect_get_constant_vectors): Likewise.
13663         (vect_transform_slp_perm_load): Likewise.
13664         (vect_schedule_slp_instance): Likewise.
13665         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
13666         (vectorizable_call): Likewise.
13667         (vect_gen_perm_mask_any): Likewise.  Add elements in order.
13668         * expmed.c (make_tree): Likewise.
13669         * fold-const.c (fold_negate_expr_1): Use auto_vec<tree> when building
13670         a vector passed to build_vector.
13671         (fold_convert_const): Likewise.
13672         (exact_inverse): Likewise.
13673         (fold_ternary_loc): Likewise.
13674         (fold_relational_const): Likewise.
13675         (const_binop): Likewise.  Use VECTOR_CST_ELT directly when operating
13676         on VECTOR_CSTs, rather than going through vec_cst_ctor_to_array.
13677         (const_unop): Likewise.  Store the reduction accumulator in a
13678         variable rather than an array.
13679         (vec_cst_ctor_to_array): Take the number of elements as a parameter.
13680         (fold_vec_perm): Update calls accordingly.  Use auto_vec<tree> for
13681         the new vector, rather than constructing it after the input arrays.
13682         (native_interpret_vector): Use auto_vec<tree> when building
13683         a vector passed to build_vector.  Add elements in order.
13684         * tree-vect-loop.c (get_initial_defs_for_reduction): Use
13685         auto_vec<tree> when building a vector passed to build_vector.
13686         (vect_create_epilog_for_reduction): Likewise.
13687         (vectorizable_induction): Likewise.
13688         (get_initial_def_for_reduction): Likewise.  Fix indentation of
13689         case statements.
13690         * config/sparc/sparc.c (sparc_handle_vis_mul8x16): Change n_elts
13691         to a vec<tree> *.
13692         (sparc_fold_builtin): Use auto_vec<tree> when building a vector
13693         passed to build_vector.
13695 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
13696             Alan Hayward  <alan.hayward@arm.com>
13697             David Sherwood  <david.sherwood@arm.com>
13699         * tree-core.h (tree_base::u): Add an "nelts" field.
13700         (tree_vector): Use VECTOR_CST_NELTS as the length.
13701         * tree.c (tree_size): Likewise.
13702         (make_vector): Initialize VECTOR_CST_NELTS.
13703         * tree.h (VECTOR_CST_NELTS): Use the u.nelts field.
13704         * cfgexpand.c (expand_debug_expr): Use VECTOR_CST_NELTS instead of
13705         TYPE_VECTOR_SUBPARTS.
13706         * expr.c (const_vector_mask_from_tree): Consistently use "units"
13707         as the number of units, setting it from VECTOR_CST_NELTS.
13708         (const_vector_from_tree): Likewise.
13709         * fold-const.c (negate_expr_p): Use VECTOR_CST_NELTS instead of
13710         TYPE_VECTOR_SUBPARTS for the number of elements in a VECTOR_CST.
13711         (fold_negate_expr_1): Likewise.
13712         (fold_convert_const): Likewise.
13713         (const_binop): Likewise.  Differentiate the number of output and
13714         input elements.
13715         (const_unop): Likewise.
13716         (fold_ternary_loc): Use VECTOR_CST_NELTS for the number of elements
13717         in a VECTOR_CST, asserting that it is the same as TYPE_VECTOR_SUBPARTS
13718         in cases that did the opposite.
13720 2017-09-14  Richard Biener  <rguenther@suse.de>
13722         * tree-ssa-sccvn.c (visit_phi): Merge undefined values similar
13723         to VN_TOP.
13725 2017-09-14  Eric Botcazou  <ebotcazou@adacore.com>
13727         * dwarf2out.c (dwarf2out_source_line): Remove superfluous test.
13729 2017-09-14  Jakub Jelinek  <jakub@redhat.com>
13731         PR target/81325
13732         * cfgbuild.c (find_bb_boundaries): Ignore debug insns in decisions
13733         if and where to split a bb, except for splitting before debug insn
13734         sequences followed by non-label real insn.  Delete debug insns
13735         in between basic blocks.
13737         * combine.c (make_compound_operation_int): Formatting fixes.
13739         * config/alpha/elf.h (LINK_EH_SPEC): Add -static-pie support.
13740         * config/alpha/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
13741         * config/netbsd.h (LINK_EH_SPEC): Likewise.
13742         * config/sol2.h (LINK_EH_SPEC): Likewise.
13743         * config/arm/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
13744         * config/s390/linux.h (LINK_SPEC): Likewise.
13745         * config/freebsd.h (LINK_EH_SPEC): Likewise.
13746         * config/openbsd.h (LINK_EH_SPEC): Likewise.
13747         * config/lm32/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
13748         * config/aarch64/aarch64-linux.h (LINUX_TARGET_LINK_SPEC): Likewise.
13749         * config/powerpcspe/sysv4.h (LINK_EH_SPEC): Likewise.
13750         * config/bfin/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
13751         * config/i386/gnu-user64.h (GNU_USER_TARGET_LINK_SPEC): Fix a typo.
13752         * config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Formatting fix.
13754 2017-09-13  Jakub Jelinek  <jakub@redhat.com>
13756         * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Add -static-pie
13757         support.
13758         (ENDFILE_LINUX_SPEC): Likewise.
13759         (LINK_EH_SPEC): Likewise.
13760         * config/rs6000/linux64.h (LINK_SHLIB_SPEC): Likewise.
13761         (LINK_OS_LINUX_SPEC32): Likewise.
13762         (LINK_OS_LINUX_SPEC64): Likewise.
13763         * config/rs6000/linux.h (LINK_SHLIB_SPEC): Likewise.
13764         (LINK_OS_LINUX_SPEC): Likewise.
13766 2017-09-13  Martin Liska  <mliska@suse.cz>
13768         PR middle-end/82154
13769         * stmt.c (expand_sjlj_dispatch_table): Use CASE_LOW when
13770         CASE_HIGH is NULL_TREE.
13772 2017-09-13  Richard Sandiford  <richard.sandiford@linaro.org>
13773             Alan Hayward  <alan.hayward@arm.com>
13774             David Sherwood  <david.sherwood@arm.com>
13776         * target.def (secondary_memory_needed): New hook.
13777         (secondary_reload): Refer to TARGET_SECONDARY_MEMORY_NEEDED
13778         instead of SECONDARY_MEMORY_NEEDED.
13779         (secondary_memory_needed_mode): Likewise.
13780         * hooks.h (hook_bool_mode_reg_class_t_reg_class_t_false): Declare.
13781         * hooks.c (hook_bool_mode_reg_class_t_reg_class_t_false): New function.
13782         * doc/tm.texi.in (SECONDARY_MEMORY_NEEDED): Replace with...
13783         (TARGET_SECONDARY_MEMORY_NEEDED): ...this.
13784         (SECONDARY_MEMORY_NEEDED_RTX): Update reference accordingly.
13785         * doc/tm.texi: Regenerate.
13786         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED): Delete.
13787         * config/alpha/alpha.c (alpha_secondary_memory_needed): New function.
13788         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
13789         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED): Delete.
13790         * config/i386/i386-protos.h (ix86_secondary_memory_needed): Delete.
13791         * config/i386/i386.c (inline_secondary_memory_needed): Put the
13792         mode argument first and change the reg_class arguments to reg_class_t.
13793         (ix86_secondary_memory_needed): Likewise.  Remove the strict parameter.
13794         Make static.  Update the call to inline_secondary_memory_needed.
13795         (ix86_register_move_cost): Update the call to
13796         inline_secondary_memory_needed.
13797         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
13798         * config/ia64/ia64.h (SECONDARY_MEMORY_NEEDED): Delete commented-out
13799         definition.
13800         * config/ia64/ia64.c (spill_xfmode_rfmode_operand): Refer to
13801         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
13802         in comment.
13803         * config/mips/mips.h (SECONDARY_MEMORY_NEEDED): Delete.
13804         * config/mips/mips-protos.h (mips_secondary_memory_needed): Delete.
13805         * config/mips/mips.c (mips_secondary_memory_needed): Make static
13806         and match hook interface.  Add comment from mips.h.
13807         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
13808         * config/mmix/mmix.md (truncdfsf2): Refer to
13809         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
13810         in comment.
13811         * config/pa/pa-64.h (SECONDARY_MEMORY_NEEDED): Rename to...
13812         (PA_SECONDARY_MEMORY_NEEDED): ...this, and put the mode argument first.
13813         * config/pa/pa.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
13814         (pa_secondary_memory_needed): New function.
13815         * config/pdp11/pdp11.h (SECONDARY_MEMORY_NEEDED): Delete.
13816         * config/pdp11/pdp11-protos.h (pdp11_secondary_memory_needed): Delete.
13817         * config/pdp11/pdp11.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
13818         (pdp11_secondary_memory_needed): Make static and match hook interface.
13819         * config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED): Delete.
13820         * config/powerpcspe/powerpcspe-protos.h
13821         (rs6000_secondary_memory_needed_ptr): Delete.
13822         * config/powerpcspe/powerpcspe.c (rs6000_secondary_memory_needed_ptr):
13823         Delete.
13824         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
13825         (rs6000_option_override_internal): Assign to
13826         targetm.secondary_memory_needed rather than
13827         rs6000_secondary_memory_needed_ptr.
13828         (rs6000_secondary_memory_needed): Match hook interface.
13829         (rs6000_debug_secondary_memory_needed): Likewise.
13830         * config/riscv/riscv.h (SECONDARY_MEMORY_NEEDED): Delete.
13831         * config/riscv/riscv.c (riscv_secondary_memory_needed): New function.
13832         (riscv_register_move_cost): Use it instead of SECONDARY_MEMORY_NEEDED.
13833         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
13834         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED): Delete.
13835         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_ptr):
13836         Delete.
13837         * config/rs6000/rs6000.c (rs6000_secondary_memory_needed_ptr): Delete.
13838         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
13839         (rs6000_option_override_internal): Assign to
13840         targetm.secondary_memory_needed rather than
13841         rs6000_secondary_memory_needed_ptr.
13842         (rs6000_secondary_memory_needed): Match hook interface.
13843         (rs6000_debug_secondary_memory_needed): Likewise.
13844         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED): Delete.
13845         * config/s390/s390.c (s390_secondary_memory_needed): New function.
13846         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
13847         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED): Delete.
13848         * config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
13849         (sparc_secondary_memory_needed): New function.
13850         * lra-constraints.c (check_and_process_move): Refer to
13851         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
13852         in comment.
13853         (curr_insn_transform): Likewise.
13854         (process_alt_operands): Use targetm.secondary_memory_needed
13855         instead of TARGET_SECONDARY_MEMORY_NEEDED.
13856         (check_secondary_memory_needed_p): Likewise.
13857         (choose_split_class): Likewise.
13858         * reload.c: Unconditionally include code that was previously
13859         conditional on SECONDARY_MEMORY_NEEDED.
13860         (push_secondary_reload): Use targetm.secondary_memory_needed
13861         instead of TARGET_SECONDARY_MEMORY_NEEDED.
13862         (push_reload): Likewise.
13863         * reload1.c: Unconditionally include code that was previously
13864         conditional on SECONDARY_MEMORY_NEEDED.
13865         (choose_reload_regs): Use targetm.secondary_memory_needed
13866         instead of TARGET_SECONDARY_MEMORY_NEEDED.
13867         (gen_reload): Likewise.
13868         * system.h (SECONDARY_MEMORY_NEEDED): Poison.
13870 2017-09-13  Richard Sandiford  <richard.sandiford@linaro.org>
13871             Alan Hayward  <alan.hayward@arm.com>
13872             David Sherwood  <david.sherwood@arm.com>
13874         * target.def (secondary_memory_needed_mode): New hook:
13875         * targhooks.c (default_secondary_memory_needed_mode): Declare.
13876         * targhooks.h (default_secondary_memory_needed_mode): New function.
13877         * doc/tm.texi.in (SECONDARY_MEMORY_NEEDED_MODE): Replace with...
13878         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): ...this.
13879         * doc/tm.texi: Regenerate.
13880         * lra-constraints.c (check_and_process_move): Use
13881         targetm.secondary_memory_needed_mode instead of
13882         TARGET_SECONDARY_MEMORY_NEEDED_MODE.
13883         (curr_insn_transform): Likewise.
13884         * reload.c (get_secondary_mem): Likewise.
13885         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
13886         * config/alpha/alpha.c (alpha_secondary_memory_needed_mode): New
13887         function.
13888         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
13889         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
13890         * config/i386/i386.c (ix86_secondary_memory_needed_mode): New function.
13891         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
13892         * config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED_MODE):
13893         Delete.
13894         * config/powerpcspe/powerpcspe-protos.h
13895         (rs6000_secondary_memory_needed_mode): Delete.
13896         * config/powerpcspe/powerpcspe.c
13897         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
13898         (rs6000_secondary_memory_needed_mode): Make static.
13899         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
13900         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_mode):
13901         Delete.
13902         * config/rs6000/rs6000.c (TARGET_SECONDARY_MEMORY_NEEDED_MODE):
13903         Redefine.
13904         (rs6000_secondary_memory_needed_mode): Make static.
13905         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
13906         * config/s390/s390.c (s390_secondary_memory_needed_mode): New function.
13907         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
13908         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
13909         * config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED_MODE):
13910         Redefine.
13911         (sparc_secondary_memory_needed_mode): New function.
13912         * system.h (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Poison.
13914 2017-09-13  Jackson Woodruff  <jackson.woodruff@arm.com>
13916         * config/aarch64/constraints.md (Umq): New constraint.
13917         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>):
13918         Change to use Umq.
13919         (mov<mode>): Update condition.
13921 2017-09-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13923         * gimple-ssa-store-merging.c (sort_by_bitpos): Compare store order
13924         when bitposition is the same.
13926 2017-09-13  Richard Biener  <rguenther@suse.de>
13928         * dwarf2out.c (output_die_symbol): Remove.
13929         (output_die): Do not output a DIEs symbol.
13931 2017-09-13  Richard Biener  <rguenther@suse.de>
13933         PR middle-end/82128
13934         * gimple-fold.c (gimple_fold_call): Update SSA name in-place to
13935         default-def to avoid breaking iterator update with the weird
13936         interaction with cgraph_update_edges_for_call_stmt_node.
13938 2017-09-13  Richard Biener  <rguenther@suse.de>
13940         * tree-cfg.c (verify_gimple_assign_binary): Add verification
13941         for WIDEN_SUM_EXPR, VEC_WIDEN_MULT_{HI,LO,EVEN,ODD}_EXPR,
13942         VEC_PACK_{TRUNC,SAT,FIX_TRUNC}_EXPR.
13943         (verify_gimple_assign_ternary): Add verification for DOT_PROD_EXPR.
13945 2017-09-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
13947         * config/aarch64/aarch64.c (aarch64_override_options_after_change_1):
13948         Disable pc relative literal load irrespective of
13949         TARGET_FIX_ERR_A53_84341 for default.
13951 2017-09-12  Eric Botcazou  <ebotcazou@adacore.com>
13953         * config/sparc/sparc.c (output_return): Output the source location of
13954         the insn in the delay slot, if any.
13955         (output_sibcall): Likewise.
13957 2017-09-12  H.J. Lu  <hongjiu.lu@intel.com>
13959         PR driver/81498
13960         * common.opt (-static-pie): New alias.
13961         (shared): Negate static-pie.
13962         (-no-pie): Update help text.
13963         (-pie): Likewise.
13964         (static-pie): New option.
13965         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Add
13966         -static-pie support.
13967         (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
13968         (LINK_EH_SPEC): Likewise.
13969         (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
13970         * config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Likewise.
13971         * config/i386/gnu-user64.h (GNU_USER_TARGET_LINK_SPEC): Likewise.
13972         * gcc.c (LINK_COMMAND_SPEC): Likewise.
13973         (init_gcc_specs): Likewise.
13974         (init_spec): Likewise.
13975         (display_help): Update help message for -pie.
13976         * doc/invoke.texi: Update -pie, -no-pie and -static.  Document
13977         -static-pie.
13979 2017-09-12  Wilco Dijkstra  <wdijkstr@arm.com>
13981         * config/aarch64/aarch64.md (movsi_aarch64): Remove all '*'.
13982         (movdi_aarch64): Likewise.
13983         (movti_aarch64): Likewise.
13985 2017-09-12 Simon Wright <simon@pushface.org>
13987         PR target/80204
13988         * config/darwin-driver.c (darwin_find_version_from_kernel): Eliminate
13989         calculation of the minor version, always output as 0.
13991 2017-09-12  Jakub Jelinek  <jakub@redhat.com>
13993         PR target/82112
13994         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
13995         ALTIVEC_BUILTIN_VEC_LD if arg1 has array type call default_conversion
13996         on it early, rather than manual conversion late.  For
13997         ALTIVEC_BUILTIN_VEC_ST if arg2 has array type call default_conversion
13998         instead of performing manual conversion.
14000 2017-09-12  Carl Love  <cel@us.ibm.com>
14002         * config/rs6000/altivec.md (vec_widen_umult_even_v4si,
14003         vec_widen_smult_even_v4si): Add define expands for vmuleuw, vmulesw,
14004         vmulouw, vmulosw.
14005         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
14006         VMULOSW): Add definitions.
14007         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
14008         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
14009         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
14010         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
14011         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
14013 2017-09-12  James Greenhalgh  <james.greenhalgh@arm.com>
14015         * config/aarch64/aarch64.md (movdi_aarch64): Set load/store
14016         types correctly.
14017         (movti_aarch64): Likewise.
14018         (movdf_aarch64): Likewise.
14019         (movtf_aarch64): Likewise.
14020         (load_pairdi): Likewise.
14021         (store_pairdi): Likewise.
14022         (load_pairdf): Likewise.
14023         (store_pairdf): Likewise.
14024         (loadwb_pair<GPI:mode>_<P:mode>): Likewise.
14025         (storewb_pair<GPI:mode>_<P:mode>): Likewise.
14026         (ldr_got_small_<mode>): Likewise.
14027         (ldr_got_small_28k_<mode>): Likewise.
14028         (ldr_got_tiny): Likewise.
14029         * config/aarch64/iterators.md (ldst_sz): New.
14030         (ldpstp_sz): Likewise.
14031         * config/aarch64/thunderx.md (thunderx_storepair): Split store_8
14032         to store_16.
14033         (thunderx_load): Split load_8 to load_16.
14034         * config/aarch64/thunderx2t99.md (thunderx2t99_loadpair): Split
14035         load_8 to load_16.
14036         (thunderx2t99_storepair_basic): Split store_8 to store_16.
14037         * config/arm/xgene1.md (xgene1_load_pair): Split load_8 to load_16.
14038         (xgene1_store_pair): Split store_8 to store_16.
14039         * config/aarch64/falkor.md (falkor_ld_3_ld): Split load_8 to load_16.
14040         (falkor_st_0_st_sd): Split store_8 to store_16.
14042 2017-09-12  James Greenhalgh  <james.greenhalgh@arm.com>
14044         * config/arm/types.md (type): Rename load1/2/3/4 to load_4/8/12/16
14045         and store1/2/3/4 to store_4/8/12/16.
14046         * config/aarch64/aarch64.md: Update for rename.
14047         * config/arm/arm.md: Likewise.: Likewise.
14048         * config/arm/arm.c: Likewise.
14049         * config/arm/thumb1.md: Likewise.
14050         * config/arm/thumb2.md: Likewise.
14051         * config/arm/vfp.md: Likewise.
14052         * config/arm/arm-generic.md: Likewise.
14053         * config/arm/arm1020e.md: Likewise.
14054         * config/arm/arm1026ejs.md: Likewise.
14055         * config/arm/arm1136jfs.md: Likewise.
14056         * config/arm/arm926ejs.md: Likewise.
14057         * config/arm/cortex-a15.md: Likewise.
14058         * config/arm/cortex-a17.md: Likewise.
14059         * config/arm/cortex-a5.md: Likewise.
14060         * config/arm/cortex-a53.md: Likewise.
14061         * config/arm/cortex-a57.md: Likewise.
14062         * config/arm/cortex-a7.md: Likewise.
14063         * config/arm/cortex-a8.md: Likewise.
14064         * config/arm/cortex-a9.md: Likewise.
14065         * config/arm/cortex-m4.md: Likewise.
14066         * config/arm/cortex-m7.md: Likewise.
14067         * config/arm/cortex-r4.md: Likewise.
14068         * config/arm/exynos-m1.md: Likewise.
14069         * config/arm/fa526.md: Likewise.
14070         * config/arm/fa606te.md: Likewise.
14071         * config/arm/fa626te.md: Likewise.
14072         * config/arm/fa726te.md: Likewise.
14073         * config/arm/fmp626.md: Likewise.
14074         * config/arm/iwmmxt.md: Likewise.
14075         * config/arm/ldmstm.md: Likewise.
14076         * config/arm/marvell-pj4.md: Likewise.
14077         * config/arm/xgene1.md: Likewise.
14078         * config/aarch64/thunderx.md: Likewise.
14079         * config/aarch64/thunderx2t99.md: Likewise.
14080         * config/aarch64/falkor.md: Likewise.
14082 2017-09-12  Martin Liska  <mliska@suse.cz>
14084         * attribs.c (private_lookup_attribute): New function.
14085         * attribs.h (private_lookup_attribute): Declared here.
14086         (lookup_attribute): Called from this place.
14088 2017-09-12  Richard Biener  <rguenther@suse.de>
14090         PR tree-optimization/82157
14091         * tree-ssa-pre.c (remove_dead_inserted_code): Do not remove
14092         stmts with side-effects.
14094 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
14095             Alan Hayward  <alan.hayward@arm.com>
14096             David Sherwood <david.sherwood@arm.com>
14098         * target.def (hard_regno_nregs): New hook.
14099         (class_max_nregs): Refer to it instead of HARD_REGNO_NREGS.
14100         * targhooks.h (default_hard_regno_nregs): Declare.
14101         * targhooks.c (default_hard_regno_nregs): New function.
14102         * doc/tm.texi.in (HARD_REGNO_NREGS): Replace with...
14103         (TARGET_HARD_REGNO_NREGS): ...this hook.
14104         (HARD_REGNO_NREGS_HAS_PADDING): Update accordingly.
14105         (CLASS_MAX_NREGS): Likewise.
14106         * doc/tm.texi: Regenerate.
14107         * reginfo.c (init_reg_modes_target): Use targetm.hard_regno_nregs
14108         instead of HARD_REGNO_NREGS.
14109         * rtl.h (REG_NREGS): Refer to TARGET_HARD_REGNO_NREGS rather than
14110         HARD_REGNO_NREGS in the comment.
14111         * config/aarch64/aarch64.h (HARD_REGNO_NREGS): Delete.
14112         * config/aarch64/aarch64-protos.h (aarch64_hard_regno_nregs): Delete.
14113         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs): Make static.
14114         Return an unsigned int.
14115         (TARGET_HARD_REGNO_NREGS): Redefine.
14116         * config/alpha/alpha.h (HARD_REGNO_NREGS): Delete.
14117         * config/arc/arc.h (HARD_REGNO_NREGS): Delete.
14118         * config/arc/arc.c (TARGET_HARD_REGNO_NREGS): Redefine.
14119         (arc_hard_regno_nregs): New function.
14120         * config/arm/arm.h (HARD_REGNO_NREGS): Delete.
14121         * config/arm/arm.c (TARGET_HARD_REGNO_NREGS): Redefine.
14122         (arm_hard_regno_nregs): New function.
14123         * config/avr/avr.h (HARD_REGNO_NREGS): Delete.
14124         * config/bfin/bfin.h (HARD_REGNO_NREGS): Delete.
14125         * config/bfin/bfin.c (bfin_hard_regno_nregs): New function.
14126         (TARGET_HARD_REGNO_NREGS): Redefine.
14127         * config/c6x/c6x.h (HARD_REGNO_NREGS): Delete.
14128         * config/cr16/cr16.h (LONG_REG_P): Use targetm.hard_regno_nregs.
14129         (HARD_REGNO_NREGS): Delete.
14130         * config/cr16/cr16.c (TARGET_HARD_REGNO_NREGS): Redefine.
14131         (cr16_hard_regno_nregs): New function.
14132         (cr16_memory_move_cost): Use it instead of HARD_REGNO_NREGS.
14133         * config/cris/cris.h (HARD_REGNO_NREGS): Delete.
14134         * config/cris/cris.c (TARGET_HARD_REGNO_NREGS): Redefine.
14135         (cris_hard_regno_nregs): New function.
14136         * config/epiphany/epiphany.h (HARD_REGNO_NREGS): Delete.
14137         * config/fr30/fr30.h (HARD_REGNO_NREGS): Delete.
14138         (CLASS_MAX_NREGS): Use targetm.hard_regno_nregs.
14139         * config/frv/frv.h (HARD_REGNO_NREGS): Delete.
14140         (CLASS_MAX_NREGS): Remove outdated copy of documentation.
14141         * config/frv/frv-protos.h (frv_hard_regno_nregs): Delete.
14142         * config/frv/frv.c (TARGET_HARD_REGNO_NREGS): Redefine.
14143         (frv_hard_regno_nregs): Make static.  Take and return an
14144         unsigned int.
14145         (frv_class_max_nregs): Remove outdated copy of documentation.
14146         * config/ft32/ft32.h (HARD_REGNO_NREGS): Delete.
14147         * config/h8300/h8300.h (HARD_REGNO_NREGS): Delete.
14148         * config/h8300/h8300-protos.h (h8300_hard_regno_nregs): Delete.
14149         * config/h8300/h8300.c (h8300_hard_regno_nregs): Delete.
14150         * config/i386/i386.h (HARD_REGNO_NREGS): Delete.
14151         * config/i386/i386.c (ix86_hard_regno_nregs): New function.
14152         (TARGET_HARD_REGNO_NREGS): Redefine.
14153         * config/ia64/ia64.h (HARD_REGNO_NREGS): Delete.
14154         (CLASS_MAX_NREGS): Update comment.
14155         * config/ia64/ia64.c (TARGET_HARD_REGNO_NREGS): Redefine.
14156         (ia64_hard_regno_nregs): New function.
14157         * config/iq2000/iq2000.h (HARD_REGNO_NREGS): Delete.
14158         * config/lm32/lm32.h (HARD_REGNO_NREGS): Delete.
14159         * config/m32c/m32c.h (HARD_REGNO_NREGS): Delete.
14160         * config/m32c/m32c-protos.h (m32c_hard_regno_nregs): Delete.
14161         * config/m32c/m32c.c (m32c_hard_regno_nregs_1): Take and return
14162         an unsigned int.
14163         (m32c_hard_regno_nregs): Likewise.  Make static.
14164         (TARGET_HARD_REGNO_NREGS): Redefine.
14165         * config/m32r/m32r.h (HARD_REGNO_NREGS): Delete.
14166         * config/m68k/m68k.h (HARD_REGNO_NREGS): Delete.
14167         * config/m68k/m68k.c (TARGET_HARD_REGNO_NREGS): Redefine.
14168         (m68k_hard_regno_nregs): New function.
14169         * config/mcore/mcore.h (HARD_REGNO_NREGS): Delete.
14170         * config/microblaze/microblaze.h (HARD_REGNO_NREGS): Delete.
14171         * config/mips/mips.h (HARD_REGNO_NREGS): Delete.
14172         * config/mips/mips-protos.h (mips_hard_regno_nregs): Delete.
14173         * config/mips/mips.c (mips_hard_regno_nregs): Make static.
14174         Take and return an unsigned int.
14175         (TARGET_HARD_REGNO_NREGS): Redefine.
14176         * config/mmix/mmix.h (HARD_REGNO_NREGS): Delete.
14177         (CLASS_MAX_NREGS): Use targetm.hard_regno_nregs.
14178         * config/mn10300/mn10300.h (HARD_REGNO_NREGS): Delete.
14179         * config/moxie/moxie.h (HARD_REGNO_NREGS): Delete.
14180         * config/msp430/msp430.h (HARD_REGNO_NREGS): Delete.
14181         * config/msp430/msp430-protos.h (msp430_hard_regno_nregs): Delete.
14182         * config/msp430/msp430.c (TARGET_HARD_REGNO_NREGS): Redefine.
14183         (msp430_hard_regno_nregs): Make static.  Take and return an
14184         unsigned int.
14185         * config/nds32/nds32.h (HARD_REGNO_NREGS): Delete.
14186         * config/nds32/nds32-protos.h (nds32_hard_regno_nregs): Delete.
14187         * config/nds32/nds32.c (nds32_hard_regno_nregs): Delete.
14188         (nds32_hard_regno_mode_ok): Use targetm.hard_regno_nregs.
14189         * config/nios2/nios2.h (HARD_REGNO_NREGS): Delete.
14190         * config/nvptx/nvptx.h (HARD_REGNO_NREGS): Delete.
14191         * config/nvptx/nvptx.c (nvptx_hard_regno_nregs): New function.
14192         (TARGET_HARD_REGNO_NREGS): Redefine.
14193         * config/pa/pa32-regs.h (HARD_REGNO_NREGS): Rename to...
14194         (PA_HARD_REGNO_NREGS): ...this.
14195         * config/pa/pa64-regs.h (HARD_REGNO_NREGS): Rename to...
14196         (PA_HARD_REGNO_NREGS): ...this.
14197         * config/pa/pa.c (TARGET_HARD_REGNO_NREGS): Redefine.
14198         (pa_hard_regno_nregs): New function.
14199         * config/pdp11/pdp11.h (HARD_REGNO_NREGS): Delete.
14200         * config/pdp11/pdp11.c (TARGET_HARD_REGNO_NREGS): Redefine.
14201         (pdp11_hard_regno_nregs): New function.
14202         * config/powerpcspe/powerpcspe.h (HARD_REGNO_NREGS): Delete.
14203         * config/powerpcspe/powerpcspe.c (TARGET_HARD_REGNO_NREGS): Redefine.
14204         (rs6000_hard_regno_nregs_hook): New function.
14205         * config/riscv/riscv.h (HARD_REGNO_NREGS): Delete.
14206         * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): Delete.
14207         * config/riscv/riscv.c (riscv_hard_regno_nregs): Make static.
14208         Take and return an unsigned int.  Move earlier in file.
14209         (TARGET_HARD_REGNO_NREGS): Redefine.
14210         * config/rl78/rl78.h (HARD_REGNO_NREGS): Delete.
14211         * config/rl78/rl78-protos.h (rl78_hard_regno_nregs): Delete.
14212         * config/rl78/rl78.c (TARGET_HARD_REGNO_NREGS): Reefine.
14213         (rl78_hard_regno_nregs): Make static.  Take and return an
14214         unsigned int.
14215         * config/rs6000/rs6000.h (HARD_REGNO_NREGS): Delete.
14216         * config/rs6000/rs6000.c (TARGET_HARD_REGNO_NREGS): Redefine.
14217         (rs6000_hard_regno_nregs_hook): New function.
14218         * config/rx/rx.h (HARD_REGNO_NREGS): Delete.
14219         * config/rx/rx.c (rx_hard_regno_nregs): New function.
14220         (TARGET_HARD_REGNO_NREGS): Redefine.
14221         * config/s390/s390.h (HARD_REGNO_NREGS): Delete.
14222         * config/s390/s390.c (REGNO_PAIR_OK): Use s390_hard_regno_nregs
14223         instead of HARD_REGNO_NREGS.
14224         (s390_hard_regno_nregs): New function.
14225         (s390_hard_regno_mode_ok): Add comment from s390.h.
14226         (TARGET_HARD_REGNO_NREGS): Redefine.
14227         * config/sh/sh.h (HARD_REGNO_NREGS): Delete.
14228         * config/sh/sh.c (TARGET_HARD_REGNO_NREGS): Redefine.
14229         (sh_hard_regno_nregs): New function.
14230         (sh_pass_in_reg_p): Use it.
14231         * config/sparc/sparc.h (HARD_REGNO_NREGS): Delete.
14232         * config/sparc/sparc.c (TARGET_HARD_REGNO_NREGS): Redefine.
14233         (sparc_hard_regno_nregs): New function.
14234         * config/spu/spu.h (HARD_REGNO_NREGS): Delete.
14235         * config/spu/spu.c (spu_hard_regno_nregs): New function.
14236         (spu_function_arg_advance): Use it, supplying a valid register number.
14237         (TARGET_HARD_REGNO_NREGS): Redefine.
14238         * config/stormy16/stormy16.h (HARD_REGNO_NREGS): Delete.
14239         * config/tilegx/tilegx.h (HARD_REGNO_NREGS): Delete.
14240         * config/tilepro/tilepro.h (HARD_REGNO_NREGS): Delete.
14241         * config/v850/v850.h (HARD_REGNO_NREGS): Delete.
14242         * config/vax/vax.h (HARD_REGNO_NREGS): Delete.
14243         * config/visium/visium.h (HARD_REGNO_NREGS): Delete.
14244         (CLASS_MAX_NREGS): Remove copy of old documentation.
14245         * config/visium/visium.c (TARGET_HARD_REGNO_NREGS): Redefine.
14246         (visium_hard_regno_nregs): New function.
14247         (visium_hard_regno_mode_ok): Use it instead of HARD_REGNO_NREGS.
14248         * config/xtensa/xtensa.h (HARD_REGNO_NREGS): Delete.
14249         * config/xtensa/xtensa.c (TARGET_HARD_REGNO_NREGS): Redefine.
14250         xtensa_hard_regno_nregs): New function.
14251         * system.h (HARD_REGNO_NREGS): Poison.
14253 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
14255         * config/arm/arm.h (THUMB_SECONDARY_INPUT_RELOAD_CLASS): Use
14256         hard_regno_nregs instead of HARD_REGNO_NREGS.
14257         (THUMB_SECONDARY_OUTPUT_RELOAD_CLASS): Likewise.
14258         * config/c6x/c6x.c (c6x_expand_prologue): Likewise.
14259         (c6x_expand_epilogue): Likewise.
14260         * config/frv/frv.c (frv_alloc_temp_reg): Likewise.
14261         (frv_read_iacc_argument): Likewise.
14262         * config/sh/sh.c: Include regs.h.
14263         (sh_print_operand): Use hard_regno_nregs instead of HARD_REGNO_NREGS.
14264         (regs_used): Likewise.
14265         (output_stack_adjust): Likewise.
14266         * config/xtensa/xtensa.c (xtensa_copy_incoming_a7): Likewise.
14267         * expmed.c: Include regs.h.
14268         (store_bit_field_1): Use hard_regno_nregs instead of HARD_REGNO_NREGS.
14269         * ree.c: Include regs.h.
14270         (combine_reaching_defs): Use hard_regno_nregs instead of
14271         HARD_REGNO_NREGS.
14272         (add_removable_extension): Likewise.
14274 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
14276         * regs.h (hard_regno_nregs): Turn into a function.
14277         (end_hard_regno): Update accordingly.
14278         * caller-save.c (setup_save_areas): Likewise.
14279         (save_call_clobbered_regs): Likewise.
14280         (replace_reg_with_saved_mem): Likewise.
14281         (insert_restore): Likewise.
14282         (insert_save): Likewise.
14283         * combine.c (can_change_dest_mode): Likewise.
14284         (move_deaths): Likewise.
14285         (distribute_notes): Likewise.
14286         * config/mips/mips.c (mips_hard_regno_call_part_clobbered): Likewise.
14287         * config/powerpcspe/powerpcspe.c (rs6000_cannot_change_mode_class)
14288         (rs6000_split_multireg_move): Likewise.
14289         (rs6000_register_move_cost): Likewise.
14290         (rs6000_memory_move_cost): Likewise.
14291         * config/rs6000/rs6000.c (rs6000_cannot_change_mode_class): Likewise.
14292         (rs6000_split_multireg_move): Likewise.
14293         (rs6000_register_move_cost): Likewise.
14294         (rs6000_memory_move_cost): Likewise.
14295         * cselib.c (cselib_reset_table): Likewise.
14296         (cselib_lookup_1): Likewise.
14297         * emit-rtl.c (set_mode_and_regno): Likewise.
14298         * function.c (aggregate_value_p): Likewise.
14299         * ira-color.c (setup_profitable_hard_regs): Likewise.
14300         (check_hard_reg_p): Likewise.
14301         (calculate_saved_nregs): Likewise.
14302         (assign_hard_reg): Likewise.
14303         (improve_allocation): Likewise.
14304         (calculate_spill_cost): Likewise.
14305         * ira-emit.c (modify_move_list): Likewise.
14306         * ira-int.h (ira_hard_reg_set_intersection_p): Likewise.
14307         (ira_hard_reg_in_set_p): Likewise.
14308         * ira.c (setup_reg_mode_hard_regset): Likewise.
14309         (clarify_prohibited_class_mode_regs): Likewise.
14310         (check_allocation): Likewise.
14311         * lra-assigns.c (find_hard_regno_for_1): Likewise.
14312         (lra_setup_reg_renumber): Likewise.
14313         (setup_try_hard_regno_pseudos): Likewise.
14314         (spill_for): Likewise.
14315         (assign_hard_regno): Likewise.
14316         (setup_live_pseudos_and_spill_after_risky_transforms): Likewise.
14317         * lra-constraints.c (in_class_p): Likewise.
14318         (lra_constraint_offset): Likewise.
14319         (simplify_operand_subreg): Likewise.
14320         (lra_constraints): Likewise.
14321         (split_reg): Likewise.
14322         (split_if_necessary): Likewise.
14323         (invariant_p): Likewise.
14324         (inherit_in_ebb): Likewise.
14325         * lra-lives.c (process_bb_lives): Likewise.
14326         * lra-remat.c (reg_overlap_for_remat_p): Likewise.
14327         (get_hard_regs): Likewise.
14328         (do_remat): Likewise.
14329         * lra-spills.c (assign_spill_hard_regs): Likewise.
14330         * mode-switching.c (create_pre_exit): Likewise.
14331         * postreload.c (reload_combine_recognize_pattern): Likewise.
14332         * recog.c (peep2_find_free_register): Likewise.
14333         * regcprop.c (kill_value_regno): Likewise.
14334         (set_value_regno): Likewise.
14335         (copy_value): Likewise.
14336         (maybe_mode_change): Likewise.
14337         (find_oldest_value_reg): Likewise.
14338         (copyprop_hardreg_forward_1): Likewise.
14339         * regrename.c (check_new_reg_p): Likewise.
14340         (regrename_do_replace): Likewise.
14341         * reload.c (push_reload): Likewise.
14342         (combine_reloads): Likewise.
14343         (find_dummy_reload): Likewise.
14344         (operands_match_p): Likewise.
14345         (find_reloads): Likewise.
14346         (find_equiv_reg): Likewise.
14347         (reload_adjust_reg_for_mode): Likewise.
14348         * reload1.c (count_pseudo): Likewise.
14349         (count_spilled_pseudo): Likewise.
14350         (find_reg): Likewise.
14351         (clear_reload_reg_in_use): Likewise.
14352         (free_for_value_p): Likewise.
14353         (allocate_reload_reg): Likewise.
14354         (choose_reload_regs): Likewise.
14355         (reload_adjust_reg_for_temp): Likewise.
14356         (emit_reload_insns): Likewise.
14357         (delete_output_reload): Likewise.
14358         * rtlanal.c (subreg_get_info): Likewise.
14359         * sched-deps.c (sched_analyze_reg): Likewise.
14360         * sel-sched.c (init_regs_for_mode): Likewise.
14361         (mark_unavailable_hard_regs): Likewise.
14362         (choose_best_reg_1): Likewise.
14363         (verify_target_availability): Likewise.
14364         * valtrack.c (dead_debug_insert_temp): Likewise.
14365         * var-tracking.c (track_loc_p): Likewise.
14366         (emit_note_insn_var_location): Likewise.
14367         * varasm.c (make_decl_rtl): Likewise.
14368         * reginfo.c (choose_hard_reg_mode): Likewise.
14369         (init_reg_modes_target): Refer directly to
14370         this_target_regs->x_hard_regno_nregs.
14372 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
14374         * ira-costs.c (record_operand_costs): Use in_hard_reg_set_p
14375         instead of hard_regno_nregs.
14377 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
14379         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Use
14380         end_hard_regno instead of hard_regno_nregs.
14381         * config/s390/s390.c (s390_reg_clobbered_rtx): Likewise.
14382         * config/sparc/sparc.h (ASM_DECLARE_REGISTER_GLOBAL): Likewise.
14383         * config/visium/visium.c (visium_hard_regno_mode_ok): Likewise.
14384         * ira-color.c (improve_allocation): Likewise.
14385         * lra-assigns.c (find_hard_regno_for_1): Likewise.
14386         * lra-lives.c (mark_regno_live): Likewise.
14387         (mark_regno_dead): Likewise.
14388         * lra-remat.c (operand_to_remat): Likewise.
14389         * lra.c (collect_non_operand_hard_regs): Likewise.
14390         * postreload.c (reload_combine_note_store): Likewise.
14391         (move2add_valid_value_p): Likewise.
14392         * reload.c (regno_clobbered_p): Likewise.
14394 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
14396         * config/frv/frv.c (FOR_EACH_REGNO): Use END_REGNO instead of
14397         hard_regno_nregs.
14398         * config/v850/v850.c (v850_reorg): Likewise.
14399         * reload.c (refers_to_regno_for_reload_p): Likewise.
14400         (find_equiv_reg): Likewise.
14401         * reload1.c (reload_reg_reaches_end_p): Likewise.
14403 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
14405         * caller-save.c (add_used_regs): Use REG_NREGS instead of
14406         hard_regno_nregs.
14407         * config/aarch64/aarch64.c (aarch64_split_combinev16qi): Likewise.
14408         * config/arm/arm.c (output_move_neon): Likewise.
14409         (arm_attr_length_move_neon): Likewise.
14410         (neon_split_vcombine): Likewise.
14411         * config/c6x/c6x.c (c6x_mark_reg_read): Likewise.
14412         (c6x_mark_reg_written): Likewise.
14413         (c6x_dwarf_register_span): Likewise.
14414         * config/i386/i386.c (ix86_save_reg): Likewise.
14415         * config/ia64/ia64.c (mark_reg_gr_used_mask): Likewise.
14416         (rws_access_reg): Likewise.
14417         * config/s390/s390.c (s390_call_saved_register_used): Likewise.
14418         * mode-switching.c (create_pre_exit): Likewise.
14419         * ree.c (combine_reaching_defs): Likewise.
14420         (add_removable_extension): Likewise.
14421         * regcprop.c (find_oldest_value_reg): Likewise.
14422         (copyprop_hardreg_forward_1): Likewise.
14423         * reload.c (reload_inner_reg_of_subreg): Likewise.
14424         (push_reload): Likewise.
14425         (combine_reloads): Likewise.
14426         (find_dummy_reload): Likewise.
14427         (reload_adjust_reg_for_mode): Likewise.
14428         * reload1.c (find_reload_regs): Likewise.
14429         (forget_old_reloads_1): Likewise.
14430         (reload_reg_free_for_value_p): Likewise.
14431         (reload_adjust_reg_for_temp): Likewise.
14432         (emit_reload_insns): Likewise.
14433         (delete_output_reload): Likewise.
14434         * sel-sched.c (choose_best_reg_1): Likewise.
14435         (choose_best_pseudo_reg): Likewise.
14437 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
14438             Alan Hayward  <alan.hayward@arm.com>
14439             David Sherwood <david.sherwood@arm.com>
14441         * defaults.h (SLOW_UNALIGNED_ACCESS): Delete.
14442         * target.def (slow_unaligned_access): New hook.
14443         * targhooks.h (default_slow_unaligned_access): Declare.
14444         * targhooks.c (default_slow_unaligned_access): New function.
14445         * doc/tm.texi.in (SLOW_UNALIGNED_ACCESS): Replace with...
14446         (TARGET_SLOW_UNALIGNED_ACCESS): ...this.
14447         * doc/tm.texi: Regenerate.
14448         * config/alpha/alpha.h (SLOW_UNALIGNED_ACCESS): Delete.
14449         * config/arm/arm.h (SLOW_UNALIGNED_ACCESS): Delete.
14450         * config/i386/i386.h (SLOW_UNALIGNED_ACCESS): Delete commented-out
14451         definition.
14452         * config/powerpcspe/powerpcspe.h (SLOW_UNALIGNED_ACCESS): Delete.
14453         * config/powerpcspe/powerpcspe.c (TARGET_SLOW_UNALIGNED_ACCESS):
14454         Redefine.
14455         (rs6000_slow_unaligned_access): New function.
14456         (rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS.
14457         (expand_block_compare): Likewise.
14458         (expand_strn_compare): Likewise.
14459         (rs6000_rtx_costs): Likewise.
14460         * config/riscv/riscv.h (SLOW_UNALIGNED_ACCESS): Delete.
14461         (riscv_slow_unaligned_access): Likewise.
14462         * config/riscv/riscv.c (riscv_slow_unaligned_access): Rename to...
14463         (riscv_slow_unaligned_access_p): ...this and make static.
14464         (riscv_option_override): Update accordingly.
14465         (riscv_slow_unaligned_access): New function.
14466         (TARGET_SLOW_UNALIGNED_ACCESS): Redefine.
14467         * config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Delete.
14468         * config/rs6000/rs6000.c (TARGET_SLOW_UNALIGNED_ACCESS): Redefine.
14469         (rs6000_slow_unaligned_access): New function.
14470         (rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS.
14471         (rs6000_rtx_costs): Likewise.
14472         * config/rs6000/rs6000-string.c (expand_block_compare)
14473         (expand_strn_compare): Use targetm.slow_unaligned_access instead
14474         of SLOW_UNALIGNED_ACCESS.
14475         * config/tilegx/tilegx.h (SLOW_UNALIGNED_ACCESS): Delete.
14476         * config/tilepro/tilepro.h (SLOW_UNALIGNED_ACCESS): Delete.
14477         * calls.c (expand_call): Use targetm.slow_unaligned_access instead
14478         of SLOW_UNALIGNED_ACCESS.
14479         * expmed.c (simple_mem_bitfield_p): Likewise.
14480         * expr.c (alignment_for_piecewise_move): Likewise.
14481         (emit_group_load_1): Likewise.
14482         (emit_group_store): Likewise.
14483         (copy_blkmode_from_reg): Likewise.
14484         (emit_push_insn): Likewise.
14485         (expand_assignment): Likewise.
14486         (store_field): Likewise.
14487         (expand_expr_real_1): Likewise.
14488         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
14489         * lra-constraints.c (simplify_operand_subreg): Likewise.
14490         * stor-layout.c (bit_field_mode_iterator::next_mode): Likewise.
14491         * gimple-ssa-store-merging.c: Likewise in block comment at start
14492         of file.
14493         * tree-ssa-strlen.c: Include target.h.
14494         (handle_builtin_memcmp): Use targetm.slow_unaligned_access instead
14495         of SLOW_UNALIGNED_ACCESS.
14496         * system.h (SLOW_UNALIGNED_ACCESS): Poison.
14498 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
14500         PR rtl-optimization/82185
14501         * expmed.c (emit_store_flag_int): Only test tem if it has been
14502         initialized.
14504 2017-09-12  Richard Biener  <rguenther@suse.de>
14506         PR middle-end/82149
14507         * match.pd ((FTYPE) N CMP CST): Fix typo.
14509 2017-09-12  Simon Atanasyan  <simon.atanasyan@imgtec.com>
14511         * config/mips/mips.c (mips_attribute_table): Add 'short_call'
14512         attribute.
14513         (mips_near_type_p): Add 'short_call' attribute as a synonym
14514         for 'near'.
14515         * doc/extend.texi (short_call): Document new function attribute.
14517 2017-09-12  Jakub Jelinek  <jakub@redhat.com>
14519         PR target/82112
14520         * c-common.c (sync_resolve_size): Instead of c_dialect_cxx ()
14521         assertion check that in the condition.
14522         (get_atomic_generic_size): Likewise.  Before testing if parameter
14523         has pointer type, if it has array type, call for C++
14524         default_conversion to perform array-to-pointer conversion.
14526 2017-09-12  Richard Biener  <rguenther@suse.de>
14528         * tree-vect-generic.c (expand_vector_operations_1): Do nothing
14529         for operations we cannot scalarize.
14531 2017-09-12  Aldy Hernandez  <aldyh@redhat.com>
14533         * tree-ssa-threadbackward.c (fsm_find_thread_path): Make GC
14534         vectors heap vectors.  Clean up comments.
14535         Make visited_bbs a reference.
14536         (profitable_jump_thread_path): Make GC
14537         vectors heap vectors.  Clean up comments.
14538         Misc cleanups.
14539         (convert_and_register_jump_thread_path): Make GC vectors heap
14540         vectors.
14541         (check_subpath_and_update_thread_path): Same.  Clean up comments.
14542         Make visited_bbs a reference.
14543         (handle_phi): Abstract common code to to
14544         register_jump_thread_path_if_profitable.
14545         Rename VAR_BB to DEF_BB.
14546         Update comments.
14547         Make GC vectors heap vectors.
14548         Make visited_bbs a reference.
14549         (handle_assignment): Same.
14550         (register_jump_thread_path_if_profitable): New.
14551         (fsm_find_control_statement_thread_paths): Rename VAR_BB to
14552         DEF_BB.
14553         Make GC vectors heap vectors.  Clean up comments.
14554         Make visited_bbs a reference.
14555         (find_jump_threads_backwards): Make visited_bbs live in the stack.
14556         * tree-ssa-threadupdate.c (delete_jump_thread_path): Fix typo in
14557         comment.
14559 2017-09-11  Max Filippov  <jcmvbkbc@gmail.com>
14561         PR target/82181
14562         * config/xtensa/xtensa.c (xtensa_mem_offset): Check that both
14563         words of E_DImode object are reachable by xtensa_uimm8x4 access.
14565 2017-09-11  Vidya Praveen  <vidyapraveen@arm.com>
14567         Revert r251800 and r251799.
14569 2017-09-11  Martin Jambor  <mjambor@suse.cz>
14571         PR hsa/82119
14572         * hsa-gen.c (gen_hsa_phi_from_gimple_phi): Process ADDR_EXPRs in
14573         arguments in advance.
14574         * hsa-regalloc.c (naive_process_phi): New parameter predecessors,
14575         use it to find predecessor edges.
14576         (naive_outof_ssa): Collect vector of predecessors.
14578 2017-09-08  Jason Merrill  <jason@redhat.com>
14580         PR c++/70029 - ICE with ref-qualifier and -flto
14581         * langhooks.h (struct lang_hooks_for_types): Add
14582         copy_lang_qualifiers.
14583         * attribs.c (build_type_attribute_qual_variant): Use it.
14584         * langhooks-def.h (LANG_HOOKS_COPY_LANG_QUALIFIERS): Default to
14585         NULL.
14586         (LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it.
14587         * tree.c (verify_type): Re-enable TYPE_CANONICAL main variant check.
14589 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
14591         PR target/81988
14592         * config/sparc/sparc.md (mulsi3): Rename into *mulsi3_sp32.
14593         (*mulsi3_sp64): New instruction.
14594         (mulsi3): New expander.
14596 2017-09-08  Uros Bizjak  <ubizjak@gmail.com>
14598         * config/alpha/alpha.c (alpha_print_operand) <case 'S'>: Remove.
14600 2017-09-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14602         * sancov.c: Include memmodel.h.
14604 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
14606         PR target/80897
14607         * config/sparc/sparc.c (sparc_emit_set_symbolic_const64): Deal with too
14608         large offsets.
14610 2017-09-07  Carl Love  <cel@us.ibm.com>
14612         * config/rs6000/vsx.md (define_insn "*stxvl"): Add missing argument to
14613         the sldi instruction.
14615 2017-09-07  David Edelsohn  <dje.gcc@gmail.com>
14617         * sancov.c: Include tm_p.h.
14619 2017-09-07  Jakub Jelinek  <jakub@redhat.com>
14621         PR target/81979
14622         * output.h (switch_to_other_text_partition): New declaration.
14623         * varasm.c (switch_to_other_text_partition): New function.
14624         * config/rs6000/rs6000.c (uses_TOC): Return 2 if
14625         NOTE_INSN_SWITCH_TEXT_SECTIONS is seen before finding load_toc_* insn.
14626         (rs6000_elf_declare_function_name): If uses_TOC returned 2, switch
14627         to the other text partition before emitting LCL label and switch back
14628         after emitting the word after it.
14630 2017-09-07  Richard Biener  <rguenther@suse.de>
14632         * passes.def (pass_split_crit_edges): Remove instance before PRE.
14633         * tree-ssa-pre.c (pass_pre::execute): Instead manually split
14634         critical edges here, after loop init.
14635         (pass_data_pre): Remove PROP_no_crit_edges flags.
14636         * tree-ssa-sccvn.c (vn_reference_lookup_3): Use vn_valueize
14637         for valueization of call args to avoid leaking VN_TOP.
14638         (visit_use): Assert we do not visit default defs.
14639         (init_scc_vn): Use build_decl for VN_TOP to make name nicer.
14640         Use error_mark_node to more easily detect leaking VN_TOP.
14641         All default-defs are varying, not VN_TOP.  Mark them visited.
14642         (run_scc_vn): Make code match comment.
14644 2017-09-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
14646         * config/rs6000/rs6000-cpus.def (OTHER_VSX_VECTOR_MASKS): Delete
14647         OPTION_MASK_FLOAT128_KEYWORD.
14648         (POWERPC_MASKS): Likewise.
14649         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Delete
14650         support for the -mfloat128-type option, and make -mfloat128
14651         default on PowerPC Linux systems.  Define or undefine
14652         __FLOAT128__ and  __FLOAT128_HARDWARE__ for the current options.
14653         Define __float128 to be __ieee128 if IEEE 128-bit support is
14654         enabled, or undefine it.
14655         (rs6000_cpu_cpp_builtins): Delete defining __FLOAT128__ here.
14656         Delete defining __FLOAT128_TYPE__.
14657         * config/rs6000/rs6000.opt (x_TARGET_FLOAT128_TYPE): Delete the
14658         -mfloat128-type option and make -mfloat128 default on PowerPC
14659         Linux systems.
14660         (TARGET_FLOAT128_TYPE): Likewise.
14661         (-mfloat128-type): Likewise.
14662         * config/rs6000/rs6000.c (rs6000_option_override_internal):
14663         Delete the -mfloat128-type option and make -mfloat128 default on
14664         PowerPC Linux systems.  Always use __ieee128 to be the keyword for
14665         the IEEE 128-bit type, and map __float128 to __ieee128 if IEEE
14666         128-bit floating point is enabled.  Change tests from using
14667         -mfloat128-type to -mfloat128.
14668         (rs6000_mangle_type): Use the correct mangling for the __float128
14669         type even if normal long double is restricted to 64-bits.
14670         (floatn_mode): Enable the _Float128 type by default on VSX Linux
14671         systems.
14672         * config/rs6000/rs6000.h (MASK_FLOAT128_TYPE): Delete.
14673         (MASK_FLOAT128_KEYWORD): Define new shortcut macro.
14674         (RS6000BTM_FLOAT128): Define in terms of -mfloat128, not
14675         -mfloat128-type.
14676         * doc/invoke.texi (RS/6000 and PowerPC Options): Update
14677         documentation for -mfloat128.
14679 2017-09-06  Olivier Hainque  <hainque@adacore.com>
14681         * config.gcc (powerpc-wrs-vxworksspe): Now match as vxworks*spe.
14683 2017-09-06  Wish Wu  <wishwu007@gmail.com>
14684             Jakub Jelinek  <jakub@redhat.com>
14686         * asan.c (initialize_sanitizer_builtins): Add
14687         BT_FN_VOID_UINT8_UINT8, BT_FN_VOID_UINT16_UINT16,
14688         BT_FN_VOID_UINT32_UINT32, BT_FN_VOID_UINT64_UINT64,
14689         BT_FN_VOID_FLOAT_FLOAT, BT_FN_VOID_DOUBLE_DOUBLE and
14690         BT_FN_VOID_UINT64_PTR variables.
14691         * builtin-types.def (BT_FN_VOID_UINT8_UINT8): New fn type.
14692         (BT_FN_VOID_UINT16_UINT16): Likewise.
14693         (BT_FN_VOID_UINT32_UINT32): Likewise.
14694         (BT_FN_VOID_FLOAT_FLOAT): Likewise.
14695         (BT_FN_VOID_DOUBLE_DOUBLE): Likewise.
14696         (BT_FN_VOID_UINT64_PTR): Likewise.
14697         * common.opt (flag_sanitize_coverage): New variable.
14698         (fsanitize-coverage=trace-pc): Remove.
14699         (fsanitize-coverage=): Add.
14700         * flag-types.h (enum sanitize_coverage_code): New enum.
14701         * fold-const.c (fold_range_test): Disable non-short-circuit
14702         optimization if flag_sanitize_coverage.
14703         (fold_truth_andor): Likewise.
14704         * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
14705         * opts.c (COVERAGE_SANITIZER_OPT): Define.
14706         (coverage_sanitizer_opts): New array.
14707         (get_closest_sanitizer_option): Add OPTS argument, handle also
14708         OPT_fsanitize_coverage_.
14709         (parse_sanitizer_options): Adjusted to also handle
14710         OPT_fsanitize_coverage_.
14711         (common_handle_option): Add OPT_fsanitize_coverage_.
14712         * sancov.c (instrument_comparison, instrument_switch): New function.
14713         (sancov_pass): Add trace-cmp support.
14714         * sanitizer.def (BUILT_IN_SANITIZER_COV_TRACE_CMP1,
14715         BUILT_IN_SANITIZER_COV_TRACE_CMP2, BUILT_IN_SANITIZER_COV_TRACE_CMP4,
14716         BUILT_IN_SANITIZER_COV_TRACE_CMP8,
14717         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP1,
14718         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP2,
14719         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP4,
14720         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP8,
14721         BUILT_IN_SANITIZER_COV_TRACE_CMPF, BUILT_IN_SANITIZER_COV_TRACE_CMPD,
14722         BUILT_IN_SANITIZER_COV_TRACE_SWITCH): New builtins.
14723         * doc/invoke.texi: Document -fsanitize-coverage=trace-cmp.
14725 2017-09-06  Richard Earnshaw  <rearnsha@arm.com>
14727         * config/arm/parsecpu.awk (fatal): Note that we've encountered an
14728         error.  Only quit immediately if parsing is complete.
14729         (BEGIN): Initialize fatal_err and parse_done.
14730         (begin fpu, end fpu): Check number of arguments.
14731         (begin arch, end arch): Likewise.
14732         (begin cpu, end cpu): Likewise.
14733         (cname, tune for, tune flags, architecture, fpu, option): Likewise.
14734         (optalias): Likewise.
14736 2017-09-06  Richard Earnshaw  <rearnsha@arm.com>
14738         * config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.
14739         * config/arm/arm-isa.h: Delete.  Move definitions to ...
14740         * arm-cpus.in: ... here.  Use new feature and fgroup values.
14741         * config/arm/arm.c (arm_option_override): Use lower case for feature
14742         bit names.
14743         * config/arm/arm.h (TARGET_HARD_FLOAT): Likewise.
14744         (TARGET_VFP3, TARGET_VFP5, TARGET_FMA): Likewise.
14745         * config/arm/parsecpu.awk (END): Add new command 'isa'.
14746         (isa_pfx): Delete.
14747         (print_isa_bits_for): New function.
14748         (gen_isa): New function.
14749         (gen_comm_data): Use print_isa_bits_for.
14750         (define feature): New keyword.
14751         (define fgroup): New keyword.
14752         * config/arm/t-arm (OPTIONS_H_EXTRA): Add arm-isa.h
14753         (arm-isa.h): Add rule to generate file.
14754         * common/config/arm/arm-common.c: (arm_canon_arch_option): Use lower
14755         case for feature bit names.
14757 2017-09-06  Richard Biener  <rguenther@suse.de>
14759         * tree-ssa-pre.c (NECESSARY): Remove.
14760         (create_expression_by_pieces): Do not touch pass-local flags.
14761         (insert_into_preds_of_block): Likewise.
14762         (do_pre_regular_insertion): Likewise.
14763         (eliminate_insert): Likewise.
14764         (eliminate_dom_walker::before_dom_children): Likewise.
14765         (fini_eliminate): Do not look at inserted_exprs.
14766         (mark_operand_necessary): Remove.
14767         (remove_dead_inserted_code): Replace with simple work-list
14768         algorithm based on inserted_exprs and SSA uses.
14769         (pass_pre::execute): Re-order fini_eliminate and
14770         remove_dead_inserted_code.
14772 2017-09-06  Olivier Hainque  <hainque@adacore.com>
14774         * config/powerpcspe/vxworks.h (VXCPU_FOR_8548): Correct definition
14775         for VxWorks 7.  Adjust surrounding comments.
14777 2017-09-06  Richard Biener  <rguenther@suse.de>
14779         * gimple-ssa-strength-reduction.c
14780         (find_candidates_dom_walker::before_dom_children): Also allow
14781         pointer types.
14783 2017-09-06  Richard Biener  <rguenther@suse.de>
14785         PR tree-optimization/82108
14786         * tree-vect-stmts.c (vectorizable_load): Fix pointer adjustment
14787         for gap in the non-permutation SLP case.
14789 2017-09-06  Martin Jambor  <mjambor@suse.cz>
14791         PR tree-optimization/82078
14792         * tree-sra.c (sort_and_splice_var_accesses): Move call to
14793         add_access_to_work_queue...
14794         (build_accesses_from_assign): ...here.
14795         (propagate_all_subaccesses): Make sure racc is the group
14796         representative, if there is one.
14798 2017-09-06  Jakub Jelinek  <jakub@redhat.com>
14800         PR middle-end/82095
14801         * varasm.c (categorize_decl_for_section): Use SECCAT_TBSS for TLS vars with
14802         NULL DECL_INITIAL.
14804 2017-09-06  Richard Biener  <rguenther@suse.de>
14806         * gimple-ssa-strength-reduction.c
14807         (find_candidates_dom_walker::before_doom_children): Use a
14808         type and not a mode check.
14810 2017-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14812         PR target/77308
14813         * config/arm/predicates.md (arm_general_adddi_operand): Create new
14814         non-vfp predicate.
14815         * config/arm/arm.md (*arm_adddi3, *arm_subdi3): Use new predicates.
14817 2017-09-05  Jeff Law  <law@redhat.com>
14819         PR tree-optimization/64910
14820         * tree-ssa-reassoc.c (reassociate_bb): Restrict last change to
14821         cases where we have 3 or more operands.
14823 2017-09-05  Jakub Jelinek  <jakub@redhat.com>
14825         PR middle-end/81768
14826         * omp-low.c (lower_omp_for): Recompute tree invariant if
14827         gimple_omp_for_initial/final is ADDR_EXPR.
14829         PR middle-end/81768
14830         * omp-expand.c (expand_omp_simd): Force second operands of COND_EXPR
14831         into gimple val before gimplification fo the COND_EXPR.
14833 2017-09-05  Aldy Hernandez  <aldyh@redhat.com>
14835         * tree-ssa-threadupdate.c (duplicate_thread_path): Remove unused
14836         REGION_COPY argument.
14837         (thread_through_all_blocks): Remove unused argument to
14838         duplicate_thread_path.
14840 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
14841             Alan Hayward  <alan.hayward@arm.com>
14842             David Sherwood  <david.sherwood@arm.com>
14844         * config/aarch64/aarch64-protos.h (aarch64_gen_adjusted_ldpstp):
14845         Take a scalar_mode rather than a machine_mode.
14846         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
14847         * config/aarch64/aarch64.c (aarch64_simd_container_mode): Likewise.
14848         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
14849         (aarch64_gen_adjusted_ldpstp): Likewise.
14850         (aarch64_expand_vector_init): Use scalar_mode instead of machine_mode.
14852 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
14853             Alan Hayward  <alan.hayward@arm.com>
14854             David Sherwood  <david.sherwood@arm.com>
14856         * config/aarch64/aarch64-protos.h (aarch64_is_extend_from_extract):
14857         Take a scalar_int_mode instead of a machine_mode.
14858         (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
14859         (aarch64_output_scalar_simd_mov_immediate): Likewise.
14860         (aarch64_simd_scalar_immediate_valid_for_move): Likewise.
14861         (aarch64_simd_attr_length_rglist): Delete.
14862         * config/aarch64/aarch64.c (aarch64_is_extend_from_extract): Take
14863         a scalar_int_mode instead of a machine_mode.
14864         (aarch64_add_offset): Likewise.
14865         (aarch64_internal_mov_immediate): Likewise
14866         (aarch64_add_constant_internal): Likewise.
14867         (aarch64_add_constant): Likewise.
14868         (aarch64_movw_imm): Likewise.
14869         (aarch64_rtx_arith_op_extract_p): Likewise.
14870         (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
14871         (aarch64_simd_scalar_immediate_valid_for_move): Likewise.
14872         Remove assert that the mode isn't a vector.
14873         (aarch64_output_scalar_simd_mov_immediate): Likewise.
14874         (aarch64_expand_mov_immediate): Update calls after above changes.
14875         (aarch64_output_casesi): Use as_a <scalar_int_mode>.
14876         (aarch64_and_bitmask_imm): Check for scalar integer modes.
14877         (aarch64_move_imm): Likewise.
14878         (aarch64_can_const_movi_rtx_p): Likewise.
14879         (aarch64_strip_extend): Likewise.
14880         (aarch64_extr_rtx_p): Likewise.
14881         (aarch64_rtx_costs): Likewise, using wode_mode as the mode of
14882         a CONST_INT when the mode parameter is VOIDmode.
14883         (aarch64_float_const_rtx_p): Use scalar_int_mode for a temporary.
14885 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
14887         * machmode.h (bitwise_mode_for_mode): Return opt_mode.
14888         * stor-layout.c (bitwise_mode_for_mode): Likewise.
14889         (bitwise_type_for_mode): Update accordingly.
14891 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
14893         * stor-layout.h (mode_for_size_tree): Return an opt_mode.
14894         * stor-layout.c (mode_for_size_tree): Likewise.
14895         (mode_for_array): Update accordingly.
14896         (layout_decl): Likewise.
14897         (compute_record_mode): Likewise.  Only set the mode once.
14899 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
14901         * target.def (get_mask_mode): Change return type to opt_mode.
14902         Expand commentary.
14903         * doc/tm.texi: Regenerate.
14904         * targhooks.h (default_get_mask_mode): Return an opt_mode.
14905         * targhooks.c (default_get_mask_mode): Likewise.
14906         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
14907         * optabs-query.c (can_vec_mask_load_store_p): Update use of
14908         targetm.get_mask_mode.
14909         * tree.c (build_truth_vector_type): Likewise.
14911 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
14913         * machmode.h (mode_for_vector): Return an opt_mode.
14914         * stor-layout.c (mode_for_vector): Likewise.
14915         (mode_for_int_vector): Update accordingly.
14916         (layout_type): Likewise.
14917         * config/i386/i386.c (emit_memmov): Likewise.
14918         (ix86_expand_set_or_movmem): Likewise.
14919         (ix86_expand_vector_init): Likewise.
14920         (ix86_get_mask_mode): Likewise.
14921         * config/powerpcspe/powerpcspe.c (rs6000_expand_vec_perm_const_1):
14922         Likewise.
14923         * config/rs6000/rs6000.c (rs6000_expand_vec_perm_const_1): Likewise.
14924         * expmed.c (extract_bit_field_1): Likewise.
14925         * expr.c (expand_expr_real_2): Likewise.
14926         * optabs-query.c (can_vec_perm_p): Likewise.
14927         (can_vec_mask_load_store_p): Likewise.
14928         * optabs.c (expand_vec_perm): Likewise.
14929         * targhooks.c (default_get_mask_mode): Likewise.
14930         * tree-vect-stmts.c (vectorizable_store): Likewise.
14931         (vectorizable_load): Likewise.
14932         (get_vectype_for_scalar_type_and_size): Likewise.
14934 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
14936         * machmode.h (mode_for_int_vector): New function.
14937         * stor-layout.c (mode_for_int_vector): Likewise.
14938         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Use it.
14939         * config/powerpcspe/powerpcspe.c (rs6000_do_expand_vec_perm): Likewise.
14940         * config/rs6000/rs6000.c (rs6000_do_expand_vec_perm): Likewise.
14941         * config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
14942         (s390_expand_vcond): Likewise.
14944 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
14946         * machmode.h (opt_machine_mode): New type.
14947         (opt_mode<T>): Allow construction from anything that can be
14948         converted to a T.
14949         (is_a, as_a, dyn_cast): Add overloads for opt_mode.
14950         (mode_for_size): Return an opt_machine_mode.
14951         * stor-layout.c (mode_for_size): Likewise.
14952         (mode_for_size_tree): Update call accordingly.
14953         (bitwise_mode_for_mode): Likewise.
14954         (make_fract_type): Likewise.
14955         (make_accum_type): Likewise.
14956         * caller-save.c (replace_reg_with_saved_mem): Update call
14957         accordingly.
14958         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
14959         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
14960         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
14961         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
14962         * expmed.c (extract_bit_field_1): Likewise.
14963         * reload.c (get_secondary_mem): Likewise.
14964         * varasm.c (assemble_integer): Likewise.
14965         * lower-subreg.c (simplify_subreg_concatn): Likewise.  Move
14966         early-out.
14968 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
14970         * machmode.h (decimal_float_mode_for_size): New function.
14971         * real.h (REAL_VALUE_TO_TARGET_LONG_DOUBLE): Use float_mode_for_size.
14972         (REAL_VALUE_TO_TARGET_DOUBLE): Likewise.
14973         (REAL_VALUE_TO_TARGET_SINGLE): Likewise.
14974         (REAL_VALUE_TO_TARGET_DECIMAL128): Use decimal_float_mode_for_size.
14975         (REAL_VALUE_TO_TARGET_DECIMAL64): Likewise.
14976         (REAL_VALUE_TO_TARGET_DECIMAL32): Likewise.
14978 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
14980         * builtins.c (expand_builtin_powi): Use int_mode_for_size.
14981         (get_builtin_sync_mode): Likewise.
14982         (expand_ifn_atomic_compare_exchange): Likewise.
14983         (expand_builtin_atomic_clear): Likewise.
14984         (expand_builtin_atomic_test_and_set): Likewise.
14985         (fold_builtin_atomic_always_lock_free): Likewise.
14986         * calls.c (compute_argument_addresses): Likewise.
14987         (emit_library_call_value_1): Likewise.
14988         (store_one_arg): Likewise.
14989         * combine.c (combine_instructions): Likewise.
14990         * config/aarch64/aarch64.c (aarch64_function_value): Likewise.
14991         * config/arm/arm.c (arm_function_value): Likewise.
14992         (aapcs_allocate_return_reg): Likewise.
14993         * config/c6x/c6x.c (c6x_expand_movmem): Likewise.
14994         * config/i386/i386.c (construct_container): Likewise.
14995         (ix86_gimplify_va_arg): Likewise.
14996         (ix86_expand_sse_cmp): Likewise.
14997         (emit_memmov): Likewise.
14998         (emit_memset): Likewise.
14999         (expand_small_movmem_or_setmem): Likewise.
15000         (ix86_expand_pextr): Likewise.
15001         (ix86_expand_pinsr): Likewise.
15002         * config/lm32/lm32.c (lm32_block_move_inline): Likewise.
15003         * config/microblaze/microblaze.c (microblaze_block_move_straight):
15004         Likewise.
15005         * config/mips/mips.c (mips_function_value_1) Likewise.
15006         (mips_block_move_straight): Likewise.
15007         (mips_expand_ins_as_unaligned_store): Likewise.
15008         * config/powerpcspe/powerpcspe.c
15009         (rs6000_darwin64_record_arg_advance_flush): Likewise.
15010         (rs6000_darwin64_record_arg_flush): Likewise.
15011         * config/rs6000/rs6000.c
15012         (rs6000_darwin64_record_arg_advance_flush): Likewise.
15013         (rs6000_darwin64_record_arg_flush): Likewise.
15014         * config/sparc/sparc.c (sparc_function_arg_1): Likewise.
15015         (sparc_function_value_1): Likewise.
15016         * config/spu/spu.c (adjust_operand): Likewise.
15017         (spu_emit_branch_or_set): Likewise.
15018         (arith_immediate_p): Likewise.
15019         * emit-rtl.c (gen_lowpart_common): Likewise.
15020         * expr.c (expand_expr_real_1): Likewise.
15021         * function.c (assign_parm_setup_block): Likewise.
15022         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Likewise.
15023         * reload1.c (alter_reg): Likewise.
15024         * stor-layout.c (mode_for_vector): Likewise.
15025         (layout_type): Likewise.
15027 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
15029         * config/spu/spu.c (exp2_immediate_p): Use int_mode_for_mode.
15030         (spu_convert_move): Likewise.
15031         * lower-subreg.c (resolve_simple_move): Likewise.
15033 2017-09-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15035         PR target/81833
15036         * config/rs6000/altivec.md (altivec_vsum2sws): Convert from a
15037         define_insn to a define_expand.
15038         (altivec_vsum2sws_direct): New define_insn.
15039         (altivec_vsumsws): Convert from a define_insn to a define_expand.
15041 2017-09-05  Wilco Dijkstra  <wdijkstr@arm.com>
15043         * config/arm/arm.c (arm_option_params_internal): Improve setting of
15044         max_insns_skipped.
15046 2017-09-05  H.J. Lu  <hongjiu.lu@intel.com>
15048         PR target/59501
15049         PR target/81624
15050         PR target/81769
15051         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Don't
15052         realign stack if stack alignment needed is less than incoming
15053         stack boundary.
15055 2017-09-05  Marek Polacek  <polacek@redhat.com>
15057         PR sanitizer/82072
15058         * convert.c (convert_to_integer_1) <case NEGATE_EXPR>: Move the ubsan
15059         check earlier.
15061 2017-09-05  Wilco Dijkstra  <wdijkstr@arm.com>
15063         * explow.c (get_dynamic_stack_size): Improve dynamic alignment.
15065 2017-09-05  Richard Biener  <rguenther@suse.de>
15067         PR tree-optimization/82084
15068         * fold-const.c (can_native_encode_string_p): Handle wide characters.
15070 2017-09-05  Richard Biener  <rguenther@suse.de>
15072         PR tree-optimization/82102
15073         * tree-ssa-pre.c (fini_eliminate): Check if lhs is NULL.
15075 2017-09-05  Martin Liska  <mliska@suse.cz>
15077         PR tree-optimization/82032
15078         * tree-cfg.c (generate_range_test): New function.
15079         * tree-cfg.h (generate_range_test): Declared here.
15080         * tree-cfgcleanup.c (convert_single_case_switch): New function.
15081         (cleanup_control_expr_graph): Use it.
15082         * tree-switch-conversion.c (try_switch_expansion): Remove
15083         assert.
15084         (emit_case_nodes): Use generate_range_test.
15086 2017-09-04  Uros Bizjak  <ubizjak@gmail.com>
15088         PR target/82098
15089         * config/i386/i386.md (*<btsc><mode>_mask): Add
15090         TARGET_USE_BT to insn constraint.
15091         (*btr<mode>_mask): Ditto.
15093 2017-09-04  Wilco Dijkstra  <wdijkstr@arm.com>
15095         * config/arm/arm.c (arm_legitimate_index_p): Add comment.
15096         (thumb2_legitimate_index_p): Use correct range for DI/DF mode.
15098 2017-09-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
15100         PR target/77308
15101         * config/arm/arm.md (*arm_adddi3, *arm_subdi3): Split early except for
15102         TARGET_NEON and TARGET_IWMMXT.
15103         (anddi3, iordi3, xordi3, one_cmpldi2): Split while expanding except for
15104         TARGET_NEON and TARGET_IWMMXT.
15105         (*one_cmpldi2_insn): Moved the body of one_cmpldi2 here.
15107 2017-09-04  Uros Bizjak  <ubizjak@gmail.com>
15109         * config/i386/i386-protos.h (ix86_tls_address_pattern_p) New prototype.
15110         (ix86_rewrite_tls_address): Ditto.
15111         * config/i386/i386.c (ix86_tls_address_pattern_p) New function.
15112         (ix86_rewrite_tls_address_1): Ditto.
15113         (ix86_rewrite_tls_address): Ditto.
15114         * config/i386/predicates.md (tls_address_pattern): New predicate.
15115         * config/i386/i386.md (TLS address splitter): New splitter.
15117 2017-09-04  Richard Biener  <rguenther@suse.de>
15119         PR tree-optimization/82084
15120         * fold-const.h (can_native_encode_string_p): Declare.
15121         * fold-const.c (can_native_encode_string_p): Factor out from ...
15122         (native_encode_string): ... here.
15123         * tree-vect-stmts.c (vectorizable_store): Call it to avoid
15124         vectorizing stores from constants we later cannot handle.
15126 2017-09-04  Marek Polacek  <polacek@redhat.com>
15128         PR c/81783
15129         * doc/invoke.texi: Update -Wtautological-compare documentation.
15131 2017-09-04  Jeff Law  <law@redhat.com>
15133         PR tree-optimization/64910
15134         * tree-ssa-reassoc.c (reassociate_bb): For bitwise binary ops,
15135         swap the first and last operand if the last is a constant.
15137 2017-09-04  Marek Polacek  <polacek@redhat.com>
15139         PR sanitizer/82072
15140         * convert.c (do_narrow): When sanitizing signed integer overflows,
15141         bail out for signed types.
15142         (convert_to_integer_1) <case NEGATE_EXPR>: Likewise.
15144 2017-09-04  Richard Biener  <rguenther@suse.de>
15146         PR tree-optimization/82060
15147         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
15148         Move devirtualization after stmt folding and before EH/AB/noreturn
15149         cleanup to get the stmt refs canonicalized.  Use a bool instead
15150         of gimple_modified_p since that doesn't work for NOPs.  Schedule
15151         NOPs generated by folding for removal.
15153 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
15154             Alan Hayward  <alan.hayward@arm.com>
15155             David Sherwood  <david.sherwood@arm.com>
15157         * coretypes.h (pad_direction): New enum.
15158         * defaults.h (DEFAULT_FUNCTION_ARG_PADDING): Delete.
15159         (FUNCTION_ARG_PADDING): Likewise.
15160         * target.def (function_arg_padding): New hook.
15161         * targhooks.h (default_function_arg_padding): Declare.
15162         * targhooks.c (default_function_arg_padding): New function.
15163         * doc/tm.texi.in (FUNCTION_ARG_PADDING): Replace with...
15164         (TARGET_FUNCTION_ARG_PADDING): ...this.
15165         * doc/tm.texi: Regenerate.
15166         * calls.c (store_unaligned_arguments_into_pseudos): Use pad_direction
15167         instead of direction.
15168         (compute_argument_addresses): Likewise.
15169         (load_register_parameters): Likewise.
15170         (emit_library_call_value_1): Likewise.
15171         (store_one_arg): Use targetm.calls.function_arg_padding instead
15172         of FUNCTION_ARG_PADDING.
15173         (must_pass_in_stack_var_size_or_pad): Likewise.
15174         * expr.c (emit_group_load_1): Use pad_direction instead of direction.
15175         (emit_group_store): Likewise.
15176         (emit_single_push_insn_1): Use targetm.calls.function_arg_padding
15177         instead of FUNCTION_ARG_PADDING.
15178         (emit_push_insn): Likewise, and propagate enum change throughout
15179         function.
15180         * function.h (direction): Delete.
15181         (locate_and_pad_arg_data::where_pad): Use pad_direction instead
15182         of direction.
15183         * function.c (assign_parm_find_stack_rtl): Likewise.
15184         (assign_parm_setup_block_p): Likewise.
15185         (assign_parm_setup_block): Likewise.
15186         (gimplify_parameters): Likewise.
15187         (locate_and_pad_parm): Use targetm.calls.function_arg_padding
15188         instead of FUNCTION_ARG_PADDING, and propagate enum change throughout
15189         function.
15190         * config/aarch64/aarch64.h (FUNCTION_ARG_PADDING): Delete.
15191         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
15192         * config/aarch64/aarch64-protos.h (aarch64_pad_arg_upward): Delete.
15193         * config/aarch64/aarch64.c (aarch64_pad_arg_upward): Replace with...
15194         (aarch64_function_arg_padding): ...this new function.
15195         (aarch64_gimplify_va_arg_expr): Use pad_direction instead of direction.
15196         (TARGET_FUNCTION_ARG_PADDING): Redefine.
15197         * config/arm/arm.h (FUNCTION_ARG_PADDING): Delete.
15198         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
15199         * config/arm/arm-protos.h (arm_pad_arg_upward): Delete.
15200         * config/arm/arm.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
15201         (arm_pad_arg_upward): Replace with...
15202         (arm_function_arg_padding): ...this new function.
15203         * config/c6x/c6x.h (BLOCK_REG_PADDING): Use pad_direction instead
15204         of direction.
15205         * config/ia64/hpux.h (FUNCTION_ARG_PADDING): Delete.
15206         * config/ia64/ia64-protos.h (ia64_hpux_function_arg_padding): Delete.
15207         * config/ia64/ia64.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
15208         (ia64_hpux_function_arg_padding): Replace with...
15209         (ia64_function_arg_padding): ...this new function.  Use pad_direction
15210         instead of direction.  Check for TARGET_HPUX.
15211         * config/iq2000/iq2000.h (FUNCTION_ARG_PADDING): Delete.
15212         * config/iq2000/iq2000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
15213         (iq2000_function_arg_padding): New function.
15214         * config/mips/mips-protos.h (mips_pad_arg_upward): Delete.
15215         * config/mips/mips.c (mips_pad_arg_upward): Replace with...
15216         (mips_function_arg_padding): ...this new function.
15217         (mips_pad_reg_upward): Update accordingly.
15218         (TARGET_FUNCTION_ARG_PADDING): Redefine.
15219         * config/mips/mips.h (PAD_VARARGS_DOWN): Use
15220         targetm.calls.function_arg_padding.
15221         (FUNCTION_ARG_PADDING): Delete.
15222         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
15223         * config/nios2/nios2.h (FUNCTION_ARG_PADDING): Delete.
15224         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
15225         * config/nios2/nios2-protos.h (nios2_function_arg_padding): Delete.
15226         (nios2_block_reg_padding): Return pad_direction instead of direction.
15227         * config/nios2/nios2.c (nios2_block_reg_padding): Return pad_direction
15228         instead of direction.
15229         (nios2_function_arg_padding): Likewise.  Make static.
15230         (TARGET_FUNCTION_ARG_PADDING): Redefine.
15231         * config/pa/pa.h (FUNCTION_ARG_PADDING): Delete.
15232         (BLOCK_REG_PADDING): Use targetm.calls.function_arg_padding.
15233         * config/pa/pa-protos.h (pa_function_arg_padding): Delete.
15234         * config/pa/pa.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
15235         (pa_function_arg_padding): Make static.  Return pad_direction instead
15236         of direction.
15237         * config/powerpcspe/powerpcspe.h (FUNCTION_ARG_PADDING): Delete.
15238         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
15239         * config/powerpcspe/aix.h (BLOCK_REG_PADDING): Use pad_direction
15240         instead of direction.  Use targetm.calls.function_arg_padding.
15241         * config/powerpcspe/darwin.h (BLOCK_REG_PADDING): Likewise.
15242         * config/powerpcspe/freebsd64.h (BLOCK_REG_PADDING): Likewise.
15243         * config/powerpcspe/linux64.h (BLOCK_REG_PADDING): Likewise.
15244         * config/powerpcspe/powerpcspe-protos.h (function_arg_padding): Delete.
15245         * config/powerpcspe/powerpcspe.c (TARGET_FUNCTION_ARG_PADDING):
15246         Redefine.
15247         (function_arg_padding): Rename to...
15248         (rs6000_function_arg_padding): ...this.  Make static.  Return
15249         pad_direction instead of direction.
15250         (rs6000_return_in_msb): Use rs6000_function_arg_padding.
15251         * config/rs6000/rs6000.h (FUNCTION_ARG_PADDING): Delete.
15252         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
15253         * config/rs6000/aix.h (BLOCK_REG_PADDING): Use pad_direction
15254         instead of direction.  Use targetm.calls.function_arg_padding.
15255         * config/rs6000/darwin.h (BLOCK_REG_PADDING): Likewise.
15256         * config/rs6000/freebsd64.h (BLOCK_REG_PADDING): Likewise.
15257         * config/rs6000/linux64.h (BLOCK_REG_PADDING): Likewise.
15258         * config/rs6000/rs6000-protos.h (function_arg_padding): Delete.
15259         * config/rs6000/rs6000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
15260         (function_arg_padding): Rename to...
15261         (rs6000_function_arg_padding): ...this.  Make static.  Return
15262         pad_direction instead of direction.
15263         (rs6000_return_in_msb): Use rs6000_function_arg_padding.
15264         * config/s390/s390.h (FUNCTION_ARG_PADDING): Delete.
15265         * config/s390/s390.c (s390_function_arg_padding): New function.
15266         (TARGET_FUNCTION_ARG_PADDING): Redefine.
15267         * config/sparc/sparc.h (FUNCTION_ARG_PADDING): Delete.
15268         * config/sparc/sparc-protos.h (function_arg_padding): Delete.
15269         * config/sparc/sparc.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
15270         (function_arg_padding): Rename to...
15271         (sparc_function_arg_padding): ...this.  Make static.  Return
15272         pad_direction instead of direction.
15273         * config/spu/spu.h (FUNCTION_ARG_PADDING): Delete.
15274         * config/spu/spu.c (spu_function_arg_padding): New function.
15275         (TARGET_FUNCTION_ARG_PADDING): Redefine.
15276         * system.h (FUNCTION_ARG_PADDING): Poison.
15278 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
15279             Alan Hayward  <alan.hayward@arm.com>
15280             David Sherwood  <david.sherwood@arm.com>
15282         * target.def (modes_tieable_p): New hook.
15283         * doc/tm.texi (MODES_TIEABLE_P): Replace with...
15284         (TARGET_MODES_TIEABLE_P): ...this.
15285         * doc/tm.texi.in: Regenerate.
15286         * hooks.h (hook_bool_mode_mode_true): Declare.
15287         * hooks.c (hook_bool_mode_mode_true): New function.
15288         * combine.c (subst): Use targetm.modes_tieable_p instead of
15289         MODES_TIEABLE_P.
15290         * dse.c (find_shift_sequence): Likewise.
15291         * expmed.c (extract_low_bits): Likewise.
15292         * lower-subreg.c: Include target.h.
15293         (find_decomposable_subregs): Use targetm.modes_tieable_p instead of
15294         MODES_TIEABLE_P.
15295         * rtlanal.c (rtx_cost): Likewise.
15296         * config/aarch64/aarch64.h (MODES_TIEABLE_P): Delete.
15297         * config/aarch64/aarch64-protos.h (aarch64_modes_tieable_p): Delete.
15298         * config/aarch64/aarch64.c (aarch64_modes_tieable_p): Make static.
15299         (TARGET_MODES_TIEABLE_P): Redefine.
15300         * config/alpha/alpha.h (MODES_TIEABLE_P): Delete.
15301         * config/alpha/alpha.c (alpha_modes_tieable_p): New function.
15302         (TARGET_MODES_TIEABLE_P): Redefine.
15303         * config/arc/arc.h (MODES_TIEABLE_P): Delete.
15304         * config/arc/arc.c (TARGET_MODES_TIEABLE_P): Redefine.
15305         (arc_modes_tieable_p): New function.
15306         * config/arm/arm.h (MODES_TIEABLE_P): Delete.
15307         * config/arm/arm-protos.h (arm_modes_tieable_p): Delete.
15308         * config/arm/arm.c (TARGET_MODES_TIEABLE_P): Redefine.
15309         (arm_modes_tieable_p): Make static.
15310         * config/avr/avr.h (MODES_TIEABLE_P): Delete.
15311         * config/bfin/bfin.h (MODES_TIEABLE_P): Delete.
15312         * config/bfin/bfin.c (bfin_modes_tieable_p): New function.
15313         (TARGET_MODES_TIEABLE_P): Redefine.
15314         * config/c6x/c6x.h (MODES_TIEABLE_P): Delete.
15315         * config/c6x/c6x.c (c6x_modes_tieable_p): New function.
15316         (TARGET_MODES_TIEABLE_P): Redefine.
15317         * config/cr16/cr16.h (MODES_TIEABLE_P): Delete.
15318         * config/cr16/cr16.c (TARGET_MODES_TIEABLE_P): Redefine.
15319         (cr16_modes_tieable_p): New function.
15320         * config/cris/cris.h (MODES_TIEABLE_P): Delete.
15321         * config/epiphany/epiphany.h (MODES_TIEABLE_P): Delete.
15322         * config/fr30/fr30.h (MODES_TIEABLE_P): Delete.
15323         (TRULY_NOOP_TRUNCATION): Update comment.
15324         * config/frv/frv.h (MODES_TIEABLE_P): Delete.
15325         (TRULY_NOOP_TRUNCATION): Update comment.
15326         * config/frv/frv.c (TARGET_MODES_TIEABLE_P): Redefine.
15327         (frv_modes_tieable_p): New function.
15328         * config/ft32/ft32.h (MODES_TIEABLE_P): Delete.
15329         * config/h8300/h8300.h (MODES_TIEABLE_P): Delete.
15330         * config/h8300/h8300.c (h8300_modes_tieable_p): New function.
15331         (TARGET_MODES_TIEABLE_P): Redefine.
15332         * config/i386/i386.h (MODES_TIEABLE_P): Delete.
15333         * config/i386/i386-protos.h (ix86_modes_tieable_p): Delete.
15334         * config/i386/i386.c (ix86_modes_tieable_p): Make static.
15335         (TARGET_MODES_TIEABLE_P): Redefine.
15336         * config/ia64/ia64.h (MODES_TIEABLE_P): Delete.
15337         * config/ia64/ia64.c (TARGET_MODES_TIEABLE_P): Redefine.
15338         (ia64_modes_tieable_p): New function.
15339         * config/iq2000/iq2000.h (MODES_TIEABLE_P): Delete.
15340         * config/iq2000/iq2000.c (TARGET_MODES_TIEABLE_P): Redefine.
15341         (iq2000_modes_tieable_p): New function.
15342         * config/lm32/lm32.h (MODES_TIEABLE_P): Delete.
15343         * config/lm32/lm32.c (TARGET_MODES_TIEABLE_P): Redefine.
15344         (lm32_modes_tieable_p): New function.
15345         * config/m32c/m32c.h (MODES_TIEABLE_P): Delete.
15346         * config/m32c/m32c-protos.h (m32c_modes_tieable_p): Delete.
15347         * config/m32c/m32c.c (m32c_modes_tieable_p): Make static.
15348         (TARGET_MODES_TIEABLE_P): Redefine.
15349         * config/m32r/m32r.h (MODES_TIEABLE_P): Delete.
15350         * config/m32r/m32r.c (TARGET_MODES_TIEABLE_P): Redefine.
15351         (m32r_modes_tieable_p): New function.
15352         * config/m68k/m68k.h (MODES_TIEABLE_P): Delete.
15353         * config/m68k/m68k.c (TARGET_MODES_TIEABLE_P): Redefine.
15354         (m68k_modes_tieable_p): New function.
15355         * config/mcore/mcore.h (MODES_TIEABLE_P): Delete.
15356         * config/mcore/mcore.c (TARGET_MODES_TIEABLE_P): Redefine.
15357         (mcore_modes_tieable_p): New function.
15358         * config/microblaze/microblaze.h (MODES_TIEABLE_P): Delete.
15359         * config/microblaze/microblaze.c (microblaze_modes_tieable_p): New
15360         function.
15361         (TARGET_MODES_TIEABLE_P): Redefine.
15362         * config/mips/mips.h (MODES_TIEABLE_P): Delete.
15363         * config/mips/mips-protos.h (mips_modes_tieable_p): Delete.
15364         * config/mips/mips.c (mips_modes_tieable_p): Make static.
15365         (TARGET_MODES_TIEABLE_P): Redefine.
15366         * config/mmix/mmix.h (MODES_TIEABLE_P): Delete.
15367         * config/mn10300/mn10300.h (MODES_TIEABLE_P): Delete.
15368         * config/mn10300/mn10300-protos.h (mn10300_modes_tieable): Delete.
15369         * config/mn10300/mn10300.c (mn10300_modes_tieable): Rename to...
15370         (mn10300_modes_tieable_p): ...this and make static.
15371         (TARGET_MODES_TIEABLE_P): Redefine.
15372         * config/moxie/moxie.h (MODES_TIEABLE_P): Delete.
15373         * config/msp430/msp430.h (MODES_TIEABLE_P): Delete.
15374         * config/msp430/msp430-protos.h (msp430_modes_tieable_p): Delete.
15375         * config/msp430/msp430.c (TARGET_MODES_TIEABLE_P): Redefine.
15376         (msp430_modes_tieable_p): Make static.
15377         * config/nds32/nds32.h (MODES_TIEABLE_P): Delete.
15378         * config/nds32/nds32.c (nds32_modes_tieable_p): New function.
15379         (TARGET_MODES_TIEABLE_P): Redefine.
15380         * config/nios2/nios2.h (MODES_TIEABLE_P): Delete.
15381         * config/nvptx/nvptx.h (MODES_TIEABLE_P): Delete.
15382         * config/nvptx/nvptx.c (nvptx_modes_tieable_p): New function.
15383         (TARGET_MODES_TIEABLE_P): Redefine.
15384         * config/pa/pa.h (MODES_TIEABLE_P): Delete.
15385         * config/pa/pa-protos.h (pa_modes_tieable_p): Delete.
15386         * config/pa/pa.c (pa_modes_tieable_p): Make static.
15387         (TARGET_MODES_TIEABLE_P): Redefine.
15388         * config/pdp11/pdp11.h (MODES_TIEABLE_P): Delete.
15389         * config/pdp11/pdp11.c (TARGET_MODES_TIEABLE_P): Redefine.
15390         (pdp11_modes_tieable_p): New function.
15391         * config/powerpcspe/powerpcspe.h (MODES_TIEABLE_P): Delete.
15392         * config/powerpcspe/powerpcspe.c (TARGET_MODES_TIEABLE_P): Redefine.
15393         (rs6000_modes_tieable_p): New function.
15394         (rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
15395         * config/powerpcspe/powerpcspe.md: Update comment.
15396         * config/riscv/riscv.h (MODES_TIEABLE_P): Delete.
15397         * config/riscv/riscv.c (riscv_modes_tieable_p): New function.
15398         (TARGET_MODES_TIEABLE_P): Redefine.
15399         * config/rl78/rl78.h (MODES_TIEABLE_P): Delete.
15400         * config/rl78/rl78.c (TARGET_MODES_TIEABLE_P): Redefine.
15401         (rl78_modes_tieable_p): New function.
15402         * config/rs6000/rs6000.h (MODES_TIEABLE_P): Delete.
15403         * config/rs6000/rs6000.c (TARGET_MODES_TIEABLE_P): Redefine.
15404         (rs6000_modes_tieable_p): New function.
15405         (rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
15406         * config/rs6000/rs6000.md: Update comment.
15407         * config/rx/rx.h (MODES_TIEABLE_P): Delete.
15408         * config/rx/rx.c (rx_modes_tieable_p): New function.
15409         (TARGET_MODES_TIEABLE_P): Redefine.
15410         * config/s390/s390.h (MODES_TIEABLE_P): Delete.
15411         * config/s390/s390.c (s390_modes_tieable_p): New function.
15412         (TARGET_MODES_TIEABLE_P): Redefine.
15413         * config/sh/sh.h (MODES_TIEABLE_P): Delete.
15414         * config/sh/sh.c (TARGET_MODES_TIEABLE_P): Redefine.
15415         (sh_modes_tieable_p): New function.
15416         * config/sparc/sparc.h (MODES_TIEABLE_P): Delete.
15417         * config/sparc/sparc-protos.h (sparc_modes_tieable_p): Delete.
15418         * config/sparc/sparc.c (TARGET_MODES_TIEABLE_P): Redefine.
15419         (sparc_modes_tieable_p): Make static.
15420         * config/spu/spu.h (MODES_TIEABLE_P): Delete.
15421         * config/spu/spu.c (spu_modes_tieable_p): New function.
15422         (TARGET_MODES_TIEABLE_P): Redefine.
15423         * config/stormy16/stormy16.h (MODES_TIEABLE_P): Delete.
15424         * config/stormy16/stormy16.c (xstormy16_modes_tieable_p): New function.
15425         (TARGET_MODES_TIEABLE_P): Redefine.
15426         * config/tilegx/tilegx.h (MODES_TIEABLE_P): Delete.
15427         * config/tilepro/tilepro.h (MODES_TIEABLE_P): Delete.
15428         * config/v850/v850.h (MODES_TIEABLE_P): Delete.
15429         * config/v850/v850.c (v850_modes_tieable_p): New function.
15430         (TARGET_MODES_TIEABLE_P): Redefine.
15431         * config/vax/vax.h (MODES_TIEABLE_P): Delete.
15432         * config/visium/visium.h (MODES_TIEABLE_P): Delete.
15433         * config/visium/visium.c (TARGET_MODES_TIEABLE_P): Redefine.
15434         (visium_modes_tieable_p): New function.
15435         * config/xtensa/xtensa.h (MODES_TIEABLE_P): Delete.
15436         * config/xtensa/xtensa.c (TARGET_MODES_TIEABLE_P): Redefine.
15437         (xtensa_modes_tieable_p): New function.
15438         * system.h (MODES_TIEABLE_P): Poison.
15440 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
15441             Alan Hayward  <alan.hayward@arm.com>
15442             David Sherwood  <david.sherwood@arm.com>
15444         * target.def (hard_regno_mode_ok): New hook.
15445         * doc/tm.texi (HARD_REGNO_MODE_OK): Replace with...
15446         (TARGET_HARD_REGNO_MODE_OK): ...this.
15447         * doc/tm.texi.in: Regenerate.
15448         * hooks.h (hook_bool_uint_mode_true): Declare.
15449         * hooks.c (hook_bool_uint_mode_true): New function.
15450         * doc/md.texi: Refer to targetm.hard_regno_mode_ok instead of
15451         HARD_REGNO_MODE_OK.
15452         * genpreds.c (write_insn_preds_c): Add an include of target.h.
15453         * alias.c (init_alias_target): Use targetm.hard_regno_mode_ok
15454         instead of HARD_REGNO_MODE_OK.
15455         * caller-save.c: Include target.h.
15456         (reg_save_code): Use targetm.hard_regno_mode_ok instead of
15457         HARD_REGNO_MODE_OK.
15458         * combine.c (can_combine_p): Likewise.
15459         (combinable_i3pat): Likewise.
15460         (can_change_dest_mode): Likewise.
15461         * expr.c (init_expr_target): Likewise.
15462         (convert_move): Likewise.
15463         (convert_modes): Likewise.
15464         * ira.c (setup_prohibited_class_mode_regs): Likewise.
15465         (setup_prohibited_mode_move_regs): Likewise.
15466         * ira.h (target_ira): Likewise.
15467         * lra-assigns.c (find_hard_regno_for_1): Likewise.
15468         * lra-constraints.c (process_alt_operands): Likewise.
15469         (split_reg): Likewise.
15470         * recog.c (peep2_find_free_register): Likewise.
15471         * ree.c (combine_reaching_defs): Likewise.
15472         * regcprop.c (maybe_mode_change): Likewise.
15473         * reginfo.c (init_reg_sets_1): Likewise.
15474         (choose_hard_reg_mode): Likewise.
15475         (simplifiable_subregs): Likewise.
15476         * regrename.c (check_new_reg_p): Likewise.
15477         * reload.c (find_valid_class): Likewise.
15478         (find_valid_class_1): Likewise.
15479         (reload_inner_reg_of_subreg): Likewise.
15480         (push_reload): Likewise.
15481         (combine_reloads): Likewise.
15482         (find_dummy_reload): Likewise.
15483         (find_reloads): Likewise.
15484         * reload1.c (find_reg): Likewise.
15485         (set_reload_reg): Likewise.
15486         (allocate_reload_reg): Likewise.
15487         (choose_reload_regs): Likewise.
15488         (reload_adjust_reg_for_temp): Likewise.
15489         * rtlanal.c (subreg_size_offset_from_lsb): Likewise.
15490         (simplify_subreg_regno): Likewise.
15491         * sel-sched.c (init_regs_for_mode): Likewise.
15492         * varasm.c (make_decl_rtl): Likewise.
15493         * config/aarch64/aarch64.h (HARD_REGNO_MODE_OK): Delete.
15494         (MODES_TIEABLE_P): Use targetm.hard_regno_mode_ok instead of
15495         HARD_REGNO_MODE_OK.
15496         * config/aarch64/aarch64-protos.h (aarch64_hard_regno_mode_ok): Delete.
15497         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Make static.
15498         (TARGET_HARD_REGNO_MODE_OK): Redefine.
15499         * config/alpha/alpha.h (HARD_REGNO_MODE_OK): Delete.
15500         * config/alpha/alpha.c (alpha_hard_regno_mode_ok): New function.
15501         (TARGET_HARD_REGNO_MODE_OK): Redefine.
15502         * config/arc/arc.h (arc_hard_regno_mode_ok): Delete.
15503         (arc_mode_class): Delete.
15504         (HARD_REGNO_MODE_OK): Delete.
15505         * config/arc/arc.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
15506         (arc_hard_regno_mode_ok): Rename old array to...
15507         (arc_hard_regno_mode_ok_modes): ...this.
15508         (arc_conditional_register_usage): Update accordingly.
15509         (arc_mode_class): Make static.
15510         (arc_hard_regno_mode_ok): New function.
15511         * config/arm/arm.h (HARD_REGNO_MODE_OK): Delete.
15512         * config/arm/arm-protos.h (arm_hard_regno_mode_ok): Delete.
15513         * config/arm/arm.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
15514         (arm_hard_regno_mode_ok): Make static.
15515         * config/arm/arm.md (movdi): Use targetm.hard_regno_mode_ok instead of
15516         HARD_REGNO_MODE_OK.
15517         * config/avr/avr-protos.h (avr_hard_regno_mode_ok): Delete.
15518         * config/avr/avr.h (HARD_REGNO_MODE_OK): Delete.
15519         * config/avr/avr.c (avr_hard_regno_mode_ok): Make static and
15520         return a bool.
15521         (TARGET_HARD_REGNO_MODE_OK): Redefine.
15522         * config/bfin/bfin-protos.h (hard_regno_mode_ok): Delete.
15523         * config/bfin/bfin.h (HARD_REGNO_MODE_OK): Delete.
15524         * config/bfin/bfin.c (hard_regno_mode_ok): Rename to...
15525         (bfin_hard_regno_mode_ok): ...this.  Make static and return a bool.
15526         (TARGET_HARD_REGNO_MODE_OK): Redefine.
15527         * config/bfin/predicates.md (valid_reg_operand): Use
15528         targetm.hard_regno_mode_ok instead of HARD_REGNO_MODE_OK.
15529         * config/c6x/c6x.h (HARD_REGNO_MODE_OK): Delete.
15530         * config/c6x/c6x.c (c6x_hard_regno_mode_ok): New function.
15531         (TARGET_HARD_REGNO_MODE_OK): Redefine.
15532         * config/cr16/cr16.h (HARD_REGNO_MODE_OK): Delete.
15533         * config/cr16/cr16-protos.h (cr16_hard_regno_mode_ok): Delete.
15534         * config/cr16/cr16.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
15535         (cr16_hard_regno_mode_ok): Make static and return a bool.
15536         * config/cris/cris.h (HARD_REGNO_MODE_OK): Delete.
15537         * config/cris/cris.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
15538         (cris_hard_regno_mode_ok): New function.
15539         * config/epiphany/epiphany.h (epiphany_hard_regno_mode_ok): Delete.
15540         (epiphany_mode_class): Delete.
15541         (HARD_REGNO_MODE_OK): Delete.
15542         * config/epiphany/epiphany-protos.h (hard_regno_mode_ok): Delete.
15543         * config/epiphany/epiphany.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
15544         (hard_regno_mode_ok): Rename to...
15545         (epiphany_hard_regno_mode_ok): ...this.  Make static and return a bool.
15546         * config/fr30/fr30.h (HARD_REGNO_MODE_OK): Delete.
15547         * config/fr30/fr30.md: Refer to targetm.hard_regno_mode_ok instead of
15548         HARD_REGNO_MODE_OK.
15549         * config/frv/frv.h (HARD_REGNO_MODE_OK): Delete.
15550         * config/frv/frv-protos.h (frv_hard_regno_mode_ok): Delete.
15551         * config/frv/frv.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
15552         (frv_hard_regno_mode_ok): Make static and return a bool.
15553         * config/frv/frv.md: Refer to targetm.hard_regno_mode_ok instead of
15554         HARD_REGNO_MODE_OK.
15555         * config/ft32/ft32.h (HARD_REGNO_MODE_OK): Delete.
15556         * config/h8300/h8300.h (HARD_REGNO_MODE_OK): Delete.
15557         * config/h8300/h8300-protos.h (h8300_hard_regno_mode_ok): Delete.
15558         * config/h8300/h8300.c (h8300_hard_regno_mode_ok): Make static
15559         and return a bool.
15560         (TARGET_HARD_REGNO_MODE_OK): Redefine.
15561         * config/i386/i386.h (HARD_REGNO_MODE_OK): Delete.
15562         * config/i386/i386-protos.h (ix86_hard_regno_mode_ok): Delete.
15563         * config/i386/i386.c (ix86_hard_regno_mode_ok): Make static and
15564         return a bool.
15565         (TARGET_HARD_REGNO_MODE_OK): Redefine.
15566         * config/ia64/ia64.h (HARD_REGNO_MODE_OK): Delete.
15567         * config/ia64/ia64.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
15568         (ia64_hard_regno_mode_ok): New function.
15569         * config/iq2000/iq2000.h (HARD_REGNO_MODE_OK): Delete.
15570         * config/iq2000/iq2000.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
15571         (iq2000_hard_regno_mode_ok): New function.
15572         * config/lm32/lm32.h (HARD_REGNO_MODE_OK): Delete.
15573         * config/lm32/lm32.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
15574         (lm32_hard_regno_mode_ok): New function.
15575         * config/m32c/m32c.h (HARD_REGNO_MODE_OK): Delete.
15576         * config/m32c/m32c-protos.h (m32c_hard_regno_ok): Delete.
15577         * config/m32c/m32c.c (class_can_hold_mode): Use m32c_hard_regno_mode_ok
15578         instead of HARD_REGNO_MODE_OK.
15579         (m32c_hard_regno_ok): Rename to...
15580         (m32c_hard_regno_mode_ok): ...this.  Make static and return a bool.
15581         (m32c_cannot_change_mode_class): Update accordingly.
15582         (TARGET_HARD_REGNO_MODE_OK): Redefine.
15583         * config/m32r/m32r.h (m32r_hard_regno_mode_ok): Delete.
15584         (m32r_mode_class): Delete.
15585         (HARD_REGNO_MODE_OK): Delete.
15586         * config/m32r/m32r.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
15587         (m32r_hard_regno_mode_ok): Rename to...
15588         (m32r_hard_regno_modes): ...this.
15589         (m32r_mode_class): Make static.
15590         (m32r_hard_regno_mode_ok): New function.
15591         * config/m68k/m68k.h (HARD_REGNO_MODE_OK): Delete.
15592         * config/m68k/m68k-protos.h (m68k_regno_mode_ok): Delete.
15593         * config/m68k/m68k.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
15594         (m68k_hard_regno_mode_ok): Make static.
15595         * config/mcore/mcore.h (HARD_REGNO_MODE_OK): Delete.
15596         * config/mcore/mcore.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
15597         (mcore_hard_regno_mode_ok): New function.
15598         * config/microblaze/microblaze.h (microblaze_hard_regno_mode_ok)
15599         (HARD_REGNO_MODE_OK): Delete.
15600         * config/microblaze/microblaze.c (microblaze_hard_regno_mode_ok):
15601         Rename to...
15602         (microblaze_hard_regno_mode_ok_p): ...this and make static.
15603         (microblaze_hard_regno_mode_ok): New function.
15604         (TARGET_HARD_REGNO_MODE_OK): Redefine.
15605         * config/mips/mips.h (HARD_REGNO_MODE_OK): Delete.
15606         (mips_hard_regno_mode_ok): Delete.
15607         * config/mips/mips.c (mips_hard_regno_mode_ok): Rename to...
15608         (mips_hard_regno_mode_ok_p): ...this and make static.
15609         (mips_hard_regno_mode_ok_p): Rename to...
15610         (mips_hard_regno_mode_ok_uncached): ...this.
15611         (mips_hard_regno_mode_ok): New function.
15612         (mips_class_max_nregs): Use mips_hard_regno_mode_ok instead
15613         of HARD_REGNO_MODE_OK.
15614         (mips_option_override): Update after above name changes.
15615         (TARGET_HARD_REGNO_MODE_OK): Redefine.
15616         * config/mmix/mmix.h (HARD_REGNO_MODE_OK): Delete.
15617         * config/mn10300/mn10300.h (HARD_REGNO_MODE_OK): Delete.
15618         * config/mn10300/mn10300-protos.h (mn10300_hard_regno_mode_ok): Delete.
15619         * config/mn10300/mn10300.c (mn10300_hard_regno_mode_ok): Make static.
15620         (TARGET_HARD_REGNO_MODE_OK): Redefine.
15621         * config/moxie/moxie.h (HARD_REGNO_MODE_OK): Delete.
15622         * config/msp430/msp430.h (HARD_REGNO_MODE_OK): Delete.
15623         * config/msp430/msp430-protos.h (msp430_hard_regno_mode_ok): Delete.
15624         * config/msp430/msp430.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
15625         (msp430_hard_regno_mode_ok): Make static and return a bool.
15626         * config/nds32/nds32.h (HARD_REGNO_MODE_OK): Delete.
15627         * config/nds32/nds32-protos.h (nds32_hard_regno_mode_ok): Delete.
15628         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Make static
15629         and return a bool.
15630         (TARGET_HARD_REGNO_MODE_OK): Redefine.
15631         * config/nios2/nios2.h (HARD_REGNO_MODE_OK): Delete.
15632         * config/nvptx/nvptx.h (HARD_REGNO_MODE_OK): Delete.
15633         * config/pa/pa.h (MODES_TIEABLE_P): Update commentary.
15634         * config/pa/pa32-regs.h (HARD_REGNO_MODE_OK): Rename to...
15635         (PA_HARD_REGNO_MODE_OK): ...this
15636         * config/pa/pa64-regs.h (HARD_REGNO_MODE_OK): Rename to...
15637         (PA_HARD_REGNO_MODE_OK): ...this.
15638         * config/pa/pa.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
15639         (pa_hard_regno_mode_ok): New function.
15640         * config/pdp11/pdp11.h (HARD_REGNO_MODE_OK): Delete.
15641         * config/pdp11/pdp11.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
15642         (pdp11_hard_regno_mode_ok): New function.
15643         * config/powerpcspe/powerpcspe.h (HARD_REGNO_MODE_OK): Delete.
15644         * config/powerpcspe/powerpcspe-protos.h (rs6000_hard_regno_mode_ok_p):
15645         Delete.
15646         * config/powerpcspe/powerpcspe.c (rs6000_hard_regno_mode_ok_p):
15647         Make static.
15648         (TARGET_HARD_REGNO_MODE_OK): Redefine.
15649         (rs6000_hard_regno_mode_ok): Rename to...
15650         (rs6000_hard_regno_mode_ok_uncached): ...this.
15651         (rs6000_init_hard_regno_mode_ok): Update accordingly.
15652         (rs6000_hard_regno_mode_ok): New function.
15653         * config/riscv/riscv.h (HARD_REGNO_MODE_OK): Delete.
15654         * config/riscv/riscv-protos.h (riscv_hard_regno_mode_ok_p): Delete.
15655         * config/riscv/riscv.c (riscv_hard_regno_mode_ok_p): Rename to...
15656         (riscv_hard_regno_mode_ok): ...this and make static.
15657         (TARGET_HARD_REGNO_MODE_OK): Redefine.
15658         * config/rl78/rl78.h (HARD_REGNO_MODE_OK): Delete.
15659         * config/rl78/rl78-protos.h (rl78_hard_regno_mode_ok): Delete.
15660         * config/rl78/rl78.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
15661         (rl78_hard_regno_mode_ok): Make static and return bool.
15662         * config/rs6000/rs6000.h (HARD_REGNO_MODE_OK): Delete.
15663         * config/rs6000/rs6000-protos.h (rs6000_hard_regno_mode_ok_p):
15664         Delete.
15665         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok_p): Make static.
15666         (TARGET_HARD_REGNO_MODE_OK): Redefine.
15667         (rs6000_hard_regno_mode_ok): Rename to...
15668         (rs6000_hard_regno_mode_ok_uncached): ...this.
15669         (rs6000_init_hard_regno_mode_ok): Update accordingly.
15670         (rs6000_hard_regno_mode_ok): New function.
15671         * config/rx/rx.h (HARD_REGNO_MODE_OK): Delete.
15672         * config/rx/rx.c (rx_hard_regno_mode_ok): New function.
15673         (TARGET_HARD_REGNO_MODE_OK): Redefine.
15674         * config/s390/s390.h (HARD_REGNO_MODE_OK): Delete.
15675         * config/s390/s390-protos.h (s390_hard_regno_mode_ok): Delete.
15676         * config/s390/s390.c (s390_hard_regno_mode_ok): Make static.
15677         (TARGET_HARD_REGNO_MODE_OK): Redefine.
15678         * config/sh/sh.h (HARD_REGNO_MODE_OK): Delete.
15679         * config/sh/sh-protos.h (sh_hard_regno_mode_ok): Delete.
15680         * config/sh/sh.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
15681         (sh_hard_regno_mode_ok): Make static.
15682         * config/sparc/constraints.md: Refer to targetm.hard_regno_mode_ok
15683         instead of HARD_REGNO_MODE_OK.
15684         * config/sparc/sparc.h (hard_regno_mode_classes): Delete.
15685         (sparc_mode_class): Delete.
15686         (HARD_REGNO_MODE_OK): Delete.
15687         * config/sparc/sparc.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
15688         (hard_regno_mode_classes): Make static.
15689         (sparc_mode_class): Likewise.
15690         (sparc_hard_regno_mode_ok): New function.
15691         * config/spu/spu.h (HARD_REGNO_MODE_OK): Delete.
15692         * config/stormy16/stormy16.h (HARD_REGNO_MODE_OK): Delete.
15693         * config/stormy16/stormy16.c (xstormy16_hard_regno_mode_ok): New
15694         function.
15695         (TARGET_HARD_REGNO_MODE_OK): Redefine.
15696         * config/tilegx/tilegx.h (HARD_REGNO_MODE_OK): Delete.
15697         * config/tilepro/tilepro.h (HARD_REGNO_MODE_OK): Delete.
15698         * config/v850/v850.h (HARD_REGNO_MODE_OK): Delete.
15699         * config/v850/v850.c (v850_hard_regno_mode_ok): New function.
15700         (TARGET_HARD_REGNO_MODE_OK): Redefine.
15701         * config/vax/vax.h (HARD_REGNO_MODE_OK): Delete.
15702         * config/visium/visium.h (HARD_REGNO_MODE_OK): Delete.
15703         * config/visium/visium.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
15704         (visium_hard_regno_mode_ok): New function.
15705         * config/visium/visium.md: Refer to targetm.hard_regno_mode_ok
15706         instead of HARD_REGNO_MODE_OK.
15707         * config/xtensa/xtensa.h (xtensa_hard_regno_mode_ok): Delete.
15708         (HARD_REGNO_MODE_OK): Delete.
15709         * config/xtensa/xtensa.c (xtensa_hard_regno_mode_ok): Rename to...
15710         (xtensa_hard_regno_mode_ok_p): ...this and make static.
15711         (xtensa_option_override): Update accordingly.
15712         (TARGET_HARD_REGNO_MODE_OK): Redefine.
15713         (xtensa_hard_regno_mode_ok): New function.
15714         * system.h (HARD_REGNO_MODE_OK): Poison.
15716 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
15717             Alan Hayward  <alan.hayward@arm.com>
15718             David Sherwood  <david.sherwood@arm.com>
15720         * target.def (hard_regno_call_part_clobbered): New hook.
15721         * doc/tm.texi.in (HARD_REGNO_CALL_PART_CLOBBERED): Replace with...
15722         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): ...this hook.
15723         * doc/tm.texi: Regenerate.
15724         * hooks.h (hook_bool_uint_mode_false): Declare.
15725         * hooks.c (hook_bool_uint_mode_false): New function.
15726         * regs.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
15727         * cselib.c (cselib_process_insn): Use
15728         targetm.hard_regno_call_part_clobbered instead of
15729         HARD_REGNO_CALL_PART_CLOBBERED.
15730         * ira-conflicts.c (ira_build_conflicts): Likewise.
15731         * ira-costs.c (ira_tune_allocno_costs): Likewise.
15732         * lra-constraints.c (need_for_call_save_p): Likewise.
15733         * lra-lives.c: Include target.h.
15734         (check_pseudos_live_through_calls): Use
15735         targetm.hard_regno_call_part_clobbered instead of
15736         HARD_REGNO_CALL_PART_CLOBBERED.
15737         * regcprop.c: Include target.h.
15738         (copyprop_hardreg_forward_1): Use
15739         targetm.hard_regno_call_part_clobbered instead of
15740         HARD_REGNO_CALL_PART_CLOBBERED.
15741         * reginfo.c (choose_hard_reg_mode): Likewise.
15742         * regrename.c (check_new_reg_p): Likewise.
15743         * reload.c (find_equiv_reg): Likewise.
15744         * reload1.c (emit_reload_insns): Likewise.
15745         * sched-deps.c (deps_analyze_insn): Likewise.
15746         * sel-sched.c (init_regs_for_mode): Likewise.
15747         (mark_unavailable_hard_regs): Likewise.
15748         * targhooks.c (default_dwarf_frame_reg_mode): Likewise.
15749         * config/aarch64/aarch64.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
15750         * config/aarch64/aarch64.c (aarch64_hard_regno_call_part_clobbered):
15751         New function.
15752         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
15753         * config/avr/avr.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
15754         * config/avr/avr-protos.h (avr_hard_regno_call_part_clobbered):
15755         Delete.
15756         * config/avr/avr.c (avr_hard_regno_call_part_clobbered): Make static
15757         and return a bool.
15758         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
15759         * config/i386/i386.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
15760         * config/i386/i386.c (ix86_hard_regno_call_part_clobbered): New
15761         function.
15762         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
15763         * config/mips/mips.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
15764         * config/mips/mips.c (mips_hard_regno_call_part_clobbered): New
15765         function.
15766         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
15767         * config/powerpcspe/powerpcspe.h (HARD_REGNO_CALL_PART_CLOBBERED):
15768         Delete.
15769         * config/powerpcspe/powerpcspe.c
15770         (rs6000_hard_regno_call_part_clobbered): New function.
15771         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
15772         * config/rs6000/rs6000.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
15773         * config/rs6000/rs6000.c (rs6000_hard_regno_call_part_clobbered):
15774         New function.
15775         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
15776         * config/s390/s390.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
15777         * config/s390/s390.c (s390_hard_regno_call_part_clobbered): New
15778         function.
15779         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
15780         * config/sh/sh.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
15781         * system.h (HARD_REGNO_CALL_PART_CLOBBERED): Poison.
15783 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
15784             Alan Hayward  <alan.hayward@arm.com>
15785             David Sherwood  <david.sherwood@arm.com>
15787         * rtl.h (subreg_memory_offset): Declare.
15788         * emit-rtl.c (subreg_memory_offset): New function.
15789         * expmed.c (store_bit_field_1): Use it.
15790         * expr.c (undefined_operand_subword_p): Likewise.
15791         * simplify-rtx.c (simplify_subreg): Likewise.
15793 2017-09-04  Alexander Monakov  <amonakov@ispras.ru>
15795         PR rtl-optimization/57448
15796         PR target/67458
15797         PR target/81316
15798         * optabs.c (expand_atomic_load): Place compiler memory barriers if
15799         using atomic_load pattern.
15800         (expand_atomic_store): Likewise.
15802 2017-09-04  Jakub Jelinek  <jakub@redhat.com>
15804         PR sanitizer/81981
15805         * gimple-fold.c (gimple_fold_call): Optimize away useless UBSAN_PTR
15806         and UBSAN_BOUNDS internal calls.  Clean up IFN_UBSAN_OBJECT_SIZE
15807         handling.  Use replace_call_with_value with NULL instead of
15808         gsi_replace, unlink_stmt_vdef and release_defs.
15810         * gdbhooks.py (OptMachineModePrinter.to_string): Use 8 spaces
15811         instead of tab.
15813         * lra-remat.c (reg_overlap_for_remat_p): Fix a pasto.
15815 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
15817         PR bootstrap/82045
15818         * rtl.h (emit_library_call_value_1): Declare.
15819         (emit_library_call): Replace declaration with a series of overloads.
15820         Remove the parameter count argument.
15821         (emit_library_call_value): Likewise.
15822         * calls.c (emit_library_call_value_1): Make global.  Replace varargs
15823         with an "rtx_mode_t *".
15824         (emit_library_call_value): Delete.
15825         (emit_library_call): Likewise.
15826         * asan.c (asan_emit_stack_protection): Update calls accordingly.
15827         (asan_emit_allocas_unpoison): Likewise.
15828         * builtins.c (expand_builtin_powi): Likewise.
15829         (expand_asan_emit_allocas_unpoison): Likewise.
15830         * cfgexpand.c (expand_main_function): Likewise.
15831         * config/aarch64/aarch64.c (aarch64_trampoline_init): Likewise.
15832         * config/aarch64/aarch64.h (PROFILE_HOOK): Likewise.
15833         * config/alpha/alpha.c (alpha_trampoline_init): Likewise.
15834         * config/arm/arm.c (arm_trampoline_init): Likewise.
15835         (arm_call_tls_get_addr): Likewise.
15836         (arm_expand_divmod_libfunc): Likewise.
15837         * config/bfin/bfin.md (umulsi3_highpart): Likewise.
15838         (smulsi3_highpart): Likewise.
15839         * config/c6x/c6x.c (c6x_initialize_trampoline): Likewise.
15840         (c6x_expand_compare): Likewise.
15841         (c6x_expand_movmem): Likewise.
15842         * config/frv/frv.c (frv_trampoline_init): Likewise.
15843         * config/i386/i386.c (ix86_trampoline_init): Likewise.
15844         (ix86_expand_divmod_libfunc): Likewise.
15845         * config/ia64/ia64.c (ia64_expand_tls_address): Likewise.
15846         (ia64_expand_compare): Likewise.
15847         (ia64_profile_hook): Likewise.
15848         * config/ia64/ia64.md (save_stack_nonlocal): Likewise.
15849         (nonlocal_goto): Likewise.
15850         (restore_stack_nonlocal): Likewise.
15851         * config/m32r/m32r.c (block_move_call): Likewise.
15852         (m32r_trampoline_init): Likewise.
15853         * config/m68k/linux.h (FINALIZE_TRAMPOLINE): Likewise.
15854         * config/m68k/m68k.c (m68k_call_tls_get_addr): Likewise.
15855         (m68k_call_m68k_read_tp): Likewise.
15856         * config/microblaze/microblaze.c (microblaze_call_tls_get_addr)
15857         (microblaze_expand_divide): Likewise.
15858         * config/mips/mips.h (mips_args): Likewise.
15859         * config/mips/sdemtk.h (mips_sync_icache): Likewise.
15860         (MIPS_ICACHE_SYNC): Likewise.
15861         * config/nios2/nios2.c (nios2_emit_expensive_div): Likewise.
15862         (nios2_trampoline_init): Likewise.
15863         * config/pa/pa.c (hppa_tls_call): Likewise.
15864         (pa_trampoline_init): Likewise.
15865         * config/pa/pa.md (canonicalize_funcptr_for_compare): Likewise.
15866         * config/powerpcspe/powerpcspe.c (rs6000_legitimize_tls_address)
15867         (expand_strn_compare): Likewise.
15868         (rs6000_generate_compare): Likewise.
15869         (rs6000_expand_float128_convert): Likewise.
15870         (output_profile_hook): Likewise.
15871         (rs6000_trampoline_init): Likewise.
15872         * config/powerpcspe/powerpcspe.md (neg<mode>2): Likewise.
15873         * config/riscv/riscv.h (PROFILE_HOOK): Likewise.
15874         * config/rs6000/rs6000-string.c (expand_strn_compare): Likewise.
15875         * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise.
15876         (rs6000_generate_compare): Likewise.
15877         (rs6000_expand_float128_convert): Likewise.
15878         (output_profile_hook): Likewise.
15879         (rs6000_trampoline_init): Likewise.
15880         * config/rs6000/rs6000.md (neg<mode>2): Likewise.
15881         * config/sh/sh.c (sh_trampoline_init): Likewise.
15882         * config/sparc/sparc.c (emit_soft_tfmode_libcall): Likewise.
15883         (sparc_emit_float_lib_cmp): Likewise.
15884         (sparc32_initialize_trampoline): Likewise.
15885         (sparc64_initialize_trampoline): Likewise.
15886         (sparc_profile_hook): Likewise.
15887         * config/spu/spu.c (ea_load_store): Likewise.
15888         * config/spu/spu.md (floatunssidf2): Likewise.
15889         * config/tilegx/tilegx.c (tilegx_trampoline_init): Likewise.
15890         * config/tilepro/tilepro.c (tilepro_trampoline_init): Likewise.
15891         * config/visium/visium.c (expand_block_move_4): Likewise.
15892         (expand_block_move_2): Likewise.
15893         (expand_block_move_1): Likewise.
15894         (expand_block_set_4): Likewise.
15895         (expand_block_set_2): Likewise.
15896         (expand_block_set_1): Likewise.
15897         (visium_trampoline_init): Likewise.
15898         (visium_profile_hook): Likewise.
15899         * config/xtensa/xtensa.c (xtensa_expand_nonlocal_goto): Likewise.
15900         (xtensa_setup_frame_addresses): Likewise.
15901         (xtensa_trampoline_init): Likewise.
15902         * except.c (sjlj_emit_function_enter): Likewise.
15903         (sjlj_emit_function_exit): Likewise.
15904         * explow.c (allocate_dynamic_stack_space): Likewise.
15905         (probe_stack_range): Likewise.
15906         * expr.c (convert_mode_scalar): Likewise.
15907         * optabs.c (expand_binop): Likewise.
15908         (expand_twoval_binop_libfunc): Likewise.
15909         (expand_unop): Likewise.
15910         (prepare_cmp_insn): Likewise.
15911         (prepare_float_lib_cmp): Likewise.
15912         (expand_float): Likewise.
15913         (expand_fix): Likewise.
15914         (expand_fixed_convert): Likewise.
15915         (maybe_emit_sync_lock_test_and_set): Likewise.
15916         (expand_atomic_compare_and_swap): Likewise.
15917         (expand_mem_thread_fence): Likewise.
15918         (expand_atomic_fetch_op): Likewise.
15920 2017-09-03  Gerald Pfeifer  <gerald@pfeifer.com>
15922         * doc/generic.texi (OpenACC): Adjust URL.
15923         * doc/invoke.texi (C Dialect Options): Ditto.
15925 2017-09-03  Uros Bizjak  <ubizjak@gmail.com>
15927         * config/i386/i386.md (*bt<mode>): Use nonimmediate_operand
15928         predicate for operand 1.  Add (m,<S>) constraint.
15929         (*jcc_bt<mode>): Use nonimmediate_operand predicate for operand 1.
15930         Prevent memory operand 1 with register operand 2.
15932 2017-09-01  Segher Boessenkool  <segher@kernel.crashing.org>
15934         PR rtl-optimization/82024
15935         * combine.c (try_combine): If the combination result is a PARALLEL,
15936         and we only need to retain the SET in there that would be placed
15937         at I2, check that we can place that at I3 instead, before doing so.
15939 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
15941         PR target/81766
15942         * config/i386/i386.c (ix86_init_large_pic_reg): Return label
15943         instead of void.
15944         (ix86_init_pic_reg): Remember label from ix86_init_large_pic_reg,
15945         if non-NULL and preceded by NOTE_INSN_BASIC_BLOCK, swap the note
15946         and label.
15948 2017-09-01  Joerg Sonnenberger  <joerg@bec.de>
15949             Jeff Law  <law@redhat.com>
15951         * varasm.c (bss_initializer_p): Do not put constants into .bss
15952         (categorize_decl_for_section): Handle bss_initializer_p returning
15953         false when DECL_INITIAL is NULL.
15955 2017-09-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15957         PR target/82012
15958         * config/s390/s390.c (s390_can_inline_p): New function.
15960 2017-09-01  Jeff Law  <law@redhat.com>
15962         PR tree-optimization/82052
15963         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
15964         Always initialize the returned slot after a hash table miss
15965         when INSERT is true.
15967 2017-09-01  Alexander Monakov  <amonakov@ispras.ru>
15969         * config/s390/s390.md (mem_signal_fence): Remove.
15970         * doc/md.texi (mem_signal_fence): Remove.
15971         * optabs.c (expand_mem_signal_fence): Remove uses of mem_signal_fence.
15972         Update comments.
15973         * target-insns.def (mem_signal_fence): Remove.
15975 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
15977         PR sanitizer/81902
15978         * doc/invoke.texi: Document -fsanitize=pointer-overflow.
15980         PR sanitizer/81923
15981         * asan.c (create_odr_indicator): Strip name encoding from assembler
15982         name before appending it after __odr_asan_.
15984 2017-09-01  Martin Liska  <mliska@suse.cz>
15986         PR tree-optimization/82059
15987         * gimple-ssa-isolate-paths.c (isolate_path): Add profile and
15988         frequency only when an edge is redirected.
15990 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
15992         * config/arc/arc-c.c (__ARC_LPC_WIDTH__): Add builtin define.
15993         * config/arc/arc.c (ARC_MAX_LOOP_LENGTH): Define.
15994         (arc_conditional_register_usage): Remove ARC600 lp_count
15995         exception.
15996         (arc_file_start): Emit Tag_ARC_CPU_variation.
15997         (arc_can_use_doloop_p): New conditions to use ZOLs.
15998         (hwloop_fail): New function.
15999         (hwloop_optimize): Likewise.
16000         (hwloop_pattern_reg): Likewise.
16001         (arc_doloop_hooks): New struct, to be used with reorg_loops.
16002         (arc_reorg_loops): New function, calls reorg_loops.
16003         (arc_reorg): Call arc_reorg_loops.  Remove old ZOL handling.
16004         (arc600_corereg_hazard): Remove ZOL checking, case handled by
16005         hwloop_optimize.
16006         (arc_loop_hazard): Remove function, functionality moved into
16007         hwloop_optimize.
16008         (arc_hazard): Remove arc_loop_hazard call.
16009         (arc_adjust_insn_length): Remove ZOL handling, functionality moved
16010         into hwloop_optimize.
16011         (arc_label_align): Remove ZOL handling.
16012         * config/arc/arc.h (LOOP_ALIGN): Changed to 0.
16013         * config/arc/arc.md (doloop_begin): Remove pattern.
16014         (doloop_begin_i): Likewise.
16015         (doloop_end_i): Likewise.
16016         (doloop_fallback): Likewise.
16017         (doloop_fallback_m): Likewise.
16018         (doloop_end): Reimplement expand.
16019         (arc_lp): New pattern for LP instruction.
16020         (loop_end): New pattern.
16021         (loop_fail): Likewise.
16022         (decrement_and_branch_until_zero): Likewise.
16023         * config/arc/arc.opt (mlpc-width): New option.
16024         * doc/invoke.texi (mlpc-width): Document option.
16026 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
16028         * config/arc/arc.c (arc_ifcvt): Remove use of merge_blocks call.
16029         (arc_ccfsm_advance): Fix checking for delay slots.
16030         (arc_reorg): Add rtl dump after each call to arc_ifcvt.
16032 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
16034         * config/arc/arc.md (movqi_insn): Add stores to save constant long
16035         immediates.
16036         (movhi_insn): Update store instruction constraint which are saving
16037         6-bit short immediates.
16038         (movsi_insn): Consider also short scaled load operations.
16039         (zero_extendhisi2_i): Use Usd constraint instead of T.
16040         (extendhisi2_i): Add q constraint.
16041         (arc_clzsi2): Add type and length attributes.
16042         (arc_ctzsi2): Likewise.
16043         * config/arc/constraints.md (Usc): Update constraint, the
16044         assembler can parse two relocations for a single instruction.
16046 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
16048         * config/arc/arc.c (arc_use_anchors_for_symbol_p): New function.
16049         (TARGET_USE_ANCHORS_FOR_SYMBOL_P): Define.
16051 2017-08-31  Olivier Hainque  <hainque@adacore.com>
16053         * config.gcc (powerpc-wrs-vxworks|vxworksae|vxworksmils): Now
16054         match as powerpc-wrs-vxworks*.
16056 2017-08-31  James Greenhalgh  <james.greenhalgh@arm.com>
16058         * config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): Fix
16059         register constraint for by-element operand.
16060         (aarch64_mls_elt_merge<mode>): Likewise.
16062 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
16064         * config/arc/arc.c (arc_can_follow_jump): Check for short
16065         branches.
16067 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
16069         * config.gcc: Use g.opt for arc.
16070         * config/arc/arc.c (LEGITIMATE_SCALED_ADDRESS_P): Deleted,
16071         functionality moved to ...
16072         (legitimate_scaled_address_p): New function, ...here.
16073         (LEGITIMATE_SMALL_DATA_OFFSET_P): New define.
16074         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Use the above define.
16075         (legitimate_offset_address_p): Delete TARGET_NO_SDATA_SET
16076         condition.
16077         (arc_override_options): Handle G option.
16078         (arc_output_pic_addr_const): Correct function definition.
16079         (arc_legitimate_address_p): Use legitimate_scaled_address_p.
16080         (arc_decl_anon_ns_mem_p): Delete.
16081         (arc_in_small_data_p): Overhaul this function to take into
16082         consideration the value given via G option.
16083         (arc_rewrite_small_data_1): Renamed and corrected old
16084         arc_rewrite_small_data function.
16085         (arc_rewrite_small_data): New function.
16086         (small_data_pattern): Don't use pic_offset_table_rtx.
16087         * config/arc/arc.h (CC1_SPEC): Recognize G option.
16088         * config/arc/simdext.md (movmisalignv2hi): Use
16089         prepare_move_operands function.
16090         (mov*): Likewise.
16091         (movmisalign*): Likewise.
16092         * doc/invoke.texi (ARC options): Document -G option.
16094 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
16096         * config/arc/arc-protos.h (compact_sda_memory_operand): Update
16097         prototype.
16098         * config/arc/arc.c (arc_print_operand): Output scalled address for
16099         sdata whenever is possible.
16100         (arc_in_small_data_p): Allow sdata for 64bit datum when double
16101         load/stores are available.
16102         (compact_sda_memory_operand): Check for the alignment required by
16103         code density instructions.
16104         * config/arc/arc.md (movsi_insn): Use newly introduced Us0
16105         constraint.
16106         * config/arc/constraints.md (Usd): Update constraint.
16107         (Us0): New constraint.
16108         (Usc): Update constraint.
16110 2017-08-31  Richard Biener  <rguenther@suse.de>
16112         PR middle-end/82054
16113         * dwarf2out.c (dwarf2out_early_global_decl): Process each
16114         function only once.
16116 2017-08-31  Tamar Christina  <tamar.christina@arm.com>
16118         * config/aarch64/aarch64-builtins.c (aarch64_init_simd_builtins):
16119         Resize type_signature.
16121 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
16122             Alan Hayward  <alan.hayward@arm.com>
16123             David Sherwood  <david.sherwood@arm.com>
16125         * config/aarch64/aarch64.c (aarch64_base_register_rtx_p): Only allow
16126         subregs whose inner modes can be stored in GPRs.
16127         (aarch64_classify_index): Likewise.
16129 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
16130             Alan Hayward  <alan.hayward@arm.com>
16131             David Sherwood  <david.sherwood@arm.com>
16133         * config/aarch64/iterators.md (V_cmp_result): Rename to...
16134         (V_INT_EQUIV): ...this.
16135         (v_cmp_result): Rename to...
16136         (v_int_equiv): ...this.
16137         * config/aarch64/aarch64.md (xorsign<mode>3): Update accordingly.
16138         * config/aarch64/aarch64-simd.md (xorsign<mode>3): Likewise.
16139         (copysign<mode>3): Likewise.
16140         (aarch64_simd_bsl<mode>_internal): Likewise.
16141         (aarch64_simd_bsl<mode>): Likewise.
16142         (vec_cmp<mode><mode>): Likewise.
16143         (vcond<mode><mode>): Likewise.
16144         (vcond<v_cmp_mixed><mode>): Likewise.
16145         (vcondu<mode><v_cmp_mixed>): Likewise.
16146         (aarch64_cm<optab><mode>): Likewise.
16147         (aarch64_cmtst<mode>): Likewise.
16148         (aarch64_fac<optab><mode>): Likewise.
16149         (vec_perm_const<mode>): Likewise.
16150         (vcond_mask_<mode><v_cmp_result>): Rename to...
16151         (vcond_mask_<mode><v_int_equiv>): ...this.
16152         (vec_cmp<mode><v_cmp_result>): Rename to...
16153         (vec_cmp<mode><v_int_equiv>): ...this.
16155 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
16156             Alan Hayward  <alan.hayward@arm.com>
16157             David Sherwood  <david.sherwood@arm.com>
16159         * config/aarch64/aarch64-modes.def: Remove 32-, 48- and 64-byte
16160         vector modes.
16161         * config/aarch64/iterators.md (VRL2, VRL3, VRL4): Delete.
16162         * config/aarch64/aarch64.md (UNSPEC_LD2_DREG, UNSPEC_LD3_DREG)
16163         (UNSPEC_LD4_DREG): New unspecs.
16164         * config/aarch64/aarch64-simd.md (aarch64_ld2<mode>_dreg_le)
16165         (aarch64_ld2<mode>_dreg_be): Replace with...
16166         (aarch64_ld2<mode>_dreg): ...this pattern and use the new DREG
16167         unspec.
16168         (aarch64_ld3<mode>_dreg_le)
16169         (aarch64_ld3<mode>_dreg_be): Replace with...
16170         (aarch64_ld3<mode>_dreg): ...this pattern and use the new DREG
16171         unspec.
16172         (aarch64_ld4<mode>_dreg_le)
16173         (aarch64_ld4<mode>_dreg_be): Replace with...
16174         (aarch64_ld4<mode>_dreg): ...this pattern and use the new DREG
16175         unspec.
16177 2017-08-30  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16179         PR tree-optimization/81987
16180         * gimple-ssa-strength-reduction.c (insert_initializers): Don't
16181         insert an initializer in a location not dominated by the stride
16182         definition.
16184 2017-08-30  Eric Botcazou  <ebotcazou@adacore.com>
16186         * tree-eh.c (lower_try_finally_switch): Set the location of the finally
16187         on the entire header of the finally block in the fallthru case.
16189 2017-08-30  Eric Botcazou  <ebotcazou@adacore.com>
16191         * varasm.c (decode_addr_const): Deal with INDIRECT_REF <INTEGER_CST>.
16193 2017-08-30  Pat Haugen  <pthaugen@us.ibm.com>
16195         * config/rs6000/rs6000.c (rs6000_emit_prologue_move_from_cr): Rename from
16196         rs6000_emit_move_from_cr and call renamed function.
16197         (rs6000_emit_prologue): Call renamed functions.
16198         * config/rs6000/rs6000.md (prologue_movesi_from_cr): Rename from
16199         movesi_from_cr, remove volatile CRs.
16201 2017-08-30  Jon Beniston  <jon@beniston.com>
16202             Richard Biener  <rguenther@suse.de>
16204         * tree-vect-patterns.c (vect_pattern_recog_1): Use VECTOR_TYPE_P instead
16205         of VECTOR_MODE_P check.
16206         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Allow single
16207         element vector types.
16209 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16211         * df.h (df_read_modify_subreg_p): Remove in favor of...
16212         * rtl.h (read_modify_subreg_p): ...this new function.  Take a
16213         const_rtx instead of an rtx.
16214         * cprop.c (local_cprop_find_used_regs): Update accordingly.
16215         * df-problems.c (df_word_lr_mark_ref): Likewise.
16216         * ira-lives.c (mark_pseudo_reg_live): Likewise.
16217         (mark_pseudo_reg_dead): Likewise.
16218         (mark_ref_dead): Likewise.
16219         * reginfo.c (init_subregs_of_mode): Likewise.
16220         * sched-deps.c (sched_analyze_1): Likewise.
16221         * df-scan.c (df_def_record_1): Likewise.
16222         (df_uses_record): Likewise.
16223         (df_read_modify_subreg_p): Remove in favor of...
16224         * rtlanal.c (read_modify_subreg_p): ...this new function.  Take a
16225         const_rtx instead of an rtx.
16227 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16228             Alan Hayward  <alan.hayward@arm.com>
16229             David Sherwood  <david.sherwood@arm.com>
16231         * rtl.h (partial_subreg_p): New function.
16232         * caller-save.c (save_call_clobbered_regs): Use it.
16233         * calls.c (expand_call): Likewise.
16234         * combine.c (combinable_i3pat): Likewise.
16235         (simplify_set): Likewise.
16236         (make_extraction): Likewise.
16237         (make_compound_operation_int): Likewise.
16238         (gen_lowpart_or_truncate): Likewise.
16239         (force_to_mode): Likewise.
16240         (make_field_assignment): Likewise.
16241         (reg_truncated_to_mode): Likewise.
16242         (record_truncated_value): Likewise.
16243         (move_deaths): Likewise.
16244         * cse.c (record_jump_cond): Likewise.
16245         (cse_insn): Likewise.
16246         * cselib.c (cselib_lookup_1): Likewise.
16247         * expmed.c (extract_bit_field_using_extv): Likewise.
16248         * function.c (assign_parm_setup_reg): Likewise.
16249         * ifcvt.c (noce_convert_multiple_sets): Likewise.
16250         * ira-build.c (create_insn_allocnos): Likewise.
16251         * lra-coalesce.c (merge_pseudos): Likewise.
16252         * lra-constraints.c (match_reload): Likewise.
16253         (simplify_operand_subreg): Likewise.
16254         (curr_insn_transform): Likewise.
16255         * lra-lives.c (process_bb_lives): Likewise.
16256         * lra.c (new_insn_reg): Likewise.
16257         (lra_substitute_pseudo): Likewise.
16258         * regcprop.c (mode_change_ok): Likewise.
16259         (maybe_mode_change): Likewise.
16260         (copyprop_hardreg_forward_1): Likewise.
16261         * reload.c (push_reload): Likewise.
16262         (find_reloads): Likewise.
16263         (find_reloads_subreg_address): Likewise.
16264         * reload1.c (alter_reg): Likewise.
16265         (eliminate_regs_1): Likewise.
16266         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
16268 2017-08-30  David Edelsohn  <dje.gcc@gmail.com>
16270         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Revert
16271         back to if statements, including unpack.
16273 2017-08-30  Martin Liska  <mliska@suse.cz>
16275         PR inline-asm/82001
16276         * ipa-icf-gimple.c (func_checker::compare_tree_list_operand):
16277         Rename to ...
16278         (func_checker::compare_asm_inputs_outputs): ... this function.
16279         (func_checker::compare_gimple_asm): Use the function to compare
16280         also ASM constrains.
16281         * ipa-icf-gimple.h: Rename the function.
16283 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16284             Alan Hayward  <alan.hayward@arm.com>
16285             David Sherwood  <david.sherwood@arm.com>
16287         * coretypes.h (complex_mode): New type.
16288         * gdbhooks.py (build_pretty_printer): Handle it.
16289         * machmode.h (complex_mode): New class.
16290         (complex_mode::includes_p): New function.
16291         (is_complex_int_mode): Likewise.
16292         (is_complex_float_mode): Likewise.
16293         * genmodes.c (get_mode_class): Handle complex mode classes.
16294         * function.c (expand_function_end): Use is_complex_int_mode.
16296 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16297             Alan Hayward  <alan.hayward@arm.com>
16298             David Sherwood  <david.sherwood@arm.com>
16300         * coretypes.h (scalar_mode_pod): New typedef.
16301         * gdbhooks.py (build_pretty_printer): Handle it.
16302         * machmode.h (gt_ggc_mx, gt_pch_nx): New functions.
16303         * fixed-value.h (fixed_value::mode): Change type to scalar_mode_pod.
16304         * fold-const.c (fold_convert_const_int_from_fixed): Use scalar_mode.
16305         * tree-streamer-in.c (unpack_ts_fixed_cst_value_fields): Use
16306         as_a <scalar_mode>.
16308 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16309             Alan Hayward  <alan.hayward@arm.com>
16310             David Sherwood  <david.sherwood@arm.com>
16312         * machmode.h (mode_for_vector): Take a scalar_mode instead
16313         of a machine_mode.
16314         * stor-layout.c (mode_for_vector): Likewise.
16315         * explow.c (promote_mode): Use as_a <scalar_mode>.
16316         * sdbout.c (sdbout_parms): Use is_a <scalar_mode>.
16318 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16319             Alan Hayward  <alan.hayward@arm.com>
16320             David Sherwood  <david.sherwood@arm.com>
16322         * target.def (preferred_simd_mode): Take a scalar_mode
16323         instead of a machine_mode.
16324         * targhooks.h (default_preferred_simd_mode): Likewise.
16325         * targhooks.c (default_preferred_simd_mode): Likewise.
16326         * config/arc/arc.c (arc_preferred_simd_mode): Likewise.
16327         * config/arm/arm.c (arm_preferred_simd_mode): Likewise.
16328         * config/c6x/c6x.c (c6x_preferred_simd_mode): Likewise.
16329         * config/epiphany/epiphany.c (epiphany_preferred_simd_mode): Likewise.
16330         * config/i386/i386.c (ix86_preferred_simd_mode): Likewise.
16331         * config/mips/mips.c (mips_preferred_simd_mode): Likewise.
16332         * config/nvptx/nvptx.c (nvptx_preferred_simd_mode): Likewise.
16333         * config/powerpcspe/powerpcspe.c (rs6000_preferred_simd_mode):
16334         Likewise.
16335         * config/rs6000/rs6000.c (rs6000_preferred_simd_mode): Likewise.
16336         * config/s390/s390.c (s390_preferred_simd_mode): Likewise.
16337         * config/sparc/sparc.c (sparc_preferred_simd_mode): Likewise.
16338         * config/aarch64/aarch64.c (aarch64_preferred_simd_mode): Likewise.
16339         (aarch64_simd_scalar_immediate_valid_for_move): Update accordingly.
16340         * doc/tm.texi: Regenerate.
16341         * optabs-query.c (can_vec_mask_load_store_p): Return false for
16342         non-scalar modes.
16344 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16345             Alan Hayward  <alan.hayward@arm.com>
16346             David Sherwood  <david.sherwood@arm.com>
16348         * target.def (scalar_mode_supported_p): Take a scalar_mode
16349         instead of a machine_mode.
16350         * targhooks.h (default_scalar_mode_supported_p): Likewise.
16351         * targhooks.c (default_scalar_mode_supported_p): Likewise.
16352         * config/aarch64/aarch64.c (aarch64_scalar_mode_supported_p): Likewise.
16353         * config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
16354         * config/arm/arm.c (arm_scalar_mode_supported_p): Likewise.
16355         * config/avr/avr.c (avr_scalar_mode_supported_p): Likewise.
16356         * config/c6x/c6x.c (c6x_scalar_mode_supported_p): Likewise.
16357         * config/i386/i386.c (ix86_scalar_mode_supported_p): Likewise.
16358         * config/ia64/ia64.c (ia64_scalar_mode_supported_p): Likewise.
16359         * config/mips/mips.c (mips_scalar_mode_supported_p): Likewise.
16360         * config/msp430/msp430.c (msp430_scalar_mode_supported_p): Likewise.
16361         * config/pa/pa.c (pa_scalar_mode_supported_p): Likewise.
16362         * config/pdp11/pdp11.c (pdp11_scalar_mode_supported_p): Likewise.
16363         * config/powerpcspe/powerpcspe.c (rs6000_scalar_mode_supported_p):
16364         Likewise.
16365         * config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p): Likewise.
16366         * config/s390/s390.c (s390_scalar_mode_supported_p): Likewise.
16367         * config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
16368         * config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
16369         * config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p):
16370         Likewise.
16371         * doc/tm.texi: Regenerate.
16373 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16374             Alan Hayward  <alan.hayward@arm.com>
16375             David Sherwood  <david.sherwood@arm.com>
16377         * coretypes.h (opt_scalar_mode): New typedef.
16378         * gdbhooks.py (build_pretty_printers): Handle it.
16379         * machmode.h (mode_iterator::get_2xwider): Add overload for
16380         opt_mode<T>.
16381         * emit-rtl.c (init_emit_once): Use opt_scalar_mode when iterating
16382         over scalar modes.
16383         * expr.c (convert_mode_scalar): Likewise.
16384         * omp-low.c (omp_clause_aligned_alignment): Likewise.
16385         * optabs.c (expand_float): Likewise.
16386         (expand_fix): Likewise.
16387         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
16389 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16390             Alan Hayward  <alan.hayward@arm.com>
16391             David Sherwood  <david.sherwood@arm.com>
16393         * optabs.c (expand_float): Explicitly check for scalars before
16394         using a branching expansion.
16395         (expand_fix): Likewise.
16397 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16398             Alan Hayward  <alan.hayward@arm.com>
16399             David Sherwood  <david.sherwood@arm.com>
16401         * expr.c (convert_mode): Split scalar handling out into...
16402         (convert_mode_scalar): ...this new function.  Treat the modes
16403         as scalar_modes.
16405 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16406             Alan Hayward  <alan.hayward@arm.com>
16407             David Sherwood  <david.sherwood@arm.com>
16409         * omp-expand.c (expand_omp_atomic): Use is_int_mode, is_float_mode
16410         and scalar_mode.
16411         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Likewise.
16413 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16414             Alan Hayward  <alan.hayward@arm.com>
16415             David Sherwood  <david.sherwood@arm.com>
16417         * fixed-value.h (fixed_from_double_int): Take a scalar_mode
16418         rather than a machine_mode.
16419         (fixed_from_string): Likewise.
16420         (fixed_convert): Likewise.
16421         (fixed_convert_from_int): Likewise.
16422         (fixed_convert_from_real): Likewise.
16423         (real_convert_from_fixed): Likewise.
16424         * fixed-value.c (fixed_from_double_int): Likewise.
16425         (fixed_from_string): Likewise.
16426         (fixed_convert): Likewise.
16427         (fixed_convert_from_int): Likewise.
16428         (fixed_convert_from_real): Likewise.
16429         (real_convert_from_fixed): Likewise.
16430         * config/avr/avr.c (avr_out_round): Use as_a <scalar_mode>.
16432 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16433             Alan Hayward  <alan.hayward@arm.com>
16434             David Sherwood  <david.sherwood@arm.com>
16436         * emit-rtl.c (immed_double_const): Use is_a <scalar_mode> instead
16437         of separate mode class checks.  Do not allow vector modes here.
16438         (immed_wide_int_const): Use as_a <scalar_mode>.
16439         * explow.c (trunc_int_for_mode): Likewise.
16440         * rtl.h (wi::int_traits<rtx_mode_t>::get_precision): Likewise.
16441         (wi::shwi): Likewise.
16442         (wi::min_value): Likewise.
16443         (wi::max_value): Likewise.
16444         * dwarf2out.c (loc_descriptor): Likewise.
16445         * simplify-rtx.c (simplify_immed_subreg): Fix rtx_mode_t argument
16446         for CONST_WIDE_INT.
16448 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16449             Alan Hayward  <alan.hayward@arm.com>
16450             David Sherwood  <david.sherwood@arm.com>
16452         * tree.h (SCALAR_TYPE_MODE): New macro.
16453         * expr.c (expand_expr_addr_expr_1): Use it.
16454         (expand_expr_real_2): Likewise.
16455         * fold-const.c (fold_convert_const_fixed_from_fixed): Likeise.
16456         (fold_convert_const_fixed_from_int): Likewise.
16457         (fold_convert_const_fixed_from_real): Likewise.
16458         (native_encode_fixed): Likewise
16459         (native_encode_complex): Likewise
16460         (native_encode_vector): Likewise.
16461         (native_interpret_fixed): Likewise.
16462         (native_interpret_real): Likewise.
16463         (native_interpret_complex): Likewise.
16464         (native_interpret_vector): Likewise.
16465         * omp-simd-clone.c (simd_clone_adjust_return_type): Likewise.
16466         (simd_clone_adjust_argument_types): Likewise.
16467         (simd_clone_init_simd_arrays): Likewise.
16468         (simd_clone_adjust): Likewise.
16469         * stor-layout.c (layout_type): Likewise.
16470         * tree.c (build_minus_one_cst): Likewise.
16471         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
16472         * tree-inline.c (estimate_move_cost): Likewise.
16473         * tree-ssa-math-opts.c (convert_plusminus_to_widen): Likewise.
16474         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise.
16475         (vectorizable_reduction): Likewise.
16476         * tree-vect-patterns.c (vect_recog_widen_mult_pattern): Likewise.
16477         (vect_recog_mixed_size_cond_pattern): Likewise.
16478         (check_bool_pattern): Likewise.
16479         (adjust_bool_pattern): Likewise.
16480         (search_type_for_mask_1): Likewise.
16481         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
16482         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
16483         (vectorizable_load): Likewise.
16484         (vectorizable_store): Likewise.
16485         * ubsan.c (ubsan_encode_value): Likewise.
16486         * varasm.c (output_constant): Likewise.
16488 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16489             Alan Hayward  <alan.hayward@arm.com>
16490             David Sherwood  <david.sherwood@arm.com>
16492         * coretypes.h (scalar_mode): New class.
16493         * machmode.h (scalar_mode): Likewise.
16494         (scalar_mode::includes_p): New function.
16495         (mode_to_inner): Return a scalar_mode rather than a machine_mode.
16496         * gdbhooks.py (build_pretty_printers): Handle scalar_mode.
16497         * genmodes.c (get_mode_class): Handle remaining scalar modes.
16498         * cfgexpand.c (expand_debug_expr): Use scalar_mode.
16499         * expmed.c (store_bit_field_1): Likewise.
16500         (extract_bit_field_1): Likewise.
16501         * expr.c (write_complex_part): Likewise.
16502         (read_complex_part): Likewise.
16503         (emit_move_complex_push): Likewise.
16504         (expand_expr_real_2): Likewise.
16505         * function.c (assign_parm_setup_reg): Likewise.
16506         (assign_parms_unsplit_complex): Likewise.
16507         * optabs.c (expand_binop): Likewise.
16508         * rtlanal.c (subreg_get_info): Likewise.
16509         * simplify-rtx.c (simplify_immed_subreg): Likewise.
16510         * varasm.c (output_constant_pool_2): Likewise.
16512 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16513             Alan Hayward  <alan.hayward@arm.com>
16514             David Sherwood  <david.sherwood@arm.com>
16516         * expmed.c (extract_high_half): Use scalar_int_mode and remove
16517         assertion.
16518         (expmed_mult_highpart_optab): Likewise.
16519         (expmed_mult_highpart): Likewise.
16521 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16522             Alan Hayward  <alan.hayward@arm.com>
16523             David Sherwood  <david.sherwood@arm.com>
16525         * builtins.h (builtin_strncpy_read_str): Take a scalar_int_mode
16526         instead of a machine_mode.
16527         (builtin_memset_read_str): Likewise.
16528         * builtins.c (c_readstr): Likewise.
16529         (builtin_memcpy_read_str): Likewise.
16530         (builtin_strncpy_read_str): Likewise.
16531         (builtin_memset_read_str): Likewise.
16532         (builtin_memset_gen_str): Likewise.
16533         (expand_builtin_signbit): Use scalar_int_mode for local variables.
16534         * cfgexpand.c (convert_debug_memory_address): Take a scalar_int_mode
16535         instead of a machine_mode.
16536         * combine.c (simplify_if_then_else): Use scalar_int_mode for local
16537         variables.
16538         (make_extraction): Likewise.
16539         (try_widen_shift_mode): Take and return scalar_int_modes instead
16540         of machine_modes.
16541         * config/aarch64/aarch64.c (aarch64_libgcc_cmp_return_mode): Return
16542         a scalar_int_mode instead of a machine_mode.
16543         * config/avr/avr.c (avr_addr_space_address_mode): Likewise.
16544         (avr_addr_space_pointer_mode): Likewise.
16545         * config/cr16/cr16.c (cr16_unwind_word_mode): Likewise.
16546         * config/msp430/msp430.c (msp430_addr_space_pointer_mode): Likewise.
16547         (msp430_unwind_word_mode): Likewise.
16548         * config/spu/spu.c (spu_unwind_word_mode): Likewise.
16549         (spu_addr_space_pointer_mode): Likewise.
16550         (spu_addr_space_address_mode): Likewise.
16551         (spu_libgcc_cmp_return_mode): Likewise.
16552         (spu_libgcc_shift_count_mode): Likewise.
16553         * config/rl78/rl78.c (rl78_addr_space_address_mode): Likewise.
16554         (rl78_addr_space_pointer_mode): Likewise.
16555         (fl78_unwind_word_mode): Likewise.
16556         (rl78_valid_pointer_mode): Take a scalar_int_mode instead of a
16557         machine_mode.
16558         * config/alpha/alpha.c (vms_valid_pointer_mode): Likewise.
16559         * config/ia64/ia64.c (ia64_vms_valid_pointer_mode): Likewise.
16560         * config/mips/mips.c (mips_mode_rep_extended): Likewise.
16561         (mips_valid_pointer_mode): Likewise.
16562         * config/tilegx/tilegx.c (tilegx_mode_rep_extended): Likewise.
16563         * config/ft32/ft32.c (ft32_valid_pointer_mode): Likewise.
16564         (ft32_addr_space_pointer_mode): Return a scalar_int_mode instead
16565         of a machine_mode.
16566         (ft32_addr_space_address_mode): Likewise.
16567         * config/m32c/m32c.c (m32c_valid_pointer_mode): Take a
16568         scalar_int_mode instead of a machine_mode.
16569         (m32c_addr_space_pointer_mode): Return a scalar_int_mode instead
16570         of a machine_mode.
16571         (m32c_addr_space_address_mode): Likewise.
16572         * config/powerpcspe/powerpcspe.c (rs6000_abi_word_mode): Likewise.
16573         (rs6000_eh_return_filter_mode): Likewise.
16574         * config/rs6000/rs6000.c (rs6000_abi_word_mode): Likewise.
16575         (rs6000_eh_return_filter_mode): Likewise.
16576         * config/s390/s390.c (s390_libgcc_cmp_return_mode): Likewise.
16577         (s390_libgcc_shift_count_mode): Likewise.
16578         (s390_unwind_word_mode): Likewise.
16579         (s390_valid_pointer_mode): Take a scalar_int_mode rather than a
16580         machine_mode.
16581         * target.def (mode_rep_extended): Likewise.
16582         (valid_pointer_mode): Likewise.
16583         (addr_space.valid_pointer_mode): Likewise.
16584         (eh_return_filter_mode): Return a scalar_int_mode rather than
16585         a machine_mode.
16586         (libgcc_cmp_return_mode): Likewise.
16587         (libgcc_shift_count_mode): Likewise.
16588         (unwind_word_mode): Likewise.
16589         (addr_space.pointer_mode): Likewise.
16590         (addr_space.address_mode): Likewise.
16591         * doc/tm.texi: Regenerate.
16592         * dojump.c (prefer_and_bit_test): Take a scalar_int_mode rather than
16593         a machine_mode.
16594         (do_jump): Use scalar_int_mode for local variables.
16595         * dwarf2cfi.c (init_return_column_size): Take a scalar_int_mode
16596         rather than a machine_mode.
16597         * dwarf2out.c (convert_descriptor_to_mode): Likewise.
16598         (scompare_loc_descriptor_wide): Likewise.
16599         (scompare_loc_descriptor_narrow): Likewise.
16600         * emit-rtl.c (adjust_address_1): Use scalar_int_mode for local
16601         variables.
16602         * except.c (sjlj_emit_dispatch_table): Likewise.
16603         (expand_builtin_eh_copy_values): Likewise.
16604         * explow.c (convert_memory_address_addr_space_1): Likewise.
16605         Take a scalar_int_mode rather than a machine_mode.
16606         (convert_memory_address_addr_space): Take a scalar_int_mode rather
16607         than a machine_mode.
16608         (memory_address_addr_space): Use scalar_int_mode for local variables.
16609         * expmed.h (expand_mult_highpart_adjust): Take a scalar_int_mode
16610         rather than a machine_mode.
16611         * expmed.c (mask_rtx): Likewise.
16612         (init_expmed_one_conv): Likewise.
16613         (expand_mult_highpart_adjust): Likewise.
16614         (extract_high_half): Likewise.
16615         (expmed_mult_highpart_optab): Likewise.
16616         (expmed_mult_highpart): Likewise.
16617         (expand_smod_pow2): Likewise.
16618         (expand_sdiv_pow2): Likewise.
16619         (emit_store_flag_int): Likewise.
16620         (adjust_bit_field_mem_for_reg): Use scalar_int_mode for local
16621         variables.
16622         (extract_low_bits): Likewise.
16623         * expr.h (by_pieces_constfn): Take a scalar_int_mode rather than
16624         a machine_mode.
16625         * expr.c (pieces_addr::adjust):  Likewise.
16626         (can_store_by_pieces): Likewise.
16627         (store_by_pieces): Likewise.
16628         (clear_by_pieces_1): Likewise.
16629         (expand_expr_addr_expr_1): Likewise.
16630         (expand_expr_addr_expr): Use scalar_int_mode for local variables.
16631         (expand_expr_real_1): Likewise.
16632         (try_casesi): Likewise.
16633         * final.c (shorten_branches): Likewise.
16634         * fold-const.c (fold_convert_const_int_from_fixed): Change the
16635         type of "mode" to machine_mode.
16636         * internal-fn.c (expand_arith_overflow_result_store): Take a
16637         scalar_int_mode rather than a machine_mode.
16638         (expand_mul_overflow): Use scalar_int_mode for local variables.
16639         * loop-doloop.c (doloop_modify): Likewise.
16640         (doloop_optimize): Likewise.
16641         * optabs.c (expand_subword_shift): Take a scalar_int_mode rather
16642         than a machine_mode.
16643         (expand_doubleword_shift_condmove): Likewise.
16644         (expand_doubleword_shift): Likewise.
16645         (expand_doubleword_clz): Likewise.
16646         (expand_doubleword_popcount): Likewise.
16647         (expand_doubleword_parity): Likewise.
16648         (expand_absneg_bit): Use scalar_int_mode for local variables.
16649         (prepare_float_lib_cmp): Likewise.
16650         * rtl.h (convert_memory_address_addr_space_1): Take a scalar_int_mode
16651         rather than a machine_mode.
16652         (convert_memory_address_addr_space): Likewise.
16653         (get_mode_bounds): Likewise.
16654         (get_address_mode): Return a scalar_int_mode rather than a
16655         machine_mode.
16656         * rtlanal.c (get_address_mode): Likewise.
16657         * stor-layout.c (get_mode_bounds): Take a scalar_int_mode rather
16658         than a machine_mode.
16659         * targhooks.c (default_mode_rep_extended): Likewise.
16660         (default_valid_pointer_mode): Likewise.
16661         (default_addr_space_valid_pointer_mode): Likewise.
16662         (default_eh_return_filter_mode): Return a scalar_int_mode rather
16663         than a machine_mode.
16664         (default_libgcc_cmp_return_mode): Likewise.
16665         (default_libgcc_shift_count_mode): Likewise.
16666         (default_unwind_word_mode): Likewise.
16667         (default_addr_space_pointer_mode): Likewise.
16668         (default_addr_space_address_mode): Likewise.
16669         * targhooks.h (default_eh_return_filter_mode): Likewise.
16670         (default_libgcc_cmp_return_mode): Likewise.
16671         (default_libgcc_shift_count_mode): Likewise.
16672         (default_unwind_word_mode): Likewise.
16673         (default_addr_space_pointer_mode): Likewise.
16674         (default_addr_space_address_mode): Likewise.
16675         (default_mode_rep_extended): Take a scalar_int_mode rather than
16676         a machine_mode.
16677         (default_valid_pointer_mode): Likewise.
16678         (default_addr_space_valid_pointer_mode): Likewise.
16679         * tree-ssa-address.c (addr_for_mem_ref): Use scalar_int_mode for
16680         local variables.
16681         * tree-ssa-loop-ivopts.c (get_shiftadd_cost): Take a scalar_int_mode
16682         rather than a machine_mode.
16683         * tree-switch-conversion.c (array_value_type): Use scalar_int_mode
16684         for local variables.
16685         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
16686         * var-tracking.c (use_narrower_mode): Take a scalar_int_mode rather
16687         than a machine_mode.
16689 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16690             Alan Hayward  <alan.hayward@arm.com>
16691             David Sherwood  <david.sherwood@arm.com>
16693         * dojump.c (do_jump_by_parts_greater_rtx): Change the type of
16694         the mode argument to scalar_int_mode.
16695         (do_jump_by_parts_zero_rtx): Likewise.
16696         (do_jump_by_parts_equality_rtx): Likewise.
16697         (do_jump_by_parts_greater): Take a mode argument.
16698         (do_jump_by_parts_equality): Likewise.
16699         (do_jump_1): Update calls accordingly.
16701 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16702             Alan Hayward  <alan.hayward@arm.com>
16703             David Sherwood  <david.sherwood@arm.com>
16705         * is-a.h (safe_dyn_cast): New function.
16706         * rtl.h (rtx_jump_table_data::get_data_mode): New function.
16707         (jump_table_for_label): Likewise.
16708         * final.c (final_addr_vec_align): Take an rtx_jump_table_data *
16709         instead of an rtx_insn *.
16710         (shorten_branches): Use dyn_cast instead of LABEL_P and
16711         JUMP_TABLE_DATA_P.  Use jump_table_for_label and
16712         rtx_jump_table_data::get_data_mode.
16713         (final_scan_insn): Likewise.
16715 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16716             Alan Hayward  <alan.hayward@arm.com>
16717             David Sherwood  <david.sherwood@arm.com>
16719         * combine.c (try_combine): Use is_a <scalar_int_mode> when
16720         trying to combine a full-register integer set with a subreg
16721         integer set.
16723 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16724             Alan Hayward  <alan.hayward@arm.com>
16725             David Sherwood  <david.sherwood@arm.com>
16727         * expr.c (expand_expr_addr_expr): Add a new_tmode local variable
16728         that is always either address_mode or pointer_mode.
16730 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16731             Alan Hayward  <alan.hayward@arm.com>
16732             David Sherwood  <david.sherwood@arm.com>
16734         * expr.c (expand_expr_real_2): Use word_mode instead of innermode
16735         when the two are known to be equal.
16737 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16738             Alan Hayward  <alan.hayward@arm.com>
16739             David Sherwood  <david.sherwood@arm.com>
16741         * simplify-rtx.c (simplify_const_unary_operation): Use
16742         is_a <scalar_int_mode> instead of checking for a nonzero
16743         precision.  Forcibly convert op_mode to a scalar_int_mode
16744         in that case.  More clearly differentiate the operand and
16745         result modes and use the former when deciding what the value
16746         of a count-bits operation should be.  Use is_int_mode instead
16747         of checking for a MODE_INT.  Remove redundant check for whether
16748         this mode has a zero precision.
16750 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16751             Alan Hayward  <alan.hayward@arm.com>
16752             David Sherwood  <david.sherwood@arm.com>
16754         * optabs.c (widen_leading): Change the type of the mode argument
16755         to scalar_int_mode.  Use opt_scalar_int_mode for the mode iterator.
16756         (widen_bswap): Likewise.
16757         (expand_parity): Likewise.
16758         (expand_ctz): Change the type of the mode argument to scalar_int_mode.
16759         (expand_ffs): Likewise.
16760         (epand_unop): Check for scalar integer modes before calling the
16761         above routines.
16763 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16764             Alan Hayward  <alan.hayward@arm.com>
16765             David Sherwood  <david.sherwood@arm.com>
16767         * expr.c (const_scalar_mask_from_tree): Add a mode argument.
16768         Expand commentary.
16769         (expand_expr_real_1): Update call accordingly.
16771 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16772             Alan Hayward  <alan.hayward@arm.com>
16773             David Sherwood  <david.sherwood@arm.com>
16775         * expmed.c (store_bit_field_using_insv): Add op0_mode and
16776         value_mode arguments.  Use scalar_int_mode internally.
16777         (store_bit_field_1): Rename the new integer mode from imode
16778         to op0_mode and use it instead of GET_MODE (op0).  Update calls
16779         to store_split_bit_field, store_bit_field_using_insv and
16780         store_fixed_bit_field.
16781         (store_fixed_bit_field): Add op0_mode and value_mode arguments.
16782         Use scalar_int_mode internally.  Use a bit count rather than a mode
16783         when calculating the largest bit size for get_best_mode.
16784         Update calls to store_split_bit_field and store_fixed_bit_field_1.
16785         (store_fixed_bit_field_1): Add mode and value_mode arguments.
16786         Remove assertion that OP0 has a scalar integer mode.
16787         (store_split_bit_field): Add op0_mode and value_mode arguments.
16788         Update calls to extract_fixed_bit_field.
16789         (extract_bit_field_using_extv): Add an op0_mode argument.
16790         Use scalar_int_mode internally.
16791         (extract_bit_field_1): Rename the new integer mode from imode to
16792         op0_mode and use it instead of GET_MODE (op0).  Update calls to
16793         extract_split_bit_field, extract_bit_field_using_extv and
16794         extract_fixed_bit_field.
16795         (extract_fixed_bit_field): Add an op0_mode argument.  Update calls
16796         to extract_split_bit_field and extract_fixed_bit_field_1.
16797         (extract_fixed_bit_field_1): Add a mode argument.  Remove assertion
16798         that OP0 has a scalar integer mode.  Use as_a <scalar_int_mode>
16799         on the target mode.
16800         (extract_split_bit_field): Add an op0_mode argument.  Update call
16801         to extract_fixed_bit_field.
16803 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16804             Alan Hayward  <alan.hayward@arm.com>
16805             David Sherwood  <david.sherwood@arm.com>
16807         * cse.c (cse_insn): Use opt_scalar_int_mode for the mode iterator.
16808         * explow.c (hard_function_value): Likewise.
16809         * expmed.c (extract_fixed_bit_field_1): Likewise.  Move the
16810         convert_to_mode call outside the loop.
16811         * expr.c (alignment_for_piecewise_move): Use opt_scalar_int_mode
16812         for the mode iterator.  Require the mode specified by max_pieces
16813         to exist.
16814         (emit_block_move_via_movmem): Use opt_scalar_int_mode for the
16815         mode iterator.
16816         (copy_blkmode_to_reg): Likewise.
16817         (set_storage_via_setmem): Likewise.
16818         * optabs.c (prepare_cmp_insn): Likewise.
16819         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
16820         * stor-layout.c (finish_bitfield_representative): Likewise.
16822 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16823             Alan Hayward  <alan.hayward@arm.com>
16824             David Sherwood  <david.sherwood@arm.com>
16826         * rtl.h (subreg_unpromoted_mode, subreg_promoted_mode): New functions.
16827         * expr.c (convert_move): Use them.
16828         (convert_modes): Likewise.
16829         (store_expr_with_bounds): Likewise.
16831 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16832             Alan Hayward  <alan.hayward@arm.com>
16833             David Sherwood  <david.sherwood@arm.com>
16835         * rtl.h (rtl_hooks::reg_nonzero_bits): Add a scalar_int_mode
16836         parameter for the mode of "x".  Remove the "known_x", "known_mode"
16837         and "known_ret" arguments.  Change the type of the mode argument
16838         to scalar_int_mode.
16839         (rtl_hooks:reg_num_sign_bit_copies): Likewise.
16840         * combine.c (reg_nonzero_bits_for_combine): Update accordingly.
16841         (reg_num_sign_bit_copies_for_combine): Likewise.
16842         * rtlanal.c (nonzero_bits1): Likewise.
16843         (num_sign_bit_copies1): Likewise.
16844         * rtlhooks-def.h (reg_nonzero_bits_general): Likewise.
16845         (reg_num_sign_bit_copies_general): Likewise.
16846         * rtlhooks.c (reg_num_sign_bit_copies_general): Likewise.
16847         (reg_nonzero_bits_general): Likewise.
16849 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16850             Alan Hayward  <alan.hayward@arm.com>
16851             David Sherwood  <david.sherwood@arm.com>
16853         * rtlanal.c (num_sign_bit_copies): Handle VOIDmode here rather
16854         than in subroutines.  Return 1 for non-integer modes.
16855         (cached_num_sign_bit_copies): Change the type of the mode parameter
16856         to scalar_int_mode.
16857         (num_sign_bit_copies1): Likewise.  Remove early exit for other mode
16858         classes.  Handle CONST_INT_P first and then check whether X also
16859         has a scalar integer mode.  Check the same thing for inner registers
16860         of a SUBREG and for values that are being extended or truncated.
16862 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16863             Alan Hayward  <alan.hayward@arm.com>
16864             David Sherwood  <david.sherwood@arm.com>
16866         * rtlanal.c (nonzero_bits): Handle VOIDmode here rather than
16867         in subroutines.  Return the mode mask for non-integer modes.
16868         (cached_nonzero_bits): Change the type of the mode parameter
16869         to scalar_int_mode.
16870         (nonzero_bits1): Likewise.  Remove early exit for other mode
16871         classes.  Handle CONST_INT_P first and then check whether X
16872         also has a scalar integer mode.
16874 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16875             Alan Hayward  <alan.hayward@arm.com>
16876             David Sherwood  <david.sherwood@arm.com>
16878         * expr.c (widest_int_mode_for_size): Make the comment match the code.
16879         Return a scalar_int_mode and assert that the size is greater than
16880         one byte.
16881         (by_pieces_ninsns): Update accordingly and remove VOIDmode handling.
16882         (op_by_pieces_d::op_by_pieces_d): Likewise.
16883         (op_by_pieces_d::run): Likewise.
16884         (can_store_by_pieces): Likewise.
16886 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16887             Alan Hayward  <alan.hayward@arm.com>
16888             David Sherwood  <david.sherwood@arm.com>
16890         * combine.c (extract_left_shift): Add a mode argument and update
16891         recursive calls.
16892         (make_compound_operation_int): Change the type of the mode parameter
16893         to scalar_int_mode and update the call to extract_left_shift.
16895 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16896             Alan Hayward  <alan.hayward@arm.com>
16897             David Sherwood  <david.sherwood@arm.com>
16899         * combine.c (simplify_and_const_int): Change the type of the mode
16900         parameter to scalar_int_mode.
16901         (simplify_and_const_int_1): Likewise.  Update recursive call.
16903 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16904             Alan Hayward  <alan.hayward@arm.com>
16905             David Sherwood  <david.sherwood@arm.com>
16907         * combine.c (simplify_compare_const): Check that the mode is a
16908         scalar_int_mode (rather than VOIDmode) before testing its
16909         precision.
16910         (simplify_comparison): Move COMPARISON_P handling out of the
16911         loop and restrict the latter part of the loop to scalar_int_modes.
16912         Check is_a <scalar_int_mode> before calling HWI_COMPUTABLE_MODE_P
16913         and when considering SUBREG_REGs.  Use is_int_mode instead of
16914         checking GET_MODE_CLASS against MODE_INT.
16916 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16917             Alan Hayward  <alan.hayward@arm.com>
16918             David Sherwood  <david.sherwood@arm.com>
16920         * combine.c (try_widen_shift_mode): Move check for equal modes to...
16921         (simplify_shift_const_1): ...here.  Use scalar_int_mode for
16922         shift_unit_mode and for modes involved in scalar shifts.
16924 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16925             Alan Hayward  <alan.hayward@arm.com>
16926             David Sherwood  <david.sherwood@arm.com>
16928         * combine.c (force_int_to_mode): New function, split out from...
16929         (force_to_mode): ...here.  Keep xmode up-to-date and use it
16930         instead of GET_MODE (x).
16932 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16933             Alan Hayward  <alan.hayward@arm.com>
16934             David Sherwood  <david.sherwood@arm.com>
16936         * optabs-query.h (extraction_insn::struct_mode): Change type to
16937         opt_scalar_int_mode and update comment.
16938         (extraction_insn::field_mode): Change type to scalar_int_mode.
16939         (extraction_insn::pos_mode): Likewise.
16940         * combine.c (make_extraction): Update accordingly.
16941         * optabs-query.c (get_traditional_extraction_insn): Likewise.
16942         (get_optab_extraction_insn): Likewise.
16943         * recog.c (simplify_while_replacing): Likewise.
16944         * expmed.c (narrow_bit_field_mem): Change the type of the mode
16945         parameter to opt_scalar_int_mode.
16947 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16948             Alan Hayward  <alan.hayward@arm.com>
16949             David Sherwood  <david.sherwood@arm.com>
16951         * machmode.h (bit_field_mode_iterator::next_mode): Take a pointer
16952         to a scalar_int_mode instead of a machine_mode.
16953         (bit_field_mode_iterator::m_mode): Change type to opt_scalar_int_mode.
16954         (get_best_mode): Return a boolean and use a pointer argument to store
16955         the selected mode.  Replace the limit mode parameter with a bit limit.
16956         * expmed.c (adjust_bit_field_mem_for_reg): Use scalar_int_mode
16957         for the values returned by bit_field_mode_iterator::next_mode.
16958         (store_bit_field): Update call to get_best_mode.
16959         (store_fixed_bit_field): Likewise.
16960         (extract_fixed_bit_field): Likewise.
16961         * expr.c (optimize_bitfield_assignment_op): Likewise.
16962         * fold-const.c (optimize_bit_field_compare): Likewise.
16963         (fold_truth_andor_1): Likewise.
16964         * stor-layout.c (bit_field_mode_iterator::next_mode): As above.
16965         Update for new type of m_mode.
16966         (get_best_mode): As above.
16968 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16969             Alan Hayward  <alan.hayward@arm.com>
16970             David Sherwood  <david.sherwood@arm.com>
16972         * expmed.c (strict_volatile_bitfield_p): Change the type of fieldmode
16973         to scalar_int_mode.  Remove check for SCALAR_INT_MODE_P.
16974         (store_bit_field): Check is_a <scalar_int_mode> before calling
16975         strict_volatile_bitfield_p.
16976         (extract_bit_field): Likewise.
16978 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16979             Alan Hayward  <alan.hayward@arm.com>
16980             David Sherwood  <david.sherwood@arm.com>
16982         * target.def (cstore_mode): Return a scalar_int_mode.
16983         * doc/tm.texi: Regenerate.
16984         * config/sparc/sparc.c (sparc_cstore_mode): Return a scalar_int_mode.
16985         * targhooks.h (default_cstore_mode): Likewise.
16986         * targhooks.c (default_cstore_mode): Likewise, using a forced
16987         conversion.
16988         * expmed.c (emit_cstore): Expect the target of the cstore to be
16989         a scalar_int_mode.
16991 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16992             Alan Hayward  <alan.hayward@arm.com>
16993             David Sherwood  <david.sherwood@arm.com>
16995         * cfgloop.h (rtx_iv): Change type of extend_mode and mode to
16996         scalar_int_mode.
16997         (niter_desc): Likewise mode.
16998         (iv_analyze): Add a mode parameter.
16999         (biv_p): Likewise.
17000         (iv_analyze_expr): Pass the mode paraeter before the rtx it describes
17001         and change its type to scalar_int_mode.
17002         * loop-iv.c: Update commentary at head of file.
17003         (iv_constant): Pass the mode paraeter before the rtx it describes
17004         and change its type to scalar_int_mode.  Remove VOIDmode handling.
17005         (iv_subreg): Change the type of the mode parameter to scalar_int_mode.
17006         (iv_extend): Likewise.
17007         (shorten_into_mode): Likewise.
17008         (iv_add): Use scalar_int_mode.
17009         (iv_mult): Likewise.
17010         (iv_shift): Likewise.
17011         (canonicalize_iv_subregs): Likewise.
17012         (get_biv_step_1): Pass the outer_mode parameter before the rtx
17013         it describes and change its mode to scalar_int_mode.   Also change
17014         the type of the returned inner_mode to scalar_int_mode.
17015         (get_biv_step): Likewise, turning outer_mode from a pointer
17016         into a direct parameter.  Update call to get_biv_step_1.
17017         (iv_analyze_biv): Add an outer_mode parameter.  Update calls to
17018         iv_constant and get_biv_step.
17019         (iv_analyze_expr): Pass the mode parameter before the rtx it describes
17020         and change its type to scalar_int_mode.  Don't initialise iv->mode
17021         to VOIDmode and remove later checks for its still being VOIDmode.
17022         Update calls to iv_analyze_op and iv_analyze_expr.  Check
17023         is_a <scalar_int_mode> when changing the mode under consideration.
17024         (iv_analyze_def): Ignore registers that don't have a scalar_int_mode.
17025         Update call to iv_analyze_expr.
17026         (iv_analyze_op): Add a mode parameter.  Reject subregs whose
17027         inner register is not also a scalar_int_mode.  Update call to
17028         iv_analyze_biv.
17029         (iv_analyze): Add a mode parameter.  Update call to iv_analyze_op.
17030         (biv_p): Add a mode parameter.  Update call to iv_analyze_biv.
17031         (iv_number_of_iterations): Use is_a <scalar_int_mode> instead of
17032         separate mode class checks.  Update calls to iv_analyze.  Remove
17033         fix-up of VOIDmodes after iv_analyze_biv.
17034         * loop-unroll.c (analyze_iv_to_split_insn): Reject registers that
17035         don't have a scalar_int_mode.  Update call to biv_p.
17037 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17038             Alan Hayward  <alan.hayward@arm.com>
17039             David Sherwood  <david.sherwood@arm.com>
17041         * cfgexpand.c (convert_debug_memory_address): Use
17042         as_a <scalar_int_mode>.
17043         * combine.c (expand_compound_operation): Likewise.
17044         (make_extraction): Likewise.
17045         (change_zero_ext): Likewise.
17046         (simplify_comparison): Likewise.
17047         * cse.c (cse_insn): Likewise.
17048         * dwarf2out.c (minmax_loc_descriptor): Likewise.
17049         (mem_loc_descriptor): Likewise.
17050         (loc_descriptor): Likewise.
17051         * expmed.c (init_expmed_one_mode): Likewise.
17052         (synth_mult): Likewise.
17053         (emit_store_flag_1): Likewise.
17054         (expand_divmod): Likewise.  Use HWI_COMPUTABLE_MODE_P instead
17055         of a comparison with size.
17056         * expr.c (expand_assignment): Use as_a <scalar_int_mode>.
17057         (reduce_to_bit_field_precision): Likewise.
17058         * function.c (expand_function_end): Likewise.
17059         * internal-fn.c (expand_arith_overflow_result_store): Likewise.
17060         * loop-doloop.c (doloop_modify): Likewise.
17061         * optabs.c (expand_binop): Likewise.
17062         (expand_unop): Likewise.
17063         (expand_copysign_absneg): Likewise.
17064         (prepare_cmp_insn): Likewise.
17065         (maybe_legitimize_operand): Likewise.
17066         * recog.c (const_scalar_int_operand): Likewise.
17067         * rtlanal.c (get_address_mode): Likewise.
17068         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
17069         (simplify_cond_clz_ctz): Likewise.
17070         * tree-nested.c (get_nl_goto_field): Likewise.
17071         * tree.c (build_vector_type_for_mode): Likewise.
17072         * var-tracking.c (use_narrower_mode): Likewise.
17074 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17075             Alan Hayward  <alan.hayward@arm.com>
17076             David Sherwood  <david.sherwood@arm.com>
17078         * tree.h (SCALAR_INT_TYPE_MODE): New macro.
17079         * builtins.c (expand_builtin_signbit): Use it.
17080         * cfgexpand.c (expand_debug_expr): Likewise.
17081         * dojump.c (do_jump): Likewise.
17082         (do_compare_and_jump): Likewise.
17083         * dwarf2cfi.c (expand_builtin_init_dwarf_reg_sizes): Likewise.
17084         * expmed.c (make_tree): Likewise.
17085         * expr.c (expand_expr_real_2): Likewise.
17086         (expand_expr_real_1): Likewise.
17087         (try_casesi): Likewise.
17088         * fold-const-call.c (fold_const_call_ss): Likewise.
17089         * fold-const.c (unextend): Likewise.
17090         (extract_muldiv_1): Likewise.
17091         (fold_single_bit_test): Likewise.
17092         (native_encode_int): Likewise.
17093         (native_encode_string): Likewise.
17094         (native_interpret_int): Likewise.
17095         * gimple-fold.c (gimple_fold_builtin_memset): Likewise.
17096         * internal-fn.c (expand_addsub_overflow): Likewise.
17097         (expand_neg_overflow): Likewise.
17098         (expand_mul_overflow): Likewise.
17099         (expand_arith_overflow): Likewise.
17100         * match.pd: Likewise.
17101         * stor-layout.c (layout_type): Likewise.
17102         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
17103         * tree-ssa-math-opts.c (convert_mult_to_widen): Likewise.
17104         * tree-ssanames.c (get_range_info): Likewise.
17105         * tree-switch-conversion.c (array_value_type) Likewise.
17106         * tree-vect-patterns.c (vect_recog_rotate_pattern): Likewise.
17107         (vect_recog_divmod_pattern): Likewise.
17108         (vect_recog_mixed_size_cond_pattern): Likewise.
17109         * tree-vrp.c (extract_range_basic): Likewise.
17110         (simplify_float_conversion_using_ranges): Likewise.
17111         * tree.c (int_fits_type_p): Likewise.
17112         * ubsan.c (instrument_bool_enum_load): Likewise.
17113         * varasm.c (mergeable_string_section): Likewise.
17114         (narrowing_initializer_constant_valid_p): Likewise.
17115         (output_constant): Likewise.
17117 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17118             Alan Hayward  <alan.hayward@arm.com>
17119             David Sherwood  <david.sherwood@arm.com>
17121         * machmode.h (NARROWEST_INT_MODE): New macro.
17122         * expr.c (alignment_for_piecewise_move): Use it instead of
17123         GET_CLASS_NARROWEST_MODE (MODE_INT).
17124         (push_block): Likewise.
17125         * stor-layout.c (bit_field_mode_iterator::bit_field_mode_iterator):
17126         Likewise.
17127         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
17129 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17130             Alan Hayward  <alan.hayward@arm.com>
17131             David Sherwood  <david.sherwood@arm.com>
17133         * postreload.c (move2add_valid_value_p): Change the type of the
17134         mode parameter to scalar_int_mode.
17135         (move2add_use_add2_insn): Add a mode parameter and use it instead
17136         of GET_MODE (reg).
17137         (move2add_use_add3_insn): Likewise.
17138         (reload_cse_move2add): Update accordingly.
17140 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17141             Alan Hayward  <alan.hayward@arm.com>
17142             David Sherwood  <david.sherwood@arm.com>
17144         * expr.c (expand_expr_real_2): Use scalar_int_mode for the
17145         double-word mode.
17146         * lower-subreg.c (resolve_shift_zext): Use is_a <scalar_int_mode>.
17147         * optabs.c (expand_unop): Likewise.
17149 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17150             Alan Hayward  <alan.hayward@arm.com>
17151             David Sherwood  <david.sherwood@arm.com>
17153         * dwarf2out.c (typed_binop): Change mode parameter to scalar_int_mode.
17154         (clz_loc_descriptor): Likewise.  Remove SCALAR_INT_MODE_P check.
17155         (popcount_loc_descriptor): Likewise.
17156         (bswap_loc_descriptor): Likewise.
17157         (rotate_loc_descriptor): Likewise.
17158         (mem_loc_descriptor): Add is_a <scalar_int_mode> checks before
17159         calling the functions above.
17161 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17162             Alan Hayward  <alan.hayward@arm.com>
17163             David Sherwood  <david.sherwood@arm.com>
17165         * combine.c (sign_extend_short_imm): Add is_a <scalar_int_mode>
17166         checks.
17167         (try_combine): Likewise.
17168         (simplify_if_then_else): Likewise.
17169         * cse.c (cse_insn): Likewise.
17170         * dwarf2out.c (mem_loc_descriptor): Likewise.
17171         * emit-rtl.c (gen_lowpart_common): Likewise.
17172         * simplify-rtx.c (simplify_truncation): Likewise.
17173         (simplify_binary_operation_1): Likewise.
17174         (simplify_const_relational_operation): Likewise.
17175         (simplify_ternary_operation): Likewise.
17176         * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise.
17178 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17179             Alan Hayward  <alan.hayward@arm.com>
17180             David Sherwood  <david.sherwood@arm.com>
17182         * cse.c (cse_insn): Add is_a <scalar_int_mode> checks.
17183         * reload.c (push_reload): Likewise.
17184         (find_reloads): Likewise.
17186 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17187             Alan Hayward  <alan.hayward@arm.com>
17188             David Sherwood  <david.sherwood@arm.com>
17190         * combine.c (find_split_point): Add is_a <scalar_int_mode> checks.
17191         (make_compound_operation_int): Likewise.
17192         (change_zero_ext): Likewise.
17193         * expr.c (convert_move): Likewise.
17194         (convert_modes): Likewise.
17195         * fwprop.c (forward_propagate_subreg): Likewise.
17196         * loop-iv.c (get_biv_step_1): Likewise.
17197         * optabs.c (widen_operand): Likewise.
17198         * postreload.c (move2add_valid_value_p): Likewise.
17199         * recog.c (simplify_while_replacing): Likewise.
17200         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
17201         (simplify_binary_operation_1): Likewise.  Remove redundant
17202         mode equality check.
17204 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17205             Alan Hayward  <alan.hayward@arm.com>
17206             David Sherwood  <david.sherwood@arm.com>
17208         * combine.c (combine_simplify_rtx): Add checks for
17209         is_a <scalar_int_mode>.
17210         (simplify_if_then_else): Likewise.
17211         (make_field_assignment): Likewise.
17212         (simplify_comparison): Likewise.
17213         * ifcvt.c (noce_try_bitop): Likewise.
17214         * loop-invariant.c (canonicalize_address_mult): Likewise.
17215         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
17217 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17218             Alan Hayward  <alan.hayward@arm.com>
17219             David Sherwood  <david.sherwood@arm.com>
17221         * gimple-fold.c (gimple_fold_builtin_memory_op): Use
17222         is_a <scalar_int_mode> instead of != BLKmode.
17224 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17225             Alan Hayward  <alan.hayward@arm.com>
17226             David Sherwood  <david.sherwood@arm.com>
17228         * cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>
17229         instead of != VOIDmode.
17230         * combine.c (if_then_else_cond): Likewise.
17231         (change_zero_ext): Likewise.
17232         * dwarf2out.c (mem_loc_descriptor): Likewise.
17233         (loc_descriptor): Likewise.
17234         * rtlanal.c (canonicalize_condition): Likewise.
17235         * simplify-rtx.c (simplify_relational_operation_1): Likewise.
17237 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17238             Alan Hayward  <alan.hayward@arm.com>
17239             David Sherwood  <david.sherwood@arm.com>
17241         * simplify-rtx.c (simplify_binary_operation_1): Use
17242         is_a <scalar_int_mode> instead of !VECTOR_MODE_P.
17244 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17245             Alan Hayward  <alan.hayward@arm.com>
17246             David Sherwood  <david.sherwood@arm.com>
17248         * wide-int.h (int_traits<unsigned char>) New class.
17249         (int_traits<unsigned short>) Likewise.
17250         * cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>.
17251         Use GET_MODE_UNIT_PRECISION and remove redundant test for
17252         SCALAR_INT_MODE_P.
17253         * combine.c (set_nonzero_bits_and_sign_copies): Use
17254         is_a <scalar_int_mode>.
17255         (find_split_point): Likewise.
17256         (combine_simplify_rtx): Likewise.
17257         (simplify_logical): Likewise.
17258         (expand_compound_operation): Likewise.
17259         (expand_field_assignment): Likewise.
17260         (make_compound_operation): Likewise.
17261         (extended_count): Likewise.
17262         (change_zero_ext): Likewise.
17263         (simplify_comparison): Likewise.
17264         * dwarf2out.c (scompare_loc_descriptor): Likewise.
17265         (ucompare_loc_descriptor): Likewise.
17266         (minmax_loc_descriptor): Likewise.
17267         (mem_loc_descriptor): Likewise.
17268         (loc_descriptor): Likewise.
17269         * expmed.c (init_expmed_one_mode): Likewise.
17270         * lra-constraints.c (lra_constraint_offset): Likewise.
17271         * optabs.c (prepare_libcall_arg): Likewise.
17272         * postreload.c (move2add_note_store): Likewise.
17273         * reload.c (operands_match_p): Likewise.
17274         * rtl.h (load_extend_op): Likewise.
17275         * rtlhooks.c (gen_lowpart_general): Likewise.
17276         * simplify-rtx.c (simplify_truncation): Likewise.
17277         (simplify_unary_operation_1): Likewise.
17278         (simplify_binary_operation_1): Likewise.
17279         (simplify_const_binary_operation): Likewise.
17280         (simplify_const_relational_operation): Likewise.
17281         (simplify_subreg): Likewise.
17282         * stor-layout.c (bitwise_mode_for_mode): Likewise.
17283         * var-tracking.c (adjust_mems): Likewise.
17284         (prepare_call_arguments): Likewise.
17286 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17287             Alan Hayward  <alan.hayward@arm.com>
17288             David Sherwood  <david.sherwood@arm.com>
17290         * machmode.h (is_int_mode): New fuction.
17291         * combine.c (find_split_point): Use it.
17292         (combine_simplify_rtx): Likewise.
17293         (simplify_if_then_else): Likewise.
17294         (simplify_set): Likewise.
17295         (simplify_shift_const_1): Likewise.
17296         (simplify_comparison): Likewise.
17297         * config/aarch64/aarch64.c (aarch64_rtx_costs): Likewise.
17298         * cse.c (notreg_cost): Likewise.
17299         (cse_insn): Likewise.
17300         * cselib.c (cselib_lookup_1): Likewise.
17301         * dojump.c (do_jump_1): Likewise.
17302         (do_compare_rtx_and_jump): Likewise.
17303         * dse.c (get_call_args): Likewise.
17304         * dwarf2out.c (rtl_for_decl_init): Likewise.
17305         (native_encode_initializer): Likewise.
17306         * expmed.c (emit_store_flag_1): Likewise.
17307         (emit_store_flag): Likewise.
17308         * expr.c (convert_modes): Likewise.
17309         (store_field): Likewise.
17310         (expand_expr_real_1): Likewise.
17311         * fold-const.c (fold_read_from_constant_string): Likewise.
17312         * gimple-ssa-sprintf.c (get_format_string): Likewise.
17313         * optabs-libfuncs.c (gen_int_libfunc): Likewise.
17314         * optabs.c (expand_binop): Likewise.
17315         (expand_unop): Likewise.
17316         (expand_abs_nojump): Likewise.
17317         (expand_one_cmpl_abs_nojump): Likewise.
17318         * simplify-rtx.c (mode_signbit_p): Likewise.
17319         (val_signbit_p): Likewise.
17320         (val_signbit_known_set_p): Likewise.
17321         (val_signbit_known_clear_p): Likewise.
17322         (simplify_relational_operation_1): Likewise.
17323         * tree.c (vector_type_mode): Likewise.
17325 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17326             Alan Hayward  <alan.hayward@arm.com>
17327             David Sherwood  <david.sherwood@arm.com>
17329         * machmode.h (smallest_mode_for_size): Fix formatting.
17330         (smallest_int_mode_for_size): New function.
17331         * cfgexpand.c (expand_debug_expr): Use smallest_int_mode_for_size
17332         instead of smallest_mode_for_size.
17333         * combine.c (make_extraction): Likewise.
17334         * config/arc/arc.c (arc_expand_movmem): Likewise.
17335         * config/arm/arm.c (arm_expand_divmod_libfunc): Likewise.
17336         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
17337         * config/s390/s390.c (s390_expand_insv): Likewise.
17338         * config/sparc/sparc.c (assign_int_registers): Likewise.
17339         * config/spu/spu.c (spu_function_value): Likewise.
17340         (spu_function_arg): Likewise.
17341         * coverage.c (get_gcov_type): Likewise.
17342         (get_gcov_unsigned_t): Likewise.
17343         * dse.c (find_shift_sequence): Likewise.
17344         * expmed.c (store_bit_field_1): Likewise.
17345         * expr.c (convert_move): Likewise.
17346         (store_field): Likewise.
17347         * internal-fn.c (expand_arith_overflow): Likewise.
17348         * optabs-query.c (get_best_extraction_insn): Likewise.
17349         * optabs.c (expand_twoval_binop_libfunc): Likewise.
17350         * stor-layout.c (layout_type): Likewise.
17351         (initialize_sizetypes): Likewise.
17352         * targhooks.c (default_get_mask_mode): Likewise.
17353         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Likewise.
17355 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17356             Alan Hayward  <alan.hayward@arm.com>
17357             David Sherwood  <david.sherwood@arm.com>
17359         * machmode.h (opt_mode::else_blk): New function.
17360         (int_mode_for_mode): Declare.
17361         * stor-layout.c (int_mode_for_mode): Return an opt_scalar_int_mode.
17362         * builtins.c (expand_builtin_signbit): Adjust for new int_mode_for_mode
17363         return type.
17364         * cfgexpand.c (expand_debug_expr): Likewise.
17365         * combine.c (gen_lowpart_or_truncate): Likewise.
17366         (gen_lowpart_for_combine): Likewise.
17367         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Likewise.
17368         * config/avr/avr.c (avr_to_int_mode): Likewise.
17369         (avr_out_plus_1): Likewise.
17370         (avr_out_plus): Likewise.
17371         (avr_out_round): Likewise.
17372         * config/i386/i386.c (ix86_split_to_parts): Likewise.
17373         * config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
17374         (s390_expand_vcond): Likewise.
17375         * config/spu/spu.c (spu_split_immediate): Likewise.
17376         (spu_expand_mov): Likewise.
17377         * dse.c (get_stored_val): Likewise.
17378         * expmed.c (store_bit_field_1): Likewise.
17379         (convert_extracted_bit_field): Use int_mode_for_mode instead of
17380         int_mode_for_size.
17381         (extract_bit_field_1): Adjust for new int_mode_for_mode return type.
17382         (extract_low_bits): Likewise.
17383         * expr.c (emit_group_load_1): Likewise.  Separate out the BLKmode
17384         handling rather than repeating the check.
17385         (emit_group_store): Likewise.
17386         (emit_move_via_integer): Adjust for new int_mode_for_mode return type.
17387         * optabs.c (expand_absneg_bit): Likewise.
17388         (expand_copysign_absneg): Likewise.
17389         (expand_copysign_bit): Likewise.
17390         * tree-if-conv.c (ifcvt_can_use_mask_load_store): Likewise.
17391         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
17392         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
17393         * var-tracking.c (prepare_call_arguments):  Likewise.
17394         * config/powerpcspe/powerpcspe.c (rs6000_do_expand_vec_perm): Use
17395         int_mode_for_mode instead of mode_for_size.
17396         * config/rs6000/rs6000.c (rs6000_do_expand_vec_perm): Likewise.
17398 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17399             Alan Hayward  <alan.hayward@arm.com>
17400             David Sherwood  <david.sherwood@arm.com>
17402         * machmode.h (int_mode_for_size): New function.
17403         * builtins.c (set_builtin_user_assembler_name): Use int_mode_for_size
17404         instead of mode_for_size.
17405         * calls.c (save_fixed_argument_area): Likewise.  Make use of BLKmode
17406         explicit.
17407         * combine.c (expand_field_assignment): Use int_mode_for_size
17408         instead of mode_for_size.
17409         (make_extraction): Likewise.
17410         (simplify_shift_const_1): Likewise.
17411         (simplify_comparison): Likewise.
17412         * dojump.c (do_jump): Likewise.
17413         * dwarf2out.c (mem_loc_descriptor): Likewise.
17414         * emit-rtl.c (init_derived_machine_modes): Likewise.
17415         * expmed.c (flip_storage_order): Likewise.
17416         (convert_extracted_bit_field): Likewise.
17417         * expr.c (copy_blkmode_from_reg): Likewise.
17418         * graphite-isl-ast-to-gimple.c (max_mode_int_precision): Likewise.
17419         * internal-fn.c (expand_mul_overflow): Likewise.
17420         * lower-subreg.c (simple_move): Likewise.
17421         * optabs-libfuncs.c (init_optabs): Likewise.
17422         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
17423         * tree.c (vector_type_mode): Likewise.
17424         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
17425         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Likewise.
17426         * tree-vect-generic.c (expand_vector_parallel): Likewise.
17427         * tree-vect-stmts.c (vectorizable_load): Likewise.
17428         (vectorizable_store): Likewise.
17430 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17431             Alan Hayward  <alan.hayward@arm.com>
17432             David Sherwood  <david.sherwood@arm.com>
17434         * coretypes.h (pod_mode): New type.
17435         (scalar_int_mode_pod): New typedef.
17436         * machmode.h (pod_mode): New class.
17437         (int_n_data_t::m): Change type to scalar_int_mode_pod.
17438         * genmodes.c (emit_mode_int_n): Update accordingly.
17439         * lower-subreg.h (target_lower_subreg): Change type to
17440         scalar_int_mode_pod.
17441         * gdbhooks.py (build_pretty_printer): Handle pod_mode and
17442         scalar_int_mode_pod.
17444 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17445             Alan Hayward  <alan.hayward@arm.com>
17446             David Sherwood  <david.sherwood@arm.com>
17448         * config/powerpcspe/powerpcspe.h (rs6000_pmode): Change type from
17449         machine_mode to scalar_int_mode.
17450         * config/powerpcspe/powerpcspe.c (rs6000_pmode): Likewise.
17451         (rs6000_option_override_internal): Remove cast to int.
17452         * config/rs6000/rs6000.h (rs6000_pmode): Change type from
17453         machine_mode to scalar_int_mode.
17454         * config/rs6000/rs6000.c (rs6000_pmode): Likewise.
17455         (rs6000_option_override_internal): Remove cast to int.
17456         * config/s390/s390.h (Pmode): Remove cast to machine_mode.
17457         * config/epiphany/epiphany.h (RTX_OK_FOR_OFFSET_P): Add cast
17458         to machine_mode.
17459         * config/s390/s390.c (s390_expand_builtin): Likewise.
17460         * coretypes.h (scalar_int_mode): New type.
17461         (opt_scalar_int_mode): New typedef.
17462         * machmode.h (scalar_int_mode): New class.
17463         (scalar_int_mode::includes_p): New function.
17464         (byte_mode): Change type to scalar_int_mode.
17465         (word_mode): Likewise.
17466         (ptr_mode): Likewise.
17467         * emit-rtl.c (byte_mode): Likewise.
17468         (word_mode): Likewise.
17469         (ptr_mode): Likewise.
17470         (init_derived_machine_modes): Update accordingly.
17471         * genmodes.c (get_mode_class): Return scalar_int_mode for MODE_INT
17472         and MODE_PARTIAL_INT.
17473         * gdbhooks.py (build_pretty_printer): Handle scalar_int_mode and
17474         opt_scalar_int_mode.
17476 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17477             Alan Hayward  <alan.hayward@arm.com>
17478             David Sherwood  <david.sherwood@arm.com>
17480         * target.def (libgcc_floating_mode_supported_p): Take a
17481         scalar_float_mode.
17482         * doc/tm.texi: Regenerate.
17483         * targhooks.h (default_libgcc_floating_mode_supported_p): Take a
17484         scalar_float_mode.
17485         * targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.
17486         * config/aarch64/aarch64.c (aarch64_libgcc_floating_mode_supported_p):
17487         Likewise.
17489 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17490             Alan Hayward  <alan.hayward@arm.com>
17491             David Sherwood  <david.sherwood@arm.com>
17493         * target.def (default_floatn_mode): Return an opt_scalar_float_mode.
17494         * doc/tm.texi: Regenerate.
17495         * config/arm/arm.c (arm_floatn_mode): Return an opt_scalar_float_mode.
17496         * config/powerpcspe/powerpcspe.c (rs6000_floatn_mode): Likewise.
17497         * config/rs6000/rs6000.c (rs6000_floatn_mode): Likewise.
17498         * targhooks.h (default_floatn_mode): Likewise.
17499         * targhooks.c (default_floatn_mode): Likewise.
17500         * tree.c (build_common_tree_nodes): Update accordingly.
17502 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17503             Alan Hayward  <alan.hayward@arm.com>
17504             David Sherwood  <david.sherwood@arm.com>
17506         * machmode.h (mode_iterator::start): Provide overload for opt_modes.
17507         (mode_iterator::iterate_p): Likewise.
17508         (mode_iterator::get_wider): Likewise.
17509         * expr.c (init_expr_target): Use opt_scalar_float_mode.
17511 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17512             Alan Hayward  <alan.hayward@arm.com>
17513             David Sherwood  <david.sherwood@arm.com>
17515         * coretypes.h (opt_scalar_float_mode): New typedef.
17516         * machmode.h (float_mode_for_size): New function.
17517         * emit-rtl.c (double_mode): Delete.
17518         (init_emit_once): Use float_mode_for_size.
17519         * stor-layout.c (layout_type): Likewise.
17520         * gdbhooks.py (build_pretty_printer): Handle opt_scalar_float_mode.
17522 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17523             Alan Hayward  <alan.hayward@arm.com>
17524             David Sherwood  <david.sherwood@arm.com>
17526         * output.h (assemble_real): Take a scalar_float_mode.
17527         * config/arm/arm.c (arm_assemble_integer): Update accordingly.
17528         * config/arm/arm.md (consttable_4): Likewise.
17529         (consttable_8): Likewise.
17530         (consttable_16): Likewise.
17531         * config/mips/mips.md (consttable_float): Likewise.
17532         * config/s390/s390.c (s390_output_pool_entry): Likewise.
17533         * varasm.c (assemble_real): Take a scalar_float_mode.
17534         (output_constant_pool_2): Update accordingly.
17535         (output_constant): Likewise.
17537 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17538             Alan Hayward  <alan.hayward@arm.com>
17539             David Sherwood  <david.sherwood@arm.com>
17541         * tree.h (SCALAR_FLOAT_TYPE_MODE): New macro.
17542         * builtins.c (expand_builtin_signbit): Use it instead of TYPE_MODE.
17543         * fold-const.c (fold_convert_const_real_from_fixed): Likewise.
17544         (native_encode_real): Likewise.
17545         (native_interpret_real): Likewise.
17546         * hsa-brig.c (emit_immediate_scalar_to_buffer): Likewise.
17547         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
17549 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17550             Alan Hayward  <alan.hayward@arm.com>
17551             David Sherwood  <david.sherwood@arm.com>
17553         * optabs-libfuncs.c (gen_trunc_conv_libfunc): Use is_a
17554         <scalar_float_mode>.  Simplify.
17555         (gen_extend_conv_libfunc): Likewise.
17557 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17558             Alan Hayward  <alan.hayward@arm.com>
17559             David Sherwood  <david.sherwood@arm.com>
17561         * coretypes.h (scalar_float_mode): New type.
17562         * machmode.h (mode_traits::from_int): Use machine_mode if
17563         USE_ENUM_MODES is defined.
17564         (is_a): New function.
17565         (as_a): Likewise.
17566         (dyn_cast): Likewise.
17567         (scalar_float_mode): New class.
17568         (scalar_float_mode::includes_p): New function.
17569         (is_float_mode): Likewise.
17570         * gdbhooks.py (MachineModePrinter): New class.
17571         (build_pretty_printer): Use it for scalar_float_mode.
17572         * real.h (FLOAT_MODE_FORMAT): Use as_a <scalar_float_mode>.
17573         (format_helper::format_helper): Turn into a template.
17574         * genmodes.c (get_mode_class): New function.
17575         (emit_insn_modes_h): Give modes the class returned by get_mode_class,
17576         or machine_mode if none.
17577         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Use
17578         as_a <scalar_float_mode>.
17579         * dwarf2out.c (mem_loc_descriptor): Likewise.
17580         (insert_float): Likewise.
17581         (add_const_value_attribute): Likewise.
17582         * simplify-rtx.c (simplify_immed_subreg): Likewise.
17583         * optabs.c (expand_absneg_bit): Take a scalar_float_mode.
17584         (expand_unop): Update accordingly.
17585         (expand_abs_nojump): Likewise.
17586         (expand_copysign_absneg): Take a scalar_float_mode.
17587         (expand_copysign_bit): Likewise.
17588         (expand_copysign): Update accordingly.
17590 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17591             Alan Hayward  <alan.hayward@arm.com>
17592             David Sherwood  <david.sherwood@arm.com>
17594         * coretypes.h (opt_mode): New class.
17595         * machmode.h (opt_mode): Likewise.
17596         (opt_mode::else_void): New function.
17597         (opt_mode::require): Likewise.
17598         (opt_mode::exists): Likewise.
17599         (GET_MODE_WIDER_MODE): Turn into a function and return an opt_mode.
17600         (GET_MODE_2XWIDER_MODE): Likewise.
17601         (mode_iterator::get_wider): Update accordingly.
17602         (mode_iterator::get_2xwider): Likewise.
17603         (mode_iterator::get_known_wider): Likewise, turning into a template.
17604         * combine.c (make_extraction): Update use of GET_MODE_WIDER_MODE,
17605         forcing a wider mode to exist.
17606         * config/cr16/cr16.h (LONG_REG_P): Likewise.
17607         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
17608         * config/c6x/c6x.c (c6x_rtx_costs): Update use of
17609         GET_MODE_2XWIDER_MODE, forcing a wider mode to exist.
17610         * lower-subreg.c (init_lower_subreg): Likewise.
17611         * optabs-libfuncs.c (init_sync_libfuncs_1): Likewise, but not
17612         on the final iteration.
17613         * config/i386/i386.c (ix86_expand_set_or_movmem): Check whether
17614         a wider mode exists before asking for a move pattern.
17615         (get_mode_wider_vector): Update use of GET_MODE_WIDER_MODE,
17616         forcing a wider mode to exist.
17617         (expand_vselect_vconcat): Update use of GET_MODE_2XWIDER_MODE,
17618         returning false if no such mode exists.
17619         * config/ia64/ia64.c (expand_vselect_vconcat): Likewise.
17620         * config/mips/mips.c (mips_expand_vselect_vconcat): Likewise.
17621         * expmed.c (init_expmed_one_mode): Update use of GET_MODE_WIDER_MODE.
17622         Avoid checking for a MODE_INT if we already know the mode is not a
17623         SCALAR_INT_MODE_P.
17624         (extract_high_half): Update use of GET_MODE_WIDER_MODE,
17625         forcing a wider mode to exist.
17626         (expmed_mult_highpart_optab): Likewise.
17627         (expmed_mult_highpart): Likewise.
17628         * expr.c (expand_expr_real_2): Update use of GET_MODE_WIDER_MODE,
17629         using else_void.
17630         * lto-streamer-in.c (lto_input_mode_table): Likewise.
17631         * optabs-query.c (find_widening_optab_handler_and_mode): Likewise.
17632         * stor-layout.c (bit_field_mode_iterator::next_mode): Likewise.
17633         * internal-fn.c (expand_mul_overflow): Update use of
17634         GET_MODE_2XWIDER_MODE.
17635         * omp-low.c (omp_clause_aligned_alignment): Likewise.
17636         * tree-ssa-math-opts.c (convert_mult_to_widen): Update use of
17637         GET_MODE_WIDER_MODE.
17638         (convert_plusminus_to_widen): Likewise.
17639         * tree-switch-conversion.c (array_value_type): Likewise.
17640         * var-tracking.c (emit_note_insn_var_location): Likewise.
17641         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
17642         Return false inside rather than outside the loop if no wider mode
17643         exists
17644         * optabs.c (expand_binop): Update use of GET_MODE_WIDER_MODE
17645         and GET_MODE_2XWIDER_MODE
17646         (can_compare_p): Use else_void.
17647         * gdbhooks.py (OptMachineModePrinter): New class.
17648         (build_pretty_printer): Use it for opt_mode.
17650 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17651             Alan Hayward  <alan.hayward@arm.com>
17652             David Sherwood  <david.sherwood@arm.com>
17654         * tree-switch-conversion.c (array_value_type): Only read TYPE_MODE
17655         once.  Use get_narrowest_mode instead of GET_CLASS_NARROWEST_MODE.
17657 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17658             Alan Hayward  <alan.hayward@arm.com>
17659             David Sherwood  <david.sherwood@arm.com>
17661         * machmode.h (mode_traits): New structure.
17662         (get_narrowest_mode): New function.
17663         (mode_iterator::start): Likewise.
17664         (mode_iterator::iterate_p): Likewise.
17665         (mode_iterator::get_wider): Likewise.
17666         (mode_iterator::get_known_wider): Likewise.
17667         (mode_iterator::get_2xwider): Likewise.
17668         (FOR_EACH_MODE_IN_CLASS): New mode iterator.
17669         (FOR_EACH_MODE): Likewise.
17670         (FOR_EACH_MODE_FROM): Likewise.
17671         (FOR_EACH_MODE_UNTIL): Likewise.
17672         (FOR_EACH_WIDER_MODE): Likewise.
17673         (FOR_EACH_2XWIDER_MODE): Likewise.
17674         * builtins.c (expand_builtin_strlen): Use new mode iterators.
17675         * combine.c (simplify_comparison): Likewise
17676         * config/i386/i386.c (type_natural_mode): Likewise.
17677         * cse.c (cse_insn): Likewise.
17678         * dse.c (find_shift_sequence): Likewise.
17679         * emit-rtl.c (init_derived_machine_modes): Likewise.
17680         (init_emit_once): Likewise.
17681         * explow.c (hard_function_value): Likewise.
17682         * expmed.c (extract_fixed_bit_field_1): Likewise.
17683         (extract_bit_field_1): Likewise.
17684         (expand_divmod): Likewise.
17685         (emit_store_flag_1): Likewise.
17686         * expr.c (init_expr_target): Likewise.
17687         (convert_move): Likewise.
17688         (alignment_for_piecewise_move): Likewise.
17689         (widest_int_mode_for_size): Likewise.
17690         (emit_block_move_via_movmem): Likewise.
17691         (copy_blkmode_to_reg): Likewise.
17692         (set_storage_via_setmem): Likewise.
17693         (compress_float_constant): Likewise.
17694         * omp-low.c (omp_clause_aligned_alignment): Likewise.
17695         * optabs-query.c (get_best_extraction_insn): Likewise.
17696         * optabs.c (expand_binop): Likewise.
17697         (expand_twoval_unop): Likewise.
17698         (expand_twoval_binop): Likewise.
17699         (widen_leading): Likewise.
17700         (widen_bswap): Likewise.
17701         (expand_parity): Likewise.
17702         (expand_unop): Likewise.
17703         (prepare_cmp_insn): Likewise.
17704         (prepare_float_lib_cmp): Likewise.
17705         (expand_float): Likewise.
17706         (expand_fix): Likewise.
17707         (expand_sfix_optab): Likewise.
17708         * postreload.c (move2add_use_add2_insn): Likewise.
17709         * reg-stack.c (reg_to_stack): Likewise.
17710         * reginfo.c (choose_hard_reg_mode): Likewise.
17711         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
17712         * stor-layout.c (mode_for_size): Likewise.
17713         (smallest_mode_for_size): Likewise.
17714         (mode_for_vector): Likewise.
17715         (finish_bitfield_representative): Likewise.
17716         * tree-ssa-math-opts.c (target_supports_divmod_p): Likewise.
17717         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
17718         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
17719         * var-tracking.c (prepare_call_arguments): Likewise.
17721 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17722             Alan Hayward  <alan.hayward@arm.com>
17723             David Sherwood  <david.sherwood@arm.com>
17725         * genconditions.c (write_header): Add a "#define USE_ENUM_MODES".
17726         * genmodes.c (emit_insn_modes_h): Define FOOmode to E_FOOmode if
17727         USE_ENUM_MODES is defined and to ((void) 0, E_FOOmode) otherwise.
17728         * machmode.h (mode_size): Move earlier in file.
17729         (mode_precision): Likewise.
17730         (mode_inner): Likewise.
17731         (mode_nunits): Likewise.
17732         (mode_unit_size): Likewise.
17733         (unit_unit_precision): Likewise.
17734         (mode_wider): Likewise.
17735         (mode_2xwider): Likewise.
17736         (machine_mode): New class.
17737         (mode_to_bytes): New function.
17738         (mode_to_bits): Likewise.
17739         (mode_to_precision): Likewise.
17740         (mode_to_inner): Likewise.
17741         (mode_to_unit_size): Likewise.
17742         (mode_to_unit_precision): Likewise.
17743         (mode_to_nunits): Likewise.
17744         (GET_MODE_SIZE): Use mode_to_bytes.
17745         (GET_MODE_BITSIZE): Use mode_to_bits.
17746         (GET_MODE_PRECISION): Use mode_to_precision.
17747         (GET_MODE_INNER): Use mode_to_inner.
17748         (GET_MODE_UNIT_SIZE): Use mode_to_unit_size.
17749         (GET_MODE_UNIT_PRECISION): Use mode_to_unit_precision.
17750         (GET_MODE_NUNITS): Use mode_to_nunits.
17751         * system.h (ALWAYS_INLINE): New macro.
17752         * config/powerpcspe/powerpcspe-c.c
17753         (altivec_resolve_overloaded_builtin): Use machine_mode instead of
17754         int for arg1_mode and arg2_mode.
17756 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17757             Alan Hayward  <alan.hayward@arm.com>
17758             David Sherwood  <david.sherwood@arm.com>
17760         * config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type):
17761         Prefix mode names with E_ in case statements.
17762         * config/aarch64/aarch64-elf.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17763         * config/aarch64/aarch64.c (aarch64_split_simd_combine): Likewise.
17764         (aarch64_split_simd_move): Likewise.
17765         (aarch64_gen_storewb_pair): Likewise.
17766         (aarch64_gen_loadwb_pair): Likewise.
17767         (aarch64_gen_store_pair): Likewise.
17768         (aarch64_gen_load_pair): Likewise.
17769         (aarch64_get_condition_code_1): Likewise.
17770         (aarch64_constant_pool_reload_icode): Likewise.
17771         (get_rsqrte_type): Likewise.
17772         (get_rsqrts_type): Likewise.
17773         (get_recpe_type): Likewise.
17774         (get_recps_type): Likewise.
17775         (aarch64_gimplify_va_arg_expr): Likewise.
17776         (aarch64_simd_container_mode): Likewise.
17777         (aarch64_emit_load_exclusive): Likewise.
17778         (aarch64_emit_store_exclusive): Likewise.
17779         (aarch64_expand_compare_and_swap): Likewise.
17780         (aarch64_gen_atomic_cas): Likewise.
17781         (aarch64_emit_bic): Likewise.
17782         (aarch64_emit_atomic_swap): Likewise.
17783         (aarch64_emit_atomic_load_op): Likewise.
17784         (aarch64_evpc_trn): Likewise.
17785         (aarch64_evpc_uzp): Likewise.
17786         (aarch64_evpc_zip): Likewise.
17787         (aarch64_evpc_ext): Likewise.
17788         (aarch64_evpc_rev): Likewise.
17789         (aarch64_evpc_dup): Likewise.
17790         (aarch64_gen_ccmp_first): Likewise.
17791         (aarch64_gen_ccmp_next): Likewise.
17792         * config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
17793         (alpha_emit_xfloating_libcall): Likewise.
17794         (emit_insxl): Likewise.
17795         (alpha_arg_type): Likewise.
17796         * config/arc/arc.c (arc_vector_mode_supported_p): Likewise.
17797         (arc_preferred_simd_mode): Likewise.
17798         (arc_secondary_reload): Likewise.
17799         (get_arc_condition_code): Likewise.
17800         (arc_print_operand): Likewise.
17801         (arc_legitimate_constant_p): Likewise.
17802         * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17803         * config/arc/arc.md (casesi_load): Likewise.
17804         (casesi_compact_jump): Likewise.
17805         * config/arc/predicates.md (proper_comparison_operator): Likewise.
17806         (cc_use_register): Likewise.
17807         * config/arm/aout.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17808         * config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise.
17809         (arm_init_iwmmxt_builtins): Likewise.
17810         * config/arm/arm.c (thumb1_size_rtx_costs): Likewise.
17811         (neon_expand_vector_init): Likewise.
17812         (arm_attr_length_move_neon): Likewise.
17813         (maybe_get_arm_condition_code): Likewise.
17814         (arm_emit_vector_const): Likewise.
17815         (arm_preferred_simd_mode): Likewise.
17816         (arm_output_iwmmxt_tinsr): Likewise.
17817         (thumb1_output_casesi): Likewise.
17818         (thumb2_output_casesi): Likewise.
17819         (arm_emit_load_exclusive): Likewise.
17820         (arm_emit_store_exclusive): Likewise.
17821         (arm_expand_compare_and_swap): Likewise.
17822         (arm_evpc_neon_vuzp): Likewise.
17823         (arm_evpc_neon_vzip): Likewise.
17824         (arm_evpc_neon_vrev): Likewise.
17825         (arm_evpc_neon_vtrn): Likewise.
17826         (arm_evpc_neon_vext): Likewise.
17827         (arm_validize_comparison): Likewise.
17828         * config/arm/neon.md (neon_vc<cmp_op><mode>): Likewise.
17829         * config/avr/avr-c.c (avr_resolve_overloaded_builtin): Likewise.
17830         * config/avr/avr.c (avr_rtx_costs_1): Likewise.
17831         * config/c6x/c6x.c (c6x_vector_mode_supported_p): Likewise.
17832         (c6x_preferred_simd_mode): Likewise.
17833         * config/epiphany/epiphany.c (get_epiphany_condition_code): Likewise.
17834         (epiphany_rtx_costs): Likewise.
17835         * config/epiphany/predicates.md (proper_comparison_operator):
17836         Likewise.
17837         * config/frv/frv.c (condexec_memory_operand): Likewise.
17838         (frv_emit_move): Likewise.
17839         (output_move_single): Likewise.
17840         (output_condmove_single): Likewise.
17841         (frv_hard_regno_mode_ok): Likewise.
17842         (frv_matching_accg_mode): Likewise.
17843         * config/h8300/h8300.c (split_adds_subs): Likewise.
17844         (h8300_rtx_costs): Likewise.
17845         (h8300_print_operand): Likewise.
17846         (compute_mov_length): Likewise.
17847         (output_logical_op): Likewise.
17848         (compute_logical_op_length): Likewise.
17849         (compute_logical_op_cc): Likewise.
17850         (h8300_shift_needs_scratch_p): Likewise.
17851         (output_a_shift): Likewise.
17852         (compute_a_shift_length): Likewise.
17853         (compute_a_shift_cc): Likewise.
17854         (expand_a_rotate): Likewise.
17855         (output_a_rotate): Likewise.
17856         * config/i386/i386.c (classify_argument): Likewise.
17857         (function_arg_advance_32): Likewise.
17858         (function_arg_32): Likewise.
17859         (function_arg_64): Likewise.
17860         (function_value_64): Likewise.
17861         (ix86_gimplify_va_arg): Likewise.
17862         (ix86_legitimate_constant_p): Likewise.
17863         (put_condition_code): Likewise.
17864         (split_double_mode): Likewise.
17865         (ix86_avx256_split_vector_move_misalign): Likewise.
17866         (ix86_expand_vector_logical_operator): Likewise.
17867         (ix86_split_idivmod): Likewise.
17868         (ix86_expand_adjust_ufix_to_sfix_si): Likewise.
17869         (ix86_build_const_vector): Likewise.
17870         (ix86_build_signbit_mask): Likewise.
17871         (ix86_match_ccmode): Likewise.
17872         (ix86_cc_modes_compatible): Likewise.
17873         (ix86_expand_branch): Likewise.
17874         (ix86_expand_sse_cmp): Likewise.
17875         (ix86_expand_sse_movcc): Likewise.
17876         (ix86_expand_int_sse_cmp): Likewise.
17877         (ix86_expand_vec_perm_vpermi2): Likewise.
17878         (ix86_expand_vec_perm): Likewise.
17879         (ix86_expand_sse_unpack): Likewise.
17880         (ix86_expand_int_addcc): Likewise.
17881         (ix86_split_to_parts): Likewise.
17882         (ix86_vectorize_builtin_gather): Likewise.
17883         (ix86_vectorize_builtin_scatter): Likewise.
17884         (avx_vpermilp_parallel): Likewise.
17885         (inline_memory_move_cost): Likewise.
17886         (ix86_tieable_integer_mode_p): Likewise.
17887         (x86_maybe_negate_const_int): Likewise.
17888         (ix86_expand_vector_init_duplicate): Likewise.
17889         (ix86_expand_vector_init_one_nonzero): Likewise.
17890         (ix86_expand_vector_init_one_var): Likewise.
17891         (ix86_expand_vector_init_concat): Likewise.
17892         (ix86_expand_vector_init_interleave): Likewise.
17893         (ix86_expand_vector_init_general): Likewise.
17894         (ix86_expand_vector_set): Likewise.
17895         (ix86_expand_vector_extract): Likewise.
17896         (emit_reduc_half): Likewise.
17897         (ix86_emit_i387_round): Likewise.
17898         (ix86_mangle_type): Likewise.
17899         (ix86_expand_round_sse4): Likewise.
17900         (expand_vec_perm_blend): Likewise.
17901         (canonicalize_vector_int_perm): Likewise.
17902         (ix86_expand_vec_one_operand_perm_avx512): Likewise.
17903         (expand_vec_perm_1): Likewise.
17904         (expand_vec_perm_interleave3): Likewise.
17905         (expand_vec_perm_even_odd_pack): Likewise.
17906         (expand_vec_perm_even_odd_1): Likewise.
17907         (expand_vec_perm_broadcast_1): Likewise.
17908         (ix86_vectorize_vec_perm_const_ok): Likewise.
17909         (ix86_expand_vecop_qihi): Likewise.
17910         (ix86_expand_mul_widen_hilo): Likewise.
17911         (ix86_expand_sse2_abs): Likewise.
17912         (ix86_expand_pextr): Likewise.
17913         (ix86_expand_pinsr): Likewise.
17914         (ix86_preferred_simd_mode): Likewise.
17915         (ix86_simd_clone_compute_vecsize_and_simdlen): Likewise.
17916         * config/i386/sse.md (*andnot<mode>3): Likewise.
17917         (<mask_codefor><code><mode>3<mask_name>): Likewise.
17918         (*<code><mode>3): Likewise.
17919         * config/ia64/ia64.c (ia64_expand_vecint_compare): Likewise.
17920         (ia64_expand_atomic_op): Likewise.
17921         (ia64_arg_type): Likewise.
17922         (ia64_mode_to_int): Likewise.
17923         (ia64_scalar_mode_supported_p): Likewise.
17924         (ia64_vector_mode_supported_p): Likewise.
17925         (expand_vec_perm_broadcast): Likewise.
17926         * config/iq2000/iq2000.c (iq2000_move_1word): Likewise.
17927         (iq2000_function_arg_advance): Likewise.
17928         (iq2000_function_arg): Likewise.
17929         * config/m32c/m32c.c (m32c_preferred_reload_class): Likewise.
17930         * config/m68k/m68k.c (output_dbcc_and_branch): Likewise.
17931         (m68k_libcall_value): Likewise.
17932         (m68k_function_value): Likewise.
17933         (sched_attr_op_type): Likewise.
17934         * config/mcore/mcore.c (mcore_output_move): Likewise.
17935         * config/microblaze/microblaze.c (microblaze_function_arg_advance):
17936         Likewise.
17937         (microblaze_function_arg): Likewise.
17938         * config/mips/mips.c (mips16_build_call_stub): Likewise.
17939         (mips_print_operand): Likewise.
17940         (mips_mode_ok_for_mov_fmt_p): Likewise.
17941         (mips_vector_mode_supported_p): Likewise.
17942         (mips_preferred_simd_mode): Likewise.
17943         (mips_expand_vpc_loongson_even_odd): Likewise.
17944         (mips_expand_vec_unpack): Likewise.
17945         (mips_expand_vi_broadcast): Likewise.
17946         (mips_expand_vector_init): Likewise.
17947         (mips_expand_vec_reduc): Likewise.
17948         (mips_expand_msa_cmp): Likewise.
17949         * config/mips/mips.md (casesi_internal_mips16_<mode>): Likewise.
17950         * config/mn10300/mn10300.c (mn10300_print_operand): Likewise.
17951         (cc_flags_for_mode): Likewise.
17952         * config/msp430/msp430.c (msp430_print_operand): Likewise.
17953         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Likewise.
17954         (nds32_output_casesi_pc_relative): Likewise.
17955         * config/nds32/nds32.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17956         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Likewise.
17957         (nvptx_gen_unpack): Likewise.
17958         (nvptx_gen_pack): Likewise.
17959         (nvptx_gen_shuffle): Likewise.
17960         (nvptx_gen_wcast): Likewise.
17961         (nvptx_preferred_simd_mode): Likewise.
17962         * config/pa/pa.c (pa_secondary_reload): Likewise.
17963         * config/pa/predicates.md (base14_operand): Likewise.
17964         * config/powerpcspe/powerpcspe-c.c
17965         (altivec_resolve_overloaded_builtin): Likewise.
17966         * config/powerpcspe/powerpcspe.c (rs6000_setup_reg_addr_masks):
17967         Likewise.
17968         (rs6000_preferred_simd_mode): Likewise.
17969         (output_vec_const_move): Likewise.
17970         (rs6000_expand_vector_extract): Likewise.
17971         (rs6000_split_vec_extract_var): Likewise.
17972         (reg_offset_addressing_ok_p): Likewise.
17973         (rs6000_legitimate_offset_address_p): Likewise.
17974         (rs6000_legitimize_address): Likewise.
17975         (rs6000_emit_set_const): Likewise.
17976         (rs6000_const_vec): Likewise.
17977         (rs6000_emit_move): Likewise.
17978         (spe_build_register_parallel): Likewise.
17979         (rs6000_darwin64_record_arg_recurse): Likewise.
17980         (swap_selector_for_mode): Likewise.
17981         (spe_init_builtins): Likewise.
17982         (paired_init_builtins): Likewise.
17983         (altivec_init_builtins): Likewise.
17984         (do_load_for_compare): Likewise.
17985         (rs6000_generate_compare): Likewise.
17986         (rs6000_expand_float128_convert): Likewise.
17987         (emit_load_locked): Likewise.
17988         (emit_store_conditional): Likewise.
17989         (rs6000_output_function_epilogue): Likewise.
17990         (rs6000_handle_altivec_attribute): Likewise.
17991         (rs6000_function_value): Likewise.
17992         (emit_fusion_gpr_load): Likewise.
17993         (emit_fusion_p9_load): Likewise.
17994         (emit_fusion_p9_store): Likewise.
17995         * config/powerpcspe/predicates.md (easy_fp_constant): Likewise.
17996         (fusion_gpr_mem_load): Likewise.
17997         (fusion_addis_mem_combo_load): Likewise.
17998         (fusion_addis_mem_combo_store): Likewise.
17999         * config/rs6000/predicates.md (easy_fp_constant): Likewise.
18000         (fusion_gpr_mem_load): Likewise.
18001         (fusion_addis_mem_combo_load): Likewise.
18002         (fusion_addis_mem_combo_store): Likewise.
18003         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
18004         Likewise.
18005         * config/rs6000/rs6000-string.c (do_load_for_compare): Likewise.
18006         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
18007         (rs6000_preferred_simd_mode): Likewise.
18008         (output_vec_const_move): Likewise.
18009         (rs6000_expand_vector_extract): Likewise.
18010         (rs6000_split_vec_extract_var): Likewise.
18011         (reg_offset_addressing_ok_p): Likewise.
18012         (rs6000_legitimate_offset_address_p): Likewise.
18013         (rs6000_legitimize_address): Likewise.
18014         (rs6000_emit_set_const): Likewise.
18015         (rs6000_const_vec): Likewise.
18016         (rs6000_emit_move): Likewise.
18017         (rs6000_darwin64_record_arg_recurse): Likewise.
18018         (swap_selector_for_mode): Likewise.
18019         (paired_init_builtins): Likewise.
18020         (altivec_init_builtins): Likewise.
18021         (rs6000_expand_float128_convert): Likewise.
18022         (emit_load_locked): Likewise.
18023         (emit_store_conditional): Likewise.
18024         (rs6000_output_function_epilogue): Likewise.
18025         (rs6000_handle_altivec_attribute): Likewise.
18026         (rs6000_function_value): Likewise.
18027         (emit_fusion_gpr_load): Likewise.
18028         (emit_fusion_p9_load): Likewise.
18029         (emit_fusion_p9_store): Likewise.
18030         * config/rx/rx.c (rx_gen_move_template): Likewise.
18031         (flags_from_mode): Likewise.
18032         * config/s390/predicates.md (s390_alc_comparison): Likewise.
18033         (s390_slb_comparison): Likewise.
18034         * config/s390/s390.c (s390_handle_vectorbool_attribute): Likewise.
18035         (s390_vector_mode_supported_p): Likewise.
18036         (s390_cc_modes_compatible): Likewise.
18037         (s390_match_ccmode_set): Likewise.
18038         (s390_canonicalize_comparison): Likewise.
18039         (s390_emit_compare_and_swap): Likewise.
18040         (s390_branch_condition_mask): Likewise.
18041         (s390_rtx_costs): Likewise.
18042         (s390_secondary_reload): Likewise.
18043         (__SECONDARY_RELOAD_CASE): Likewise.
18044         (s390_expand_cs): Likewise.
18045         (s390_preferred_simd_mode): Likewise.
18046         * config/s390/vx-builtins.md (vec_packsu_u<mode>): Likewise.
18047         * config/sh/sh.c (sh_print_operand): Likewise.
18048         (dump_table): Likewise.
18049         (sh_secondary_reload): Likewise.
18050         * config/sh/sh.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
18051         * config/sh/sh.md (casesi_worker_1): Likewise.
18052         (casesi_worker_2): Likewise.
18053         * config/sparc/predicates.md (icc_comparison_operator): Likewise.
18054         (fcc_comparison_operator): Likewise.
18055         * config/sparc/sparc.c (sparc_expand_move): Likewise.
18056         (emit_soft_tfmode_cvt): Likewise.
18057         (sparc_preferred_simd_mode): Likewise.
18058         (output_cbranch): Likewise.
18059         (sparc_print_operand): Likewise.
18060         (sparc_expand_vec_perm_bmask): Likewise.
18061         (vector_init_bshuffle): Likewise.
18062         * config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
18063         (spu_vector_mode_supported_p): Likewise.
18064         (spu_expand_insv): Likewise.
18065         (spu_emit_branch_or_set): Likewise.
18066         (spu_handle_vector_attribute): Likewise.
18067         (spu_builtin_splats): Likewise.
18068         (spu_builtin_extract): Likewise.
18069         (spu_builtin_promote): Likewise.
18070         (spu_expand_sign_extend): Likewise.
18071         * config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
18072         (tilegx_simd_int): Likewise.
18073         * config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p): Likewise.
18074         (tilepro_simd_int): Likewise.
18075         * config/v850/v850.c (const_double_split): Likewise.
18076         (v850_print_operand): Likewise.
18077         (ep_memory_offset): Likewise.
18078         * config/vax/vax.c (vax_rtx_costs): Likewise.
18079         (vax_output_int_move): Likewise.
18080         (vax_output_int_add): Likewise.
18081         (vax_output_int_subtract): Likewise.
18082         * config/visium/predicates.md (visium_branch_operator): Likewise.
18083         * config/visium/visium.c (rtx_ok_for_offset_p): Likewise.
18084         (visium_print_operand_address): Likewise.
18085         * config/visium/visium.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
18086         * config/xtensa/xtensa.c (xtensa_mem_offset): Likewise.
18087         (xtensa_expand_conditional_branch): Likewise.
18088         (xtensa_copy_incoming_a7): Likewise.
18089         (xtensa_output_literal): Likewise.
18090         * dfp.c (decimal_real_maxval): Likewise.
18091         * targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.
18093 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18094             Alan Hayward  <alan.hayward@arm.com>
18095             David Sherwood  <david.sherwood@arm.com>
18097         * genmodes.c (mode_size_inline): Add an E_ prefix to mode names.
18098         (mode_nunits_inline): Likewise.
18099         (mode_inner_inline): Likewise.
18100         (mode_unit_size_inline): Likewise.
18101         (mode_unit_precision_inline): Likewise.
18102         (emit_insn_modes_h): Likewise.  Also emit a #define of the
18103         unprefixed name.
18104         (emit_mode_wider): Add an E_ prefix to mode names.
18105         (emit_mode_complex): Likewise.
18106         (emit_mode_inner): Likewise.
18107         (emit_mode_adjustments): Likewise.
18108         (emit_mode_int_n): Likewise.
18109         * config/aarch64/aarch64-builtins.c (v8qi_UP, v4hi_UP, v4hf_UP)
18110         (v2si_UP, v2sf_UP, v1df_UP, di_UP, df_UP, v16qi_UP, v8hi_UP, v8hf_UP)
18111         (v4si_UP, v4sf_UP, v2di_UP, v2df_UP, ti_UP, oi_UP, ci_UP, xi_UP)
18112         (si_UP, sf_UP, hi_UP, hf_UP, qi_UP): Likewise.
18113         (CRC32_BUILTIN, ENTRY): Likewise.
18114         * config/aarch64/aarch64.c (aarch64_push_regs): Likewise.
18115         (aarch64_pop_regs): Likewise.
18116         (aarch64_process_components): Likewise.
18117         * config/alpha/alpha.c (alpha_emit_conditional_move): Likewise.
18118         * config/arm/arm-builtins.c (v8qi_UP, v4hi_UP, v4hf_UP, v2si_UP)
18119         (v2sf_UP, di_UP, v16qi_UP, v8hi_UP, v8hf_UP, v4si_UP, v4sf_UP)
18120         (v2di_UP, ti_UP, ei_UP, oi_UP, hf_UP, si_UP, void_UP): Likewise.
18121         * config/arm/arm.c (arm_init_libfuncs): Likewise.
18122         * config/i386/i386-builtin-types.awk (ix86_builtin_type_vect_mode):
18123         Likewise.
18124         * config/i386/i386-builtin.def (pcmpestr): Likewise.
18125         (pcmpistr): Likewise.
18126         * config/microblaze/microblaze.c (double_memory_operand): Likewise.
18127         * config/mmix/mmix.c (mmix_output_condition): Likewise.
18128         * config/powerpcspe/powerpcspe.c (rs6000_init_hard_regno_mode_ok):
18129         Likewise.
18130         * config/rl78/rl78.c (mduc_regs): Likewise.
18131         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
18132         (htm_expand_builtin): Likewise.
18133         * config/sh/sh.h (REGISTER_NATURAL_MODE): Likewise.
18134         * config/sparc/sparc.c (emit_save_or_restore_regs): Likewise.
18135         * config/xtensa/xtensa.c (print_operand): Likewise.
18136         * expmed.h (NUM_MODE_PARTIAL_INT): Likewise.
18137         (NUM_MODE_VECTOR_INT): Likewise.
18138         * genoutput.c (null_operand): Likewise.
18139         (output_operand_data): Likewise.
18140         * genrecog.c (print_parameter_value): Likewise.
18141         * lra.c (debug_operand_data): Likewise.
18143 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18145         * dwarf2out.c (scompare_loc_descriptor_wide)
18146         (scompare_loc_descriptor_narrow): New functions, split out from...
18147         (scompare_loc_descriptor): ...here.
18148         * expmed.c (emit_store_flag_int): New function, split out from...
18149         (emit_store_flag): ...here.
18151 2017-08-30  Richard Biener  <rguenther@suse.de>
18153         * dwarf2out.c (dwarf2out_finish): Remove setting AT_pubnames.
18154         (dwarf2out_early_finish): Move setting of AT_pubnames from
18155         early debug output to early finish.
18157 2017-08-30  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
18159         * gcc/config/msp430/msp430.h: Pass -mcode/data-region to the linker
18160         and -mdata-region to the assembler.
18162 2017-08-30  Richard Biener  <rguenther@suse.de>
18164         * dwarf2out.c (add_dwarf_attr): Check we don't add duplicate
18165         attributes.
18166         (gen_subprogram_die): Add DW_AT_object_pointer only early.
18167         (dwarf2out_early_global_decl): Only generate a DIE for the
18168         abstract origin if it doesn't already exist or is a declaration DIE.
18169         (resolve_addr): Do not add the linkage name twice when
18170         generating a stub DIE for the DW_TAG_GNU_call_site target.
18172 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18174         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
18175         Use machine_mode rather than int for arg1_mode.
18177 2017-08-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
18179         PR target/82015
18180         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Insure
18181         that the second argument of the built-in functions to unpack
18182         128-bit scalar types to 64-bit values is 0 or 1.  Change to use a
18183         switch statement instead a lot of if statements.
18184         * config/rs6000/rs6000.md (unpack<mode>, FMOVE128_VSX iterator):
18185         Allow 64-bit values to be in Altivec registers as well as
18186         traditional floating point registers.
18187         (pack<mode>, FMOVE128_VSX iterator): Likewise.
18189 2017-08-29  Alexander Monakov  <amonakov@ispras.ru>
18191         * ira-costs.c (record_address_regs): Handle both operands of PLUS for
18192         MAX_REGS_PER_ADDRESS == 1.
18194 2017-08-29  Uros Bizjak  <ubizjak@gmail.com>
18196         * config/i386/i386.opt (flag_fentry): Do not init to -1.
18197         * config/i386/i386.c (ix86_option_override_internal): Simplify
18198         setting of opts->x_flag_entry.
18200 2017-08-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18201             Jakub Jelinek  <jakub@redhat.com>
18202             Richard Biener  <rguenther@suse.de>
18204         PR tree-optimization/81503
18205         * gimple-ssa-strength-reduction.c (replace_mult_candidate): Ensure
18206         folded constant fits in the target type; reorder tests for clarity.
18208 2017-08-29  Martin Liska  <mliska@suse.cz>
18210         * passes.def: Include pass_lower_switch.
18211         * stmt.c (dump_case_nodes): Remove and move to
18212         tree-switch-conversion.
18213         (case_values_threshold): Likewise.
18214         (expand_switch_as_decision_tree_p): Likewise.
18215         (emit_case_decision_tree): Likewise.
18216         (expand_case): Likewise.
18217         (balance_case_nodes): Likewise.
18218         (node_has_low_bound): Likewise.
18219         (node_has_high_bound): Likewise.
18220         (node_is_bounded): Likewise.
18221         (emit_case_nodes): Likewise.
18222         (struct simple_case_node): New struct.
18223         (add_case_node): Remove.
18224         (emit_case_dispatch_table): Use vector instead of case_list.
18225         (reset_out_edges_aux): Remove.
18226         (compute_cases_per_edge): Likewise.
18227         (expand_case): Build list of simple_case_node.
18228         (expand_sjlj_dispatch_table): Use it.
18229         * tree-switch-conversion.c (struct case_node): Moved from
18230         stmt.c and adjusted.
18231         (emit_case_nodes): Likewise.
18232         (node_has_low_bound): Likewise.
18233         (node_has_high_bound): Likewise.
18234         (node_is_bounded): Likewise.
18235         (case_values_threshold): Likewise.
18236         (reset_out_edges_aux): Likewise.
18237         (compute_cases_per_edge): Likewise.
18238         (add_case_node): Likewise.
18239         (dump_case_nodes): Likewise.
18240         (balance_case_nodes): Likewise.
18241         (expand_switch_as_decision_tree_p): Likewise.
18242         (emit_jump): Likewise.
18243         (emit_case_decision_tree): Likewise.
18244         (try_switch_expansion): Likewise.
18245         (do_jump_if_equal): Likewise.
18246         (emit_cmp_and_jump_insns): Likewise.
18247         (fix_phi_operands_for_edge): New function.
18248         (record_phi_operand_mapping): Likewise.
18249         (class pass_lower_switch): New pass.
18250         (pass_lower_switch::execute): New function.
18251         (make_pass_lower_switch): Likewise.
18252         (conditional_probability):
18253         * timevar.def: Add TV_TREE_SWITCH_LOWERING.
18254         * tree-pass.h: Add make_pass_lower_switch.
18256 2017-08-29  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
18258         PR target/80993
18259         * gcc/config/msp430/msp430.c (msp430_attr): Mark interrupt
18260         handlers as used.
18262 2017-08-29  Richard Biener  <rguenther@suse.de>
18264         * dwarf2out.c (add_dwarf_attr): When checking is enabled verify
18265         we do not add a DW_AT_inline attribute twice.
18266         (gen_subprogram_die): Remove code setting DW_AT_inline on
18267         DECL_ABSTRACT_P nodes.
18269 2017-08-29  Richard Sandiford  <richard.sandiford@linaro.org>
18271         * gimplify.c (gimplify_call_expr): Copy the nothrow flag to
18272         calls to internal functions.
18273         (gimplify_modify_expr): Likewise.
18274         * tree-call-cdce.c (use_internal_fn): Likewise.
18275         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
18276         (convert_to_divmod): Set the nothrow flag.
18277         * tree-if-conv.c (predicate_mem_writes):  Likewise.
18278         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
18279         (vectorizable_call): Likewise.
18280         (vectorizable_store): Likewise.
18281         (vectorizable_load): Likewise.
18282         * tree-vect-patterns.c (vect_recog_pow_pattern): Likewise.
18283         (vect_recog_mask_conversion_pattern): Likewise.
18285 2017-08-29  Martin Liska  <mliska@suse.cz>
18287         PR other/39851
18288         * gcc.c (driver_handle_option): Add new argument.
18289         * opts-common.c (handle_option): Pass
18290         target_option_override_hook.
18291         * opts-global.c (lang_handle_option): Add new option.
18292         (set_default_handlers):  Add new argument.
18293         (decode_options): Likewise.
18294         * opts.c (target_handle_option): Likewise.
18295         (common_handle_option): Call target_option_override_hook.
18296         * opts.h (struct cl_option_handler_func): Add hook for
18297         target option override.
18298         (struct cl_option_handlers): Likewise.
18299         (set_default_handlers): Add new argument.
18300         (decode_options): Likewise.
18301         (common_handle_option): Likewise.
18302         (target_handle_option): Likewise.
18303         * toplev.c (toplev::main): Pass targetm.target_option.override
18304         hook.
18306 2017-08-29  Richard Biener  <rguenther@suse.de>
18307         Dominik Infuehr <dominik.infuehr@theobroma-systems.com>
18309         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Properly confine
18310         life to the active subtree.
18312 2017-08-28  Jeff Law  <law@redhat.com>
18314         * tree-ssa-dom.c (edge_info::record_simple_equiv): Call
18315         derive_equivalences.
18316         (derive_equivalences_from_bit_ior, record_temporary_equivalences):
18317         Code moved into....
18318         (edge_info::derive_equivalences): New private member function
18320         * tree-ssa-dom.c (class edge_info): Changed from a struct
18321         to a class.  Add ctor/dtor, methods and data members.
18322         (edge_info::edge_info): Renamed from allocate_edge_info.
18323         Initialize additional members.
18324         (edge_info::~edge_info): New.
18325         (free_dom_edge_info): Delete the edge info.
18326         (record_edge_info): Use new class & associated member functions.
18327         Tighten forms for testing for edge equivalences.
18328         (record_temporary_equivalences): Iterate over the simple
18329         equivalences rather than assuming there's only one per edge.
18330         (cprop_into_successor_phis): Iterate over the simple
18331         equivalences rather than assuming there's only one per edge.
18332         (optimize_stmt): Use operand_equal_p rather than pointer
18333         equality for mini-DSE code.
18335 2017-08-28  Nathan Sidwell  <nathan@acm.org>
18337         * gcc.c (execute): Fold SIGPIPE handling into switch
18338         statement.  Adjust internal error message.
18340 2017-08-28  Richard Biener  <rguenther@suse.de>
18342         PR debug/81993
18343         * dwarf2out.c (gen_remaining_tmpl_value_param_die_attributes):
18344         Do nothing for removed DIEs.
18346 2017-08-28  Richard Biener  <rguenther@suse.de>
18348         PR tree-optimization/81977
18349         * tree-ssa-sccvn.c (vn_reference_lookup_3): Fix look through
18350         memcpy.
18352 2017-08-28  Alexander Monakov  <amonakov@ispras.ru>
18354         PR target/80640
18355         * doc/md.texi (mem_thread_fence): Remove mention of mode.  Rewrite.
18356         * optabs.c (expand_mem_thread_fence): Emit a compiler barrier when
18357         using targetm.gen_mem_thread_fence.
18359 2017-08-27  Uros Bizjak  <ubizjak@gmail.com>
18361         PR target/81995
18362         * config/i386/i386.md (*<btsc><mode>): Change operand 2
18363         predicate to register_operand.  Reorder operands.
18364         (*btr<mode>): Ditto.
18365         (*<btsc><mode>_mask): Change operand 3 predicate to register_operand.
18366         (*btr<mode>_mask): Ditto.
18368 2017-08-25  Steven Munroe  <munroesj@gcc.gnu.org>
18370         * config.gcc (powerpc*-*-*): Add xmmintrin.h and mm_malloc.h.
18371         * config/rs6000/xmmintrin.h: New file.
18372         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include xmmintrin.h.
18374 2017-08-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18376         PR target/81504
18377         * config/rs6000/rs6000-p8swap.c (find_alignment_op): Add reference
18378         parameter and_insn and return it.
18379         (recombine_lvx_pattern): Insert a copy to ensure availability of
18380         the base register of the copied masking operation at the point of
18381         the instruction replacement.
18382         (recombine_stvx_pattern): Likewise.
18384 2017-08-25  Michael Meissner  <meissner@linux.vnet.ibm.com>
18386         * config/rs6000/rs6000.opt (-mpower9-dform-scalar): Delete
18387         undocumented switches.
18388         (-mpower9-dform-vector): Likewise.
18389         (-mpower9-dform): Likewise.
18390         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
18391         comments to delete references to -mpower9-dform* switches.
18392         * config/rs6000/predicates.md (vsx_quad_dform_memory_operand):
18393         Delete reference to -mpower9-dform* switches, test for
18394         -mpower9-vector instead.
18395         * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Likewise.
18396         (OTHER_P9_VECTOR_MASKS): Likewise.
18397         (POWERPC_MASKS): Likewise.
18398         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Change
18399         tests against -mpower9-dform* to -mpower9-vector.  Delete code
18400         that checked for -mpower9-dform* consistancy with other options.
18401         Add test for -mpower9-misc to enable other power9 switches.
18402         (rs6000_init_hard_regno_mode_ok): Likewise.
18403         (rs6000_option_override_internal): Likewise.
18404         (rs6000_emit_prologue): Likewise.
18405         (rs6000_emit_epilogue): Likewise.
18406         (rs6000_opt_masks): Delete -mpower9-dform-{scalar,vector}.
18407         (rs6000_disable_incompatiable_switches): Delete -mpower9-dform.
18408         (emit_fusion_p9_load): Change tests for -mpower9-dform-scalar
18409         -mpower9-vector.
18410         (emit_fusion_p9_store): Likewise.
18411         * config/rs6000/rs6000.h (TARGET_P9_DFORM_SCALAR): Delete
18412         resetting these macros if the assembler does not support ISA 3.0
18413         instructions.
18414         (TARGET_P9_DFORM_VECTOR): Likewise.
18415         * config/rs6000/rs6000.md (peepholes to optimize altivec memory):
18416         Change to use -mpower9-vector instead of -mpower9-dform-scalar.
18418 2017-08-25  Alan Modra  <amodra@gmail.com>
18420         PR rtl-optimization/81747
18421         * cse.c (cse_extended_basic_block): Don't attempt to record
18422         equivalences for degenerate conditional branches that branch
18423         to their fall-through.
18425 2017-08-24  Martin Sebor  <msebor@redhat.com>
18427         PR middle-end/81908
18428         * gimple-fold.c (size_must_be_zero_p): New function.
18429         (gimple_fold_builtin_memory_op): Call it.
18431 2017-08-24  Steven Munroe  <munroesj@gcc.gnu.org>
18433         * config/rs6000/mm_malloc.h: New file.
18435 2017-08-24  Bin Cheng  <bin.cheng@arm.com>
18437         PR tree-optimization/81913
18438         * tree-ssa-loop-niter.c (number_of_iterations_cond): Skip niter
18439         analysis when either IVs in condition can wrap.
18441 2017-08-24  Uros Bizjak  <ubizjak@gmail.com>
18443         * dwarf2out.c (MAX_ARTIFICIAL_LABEL_BYTES): Increase to 40.
18444         * dwarf2cfi.c (MAX_ARTIFICIAL_LABEL_BYTES): Remove.
18446 2017-08-24  Richard Biener  <rguenther@suse.de>
18448         PR target/81921
18449         * targhooks.c (default_target_can_inline_p): Properly
18450         use target_option_default_node when no DECL_FUNCTION_SPECIFIC_TARGET
18451         is present and always compare.
18452         * config/i386/i386.c (ix86_valid_target_attribute_tree): Do not
18453         infer -mfpmath=sse from TARGET_SSE_P.
18454         (ix86_can_inline_p): Properly use target_option_default_node when
18455         no DECL_FUNCTION_SPECIFIC_TARGET is present and always compare.
18457 2017-08-24  Richard Biener  <rguenther@suse.de>
18459         PR debug/81936
18460         * dwarf2out.c (output_die): Handle flag_generate_offload like
18461         flag_generate_lto.
18462         (output_comp_unit): Likewise.
18463         (gen_array_type_die): Likewise.
18464         (dwarf2out_early_finish): Likewise.
18465         (note_variable_value_in_expr): Likewise.
18466         (dwarf2out_finish): Likewise.  Adjust assert.
18467         * cgraphunit.c (symbol_table::compile): Move setting of
18468         flag_generate_offload earlier ...
18469         (symbol_table::finalize_compilation_unit): ... here, before
18470         early debug finalization.
18472 2017-08-24  Richard Biener  <rguenther@suse.de>
18474         * config/i386/i386.c: Include symbol-summary.h, ipa-prop.h
18475         and ipa-fnsummary.h.
18476         (ix86_can_inline_p): When ix86_fpmath flags do not match
18477         check whether the callee uses FP math at all.
18479 2017-08-24  Aldy Hernandez  <aldyh@redhat.com>
18481         PR middle-end/81931
18482         * tree-ssanames.c (get_nonzero_bits): Use element_precision
18483         instead of TYPE_PRECISION.
18485 2017-08-24  Richard Sandiford  <richard.sandiford@linaro.org>
18486             Alan Hayward  <alan.hayward@arm.com>
18487             David Sherwood  <david.sherwood@arm.com>
18489         * combine.c (make_extraction): Use subreg_offset_from_lsb.
18491 2017-08-23  Daniel Santos  <daniel.santos@pobox.com>
18493         * config/i386/i386.h (ix86_frame::stack_realign_allocate_offset):
18494         Remove field.
18495         (ix86_frame::stack_realign_allocate): New field.
18496         (struct machine_frame_state): Modify comments.
18497         (machine_frame_state::sp_realigned_fp_end): New field.
18498         * config/i386/i386.c (ix86_compute_frame_layout): Rework stack frame
18499         layout calculation.
18500         (sp_valid_at): Add assertion to assure no attempt to access invalid
18501         offset of a realigned stack.
18502         (fp_valid_at): Likewise.
18503         (choose_baseaddr): Modify comments.
18504         (ix86_emit_outlined_ms2sysv_save): Adjust to changes in
18505         ix86_expand_prologue.
18506         (ix86_expand_prologue): Modify stack realignment and allocation.
18507         (ix86_expand_epilogue): Modify comments.
18508         * doc/sourcebuild.texi: Add documentation for target selectors avx2,
18509         avx2_runtime, avx512f, and avx512f_runtime.
18511 2017-08-23  Uros Bizjak  <ubizjak@gmail.com>
18513         * config/i386/i386.opt: Remove unneeded Init(0) initializations.
18514         (mstackrealign): Do not init to -1.
18515         * config/i386/i386.c (ix86_option_override_internal):
18516         Check opts_set, not opts when setting default value of
18517         opts->x_ix86_force_align_arg_pointer.
18519 2017-08-23  Richard Biener  <rguenther@suse.de>
18521         * function.c (fndecl_name): Use verbosity 1 (no arguments) for
18522         lang_hooks.decl_printable_name.
18523         * print-rtl-function.c (print_rtx_function): Likewise.
18524         * tree-pretty-print.c (dump_function_header): Likewise.
18526 2017-08-23  Richard Biener  <rguenther@suse.de>
18528         PR lto/81940
18529         * dwarf2out.c (dwarf2out_abstract_function): Handle LTO with
18530         -g0 at compile-time.
18532 2017-08-23  Tamar Christina  <tamar.christina@arm.com>
18534         PR middle-end/19706
18535         * doc/sourcebuild.texi (Other hardware attributes):
18536         Document xorsign.
18538 2017-08-23  Tamar Christina  <tamar.christina@arm.com>
18540         PR middle-end/19706
18541         * tree-ssa-math-opts.c (convert_expand_mult_copysign):
18542         Fix single-use check.
18544 2017-08-23  Thomas Preud'homme  <thomas.preudhomme@arm.com>
18546         * gcc.c (execute): Only test for SIGKILL and SIGQUIT if available.
18548 2017-08-22  Daniel Santos  <daniel.santos@pobox.com>
18550         * doc/install.texi: Modify to add more details on running selected
18551         tests.
18553 2017-08-22  Daniel Santos  <daniel.santos@pobox.com>
18555         * config/i386/i386.c (ix86_option_override_internal): Error when -mx32
18556         is combined with -mabi=ms.
18557         (ix86_function_type_abi): Limit errors for mixing -mx32 with attribute
18558         ms_abi.
18560 2017-08-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18562         PR tree-optimization/81488
18563         * gimple-ssa-strength-reduction (struct slsr_cand_d): Add visited
18564         and cached_basis fields.
18565         (MAX_SPREAD): New constant.
18566         (alloc_cand_and_find_basis): Initialize new fields.
18567         (clear_visited): New function.
18568         (create_phi_basis_1): Rename from create_phi_basis, set visited
18569         and cached_basis fields.
18570         (create_phi_basis): New wrapper function.
18571         (phi_add_costs_1): Rename from phi_add_costs, add spread
18572         parameter, set visited field, short-circuit when limits reached.
18573         (phi_add_costs): New wrapper function.
18574         (record_phi_increments_1): Rename from record_phi_increments, set
18575         visited field.
18576         (record_phi_increments): New wrapper function.
18577         (phi_incr_cost_1): Rename from phi_incr_cost, set visited field.
18578         (phi_incr_cost): New wrapper function.
18579         (all_phi_incrs_profitable_1): Rename from
18580         all_phi_incrs_profitable, set visited field.
18581         (all_phi_incrs_profitable): New wrapper function.
18583 2017-08-22  Richard Sandiford  <richard.sandiford@linaro.org>
18584             Alan Hayward  <alan.hayward@arm.com>
18585             David Sherwood  <david.sherwood@arm.com>
18587         * rtl.h (paradoxical_subreg_p): Define inline, and add a version
18588         that takes the outer and inner modes.
18589         * doc/rtl.texi: Use paradoxical_subreg_p instead of a GET_MODE_SIZE
18590         comparison as the canonical test for a paradoxical subreg.
18591         * combine.c (simplify_set): Use paradoxical_subreg_p.
18592         (make_extraction): Likewise.
18593         (force_to_mode): Likewise.
18594         (rtx_equal_for_field_assignment_p): Likewise.
18595         (gen_lowpart_for_combine): Likewise.
18596         (simplify_comparison): Likewise.
18597         * cse.c (equiv_constant): Likewise.
18598         * expmed.c (store_bit_field_1): Likewise.
18599         * final.c (alter_subreg): Likewise.
18600         * fwprop.c (propagate_rtx): Likewise.
18601         (forward_propagate_subreg): Likewise.
18602         * ira-conflicts.c (ira_build_conflicts): Likewise.
18603         * lower-subreg.c (simplify_gen_subreg_concatn): Likewise.
18604         * lra-constraints.c (curr_insn_transform): Likewise.
18605         (split_reg): Likewise.
18606         * lra-eliminations.c (move_plus_up): Likewise.
18607         (lra_eliminate_regs_1): Likewise.
18608         * recog.c (general_operand): Likewise.
18609         * ree.c (combine_reaching_defs): Likewise.
18610         * reload.c (push_reload): Likewise.
18611         (find_reloads): Likewise.
18612         * reload1.c (elimination_effects): Likewise.
18613         (compute_reload_subreg_offset): Likewise.
18614         (choose_reload_regs): Likewise.
18615         * rtlanal.c (subreg_lsb_1): Likewise.
18616         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
18617         (simplify_subreg): Likewise.
18618         * var-tracking.c (track_loc_p): Likewise.
18619         * emit-rtl.c (byte_lowpart_offset): Likewise.
18620         (paradoxical_subreg_p): Delete out-of-line definition.
18622 2017-08-22  Jeff Law  <law@redhat.com>
18624         PR tree-optimization/81741
18625         PR tree-optimization/71947
18626         * tree-ssa-dom.c: Include tree-inline.h.
18627         (record_temporary_equivalences): Only record SSA_NAME = SSA_NAME
18628         equivalences if one is more expensive to compute than the other.
18629         * tree-ssa-scopedtables.h (class const_or_copies): Make
18630         record_const_or_copy_raw method private.
18631         (class avail_exprs_stack): New method simplify_binary_operation.
18632         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr): Call
18633         avail_exprs_stack::simplify_binary_operation as needed.
18634         (avail_exprs_stack::simplify_binary_operation): New function.
18636 2017-08-22  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18638         * config.gcc (powerpc-*-rtems*): Add rs6000/linux64.opt.
18639         * config/rs6000/rtems.h (ASM_PREFERRED_EH_DATA_FORMAT): New define.
18640         (DOT_SYMBOLS): Likewise.
18641         (MINIMAL_TOC_SECTION_ASM_OP): Likewise.
18642         (RELOCATABLE_NEEDS_FIXUP): Likewise.
18643         (RS6000_ABI_NAME): Likewise.
18644         (TARGET_CMODEL): Likewise.
18645         (TOC_SECTION_ASM_OP): Likewise.
18646         (SET_CMODEL): New macro.
18647         (SUBSUBTARGET_OVERRIDE_OPTIONS): Evaluate cmodel options.
18649 2017-08-22  Richard Biener  <rguenther@suse.de>
18651         * tree-inline.c (remap_type_1): Change asserts on TYPE_SIZE[_UNIT]
18652         to allow for free-lang-data replacements similar to verify_type_variant.
18654 2017-08-22  Richard Sandiford  <richard.sandiford@linaro.org>
18655             Alan Hayward  <alan.hayward@arm.com>
18656             David Sherwood  <david.sherwood@arm.com>
18658         * config/aarch64/aarch64.md (casesi): Use DImode rather than
18659         VOIDmode for the LABEL_REF.
18661 2017-08-22  Richard Biener  <rguenther@suse.de>
18663         * tree-cfg.c (gimple_split_edge): Avoid reallocating target PHI nodes.
18665 2017-08-22  Richard Biener  <rguenther@suse.de>
18667         * common.opt (feliminate-dwarf2-dups): Ignore.
18668         * doc/invoke.texi (feliminate-dwarf2-dups): Remove documentation.
18669         * dwarf2out.c (push_new_compile_unit, pop_compile_unit,
18670         same_die_p_wrap, compute_section_prefix,
18671         is_symbol_die, assign_symbol_names, break_out_includes): Remove.
18672         (comdat_symbol_id, comdat_symbol_number): Likewise.
18673         (cu_hash_table_entry, cu_hash_table_entry_hasher, cu_hash_type):
18674         Likewise.
18675         (check_duplicate_cu, record_comdat_symbol_number): Likewise.
18676         (output_die): Mark unreachable path unreachable.
18677         (dwarf2out_start_source_file): Do not create DW_TAG_GNU_BINCL.
18678         (dwarf2out_end_source_file): Do not create DW_TAG_GNU_EINCL.
18679         (dwarf2out_init): Remove code handling flag_eliminate_dwarf2_dups.
18680         (dwarf2out_early_finish): Likewise.
18682 2017-08-22  Aldy Hernandez  <aldyh@redhat.com>
18684         * wide-int.h (hwi_with_prec::hwi_with_prec): Sign extend.
18686 2017-08-22  Georg-Johann Lay  <avr@gjlay.de>
18688         PR target/81910
18689         * config/avr/avr.c (avr_handle_addr_attribute): Early return if
18690         not VAR_P. Filter attribute warnings with OPT_Wattributes.
18691         (avr_attribute_table) <io, io_low, address>: Initialize
18692         .decl_required with true.
18694 2017-08-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
18696         * config/rs6000/rs6000-cpus.def (-mvsx-scalar-float): Delete
18697         undocumented debugging options.
18698         (-mvsx-scalar-double): Likewise.
18699         (-mallow-df-permute): Likewise.
18700         (-mvectorize-builtins): Likewise.
18701         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
18702         (rs6000_builtin_vectorized_function): Likewise.
18703         (rs6000_builtin_md_vectorized_function): Likewise.
18704         (rs6000_opt_vars): Likewise.
18706 2017-08-21  Uros Bizjak  <ubizjak@gmail.com>
18708         PR target/46091
18709         * config/i386/i386.md (*btsq_imm): Rename from *btsq.
18710         (*btrq_imm): Rename from *btrq.
18711         (*btcq_imm): Rename from *btcq.
18712         (btsc): New code attribute.
18713         (*<btsc><mode>): New insn pattern.
18714         (*btr<mode>): Ditto.
18715         (*<btsc><mode>_mask): New insn_and_split pattern.
18716         (*btr<mode>_mask): Ditto.
18718 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
18719             Alan Hayward  <alan.hayward@arm.com>
18720             David Sherwood  <david.sherwood@arm.com>
18722         * function.c (pad_below): Simplify padding calculation.
18724 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
18725             Alan Hayward  <alan.hayward@arm.com>
18726             David Sherwood  <david.sherwood@arm.com>
18728         * target.def (function_prologue): Remove frame size argument.
18729         (function_epilogue): Likewise.
18730         * doc/tm.texi: Regenerate.
18731         * final.c (final_start_function): Update call to function_prologue.
18732         (final_end_function): Update call to function_epilogue.
18733         (default_function_pro_epilogue): Remove frame size argument.
18734         * output.h (default_function_pro_epilogue): Likewise.
18735         * config/arm/arm.c (arm_output_function_epilogue): Likewise.
18736         (arm_output_function_prologue): Likewise.
18737         * config/frv/frv.c (frv_function_prologue): Likewise.
18738         (frv_function_epilogue): Likewise.
18739         * config/i386/i386.c (ix86_output_function_epilogue): Likewise.
18740         * config/ia64/ia64.c (ia64_output_function_prologue): Likewise.
18741         (ia64_output_function_epilogue): Likewise.
18742         * config/m32r/m32r.c (m32r_output_function_prologue): Likewise.
18743         (m32r_output_function_epilogue): Likewise.
18744         * config/microblaze/microblaze.c (microblaze_function_prologue)
18745         (microblaze_function_epilogue): Likewise.
18746         * config/mips/mips.c (mips_output_function_prologue): Likewise.
18747         (mips_output_function_epilogue): Likewise.
18748         * config/mmix/mmix.c (mmix_target_asm_function_prologue): Likewise.
18749         (mmix_target_asm_function_epilogue): Likewise.
18750         * config/msp430/msp430.c (msp430_start_function): Likewise.
18751         * config/nds32/nds32.c (nds32_asm_function_prologue): Likewise.
18752         (nds32_asm_function_epilogue): Likewise.
18753         * config/nios2/nios2.c (nios2_asm_function_prologue): Likewise.
18754         * config/pa/pa.c (pa_output_function_prologue): Likewise.
18755         (pa_output_function_epilogue): Likewise.
18756         * config/powerpcspe/powerpcspe.c (rs6000_output_function_prologue)
18757         (rs6000_output_function_epilogue): Likewise.
18758         * config/rl78/rl78.c (rl78_start_function): Likewise.
18759         * config/rs6000/rs6000.c (rs6000_output_function_prologue): Likewise.
18760         (rs6000_output_function_epilogue): Likewise.
18761         * config/rx/rx.c (rx_output_function_prologue): Likewise.
18762         * config/sh/sh.c (sh_output_function_epilogue): Likewise.
18763         * config/sparc/sparc.c (sparc_asm_function_prologue): Likewise.
18764         (sparc_asm_function_epilogue): Likewise.
18766 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
18768         * tree.h (type_has_mode_precision_p): New function.
18769         * convert.c (convert_to_integer_1): Use it.
18770         * expr.c (expand_expr_real_2): Likewise.
18771         (expand_expr_real_1): Likewise.
18772         * fold-const.c (fold_single_bit_test_into_sign_test): Likewise.
18773         * match.pd: Likewise.
18774         * tree-ssa-forwprop.c (simplify_rotate): Likewise.
18775         * tree-ssa-math-opts.c (convert_mult_to_fma): Likewise.
18776         * tree-tailcall.c (process_assignment): Likewise.
18777         * tree-vect-loop.c (vectorizable_reduction): Likewise.
18778         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern)
18779         (vect_recog_mult_pattern, vect_recog_divmod_pattern): Likewise.
18780         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
18781         (vectorizable_assignment): Likewise.
18782         (vectorizable_shift): Likewise.
18783         (vectorizable_operation): Likewise.
18784         * tree-vrp.c (register_edge_assert_for_2): Likewise.
18786 2017-08-21  Wilco Dijkstra  <wdijkstr@arm.com>
18788         * match.pd: Add pow (C, x) simplification.
18790 2017-08-21  Richard Biener  <rguenther@suse.de>
18792         PR tree-optimization/81900
18793         * tree-ssa-pre.c (compute_antic_aux): Properly compute changed
18794         for blocks with abnormal predecessors.
18795         (compute_antic): Do not set visited flag prematurely.
18797 2017-08-21  Georg-Johann Lay  <avr@gjlay.de>
18799         PR target/79883
18800         * config/avr/avr.c (avr_set_current_function): Typo in diagnostic.
18802 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
18804         * stor-layout.h (vector_type_mode): Move to...
18805         * tree.h (vector_type_mode): ...here.
18806         * stor-layout.c (vector_type_mode): Move to...
18807         * tree.c (vector_type_mode): ...here.  Include rtl.h and regs.h.
18809 2017-08-21  Richard Biener  <rguenther@suse.de>
18811         * debug.h (struct gcc_debug_hooks): Add die_ref_for_decl and
18812         register_external_die hooks.
18813         (debug_false_tree_charstarstar_uhwistar): Declare.
18814         (debug_nothing_tree_charstar_uhwi): Likewise.
18815         * debug.c (do_nothing_debug_hooks): Adjust.
18816         (debug_false_tree_charstarstar_uhwistar): New do nothing.
18817         (debug_nothing_tree_charstar_uhwi): Likewise.
18818         * dbxout.c (dbx_debug_hooks): Adjust.
18819         (xcoff_debug_hooks): Likewise.
18820         * sdbout.c (sdb_debug_hooks): Likewise.
18821         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
18822         * dwarf2out.c (macinfo_label_base): New global.
18823         (dwarf2out_register_external_die): New function for the
18824         register_external_die hook.
18825         (dwarf2out_die_ref_for_decl): Likewise for die_ref_for_decl.
18826         (dwarf2_debug_hooks): Use them.
18827         (dwarf2_lineno_debug_hooks): Adjust.
18828         (struct die_struct): Add with_offset flag.
18829         (DEBUG_LTO_DWO_INFO_SECTION, DEBUG_LTO_INFO_SECTION,
18830         DEBUG_LTO_DWO_ABBREV_SECTION, DEBUG_LTO_ABBREV_SECTION,
18831         DEBUG_LTO_DWO_MACINFO_SECTION, DEBUG_LTO_MACINFO_SECTION,
18832         DEBUG_LTO_DWO_MACRO_SECTION, DEBUG_LTO_MACRO_SECTION,
18833         DEBUG_LTO_LINE_SECTION, DEBUG_LTO_DWO_STR_OFFSETS_SECTION,
18834         DEBUG_LTO_STR_DWO_SECTION, DEBUG_STR_LTO_SECTION): New macros
18835         defining section names for the early LTO debug variants.
18836         (reset_indirect_string): New helper.
18837         (add_AT_external_die_ref): Helper for dwarf2out_register_external_die.
18838         (print_dw_val): Add support for offsetted symbol references.
18839         (get_ultimate_context): Split out from is_cxx.
18840         (is_cxx): Use get_ultimate_context.
18841         (is_fortran): Add decl overload.
18842         (compute_comp_unit_symbol): Split out worker from
18843         compute_section_prefix.
18844         (compute_section_prefix): Call compute_comp_unit_symbol and
18845         set comdat_type_p here.
18846         (output_die): Skip DIE symbol output for the LTO added one.
18847         Handle DIE symbol references with offset.
18848         (output_comp_unit): Guard section name mangling properly.
18849         For LTO debug sections emit a symbol at the section beginning
18850         which we use to refer to its DIEs.
18851         (add_abstract_origin_attribute): For DIEs registered via
18852         dwarf2out_register_external_die directly refer to the early
18853         DIE rather than indirectly through the shadow one we created.
18854         Remove obsolete call to dwarf2out_abstract_function for
18855         non-function/block origins.
18856         (gen_array_type_die): When generating early LTO debug do
18857         not emit DW_AT_string_length.
18858         (gen_formal_parameter_die): Do not re-create DIEs for PARM_DECLs
18859         late when in LTO.  As suggested place a gcc_unreachable for
18860         the DECL_ABSTRACT_P case.
18861         (gen_subprogram_die): Avoid another specification DIE
18862         for early built declarations/definitions for the late LTO case.
18863         (gen_variable_die): Add type references for late duplicated VLA dies
18864         when in late LTO.
18865         (gen_inlined_subroutine_die): Do not call dwarf2out_abstract_function,
18866         we have the abstract instance already.
18867         (process_scope_var): Adjust decl DIE contexts in LTO which
18868         first puts them in limbo.
18869         (gen_decl_die): Do not generate type DIEs late apart from
18870         types for VLAs or for decls we do not yet have a DIE.  Do not
18871         call dwarf2out_abstract_function late.
18872         (dwarf2out_early_global_decl): Make sure to create DIEs
18873         for abstract instances of a decl first.
18874         (dwarf2out_late_global_decl): Adjust comment.
18875         (output_macinfo_op): With multiple macro sections use
18876         macinfo_label_base to distinguish labels.
18877         (output_macinfo): Likewise.  Update macinfo_label_base.
18878         Pass in the line info label.
18879         (note_variable_value_in_expr): When generating LTO resolve
18880         all variable values here by generating DIEs as needed.
18881         (init_sections_and_labels): Add early LTO debug flag parameter
18882         and generate different sections and names if set.  Add generation
18883         counter for the labels so we can have multiple of them.
18884         (reset_dies): Helper to allow DIEs to be output multiple times.
18885         (dwarf2out_finish): When outputting DIEs to the fat part of an
18886         LTO object first reset DIEs.
18887         (dwarf2out_early_finish): Output early DIEs when generating LTO.
18888         (modified_type_die): Check for decl_ultimate_origin being self
18889         before recursing.
18890         (gen_type_die_with_usage): Likewise.
18891         (gen_typedef_die): Allow decl_ultimate_origin being self.
18892         (set_decl_abstract_flags): Remove.
18893         (set_block_abstract_flags): Likewise.
18894         (dwarf2out_abstract_function): Treat the early generated DIEs
18895         as the abstract copy and only add DW_AT_inline and
18896         DW_AT_artificial here and call set_decl_origin_self.
18897         If the DIE has an abstract origin don't do anything.
18898         * tree.c (free_lang_data): Build a dummy TRANSLATION_UNIT_DECL
18899         if we have none yet (Go fails to build one, PR78628).
18900         (variably_modified_type_p): Prevent endless recursion for Ada
18901         cyclic pointer types.
18902         * lto-streamer-in.c: Include debug.h.
18903         (dref_queue): New global.
18904         (lto_read_tree_1): Stream in DIE references.
18905         (lto_input_tree): Register DIE references.
18906         (input_function): Stream DECL_DEBUG_ARGS.
18907         * lto-streamer-out.c: Include debug.h.
18908         (lto_write_tree_1): Output DIE references.
18909         (DFS::DFS_write_tree_body): Follow DECL_ABSTRACT_ORIGIN.
18910         Force a TRANSLATION_UNIT_DECL DECL_CONTEXT for file-scope decls.
18911         (output_function): Stream DECL_DEBUG_ARGS.
18912         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
18913         Stream DECL_ABSTRACT_ORIGIN.
18914         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
18915         (write_ts_decl_minimal_tree_pointers): Force a TRANSLATION_UNIT_DECL
18916         DECL_CONTEXT for file-scope decls.
18917         * lto-streamer.h (struct dref_entry): Declare.
18918         (dref_queue): Likewise.
18919         * cfgexpand.c (pass_expand::execute): Do not call the
18920         outlining_inline_function hook here.
18921         * lto-wrapper.c (debug_obj): New global.
18922         (tool_cleanup): Unlink it if required.
18923         (debug_objcopy): New function.
18924         (run_gcc): Handle early debug sections in the IL files by
18925         extracting them to separate files, partially linkin them and
18926         feeding the result back as result to the linker.
18927         * config/darwin.h (DEBUG_LTO_INFO_SECTION, DEBUG_LTO_ABBREV_SECTION,
18928         DEBUG_LTO_MACINFO_SECTION, DEBUG_LTO_LINE_SECTION,
18929         DEBUG_STR_LTO_SECTION, DEBUG_LTO_MACRO_SECTION): Put early debug
18930         sections into a separate segment.
18931         * config/darwin.c (darwin_asm_named_section): Handle __GNU_DWARF_LTO
18932         segments.
18933         (darwin_asm_dwarf_section): Likewise.
18934         (darwin_asm_output_dwarf_offset): Likewise.
18935         * config/i386/i386.c (make_resolver_func): Set DECL_IGNORED_P.
18937 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
18938             Alan Hayward  <alan.hayward@arm.com>
18939             David Sherwood  <david.sherwood@arm.com>
18941         * read-md.h (md_reader::record_potential_iterator_use): Replace
18942         pointer argument with an rtx and an index.
18943         * read-rtl.c (iterator_group::apply_iterator): Likewise.
18944         (apply_mode_iterator): Likewise.
18945         (apply_code_iterator): Likewise.
18946         (apply_int_iterator): Likewise.
18947         (apply_subst_iterator): Likewise.
18948         (record_iterator_use): Likewise.
18949         (record_attribute_use): Likewise.
18950         (md_reader::record_potential_iterator_use): Likewise.  Update calls
18951         to record_iterator_use and apply_iterator.
18952         (iterator_use): Replace ptr with x and index.
18953         (attribute_use): Likewise.
18954         (apply_attribute_uses): Update calls to apply_iterator.
18955         (apply_iterators): Likewise.  Update initialization of iterator_use.
18956         (rtx_reader::read_rtx_code): Update calls to record_iterator_use
18957         and record_potential_iterator_use.
18958         (rtx_reader::read_rtx_operand): Likewise.
18960 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
18961             Alan Hayward  <alan.hayward@arm.com>
18962             David Sherwood  <david.sherwood@arm.com>
18964         * varasm.c (const_rtx_hash_1): Don't hash in the mode of a
18965         CONST_WIDE_INT.
18967 2017-08-21  Richard Biener  <rguenther@suse.de>
18969         PR middle-end/81884
18970         * tree-ssa-alias.c (stmt_kills_ref_p): Handle array accesses
18971         at struct end conservatively when comparing common bases.
18973 2017-08-21  Richard Biener  <rguenther@suse.de>
18975         * tree-ssa-loop-im.c (struct lim_aux_data): Add ref index member.
18976         (mem_ref_in_stmt): Remove.
18977         (determine_max_movement): Use ref index to get at the reference.
18978         (invariantness_dom_walker::before_dom_children): Deal with
18979         lim data already initialized.
18980         (gather_mem_refs_stmt): Initialize lim data and record ref index.
18982 2017-08-19  Uros Bizjak  <ubizjak@gmail.com>
18984         * config/i386/i386.h (OPTION_MASK_ISA_ROUND): Remove.
18985         (TARGET_ISA_ROUND): Ditto.
18986         (TARGET_ROUND): Ditto.
18987         * config/i386/i386.c: Substitute TARGET_ROUND with TARGET_SSE4_1.
18988         * config/i386/i386.md: Ditto.
18989         * config/i386/sse.md: Ditto.
18990         * config/i386/i386-builtin.def: Substitute OPTION_MASK_ISA_ROUND
18991         with OPTION_MASK_ISA_SSE4_1.
18993 2017-08-19  Uros Bizjak  <ubizjak@gmail.com>
18995         PR target/81894
18996         * doc/extend.texi (x86 Built-in Functions): Correct the name of
18997         __builtin_ia32_lzcnt_u16.
18999 2017-08-18  Peter Bergner  <bergner@vnet.ibm.com>
19001         PR target/80210
19002         * config/rs6000/rs6000.c (rs6000_activate_target_options): New function.
19003         (rs6000_set_current_function): Rewrite function to use it.
19005 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
19007         PR c/53037
19008         * print-tree.c (print_node): Support DECL_WARN_IF_NOT_ALIGN
19009         and TYPE_WARN_IF_NOT_ALIGN.
19010         * stor-layout.c (do_type_align): Merge DECL_WARN_IF_NOT_ALIGN.
19011         (handle_warn_if_not_align): New.
19012         (place_union_field): Call handle_warn_if_not_align.
19013         (place_field): Call handle_warn_if_not_align.
19014         Copy TYPE_WARN_IF_NOT_ALIGN.
19015         (finish_builtin_struct): Copy TYPE_WARN_IF_NOT_ALIGN.
19016         (layout_type): Likewise.
19017         * tree-core.h (tree_type_common): Add warn_if_not_align.  Set
19018         spare to 18.
19019         (tree_decl_common): Add warn_if_not_align.
19020         * tree.c (build_range_type_1): Copy TYPE_WARN_IF_NOT_ALIGN.
19021         * tree.h (TYPE_WARN_IF_NOT_ALIGN): New.
19022         (SET_TYPE_WARN_IF_NOT_ALIGN): Likewise.
19023         (DECL_WARN_IF_NOT_ALIGN): Likewise.
19024         (SET_DECL_WARN_IF_NOT_ALIGN): Likewise.
19025         * doc/extend.texi: Document warn_if_not_aligned attribute.
19026         * doc/invoke.texi: Document -Wif-not-aligned and -Wpacked-not-aligned.
19028 2017-08-17  Martin Liska  <mliska@suse.cz>
19030         PR bootstrap/81864
19031         * tree-loop-distribution.c (ddrs_table): Change type to pointer type.
19032         (get_data_dependence): Use it as pointer type.
19033         (distribute_loop): Likewise.
19035 2017-08-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19037         * config/rs6000/altivec.md (UNSPEC_VMRGOW_DIRECT): New constant.
19038         (p8_vmrgew_v4sf_direct): Generalize to p8_vmrgew_<mode>_direct.
19039         (p8_vmrgow_<mode>_direct): New define_insn.
19040         * config/rs6000/rs6000.c (altivec_expand_vec_perm_const): Properly
19041         handle endianness for vmrgew and vmrgow permute patterns.
19043 2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>
19045         * config/rs6000/altivec.md (VParity): Remove TARGET_VSX_TIMODE.
19046         * config/rs6000/rs6000-cpus.def: Remove comment.
19047         (ISA_2_7_MASKS_SERVER): Delete OPTION_MASK_VSX_TIMODE;
19048         (POWERPC_MASKS): Likewise.
19049         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Remove unneeded
19050         use of TARGET_VSX_TIMODE.
19051         (rs6000_setup_reg_addr_masks): Change TARGET_VSX_TIMODE to TARGET_VSX.
19052         (rs6000_init_hard_regno_mode_ok): Remove unneeded uses of
19053         TARGET_VSX_TIMODE.  Change use of TARGET_VSX_TIMODE to TARGET_VSX.
19054         (rs6000_option_override_internal): Remove dead code.
19055         (rs6000_legitimize_address): Change TARGET_VSX_TIMODE to TARGET_VSX.
19056         (rs6000_legitimize_reload_address): Likewise.
19057         (rs6000_legitimate_address_p): Likewise.
19058         (rs6000_opt_masks): Delete "vsx-timode".
19059         (rs6000_disable_incompatible_switches): Remove mention of -mvsx-timode
19060         from function comment.
19061         * config/rs6000/rs6000.h (MASK_VSX_TIMODE): Delete.
19062         * config/rs6000/rs6000.md (FMOVE128_GPR): Remove TARGET_VSX_TIMODE.
19063         (V16QI, V8HI, V4SI, V4SF, V2DI, V2DF, V1TI): Remove useless empty
19064         condition.
19065         * config/rs6000/rs6000.opt (mvsx-timode): Replace with stub.
19066         * config/rs6000/vector.md (VEC_IP): Remove TARGET_VSX_TIMODE.
19067         * config/rs6000/vsx.md (VSX_LE_128): Likewise.
19068         (VSX_TI): Likewise.
19069         (VSX_M): Likewise.
19070         (define_peephole2): Likewise.
19072 2017-08-17  Martin Sebor  <msebor@redhat.com>
19074         PR c/81859
19075         * pretty-print.c (pp_format): Use strnlen in %.*s to avoid reading
19076         past the end of an array.
19077         (test_pp_format): Add test cases.
19079 2017-08-17  Richard Sandiford  <richard.sandiford@linaro.org>
19081         * internal-fn.def (CLRSB, CLZ, CTZ, FFS, PARITY, POPCOUNT): Add
19082         missing ECF_NOTHROW flags.
19084 2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>
19086         PR target/72804
19087         * config/rs6000/vsx.md (*vsx_le_permute_<mode>): Add support for
19088         operands residing in integer registers.
19089         (*vsx_le_perm_load_<mode>): Likewise.
19090         (*vsx_le_perm_store_<mode>): Likewise.
19091         (define_peephole2): Add peepholes to optimize the above.
19093 2017-08-17  Marek Polacek  <polacek@redhat.com>
19095         PR middle-end/81814
19096         * fold-const.c (operand_equal_for_comparison_p): Remove code that used
19097         to mimic what shorten_compare did.  Change the return type to bool.
19098         (fold_cond_expr_with_comparison): Update call to
19099         operand_equal_for_comparison_p.
19100         (fold_ternary_loc): Likewise.
19102 2017-08-17  Jackson Woodruff  <jackson.woodruff@arm.com>
19104         * aarch64-simd.md (mov<mode>): No longer force zero immediate into
19105         register.
19106         (*aarch64_simd_mov<mode>): Add new case for stp using zero immediate.
19108 2017-08-17  Richard Biener  <rguenther@suse.de>
19110         * tree-ssa-structalias.c (solve_graph): When propagating
19111         to successors update the graphs succ edges and avoid duplicate work.
19113 2017-08-17  Maxim Ostapenko  <m.ostapenko@samsung.com>
19115         PR target/81861
19116         * config/i386/i386.c (ix86_option_override_internal): Save target
19117         specific options after ix86_stack_protector_guard_reg was changed.
19119 2017-08-17  Richard Biener  <rguenther@suse.de>
19121         PR tree-optimization/81827
19122         * tree-ssa-structalias.c (struct variable_info): Add is_reg_var flag.
19123         (new_var_info): Initialize it conservatively.
19124         (get_call_vi): Mark register vars.
19125         (new_scalar_tmp_constraint_exp): Likewise.
19126         (handle_rhs_call): Likewise.
19127         (handle_const_call): Likewise.
19128         (create_function_info_for): Likewise.
19129         (solve_constraints): Sort varinfos to separate register from
19130         non-register vars to pack points-to solution bitmaps during
19131         iteration.
19133 2017-08-17  Marek Polacek  <polacek@redhat.com>
19135         * gimplify.c (gimplify_adjust_omp_clauses): Compare with 0 instead of 1.
19137 2017-08-17  Richard Biener  <rguenther@suse.de>
19139         * tree-vrp.c (vrp_int_const_binop): Do not set *overflow_p
19140         to true when overflow is undefined and we saturated the result.
19142 2017-08-17  Alan Modra  <amodra@gmail.com>
19144         PR target/80938
19145         * config/rs6000/rs6000.c (rs6000_savres_strategy): Revert 2017-08-09.
19146         Don't use store multiple if only one reg needs saving.
19147         (interesting_frame_related_regno): New function.
19148         (rs6000_frame_related): Don't emit frame info for regs that
19149         don't need saving.
19150         (rs6000_emit_epilogue): Likewise.
19152 2017-08-16  Nathan Sidwell  <nathan@acm.org>
19154         * tree-core.h (tree_type_non_common): Rename binfo to lang_1.
19155         * tree.h (TYPE_BINFO): Use type_non_common.maxval.
19156         (TYPE_LANG_SLOT_1): Use type_non_common.lang_1, for any type.
19157         * tree.c (free_lang_data_in_type): Use else-if chain.  Always
19158         clear TYPE_LANG_1.  Remove obsolete member-function stripping.
19159         (find_decls_types_r): Comment about TYPE_MAX_VALUES_RAW.
19160         (verify_type): Adjust for TYPE_BINFO move.
19161         * lto-streamer-out.c (DFS::DFS_write_tree_body): No need to
19162         process TYPE_BINFO directly.
19163         (hash_tree): Likewise.
19164         * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
19165         Likewise.
19166         * tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
19167         Likewise.
19169 2017-08-16  David Malcolm  <dmalcolm@redhat.com>
19171         * diagnostic-show-locus.c (colorizer::m_caret): Remove unused field.
19173 2017-08-16  Uros Bizjak  <ubizjak@gmail.com>
19175         PR target/46091
19176         * config/i386/i386.md (*anddi_1_btr): Change predicates of
19177         operand 0 and operand 1 to nomimmediate_operand. Add "m" constraint.
19178         Add ix86_binary_operator_ok to insn constraint.
19179         (*iordi_1_bts): Ditto.
19180         (*xordi_1_btc): Ditto.
19181         (*btsq): Change predicate of operand 0 to nonimmediate_operand.
19182         Update corresponding peephole2 pattern.
19183         (*btrq): Ditto.
19184         (*btcq): Ditto.
19186 2017-08-16  Bin Cheng  <bin.cheng@arm.com>
19188         PR tree-optimization/81832
19189         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Don't
19190         copy loop header which has IFN_LOOP_DIST_ALIAS call.
19192 2017-08-16  Marek Polacek  <polacek@redhat.com>
19194         PR middle/81695
19195         * fold-const.c (fold_indirect_ref_1): Restore original behavior
19196         regarding size_zero_node.
19198 2017-08-16  Martin Liska  <mliska@suse.cz>
19200         PR target/81753
19201         * config.gcc: Respect previously set extra_objs in case
19202         of darwin target.
19204 2017-08-16  Richard Sandiford  <richard.sandiford@linaro.org>
19206         PR tree-optimization/81835
19207         * tree-vect-loop.c (vect_is_simple_reduction): Simply checks for
19208         the phi SSA_NAME.  Check that the condition in a COND_EXPR does
19209         not depend on the phi.
19211 2017-08-16  Alan Modra  <amodra@gmail.com>
19213         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Delete
19214         dead code.
19216 2017-08-16  Alan Modra  <amodra@gmail.com>
19218         * config/rs6000/rs6000.c (rs6000_reg_live_or_pic_offset_p): Merge..
19219         (save_reg_p): ..into this.  Update all callers.
19220         (first_reg_to_save): Simplify.
19222 2017-08-16  Alan Modra  <amodra@gmail.com>
19224         * config/rs6000/rs6000.c (rs6000_savres_strategy): Don't restore
19225         fixed regs.
19227 2017-08-15  Joseph Myers  <joseph@codesourcery.com>
19229         PR target/78460
19230         PR target/67712
19231         * config/sh/sh-mem.cc (sh_expand_cmpnstr): Only unroll for
19232         constant count if that count is less than 32.
19234 2017-08-15  Nathan Sidwell  <nathan@acm.org>
19236         * gcc.c (execute): Emit friendlier message if inferior is killed
19237         by an external cause.
19239 2017-08-15  Richard Biener  <rguenther@suse.de>
19241         PR tree-optimization/81790
19242         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Handle both
19243         CONSTRUCTORs from simplifying and VN.
19245 2017-08-14  Martin Sebor  <msebor@redhat.com>
19247         * builtin-attrs.def: Add comments.
19249 2017-08-14  Martin Sebor  <msebor@redhat.com>
19251         PR c/81117
19252         * doc/extend.texi (attribute nonstring): Document new attribute.
19254 2017-08-14  Martin Sebor  <msebor@redhat.com>
19256         PR c/81117
19257         * tree-diagnostic.c (default_tree_printer): Handle %G.
19258         * gimple-pretty-print.h (percent_G_format): Declare new function.
19259         * gimple-pretty-print.c (percent_G_format): Define.
19260         * tree-pretty-print.c (percent_K_format): Add argument.
19262 2017-08-14  Martin Sebor  <msebor@redhat.com>
19264         PR translation/79998
19265         * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call):
19266         Remove a stray space.
19268 2017-08-14  Uros Bizjak  <ubizjak@gmail.com>
19270         PR target/46091
19271         * config/i386/i386.md (*anddi_1_btr): New insn_and_split pattern.
19272         (*iordi_1_bts): Ditto.
19273         (*xordi_1_btc): Ditto.
19275 2017-08-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19277         PR target/79845
19278         * config/rs6000/linux64.h (INVALID_64BIT): Use quoted strings.
19279         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
19280         Likewise.
19281         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Use
19282         quoted strings, and make more translator-friendly.
19283         (darwin_rs6000_override_options): Likewise.
19284         (rs6000_option_override_internal): Likewise.
19285         (rs6000_return_in_memory): Fix overlong line.
19286         (init_cmulative_args): Use quoted strings, and make more
19287         translator-friendly.
19288         (rs6000_pass_by_reference): Fix overlong line.
19289         (def_builtin): Use quoted strings.
19290         (altivec_expand_predicate_builtin): Use quoted strings, and make
19291         more translator-friendly.
19292         (htm_expand_builtin): Use quoted strings.
19293         (cpu_expand_builtin): Use quoted strings, and make more
19294         translator-friendly.
19295         (altivec_expand_builtin): Likewise.
19296         (paired_expand_predicate_builtin): Likewise.
19297         (rs6000_invalid_builtin): Likewise.
19298         (builtin_function_type): Use quoted strings.
19299         (rs6000_expand_split_stack_prologue): Use quoted strings, and make
19300         more translator-friendly.
19301         (rs6000_trampoline_init): Likewise.
19302         (rs6000_handle_altivec_attribute): Likewise.
19303         (rs6000_inner_target_options): Use quoted strings.
19304         (rs6000_disable_incompatible_switches): Likewise.
19305         * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Use quoted
19306         strings, and make more translator-friendly.
19307         (SUBSUBTARGET_OVERRIDE_OPTIONS): Use quoted strings.
19309 2017-08-14  Bin Cheng  <bin.cheng@arm.com>
19311         PR tree-optimization/81799
19312         * tree-loop-distribution.c (version_loop_by_alias_check): Force
19313         cond_expr to simple gimple operand.
19315 2017-08-14  Wilco Dijkstra  <wdijkstr@arm.com>
19317         PR middle-end/46932
19318         * doc/sourcebuild.texi (autoincdec): Add autoincdec description.
19320 2017-08-14  Georg-Johann Lay  <avr@gjlay.de>
19322         PR target/81754
19323         PR target/81268
19324         * config/avr/avr.opt (mgas-isr-prologues): New Var avr_gasisr_prologues.
19325         * config/avr/avr.md (gasisr, *gasisr): Use it instead of
19326         TARGET_GASISR_PROLOGUES.
19327         * config/avr/avr.c (avr_option_override): Same.
19328         (avr_pass_pre_proep::execute): Same.
19330 2017-08-13  H.J. Lu  <hongjiu.lu@intel.com>
19332         PR target/81820
19333         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Replace
19334         frame pointer with stack pointer - UNITS_PER_WORD in debug insns.
19336 2017-08-13  Uros Bizjak  <ubizjak@gmail.com>
19338         * config/i386/i386.md (*load_tp_<mode>): Redefine as
19339         define_insn_and_split.  Split to a memory load from 0 in
19340         DEFAULT_TLS_SEG_REG address space.  Merge with *load_tp_x32
19341         using PTR mode iterator.
19342         (*load_tp_x32_zext"): Redefine as define_insn_and_split.
19343         Split to a memory load from 0 in DEFAULT_TLS_SEG_REG address space.
19344         (*add_tp_<mode>): Redefine as define_insn_and_split.
19345         Split to an add with a memory load from 0 in DEFAULT_TLS_SEG_REG
19346         address space.  Merge with *add_tp_x32 using PTR mode iterator.
19347         (*add_tp_x32_zext"): Redefine as define_insn_and_split.
19348         Split to an add with a  memory load from 0 in
19349         DEFAULT_TLS_SEG_REG address space.
19351 2017-08-12  Andrew Pinski  <apinski@cavium.com>
19353         * config/aarch64/aarch64-option-extensions.def (rdma):
19354         Fix feature string to what Linux prints out in /proc/cpuinfo.
19356 2017-08-12  Pierre-Marie de Rodat  <derodat@adacore.com>
19358         PR ada/79542
19359         * dwarf2out.c (modified_type_die): For C typedef types that have
19360         an ultimate origin, process the ultimate origin instead of the
19361         input type.
19362         (gen_typedef_die): Assert that input DECLs have no ultimate
19363         origin.
19364         (gen_type_die_with_usage): For typedef variants that have an
19365         ultimate origin, just call gen_decl_die on the original DECL.
19366         (process_scope_var): Avoid creating DIEs for local typedefs and
19367         concrete static variables.
19369 2017-08-12  Alan Modra  <amodra@gmail.com>
19371         PR target/81170
19372         PR target/81295
19373         * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to
19374         match gnu-user.h startfile.
19375         (ENDFILE_LINUX_SPEC): Similarly.
19377 2017-08-11  Thomas Schwinge  <thomas@codesourcery.com>
19379         PR lto/81430
19380         * config/nvptx/nvptx.c (nvptx_override_options_after_change):
19381         Remove function.
19382         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Remove definition.
19384 2017-08-11  Tamar Christina  <tamar.christina@arm.com>
19385         * config/aarch64/aarch64.md (mov<mode>): Change.
19386         (*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
19387         aarch64_reg_or_fp_float into aarch64_reg_or_fp_zero.
19388         * config/aarch64/predicates.md (aarch64_reg_or_fp_float): Removed.
19390 2017-08-11  Eric Botcazou  <ebotcazou@adacore.com>
19392         * tree-sra.c (build_access_from_expr_1): Use more precise diagnostics
19393         for storage order barriers.
19395 2017-08-11  Martin Liska  <mliska@suse.cz>
19397         PR tree-opt/79987
19398         * tree-chkp.c (chkp_get_bounds_for_decl_addr): Do not instrument
19399         variables of void type.
19401 2017-08-11  Martin Liska  <mliska@suse.cz>
19403         * asan.c (asan_protect_global): Replace ASM_OUTPUT_DEF with
19404         TARGET_SUPPORTS_ALIASES.
19405         * cgraph.c (cgraph_node::create_same_body_alias): Likewise.
19406         * ipa-visibility.c (can_replace_by_local_alias): Likewise.
19407         (optimize_weakref): Likewise.
19408         * symtab.c (symtab_node::noninterposable_alias): Likewise.
19409         * varpool.c (varpool_node::create_extra_name_alias): Likewise.
19410         * defaults.h: Introduce TARGET_SUPPORTS_ALIASES.
19412 2017-08-11  Martin Liska  <mliska@suse.cz>
19414         PR ipa/81213
19415         * config/i386/i386.c (make_resolver_func): Do complete
19416         refactoring of the function.
19418 2017-08-10  Uros Bizjak  <ubizjak@gmail.com>
19420         PR target/81708
19421         * config/i386/i386.opt (mstack-protector-guard-symbol=): New option
19422         * config/i386/i386.c (ix86_stack_protect_guard): Use
19423         ix86_stack_protect_guard_symbol_str to generate varible declaration.
19424         * doc/invoke.texi (x86 Options): Document
19425         -mstack-protector-guard-symbol= option.
19427 2017-08-10  Uros Bizjak  <ubizjak@gmail.com>
19429         * config/i386/i386-protos.h (ix86_split_stack_guard): New prototype.
19430         * config/i386/i386.c (ix86_split_stack_guard): New function.
19431         (ix86_xpand_split_stack_prologue): Call ix86_split_stack_guard.
19432         (ix86_legitimate_address_p) <case UNSPEC_STACK_CHECK>: Remove.
19433         (i386_asm_output_addr_const_extra) <case UNSPEC_STACK_CHECK>: Ditto.
19434         (optput_pic_addr_const): Remove UNSPEC_STACK_CHECK handling.
19435         * config/i386/i386.md (unspec): Remove UNSPEC_STACK_CHECK.
19436         (split_stack_space_check): Call ix86_split_stack_guard.
19438 2017-08-10  Martin Sebor  <msebor@redhat.com>
19440         * print-tree.c (print_node): Print location using the established
19441         format %s:%i%i.
19442         Replace spaces with colons.
19443         (debug_raw, debug): Ditto.
19445 2017-08-10  Martin Sebor  <msebor@redhat.com>
19447         PR c++/81586
19448         * pretty-print.c (pp_format): Correct the handling of %s precision.
19450 2017-08-10  H.J. Lu  <hongjiu.lu@intel.com>
19452         PR target/81736
19453         * config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
19454         to ...
19455         (ix86_finalize_stack_frame_flags): This.  Also clear
19456         frame_pointer_needed if -fno-omit-frame-pointer is used without
19457         stack access.
19458         (ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
19459         with ix86_finalize_stack_frame_flags.
19460         (ix86_expand_epilogue): Likewise.
19461         (ix86_expand_split_stack_prologue): Likewise.
19462         * doc/invoke.texi: Add a note for -fno-omit-frame-pointer.
19464 2017-08-10  Martin Liska  <mliska@suse.cz>
19466         PR c++/81355
19467         * c-attribs.c (handle_target_attribute):
19468         Report warning for an empty string argument of target attribute.
19470 2017-08-09  Jakub Jelinek  <jakub@redhat.com>
19472         PR c/81687
19473         * omp-low.c (omp_copy_decl): Don't remap FORCED_LABEL or DECL_NONLOCAL
19474         LABEL_DECLs.
19475         * tree-cfg.c (move_stmt_op): Don't adjust DECL_CONTEXT of FORCED_LABEL
19476         or DECL_NONLOCAL labels.
19477         (move_stmt_r) <case GIMPLE_LABEL>: Adjust DECL_CONTEXT of FORCED_LABEL
19478         or DECL_NONLOCAL labels here.
19480 2017-08-09  Will Schmidt  <will_schmidt@vnet.ibm.com>
19482         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add blurb
19483         to indicate when early gimple folding has been disabled.
19484         (rs6000_gimple_fold_builtin): Add debug content.
19485         (rs6000_invalid_builtin): Fix whitespace.
19486         (rs6000_expand_builtin): Fix whitespace.
19487         * config/rs6000/rs6000.opt: Add option for -mfold-gimple.
19489 2017-08-09  Segher Boessenkool  <segher@kernel.crashing.org>
19491         PR target/80938
19492         * config/rs6000/rs6000.c (rs6000_savres_strategy): Don't use
19493         SAVE_MULTIPLE if not all the registers that saves, should be saved.
19495 2017-08-09  Jim Wilson  <jim.wilson@linaro.org>
19497         * config/aarch64/aarch64-cores.def (falkor): Use falkor pipeline.
19498         (qdf24xx): Likewise.
19499         * config/aarch64/aarch64.md: Include falkor.md.
19500         * config/aarch64/falkor.md: New.
19502 2017-08-09  Marek Polacek  <polacek@redhat.com>
19504         PR c/81233
19505         * diagnostic-core.h (emit_diagnostic_valist): Add declaration.
19506         * diagnostic.c (emit_diagnostic): Add a comment.
19507         (emit_diagnostic_valist): New function.
19509 2017-08-09  Marek Polacek  <polacek@redhat.com>
19511         PR c/81417
19512         * input.c (make_location): New overload.
19513         * input.h (make_location): Declare.
19515 2017-08-08  Alan Modra  <amodra@gmail.com>
19516             H.J. Lu  <hongjiu.lu@intel.com>
19518         PR driver/81523
19519         * gcc.c (NO_PIE_SPEC): Delete.
19520         (PIE_SPEC): Define as !no-pie/pie.  Move static|shared|r
19521         exclusion..
19522         (LINK_PIE_SPEC): ..to here.
19523         (LINK_COMMAND_SPEC): Support -no-pie.
19524         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct
19525         chain of crtbegin*.o selection, update for PIE_SPEC changes and
19526         format.
19527         (GNU_USER_TARGET_ENDFILE_SPEC): Similarly.
19528         * config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly.
19529         (ENDFILE_CRTEND_SPEC): Similarly.
19531 2017-08-08  Uros Bizjak  <ubizjak@gmail.com>
19533         PR target/81708
19534         * config/i386/i386.opt (mstack-protector-guard-reg=): New option
19535         (mstack-protector-guard-offset=): Ditto.
19536         * config/i386/i386.c (ix86_option_override): Handle
19537         -mstack-protector-guard-reg= and -mstack-protector-guard-offset=
19538         options.
19539         (ix86_stack_protect_guard): Use ix86_stack_protect_guard_reg and
19540         ix86_stack_protect_guard_offset variables.
19541         (TARGET_STACK_PROTECT_GUARD): Always define.
19542         * doc/invoke.texi (x86 Options): Document -mstack-protector-guard-reg=
19543         and -mstack-protector-guard-offset= options.
19545 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
19547         * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): Handle
19548         boundary case for the last candidate.
19550 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
19552         * doc/invoke.texi: Document -ftree-loop-distribution for O3.
19553         * opts.c (default_options_table): Add OPT_ftree_loop_distribution.
19555 2017-08-08  Tamar Christina  <tamar.christina@arm.com>
19557         PR middle-end/19706
19558         * config/aarch64/aarch64.md (xorsign<mode>3): New optabs.
19559         * config/aarch64/aarch64-builtins.c
19560         (aarch64_builtin_vectorized_function): Added CASE_CFN_XORSIGN.
19561         * config/aarch64/aarch64-simd-builtins.def: Added xorsign BINOP.
19562         * config/aarch64/aarch64-simd.md: Added xorsign<mode>3
19564 2017-08-08  Tamar Christina  <tamar.christina@arm.com>
19565             Andrew Pinski <pinskia@gmail.com>
19567         PR middle-end/19706
19568         * internal-fn.def (XORSIGN): New.
19569         * optabs.def (xorsign_optab): New.
19570         * tree-ssa-math-opts.c (is_copysign_call_with_1): New.
19571         (convert_expand_mult_copysign): New.
19572         (pass_optimize_widening_mul::execute): Call
19573         convert_expand_mult_copysign.
19575 2017-08-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19577         PR tree-optimization/81354
19578         * gimple-ssa-strength-reduction.c (create_add_on_incoming_edge):
19579         Insert on edges rather than explicitly creating landing pads.
19580         (analyze_candidates_and_replace): Commit edge inserts.
19582 2017-08-08  Richard Biener  <rguenther@suse.de>
19584         PR middle-end/81719
19585         * tree-ssa-loop-niter.c: Include tree-dfa.h.
19586         (expand_simple_operations): Also look through ADDR_EXPRs with
19587         MEM_REF bases treating them as POINTER_PLUS_EXPR.
19589 2017-08-08  Richard Biener  <rguenther@suse.de>
19591         PR tree-optimization/81723
19592         * tree-vect-slp.c (struct bst_traits): New hash traits.
19593         (bst_fail): New global.
19594         (vect_build_slp_tree_2): New worker, split out from ...
19595         (vect_build_slp_tree): ... this now wrapping it with using
19596         bst_fail set to cache SLP tree build fails.  Properly handle
19597         max_tree_size.
19598         (vect_analyze_slp_instance): Allocate and free bst_fail.
19600 2017-08-08  Martin Liska  <mliska@suse.cz>
19602         PR tree-opt/81696
19603         * ipa-icf-gimple.c (func_checker::compare_cst_or_decl): Consider
19604         LABEL_DECLs that can be from a different function.
19606 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
19608         PR tree-optimization/81744
19609         * tree-predcom.c (prepare_finalizers_chain): Deep copy expr of
19610         loop's number of iterations.
19612 2017-08-08  Martin Liska  <mliska@suse.cz>
19614         * asan.c: Include header files.
19615         * attribs.c (build_decl_attribute_variant): New function moved
19616         from tree.[ch].
19617         (build_type_attribute_qual_variant): Likewise.
19618         (cmp_attrib_identifiers): Likewise.
19619         (simple_cst_list_equal): Likewise.
19620         (omp_declare_simd_clauses_equal): Likewise.
19621         (attribute_value_equal): Likewise.
19622         (comp_type_attributes): Likewise.
19623         (build_type_attribute_variant): Likewise.
19624         (lookup_ident_attribute): Likewise.
19625         (remove_attribute): Likewise.
19626         (merge_attributes): Likewise.
19627         (merge_type_attributes): Likewise.
19628         (merge_decl_attributes): Likewise.
19629         (merge_dllimport_decl_attributes): Likewise.
19630         (handle_dll_attribute): Likewise.
19631         (attribute_list_equal): Likewise.
19632         (attribute_list_contained): Likewise.
19633         * attribs.h (lookup_attribute): New function moved from tree.[ch].
19634         (lookup_attribute_by_prefix): Likewise.
19635         * bb-reorder.c: Include header files.
19636         * builtins.c: Likewise.
19637         * calls.c: Likewise.
19638         * cfgexpand.c: Likewise.
19639         * cgraph.c: Likewise.
19640         * cgraphunit.c: Likewise.
19641         * convert.c: Likewise.
19642         * dwarf2out.c: Likewise.
19643         * final.c: Likewise.
19644         * fold-const.c: Likewise.
19645         * function.c: Likewise.
19646         * gimple-expr.c: Likewise.
19647         * gimple-fold.c: Likewise.
19648         * gimple-pretty-print.c: Likewise.
19649         * gimple.c: Likewise.
19650         * gimplify.c: Likewise.
19651         * hsa-common.c: Likewise.
19652         * hsa-gen.c: Likewise.
19653         * internal-fn.c: Likewise.
19654         * ipa-chkp.c: Likewise.
19655         * ipa-cp.c: Likewise.
19656         * ipa-devirt.c: Likewise.
19657         * ipa-fnsummary.c: Likewise.
19658         * ipa-inline.c: Likewise.
19659         * ipa-visibility.c: Likewise.
19660         * ipa.c: Likewise.
19661         * lto-cgraph.c: Likewise.
19662         * omp-expand.c: Likewise.
19663         * omp-general.c: Likewise.
19664         * omp-low.c: Likewise.
19665         * omp-offload.c: Likewise.
19666         * omp-simd-clone.c: Likewise.
19667         * opts-global.c: Likewise.
19668         * passes.c: Likewise.
19669         * predict.c: Likewise.
19670         * sancov.c: Likewise.
19671         * sanopt.c: Likewise.
19672         * symtab.c: Likewise.
19673         * toplev.c: Likewise.
19674         * trans-mem.c: Likewise.
19675         * tree-chkp.c: Likewise.
19676         * tree-eh.c: Likewise.
19677         * tree-into-ssa.c: Likewise.
19678         * tree-object-size.c: Likewise.
19679         * tree-parloops.c: Likewise.
19680         * tree-profile.c: Likewise.
19681         * tree-ssa-ccp.c: Likewise.
19682         * tree-ssa-live.c: Likewise.
19683         * tree-ssa-loop.c: Likewise.
19684         * tree-ssa-sccvn.c: Likewise.
19685         * tree-ssa-structalias.c: Likewise.
19686         * tree-ssa.c: Likewise.
19687         * tree-streamer-in.c: Likewise.
19688         * tree-vectorizer.c: Likewise.
19689         * tree-vrp.c: Likewise.
19690         * tsan.c: Likewise.
19691         * ubsan.c: Likewise.
19692         * varasm.c: Likewise.
19693         * varpool.c: Likewise.
19694         * tree.c: Remove functions moved to attribs.[ch].
19695         * tree.h: Likewise.
19696         * config/aarch64/aarch64.c: Add attrs.h header file.
19697         * config/alpha/alpha.c: Likewise.
19698         * config/arc/arc.c: Likewise.
19699         * config/arm/arm.c: Likewise.
19700         * config/avr/avr.c: Likewise.
19701         * config/bfin/bfin.c: Likewise.
19702         * config/c6x/c6x.c: Likewise.
19703         * config/cr16/cr16.c: Likewise.
19704         * config/cris/cris.c: Likewise.
19705         * config/darwin.c: Likewise.
19706         * config/epiphany/epiphany.c: Likewise.
19707         * config/fr30/fr30.c: Likewise.
19708         * config/frv/frv.c: Likewise.
19709         * config/ft32/ft32.c: Likewise.
19710         * config/h8300/h8300.c: Likewise.
19711         * config/i386/winnt.c: Likewise.
19712         * config/ia64/ia64.c: Likewise.
19713         * config/iq2000/iq2000.c: Likewise.
19714         * config/lm32/lm32.c: Likewise.
19715         * config/m32c/m32c.c: Likewise.
19716         * config/m32r/m32r.c: Likewise.
19717         * config/m68k/m68k.c: Likewise.
19718         * config/mcore/mcore.c: Likewise.
19719         * config/microblaze/microblaze.c: Likewise.
19720         * config/mips/mips.c: Likewise.
19721         * config/mmix/mmix.c: Likewise.
19722         * config/mn10300/mn10300.c: Likewise.
19723         * config/moxie/moxie.c: Likewise.
19724         * config/msp430/msp430.c: Likewise.
19725         * config/nds32/nds32-isr.c: Likewise.
19726         * config/nds32/nds32.c: Likewise.
19727         * config/nios2/nios2.c: Likewise.
19728         * config/nvptx/nvptx.c: Likewise.
19729         * config/pa/pa.c: Likewise.
19730         * config/pdp11/pdp11.c: Likewise.
19731         * config/powerpcspe/powerpcspe.c: Likewise.
19732         * config/riscv/riscv.c: Likewise.
19733         * config/rl78/rl78.c: Likewise.
19734         * config/rx/rx.c: Likewise.
19735         * config/s390/s390.c: Likewise.
19736         * config/sh/sh.c: Likewise.
19737         * config/sol2.c: Likewise.
19738         * config/sparc/sparc.c: Likewise.
19739         * config/spu/spu.c: Likewise.
19740         * config/stormy16/stormy16.c: Likewise.
19741         * config/tilegx/tilegx.c: Likewise.
19742         * config/tilepro/tilepro.c: Likewise.
19743         * config/v850/v850.c: Likewise.
19744         * config/vax/vax.c: Likewise.
19745         * config/visium/visium.c: Likewise.
19746         * config/xtensa/xtensa.c: Likewise.
19748 2017-08-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
19750         PR target/81593
19751         * config/rs6000/vsx.md (vsx_concat_<mode>, VSX_D): Cleanup
19752         constraints since the -mupper-regs-* switches have been
19753         eliminated.
19754         (vsx_concat_<mode>_1): New combiner insns to recognize inserting
19755         into a vector from a double word element that was extracted from
19756         another vector, and eliminate extra XXPERMDI instructions.
19757         (vsx_concat_<mode>_2): Likewise.
19758         (vsx_concat_<mode>_3): Likewise.
19759         (vsx_set_<mode>, VSX_D): Rewrite vector set in terms of vector
19760         concat to allow optimizing inserts from previous extracts.
19762 2017-08-07  Uros Bizjak  <ubizjak@gmail.com>
19764         * config/i386/i386.c (ix86_stack_protect_guard): Generate
19765         memory reference to a SSP offset in TLS address space.
19766         (ix86_print_operand) <case '@'>: Remove.
19767         (ix86_print_operand_punct_valid_p): Remove '@' code.
19768         * config/i386/i386.md (unspec): Remove UNSPEC_SP_TLS_SET and
19769         UNSPEC_SP_TLS_TEST.
19770         (stack_tls_protect_set_<mode>): Remove.
19771         (stack_protect_set): Do not call gen_stack_tls_protect_set_<mode>.
19772         (stack_tls_protect_test_<mode>): Remove.
19773         (stack_protect_test): Do not call gen_stack_tls_protect_test_<mode>.
19775 2017-08-07  Olivier Hainque  <hainque@adacore.com>
19777         PR target/81755
19778         * config/vxworksae.h (VXWORKS_HAVE_TLS): Define.
19780 2017-08-07  Douglas Rupp  <rupp@adacore.com>
19782         * Makefile.in (install-mkheaders): Fix typo, where the multi_dir
19783         variable was referenced as multidir in command.
19785 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
19787         PR c/69389
19788         * gimplify.c (goa_stabilize_expr): Handle BIT_INSERT_EXPR and
19789         BIT_FIELD_REF.
19791 2017-08-07  Martin Liska  <mliska@suse.cz>
19793         * config/m32c/m32c.c: Add include of stringpool.h and attribs.h.
19794         * config/rl78/rl78.c: Add include of attribs.h.
19795         * config/sh/sh.c: Likewise.
19796         * config/v850/v850.c: Likewise.
19798 2017-08-07  Tom de Vries  <tom@codesourcery.com>
19800         PR middle-end/78266
19801         * omp-expand.c (expand_oacc_for): Ensure diff_type is large enough.
19803 2017-08-07  Martin Liska  <mliska@suse.cz>
19805         * config/mips/mips.c: Include attribs.h.
19807 2017-08-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
19809         PR fortran/68829
19810         * doc/invoke.texi: Document change in behvaior for -Ofast for
19811         Fortran.
19813 2017-08-07  Wilco Dijkstra  <wdijkstr@arm.com>
19815         * config/aarch64/aarch64.c (aarch64_pushwb_single_reg):
19816         Use gen_frame_mem.
19817         (aarch64_pop_regs): Likewise.
19818         (aarch64_gen_load_pair): Likewise.
19819         (aarch64_save_callee_saves): Likewise.
19820         (aarch64_restore_callee_saves): Likewise.
19822 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
19824         * config/i386/i386.c: Revert the last change.
19826 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
19828         PR target/81736
19829         * config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
19830         to ...
19831         (ix86_finalize_stack_frame_flags): This.  Also clear
19832         frame_pointer_needed if -fno-omit-frame-pointer is used without
19833         stack access.
19834         (ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
19835         with ix86_finalize_stack_frame_flags.
19836         (ix86_expand_epilogue): Likewise.
19837         (ix86_expand_split_stack_prologue): Likewise.
19839 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
19841         PR target/81743
19842         * config/i386/i386.c (get_builtin_code_for_version): Set priority
19843         to P_AES for Westmere.
19845 2017-08-07  Jonathan Yong  <10walls@gmail.com>
19847         * config/i386/mingw.opt (fset-stack-executable): Removed.
19848         * config/i386/cygming.opt (fset-stack-executable): Moved
19849         from mingw.opt.
19850         * config/i386/cygwin.h: Define CHECK_EXECUTE_STACK_ENABLED.
19852 2017-08-07  Segher Boessenkool  <segher@kernel.crashing.org>
19854         * print-rtl.c (print_exp): Print NOT as "~" instead of as "!".
19856 2017-08-07  Marek Polacek  <polacek@redhat.com>
19858         PR middle-end/81737
19859         * fold-const.c (fold_indirect_ref_1): Check type_domain.
19861 2017-08-07  Martin Liska  <mliska@suse.cz>
19863         * attribs.h (canonicalize_attr_name): New function.
19864         (cmp_attribs): Move from c-format.c and adjusted.
19865         (is_attribute_p): Moved from tree.h.
19866         * tree-inline.c: Add new includes.
19867         * tree.c (cmp_attrib_identifiers): Use cmp_attribs.
19868         (private_is_attribute_p): Remove.
19869         (private_lookup_attribute): Likewise.
19870         (private_lookup_attribute_by_prefix): Simplify.
19871         (remove_attribute): Use is_attribute_p.
19872         * tree.h: Remove removed declarations.
19874 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
19876         PR middle-end/81698
19877         * stmt.c (emit_case_dispatch_table): Add DEFAULT_EDGE argument,
19878         instead of computing it in the function.  Formatting fix.
19879         (expand_case): Don't rely on default_edge being the first edge,
19880         clear it if removing it, pass default_edge to
19881         emit_case_dispatch_table.
19882         (expand_sjlj_dispatch_table): Pass NULL as DEFAULT_EDGE, formatting
19883         fix.
19885 2017-08-06  Uros Bizjak  <ubizjak@gmail.com>
19887         * config/alpha/alpha.c (alpha_reorg): If trap is the last active
19888         insn in the function, emit NOP after the insn.
19890 2017-08-06  Tom de Vries  <tom@codesourcery.com>
19892         * omp-expand.c (expand_oacc_for): Add missing edge probability for tile
19893         and element loops.
19895 2017-08-06  Tom de Vries  <tom@codesourcery.com>
19897         * omp-expand.c (expand_oacc_for): Add missing edge probability for chunk
19898         loop.
19900 2017-08-04  Yury Gribov  <tetra2005@gmail.com>
19902         PR tree-optimization/57371
19903         * match.pd: New pattern.
19905 2017-08-04  Marek Polacek  <polacek@redhat.com>
19907         PR middle-end/81695
19908         * fold-const.c (fold_indirect_ref_1): For ((int *)&a + 4 -> a[1],
19909         perform the computation in offset_int.
19911 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
19913         PR tree-optimization/81136
19914         * tree-vectorizer.h: Include tree-hash-traits.h.
19915         (vec_base_alignments): New typedef.
19916         (vec_info): Add a base_alignments field.
19917         (vect_record_base_alignments): Declare.
19918         * tree-data-ref.h (data_reference): Add an is_conditional_in_stmt
19919         field.
19920         (DR_IS_CONDITIONAL_IN_STMT): New macro.
19921         (create_data_ref): Add an is_conditional_in_stmt argument.
19922         * tree-data-ref.c (create_data_ref): Likewise.  Use it to initialize
19923         the is_conditional_in_stmt field.
19924         (data_ref_loc): Add an is_conditional_in_stmt field.
19925         (get_references_in_stmt): Set the is_conditional_in_stmt field.
19926         (find_data_references_in_stmt): Update call to create_data_ref.
19927         (graphite_find_data_references_in_stmt): Likewise.
19928         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Likewise.
19929         * tree-vect-data-refs.c (vect_analyze_data_refs): Likewise.
19930         (vect_record_base_alignment): New function.
19931         (vect_record_base_alignments): Likewise.
19932         (vect_compute_data_ref_alignment): Adjust base_addr and aligned_to
19933         for nested statements even if we fail to compute a misalignment.
19934         Use pooled base alignments for unconditional references.
19935         (vect_find_same_alignment_drs): Compare base addresses instead
19936         of base objects.
19937         (vect_analyze_data_refs_alignment): Call vect_record_base_alignments.
19938         * tree-vect-slp.c (vect_slp_analyze_bb_1): Likewise.
19940 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
19942         * tree-vectorizer.h (vec_info): Add a constructor and destructor.
19943         Add an explicit name for the enum.  Use auto_vec for slp_instances
19944         and grouped_stores.
19945         (_loop_vec_info): Add a constructor and destructor.  Use auto_vec
19946         for all vectors.
19947         (_bb_vec_info): Add a constructor and destructor.
19948         (vinfo_for_stmt): Return NULL for uids of -1 as well.
19949         (destroy_loop_vec_info): Delete.
19950         (vect_destroy_datarefs): Likewise.
19951         * tree-vectorizer.c (vect_destroy_datarefs): Delete.
19952         (vec_info::vec_info): New function.
19953         (vec_info::~vec_info): Likewise.
19954         (vectorize_loops): Use delete instead of destroy_loop_vec_info.
19955         * tree-parloops.c (gather_scalar_reductions): Use delete instead of
19956         destroy_loop_vec_info.
19957         * tree-vect-loop.c (new_loop_vec_info): Replace with...
19958         (_loop_vec_info::_loop_vec_info): ...this.
19959         (destroy_loop_vec_info): Replace with...
19960         (_loop_vec_info::~_loop_vec_info): ...this.  Unconditionally delete
19961         the stmt_vec_infos.  Leave handling of vec_info information to its
19962         destructor.  Remove explicit vector releases.
19963         (vect_analyze_loop_form): Use new instead of new_loop_vec_info.
19964         (vect_analyze_loop): Use delete instead of destroy_loop_vec_info.
19965         * tree-vect-slp.c (new_bb_vec_info): Replace with...
19966         (_bb_vec_info::_bb_vec_info): ...this.  Don't reserve space in
19967         BB_VINFO_GROUPED_STORES or BB_VINFO_SLP_INSTANCES.
19968         (destroy_bb_vec_info): Replace with...
19969         (_bb_vec_info::~_bb_vec_info): ...this.  Leave handling of vec_info
19970         information to its destructor.
19971         (vect_slp_analyze_bb_1): Use new and delete instead of
19972         new_bb_vec_info and destroy_bb_vec_info.
19973         (vect_slp_bb): Replace 2 calls to destroy_bb_vec_info with a
19974         single delete.
19976 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
19978         * tree-data-ref.h (subscript): Add access_fn field.
19979         (data_dependence_relation): Add could_be_independent_p.
19980         (SUB_ACCESS_FN, DDR_COULD_BE_INDEPENDENT_P): New macros.
19981         (same_access_functions): Move to tree-data-ref.c.
19982         * tree-data-ref.c (ref_contains_union_access_p): New function.
19983         (access_fn_component_p): Likewise.
19984         (access_fn_components_comparable_p): Likewise.
19985         (dr_analyze_indices): Add a reference to access_fn_component_p.
19986         (dump_data_dependence_relation): Use SUB_ACCESS_FN instead of
19987         DR_ACCESS_FN.
19988         (constant_access_functions): Likewise.
19989         (add_other_self_distances): Likewise.
19990         (same_access_functions): Likewise.  (Moved from tree-data-ref.h.)
19991         (initialize_data_dependence_relation): Use XCNEW and remove
19992         explicit zeroing of DDR_REVERSED_P.  Look for a subsequence
19993         of access functions that have the same type.  Allow the
19994         subsequence to end with different bases in some circumstances.
19995         Record the chosen access functions in SUB_ACCESS_FN.
19996         (build_classic_dist_vector_1): Replace ddr_a and ddr_b with
19997         a_index and b_index.  Use SUB_ACCESS_FN instead of DR_ACCESS_FN.
19998         (subscript_dependence_tester_1): Likewise dra and drb.
19999         (build_classic_dist_vector): Update calls accordingly.
20000         (subscript_dependence_tester): Likewise.
20001         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Check
20002         DDR_COULD_BE_INDEPENDENT_P.
20003         * tree-vectorizer.h (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Test
20004         comp_alias_ddrs instead of may_alias_ddrs.
20005         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
20006         New function.
20007         (vect_analyze_data_ref_dependence): Use it if
20008         DDR_COULD_BE_INDEPENDENT_P, but fall back to using the recorded
20009         distance vectors if that fails.
20010         (dependence_distance_ge_vf): New function.
20011         (vect_prune_runtime_alias_test_list): Use it.  Don't clear
20012         LOOP_VINFO_MAY_ALIAS_DDRS.
20014 2017-08-04  Richard Biener  <rguenther@suse.de>
20016         PR middle-end/81705
20017         * fold-const.c (fold_binary_loc): Properly restrict
20018         minus_var0 && minus_var1 case when associating undefined overflow
20019         entities.
20021 2017-08-04  Tom de Vries  <tom@codesourcery.com>
20023         * omp-simd-clone.c (simd_clone_adjust): Add missing edge probability.
20025 2017-08-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20027         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
20028         Don't start diagnostic messages with a capital letter.
20029         * config/rs6000/rs6000.c (rs6000_option_override_internal):
20030         Likewise.
20031         (rs6000_invalid_builtin): Likewise.
20032         (rs6000_trampoline_init): Likewise.
20034 2017-08-03  Jakub Jelinek  <jakub@redhat.com>
20036         PR target/81621
20037         * bb-reorder.c (pass_partition_blocks::execute): Return TODO_df_finish
20038         after setting changeable df flags.
20040 2017-08-03  Richard Biener  <rguenther@suse.de>
20042         * tree-ssa-reassoc.c (should_break_up_subtract): Also break
20043         up if the use is in USE - X.
20045 2017-08-03  Alexander Monakov  <amonakov@ispras.ru>
20047         * toplev.c (dumpfile.h): New include.
20048         (internal_error_reentered): New static function.  Use it...
20049         (internal_error_function): ...here to handle reentered internal_error.
20051 2017-08-03  Richard Biener  <rguenther@suse.de>
20053         PR middle-end/81148
20054         * fold-const.c (split_tree): Add minus_var and minus_con
20055         arguments, remove unused loc arg.  Never generate NEGATE_EXPRs
20056         here but always use minus_*.
20057         (associate_trees): Assert we never associate with MINUS_EXPR
20058         and NULL first operand.  Do not recurse for PLUS_EXPR operands
20059         when associating as MINUS_EXPR either.
20060         (fold_binary_loc): Track minus_var and minus_con.
20062 2017-08-03  Tom de Vries  <tom@codesourcery.com>
20064         PR lto/81430
20065         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers): If
20066         ACCEL_COMPILER, apply finish_options on
20067         DECL_FUNCTION_SPECIFIC_OPTIMIZATION.
20069 2017-08-03  Tom de Vries  <tom@codesourcery.com>
20071         PR target/81662
20072         * config/nvptx/nvptx.c (nvptx_option_override): Emit sorry if
20073         function_entry_patch_area_size > 0.
20075 2017-08-03  Jakub Jelinek  <jakub@redhat.com>
20077         PR driver/81650
20078         * calls.c (alloc_max_size): Use HOST_WIDE_INT_UC (10??)
20079         instead of 10??LU, perform unit multiplication in wide_int,
20080         don't change alloc_object_size_limit if the limit is larger
20081         than SSIZE_MAX.
20083         PR tree-optimization/81655
20084         PR tree-optimization/81588
20085         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Handle also
20086         the case when ranges[i].low and high are 1 for unsigned type with
20087         precision 1.
20089         PR middle-end/81052
20090         * omp-low.c (diagnose_sb_0): Handle flag_openmp_simd like flag_openmp.
20091         (pass_diagnose_omp_blocks::gate): Enable also for flag_openmp_simd.
20093 2017-08-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20095         * tree-vrp.h: Add include guard.
20097 2017-08-02  Uros Bizjak  <ubizjak@gmail.com>
20099         PR target/81644
20100         * config/i386/i386.md (unspecv): Add UNSPECV_UD2.
20101         (ud2): New insn pattern.
20102         * config/i386/i386.c (ix86_expand_epilogue):
20103         For naked functions, generate ud2 instead of trap insn.
20105 2017-08-02  Marek Polacek  <polacek@redhat.com>
20107         PR other/81667
20108         * alloc-pool.h (base_pool_allocator): Initialize m_elt_size.
20110 2017-08-02  Tom de Vries  <tom@codesourcery.com>
20111             Cesar Philippidis  <cesar@codesourcery.com>
20113         * config/nvptx/nvptx.c (nvptx_lockless_update, nvptx_lockfull_update):
20114         Add missing edge probabilities.
20116 2017-08-02  Tamar Christina  <tamar.christina@arm.com>
20118         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
20119         Correct endianness.
20121 2017-08-02  Jakub Jelinek  <jakub@redhat.com>
20123         PR middle-end/79499
20124         * function.c (thread_prologue_and_epilogue_insns): Determine blocks
20125         for find_many_sub_basic_blocks bitmap by looking up BLOCK_FOR_INSN
20126         of first NONDEBUG_INSN_P in each of the split_prologue_seq and
20127         prologue_seq sequences - if any.
20129 2017-08-02  Richard Biener  <rguenther@suse.de>
20131         * tree-vect-stmts.c (vectorizable_store): Perform vector extracts
20132         via vectors if supported, integer extracts via punning if supported
20133         or otherwise vector extracts.
20135 2017-08-02  Richard Biener  <rguenther@suse.de>
20137         * tree-ssa-pre.c (bitmap_insert_into_set_1): Remove and inline
20138         into ...
20139         (bitmap_insert_into_set): ... this.
20141 2017-08-02  Richard Biener  <rguenther@suse.de>
20143         PR tree-optimization/81633
20144         Revert
20145         2015-08-17  Alan Hayward  <alan.hayward@arm.com>
20147         PR tree-optimization/71752
20148         * tree-vect-slp.c (vect_get_slp_defs): Handle null operands.
20150 2017-08-01  Daniel Santos  <daniel.santos@pobox.com>
20152         * config/i386/i386.h (ix86_frame::outlined_save_offset): Remove field.
20153         (machine_function::call_ms2sysv_pad_out): Remove field.
20154         * config/i386/i386.c (xlogue_layout::get_stack_space_used): Modify.
20155         (ix86_compute_frame_layout): Likewise.
20157 2017-08-01  H.J. Lu  <hongjiu.lu@intel.com>
20159         PR target/81654
20160         * config/i386/i386.c (ix86_set_func_type): Disallow naked
20161         attribute with interrupt attribute.
20163 2017-08-01  Andrew Pinski  <apinski@cavium.com>
20165         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Check
20166         BIT_INSERT_EXPR's operand 1
20167         to see if the types precision matches.
20169 2017-08-01  Martin Liska  <mliska@suse.cz>
20171         PR middle-end/70140
20172         * builtins.c (expand_builtin_memcpy_args): Remove.
20173         (expand_builtin_memcpy): Call newly added function
20174         expand_builtin_memory_copy_args.
20175         (expand_builtin_memcpy_with_bounds): Likewise.
20176         (expand_builtin_mempcpy): Remove last argument.
20177         (expand_builtin_mempcpy_with_bounds): Likewise.
20178         (expand_builtin_memory_copy_args): New function created from
20179         expand_builtin_mempcpy_args with small modifications.
20180         (expand_builtin_mempcpy_args): Remove.
20181         (expand_builtin_stpcpy): Remove unused argument.
20182         (expand_builtin): Likewise.
20183         (expand_builtin_with_bounds): Likewise.
20185 2017-08-01  Martin Liska  <mliska@suse.cz>
20187         Revert r250771
20188         Make mempcpy more optimal (PR middle-end/70140).
20190 2017-08-01  Jakub Jelinek  <jakub@redhat.com>
20192         PR target/81622
20193         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
20194         __builtin_vec_cmpne verify both arguments are compatible vectors
20195         before looking at TYPE_MODE on the element type.  For __builtin_vec_ld
20196         verify arg1_type is a pointer or array type.  For __builtin_vec_st,
20197         move computation of aligned to after checking the argument types.
20198         Formatting fixes.
20200         PR target/80846
20201         * config/rs6000/vsx.md (vextract_fp_from_shorth,
20202         vextract_fp_from_shortl): Add element mode after mode in gen_vec_init*
20203         calls.
20205 2017-08-01  Jerome Lambourg  <lambourg@adacore.com>
20206             Doug Rupp  <rupp@adacore.com>
20207             Olivier Hainque  <hainque@adacore.com>
20209         * config.gcc (arm-wrs-vxworks*): Rework to handle arm-wrs-vxworks7 as
20210         well as arm-wrs-vxworks. Update target_cpu_name from arm6 (arch v3) to
20211         arm8 (arch v4).
20212         * config/arm/vxworks.h (MAYBE_TARGET_BPABI_CPP_BUILTINS): New, helper
20213         for TARGET_OS_CPP_BUILTIN.
20214         (TARGET_OS_CPP_BUILTIN): Invoke MAYBE_TARGET_BPABI_CPP_BUILTINS(),
20215         refine CPU definitions for arm_arch5 and add those for arm_arch6 and
20216         arm_arch7.
20217         (MAYBE_ASM_ABI_SPEC): New, helper for SUBTARGET_EXTRA_ASM_SPEC,
20218         passing required abi options to the assembler for EABI configurations.
20219         (EXTRA_CC1_SPEC): New macro, to help prevent the implicit production
20220         of .text.hot and .text.unlikely sections for kernel modules when
20221         using ARM style exceptions.
20222         (CC1_SPEC): Remove obsolete attempt at mimicking Diab toolchain
20223         options. Add EXTRA_CC1_SPEC.
20224         (VXWORKS_ENDIAN_SPEC): Adjust comment and remove handling of Diab
20225         toolchain options.
20226         (DWARF2_UNWIND_INFO): Redefine to handle the pre/post VxWorks 7
20227         transition.
20228         (ARM_TARGET2_DWARF_FORMAT): Define.
20229         * config/arm/t-vxworks: Adjust multilib control to removal of the
20230         Diab command line options.
20232 2017-08-01  Martin Liska  <mliska@suse.cz>
20234         PR gcov-profile/81561
20235         * gcov.c (unblock): Make unblocking safe as we need to preserve
20236         index correspondence of blocks and block_lists.
20238 2017-08-01  Richard Biener  <rguenther@suse.de>
20240         PR tree-optimization/81181
20241         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
20242         (compute_antic): ... end of iteration here.
20244 2017-08-01  James Greenhalgh  <james.greenhalgh@arm.com>
20246         * common.opt (ftree-vectorize): No longer set flag_tree_vectorize.
20247         (ftree-loop-vectorize): Set as EnabledBy ftree-vectorize.
20248         (ftree-slp-vectorize): Likewise.
20249         * omp-expand (expand_omp_simd): Remove flag_tree_vectorize, as it
20250         can no longer be set independent of flag_tree_loop_vectorize.
20251         * omp-general.c (emp_max_vf): Likewise.
20252         * opts.c (enable_fdo_optimizations): Remove references to
20253         flag_tree_vectorize, these are now implicit.
20254         (common_handle_option): Remove handling for OPT_ftree_vectorize,
20255         and leave it for the options machinery.
20257 2017-08-01  Martin Liska  <mliska@suse.cz>
20259         PR middle-end/70140
20260         * builtins.c (expand_builtin_memcpy_args): Remove.
20261         (expand_builtin_memcpy): Call newly added function
20262         expand_builtin_memory_copy_args.
20263         (expand_builtin_memcpy_with_bounds): Likewise.
20264         (expand_builtin_mempcpy): Remove last argument.
20265         (expand_builtin_mempcpy_with_bounds): Likewise.
20266         (expand_builtin_memory_copy_args): New function created from
20267         expand_builtin_mempcpy_args with small modifications.
20268         (expand_builtin_mempcpy_args): Remove.
20269         (expand_builtin_stpcpy): Remove unused argument.
20270         (expand_builtin): Likewise.
20271         (expand_builtin_with_bounds): Likewise.
20273 2017-08-01  Uros Bizjak  <ubizjak@gmail.com>
20275         PR target/81641
20276         * config/i386/i386.c (ix86_print_operand_address_as): For -masm=intel
20277         print "ds:" only for immediates in generic address space.
20279 2017-08-01  Uros Bizjak  <ubizjak@gmail.com>
20281         PR target/81639
20282         * config/i386/i386.c (ix86_funciton_naked): New prototype.
20283         (ix86_function_ok_for_sibcall): Return false for naked functions.
20285 2017-08-01  Richard Biener  <rguenther@suse.de>
20287         * tree-ssa-pre.c (print_pre_expr): Handle NULL expr.
20288         (compute_antic): Seed worklist with exit block predecessors.
20289         * cfganal.c (dfs_find_deadend): For a cycle return the source
20290         of the edge closing it.
20292 2017-08-01  Tamar Christina  <tamar.christina@arm.com>
20294         * config/aarch64/aarch64.c
20295         (aarch64_can_const_movi_rtx_p): Move 0 check.
20297 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
20299         * tree.h (POINTER_TYPE_OVERFLOW_UNDEFINED): Delete.
20300         * fold-const.c (fold_comparison, fold_binary_loc): Delete use of
20301         above macro.
20302         * match.pd: Ditto in address comparison pattern.
20304 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
20306         PR tree-optimization/81627
20307         * tree-predcom.c (prepare_finalizers): Always rewrite into loop
20308         closed ssa form for store-store chain.
20310 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
20312         PR tree-optimization/81620
20313         * tree-predcom.c (add_ref_to_chain): Don't set has_max_use_after
20314         for store-store chain.
20316 2017-08-01  Jakub Jelinek  <jakub@redhat.com>
20318         PR tree-optimization/81588
20319         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If
20320         ranges[i].in_p, invert comparison code ccode.  For >/>=,
20321         swap rhs1 and rhs2 and comparison code unconditionally,
20322         for </<= don't do that.  Don't swap rhs1/rhs2 again if
20323         ranges[i].in_p, instead invert comparison code ccode if
20324         opcode or oe->rank is BIT_IOR_EXPR.
20326         PR target/80846
20327         * optabs.def (vec_extract_optab, vec_init_optab): Change from
20328         a direct optab to conversion optab.
20329         * optabs.c (expand_vector_broadcast): Use convert_optab_handler
20330         with GET_MODE_INNER as last argument instead of optab_handler.
20331         * expmed.c (extract_bit_field_1): Likewise.  Use vector from
20332         vector extraction if possible and optab is available.
20333         * expr.c (store_constructor): Use convert_optab_handler instead
20334         of optab_handler.  Use vector initialization from smaller
20335         vectors if possible and optab is available.
20336         * tree-vect-stmts.c (vectorizable_load): Likewise.
20337         * doc/md.texi (vec_extract, vec_init): Document that the optabs
20338         now have two modes.
20339         * config/i386/i386.c (ix86_expand_vector_init): Handle expansion
20340         of vec_init from half-sized vectors with the same element mode.
20341         * config/i386/sse.md (ssehalfvecmode): Add V4TI case.
20342         (ssehalfvecmodelower, ssescalarmodelower): New mode attributes.
20343         (reduc_plus_scal_v8df, reduc_plus_scal_v4df, reduc_plus_scal_v2df,
20344         reduc_plus_scal_v16sf, reduc_plus_scal_v8sf, reduc_plus_scal_v4sf,
20345         reduc_<code>_scal_<mode>, reduc_umin_scal_v8hi): Add element mode
20346         after mode in gen_vec_extract* calls.
20347         (vec_extract<mode>): Renamed to ...
20348         (vec_extract<mode><ssescalarmodelower>): ... this.
20349         (vec_extract<mode><ssehalfvecmodelower>): New expander.
20350         (rotl<mode>3, rotr<mode>3, <shift_insn><mode>3, ashrv2di3): Add
20351         element mode after mode in gen_vec_init* calls.
20352         (VEC_INIT_HALF_MODE): New mode iterator.
20353         (vec_init<mode>): Renamed to ...
20354         (vec_init<mode><ssescalarmodelower>): ... this.
20355         (vec_init<mode><ssehalfvecmodelower>): New expander.
20356         * config/i386/mmx.md (vec_extractv2sf): Renamed to ...
20357         (vec_extractv2sfsf): ... this.
20358         (vec_initv2sf): Renamed to ...
20359         (vec_initv2sfsf): ... this.
20360         (vec_extractv2si): Renamed to ...
20361         (vec_extractv2sisi): ... this.
20362         (vec_initv2si): Renamed to ...
20363         (vec_initv2sisi): ... this.
20364         (vec_extractv4hi): Renamed to ...
20365         (vec_extractv4hihi): ... this.
20366         (vec_initv4hi): Renamed to ...
20367         (vec_initv4hihi): ... this.
20368         (vec_extractv8qi): Renamed to ...
20369         (vec_extractv8qiqi): ... this.
20370         (vec_initv8qi): Renamed to ...
20371         (vec_initv8qiqi): ... this.
20372         * config/rs6000/vector.md (VEC_base_l): New mode attribute.
20373         (vec_init<mode>): Renamed to ...
20374         (vec_init<mode><VEC_base_l>): ... this.
20375         (vec_extract<mode>): Renamed to ...
20376         (vec_extract<mode><VEC_base_l>): ... this.
20377         * config/rs6000/paired.md (vec_initv2sf): Renamed to ...
20378         (vec_initv2sfsf): ... this.
20379         * config/rs6000/altivec.md (splitter, altivec_copysign_v4sf3,
20380         vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi,
20381         vec_unpacku_lo_v8hi, mulv16qi3, altivec_vreve<mode>2): Add
20382         element mode after mode in gen_vec_init* calls.
20383         * config/aarch64/aarch64-simd.md (vec_init<mode>): Renamed to ...
20384         (vec_init<mode><Vel>): ... this.
20385         (vec_extract<mode>): Renamed to ...
20386         (vec_extract<mode><Vel>): ... this.
20387         * config/aarch64/iterators.md (Vel): New mode attribute.
20388         * config/s390/s390.c (s390_expand_vec_strlen, s390_expand_vec_movstr):
20389         Add element mode after mode in gen_vec_extract* calls.
20390         * config/s390/vector.md (non_vec_l): New mode attribute.
20391         (vec_extract<mode>): Renamed to ...
20392         (vec_extract<mode><non_vec_l>): ... this.
20393         (vec_init<mode>): Renamed to ...
20394         (vec_init<mode><non_vec_l>): ... this.
20395         * config/s390/s390-builtins.def (s390_vlgvb, s390_vlgvh, s390_vlgvf,
20396         s390_vlgvf_flt, s390_vlgvg, s390_vlgvg_dbl): Add element mode after
20397         vec_extract mode.
20398         * config/arm/iterators.md (V_elem_l): New mode attribute.
20399         * config/arm/neon.md (vec_extract<mode>): Renamed to ...
20400         (vec_extract<mode><V_elem_l>): ... this.
20401         (vec_extractv2di): Renamed to ...
20402         (vec_extractv2didi): ... this.
20403         (vec_init<mode>): Renamed to ...
20404         (vec_init<mode><V_elem_l>): ... this.
20405         (reduc_plus_scal_<mode>, reduc_plus_scal_v2di, reduc_smin_scal_<mode>,
20406         reduc_smax_scal_<mode>, reduc_umin_scal_<mode>,
20407         reduc_umax_scal_<mode>, neon_vget_lane<mode>, neon_vget_laneu<mode>):
20408         Add element mode after gen_vec_extract* calls.
20409         * config/mips/mips-msa.md (vec_init<mode>): Renamed to ...
20410         (vec_init<mode><unitmode>): ... this.
20411         (vec_extract<mode>): Renamed to ...
20412         (vec_extract<mode><unitmode>): ... this.
20413         * config/mips/loongson.md (vec_init<mode>): Renamed to ...
20414         (vec_init<mode><unitmode>): ... this.
20415         * config/mips/mips-ps-3d.md (vec_initv2sf): Renamed to ...
20416         (vec_initv2sfsf): ... this.
20417         (vec_extractv2sf): Renamed to ...
20418         (vec_extractv2sfsf): ... this.
20419         (reduc_plus_scal_v2sf, reduc_smin_scal_v2sf, reduc_smax_scal_v2sf):
20420         Add element mode after gen_vec_extract* calls.
20421         * config/mips/mips.md (unitmode): New mode iterator.
20422         * config/spu/spu.c (spu_expand_prologue, spu_allocate_stack,
20423         spu_builtin_extract): Add element mode after gen_vec_extract* calls.
20424         * config/spu/spu.md (inner_l): New mode attribute.
20425         (vec_init<mode>): Renamed to ...
20426         (vec_init<mode><inner_l>): ... this.
20427         (vec_extract<mode>): Renamed to ...
20428         (vec_extract<mode><inner_l>): ... this.
20429         * config/sparc/sparc.md (veltmode): New mode iterator.
20430         (vec_init<VMALL:mode>): Renamed to ...
20431         (vec_init<VMALL:mode><VMALL:veltmode>): ... this.
20432         * config/ia64/vect.md (vec_initv2si): Renamed to ...
20433         (vec_initv2sisi): ... this.
20434         (vec_initv2sf): Renamed to ...
20435         (vec_initv2sfsf): ... this.
20436         (vec_extractv2sf): Renamed to ...
20437         (vec_extractv2sfsf): ... this.
20438         * config/powerpcspe/vector.md (VEC_base_l): New mode attribute.
20439         (vec_init<mode>): Renamed to ...
20440         (vec_init<mode><VEC_base_l>): ... this.
20441         (vec_extract<mode>): Renamed to ...
20442         (vec_extract<mode><VEC_base_l>): ... this.
20443         * config/powerpcspe/paired.md (vec_initv2sf): Renamed to ...
20444         (vec_initv2sfsf): ... this.
20445         * config/powerpcspe/altivec.md (splitter, altivec_copysign_v4sf3,
20446         vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi,
20447         vec_unpacku_lo_v8hi, mulv16qi3): Add element mode after mode in
20448         gen_vec_init* calls.
20450 2017-08-01  Richard Biener  <rguenther@suse.de>
20452         PR tree-optimization/81297
20453         * tree-vrp.c (get_single_symbol): Remove assert, instead drop
20454         TREE_OVERFLOW from INTEGER_CSTs.
20456 2017-07-31  Segher Boessenkool  <segher@kernel.crashing.org>
20458         * config/rs6000/rs6000.c (enum rs6000_reg_type): Delete trailing comma.
20460 2017-07-31  Carl Love  <cel@us.ibm.com>
20462         * config/rs6000/rs6000-c: Add support for built-in functions
20463         vector signed char vec_xl_be (signed long long, signed char *);
20464         vector unsigned char vec_xl_be (signed long long, unsigned char *);
20465         vector signed int vec_xl_be (signed long long, signed int *);
20466         vector unsigned int vec_xl_be (signed long long, unsigned int *);
20467         vector signed long long vec_xl_be (signed long long, signed long long *);
20468         vector unsigned long long vec_xl_be (signed long long, unsigned long long *);
20469         vector signed short vec_xl_be (signed long long, signed short *);
20470         vector unsigned short vec_xl_be (signed long long, unsigned short *);
20471         vector double vec_xl_be (signed long long, double *);
20472         vector float vec_xl_be (signed long long, float *);
20473         * config/rs6000/altivec.h (vec_xl_be): Add #define.
20474         * config/rs6000/rs6000-builtin.def (XL_BE_V16QI, XL_BE_V8HI, XL_BE_V4SI)
20475         XL_BE_V2DI, XL_BE_V4SF, XL_BE_V2DF, XL_BE): Add definitions
20476         for the builtins.
20477         * config/rs6000/rs6000.c (altivec_expand_xl_be_builtin): Add function.
20478         (altivec_expand_builtin): Add switch statement to call
20479         altivec_expand_xl_be for each builtin.
20480         (altivec_init_builtins): Add def_builtin for _builtin_vsx_le_be_v8hi,
20481         __builtin_vsx_le_be_v4si, __builtin_vsx_le_be_v2di,
20482         __builtin_vsx_le_be_v4sf, __builtin_vsx_le_be_v2df,
20483         __builtin_vsx_le_be_v16qi.
20484         * doc/extend.texi: Update the built-in documentation file for the
20485         new built-in functions.
20487 2017-07-31  Uros Bizjak  <ubizjak@gmail.com>
20489         PR target/25967
20490         * config/i386/i386.c (ix86_allocate_stack_slots_for_args):
20491         New function.
20492         (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
20494 2017-07-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
20496         * config.gcc: Add z14.
20497         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
20498         CPU model numbers for z13s and z14.
20499         * config/s390/s390-c.c (s390_resolve_overloaded_builtin): Replace
20500         arch12 with z14.
20501         * config/s390/s390-opts.h (enum processor_type): Rename
20502         PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
20503         * config/s390/s390.c (processor_table): Add field for CPU name to
20504         be passed to Binutils.
20505         (s390_asm_output_machine_for_arch): Use the new field in
20506         processor_table for Binutils.
20507         (s390_expand_builtin): Replace arch12 with z14.
20508         (s390_issue_rate): Rename PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
20509         (s390_get_sched_attrmask): Likewise.
20510         (s390_get_unit_mask): Likewise.
20511         * config/s390/s390.opt: Add z14 to processor_type enum.
20513 2017-07-31  Martin Jambor  <mjambor@suse.cz>
20515         PR hsa/81477
20516         * ipa-fnsummary.c (ipa_fn_summary_generate): Set versionable
20517         regardless of optimization level.
20519 2017-07-31  Jan Hubicka <hubicka@ucw.cz>
20520             Martin Liska  <mliska@suse.cz>
20522         * predict.def: Remove old comment and adjust probability.
20523         * gimplify.c (should_warn_for_implicit_fallthrough): Ignore
20524         PREDICT statements.
20526 2017-07-31  Uros Bizjak  <ubizjak@gmail.com>
20528         PR target/25967
20529         * config/i386/i386.c (ix86_function_naked): New function.
20530         (ix86_can_use_return_insn_p): Return false for naked functions.
20531         (ix86_expand_prologue): Skip prologue for naked functions.
20532         (ix86_expand_epilogue): Skip epilogue for naked functions
20533         and emit trap instruction.
20534         (ix86_warn_func_return): New function.
20535         (ix86_attribute_table): Add "naked" attribute specification.
20536         (TARGET_WARN_FUNC_RETURN): Define.
20537         * doc/extend.texi (x86 Function Attributes) <naked>: Document it.
20539 2017-07-31  Martin Liska  <mliska@suse.cz>
20541         * gimple-pretty-print.c (dump_gimple_label): Never dump BB info.
20542         (dump_gimple_bb_header): Always dump BB info.
20543         (pp_cfg_jump): Do not append info about BB when dumping a jump.
20545 2017-07-31  Martin Liska  <mliska@suse.cz>
20547         PR sanitize/81530
20548         * convert.c (convert_to_integer_1): Guard condition with flag_sanitize_p
20549         also with current_function_decl non-null equality.
20551 2017-07-31  Jakub Jelinek  <jakub@redhat.com>
20553         PR sanitizer/81604
20554         * ubsan.c (ubsan_type_descriptor): For UBSAN_PRINT_ARRAY don't
20555         change type to the element type, instead add eltype variable and
20556         use it where we are interested in the element type.
20558         PR tree-optimization/81603
20559         * ipa-polymorphic-call.c
20560         (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Perform
20561         offset arithmetic in offset_int, bail out if the resulting bit offset
20562         doesn't fit into shwi.
20564 2017-07-31  Martin Liska  <mliska@suse.cz>
20566         * gimplify.c (mostly_copy_tree_r): Remove Java specific hunk.
20567         (gimplify_save_expr): Fix comment.
20569 2017-07-30  H.J. Lu  <hongjiu.lu@intel.com>
20571         PR target/79793
20572         * config/i386/i386.c (ix86_function_arg): Update arguments for
20573         exception handler.
20574         (ix86_compute_frame_layout): Set the initial stack offset to
20575         INCOMING_FRAME_SP_OFFSET.  Update red-zone offset with
20576         INCOMING_FRAME_SP_OFFSET.
20577         (ix86_expand_epilogue): Don't pop the 'ERROR_CODE' off the
20578         stack before exception handler returns.
20579         * config/i386/i386.h (INCOMING_FRAME_SP_OFFSET): Add the
20580         the 'ERROR_CODE' for exception handler.
20582 2017-07-30  Uros Bizjak  <ubizjak@gmail.com>
20584         * config/i386/i386.h (ASM_PRINTF_EXTENSIONS): New macro.
20585         (ASM_OUTPUT_REG_PUSH): Rewrite with new operand modifiers.
20586         (ASM_OUTPUT_REG_POP): Ditto.
20587         * config/i386/i386.c (ix86_asm_output_function_label): Use fputs
20588         instead of asm_fprintf to output pure string.
20590 2017-07-29  Jakub Jelinek  <jakub@redhat.com>
20592         * debug.h (struct gcc_debug_hooks): Add IMPLICIT argument
20593         to imported_module_or_decl hook.
20594         (debug_nothing_tree_tree_tree_bool): Remove.
20595         (debug_nothing_tree_tree_tree_bool_bool): New declaration.
20596         * debug.c (do_nothing_debug_hooks): Use
20597         debug_nothing_tree_tree_tree_bool_bool instead of
20598         debug_nothing_tree_tree_tree_bool.
20599         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
20600         * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
20601         * sdbout.c (sdb_debug_hooks): Likewise.
20602         * dwarf2out.c (dwarf2_lineno_debug_hooks): Likewise.
20603         (gen_namespace_die): Add DW_AT_export_symbols attribute if
20604         langhook wants it.
20605         (dwarf2out_imported_module_or_decl): Add IMPLICIT argument,
20606         if true, -gdwarf-5 and decl will have DW_AT_export_symbols
20607         attribute, don't add anything.
20609 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20611         * fold-const.c (fold_build1_stat_loc): Remove _stat from name.
20612         (fold_build2_stat_loc): Likewise.
20613         (fold_build3_stat_loc): Likewise.
20614         * fold-const.h (fold_build1, fold_build2, fold_build3): Adjust.
20615         (fold_build1_loc): Remove macro.
20616         (fold_build2_loc): Likewise.
20617         (fold_build3_loc): Likewise.
20619 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20621         * gimple.c (gimple_build_debug_bind_stat): Remove _stat from name.
20622         (gimple_build_debug_bind_source_stat): Likewise.
20623         * gimple.h (gimple_build_debug_bind): Remove macro.
20624         (gimple_build_debug_bind_source): Likewise.
20626 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20628         * bitmap.c (bitmap_alloc): Adjust.
20629         (bitmap_gc_alloc): Likewise.
20630         * bitmap.h (bitmap_initialize_stat): Remove _stat from name.
20632 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20634         * bitmap.c (bitmap_obstack_alloc_stat): Rename to bitmap_alloc.
20635         (bitmap_gc_alloc_stat): Rename to bitmap_gc_alloc.
20636         * bitmap.h (bitmap_obstack_alloc_stat): Adjust prototype.
20637         (bitmap_gc_alloc_stat): Likewise.
20638         (BITMAP_ALLOC, BITMAP_GGC_ALLOC): Adjust.
20640 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20642         * rtl.c (shallow_copy_rtx_stat): Remove _stat from name.
20643         * rtl.h (shallow_copy_rtx): Remove macro.
20645 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20647         * emit-rtl.c (gen_raw_REG): Adjust.
20648         * gengenrtl.c (gendef): Likewise.
20649         * rtl.c (rtx_alloc_stat): Remove _stat from name.
20650         * rtl.h (rtx_alloc): Remove macro.
20652 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20654         * tree.c (build_tree_list_vec_stat): Remove _stat from name.
20655         (build_tree_list_stat): Likewise.
20656         * tree.h (build_tree_list): Remove macro.
20657         (build_tree_list_vec): Likewise.
20659 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20661         * tree.c (make_vector_stat): Remove _stat from name.
20662         (build_vector_stat): Likewise.
20663         * tree.h (make_vector_stat): Remove macro.
20664         (build_vector_stat): Likewise.
20666 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20668         * tree.h (build_var_debug_value): Remove prototype.
20670 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20672         * tree.c (tree_cons_stat): Remove _stat from name.
20673         * tree.h (tree_cons): Remove macro.
20675 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20677         * tree.c (build_vl_exp_stat): Remove _stat from name.
20678         * tree.h (build_vl_exp): Remove macro.
20680 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20682         * tree.c (build_decl_stat): Remove _stat from name.
20683         * tree.h (build_decl): Remove macro.
20685 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20687         * gimple.c (gimple_build_with_ops_stat): Adjust.
20688         (gimple_alloc_stat): Remove _stat from name.
20689         * gimple.h (gimple_alloc): Remove macro.
20691 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20693         * tree.c (make_tree_vec_stat): Remove _stat from name.
20694         (grow_tree_vec_stat): Likewise.
20695         * tree.h (make_tree_vec_stat): Adjust prototype.
20696         (grow_tree_vec_stat): Likewise.
20697         (make_tree_vec): Remove macro.
20698         (grow_tree_vec): Likewise.
20700 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20702         * fold-const.c (fold_build1_stat_loc): Adjust.
20703         (fold_build2_stat_loc): Likewise.
20704         (fold_build3_stat_loc): Likewise.
20705         * tree.c (build0_stat): Remove _stat from name.
20706         (build1_stat): Likewise.
20707         (build2_stat): Likewise.
20708         (build3_stat): Likewise.
20709         (build4_stat): Likewise.
20710         (build5_stat): Likewise.
20711         * tree.h (build1_loc): Remove macro, and rename _stat function
20712         to this.
20713         (build2_loc): Likewise.
20714         (build3_loc): Likewise.
20715         (build4_loc): Likewise.
20716         (build5_loc): Likewise.
20718 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20720         * tree.c (make_int_cst_stat): Remove _stat from name.
20721         * tree.h (make_int_cst_stat): Adjust prototype.
20722         (make_int_cst): Remove macro.
20724 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20726         * tree.c (make_tre_binfo_stat): Remove _stat from name.
20727         * tree.h (make_tree_binfo_stat): Adjust prototype.
20728         (make_tree_binfo): Remove.
20730 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20732         * tree.c (copy_node_stat): Rename to copy_node.
20733         (build_distinct_type_copy): Adjust.
20734         * tree.h (copy_node_stat): Adjust prototype.
20735         (copy_node): Remove macro.
20737 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20739         * tree.c (make_node_stat): rename to make_node.
20740         (build_tree_list_stat): Adjust.
20741         (build0_stat): Likewise.
20742         (build2_stat): Likewise.
20743         (build3_stat): Likewise.
20744         (build4_stat): Likewise.
20745         (build5_stat): Likewise.
20746         (build_decl_stat): Likewise.
20747         * tree.h (make_node_stat): Adjust prototype.
20748         (make_node): remove macro.
20750 2017-07-28  Peter Bergner  <bergner@vnet.ibm.com>
20752         * config/rs6000/ppc-auxv.h (PPC_FEATURE2_DARN): New define.
20753         (PPC_FEATURE2_SCV): Likewise.
20754         * config/rs6000/rs6000.c (cpu_supports_info): Use them.
20756 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
20758         * config/aarch64/aarch64.c
20759         (aarch64_internal_mov_immediate): Add new special pattern.
20760         * config/aarch64/aarch64.md (*movdi_aarch64):
20761         Add reg/32bit const mov case.
20763 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
20764             Richard Sandiford <richard.sandiford@linaro.org>
20766         * config/aarch64/aarch64.md (mov<mode>): Generalize.
20767         (*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
20768         Add integer and movi cases.
20769         (movi-split-hf-df-sf split, fp16): New.
20770         (enabled): Added TARGET_FP_F16INST.
20771         * config/aarch64/iterators.md (GPF_HF): New.
20772         * config/aarch64/predicates.md (aarch64_reg_or_fp_float): New.
20774 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
20776         * config/aarch64/aarch64.c
20777         (aarch64_simd_container_mode): Add prototype.
20778         (aarch64_expand_mov_immediate): Add HI support.
20779         (aarch64_reinterpret_float_as_int, aarch64_float_const_rtx_p: New.
20780         (aarch64_can_const_movi_rtx_p): New.
20781         (aarch64_preferred_reload_class):
20782         Remove restrictions of using FP registers for certain SIMD operations.
20783         (aarch64_rtx_costs): Added new cost for CONST_DOUBLE moves.
20784         (aarch64_valid_floating_const): Add integer move validation.
20785         (aarch64_simd_imm_scalar_p): Remove.
20786         (aarch64_output_scalar_simd_mov_immediate): Generalize function.
20787         (aarch64_legitimate_constant_p): Expand list of supported cases.
20788         * config/aarch64/aarch64-protos.h
20789         (aarch64_float_const_rtx_p, aarch64_can_const_movi_rtx_p): New.
20790         (aarch64_reinterpret_float_as_int): New.
20791         (aarch64_simd_imm_scalar_p): Remove.
20792         * config/aarch64/constraints.md (Uvi): New.
20793         (Dd): Split into Ds and new Dd.
20794         * config/aarch64/aarch64.md (*movsi_aarch64):
20795         Add SIMD mov case.
20796         (*movdi_aarch64): Add SIMD mov case.
20798 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
20800         * tree-predcom.c: (struct chain): Handle store-store chain in which
20801         stores for elimination only store loop invariant values.
20802         (execute_pred_commoning_chain): Ditto.
20803         (prepare_initializers_chain_store_elim): Ditto.
20804         (prepare_finalizers): Ditto.
20805         (is_inv_store_elimination_chain): New function.
20806         (initialize_root_vars_store_elim_1): New function.
20808 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
20810         * tree-predcom.c: Revise general description of the pass.
20811         (enum chain_type): New enum type for store elimination.
20812         (struct chain): New field supporting store elimination.
20813         (struct component): Ditto.
20814         (dump_chain): Dump store-stores chain.
20815         (release_chain): Release resources.
20816         (split_data_refs_to_components): Compute and create component
20817         contains only stores for elimination.
20818         (get_chain_last_ref_at): New function.
20819         (make_invariant_chain): Initialization.
20820         (make_rooted_chain): Specify chain type in parameter and record it.
20821         (add_looparound_copies): Skip for store-stores chain.
20822         (determine_roots_comp): Compute type of chain and pass it to
20823         make_rooted_chain.
20824         (initialize_root_vars_store_elim_2): New function.
20825         (finalize_eliminated_stores): New function.
20826         (remove_stmt): Handle store for elimination.
20827         (execute_pred_commoning_chain): Execute predictive commoning on
20828         store-store chains.
20829         (determine_unroll_factor): Skip unroll for store-stores chain.
20830         (prepare_initializers_chain_store_elim): New function.
20831         (prepare_initializers_chain): Hanlde store-store chain.
20832         (prepare_finalizers_chain, prepare_finalizers): New function.
20833         (tree_predictive_commoning_loop): Return integer value indicating
20834         if loop is unrolled or lcssa form is corrupted.
20835         (tree_predictive_commoning): Rewrite for lcssa form if necessary.
20837 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
20839         * tree-predcom.c (initialize_root): Delete.
20840         (execute_pred_commoning_chain): Initialize root vars and replace
20841         reference of non-combined chain directly, rather than call above
20842         function.
20844 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
20846         * tree-predcom.c (ref_at_iteration): Add parameter NITERS.  Compute
20847         memory reference to DR at (NITERS + ITERS)-th iteration of loop.
20849 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
20851         * tree-predcom.c (struct chain): New field init_seq.
20852         (release_chain): Release init_seq.
20853         (prepare_initializers_chain): Record intialization stmts in above
20854         field.
20855         (insert_init_seqs): New function.
20856         (tree_predictive_commoning_loop): Call insert_init_seqs.
20858 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
20860         * tree-predcom.c (determine_roots_comp): Skip trivial components.
20862 2017-07-28  Richard Biener  <rguenther@suse.de>
20864         * match.pd: Remove superfluous :c.
20865         * genmatch.c (simplify::id): Add member.
20866         (lower_commutative, lower_opt_convert, lower_cond, lower_for):
20867         Copy id.
20868         (current_id): New global.
20869         (dt_node::parent): Move from ...
20870         (dt_operand::parent): ... here.  Add for_id member.
20871         (is_a_helper <dt_operand *>::test): DT_TRUE is also a dt_operand.
20872         (decision_tree::find_node): Relax order requirement when
20873         merging DT_TRUE nodes to ones inbetween the current simplify
20874         and the one we try to merge with.  Add diagnostic whenever
20875         we need to enforce pattern order by not merging.
20876         (decision_tree::insert): Set current_id.
20877         (decision_tree::print_node): Dump parent node and for_id.
20878         (parser::last_id): Add member.
20879         (parser::push_simplify): Assign unique id.
20880         (parser::parser): Initialize last_id.
20882 2017-07-28  Martin Liska  <mliska@suse.cz>
20884         PR sanitizer/81340
20885         * sanopt.c (sanitize_rewrite_addressable_params): Set VALUE_EXPR after
20886         gimple_build_debug_bind.
20888 2017-07-28  Richard Biener  <rguenther@suse.de>
20890         PR tree-optimization/81502
20891         * match.pd: Add pattern combining BIT_INSERT_EXPR with
20892         BIT_FIELD_REF.
20893         * tree-cfg.c (verify_expr): Verify types of BIT_FIELD_REF
20894         size/pos operands.
20895         (verify_gimple_assign_ternary): Likewise for BIT_INSERT_EXPR pos.
20896         * gimple-fold.c (maybe_canonicalize_mem_ref_addr): Use bitsizetype
20897         for BIT_FIELD_REF args.
20898         * fold-const.c (make_bit_field_ref): Likewise.
20899         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
20901 2017-07-28  Jakub Jelinek  <jakub@redhat.com>
20903         PR sanitizer/80998
20904         * sanopt.c (pass_sanopt::execute): Handle IFN_UBSAN_PTR.
20905         * tree-ssa-alias.c (call_may_clobber_ref_p_1): Likewise.
20906         * flag-types.h (enum sanitize_code): Add SANITIZER_POINTER_OVERFLOW.
20907         Or it into SANITIZER_UNDEFINED.
20908         * ubsan.c: Include gimple-fold.h and varasm.h.
20909         (ubsan_expand_ptr_ifn): New function.
20910         (instrument_pointer_overflow): New function.
20911         (maybe_instrument_pointer_overflow): New function.
20912         (instrument_object_size): Formatting fix.
20913         (pass_ubsan::execute): Call instrument_pointer_overflow
20914         and maybe_instrument_pointer_overflow.
20915         * internal-fn.c (expand_UBSAN_PTR): New function.
20916         * ubsan.h (ubsan_expand_ptr_ifn): Declare.
20917         * sanitizer.def (__ubsan_handle_pointer_overflow,
20918         __ubsan_handle_pointer_overflow_abort): New builtins.
20919         * tree-ssa-tail-merge.c (merge_stmts_p): Handle IFN_UBSAN_PTR.
20920         * internal-fn.def (UBSAN_PTR): New internal function.
20921         * opts.c (sanitizer_opts): Add pointer-overflow.
20922         * lto-streamer-in.c (input_function): Handle IFN_UBSAN_PTR.
20923         * fold-const.c (build_range_check): Compute pointer range check in
20924         integral type if pointer arithmetics would be needed.  Formatting
20925         fixes.
20927 2017-07-28  Martin Liska  <mliska@suse.cz>
20929         PR sanitizer/81460
20930         * sanopt.c (sanitize_rewrite_addressable_params): Do not rewrite
20931         parameters that are of a variable-length.
20933 2017-07-28  Sebastian Huber  <sebastian.huber@embedded-brains.de>
20935         * config.gcc (powerpc-*-rtems*): Remove rs6000/eabi.h.  Add
20936         rs6000/biarch64.h.
20937         * config/rs6000/rtems.h (ASM_DECLARE_FUNCTION_SIZE): New macro.
20938         (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise.
20939         (CRT_CALL_STATIC_FUNCTION): Likewise.
20940         (ASM_DEFAULT_SPEC): New define.
20941         (ASM_SPEC32): Likewise.
20942         (ASM_SPEC64): Likewise.
20943         (ASM_SPEC_COMMON): Likewise.
20944         (ASM_SPEC): Likewise.
20945         (INVALID_64BIT): Likewise.
20946         (LINK_OS_DEFAULT_SPEC): Likewise.
20947         (LINK_OS_SPEC32): Likewise.
20948         (LINK_OS_SPEC64): Likewise.
20949         (POWERPC_LINUX): Likewise.
20950         (PTRDIFF_TYPE): Likewise.
20951         (RESTORE_FP_PREFIX): Likewise.
20952         (RESTORE_FP_SUFFIX): Likewise.
20953         (SAVE_FP_PREFIX): Likewise.
20954         (SAVE_FP_SUFFIX): Likewise.
20955         (SIZE_TYPE): Likewise.
20956         (SUBSUBTARGET_OVERRIDE_OPTIONS): Likewise.
20957         (TARGET_64BIT): Likewise.
20958         (TARGET_64BIT): Likewise.
20959         (TARGET_AIX): Likewise.
20960         (WCHAR_TYPE_SIZE): Likewise.
20961         (WCHAR_TYPE): Undefine.
20962         (TARGET_OS_CPP_BUILTINS): Add 64-bit PowerPC defines.
20963         (CPP_OS_DEFAULT_SPEC): Use previous CPP_OS_RTEMS_SPEC.
20964         (CPP_OS_RTEMS_SPEC): Delete.
20965         (SUBSUBTARGET_EXTRA_SPECS): Remove cpp_os_rtems.  Add
20966         asm_spec_common, asm_spec32, asm_spec64, link_os_spec32, and
20967         link_os_spec64.
20968         * config/rs6000/t-rtems: Add mcpu=e6500/m64 multilibs.
20970 2017-07-28  Jakub Jelinek  <jakub@redhat.com>
20972         PR tree-optimization/81578
20973         * tree-parloops.c (build_new_reduction): Bail out if
20974         reduction_code isn't one of the standard OpenMP reductions.
20975         Move the details printing after that decision.
20977 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
20979         * config/rs6000/predicates.md (volatile_mem_operand): Remove code
20980         related to reload_in_progress.
20981         (splat_input_operand): Likewise.
20982         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_rtx):
20983         Delete prototype.
20984         * config/rs6000/rs6000.c (machine_function): Remove sdmode_stack_slot
20985         field.
20986         (TARGET_EXPAND_TO_RTL_HOOK): Delete.
20987         (TARGET_INSTANTIATE_DECLS): Likewise.
20988         (legitimate_indexed_address_p): Delete reload_in_progress code.
20989         (rs6000_debug_legitimate_address_p): Likewise.
20990         (rs6000_eliminate_indexed_memrefs): Likewise.
20991         (rs6000_emit_le_vsx_store): Likewise.
20992         (rs6000_emit_move_si_sf_subreg): Likewise.
20993         (rs6000_emit_move): Likewise.
20994         (register_to_reg_type): Likewise.
20995         (rs6000_pre_atomic_barrier): Likewise.
20996         (rs6000_machopic_legitimize_pic_address): Likewise.
20997         (rs6000_allocate_stack_temp): Likewise.
20998         (rs6000_address_for_fpconvert): Likewise.
20999         (rs6000_address_for_altivec): Likewise.
21000         (rs6000_secondary_memory_needed_rtx): Delete function.
21001         (rs6000_check_sdmode): Likewise.
21002         (rs6000_alloc_sdmode_stack_slot): Likewise.
21003         (rs6000_instantiate_decls): Likewise.
21004         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED_RTX): Delete.
21005         * config/rs6000/rs6000.md (splitter for *movsi_got_internal):
21006         Delete reload_in_progress.
21007         (*vec_reload_and_plus_<mptrsize>): Likewise.
21008         * config/rs6000/vsx.md (vsx_mul_v2di): Likewise.
21009         (vsx_div_v2di): Likewise.
21010         (vsx_udiv_v2di): Likewise.
21012 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
21014         * config/rs6000/rs6000.opt (mlra): Replace with stub.
21015         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete OPTION_MASK_LRA.
21016         * config/rs6000/rs6000.c (TARGET_LRA_P): Delete.
21017         (rs6000_debug_reg_global): Delete print of LRA status.
21018         (rs6000_option_override_internal): Delete dead LRA related code.
21019         (rs6000_lra_p): Delete function.
21020         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mlra.
21022 2017-07-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21024         * config.gcc (riscv*-*-elf*): Add (riscv*-*-rtems*).
21025         * config/riscv/rtems.h: New file.
21027 2017-07-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21028             Sudakshina Das  <sudi.das@arm.com>
21030         * config/aarch64/aarch64.md
21031         (define_split for and<mode>3nr_compare): Move
21032         non aarch64_logical_operand to a register.
21033         (define_split for and_<SHIFT:optab><mode>3nr_compare0): Move non
21034         register immediate operand to a register.
21035         * config/aarch64/predicates.md (aarch64_mov_imm_operand): New.
21037 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
21039         PR middle-end/81564
21040         * tree-cfg.c (group_case_labels_stmt): Handle already deleted blocks.
21042 2017-07-27  Richard Biener  <rguenther@suse.de>
21044         PR tree-optimization/81573
21045         PR tree-optimization/81494
21046         * tree-vect-loop.c (vect_create_epilog_for_reduction): Handle
21047         multi defuse cycle case.
21049 2017-07-27  Richard Biener  <rguenther@suse.de>
21051         PR tree-optimization/81571
21052         * tree-vect-slp.c (vect_build_slp_tree): Properly verify reduction
21053         PHIs.
21055 2017-07-27  Eric Botcazou  <ebotcazou@adacore.com>
21057         * config/sparc/sparc.c (sparc_option_override): Set MASK_FSMULD flag
21058         earlier and only if MASK_FPU is set.  Adjust formatting.
21060 2017-07-27  Martin Liska  <mliska@suse.cz>
21062         * opt-functions.awk: Add validation of value of Init.
21063         * optc-gen.awk: Pass new argument.
21065 2017-07-27  Martin Liska  <mliska@suse.cz>
21067         * auto-profile.c (autofdo_source_profile::update_inlined_ind_target):
21068         Fix wrong condition.
21070 2017-07-27  Martin Liska  <mliska@suse.cz>
21072         * auto-profile.c (afdo_annotate_cfg): Assign zero counts to
21073         BBs and edges seen by autoFDO.
21075 2017-07-27  Richard Biener  <rguenther@suse.de>
21077         PR tree-optimization/81502
21078         * tree-ssa.c (non_rewritable_lvalue_p): Handle BIT_INSERT_EXPR
21079         with incompatible but same sized type.
21080         (execute_update_addresses_taken): Likewise.
21082 2017-07-27  James Greenhalgh  <james.greenhalgh@arm.com>
21084         * tree-ssa-loop-ch.c (pass_ch::process_loop_p): Guard on
21085         flag_tree_loop_vectorize rather than flag_tree_vectorize.
21087 2017-07-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
21089         PR target/81534
21090         * config/s390/s390.md ("*atomic_compare_and_swap<mode>_1")
21091         ("*atomic_compare_and_swapdi_2", "*atomic_compare_and_swapsi_3"):
21092         Change s_operand to memory_operand.
21094 2017-07-27  Richard Sandiford  <richard.sandiford@linaro.org>
21096         * config/rs6000/rs6000-protos.h (rs6000_emit_le_vsx_permute): Declare.
21097         * config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Replace with...
21098         (rs6000_emit_le_vsx_permute): ...this.  Take the destination as input.
21099         Emit instructions rather than returning an expression.  Handle TFmode
21100         and KFmode by casting to TImode.
21101         (rs6000_emit_le_vsx_load): Update to use rs6000_emit_le_vsx_permute.
21102         (rs6000_emit_le_vsx_store): Likewise.
21103         * config/rs6000/vsx.md (VSX_TI): New iterator.
21104         (*vsx_le_permute_<mode>): Use it instead of VSX_LE_128.
21105         (*vsx_le_undo_permute_<mode>): Likewise.
21106         (*vsx_le_perm_load_<mode>): Use rs6000_emit_le_vsx_permute to
21107         emit the split sequence.
21108         (*vsx_le_perm_store_<mode>): Likewise.
21110 2017-07-27  Jakub Jelinek  <jakub@redhat.com>
21112         PR tree-optimization/81555
21113         PR tree-optimization/81556
21114         * tree-ssa-reassoc.c (rewrite_expr_tree): Add NEXT_CHANGED argument,
21115         if true, force CHANGED for the recursive invocation.
21116         (reassociate_bb): Remember original length of ops array, pass
21117         len != orig_len as NEXT_CHANGED in rewrite_expr_tree call.
21119         * attribs.c (decl_attributes): Imply noinline, noclone and no_icf
21120         attributes for noipa attribute.  For naked attribute use
21121         lookup_attribute first before lookup_attribute_spec.
21122         * final.c (rest_of_handle_final): Disable IPA RA for functions with
21123         noipa attribute.
21124         * ipa-visibility.c (non_local_p): Fix comment typos.  Return true
21125         for functions with noipa attribute.
21126         (cgraph_externally_visible_p): Return true for functions with noipa
21127         attribute.
21128         * cgraph.c (cgraph_node::get_availability): Return AVAIL_INTERPOSABLE
21129         for functions with noipa attribute.
21130         * doc/extend.texi: Document noipa function attribute.
21131         * tree-ssa-structalias.c (refered_from_nonlocal_fn): Set *nonlocal_p
21132         also for functions with noipa attribute.
21133         (ipa_pta_execute): Set nonlocal_p also for nodes with noipa attribute.
21135 2017-07-26  Andrew Pinski  <apinski@cavium.com>
21137         * config/aarch64/aarch64.c (thunderx_vector_cost): Decrease cost of
21138         vec_unalign_load_cost and vec_unalign_store_cost.
21140 2017-07-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
21142         * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Delete
21143         -mvsx-small-integer option.
21144         (ISA_3_0_MASKS_IEEE): Likewise.
21145         (OTHER_VSX_VECTOR_MASKS): Likewise.
21146         (POWERPC_MASKS): Likewise.
21147         * config/rs6000/rs6000.opt (-mvsx-small-integer): Likewise.
21148         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Simplify
21149         code, only testing for DImode being allowed in non-VSX floating
21150         point registers.
21151         (rs6000_init_hard_regno_mode_ok): Change TARGET_VSX_SMALL_INTEGER
21152         to TARGET_P8_VECTOR test.  Remove redundant VSX test inside of
21153         another VSX test.
21154         (rs6000_option_override_internal): Delete -mvsx-small-integer.
21155         (rs6000_expand_vector_set): Change TARGET_VSX_SMALL_INTEGER to
21156         TARGET_P8_VECTOR test.
21157         (rs6000_secondary_reload_simple_move): Likewise.
21158         (rs6000_preferred_reload_class): Delete TARGET_VSX_SMALL_INTEGER,
21159         since TARGET_P9_VECTOR was already tested.
21160         (rs6000_opt_masks): Remove -mvsx-small-integer.
21161         * config/rs6000/vsx.md (vsx_extract_<mode>): Delete
21162         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
21163         used.
21164         (vsx_extract_<mode>_p9): Delete TARGET_VSX_SMALL_INTEGER, since a
21165         test for TARGET_VEXTRACTUB was used, and that uses
21166         TARGET_P9_VECTOR.
21167         (p9 extract splitter): Likewise.
21168         (vsx_extract_<mode>_di_p9): Likewise.
21169         (vsx_extract_<mode>_store_p9): Likewise.
21170         (vsx_extract_si): Delete TARGET_VSX_SMALL_INTEGER, since a test
21171         for TARGET_P9_VECTOR was used.  Delete code that is now dead with
21172         the elimination of TARGET_VSX_SMALL_INTEGER.
21173         (vsx_extract_<mode>_p8): Likewise.
21174         (vsx_ext_<VSX_EXTRACT_I:VS_scalar>_fl_<FL_CONV:mode>): Likewise.
21175         (vsx_ext_<VSX_EXTRACT_I:VS_scalar>_ufl_<FL_CONV:mode>): Likewise.
21176         (vsx_set_<mode>_p9): Likewise.
21177         (vsx_set_v4sf_p9): Likewise.
21178         (vsx_set_v4sf_p9_zero): Likewise.
21179         (vsx_insert_extract_v4sf_p9): Likewise.
21180         (vsx_insert_extract_v4sf_p9_2): Likewise.
21181         * config/rs6000/rs6000.md (sign extend splitter): Change
21182         TARGET_VSX_SMALL_INTEGER to TARGET_P8_VECTOR test.
21183         (floatsi<mode>2_lfiwax_mem): Likewise.
21184         (floatunssi<mode>2_lfiwzx_mem): Likewise.
21185         (float<QHI:mode><FP_ISA3:mode>2): Delete TARGET_VSX_SMALL_INTEGER,
21186         since a test for TARGET_P9_VECTOR was used.
21187         (float<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
21188         (floatuns<QHI:mode><FP_ISA3:mode>2): Likewise.
21189         (floatuns<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
21190         (fix_trunc<mode>si2): Change TARGET_VSX_SMALL_INTEGER to
21191         TARGET_P8_VECTOR test.
21192         (fix_trunc<mode>si2_stfiwx): Likewise.
21193         (fix_trunc<mode>si2_internal): Likewise.
21194         (fix_trunc<SFDF:mode><QHI:mode>2): Delete
21195         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
21196         used.
21197         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
21198         (fixuns_trunc<mode>si2): Change TARGET_VSX_SMALL_INTEGER to
21199         TARGET_P8_VECTOR test.
21200         (fixuns_trunc<mode>si2_stfiwx): Likewise.
21201         (fixuns_trunc<SFDF:mode><QHI:mode>2): Delete
21202         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
21203         used.
21204         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
21205         (fctiw<u>z_<mode>_smallint): Delete TARGET_VSX_SMALL_INTEGER,
21206         since a test for TARGET_P9_VECTOR was used.
21207         (splitter for loading small constants): Likewise.
21209 2017-07-26  Andrew Pinski  <apinski@cavium.com>
21211         * config/aarch64/aarch64.c (thunderx_vector_cost): Fix
21212         vec_fp_stmt_cost.
21214 2017-07-26  H.J. Lu  <hongjiu.lu@intel.com>
21216         PR target/81563
21217         * config/i386/i386.c (sp_valid_at): Properly check CFA offset.
21218         (fp_valid_at): Likewise.
21220 2017-07-26  James Greenhalgh  <james.greenhalgh@arm.com>
21222         * config/aarch64/aarch64.c (cortexa57_addrcost_table): Remove.
21223         (qdf24xx_addrcost_table): Likewise.
21224         (cortexa57_tunings): Update to use generic_branch_cost.
21225         (cortexa72_tunings): Likewise.
21226         (cortexa73_tunings): Likewise.
21227         (qdf24xx_tunings): Likewise.
21229 2017-07-26  James Greenhalgh  <james.greenhalgh@arm.com>
21231         * config/aarch64/aarch64.c (cortexa57_branch_cost): Remove.
21232         (thunderx2t99_branch_cost): Likewise.
21233         (cortexa35_tunings): Update to use generic_branch_cost.
21234         (cortexa53_tunings): Likewise.
21235         (cortexa57_tunings): Likewise.
21236         (cortexa72_tunings): Likewise.
21237         (cortexa73_tunings): Likewise.
21238         (thunderx2t99_tunings): Likewise.
21240 2017-07-26  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21242         * config/sparc/sparc.c (dump_target_flag_bits): Dump MASK_FSMULD.
21243         (sparc_option_override): Honour MASK_FSMULD.
21244         * config/sparc/sparc.h (MASK_FEATURES): Add MASK_FSMULD.
21245         * config/sparc/sparc.md (muldf3_extend): Use TARGET_FSMULD.
21246         * config/sparc/sparc.opt (mfsmuld): New option.
21247         * doc/invoke.texi (mfsmuld): Document option.
21249 2017-07-26  Marek Polacek  <polacek@redhat.com>
21251         PR middle-end/70992
21252         * tree.c (build2_stat): Don't set TREE_CONSTANT on divisions by zero.
21254 2017-07-26  Richard Biener  <rguenther@suse.de>
21256         * gimple-match-head.c (do_valueize): Return OP if valueize
21257         returns NULL_TREE.
21258         (get_def): New helper to get at the def stmt of a SSA name
21259         if valueize allows.
21260         * genmatch.c (dt_node::gen_kids_1): Use get_def instead of
21261         do_valueize to get at the def stmt.
21262         (dt_operand::gen_gimple_expr): Simplify do_valueize calls.
21264 2017-07-26  Wilco Dijkstra  <wdijkstr@arm.com>
21266         PR middle-end/46932
21267         * auto-inc-dec.c (parse_add_or_inc): Block autoinc on sfp.
21269 2017-07-26  Martin Liska  <mliska@suse.cz>
21271         PR sanitize/81186
21272         * function.c (expand_function_start): Make expansion of
21273         nonlocal_goto_save_area after parm_birth_insn.
21275 2017-07-26  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21277         * config/sparc/sparc.c (sparc_option_override): Remove MASK_FPU
21278         from all CPU target flags enable members.
21280 2017-07-26  Richard Biener  <rguenther@suse.de>
21282         * genmatch.c (dt_simplify::gen): Make iterator vars const.
21283         (decision_tree::gen): Make 'type' const.
21284         (write_predicate): Likewise.
21286 2017-07-24  Michael Meissner  <meissner@linux.vnet.ibm.com>
21288         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok):
21289         Eliminate TARGET_UPPER_REGS_{DF,DI,SF} usage.
21290         (rs6000_option_override_internal): Likewise.
21291         (rs6000_expand_vector_set): Likewise.
21292         * config/rs6000/rs6000.h (TARGET_UPPER_REGS_DF): Delete.
21293         (TARGET_UPPER_REGS_SF): Likewise.
21294         (TARGET_UPPER_REGS_DI): Likewise.
21295         (TARGET_VEXTRACTUB): Eliminate TARGET_UPPER_REGS_{DF,DI,SF}.
21296         (TARGET_DIRECT_MOVE_64BIT): Likewise.
21297         * config/rs6000/rs6000.md (ALTIVEC_DFORM): Likewise.
21298         (float<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
21299         (Splitters for DI constants in Altivec registers): Likewise.
21300         * config/rs6000/vsx.md (vsx_set_<mode>_p9): Likewise.
21301         (vsx_set_v4sf_p9): Likewise.
21302         (vsx_set_v4sf_p9_zero): Likewise.
21303         (vsx_insert_extract_v4sf_p9): Likewise.
21304         (vsx_insert_extract_v4sf_p9_2): Likewise.
21306 2017-07-25  Carl Love  <cel@us.ibm.com>
21308         * doc/extend.texi: Update the built-in documentation file for the
21309         existing built-in functions
21310         vector signed char vec_cnttz (vector signed char);
21311         vector unsigned char vec_cnttz (vector unsigned char);
21312         vector signed short vec_cnttz (vector signed short);
21313         vector unsigned short vec_cnttz (vector unsigned short);
21314         vector signed int vec_cnttz (vector signed int);
21315         vector unsigned int vec_cnttz (vector unsigned int);
21316         vector signed long long vec_cnttz (vector signed long long);
21317         vector unsigned long long vec_cnttz (vector unsigned long long);
21319 2017-07-25  Andrew Pinski  <apinski@cavium.com>
21321         * tree-ssa-uninit.c (warn_uninitialized_vars): Don't warn about memory
21322         accesses where the use is for the first operand of a BIT_INSERT.
21324 2017-07-25  Jim Wilson  <jim.wilson@linaro.org>
21326         PR bootstrap/81521
21327         * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
21328         for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
21330 2017-07-25  Jim Wilson  <jim.wilson@linaro.org>
21332         * config/i386/gstabs.h: Delete.
21333         * config/i386/openbsd.h, config/i386/t-openbsd: Likewise.
21335 2017-07-25  Uros Bizjak  <ubizjak@gmail.com>
21337         * config/i386/i386.c (ix86_decompose_address): Do not check for
21338         register RTX when looking at index_reg or base_reg.
21339         * config/i386/i386.h (INCOMING_RETURN_ADDR_RTX): Use stack_pointer_rtx.
21341 2017-07-25  Eric Botcazou  <ebotcazou@adacore.com>
21343         * gimple.c (gimple_assign_set_rhs_with_ops): Do not ask gsi_replace
21344         to update EH info here.
21346 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
21348         * match.pd ((X * CST1) * CST2): Simplify to X * (CST1 * CST2).
21350 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
21352         * match.pd ((X * CST) * Y): Reassociate to (X * Y) * CST.
21354 2017-07-25  Torsten Duwe  <duwe@suse.de>
21356         * common.opt: Introduce -fpatchable-function-entry
21357         command line option, and its variables function_entry_patch_area_size
21358         and function_entry_patch_area_start.
21359         * opts.c (common_handle_option): Add -fpatchable_function_entry_ case,
21360         including a two-value parser.
21361         * target.def (print_patchable_function_entry): New target hook.
21362         * targhooks.h (default_print_patchable_function_entry): New function.
21363         * targhooks.c (default_print_patchable_function_entry): Likewise.
21364         * toplev.c (process_options): Switch off IPA-RA if
21365         patchable function entries are being generated.
21366         * varasm.c (assemble_start_function): Look at the
21367         patchable-function-entry command line switch and current
21368         function attributes and maybe generate NOP instructions by
21369         calling the print_patchable_function_entry hook.
21370         * doc/extend.texi: Document patchable_function_entry attribute.
21371         * doc/invoke.texi: Document -fpatchable_function_entry
21372         command line option.
21373         * doc/tm.texi.in (TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY):
21374         New target hook.
21375         * doc/tm.texi: Re-generate.
21377 2017-07-25  Jakub Jelinek  <jakub@redhat.com>
21379         PR target/81532
21380         * config/i386/constraints.md (Yd, Ye): Use ALL_SSE_REGS for
21381         TARGET_AVX512DQ rather than TARGET_AVX512BW.
21383 2017-07-25  Tamar Christina  <tamar.christina@arm.com>
21385         * config/arm/parsecpu.awk (all_cores): Remove duplicates.
21387 2017-07-25  Richard Biener  <rguenther@suse.de>
21389         PR tree-optimization/81455
21390         * tree-ssa-loop-unswitch.c (find_loop_guard): Make sure to
21391         not walk in cycles when looking for guards.
21393 2017-07-25  Richard Biener  <rguenther@suse.de>
21395         PR tree-optimization/81529
21396         * tree-vect-stmts.c (process_use): Disregard live induction PHIs
21397         when optimizing backedge uses.
21399 2017-07-25  David Edelsohn  <dje.gcc@gmail.com>
21401         * dwarf2asm.c (dw2_asm_output_nstring): Encode double quote
21402         character for AIX.
21403         * dwarf2out.c (output_macinfo): Copy debug_line_section_label
21404         to dl_section_ref.  On AIX, append an expression to subtract
21405         the size of the section length to dl_section_ref.
21407 2017-07-25  Segher Boessenkool  <segher@kernel.crashing.org>
21409         * configure.ac: If any of the config.* scripts fail, exit 1.
21410         * configure: Regenerate.
21412 2017-07-25  Richard Biener  <rguenther@suse.de>
21414         PR middle-end/81546
21415         * tree-ssa-operands.c (verify_imm_links): Remove cap on number
21416         of immediate uses, be more verbose on errors.
21418 2017-07-25  Richard Biener  <rguenther@suse.de>
21420         PR tree-optimization/81510
21421         * tree-vect-loop.c (vect_is_simple_reduction): When the
21422         reduction stmt is not inside the loop bail out.
21424 2017-07-25  Richard Biener  <rguenther@suse.de>
21426         PR tree-optimization/81303
21427         * tree-vect-loop-manip.c (vect_loop_versioning): Build
21428         profitability check against LOOP_VINFO_NITERSM1.
21430 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
21432         * domwalk.c (cmp_bb_postorder): Simplify.
21433         (sort_bbs_postorder): New function.  Use it...
21434         (dom_walker::walk): ...here to optimize common cases.
21436 2017-07-25  Martin Liska  <mliska@suse.cz>
21438         PR ipa/81520
21439         * ipa-visibility.c (function_and_variable_visibility): Make the
21440         redirection just on target that supports aliasing.
21441         Fix GNU coding style.
21443 2017-07-25  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21445         PR libgcc/61152
21446         * config/aarch64/rtems.h: Add GCC Runtime Library Exception.
21447         Format changes.
21448         * config/arm/rtems.h: Likewise.
21449         * config/bfin/rtems.h: Likewise.
21450         * config/i386/rtemself.h: Likewise.
21451         * config/lm32/rtems.h: Likewise.
21452         * config/m32c/rtems.h: Likewise.
21453         * config/m68k/rtemself.h: Likewise.
21454         * config/microblaze/rtems.h: Likewise.
21455         * config/mips/rtems.h: Likewise.
21456         * config/moxie/rtems.h: Likewise.
21457         * config/nios2/rtems.h: Likewise.
21458         * config/powerpcspe/rtems.h: Likewise.
21459         * config/rs6000/rtems.h: Likewise.
21460         * config/rtems.h: Likewise.
21461         * config/sh/rtems.h: Likewise.
21462         * config/sh/rtemself.h: Likewise.
21463         * config/sparc/rtemself.h: Likewise.
21465 2017-07-25  Georg-Johann Lay  <avr@gjlay.de>
21467         PR 81487
21468         * hsa-brig.c (brig_init): Use xasprintf instead of asprintf.
21469         * gimple-pretty-print.c (dump_profile, dump_probability): Same.
21470         * tree-ssa-structalias.c (alias_get_name): Same.
21472 2017-07-25  Bin Cheng  <bin.cheng@arm.com>
21474         PR target/81414
21475         * config/aarch64/cortex-a57-fma-steering.c (analyze): Skip fmul/fmac
21476         instructions if no du chain is found.
21478 2017-07-25  Georg-Johann Lay  <avr@gjlay.de>
21480         * config/avr/avr-log.c (avr_log_vadump) ['T']: Print NULL-TREE.
21482 2017-07-25  Richard Biener  <rguenther@suse.de>
21484         PR middle-end/81505
21485         * fold-const.c (fold_negate_const): TREE_OVERFLOW should be
21486         sticky.
21488 2017-07-24  Michael Meissner  <meissner@linux.vnet.ibm.com>
21490         * config/rs6000/rs6000-cpus.def (ISA_2_6_MASKS_SERVER): Delete
21491         upper-regs options.
21492         (ISA_2_7_MASKS_SERVER): Likewise.
21493         (ISA_3_0_MASKS_IEEE): Likewise.
21494         (OTHER_P8_VECTOR_MASKS): Likewise.
21495         (OTHER_VSX_VECTOR_MASKS): Likewise.
21496         (POWERPC_MASKS): Likewise.
21497         (power7 cpu): Use ISA_2_6_MASKS_SERVER instead of using a
21498         duplicate list of options.
21499         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove
21500         explicit -mupper-regs options.
21501         * config/rs6000/rs6000.opt (-mvsx-scalar-memory): Delete
21502         -mupper-regs* options.  Delete -mvsx-scalar-memory, which was an
21503         alias for -mupper-regs-df.
21504         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
21505         (rs6000_init_hard_regno_mode_ok): Likewise.
21506         (rs6000_option_override_internal): Likewise.
21507         (rs6000_opt_masks): Likewise.
21508         * config/rs6000/rs6000.h (TARGET_UPPER_REGS_DF): Define upper regs
21509         options in terms of whether -mvsx or -mpower8-vector was used.
21510         (TARGET_UPPER_REGS_DI): Likewise.
21511         (TARGET_UPPER_REGS_SF): Likewise.
21512         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete the
21513         -mupper-regs-* options.
21515 2017-07-24  Segher Boessenkool  <segher@kernel.crashing.org>
21517         * passes.c (emergency_dump_function): Print some empty lines and a
21518         header before the RTL dump.
21520 2017-07-24  Segher Boessenkool  <segher@kernel.crashing.org>
21522         * cfgrtl.c (rtl_dump_bb): Don't call NEXT_INSN on NULL.
21524 2017-07-24  Wilco Dijkstra  <wdijkstr@arm.com>
21526         PR target/79041
21527         * config/aarch64/aarch64.c (aarch64_classify_symbol):
21528         Avoid SYMBOL_SMALL_ABSOLUTE for literals with pc-relative literals.
21530 2017-07-24  Carl Love  <cel@us.ibm.com>
21532         * config/rs6000/rs6000-c.c: Add support for built-in functions
21533         vector float vec_extract_fp32_from_shorth (vector unsigned short);
21534         vector float vec_extract_fp32_from_shortl (vector unsigned short);
21535         * config/rs6000/altivec.h (vec_extract_fp_from_shorth,
21536         vec_extract_fp_from_shortl): Add defines for the two builtins.
21537         * config/rs6000/rs6000-builtin.def (VEXTRACT_FP_FROM_SHORTH,
21538         VEXTRACT_FP_FROM_SHORTL): Add BU_P9V_OVERLOAD_1 and BU_P9V_VSX_1
21539         new builtins.
21540         * config/rs6000/vsx.md vsx_xvcvhpsp): Add define_insn.
21541         (vextract_fp_from_shorth, vextract_fp_from_shortl): Add define_expands.
21542         * doc/extend.texi: Update the built-in documentation file for the
21543         new built-in function.
21545 2017-07-24  Jakub Jelinek  <jakub@redhat.com>
21547         PR bootstrap/81521
21548         * tree.def: Remove TYPE_METHODS documentation, adjust TYPE_FIELDS
21549         documentation.
21550         * doc/generic.texi: Likewise.
21551         * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
21552         for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
21554 2017-07-24  Jackson Woodruff  <jackson.woodruff@arm.com>
21556         * config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): New.
21557         (aarch64_mls_elt_merge<mode>): Likewise.
21559 2017-07-23  Krister Walfridsson  <krister.walfridsson@gmail.com>
21561         * config.gcc (*-*-netbsd*): Remove check for NetBSD versions not
21562         having __cxa_atexit.
21564 2017-07-23  Michael Collison  <michael.collison@arm.com>
21566         * config/arm/arm.c (arm_option_override): Deprecate
21567         use of -mstructure-size-boundary.
21568         * config/arm/arm.opt: Deprecate -mstructure-size-boundary.
21569         * doc/invoke.texi: Deprecate -mstructure-size-boundary.
21571 2017-07-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21573         PR target/80695
21574         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
21575         Reduce cost estimate for direct moves.
21577 2017-07-23  Uros Bizjak  <ubizjak@gmail.com>
21579         PR target/80569
21580         * config/i386/i386.c (ix86_option_override_internal): Disable
21581         BMI, BMI2 and TBM instructions for -m16.
21583 2017-07-21  Carl Love  <cel@us.ibm.com>
21585         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
21586         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
21587         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
21588         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
21589         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
21590         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
21591         VMULOSW): New enum "unspec" values.
21592         (altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
21593         altivec_vmulosw): New patterns.
21594         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
21595         VMULOSW): Add definitions.
21597 2017-07-21  Jim Wilson  <jim.wilson@linaro.org>
21599         * config/aarch64/aarch64-cores.def (falkor): Add AARCH64_FL_RDMA.
21600         (qdf24xx): Likewise.
21601         * config/aarch64/aarch64-options-extensions.def (rdma); New.
21602         * config/aarch64/aarch64.h (AARCH64_FL_RDMA): New.
21603         (AARCH64_FL_V8_1): Renumber.
21604         (AARCH64_FL_FOR_ARCH8_1): Add AARCH64_FL_RDMA.
21605         (AARCH64_ISA_RDMA): Use AARCH64_FL_RDMA.
21606         * config/aarch64/arm_neon.h: Use +rdma instead of arch=armv8.1-a.
21607         * doc/invoke.texi (AArch64 Options): Mention +rmda in -march docs.  Add
21608         rdma to feature modifiers list.
21610 2017-07-21  Yury Gribov  <tetra2005@gmail.com>
21612         PR middle-end/56727
21613         * ipa-visibility (function_and_variable_visibility): Convert
21614         recursive PLT call to direct call if appropriate.
21616 2017-07-21  Andrew Pinski  <apinski@cavium.com>
21618         * tree-ssa-sccvn.c (vn_nary_op_eq): Check BIT_INSERT_EXPR's
21619         operand 1 to see if the types precision matches.
21620         * fold-const.c (operand_equal_p): Likewise.
21622 2017-07-21  Richard Biener  <rguenther@suse.de>
21624         PR tree-optimization/81303
21625         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Pass
21626         in datarefs vector.  Allow NULL dr0 for no peeling cost estimate.
21627         (vect_peeling_hash_get_lowest_cost): Adjust.
21628         (vect_enhance_data_refs_alignment): Likewise.  Use
21629         vect_get_peeling_costs_all_drs to compute the penalty for no
21630         peeling to match up costs.
21632 2017-07-21  Richard Biener  <rguenther@suse.de>
21634         PR tree-optimization/81500
21635         * tree-vect-loop.c (vect_is_simple_reduction): Properly fail if
21636         we didn't identify a reduction path.
21638 2017-07-21  Tom de Vries  <tom@codesourcery.com>
21639             Cesar Philippidis  <cesar@codesourcery.com>
21641         PR gcov-profile/81442
21642         * config/nvptx/nvptx.c (nvptx_goacc_reduction_init): Add missing edge
21643         probabilities.
21645 2017-07-21  Tom de Vries  <tom@codesourcery.com>
21647         PR lto/81430
21648         * config/nvptx/nvptx.c (nvptx_override_options_after_change): New
21649         function.
21650         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define to
21651         nvptx_override_options_after_change.
21653 2017-07-21  Ulrich Drepper  <drepper@redhat.com>
21655         * dwarf2out.c (output_file_names): Avoid double testing for
21656         dwarf_version >= 5.
21658 2017-07-21  Georg-Johann Lay  <avr@gjlay.de>
21660         * doc/invoke.texi (AVR Built-in Functions): Re-layout section.
21662 2016-07-21  Jan Hubicka  <hubicka@ucw.cz>
21664         * cfgcleanup.c (flow_find_cross_jump): Do not crossjump across
21665         hot/cold regions.
21666         (try_crossjump_to_edge): Do not punt on partitioned functions.
21668 2016-07-21  Jan Hubicka  <hubicka@ucw.cz>
21670         * bb-reorder.c (find_rarely_executed_basic_blocks_and_crossing_edges):
21671         Put all BBs reachable only via paths crossing cold region to cold
21672         region.
21673         * cfgrtl.c (find_bbs_reachable_by_hot_paths): New function.
21675 2016-07-21  Richard Biener  <rguenther@suse.de>
21677         PR tree-optimization/81303
21678         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Take
21679         into account prologue and epilogue iterations when raising
21680         min_profitable_iters to sth at least covering one vector iteration.
21682 2017-07-21  Tamar Christina  <tamar.christina@arm.com>
21684         * config/arm/arm.c (arm_test_cpu_arch_dat):
21685         Check for overlap.
21687 2017-07-20  Nathan Sidwell  <nathan@acm.org>
21689         Remove TYPE_METHODS.
21690         * tree.h (TYPE_METHODS): Delete.
21691         * dwarf2out.c (gen_member_die): Member fns are on TYPE_FIELDS.
21692         * dbxout.c (dbxout_type_fields): Ignore FUNCTION_DECLs.
21693         (dbxout_type_methods): Scan TYPE_FIELDS.
21694         (dbxout_type): Don't check TYPE_METHODS here.
21695         * function.c (use_register_for_decl): Always ignore register for
21696         class types when not optimizing.
21697         * ipa-devirt.c (odr_types_equivalent_p): Delete TYPE_METHODS scan.
21698         * tree.c (free_lang_data_in_type): Stitch out member functions and
21699         templates from TYPE_FIELDS.
21700         (build_distinct_type_copy, verify_type_variant,
21701         verify_type): Member fns are on TYPE_FIELDS.
21702         * tree-dump.c (dequeue_and_dump): No TYPE_METHODS.
21703         * tree-pretty-print.c (dump_generic_node): Likewise.
21705 2017-07-20  Jakub Jelinek  <jakub@redhat.com>
21707         PR target/80846
21708         * config/i386/i386.c (ix86_expand_vector_init_general): Handle
21709         V2TImode and V4TImode.
21710         (ix86_expand_vector_extract): Likewise.
21711         * config/i386/sse.md (VMOVE): Enable V4TImode even for just
21712         TARGET_AVX512F, instead of only for TARGET_AVX512BW.
21713         (ssescalarmode): Handle V4TImode and V2TImode.
21714         (VEC_EXTRACT_MODE): Add V4TImode and V2TImode.
21715         (*vec_extractv2ti, *vec_extractv4ti): New insns.
21716         (VEXTRACTI128_MODE): New mode iterator.
21717         (splitter for *vec_extractv?ti first element): New.
21718         (VEC_INIT_MODE): New mode iterator.
21719         (vec_init<mode>): Consolidate 3 expanders into one using
21720         VEC_INIT_MODE mode iterator.
21722 2017-07-20  Alexander Monakov  <amonakov@ispras.ru>
21724         * lra-assigns.c (pseudo_compare_func): Fix comparison step based on
21725         non_spilled_static_chain_regno_p.
21727 2017-07-20  Alexander Monakov  <amonakov@ispras.ru>
21729         * gimple-ssa-store-merging.c (sort_by_bitpos): Return 0 on equal bitpos.
21731 2017-07-20  Jan Hubicka  <hubicka@ucw.cz>
21733         * bb-reorder.c (connect_traces): Allow copying of blocks within
21734         single partition.
21736 2017-07-20  Richard Biener  <rguenther@suse.de>
21738         * gimple.h (gimple_phi_result): Add gphi * overload.
21739         (gimple_phi_result_ptr): Likewise.
21740         (gimple_phi_arg): Likewise.  Adjust index assert to only
21741         allow actual argument accesses rather than all slots available
21742         by capacity.
21743         (gimple_phi_arg_def): Add gphi * overload.
21744         * tree-phinodes.c (make_phi_node): Initialize only actual
21745         arguments.
21746         (resize_phi_node): Clear memory not covered by old node,
21747         do not initialize excess argument slots.
21748         (reserve_phi_args_for_new_edge): Initialize new argument slot
21749         completely.
21751 2017-07-20  Bin Cheng  <bin.cheng@arm.com>
21753         PR tree-optimization/81388
21754         Revert r238585:
21755         2016-07-21  Bin Cheng  <bin.cheng@arm.com>
21757         * tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Clean up
21758         by removing computation of may_be_zero.
21760 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
21761             Tom de Vries  <tom@codesourcery.com>
21763         PR middle-end/81030
21764         * cfgbuild.c (find_many_sub_basic_blocks): Update REG_BR_PROB note
21765         when gimple level profile disagrees with what RTL expander did.
21767 2017-07-20  Richard Biener  <rguenther@suse.de>
21769         PR tree-optimization/61171
21770         * tree-vectorizer.h (slp_instance): Add reduc_phis member.
21771         (vect_analyze_stmt): Add slp instance parameter.
21772         (vectorizable_reduction): Likewise.
21773         * tree-vect-loop.c (vect_analyze_loop_operations): Adjust.
21774         (vect_is_simple_reduction): Deal with chains not detected
21775         as SLP reduction chain, specifically not properly associated
21776         chains containing a mix of plus/minus.
21777         (get_reduction_op): Remove.
21778         (get_initial_defs_for_reduction): Simplify, pass in whether
21779         this is a reduction chain, pass in the SLP node for the PHIs.
21780         (vect_create_epilog_for_reduction): Get the SLP instance as
21781         arg and adjust.
21782         (vectorizable_reduction): Get the SLP instance as arg.
21783         During analysis remember the SLP node with the PHIs in the
21784         instance.  Simplify getting at the vectorized reduction PHIs.
21785         * tree-vect-slp.c (vect_slp_analyze_node_operations): Pass
21786         through SLP instance.
21787         (vect_slp_analyze_operations): Likewise.
21788         * tree-vect-stms.c (vect_analyze_stmt): Likewise.
21789         (vect_transform_stmt): Likewise.
21791 2017-07-20  Tom de Vries  <tom@codesourcery.com>
21793         PR tree-optimization/81489
21794         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Move
21795         read of phi arg location to before loop that modifies phi.
21797 2017-07-20  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
21799         * match.pd (((m1 >/</>=/<= m2) * d -> (m1 >/</>=/<= m2) ? d : 0):
21800         New pattern.
21802 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
21804         PR middle-end/81331
21805         * except.c (execute): Fix ordering issue.
21807 2018-07-19  Segher Boessenkool  <segher@kernel.crashing.org>
21809         PR rtl-optimization/81423
21810         * combine.c (make_compound_operation_int): Don't try to optimize
21811         the AND of a SUBREG of an LSHIFTRT if that SUBREG is paradoxical.
21813 2017-07-19  Segher Boessenkool  <segher@kernel.crashing.org>
21815         PR rtl-optimization/81423
21816         * simplify-rtx.c (simplify_truncation): Handle truncating an IOR
21817         with a constant that is -1 in the truncated to mode.
21819 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
21821         * predict.c (propagate_unlikely_bbs_forward): Break out from ...
21822         (determine_unlikely_bbs): ... here.
21823         * predict.h (propagate_unlikely_bbs_forward): Declare.
21824         * cfgexpand.c (pass_expand::execute): Use it.
21825         * bb-reorder.c (sanitize_hot_paths): Do not consider known to be
21826         unlikely edges.
21827         (find_rarely_executed_basic_blocks_and_crossing_edges): Use
21828         propagate_unlikely_bbs_forward.
21830 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
21832         PR middle-end/81331
21833         * except.c (maybe_add_nop_after_section_switch): New function.
21834         (execute): Use it.
21836 2017-07-19  Tom de Vries  <tom@codesourcery.com>
21838         * gimple.h (gimple_phi_set_arg): Make assert more strict.
21840 2017-07-19  Tom de Vries  <tom@codesourcery.com>
21842         * gimple.h (gimple_phi_arg): Make assert more strict.
21844 2017-07-19  Steven Munroe  <munroesj@gcc.gnu.org>
21846         * config.gcc (powerpc*-*-*): Add mmintrin.h.
21847         * config/rs6000/mmintrin.h: New file.
21848         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include mmintrin.h.
21850 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
21852         PR tree-optimization/81346
21853         * match.pd: Optimize (X - 1U) <= INT_MAX-1U into (int) X > 0.
21855 2017-07-19  Tom de Vries  <tom@codesourcery.com>
21857         * config/nvptx/nvptx.md (VECIM): Add V2DI.
21859 2017-07-19  Tom de Vries  <tom@codesourcery.com>
21861         * config/nvptx/nvptx-modes.def: Add V2DImode.
21862         * config/nvptx/nvptx-protos.h (nvptx_data_alignment): Declare.
21863         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2DImode.
21864         (nvptx_output_mov_insn): Handle lack of mov.b128.
21865         (nvptx_print_operand): Handle 'H' and 'L' codes.
21866         (nvptx_vector_mode_supported): Allow V2DImode.
21867         (nvptx_preferred_simd_mode): New function.
21868         (nvptx_data_alignment): New function.
21869         (TARGET_VECTORIZE_PREFERRED_SIMD_MODE): Redefine to
21870         nvptx_preferred_simd_mode.
21871         * config/nvptx/nvptx.h (STACK_BOUNDARY, BIGGEST_ALIGNMENT): Change from
21872         64 to 128 bits.
21873         (DATA_ALIGNMENT): Define.  Set to nvptx_data_alignment.
21875 2017-07-19  Tom de Vries  <tom@codesourcery.com>
21877         * config/nvptx/nvptx-modes.def: New file.  Add V2SImode.
21878         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2SImode.
21879         (nvptx_vector_mode_supported): New function.  Allow V2SImode.
21880         (TARGET_VECTOR_MODE_SUPPORTED_P): Redefine to nvptx_vector_mode_supported.
21881         * config/nvptx/nvptx.md (VECIM): New mode iterator. Add V2SI.
21882         (mov<VECIM>_insn): New define_insn.
21883         (define_expand "mov<VECIM>): New define_expand.
21885 2017-07-19  Tom de Vries  <tom@codesourcery.com>
21887         * config/nvptx/nvptx.c (nvptx_print_operand): Handle v2 vector mode.
21889 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
21891         PR tree-optimization/81346
21892         * fold-const.h (fold_div_compare, range_check_type): Declare.
21893         * fold-const.c (range_check_type): New function.
21894         (build_range_check): Use range_check_type.
21895         (fold_div_compare): No longer static, rewritten into
21896         a match.pd helper function.
21897         (fold_comparison): Don't call fold_div_compare here.
21898         * match.pd (X / C1 op C2): New optimization using fold_div_compare
21899         as helper function.
21901 2017-07-19  Nathan Sidwell  <nathan@acm.org>
21903         * tree.h (TYPE_MINVAL, TYPE_MAXVAL): Rename to ...
21904         (TYPE_MIN_VALUE_RAW, TYPE_MAX_VALUE_RAW): ... these.
21905         * tree.c (find_decls_types_r, verify_type): Use
21906         TYPE_{MIN,MAX}_VALUE_RAW.
21907         * lto-streamer-out.c (DFS::DFS_write_tree_body): Likewise.
21908         (hash_tree): Likewise.
21909         * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
21910         Likewise.
21911         * tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
21912         Likewise.
21914 2017-07-18  Tom de Vries  <tom@codesourcery.com>
21916         PR middle-end/81464
21917         * omp-expand.c (expand_omp_for_static_chunk): Handle
21918         equal-argument loop exit phi.
21920 2017-07-18  Uros Bizjak  <ubizjak@gmail.com>
21922         PR target/81471
21923         * config/i386/i386.md (rorx_immediate_operand): New mode attribute.
21924         (*bmi2_rorx<mode>3_1): Use rorx_immediate_operand as
21925         operand 2 predicate.
21926         (*bmi2_rorxsi3_1_zext): Use const_0_to_31_operand as
21927         operand 2 predicate.
21928         (ror,rol -> rorx splitters): Use const_int_operand as
21929         operand 2 predicate.
21931 2017-06-18  Richard Biener  <rguenther@suse.de>
21933         PR tree-optimization/81410
21934         * tree-vect-stmts.c (vectorizable_load): Properly adjust for
21935         the gap in the ! slp_perm SLP case after each group.
21937 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
21939         PR middle-end/81463
21940         * cfgloopmanip.c (scale_loop_profile): Watch out for zero frequency
21941         again.
21943 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
21945         PR middle-end/81462
21946         * predict.c (set_even_probabilities): Cleanup; do not affect
21947         probabilities that are already known.
21948         (combine_predictions_for_bb): Call even when count is set.
21950 2017-07-18  Nathan Sidwell  <nathan@acm.org>
21952         * tree-parloops.c (try_transform_to_exit_first_loop_alt): Use
21953         TYPE_MAX_VALUE.
21955 2017-07-18  Bin Cheng  <bin.cheng@arm.com>
21957         PR target/81408
21958         * tree-ssa-loop-niter.c (number_of_iterations_exit): Dump missed
21959         optimization for loop niter analysis.
21961 2017-07-18  Georg-Johann Lay  <avr@gjlay.de>
21963         PR target/81473
21964         * config/avr/avr.c (avr_optimize_casesi): Don't use
21965         INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX.
21967 2017-07-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
21969         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Remove
21970         body_cost_vec from _vect_peel_extended_info.
21971         (vect_peeling_hash_get_lowest_cost): Do not set body_cost_vec.
21972         (vect_peeling_hash_choose_best_peeling): Remove body_cost_vec and
21973         npeel.
21975 2017-07-18  Bin Cheng  <bin.cheng@arm.com>
21977         * config/arm/arm.c (emit_unlikely_jump): Remove unused var.
21979 2017-07-18  Richard Biener  <rguenther@suse.de>
21981         PR tree-optimization/80620
21982         PR tree-optimization/81403
21983         * tree-ssa-pre.c (phi_translate_1): Clear range and points-to
21984         info when re-using a VN table entry.
21986 2017-07-18  Richard Biener  <rguenther@suse.de>
21988         PR tree-optimization/81418
21989         * tree-vect-loop.c (vectorizable_reduction): Properly compute
21990         vectype_in.  Verify that with lane-reducing reduction operations
21991         we have a single def-use cycle.
21993 2017-07-17  Carl Love  <cel@us.ibm.com>
21995         Revert commit r249424   2017-06-20  Carl Love  <cel@us.ibm.com>
21997         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
21998         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
21999         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
22000         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
22001         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
22002         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
22003         VMULOSW): New enum "unspec" values.
22004         (vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
22005         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
22006         altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
22007         altivec_vmulosw): New patterns.
22008         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
22009         VMULOSW): Add definitions.
22011 2017-07-17  Uros Bizjak  <ubizjak@gmail.com>
22013         * config/alpha/alpha.c: Include predict.h.
22015 2017-07-17  Yury Gribov  <tetra2005@gmail.com>
22017         * tree-vrp.c (compare_assert_loc): Fix comparison function
22018         to return predictable results.
22020 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
22022         * config/arc/arc.md (adddi3): Remove support for mexpand-adddi
22023         option.
22024         (subdi3): Likewise.
22025         * config/arc/arc.opt (mexpand-adddi): Deprecate it.
22026         * doc/invoke.texi (mexpand-adddi): Update text.
22028 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
22030         * config/arc/arc.md (clzsi2): Expand to an arc_clzsi2 instruction
22031         that also clobbers the CC register. The old expand code is moved
22032         to ...
22033         (*arc_clzsi2): ... here.
22034         (ctzsi2): Expand to an arc_ctzsi2 instruction that also clobbers
22035         the CC register. The old expand code is moved to ...
22036         (arc_ctzsi2): ... here.
22038 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
22040         * config/arc/arc.opt (mindexed-loads): Use initial value
22041         TARGET_INDEXED_LOADS_DEFAULT.
22042         (mauto-modify-reg): Use initial value
22043         TARGET_AUTO_MODIFY_REG_DEFAULT.
22044         * config/arc/elf.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
22045         (TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
22046         * config/arc/linux.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
22047         (TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
22049 2017-07-17  Martin Liska  <mliska@suse.cz>
22051         PR sanitizer/81302
22052         * opts.c (finish_options): Do not allow -fgnu-tm
22053         w/ -fsanitize={kernel-,}address.  Say sorry.
22055 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
22057         PR target/81369
22058         * tree-loop-distribution.c (classify_partition): Only assert on
22059         numer of iterations.
22060         (merge_dep_scc_partitions): Delete prameter.  Update function call.
22061         (distribute_loop): Remove code handling loop with unknown niters.
22062         (pass_loop_distribution::execute): Skip loop with unknown niters.
22064 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
22066         PR target/81369
22067         * tree-loop-distribution.c (merge_dep_scc_partitions): Sink call to
22068         function sort_partitions_by_post_order.
22070 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
22072         PR tree-optimization/81374
22073         * tree-loop-distribution.c (pass_loop_distribution::execute): Record
22074         the max index of basic blocks, rather than number of basic blocks.
22076 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
22078         * config/arc/arc-protos.h (arc_legitimate_pc_offset_p): Remove
22079         proto.
22080         (arc_legitimate_pic_operand_p): Likewise.
22081         * config/arc/arc.c (arc_legitimate_pic_operand_p): Remove
22082         function.
22083         (arc_needs_pcl_p): Likewise.
22084         (arc_legitimate_pc_offset_p): Likewise.
22085         (arc_legitimate_pic_addr_p): Remove LABEL_REF case, as this
22086         function is also used in constrains.md.
22087         (arc_legitimate_constant_p): Use arc_legitimate_pic_addr_p to
22088         validate pic constants. Handle CONST_INT, CONST_DOUBLE, MINUS and
22089         PLUS.  Only return true/false in known cases, otherwise assert.
22090         (arc_legitimate_address_p): Remove arc_legitimate_pic_addr_p as it
22091         is already called in arc_legitimate_constant_p.
22092         * config/arc/arc.h (CONSTANT_ADDRESS_P): Consider also LABEL for
22093         pic addresses.
22094         (LEGITIMATE_PIC_OPERAND_P): Use
22095         arc_raw_symbolic_reference_mentioned_p function.
22096         * config/arc/constraints.md (Cpc): Use arc_legitimate_pic_addr_p
22097         function.
22098         (Cal): Likewise.
22099         (C32): Likewise.
22101 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
22102         Andrew Burgess  <andrew.burgess@embecosm.com>
22104         * config/arc/arc-protos.h (arc_compute_function_type): Change prototype.
22105         (arc_return_address_register): New function.
22106         * config/arc/arc.c (arc_handle_fndecl_attribute): New function.
22107         (arc_handle_fndecl_attribute): Add naked attribute.
22108         (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
22109         (TARGET_WARN_FUNC_RETURN): Likewise.
22110         (arc_allocate_stack_slots_for_args): New function.
22111         (arc_warn_func_return): Likewise.
22112         (machine_function): Change type fn_type.
22113         (arc_compute_function_type): Consider new naked function type,
22114         change function return type.
22115         (arc_must_save_register): Adapt to handle new
22116         arc_compute_function_type's return type.
22117         (arc_expand_prologue): Likewise.
22118         (arc_expand_epilogue): Likewise.
22119         (arc_return_address_regs): Delete.
22120         (arc_return_address_register): New function.
22121         (arc_epilogue_uses): Use above function.
22122         * config/arc/arc.h (arc_return_address_regs): Delete prototype.
22123         (arc_function_type): Change encoding, add naked type.
22124         (ARC_INTERRUPT_P): Change to handle the new encoding.
22125         (ARC_FAST_INTERRUPT_P): Likewise.
22126         (ARC_NORMAL_P): Define.
22127         (ARC_NAKED_P): Likewise.
22128         (arc_compute_function_type): Delete prototype.
22129         * config/arc/arc.md (in_ret_delay_slot): Use
22130         arc_return_address_register function.
22131         (simple_return): Likewise.
22132         (p_return_i): Likewise.
22134 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
22136         PR tree-optimization/81428
22137         * match.pd (X / X -> one): Don't optimize _Fract divisions, as 1
22138         can't be built for those types.
22140 2017-07-17  Georg-Johann Lay  <avr@gjlay.de>
22142         Remove stuff dead since r239246.
22144         * config/avr/avr-arch.h (avr_inform_devices): Remove dead proto.
22145         * config/avr/avr-devices.c (mcu_name, comparator, avr_mcus_str)
22146         (avr_inform_devices): Remove dead stuff.
22148 2017-07-17  Tamar Christina  <tamar.christina@arm.com>
22150         * config/arm/arm_neon.h: Fix softp typo.
22152 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
22154         PR tree-optimization/81365
22155         * tree-ssa-phiprop.c (propagate_with_phi): When considering hoisting
22156         aggregate moves onto bb predecessor edges, make sure there are no
22157         loads that could alias the lhs in between the start of bb and the
22158         loads from *phi.
22160 2017-07-17  Georg-Johann Lay  <avr@gjlay.de>
22162         PR 80929
22163         * config/avr/avr.c (avr_mul_highpart_cost): New static function.
22164         (avr_rtx_costs_1) [TRUNCATE]: Use it to compute mul_highpart cost.
22165         [LSHIFTRT, outer_code = TRUNCATE]: Same.
22167 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
22169         PR tree-optimization/81396
22170         * tree-ssa-math-opts.c (struct symbolic_number): Add n_ops field.
22171         (init_symbolic_number): Initialize it to 1.
22172         (perform_symbolic_merge): Add n_ops from both operands into the new
22173         n_ops.
22174         (find_bswap_or_nop): Don't consider n->n == cmpnop computations
22175         without base_addr as useless if they need more than one operation.
22176         (bswap_replace): Handle !bswap case for NULL base_addr.
22178 2017-07-17  Tom de Vries  <tom@codesourcery.com>
22180         PR target/81069
22181         * config/nvptx/nvptx.c (nvptx_single): Insert diverging branch as late
22182         as possible.
22184 2017-07-17  Sebastian Huber  <sebastian.huber@embedded-brains.de>
22186         * config/sparc/rtemself.h (TARGET_OS_CPP_BUILTINS): Add
22187         conditional builtin define __FIX_LEON3FT_B2BST.
22189 2017-07-17  Daniel Cederman  <cederman@gaisler.com>
22191         * config/sparc/t-rtems: Add mfix-gr712rc multilibs. Replace
22192         MULTILIB_EXCEPTIONS with MULTILIB_REQUIRED. Match -mfix-gr712rc
22193         with -mfix-ut700.
22195 2017-07-16  Eric Botcazou  <ebotcazou@adacore.com>
22197         PR rtl-optimization/81424
22198         * optabs.c (prepare_cmp_insn): Use copy_to_reg instead of force_reg
22199         to remove potential trapping from operands if -fnon-call-exceptions.
22201 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
22203         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Use
22204         profile_proability for scalling.
22205         * scale_profile_for_vect_loop.c (scale_profile_for_vect_loop): Likewise.
22207 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
22209         * cgraph.c (cgraph_edge::redirect_call_stmt_to_caller): Cleanup.
22211 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
22213         * cfgloopmanip.c (scale_loop_profile): Avoid use of REG_BR_PROB_BASE
22214         fixpoint arithmetics.
22216 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
22218         * tree-ssa-loop-unswitch.c (hoist_guard): Avoid use of REG_BR_PROB_BASE
22219         fixpoint arithmetics.
22221 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
22223         * asan.c (create_cond_insert_point): Avoid use of REG_BR_PROB_BASE
22224         fixpoint arithmetics.
22226 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
22228         * profile-count.h (profile_probability::from_reg_br_prob_note,
22229         profile_probability::to_reg_br_prob_note): New functions.
22230         * doc/rtl.texi (REG_BR_PROB_NOTE): Update documentation.
22231         * reg-notes.h (REG_BR_PROB, REG_BR_PRED): Update docs.
22232         * predict.c (probability_reliable_p): Update.
22233         (edge_probability_reliable_p): Update.
22234         (br_prob_note_reliable_p): Update.
22235         (invert_br_probabilities): Update.
22236         (add_reg_br_prob_note): New function.
22237         (combine_predictions_for_insn): Update.
22238         * asan.c (asan_clear_shadow): Update.
22239         * cfgbuild.c (compute_outgoing_frequencies): Update.
22240         * cfgrtl.c (force_nonfallthru_and_redirect): Update.
22241         (update_br_prob_note): Update.
22242         (rtl_verify_edges): Update.
22243         (purge_dead_edges): Update.
22244         (fixup_reorder_chain): Update.
22245         * emit-rtl.c (try_split): Update.
22246         * ifcvt.c (cond_exec_process_insns): Update.
22247         (cond_exec_process_if_block): Update.
22248         (dead_or_predicable): Update.
22249         * internal-fn.c (expand_addsub_overflow): Update.
22250         (expand_neg_overflow): Update.
22251         (expand_mul_overflow): Update.
22252         * loop-doloop.c (doloop_modify): Update.
22253         * loop-unroll.c (compare_and_jump_seq): Update.
22254         * optabs.c (emit_cmp_and_jump_insn_1): Update.
22255         * predict.h: Update.
22256         * reorg.c (mostly_true_jump): Update.
22257         * rtl.h: Update.
22258         * config/aarch64/aarch64.c (aarch64_emit_unlikely_jump): Update.
22259         * config/alpha/alpha.c (emit_unlikely_jump): Update.
22260         * config/arc/arc.c: (emit_unlikely_jump): Update.
22261         * config/arm/arm.c: (emit_unlikely_jump): Update.
22262         * config/bfin/bfin.c (cbranch_predicted_taken_p): Update.
22263         * config/frv/frv.c (frv_print_operand_jump_hint): Update.
22264         * config/i386/i386.c (ix86_expand_split_stack_prologue): Update.
22265         (ix86_print_operand): Update.
22266         (ix86_split_fp_branch): Update.
22267         (predict_jump): Update.
22268         * config/ia64/ia64.c (ia64_print_operand): Update.
22269         * config/mmix/mmix.c (mmix_print_operand): Update.
22270         * config/powerpcspe/powerpcspe.c (output_cbranch): Update.
22271         (rs6000_expand_split_stack_prologue): Update.
22272         * config/rs6000/rs6000.c: Update.
22273         * config/s390/s390.c (s390_expand_vec_strlen): Update.
22274         (s390_expand_vec_movstr): Update.
22275         (s390_expand_cs_tdsi): Update.
22276         (s390_expand_split_stack_prologue): Update.
22277         * config/sh/sh.c (sh_print_operand): Update.
22278         (expand_cbranchsi4): Update.
22279         (expand_cbranchdi4): Update.
22280         * config/sparc/sparc.c (output_v9branch): Update.
22281         * config/spu/spu.c (get_branch_target): Update.
22282         (ea_load_store_inline): Update.
22283         * config/tilegx/tilegx.c (cbranch_predicted_p): Update.
22284         * config/tilepro/tilepro.c: Update.
22286 2017-07-16  Eric Botcazou  <ebotcazou@adacore.com>
22288         * gimplify.c (mostly_copy_tree_r): Revert latest change.
22289         (gimplify_save_expr): Likewise.
22291 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
22293         * ipa-visibility.c (function_and_variable_visibility): Fix pasto.
22295 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
22297         * ipa-fnsummary.c (pass_data_ipa_fn_summary): Use
22298         TV_IPA_FNSUMMARY.
22299         * timevar.def (TV_IPA_FNSUMMARY): Define.
22301 2017-07-16  Daniel Cederman  <cederman@gaisler.com>
22303         * config/sparc/sparc.md (divdf3_fix): Add NOP to prevent back
22304         to back store errata sensitive sequence from being generated.
22305         (sqrtdf2_fix): Likewise.
22307 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
22309         * tree-ssa-threadupdate.c (compute_path_counts,
22310         update_joiner_offpath_counts): Use profile_probability.
22312 2017-07-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
22314         Revert:
22315         2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
22317         * config/arm/arm-c.c (arm_cpu_builtins): Define
22318         __ARM_FEATURE_NUMERIC_MAXMIN solely based on TARGET_VFP5.
22320 2017-07-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22322         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
22323         array entries to represent __ieee128 versions of the
22324         scalar_test_data_class, scalar_test_neg, scalar_extract_exp,
22325         scalar_extract_sig, and scalar_insert_exp built-in functions.
22326         (altivec_resolve_overloaded_builtin): Add special case handling
22327         for the __builtin_scalar_insert_exp function, as represented by
22328         the P9V_BUILTIN_VEC_VSIEDP constant.
22329         * config/rs6000/rs6000-builtin.def (VSEEQP): Add scalar extract
22330         exponent support for __ieee128 argument.
22331         (VSESQP): Add scalar extract signature support for __ieee128
22332         argument.
22333         (VSTDCNQP): Add scalar test negative support for __ieee128
22334         argument.
22335         (VSIEQP): Add scalar insert exponent support for __int128 argument
22336         with __ieee128 result.
22337         (VSIEQPF): Add scalar insert exponent support for __ieee128
22338         argument with __ieee128 result.
22339         (VSTDCQP): Add scalar test data class support for __ieee128
22340         argument.
22341         (VSTDCNQP): Add overload support for scalar test negative with
22342         __ieee128 argument.
22343         (VSTDCQP): Add overload support for scalar test data class
22344         __ieee128 argument.
22345         * config/rs6000/vsx.md (UNSPEC_VSX_SXSIG) Replace
22346         UNSPEC_VSX_SXSIGDP.
22347         (UNSPEC_VSX_SIEXPQP): New constant.
22348         (xsxexpqp): New insn for VSX scalar extract exponent quad
22349         precision.
22350         (xsxsigqp): New insn for VSX scalar extract significand quad
22351         precision.
22352         (xsiexpqpf): New insn for VSX scalar insert exponent quad
22353         precision with floating point argument.
22354         (xststdcqp): New expand for VSX scalar test data class quad
22355         precision.
22356         (xststdcnegqp): New expand for VSX scalar test negative quad
22357         precision.
22358         (xststdcqp): New insn to match expansions for VSX scalar test data
22359         class quad precision and VSX scalar test negative quad precision.
22360         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Add
22361         special case operand checking to enforce that second operand of
22362         VSX scalar test data class with quad precision argument is a 7-bit
22363         unsigned literal.
22364         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
22365         prototypes and descriptions of __ieee128 versions of
22366         scalar_extract_exp, scalar_extract_sig, scalar_insert_exp,
22367         scalar_test_data_class, and scalar_test_neg built-in functions.
22369 2016-07-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22371         PR tree-optimization/81162
22372         * gimple-ssa-strength-reduction.c (replace_mult_candidate): Don't
22373         replace a negate with an add.
22375 2017-07-14  James Greenhalgh  <james.greenhalgh@arm.com>
22377         * doc/invoke.texi (arm/-mcpu): Document +crypto.
22379 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
22381         * config/arm/arm-c.c (arm_cpu_builtins): Define
22382         __ARM_FEATURE_NUMERIC_MAXMIN solely based on TARGET_VFP5.
22384 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
22386         * config/arm/arm-cpus.in (cortex-r52): Add new entry.
22387         (armv8-r): Set ARM Cortex-R52 as default CPU.
22388         * config/arm/arm-tables.opt: Regenerate.
22389         * config/arm/arm-tune.md: Regenerate.
22390         * config/arm/driver-arm.c (arm_cpu_table): Add entry for ARM
22391         Cortex-R52.
22392         * doc/invoke.texi: Mention -mtune=cortex-r52 and availability of fp.dp
22393         extension for -mcpu=cortex-r52.
22395 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
22397         * config/arm/arm-isa.h (isa_bit_FP_ARMv8): Delete enumerator.
22398         (ISA_FP_ARMv8): Define as ISA_FPv5 and ISA_FP_D32.
22399         * config/arm/arm-cpus.in (armv8-r): Define fp.sp as enabling FPv5.
22400         (fp-armv8): Define it as FP_ARMv8 only.
22401         config/arm/arm.h (TARGET_FPU_ARMV8): Delete.
22402         (TARGET_VFP_FP16INST): Define using TARGET_VFP5 rather than
22403         TARGET_FPU_ARMV8.
22404         config/arm/arm.c (arm_rtx_costs_internal): Replace checks against
22405         TARGET_FPU_ARMV8 by checks against TARGET_VFP5.
22406         * config/arm/arm-builtins.c (arm_builtin_vectorized_function): Define
22407         first ARM_CHECK_BUILTIN_MODE definition using TARGET_VFP5 rather
22408         than TARGET_FPU_ARMV8.
22409         * config/arm/arm-c.c (arm_cpu_builtins): Likewise for
22410         __ARM_FEATURE_NUMERIC_MAXMIN macro definition.
22411         * config/arm/arm.md (cmov<mode>): Condition on TARGET_VFP5 rather than
22412         TARGET_FPU_ARMV8.
22413         * config/arm/neon.md (neon_vrint): Likewise.
22414         (neon_vcvt): Likewise.
22415         (neon_<fmaxmin_op><mode>): Likewise.
22416         (<fmaxmin><mode>3): Likewise.
22417         * config/arm/vfp.md (l<vrint_pattern><su_optab><mode>si2): Likewise.
22418         * config/arm/predicates.md (arm_cond_move_operator): Check against
22419         TARGET_VFP5 rather than TARGET_FPU_ARMV8 and fix spacing.
22421 2017-07-14  Jackson Woodruff  <jackson.woodruff@arm.com>
22423         * config/aarch64/aarch64.c (aarch64_print_operand): Move comments
22424         to top of function.
22426 2017-07-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22428         * gimple-ssa-store-merging.c (clear_bit_region): Replace reference to
22429         loop in comment with memset.
22431 2017-07-14  Martin Liska  <mliska@suse.cz>
22433         * cfgexpand.c (expand_gimple_basic_block): Remove dead comment.
22434         * dwarf2out.c (is_java): Remove the function.
22435         (output_pubname): Remove usage of the function.
22436         (lower_bound_default): Remove usage of DW_LANG_Java.
22437         (gen_compile_unit_die): Likewise.
22438         * gcc.c: Remove compiler defaults for .java and .zip files.
22439         * gimple-expr.c (remove_suffix): Change as there's no longer
22440         extension than 4-letter one.
22441         * gimplify.c (mostly_copy_tree_r): Remove Java-special part.
22442         (gimplify_save_expr): Likewise.
22443         * ipa-utils.h (polymorphic_type_binfo_p): Remove the comment
22444         as it's possible even for other languages than Java.
22445         * langhooks.h (struct lang_hooks): Remove Java from a comment.
22446         * lto-opts.c (lto_write_options): Remove reference to Java.
22447         * opts.c (strip_off_ending): Update file extension handling.
22448         * tree-cfg.c (verify_gimple_call): Remove comment with Java.
22449         * tree-eh.c (lower_resx): Likewise.
22450         * tree.c (free_lang_data_in_type): Remove dead code.
22451         (find_decls_types_r): Likewise.
22452         (build_common_builtin_nodes): Remove Java from a comment.
22453         (verify_type): Remove dead code.
22454         * varasm.c (assemble_external): Remove Java from a comment.
22456 2017-07-14  Martin Liska  <mliska@suse.cz>
22458         * opts.c (finish_options): Add quotes.
22459         (common_handle_option): Likewise.
22461 2017-07-14  Martin Liska  <mliska@suse.cz>
22463         * dbxout.c (get_lang_number): Do not handle GNU Pascal.
22464         * dbxout.h (extern void dbxout_stab_value_internal_label_diff):
22465         Remove N_SO_PASCAL.
22466         * dwarf2out.c (lower_bound_default): Do not handle
22467         DW_LANG_Pascal83.
22468         (gen_compile_unit_die): Likewise.
22469         * gcc.c: Remove default extension binding for GNU Pascal.
22470         * stmt.c: Remove Pascal language from a comment.
22471         * xcoffout.c: Likewise.
22473 2017-07-13  David Malcolm  <dmalcolm@redhat.com>
22475         PR c/81405
22476         * diagnostic-show-locus.c (fixit_cmp): New function.
22477         (layout::layout): Sort m_fixit_hints.
22478         (column_range::column_range): Assert that the values are valid.
22479         (struct char_span): New struct.
22480         (correction::overwrite): New method.
22481         (struct source_line): New struct.
22482         (line_corrections::add_hint): Add assertions.  Reimplement memcpy
22483         calls in terms of classes source_line and char_span, and
22484         correction::overwrite.
22485         (selftest::test_overlapped_fixit_printing_2): New function.
22486         (selftest::diagnostic_show_locus_c_tests): Call it.
22488 2017-07-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
22490         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Return
22491         early if there is no lhs.
22493 2017-07-13  Martin Liska  <mliska@suse.cz>
22495         * dwarf2out.c (gen_pointer_type_die): Remove dead code.
22496         (gen_reference_type_die): Likewise.
22497         * stor-layout.c: Remove Pascal-related comment.
22499 2017-07-13  Martin Liska  <mliska@suse.cz>
22501         * opts.c (finish_options): Add quotes to error messages.
22502         (parse_sanitizer_options): Likewise.
22504 2017-07-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
22506         * doc/invoke.texi (armv8-r): Document +fp.sp ARMv8-R extension.
22508 2017-07-13  Richard Earnshaw  <rearnsha@arm.com>
22510         * config/arm/vxworks.h (TARGET_ENDIAN_DEFAULT): Define.
22512 2017-07-13  Maxim Ostapenko  <m.ostapenko@samsung.com>
22514         * asan.c (asan_emit_allocas_unpoison): Use ptr_mode for arguments
22515         during expansion.
22516         * builtins.c (expand_asan_emit_allocas_unpoison): Likewise.
22518 2017-07-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
22520         PR target/81193
22521         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If GLIBC
22522         provides the hardware capability bits, define the macro
22523         __BUILTIN_CPU_SUPPORTS__.
22524         * config/rs6000/rs6000.c (cpu_expand_builtin): Generate a warning
22525         if GLIBC does not provide the hardware capability bits.  Add a
22526         gcc_unreachable call if the built-in cpu function is neither
22527         __builtin_cpu_is nor __builtin_cpu_supports.
22528         (rs6000_get_function_versions_dispatcher): Change the warning
22529         that an old GLIBC is used which does not export the capability
22530         bits to be an error.
22531         * doc/extend.texi (target_clones attribute): Document the
22532         restriction that GLIBC 2.23 or newer is needed on the PowerPC.
22533         (PowerPC built-in functions): Document that GLIBC 2.23 or newer is
22534         needed by __builtin_cpu_is and __builtin_cpu_supports.  Document
22535         the macros defined by GCC if the newer GLIBC is available.
22537 2017-07-12  Jeff Law  <law@redhat.com>
22539         * config/riscv/riscv.c: Remove unnecessary includes.  Reorder
22540         remaining includes slightly.
22541         * config/riscv/riscv-builtins.c: Include profile-count.h.
22543 2017-07-12  Georg-Johann Lay  <avr@gjlay.de>
22545         PR target/79883
22546         * config/avr/avr.c (avr_set_current_function): In diagnostic
22547         messages: Quote keywords and (parts of) identifiers.
22548         [WITH_AVRLIBC]: Warn for functions named "ISR", "SIGNAL" or
22549         "INTERUPT".
22551 2017-07-12  Carl Love  <cel@us.ibm.com>
22553         * config/rs6000/rs6000-c.c: Add support for built-in functions
22554         vector bool char vec_revb (vector bool char);
22555         vector bool short vec_revb (vector short char);
22556         vector bool int vec_revb (vector bool int);
22557         vector bool long long vec_revb (vector bool long long);
22558         * doc/extend.texi: Update the built-in documentation file for the
22559         new built-in functions.
22561 2017-07-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22563         * config/s390/s390.md: Remove movcc splitter.
22565 2017-07-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22567         * config/s390/s390.c (s390_rtx_costs): Return proper costs for
22568         load/store on condition.
22570 2017-07-12  Georg-Johann Lay  <avr@gjlay.de>
22572         PR target/81407
22573         * config/avr/avr.c (avr_encode_section_info)
22574         [progmem && !TREE_READONLY]: Error if progmem object needs
22575         constructing.
22577 2017-07-11  Michael Collison  <michael.collison@arm.com>
22579         * config/aarch64/aarch64-simd.md (aarch64_sub<mode>_compare0):
22580         New pattern.
22582 2017-07-11  Carl Love  <cel@us.ibm.com>
22584         * config/rs6000/rs6000-c.c: Add support for builtins
22585         vector unsigned int vec_parity_lsbb (vector signed int);
22586         vector unsigned int vec_parity_lsbb (vector unsigned int);
22587         vector unsigned __int128 vec_parity_lsbb (vector signed __int128);
22588         vector unsigned __int128 vec_parity_lsbb (vector unsigned __int128);
22589         vector unsigned long long vec_parity_lsbb (vector signed long long);
22590         vector unsigned long long vec_parity_lsbb (vector unsigned long long);
22591         * config/rs6000/rs6000-builtin.def (VPARITY_LSBB): Add BU_P9V_OVERLOAD1.
22592         * config/rs6000/altivec.h (vec_parity_lsbb): Add define.
22593         * doc/extend.texi: Update the built-in documentation file for the
22594         new built-in functions.
22596 2017-07-11  David Malcolm  <dmalcolm@redhat.com>
22598         * diagnostic-show-locus.c: Include "gcc-rich-location.h".
22599         (layout::m_primary_loc): New field.
22600         (layout::layout): Initialize new field.  Move location filtering
22601         logic from here to...
22602         (layout::maybe_add_location_range): ...this new method.  Add
22603         support for filtering to just the lines already specified by other
22604         locations.
22605         (layout::will_show_line_p): New method.
22606         (gcc_rich_location::add_location_if_nearby): New method.
22607         (selftest::test_add_location_if_nearby): New test function.
22608         (selftest::diagnostic_show_locus_c_tests): Call it.
22609         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
22610         New method.
22612 2017-07-11  Tom de Vries  <tom@codesourcery.com>
22614         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG): New macro.
22615         (bb_first_real_insn): New function.
22616         (nvptx_single): Add extra initialization of broadcasted condition
22617         variables.
22619 2017-07-11  Nathan Sidwell  <nathan@acm.org>
22621         * dwarf2out.c (gen_member_die): Remove useless check for anon ctors.
22623 2017-07-11  Georg-Johann Lay  <avr@gjlay.de>
22625         * doc/extend.texi (AVR Function Attributes): Remove weblink to
22626         Binutils doc as TEXI will mess them up.
22627         * doc/invoke.texi (AVR Options): Same here.
22629 2017-07-11  Daniel Cederman  <cederman@gaisler.com>
22631         * config/sparc/sparc.opt (mfix-ut700): New option.
22632         (mfix-gr712rc): Likewise.
22633         (sparc_fix_b2bst): New variable.
22634         * doc/invoke.texi (SPARC options): Document them.
22635         (ARM options): Fix warnings.
22636         * config/sparc/sparc.c (sparc_do_work_around_errata): Insert NOP
22637         instructions to prevent sequences that can trigger the store-store
22638         errata for certain LEON3FT processors.
22639         (pass_work_around_errata::gate): Also test sparc_fix_b2bst.
22640         (sparc_option_override): Set sparc_fix_b2bst appropriately.
22641         * config/sparc/sparc.md (fix_b2bst): New attribute.
22642         (in_branch_delay): Prevent stores in delay slot if fix_b2bst.
22644 2017-07-10  Uros Bizjak  <ubizjak@gmail.com>
22646         PR target/81375
22647         * config/i386/i386.md (divsf3): Add TARGET_SSE to TARGET_SSE_MATH.
22648         (rcpps): Ditto.
22649         (*rsqrtsf2_sse): Ditto.
22650         (rsqrtsf2): Ditto.
22651         (div<mode>3): Macroize insn from divdf3 and divsf3
22652         using MODEF mode iterator.
22654 2017-07-10  Martin Sebor  <msebor@redhat.com>
22656         PR tree-optimization/80397
22657         * gimple-ssa-sprintf.c (format_integer): Use INTEGRAL_TYPE_P()
22658         instead of testing for equality to INTEGER_TYPE.
22660 2017-07-10  Vineet Gupta <vgupta@synopsys.com>
22662         * config.gcc: Remove uclibc from arc target spec.
22664 2017-07-10  Claudiu Zissulescu  <claziss@synopsys.com>
22666         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Define.
22668 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
22670         PR lto/80838
22671         * lto-wrapper.c (remove_option): New function.
22672         (merge_and_complain): Merge PIC/PIE options more realistically.
22674 2017-07-10  Georg-Johann Lay  <avr@gjlay.de>
22676         Better ISR prologues by supporting GASes __gcc_isr pseudo insn.
22678         PR target/20296
22679         PR target/81268
22680         * configure.ac [target=avr]: Add GAS check for -mgcc-isr.
22681         (HAVE_AS_AVR_MGCCISR_OPTION):  If so, AC_DEFINE it.
22682         * config.in: Regenerate.
22683         * configure: Regenerate.
22684         * doc/extend.texi (AVR Function Attributes) <no_gccisr>: Document it.
22685         * doc/invoke.texi (AVR Options) <-mgas-isr-prologues>: Document it.
22686         * config/avr/avr.opt (-mgas-isr-prologues): New option and...
22687         (TARGET_GASISR_PROLOGUES): ...target mask.
22688         * common/config/avr/avr-common.c
22689         (avr_option_optimization_table) [OPT_LEVELS_1_PLUS_NOT_DEBUG]:
22690         Set -mgas-isr-prologues.
22691         * config/avr/avr-passes.def (avr_pass_pre_proep): Add
22692         INSERT_PASS_BEFORE for it.
22693         * config/avr/avr-protos.h (make_avr_pass_pre_proep): New proto.
22694         * config/avr/avr.c (avr_option_override)
22695         [!HAVE_AS_AVR_MGCCISR_OPTION]: Unset TARGET_GASISR_PROLOGUES.
22696         (avr_no_gccisr_function_p, avr_hregs_split_reg): New static functions.
22697         (avr_attribute_table) <no_gccisr>: Add new function attribute.
22698         (avr_set_current_function) <is_no_gccisr>: Init machine field.
22699         (avr_pass_data_pre_proep, avr_pass_pre_proep): New pass data
22700         and rtl_opt_pass.
22701         (make_avr_pass_pre_proep): New function.
22702         (emit_push_sfr) <treg>: Add argument to function and use it
22703         instead of TMP_REG.
22704         (avr_expand_prologue) [machine->gasisr.maybe]: Emit gasisr insn
22705         and set machine->gasisr.yes.
22706         (avr_expand_epilogue) [machine->gasisr.yes]: Similar.
22707         (avr_asm_function_end_prologue) [machine->gasisr.yes]: Add
22708         __gcc_isr.n_pushed to .L__stack_usage.
22709         (TARGET_ASM_FINAL_POSTSCAN_INSN): Define to...
22710         (avr_asm_final_postscan_insn): ...this new static function.
22711         * config/avr/avr.h (machine_function)
22712         <is_no_gccisr, use_L__stack_usage>: New fields.
22713         <gasisr, gasisr.yes, gasisr.maybe, gasisr.regno>: New fields.
22714         * config/avr/avr.md (UNSPECV_GASISR): Add unspecv enum.
22715         (GASISR_Prologue, GASISR_Epilogue, GASISR_Done): New define_constants.
22716         (gasisr, *gasisr): New expander and insn.
22717         * config/avr/gen-avr-mmcu-specs.c (print_mcu)
22718         [HAVE_AS_AVR_MGCCISR_OPTION]: Print asm_gccisr spec.
22719         * config/avr/specs.h (ASM_SPEC) <asm_gccisr>: Add sub spec.
22721 2017-07-10  Richard Earnshaw  <rearnsha@arm.com>
22723         * config/arm/parsecpu.awk (gen_comm_data): Do not escape single quotes
22724         in quoted strings.
22726 2017-07-10  Georg-Johann Lay  <avr@gjlay.de>
22728         Move jump-tables out of .text again.
22730         PR target/81075
22731         * config/avr/avr.c (ASM_OUTPUT_ADDR_VEC_ELT): Remove function.
22732         (ASM_OUTPUT_ADDR_VEC): New function.
22733         (avr_adjust_insn_length) [JUMP_TABLE_DATA_P]: Return 0.
22734         (avr_final_prescan_insn) [avr_log.insn_addresses]: Dump
22735         INSN_ADDRESSes as asm comment.
22736         * config/avr/avr.h (JUMP_TABLES_IN_TEXT_SECTION): Adjust comment.
22737         (ASM_OUTPUT_ADDR_VEC_ELT): Remove define.
22738         (ASM_OUTPUT_ADDR_VEC): Define to avr_output_addr_vec.
22739         * config/avr/avr.md (*tablejump): Adjust comment.
22740         * config/avr/elf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove.
22741         * config/avr/avr-log.c (avr_log_set_avr_log) <insn_addresses>:
22742         New detail.
22743         * config/avr/avr-protos.h (avr_output_addr_vec_elt): Remove proto.
22744         (avr_output_addr_vec): New proto.
22745         (avr_log_t) <insn_addresses>: New field.
22747 2017-07-09  H.J. Lu  <hongjiu.lu@intel.com>
22749         PR target/81313
22750         * config/i386/i386.c (ix86_function_arg_advance): Set
22751         outgoing_args_on_stack to true if there are outgoing arguments
22752         on stack.
22753         (ix86_function_arg): Likewise.
22754         (ix86_get_drap_rtx): Use DRAP only if there are outgoing
22755         arguments on stack and ACCUMULATE_OUTGOING_ARGS is false.
22756         * config/i386/i386.h (machine_function): Add
22757         outgoing_args_on_stack.
22759 2017-07-09  Krister Walfridsson  <krister.walfridsson@gmail.com>
22761         * config.gcc (*-*-netbsd*): Remove check for NetBSD versions not
22762         supporting pthreds.
22763         * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always enable pthreads.
22765 2017-07-08  Richard Sandiford  <richard.sandiford@linaro.org>
22767         * Makefile.in (HOOKS_H, RTL_BASE_H, FUNCTION_H, EXPR_H, REGS_H)
22768         (REAL_H): Remove $(MACHMODE_H).
22769         (FIXED_VALUE_H, TREE_CORE_H, CFGLOOP_H): Remove $(MACHMODE_H) and
22770         double-int.h.
22771         (CORETYPES_H): Add signop.h, wide-int.h, wide-int-print.h,
22772         $(MACHMODE_H) and double-int.h.
22773         (build/min-insn-modes.o): Depend on $(CORETYPES_H) rather than
22774         $(MACHMODE_H).
22775         (gengtype-state.o, gengtype.o, build/gengtype.o): Don't depend on
22776         double-int.h.
22778 2017-07-07  Andrew Pinski  <apinski@cavium.com>
22780         * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Check
22781         prev_set and curr_set for AARCH64_FUSE_ALU_BRANCH.
22783 2017-07-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
22785         * config/rs6000/rs6000.c (rs6000_get_function_versions_dispatcher):
22786         Add warning if GCC was not configured to link against a GLIBC that
22787         exports the hardware capability bits.
22788         (make_resolver_func): Make resolver function private and not a
22789         COMDAT function.  Create the name with clone_function_name instead
22790         of make_unique_name.
22792         PR target/81348
22793         * config/rs6000/rs6000.md (HI sign_extend splitter): Use the
22794         correct operand in doing the split.
22796 2017-07-07 Carl Love  <cel@us.ibm.com>
22798         * config/rs6000/rs6000-c: Add support for built-in function
22799         vector unsigned short vec_pack_to_short_fp32 (vector float,
22800                                                       vector float).
22801         * config/rs6000/rs6000-builtin.def (CONVERT_4F32_8I16): Add
22802         BU_P9V_AV_2 and BU_P9V_OVERLOAD_2 definitions.
22803         * config/rs6000/altivec.h (vec_pack_to_short_fp32): Add define.
22804         * config/rs6000/altivec.md(UNSPEC_CONVERT_4F32_8I16): Add UNSPEC.
22805         (convert_4f32_8i16): Add define_expand.
22806         * doc/extend.texi: Update the built-in documentation file for the
22807         new built-in function.
22809 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
22811         * config/sparc/m8.md: New file.
22812         * config/sparc/sparc.md: Include m8.md.
22814 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
22816         * config/sparc/sparc.opt: New option -mvis4b.
22817         * config/sparc/sparc.c (dump_target_flag_bits): Handle MASK_VIS4B.
22818         (sparc_option_override): Handle VIS4B.
22819         (enum sparc_builtins): Define
22820         SPARC_BUILTIN_DICTUNPACK{8,16,32},
22821         SPARC_BUILTIN_FPCMP{LE,GT,EQ,NE}{8,16,32}SHL,
22822         SPARC_BUILTIN_FPCMPU{LE,GT}{8,16,32}SHL,
22823         SPARC_BUILTIN_FPCMPDE{8,16,32}SHL and
22824         SPARC_BUILTIN_FPCMPUR{8,16,32}SHL.
22825         (check_constant_argument): New function.
22826         (sparc_vis_init_builtins): Define builtins
22827         __builtin_vis_dictunpack{8,16,32},
22828         __builtin_vis_fpcmp{le,gt,eq,ne}{8,16,32}shl,
22829         __builtin_vis_fpcmpu{le,gt}{8,16,32}shl,
22830         __builtin_vis_fpcmpde{8,16,32}shl and
22831         __builtin_vis_fpcmpur{8,16,32}shl.
22832         (sparc_expand_builtin): Check that the constant operands to
22833         __builtin_vis_fpcmp*shl and _builtin_vis_dictunpack* are indeed
22834         constant and in range.
22835         * config/sparc/sparc-c.c (sparc_target_macros): Handle
22836         TARGET_VIS4B.
22837         * config/sparc/sparc.h (SPARC_IMM2_P): Define.
22838         (SPARC_IMM5_P): Likewise.
22839         * config/sparc/sparc.md (cpu_feature): Add new feagure "vis4b".
22840         (enabled): Handle vis4b.
22841         (UNSPEC_DICTUNPACK): New unspec.
22842         (UNSPEC_FPCMPSHL): Likewise.
22843         (UNSPEC_FPUCMPSHL): Likewise.
22844         (UNSPEC_FPCMPDESHL): Likewise.
22845         (UNSPEC_FPCMPURSHL): Likewise.
22846         (cpu_feature): New CPU feature `vis4b'.
22847         (dictunpack{8,16,32}): New insns.
22848         (FPCSMODE): New mode iterator.
22849         (fpcscond): New code iterator.
22850         (fpcsucond): Likewise.
22851         (fpcmp{le,gt,eq,ne}{8,16,32}{si,di}shl): New insns.
22852         (fpcmpu{le,gt}{8,16,32}{si,di}shl): Likewise.
22853         (fpcmpde{8,16,32}{si,di}shl): Likewise.
22854         (fpcmpur{8,16,32}{si,di}shl): Likewise.
22855         * config/sparc/constraints.md: Define constraints `q' for unsigned
22856         2-bit integer constants and `t' for unsigned 5-bit integer
22857         constants.
22858         * config/sparc/predicates.md (imm5_operand_dictunpack8): New
22859         predicate.
22860         (imm5_operand_dictunpack16): Likewise.
22861         (imm5_operand_dictunpack32): Likewise.
22862         (imm2_operand): Likewise.
22863         * doc/invoke.texi (SPARC Options): Document -mvis4b.
22864         * doc/extend.texi (SPARC VIS Built-in Functions): Document the
22865         ditunpack* and fpcmp*shl builtins.
22867 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
22869         * config.gcc: Handle m8 in --with-{cpu,tune} options.
22870         * config.in: Add HAVE_AS_SPARC6 define.
22871         * config/sparc/driver-sparc.c (cpu_names): Add entry for the SPARC
22872         M8.
22873         * config/sparc/sol2.h (CPP_CPU64_DEFAULT_SPEC): Define for
22874         TARGET_CPU_m8.
22875         (ASM_CPU32_DEFAUILT_SPEC): Likewise.
22876         (CPP_CPU_SPEC): Handle m8.
22877         (ASM_CPU_SPEC): Likewise.
22878         * config/sparc/sparc-opts.h (enum processor_type): Add
22879         PROCESSOR_M8.
22880         * config/sparc/sparc.c (m8_costs): New struct.
22881         (sparc_option_override): Handle TARGET_CPU_m8.
22882         (sparc32_initialize_trampoline): Likewise.
22883         (sparc64_initialize_trampoline): Likewise.
22884         (sparc_issue_rate): Likewise.
22885         (sparc_register_move_cost): Likewise.
22886         * config/sparc/sparc.h (TARGET_CPU_m8): Define.
22887         (CPP_CPU64_DEFAULT_SPEC): Define for M8.
22888         (ASM_CPU64_DEFAULT_SPEC): Likewise.
22889         (CPP_CPU_SPEC): Handle M8.
22890         (ASM_CPU_SPEC): Likewise.
22891         (AS_M8_FLAG): Define.
22892         * config/sparc/sparc.md: Add m8 to the cpu attribute.
22893         * config/sparc/sparc.opt: New option -mcpu=m8 for sparc targets.
22894         * configure.ac (HAVE_AS_SPARC6): Check for assembler support for
22895         M8 instructions.
22896         * configure: Regenerate.
22897         * doc/invoke.texi (SPARC Options): Document -mcpu=m8 and
22898         -mtune=m8.
22900 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
22902         * config/sparc/niagara7.md: Rework the DFA scheduler to use insn
22903         subtypes.
22904         * config/sparc/sparc.md: Remove the `v3pipe' insn attribute.
22905         ("*movdi_insn_sp32"): Do not set v3pipe.
22906         ("*movsi_insn"): Likewise.
22907         ("*movdi_insn_sp64"): Likewise.
22908         ("*movsf_insn"): Likewise.
22909         ("*movdf_insn_sp32"): Likewise.
22910         ("*movdf_insn_sp64"): Likewise.
22911         ("*zero_extendsidi2_insn_sp64"): Likewise.
22912         ("*sign_extendsidi2_insn"): Likewise.
22913         ("*mov<VM32:mode>_insn"): Likewise.
22914         ("*mov<VM64:mode>_insn_sp64"): Likewise.
22915         ("*mov<VM64:mode>_insn_sp32"): Likewise.
22916         ("<plusminus_insn><VADDSUB:mode>3"): Likewise.
22917         ("<vlop:code><VL:mode>3"): Likewise.
22918         ("*not_<vlop:code><VL:mode>3"): Likewise.
22919         ("*nand<VL:mode>_vis"): Likewise.
22920         ("*<vlnotop:code>_not1<VL:mode>_vis"): Likewise.
22921         ("*<vlnotop:code>_not2<VL:mode>_vis"): Likewise.
22922         ("one_cmpl<VL:mode>2"): Likewise.
22923         ("faligndata<VM64:mode>_vis"): Likewise.
22924         ("alignaddrsi_vis"): Likewise.
22925         ("alignaddrdi_vis"): Likweise.
22926         ("alignaddrlsi_vis"): Likewise.
22927         ("alignaddrldi_vis"): Likewise.
22928         ("fcmp<gcond:code><GCM:gcm_name><P:mode>_vis"): Likewise.
22929         ("bmaskdi_vis"): Likewise.
22930         ("bmasksi_vis"): Likewise.
22931         ("bshuffle<VM64:mode>_vis"): Likewise.
22932         ("cmask8<P:mode>_vis"): Likewise.
22933         ("cmask16<P:mode>_vis"): Likewise.
22934         ("cmask32<P:mode>_vis"): Likewise.
22935         ("pdistn<P:mode>_vis"): Likewise.
22936         ("<vis3_addsub_ss_patname><VASS:mode>3"): Likewise.
22938 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
22940         * config/sparc/sparc.md ("subtype"): New insn attribute.
22941         ("*wrgsr_sp64"): Set insn subtype.
22942         ("*rdgsr_sp64"): Likewise.
22943         ("alignaddrsi_vis"): Likewise.
22944         ("alignaddrdi_vis"): Likewise.
22945         ("alignaddrlsi_vis"): Likewise.
22946         ("alignaddrldi_vis"): Likewise.
22947         ("<plusminus_insn><VADDSUB:mode>3"): Likewise.
22948         ("fexpand_vis"): Likewise.
22949         ("fpmerge_vis"): Likewise.
22950         ("faligndata<VM64:mode>_vis"): Likewise.
22951         ("bshuffle<VM64:mode>_vis"): Likewise.
22952         ("cmask8<P:mode>_vis"): Likewise.
22953         ("cmask16<P:mode>_vis"): Likewise.
22954         ("cmask32<P:mode>_vis"): Likewise.
22955         ("fchksm16_vis"): Likewise.
22956         ("v<vis3_shift_patname><GCM:mode>3"): Likewise.
22957         ("fmean16_vis"): Likewise.
22958         ("fp<plusminus_insn>64_vis"): Likewise.
22959         ("<plusminus_insn>v8qi3"): Likewise.
22960         ("<vis3_addsub_ss_patname><VASS:mode>3"): Likewise.
22961         ("<vis4_minmax_patname><VMMAX:mode>3"): Likewise.
22962         ("<vis4_uminmax_patname><VMMAX:mode>3"): Likewise.
22963         ("<vis3_addsub_ss_patname>v8qi3"): Likewise.
22964         ("<vis4_addsub_us_patname><VAUS:mode>3"): Likewise.
22965         ("*movqi_insn"): Likewise.
22966         ("*movhi_insn"): Likewise.
22967         ("*movsi_insn"): Likewise.
22968         ("movsi_pic_gotdata_op"): Likewise.
22969         ("*movdi_insn_sp32"): Likewise.
22970         ("*movdi_insn_sp64"): Likewise.
22971         ("movdi_pic_gotdata_op"): Likewise.
22972         ("*movsf_insn"): Likewise.
22973         ("*movdf_insn_sp32"): Likewise.
22974         ("*movdf_insn_sp64"): Likewise.
22975         ("*zero_extendhisi2_insn"): Likewise.
22976         ("*zero_extendqihi2_insn"): Likewise.
22977         ("*zero_extendqisi2_insn"): Likewise.
22978         ("*zero_extendqidi2_insn"): Likewise.
22979         ("*zero_extendhidi2_insn"): Likewise.
22980         ("*zero_extendsidi2_insn_sp64"): Likewise.
22981         ("ldfsr"): Likewise.
22982         ("prefetch_64"): Likewise.
22983         ("prefetch_32"): Likewise.
22984         ("tie_ld32"): Likewise.
22985         ("tie_ld64"): Likewise.
22986         ("*tldo_ldub_sp32"): Likewise.
22987         ("*tldo_ldub1_sp32"): Likewise.
22988         ("*tldo_ldub2_sp32"): Likewise.
22989         ("*tldo_ldub_sp64"): Likewise.
22990         ("*tldo_ldub1_sp64"): Likewise.
22991         ("*tldo_ldub2_sp64"): Likewise.
22992         ("*tldo_ldub3_sp64"): Likewise.
22993         ("*tldo_lduh_sp32"): Likewise.
22994         ("*tldo_lduh1_sp32"): Likewise.
22995         ("*tldo_lduh_sp64"): Likewise.
22996         ("*tldo_lduh1_sp64"): Likewise.
22997         ("*tldo_lduh2_sp64"): Likewise.
22998         ("*tldo_lduw_sp32"): Likewise.
22999         ("*tldo_lduw_sp64"): Likewise.
23000         ("*tldo_lduw1_sp64"): Likewise.
23001         ("*tldo_ldx_sp64"): Likewise.
23002         ("*mov<VM32:mode>_insn"): Likewise.
23003         ("*mov<VM64:mode>_insn_sp64"): Likewise.
23004         ("*mov<VM64:mode>_insn_sp32"): Likewise.
23006 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
23008         * config/sparc/sparc.md ("type"): New insn type viscmp.
23009         ("fcmp<gcond:code><GCM:gcm_name><P:mode>_vis"): Set insn type to
23010         viscmp.
23011         ("fpcmp<gcond:code>8<P:mode>_vis"): Likewise.
23012         ("fucmp<gcond:code>8<P:mode>_vis"): Likewise.
23013         ("fpcmpu<gcond:code><GCM:gcm_name><P:mode>_vis"): Likewise.
23014         * config/sparc/niagara7.md ("n7_vis_logical_v3pipe"): Handle
23015         viscmp.
23016         ("n7_vis_logical_11cycle"): Likewise.
23017         * config/sparc/niagara4.md ("n4_vis_logical"): Likewise.
23018         * config/sparc/niagara2.md ("niag3_vis": Likewise.
23019         * config/sparc/niagara.md ("niag_vis"): Likewise.
23020         * config/sparc/ultra3.md ("us3_fga"): Likewise.
23021         * config/sparc/ultra1_2.md ("us1_fga_double"): Likewise.
23023 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
23025         * config/sparc/sparc.md: New instruction type `bmask'.
23026         (bmaskdi_vis): Use the `bmask' type.
23027         (bmasksi_vis): Likewise.
23028         * config/sparc/ultra3.md (us3_array): Likewise.
23029         * config/sparc/niagara7.md (n7_array): Likewise.
23030         * config/sparc/niagara4.md (n4_array): Likewise.
23031         * config/sparc/niagara2.md (niag2_vis): Likewise.
23032         (niag3_vis): Likewise.
23033         * config/sparc/niagara.md (niag_vis): Likewise.
23035 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
23037         * ipa-comdats.c: Remove optimize check from gate.
23038         * ipa-fnsummary.c (ipa_fn_summary_generate): do not generate summary
23039         for functions not optimized.
23040         (ipa_fn_summary_read): Skip optimize check.
23041         (ipa_fn_summary_write): Likewise.
23042         * ipa-inline-analysis.c (do_estimate_growth_1): Check that caller
23043         is optimized.
23044         * ipa-inline.c (can_inline_edge_p): Not optimized functions are
23045         uninlinable.
23046         (can_inline_edge_p): Check flag_pcc_struct_return for match.
23047         (check_callers): Give up on caller which is not optimized.
23048         (inline_small_functions): Likewise.
23049         (ipa_inline): Do not give up when not optimizing.
23050         * ipa-visbility.c (function_and_variable_visibility): Do not optimize
23051         away unoptimizes cdtors.
23052         (whole_program_function_and_variable_visibility): Do
23053         ipa_discover_readonly_nonaddressable_vars in LTO mode.
23054         * ipa.c (process_references): Do not check optimize.
23055         (symbol_table::remove_unreachable_nodes): Update optimize check.
23056         (set_writeonly_bit): Update optimize check.
23057         (pass_ipa_cdtor_merge::gate): Do not check optimize.
23058         (pass_ipa_single_use::gate): Remove.
23060 2017-07-06  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23062         * config/rs6000/rs6000.c (union_defs, union_uses, insn_is_load_p,
23063         insn_is_store_p, insn_is_swap_p, const_load_sequence_p, v2df_reduction_p,
23064         rtx_is_swappable_p, insn_is_swappable_p, chain_contains_only_swaps,
23065         mark_swaps_for_removal, swap_const_vector_halves, adjust_subreg_index,
23066         permute_load, permute_store, adjust_extract, adjust_splat,
23067         adjust_xxpermdi, adjust_concat, adjust_vperm, handle_special_swappables,
23068         replace_swap_with_copy, dump_swap_insn_table,
23069         alignment_with_canonical_addr, alignment_mask, find_alignment_op,
23070         recombine_lvx_pattern, recombine_stvx_pattern,
23071         recombine_lvx_stvx_patterns, rs6000_analyze_swaps,
23072         make_pass_analyze_swaps): Move all code related to p8 swap optimizations
23073         to file rs6000-p8swap.c.
23074         * config/rs6000/rs6000-p8swap.c: New file.
23075         * config/rs6000/t-rs6000: Add rule to build rs6000-p8swap.o.
23076         * config.gcc: Add rs6000-p8swap.o to extra_objs for powerpc*-*-*
23077         and rs6000*-*-* targets.
23079 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
23081         * Makefile.in (selftest): Remove dependency on s-selftest-c++.
23083 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
23085         * lto-wrapper.c (merge_and_complain): Do not merge
23086         fexceptions, fnon_call_exceptions, ftrapv, ffp_contract_, fmath_errno,
23087         fsigned_zeros, ftrapping_math, fwrapv.
23088         (append_compiler_options): Do not track these options.
23089         (append_linker_options): Likewie
23091 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
23093         * cgraphunit.c (cgraph_node::finalize_function): When
23094         !flag_toplevel_reorde set no_reorder flag.
23095         (varpool_node::finalize_decl): Likewise.
23096         (symbol_table::compile): Drop no toplevel reorder path.
23098 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
23100         * bb-reorder.c (better_edge_p): Do not build traces across abnormal/eh
23101         edges; zero probability is not better than uninitialized.
23103 2017-07-06  Maxim Ostapenko  <m.ostapenko@samsung.com>
23105         * asan.h (asan_sanitize_allocas_p): Declare.
23106         * asan.c (asan_sanitize_allocas_p): New function.
23107         (handle_builtin_stack_restore): Bail out if !asan_sanitize_allocas_p.
23108         (handle_builtin_alloca): Likewise.
23109         * cfgexpand.c (expand_used_vars): Do not add allocas unpoisoning stuff
23110         if !asan_sanitize_allocas_p.
23111         * params.def (asan-instrument-allocas): Add new option.
23112         * params.h (ASAN_PROTECT_ALLOCAS): Define.
23113         * opts.c (common_handle_option): Disable allocas sanitization for
23114         KASan by default.
23116 2017-07-06  Maxim Ostapenko  <m.ostapenko@samsung.com>
23118         * asan.c: Include gimple-fold.h.
23119         (get_last_alloca_addr): New function.
23120         (handle_builtin_stackrestore): Likewise.
23121         (handle_builtin_alloca): Likewise.
23122         (asan_emit_allocas_unpoison): Likewise.
23123         (get_mem_refs_of_builtin_call): Add new parameter, remove const
23124         quallifier from first paramerer. Handle BUILT_IN_ALLOCA,
23125         BUILT_IN_ALLOCA_WITH_ALIGN and BUILT_IN_STACK_RESTORE builtins.
23126         (instrument_builtin_call): Pass gimple iterator to
23127         get_mem_refs_of_builtin_call.
23128         (last_alloca_addr): New global.
23129         * asan.h (asan_emit_allocas_unpoison): Declare.
23130         * builtins.c (expand_asan_emit_allocas_unpoison): New function.
23131         (expand_builtin): Handle BUILT_IN_ASAN_ALLOCAS_UNPOISON.
23132         * cfgexpand.c (expand_used_vars): Call asan_emit_allocas_unpoison
23133         if function calls alloca.
23134         * gimple-fold.c (replace_call_with_value): Remove static keyword.
23135         * gimple-fold.h (replace_call_with_value): Declare.
23136         * internal-fn.c: Include asan.h.
23137         * sanitizer.def (BUILT_IN_ASAN_ALLOCA_POISON,
23138         BUILT_IN_ASAN_ALLOCAS_UNPOISON): New builtins.
23140 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
23142         * Makefile.in (SELFTEST_FLAGS): Drop "-x c", moving it to...
23143         (C_SELFTEST_FLAGS): New.
23144         (CPP_SELFTEST_FLAGS): New.
23145         (SELFTEST_DEPS): New, from deps of s-selftest.
23146         (C_SELFTEST_DEPS): New, from deps of s-selftest.
23147         (CPP_SELFTEST_DEPS): New.
23148         (selftest): Add dependency on s-selftest-c++.
23149         (s-selftest): Rename to...
23150         (s-selftest-c): ...this, moving deps to SELFTEST_DEPS
23151         and C_SELFTEST_DEPS, and using C_SELFTEST_FLAGS rather
23152         than SELFTEST_FLAGS.
23153         (selftest-gdb): Rename to...
23154         (selftest-c-gdb): ...this, using C_SELFTEST_DEPS and
23155         C_SELFTEST_FLAGS.
23156         (selftest-gdb): Reintroduce as an alias for selftest-c-gdb.
23157         (selftest-valgrind): Rename to...
23158         (selftest-c-valgrind): ...this, using C_SELFTEST_DEPS and
23159         C_SELFTEST_FLAGS.
23160         (selftest-valgrind): Reintroduce as an alias for
23161         selftest-c-valgrind.
23162         (s-selftest-c++): New.
23163         (selftest-c++-gdb): New.
23164         (selftest-c++-valgrind): New.
23166 2017-07-06  Olivier Hainque  <hainque@adacore.com>
23168         * gcc.c (process_command): When deciding if undefined variables
23169         should be ignored when processing specs, accept "gcc -v" as well.
23171 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
23173         * auto-profile.c (afdo_set_bb_count, afdo_propagate_edge,
23174         afdo_annotate_cfg): Set counts/probabilities as determined by afdo.
23176 2017-07-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
23178         * config/arm/arm-cpus.in (armv8-r): Add new entry.
23179         * config/arm/arm-isa.h (ISA_ARMv8r): Define macro.
23180         * config/arm/arm-tables.opt: Regenerate.
23181         * config/arm/arm.h (enum base_architecture): Add BASE_ARCH_8R
23182         enumerator.
23183         * doc/invoke.texi: Mention -march=armv8-r and its extensions.
23185 2017-07-06  Carl Love  <cel@us.ibm.com>
23187         * ChangeLog: Clean up from mid air collision
23189 2017-07-06  Carl Love  <cel@us.ibm.com>
23191         * config/rs6000/rs6000-c.c: Add support for built-in functions
23192         vector signed int vec_subc (vector signed int, vector signed int);
23193         vector signed __int128 vec_subc (vector signed __int128,
23194                                          vector signed __int128);
23195         vector unsigned __int128 vec_subc (vector unsigned __int128,
23196                                            vector unsigned __int128);
23197         vector signed int vec_sube (vector signed int, vector signed int,
23198                                     vector signed int);
23199         vector unsigned int vec_sube (vector unsigned int,
23200                                       vector unsigned int,
23201                                       vector unsigned int);
23202         vector signed __int128 vec_sube (vector signed __int128,
23203                                          vector signed __int128,
23204                                          vector signed__int128);
23205         vector unsigned __int128 vec_sube (vector unsigned __int128,
23206                                            vector unsigned __int128,
23207                                            vector unsigned __int128);
23208         vector signed int vec_subec (vector signed int, vector signed int,
23209                                      vector signed int);
23210         vector unsigned int vec_subec (vector unsigned int,
23211                                        vector unsigned int,
23212                                        vector unsigned int);
23213         vector signed __int128 vec_subec (vector signed __int128,
23214                                           vector signed __int128,
23215                                           vector signed__int128);
23216         vector unsigned __int128 vec_subec (vector unsigned __int128,
23217                                             vector unsigned __int128,
23218                                             vector unsigned __int128);
23219         * config/rs6000/rs6000.c (ALTIVEC_BUILTIN_VEC_SUBE,
23220         ALTIVEC_BUILTIN_VEC_SUBEC): Add ef_builtins.
23221         * config/rs6000/rs6000-builtin.def (SUBE, SUBEC): Add
23222         BU_ALTIVEC_OVERLOAD_X definitions.
23223         * config/rs6000/altivec.h (vec_sube, vec_subec): Add builtin defines.
23224         * doc/extend.texi: Update the built-in documentation file for the new
23225         built-in functions.
23227 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
23229         PR c++/79300
23230         * diagnostic-show-locus.c (layout::layout): Use start and finish
23231         spelling location for the start and finish of each range.
23232         * genmatch.c (linemap_client_expand_location_to_spelling_point):
23233         Add unused aspect param.
23234         * input.c (expand_location_1): Add "aspect" param, and use it
23235         to access the correct part of the location.
23236         (expand_location): Pass LOCATION_ASPECT_CARET to new param of
23237         expand_location_1.
23238         (expand_location_to_spelling_point): Likewise.
23239         (linemap_client_expand_location_to_spelling_point): Add "aspect"
23240         param, and pass it to expand_location_1.
23242 2017-07-06  Sebastian Peryt  <sebastian.peryt@intel.com>
23244         * config/i386/avx512fintrin.h (_mm_mask_getexp_round_ss,
23245         _mm_maskz_getexp_round_ss, _mm_mask_getexp_round_sd,
23246         _mm_maskz_getexp_round_sd, _mm_mask_getmant_round_sd,
23247         _mm_maskz_getmant_round_sd, _mm_mask_getmant_round_ss,
23248         _mm_maskz_getmant_round_ss, _mm_mask_getexp_ss, _mm_maskz_getexp_ss,
23249         _mm_mask_getexp_sd, _mm_maskz_getexp_sd, _mm_mask_getmant_sd,
23250         _mm_maskz_getmant_sd, _mm_mask_getmant_ss,
23251         _mm_maskz_getmant_ss): New intrinsics.
23252         (__builtin_ia32_getexpss128_mask): Changed to ...
23253         __builtin_ia32_getexpss128_round ... this.
23254         (__builtin_ia32_getexpsd128_mask): Changed to ...
23255         __builtin_ia32_getexpsd128_round ... this.
23256         * config/i386/i386-builtin-types.def
23257         ((V2DF, V2DF, V2DF, INT, V2DF, UQI, INT),
23258         (V4SF, V4SF, V4SF, INT, V4SF, UQI, INT)): New function type aliases.
23259         * config/i386/i386-builtin.def (__builtin_ia32_getexpsd_mask_round,
23260         __builtin_ia32_getexpss_mask_round,     __builtin_ia32_getmantsd_mask_round,
23261         __builtin_ia32_getmantss_mask_round): New builtins.
23262         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_INT_V2DF_UQI_INT,
23263         V4SF_FTYPE_V4SF_V4SF_INT_V4SF_UQI_INT): Handle new types.
23264         (CODE_FOR_avx512f_vgetmantv2df_mask_round,
23265         CODE_FOR_avx512f_vgetmantv4sf_mask_round): New cases.
23266         * config/i386/sse.md
23267         (avx512f_sgetexp<mode><round_saeonly_name>): Changed to ...
23268         avx512f_sgetexp<mode><mask_scalar_name>
23269         <round_saeonly_scalar_name> ... this.
23270         (vgetexp<ssescalarmodesuffix>\t{<round_saeonly_op3>%2, %1, %0|
23271         %0, %1, %2<round_saeonly_op3>}): Changed to ...
23272         vgetexp<ssescalarmodesuffix>
23273         \t{<round_saeonly_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
23274         %0<mask_scalar_operand3>, %1, %2<round_saeonly_scalar_mask_op3>} ... this.
23275         (avx512f_vgetmant<mode><round_saeonly_name>): Changed to ...
23276         avx512f_vgetmant<mode><mask_scalar_name>
23277         <round_saeonly_scalar_name> ... this.
23278         (vgetmant<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
23279         %0, %1, %2<round_saeonly_op4>, %3}): Changed to ...
23280         vgetmant<ssescalarmodesuffix>
23281         \t{%3, <round_saeonly_scalar_mask_op4>%2, %1, %0<mask_scalar_operand4>|
23282         %0<mask_scalar_operand4>, %1, %2
23283         <round_saeonly_scalar_mask_op4>, %3} ... this.
23284         * config/i386/subst.md (mask_scalar_operand4,
23285         round_saeonly_scalar_mask_operand4,     round_saeonly_scalar_mask_op4,
23286         round_saeonly_scalar_nimm_predicate): New subst attributes.
23288 2017-07-06  Julia Koval  <julia.koval@intel.com>
23290         * config/i386/i386.c (ix86_erase_embedded_rounding):
23291         Remove code for old rounding pattern.
23293 2017-07-06  Richard Earnshaw  <rearnsha@arm.com>
23295         * config/arm/t-arm (GTM_H): Add arm-cpu.h.
23297 2017-07-06  Christophe Lyon  <christophe.lyon@linaro.org>
23299         * doc/sourcebuild.texi (Test Directives, Variants of
23300         dg-require-support): Add documentation for dg-require-stack-check.
23302 2017-07-05  Sebastian Peryt  <sebastian.peryt@intel.com>
23304         * config/i386/subst.md (mask_scalar, round_scalar,
23305         round_saeonly_scalar): New meta-templates.
23306         (mask_scalar_name, mask_scalar_operand3, round_scalar_name,
23307         round_scalar_mask_operand3, round_scalar_mask_op3,
23308         round_scalar_constraint, round_scalar_prefix, round_saeonly_scalar_name,
23309         round_saeonly_scalar_mask_operand3, round_saeonly_scalar_mask_op3,
23310         round_saeonly_scalar_constraint,
23311         round_saeonly_scalar_prefix): New subst attribute.
23312         * config/i386/sse.md
23313         (<sse>_vm<plusminus_insn><mode>3<mask_name><round_name>): Renamed to ...
23314         <sse>_vm<plusminus_insn><mode>3<mask_scalar_name>
23315         <round_scalar_name> ... this.
23316         (<sse>_vm<multdiv_mnemonic><mode>3<mask_name><round_name>): Renamed to ...
23317         <sse>_vm<multdiv_mnemonic><mode>3<mask_scalar_name>
23318         <round_scalar_name> ... this.
23319         (<sse>_vm<code><mode>3<mask_name><round_saeonly_name>): Renamed to ...
23320         <sse>_vm<code><mode>3<mask_scalar_name>
23321         <round_saeonly_scalar_name> ... this.
23322         (v<plusminus_mnemonic><ssescalarmodesuffix>
23323         \t{<round_mask_op3>%2, %1, %0<mask_operand3>|
23324         %0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}): Changed to ...
23325         v<plusminus_mnemonic><ssescalarmodesuffix>
23326         \t{<round_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
23327         %0<mask_scalar_operand3>, %1, %<iptr>2<round_scalar_mask_op3>} ... this.
23328         (v<multdiv_mnemonic><ssescalarmodesuffix>
23329         \t{<round_mask_op3>%2, %1, %0<mask_operand3>|
23330         %0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}): Changed to ...
23331         v<multdiv_mnemonic><ssescalarmodesuffix>
23332         \t{<round_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
23333         %0<mask_scalar_operand3>, %1, %<iptr>2<round_scalar_mask_op3>} ... this.
23334         (v<maxmin_float><ssescalarmodesuffix>
23335         \t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|
23336         %0<mask_operand3>, %1, %<iptr>2<round_saeonly_mask_op3>}): Changed to ...
23337         v<maxmin_float><ssescalarmodesuffix>
23338         \t{<round_saeonly_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
23339         %0<mask_scalar_operand3>, %1, %<iptr>2
23340         <round_saeonly_scalar_mask_op3>} ... this.
23342 2017-07-05  Richard Earnshaw  <rearnsha@arm.com>
23344         * config/arm/arm.c (arm_fixed_condition_code_regs): New function.
23345         (TARGET_FIXED_CONDITION_CODE_REGS): Redefine.
23347 2017-07-05  Richard Sandiford  <richard.sandiford@linaro.org>
23348             Alan Hayward  <alan.hayward@arm.com>
23349             David Sherwood  <david.sherwood@arm.com>
23351         * combine.c (simplify_if_then_else): Remove "enum" before
23352         "machine_mode".
23353         * compare-elim.c (can_eliminate_compare): Likewise.
23354         * config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type):
23355         Likewise.
23356         (aarch64_lookup_simd_builtin_type): Likewise.
23357         (aarch64_simd_builtin_type): Likewise.
23358         (aarch64_init_simd_builtin_types): Likewise.
23359         (aarch64_simd_expand_args): Likewise.
23360         * config/aarch64/aarch64-protos.h (aarch64_simd_attr_length_rglist):
23361         Likewise.
23362         (aarch64_reverse_mask): Likewise.
23363         (aarch64_simd_emit_reg_reg_move): Likewise.
23364         (aarch64_gen_adjusted_ldpstp): Likewise.
23365         (aarch64_ccmp_mode_to_code): Likewise.
23366         (aarch64_operands_ok_for_ldpstp): Likewise.
23367         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
23368         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
23369         Likewise.
23370         (aarch64_min_divisions_for_recip_mul): Likewise.
23371         (aarch64_reassociation_width): Likewise.
23372         (aarch64_get_condition_code_1): Likewise.
23373         (aarch64_simd_emit_reg_reg_move): Likewise.
23374         (aarch64_simd_attr_length_rglist): Likewise.
23375         (aarch64_reverse_mask): Likewise.
23376         (aarch64_operands_ok_for_ldpstp): Likewise.
23377         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
23378         (aarch64_gen_adjusted_ldpstp): Likewise.
23379         * config/aarch64/cortex-a57-fma-steering.c (fma_node::rename):
23380         Likewise.
23381         * config/arc/arc.c (legitimate_offset_address_p): Likewise.
23382         * config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise.
23383         (arm_lookup_simd_builtin_type): Likewise.
23384         (arm_simd_builtin_type): Likewise.
23385         (arm_init_simd_builtin_types): Likewise.
23386         (arm_expand_builtin_args): Likewise.
23387         * config/arm/arm-protos.h (arm_expand_builtin): Likewise.
23388         * config/ft32/ft32.c (ft32_libcall_value): Likewise.
23389         (ft32_setup_incoming_varargs): Likewise.
23390         (ft32_function_arg): Likewise.
23391         (ft32_function_arg_advance): Likewise.
23392         (ft32_pass_by_reference): Likewise.
23393         (ft32_arg_partial_bytes): Likewise.
23394         (ft32_valid_pointer_mode): Likewise.
23395         (ft32_addr_space_pointer_mode): Likewise.
23396         (ft32_addr_space_legitimate_address_p): Likewise.
23397         * config/i386/i386-protos.h (ix86_operands_ok_for_move_multiple):
23398         Likewise.
23399         * config/i386/i386.c (ix86_setup_incoming_vararg_bounds): Likewise.
23400         (ix86_emit_outlined_ms2sysv_restore): Likewise.
23401         (iamcu_alignment): Likewise.
23402         (canonicalize_vector_int_perm): Likewise.
23403         (ix86_noce_conversion_profitable_p): Likewise.
23404         (ix86_mpx_bound_mode): Likewise.
23405         (ix86_operands_ok_for_move_multiple): Likewise.
23406         * config/microblaze/microblaze-protos.h
23407         (microblaze_expand_conditional_branch_reg): Likewise.
23408         * config/microblaze/microblaze.c
23409         (microblaze_expand_conditional_branch_reg): Likewise.
23410         * config/powerpcspe/powerpcspe.c (rs6000_init_hard_regno_mode_ok):
23411         Likewise.
23412         (rs6000_reassociation_width): Likewise.
23413         (rs6000_invalid_binary_op): Likewise.
23414         (fusion_p9_p): Likewise.
23415         (emit_fusion_p9_load): Likewise.
23416         (emit_fusion_p9_store): Likewise.
23417         * config/riscv/riscv-protos.h (riscv_regno_mode_ok_for_base_p):
23418         Likewise.
23419         (riscv_hard_regno_mode_ok_p): Likewise.
23420         (riscv_address_insns): Likewise.
23421         (riscv_split_symbol): Likewise.
23422         (riscv_legitimize_move): Likewise.
23423         (riscv_function_value): Likewise.
23424         (riscv_hard_regno_nregs): Likewise.
23425         (riscv_expand_builtin): Likewise.
23426         * config/riscv/riscv.c (riscv_build_integer_1): Likewise.
23427         (riscv_build_integer): Likewise.
23428         (riscv_split_integer): Likewise.
23429         (riscv_legitimate_constant_p): Likewise.
23430         (riscv_cannot_force_const_mem): Likewise.
23431         (riscv_regno_mode_ok_for_base_p): Likewise.
23432         (riscv_valid_base_register_p): Likewise.
23433         (riscv_valid_offset_p): Likewise.
23434         (riscv_valid_lo_sum_p): Likewise.
23435         (riscv_classify_address): Likewise.
23436         (riscv_legitimate_address_p): Likewise.
23437         (riscv_address_insns): Likewise.
23438         (riscv_load_store_insns): Likewise.
23439         (riscv_force_binary): Likewise.
23440         (riscv_split_symbol): Likewise.
23441         (riscv_force_address): Likewise.
23442         (riscv_legitimize_address): Likewise.
23443         (riscv_move_integer): Likewise.
23444         (riscv_legitimize_const_move): Likewise.
23445         (riscv_legitimize_move): Likewise.
23446         (riscv_address_cost): Likewise.
23447         (riscv_subword): Likewise.
23448         (riscv_output_move): Likewise.
23449         (riscv_canonicalize_int_order_test): Likewise.
23450         (riscv_emit_int_order_test): Likewise.
23451         (riscv_function_arg_boundary): Likewise.
23452         (riscv_pass_mode_in_fpr_p): Likewise.
23453         (riscv_pass_fpr_single): Likewise.
23454         (riscv_pass_fpr_pair): Likewise.
23455         (riscv_get_arg_info): Likewise.
23456         (riscv_function_arg): Likewise.
23457         (riscv_function_arg_advance): Likewise.
23458         (riscv_arg_partial_bytes): Likewise.
23459         (riscv_function_value): Likewise.
23460         (riscv_pass_by_reference): Likewise.
23461         (riscv_setup_incoming_varargs): Likewise.
23462         (riscv_print_operand): Likewise.
23463         (riscv_elf_select_rtx_section): Likewise.
23464         (riscv_save_restore_reg): Likewise.
23465         (riscv_for_each_saved_reg): Likewise.
23466         (riscv_register_move_cost): Likewise.
23467         (riscv_hard_regno_mode_ok_p): Likewise.
23468         (riscv_hard_regno_nregs): Likewise.
23469         (riscv_class_max_nregs): Likewise.
23470         (riscv_memory_move_cost): Likewise.
23471         * config/rl78/rl78-protos.h (rl78_split_movsi): Likewise.
23472         * config/rl78/rl78.c (rl78_split_movsi): Likewise.
23473         (rl78_addr_space_address_mode): Likewise.
23474         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
23475         Likewise.
23476         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
23477         (rs6000_reassociation_width): Likewise.
23478         (rs6000_invalid_binary_op): Likewise.
23479         (fusion_p9_p): Likewise.
23480         (emit_fusion_p9_load): Likewise.
23481         (emit_fusion_p9_store): Likewise.
23482         * config/visium/visium-protos.h (prepare_move_operands): Likewise.
23483         (ok_for_simple_move_operands): Likewise.
23484         (ok_for_simple_move_strict_operands): Likewise.
23485         (ok_for_simple_arith_logic_operands): Likewise.
23486         (visium_legitimize_reload_address): Likewise.
23487         (visium_select_cc_mode): Likewise.
23488         (output_cbranch): Likewise.
23489         (visium_split_double_move): Likewise.
23490         (visium_expand_copysign): Likewise.
23491         (visium_expand_int_cstore): Likewise.
23492         (visium_expand_fp_cstore): Likewise.
23493         * config/visium/visium.c (visium_pass_by_reference): Likewise.
23494         (visium_function_arg): Likewise.
23495         (visium_function_arg_advance): Likewise.
23496         (visium_libcall_value): Likewise.
23497         (visium_setup_incoming_varargs): Likewise.
23498         (visium_legitimate_constant_p): Likewise.
23499         (visium_legitimate_address_p): Likewise.
23500         (visium_legitimize_address): Likewise.
23501         (visium_secondary_reload): Likewise.
23502         (visium_register_move_cost): Likewise.
23503         (visium_memory_move_cost): Likewise.
23504         (prepare_move_operands): Likewise.
23505         (ok_for_simple_move_operands): Likewise.
23506         (ok_for_simple_move_strict_operands): Likewise.
23507         (ok_for_simple_arith_logic_operands): Likewise.
23508         (visium_function_value_1): Likewise.
23509         (rtx_ok_for_offset_p): Likewise.
23510         (visium_legitimize_reload_address): Likewise.
23511         (visium_split_double_move): Likewise.
23512         (visium_expand_copysign): Likewise.
23513         (visium_expand_int_cstore): Likewise.
23514         (visium_expand_fp_cstore): Likewise.
23515         (visium_split_cstore): Likewise.
23516         (visium_select_cc_mode): Likewise.
23517         (visium_split_cbranch): Likewise.
23518         (output_cbranch): Likewise.
23519         (visium_print_operand_address): Likewise.
23520         * expmed.c (flip_storage_order): Likewise.
23521         * expmed.h (emit_cstore): Likewise.
23522         (flip_storage_order): Likewise.
23523         * genrecog.c (validate_pattern): Likewise.
23524         * hsa-gen.c (gen_hsa_addr): Likewise.
23525         * internal-fn.c (expand_arith_overflow): Likewise.
23526         * ira-color.c (allocno_copy_cost_saving): Likewise.
23527         * lra-assigns.c (find_hard_regno_for_1): Likewise.
23528         * lra-constraints.c (prohibited_class_reg_set_mode_p): Likewise.
23529         (process_invariant_for_inheritance): Likewise.
23530         * lra-eliminations.c (move_plus_up): Likewise.
23531         * omp-low.c (lower_oacc_reductions): Likewise.
23532         * simplify-rtx.c (simplify_subreg): Likewise.
23533         * target.def (TARGET_SETUP_INCOMING_VARARG_BOUNDS): Likewise.
23534         (TARGET_CHKP_BOUND_MODE): Likewise..
23535         * targhooks.c (default_chkp_bound_mode): Likewise.
23536         (default_setup_incoming_vararg_bounds): Likewise.
23537         * targhooks.h (default_chkp_bound_mode): Likewise.
23538         (default_setup_incoming_vararg_bounds): Likewise.
23539         * tree-ssa-math-opts.c (divmod_candidate_p): Likewise.
23540         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
23541         (have_whole_vector_shift): Likewise.
23542         * tree-vect-stmts.c (vectorizable_load): Likewise.
23543         * doc/tm.texi: Regenerate.
23545 2017-07-05  Georg-Johann Lay  <avr@gjlay.de>
23547         Graceful degrade if Binutils PR21472 is not available.
23549         PR target/81072
23550         * configure.ac [target=avr]: WARN instead of ERROR if avrxmega3
23551         .rodata in flash test fails.
23552         (HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH): Define it if test passes.
23553         * confgure: Regenerate.
23554         * config.in: Regenerate.
23555         * config/avr/avr.c (avr_asm_named_section)
23556         [HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH]: Only trigger
23557         __do_copy_data for stuff in .rodata if flash_pm_offset = 0.
23558         (avr_asm_init_sections): Same.
23560 2017-07-05  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
23562         * config/arm/neon.md (fma<VCVTF:mode>4): Remove %?.
23563         (fma<VH:mode>4_intrinsic): Likewise.
23564         (*fmsub<VCVTF:mode>4): Likewise.
23565         (*fmsub<VH:mode>4_intrinsic): Likewise.
23567 2017-07-05  Georg-Johann Lay  <avr@gjlay.de>
23569         PR target/81305
23570         * config/avr/avr.c (avr_out_movhi_mr_r_xmega) [CONSTANT_ADDRESS_P]:
23571         Don't depend on "optimize > 0".
23572         (out_movhi_r_mr, out_movqi_mr_r): Same.
23573         (out_movhi_mr_r, out_movqi_r_mr): Same.
23574         (avr_address_cost) [CONSTANT_ADDRESS_P]: Don't depend cost for
23575         io_address_operand on "optimize > 0".
23577 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
23579         * tree-loop-distribution.c: Add general explanantion on the pass.
23580         (generate_loops_for_partition): Mark distributed loop.
23581         (pg_add_dependence_edges): New parameter.  Handle alias data
23582         dependence specially and record it in the parameter if asked.
23583         (struct pg_vdata, pg_edata, pg_edge_callback_data): New structs.
23584         (init_partition_graph_vertices, add_partition_graph_edge): New.
23585         (pg_skip_alias_edge, free_partition_graph_edata_cb): New.
23586         (free_partition_graph_vdata, build_partition_graph): New.
23587         (sort_partitions_by_post_order, merge_dep_scc_partitions): New.
23588         (pg_collect_alias_ddrs, break_alias_scc_partitions): New.
23589         (data_ref_segment_size, latch_dominated_by_data_ref): New.
23590         (compute_alias_check_pairs, version_loop_by_alias_check): New.
23591         (version_for_distribution_p, finalize_partitions): New.
23592         (distribute_loop): Handle alias data dependence specially.  Factor
23593         out loop fusion code as functions and call these functions.
23595 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
23597         * tree-loop-distribution.c (classify_partition): New parameter and
23598         better handle reduction statement.
23599         (rdg_build_partitions): Revise comment.
23600         (distribute_loop): Compute statements in all partitions and pass it
23601         to classify_partition.
23603 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
23605         * tree-loop-distribution.c (enum partition_type): New.
23606         (struct partition): New field type.
23607         (partition_merge_into): Add parameter.  Update partition type.
23608         (data_dep_in_cycle_p, update_type_for_merge): New functions.
23609         (build_rdg_partition_for_vertex): Compute partition type.
23610         (rdg_build_partitions): Dump partition type.
23611         (distribute_loop): Update calls to partition_merge_into.
23613 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
23615         * tree-loop-distribution.c (struct ddr_hasher): New.
23616         (ddr_hasher::hash, ::equal, get_data_dependence): New function.
23617         (ddrs_table): New.
23618         (classify_partition): Call get_data_dependence.
23619         (pg_add_dependence_edges): Ditto.
23620         (distribute_loop): Release data dependence hash table.
23622 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
23624         * tree-loop-distribution.c (ref_base_address): Delete.
23625         (similar_memory_accesses): Rename ...
23626         (share_memory_accesses): ... to this.  Check if partitions access
23627         the same memory reference.
23628         (distribute_loop): Call share_memory_accesses.
23630 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
23632         * tree-loop-distribution.c (struct partition): New field recording
23633         its data reference.
23634         (partition_alloc, partition_free): Init and release data refs.
23635         (partition_merge_into): Merge data refs.
23636         (build_rdg_partition_for_vertex): Collect data refs for partition.
23637         (pg_add_dependence_edges): Change parameters from vector to bitmap.
23638         Update uses.
23639         (distribute_loop): Remve data refs from vertice data of partition
23640         graph.
23642 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
23644         * tree-loop-distribution.c (params.h): Include header file.
23645         (MAX_DATAREFS_NUM, DR_INDEX): New macro.
23646         (datarefs_vec): New global var.
23647         (create_rdg_vertices): Use datarefs_vec directly.
23648         (free_rdg): Don't free data references.
23649         (build_rdg): Update use.  Don't free data references.
23650         (distribute_loop): Compute global variable for data references.
23651         Bail out if there are too many data references.
23653 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
23655         * tree-loop-distribution.c (loop_nest): New global var.
23656         (build_rdg): Use loop directly, rather than loop nest.
23657         (pg_add_dependence_edges): Remove loop nest parameter.  Use global
23658         variable directly.
23659         (distribute_loop): Compute global variable loop nest.  Update use.
23661 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
23663         * tree-loop-distribution.c (enum fuse_type, fuse_message): New.
23664         (partition_merge_into): New parameter.  Dump reason for fusion.
23665         (distribute_loop): Update use of partition_merge_into.
23667 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
23669         * tree-loop-distribution.c (bb_top_order_index): New.
23670         (bb_top_order_index_size, bb_top_order_cmp): New.
23671         (stmts_from_loop): Use topological order.
23672         (pass_loop_distribution::execute): Compute and release topological
23673         order for basic blocks.
23675 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
23677         * tree-loop-distribution.c (pass_loop_distribution::execute): Skip
23678         if no loops.
23680 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
23682         * cfgloop.h (struct loop): Add comment.  New field orig_loop_num.
23683         * cfgloopmanip.c (lv_adjust_loop_entry_edge): Comment change.
23684         * internal-fn.c (expand_LOOP_DIST_ALIAS): New function.
23685         * internal-fn.def (LOOP_DIST_ALIAS): New.
23686         * tree-vectorizer.c (fold_loop_vectorized_call): Rename to ...
23687         (fold_loop_internal_call): ... this.
23688         (vect_loop_dist_alias_call): New function.
23689         (set_uid_loop_bbs): Call fold_loop_internal_call.
23690         (vectorize_loops): Fold IFN_LOOP_VECTORIZED and IFN_LOOP_DIST_ALIAS
23691         internal calls.
23693 2017-07-04  Uros Bizjak  <ubizjak@gmail.com>
23695         PR target/81300
23696         * config/i386/i386.md (setcc + movzbl/and to xor + setcc peepholes):
23697         Require dead FLAGS_REG at the beginning of a peephole.
23699 2017-07-04  Uros Bizjak  <ubizjak@gmail.com>
23701         PR target/81294
23702         * config/i386/adxintrin.h (_subborrow_u32): Swap _X and _Y
23703         arguments in the call to __builtin_ia32_sbb_u32.
23704         (_subborrow_u64): Swap _X and _Y arguments in the call to
23705         __builtin_ia32_sbb_u64.
23707 2017-07-04  Jakub Jelinek  <jakub@redhat.com>
23709         PR debug/81278
23710         * tree-vrp.c (compare_assert_loc): Turn into a function template
23711         with stable template parameter.  Only test if a->e is NULL,
23712         !a->e == !b->e has been verified already.  Use e == NULL or
23713         e != NULL instead of e or ! e tests.  If stable is true, don't use
23714         iterative_hash_expr, on the other side allow a or b or both NULL
23715         and sort the NULLs last.
23716         (process_assert_insertions): Sort using compare_assert_loc<false>
23717         instead of compare_assert_loc, later sort using
23718         compare_assert_loc<true> before calling process_assert_insertions_for
23719         in a loop.  Use break instead of continue once seen NULL pointer.
23721 2017-07-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
23723         * config/arm/driver-arm.c (arm_cpu_table): Add entry for ARM
23724         Cortex-R7 and Cortex-R8 processors.
23726 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
23728         * ipa-utils.c (ipa_merge_profiles): Fix merging when dst is
23729         uninitialized while src is not.
23731 2017-07-04  Richard Earnshaw  <rearnsha@arm.com>
23733         * common/config/arm/arm-common.c: Adjust include path for
23734         arm-cpu-cdata.h
23735         * config/arm/t-arm (TM_H): Adjust path for arm-cpu.h.
23736         (arm-cpu.h): Create in build directory.  Adjust dependency rules.
23737         (arm-cpu-data.h): Likewise.
23738         (arm-cpu-cdata.h): Likewise.
23739         * config/arm/arm-cpu.h: Delete.
23740         * config/arm/arm-cpu-cdata.h: Delete.
23741         * config/arm/arm-cpu-data.h: Delete.
23743 2017-07-04  James Greenhalgh  <james.greenhalgh@arm.com>
23745         * config/arm/arm-cpus.in (cortex-a55): New.
23746         (cortex-a75): Likewise.
23747         (cortex-a75.cortex-a55): Likewise.
23748         * config/arm/driver-arm.c (arm_cpu_table): Add cortex-a55 and
23749         cortex-a75.
23750         * doc/invoke.texi (-mcpu): Document cortex-a55 and cortex-a75.
23751         * config/arm/arm-cpu-cdata.h: Regenerate.
23752         * config/arm/arm-cpu-data.h: Regenerate.
23753         * config/arm/arm-cpu.h: Regenerate.
23754         * config/arm/arm-tables.opt: Regenerate.
23755         * config/arm/arm-tune.md: Regenerate.
23757 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
23759         * haifa-sched.c (sched_create_recovery_edges): Update profile.
23761 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
23763         * bb-reorder.c (better_edge_p): Fix handling of uninitialized
23764         probability.
23766 2017-07-04  Richard Sandiford  <richard.sandiford@linaro.org>
23768         PR tree-optimization/81292
23769         * tree-ssa-strlen.c (handle_builtin_strlen): When setting
23770         full_string_p, also call adjust_related_strinfos if the adjustment
23771         is simple, otherwise invalidate related strinfos.
23773 2017-07-04  Martin Liska  <mliska@suse.cz>
23775         PR sanitizer/81040
23776         * sanopt.c (sanitize_rewrite_addressable_params): Mark the
23777         newly created variable as DECL_IGNORED_P.
23779 2017-07-04  Martin Liska  <mliska@suse.cz>
23781         PR ipa/81293
23782         * ipa-inline.c (inline_small_functions):
23783         Use xstrdup_for_dump.
23785 2017-07-04  Tom de Vries  <tom@codesourcery.com>
23787         * graph.c (draw_cfg_edges): Save and restore EDGE_DFS_BACK.
23789 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
23791         PR target/81033
23792         * config/darwin.c (darwin_function_switched_text_sections):
23793         Fix spaces.
23795 2017-07-03  Jan Hubicka  <hubicka@ucw.cz>
23797         * tree-vect-loop-manip.c (vect_do_peeling): Fix scaling up.
23799 2017-07-03  Richard Earnshaw  <rearnsha@arm.com>
23801         * doc/invoke.texi (ARM Options): Add -mbe8 and -mbe32 to option summary.
23803 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
23805         * tree-vect-loop.c (vect_analyze_loop_2): Treat min_scalar_loop_bound,
23806         min_profitable_iters, and th as inclusive lower bounds.
23807         Fix LOOP_VINFO_PEELING_FOR_GAPS condition.
23808         (vect_estimate_min_profitable_iters): Return inclusive lower bounds
23809         for min_profitable_iters and min_profitable_estimate.
23810         (vect_transform_loop): Treat th as an inclusive lower bound.
23811         * tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
23813 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
23815         PR target/81033
23816         * config/darwin.c (darwin_function_switched_text_sections):
23817         Replace DECL_NAME with DECL_ASSEMBLER_NAME, split assemble_name_raw
23818         in two pieces, and suppress the use of buf.
23820 2017-07-03  Nathan Sidwell  <nathan@acm.org>
23822         * hash-table.h (hash_table_mod1): Fix indentation.
23824 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
23826         PR middle-end/81290
23827         * predict.c (force_edge_cold): Be more careful about propagation
23828         backward.
23829         * profile-count.h (profile_probability::guessed,
23830         profile_probability::fdo, profile_count::guessed, profile_count::fdo):
23831         New.
23832         * tree-ssa-threadupdate.c (recompute_probabilities): Result is guessed.
23834 2017-07-03  James Greenhalgh  <james.greenhalgh@arm.com>
23836         * doc/invoke.texi (rcpc architecture extension): Document it.
23838 2017-07-03  Richard Biener  <rguenther@suse.de>
23840         PR tree-optimization/60510
23841         * tree-vect-loop.c (vect_create_epilog_for_reduction): Pass in
23842         the scalar reduction PHI and use it.
23843         (vectorizable_reduction): Properly guard the single_defuse_cycle
23844         path for non-SLP reduction chains where we cannot use it.
23845         Rework reduc_def/index and vector type deduction.  Rework
23846         vector operand gathering during reduction op code-gen.
23847         * tree-vect-slp.c (vect_analyze_slp): For failed SLP reduction
23848         chains dissolve the chain and leave it to non-SLP reduction
23849         handling.
23851 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
23853         * tree-data-ref.h (dr_alignment): Declare.
23854         * tree-data-ref.c (dr_alignment): New function.
23855         * tree-vectorizer.h (dataref_aux): Remove base_element_aligned.
23856         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23857         set it.
23858         * tree-vect-stmts.c (vectorizable_store): Use dr_alignment.
23860 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
23862         * tree-data-ref.h (innermost_loop_behavior): Add base_alignment
23863         and base_misalignment fields.
23864         (DR_BASE_ALIGNMENT, DR_BASE_MISALIGNMENT): New macros.
23865         * tree-data-ref.c: Include builtins.h.
23866         (dr_analyze_innermost): Set up the new innmost_loop_behavior fields.
23867         * tree-vectorizer.h (STMT_VINFO_DR_BASE_ALIGNMENT): New macro.
23868         (STMT_VINFO_DR_BASE_MISALIGNMENT): Likewise.
23869         * tree-vect-data-refs.c: Include tree-cfg.h.
23870         (vect_compute_data_ref_alignment): Use the new innermost_loop_behavior
23871         fields instead of calculating an alignment here.
23872         (vect_analyze_data_refs): Use dr_analyze_innermost.  Dump the new
23873         innermost_loop_behavior fields.
23875 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
23877         * tree-data-ref.h (innermost_loop_behavior): Add a step_alignment
23878         field.
23879         (DR_STEP_ALIGNMENT): New macro.
23880         * tree-vectorizer.h (STMT_VINFO_DR_STEP_ALIGNMENT): Likewise.
23881         * tree-data-ref.c (dr_analyze_innermost): Initalize step_alignment.
23882         (create_data_ref): Print it.
23883         * tree-vect-stmts.c (vectorizable_load): Use the step alignment
23884         to tell whether the step preserves vector (mis)alignment.
23885         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
23886         Move the check for an integer step and generalise to all INTEGER_CST.
23887         (vect_analyze_data_refs): Set DR_STEP_ALIGNMENT when setting DR_STEP.
23888         Print the outer step alignment.
23890 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
23892         * tree-data-ref.h (innermost_loop_behavior): Replace aligned_to
23893         with offset_alignment.
23894         (DR_ALIGNED_TO): Delete.
23895         (DR_OFFSET_ALIGNMENT): New macro.
23896         * tree-vectorizer.h (STMT_VINFO_DR_ALIGNED_TO): Delete.
23897         (STMT_VINFO_DR_OFFSET_ALIGNMENT): New macro.
23898         * tree-data-ref.c (dr_analyze_innermost): Update after above changes.
23899         (create_data_ref): Likewise.
23900         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
23901         (vect_analyze_data_refs): Likewise.
23902         * tree-if-conv.c (if_convertible_loop_p_1): Use memset before
23903         creating dummy innermost behavior.
23905 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
23907         * tree-data-ref.h (dr_analyze_innermost): Replace the dr argument
23908         with a "innermost_loop_behavior *" and refeence tree.
23909         * tree-data-ref.c (dr_analyze_innermost): Likewise.
23910         (create_data_ref): Update call accordingly.
23911         * tree-predcom.c (find_looparound_phi): Likewise.
23913 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
23915         * tree-vectorizer.h (_stmt_vec_info): Replace individual dr_*
23916         fields with dr_wrt_vec_loop.
23917         (STMT_VINFO_DR_BASE_ADDRESS, STMT_VINFO_DR_INIT, STMT_VINFO_DR_OFFSET)
23918         (STMT_VINFO_DR_STEP, STMT_VINFO_DR_ALIGNED_TO): Update accordingly.
23919         (STMT_VINFO_DR_WRT_VEC_LOOP): New macro.
23920         (vect_dr_behavior): New function.
23921         (vect_create_addr_base_for_vector_ref): Remove loop parameter.
23922         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
23923         vect_dr_behavior.  Use a step_preserves_misalignment_p boolean to
23924         track whether the step preserves the misalignment.
23925         (vect_create_addr_base_for_vector_ref): Remove loop parameter.
23926         Use vect_dr_behavior.
23927         (vect_setup_realignment): Update call accordingly.
23928         (vect_create_data_ref_ptr): Likewise.  Use vect_dr_behavior.
23929         * tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Update
23930         call to vect_create_addr_base_for_vector_ref.
23931         (vect_create_cond_for_align_checks): Likewise.
23932         * tree-vect-patterns.c (vect_recog_bool_pattern): Copy
23933         STMT_VINFO_DR_WRT_VEC_LOOP as a block.
23934         (vect_recog_mask_conversion_pattern): Likewise.
23935         * tree-vect-stmts.c (compare_step_with_zero): Use vect_dr_behavior.
23936         (new_stmt_vec_info): Remove redundant zeroing.
23938 2017-07-03  Richard Earnshaw  <rearnsha@arm.com>
23940         * common/config/arm/arm-common.c (arm_be8_option): New function.
23941         * config/arm/arm-isa.h (isa_feature): Add new feature bit isa_bit_be8.
23942         (ISA_ARMv6): Add isa_bit_be8.
23943         * config/arm/arm.h (arm_be8_option): Add prototype.
23944         (BE8_SPEC_FUNCTION): New define.
23945         (EXTRA_SPEC_FUNCTIONS): Add BE8_SPEC_FUNCTION.
23946         * config/arm/arm.opt (mbig-endian): Mark as Negative of mlittle-endian.
23947         (mlittle-endian): Similarly.
23948         (mbe8, mbe32): New options.
23949         * config/arm/bpabi.h (BE8_LINK_SPEC): Call arm_be8_option.
23950         * doc/invoke.texi (ARM Options): Document -mbe8 and -mbe32.
23952 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
23954         * tree-cfg.c (gimple_find_sub_bbs): Fix profile updating.
23956 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
23958         * tree-cfgcleanup.c (want_merge_blocks_p): New function.
23959         (cleanup_tree_cfg_bb): Use it.
23960         * profile-count.h (profile_count::of_for_merging, profile_count::merge):
23961         New functions.
23962         * tree-cfg.c (gimple_merge_blocks): Use profile_count::merge.
23964 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
23966         PR bootstrap/81285
23967         * loop-doloop.c (add_test): Update profile.
23969 2017-07-03  Martin Liska  <mliska@suse.cz>
23971         PR sanitize/81040
23972         * sanopt.c (rewrite_usage_of_param): New function.
23973         (sanitize_rewrite_addressable_params): Likewise.
23974         (pass_sanopt::execute): Call rewrite_usage_of_param.
23976 2017-07-03  Richard Biener  <rguenther@suse.de>
23978         * tree-vect-loop.c (vect_create_epilog_for_reduction): Revert
23979         back to using VIEW_CONVERT_EXPR.
23981 2017-07-03  Martin Liska  <mliska@suse.cz>
23983         PR other/78366
23984         * doc/extend.texi: Document when a resolver function is
23985         generated for target_clones.
23987 2017-07-03  Martin Liska  <mliska@suse.cz>
23989         * asan.c (asan_emit_stack_protection): Unpoison just red zones
23990         and shadow memory of auto variables which are subject of
23991         use-after-scope sanitization.
23992         (asan_expand_mark_ifn): Add do set only when is_poison.
23994 2016-07-03  Richard Biener  <rguenther@suse.de>
23996         * tree-vect-loop.c (vect_analyze_loop_operations): Also analyze
23997         reduction PHIs.
23998         (vect_force_simple_reduction): Record reduction def -> phi mapping.
23999         (vectorizable_reduction): Perform reduction PHI creation when
24000         visiting a reduction PHI and adjust and simplify code generation
24001         phase of the reduction op.  Cache dts, use fold_binary, not fold_build2.
24002         (vect_transform_loop): Visit reduction PHIs.
24003         * tree-vect-slp.c (vect_get_and_check_slp_defs): Record reduction
24004         defs into the SLP tree.
24005         (vect_build_slp_tree): Reduction defs terminate the recursion.
24006         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Allow lookup
24007         of reduction defs.
24008         (vect_get_vec_defs_for_stmt_copy): Export.
24009         (vect_get_vec_defs): Likewise.
24010         * tree-vectorizer.h (struct _stmt_vec_info): Amend reduc_def
24011         purpose.
24012         (vect_get_vec_defs_for_stmt_copy): Declare.
24013         (vect_get_vec_defs): Likewise.
24015 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
24017         * tree-data-ref.c (dr_analyze_innermost): Replace the "nest"
24018         parameter with a "loop" parameter and use it instead of the
24019         loop containing DR_STMT.  Don't check simple_iv when doing
24020         BB analysis.  Describe the two analysis modes in the comment.
24022 2017-07-03  Tom de Vries  <tom@codesourcery.com>
24024         PR tree-optimization/69468
24025         * tree-ssa-tail-merge.c (ignore_edge_flags): New constant.
24026         (find_same_succ_bb): Handle ignore_edge_flags.
24028 2017-07-03  Tom de Vries  <tom@codesourcery.com>
24030         PR tree-optimization/81192
24031         * tree-ssa-tail-merge.c (same_succ_hash): Use bb->loop_father->num in
24032         hash.
24033         (same_succ::equal): Don't find bbs to be equal if bb->loop_father
24034         differs.
24035         (find_same_succ_bb): Remove obsolete test on bb->loop_father->latch.
24037 2017-07-03  Tom de Vries  <tom@codesourcery.com>
24039         PR tree-optimization/81192
24040         * tree-ssa-tail-merge.c (same_succ_flush_bb): Handle
24041         BB_SAME_SUCC (bb) == NULL.
24043 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
24045         * cfgrtl.c (rtl_verify_edges): Enable checking of profile_probability
24046         consistency.
24048 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
24050         * dumpfile.c: Include profile-count.h
24051         * tree-cfg.c (gimple_duplicate_sese_tail): Drop UNUSED attributes;
24052         update profile.
24053         (insert_cond_bb): Update profile.
24054         * tree-cfg.h (insert_cond_bb): Update prototype.
24055         * tree-chkp-opt.c (chkp_optimize_string_function_calls): Update.
24056         * tree-dump.c: Do not include tree-cfg.
24058 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
24060         * bb-reorder.c (fix_up_crossing_landing_pad): Update profile.
24062 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
24064         * expect.c (dw2_build_landing_pads): Update profile of the landing pad
24065         bb.
24067 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
24069         * tree-complex.c (expand_complex_div_wide): update profile.
24071 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
24072             Alan Hayward  <alan.hayward@arm.com>
24073             David Sherwood  <david.sherwood@arm.com>
24075         * Makefile.in (MACHMODE_H): Remove insn-modes.h
24076         (CORETYPES_H): New define.
24077         (MOSTLYCLEANFILES): Add insn-modes-inline.h.
24078         (insn-modes-inline.h, s-modes-inline-h): New rules.
24079         (generated_files): Add insn-modes-inline.h.
24080         (RTL_BASE_H, TREE_CORE_H): Use CORETYPES_H instead of coretypes.h.
24081         (build/gensupport.o, build/ggc-none.o, build/print-rtl.o): Likewise.
24082         (build/read-md.o, build/read-rtl.o, build/rtl.o): Likewise.
24083         (build/vec.o, build/hash-table.o, build/inchash.o): Likewise.
24084         (build/gencondmd.o, build/genattr.o, build/genattr-common.o): Likewise.
24085         (build/genattrtab.o, build/genautomata.o, build/gencheck.o): Likewise.
24086         (build/gencodes.o, build/genconditions.o): Likewise.
24087         (build/genconfig.o, build/genconstants.o, build/genemit.o): Likewise.
24088         (build/genenums.o, build/genextract.o, build/genflags.o): Likewise.
24089         (build/gentarget-def.o, build/genmddeps.o, build/genopinit.o)
24090         (build/genoutput.o, build/genpeep.o, build/genpreds.o): Likewise.
24091         (build/genrecog.o, build/genmddump.o, build/genmatch.o): Likewise.
24092         (build/gencfn-macros.o, build/gcov-iov.o): Likewise.
24093         * coretypes.h: Include everything up to real.h for generators.
24094         Include insn-modes.h first.  Include wide-int-print.h after
24095         wide-int.h.  Include insn-modes-inline.h and then machmode.h.
24096         * machmode.h: Don't include insn-modes.h here.
24097         * function-tests.c: Remove includes of signop.h, machmode.h,
24098         double-int.h and wide-int.h.
24099         * rtl.h: Likewise.
24100         * gcc-rich-location.c: Remove includes of machmode.h, double-int.h
24101         and wide-int.h.
24102         * optc-save-gen.awk: Likewise.
24103         * gencheck.c (BITS_PER_UNIT): Delete dummy definition.
24104         * godump.c: Remove include of wide-int-print.h.
24105         * pretty-print.h: Likewise.
24106         * wide-int-print.cc: Likewise.
24107         * wide-int.cc: Likewise.
24108         * hash-map-tests.c: Remove include of signop.h.
24109         * hash-set-tests.c: Likewise.
24110         * rtl-tests.c: Likewise.
24111         * mkconfig.sh: Remove include of machmode.h.
24112         * genmodes.c (emit_insn_modes_h): Split emission of inline functions
24113         into...
24114         (emit_insn_modes_inline_h): ...this new function.  Emit the code
24115         into an insn-modes-inline.h header file, adding appropriate
24116         include guards and end comments.
24117         (emit_insn_modes_c_header): Remove include of machmode.h.
24118         (emit_min_insn_modes_c_header): Include coretypes.h rather than
24119         machmode.h.
24120         (main): Handle -i flag and call emit_insn_modes_inline_h when
24121         it is passed.
24123 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
24125         * tree-ssa-strlen.c (strinfo): Rename the length field to
24126         nonzero_chars.  Add a full_string_p field.
24127         (compare_nonzero_chars, zero_length_string_p): New functions.
24128         (get_addr_stridx): Add an offset_out parameter.
24129         Use compare_nonzero_chars.
24130         (get_stridx): Update accordingly.  Use compare_nonzero_chars.
24131         (new_strinfo): Update after above changes to strinfo.
24132         (set_endptr_and_length): Set full_string_p.
24133         (get_string_length): Update after above changes to strinfo.
24134         (unshare_strinfo): Update call to new_strinfo.
24135         (maybe_invalidate): Likewise.
24136         (get_stridx_plus_constant): Change off to unsigned HOST_WIDE_INT.
24137         Use compare_nonzero_chars and zero_string_p.  Treat nonzero_chars
24138         as a uhwi instead of an shwi.  Update after above changes to
24139         strinfo and new_strinfo.
24140         (zero_length_string): Assert that chainsi contains full strings.
24141         Use zero_length_string_p.  Update call to new_strinfo.
24142         (adjust_related_strinfos): Update after above changes to strinfo.
24143         Copy full_string_p from origsi.
24144         (adjust_last_stmt): Use zero_length_string_p.
24145         (handle_builtin_strlen): Update after above changes to strinfo and
24146         new_strinfo.  Install the lhs as the string length if the previous
24147         entry didn't describe a full string.
24148         (handle_builtin_strchr): Update after above changes to strinfo
24149         and new_strinfo.
24150         (handle_builtin_strcpy): Likewise.
24151         (handle_builtin_strcat): Likewise.
24152         (handle_builtin_malloc): Likewise.
24153         (handle_pointer_plus): Likewise.
24154         (handle_builtin_memcpy): Likewise.  Track nonzero characters
24155         that aren't necessarily followed by a nul terminator.
24156         (handle_char_store): Likewise.
24158 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
24160         PR tree-optimization/80769
24161         * tree-ssa-strlen.c (strinfo): Document that "stmt" is also used
24162         for malloc and calloc.  Document the new invariant that all related
24163         strinfos have delayed lengths or none do.
24164         (verify_related_strinfos): Move earlier in file.
24165         (set_endptr_and_length): New function, split out from...
24166         (get_string_length): ...here.  Also set the lengths of related
24167         strinfos.
24168         (zero_length_string): Assert that chainsi has known (rather than
24169         delayed) lengths.
24170         (adjust_related_strinfos): Likewise.
24172 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
24174         PR tree-optimization/81136
24175         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Only
24176         assert that two references with the same misalignment have the same
24177         compile-time misalignment if those compile-time misalignments
24178         are known.
24180 2017-07-01  Andi Kleen  <ak@linux.intel.com>
24182         * print-tree.c (print_node): Print all attributes.
24184 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
24186         * cfg.c (scale_bbs_frequencies): New function.
24187         * cfg.h (scale_bbs_frequencies): Declare it.
24188         * cfgloopanal.c (single_likely_exit): Cleanup.
24189         * cfgloopmanip.c (scale_loop_frequencies): Take profile_probability
24190         as parameter.
24191         (scale_loop_profile): Likewise.
24192         (loop_version): Likewise.
24193         (create_empty_loop_on_edge): Update.
24194         * cfgloopmanip.h (scale_loop_frequencies, scale_loop_profile,
24195         scale_loop_frequencies, scale_loop_profile, loopify,
24196         loop_version): Update prototypes.
24197         * modulo-sched.c (sms_schedule): Update.
24198         * predict.c (unlikely_executed_edge_p): Also check probability.
24199         (probably_never_executed_edge_p): Fix typo.
24200         * tree-if-conv.c (version_loop_for_if_conversion): Update.
24201         * tree-parloops.c (gen_parallel_loop): Update.
24202         * tree-ssa-loop-ivcanon.c (try_peel_loop): Update.
24203         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
24204         * tree-ssa-loop-split.c (split_loop): Update.
24205         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
24206         * tree-vect-loop-manip.c (vect_do_peeling): Update.
24207         (vect_loop_versioning): Update.
24208         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
24210 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
24212         * trans-mem.c (split_bb_make_tm_edge): Update profile.
24214 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
24216         * tree-if-conv.c (combine_blocks): Use make_single_succ_edge
24217         to keep profile consistent.
24219 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
24221         * cfgrtl.c (rtl_flow_call_edges_add): Update profile.
24222         * tree-cfg.c (gimple_flow_call_edges_add): Likewise.
24223         * profile-count.h (max_safe_multiplier): Make unsigned.
24224         (profile_count::guessed_zero): New.
24226 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
24228         * bb-reorder.c (fix_up_crossing_landing_pad,
24229         fix_crossing_conditional_branches): Use make_single_succ_edge
24230         to keep profile consistent.
24232 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
24234         * tree-vect-loop.c (optimize_mask_stores): Use make_single_succ_edge
24235         to update profile.
24237 2017-07-01  Jakub Jelinek  <jakub@redhat.com>
24239         PR sanitizer/81262
24240         * bb-reorder.c (fix_up_fall_thru_edges): Move variable declarations to
24241         the right scopes, make sure cond_jump isn't preserved between multiple
24242         iterations.  Search for fallthru edge whenever there are 3+ edges and
24243         use find_fallthru_edge for it.
24245 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
24247         Patch by Alexander Monakov <amonakov@ispras.ru>
24248         * sel-sched-ir.c (compute_succs_info): Handle uninitialized
24249         probabilities consistently.
24251 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
24253         * pa.c (pa_expand_compare_and_swap_loop): Update call of
24254         emit_cmp_and_jump_insns.
24256 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
24258         PR ipa/81261
24259         * tree-inline.c (expand_call_inline): Combine profile statuses.
24261 2017-06-30  Andrew Pinski  <apinski@cavium.com>
24263         * tree-if-conv.c (predicate_scalar_phi): Update new_stmt if
24264         fold_stmt returned true.
24266 2017-06-30  Nathan Sidwell  <nathan@acm.org>
24268         * ggc.h (empty_string): Delete.
24269         * cfgexpand.c (expand_asm_stmt): Use plain "".
24270         * optabs.c (expand_asm_memory_barrier): Likewise.
24271         * stringpool.c (empty_string): Delete.
24272         (digit_vector, digit_string): Delete.
24273         (ggc_alloc_string): Use plain "", don't optimize single digit
24274         strings.  Use ggc_alloc_atomic.
24276 2017-06-30  Richard Earnshaw  <rearnsha@arm.com>
24278         * rtlanal.c (insn_rtx_cost): If a parallel contains exactly one
24279         comparison set and one other set, use the cost of the non-comparison
24280         set.
24282 2017-06-30  Nathan Sidwell  <nathan@acm.org>
24284         * ggc.h: Replace all 'static inline' with plain 'inline'.  Fix
24285         some formatting.
24287 2017-06-30  Peter Bergner  <bergner@vnet.ibm.com>
24289         * tree-cfg.c (group_case_labels_stmt): Merge scanning and compressing
24290         loops.  Remove now unneeded calls to gimple_switch_set_label() that
24291         just set removed labels to NULL_TREE.
24293 2017-06-30  Aldy Hernandez  <aldyh@redhat.com>
24295         * tree-ssanames.c (set_range_info_raw): Abstract from ...
24296         (set_range_info): ...here.  Only call set_range_info_raw if domain
24297         is useful.
24298         (set_nonzero_bits): Call set_range_info_raw.
24299         * tree-ssanames.h (set_range_info_raw): New.
24301 2017-06-30  Jakub Jelinek  <jakub@redhat.com>
24303         PR target/81225
24304         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): For V8FI,
24305         V16FI and VI8F_256 iterators, use <store_mask_predicate> instead
24306         of nonimmediate_operand and <store_mask_constraint> instead of m
24307         for the input operand.  For V8FI iterator, always split if input
24308         is a MEM.  For V16FI and V8SF_256 iterators, don't test if both
24309         operands are MEM if <mask_applied>.  For VI4F_256 iterator, use
24310         <store_mask_predicate> instead of register_operand and
24311         <store_mask_constraint> instead of v for the input operand.  Make
24312         sure both operands aren't MEMs for if not <mask_applied>.
24314 2017-06-30  Sylvestre Ledru  <sylvestre@debian.org>
24316         * lto-wrapper.c (copy_file) Close both file descriptors before
24317         exiting normally.
24319 2017-06-30  Martin Liska  <mliska@suse.cz>
24321         PR ipa/81214
24322         * multiple_target.c (create_dispatcher_calls): Make ifunc
24323         also for function that don't have calls or are not referenced.
24325 2017-06-30  Richard Biener  <rguenther@suse.de>
24327         * tree-vect-slp.c (vect_slp_analyze_node_operations): Only
24328         analyze the first scalar stmt.  Move vector type computation
24329         for the BB case here from ...
24330         * tree-vect-stmts.c (vect_analyze_stmt): ... here.  Guard
24331         live operation processing in the SLP case properly.
24333 2017-06-30  Richard Biener  <rguenther@suse.de>
24335         * graph.c (draw_cfg_node_succ_edges): Fix broken dot syntax.
24337 2017-06-30  Martin Liska  <mliska@suse.cz>
24339         PR sanitizer/81021
24340         * tree-eh.c (lower_resx): Call BUILT_IN_ASAN_HANDLE_NO_RETURN
24341         before BUILT_IN_UNWIND_RESUME when ASAN is used.
24343 2017-06-30  Yvan Roux  <yvan.roux@linaro.org>
24345         * doc/invoke.texi (AArch64): Add missing options and remove redundant
24346         ones.
24348 2017-06-30  Richard Biener  <rguenther@suse.de>
24350         PR tree-optimization/81249
24351         * tree-vect-loop.c (vect_create_epilog_for_reduction): Convert
24352         condition reduction result to original scalar type.
24354 2017-06-30  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24356         * profile-count.h (enum profile_quality): Fix typos and whitespace
24357         issues.
24359 2017-06-30  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24361         * config/s390/s390.c (s390_expand_setmem): Adjust to the new data
24362         type for branch probabilities.
24364 2017-06-29  Julian Brown  <julian@codesourcery.com>
24365             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
24367         * config/aarch64/aarch64-fusion-pairs.def: Add ALU_BRANCH entry.
24368         * config/aarch64/aarch64.c (AARCH64_FUSE_ALU_BRANCH): New fusion type.
24369         (thunderx2t99_tunings): Set AARCH64_FUSE_ALU_BRANCH flag.
24370         (aarch_macro_fusion_pair_p): Add support for AARCH64_FUSE_ALU_BRANCH.
24372 2017-06-29  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
24374         * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Push the
24375         check for CC usage into AARCH64_FUSE_CMP_BRANCH.
24376         * config/i386/i386.c (ix86_macro_fusion_pair_p): Push the check for
24377         CC usage from generic code to here.
24378         * sched-deps.c (sched_macro_fuse_insns): Move the condition for
24379         CC usage into the target macros.
24381 2017-06-29  Maya Rashish  <coypu@sdf.org>
24383         * config/netbsd.h (NETBSD_LIB_SPEC): Add -lc when creating shared
24384         objects.
24386 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
24388         * arm/arm-builtins.c: Include profile-count.h
24389         * except.c (sjlj_emit_function_enter): Use
24390         profile_probability::unlikely.
24392 2017-06-29  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24394         * config/rs6000/rs6000.c (toc_relative_expr_p): Make tocrel_base
24395         and tocrel_offset be pointer args rather than implicitly using
24396         static versions.
24397         (legitimate_constant_pool_address_p, rs6000_emit_move,
24398         const_load_sequence_p, adjust_vperm): Add local tocrel_base and
24399         tocrel_offset and use in toc_relative_expr_p call.
24400         (print_operand, print_operand_address): Use static tocrel_base_oac
24401         and tocrel_offset_oac.
24402         (rs6000_output_addr_const_extra): Use static tocrel_base_oac and
24403         tocrel_offset_oac.
24405 2017-06-29  Maya Rashish  <coypu@sdf.org>
24407         * config/vax/builtins.md (ffssi2_internal): Correct constraint.
24409 2017-06-29  Eric Botcazou  <ebotcazou@adacore.com>
24411         * expr.c (expand_expr) <normal_inner_ref>: When testing for unaligned
24412         objects, take into account only the alignment of 'op0' and 'mode1' if
24413         'op0' is a MEM.
24415 2017-06-29  Steve Ellcey  <sellcey@cavium.com>
24417         * ccmp.c (ccmp_tree_comparison_p): New function.
24418         (ccmp_candidate_p): Update to use above function.
24419         (get_compare_parts): New function.
24420         (expand_ccmp_next): Update to use new functions.
24421         (expand_ccmp_expr_1): Take tree arg instead of gimple, update to use
24422         new functions.
24423         (expand_ccmp_expr): Pass tree instead of gimple to expand_ccmp_expr_1,
24424         take mode as argument.
24425         * ccmp.h (expand_ccmp_expr): Add mode as argument.
24426         * expr.c (expand_expr_real_1): Pass mode as argument.
24428 2017-06-29  Segher Boessenkool  <segher@kernel.crashing.org>
24430         * combine.c (combine_instructions): Print insns to dump_file, together
24431         with their costs.
24433 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
24435         * asan.c (asan_emit_stack_protection): Update.
24436         (create_cond_insert_point): Update.
24437         * auto-profile.c (afdo_propagate_circuit): Update.
24438         * basic-block.h (struct edge_def): Turn probability to
24439         profile_probability.
24440         (EDGE_FREQUENCY): Update.
24441         * bb-reorder.c (find_traces_1_round): Update.
24442         (better_edge_p): Update.
24443         (sanitize_hot_paths): Update.
24444         * cfg.c (unchecked_make_edge): Initialize probability to uninitialized.
24445         (make_single_succ_edge): Update.
24446         (check_bb_profile): Update.
24447         (dump_edge_info): Update.
24448         (update_bb_profile_for_threading): Update.
24449         * cfganal.c (connect_infinite_loops_to_exit): Initialize new edge
24450         probabilitycount to 0.
24451         * cfgbuild.c (compute_outgoing_frequencies): Update.
24452         * cfgcleanup.c (try_forward_edges): Update.
24453         (outgoing_edges_match): Update.
24454         (try_crossjump_to_edge): Update.
24455         * cfgexpand.c (expand_gimple_cond): Update make_single_succ_edge.
24456         (expand_gimple_tailcall): Update.
24457         (construct_init_block): Use make_single_succ_edge.
24458         (construct_exit_block): Use make_single_succ_edge.
24459         * cfghooks.c (verify_flow_info): Update.
24460         (redirect_edge_succ_nodup): Update.
24461         (split_edge): Update.
24462         (account_profile_record): Update.
24463         * cfgloopanal.c (single_likely_exit): Update.
24464         * cfgloopmanip.c (scale_loop_profile): Update.
24465         (set_zero_probability): Remove.
24466         (duplicate_loop_to_header_edge): Update.
24467         * cfgloopmanip.h (loop_version): Update prototype.
24468         * cfgrtl.c (try_redirect_by_replacing_jump): Update.
24469         (force_nonfallthru_and_redirect): Update.
24470         (update_br_prob_note): Update.
24471         (rtl_verify_edges): Update.
24472         (purge_dead_edges): Update.
24473         (rtl_lv_add_condition_to_bb): Update.
24474         * cgraph.c: (cgraph_edge::redirect_call_stmt_to_calle): Update.
24475         * cgraphunit.c (init_lowered_empty_function): Update.
24476         (cgraph_node::expand_thunk): Update.
24477         * cilk-common.c: Include profile-count.h
24478         * dojump.c (inv): Remove.
24479         (jumpifnot): Update.
24480         (jumpifnot_1): Update.
24481         (do_jump_1): Update.
24482         (do_jump): Update.
24483         (do_jump_by_parts_greater_rtx): Update.
24484         (do_compare_rtx_and_jump): Update.
24485         * dojump.h (jumpifnot, jumpifnot_1, jumpif_1, jumpif, do_jump,
24486         do_jump_1. do_compare_rtx_and_jump): Update prototype.
24487         * dwarf2cfi.c: Include profile-count.h
24488         * except.c (dw2_build_landing_pads): Use make_single_succ_edge.
24489         (sjlj_emit_dispatch_table): Likewise.
24490         * explow.c: Include profile-count.h
24491         * expmed.c (emit_store_flag_force): Update.
24492         (do_cmp_and_jump): Update.
24493         * expr.c (compare_by_pieces_d::generate): Update.
24494         (compare_by_pieces_d::finish_mode): Update.
24495         (emit_block_move_via_loop): Update.
24496         (store_expr_with_bounds): Update.
24497         (store_constructor): Update.
24498         (expand_expr_real_2): Update.
24499         (expand_expr_real_1): Update.
24500         * expr.h (try_casesi, try_tablejump): Update prototypes.
24501         * gimple-pretty-print.c (dump_probability): Update.
24502         (dump_profile): New.
24503         (dump_gimple_label): Update.
24504         (dump_gimple_bb_header): Update.
24505         * graph.c (draw_cfg_node_succ_edges): Update.
24506         * hsa-gen.c (convert_switch_statements): Update.
24507         * ifcvt.c (cheap_bb_rtx_cost_p): Update.
24508         (find_if_case_1): Update.
24509         (find_if_case_2): Update.
24510         * internal-fn.c (expand_arith_overflow_result_store): Update.
24511         (expand_addsub_overflow): Update.
24512         (expand_neg_overflow): Update.
24513         (expand_mul_overflow): Update.
24514         (expand_vector_ubsan_overflow): Update.
24515         * ipa-cp.c (good_cloning_opportunity_p): Update.
24516         * ipa-split.c (split_function): Use make_single_succ_edge.
24517         * ipa-utils.c (ipa_merge_profiles): Update.
24518         * loop-doloop.c (add_test): Update.
24519         (doloop_modify): Update.
24520         * loop-unroll.c (compare_and_jump_seq): Update.
24521         (unroll_loop_runtime_iterations): Update.
24522         * lra-constraints.c (lra_inheritance): Update.
24523         * lto-streamer-in.c (input_cfg): Update.
24524         * lto-streamer-out.c (output_cfg): Update.
24525         * mcf.c (adjust_cfg_counts): Update.
24526         * modulo-sched.c (sms_schedule): Update.
24527         * omp-expand.c (expand_omp_for_init_counts): Update.
24528         (extract_omp_for_update_vars): Update.
24529         (expand_omp_ordered_sink): Update.
24530         (expand_omp_for_ordered_loops): Update.
24531         (expand_omp_for_generic): Update.
24532         (expand_omp_for_static_nochunk): Update.
24533         (expand_omp_for_static_chunk): Update.
24534         (expand_cilk_for): Update.
24535         (expand_omp_simd): Update.
24536         (expand_omp_taskloop_for_outer): Update.
24537         (expand_omp_taskloop_for_inner): Update.
24538         * omp-simd-clone.c (simd_clone_adjust): Update.
24539         * optabs.c (expand_doubleword_shift): Update.
24540         (expand_abs): Update.
24541         (emit_cmp_and_jump_insn_1): Update.
24542         (expand_compare_and_swap_loop): Update.
24543         * optabs.h (emit_cmp_and_jump_insns): Update prototype.
24544         * predict.c (predictable_edge_p): Update.
24545         (edge_probability_reliable_p): Update.
24546         (set_even_probabilities): Update.
24547         (combine_predictions_for_insn): Update.
24548         (combine_predictions_for_bb): Update.
24549         (propagate_freq): Update.
24550         (estimate_bb_frequencies): Update.
24551         (force_edge_cold): Update.
24552         * profile-count.c (profile_count::dump): Add missing space into dump.
24553         (profile_count::debug): Add newline.
24554         (profile_count::differs_from_p): Explicitly convert to unsigned.
24555         (profile_count::stream_in): Update.
24556         (profile_probability::dump): New member function.
24557         (profile_probability::debug): New member function.
24558         (profile_probability::differs_from_p): New member function.
24559         (profile_probability::differs_lot_from_p): New member function.
24560         (profile_probability::stream_in): New member function.
24561         (profile_probability::stream_out): New member function.
24562         * profile-count.h (profile_count_quality): Rename to ...
24563         (profile_quality): ... this one.
24564         (profile_probability): New.
24565         (profile_count): Update.
24566         * profile.c (compute_branch_probabilities): Update.
24567         * recog.c (peep2_attempt): Update.
24568         * sched-ebb.c (schedule_ebbs): Update.
24569         * sched-rgn.c (find_single_block_region): Update.
24570         (compute_dom_prob_ps): Update.
24571         (schedule_region): Update.
24572         * sel-sched-ir.c (compute_succs_info): Update.
24573         * stmt.c (struct case_node): Update.
24574         (do_jump_if_equal): Update.
24575         (get_outgoing_edge_probs): Update.
24576         (conditional_probability): Update.
24577         (emit_case_dispatch_table): Update.
24578         (expand_case): Update.
24579         (expand_sjlj_dispatch_table): Update.
24580         (emit_case_nodes): Update.
24581         * targhooks.c: Update.
24582         * tracer.c (better_p): Update.
24583         (find_best_successor): Update.
24584         * trans-mem.c (expand_transaction): Update.
24585         * tree-call-cdce.c: Update.
24586         * tree-cfg.c (gimple_split_edge): Upate.
24587         (move_sese_region_to_fn): Upate.
24588         * tree-cfgcleanup.c (cleanup_control_expr_graph): Upate.
24589         * tree-eh.c (lower_resx): Upate.
24590         (cleanup_empty_eh_move_lp): Upate.
24591         * tree-if-conv.c (version_loop_for_if_conversion): Update.
24592         * tree-inline.c (copy_edges_for_bb): Update.
24593         (copy_cfg_body): Update.
24594         * tree-parloops.c (gen_parallel_loop): Update.
24595         * tree-profile.c (gimple_gen_ic_func_profiler): Update.
24596         (gimple_gen_time_profiler): Update.
24597         * tree-ssa-dce.c (remove_dead_stmt): Update.
24598         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
24599         * tree-ssa-loop-im.c (execute_sm_if_changed): Update.
24600         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update.
24601         (unloop_loops): Update.
24602         (try_peel_loop): Update.
24603         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
24604         * tree-ssa-loop-split.c (connect_loops): Update.
24605         (split_loop): Update.
24606         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
24607         (hoist_guard): Update.
24608         * tree-ssa-phionlycprop.c (propagate_rhs_into_lhs): Update.
24609         * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Update.
24610         (value_replacement): Update.
24611         * tree-ssa-reassoc.c (branch_fixup): Update.
24612         * tree-ssa-tail-merge.c (replace_block_by): Update.
24613         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Update.
24614         (create_edge_and_update_destination_phis): Update.
24615         (compute_path_counts): Update.
24616         (recompute_probabilities): Update.
24617         (update_joiner_offpath_counts): Update.
24618         (freqs_to_counts_path): Update.
24619         (duplicate_thread_path): Update.
24620         * tree-switch-conversion.c (hoist_edge_and_branch_if_true): Update.
24621         (struct switch_conv_info): Update.
24622         (gen_inbound_check): Update.
24623         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
24624         (vect_do_peeling): Update.
24625         (vect_loop_versioning): Update.
24626         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
24627         (optimize_mask_stores): Update.
24628         * ubsan.c (ubsan_expand_null_ifn): Update.
24629         * value-prof.c (gimple_divmod_fixed_value): Update.
24630         (gimple_divmod_fixed_value_transform): Update.
24631         (gimple_mod_pow2): Update.
24632         (gimple_mod_pow2_value_transform): Update.
24633         (gimple_mod_subtract): Update.
24634         (gimple_mod_subtract_transform): Update.
24635         (gimple_ic): Update.
24636         (gimple_stringop_fixed_value): Update.
24637         (gimple_stringops_transform): Update.
24638         * value-prof.h: Update.
24640 2017-06-29  Carl Love  <cel@us.ibm.com>
24642         * config/rs6000/rs6000-c.c: Add support for built-in functions
24643         vector signed int vec_signed (vector float);
24644         vector signed long long vec_signed (vector double);
24645         vector signed int vec_signed2 (vector double, vector double);
24646         vector signed int vec_signede (vector double);
24647         vector signed int vec_signedo (vector double);
24648         * config/rs6000/rs6000.c (rs6000_generate_vsigned2_code): Add
24649         instruction generator.
24650         * config/rs6000/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
24651         UNSPEC_VSX_VSIGNED2): Add UNSPECS.
24652         (vsx_xvcvspsxws, vsx_xvcvdpuxds_scale, vsx_xvcvspuxws, vsigned2_v2df):
24653         Add define_insn.
24654         (vsignedo_v2df, vsignede_v2df, vunsigned2_v2df, vunsignedo_v2df,
24655         vunsignede_v2df): Add define_expands.
24656         * config/rs6000/rs6000-builtin.def (VEC_SIGNED, VEC_UNSIGNED,
24657         VEC_SIGNED2, VEC_UNSIGNED2, VEC_SIGNEDE, VEC_UNSIGNEDE, VEC_SIGNEDO,
24658         VEC_UNSIGNEDO): Add definitions.
24659         * config/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
24660         UNSPEC_VSX_VSIGNED2): Add UNSPECs.
24661         (vsx_xvcvspsxws, vsx_xvcvspuxws): Add define_insn.
24662         (vsigned2_v2df, vsigendo_v2df, vsignede_v2df,
24663         vunsigned2_v2df, vunsignedo_v2df, vunsignede_v2df): Add define_expands.
24664         * config/rs6000/altivec.h (vec_signed, vec_signed2,
24665         vec_signede and vec_signedo, vec_unsigned, vec_unsigned2,
24666         vec_unsignede, vec_unsignedo): Add builtin defines.
24667         * config/rs6000-protos.h (rs6000_generate_vsigned2_code): Add extern
24668         declaration.
24669         * doc/extend.texi: Update the built-in documentation file for the
24670         new built-in functions.
24672 2017-06-29  Richard Biener  <rguenther@suse.de>
24674         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Do not add
24675         reduction chains to LOOP_VINFO_REDUCTIONS.
24676         * tree-vect-slp.c (vect_analyze_slp): Continue looking for
24677         SLP reductions after processing reduction chains.
24679 2017-06-29  Nathan Sidwell  <nathan@acm.org>
24681         * builtins.c (fold_builtin_FUNCTION): Use
24682         lang_hooks.decl_printable_name.
24684 2017-06-29  Peter Bergner  <bergner@vnet.ibm.com>
24686         PR middle-end/81194
24687         * cfgexpand.c (expand_gimple_stmt_1): Handle switch statements
24688         with only one label.
24689         * stmt.c (expand_case): Assert NCASES is greater than one.
24691 2017-06-29  Richard Biener  <rguenther@suse.de>
24693         * tree-cfg.c (group_case_labels_stmt): Return whether we changed
24694         anything.
24695         (group_case_labels): Likewise.
24696         (find_taken_edge): Push sanity checking on val to workers...
24697         (find_taken_edge_cond_expr): ... here
24698         (find_taken_edge_switch_expr): ... and here, handle cases
24699         with just a default label.
24700         * tree-cfg.h (group_case_labels_stmt): Adjust prototype.
24701         (group_case_labels): Likewise.
24702         * tree-cfgcleanup.c (execute_cleanup_cfg_post_optimizing): When
24703         group_case_labels does anything cleanup the CFG again.
24705 2017-06-29  Bin Cheng  <bin.cheng@arm.com>
24707         PR tree-optimization/81196
24708         * tree-ssa-loop-niter.c (number_of_iterations_cond): Handle loop
24709         exit condition comparing two IVs.
24711 2017-06-29  Richard Earnshaw  <rearnsha@arm.com>
24713         * config/arm/parsecpu.awk (gen_comm_data): Add initializer for
24714         profile to the dummy entry at the end of the list of architectures.
24715         * config/arm/arm-cpu-cdata.h: Regenerated.
24717 2017-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24718             Michael Collison <michael.collison@arm.com>
24720         PR target/70119
24721         * config/aarch64/aarch64.md (*aarch64_<optab>_reg_<mode>3_mask1):
24722         New pattern.
24723         (*aarch64_reg_<mode>3_neg_mask2): New pattern.
24724         (*aarch64_reg_<mode>3_minus_mask): New pattern.
24725         (*aarch64_<optab>_reg_di3_mask2): New pattern.
24726         * config/aarch64/aarch64.c (aarch64_rtx_costs): Account for cost
24727         of shift when the shift amount is masked with constant equal to
24728         the size of the mode.
24729         * config/aarch64/predicates.md (subreg_lowpart_operator): New
24730         predicate.
24732 2017-06-29  Martin Liska  <mliska@suse.cz>
24734         * config/i386/i386.opt: Change range from [1,5] to [0,5].
24736 2017-06-29  Yury Gribov  <tetra2005@gmail.com>
24738         PR bootstrap/80565
24739         * ipa-cp.c (allocate_and_init_ipcp_value): Add initialization
24740         code.
24741         * ipa-inline.h
24742         (edge_growth_cache_entry::edge_growth_cache_entry): New
24743         function.
24744         (reset_edge_growth_cache): Update to use constructor.
24746 2017-06-28  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
24748         * config/aarch64/aarch64.h (AARCH64_EXPAND_ALIGNMENT): New.
24749         (DATA_ALIGNMENT): Update to use AARCH64_EXPAND_ALIGNMENT.
24750         (LOCAL_ALIGNMENT): Update to use AARCH64_EXPAND_ALIGNMENT.
24752 2017-06-28  Sebastian Peryt  <sebastian.peryt@intel.com>
24754         * config/i386/avx512vlintrin.h (_mm256_permutexvar_epi64)
24755         (_mm256_permutexvar_epi32, _mm256_permutex_epi64): New intrinsics.
24757 2017-06-28  Szabolcs Nagy  <szabolcs.nagy@arm.com>
24759         * config.gcc (*-linux-musl*): Add t-musl tmake_file.
24760         (*-linux-uclibc*): Add t-uclibc tmake_file.
24761         * config/t-musl: New.
24762         * config/t-uclibc: New.
24764 2017-06-28  Richard Earnshaw  <rearnsha@arm.com>
24766         * config/arm/parsecpu.awk (profile): Parse new keyword in an arch
24767         context.
24768         (gen_comm_data): Emit architectural setting of arch_prof.
24769         * config/arm/arm-cpus.in (armv6-m, armv6s-m, armv7-a, armv7ve): Set the
24770         profile.
24771         (armv7-r, armv7-m, armv7e-m, armv8-a, armv8.1-a, armv8.2-a): Likewise.
24772         (armv8-m.base, armv8-m.main): Likewise.
24773         * arm-protos.h (arm_build_target): Add profile field.
24774         (arch_option): Likewise.
24775         * config/arm/arm.c (arm_configure_build_target): Copy the profile to
24776         the active target.
24777         * config/arm/arm.h (TARGET_ARM_ARCH_PROFILE): Use
24778         arm_active_target.profile.
24780 2017-06-28  Richard Biener  <rguenther@suse.de>
24782         PR middle-end/81227
24783         * fold-const.c (negate_expr_p): Use TYPE_UNSIGNED, not
24784         TYPE_OVERFLOW_WRAPS.
24785         * match.pd (negate_expr_p): Likewise.
24786         * tree-ssa-reassoc.c (optimize_range_tests_diff): Use
24787         fold_build2, not fold_binary.
24789 2017-06-28  Wilco Dijkstra  <wdijkstr@arm.com>
24791         * config/aarch64/aarch64 (aarch64_expand_mov_immediate):
24792         Convert memory address to Pmode.
24793         (aarch64_print_operand): Assert MEM operands are always Pmode.
24795 2017-06-28  Wilco Dijkstra  <wdijkstr@arm.com>
24797         PR target/79665
24798         * config/arm/aarch-common.c (arm_no_early_alu_shift_dep):
24799         Remove redundant if.
24800         (aarch_forward_to_shift_is_not_shifted_reg): Remove.
24801         * config/arm/aarch-common-protos.h
24802         (aarch_forward_to_shift_is_not_shifted_re): Remove.
24803         * config/arm/cortex-a53.md: Use arm_no_early_alu_shift_dep in bypass.
24805 2017-06-28  Michael Meissner  <meissner@linux.vnet.ibm.com>
24807         PR ipa/81238
24808         * multiple_target.c (create_dispatcher_calls): Set the default
24809         clone to be static, not public.
24811 2017-06-28  Richard Biener  <rguenther@suse.de>
24813         * tree-vect-loop.c (vectorizable_reduction): Move special
24814         cond reduction IV var creation ...
24815         (vect_create_epilog_for_reduction): ... here.  Remove induction_index
24816         parameter.  Use STMT_VINFO_VECTYPE.
24817         * tree-vect-slp.c (vect_get_constant_vectors): Properly reset
24818         constant_p.
24820 2017-06-28  Martin Liska  <mliska@suse.cz>
24822         PR ipa/81128
24823         * ipa-visibility.c (non_local_p): Handle visibility.
24825 2017-06-28  Martin Liska  <mliska@suse.cz>
24827         PR driver/79659
24828         * common.opt: Add IntegerRange to various options.
24829         * opt-functions.awk (integer_range_info): New function.
24830         * optc-gen.awk: Add integer_range_info to cl_options struct.
24831         * opts-common.c (decode_cmdline_option): Handle
24832         CL_ERR_INT_RANGE_ARG.
24833         (cmdline_handle_error): Likewise.
24834         * opts.c (print_filtered_help): Show valid interval in
24835         when --help is provided.
24836         * opts.h (struct cl_option): Add range_min and range_max fields.
24837         * config/i386/i386.opt: Add IntegerRange for -mbranch-cost.
24839 2017-06-28  Marc Glisse  <marc.glisse@inria.fr>
24841         * match.pd ((X & ~Y) | (~X & Y)): Generalize to + and ^.
24842         (x * C EQ/NE y * C): New transformation.
24844 2017-06-28  Christophe Lyon  <christophe.lyon@linaro.org>
24846         * genmultilib (combination_space): Accept '+' in option names.
24848 2017-06-28  Martin Liska  <mliska@suse.cz>
24850         PR sanitizer/81224
24851         * asan.c (instrument_derefs): Bail out inner references
24852         that are hard register variables.
24854 2017-06-28  Jakub Jelinek  <jakub@redhat.com>
24856         PR target/81175
24857         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Use def_builtin
24858         rather than def_builtin_pure for __builtin_ia32_gatherpf*.
24860 2017-06-28  Richard Biener  <rguenther@suse.de>
24862         * tree-vectorizer.h (vect_get_vec_defs): Remove.
24863         (vect_get_slp_defs): Adjust.
24864         * tree-vect-loop.c (get_initial_defs_for_reduction): Split
24865         out from ...
24866         * tree-vect-slp.c (vect_get_constant_vectors): ... here and
24867         simplify.
24868         * tree-vect-loop.c (vect_create_epilog_for_reduction): Use
24869         get_initial_defs_for_reduction instead of vect_get_vec_defs.
24870         (vectorizable_reduction): Adjust.
24871         * tree-vect-slp.c (vect_get_constant_vectors): Remove reduction
24872         handling.
24873         (vect_get_slp_defs): Likewise.
24874         * tree-vect-stmts.c (vect_get_vec_defs): Make static and adjust.
24875         (vectorizable_bswap): Adjust.
24876         (vectorizable_call): Likewise.
24877         (vectorizable_conversion): Likewise.
24878         (vectorizable_assignment): Likewise.
24879         (vectorizable_shift): Likewise.
24880         (vectorizable_operation): Likewise.
24881         (vectorizable_store): Likewise.
24882         (vectorizable_condition): Likewise.
24883         (vectorizable_comparison): Likewise.
24885 2017-06-28  Michael Collison  <michael.collison@arm.com>
24887         PR target/68535
24888         * config/arm/arm.c (gen_ldm_seq): Remove last unnecessary
24889         set of base_reg
24890         (arm_gen_movmemqi): Removed unused variable 'i'.
24891         Convert 'for' loop into 'while' loop.
24892         (arm_expand_prologue): Remove last unnecessary set of insn.
24893         (thumb_pop): Remove unused variable 'pushed_words'.
24894         (thumb_exit): Remove last unnecessary set of regs_to_pop.
24896 2017-06-28  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24898         * config/s390/predicates.md: Use s390_rel_address_ok_p.
24899         * config/s390/s390-protos.h: Add prototype of
24900         s390_rel_address_ok_p.
24901         * config/s390/s390.c (s390_got_symbol): New function.
24902         (s390_rel_address_ok_p): New function.
24903         (legitimize_pic_address): Use s390_rel_address_ok_p.
24904         (s390_load_got): Use s390_got_symbol.
24905         (s390_option_override): Issue error if
24906         -mno-pic-data-is-text-relative is used without -fpic/-fPIC.
24907         * config/s390/s390.h (TARGET_DEFAULT_PIC_DATA_IS_TEXT_RELATIVE):
24908         New macro.
24909         * config/s390/s390.opt: New option mpic-data-is-text-relative.
24911 2017-06-27  Andrew Pinski  <apinski@cavium.com>
24913         * match.pd (X >/>=/</<= 0 ? 1.0 : -1.0): New patterns.
24914         (X * copysign (1.0, X)): New pattern.
24915         (X * copysign (1.0, -X)): New pattern.
24916         (copysign (-1.0, CST)): New pattern.
24918 2017-06-27  Joseph Myers  <joseph@codesourcery.com>
24920         * genmultilib (combination_space): Remove variable.
24921         Validate reuse rules against regular expression for any sequence
24922         of multilib options in any order.
24924 2017-06-27  Michael Collison  <michael.collison@arm.com>
24926         * config/aarch64/aarch64-simd.md (aarch64_combine<mode>): Directly
24927         call aarch64_split_simd_combine.
24928         * (aarch64_combine_internal<mode>): Delete pattern.
24929         * config/aarch64/aarch64.c (aarch64_split_simd_combine):
24930         Allow register and subreg operands.
24932 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
24934         * config/i386/vxworks.h (ASM_SPEC): Remove definition. No target
24935         specific need, just fallback on defaults.
24936         (ASM_OUTPUT_ALIGNED_BSS): Add #undef before #define.
24938 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
24939             Olivier Hainque  <hainque@adacore.com>
24941         * config/i386/vxworks.h (DBX_REGISTER_NUMBER): Pick distinct
24942         map for 64bits.
24943         (TARGET_OS_CPP_BUILTINS): builtin_define CPU to X86_64 for 64bit
24944         targets. Pick a default if no particular attempt applied.
24945         (STACK_CHECK_PROTECT): Double for 64bit targets, which have
24946         larger contexts.
24948 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
24950         * config.gcc (i*86-wrs-vxworks7): Handle new acceptable triplet.
24951         (x86_64-wrs-vxworks7): Likewise.
24953 2017-06-27  Marek Polacek  <polacek@redhat.com>
24955         PR sanitizer/81223
24956         * ubsan.c (instrument_null): Check get_base_address's result for null.
24958 2017-06-27  Marc Glisse  <marc.glisse@inria.fr>
24960         * match.pd ((A+-B)+(C-A), (A+B)-(A-C)): New transformations.
24962 2017-06-27  Marc Glisse  <marc.glisse@inria.fr>
24964         * builtin-types.def (BT_FENV_T_PTR, BT_CONST_FENV_T_PTR,
24965         BT_FEXCEPT_T_PTR, BT_CONST_FEXCEPT_T_PTR): New primitive types.
24966         (BT_FN_INT_FENV_T_PTR, BT_FN_INT_CONST_FENV_T_PTR,
24967         BT_FN_INT_FEXCEPT_T_PTR_INT, BT_FN_INT_CONST_FEXCEPT_T_PTR_INT):
24968         New function types.
24969         * builtins.def (BUILT_IN_FECLEAREXCEPT, BUILT_IN_FEGETENV,
24970         BUILT_IN_FEGETEXCEPTFLAG, BUILT_IN_FEGETROUND,
24971         BUILT_IN_FEHOLDEXCEPT, BUILT_IN_FERAISEEXCEPT,
24972         BUILT_IN_FESETENV, BUILT_IN_FESETEXCEPTFLAG,
24973         BUILT_IN_FESETROUND, BUILT_IN_FETESTEXCEPT,
24974         BUILT_IN_FEUPDATEENV): New builtins.
24975         * tree-core.h (TI_FENV_T_PTR_TYPE, TI_CONST_FENV_T_PTR_TYPE,
24976         TI_FEXCEPT_T_PTR_TYPE, TI_CONST_FEXCEPT_T_PTR_TYPE): New entries.
24977         * tree.h (fenv_t_ptr_type_node, const_fenv_t_ptr_type_node,
24978         fexcept_t_ptr_type_node, const_fexcept_t_ptr_type_node): New
24979         macros.
24980         (builtin_structptr_types): Adjust size.
24981         * tree.c (builtin_structptr_types): Add four entries.
24983 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
24984             Olivier Hainque  <hainque@adacore.com>
24986         * config/vxworks.h (VXWORKS_LIB_SPEC): Incorporate ...
24987         (TLS_SYM): New local macro, forcing reference to __tls__ on
24988         link command lines for VxWorks 7 RTPs, triggering initialization
24989         of tlsLib.
24990         (VXWORKS_HAVE_TLS): New macro. State whether the target VxWorks
24991         OS features TLS support, true for RTPs on VxWorks 7.
24992         * config/vxworks.c (vxworks_override_options): Setup emutls
24993         accordingly.
24995 2017-06-27  Jakub Jelinek  <jakub@redhat.com>
24997         * predict.c (test_prediction_value_range): Use -1U instead of -1
24998         to avoid narrowing conversion warning.
24999         * dumpfile.c (dump_options): Wrap all value into dump_flags_t cast
25000         to avoid narrowing conversion warning.
25001         * opt-functions.awk (var_ref): Return (unsigned short) -1 instead of
25002         -1.
25003         * optc-gen.awk (END): Expect (unsigned short) -1 instead of -1.
25005 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
25007         * config/vxworks.h (VXWORKS_LIBS_RTP): Alternative definition for
25008         64bit configurations.
25009         (PTR_DIFF_TYPE): Alternative definition for TARGET_LP64.
25010         (SIZE_TYPE): Likewise.
25011         * config/vxworks.c (vxworks_emutls_var_fields): Use
25012         long_unsigned_type_node instead of unsigned_type_node as the offset
25013         field type, which is "pointer" mode in emutls.c.
25015 2017-06-27  Jakub Jelinek  <jakub@redhat.com>
25017         PR sanitizer/81209
25018         * ubsan.c (ubsan_encode_value): Initialize DECL_CONTEXT on var.
25020         PR middle-end/81207
25021         * gimple-fold.c (replace_call_with_call_and_fold): Handle
25022         gimple_vuse copying separately from gimple_vdef copying.
25024 2017-06-27  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
25026         * value-prof.c (free_hist): Remove call to memset and the enclosing if
25027         condition.
25029 2017-06-26  Jerome Lambourg  <lambourg@adacore.com>
25030             Olivier Hainque  <hainque@adacore.com>
25032         * config.gcc (*-*-vxworks*): Add TARGET_VXWORKS7=1 to tm_defines
25033         for all vxworks7 targets.
25034         * config/vxworks.h (TARGET_VXWORKS7): If not defined, define to 0.
25035         (VXWORKS_ADDITIONAL_CPP_SPEC): Alternative definition for VXWORKS7.
25036         (VXWORKS_LIBS_RTP, VXWORKS_LIBS_RTP_DIR): New macros, allowing
25037         variations for VX6/VX7 and 32/64bits later on in ...
25038         (VXWORKS_LIB_SPEC): Leverage new macros.
25039         (VXWORKS_OS_CPP_BUILTINS): Define _VSB_CONFIG_FILE for VXWORKS7,
25040         as well as _ALLOW_KEYWORD_MACROS when "inline" is not a keyword.
25042 2017-06-26  Jerome Lambourg  <lambourg@adacore.com>
25044         * config/vxworks.h (VXWORKS_OS_CPP_BUILTINS): builtin_define
25045         _VX_TOOL_FAMILY and _VX_TOOL to gnu.
25047 2017-06-26  Carl Love  <cel@us.ibm.com>
25049         * config/rs6000/rs6000-c.c: Add support for built-in functions
25050         vector bool char vec_reve (vector bool char);
25051         vector signed char vec_reve (vector signed char);
25052         vector unsigned char vec_reve (vector unsigned char);
25053         vector bool int vec_reve (vector bool int);
25054         vector signed int vec_reve (vector signed int);
25055         vector unsigned int vec_reve (vector unsigned int);
25056         vector bool long long vec_reve (vector bool long long);
25057         vector signed long long vec_reve (vector signed long long);
25058         vector unsigned long long vec_reve (vector unsigned long long);
25059         vector bool short vec_reve (vector bool short);
25060         vector signed short vec_reve (vector signed short);
25061         vector double vec_reve (vector double);
25062         vector float vec_reve (vector float);
25063         * config/rs6000/rs6000-builtin.def (VREVE_V2DI, VREVE_V4SI,
25064         VREVE_V8HI, VREVE_V16QI, VREVE_V2DF, VREVE_V4SF, VREVE): New builtin.
25065         * config/rs6000/altivec.md (UNSPEC_VREVEV): New UNSPEC.
25066         (altivec_vreve): New pattern.
25067         * config/rs6000/altivec.h (vec_reve): New define.
25068         * doc/extend.texi (vec_rev): Update the built-in documentation file
25069         for the new built-in functions.
25071 2016-06-26  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25073         PR tree-optimization/71815
25074         * gimple-ssa-strength-reduction.c (uses_consumed_by_stmt): New
25075         function.
25076         (find_basis_for_candidate): Call uses_consumed_by_stmt rather than
25077         has_single_use.
25078         (slsr_process_phi): Likewise.
25079         (replace_uncond_cands_and_profitable_phis): Don't replace a
25080         multiply candidate with a stride of 1 (copy or cast).
25081         (phi_incr_cost): Call uses_consumed_by_stmt rather than
25082         has_single_use.
25083         (lowest_cost_path): Likewise.
25084         (total_savings): Likewise.
25086 2017-06-26  Richard Biener  <rguenther@suse.de>
25088         PR target/81175
25089         * config/i386/i386.c (ix86_init_mmx_sse_builtins):
25090         Use def_builtin_pure for all gather builtins.
25092 2017-06-26  Richard Biener  <rguenther@suse.de>
25094         PR tree-optimization/81203
25095         * tree-tailcall.c (find_tail_calls): Do not move stmts into
25096         non-dominating BBs.
25098 2017-06-26  Marek Polacek  <polacek@redhat.com>
25100         PR c/80116
25101         * doc/invoke.texi: Document -Wmultistatement-macros.
25103 2017-06-26  Christophe Lyon  <christophe.lyon@linaro.org>
25105         * doc/sourcebuild.texi (ARM-specific attributes): Document new
25106         arm_neon_ok_no_float_abi effective target.
25108 2017-06-26  Richard Biener  <rguenther@suse.de>
25110         PR tree-optimization/80928
25111         * cfghooks.c (duplicate_block): Do not copy BB_DUPLICATED flag.
25112         (copy_bbs): Set BB_DUPLICATED flag early.
25113         (execute_on_growing_pred): Do not execute for BB_DUPLICATED
25114         marked blocks.
25115         (execute_on_shrinking_pred): Likewise.
25116         * tree-ssa.c (ssa_redirect_edge): Do not look for PHI args in
25117         BB_DUPLICATED blocks.
25118         * tree-ssa-phionlycoprop.c (eliminate_degenerate_phis_1): Properly
25119         iterate over all PHIs considering removal of *gsi.
25121 2017-06-23  Jim Wilson  <jim.wilson@linaro.org>
25123         * doc/invoke.texi (AArch64 Options, -mtune): Re-add falkor and
25124         qdf24xx.
25126 2017-06-23  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25128         * config/rs6000/rs6000-string.c: (expand_block_clear,
25129         do_load_for_compare, select_block_compare_mode,
25130         compute_current_alignment, expand_block_compare,
25131         expand_strncmp_align_check, expand_strn_compare,
25132         expand_block_move, rs6000_output_load_multiple)
25133         Move functions related to string/block move/compare
25134         to a separate file.
25135         * config/rs6000/rs6000.c: Move above functions to rs6000-string.c.
25136         * config/rs6000/rs6000-protos.h (rs6000_emit_dot_insn): Add prototype
25137         for this function which is now used in two files.
25138         * config/rs6000/t-rs6000: Add rule to compile rs6000-string.o.
25139         * config.gcc: Add rs6000-string.o to extra_objs for
25140         targets powerpc*-*-* and rs6000*-*-*.
25142 2017-06-23  Michael Meissner  <meissner@linux.vnet.ibm.com>
25144         PR target/80510
25145         * config/rs6000/rs6000.md (ALTIVEC_DFORM): Do not allow DImode in
25146         32-bit, since indexed is not valid for DImode.
25147         (mov<mode>_hardfloat32): Reorder ISA 2.07 load/stores before ISA
25148         3.0 d-form load/stores to be the same as mov<mode>_hardfloat64.
25149         (define_peephole2 for Altivec d-form load): Add 32-bit support.
25150         (define_peephole2 for Altivec d-form store): Likewise.
25152         PR ipa/81185
25153         * multiple_target.c (create_dispatcher_calls): Only create the
25154         dispatcher call if the function is the default clone of a
25155         versioned function.
25157 2017-06-23  Segher Boessenkool  <segher@kernel.crashing.org>
25159         PR middle-end/80902
25160         * builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
25161         a call, force the call to not be a tail call.
25163 2017-06-23  Jeff Law  <law@redhat.com>
25165         * doc/contrib.texi: Add entry for Steven Pemberton's work on
25166         enquire.
25168 2017-06-23  Will Schmidt  <will_schmidt@vnet.ibm.com>
25170         * config/rs6000/rs6000.c: Add include of ssa-propagate.h for
25171         update_call_from_tree().  (rs6000_gimple_fold_builtin): Add
25172         handling for early expansion of vector shifts (sl,sr,sra,rl).
25173         (builtin_function_type): Add vector shift right instructions
25174         to the unsigned argument list.
25176 2017-06-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
25178         rtl-optimizatoin/79286
25179         * ira.c (update_equiv_regs): Revert to using may_trap_or_fault_p again.
25180         * rtlanal.c (rtx_addr_can_trap_p_1): SYMBOL_REF_FUNCTION_P can never
25181         trap.  PIC register plus a const unspec without offset can never trap.
25183 2017-06-23  Marc Glisse  <marc.glisse@inria.fr>
25185         * tree.h (builtin_structptr_type): New type.
25186         (builtin_structptr_types): Declare new array.
25187         * tree.c (builtin_structptr_types): New array.
25188         (free_lang_data, build_common_tree_nodes): Use it.
25190 2017-06-23  Jonathan Wakely  <jwakely@redhat.com>
25192         PR c++/81187
25193         * doc/invoke.texi (-Wnoexcept-type): Fix name of option, from
25194         -Wnoexcept.
25196 2017-06-22  Matt Turner  <mattst88@gmail.com>
25198         * config/i386/driver-i386.c (host_detect_local_cpu): Add Kaby
25199         Lake models to skylake case.  Assume skylake for unknown
25200         models with clflushopt.
25202 2017-06-22  Jeff Law  <law@redhat.com>
25204         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Handle
25205         frame sizes that do not satisfy aarch64_uimm12_shift.
25207 2017-06-22  Jan Hubicka <hubicka@ucw.cz>
25209         * profile-count.h (apply_probability,
25210         apply_scale, probability_in): Fix checks for zero.
25212 2017-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
25214         * incpath.c (add_sysroot_to_chain): Allow for $SYSROOT prefix.
25215         * doc/cppdiropts.texi (-I @var{dir}): Document it.
25217 2016-06-22  Richard Biener  <rguenther@suse.de>
25219         * tree-vect-loop.c (vect_model_reduction_cost): Handle
25220         COND_REDUCTION and INTEGER_INDUC_COND_REDUCTION without
25221         REDUC_MAX_EXPR support.
25222         (vectorizable_reduction): Likewise.
25223         (vect_create_epilog_for_reduction): Likewise.
25225 2017-06-22  James Greenhalgh  <james.greenhalgh@arm.com>
25227         * match.pd (A / (1 << B) -> A >> B): New.
25228         * generic-match-head.c: Include optabs-tree.h.
25229         * gimple-match-head.c: Likewise.
25230         * optabs-tree.h (target_supports_op_p): New.
25231         * optabs-tree.c (target_supports_op_p): New.
25233 2017-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
25235         * configure.ac (gcc_cv_ld_static_dynamic): Also check stderr for
25236         $gcc_cv_ld --help output.
25237         (gcc_cv_ld_demangle): Likewise.
25238         (gcc_cv_ld_eh_frame_hdr): Likewise.
25239         (gcc_cv_ld_pie): Likewise.
25240         (gcc_cv_ld_as_needed): Likewise.  Prefer native forms unless $gnu_ld.
25241         (gcc_cv_ld_buildid): Likewise.
25242         (gcc_cv_ld_sysroot): Likewise.
25243         (ld_bndplt_support): Likewise.
25244         (ld_pushpopstate_support): Likewise.
25245         * configure: Regenerate.
25246         * config/sol2.h [!USE_GLD] (SYSROOT_SPEC): Define.
25248 2017-06-21  Jakub Jelinek  <jakub@redhat.com>
25250         PR target/81151
25251         * config/i386/sse.md (round<mode>2): Renumber match_dup and
25252         operands indexes to avoid gap between operands and match_dups.
25254 2017-06-21  Andrew Pinski  <apinski@cavium.com>
25256         * config/aarch64/aarch64-cost-tables.h (thunderx_extra_costs):
25257         Increment Arith_shift and Arith_shift_reg by 1.
25258         * config/aarch64/aarch64-tuning-flags.def (cheap_shift_extend):
25259         New tuning flag.
25260         * config/aarch64/aarch64.c (thunderx_tunings): Enable
25261         AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND.
25262         (aarch64_strip_extend): Add new argument and test for it.
25263         (aarch64_cheap_mult_shift_p): New function.
25264         (aarch64_rtx_mult_cost): Call aarch64_cheap_mult_shift_p and don't
25265         add a cost if it is true.
25266         Update calls to aarch64_strip_extend.
25267         (aarch64_rtx_costs): Update calls to aarch64_strip_extend.
25269 2017-06-21  Andrew Pinski  <apinski@cavium.com>
25271         * config/aarch64/aarch64-cores.def (thunderxt88p1): Use thunderxt88
25272         tunings.
25273         (thunderxt88): Likewise.
25274         * config/aarch64/aarch64.c (thunderxt88_prefetch_tune): New variable.
25275         (thunderx_prefetch_tune): New variable.
25276         (thunderx2t99_prefetch_tune): Update for the correct values.
25277         (thunderxt88_tunings): New variable.
25278         (thunderx_tunings): Use thunderx_prefetch_tune instead of
25279         generic_prefetch_tune.
25280         (thunderx2t99_tunings): Use AUTOPREFETCHER_WEAK.
25282 2017-06-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25284         * config/aarch64/atomics.md (aarch64_compare_and_swap<mode>_lse,
25285         SHORT): Relax operand 3 to aarch64_reg_or_zero and constraint to Z.
25286         (aarch64_compare_and_swap<mode>_lse, GPI): Likewise.
25287         (aarch64_atomic_cas<mode>, SHORT): Likewise for operand 2.
25288         (aarch64_atomic_cas<mode>, GPI): Likewise.
25290 2017-06-21  Martin Liska  <mliska@suse.cz>
25292         * gimplify.c (gimplify_label_expr): Insert GIMPLE_PREDICT
25293         statements on cold and hot labels.
25294         * predict.c (tree_estimate_probability_bb): Remove the
25295         prediction from this place.
25297 2017-06-21  Martin Liska  <mliska@suse.cz>
25299         PR tree-optimization/79489
25300         * gimplify.c (maybe_add_early_return_predict_stmt): New
25301         function.
25302         (gimplify_return_expr): Call the function.
25303         * predict.c (tree_estimate_probability_bb): Remove handling
25304         of early return.
25305         * predict.def: Update comment about early return predictor.
25306         * gimple-predict.h (is_gimple_predict): New function.
25307         * predict.def: Change default value of early return to 66.
25308         * tree-tailcall.c (find_tail_calls): Skip GIMPLE_PREDICT
25309         statements.
25310         * passes.def: Put pass_strip_predict_hints to the beginning of
25311         IPA passes.
25313 2017-06-21  Pierre-Marie de Rodat  <derodat@adacore.com>
25315         * dwarf2out.c (gen_decl_die): Remove the guard to skip file-scope
25316         FUNCTION_DECL declarations.
25317         (dwarf2out_early_global_decl): Remove the guard to skip FUNCTION_DECL
25318         declarations.
25319         (dwaf2out_decl): Likewise.
25320         * godump.c (go_early_global_decl): Skip call to the real debug hook
25321         for FUNCTION_DECL declarations.
25322         * passes.c (rest_of_decl_compilation): Skip call to the
25323         early_global_decl debug hook for FUNCTION_DECL declarations, unless
25324         -fdump-go-spec is passed.
25326 2017-06-21  Marc Glisse  <marc.glisse@inria.fr>
25328         * config/i386/i386.c (struct builtin_isa): New field pure_p.
25329         Reorder for compactness.
25330         (def_builtin, def_builtin2, ix86_add_new_builtins): Handle pure_p.
25331         (def_builtin_pure, def_builtin_pure2): New functions.
25332         (ix86_init_mmx_sse_builtins) [__builtin_ia32_stmxcsr]: Mark as pure.
25334 2017-06-21  Marc Glisse  <marc.glisse@inria.fr>
25336         * match.pd (nop_convert): New predicate.
25337         ((A +- CST1) +- CST2): Allow some NOP conversions.
25339 2017-06-21  Jakub Jelinek  <jakub@redhat.com>
25341         PR c++/81130
25342         * gimplify.c (omp_add_variable): Don't force GOVD_SEEN for types
25343         with ctors/dtors if GOVD_SHARED is set.
25345 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
25347         * config/aarch64/aarch64.md (movti_aarch64):
25348         Emit mov rather than orr.
25349         (movtf_aarch64): Likewise.
25350         * config/aarch64/aarch64-simd.md (aarch64_simd_mov):
25351         Emit mov rather than orr.
25353 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
25355         * config/aarch64/aarch64-simd.md (aarch64_simd_dup):
25356         Swap alternatives, make integer dup more expensive.
25358 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
25360         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
25361         Return true for non-tls symbols.
25363 2017-06-21  James Greenhalgh  <james.greenhalgh@arm.com>
25365         * config/aarch64/aarch64-cores.def (cortex-a55): New.
25366         (cortex-a75): Likewise.
25367         (cortex-a75.cortex-a55): Likewise.
25368         * config/aarch64/aarch64-tune.md: Regenerate.
25369         * doc/invoke.texi (-mtune): Document new values for -mtune.
25371 2017-06-21  Tom de Vries  <tom@codesourcery.com>
25373         * doc/sourcebuild.texi (Add Options, Features for dg-add-options): Add
25374         stack_size feature.
25375         (Effective-Target Keywords, Other attributes): Suggest using
25376         dg-add-options stack_size feature to get stack limit in stack_size
25377         effective target documentation.
25379 2017-06-21  Julian Brown  <julian@codesourcery.com>
25380             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
25382         * config/aarch64/aarch64-simd.md (aarch64_crypto_pmulldi)
25383         (aarch64_crypto_pmullv2di): Change type attribute to crypto_pmull.
25384         * config/aarch64/thunderx2t99.md (thunderx2t99_pmull): New
25385         reservation.
25386         * config/arm/cortex-a53.md (cortex_a53_advsimd_type): Add crypto_pmull to
25387         attribute type list for neon_multiply.
25388         * config/arm/cortex-a57.md (cortex_a57_neon_type): Add crypto_pmull to
25389         attribute type list for neon_multiply.
25390         * config/arm/crypto.md (crypto_vmullp64): Change type to crypto_pmull.
25391         * config/arm/exynos-m1.md (exynos_m1_neon_type): Add crypto_pmull to
25392         attribute type list for neon_multiply.
25393         * config/arm/types.md (crypto_pmull): Add.
25394         * config/arm/xgene1.md (xgene1_neon_pmull): Add crypto_pmull to
25395         attribute type list.
25397 2017-06-20  Andreas Tobler  <andreast@gcc.gnu.org>
25399         * config.gcc (armv6*-*-freebsd*): Change the target_cpu_cname to
25400         arm1176jzf-s.
25402 2017-06-20  Jakub Jelinek  <jakub@redhat.com>
25404         * ira-costs.c (find_costs_and_classes): Initialize cost_classes later
25405         to make sure not to dereference a NULL cost_classes_ptr pointer.
25407 2017-06-20  Carl Love  <cel@us.ibm.com>
25409         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
25410         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
25411         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
25412         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
25413         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
25414         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
25415         VMULOSW): New enum "unspec" values.
25416         (vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
25417         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
25418         altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
25419         altivec_vmulosw): New patterns.
25420         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
25421         VMULOSW): Add definitions.
25423 2017-06-20  Julia Koval  <julia.koval@intel.com>
25425         * config/i386/i386.c: Fix rounding expand for new pattern.
25426         * config/i386/subst.md: Fix pattern (parallel -> unspec).
25428 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
25430         * config/aarch64/aarch64-option-extensions.def (rcpc): New.
25431         * config/aarch64/aarch64.h (AARCH64_FL_RCPC): New.
25433 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
25435         * config/aarch64/aarch64-option-extensions.def (fp16): Fix expected
25436         feature string.
25438 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
25440         * config/aarch64/aarch64-cores.def: Rearrange to sort by
25441         architecture, then by implementer ID.
25442         * config/aarch64/aarch64-tune.md: Regenerate.
25444 2017-06-20  Richard Biener  <rguenther@suse.de>
25446         PR middle-end/81097
25447         * fold-const.c (split_tree): Fold to type before negating.
25449 2017-06-20  David Malcolm  <dmalcolm@redhat.com>
25451         * diagnostic-show-locus.c
25452         (selftest::test_fixit_deletion_affecting_newline): New function.
25453         (selftest::diagnostic_show_locus_c_tests): Call it.
25455 2017-06-20  Andreas Schwab  <schwab@suse.de>
25457         PR target/80970
25458         * config/m68k/m68k.md (bsetdreg, bchgdreg, bclrdreg): Use "=d"
25459         instead of "+d".
25461 2017-06-20  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
25463         * config/arm/arm-c.c (arm_cpu_builtins): New block to define
25464         __ARM_FEATURE_COPROC according to support.
25466 2017-06-20  Jakub Jelinek  <jakub@redhat.com>
25468         * tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
25469         Rewritten to avoid overflow for > 32-bit pointers.
25471         PR sanitizer/81125
25472         * ubsan.h (ubsan_encode_value): Workaround buggy clang++ parser
25473         by removing enum keyword.
25474         (ubsan_type_descriptor): Likewise.  Formatting fix.
25476         PR target/81121
25477         * config/i386/i386.md (TARGET_USE_VECTOR_CONVERTS float si->{sf,df}
25478         splitter): Require TARGET_SSE2 in the condition.
25480 2017-06-20  Michael Meissner  <meissner@linux.vnet.ibm.com>
25482         PR target/79799
25483         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Add support
25484         for doing vector set of SFmode on ISA 3.0.
25485         * config/rs6000/vsx.md (vsx_set_v4sf_p9): Likewise.
25486         (vsx_set_v4sf_p9_zero): Special case setting 0.0f to a V4SF
25487         element.
25488         (vsx_insert_extract_v4sf_p9): Add an optimization for inserting a
25489         SFmode value into a V4SF variable that was extracted from another
25490         V4SF variable without converting the element to double precision
25491         and back to single precision vector format.
25492         (vsx_insert_extract_v4sf_p9_2): Likewise.
25494 2017-06-19  Jakub Jelinek  <jakub@redhat.com>
25496         * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Multiply
25497         in UWHI to avoid undefined overflow.
25499         PR sanitizer/81125
25500         * ubsan.h (enum ubsan_encode_value_phase): New.
25501         (ubsan_encode_value): Change second argument to
25502         enum ubsan_encode_value_phase with default value of
25503         UBSAN_ENCODE_VALUE_GENERIC.
25504         * ubsan.c (ubsan_encode_value): Change second argument to
25505         enum ubsan_encode_value_phase PHASE from bool IN_EXPAND_P,
25506         adjust uses, for UBSAN_ENCODE_VALUE_GENERIC use just
25507         create_tmp_var_raw instead of create_tmp_var and use a
25508         TARGET_EXPR.
25509         (ubsan_expand_bounds_ifn, ubsan_build_overflow_builtin,
25510         instrument_bool_enum_load, ubsan_instrument_float_cast): Adjust
25511         ubsan_encode_value callers.
25513         PR sanitizer/81111
25514         * ubsan.c (ubsan_encode_value): If current_function_decl is NULL,
25515         use create_tmp_var_raw instead of create_tmp_var, mark it addressable
25516         just by setting TREE_ADDRESSABLE on the result and use a TARGET_EXPR.
25518 2017-06-19  Richard Biener  <rguenther@suse.de>
25520         PR middle-end/81118
25521         * tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Clear niter
25522         estimates if we changed anything.
25524 2017-06-19  Richard Biener  <rguenther@suse.de>
25526         PR tree-optimization/80887
25527         * tree-ssa-sccvn.c (mprts_hook_cnt): New global.
25528         (vn_lookup_simplify_result): Allow only mprts_hook_cnt succesful
25529         simplified lookups, then reset mprts_hook.
25530         (vn_nary_build_or_lookup_1): Set mprts_hook_cnt to 9 before
25531         simplifying.
25532         (try_to_simplify): Likewise.
25534 2017-06-19  Martin Liska  <mliska@suse.cz>
25536         PR sanitizer/80879
25537         * gimplify.c (gimplify_switch_expr):
25538         Initialize live_switch_vars for SWITCH_BODY == STATEMENT_LIST.
25540 2017-06-19  Martin Liska  <mliska@suse.cz>
25542         * doc/install.texi: Document that PGO runs in 4 stages.
25544 2017-06-19  Martin Liska  <mliska@suse.cz>
25546         PR ipa/80732
25547         * attribs.c (make_dispatcher_decl): Do not append '.ifunc'
25548         to dispatcher function name.
25549         * multiple_target.c (replace_function_decl): New function.
25550         (create_dispatcher_calls): Redirect both edges and references.
25552 2017-06-19  Jan Hubicka <hubicka@ucw.cz>
25554         * profile-count.c (profile_count::dump): Dump quality.
25555         (profile_count::differs_from_p): Update for unsigned val.
25556         * profile-count.h (profile_count_quality): New enum.
25557         (profile_count): Turn m_val to 62bit unsigned, add quality tracking.
25559 2017-06-19  Richard Biener  <rguenther@suse.de>
25561         * tree-ssa-loop-niter.h (estimate_numbers_of_iterations): Take
25562         struct function as arg.
25563         (estimate_numbers_of_iterations): Export overload with loop arg.
25564         (free_numbers_of_iterations_estimates_loop): Use an overload of
25565         free_numbers_of_iterations_estimates instead.
25566         * tree-cfg.c (remove_bb): Adjust.
25567         * tree-cfgcleanup.c (remove_forwarder_block_with_phi): Likewise.
25568         * tree-parloops.c (gen_parallel_loop): Likewise.
25569         * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables):
25570         Likewise.
25571         (tree_unroll_loops_completely): Likewise.
25572         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop):
25573         Use an overload instead and export.
25574         (estimated_loop_iterations): Adjust.
25575         (max_loop_iterations): Likewise.
25576         (likely_max_loop_iterations): Likewise.
25577         (estimate_numbers_of_iterations): Take struct function as arg
25578         and adjust.
25579         (loop_exits_before_overflow): Adjust.
25580         (free_numbers_of_iterations_estimates_loop): Use an overload.
25581         * tree-vect-loop.c (vect_analyze_loop_form): Adjust.
25582         * tree-vectorizer.c (vect_free_loop_info_assumptions): Likewise.
25584 2017-06-19  Richard Biener  <rguenther@suse.de>
25586         PR ipa/81112
25587         * ipa-prop.c (find_constructor_constant_at_offset): Handle
25588         RANGE_EXPR conservatively.
25590 2017-06-16  Carl Love  <cel@us.ibm.com>
25592         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
25593         definitions for vec_float, vec_float2, vec_floato,
25594         vec_floate built-ins.
25595         * config/rs6000/vsx.md (define_c_enum "unspec"): Add RTL code
25596         for instructions vsx_xvcvsxws vsx_xvcvuxwsp, float2, floato and
25597         floate.
25598         * config/rs6000/rs6000-builtin.def (FLOAT2_V2DI, FLOATE_V2DF,
25599         FLOATE_2DI, FLOATO_V2DF, FLOATEE_V2DI, XVCVSXWSP_V4SF,
25600         UNS_FLOATO_V2DI, UNS_FLOATE_V2DI): Add definitions.
25601         * config/altivec.md (define_insn "p8_vmrgew_<mode>",
25602         define_mode_attr VF_sxddp): Add V4SF type to p8_vmrgew.
25603         * config/rs6000/altivec.h (vec_float, vec_float2, vec_floate,
25604         vec_floato): Add builtin defines.
25605         * doc/extend.texi (vec_float, vec_float2, vec_floate, vec_floato):
25606         Update the built-in documentation file for the new built-in
25607         functions.
25609 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25611         * config/arm/arm.opt (marm): Mark as the negative of of -mthumb.
25612         (mthumb): Mark as the negative of -marm.
25614 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25616         * doc/invoke.texi (ARM Options, -mcpu): Document supported
25617         extension options.
25618         (ARM Options, -mtune): Document that this accepts the same
25619         extension options as -mcpu.
25620         (ARM Options, -mfpu): Document addition of -mfpu=auto.
25622 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25624         * doc/invoke.texi (ARM Options, -march=): Document new syntax and
25625         permitted extensions.
25627 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25629         * config/arm/arm-cpus.in (armv7): Add extension +nofp.
25630         (armv7-r): Add aliases vfpv3xd and vfpv3-d16.
25631         (armv8-m.main): Add option +nodsp.
25632         * config/arm/arm-cpu-cdata.h: Regenerated.
25634 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25636         * config/arm/t-fuchsia: New file.
25637         * config.gcc (arm*-*-fuchsia*): Use it.
25639 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25641         * config/arm/t-symbian: Rewrite for new option infrastructure.
25643 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25645         * config/arm/t-phoenix (MULTILIB_REUSE): Clear variable.
25646         (MULTILIB_REQUIRED): Likewise.
25648 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25650         * config/arm/t-linux-eabi (MULTILIB_EXCEPTIONS): Set to empty.
25651         (MULTILIB_RESUE): Likewise.
25652         (MULTILIB_MATCHES): Likewise.
25653         (MULTLIB_REQUIRED): Likewise.
25655 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25657         * config/arm/t-rtems: Rewrite for new option framework.
25659 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25661         * config/arm/t-aprofile (v7_a_nosimd_variants, v7_a_simd_variants)
25662         (v7ve_nosimd_variatns, v7ve_vfpv3_simd_variants)
25663         (v7ve_vfpv4_simd_variants, v8_a_nosimd_variants, v8_a_simd_variants)
25664         (v8_1_a_simd_variants, v8_2_a_simd_variants): Move to ...
25665         * config/arm/t-multilib: ... here.
25666         (MULTILIB_OPTIONS): Add armv7 and armv7+fp architectures.
25667         (MULTILIB_MATCHES): Use armv7 libraries for armv7-r.  Also use for
25668         armv7-a and armv8*-a when A-profile libraries have not been built.
25669         * config/arm/t-rmprofile: Rewrite.
25671 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25673         * genmultilib (multilib_reuse): Allow an explicit period to be escaped
25674         with a backslash.  Remove the backslash after substituting unescaped
25675         periods.
25676         * doc/fragments.texi (MULTILIB_REUSE): Document it.
25678 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25680         * config.gcc: (arm*-*-*): When building a-profile libraries, force
25681         the driver to pass through the default setting of -mfloat-abi.
25682         * common/config/arm/arm-common.c (arm_target_thumb_only): Return -marm
25683         rather than NULL.
25684         * config/arm/t-multilib (MULTILIB_REUSE): Initialize to empty.
25685         (all_feat_combs): New rule.
25686         (MULTILIB_OPTIONS): Use explicit ARM and Thumb directories.  Rework
25687         default libraries.
25688         * config/arm/t-aprofile: Rewrite.
25690 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25692         * config/arm/arm.h (FPUTYPE_AUTO): Define.
25693         * config/arm/arm.c (arm_option_override): Use FPUTYPE_AUTO if the
25694         fpu is not specified by the user/command-line.
25695         * config/arm/bpabi.h (FPUTYPE_DEFAULT): Delete.
25696         * config/arm/netbsd-elf.h (FPUTYPE_DEFAULT): Delete.
25697         * config/arm/linux-elf.h (FPUTYPE_DEFAULT): Delete.
25698         * config/arm/vxworks.h (FPUTYPE_DEFAULT): Delete.
25699         * common/config/arm/arm-common.c (arm_canon_arch_option): Use
25700         FPUTYPE_AUTO insted of FPUTYPE_DEFAULT.
25702 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25704         * config/arm/elf.h (MULTILIB_DEFAULTS): Delete.
25705         * config/arm/t-arm-elf: Rewritten.
25707 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25709         * config/arm/arm.h (TARGET_HARD_FLOAT): Also check that we
25710         have some floating-point instructions.
25711         (TARGET_SOFT_FLOAT): Define as inverse of TARGET_HARD_FLOAT.
25712         (TARGET_MAYBE_HARD_FLOAT): New macro.
25713         * config/arm/arm-builtins.c (arm_init_builtins): Use
25714         TARGET_MAYBE_HARD_FLOAT.
25715         * config/arm/arm.c (arm_option_override): Use TARGET_HARD_FLOAT_ABI.
25717 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25719         * common/config/arm/arm-common.c: Define INCLUDE_LIST.
25720         (configargs.h): Include it.
25721         (arm_print_hint_for_fpu_option): New function.
25722         (arm_parse_fpu_option): New function.
25723         (candidate_extension): New class.
25724         (arm_canon_for_multilib): New function.
25725         * config/arm/arm.h (CANON_ARCH_SPEC_FUNCTION): New macro.
25726         (EXTRA_SPEC_FUNCTIONS): Add CANON_ARCH_SPEC_FUNCTION.
25727         (ARCH_CANONICAL_SPECS): New macro.
25728         (DRIVER_SELF_SPECS): Add ARCH_CANONICAL_SPECS.
25730 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25732         * config.gcc (arm*-*-*): Ensure both target_cpu_cname and with_cpu
25733         are set after handling multilib fragments.  Set target_cpu_default2
25734         from with_cpu.
25736 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25738         * config.gcc (arm*-*-fucshia*): Set target_cpu_cname to the real
25739         cpu name.
25740         (arm*-*-*): Set target_cpu_default2 to a quoted string.
25741         * config/arm/parsecpu.awk (check_cpu): Validate any extension
25742         options.
25743         (check_arch): Likewise.
25744         * config/arm/arm.c (arm_configure_build_target): Handle
25745         TARGET_CPU_DEFAULT being a string constant.  Scan any feature
25746         options in the default.
25748 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25750         * config/arm/arm-protos.h (cpu_arch_extension): Add field to record
25751         when an option is an alias of another.
25752         * config/arm/parsecpu.awk (optalias): New parser token.
25753         (gen_comm_data): Mark non-alias options as such.  Emit entries
25754         for extension aliases.
25755         * config/arm/arm-cpus.in (armv5e): Make vfpv2 an alias.
25756         (armv5te, armv5tej, armv6, armv6j, armv6k, armv6z): Likewise.
25757         (armv6kz, armv6zk, armv6t2): Likewise.
25758         (armv7): Make vfpv3-d16 an alias.
25759         (armv7-a): Make vfpv3-d16, neon and neon-vfpv3 aliases.  Sort in
25760         canonical order.
25761         (armv7ve): Make vfpv4-d16, neon-vfpv3 and neon-vfpv4 aliases.
25762         Sort in canonical order.
25763         (armv8-a): Sort in canonical order.
25764         (armv8.1-a, armv8.2-a):  Likewise.
25765         (generic-armv7-a): Make neon and neon-vfpv3 aliases.  Sort in
25766         canonical order.
25767         (cortex-a9): Sort in canonical order.
25768         * config/arm/arm.c (selftests.h): Include it.
25769         (arm_test_cpu_arch_data): New function.
25770         (arm_run_self_tests): New function.
25771         (TARGET_RUN_TARGET_SELFTESTS): Redefine.
25772         (targetm): Move declaration to the end of the file.
25773         * arm-cpu-cdata.h: Regenerated.
25775 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25777         * config/arm/arm.h (TARGET_MODE_SPECS): Add additional parameter to
25778         call to target_mode_check describing the type of option passed.
25779         * common/config/arm/arm-common.c (arm_arch_core_flag): Delete.
25780         (arm_target_thumb_only): Use arm_parse_arch_option_name or
25781         arm_parse_cpu_option_name to match parameters against list of
25782         available targets.
25783         * config/arm/parsecpu.awk (gen_comm_data): Don't generate
25784         arm_arch_core_flags data structure.
25785         * config/arm/arm-cpu_cdata.h: Regenerated.
25787 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25789         * common/config/arm/arm-common.c (arm_initialize_isa): Moved here from
25790         config/arm/arm.c.
25791         (arm_print_hint_for_cpu_option): Likewise.
25792         (arm_print_hint_for_arch_option): Likewise.
25793         (arm_parse_cpu_option_name): Likewise.
25794         (arm_parse_arch_option_name): Likewise.
25795         * config/arm/arm.c (arm_identify_fpu_from_isa): Use the computed number
25796         of entries in the all_fpus list.
25797         * config/arm/arm-protos.h (all_architectures, all_cores): Declare.
25798         (arm_parse_cpu_option_name): Declare.
25799         (arm_parse_arch_option_name): Declare.
25800         (arm_parse_option_features): Declare.
25801         (arm_intialize_isa): Declare.
25802         * config/arm/parsecpu.awk (gen_data): Move CPU and architecture
25803         data tables to ...
25804         (gen_comm_data): ... here.  Make definitions non-static.
25805         * config/arm/arm-cpu-data.h: Regenerated.
25806         * config/arm/arm-cpu-cdata.h: Regenerated.
25808 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25810         * config/arm/arm-protos.h (arm_build_target): Remove arch_core.
25811         (cpu_arch_extension): New structure.
25812         (cpu_arch_option, arch_option, cpu_option): New structures.
25813         * config/arm/parsecpu.awk (gen_headers): Build an enumeration of
25814         architecture types.
25815         (gen_data): Generate new format data tables.
25816         * config/arm/arm.c (cpu_tune): New structure.
25817         (cpu_option, processors): Delete.
25818         (arm_print_hint_for_core_or_arch): Delete.  Replace with ...
25819         (arm_print_hint_for_cpu_option): ... this and ...
25820         (arm_print_hint_for_arch_option): ... this.
25821         (arm_parse_arch_cpu_name): Delete.  Replace with ...
25822         (arm_parse_cpu_option_name): ... this and ...
25823         (arm_parse_arch_option_name): ... this.
25824         (arm_unrecognized_feature): Change type of target parameter to
25825         cpu_arch_option.
25826         (arm_parse_arch_cpu_features): Delete.  Replace with ...
25827         (arm_parse_option_features): ... this.
25828         (arm_configure_build_target): Rework to use new configuration data
25829         tables.
25830         (arm_print_tune_info): Rework for new configuration data tables.
25831         * config/arm/arm-cpu-data.h: Regenerated.
25832         * config/arm/arm-cpu.h: Regenerated.
25834 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25836         * Makefile.in (OBJS): Move sbitmap.o from here ...
25837         (OBJS-libcommon): ... to here.
25839 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25841         * config/arm/arm-isa.h (ISA_ALL_FPU_INTERNAL): Renamed from ISA_ALL_FPU.
25842         (ISA_ALL_CRYPTO): New macro.
25843         (ISA_ALL_SIMD): New macro
25844         (ISA_ALL_FP): New macro.
25845         * config/arm/arm.c (fpu_bitlist): Update initializer.
25846         * config/arm/arm-cpus.in: Use new ISA_ALL macros to disable crypto,
25847         simd or fp.
25848         (arm9e): Add fpu.  Add option for nofp
25849         (arm946e-s, arm966e-s, arm968e-s, arm10e, arm1020e, arm1022e): Likewise.
25850         (arm926ej-s, arm1026ej-s): Likewise.
25851         (generic-armv7-a): Add fpu.  Add options for simd, vfpv3, vfpv3-d16,
25852         vfpv3-fp16, vfpv3-d16-fp16, vfpv4, vfpv4-d16, neon, neon-vfp3,
25853         neon-fp16, neon-vfpv4, nofp and nosimd.
25854         (cortex-a5, cortex-a7): Add fpu.  Add options for nosimd and nofp.
25855         (cortex-a8): Add fpu.  Add option for nofp.
25856         (cortex-a9): Add fpu.  Add options for nosimd and nofp.
25857         (cortex-a12, cortex-a15, cortex-a17): Add fpu.  Add option for nofp.
25858         (cortex-r4f): Add fpu.
25859         (cortex-r5): Add fpu.  Add options for nofp.dp and nofp.
25860         (cortex-r7): Use idiv option from architecture.  Add fpu.  Add option
25861         for nofp.
25862         (cortex-r8): Likewise.
25863         (cortex-m4): Add fpu.  Add option for nofp.
25864         (cortex-a15.cortex-a7): Add fpu.  Add option for nofp.
25865         (cortex-a17.cortex-a7): Likewise.
25866         (cortex-a32): Add fpu.  Add options for crypto and nofp.
25867         (cortex-a35, cortex-a53): Likewise.
25868         (cortex-a57): Add fpu.  Add option for crypto.
25869         (cortex-a72, cortex-a73): Likewise.
25870         (exynos-m1): Likewise.
25871         (cortex-a57.cortex-a53, cortex-a72.cortex-a53): Likewise.
25872         (cortex-a73.cortex-a35, cortex-a73.cortex-a53): Likewise.
25873         (cortex-m33): Add fpu.  Add option for nofp.
25874         * config/arm/arm-cpu-cdata.h: Regenerated
25875         * config/arm/arm-cpu-data.h: Regenerated.
25877 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25879         * arm-cpus.in (armv5e): Add options fp, vfpv2 and nofp.
25880         (armv5te, armv5tej): Likewise.
25881         (armv6, armv6j, armv6k, armv6z, armv6kz, armv6zk, armv6t2): Likewise.
25882         (armv7): Add options fp and vfpv3-d16.
25883         (armv7-a): Add options fp, simd, vfpv3, vfpv3-d16, vfpv3-d16-fp16,
25884         vfpv3-fp16, vfpv4, vfpv4-d16, neon, neon-vfpv3, neon-fp16, neon-vfpv4,
25885         nofp and nosimd.
25886         (armv7ve): Likewise.
25887         (armv7-r): Add options fp, fp.sp, idiv, nofp and noidiv.
25888         (armv7e-m): Add options fp, fpv5, fp.dp and nofp.
25889         (armv8-a): Add nocrypto option.
25890         (armv8.1-a, armv8.2-a): Likewise.
25891         (armv8-m.main): add options fp, fp.dp and nofp.
25893 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25895         * config/arm/arm-cpus.in (armv8-a): Add options crc, simd crypto and
25896         nofp.
25897         (armv8-a+crc): Delete.
25898         (armv8.1-a): Add options simd, crypto and nofp.
25899         (armv8.2-a): Add options fp16, simd, crypto and nofp.
25900         (armv8.2-a+fp16): Delete.
25901         (armv8-m.main): Add option dsp.
25902         (armv8-m.main+dsp): Delete.
25903         (cortex-a8): Add fpu.  Add nofp option.
25904         (cortex-a9): Add fpu.  Add nofp and nosimd options.
25905         * config/arm/parsecpu.awk (gen_data): Generate option tables and
25906         link to main cpu and architecture data structures.
25907         (gen_comm_data): Only put isa attributes from the main architecture
25908         in common tables.
25909         (option): New statement for architecture and CPU entries.
25910         * arm.c (struct cpu_option): New structure.
25911         (struct processors): Add entry for options.
25912         (arm_unrecognized_feature): New function.
25913         (arm_parse_arch_cpu_name): Ignore any characters after the first
25914         '+' character.
25915         (arm_parse_arch_cpu_feature): New function.
25916         (arm_configure_build_target): Separate out any CPU and architecture
25917         features and parse separately.  Don't error out if -mfpu=auto is
25918         used with only an architecture string.
25919         (arm_print_asm_arch_directives): New function.
25920         (arm_file_start): Call it.
25921         * config/arm/arm-cpu-cdata.h: Regenerated.
25922         * config/arm/arm-cpu-data.h: Likewise.
25923         * config/arm/arm-tables.opt: Likewise.
25925 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25927         * config/arm/elf.h (ASM_SPEC): Only pass -mfpu through to the
25928         assembler when it is not -mfpu=auto.
25930 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25932         * config/arm/arm.h (BIG_LITTLE_SPEC): Delete macro.
25933         (ASM_REWRITE_SPEC_FUNCTIONS): New macro.
25934         (BIG_LITTLE_CPU_SPEC_FUNCTIONS): Delete macro.
25935         (ASM_CPU_SPEC): Rewrite.
25936         (MCPU_MTUNE_NATIVE_FUNCTIONS): New macro.
25937         (EXTRA_SPEC_FUNCTIONS): Move outside of ifdef.  Use
25938         MCPU_MTUNE_NATIVE_FUNCTIONS and ASM_REWRITE_SPEC_FUNCTIONS.  Remove
25939         reference to BIG_LITTLE_CPU_SPEC_FUNCTIONS.
25940         * common/config/arm/arm-common.c (arm_rewrite_selected_cpu): Ensure
25941         copied string is NUL-terminated.  Also strip any characters prefixed
25942         by '+'.
25943         (arm_rewrite_selected_arch): New function.
25944         (arm_rewrite_march): New function.
25946 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
25948         * config/arm/arm.opt (x_arm_arch_string): New TargetSave option.
25949         (x_arm_cpu_string, x_arm_tune_string): Likewise.
25950         (march, mcpu, mtune): Convert to string-based options.
25951         * config/arm/arm.c (arm_print_hint_for_core_or_arch): New function.
25952         (arm_parse_arch_cpu_name): New function.
25953         (arm_configure_build_target): Use arm_parse_arch_cpu_name to
25954         identify selected architecture or CPU.
25955         (arm_option_save): New function.
25956         (TARGET_OPTION_SAVE): Redefine.
25957         (arm_option_restore): Restore string options.
25958         (arm_option_print): Print string options.
25960 2017-06-16  Martin Sebor  <msebor@redhat.com>
25962         PR tree-optimization/80933
25963         PR tree-optimization/80934
25964         * builtins.c (fold_builtin_3): Do not handle bcmp here.
25965         * gimple-fold.c (gimple_fold_builtin_bcmp): New function.
25966         (gimple_fold_builtin_bcopy, gimple_fold_builtin_bzero): Likewise.
25967         (gimple_fold_builtin): Call them.
25969 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
25971         * gimple-ssa-isolate-paths.c (isolate_path): Set edge leading to path
25972         as unlikely; update profile.
25974 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
25976         * predict.c (force_edge_cold): Handle declaring edges impossible
25977         more aggresively.
25979 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
25981         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update
25982         profile.
25983         (try_unroll_loop_completely): Fix reporting.
25985 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
25987         * tree-ssa-tail-merge.c (replace_block_by): Fix profile updating.
25989 2017-06-16  James Greenhalgh  <james.greenhalgh@arm.com>
25991         PR target/71778
25992         * config/arm/arm-builtins.c (arm_expand_builtin_args): Return TARGET
25993         if given a non-constant argument for an intrinsic which requires a
25994         constant.
25996 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
25998         * profile.c (compare_freqs): New function.
25999         (branch_prob): Sort edge list.
26000         (find_spanning_tree): Assume that the list is priority sorted.
26002 2017-06-16  Richard Biener  <rguenther@suse.de>
26004         PR tree-optimization/81090
26005         * passes.def (pass_record_bounds): Remove.
26006         * tree-pass.h (make_pass_record_bounds): Likewise.
26007         * tree-ssa-loop.c (pass_data_record_bounds, pass_record_bounds,
26008         make_pass_record_bounds): Likewise.
26009         * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables): Do
26010         not free niter estimates at the beginning but at the end.
26011         * tree-scalar-evolution.c (scev_finalize): Free niter estimates.
26013 2017-06-16  Richard Biener  <rguenther@suse.de>
26015         * tree-switch-conversion.c (emit_case_bit_tests): Adjust
26016         initializer to workaround ICE in host GCC 4.8.
26018 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
26020         * ipa-inline-transform.c (update_noncloned_frequencies): Update also
26021         counts.
26022         (clone_inlined_nodes): Update.
26024 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
26026         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune): Update
26027         prefetch settings, and enable prefetching by default at -O3.
26029 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
26031         * config/aarch64/aarch64.c (aarch64_override_options_internal):
26032         Set flag_prefetch_loop_arrays according to tuning data.
26034 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
26036         * config/aarch64/aarch64-protos.h (struct cpu_prefetch_tune):
26037         New tune structure.
26038         (struct tune_params): Use cpu_prefetch_tune instead of cache_line_size.
26039         [Unrelated to main purpose of the patch] Place the pointer field last
26040         to enable type checking errors when tune structure are wrongly merged.
26041         * config/aarch64/aarch64.c (generic_prefetch_tune,)
26042         (exynosm1_prefetch_tune, qdf24xx_prefetch_tune,)
26043         (thunderx2t99_prefetch_tune): New tune constants.
26044         (tune_params *_tunings): Update all tunings (no functional change).
26045         (aarch64_override_options_internal): Set PARAM_SIMULTANEOUS_PREFETCHES,
26046         PARAM_L1_CACHE_SIZE, PARAM_L1_CACHE_LINE_SIZE, and PARAM_L2_CACHE_SIZE
26047         from tunings structures.
26049 2017-06-16  Jakub Jelinek  <jakub@redhat.com>
26051         PR sanitizer/81094
26052         * ubsan.c (instrument_null): Add T argument, use it instead
26053         of computing it based on IS_LHS.
26054         (instrument_object_size): Likewise.
26055         (pass_ubsan::execute): Adjust instrument_null and
26056         instrument_object_size callers to pass gimple_get_lhs or
26057         gimple_assign_rhs1 result to it.  Use instrument_null instead of
26058         calling get_base_address and instrument_mem_ref.  Handle
26059         aggregate call arguments for object-size sanitization.
26061 2017-06-16  Yury Gribov  <tetra2005@gmail.com>
26063         PR tree-optimization/81089
26064         * tree-vrp.c (is_masked_range_test): Validate operands of
26065         subexpression.
26067 2017-06-15  Martin Sebor  <msebor@redhat.com>
26069         PR c++/80560
26070         * dumpfile.c (dump_register): Avoid calling memset to initialize
26071         a class with a default ctor.
26072         * gcc.c (struct compiler): Remove const qualification.
26073         * genattrtab.c (gen_insn_reserv): Replace memset with initialization.
26074         * hash-table.h: Ditto.
26075         * ipa-cp.c (allocate_and_init_ipcp_value): Replace memset with
26076           assignment.
26077         * ipa-prop.c (ipa_free_edge_args_substructures): Ditto.
26078         * omp-low.c (lower_omp_ordered_clauses): Replace memset with
26079         default ctor.
26080         * params.h (struct param_info): Make struct members non-const.
26081         * tree-switch-conversion.c (emit_case_bit_tests): Replace memset
26082         with default initialization.
26083         * vec.h (vec_copy_construct, vec_default_construct): New helper
26084         functions.
26085         (vec<T>::copy, vec<T>::splice, vec<T>::reserve): Replace memcpy
26086         with vec_copy_construct.
26087         (vect<T>::quick_grow_cleared): Replace memset with default ctor.
26088         (vect<T>::vec_safe_grow_cleared, vec_safe_grow_cleared): Same.
26089         * doc/invoke.texi (-Wclass-memaccess): Document.
26091 2017-06-15  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
26093         * emit-rtl.h (is_leaf): Update comment about local
26094         register allocator.
26096 2017-06-15  Jozef Lawrynowicz   <jozef.l@somniumtech.com>
26098         PR target/78818
26099         * config/msp430/msp430.c (msp430_data_attr): Check that it's possible
26100         for a variable to have a section before checking if the section has a
26101         name.
26102         Set section to.persistent if persistent attribute is set.
26103         Warn if .persistent attribute is used on an automatic variable.
26105 2017-06-15  Eric Botcazou  <ebotcazou@adacore.com>
26107         PR rtl-optimization/80474
26108         * reorg.c (update_block): Do not ignore instructions in a delay slot.
26110 2017-06-15  Segher Boessenkool  <segher@kernel.crashing.org>
26112         * config/rs6000/rs6000.md (add<mode>3): Use reg_or_subregno instead
26113         of REGNO.
26115 2017-06-14  Maciej W. Rozycki  <macro@imgtec.com>
26117         * config/mips/mips.md (MIPS16_T_REGNUM): Remove constant.
26118         (casesi): Emit bounds checking as RTL.
26119         (casesi_internal_mips16_<mode>): Remove bounds checking.
26121 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
26123         * config/xtensa/xtensa.c (xtensa_option_override): Append
26124         MASK_CONST16 to target_flags in the absence of TARGET_L32R.
26125         (hwloop_optimize, hwloop_fail, hwloop_pattern_reg,
26126          xtensa_doloop_hooks): Define unconditionally.
26127         (xtensa_reorg_loops): Only call reorg_loops in the presence of
26128         TARGET_LOOPS.
26129         * config/xtensa/xtensa.h (TARGET_L32R): New definition.
26130         (TARGET_DEFAULT): Remove XCHAL_HAVE_L32R condition and account
26131         for it in xtensa_option_override.
26132         (HARD_FRAME_POINTER_IS_FRAME_POINTER,
26133          HARD_FRAME_POINTER_IS_ARG_POINTER): New definitions.
26135 2017-06-14  Boris Kolpackov  <boris@codesynthesis.com>
26137         * doc/cppopts.texi: Document '-' special value to -MF.
26139 2017-06-14  Wilco Dijkstra  <wdijkstr@arm.com>
26141         * config/arm/cortex-a53.md (cortex_a53_fpalu) Adjust latency.
26142         (cortex_a53_fconst): Likewise.
26143         (cortex_a53_fpmul): Likewise.
26144         (cortex_a53_f_load_64): Likewise.
26145         (cortex_a53_f_load_many): Likewise.
26146         (cortex_a53_advsimd_alu): Likewise.
26147         (cortex_a53_advsimd_alu_q): Likewise.
26148         (cortex_a53_advsimd_mul): Likewise.
26149         (cortex_a53_advsimd_mul_q): Likewise.
26150         (fpmac bypass): Add new bypass for fpmac-fpmac case.
26151         Add missing fmul, r2f_cvt and fconst cases.
26153 2017-06-14  Richard Biener  <rguenther@suse.de>
26155         PR middle-end/81088
26156         * fold-const.c (split_tree): Drop TREE_OVERFLOW flag from
26157         literal constants.
26158         (fold_binary_loc): When associating do not treat pre-existing
26159         TREE_OVERFLOW on literal constants as a reason to allow
26160         TREE_OVERFLOW on associated literal constants.
26162 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
26164         * config/sparc/sparc.h (MASK_ISA): Add MASK_LEON and MASK_LEON3.
26165         (MASK_FEATURES): New macro.
26166         * config/sparc/sparc.c (sparc_option_override): Remove the special
26167         handling of -mfpu and generalize it to all MASK_FEATURES switches.
26169 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
26171         * simplify-rtx.c (simplify_binary_operation_1) <UDIV>: Do not simplify
26172         a division of 0 if non-call exceptions are enabled.
26174 2017-06-14  Andrew Pinski  <apinski@cavium.com>
26175             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
26177         PR target/71663
26178         * config/aarch64/aarch64.c (aarch64_expand_vector_init):
26179         Improve vector initialization code gen for only variable case.
26181 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
26183         * config/sparc/driver-sparc.c (cpu_names): Add SPARC-T5 entry.
26185 2017-06-14  Richard Biener  <rguenther@suse.de>
26187         PR tree-optimization/81083
26188         * tree-ssa-sccvn.c (vn_reference_lookup_3): Do not use abnormals
26189         as values.
26191 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
26193         * config/rs6000/rs6000.c: Update all comments that mentioned SPE.
26194         (rs6000_expand_builtin): Remove RS6000_BTC_EVSEL.
26195         * config/rs6000/rs6000.h (RS6000_BTC_EVSEL): Delete.
26196         * config/rs6000/vxworks.h (VXCPU_FOR_8548): Delete.  Adjust former use.
26197         * config/rs6000/vxworksae.h (VXCPU_FOR_8548): Delete.
26198         * config/rs6000/vxworksmils.h (VXCPU_FOR_8548): Delete.
26200 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
26202         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete VECTOR_SPE.
26203         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete VECTOR_SPE.
26205 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
26207         * config/rs6000/rs6000.h (FIXED_SCRATCH): Delete.
26209 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
26211         * config/rs6000/t-rtems: Don't handle SPE.
26213 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
26215         * config/rs6000/t-linux: Don't handle SPE.
26217 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
26219         * config/rs6000/eabispe.h: Delete file.
26221 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
26223         * config/rs6000/t-spe: Delete file.
26225 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
26227         * config/rs6000/rs6000.c (SPE_CONST_OFFSET_OK): Delete.
26228         (rs6000_legitimate_offset_address_p): Return false for anything in
26229         V2SImode or V2SFmode.
26231 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
26233         * config/rs6000/rs6000-modes.def: Remove all 8-byte vector modes
26234         except V2SF and V2SI.  Rearrange the vector modes, and add comments.
26235         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove V8QImode
26236         and V4HImode.
26237         (reg_offset_addressing_ok_p): Remove V4HImode and V1DImode.
26238         (rs6000_legitimate_offset_address_p): Ditto.
26239         (rs6000_emit_move): Ditto.
26240         (rs6000_init_builtins): Remove V4HI_type_node.
26242 2017-06-13  Martin Liska  <mliska@suse.cz>
26244         PR sanitize/78204
26245         * asan.c (asan_sanitize_stack_p): Use sanitize_flags_p.
26246         (gate_asan): Likewise.
26247         * asan.h (asan_no_sanitize_address_p): Remove the function.
26248         (sanitize_flags_p): New function.
26249         * builtins.def: Fix coding style.
26250         * common.opt: Use renamed enum value.
26251         * convert.c (convert_to_integer_1): Use sanitize_flags_p.
26252         * doc/extend.texi: Document no_sanitize attribute.
26253         * flag-types.h (enum sanitize_code): Rename SANITIZE_NONDEFAULT
26254         to SANITIZE_UNDEFINED_NONDEFAULT.
26255         * gcc.c (sanitize_spec_function): Use the renamed enum value.
26256         * gimple-fold.c (optimize_atomic_compare_exchange_p):
26257         Use sanitize_flags_p.
26258         * gimplify.c (gimplify_function_tree): Likewise.
26259         * ipa-inline.c (sanitize_attrs_match_for_inline_p): Likewise.
26260         * opts.c (parse_no_sanitize_attribute): New function.
26261         (common_handle_option): Use renamed enum value.
26262         * opts.h (parse_no_sanitize_attribute): Declare.
26263         * tree.c (sanitize_flags_p): New function.
26264         * tree.h: Declared here.
26265         * tsan.c: Use sanitize_flags_p.
26266         * ubsan.c (ubsan_expand_null_ifn): Likewise.
26267         (instrument_mem_ref): Likewise.
26268         (instrument_bool_enum_load): Likewise.
26269         (do_ubsan_in_current_function): Remove the function.
26270         (pass_ubsan::execute): Use sanitize_flags_p.
26271         * ubsan.h: Remove do_ubsan_in_current_function
26272         * tree-cfg.c (print_no_sanitize_attr_value): New function.
26273         (dump_function_to_file): Use it here.
26275 2017-06-13  Martin Jambor  <mjambor@suse.cz>
26277         PR tree-optimization/80803
26278         PR tree-optimization/81063
26279         * tree-sra.c (subtree_mark_written_and_enqueue): Move up in the file.
26280         (propagate_subaccesses_across_link): Enqueue subtree whenever
26281         necessary instead of relying on the caller.
26283 2017-06-13  Martin Jambor  <mjambor@suse.cz>
26285         * tree-sra.c (add_access_to_work_queue): Only enqueue accesses
26286         that have a first_link.
26287         (sort_and_splice_var_accesses): Do not check first_link before
26288         enquing.
26289         (subtree_mark_written_and_enqueue): Likewise.
26290         (propagate_all_subaccesses): Likewise and do not stop at first
26291         parent with a first_link.
26293 2017-06-13  Martin Jambor  <mjambor@suse.cz>
26295         * tree-sra.c (dump_access_tree_1): Fix accidental dumping to stderr
26296         instead of f.
26298 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
26300         * match.pd: New pattern.
26302 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
26304         * tree-vrp.c (is_masked_range_test): New function.
26305         (register_edge_assert_for): Determine ranges for
26306         some bit tests.
26308 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
26310         PR tree-optimization/67328
26311         * fold-const.c (maskable_range_p): New function.
26312         (build_range_check): Generate bittests if possible.
26314 2017-06-13  Martin Liska  <mliska@suse.cz>
26316         * gimple-pretty-print.c (dump_probability): Add new argument.
26317         (dump_edge_probability): Dump both probability and count.
26318         (dump_gimple_label): Likewise.
26319         (dump_gimple_bb_header): Likewise.
26321 2017-06-13  Georg-Johann Lay  <avr@gjlay.de>
26323         PR target/81072
26324         * config/avr/avr-devices.c: Fix indentation.
26325         * config/avr/gen-avr-mmcu-specs.c: Dito.
26327 2017-06-13  Richard Biener  <rguenther@suse.de>
26329         * tree-vect-loop.c (vect_model_reduction_cost): Do not fail,
26330         instead get vector type from stmt_info.
26331         (vectorizable_reduction): Adjust.  Remove dead code.
26333 2017-06-13  Richard Biener  <rguenther@suse.de>
26335         PR middle-end/81065
26336         * fold-const.c (extract_muldiv_1): Remove bogus distribution
26337         case of C * (x * C2 + C3).
26338         (fold_addr_of_array_ref_difference): Properly fold index difference.
26340 2017-06-12  David S. Miller  <davem@davemloft.net>
26342         PR target/80968
26343         * config/sparc/sparc.md (return expander): Emit frame blockage if
26344         function uses alloca.
26346 2017-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
26348         * combine.c (make_field_assignment): Check len rather than the mode
26349         precision when calling force_to_mode.
26351 2017-06-12  Georg-Johann Lay  <avr@gjlay.de>
26353         Support multilibs and devices that see flash in RAM address range.
26355         PR target/81072
26356         * config/avr/avr-arch.h (avr_arch_id) <ARCH_AVRXMEGA3>: New enum.
26357         (avr_mcu_t) <flash_pm_offset>: New field.
26358         (avr_device_specific_features) <AVR_ISA_RCALL>: New enum.
26359         * config/avr/avr.h (AVR_SHORT_CALLS): New define.
26360         (AVR_HAVE_JMP_CALL): Don't set if AVR_SHORT_CALLS.
26361         (AVR_TINY_PM_OFFSET): Remove macro.
26362         * config/avr/avr.opt (-mshort-calls): New option.
26363         * config/avr/gen-avr-mmcu-specs.c (print_mcu)
26364         [*self_spec]: Add / remove -mshort-calls depending on AVR_ISA_RCALL.
26365         * config/avr/avr-c.c (avr_cpu_cpp_builtins)
26366         <__AVR_SHORT_CALLS__>: Built-in define if AVR_SHORT_CALLS.
26367         <__AVR_HAVE_JMP_CALL__>: Use AVR_HAVE_JMP_CALL as condition
26368         instead of avr_arch->have_jmp_call.
26369         <__AVR_PM_BASE_ADDRESS__>: Built-in define if avr_arch->flash_pm_offset.
26370         [AVR_TINY] <__AVR_TINY_PM_BASE_ADDRESS__>: Use
26371         avr_arch->flash_pm_offset to define.
26372         * config/avr/avr-devices.c (avr_arch_types): Add initializers for
26373         new field flash_pm_offset.  Add entry for avrxmega3.
26374         (avr_texinfo): Add entry for avrxmega3.
26375         * config/avr/avr-mcus.def: Add entries for: avrxmega3,
26376         attiny212, attiny214,
26377         attiny412, attiny414, attiny416, attiny417,
26378         attiny814, attiny816, attiny817,
26379         attiny1614, attiny1616, attiny1617,
26380         attiny3214, attiny3216, attiny3217.
26381         * config/avr/avr.c (avr_assemble_integer)[AVR_TINY]: Use
26382         avr_arch->flash_pm_offset instead of AVR_TINY_PM_OFFSET.
26383         (avr_print_operand_address) [AVR_TINY]: Same.
26384         (avr_asm_init_sections) <readonly_data_section>: Only patch
26385         callback if avr_arch->flash_pm_offset = 0.
26386         (avr_asm_named_section) <avr_need_copy_data_p>: Skip setting it
26387         for rodata if avr_arch->flash_pm_offset != 0.
26388         (avr_encode_section_info) [AVR_TINY]: Adjust comment.
26389         * config/avr/genmultilib.awk (dir_rcall, opt_rcall): New vars.
26390         (opts) [AVR_ISA_RCALL]: Append opt_rcall.
26391         (m_options): Append opt_rcall.
26392         (m_dirnames): Append dir_rcall.
26393         * config/avr/t-multilib: Regenerate.
26395         * configure.ac [target=avr]: Check whether avrxmega3 default
26396         linker description file works as needed.
26397         * configure: Regenerate.
26398         * doc/avr-mmcu.texi: Regenerate.
26399         * doc/invoke.texi (AVR Options) <-mshort-calls>: Document it.
26400         <__AVR_ARCH__>: Document avrxmega3 and 103.
26401         <__AVR_HAVE_JMP_CALL__>: Adjust documentation.
26402         <__AVR_SHORT_CALLS__>: Document it.
26403         <__AVR_PM_BASE_ADDRESS__>: Document it.
26404         * doc/extend.texi (AVR Options) <-mshort-calls>: Document it.
26405         (AVR Variable Attributes) <progmem>: Document this is
26406         not needed for avrxmega3.
26407         (AVR Named Address Spaces) <__flash>: Dito.
26409 2017-06-12  Jan Hubicka  <hubicka@ucw.cz>
26411         * cgraph.c (cgraph_node::dump): Complain about profile insanities.
26413 2017-06-12  Doug Rupp  <rupp@adacore.com>
26415         * config.gcc (*-*-vxworks*): Set use_gcc_stdint to "provide".
26416         Append vxworks-stdint.h to the tm_file list.
26417         * config/vxworks-stdint.h: New file.
26419 2017-06-12  Martin Liska  <mliska@suse.cz>
26421         PR tree-optimization/81041
26422         * tree-profile.c (gimple_gen_ic_func_profiler):
26423         Create an extra BB in profile-generate
26424         (gimple_gen_time_profiler): Likewise.
26426 2017-06-12  Jakub Jelinek  <jakub@redhat.com>
26428         PR tree-optimization/81003
26429         * tree-ssa-reassoc.c (force_into_ssa_name): New function.
26430         (update_range_test): Use it instead of force_gimple_operand_gsi.
26432 2017-06-12  Richard Biener  <rguenther@suse.de>
26434         PR tree-optimization/81053
26435         * tree-vect-loop.c (vect_is_simple_reduction): Handle PHI
26436         with backedge value not defined in loop.  Simplify def stmt
26437         compute.
26439 2017-06-11  Tom de Vries  <tom@codesourcery.com>
26441         PR target/79939
26442         * config/nvptx/nvptx.c (nvptx_cannot_force_const_mem): New function.
26443         Return true.
26444         (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to
26445         nvptx_cannot_force_const_mem.
26447 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
26449         * opts.c (finish_options): Move test for flag_split_stack after
26450         it has been initialized.
26452 2017-06-11  Jason Merrill  <jason@redhat.com>
26454         * tree.h (id_equal): New.
26455         * dwarf2out.c, hsa-gen.c, ipa-devirt.c, omp-expand.c,
26456         omp-simd-clone.c, read-rtl-function.c, tree-chkp.c, tree.c: Use it
26457         instead of strcmp of IDENTIFIER_POINTER.
26459 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
26461         * ipa-inline-transform.c: Include function.h, cfg.h and basic-block.h
26462         (mark_all_inlined_calls_cdtor): Fix formating.
26463         (inline_transform): Rescale profile before inlining.
26465 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
26467         * cgraph.h (cgraph_edge::clone): Update prototype.
26468         * cgraphclones.c (cgraph_edge::clone): Update profile scaling.
26469         (cgraph_node::create_clone): Update.
26470         (cgraph_node::create_version_clone): Update.
26471         * tree-inline.c (copy_bb): Update.
26472         (expand_call_inline): Update.
26474 2017-06-10  Segher Boessenkool  <segher@kernel.crashing.org>
26476         * config/rs6000/rs6000.c (emit_vrsave_prologue): New function,
26477         factored out from ...
26478         (rs6000_emit_prologue): ... here.
26480 2017-06-10  Segher Boessenkool  <segher@kernel.crashing.org>
26482         * config/rs6000/rs6000.c (emit_split_stack_prologue): New function,
26483         factored out from ...
26484         (rs6000_emit_prologue): ... here.
26486 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
26488         * predict.c (drop_profile): Also drop individual bb/edge and cgraph
26489         edge counts.
26490         (handle_missing_profiles): Fix computation of tp_first_run.
26491         (counts_to_freqs): Do not touch freqs when count is 0.
26493 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
26495         * cgraphbuild.c (cgraph_edge::rebuild_references): Do not touch
26496         profile.
26498 2017-06-10  Tom de Vries  <tom@codesourcery.com>
26500         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
26501         attributes): Document signal effective target.
26503 2017-06-10  Tom de Vries  <tom@codesourcery.com>
26505         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
26506         Document effective target stack_size.
26508 2017-06-09  David Malcolm  <dmalcolm@redhat.com>
26510         * diagnostic.c (diagnostic_report_diagnostic): Only add fixits
26511         to the edit_context if they can be auto-applied.
26513 2017-06-9  Ian Lance Taylor  <iant@golang.org>
26515         * opts.c (finish_options): If -fsplit-stack, disable implicit
26516         -forder-blocks-and-partition.
26517         * doc/invoke.texi (Optimize Options): Document that when using
26518         -fsplit-stack -forder-blocks-and-partition is not implicitly
26519         enabled.
26521 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
26523         * builtin-attrs.def (ATTR_NORETURN_NOTHROW_LEAF_COLD_LIST,
26524         ATTR_CONST_NORETURN_NOTHROW_LEAF_COLD_LIST,
26525         ATTR_TMPURE_NORETURN_NOTHROW_LEAF_COLD_LIST): New.
26526         * builtins.def (abort, trap, unreachable): Declare cold.
26527         * calls.c (flags_from_decl_or_type): Lookup ECF_COLD.
26528         * tree-core.h (ECF_COLD): New.
26529         * tree.c (set_call_expr_flags): Handle ECF_COLD.
26530         (build_common_builtin_nodes): Mark unreachable and abort as cold.
26532 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
26534         * predict.c (unlikely_executed_stmt_p): Cleanup.
26536 2017-06-09  Richard Biener  <rguenther@suse.de>
26538         * tree-ssa-loop-im.c (execute_sm): Do not force multi-threaded
26539         model if the ref is always written to.
26541 2017-06-09  Tamar Christina  <tamar.christina@arm.com>
26543         * config/aarch64/aarch64.md (lrint<GPF:mode><GPI:mode>2): New.
26545 2017-06-09  Tamar Christina  <tamar.christina@arm.com>
26547         * config/arm/arm.c (arm_rtx_costs_internal): Make sdiv more expensive
26548         than udiv.
26550 2017-06-09  Tom de Vries  <tom@codesourcery.com>
26552         PR target/80855
26553         * config/nvptx/nvptx.md (define_expand "mov<QHSDISDFM>"): Error out with
26554         "target cannot support label values" when encountering LABEL_REF.
26556 2017-06-09  Martin Liska  <mliska@suse.cz>
26558         * tree-profile.c (gimple_gen_ic_profiler): Update comment.
26559         (gimple_gen_ic_func_profiler): Emit direct comparison
26560         of __gcov_indirect_call_callee with NULL.
26561         (gimple_gen_time_profiler): Change probability from
26562         PROB_VERY_UNLIKELY to PROB_UNLIKELY.
26564 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
26566         * profile.c (edge_gcov_counts): Turn to pointer.
26567         (compute_branch_probabilities, compute_branch_probabilities): Update.
26568         (branch_prob): Do not clear edge_gcov_count.
26569         * profile.h (edge_gcov_counts): Turn to pointer.
26570         (edge_gcov_count): Update.
26572 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
26574         * gimple.h (gimple_check_failed): Mark cold.
26576 2017-06-09  Richard Biener  <rguenther@suse.de>
26578         PR tree-optimization/66623
26579         * tree-vect-loop.c (vect_is_simple_reduction): Cleanup,
26580         refactor check_reduction into two parts, properly computing
26581         whether we have to check reduction validity for outer loop
26582         vectorization.
26584 2017-06-09  Richard Biener  <rguenther@suse.de>
26586         PR tree-optimization/79483
26587         * graphite-scop-detection.c (order): New global.
26588         (get_order): Compute bb to order mapping that satisfies code
26589         generation constraints.
26590         (cmp_pbbs): New helper.
26591         (build_scops): Start domwalk at entry block, sort generated
26592         pbbs.
26594 2017-06-09  Richard Biener  <rguenther@suse.de>
26596         PR middle-end/81007
26597         * ipa-polymorphic-call.c
26598         (ipa_polymorphic_call_context::restrict_to_inner_class):
26599         Skip FIELD_DECLs with error_mark_node type.
26600         * passes.def (all_lowering_passes): Run pass_build_cgraph_edges
26601         last again.
26603 2017-06-09  Martin Liska  <mliska@suse.cz>
26605         * predict.c (struct branch_predictor): New struct.
26606         (test_prediction_value_range): New test.
26607         (predict_c_tests): New function.
26608         * selftest-run-tests.c (selftest::run_tests): Run the function.
26609         * selftest.h: Declare new tests.
26611 2017-06-09  Segher Boessenkool  <segher@kernel.crashing.org>
26613         PR target/80966
26614         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
26615         gen_add3_insn did not fail.
26616         * config/rs6000/rs6000.md (add<mode>3): If asked to add a constant to
26617         r0, construct that number in a temporary reg and add that reg to r0.
26618         If asked to put the result in r0 as well, fail.
26620 2017-06-08  Will Schmidt  <will_schmidt@vnet.ibm.com>
26622         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
26623         for early expansion of vec_eqv.
26625 2017-06-08  Jakub Jelinek  <jakub@redhat.com>
26627         PR middle-end/81005
26628         * ubsan.c (instrument_null): Avoid pointless code temporary.
26629         (pass_ubsan::execute): Instrument aggregate arguments of calls.
26631 2017-06-08  Uros Bizjak  <ubizjak@gmail.com>
26633         PR target/81015
26634         Revert:
26635         2016-12-14  Uros Bizjak  <ubizjak@gmail.com>
26637         PR target/59874
26638         * config/i386/i386.md (*ctzhi2): New insn_and_split pattern.
26639         (*clzhi2): Ditto.
26641 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
26643         * predict.c (unlikely_executed_edge_p): Move ahead.
26644         (probably_never_executed_edge_p): Use it.
26646 2017-06-08  Alexander Ivchenko  <alexander.ivchenko@intel.com>
26648         PR middle-end/79988
26649         * tree-chkp.c (chkp_gimple_call_builtin_p): Remove
26650         gimple_call_builtin_p call.
26652 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
26654         * system.h (fancy_abort): Annotate by ATTRIBUTE_COLD.
26655         * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1,
26656         rtl_check_failed_type2, rtl_check_failed_code1,
26657         rtl_check_failed_code2, rtl_check_failed_code_mode,
26658         rtl_check_failed_block_symbol, cwi_check_failed_bounds,
26659         rtvec_check_failed_bounds, rtl_check_failed_flag,
26660         _fatal_insn_not_found, _fatal_insn): Likewise.
26661         * tree.h (tree_contains_struct_check_failed,
26662         tree_check_failed, tree_not_check_failed,
26663         tree_class_check_failed, tree_range_check_failed,
26664         tree_not_class_check_failed, tree_int_cst_elt_check_failed,
26665         tree_vec_elt_check_failed, phi_node_elt_check_failed,
26666         tree_operand_check_failed, omp_clause_check_failed,
26667         omp_clause_operand_check_failed, omp_clause_range_check_failed):
26668         Likewise.
26670 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
26672         * cgraph.c (cgraph_edge::maybe_hot_p): Do not check
26673         flag_branch_probabilities.
26674         * ipa-inline.c (edge_badness): Likewise.
26675         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
26676         * postreload-gcse.c (eliminate_partially_redundant_load): Likewise.
26677         * predict.c (maybe_hot_frequency_p): Likewise.
26678         (probably_never_executed): Likewise.
26679         * sched-ebb.c (schedule_ebbs): Likewise.
26680         * sched-rgn.c (find_single_block_region): Likewise.
26681         * tracer.c (tail_duplicate): Likewise.
26683 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
26685         * opts.c (finish_options): x_flag_reorder_blocks_and_partition no
26686         longer requires x_flag_profile_use.
26688 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
26690         * cfgrtl.c (cfg_layout_initialize): Check crtl->has_bb_partition
26691         instead of flag_reorder_blocks_and_partition.
26692         * dbxout.c (dbxout_function_end): Likewise.
26693         * dwarf2out.c (gen_subprogram_die): Likewise.
26694         * haifa-sched.c (sched_create_recovery_edges): Likewise.
26695         * hw-doloop.c (reorg_loops): Likewise.
26696         * varasm.c (assemble_start_function,
26697         assemble_end_function): Likewise.
26698         (decide_function_section): Do not check for
26699         flag_reorder_blocks_and_partition.
26701 2017-06-08  Alexander Ivchenko  <alexander.ivchenko@intel.com>
26703         * tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
26704         New function.
26705         (chkp_get_hard_register_fake_addr_expr): Ditto.
26706         (chkp_build_addr_expr): Add check for hard reg case.
26707         (chkp_parse_array_and_component_ref): Ditto.
26708         (chkp_find_bounds_1): Ditto.
26709         (chkp_process_stmt): Don't generate bounds store for
26710         hard reg case.
26712 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
26714         * predict.c (maybe_hot_bb_p): Do not check profile status.
26715         (maybe_hot_edge_p): Likewise.
26716         (probably_never_executed): Check for zero counts even if profile
26717         is not read.
26718         (unlikely_executed_edge_p): New function.
26719         (unlikely_executed_stmt_p): New function.
26720         (unlikely_executed_bb_p): New function.
26721         (set_even_probabilities): Use unlikely predicates.
26722         (combine_predictions_for_bb): Likewise.
26723         (predict_paths_for_bb): Likewise.
26724         (predict_paths_leading_to_edge): Likewise.
26725         (determine_unlikely_bbs): New function.
26726         (estimate_bb_frequencies): Use it.
26727         (compute_function_frequency): Use zero counts even if profile is
26728         not read.
26729         * profile-count.h: Fix typo.
26731 2017-08-08  Julia Koval  <julia.koval@intel.com>
26733         * config/i386/avx512bwintrin.h (_mm512_mask_cvtepi16_storeu_epi8,
26734         _mm512_mask_cvtsepi16_storeu_epi8,
26735         _mm512_mask_cvtusepi16_storeu_epi8): New intrinsics.
26736         * config/i386/avx512vlbwintrin.h (_mm256_mask_cvtepi16_storeu_epi8,
26737         _mm_mask_cvtsepi16_storeu_epi8, _mm256_mask_cvtsepi16_storeu_epi8,
26738         _mm_mask_cvtusepi16_storeu_epi8, _mm256_mask_cvtusepi16_storeu_epi8,
26739         _mm_mask_cvtepi16_storeu_epi8): New intrinsics.
26740         * config/i386/i386-builtin-types.def (PV8Q, V8QI): New pointer type.
26741         (VOID_FTYPE_PV32QI_V32HI_USI, VOID_FTYPE_PV8QI_V8HI_UQI,
26742         VOID_FTYPE_PV16QI_V16HI_UHI): New function types.
26743         * config/i386/i386-builtin.def (__builtin_ia32_pmovwb128mem_mask,
26744         __builtin_ia32_pmovwb256mem_mask, __builtin_ia32_pmovswb128mem_mask,
26745         __builtin_ia32_pmovswb256mem_mask, __builtin_ia32_pmovuswb128mem_mask,
26746         __builtin_ia32_pmovuswb256mem_mask,
26747         __builtin_ia32_pmovuswb512mem_mask, __builtin_ia32_pmovswb512mem_mask)
26748         __builtin_ia32_pmovwb512mem_mask): New builtins.
26750 2017-08-08  Julia Koval  <julia.koval@intel.com>
26752         PR target/73350,80862
26753         * config/i386/subst.md (round): Fix round pattern.
26754         * config/i386/i386.c (ix86_erase_embedded_rounding):
26755         Fix erasing rounding for the fixed pattern.
26757 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
26759         * cfgbuild.c (find_many_sub_basic_blocks): Fix thinko.
26761 2017-06-08  Martin Liska  <mliska@suse.cz>
26763         PR gcov-profile/80911
26764         * gcov.c (block_info::block_info): New constructor.
26766 2017-06-07  Carl Love  <cel@us.ibm.com>
26768         * config/rs6000/rs6000-c: The return type of the following
26769         built-in functions was implemented as int not long long.  Fix sign
26770         of return value for the unsigned version of vec_mulo and vec_mule.
26771         vector unsigned long long vec_bperm (vector unsigned long long,
26772                                              vector unsigned char)
26773         vector signed long long vec_mule (vector signed int,
26774                                           vector signed int)
26775         vector unsigned long long vec_mule (vector unsigned int,
26776                                             vector unsigned int)
26777         vector signed long long vec_mulo (vector signed int,
26778                                           vector signed int)
26779         vector unsigned long long vec_mulo (vector unsigned int,
26780                                             vector unsigned int)
26781         * doc/extend.texi: Fix the documentation for the built-in
26782         functions.
26784 2017-06-07  Carl Love  <cel@us.ibm.com>
26786         PR target/80982
26787         * config/rs6000/altivec.md (double<mode>2): Fix the implementation of
26788         for BE.
26790 2017-06-07  Carl Love  <cel@us.ibm.com>
26792         * config/rs6000/altivec.md: Fix argument swizzle in vec_doublel
26793         support, Generate       doublehv for signed int/float for BE case only.
26795 2017-06-07  Alexander Monakov  <amonakov@ispras.ru>
26797         * doc/invoke.texi (mcx16): Rewrite.
26799 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
26801         * config/rs6000/predicates.md (rs6000_nonimmediate_operand): Delete.
26802         * config/rs6000/rs6000.md (*movsi_internal1, movsi_from_sf,
26803         *mov<mode>_softfloat, and an anonymous splitter): Use
26804         nonimmediate_operand instead of rs6000_nonimmediate_operand.
26806 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
26808         * config/rs6000/darwin.h (REGISTER_NAMES): Delete the SPE_ACC and
26809         SPEFSCR registers.
26810         * config/rs6000/rs6000.c (rs6000_reg_names, alt_reg_names): Ditto.
26811         (enum rs6000_reg_type): Delete SPE_ACC_TYPE and SPEFSCR_REG_TYPE.
26812         (rs6000_debug_reg_global): Adjust.
26813         (rs6000_init_hard_regno_mode_ok): Adjust.
26814         (rs6000_dbx_register_number): Adjust.
26815         * config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Change to 115.
26816         (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
26817         Remove SPE_ACC and SPEFSCR.
26818         (REG_ALLOC_ORDER): Ditto.
26819         (FRAME_POINTER_REGNUM): Change to 111.
26820         (enum reg_class): Remove the SPE_ACC and SPEFSCR registers.
26821         (REG_CLASS_NAMES): Ditto.
26822         (REG_CLASS_CONTENTS): Delete the SPE_ACC and SPEFSCR registers.
26823         (REGISTER_NAMES): Ditto.
26824         (ADDITIONAL_REG_NAMES): Ditto.
26825         (rs6000_reg_names): Ditto.
26826         * config/rs6000/rs6000.md: Renumber some register number
26827         define_constants.
26829 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
26831         * config/rs6000/darwin.h (REGISTER_NAMES): Delete the SPE high
26832         registers.
26833         * config/rs6000/rs6000.c (rs6000_reg_names, alt_reg_names): Ditto.
26834         * config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Change from 149
26835         to 117.
26836         (DWARF_REG_TO_UNWIND_COLUMN): Do not define.
26837         (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
26838         Delete the SPE high registers.
26839         (REG_ALLOC_ORDER): Ditto.
26840         (enum reg_class): Remove SPE_HIGH_REGS.
26841         (REG_CLASS_NAMES): Ditto.
26842         (REG_CLASS_CONTENTS): Delete the SPE high registers.
26843         (REGISTER_NAMES): Ditto.
26844         (rs6000_reg_names): Ditto.
26845         * doc/tm.texi.in: Remove SPE as example.
26846         * doc/tm.texi: Regenerate.
26848 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
26850         * config/rs6000/8540.md (ppc8540_brinc): Delete.
26851         * config/rs6000/e500mc.md (e500mc_brinc): Delete.
26852         * config/rs6000/e500mc64.md (e500mc64_brinc): Delete.
26853         * config/rs6000/rs6000.md (type): Remove "brinc".
26855 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
26857         * config.gcc (powerpc*-*-*): Don't add spe.h to extra_headers.
26858         (powerpc*-linux*spe*): Use ${cpu_type} instead of rs6000.
26859         * config/rs6000/linuxspe.h: Delete file.
26860         * config/rs6000/rs6000.md: Don't include spe.md.
26861         * config/rs6000/spe.h: Delete file.
26862         * config/rs6000/spe.md: Delete file.
26863         * config/rs6000/t-rs6000: Remove spe.md.
26865 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
26867         * config/rs6000/predicates.md (reg_or_mem_operand): Reformat.
26868         (reg_or_none500mem_operand): Delete.
26869         * config/rs6000/rs6000.md (extendsfdf2): Use reg_or_mem_operand
26870         instead of reg_or_none500mem_operand.
26872 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
26874         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
26875         handling of SPE flags.
26876         * config/rs6000/rs6000.opt (-mspe, -mspe=no, -mspe=yes): Delete.
26878 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
26880         * config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
26881         SPE ABI handling.
26882         * config/rs6000/paired.md (paired_negv2sf2): Rename to negv2sf2.
26883         (paired_absv2sf2, paired_addv2sf3, paired_subv2sf3, paired_mulv2sf3,
26884         paired_divv2sf3): Similar.
26885         * config/rs6000/predicates.md: Replace TARGET_SPE, TARGET_SPE_ABI,
26886         SPE_VECTOR_MODE and SPE_HIGH_REGNO_P by 0; simplify.
26887         * config/rs6000/rs6000-builtin.def: Delete RS6000_BUILTIN_E and
26888         RS6000_BUILTIN_S.
26889         Delete BU_SPE_1, BU_SPE_2, BU_SPE_3, BU_SPE_E, BU_SPE_P, and BU_SPE_X.
26890         Rename the paired_* instruction patterns.
26891         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Do not
26892         define __SPE__.
26893         * config/rs6000/rs6000-protos.h (invalid_e500_subreg): Delete.
26894         * config/rs6000/rs6000.c: Delete RS6000_BUILTIN_E and RS6000_BUILTIN_S.
26895         (struct rs6000_stack): Delete fields spe_gp_save_offset, spe_gp_size,
26896         spe_padding_size, and spe_64bit_regs_used.  Replace TARGET_SPE and
26897         TARGET_SPE_ABI with 0, simplify.  Replace SPE_VECTOR_MODE with
26898         PAIRED_VECTOR_MODE.
26899         (struct machine_function): Delete field spe_insn_chain_scanned_p.
26900         (spe_func_has_64bit_regs_p): Delete.
26901         (spe_expand_predicate_builtin): Delete.
26902         (spe_expand_evsel_builtin): Delete.
26903         (TARGET_DWARF_REGISTER_SPAN): Do not define.
26904         (TARGET_MEMBER_TYPE_FORCES_BLK): Do not define.
26905         (invalid_e500_subreg): Delete.
26906         (rs6000_legitimize_address): Always force_reg op2 as well, for
26907         paired single memory accesses.
26908         (rs6000_member_type_forces_blk): Delete.
26909         (rs6000_spe_function_arg): Delete.
26910         (rs6000_expand_unop_builtin): Delete SPE handling.
26911         (rs6000_expand_binop_builtin): Ditto.
26912         (spe_expand_stv_builtin): Delete.
26913         (bdesc_2arg_spe): Delete.
26914         (spe_expand_builtin): Delete.
26915         (spe_expand_predicate_builtin): Delete.
26916         (spe_expand_evsel_builtin): Delete.
26917         (rs6000_invalid_builtin): Remove RS6000_BTM_SPE handling.
26918         (spe_init_builtins): Delete.
26919         (spe_func_has_64bit_regs_p): Delete.
26920         (savres_routine_name): Delete "info" parameter.  Adjust callers.
26921         (rs6000_emit_stack_reset): Ditto.
26922         (rs6000_dwarf_register_span): Delete.
26923         * config/rs6000/rs6000.h (TARGET_SPE_ABI, TARGET_SPE,
26924         UNITS_PER_SPE_WORD, SPE_HIGH_REGNO_P, SPE_SIMD_REGNO_P,
26925         SPE_VECTOR_MODE, RS6000_BTM_SPE, RS6000_BUILTIN_E, RS6000_BUILTIN_S):
26926         Delete.
26927         * config/rs6000/rs6000.md (FIRST_SPE_HIGH_REGNO, LAST_SPE_HIGH_REGNO):
26928         Delete.
26929         * config/rs6000/rs6000.opt (-mabi=spe, -mabi=no-spe): Delete.
26930         * config/rs6000/spe.md: Delete every pattern that uses TARGET_SPE.
26931         * config/rs6000/vector.md (absv2sf2, negv2sf2, addv2sf3, subv2sf3,
26932         mulv2sf3, divv2sf3): Delete expanders.
26934 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
26936         config/rs6000/rs6000.md (UNSPEC_MV_CR_GT): Delete.
26938 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
26940         * config/rs6000/rs6000-protos.h (output_e500_flip_gt_bit): Delete.
26941         * config/rs6000/rs6000.c: Ditto.
26943 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
26945         * config/rs6000/predicated.md (rs6000_cbranch_operator): Delete.
26946         * config/rs6000/rs6000.md: Replace rs6000_cbranch_operator by
26947         comparison_operator.
26949 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
26951         * config/rs6000/rs6000.c: Remove everything related to -mfloat-gprs.
26952         * config/rs6000/rs6000.opt: Ditto.
26953         * config/rs6000/t-rtems: Ditto.
26955 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
26957         * config/rs6000/predicates.md: Replace TARGET_E500_DOUBLE and
26958         TARGET_E500_SINGLE by 0, simplify.
26959         * config/rs6000/rs6000.c: Ditto.
26960         (rs6000_option_override_internal): Delete CHECK_E500_OPTIONS.
26961         (spe_build_register_parallel): Delete.
26962         * config/rs6000/rs6000.h: Delete TARGET_E500_SINGLE,
26963         TARGET_E500_DOUBLE, and CHECK_E500_OPTIONS.
26964         * config/rs6000/rs6000.md: Replace TARGET_E500_DOUBLE,
26965         TARGET_E500_SINGLE, and <E500_CONVERT> by 0, simplify.
26966         (E500_CONVERT): Delete.
26967         * config/rs6000/spe.md: Remove many patterns and all define_constants.
26969 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
26971         * config/rs6000/darwin.md: Replace TARGET_FPRS by 1 and simplify.
26972         * config/rs6000/dfp.md: Ditto.
26973         (negdd2, *negdd2_fpr): Merge.
26974         (absdd2, *absdd2_fpr): Merge.
26975         (negtd2, *negtd2_fpr): Merge.
26976         (abstd2, *abstd2_fpr): Merge.
26977         * config/rs6000/e500.h: Delete file.
26978         * config/rs6000/predicates.md (rs6000_cbranch_operator): Replace
26979         TARGET_FPRS by 1 and simplify.
26980         * config/rs6000/rs6000-c.c: Ditto.
26981         * config/rs6000/rs6000.c: Ditto.  Also replace TARGET_SF_SPE and
26982         TARGET_DF_SPE by 0.
26983         * config/rs6000/rs6000.h: Ditto.  Delete TARGET_SF_SPE and
26984         TARGET_DF_SPE.
26985         * config/rs6000/rs6000.md: Ditto.
26986         (floatdidf2, *floatdidf2_fpr): Merge.
26987         (move_from_CR_gt_bit): Delete.
26988         * config/rs6000/spe.md: Replace TARGET_FPRS by 1 and simplify.
26989         (E500_CR_IOR_COMPARE): Delete.
26990         (All patterns that require !TARGET_FPRS): Delete.
26991         * config/rs6000/vsx.md: Replace TARGET_FPRS by 1 and simplify.
26993 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
26995         * passes.def (pass_iv_canon): Move before pass_loop_distribution.
26997 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
26999         * graphds.c (add_edge): Intitialize edge's attached data.
27000         (foll_in_subgraph, dfs_fst_edge, dfs_next_edge): New function
27001         pointer parameter.  Call pointed function on each edge during
27002         graph traversing.  Skip traversing the edge when the function
27003         returns true.
27004         (graphds_dfs, graphds_scc): Ditto.
27005         (for_each_edge): New parameter.  Pass the new parameter to callback
27006         function.
27007         * graphds.h (skip_edge_callback): New function pointer type.
27008         (graphds_dfs, graphds_scc): New function pointer parameter.
27009         (graphds_edge_callback, for_each_edge): New parameter.
27011 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
27013         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test): Factor
27014         out code checking if runtime alias check is possible to below ...
27015         Call the new function.
27016         * tree-data-ref.c (runtime_alias_check_p): ... to new function.
27017         * tree-data-ref.h (runtime_alias_check_p): New decalaration.
27019 2017-06-07  Marek Polacek  <polacek@redhat.com>
27021         PR sanitizer/80932
27022         * fold-const.c (extract_muldiv_1) <case MINUS_EXPR>: Add
27023         TYPE_OVERFLOW_WRAPS check.
27025 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
27027         * tree-vect-loop-manip.c (vect_do_peeling): Don't skip vector loop
27028         if versioning is required.
27029         * tree-vect-loop.c (vect_analyze_loop_2): Merge niter check for loop
27030         peeling with the check for versioning.
27032 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
27034         * tree-vectorizer.h (vect_build_loop_niters): New parameter.
27035         * tree-vect-loop-manip.c (vect_build_loop_niters): New parameter.
27036         Set true to new parameter if new ssa variable is defined.
27037         (vect_gen_vector_loop_niters): Refactor.  Set range information
27038         for the new vector loop bound variable.
27039         (vect_do_peeling): Ditto.
27041 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
27043         * tree-affine.c (ssa.h): Include header file.
27044         (tree_to_aff_combination): Handle (T1)(X - CST) when inner type
27045         has wrapping overflow behavior.
27047 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
27049         * tree-affine.c (tree_to_aff_combination): Handle (T1)(X + X).
27051 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
27053         (aff_combination_expand): Move (T1)(X *+- CST) simplification to ...
27054         (tree_to_aff_combination): ... here.
27056 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
27058         * tree-ssa-loop-ivopts.c (ivopts_estimate_reg_pressure): New
27059         reg_pressure model function.
27060         (ivopts_global_cost_for_size): Delete.
27061         (determine_set_costs, iv_ca_recount_cost): Call new model function
27062         ivopts_estimate_reg_pressure.
27064 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
27066         * config/aarch64/aarch64.c (aarch64_rtx_costs): Make sdiv more
27067         expensive than udiv.  Remove floating point cases from mod.
27069 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
27071         * config/arm/aarch-cost-tables.h (cortexa53_extra_cost):
27072         Increase idiv cost.
27074 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
27076         * config/aarch64/aarch64.md
27077         (copysignsf3): Fix mask generation.
27079 2017-06-07  Jakub Jelinek  <jakub@redhat.com>
27081         * dumpfile.h (enum tree_dump_index): Rename TDI_generic to
27082         TDI_gimple.
27083         (class dump_manager): Add register_dumps method.
27084         * dumpfile.c: Include langhooks.h.
27085         (dump_files): Use 0 instead of 3/4/5 for TDI_{original,gimple,nested}.
27086         (FIRST_AUTO_NUMBERED_DUMP): Decrease to 1.
27087         (FIRST_ME_AUTO_NUMBERED_DUMP): Define.
27088         (dump_manager::dump_register): Start with 512 entries instead of 32.
27089         (dump_manager::register_dumps): New method.
27090         * toplev.c (general_init): Instead of invoking register_dumps
27091         langhook, invoke register_dumps method on the dump manager.
27092         * gimplify.c (gimplify_function_tree): Use TDI_gimple instead of
27093         TDI_generic.
27095 2017-06-07  Richard Sandiford  <richard.sandiford@linaro.org>
27097         * doc/md.texi: Clarify the restrictions on a define_insn condition.
27098         Say that # requires an associated define_split to exist, and that
27099         the define_split must be suitable for use after register allocation.
27101 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
27103         * cfgbuild.c (find_bb_boundaries): Initialize profile of split blocks.
27104         (compute_outgoing_frequencies): Also initialize zero counts.
27105         (find_many_sub_basic_blocks): Do not produce uninitialized profile
27106         around loops; preserve more of profile when nothing changes.
27108 2017-06-06  Jim Wilson  <jim.wilson@linaro.org>
27110         * config/aarch64/aarch64-cost-tables.h (qdf24xx_extra_costs): Move to
27111         here.
27112         * config/arm/aarch-cost-tables.h (qdf24xx_extra_costs): From here.
27113         * config/arm/arm-cpu-cdata.h: Regenerate.
27114         * config/arm/arm-cpu-data.h, config/arm/arm-cpu.h: Likewise.
27115         * config/arm/arm-tables.opt, config/arm/arm-tune.md: Likewise.
27116         * config/arm/arm-cpus.in: Delete falkor and qdf24xx entries.
27117         * config/arm/arm.c (arm_qdf24xx_tune): Delete.
27118         * config/arm/bpabi.h (BE8_LINK_SPEC): Delete falkor and qdf24xx
27119         support.
27120         * config/arm/t-aprofile (MULTILIB_MATCHES): Delete falkor and qdf24xx
27121         support.
27122         * config/arm/t-rmprofile: Likewise.
27123         * doc/invoke.texi (ARM Options): Drop falkor and qdf24xx support.
27125 2017-06-06  David S. Miller  <davem@davemloft.net>
27127         PR target/80968
27128         * config/sparc/sparc.c (sparc_expand_prologue): Emit frame
27129         blockage if function uses alloca.
27131 2017-06-06  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
27133         * tree-ssa-loop-prefetch.c (struct mem_ref_group, struct mem_ref):
27134         New "uid" fields to hold pretty-print IDs of group and ref.
27135         Memory references are now identified as <group_id>:<ref_id>
27136         instead of using [random] addresses.
27137         (dump_mem_details): Simplify, no functional change.
27138         (dump_mem_ref): Simplify and make output more concise.
27139         Replace couple of fprintf's throughout code with calls to dump_mem_ref.
27140         (find_or_create_group): Initialize group uid.
27141         (record_ref): Initialize ref uid.  Improve debug output.
27142         (prune_group_by_reuse, should_issue_prefetch_p,)
27143         (should_issue_prefetch_p, schedule_prefetches, issue_prefetch_ref,)
27144         (mark_nontemporal_store, determine_loop_nest_reuse):
27145         Improve debug output.
27147 2017-06-06  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
27149         * dbgcnt.def (prefetch): New debug counter.
27150         * tree-ssa-loop-prefetch.c (dbgcnt.h): New include.
27151         (schedule_prefetches): Stop issueing prefetches if debug counter
27152         tripped.
27154 2017-06-06  Tom de Vries  <tom@codesourcery.com>
27156         * doc/sourcebuild.texi (Testsuites, C Language Testsuites,
27157         gcc.c-torture/compile): Remove mention of NO_LABEL_VALUES in fixme.
27159 2017-06-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27161         * config/aarch64/atomics.md (atomic_compare_and_swap<mode> expander):
27162         Use aarch64_reg_or_zero predicate for operand 4.
27163         (aarch64_compare_and_swap<mode> define_insn_and_split):
27164         Use aarch64_reg_or_zero predicate for operand 3.  Add 'Z' constraint.
27165         (aarch64_store_exclusive<mode>): Likewise for operand 2.
27167 2017-06-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
27169         * config/arm/arm.c (arm_compute_save_reg_mask): Rename into ...
27170         (arm_compute_save_core_reg_mask): This.
27171         (thumb1_compute_save_reg_mask): Rename into ...
27172         (thumb1_compute_save_core_reg_mask): This.
27173         (arm_compute_save_reg0_reg12_mask): Adapt comment.
27174         (arm_compute_frame_layout): Likewise.
27176 2017-06-06  Richard Biener  <rguenther@suse.de>
27178         PR tree-optimization/80974
27179         * tree-ssa-sccvn.c (set_ssa_val_to): Do not change but only
27180         keep or clear leaders SSA info.
27182 2017-06-06  Tom de Vries  <tom@codesourcery.com>
27184         * config/nvptx/nvptx.c (split_mode_p): New function.
27185         (nvptx_declare_function_name, nvptx_print_operand): Use split_mode_p.
27187 2017-06-06  Tom de Vries  <tom@codesourcery.com>
27189         * config/nvptx/nvptx.c (nvptx_print_operand): Use maybe_split_mode.
27191 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
27193         PR bootstrap/80978
27194         * tree-cfg.c (execute_fixup_cfg): Fix condition on when to rescale
27195         profile.
27197 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
27199         * shrink-wrap.c (handle_simple_exit): Update profile.
27200         (try_shrink_wrapping): Upate profile.
27202 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
27204         * predict.c (tree_estimate_probability_bb): Add LOCAL_ONLY.
27205         (tree_guess_outgoing_edge_probabilities): New.
27206         * predict.h (tree_guess_outgoing_edge_probabilities): Declare.
27207         * tree-cfg.c (gimple_find_sub_bbs): Propagate profile.
27209 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
27211         * ipa-split.c (split_function): Initialize return bb profile.
27213 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
27215         * profile.c (compute_branch_probabilities): Also initialize
27216         EXIT_BLOCK profile.
27218 2017-06-06  Richard Biener  <rguenther@suse.de>
27220         PR tree-optimization/80928
27221         * tree-vect-loop.c (vect_update_vf_for_slp): Amend dumps.
27222         (vect_analyze_loop_operations): Properly guard analysis for
27223         pure SLP case.
27224         (vect_transform_loop): Likewise.
27225         (vect_analyze_loop_2): Also reset SLP type on PHIs.
27226         (vect_model_induction_cost): Do not cost for pure SLP.
27227         (vectorizable_induction): Pass in SLP node, implement SLP vectorization
27228         of induction in inner loop vectorization.
27229         * tree-vect-slp.c (vect_create_new_slp_node): Handle PHIs.
27230         (vect_get_and_check_slp_defs): Handle vect_induction_def.
27231         (vect_build_slp_tree): Likewise.  Handle PHIs as terminating the
27232         recursion.
27233         (vect_analyze_slp_cost_1): Cost induction.
27234         (vect_detect_hybrid_slp_stmts): Handle PHIs.
27235         (vect_get_slp_vect_defs): Likewise.
27236         * tree-vect-stmts.c (vect_analyze_stmt): Handle induction.
27237         (vect_transform_stmt): Handle SLP reductions.
27238         * tree-vectorizer.h (vectorizable_induction): Adjust.
27240 2017-06-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
27242         * config/rs6000/rs6000.c (make_resolver_func): Update
27243         init_lowered_empty_function call.
27245 2017-06-05  Bernd Edlinger  <bernd.edlinger@hotmail.de>
27247         * doc/invoke.texi: Document the -fprofile-abs-path option.
27248         * common.opt (fprofile-abs-path): New option.
27249         * gcov-io.h (gcov_write_filename): Declare.
27250         * gcov-io.c (gcov_write_filename): New function.
27251         * coverage.c (coverage_begin_function): Use gcov_write_filename.
27252         * profile.c (output_location): Likewise.
27254 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
27256         * shring-wrap.c: Revert accidental commit.
27258 2017-06-05  Volker Reichelt  <v.reichelt@netcologne.de>
27260         * doc/invoke.texi (-Wduplicated-branches): Add to warning list.
27262 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
27264         * cfgexpand.c (expand_gimple_tailcall): Initialize profile of
27265         new edge.
27266         * ipa-inline.c (want_inline_self_recursive_call_p): Watch for missing
27267         profile in callgraph edge.
27268         * profile-count.h (apply_probability): If THIS is 0, then result is 0
27269         (apply_scale): Likewise.
27270         * tree-inline.c (copy_bb, copy_edges_for_bb, copy_cfg_body):
27271         Also scale profile when inlining function with zero profile.
27272         (initialize_cfun): Update exit block profile even when it is zero.
27273         * tree-ssa-threadupdate.c (clear_counts_path): Handle correctly case
27274         when profile is read.
27276 2017-06-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
27278         * config/rs6000/rs6000.c (toplevel): Include attribs.h.
27279         (CLONE_*): New constants to define the processors we can generate
27280         code for with the target_clone attribute.
27281         (rs6000_clone_map): New array to identify which clone processors
27282         the current program is running on.
27283         (TARGET_COMPARE_VERSION_PRIORITY): Define to enable the
27284         target_clone attribute.
27285         (TARGET_GENERATE_VERSION_DISPATCHER_BODY): Likewise.
27286         (TARGET_GET_FUNCTION_VERSIONS_DISPATCHER): Likewise.
27287         (TARGET_OPTION_FUNCTION_VERSIONS): Likewise.
27288         (cpu_expand_builtin): Add support for target_clone attribute.
27289         (rs6000_valid_attribute_p): Allow "default" attribute.
27290         (get_decl_name): New debug function to simplify printing the
27291         current function name in debugging statements.
27292         (rs6000_clone_priority): New functions to support the target_clone
27293         attribute, and be able to generate code to switch between ISA 2.05
27294         through ISA 3.0 (power6 through power9).
27295         (rs6000_compare_version_priority): Likewise.
27296         (rs6000_get_function_versions_dispatcher): Likewise.
27297         (make_resolver_func): Likewise.
27298         (add_condition_to_bb): Likewise.
27299         (dispatch_function_versions): Likewise.
27300         (rs6000_generate_version_dispatcher_body): Likewise.
27301         (rs6000_can_inline_p): Call get_decl_name for debugging usage.
27302         (fusion_gpr_load_p): Fix a spacing issue.
27303         * doc/extend.texi (Common Function Attributes): Document that the
27304         PowerPC supports the target_clone attribute.
27306 2017-06-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>
27308         * config/arm/arm.h: explain F symbol found in description of ARM
27309         register allocation in its legend.
27311 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
27313         * config/mips/frame-header-opt.c: Include profile-count.h.
27314         * config/riscv/riscv.c: Include profile-count.h
27316 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
27318         * tree-ssa-loop-im.c (execute_sm_if_changed): Add FLAG_BBS parameter;
27319         update profile.
27320         (sm_set_flag_if_changed): Add bbs field.
27321         (execute_sm_if_changed_flag_set): Pass BBS.
27322         (execute_sm): Update.
27324 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27326         * config/aarch64/aarch64-simd.md (aarch64_store_lane0<mode>):
27327         New pattern.
27329 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27331         * config/aarch64/aarch64.md (sub<mode>3_compare1_imm): New define_insn.
27332         (peephole2): New peephole2 to emit the above.
27333         * config/aarch64/predicates.md (aarch64_sub_immediate): New predicate.
27335 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27337         * config/aarch64/aarch64.c (define_peephole2 above
27338         *sub_<shift>_<mode>): New peephole.
27340 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
27342         * config/i386/i386.c (make_resolver_func): Update.
27343         * Makefile.in: Add profile-count.h and profile-count.o
27344         * auto-profile.c (afdo_indirect_call): Update to new API.
27345         (afdo_set_bb_count): Update.
27346         (afdo_propagate_edge): Update.
27347         (afdo_propagate_circuit): Update.
27348         (afdo_calculate_branch_prob): Update.
27349         (afdo_annotate_cfg): Update.
27350         * basic-block.h: Include profile-count.h
27351         (struct edge_def): Turn count to profile_count.
27352         (struct basic_block_def): Likewie.
27353         (REG_BR_PROB_BASE): Move to profile-count.h
27354         (RDIV): Move to profile-count.h
27355         * bb-reorder.c (max_entry_count): Turn to profile_count.
27356         (find_traces): Update.
27357         (rotate_loop):Update.
27358         (connect_traces):Update.
27359         (sanitize_hot_paths):Update.
27360         * bt-load.c (migrate_btr_defs): Update.
27361         * cfg.c (RDIV): Remove.
27362         (init_flow): Use alloc_block.
27363         (alloc_block): Uninitialize count.
27364         (unchecked_make_edge): Uninitialize count.
27365         (check_bb_profile): Update.
27366         (dump_edge_info): Update.
27367         (dump_bb_info): Update.
27368         (update_bb_profile_for_threading): Update.
27369         (scale_bbs_frequencies_int): Update.
27370         (scale_bbs_frequencies_gcov_type): Update.
27371         (scale_bbs_frequencies_profile_count): New.
27372         * cfg.h (update_bb_profile_for_threading): Update.
27373         (scale_bbs_frequencies_profile_count): Declare.
27374         * cfgbuild.c (compute_outgoing_frequencies): Update.
27375         (find_many_sub_basic_blocks): Update.
27376         * cfgcleanup.c (try_forward_edges): Update.
27377         (try_crossjump_to_edge): Update.
27378         * cfgexpand.c (expand_gimple_tailcall): Update.
27379         (construct_exit_block): Update.
27380         * cfghooks.c (verify_flow_info): Update.
27381         (dump_bb_for_graph): Update.
27382         (split_edge): Update.
27383         (make_forwarder_block): Update.
27384         (duplicate_block): Update.
27385         (account_profile_record): Update.
27386         * cfgloop.c (find_subloop_latch_edge_by_profile): Update.
27387         (get_estimated_loop_iterations): Update.
27388         * cfgloopanal.c (expected_loop_iterations_unbounded): Update.
27389         (single_likely_exit): Update.
27390         * cfgloopmanip.c (scale_loop_profile): Update.
27391         (loopify): Update.
27392         (set_zero_probability): Update.
27393         (lv_adjust_loop_entry_edge): Update.
27394         * cfgrtl.c (force_nonfallthru_and_redirect): Update.
27395         (purge_dead_edges): Update.
27396         (rtl_account_profile_record): Update.
27397         * cgraph.c (cgraph_node::create): Uninitialize count.
27398         (symbol_table::create_edge): Uninitialize count.
27399         (cgraph_update_edges_for_call_stmt_node): Update.
27400         (cgraph_edge::dump_edge_flags): Update.
27401         (cgraph_node::dump): Update.
27402         (cgraph_edge::maybe_hot_p): Update.
27403         * cgraph.h: Include profile-count.h
27404         (create_clone), create_edge, create_indirect_edge): Update.
27405         (cgraph_node): Turn count to profile_count.
27406         (cgraph_edge0: Likewise.
27407         (make_speculative, clone): Update.
27408         (create_edge): Update.
27409         (init_lowered_empty_function): Update.
27410         * cgraphclones.c (cgraph_edge::clone): Update.
27411         (duplicate_thunk_for_node): Update.
27412         (cgraph_node::create_clone): Update.
27413         * cgraphunit.c (cgraph_node::analyze): Update.
27414         (cgraph_node::expand_thunk): Update.
27415         * final.c (dump_basic_block_info): Update.
27416         * gimple-streamer-in.c (input_bb): Update.
27417         * gimple-streamer-out.c (output_bb): Update.
27418         * graphite.c (print_global_statistics): Update.
27419         (print_graphite_scop_statistics): Update.
27420         * hsa-brig.c: Include basic-block.h.
27421         * hsa-dump.c: Include basic-block.h.
27422         * hsa-gen.c (T sum_slice): Update.
27423         (convert_switch_statements):Update.
27424         * hsa-regalloc.c: Include basic-block.h.
27425         * ipa-chkp.c (chkp_produce_thunks): Update.
27426         * ipa-cp.c (struct caller_statistics): Update.
27427         (init_caller_stats): Update.
27428         (gather_caller_stats): Update.
27429         (ipcp_cloning_candidate_p): Update.
27430         (good_cloning_opportunity_p): Update.
27431         (get_info_about_necessary_edges): Update.
27432         (dump_profile_updates): Update.
27433         (update_profiling_info): Update.
27434         (update_specialized_profile): Update.
27435         (perhaps_add_new_callers): Update.
27436         (decide_about_value): Update.
27437         (ipa_cp_c_finalize): Update.
27438         * ipa-devirt.c (struct odr_type_warn_count): Update.
27439         (struct decl_warn_count): Update.
27440         (struct final_warning_record): Update.
27441         (possible_polymorphic_call_targets): Update.
27442         (ipa_devirt): Update.
27443         * ipa-fnsummary.c (redirect_to_unreachable): Update.
27444         * ipa-icf.c (sem_function::merge): Update.
27445         * ipa-inline-analysis.c (do_estimate_edge_time): Update.
27446         * ipa-inline.c (compute_uninlined_call_time): Update.
27447         (compute_inlined_call_time): Update.
27448         (want_inline_small_function_p): Update.
27449         (want_inline_self_recursive_call_p): Update.
27450         (edge_badness): Update.
27451         (lookup_recursive_calls): Update.
27452         (recursive_inlining): Update.
27453         (inline_small_functions): Update.
27454         (dump_overall_stats): Update.
27455         (dump_inline_stats): Update.
27456         * ipa-profile.c (ipa_profile_generate_summary): Update.
27457         (ipa_propagate_frequency): Update.
27458         (ipa_profile): Update.
27459         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
27460         * ipa-utils.c (ipa_merge_profiles): Update.
27461         * loop-doloop.c (doloop_modify): Update.
27462         * loop-unroll.c (report_unroll): Update.
27463         (unroll_loop_runtime_iterations): Update.
27464         * lto-cgraph.c (lto_output_edge): Update.
27465         (lto_output_node): Update.
27466         (input_node): Update.
27467         (input_edge): Update.
27468         (merge_profile_summaries): Update.
27469         * lto-streamer-in.c (input_cfg): Update.
27470         * lto-streamer-out.c (output_cfg): Update.
27471         * mcf.c (create_fixup_graph): Update.
27472         (adjust_cfg_counts): Update.
27473         (sum_edge_counts): Update.
27474         * modulo-sched.c (sms_schedule): Update.
27475         * postreload-gcse.c (eliminate_partially_redundant_load): Update.
27476         * predict.c (maybe_hot_count_p): Update.
27477         (probably_never_executed): Update.
27478         (dump_prediction): Update.
27479         (combine_predictions_for_bb): Update.
27480         (propagate_freq): Update.
27481         (handle_missing_profiles): Update.
27482         (counts_to_freqs): Update.
27483         (rebuild_frequencies): Update.
27484         (force_edge_cold): Update.
27485         * predict.h: Include profile-count.h
27486         (maybe_hot_count_p, counts_to_freqs): UPdate.
27487         * print-rtl-function.c: Do not include cfg.h
27488         * print-rtl.c: Include basic-block.h
27489         * profile-count.c: New file.
27490         * profile-count.h: New file.
27491         * profile.c (is_edge_inconsistent): Update.
27492         (correct_negative_edge_counts): Update.
27493         (is_inconsistent): Update.
27494         (set_bb_counts): Update.
27495         (read_profile_edge_counts): Update.
27496         (compute_frequency_overlap): Update.
27497         (compute_branch_probabilities): Update; Initialize and deinitialize
27498         gcov_count tables.
27499         (branch_prob): Update.
27500         * profile.h (bb_gcov_counts, edge_gcov_counts): New.
27501         (edge_gcov_count): New.
27502         (bb_gcov_count): New.
27503         * shrink-wrap.c (try_shrink_wrapping): Update.
27504         * tracer.c (better_p): Update.
27505         * trans-mem.c (expand_transaction): Update.
27506         (ipa_tm_insert_irr_call): Update.
27507         (ipa_tm_insert_gettmclone_call): Update.
27508         * tree-call-cdce.c: Update.
27509         * tree-cfg.c (gimple_duplicate_sese_region): Update.
27510         (gimple_duplicate_sese_tail): Update.
27511         (gimple_account_profile_record): Update.
27512         (execute_fixup_cfg): Update.
27513         * tree-inline.c (copy_bb): Update.
27514         (copy_edges_for_bb): Update.
27515         (initialize_cfun): Update.
27516         (freqs_to_counts): Update.
27517         (copy_cfg_body): Update.
27518         (expand_call_inline): Update.
27519         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
27520         * tree-ssa-loop-ivcanon.c (unloop_loops): Update.
27521         (try_unroll_loop_completely): Update.
27522         (try_peel_loop): Update.
27523         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
27524         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop): Update.
27525         * tree-ssa-loop-split.c (connect_loops): Update.
27526         * tree-ssa-loop-unswitch.c (hoist_guard): Update.
27527         * tree-ssa-reassoc.c (branch_fixup): Update.
27528         * tree-ssa-tail-merge.c (replace_block_by): Update.
27529         * tree-ssa-threadupdate.c (create_block_for_threading): Update.
27530         (compute_path_counts): Update.
27531         (update_profile): Update.
27532         (recompute_probabilities): Update.
27533         (update_joiner_offpath_counts): Update.
27534         (estimated_freqs_path): Update.
27535         (freqs_to_counts_path): Update.
27536         (clear_counts_path): Update.
27537         (ssa_fix_duplicate_block_edges): Update.
27538         (duplicate_thread_path): Update.
27539         * tree-switch-conversion.c (case_bit_test_cmp): Update.
27540         (struct switch_conv_info): Update.
27541         * tree-tailcall.c (decrease_profile): Update.
27542         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
27543         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
27544         * value-prof.c (check_counter): Update.
27545         (gimple_divmod_fixed_value): Update.
27546         (gimple_mod_pow2): Update.
27547         (gimple_mod_subtract): Update.
27548         (gimple_ic_transform): Update.
27549         (gimple_stringop_fixed_value): Update.
27550         * value-prof.h (gimple_ic): Update.
27552 2017-06-02  Carl Love  <cel@us.ibm.com>
27554         * config/rs6000/rs6000-c: Add support for built-in functions
27555         vector double vec_doublee (vector signed int);
27556         vector double vec_doublee (vector unsigned int);
27557         vector double vec_doublee (vector float);
27558         vector double vec_doubleh (vector signed int);
27559         vector double vec_doubleh (vector unsigned int);
27560         vector double vec_doubleh (vector float);
27561         vector double vec_doublel (vector signed int);
27562         vector double vec_doublel (vector unsigned int);
27563         vector double vec_doublel (vector float);
27564         vector double vec_doubleo (vector signed int);
27565         vector double vec_doubleo (vector unsigned int);
27566         vector double vec_doubleo (vector float);.
27567         * config/rs6000/rs6000-builtin.def: Add definitions for DOUBLEE,
27568         DOUBLEO, DOUBLEH, DOUBLEL, UNS_DOUBLEO, UNS_DOUBLEE, UNS_DOUBLEH,
27569         UNS_DOUBLEL.
27570         * config/rs6000/altivec.md: Add code generator for doublee<mode>2,
27571         unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2, doubleh<mode>2,
27572         unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2, add mode attribute
27573         VS_sxwsp.
27574         * config/rs6000/altivec.h: Add define for vec_doublee, vec_doubleo,
27575         vec_doublel, vec_doubleh.
27576         * doc/extend.texi: Update the built-in documentation file for the
27577         new built-in functions.
27579 2017-06-02  David Malcolm  <dmalcolm@redhat.com>
27581         PR jit/80954
27582         * ipa-inline-analysis.c (free_growth_caches): Set
27583         edge_removal_hook_holder to NULL after removing it.
27585 2017-06-02  Sudakshina Das  <sudi.das@arm.com>
27587         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Return CC_SWP for
27588         comparision with zero.
27590 2017-06-02  Will Schmidt  <will_schmidt@vnet.ibm.com>
27591         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
27592         for early expansion of vec_min and vec_max builtins.
27593         (builtin_function_type): Add min/max unsigned variants to those
27594         identified as having unsigned arguments.
27596 2017-06-02  Olivier Hainque  <hainque@adacore.com>
27598         * config/vx-common.h (DWARF_UNWIND_INFO): Switch #define to 1.
27600 2017-06-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27602         * config/aarch64/aarch64-simd.md (*aarch64_simd_vec_copy_lane<mode>):
27603         Use VALL_F16 iterator rather than VALL.
27605 2017-06-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27607         * config/aarch64/aarch64.c (aarch64_split_compare_and_swap):
27608         Emit CBNZ inside loop when doing a strong exchange and comparing
27609         against zero.  Generate the CC flags after the loop.
27611 2017-06-02  David Edelsohn  <dje.gcc@gmail.com>
27613         * dwarf2out.c (DWARF_INITIAL_LENGTH_SIZE_STR): New.
27614         (dl_section_ref): New.
27615         (dwarf2out_finish): Copy debug_line_section_label to dl_section_ref.
27616         On AIX, append an expression to subtract the size of the
27617         section length to dl_section_ref.
27619 2017-06-02  Will Schmidt  <will_schmidt@vnet.ibm.com>
27621         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
27622         for early expansion of vector absolute builtins.
27624 2017-06-02  Richard Biener  <rguenther@suse.de>
27626         * tree-vect-slp.c (vect_detect_hybrid_slp_2): Match up
27627         what we consider a relevant use stmt with vect_detect_hybrid_slp_stmts.
27629 2017-06-02  Richard Biener  <rguenther@suse.de>
27631         PR tree-optimization/80948
27632         * tree-tailcall.c (find_tail_calls): Track stmts to move in
27633         stmt order as well.
27635 2017-06-02  Richard Biener  <rguenther@suse.de>
27637         * tree-vect-loop.c (vect_analyze_loop_operations): Not relevant
27638         PHIs are ok.
27639         * tree-vect-stmts.c (process_use): Do not mark backedge defs
27640         for inductions as relevant.
27642 2017-06-02  Richard Biener  <rguenther@suse.de>
27644         * tree-vect-loop.c (get_initial_def_for_induction): Inline into ...
27645         (vectorizable_induction): ... this.  Remove dead code.
27647 2017-06-02  Eric Botcazou  <ebotcazou@adacore.com>
27649         * builtins. (expand_builtin_alloca): Remove second parameter and
27650         infer its value from the first parameter instead.
27651         (expand_builtin) <BUILT_IN_ALLOCA>: Adjust call to above.
27653 2017-06-02  Jakub Jelinek  <jakub@redhat.com>
27655         PR rtl-optimization/80903
27656         * loop-doloop.c (add_test): Unshare sequence.
27658 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
27660         * doc/invoke.texi: Document the -Wsizeof-pointer-div warning.
27662 2017-06-01  Bernd Edlinger  <bernd.edlinger@hotmail.de>
27664         * config/i386/i386.c (x86_64_ms_sysv_extra_clobbered_registers): Make
27665         static.
27666         (xlogue_layout::get_stack_space_used, xlogue_layout::s_instances,
27667         xlogue_layout::get_instance, logue_layout::xlogue_layout,
27668         sp_valid_at, fp_valid_at, choose_basereg): Formatting.
27669         (xlogue_layout::get_stub_rtx): Make static.
27670         (xlogue_layout::get_stub_name): Avoid const-cast, make static.
27671         (xlogue_layout::compute_stub_managed_regs): Rename to...
27672         (xlogue_layout::count_stub_managed_regs): ...this.
27673         (xlogue_layout::is_stub_managed_reg): New function.
27674         (xlogue_layout::m_stub_names): Rename to...
27675         (xlogue_layout::s_stub_names): ...this, make static.
27676         (xlogue_layout::STUB_INDEX_OFFSET, xlogue_layout::MIN_REGS,
27677         xlogue_layout::MAX_REGS, xlogue_layout::MAX_EXTRA_REGS,
27678         xlogue_layout::VARIANT_COUNT, xlogue_layout::STUB_NAME_MAX_LEN,
27679         xlogue_layout::s_stub_names): Instantiate statics.
27680         (stub_managed_regs): Remove.
27681         (ix86_save_reg): Use xlogue_layout::compute_stub_managed_regs.
27682         (disable_call_ms2sysv_xlogues): Rename to...
27683         (warn_once_call_ms2sysv_xlogues): ...this, and warn only once.
27684         (ix86_initial_elimination_offset, ix86_expand_call): Fix call_ms2sysv
27685         warning logic.
27686         (ix86_static_chain): Make sure that ix86_static_chain_on_stack can't
27687         change after reload_completed.
27688         (ix86_can_use_return_insn_p): Use the ix86_frame data structure
27689         directly.
27690         (ix86_expand_prologue): Likewise.
27691         (ix86_expand_epilogue): Likewise.
27692         (ix86_expand_split_stack_prologue): Likewise.
27693         (ix86_compute_frame_layout): Remove frame parameter ...
27694         (TARGET_COMPUTE_FRAME_LAYOUT): ... and export it as a target hook.
27695         (ix86_finalize_stack_realign_flags): Call ix86_compute_frame_layout
27696         only if necessary.
27697         (ix86_init_machine_status): Don't set use_fast_prologue_epilogue_nregs.
27698         (ix86_frame): Move from here ...
27699         * config/i386/i386.h (ix86_frame): ... to here.
27700         (machine_function): Remove use_fast_prologue_epilogue_nregs, cache the
27701         complete ix86_frame data structure instead.  Remove some_ld_name.
27703 2017-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
27705         * dwarf2out.c (dwarf2out_late_global_decl): Add locations for
27706         symbols that hold a DECL_VALUE_EXPR.
27708 2017-06-01  Martin Jambor  <mjambor@suse.cz>
27710         PR tree-optimization/80898
27711         * tree-sra.c (process_subtree_disqualification): Removed.
27712         (disqualify_candidate): Do not acll
27713         process_subtree_disqualification.
27714         (subtree_mark_written_and_enqueue): New function.
27715         (propagate_all_subaccesses): Set grp_write of LHS subtree if the
27716         RHS has been disqualified and re-queue LHS if necessary.  Apart
27717         from that, ignore disqualified RHS.
27719 2017-06-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27721         * config/s390/s390.c (s390_emit_epilogue): Disable early return
27722         address fetch for z10 or later.
27724 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
27726         * config/arc/arc.md (tst_movb): Add guard when splitting.
27728 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
27730         * config/arc/arc.c (arc_can_eliminate): Test against
27731         arc_frame_pointer_needed.
27733 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
27735         * config/arc/arc.c (arc_expand_prologue): Emit a special barrier
27736         to prevent store reordering.
27737         * config/arc/arc.md (UNSPEC_ARC_STKTIE): Define.
27738         (type): Add block type.
27739         (stack_tie): Define special instruction to be used in
27740         expand_prologue.
27742 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
27744         * config/arc/arc.md (commutative_binary_comparison): Remove 'I'
27745         constraint. It is not valid for the pattern.
27746         (noncommutative_binary_comparison): Likewise.
27748 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
27750         * config/arc/simdext.md (movv2hi_insn): Change predicate to avoid
27751         scaled addresses.
27753 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
27755         * config/arc/arc.c (arc_conditional_register_usage): Allow r30 to
27756         be used by the reg-alloc.
27758 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
27760         * config/arc/arc.md (mulsi3): Avoid use of hard registers before
27761         reg-alloc when having mul64 or mul32x16 instructions.
27762         (mulsidi3): Likewise.
27763         (umulsidi3): Likewise.
27764         (mulsi32x16): New pattern.
27765         (mulsi64): Likewise.
27766         (mulsidi64): Likewise.
27767         (umulsidi64): Likewise.
27768         (MUL32x16_REG): Define.
27769         (mul64_600): Use MUL32x16_REG.
27770         (mac64_600): Likewise.
27771         (umul64_600): Likewise.
27772         (umac64_600): Likewise.
27774 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
27776         * config/arc/arc.md (mulsi3_700): Make it commutative.
27778 2017-06-01  Jose E. Marchesi  <jose.marchesi@oracle.com>
27780         * config/sparc/sparc.md (*zero_extendsidi2_insn_sp64): Set insn
27781         type for movstouw.
27782         (*sign_extendsidi2_insn): Likewise for movstosw.
27784 2017-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
27786         * dwarf2out.c (get_discr_value): Call the get_debug_type hook on
27787         the type of the input discriminant value.  Convert the
27788         discriminant value of signedness vary.
27790 2017-06-01  Volker Reichelt  <v.reichelt@netcologne.de>
27792         * doc/invoke.texi (-Wcatch-value): Document new shortcut.
27793         Add to -Wall section.
27795 2017-06-01  Richard Biener  <rguenther@suse.de>
27797         PR middle-end/66313
27798         * fold-const.c (fold_plusminus_mult_expr): If the factored
27799         factor may be zero use a wrapping type for the inner operation.
27800         * tree-tailcall.c (independent_of_stmt_p): Pass in to_move bitmap
27801         and handle moved defs.
27802         (process_assignment): Properly guard the unary op case.  Return a
27803         tri-state indicating that moving the stmt before the call may allow
27804         to continue.  Pass through to_move.
27805         (find_tail_calls): Handle moving unrelated defs before
27806         the call.
27808 2017-05-31  Segher Boessenkool  <segher@kernel.crashing.org>
27810         PR target/80618
27811         * config/rs6000/vector.md (*vector_uneq<mode>): Write the nor in the
27812         splitter result in the canonical way.
27814 2017-05-31  Uros Bizjak  <ubizjak@gmail.com>
27816         * config/i386/i386.md (*zero_extendsidi2): Enable alternative (?r, *Yj)
27817         also for 32bit target.  Update insn attributes.
27818         (zero-extendsidi2 splitter): Allow all registers for operand 1.
27820 2017-05-31  Sebastian Peryt  <sebastian.peryt@intel.com>
27822         * config/i386/avx512fintrin.h (_mm_mask_max_sd)
27823         (_mm_maskz_max_sd, _mm_mask_max_ss, _mm_maskz_max_ss)
27824         (_mm_mask_min_sd, _mm_maskz_min_sd, _mm_mask_min_ss)
27825         (_mm_maskz_min_ss): New intrinsics.
27827 2017-05-31  Martin Liska  <mliska@suse.cz>
27829         * tree-vect-loop.c (vect_create_epilog_for_reduction):
27830         Change comment style to one we normally use.
27831         (vectorizable_reduction): Likewise.
27832         (vectorizable_induction): Likewise.
27833         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
27834         (vectorizable_call): Likewise.
27835         (vectorizable_simd_clone_call): Likewise.
27836         (vectorizable_conversion): Likewise.
27837         (vectorizable_assignment): Likewise.
27838         (vectorizable_shift): Likewise.
27839         (vectorizable_operation): Likewise.
27840         (vectorizable_store): Likewise.
27841         (vectorizable_load): Likewise.
27842         * tree-vectorizer.h: Likewise.
27844 2017-05-31  Alexander Monakov  <amonakov@ispras.ru>
27846         * passes.c (emergency_dump_function): New.
27847         * tree-pass.h (emergency_dump_function): Declare.
27848         * plugin.c (plugins_internal_error_function): Remove.
27849         * plugin.h (plugins_internal_error_function): Remove declaration.
27850         * toplev.c (internal_error_function): New static function.  Use it...
27851         (general_init): ...here.
27853 2017-05-31  Graham Markall  <graham.markall@embecosm.com>
27855         * config/arc/arc.c (arc_print_operand): Handle constant operands.
27856         (arc_rtx_costs): Add costs for new patterns.
27857         * config/arc/arc.md: Additional *add_n and *sub_n patterns.
27858         * config/arc/predicates.md: Add _1_2_3_operand predicate.
27860 2017-05-31  Richard Sandiford  <richard.sandiford@linaro.org>
27862         * tree-ssa-strlen.c (get_next_strinfo): New function.
27863         (get_stridx_plus_constant): Use it.
27864         (zero_length_string): Likewise.
27865         (adjust_related_strinfos): Likewise.
27866         (adjust_last_stmt): Likewise.
27868 2017-05-31  Richard Biener  <rguenther@suse.de>
27870         PR target/80880
27871         * config/i386/i386.c (ix86_expand_builtin): Remove assert
27872         for arg being an SSA name when expanding IX86_BUILTIN_BNDRET.
27874 2017-05-31  Richard Sandiford  <richard.sandiford@linaro.org>
27876         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Remove
27877         loop_vinfo argument and use of dependence distance vectors.
27878         Check instead whether the two references differ only in their
27879         initial value and assume that they have the same alignment if the
27880         difference is a multiple of the vector alignment.
27881         (vect_analyze_data_refs_alignment): Update call accordingly.
27883 2017-05-31  Martin Liska  <mliska@suse.cz>
27885         PR target/79155
27886         * config/i386/cpuid.h: Fix typo in a comment in cpuid.h.
27888 2017-05-31  Bin Cheng  <bin.cheng@arm.com>
27890         * tree-vect-loop-manip.c (create_intersect_range_checks_index)
27891         (create_intersect_range_checks): Move from ...
27892         * tree-data-ref.c (create_intersect_range_checks_index)
27893         (create_intersect_range_checks): ... to here.
27894         (create_runtime_alias_checks): New function factored from ...
27895         * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): ...
27896         here.  Call above function.
27897         * tree-data-ref.h (create_runtime_alias_checks): New function.
27899 2017-05-31  Bin Cheng  <bin.cheng@arm.com>
27901         * tree-data-ref.c (prune_runtime_alias_test_list): Relax minimal
27902         segment length for dr_b and compute it in wide_int.
27904 2017-05-31  Richard Biener  <rguenther@suse.de>
27906         PR tree-optimization/80906
27907         * graphite-isl-ast-to-gimple.c (copy_loop_close_phi_nodes): Get
27908         and pass through iv_map.
27909         (copy_bb_and_scalar_dependences): Adjust.
27910         (translate_pending_phi_nodes): Likewise.
27911         (copy_loop_close_phi_args): Handle code-generating IVs instead
27912         of ICEing.
27914 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
27916         * diagnostic-color.c (color_dict): Add "type-diff".
27917         (parse_gcc_colors): Update comment.
27918         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
27919         -fdiagnostics-show-template-tree and -fno-elide-type.
27920         (GCC_COLORS): Add type-diff to example.
27921         (type-diff=): New.
27922         (-fdiagnostics-show-template-tree): New.
27923         (-fno-elide-type): New.
27924         * pretty-print.c (pp_format): Pass quote and formatters[argno] to
27925         the pp_format_decoder callback.  Call any m_format_postprocessor's
27926         "handle" method.
27927         (pretty_printer::pretty_printer): Initialize
27928         m_format_postprocessor.
27929         (pretty_printer::~pretty_printer): Delete any
27930         m_format_postprocessor.
27931         * pretty-print.h (printer_fn): Add bool and const char ** parameters.
27932         (class format_postprocessor): New class.
27933         (struct pretty_printer::format_decoder): Document the new parameters.
27934         (struct pretty_printer::m_format_postprocessor): New field.
27935         * tree-diagnostic.c (default_tree_printer): Update for new
27936         bool and const char ** params.
27937         * tree-diagnostic.h (default_tree_printer): Likewise.
27939 2017-05-30  Segher Boessenkool  <segher@kernel.crashing.org>
27941         * config/rs6000/predicates.md (cc_reg_not_micro_cr0_operand): Delete.
27942         (lwa_operand): Delete rs6000_gen_cell_microcode test.
27943         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
27944         rs6000_gen_cell_microcode code.
27945         (rs6000_final_prescan_insn): Delete.
27946         (rs6000_opt_vars): Delete the "gen-cell-microcode" and
27947         "warn-cell-microcode" entries.
27948         * config/rs6000/rs6000.h (FINAL_PRESCAN_INSN): Delete.
27949         * config/rs6000/rs6000.md: Delete rs6000_gen_cell_microcode tests
27950         throughout.  Change cc_reg_not_micro_cr0_operand to
27951         cc_reg_not_cr0_operand throughout.
27952         (*extendhi<mode>2_noload): Delete.
27953         * config/rs6000/rs6000.opt (mgen-cell-microcode): Replace by stub.
27954         (mwarn-cell-microcode): Delete.
27955         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete
27956         -mgen-cell-microcode and -mwarn-cell-microcode.
27958 2017-05-30  Uros Bizjak  <ubizjak@gmail.com>
27960         PR target/80833
27961         * config/i386/constraints.md (Yd): New constraint.
27962         (Ye): Ditto.
27963         * config/i386/i386.md (*movti_internal): Add (?r, Ye)
27964         and (?Yd, r) alternatives.  Update insn attributes.
27965         * config/i386/i386.md (*movti_internal): Add (?r, *Ye)
27966         and (?*Yd, r) alternatives.  Update insn attributes.
27967         (double-mode inter-unit splitters): Add new GR<->XMM splitters.
27969 2017-05-30  Pierre-Marie de Rodat  <derodat@adacore.com>
27971         * gimplify.c (gimplify_modify_expr): Don't create a
27972         DECL_DEBUG_EXPR link if *FROM_P does not belong to the current
27973         function.
27975 2017-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
27977         * config/arm/arm-builtins.c (arm_expand_builtin): Remove const.
27979 2017-05-30  Richard Biener  <rguenther@suse.de>
27981         * tree-vectorizer.h (struct _stmt_vec_info): Add reduc_type
27982         and reduc_def fields.
27983         (STMT_VINFO_REDUC_TYPE): New define.
27984         (STMT_VINFO_REDUC_DEF): Likewise.
27985         (vect_force_simple_reduction): Adjust prototype.
27986         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Adjust.
27987         (vect_is_simple_reduction): Remove check_reduction argument.
27988         (vect_force_simple_reduction): Adjust and set
27989         STMT_VINFO_REDUC_TYPE and STMT_VINFO_REDUC_DEF.
27990         (vectorizable_reduction): Do not re-do reduction analysis
27991         but use STMT_VINFO_REDUC_TYPE and STMT_VINFO_REDUC_DEF.
27992         * tree-parloops.c (gather_scalar_reductions): Adjust.
27994 2017-05-30  Richard Biener  <rguenther@suse.de>
27996         PR middle-end/80901
27997         * cfgexpand.c (expand_gimple_cond): Match up loop fixup with
27998         split_edge code.
28000 2017-05-24  Robin Dapp  <rdapp@linux.vnet.ibm.com>
28002         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs):
28003         Introduce unknown_misalignment parameter and remove vf.
28004         (vect_peeling_hash_get_lowest_cost):
28005         Pass unknown_misalignment parameter.
28006         (vect_enhance_data_refs_alignment):
28007         Fix unsupportable data ref treatment.
28009 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
28011         * tree-vect-data-refs.c (vect_get_data_access_cost):
28012         Workaround for SLP handling.
28013         (vect_enhance_data_refs_alignment):
28014         Compute costs for doing no peeling at all, compare to the best
28015         peeling costs so far and avoid peeling if cheaper.
28017 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
28019         * tree-vect-data-refs.c (vect_peeling_hash_choose_best_peeling):
28020         Return peeling info and set costs to zero for unlimited cost
28021         model.
28022         (vect_enhance_data_refs_alignment): Also inspect all datarefs
28023         with unknown misalignment. Compute and costs for unknown
28024         misalignment, compare them to the costs for known misalignment
28025         and choose the cheapest for peeling.
28027 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
28029         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Rename.
28030         (vect_get_peeling_costs_all_drs): Create function.
28031         (vect_peeling_hash_get_lowest_cost):
28032         Use vect_get_peeling_costs_all_drs.
28033         (vect_peeling_supportable): Create function.
28034         (vect_enhance_data_refs_alignment): Use vect_peeling_supportable.
28036 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
28038         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Create
28039         DR_HAS_NEGATIVE_STEP.
28040         (vect_update_misalignment_for_peel): Define DR_MISALIGNMENT.
28041         (vect_enhance_data_refs_alignment): Use.
28042         (vect_duplicate_ssa_name_ptr_info): Use.
28043         * tree-vectorizer.h (dr_misalignment): Use.
28044         (known_alignment_for_access_p): Use.
28046 2017-05-30  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
28048         PR target/78838
28049         * config/msp430/msp430.c (gen_prefix): Return NULL when section name is
28050         .lowtext.
28051         (has_section_name): New function.
28053 2017-05-30  Martin Liska  <mliska@suse.cz>
28055         PR other/80909
28056         * auto-profile.c (get_function_decl_from_block): Fix
28057         parenthesis.
28059 2017-05-30  Richard Biener  <rguenther@suse.de>
28061         PR middle-end/80876
28062         * cfgexpand.c (expand_gimple_cond): Fixup preserving loops again.
28064 2017-05-30  Martin Liska  <mliska@suse.cz>
28066         * dumpfile.c: Use newly added macro DUMP_FILE_INFO.
28067         * dumpfile.h (struct dump_file_info): Remove ctors.
28069 2017-05-30  Martin Liska  <mliska@suse.cz>
28071         * predict.def: Fix GNU coding style.
28073 2017-05-29  Max Filippov  <jcmvbkbc@gmail.com>
28075         * config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
28076         Mark 'to' argument with ATTRIBUTE_UNUSED.
28078 2017-05-29  Max Filippov  <jcmvbkbc@gmail.com>
28080         * config/xtensa/xtensa.c (xtensa_emit_call): Use
28081         HOST_WIDE_INT_PRINT_HEX instead of 0x%lx format string.
28082         (print_operand): Use HOST_WIDE_INT_PRINT_DEC instead of %ld
28083         format string.
28085 2017-05-29  Eric Botcazou  <ebotcazou@adacore.com>
28087         * doc/install.texi (Options specification): Restore entry of
28088         --enable-sjlj-exceptions.
28090 2017-05-27  Michael Eager  <eager@eagercon.com>
28092         Revert:
28093         2016-01-21  Ajit Agarwal  <ajitkum@xilinx.com>
28095         See https://gcc.gnu.org/ml/gcc/2017-05/msg00221.html.
28097         * config/microblaze/microblaze.h
28098         (FIXED_REGISTERS): Update in macro.
28099         (CALL_USED_REGISTERS): Update in macro.
28101 2017-05-27  François-Xavier Coudett  <fxcoudert@gcc.gnu.org>
28103         * doc/install.texi: Add links to macOS binary distributions.
28105 2017-05-27  Jakub Jelinek  <jakub@redhat.com>
28107         PR bootstrap/80887
28108         Revert:
28109         2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
28111         * match.pd ((A +- CST1) +- CST2): Allow some conversions.
28113 2017-05-26  Martin Liska  <mliska@suse.cz>
28115         * dumpfile.h (enum dump_kind): Renumber TDF_* flags to be contiguous.
28117 2017-05-26  Martin Liska  <mliska@suse.cz>
28119         * cfg.c (check_bb_profile): Do not use TDF_COMMENT and print
28120         always leading ';; '.
28121         (dump_bb_info): Likewise.
28122         (brief_dump_cfg): Likewise.
28123         * cfgrtl.c (print_rtl_with_bb): Do not use TDF_COMMENT.
28124         * dumpfile.c: Remove usage of TDF_VERBOSE.
28125         * dumpfile.h (enum dump_kind): Likewise.
28126         (dump_gimple_bb_header): Do not use TDF_COMMENT.
28127         * print-tree.c (debug_verbose): Remove.
28128         * tree-cfg.c (gimple_dump_cfg): Do not use TDF_COMMENT.
28129         (dump_function_to_file): Remove dumps guarded with TDF_VERBOSE.
28130         * tree-diagnostic.c (default_tree_printer): Replace
28131         TDF_DIAGNOSTIC with TDF_SLIM.
28133 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
28135         * tree-vect-loop-manip.c (create_intersect_range_checks_index): Pass
28136         in parameter loop, rather than loop_vinfo.
28137         (create_intersect_range_checks): Ditto.
28138         (vect_create_cond_for_alias_checks): Update call to above functions.
28140 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
28142         PR tree-optimization/80815
28143         * tree-data-ref.c (prune_runtime_alias_test_list): Simplify condition
28144         for merging runtime alias checks.  Handle negative DR_STEPs.
28146 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
28148         * tree-vect-data-refs.c (Operator==, comp_dr_with_seg_len_pair):
28149         Move from ...
28150         * tree-data-ref.c (Operator==, comp_dr_with_seg_len_pair): To here.
28151         * tree-vect-data-refs.c (vect_prune_runtime_alias_test_list): Factor
28152         out code pruning runtime alias checks.
28153         * tree-data-ref.c (prune_runtime_alias_test_list): New function
28154         factored out from above.
28155         * tree-vectorizer.h (struct dr_with_seg_len, dr_with_seg_len_pair_t):
28156         Move from ...
28157         * tree-data-ref.h (struct dr_with_seg_len, dr_with_seg_len_pair_t):
28158         ... to here.
28159         (prune_runtime_alias_test_list): New decalaration.
28161 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
28163         * tree-vect-data-refs.c (compare_tree): Rename and move ...
28164         * tree-data-ref.c (data_ref_compare_tree): ... to here.
28165         * tree-data-ref.h (data_ref_compare_tree): New decalaration.
28166         * tree-vect-data-refs.c (dr_group_sort_cmp): Update uses.
28167         (operator==, comp_dr_with_seg_len_pair): Ditto.
28168         (vect_prune_runtime_alias_test_list): Ditto.
28170 2017-05-26  Martin Liska  <mliska@suse.cz>
28172         PR ipa/80663
28173         * params.def: Bound partial-inlining-entry-probability param.
28175 2017-05-26  Marek Polacek  <polacek@redhat.com>
28177         PR sanitizer/80875
28178         * fold-const.c (fold_binary_loc) <case MULT_EXPR>: Check if OP1
28179         can be negated.
28181 2017-05-26  Richard Biener  <rguenther@suse.de>
28183         PR tree-optimization/80842
28184         * tree-ssa-ccp.c (set_lattice_value): Always meet with the old
28185         value.
28187 2017-05-26  Richard Biener  <rguenther@suse.de>
28189         PR tree-optimization/80844
28190         * tree-vectorizer.c (adjust_simduid_builtins): Propagate results.
28192 2017-05-25  Sebastian Peryt  <sebastian.peryt@intel.com>
28194         * doc/md.texi (Machine Constraints): Update x86 family
28195         machine constraints section to match 'config/i386/constraints.md'.
28197 2017-05-25  Volker Reichelt  <v.reichelt@netcologne.de>
28199         * doc/invoke.texi (-Wcatch-value=): Document new warning option.
28201 2017-05-25  Nathan Sidwell  <nathan@acm.org>
28203         * doc/invoke.texi (--enable-languages): Update documentation.
28205 2017-05-25  Martin Liska  <mliska@suse.cz>
28207         * dumpfile.c: Add TDF_FOLDING.
28208         * dumpfile.h (enum dump_kind): Likewise.
28209         * genmatch.c (dt_simplify::gen_1): Use it.
28211 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
28213         * match.pd (view_convert (convert@0 @1)): Handle zero-extension.
28215 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
28217         * match.pd ((A +- CST1) +- CST2): Allow some conversions.
28218         * tree.c (drop_tree_overflow): Handle COMPLEX_CST and VECTOR_CST.
28220 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
28222         * fold-const.c (fold_binary_loc) [(A & C) == D]: Remove transformation.
28223         * match.pd (X == C): Rewrite it here.
28224         (with_possible_nonzero_bits, with_possible_nonzero_bits2,
28225         with_certain_nonzero_bits2): New predicates.
28226         * tree-ssanames.c (get_nonzero_bits): Handle INTEGER_CST.
28228 2017-05-24  Nathan Sidwell  <nathan@acm.org>
28230         * lto-streamer-in.c (lto_input_data_block): Adjust T const cast to
28231         avoid warning.
28233         * auto-profile.c (afdo_propagate): Adjust T const cast to avoid
28234         warning.
28236 2017-05-24  Segher Boessenkool  <segher@kernel.crashing.org>
28238         * config/powerpcspe: New port.  Files are copied from the rs6000
28239         port, with "rs6000" in filenames replaced by "powerpcspe".
28241 2017-05-24  Wilco Dijkstra  <wdijkstr@arm.com>
28243         PR rtl-optimization/80754
28244         * lra-remat.c (do_remat): Add overlap checks for dst_regno.
28246 2017-05-24  Sheldon Lobo  <smlobo@sheldon.us.oracle.com>
28248         * config/sparc/sparc.md (length): Return the correct value for -mflat
28249         sibcalls to match output_sibcall.
28251 2017-05-24  Segher Boessenkool  <segher@kernel.crashing.org>
28253         PR bootstrap/80860
28254         PR bootstrap/80843
28255         * config/rs6000/rs6000.c (struct machine_function): Add new field
28256         n_components.
28257         (rs6000_get_separate_components): Init that field, use it.
28258         (rs6000_components_for_bb): Use the field.
28260 2017-05-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>
28262         * config/arm/arm.c (arm_expand_prologue): Fix typo in comment.
28264 2017-05-24  Peter Bergner  <bergner@vnet.ibm.com>
28266         PR middle-end/80823
28267         * tree-cfg.c (group_case_labels_stmt): Delete increment of "i";
28269 2017-05-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
28271         PR target/80725
28272         * config/s390/s390.c (s390_check_qrst_address): Check incoming
28273         address against address_operand predicate.
28274         * config/s390/s390.md ("*indirect_jump"): Swap alternatives.
28276 2017-05-24  Eric Botcazou  <ebotcazou@adacore.com>
28278         * var-tracking.c (track_expr_p): Do not return 0 for tracked record
28279         parameters passed indirectly.
28281 2017-05-23  Uros Bizjak  <ubizjak@gmail.com>
28283         * config/i386/i386.md (*movdi_internal): Remove SSE4
28284         alternative 18 (?r, *v).  Update insn attributes.
28285         (*movsi_internal): Remove SSE4 alternative 13 (?r, *v).
28286         Update insn attributes.
28287         (*zero_extendsidi2): Remove SSE4 alternative (?r, *x).
28288         Update insn attributes.
28289         * config/i386/sse.md (vec_extract<ssevecmodelower>_0): Remove SSE4
28290         alternative 1 (r, v). Remove isa attribute.
28291         * config/i386/i386.c (dimode_scalar_chain::make_vector_copies):
28292         Always move value through stack for !TARGET_INTER_UNIT_MOVES_TO_VEC
28293         and !TARGET_INTER_UNIT_MOVES_TO_VEC targets.
28295 2017-05-23  Tom de Vries  <tom@codesourcery.com>
28297         * doc/sourcebuild.texi (Directives, Verify compiler message): Document
28298         dg-line directive.
28300 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
28302         * cgraphunit.c (symbol_table::process_new_functions): Update.
28303         * ipa-fnsummary.c (pass_data_inline_parameters): Remove.
28304         (inline_generate_summary): Rename to ...
28305         (ipa_fn_summary_generate): ... this one.
28306         (inline_read_summary): Rename to ...
28307         (ipa_fn_summary_read): ... this one.
28308         (inline_write_summary): Rename to ...
28309         (ipa_fn_summary_write): ... this one.
28310         (inline_free_summary): Rename to ...
28311         (ipa_free_fn_summary): ... this one.
28312         (pass_data_local_fn_summary, pass_local_fn_summary,
28313         make_pass_local_fn_summary, pass_data_ipa_free_fn_summary,
28314         pass_ipa_free_fn_summary, make_pass_ipa_free_fn_summary,
28315         pass_data_ipa_fn_summary, pass_ipa_fn_summary,
28316         make_pass_ipa_fn_summary): New.
28317         * ipa-fnsummary.h (inline_generate_summary, inline_read_summary,
28318         inline_write_summary, inline_free_summary): Remove.
28319         (ipa_free_fn_summary) : New.
28320         * ipa-inline.c (ipa_inline): Update.
28321         (pass_ipa_inline): Do not generate summaries.
28322         * ipa.c (pass_data_ipa_free_fn_summary, pass_ipa_free_fn_summary):
28323         Remove.
28324         * passes.def: Replace pass_inline_parameters by pass_local_fn_summary
28325         and add pass_ipa_fn_summary.
28326         * tree-pass.h (make_pass_ipa_fn_summary, make_pass_local_fn_summary):
28327         New.
28328         (make_pass_inline_parameters): Remove.
28330 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
28332         * omp-low.c (struct omp_context): Remove "default_kind" member.
28333         Adjust all users.
28335         * omp-offload.c (execute_oacc_device_lower): Remove the
28336         parallelism dimensions function attributes for unparallelized
28337         OpenACC kernels constructs.
28339 2017-05-23  Martin Liska  <mliska@suse.cz>
28341         * cgraph.c (cgraph_node::get_create): Use symtab_node::dump_{asm_,}name
28342         functions.
28343         (cgraph_edge::make_speculative): Likewise.
28344         (cgraph_edge::resolve_speculation): Likewise.
28345         (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
28346         (cgraph_node::dump): Likewise.
28347         * cgraph.h: Likewise.
28348         * cgraphunit.c (analyze_functions): Likewise.
28349         (symbol_table::compile): Likewise.
28350         * ipa-cp.c (print_all_lattices): Likewise.
28351         (determine_versionability): Likewise.
28352         (initialize_node_lattices): Likewise.
28353         (ipcp_verify_propagated_values): Likewise.
28354         (estimate_local_effects): Likewise.
28355         (update_profiling_info): Likewise.
28356         (create_specialized_node): Likewise.
28357         (perhaps_add_new_callers): Likewise.
28358         (decide_about_value): Likewise.
28359         (decide_whether_version_node): Likewise.
28360         (identify_dead_nodes): Likewise.
28361         (ipcp_store_bits_results): Likewise.
28362         * ipa-devirt.c (dump_targets): Likewise.
28363         (ipa_devirt): Likewise.
28364         * ipa-icf.c (sem_item::dump): Likewise.
28365         (sem_function::equals): Likewise.
28366         (sem_variable::equals): Likewise.
28367         (sem_item_optimizer::read_section): Likewise.
28368         (sem_item_optimizer::execute): Likewise.
28369         (congruence_class::dump): Likewise.
28370         * ipa-inline-analysis.c (dump_ipa_call_summary): Likewise.
28371         (dump_inline_summary): Likewise.
28372         (estimate_node_size_and_time): Likewise.
28373         (inline_analyze_function): Likewise.
28374         * ipa-inline-transform.c (inline_call): Likewise.
28375         * ipa-inline.c (report_inline_failed_reason): Likewise.
28376         (want_early_inline_function_p): Likewise.
28377         (edge_badness): Likewise.
28378         (update_edge_key): Likewise.
28379         (inline_small_functions): Likewise.
28380         * ipa-profile.c (ipa_profile): Likewise.
28381         * ipa-prop.c (ipa_print_node_jump_functions): Likewise.
28382         (ipa_make_edge_direct_to_target): Likewise.
28383         (remove_described_reference): Likewise.
28384         (ipa_impossible_devirt_target): Likewise.
28385         (propagate_controlled_uses): Likewise.
28386         (ipa_print_node_params): Likewise.
28387         (ipcp_transform_function): Likewise.
28388         * ipa-pure-const.c (pure_const_read_summary): Likewise.
28389         (propagate_pure_const): Likewise.
28390         * ipa-reference.c (generate_summary): Likewise.
28391         (read_write_all_from_decl): Likewise.
28392         (propagate): Likewise.
28393         (ipa_reference_read_optimization_summary): Likewise.
28394         * ipa-utils.c (ipa_merge_profiles): Likewise.
28395         * ipa.c (walk_polymorphic_call_targets): Likewise.
28396         (symbol_table::remove_unreachable_nodes): Likewise.
28397         (ipa_single_use): Likewise.
28398         * passes.c (execute_todo): Likewise.
28399         * predict.c (drop_profile): Likewise.
28400         * symtab.c (symtab_node::get_dump_name): New function.
28401         (symtab_node::dump_name): Likewise.
28402         (symtab_node::dump_asm_name): Likewise.
28403         (symtab_node::dump_references): Likewise.
28404         (symtab_node::dump_referring): Likewise.
28405         (symtab_node::dump_base): Likewise.
28406         (symtab_node::debug_symtab): Likewise.
28407         * tree-sra.c (convert_callers_for_node): Likewise.
28408         * tree-ssa-structalias.c (ipa_pta_execute): Likewise.
28409         * value-prof.c (init_node_map): Likewise.
28411 2017-05-23  Martin Liska  <mliska@suse.cz>
28413         * cgraph.h: Move symtab_node::dump_table to symbol_table::dump
28414         and symtab_node::debug_symtab to symbol_table::debug.
28415         * cgraphunit.c (analyze_functions): Use the renamed function.
28416         (symbol_table::compile): Likewise.
28417         * ipa-cp.c (ipcp_verify_propagated_values): Likewise.
28418         * ipa-icf.c (sem_item_optimizer::execute): Likewise.
28419         * passes.c (execute_todo): Likewise.
28420         * symtab.c (symbol_table::dump): New function.
28421         * tree-ssa-structalias.c (ipa_pta_execute): Use the renamed function.
28423 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
28425         * ipa-fnsummary.c (estimate_node_size_and_time): Do not sanity check
28426         that nonconst implies exec.
28428 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
28430         * ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list,
28431         inline_edge_removal_hook, inline_edge_duplication_hook): Remove.
28432         (inline_edge_summary_vec): Turn into ...
28433         (ipa_call_summaries): ... this one.
28434         (redirect_to_unreachable, edge_set_predicate,
28435         evaluate_properties_for_edge, inline_summary_alloc,
28436         reset_ipa_call_summary, reset_inline_summary,
28437         inline_summary_t::duplicate): Update.
28438         (inline_edge_duplication_hook): Turn to ...
28439         (ipa_call_summary_t::duplicate): ... this one.
28440         (inline_edge_removal_hook): Turn to ...
28441         (ipa_call_summary_t::remove): ... this one.
28442         (dump_inline_edge_summary): Turn to ...
28443         (dump_ipa_call_summary): ... this one.
28444         (estimate_function_body_sizes): Update.
28445         (inline_update_callee_summaries): Update.
28446         (remap_edge_change_prob): Update.
28447         (remap_edge_summaries): Update.
28448         (inline_merge_summary): Update.
28449         (do_estimate_edge_time): Update.
28450         (inline_generate_summary): Update.
28451         (inline_read_section): Update.
28452         (inline_read_summary): Update.
28453         (inline_free_summary): Update.
28454         * ipa-inline.c (can_inline_edge_p): Update.
28455         (compute_inlined_call_time): Update.
28456         (want_inline_small_function_p): Update.
28457         (edge_badness): Update.
28458         (early_inliner): Update.
28459         * ipa-inline.h (inline_edge_summary): Turn to ...
28460         (ipa_call_summary): ... this one.
28461         (ipa_call_summary_t): New class.
28462         (inline_edge_summary_t, inline_edge_summary_vec): Remove.
28463         (ipa_call_summaries): New.
28464         (inline_edge_summary): Remove.
28465         (estimate_edge_growth): Update.
28466         * ipa-profile.c (ipa_propagate_frequency_1): Update.
28467         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
28468         * ipa-split.c (execute_split_functions): Update.
28469         * ipa.c (symbol_table::remove_unreachable_nodes): Update.
28471 2017-05-23  Tom de Vries  <tom@codesourcery.com>
28473         * doc/sourcebuild.texi (Effective-Target Keywords, Other hardware
28474         attributes): Document rdrand effective target.
28476 2017-05-23  Tom de Vries  <tom@codesourcery.com>
28478         * doc/sourcebuild.texi (Effective-Target Keywords, Other hardware
28479         attributes): Sort alphabetically.
28481 2017-05-23  Georg-Johann Lay  <avr@gjlay.de>
28483         * config/avr/genmultilib.awk: Use gsub instead of gensub.
28485 2017-05-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
28487         PR target/80718
28488         * config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Split
28489         V2DF/V2DI splat into two separate patterns, one that handles
28490         registers, and the other that only handles memory.  Drop support
28491         for splatting from a GPR on ISA 2.07 and then splitting the
28492         splat into direct move and splat.
28493         (vsx_splat_<mode>_reg): Likewise.
28494         (vsx_splat_<mode>_mem): Likewise.
28496 2017-05-22  Segher Boessenkool  <segher@kernel.crashing.org>
28498         * cfgcleanup.c (bb_is_just_return): Allow CLOBBERs.
28500 2017-05-22  Jakub Jelinek  <jakub@redhat.com>
28502         PR middle-end/80809
28503         * omp-low.c (finish_taskreg_remap): New function.
28504         (finish_taskreg_scan): If unit size of ctx->record_type
28505         is non-constant, unshare the size expression and replace
28506         decls in it with possible outer var refs.
28508         PR middle-end/80809
28509         * gimplify.c (omp_add_variable): For GOVD_DEBUG_PRIVATE use
28510         GOVD_SHARED rather than GOVD_PRIVATE with it.
28511         (gimplify_adjust_omp_clauses_1, gimplify_adjust_omp_clauses): Expect
28512         GOVD_SHARED rather than GOVD_PRIVATE with GOVD_DEBUG_PRIVATE.
28514         PR middle-end/80853
28515         * omp-low.c (lower_reduction_clauses): Pass OMP_CLAUSE_PRIVATE
28516         as last argument to build_outer_var_ref for pointer bases of array
28517         section reductions.
28519 2017-05-19  Martin Sebor  <msebor@redhat.com>
28521         * print-tree.c (print_node): Print DECL_READ_P flag.
28523 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
28525         * Makefile.in: Add ipa-fnsummary.o and ipa-fnsummary.h
28526         * auto-profile.c: Replace ipa-inline.h by ipa-fnsummary.h
28527         * cgraph.c: Likewise.
28528         * cgraphunit.c: Likewise.
28529         * gengtype.c: Likewise.
28530         * ipa-cp.c: Likewise.
28531         * ipa-devirt.c: Likewise.
28532         * ipa-icf.c: Likewise.
28533         * ipa-predicate.c: Likewise.
28534         * ipa-profile.c: Likewise.
28535         * ipa-prop.c: Likewise.
28536         * ipa-split.c: Likewise.
28537         * ipa.c: Likewise.
28538         * ipa-inline-analysis.c (inline_summaries, ipa_call_summaries,
28539         edge_predicate_pool, dump_inline_hints,
28540         inline_summary::account_size_time, redirect_to_unreachable,
28541         edge_set_predicate, set_hint_predicate,
28542         evaluate_conditions_for_known_args, evaluate_properties_for_edge,
28543         inline_summary_alloc, ipa_call_summary::reset, inline_summary::reset,
28544         inline_summary_t::remove, remap_hint_predicate_after_duplication,
28545         inline_summary_t::duplicate, ipa_call_summary_t::duplicate,
28546         ipa_call_summary_t::remove, initialize_growth_caches,
28547         free_growth_caches, dump_ipa_call_summary, dump_inline_summary,
28548         debug_inline_summary, dump_inline_summaries, initialize_inline_failed,
28549         mark_modified, unmodified_parm_1, unmodified_parm,
28550         unmodified_parm_or_parm_agg_item, eliminated_by_inlining_prob,
28551         set_cond_stmt_execution_predicate, set_switch_stmt_execution_predicate,
28552         compute_bb_predicates, will_be_nonconstant_expr_predicate,
28553         will_be_nonconstant_predicate, record_modified_bb_info,
28554         get_minimal_bb, record_modified, param_change_prob,
28555         phi_result_unknown_predicate, predicate_for_phi_result,
28556         array_index_predicate, clobber_only_eh_bb_p, fp_expression_p,
28557         estimate_function_body_sizes, compute_inline_parameters,
28558         compute_inline_parameters_for_curren, pass_data_inline_parameters,
28559         estimate_node_size_and_time, estimate_ipcp_clone_size_and_time,
28560         inline_update_callee_summaries, remap_edge_change_prob,
28561         remap_edge_summaries, remap_hint_predicate, inline_merge_summary,
28562         inline_update_overall_summary, inline_indirect_intraprocedural_analysis,
28563         inline_analyze_function, inline_summary_t::insert,
28564         inline_generate_summary, read_ipa_call_summary, inline_read_section,
28565         inline_read_summary, write_ipa_call_summary, inline_write_summary,
28566         inline_free_summary): Move to ipa-fnsummary.h
28567         (predicate_t): Remove.
28568         * ipa-fnsummary.c: New file.
28569         * ipa-inline.h:  Do not include sreal.h and ipa-predicate.h
28570         (enum inline_hints_vals, inline_hints, agg_position_info,
28571         INLINE_SIZE_SCALE, size_time_entry, inline_summary, inline_summary_t,
28572         inline_summaries, ipa_call_summary, ipa_call_summary_t,
28573         ipa_call_summaries, debug_inline_summary, dump_inline_summaries,
28574         dump_inline_summary, dump_inline_hints, inline_generate_summary,
28575         inline_read_summary, inline_write_summary, inline_free_summary,
28576         inline_analyze_function, initialize_inline_failed,
28577         inline_merge_summary, inline_update_overall_summary,
28578         compute_inline_parameters): Move to ipa-fnsummary.h
28579         * ipa-fnsummary.h: New file.
28580         * ipa-inline-transform.h: Include ipa-inline.h.
28581         * ipa-inline.c: LIkewise.
28583 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
28585         * ipa-inline.c (edge_badness): Use inlined_time instead of
28586         inline_summaries->get.
28588 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
28590         * ipa-inline.c (edge_badness): Use estimate_size_after_inlining.
28592 2017-05-22  Nathan Sidwell  <nathan@acm.org>
28594         * doc/invoke.texi (fdump-translation-unit): Delete documentation.
28595         (fdump-lang): Document 'raw' option.
28596         * dumpfile.h (TDI_tu): Delete.
28597         * dumpfile.c (dump_files): Remove translation-unit.
28598         (FIRST_AUTO_NUMBERED_DUMP): Decrement.
28600 2017-05-22  Georg-Johann Lay  <avr@gjlay.de>
28602         * config/avr/t-avr (AWK) [t-multilib]: Remove "-v FORMAT=Makefile"
28603         command option from $(AWK) call.
28604         * config/avr/genmultilib.awk: Simplify and rewrite so that it
28605         generates MULTILIB_REQUIRED instead of MULTILIB_EXCEPTIONS.
28606         [FORMAT]: Remove handling of variable.
28607         * config/avr/t-multilib: Regenerate.
28609 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
28611         * ipa-inline-analysis.c (inline_summary::reset): Do not reset
28612         self_time.
28613         (dump_inline_summary): Do not print self_time.
28614         (estimate_function_body_sizes): Do not set self_time.
28615         (compute_inline_parameters): Likewise.
28616         (inline_read_section, inline_write_summary): Do not stream self_time.
28617         * ipa-inline.h (inline_summary): Drop self_time.
28619 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
28621         * ipa-inline-analysis.c (account_size_time): Rename to ...
28622         (inline_summary::account_size_time): ... this one.
28623         (reset_ipa_call_summary): Turn to ...
28624         (ipa_call_summary::reset): ... this one.
28625         (reset_inline_summary): Turn to ...
28626         (inline_summary::reset): ... this one.
28627         (inline_summary_t::remove): Update.
28628         (inline_summary_t::duplicate): Update.
28629         (ipa_call_summary_t::remove): Update.
28630         (dump_inline_summary): Update.
28631         (estimate_function_body_sizes): Update.
28632         (compute_inline_parameters): Update.
28633         (estimate_node_size_and_time): Update.
28634         (inline_merge_summary): Update.
28635         (inline_update_overall_summary): Update.
28636         (inline_read_section): Update.
28637         (inline_write_summary): Update.
28638         * ipa-inline.h (inline_summary): Rename entry to size_time_table;
28639         add account_size_time and reset member functions.
28640         (ipa_call_summary): Add reset function.
28641         * ipa-predicate.h (predicate::operator &): Constify.
28643 2017-05-22  Richard Biener  <rguenther@suse.de>
28645         * df-scan.c (df_insn_refs_verify): Speedup when not verifying.
28647 2017-05-19  Jason Merrill  <jason@redhat.com>
28649         * tree.c (make_tree_vec_stat, grow_tree_vec_stat): Use size_t.
28651 2017-05-19  Marek Polacek  <polacek@redhat.com>
28653         PR sanitizer/80800
28654         * fold-const.c (extract_muldiv_1) <case TRUNC_DIV_EXPR>: Add
28655         TYPE_OVERFLOW_WRAPS checks.
28657 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
28659         * tree-core.h (enum omp_clause_default_kind): Add
28660         "OMP_CLAUSE_DEFAULT_PRESENT".
28661         * tree-pretty-print.c (dump_omp_clause): Handle it.
28662         * gimplify.c (enum gimplify_omp_var_data): Add
28663         "GOVD_MAP_FORCE_PRESENT".
28664         (gimplify_adjust_omp_clauses_1): Map it to
28665         "GOMP_MAP_FORCE_PRESENT".
28666         (oacc_default_clause): Handle "OMP_CLAUSE_DEFAULT_PRESENT".
28668         * gimplify.c (oacc_default_clause): Clarify.
28670 2017-05-19  Nathan Sidwell  <nathan@acm.org>
28672         LANG_HOOK_REGISTER_DUMPS
28673         * toplev.c (general_init): Call register dump lang hook.
28674         * doc/invoke.texi: Document -fdump-lang option family.
28675         * dumpfile.c (dump_files): Remove class dump here.
28676         (FIRST_AUTO_NUMBERED_DUMP): Adjust.
28677         * dumpfile.h (tree_dump_index): Remove TDI_class.
28678         * langhooks-def.h (lhd_register_dumps): Declare.
28679         (LANG_HOOKS_REGISTER_DUMPS): Define.
28680         (LANG_HOOKS_INITIALIZER): Add it.
28681         * langhooks.c (lhd_register_dumps): Define.
28682         * langhooks.h (struct lang_hooks): Add register_dumps.
28684 2017-05-19  Nathan Sidwell  <nathan@acm.org>
28686         * context.h (context::set_passes): New.
28687         * context.c (context::context): Do not create pass manager.
28688         * toplev.c (general_init): Create pass manager here.
28690 2017-05-19  Segher Boessenkool  <segher@kernel.crashing.org>
28692         * config/rs6000/rs6000.md (splitter to load of -1 and mask): Don't
28693         use this splitter if two add or or instructions would also work for
28694         the constant we want to generate.
28696 2017-05-19  Richard Biener  <rguenther@suse.de>
28698         PR build/80821
28699         * genmatch.c (dt_node::gen_kids_1): Add missing scope around
28700         predicate evaluation.
28702 2017-05-19  Jan Hubicka  <hubicka@ucw.cz>
28704         * ipa-inline.h (ipa_call_summary): Turn sizes into signed;
28705         add ctor.
28706         * ipa-inline.c (want_inline_small_function_p): Do not cast to
28707         unsigned.
28709 2017-05-19  Jan Hubicka  <hubicka@ucw.cz>
28711         * ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list,
28712         inline_edge_removal_hook, inline_edge_duplication_hook): Remove.
28713         (inline_edge_summary_vec): Turn into ...
28714         (ipa_call_summaries): ... this one.
28715         (redirect_to_unreachable, edge_set_predicate,
28716         evaluate_properties_for_edge, inline_summary_alloc,
28717         reset_ipa_call_summary, reset_inline_summary,
28718         inline_summary_t::duplicate): Update.
28719         (inline_edge_duplication_hook): Turn to ...
28720         (ipa_call_summary_t::duplicate): ... this one.
28721         (inline_edge_removal_hook): Turn to ...
28722         (ipa_call_summary_t::remove): ... this one.
28723         (dump_inline_edge_summary): Turn to ...
28724         (dump_ipa_call_summary): ... this one.
28725         (estimate_function_body_sizes): Update.
28726         (inline_update_callee_summaries): Update.
28727         (remap_edge_change_prob): Update.
28728         (remap_edge_summaries): Update.
28729         (inline_merge_summary): Update.
28730         (do_estimate_edge_time): Update.
28731         (inline_generate_summary): Update.
28732         (inline_read_section): Update.
28733         (inline_read_summary): Update.
28734         (inline_free_summary): Update.
28735         * ipa-inline.c (can_inline_edge_p): Update.
28736         (compute_inlined_call_time): Update.
28737         (want_inline_small_function_p): Update.
28738         (edge_badness): Update.
28739         (early_inliner): Update.
28740         * ipa-inline.h (inline_edge_summary): Turn to ...
28741         (ipa_call_summary): ... this one.
28742         (ipa_call_summary_t): New class.
28743         (inline_edge_summary_t, inline_edge_summary_vec): Remove.
28744         (ipa_call_summaries): New.
28745         (inline_edge_summary): Remove.
28746         (estimate_edge_growth): Update.
28747         * ipa-profile.c (ipa_propagate_frequency_1): Update.
28748         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
28749         * ipa-split.c (execute_split_functions): Update.
28750         * ipa.c (symbol_table::remove_unreachable_nodes): Update.
28752 2017-05-19  Richard Biener  <rguenther@suse.de>
28754         PR middle-end/80764
28755         * cfgexpand.c (expand_gimple_cond): Fix loop fixup.
28757 2017-05-18  Segher Boessenkool  <segher@kernel.crashing.org>
28759         * config/rs6000/rs6000.c (struct machine_function): Add field
28760         fpr_is_wrapped_separately.
28761         (rs6000_get_separate_components): Use 64 components.  Handle the
28762         new FPR components.
28763         (rs6000_components_for_bb): Handle the FPR components.
28764         (rs6000_emit_prologue_components): Handle the FPR components.
28765         (rs6000_emit_epilogue_components): Handle the FPR components.
28766         (rs6000_set_handled_components): Handle the FPR components.
28767         (rs6000_emit_prologue): Don't output prologue code for those FPRs
28768         that are already separately shrink-wrapped.
28769         (rs6000_emit_epilogue): Don't output epilogue code for those FPRs
28770         that are already separately shrink-wrapped.
28772 2017-05-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
28774         PR target/80510
28775         * config/rs6000/predicates.md (simple_offsettable_mem_operand):
28776         New predicate.
28778         * config/rs6000/rs6000.md (ALTIVEC_DFORM): New iterator.
28779         (define_peephole2 for Altivec d-form load): Add peepholes to catch
28780         cases where the register allocator uses a move and an offsettable
28781         memory operation to/from a FPR register on ISA 2.06/2.07.
28782         (define_peephole2 for Altivec d-form store): Likewise.
28784 2017-05-18  Uros Bizjak  <ubizjak@gmail.com>
28786         PR target/80799
28787         * config/i386/mmx.md (*mov<mode>_internal): Enable
28788         alternatives 11, 12, 13 and 14 also for 32bit targets.
28789         Remove alternatives 15, 16, 17 and 18.
28790         * config/i386/sse.md (vec_concatv2di): Change
28791         alternative (!x, *y) to (x, ?!*Yn).
28793 2017-05-18  Paolo Carlini  <paolo.carlini@oracle.com>
28795         * dumpfile.h (enum dump_kind): Remove stray comma.
28797 2017-05-18  Jan Hubicka  <hubicka@ucw.cz>
28799         * Makefile.in: Add ipa-predicate.o and ipa-predicate.h
28800         * ipa-inline-analysis.c (NUM_CONDITIONS): turn into
28801         predicate::num_conditions
28802         (IS_NOT_CONSTANT): turn into predicate::is_not_constant.
28803         (CHANGED): turn into predicate::changed.
28804         (agg_position_info): Move to ipa-predicate.h
28805         (add_condition, predicate::add_clause, predicate::operator &=,
28806         predicate::or_with, predicate::evaluate, predicate::probability,
28807         dump_condition, dump_clause, predicate::dump,
28808         predicate::remap_after_duplication, predicate::remap_after_inlining,
28809         predicate::stream_in, predicate::stream_out): Move to ipa-predicate.c
28810         (evaluate_conditions_for_known_args): Update.
28811         (set_cond_stmt_execution_predicate): Update.
28812         * ipa-inline.h: Include ipa-predicate.h
28813         (condition, inline_param_summary, conditions, agg_position_info,
28814         predicate): Move to ipa-predicate.h
28815         * ipa-predicate.c: New file.
28816         * ipa-predicate.h: New file.
28818 2017-05-18  Wilco Dijkstra  <wdijkstr@arm.com>
28820         * final.c (leaf_function_p): Check we are not in a sequence.
28822 2017-05-18  Martin Liska  <mliska@suse.cz>
28824         * cfgrtl.c (rtl_verify_edges): Remove usage of TDF_RTL.
28825         * dumpfile.c (dump_register): Use new enum dump_kind.
28826         (get_dump_file_name): Likewise.
28827         (dump_enable_all): Likewise.
28828         (dump_switch_p_1): Likewise.
28829         (enable_rtl_dump_file): Remove usage of TDF_RTL.
28830         * dumpfile.h (enum dump_kind): New enum type.
28831         (struct dump_file_info): Create constructor and
28832         format fields and comments.
28833         * passes.c (pass_manager::register_one_dump_file):
28834         Use num dump_kind.
28835         * statistics.c (statistics_early_init): Likewise.
28836         * tree-ssa-loop-prefetch.c (dump_mem_details): Replace
28837         TDF_TREE with TDF_SLIM.
28838         (gather_memory_references_ref): Likewise.
28840 2017-05-18  Martin Liska  <mliska@suse.cz>
28842         * vec.h (struct vnull): Use it.
28844 2017-05-18  Jan Hubicka  <hubicka@ucw.cz>
28846         * ipa-inline-analysis.c (predicate_conditions): Move to ipa-inline.h
28847         (true_predicate, false_predicate, true_predicate_p,
28848         false_predicate_p): Remove.
28849         (single_cond_predicate, not_inlined_predicate): Turn to member function
28850         in ipa-inline.h
28851         (add_condition): Update.
28852         (add_clause): Turn to...
28853         (predicate::add_clause): ... this one; update; allow passing NULL
28854         as parameter.
28855         (and_predicates): Turn to ...
28856         (predicate::operator &=): ... this one.
28857         (predicates_equal_p): Move to predicate::operator == in ipa-inline.h
28858         (or_predicates): Turn to ...
28859         (predicate::or_with): ... this one.
28860         (evaluate_predicate): Turn to ...
28861         (predicate::evaluate): ... this one.
28862         (predicate_probability): Turn to ...
28863         (predicate::probability): ... this one.
28864         (dump_condition): Update.
28865         (dump_predicate): Turn to ...
28866         (predicate::dump): ... this one.
28867         (account_size_time): Update.
28868         (edge_set_predicate): Update.
28869         (set_hint_predicate): UPdate.
28870         (evaluate_conditions_for_known_args): Update.
28871         (evaluate_properties_for_edge): Update.
28872         (remap_predicate_after_duplication): Turn to...
28873         (predicate::remap_after_duplication): ... this one.
28874         (remap_hint_predicate_after_duplication): Update.
28875         (inline_summary_t::duplicate): UPdate.
28876         (dump_inline_edge_summary): Update.
28877         (dump_inline_summary): Update.
28878         (set_cond_stmt_execution_predicate): Update.
28879         (set_switch_stmt_execution_predicate): Update.
28880         (compute_bb_predicates): Update.
28881         (will_be_nonconstant_expr_predicate): Update.
28882         (will_be_nonconstant_predicate): Update.
28883         (phi_result_unknown_predicate): Update.
28884         (predicate_for_phi_result): Update.
28885         (array_index_predicate): Update.
28886         (estimate_function_body_sizes): Update.
28887         (estimate_node_size_and_time): Update.
28888         (estimate_ipcp_clone_size_and_time): Update.
28889         (remap_predicate): Rename to ...
28890         (predicate::remap_after_inlining): ... this one.
28891         (remap_hint_predicate): Update.
28892         (inline_merge_summary): Update.
28893         (inline_update_overall_summary): Update.
28894         (estimate_size_after_inlining): Update.
28895         (read_predicate): Rename to ...
28896         (predicate::stream_in): ... this one.
28897         (read_inline_edge_summary): Update.
28898         (write_predicate): Rename to ...
28899         (predicate::stream_out): ... this one.
28900         (write_inline_edge_summary): Update.
28901         * ipa-inline.h (MAX_CLAUSES): Turn to predicate::max_clauses.
28902         (clause_t): Turn to uint32_t
28903         (predicate): Turn to class; implement constructor and operators
28904         ==, !=, &
28905         (size_time_entry): Update.
28906         (inline_summary): Update.
28907         (inline_edge_summary): Update.
28909 2017-05-18  Marc Glisse  <marc.glisse@inria.fr>
28911         * fold-const.c (fold_binary_loc): Move transformation...
28912         * match.pd (C - X CMP X): ... here.
28914 2017-05-18  Sheldon Lobo  <sheldon.lobo@oracle.com>
28916         * config/sparc/sparc.c (sparc_option_override): Set function
28917         alignment for -mcpu=niagara7 to 64 to match the I$ line.
28918         * config/sparc/sparc.h (BRANCH_COST): Set the SPARC M7 branch
28919         latency to 1.
28920         * config/sparc/sparc.h (BRANCH_COST): Set the SPARC T4 branch
28921         latency to 2.
28922         * config/sparc/sol2.h: Fix a ASM_CPU32_DEFAULT_SPEC typo.
28924 2017-05-18  Marek Polacek  <polacek@redhat.com>
28926         PR sanitizer/80797
28927         * ubsan.c (instrument_null): Unwrap ADDR_EXPRs.
28928         (pass_ubsan::execute): Call gimple_assign_single_p instead of
28929         gimple_assign_load_p.
28931 2017-05-17  Segher Boessenkool  <segher@kernel.crashing.org>
28933         PR middle-end/80692
28934         * real.c (do_compare): Give decimal_do_compare preference over
28935         comparing just the signs.
28937 2017-05-17  Uros Bizjak  <ubizjak@gmail.com>
28939         * doc/md.texi (Canonicalization of Instructions): Describe the
28940         canonical form of instructions that inherently set a condition
28941         code register.
28943 2017-05-17  Peter Bergner  <bergner@vnet.ibm.com>
28945         PR middle-end/80775
28946         * tree-cfg.c: Move deletion of unreachable case statements to after
28947         the merging of consecutive case labels.
28949 2017-05-17  Thomas Preud'homme  <thomas.preudhomme@arm.com>
28951         * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Refer
28952         readers to __gnu_cmse_nonsecure_call libcall for saving, clearing and
28953         restoring of callee-saved registers.
28955 2017-05-17  Eric Botcazou  <ebotcazou@adacore.com>
28957         * compare-elim.c (equivalent_reg_at_start): Adjust outdated comment.
28958         * config/visium/visium.c (single_set_and_flags): Likewise.
28959         * config/visium/visium.md (Substitutions): Likewise.
28961 2017-05-17  Martin Liska  <mliska@suse.cz>
28963         * cfg.c: Introduce dump_flags_t type and
28964         use it instead of int type.
28965         * cfg.h: Likewise.
28966         * cfghooks.c: Likewise.
28967         * cfghooks.h (struct cfg_hooks): Likewise.
28968         * cfgrtl.c: Likewise.
28969         * cfgrtl.h: Likewise.
28970         * cgraph.c (cgraph_node::get_body): Likewise.
28971         * coretypes.h: Likewise.
28972         * domwalk.c: Likewise.
28973         * domwalk.h: Likewise.
28974         * dumpfile.c (struct dump_option_value_info): Likewise.
28975         (dump_enable_all): Likewise.
28976         (dump_switch_p_1): Likewise.
28977         (opt_info_switch_p): Likewise.
28978         * dumpfile.h (enum tree_dump_index): Likewise.
28979         (struct dump_file_info): Likewise.
28980         * genemit.c: Likewise.
28981         * generic-match-head.c: Likewise.
28982         * gengtype.c (open_base_files): Likewise.
28983         * gimple-pretty-print.c: Likewise.
28984         * gimple-pretty-print.h: Likewise.
28985         * graph.c (print_graph_cfg): Likewise.
28986         * graphite-scop-detection.c (dot_all_sese): Likewise.
28987         * ipa-devirt.c (build_type_inheritance_graph): Likewise.
28988         * loop-unroll.c (report_unroll): Likewise.
28989         * passes.c (pass_manager::register_one_dump_file): Likewise.
28990         * print-tree.c: Likewise.
28991         * statistics.c: Likewise.
28992         * tree-cfg.c: Likewise.
28993         * tree-cfg.h: Likewise.
28994         * tree-dfa.c: Likewise.
28995         * tree-dfa.h: Likewise.
28996         * tree-dump.c (dump_function): Likewise.
28997         * tree-dump.h (struct dump_info): Likewise.
28998         * tree-pretty-print.c: Likewise.
28999         * tree-pretty-print.h: Likewise.
29000         * tree-ssa-live.c: Likewise.
29001         * tree-ssa-live.h: Likewise.
29002         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Likewise.
29003         * tree-vect-loop.c: Likewise.
29004         * tree-vect-slp.c: Likewise.
29006 2017-05-16  James Greenhalgh  <james.greenhalgh@arm.com>
29007             Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29009         PR tree-optimization/80457
29010         * tree-vect-stmts.c (vect_model_simple_cost): Model the cost
29011         of all arguments to a statement as scalar_to_vec operations.
29012         (vectorizable_call): Adjust call to vect_model_simple_cost for
29013         new parameter.
29014         (vectorizable_conversion): Likewise.
29015         (vectorizable_assignment): Likewise.
29016         (vectorizable_shift): Likewise.
29017         (vectorizable_operation): Likewise.
29018         (vectorizable_comparison): Likewise.
29019         (vect_is_simple_cond): Record the def types for operands.
29020         (vectorizable_condition): Likewise, call vect_model_simple_cost.
29021         * tree-vectorizer.h (vect_model_simple_cost): Add new parameter
29022         for statement argument count.
29024 2017-05-16  Carl Love  <cel@us.ibm.com>
29026         * config/rs6000/rs6000-c: Add support for built-in functions
29027         vector unsigned long long vec_bperm (vector unsigned long long,
29028                                              vector unsigned char)
29029         vector signed long long vec_mule (vector signed int,
29030                                           vector signed int)
29031         vector unsigned long long vec_mule (vector unsigned int,
29032                                             vector unsigned int)
29033         vector signed long long vec_mulo (vector signed int,
29034                                           vector signed int)
29035         vector unsigned long long vec_mulo (vector unsigned int,
29036                                             vector unsigned int)
29037         vector signed char vec_sldw (vector signed char,
29038                                      vector signed char,
29039                                      const int)
29040         vector unsigned char vec_sldw (vector unsigned char,
29041                                        vector unsigned char,
29042                                        const int)
29043         vector signed short vec_sldw (vector signed short,
29044                                       vector signed short,
29045                                       const int)
29046         vector unsigned short vec_sldw (vector unsigned short,
29047                                         vector unsigned short,
29048                                         const int)
29049         vector signed int vec_sldw (vector signed int,
29050                                     vector signed int,
29051                                     const int)
29052         vector unsigned int vec_sldw (vector unsigned int,
29053                                       vector unsigned int,
29054                                       const int)
29055         vector signed long long vec_sldw (vector signed long long,
29056                                           vector signed long long,
29057                                           const int)
29058         vector unsigned long long vec_sldw (vector unsigned long long,
29059                                             vector unsigned long long,
29060                                             const int)
29061         * config/rs6000/rs6000-c: Add support for built-in functions
29062         * config/rs6000/rs6000-builtin.def: Add definition for SLDW.
29063         * config/rs6000/altivec.h: Add defintion for vec_sldw.
29064         * doc/extend.texi: Update the built-in documentation for the
29065         new built-in functions.
29067 2017-05-16  Marek Polacek  <polacek@redhat.com>
29069         PR sanitizer/80536
29070         PR sanitizer/80386
29071         * tree.c (save_expr): Don't fold the expression.
29073 2017-05-16  Uros Bizjak  <ubizjak@gmail.com>
29075         * config/i386/i386.md (*movsi_internal): Split (?rm,*y) alternative
29076         to (?r,*Yn) and (?m,*y) alternatives, and (?*y,rm) to (?*Ym,r)
29077         and (?*y,m).  Update insn attributes.
29079 2017-05-16  Martin Liska  <mliska@suse.cz>
29081         * cgraph.c (cgraph_edge::resolve_speculation): Add default value for
29082         flags argument of print_gimple_stmt, print_gimple_expr,
29083         print_generic_stmt and print_generic_expr.
29084         * cgraphclones.c (symbol_table::materialize_all_clones): Likewise.
29085         * coretypes.h: Likewise.
29086         * except.c (dump_eh_tree): Likewise.
29087         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
29088         * gimple-pretty-print.h: Likewise.
29089         * gimple-ssa-backprop.c (dump_usage_prefix): Likewise.
29090         (backprop::push_to_worklist): Likewise.
29091         (backprop::pop_from_worklist): Likewise.
29092         (backprop::process_use): Likewise.
29093         (backprop::intersect_uses): Likewise.
29094         (note_replacement): Likewise.
29095         * gimple-ssa-store-merging.c
29096         (pass_store_merging::terminate_all_aliasing_chains): Likewise.
29097         (imm_store_chain_info::coalesce_immediate_stores): Likewise.
29098         (pass_store_merging::execute): Likewise.
29099         * gimple-ssa-strength-reduction.c (dump_candidate): Likewise.
29100         (ssa_base_cand_dump_callback): Likewise.
29101         (dump_incr_vec): Likewise.
29102         (replace_refs): Likewise.
29103         (replace_mult_candidate): Likewise.
29104         (create_add_on_incoming_edge): Likewise.
29105         (create_phi_basis): Likewise.
29106         (insert_initializers): Likewise.
29107         (all_phi_incrs_profitable): Likewise.
29108         (introduce_cast_before_cand): Likewise.
29109         (replace_one_candidate): Likewise.
29110         * gimplify.c (gimplify_expr): Likewise.
29111         * graphite-isl-ast-to-gimple.c (is_valid_rename): Likewise.
29112         (set_rename): Likewise.
29113         (rename_uses): Likewise.
29114         (copy_loop_phi_nodes): Likewise.
29115         (add_close_phis_to_merge_points): Likewise.
29116         (copy_loop_close_phi_args): Likewise.
29117         (copy_cond_phi_args): Likewise.
29118         (graphite_copy_stmts_from_block): Likewise.
29119         (translate_pending_phi_nodes): Likewise.
29120         * graphite-poly.c (print_pdr): Likewise.
29121         (dump_gbb_cases): Likewise.
29122         (dump_gbb_conditions): Likewise.
29123         (print_scop_params): Likewise.
29124         * graphite-scop-detection.c (build_cross_bb_scalars_def): Likewise.
29125         (build_cross_bb_scalars_use): Likewise.
29126         (gather_bbs::before_dom_children): Likewise.
29127         * hsa-dump.c (dump_hsa_immed): Likewise.
29128         * ipa-cp.c (print_ipcp_constant_value): Likewise.
29129         (get_replacement_map): Likewise.
29130         * ipa-inline-analysis.c (dump_condition): Likewise.
29131         (estimate_function_body_sizes): Likewise.
29132         * ipa-polymorphic-call.c (check_stmt_for_type_change): Likewise.
29133         (ipa_polymorphic_call_context::get_dynamic_type): Likewise.
29134         * ipa-prop.c (ipa_dump_param): Likewise.
29135         (ipa_print_node_jump_functions_for_edge): Likewise.
29136         (ipa_modify_call_arguments): Likewise.
29137         (ipa_modify_expr): Likewise.
29138         (ipa_dump_param_adjustments): Likewise.
29139         (ipa_dump_agg_replacement_values): Likewise.
29140         (ipcp_modif_dom_walker::before_dom_children): Likewise.
29141         * ipa-pure-const.c (check_stmt): Likewise.
29142         (pass_nothrow::execute): Likewise.
29143         * ipa-split.c (execute_split_functions): Likewise.
29144         * omp-offload.c (dump_oacc_loop_part): Likewise.
29145         (dump_oacc_loop): Likewise.
29146         * trans-mem.c (tm_log_emit): Likewise.
29147         (tm_memopt_accumulate_memops): Likewise.
29148         (dump_tm_memopt_set): Likewise.
29149         (dump_tm_memopt_transform): Likewise.
29150         * tree-cfg.c (gimple_verify_flow_info): Likewise.
29151         (print_loop): Likewise.
29152         * tree-chkp-opt.c (chkp_print_addr): Likewise.
29153         (chkp_gather_checks_info): Likewise.
29154         (chkp_get_check_result): Likewise.
29155         (chkp_remove_check_if_pass): Likewise.
29156         (chkp_use_outer_bounds_if_possible): Likewise.
29157         (chkp_reduce_bounds_lifetime): Likewise.
29158         * tree-chkp.c (chkp_register_addr_bounds): Likewise.
29159         (chkp_mark_completed_bounds): Likewise.
29160         (chkp_register_incomplete_bounds): Likewise.
29161         (chkp_mark_invalid_bounds): Likewise.
29162         (chkp_maybe_copy_and_register_bounds): Likewise.
29163         (chkp_build_returned_bound): Likewise.
29164         (chkp_get_bound_for_parm): Likewise.
29165         (chkp_build_bndldx): Likewise.
29166         (chkp_get_bounds_by_definition): Likewise.
29167         (chkp_generate_extern_var_bounds): Likewise.
29168         (chkp_get_bounds_for_decl_addr): Likewise.
29169         * tree-chrec.c (chrec_apply): Likewise.
29170         * tree-data-ref.c (dump_data_reference): Likewise.
29171         (dump_subscript): Likewise.
29172         (dump_data_dependence_relation): Likewise.
29173         (analyze_overlapping_iterations): Likewise.
29174         * tree-inline.c (expand_call_inline): Likewise.
29175         (tree_function_versioning): Likewise.
29176         * tree-into-ssa.c (dump_defs_stack): Likewise.
29177         (dump_currdefs): Likewise.
29178         (dump_names_replaced_by): Likewise.
29179         (dump_update_ssa): Likewise.
29180         (update_ssa): Likewise.
29181         * tree-object-size.c (pass_object_sizes::execute): Likewise.
29182         * tree-parloops.c (build_new_reduction): Likewise.
29183         (try_create_reduction_list): Likewise.
29184         (ref_conflicts_with_region): Likewise.
29185         (oacc_entry_exit_ok_1): Likewise.
29186         (oacc_entry_exit_single_gang): Likewise.
29187         * tree-pretty-print.h: Likewise.
29188         * tree-scalar-evolution.c (set_scalar_evolution): Likewise.
29189         (get_scalar_evolution): Likewise.
29190         (add_to_evolution): Likewise.
29191         (get_loop_exit_condition): Likewise.
29192         (analyze_evolution_in_loop): Likewise.
29193         (analyze_initial_condition): Likewise.
29194         (analyze_scalar_evolution): Likewise.
29195         (instantiate_scev): Likewise.
29196         (number_of_latch_executions): Likewise.
29197         (gather_chrec_stats): Likewise.
29198         (final_value_replacement_loop): Likewise.
29199         (scev_const_prop): Likewise.
29200         * tree-sra.c (dump_access): Likewise.
29201         (disqualify_candidate): Likewise.
29202         (create_access): Likewise.
29203         (reject): Likewise.
29204         (maybe_add_sra_candidate): Likewise.
29205         (create_access_replacement): Likewise.
29206         (analyze_access_subtree): Likewise.
29207         (analyze_all_variable_accesses): Likewise.
29208         (sra_modify_assign): Likewise.
29209         (initialize_constant_pool_replacements): Likewise.
29210         (find_param_candidates): Likewise.
29211         (decide_one_param_reduction): Likewise.
29212         (replace_removed_params_ssa_names): Likewise.
29213         * tree-ssa-ccp.c (ccp_fold_stmt): Likewise.
29214         * tree-ssa-copy.c (dump_copy_of): Likewise.
29215         (copy_prop_visit_cond_stmt): Likewise.
29216         * tree-ssa-dce.c (mark_operand_necessary): Likewise.
29217         * tree-ssa-dom.c (pass_dominator::execute): Likewise.
29218         (record_equivalences_from_stmt): Likewise.
29219         * tree-ssa-dse.c (compute_trims): Likewise.
29220         (delete_dead_call): Likewise.
29221         (delete_dead_assignment): Likewise.
29222         * tree-ssa-forwprop.c (forward_propagate_into_gimple_cond): Likewise.
29223         (forward_propagate_into_cond): Likewise.
29224         (pass_forwprop::execute): Likewise.
29225         * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
29226         * tree-ssa-loop-im.c (invariantness_dom_walker::before_dom_children):
29227         Likewise.
29228         (move_computations_worker): Likewise.
29229         (execute_sm): Likewise.
29230         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Likewise.
29231         (remove_exits_and_undefined_stmts): Likewise.
29232         (remove_redundant_iv_tests): Likewise.
29233         * tree-ssa-loop-ivopts.c (dump_use): Likewise.
29234         (adjust_iv_update_pos): Likewise.
29235         * tree-ssa-math-opts.c (bswap_replace): Likewise.
29236         * tree-ssa-phiopt.c (factor_out_conditional_conversion): Likewise.
29237         (value_replacement): Likewise.
29238         * tree-ssa-phiprop.c (phiprop_insert_phi): Likewise.
29239         * tree-ssa-pre.c (print_pre_expr): Likewise.
29240         (get_representative_for): Likewise.
29241         (create_expression_by_pieces): Likewise.
29242         (insert_into_preds_of_block): Likewise.
29243         (eliminate_insert): Likewise.
29244         (eliminate_dom_walker::before_dom_children): Likewise.
29245         (eliminate): Likewise.
29246         (remove_dead_inserted_code): Likewise.
29247         * tree-ssa-propagate.c (substitute_and_fold): Likewise.
29248         * tree-ssa-reassoc.c (get_rank): Likewise.
29249         (eliminate_duplicate_pair): Likewise.
29250         (eliminate_plus_minus_pair): Likewise.
29251         (eliminate_not_pairs): Likewise.
29252         (undistribute_ops_list): Likewise.
29253         (eliminate_redundant_comparison): Likewise.
29254         (update_range_test): Likewise.
29255         (optimize_range_tests_var_bound): Likewise.
29256         (optimize_vec_cond_expr): Likewise.
29257         (rewrite_expr_tree): Likewise.
29258         (rewrite_expr_tree_parallel): Likewise.
29259         (linearize_expr): Likewise.
29260         (break_up_subtract): Likewise.
29261         (linearize_expr_tree): Likewise.
29262         (attempt_builtin_powi): Likewise.
29263         (attempt_builtin_copysign): Likewise.
29264         (transform_stmt_to_copy): Likewise.
29265         (transform_stmt_to_multiply): Likewise.
29266         (dump_ops_vector): Likewise.
29267         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Likewise.
29268         (print_scc): Likewise.
29269         (set_ssa_val_to): Likewise.
29270         (visit_reference_op_store): Likewise.
29271         (visit_use): Likewise.
29272         (sccvn_dom_walker::before_dom_children): Likewise.
29273         (run_scc_vn): Likewise.
29274         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
29275         Likewise.
29276         (expr_hash_elt::print): Likewise.
29277         (const_and_copies::pop_to_marker): Likewise.
29278         (const_and_copies::record_const_or_copy_raw): Likewise.
29279         * tree-ssa-structalias.c (compute_dependence_clique): Likewise.
29280         * tree-ssa-uninit.c (collect_phi_def_edges): Likewise.
29281         (dump_predicates): Likewise.
29282         (find_uninit_use): Likewise.
29283         (warn_uninitialized_phi): Likewise.
29284         (pass_late_warn_uninitialized::execute): Likewise.
29285         * tree-ssa.c (verify_vssa): Likewise.
29286         (verify_ssa): Likewise.
29287         (maybe_optimize_var): Likewise.
29288         * tree-vrp.c (dump_value_range): Likewise.
29289         (dump_all_value_ranges): Likewise.
29290         (dump_asserts_for): Likewise.
29291         (register_edge_assert_for_2): Likewise.
29292         (vrp_visit_cond_stmt): Likewise.
29293         (vrp_visit_switch_stmt): Likewise.
29294         (vrp_visit_stmt): Likewise.
29295         (vrp_visit_phi_node): Likewise.
29296         (simplify_cond_using_ranges_1): Likewise.
29297         (fold_predicate_in): Likewise.
29298         (evrp_dom_walker::before_dom_children): Likewise.
29299         (evrp_dom_walker::push_value_range): Likewise.
29300         (evrp_dom_walker::pop_value_range): Likewise.
29301         (execute_early_vrp): Likewise.
29303 2017-05-16  Richard Biener  <rguenther@suse.de>
29305         * dwarf2out.c (loc_list_from_tree_1): Do not create
29306         DW_OP_GNU_variable_value for DECL_IGNORED_P decls.
29308 2017-05-16  Richard Biener  <rguenther@suse.de>
29310         * dwarf2out.c (resolve_variable_value_in_expr): Lookup DIE
29311         just generated.
29312         (note_variable_value_in_expr): If we resolved the decl ref
29313         do not push to the stack.
29315 2017-05-16  Matthew Wahab  <matthew.wahab@arm.com>
29317         * config/arm/arm_neon.h (vadd_f16): Use standard arithmetic
29318         operations in fast-math mode.
29319         (vaddq_f16): Likewise.
29320         (vmul_f16): Likewise.
29321         (vmulq_f16): Likewise.
29322         (vsub_f16): Likewise.
29323         (vsubq_f16): Likewise.
29324         * config/arm/neon.md (add<mode>3): New.
29325         (sub<mode>3): New.
29326         (fma:<VH:mode>3): New.  Also remove outdated comment.
29327         (mul<mode>3): New.
29329 2017-05-16  Martin Liska  <mliska@suse.cz>
29331         PR ipa/79849.
29332         PR ipa/79850.
29333         * ipa-devirt.c (warn_types_mismatch): Fix typo.
29334         (odr_types_equivalent_p): Likewise.
29336 2017-05-15  Sylvestre Ledru  <sylvestre@debian.org>
29338         * plugin.c (try_init_one_plugin): Fix ressource leaks (CID 726637).
29340 2017-05-15  Uros Bizjak  <ubizjak@gmail.com>
29342         PR target/80425
29343         * config/i386.i386.md (*zero_extendsidi2): Do not penalize
29344         non-interunit SSE move alternatives with '?'.
29345         (zero-extendsidi peephole2): New peephole to skip intermediate
29346         general register in SSE zero-extend sequence.
29348 2017-05-15  Jeff Law  <law@redhat.com>
29350         * reorg.c (relax_delay_slots): Create a new variable to hold
29351         the temporary target rather than clobbering TARGET_LABEL.
29353         * config/tilegx/tilegx.c (tilegx_expand_unaligned_load): Add
29354         missing argument to extract_bit_field call.
29355         * config/tilepro/tilepro.c (tilepro_expand_unaligned_load): Likewise.
29357 2017-05-15  Martin Liska  <mliska@suse.cz>
29359         PR driver/31468
29360         * gcc.c (process_command): Do not allow empty argument of -o option.
29362 2017-05-15  Renlin Li  <renlin.li@arm.com>
29364         * config/aarch64/aarch64-protos.h (aarch64_expand_call): Declare.
29365         * config/aarch64/aarch64.c (aarch64_expand_call): Define.
29366         * config/aarch64/constraints.md (Usf): Add long call check.
29367         * config/aarch64/aarch64.md (call): Use aarch64_expand_call.
29368         (call_value): Likewise.
29369         (sibcall): Likewise.
29370         (sibcall_value): Likewise.
29371         (call_insn): New.
29372         (call_value_insn): New.
29373         (sibcall_insn): Update rtx pattern.
29374         (sibcall_value_insn): Likewise.
29375         (call_internal): Remove.
29376         (call_value_internal): Likewise.
29377         (sibcall_internal): Likewise.
29378         (sibcall_value_internal): Likewise.
29379         (call_reg): Likewise.
29380         (call_symbol): Likewise.
29381         (call_value_reg): Likewise.
29382         (call_value_symbol): Likewise.
29384 2017-05-14  Krister Walfridsson  <krister.walfridsson@gmail.com>
29386         PR target/80600
29387         * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always add -lgcc.
29389 2017-05-14  Uros Bizjak  <ubizjak@gmail.com>
29391         * config/i386.i386.c (ix86_cc_modes_compatible): CCNOmode is
29392         compatible with CCGOCmode and with CCZmode.
29394 2017-05-14  Martin Sebor  <msebor@redhat.com>
29396         PR middle-end/77671
29397         * gimple-fold.c (gimple_fold_builtin_sprintf): Make extern.
29398         (gimple_fold_builtin_snprintf): Same.
29399         * gimple-fold.h (gimple_fold_builtin_sprintf): Declare.
29400         (gimple_fold_builtin_snprintf): Same.
29401         * gimple-ssa-sprintf.c (get_format_string): Correct the detection
29402         of character types.
29403         (is_call_safe): New function.
29404         (try_substitute_return_value): Call it.
29405         (try_simplify_call): New function.
29406         (pass_sprintf_length::handle_gimple_call): Call it.
29408 2017-05-14  Martin Sebor  <msebor@redhat.com>
29410         PR middle-end/80669
29411         * builtins.c (expand_builtin_stpncpy): Simplify.
29413 2017-05-14  Daniel Santos  <daniel.santos@pobox.com>
29415         * config/i386/i386.opt: Add option -mcall-ms2sysv-xlogues.
29416         * config/i386/i386.h
29417         (x86_64_ms_sysv_extra_clobbered_registers): Change type to unsigned.
29418         (NUM_X86_64_MS_CLOBBERED_REGS): New macro.
29419         (struct machine_function): Add new members call_ms2sysv,
29420         call_ms2sysv_pad_in, call_ms2sysv_pad_out and call_ms2sysv_extra_regs.
29421         (struct machine_frame_state): New fields sp_realigned and
29422         sp_realigned_offset.
29423         * config/i386/i386.c
29424         (enum xlogue_stub): New enum.
29425         (enum xlogue_stub_sets): New enum.
29426         (class xlogue_layout): New class.
29427         (struct ix86_frame): New fields stack_realign_allocate_offset,
29428         stack_realign_offset and outlined_save_offset.  Modify comments to
29429         detail stack layout when using out-of-line stubs.
29430         (ix86_target_string): Add -mcall-ms2sysv-xlogues option.
29431         (ix86_option_override_internal): Add sorry() for TARGET_SEH and
29432         -mcall-ms2sysv-xlogues.
29433         (stub_managed_regs): New static variable.
29434         (ix86_save_reg): Add new parameter ignore_outlined to optionally omit
29435         registers managed by out-of-line stub.
29436         (disable_call_ms2sysv_xlogues): New function.
29437         (ix86_compute_frame_layout): Modify re-alignment calculations, disable
29438         m->call_ms2sysv when appropriate and compute frame layout for
29439         out-of-line stubs.
29440         (sp_valid_at, fp_valid_at): New inline functions.
29441         (choose_basereg): New function.
29442         (choose_baseaddr): Add align parameter, use choose_basereg and modify
29443         all callers.
29444         (ix86_emit_save_reg_using_mov, ix86_emit_restore_sse_regs_using_mov):
29445         Use align parameter of choose_baseaddr to generated aligned SSE movs
29446         when possible.
29447         (pro_epilogue_adjust_stack): Modify to track
29448         machine_frame_state::sp_realigned.
29449         (ix86_nsaved_regs): Modify to accommodate changes to ix86_save_reg.
29450         (ix86_nsaved_sseregs): Likewise.
29451         (ix86_emit_save_regs): Likewise.
29452         (ix86_emit_save_regs_using_mov): Likewise.
29453         (ix86_emit_save_sse_regs_using_mov): Likewise.
29454         (get_scratch_register_on_entry): Likewise.
29455         (gen_frame_set): New function.
29456         (gen_frame_load): Likewise.
29457         (gen_frame_store): Likewise.
29458         (emit_outlined_ms2sysv_save): Likewise.
29459         (emit_outlined_ms2sysv_restore): Likewise.
29460         (ix86_expand_prologue): Modify stack re-alignment code and call
29461         emit_outlined_ms2sysv_save when appropriate.
29462         (ix86_emit_leave): Clear machine_frame_state::sp_realigned.  Add
29463         parameter rtx_insn *insn, which allows the function to be used to only
29464         generate the notes.
29465         (ix86_expand_epilogue): Modify validity checks of frame and stack
29466         pointers, and call emit_outlined_ms2sysv_restore when appropriate.
29467         (ix86_expand_call): Modify to enable m->call_ms2sysv when appropriate.
29468         * config/i386/predicates.md
29469         (save_multiple): New predicate.
29470         (restore_multiple): Likewise.
29471         * config/i386/sse.md
29472         (save_multiple<mode>): New pattern.
29473         (save_multiple_realign<mode>): Likewise.
29474         (restore_multiple<mode>): Likewise.
29475         (restore_multiple_and_return<mode>): Likewise.
29476         (restore_multiple_leave_return<mode>): Likewise.
29477         * Makefile.in: Export HOSTCXX and HOSTCXXFLAGS to site.exp
29479 2017-05-14  Julia Koval  <julia.koval@intel.com>
29481         * config/i386/i386-builtin-types.def (VOID_FTYPE_INT_INT64): New type.
29482         * config/i386/i386-builtin.def (__builtin_ia32_xgetbv)
29483         (__builtin_ia32_xsetbv): New builtins.
29484         * config/i386/i386.c (ix86_expand_special_args_builtin):
29485         Process new types.
29486         (ix86_expand_builtin): Special expand for new intrinsics.
29487         * config/i386/i386.md (UNSPECV_XGETBV, UNSPECV_XSETBV): New.
29488         (xsetbv, xsetbv_rex64, xgetbv, xgetbv_rex64): New insn patterns.
29489         * config/i386/xsaveintrin.h (_xsetbv, _getbv): New intrinsics.
29491 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
29493         * cfganal.c (inverted_post_order_compute): Change argument type
29494         to vec *.
29495         * cfganal.h (inverted_post_order_compute): Adjust prototype.
29496         * df-core.c (rest_of_handle_df_initialize): Adjust.
29497         (rest_of_handle_df_finish): Likewise.
29498         (df_analyze_1): Likewise.
29499         (df_analyze): Likewise.
29500         (loop_inverted_post_order_compute): Change argument to be a vec *.
29501         (df_analyze_loop): Adjust.
29502         (df_get_n_blocks): Likewise.
29503         (df_get_postorder): Likewise.
29504         * df.h (struct df_d): Change field to be a vec.
29505         * lcm.c (compute_laterin): Adjust.
29506         (compute_available): Likewise.
29507         * lra-lives.c (lra_create_live_ranges_1): Likewise.
29508         * tree-ssa-dce.c (remove_dead_stmt): Likewise.
29509         * tree-ssa-pre.c (compute_antic): Likewise.
29511 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
29513         * cfganal.c (connect_infinite_loops_to_exit): Adjust.
29514         (depth_first_search::depth_first_search): Change structure init
29515         function to this constructor.
29516         (depth_first_search::add_bb): Rename function to this member.
29517         (depth_first_search::execute): Likewise.
29518         (flow_dfs_compute_reverse_finish): Adjust.
29520 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
29522         * ddg.c (find_nodes_on_paths): Use auto_sbitmap.
29523         (longest_simple_path): Likewise.
29524         * shrink-wrap.c (spread_components): Likewise.
29525         (disqualify_problematic_components): Likewise.
29526         (emit_common_heads_for_components): Likewise.
29527         (emit_common_tails_for_components): Likewise.
29528         (insert_prologue_epilogue_for_components): Likewise.
29530 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
29532         * tree-ssa-dse.c (dse_dom_walker): Make m_live_byes a
29533         auto_sbitmap.
29535 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
29537         * df-core.c (df_set_blocks): Start using auto_bitmap.
29538         (df_compact_blocks): Likewise.
29539         * df-problems.c (df_rd_confluence_n): Likewise.
29540         * df-scan.c (df_insn_rescan_all): Likewise.
29541         (df_process_deferred_rescans): Likewise.
29542         (df_update_entry_block_defs): Likewise.
29543         (df_update_exit_block_uses): Likewise.
29544         (df_entry_block_bitmap_verify): Likewise.
29545         (df_exit_block_bitmap_verify): Likewise.
29546         (df_scan_verify): Likewise.
29547         * lra-constraints.c (lra_constraints): Likewise.
29548         (undo_optional_reloads): Likewise.
29549         (lra_undo_inheritance): Likewise.
29550         * lra-remat.c (calculate_gen_cands): Likewise.
29551         (do_remat): Likewise.
29552         * lra-spills.c (assign_spill_hard_regs): Likewise.
29553         (spill_pseudos): Likewise.
29554         * tree-ssa-pre.c (bitmap_set_and): Likewise.
29555         (bitmap_set_subtract_values): Likewise.
29557 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
29559         * haifa-sched.c (estimate_shadow_tick): Replace manual bitmap
29560         management with auto_bitmap.
29561         (fix_inter_tick): Likewise.
29562         (fix_recovery_deps): Likewise.
29563         * ira.c (add_store_equivs): Likewise.
29564         (find_moveable_pseudos): Likewise.
29565         (split_live_ranges_for_shrink_wrap): Likewise.
29566         * print-rtl.c (rtx_reuse_manager::rtx_reuse_manager): Likewise.
29567         (rtx_reuse_manager::seen_def_p): Likewise.
29568         (rtx_reuse_manager::set_seen_def): Likewise.
29569         * print-rtl.h (class rtx_reuse_manager): Likewise.
29571 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
29573         * bt-load.c (combine_btr_defs): Use auto_bitmap to manage bitmap
29574         lifetime.
29575         (migrate_btr_def): Likewise.
29576         * cfgloop.c (get_loop_body_in_bfs_order): Likewise.
29577         * df-core.c (loop_post_order_compute): Likewise.
29578         (loop_inverted_post_order_compute): Likewise.
29579         * hsa-common.h: Likewise.
29580         * hsa-gen.c (hsa_bb::~hsa_bb): Likewise.
29581         * init-regs.c (initialize_uninitialized_regs): Likewise.
29582         * ipa-inline.c (resolve_noninline_speculation): Likewise.
29583         (inline_small_functions): Likewise.
29584         * ipa-reference.c (ipa_reference_write_optimization_summary): Likewise.
29585         * ira.c (combine_and_move_insns): Likewise.
29586         (build_insn_chain): Likewise.
29587         * loop-invariant.c (find_invariants): Likewise.
29588         * lower-subreg.c (propagate_pseudo_copies): Likewise.
29589         * predict.c (tree_predict_by_opcode): Likewise.
29590         (predict_paths_leading_to): Likewise.
29591         (predict_paths_leading_to_edge): Likewise.
29592         (estimate_loops_at_level): Likewise.
29593         (estimate_loops): Likewise.
29594         * shrink-wrap.c (try_shrink_wrapping): Likewise.
29595         (spread_components): Likewise.
29596         * tree-cfg.c (remove_edge_and_dominated_blocks): Likewise.
29597         * tree-loop-distribution.c (rdg_build_partitions): Likewise.
29598         * tree-predcom.c (tree_predictive_commoning_loop): Likewise.
29599         * tree-ssa-coalesce.c (coalesce_ssa_name): Likewise.
29600         * tree-ssa-phionlycprop.c (pass_phi_only_cprop::execute): Likewise.
29601         * tree-ssa-pre.c (remove_dead_inserted_code): Likewise.
29602         * tree-ssa-sink.c (nearest_common_dominator_of_uses): Likewise.
29603         * tree-ssa-threadupdate.c (compute_path_counts): Likewise.
29604         (mark_threaded_blocks): Likewise.
29605         (thread_through_all_blocks): Likewise.
29606         * tree-ssa.c (verify_ssa): Likewise.
29607         (execute_update_addresses_taken): Likewise.
29608         * tree-ssanames.c (verify_ssaname_freelists): Likewise.
29610 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
29612         * cfganal.c (mark_dfs_back_edges): Replace manual stack with
29613         auto_vec.
29614         (post_order_compute): Likewise.
29615         (inverted_post_order_compute): Likewise.
29616         (pre_and_rev_post_order_compute_fn): Likewise.
29618 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
29620         * genrecog.c (int_set::int_set): Explicitly construct our
29621         auto_vec base class.
29622         * vec.h (auto_vec::auto_vec): New constructor.
29624 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
29626         * bitmap.h (class auto_bitmap): New constructor taking
29627         bitmap_obstack * argument.
29629 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
29631         * bitmap.h (class auto_bitmap): Change type of m_bits to
29632         bitmap_head, and adjust ctor / dtor and member operators.
29634 2017-05-13  Uros Bizjak  <ubizjak@gmail.com>
29636         * compare-elim.c (equivalent_reg_at_start): Return NULL_RTX
29637         when returned register mode doesn't match original mode.
29639 2017-05-12  Jeff Law  <law@redhat.com>
29640             Jakub Jelinek  <jakub@redhat.com>
29642         * config/mn10300/mn10300.c (mn10300_match_ccmode): Fix where
29643         we look for cc setter after the compare-elim changes.
29644         * config/mn10300/mn10300.md (addsi3_flags): Fix order of patterns
29645         within the vector to match what compare-elim now expects.
29646         (subsi3_flags, andsi3_flags, iorsi3_flags): Likewise.
29647         (xorsi3_flags, one_cmplsi2_flags): Likewise.
29649         * config/rx/rx.c (rx_match_ccmode): Fix where we look cc setter
29650         after the compare-elim changes.
29651         * config/rx/rx.md (abssi2_flags): Fix order of patterns within
29652         the vector to match what compare-elim now expects.
29653         (addsi3_flags, adc_flags, addsi3_flags peepholes): Likewise.
29654         (andsi3_flags, negsi2_flags, one_cmplsi2_flags): Likewise.
29655         (iorsi3_flags, rotlsi3_flags, rotrsi3_flags): Likewise.
29656         (ashrsi3_flags, lshrsi3_flags, ashlsi3_flags): Likewise.
29657         (ssaddsi3, subsi3_flags, sbb_flags, xorsi3_flags): Likewise.
29659         * config/visium/visium.c (single_set_and_flags): Fix where
29660         we look for cc setter after the compare-elim changes.
29661         * config/visium/visium.md (flags_subst_logic): Fix order of patterns
29662         with the vector to match what compare-elim now expects.
29663         (flags_subst_arith, add<mode>3_insn_set_carry): Likewise.
29664         (add<mode>3_insn_set_overflow, addsi3_insn_set_carry): Likewise.
29665         (addsi3_insn_set_overflow, sub<mode>3_insn_set_carry): Likewise.
29666         (sub<mode>3_insn_set_overflow, subsi3_insn_set_carry): Likewise.
29667         (subsi3_insn_set_overflow, negsi2_insn_set_carry): Likewise.
29668         (neg<mode>2_insn_set_overflow): Likewise.
29670 2017-05-12  Jim Wilson  <jim.wilson@linaro.org>
29672         PR middle-end/79794
29673         * expmed.c (extract_bit_field_1): Add alt_rtl argument.  Before
29674         maybe_expand_insn call, set ops[0].target.  If still set after call,
29675         set alt_rtl.  Add extra arg to recursive calls.
29676         (extract_bit_field): Add alt_rtl argument.  Pass to
29677         extract_bit_field.
29678         * expmed.h (extract_bit_field): Fix prototype.
29679         * expr.c (emit_group_load_1, copy_blkmode_from_reg)
29680         (copy_blkmode_to_reg, read_complex_part, store_field): Pass extra NULL
29681         to extract_bit_field_calls.
29682         (expand_expr_real_1): Pass alt_rtl to expand_expr_real instead of 0.
29683         Pass alt_rtl to extract_bit_field calls.
29684         * calls.c (store_unaligned_arguments_into_psuedos)
29685         load_register_parameters): Pass extra NULL to extract_bit_field calls.
29686         * optabs.c (maybe_legitimize_operand): Clear op->target when call
29687         gen_reg_rtx.
29688         * optabs.h (struct expand_operand): Add target bitfield.
29690 2017-05-12  Uros Bizjak  <ubizjak@gmail.com>
29692         * compare-elim.c (try_eliminate_compare): Canonicalize
29693         operation with embedded compare to
29694         [(set (reg:CCM) (compare:CCM (operation) (immediate)))
29695          (set (reg) (operation)].
29697         * config/i386/i386.c (TARGET_FLAGS_REGNUM): New define.
29699 2017-05-12  Uros Bizjak  <ubizjak@gmail.com>
29701         PR target/80723
29702         * config/i386/i386.c (ix86_rtx_cost) [case PLUS]: Ignore the
29703         cost of adding a carry flag for ADC instruction.
29704         [case MINUS]: Ignore the cost of subtracting a carry flag
29705         for SBB instruction.
29707 2017-05-12  Steven Munroe  <munroesj@gcc.gnu.org>
29709         * config.gcc (powerpc*-*-*): Add bmi2intrin.h, bmiintrin.h,
29710         and x86intrin.h
29711         * config/rs6000/bmiintrin.h: New file.
29712         * config/rs6000/bmi2intrin.h: New file.
29713         * config/rs6000/x86intrin.h: New file.
29715 2017-05-12  Jeff Law  <law@redhat.com>
29717         * tree-vrp.c (vrp_dom_walker::before_dom_children): Push unwinding
29718         markers.
29720 2017-05-12  Peter Bergner  <bergner@vnet.ibm.com>
29722         PR middle-end/80707
29723         * tree-cfg.c: Remove cfg edges of unreachable case statements.
29725 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
29727         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
29728         early expansion of vector divide builtins.
29729         (builtin_function_type): Add VSX_BUILTIN_UDIV_V2DI to the list of
29730         builtins identified as having unsigned arguments.
29732 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
29734         * config/rs6000/rs6000.c (gimple-fold.h): New #include.
29735         (rs6000_gimple_fold_builtin): Add handling for early GIMPLE
29736         expansion of vector logical operations (and, andc, or, xor,
29737         nor, orc, nand).
29739 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
29741         * gimple-fold.c (create_tmp_reg_or_ssa_name): Remove static declaration.
29742         * gimple-fold.h (create_tmp_reg_or_ssa_name): New prototype.
29744 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
29746         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
29747         early GIMPLE expansion of vector multiplies.
29749 2017-05-12  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
29751         * config/arm/arm.md (movsi): Add TARGET_32BIT in addition to the
29752         TARGET_HAVE_MOVT conditional.
29753         (movt splitter): Likewise.
29755 2017-05-12  Richard Biener  <rguenther@suse.de>
29757         * tree-ssa-sccvn.h (has_VN_INFO): Declare.
29758         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
29759         Fold all stmts not inplace.
29761 2017-05-12  Richard Biener  <rguenther@suse.de>
29763         PR tree-optimization/80713
29764         * tree-ssa-pre.c (remove_dead_inserted_code): Clear
29765         inserted_exprs bit for not removed stmts.
29767 2017-05-12  Thomas Schwinge  <thomas@codesourcery.com>
29769         PR middle-end/69921
29770         * tree-parloops.c (create_parallel_loop): Set "oacc kernels
29771         parallelized" attribute for parallelized OpenACC kernels.
29772         * omp-offload.c (execute_oacc_device_lower): Use it.
29774         * omp-expand.c (expand_omp_target) <GF_OMP_TARGET_KIND_OACC_KERNELS>:
29775         Set "oacc kernels" attribute.
29776         * omp-general.c (oacc_set_fn_attrib): Remove is_kernel formal
29777         parameter.  Adjust all users.
29778         (oacc_fn_attrib_kernels_p): Remove function.
29779         * omp-offload.c (execute_oacc_device_lower): Look for "oacc
29780         kernels" attribute instead of calling oacc_fn_attrib_kernels_p.
29781         * tree-ssa-loop.c (gate_oacc_kernels): Likewise.
29782         * tree-parloops.c (create_parallel_loop): If oacc_kernels_p,
29783         assert "oacc kernels" attribute is set.
29785 2017-05-11  Carl Love  <cel@us.ibm.com>
29787         * config/rs6000/rs6000-c: Add support for built-in functions
29788         vector unsigned char vec_popcnt (vector signed char)
29789         vector unsigned char vec_popcnt (vector unsigned char)
29790         vector unsigned short vec_popcnt (vector signed short)
29791         vector unsigned short vec_popcnt (vector unsigned short)
29792         vector unsigned int vec_popcnt (vector signed int)
29793         vector unsigned int vec_popcnt (vector unsigned int)
29794         vector unsigned long long vec_popcnt (vector signed long long)
29795         vector unsigned long long vec_popcnt (vector unsigned long long)
29796         vector signed long long vec_slo (vector signed long long,
29797                                          vector signed char)
29798         vector signed long long vec_slo (vector signed long long,
29799                                          vector unsigned char)
29800         vector unsigned long long vec_slo (vector unsigned long long,
29801                                            vector signed char)
29802         vector unsigned long long vec_slo (vector unsigned long long,
29803                                            vector unsigned char)
29804         * config/rs6000/rs6000-builtin.def: Add definitions for VPOPCNTUB,
29805         VPOPCNTUH, VPOPCNTUW, and VPOPCNTUD overloads.
29806         * config/rs6000/altivec.h: Add define for vec_popcnt, vec_popcntb,
29807         vec_popcnth, vec_popcntw and vec_popcntd built-in functions.
29808         * doc/extend.texi: Update the built-in documentation file for the
29809         new built-in functions.
29811 2017-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
29813         * attribs.h (sorted_attr_string): Move machine independent
29814         functions for target clone support from the i386 port to common
29815         code.  Rename ix86_function_versions to common_function_versions.
29816         Rename make_name to make_unique_name.
29817         (common_function_versions): Likewise.
29818         (make_unique_name): Likewise.
29819         (make_dispatcher_decl): Likewise.
29820         (is_function_default_version): Likewise.
29821         * attribs.c (attr_strcmp): Likewise.
29822         (sorted_attr_string): Likewise.
29823         (common_function_versions): Likewise.
29824         (make_unique_name): Likewise.
29825         (make_dispatcher_decl): Likewise.
29826         (is_function_default_version): Likewise.
29827         * config/i386/i386.c (attr_strcmp): Likewise.
29828         (sorted_attr_string): Likewise.
29829         (ix86_function_versions): Likewise.
29830         (make_name): Likewise.
29831         (make_dispatcher_decl): Likewise.
29832         (is_function_default_version): Likewise.
29833         (TARGET_OPTION_FUNCTION_VERSIONS): Update target function hook.
29835 2017-05-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29837         PR target/80695
29838         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
29839         Account for direct move costs for vec_construct of integer
29840         vectors.
29842 2017-05-11  Uros Bizjak  <ubizjak@gmail.com>
29844         PR target/80706
29845         * config/i386/sync.md (UNSPEC_LDX_ATOMIC): New unspec.
29846         (UNSPEC_STX_ATOMIC): Ditto.
29847         (loaddi_via_sse): New insn.
29848         (storedi_via_sse): Ditto.
29849         (atomic_loaddi_fpu): Emit loaddi_via_sse and storedi_via_sse.
29850         Update corresponding peephole2 patterns.
29851         (atomic_storedi_fpu): Ditto.
29853 2017-05-11  Julia Koval  <julia.koval@intel.com>
29855         * config/i386/avx512fintrin.h (_mm_mask_rsqrt14_sd)
29856         (_mm_maskz_rsqrt14_sd, _mm_mask_rsqrt14_ss, _mm_maskz_rsqrt14_ss):
29857         New intrinsics.
29858         * config/i386/i386-builtin.def (__builtin_ia32_rsqrt14sd_mask)
29859         (__builtin_ia32_rsqrt14ss_mask): New builtins.
29860         * config/i386/sse.md (rsqrt14_<mode>_mask): New pattern.
29862 2017-05-11  Nathan Sidwell  <nathan@acm.org>
29864         * graphite-poly.c: Include dumpfile.h.
29866         * dumpfle.h (dump_function): Declare here ...
29867         * tree-dump.h (dump_function): ... not here.
29868         * dumpfile.c: #include tree-cfg.h.
29869         (dump_function): Move here from ...
29870         * tree-dump.c (dump_function): ... here.
29871         * gimplify.c: #include splay-tree.h, not tree-dump.h.
29872         * graphite-poly.c: Don't include tree-dump.h.
29873         * cgraphclones.c: Include dumpfile.h not tree-dump.h.
29874         * print-tree.c: Likewise.
29875         * stor-layout.c: Likewise.
29876         * tree-nested.c: Likewise.
29878         * dumpfile.c (dump_start): Use TDF_FLAGS.
29879         (dump_enable_all): Fix TDF_KIND check thinko.
29881 2017-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
29883         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
29884         array entries to represent two legal parameterizations of the
29885         overloaded __builtin_cmpb function, as represented by the
29886         P6_OV_BUILTIN_CMPB constant.
29887         (altivec_resolve_overloaded_builtin): Add special case handling
29888         for the __builtin_cmpb function, as represented by the
29889         P6_OV_BUILTIN_CMPB constant.
29890         * config/rs6000/rs6000-builtin.def (BU_P6_2): New macro.
29891         (BU_P6_64BIT_2): New macro.
29892         (BU_P6_OVERLOAD_2): New macro
29893         (CMPB_32): Add 32-bit compare-bytes support for 32-bit only targets.
29894         (CMPB): Add 64-bit compare-bytes support for 32-bit and 64-bit targets.
29895         (CMPB): Add overload support to represent both 32-bit and 64-bit
29896         compare-bytes function.
29897         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
29898         support for TARGET_CMPB.
29899         * config/rs6000/rs6000.h: Add support for RS6000_BTM_CMPB.
29900         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
29901         documentation of the __builtin_cmpb overloaded built-in function.
29903 2017-05-11  Richard Biener  <rguenther@suse.de>
29905         PR tree-optimization/80705
29906         * tree-vect-data-refs.c (vect_analyze_data_refs): DECL_NONALIASED
29907         bases are not vectorizable.
29909 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
29911         * tree-ssa-loop-ivopts.c (determine_set_costs): Skip non-interger
29912         when counting register pressure.
29914 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
29916         * tree-ssa-loop-ivopts.c (compare_cost_pair): New.
29917         (iv_ca_more_deps): Renamed to ...
29918         (iv_ca_compare_deps): ... this.
29919         (iv_ca_extend): Extend iv_ca if NEW_CP is cheaper than OLD_CP.
29921 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
29923         * tree-ssa-loop-ivopts.c (find_interesting_uses): Move inv vars dump
29924         to ...
29925         (determine_group_iv_costs): ... here.
29926         (find_inv_vars_cb): Record inv var if it's not recorded before.
29928 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
29930         * tree-ssa-loop-ivopts.c (allow_ip_end_pos_p): Refine comments.
29931         (get_shiftadd_cost): Ditto.
29933 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
29935         * tree-ssa-address.c: Include header file.
29936         (move_hint_to_base): Return TRUE if BASE_HINT is moved to memory
29937         address.
29938         (add_to_parts): Refactor.
29939         (addr_to_parts): New parameter.  Update use of move_hint_to_base.
29940         (create_mem_ref): Update use of addr_to_parts.  Re-associate addr
29941         in new order.
29943 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
29945         PR tree-optimization/53090
29946         * tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New enum value
29947         COMP_IV_EXPR_2.
29948         (extract_cond_operands): Detect condition with IV on both sides
29949         and return COMP_IV_EXPR_2.
29950         (find_interesting_uses_cond): Add iv_use for both IVs in condition.
29951         (rewrite_use_compare): Simplify by removing call to function
29952         extract_cond_operands.
29954 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
29956         * tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New.
29957         (extract_cond_operands): Detect condition comparing against non-
29958         invariant bound and return appropriate enum value.
29959         (find_interesting_uses_cond): Update use of extract_cond_operands.
29960         Handle its return value accordingly.
29961         (determine_group_iv_cost_cond, rewrite_use_compare): Ditto.
29963 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
29965         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Re-associate
29966         nonlinear iv_use computation in loop invariant sensitive way.
29968 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
29970         * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): New.
29971         (find_iv_candidates): Call relate_compare_use_with_all_cands.
29973 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
29975         * tree-ssa-loop-ivopts.c (struct iv_cand): New field inv_exprs.
29976         (dump_cand): Support iv_cand.inv_exprs.
29977         (add_candidate_1): Record invariant exprs in iv_cand.inv_exprs
29978         for candidates.
29979         (iv_ca_set_no_cp, iv_ca_set_cp, free_loop_data): Support
29980         iv_cand.inv_exprs.
29982 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
29984         * tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Move
29985         from ...
29986         * tree-ssa-address.c (multiplier_allowed_in_address_p): ... to here
29987         as local function.  Include necessary header files.
29988         * tree-ssa-loop-ivopts.h (multiplier_allowed_in_address_p): Delete.
29990 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
29992         * tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify.
29994 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
29996         * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Handle more
29997         operators: TRUNC_DIV_EXPR, BIT_AND_EXPR, BIT_IOR_EXPR, LSHIFT_EXPR,
29998         RSHIFT_EXPR and BIT_NOT_EXPR.
30000 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
30002         * tree-ssa-loop-ivopts.c (get_loop_invariant_expr): Simplify.
30003         (adjust_setup_cost): New parameter supporting round up adjustment.
30004         (struct address_cost_data): Delete.
30005         (force_expr_to_var_cost): Don't bound cost with spill_cost.
30006         (split_address_cost, ptr_difference_cost): Delete.
30007         (difference_cost, compare_aff_trees, record_inv_expr): Delete.
30008         (struct ainc_cost_data): New struct.
30009         (get_address_cost_ainc): New function.
30010         (get_address_cost, get_computation_cost): Reimplement.
30011         (determine_group_iv_cost_address): Record inv_expr for all uses of
30012         a group.
30013         (determine_group_iv_cost_cond): Call get_loop_invariant_expr.
30014         (iv_ca_has_deps): Reimplemented to ...
30015         (iv_ca_more_deps): ... this.  Check if NEW_CP introduces more deps
30016         than OLD_CP.
30017         (iv_ca_extend): Call iv_ca_more_deps.
30019 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
30021         * tree-ssa-address.c (struct mem_address): Move to header file.
30022         (valid_mem_ref_p, move_fixed_address_to_symbol): Make it global.
30023         * tree-ssa-address.h (struct mem_address): Move from C file.
30024         (valid_mem_ref_p, move_fixed_address_to_symbol): Declare.
30026 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
30028         * tree-affine.h (aff_combination_type): New interface.
30029         (aff_combination_zero_p): Remove static.
30030         (aff_combination_const_p): New interface.
30031         (aff_combination_singleton_var_p): New interfaces.
30033 2017-05-11  Richard Biener  <rguenther@suse.de>
30035         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
30036         Skip unreachable blocks and destinations.
30037         (eliminate): Move stmt removal and fixup ...
30038         (fini_eliminate): ... here.  Skip inserted exprs.
30039         (pass_pre::execute): Move fini_pre after fini_eliminate.
30040         * tree-ssa-tailmerge.c: Include tree-cfgcleanup.h.
30041         (tail_merge_optimize): Run cleanup_tree_cfg if requested by
30042         PRE to get rid of dead code that has invalid SSA form and
30043         split critical edges again.
30045 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
30047         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
30049 2017-05-11  Richard Biener  <rguenther@suse.de>
30051         * passes.c (execute_function_todo): Verify loops if they are
30052         said to be up-to-date.
30053         * cfgexpand.c (pass_expand::execute): Discard loops for -dx.
30054         * trans-mem.c (pass_tm_edges::execute): Mark loops for fixup.
30056 2017-05-10  John David Anglin  <danglin@gcc.gnu.org>
30058         PR target/80090
30059         * config/pa/pa.c (pa_assemble_integer): When outputting a SYMBOL_REF,
30060         handle calling assemble_external ourself.
30062         PR target/79027
30063         * config/pa/pa.c (pa_cannot_change_mode_class): Reject changes to/from
30064         modes with zero size.  Enhance comment.
30066 2017-05-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30068         * config/rs6000/rs6000.c (altivec_init_builtins): Define POWER8
30069         built-ins for vec_xl and vec_xst with short and char pointer
30070         arguments.
30072 2017-05-10  Sebastian Peryt  <sebastian.peryt@intel.com>
30074         * config/i386/avx512fintrin.h (_mm_mask_max_round_sd)
30075         (_mm_maskz_max_round_sd, _mm_mask_max_round_ss)
30076         (_mm_maskz_max_round_ss, _mm_mask_min_round_sd)
30077         (_mm_maskz_min_round_sd, _mm_mask_min_round_ss)
30078         (_mm_maskz_min_round_ss): New intrinsics.
30079         * config/i386/i386-builtin-types.def (V2DF, V2DF, V2DF, V2DF, UQI, INT)
30080         (V4SF, V4SF, V4SF, V4SF, UQI, INT): New function type aliases.
30081         * config/i386/i386-builtin.def (__builtin_ia32_maxsd_mask_round)
30082         (__builtin_ia32_maxss_mask_round, __builtin_ia32_minsd_mask_round)
30083         (__builtin_ia32_minss_mask_round): New builtins.
30084         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
30085         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
30086         * config/i386/sse.md (<sse>_vm<code><mode>3<round_saeonly_name>):
30087         Rename to ...
30088         (<sse>_vm<code><mode>3<mask_name><round_saeonly_name>): ... this.
30089         (v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_op3>%2, %1, %0|%0, %1, %<iptr>2<round_saeonly_op3>}):
30090         Change to ...
30091         (v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_saeonly_mask_op3>}):
30092         ... this.
30094 2017-05-10  Sebastian Peryt  <sebastian.peryt@intel.com>
30096         * config/i386/avx512fintrin.h (_mm_mask_mul_round_sd)
30097         (_mm_maskz_mul_round_sd, _mm_mask_mul_round_ss)
30098         (_mm_maskz_mul_round_ss, _mm_mask_div_round_sd)
30099         (_mm_maskz_div_round_sd, _mm_mask_div_round_ss)
30100         (_mm_maskz_div_round_ss, _mm_mask_mul_sd, _mm_maskz_mul_sd)
30101         (_mm_mask_mul_ss, _mm_maskz_mul_ss, _mm_mask_div_sd)
30102         (_mm_maskz_div_sd, _mm_mask_div_ss, _mm_maskz_div_ss): New intrinsics.
30103         * config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
30104         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
30105         * config/i386/i386-builtin.def (__builtin_ia32_divsd_mask_round)
30106         (__builtin_ia32_divss_mask_round, __builtin_ia32_mulsd_mask_round)
30107         (__builtin_ia32_mulss_mask_round): New builtins.
30108         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
30109         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
30110         * config/i386/sse.md (<sse>_vm<multdiv_mnemonic><mode>3<round_name>):
30111         Rename to ...
30112         (<sse>_vm<multdiv_mnemonic><mode>3<mask_name><round_name>): ... this.
30113         (v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
30114         Change to ...
30115         (v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
30116         ... this.
30118 2017-05-10  Julia Koval  <julia.koval@intel.com>
30120         * config/i386/avxintrin.h (_mm256_set_m128, _mm256_set_m128d)
30121         (_mm256_set_m128i, _mm256_setr_m128, _mm256_setr_m128d)
30122         (_mm256_setr_m128i): New intrinsics.
30124 2017-05-10  Julia Koval  <julia.koval@intel.com>
30126         * config/i386/avx512fintrin.h (_mm_mask_rcp14_sd)
30127         (_mm_maskz_rcp14_sd, _mm_mask_rcp14_ss)
30128         (_mm_maskz_rcp14_ss): New intrinsics.
30129         * config/i386/i386-builtin.def (__builtin_ia32_rcp14sd_mask)
30130         (__builtin_ia32_rcp14ss_mask): New builtins.
30131         * config/i386/sse.md (srcp14<mode>_mask): New pattern.
30133 2017-05-10  Peter Bergner  <bergner@vnet.ibm.com>
30135         PR tree-optimization/51513
30136         * tree-cfg.c (gimple_seq_unreachable_p): New function.
30137         (assert_unreachable_fallthru_edge_p): Use it.
30138         (group_case_labels_stmt): Likewise.
30139         * tree-cfg.h: Prototype it.
30140         * stmt.c: Include cfghooks.h and tree-cfg.h.
30141         (emit_case_dispatch_table) <gap_label>: New local variable.
30142         Use it to fill dispatch table gaps.
30143         Test for default_label before updating probabilities.
30144         (expand_case) <default_label>: Remove unneeded initialization.
30145         Test for unreachable default case statement and remove its edge.
30146         Set default_label accordingly.
30147         * tree-ssa-ccp.c (optimize_unreachable): Update comment.
30149 2017-05-10  Carl Love  <cel@us.ibm.com>
30151         * config/rs6000/rs6000-c: Add support for built-in functions
30152         vector signed char      vec_neg (vector signed char)
30153         vector signed short int vec_neg (vector short int)
30154         vector signed int       vec_neg (vector signed int)
30155         vector signed long long vec_neg (vector signed long long)
30156         vector float            vec_neg (vector float)
30157         vector double           vec_neg (vector double)
30158         * config/rs6000/rs6000-builtin.def: Add definitions for NEG function
30159         overload.
30160         * config/rs6000/altivec.h: Add define for vec_neg
30161         * doc/extend.texi: Update the built-in documentation for the
30162         new built-in functions.
30164 2017-05-10  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
30166         PR tree-optimization/77644
30167         * match.pd (sqrt(x) cmp sqrt(y) -> x cmp y): New pattern.
30169 2017-05-10  Nathan Sidwell  <nathan@acm.org>
30171         * dumpfile.h (TDI_lang_all): New.
30172         (TDF_KIND): New. Renumber others
30173         (TDF_LANG, TDF_TREE, TDF_RTL, TDF_IPA): Enumerate value, rather
30174         than bits.
30175         * dumpfile.c (dump_files): Mark language dumps as TDF_LANG.  add
30176         lang-all.
30177         (get_dump_file_name): Adjust suffix generation.
30178         (dump_enable_all): Use TDF_KIND.
30179         * doc/invoke.texi (-fdump-lang-all): Document.
30181         * dumpfile.h: Tabify.
30183 2017-05-10  Wilco Dijkstra  <wdijkstr@arm.com>
30185         PR target/80671
30186         * config/aarch64/cortex-a57-fma-steering.c (merge_forest):
30187         Move member access before delete.
30189 2017-05-10  Alexandre Oliva  <aoliva@redhat.com>
30191         * tree-inline.c (expand_call_inline): Split block at stmt
30192         before the call.
30194 2017-05-09  Michael Meissner  <meissner@linux.vnet.ibm.com>
30196         PR target/68163
30197         * config/rs6000/rs6000.md (f32_lr): Delete mode attributes that
30198         are now unused after splitting mov{sf,sd}_hardfloat.
30199         (f32_lr2): Likewise.
30200         (f32_lm): Likewise.
30201         (f32_lm2): Likewise.
30202         (f32_li): Likewise.
30203         (f32_li2): Likewise.
30204         (f32_lv): Likewise.
30205         (f32_sr): Likewise.
30206         (f32_sr2): Likewise.
30207         (f32_sm): Likewise.
30208         (f32_sm2): Likewise.
30209         (f32_si): Likewise.
30210         (f32_si2): Likewise.
30211         (f32_sv): Likewise.
30212         (f32_dm): Likewise.
30213         (f32_vsx): Likewise.
30214         (f32_av): Likewise.
30215         (mov<mode>_hardfloat): Split into separate movsf and movsd pieces.
30216         For movsf, order stores so the VSX stores occur before the GPR
30217         store which encourages the register allocator to use a traditional
30218         FPR instead of a GPR.  For movsd, order the stores so that the GPR
30219         store comes before the VSX stores to allow the power6 to work.
30220         This is due to the power6 not having a 32-bit integer store
30221         instruction from a FPR.
30222         (movsf_hardfloat): Likewise.
30223         (movsd_hardfloat): Likewise.
30225 2017-05-09  Martin Sebor  <msebor@redhat.com>
30227         PR translation/80280
30228         * config/sol2-c.c (cmn_err_flag_specs): Initialize new data member
30229         added in r247778.
30231         PR translation/80280
30232         * config/i386/msformat-c.c (ms_printf_flag_specs): Initialize new
30233         data member added in r247778.
30234         (ms_scanf_flag_specs, ms_strftime_flag_specs): Same.
30236 2017-05-09  Nathan Sidwell  <nathan@acm.org>
30238         * tree.h (tree_fits_shwi_p, tree_fits_uhwi_p): Unconditionally pure.
30240         * ipa-devirt.c (default_hash_traits<type_pair>): Skip struct-scope
30241         typedefs.
30243 2017-05-09  Marek Polacek  <polacek@redhat.com>
30245         * doc/invoke.texi: Fix typo.
30247 2017-05-09  Richard Biener  <rguenther@suse.de>
30249         * tree-vrp.c (vrp_val_is_max): Adjust comment.
30250         (vrp_val_is_min): Likewise.
30251         (set_value_range_to_value): Likewise.
30252         (set_value_range_to_nonnegative): Likewise.
30253         (gimple_assign_nonzero_p): Likewise.
30254         (gimple_stmt_nonzero_p): Likewise.
30255         (vrp_int_const_binop): Likewise.  Remove unreachable case.
30256         (adjust_range_with_scev): Adjust comments.
30257         (compare_range_with_value): Likewise.
30258         (extract_range_from_phi_node): Likewise.
30259         (test_for_singularity): Likewise.
30261 2017-05-09  Richard Biener  <rguenther@suse.de>
30263         * tree-vrp.c (get_single_symbol): Add assert that we don't
30264         get overflowed constants as invariant part.
30265         (compare_values_warnv): Add comment before the TREE_NO_WARNING
30266         checks.  Use wi::cmp instead of recursing for integer constants.
30267         (compare_values): Just ignore whether we assumed undefined
30268         overflow instead of failing the compare.
30269         (extract_range_for_var_from_comparison_expr): Add comment before the
30270         TREE_NO_WARNING sets.
30271         (test_for_singularity): Likewise.
30272         (extract_range_from_comparison): Do not disable optimization
30273         when we assumed undefined overflow.
30274         (extract_range_basic): Remove init of unused var.
30276 2017-05-09  Richard Biener  <rguenther@suse.de>
30278         * tree-vrp.c (vrp_int_const_binop): Use wide-ints and simplify.
30279         (extract_range_from_multiplicative_op_1): Adjust.
30280         (extract_range_from_binary_expr_1): Use int_const_binop.
30282 2017-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
30284         PR target/80101
30285         * config/rs6000/power6.md: Replace store_data_bypass_p calls with
30286         rs6000_store_data_bypass_p in seven define_bypass directives and
30287         in several comments.
30288         * config/rs6000/rs6000-protos.h: Add prototype for
30289         rs6000_store_data_bypass_p function.
30290         * config/rs6000/rs6000.c (rs6000_store_data_bypass_p): New
30291         function implements slightly different (rs6000-specific) semantics
30292         than store_data_bypass_p, returning false rather than aborting
30293         with assertion error when arguments do not satisfy the
30294         requirements of store data bypass.
30295         (rs6000_adjust_cost): Replace six calls of store_data_bypass_p with
30296         rs6000_store_data_bypass_p.
30298 2017-05-08  Max Filippov  <jcmvbkbc@gmail.com>
30300         * config/xtensa/xtensa-protos.h
30301         (xtensa_initial_elimination_offset): New declaration.
30302         * config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
30303         New function. Move its body from the INITIAL_ELIMINATION_OFFSET
30304         macro definition, add case for FRAME_POINTER_REGNUM when
30305         FRAME_GROWS_DOWNWARD.
30306         * config/xtensa/xtensa.h (FRAME_GROWS_DOWNWARD): New macro definition.
30307         (INITIAL_ELIMINATION_OFFSET): Replace body with call to
30308         xtensa_initial_elimination_offset.
30310 2017-05-08  Nathan Sidwell  <nathan@acm.org>
30312         * doc/invoke.texi: Alphabetize -fdump options.
30314 2017-05-08  Martin Sebor  <msebor@redhat.com>
30316         PR translation/80280
30317         * config/sol2-c.c (solaris_pragma_align): Correct quoting.
30319 2017-05-08  Bernd Edlinger  <bernd.edlinger@hotmail.de>
30321         * target.def (compute_frame_layout): New optional target hook.
30322         * doc/tm.texi.in (TARGET_COMPUTE_FRAME_LAYOUT): Add hook.
30323         * doc/tm.texi (TARGET_COMPUTE_FRAME_LAYOUT): Add documentation.
30324         * lra-eliminations.c (update_reg_eliminate): Call compute_frame_layout
30325         target hook.
30326         * reload1.c (verify_initial_elim_offsets): Likewise.
30327         * config/arm/arm.c (TARGET_COMPUTE_FRAME_LAYOUT): Define.
30328         (use_simple_return_p): Call arm_compute_frame_layout if needed.
30329         (arm_get_frame_offsets): Split up into this ...
30330         (arm_compute_frame_layout): ... and this function.
30332 2017-05-08  Richard Sandiford  <richard.sandiford@arm.com>
30334         * config/aarch64/constraints.md (Usa): New constraint.
30335         * config/aarch64/aarch64.md (*movsi_aarch64, *movdi_aarch64): Use it.
30337 2017-05-08  Thomas Preud'homme  <thomas.preudhomme@arm.com>
30339         * config.gcc (arm*-*-*): Set TM_MULTILIB_CONFIG from
30340         with_multilib_list after it has been checked.
30342 2017-05-08  Richard Biener  <rguenther@suse.de>
30344         * tree-ssa-pre.c (bitmap_set_and): Avoid bitmap copy.
30345         (bitmap_set_subtract_values): Likewise.
30347 2017-05-08  Richard Biener  <rguenther@suse.de>
30349         * tree-vrp.c (gimple_assign_nonzero_warnv_p): Rename to ...
30350         (gimple_assign_nonzero): ... this and remove strict_overflow_p
30351         argument.
30352         (gimple_stmt_nonzero_warnv_p): Rename to ...
30353         (gimple_stmt_nonzero_p): ... this and remove strict_overflow_p
30354         argument.
30355         (vrp_stmt_computes_nonzero): Remove strict_overflow_p argument.
30356         (extract_range_basic): Adjust, do not disable propagation on
30357         strict overflow sensitive simplification.
30358         (vrp_visit_cond_stmt): Likewise.
30360 2017-05-05  Jan Hubicka  <hubicka@ucw.cz>
30362         * ipa-inline-analysis.c (estimate_function_body_sizes): Recompute
30363         body size unconditionally.
30365 2017-05-07  Jeff Law  <law@redhat.com>
30367         Revert:
30368         2017-05-06  Jeff Law  <law@redhat.com>
30369         PR tree-optimization/78496
30370         * tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
30371         code.
30373         PR tree-optimization/78496
30374         * tree-vrp.c (simplify_assert_expr_using_ranges): New function.
30375         (simplify_stmt_using_ranges): Call it.
30376         (vrp_dom_walker::before_dom_children): Extract equivalences
30377         from an ASSERT_EXPR with an equality comparison against a
30378         constant.
30380 2017-05-06  Jeff Law  <law@redhat.com>
30382         PR tree-optimization/78496
30383         * tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
30384         code.
30386         PR tree-optimization/78496
30387         * tree-vrp.c (simplify_assert_expr_using_ranges): New function.
30388         (simplify_stmt_using_ranges): Call it.
30389         (vrp_dom_walker::before_dom_children): Extract equivalences
30390         from an ASSERT_EXPR with an equality comparison against a
30391         constant.
30393 2017-05-06  Richard Sandiford  <richard.sandiford@linaro.org>
30395         * lra-constraints.c (lra_copy_reg_equiv): New function.
30396         (split_reg): Use it to copy equivalence information from the
30397         original register to the spill register.
30399 2017-05-06  Richard Sandiford  <richard.sandiford@linaro.org>
30401         PR rtl-optimization/75964
30402         * simplify-rtx.c (simplify_const_relational_operation): Remove
30403         invalid handling of comparisons of integer ABS.
30405 2017-05-06  Uros Bizjak  <ubizjak@gmail.com>
30407         * config/i386/i386.c (ext_80387_constant_init): Do not explicitly
30408         initialize to zero.
30409         (init_regs): Remove declaration.
30410         (function_arg_advance_32): Initialize error_p as boolean variable.
30412 2017-05-05  Nathan Sidwell  <nathan@acm.org>
30414         * store-motion.c (remove_reachable_equiv_notes): Reformat long
30415         lines.  Use for (;;).
30417 2017-05-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30419         * config/rs6000/rs6000.c (rs6000_vect_nonmem): New static var.
30420         (rs6000_init_cost): Initialize rs6000_vect_nonmem.
30421         (rs6000_add_stmt_cost): Update rs6000_vect_nonmem.
30422         (rs6000_finish_cost): Avoid vectorizing simple copy loops with
30423         VF=2 that require versioning.
30425 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
30427         * diagnostic.h (CARET_LINE_MARGIN): Convert from macro to const
30428         int.
30430 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
30432         * diagnostic.h (diagnostic_override_option_index): Convert from
30433         macro to inline function.
30435 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
30437         * diagnostic.c (last_module_changed_p): New function.
30438         (set_last_module): New function.
30439         (diagnostic_report_current_module): Convert macro usage to
30440         the above functions.
30441         * diagnostic.h (diagnostic_context::last_module): Strengthen
30442         from const line_map * to const line_map_ordinary *.
30443         (diagnostic_last_module_changed): Delete macro.
30444         (diagnostic_set_last_module): Delete macro.
30446 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
30448         * diagnostic.c (diagnostic_impl): Replace report_diagnostic
30449         with diagnostic_report_diagnostic.
30450         (diagnostic_n_impl_richloc): Likewise.
30451         * diagnostic.h (report_diagnostic): Delete macro.
30452         * rtl-error.c (diagnostic_for_asm): Replace report_diagnostic
30453         with diagnostic_report_diagnostic.
30454         * substring-locations.c (format_warning_va): Likewise.
30456 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
30458         * diagnostic.c (diagnostic_report_diagnostic): Eliminate
30459         save/restor of format_spec.  Move option-printing code to...
30460         (print_option_information): ...this new function, and
30461         reimplement by simply printing to the pretty_printer,
30462         rather than appending to the format string.
30464 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
30466         * diagnostic.c (diagnostic_report_diagnostic): Split out pragma
30467         handling logic into...
30468         (update_effective_level_from_pragmas): ...this new function.
30470 2017-05-04  Andrew Waterman  <andrew@sifive.com>
30472         * config/riscv/riscv.opt (mstrict-align): New option.
30473         * config/riscv/riscv.h (STRICT_ALIGNMENT): Use it.  Update comment.
30474         (SLOW_UNALIGNED_ACCESS): Define.
30475         (riscv_slow_unaligned_access): Declare.
30476         * config/riscv/riscv.c (riscv_tune_info): Add slow_unaligned_access
30477         field.
30478         (riscv_slow_unaligned_access): New variable.
30479         (rocket_tune_info): Set slow_unaligned_access to true.
30480         (optimize_size_tune_info): Set slow_unaligned_access to false.
30481         (riscv_cpu_info_table): Add entry for optimize_size_tune_info.
30482         (riscv_valid_lo_sum_p): Use TARGET_STRICT_ALIGN.
30483         (riscv_option_override): Set riscv_slow_unaligned_access.
30484         * doc/invoke.texi: Add -mstrict-align to RISC-V.
30486 2017-05-04  Kito Cheng  <kito.cheng@gmail.com>
30488         * config/riscv/riscv.md: Unify indentation.
30490 2017-05-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
30492         PR target/79038
30493         PR target/79202
30494         PR target/79203
30495         * config/rs6000/rs6000.md (u code attribute): Add FIX and
30496         UNSIGNED_FIX.
30497         (extendsi<mode>2): Add support for doing sign extension via
30498         VUPKHSW and XXPERMDI if the value is in Altivec registers and we
30499         don't have ISA 3.0 instructions.
30500         (extendsi<mode>2 splitter): Likewise.
30501         (fix_trunc<mode>si2): If we are at ISA 2.07 (VSX small integer),
30502         generate the normal insns since SImode can now go in vector
30503         registers.  Disallow the special UNSPECs needed for previous
30504         machines to hide SImode being used.  Add new insns
30505         fctiw{,w}_<mode>_smallint if SImode can go in vector registers.
30506         (fix_trunc<mode>si2_stfiwx): Likewise.
30507         (fix_trunc<mode>si2_internal): Likewise.
30508         (fixuns_trunc<mode>si2): Likewise.
30509         (fixuns_trunc<mode>si2_stfiwx): Likewise.
30510         (fctiw<u>z_<mode>_smallint): Likewise.
30511         (fctiw<u>z_<mode>_mem): New combiner pattern to prevent conversion
30512         of floating point to 32-bit integer from doing a direct move to
30513         the GPR registers to do a store.
30514         (fctiwz_<mode>): Break long line.
30516 2017-05-05  Bin Cheng  <bin.cheng@arm.com>
30518         * Makefile.in (GTFILES): Add tree-ssa-loop-ivopts.c.
30519         * tree-ssa-loop-ivopts.c (compute_max_addr_offset): Delete.
30520         (addr_list, addr_offset_valid_p): New.
30521         (split_address_groups): Check offset validity with above function.
30522         (gt-tree-ssa-loop-ivopts.h): Include header file.
30524 2017-05-05  Nathan Sidwell  <nathan@acm.org>
30526         * config.gcc (arm*-*-*): Add missing 'fi'.
30528 2017-05-05  Steve Ellcey  <sellcey@cavium.com>
30530         * doc/invoke.texi (-fopt-info): Explicitly say order of options
30531         included in -fopt-info does not matter.
30532         * doc/optinfo.texi (-fopt-info): Fix description of default
30533         behavour. Explicitly say order of options included in -fopt-info
30534         does not matter.
30536 2017-05-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>
30538         * config.gcc: Allow combinations of aprofile and rmprofile values for
30539         --with-multilib-list.
30540         * config/arm/t-multilib: New file.
30541         * config/arm/t-aprofile: Remove initialization of MULTILIB_*
30542         variables.  Remove setting of ISA and floating-point ABI in
30543         MULTILIB_OPTIONS and MULTILIB_DIRNAMES.  Set architecture and FPU in
30544         MULTI_ARCH_OPTS_A and MULTI_ARCH_DIRS_A rather than MULTILIB_OPTIONS
30545         and MULTILIB_DIRNAMES respectively.  Add comment to introduce all
30546         matches.  Add architecture matches for marvel-pj4 and generic-armv7-a
30547         CPU options.
30548         * config/arm/t-rmprofile: Likewise except for the matches changes.
30549         * doc/install.texi (--with-multilib-list): Document the combination of
30550         aprofile and rmprofile values and warn about pitfalls in doing that.
30552 2017-05-05  Wilco Dijkstra  <wdijkstr@arm.com>
30554         * config/aarch64/aarch64.md (movsi_aarch64): Remove '*' from r=w.
30555         (movdi_aarch64): Likewise.
30557 2017-05-05  Jakub Jelinek  <jakub@redhat.com>
30559         PR tree-optimization/80632
30560         * tree-switch-conversion.c (struct switch_conv_info): Add target_vop
30561         field.
30562         (build_arrays): Initialize it for virtual phis.
30563         (fix_phi_nodes): Use it for virtual phis.
30565         PR tree-optimization/80558
30566         * tree-vrp.c (extract_range_from_binary_expr_1): Optimize
30567         [x, y] op z into [x op, y op z] for op & or | if conditions
30568         are met.
30570 2017-05-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
30571             Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
30573         PR target/71607
30574         * config/arm/arm.md (use_literal_pool): Remove.
30575         (64-bit immediate split): No longer takes cost into consideration
30576         if arm_disable_literal_pool is enabled.
30577         * config/arm/arm.c (arm_tls_referenced_p): Add diagnostic if TLS is
30578         used when arm_disable_literal_pool is enabled.
30579         (arm_max_const_double_inline_cost): Remove use of
30580         arm_disable_literal_pool.
30581         (push_minipool_fix): Add assert.
30582         (arm_reorg): Add return if arm_disable_literal_pool is enabled.
30583         * config/arm/vfp.md (no_literal_pool_df_immediate): New.
30584         (no_literal_pool_sf_immediate): New.
30586 2017-05-05  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
30588         PR tree-optimization/80613
30589         * tree-ssa-dce.c (propagate_necessity): Remove cases for
30590         BUILT_IN_STRDUP and BUILT_IN_STRNDUP.
30592 2017-05-05  Richard Biener  <rguenther@suse.de>
30594         * tree-ssa-pre.c (get_or_alloc_expr_for): Simplify.
30596 2017-05-05  Georg-Johann Lay  <avr@gjlay.de>
30598         * config/avr/avr.md [flag_strict_overflow]: Remove any occurence
30599         of this flag from insn conditions due to removal from r247495.
30601 2017-05-05  Wilco Dijkstra  <wdijkstr@arm.com>
30603         * config/arm/aarch-common.c (arm_early_load_addr_dep_ptr):
30604         New function.
30605         (arm_early_store_addr_dep_ptr): Likewise.
30606         * config/arm/aarch-common-protos.h
30607         (arm_early_load_addr_dep_ptr): Add prototype.
30608         (arm_early_store_addr_dep_ptr): Likewise.
30609         * config/arm/cortex-a53.md: Add new bypasses.
30611 2017-05-05  Jakub Jelinek  <jakub@redhat.com>
30613         * tree.c (next_type_uid): Change type to unsigned.
30614         (type_hash_canon): Decrement back next_type_uid if
30615         freeing a type node with the highest TYPE_UID.  For INTEGER_TYPEs
30616         also ggc_free TYPE_MIN_VALUE, TYPE_MAX_VALUE and TYPE_CACHED_VALUES
30617         if possible.
30619 2017-05-04  Martin Sebor  <msebor@redhat.com>
30621         * builtins.c: Fix a trivial typo in a comment.
30623         PR middle-end/79234
30624         * builtins.c (check_sizes): Adjust to handle reading past the end.
30625         Avoid printing excessive upper bound of ranges.  Use %E to print
30626         tree nodes instead of converting them to %wu.
30627         (expand_builtin_memchr): New function.
30628         (compute_dest_size): Rename...
30629         (compute_objsize): ...to this.
30630         (expand_builtin_memcpy): Adjust.
30631         (expand_builtin_mempcpy): Adjust.
30632         (expand_builtin_strcat): Adjust.
30633         (expand_builtin_strcpy): Adjust.
30634         (check_strncat_sizes): Adjust.
30635         (expand_builtin_strncat): Adjust.
30636         (expand_builtin_strncpy): Adjust and simplify.
30637         (expand_builtin_memset): Adjust.
30638         (expand_builtin_bzero): Adjust.
30639         (expand_builtin_memcmp): Adjust.
30640         (expand_builtin): Handle memcmp.
30641         (maybe_emit_chk_warning): Check strncat just once.
30643 2017-05-04  Martin Sebor  <msebor@redhat.com>
30645         PR preprocessor/79214
30646         PR middle-end/79222
30647         PR middle-end/79223
30648         * builtins.c (check_sizes): Add inlining context and issue
30649         warnings even when -Wno-system-headers is set.
30650         (check_strncat_sizes): Same.
30651         (expand_builtin_strncat): Same.
30652         (expand_builtin_memmove): New function.
30653         (expand_builtin_stpncpy): Same.
30654         (expand_builtin): Handle memmove and stpncpy.
30656 2017-05-04  Bin Cheng  <bin.cheng@arm.com>
30658         * tree-ssa-loop-ivopts.c (struct cost_pair): Remove field inv_expr
30659         which is not used any more.
30661 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
30663         * config/aarch64/aarch64.c (generic_tunings): Update prefetch model.
30665 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
30667         * config/aarch64/aarch64.c (cortexa35_tunings): Set jump alignment to 4.
30668         (cortexa53_tunings): Likewise.
30669         (cortexa57_tunings): Likewise.
30670         (cortexa72_tunings): Likewise.
30671         (cortexa73_tunings): Likewise.
30673 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
30675         * config/aarch64/aarch64.c (generic_tunings): Set jump alignment to 4.
30676         Set loop alignment to 8.
30678 2017-05-04  Martin Sebor  <msebor@redhat.com>
30680         PR translation/80280
30681         * builtins.c (expand_builtin_object_size): Add missing quoting to
30682         %D and like directives.
30683         * hsa-gen.c (hsa_type_for_scalar_tree_type): Same.
30684         (hsa_type_for_tree_type): Same.
30685         (verify_function_arguments): Same.
30686         * symtab.c (symbol_table::change_decl_assembler_name): Same.
30687         * varasm.c (get_section): Same.
30688         (mark_weak): Same.
30690 2017-05-04  Martin Sebor  <msebor@redhat.com>
30692         PR translation/80280
30693         * config/i386/i386.c (ix86_function_versions): Quote a %D directive.
30695 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
30697         * config/aarch64/aarch64.c (generic_addrcost_table):
30698         Change HI/TI mode setting.
30700 2017-05-04  Martin Jambor  <mjambor@suse.cz>
30702         PR tree-optimization/80622
30703         * tree-sra.c (comes_initialized_p): New function.
30704         (build_accesses_from_assign): Only set write lazily when
30705         comes_initialized_p is false.
30706         (analyze_access_subtree): Use comes_initialized_p.
30707         (propagate_subaccesses_across_link): Assert !comes_initialized_p
30708         instead of testing for PARM_DECL.
30710 2017-05-04  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
30712         * config/aarch64/aarch64.md (prefetch); Adjust predicate and
30713         constraint on operand 0 to allow more general addressing modes.
30714         Adjust output template.
30715         * config/aarch64/aarch64.c (aarch64_address_valid_for_prefetch_p):
30716         New function.
30717         * config/aarch64/aarch64-protos.h
30718         (aarch64_address_valid_for_prefetch_p): Declare prototype.
30719         * config/aarch64/constraints.md (Dp): New address constraint.
30720         * config/aarch64/predicates.md (aarch64_prefetch_operand): New
30721         predicate.
30723 2017-05-04  Jan Hubicka  <hubicka@ucw.cz>
30725         * ipa-cp.c (perform_estimation_of_a_value): Drop base_time parameter;
30726         update use of estimate_ipcp_clone_size_and_time.
30727         (estimate_local_effects): Update use of
30728         estimate_ipcp_clone_size_and_time and perform_estimation_of_a_value.
30729         * ipa-inline.h (estimate_ipcp_clone_size_and_time): Update prototype.
30730         * ipa-inline-analysis.c (estimate_ipcp_clone_size_and_time):
30731         Return nonspecialized time.
30733 2017-05-04  Richard Biener  <rguenther@suse.de>
30735         * tree-ssa-alias.c (get_continuation_for_phi): Improve looking
30736         for the last VUSE which def dominates the PHI.  Directly call
30737         maybe_skip_until.
30738         (get_continuation_for_phi_1): Remove.
30740 2017-05-04  Richard Sandiford  <richard.sandiford@linaro.org>
30742         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): Add commentary
30743         to explain the use of truncating division.  Cap the number of
30744         iterations to the maximum given by nb_iterations_upper_bound,
30745         if defined.
30747 2017-05-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
30749         * configure.ac (--enable-mingw-wildcard): Add new configurable feature.
30750         * configure: Regenerate.
30751         * config.in: Regenerate.
30752         * config/i386/driver-mingw32.c: new file.
30753         * config/i386/x-mingw32: Add rule to build driver-mingw32.o.
30754         * config.host: Link driver-mingw32.o on MinGW host.
30755         * doc/install.texi: Document new --enable-mingw-wildcard configure
30756         option.
30758 2017-05-04  Marek Polacek  <polacek@redhat.com>
30760         PR tree-optimization/80612
30761         * calls.c (get_size_range): Check for INTEGRAL_TYPE_P.
30763 2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
30764             Andre Simoes Dias Vieira  <andre.simoesdiasvieira@arm.com>
30766         * config/arm/arm.md (movsi): Change TARGET_32BIT to TARGET_HAVE_MOVT.
30767         (movt splitter): Likewise.
30768         * config/arm/arm.c (arm_option_check_internal): Change arm_arch_thumb2
30769         to TARGET_HAVE_MOVT, and merge with -mslow-flash-data check.
30770         (const_ok_for_arm): Change else to else if (TARGET_THUMB2) and add else
30771         block for Thumb-1 with MOVT.
30772         (thumb2_legitimate_address_p): Move code block ...
30773         (can_avoid_literal_pool_for_label_p): ... into this new function.
30774         (thumb1_legitimate_address_p): Add check for TARGET_HAVE_MOVT and
30775         literal pool.
30776         (thumb_legitimate_constant_p): Add conditional on TARGET_HAVE_MOVT
30777         * doc/invoke.texi (-mpure-code): Change "ARMv7-M targets" for
30778         "M-profile targets with the MOVT instruction".
30780 2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
30782         * config/arm/arm-builtins.c (arm_init_builtins): Rename
30783         __builtin_arm_ldfscr to __builtin_arm_get_fpscr, and rename
30784         __builtin_arm_stfscr to __builtin_arm_set_fpscr.
30786 2017-05-04  Martin Liska  <mliska@suse.cz>
30788         * tree-vrp.c (simplify_cond_using_ranges_2): Remove unused
30789         variable cond_code.
30791 2017-05-04  Richard Biener  <rguenther@suse.de>
30793         * tree.c (array_at_struct_end_p): Handle arrays at struct
30794         end with flexarrays more conservatively.  Refactor and treat
30795         arrays of arrays or aggregates more strict.  Fix
30796         VIEW_CONVERT_EXPR handling.  Remove allow_compref argument.
30797         * tree.c (array_at_struct_end_p): Adjust prototype.
30798         * emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust.
30799         * gimple-fold.c (get_range_strlen): Likewise.
30800         * tree-chkp.c (chkp_may_narrow_to_field): Likewise.
30802 2017-05-04  Richard Biener  <rguenther@suse.de>
30804         PR tree-optimization/31130
30805         * tree-vrp.c (needs_overflow_infinity): Remove as always returning
30806         false.
30807         (supports_overflow_infinity): Likewise.
30808         (is_negative_overflow_infinity): Likewise.
30809         (is_positive_overflow_infinity): Likewise.
30810         (is_overflow_infinity): Likewise.
30811         (stmt_overflow_infinity): Likewise.
30812         (overflow_infinity_range_p): Likewise.
30813         (usable_range_p): Remove as always returning true.
30814         (make_overflow_infinity): Remove.
30815         (negative_overflow_infinity): Likewise.
30816         (positive_overflow_infinity): Likewise.
30817         (avoid_overflow_infinity): Likewise.
30818         (set_value_range): Adjust accordingly.
30819         (set_value_range_to_nonnegative): Likewise, remove now unused
30820         overflow_infinity arg.
30821         (vrp_operand_equal_p): Adjust.
30822         (update_value_range): Likewise.
30823         (range_int_cst_singleton_p): Likewise.
30824         (operand_less_p): Likewise.
30825         (compare_values_warnv): Likewise.
30826         (extract_range_for_var_from_comparison_expr): Likewise.
30827         (vrp_int_const_binop): Likewise.
30828         (zero_nonzero_bits_from_vr): Likewise.
30829         (extract_range_from_multiplicative_op_1): Likewise.
30830         (extract_range_from_binary_expr_1): Likewise.
30831         (extract_range_from_unary_expr): Likewise.
30832         (extract_range_from_comparison): Likewise.
30833         (extract_range_basic): Likewise.
30834         (adjust_range_with_scev): Likewise.
30835         (compare_ranges): Likewise.
30836         (compare_range_with_value): Likewise.
30837         (dump_value_range): Likewise.
30838         (test_for_singularity): Likewise, remove strict_overflow_p parameter
30839         never used.
30840         (simplify_cond_using_ranges): Adjust.
30842 2017-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
30844         * brig-builtins.def: Added a builtin for class_f64.
30845         * builtin-types.def: Added a builtin type needed by class_f64.
30847 2017-05-03  Jason Merrill  <jason@redhat.com>
30849         * timevar.def: Add TV_CONSTEXPR.
30851 2017-05-03  David Malcolm  <dmalcolm@redhat.com>
30853         * common.opt (fdiagnostics-parseable-fixits): Fix typo.
30855 2017-05-03  Martin Jambor  <mjambor@suse.cz>
30857         * ipa-prop.c (ipa_update_after_lto_read): Removed.
30858         * ipa-prop.h (ipa_update_after_lto_read): Remove declaration.
30859         * ipa-cp.c (ipcp_propagate_stage): Do not call
30860         ipa_update_after_lto_read.
30861         * ipa-inline.c (ipa_inline): Likewise.
30863 2017-05-03  Martin Jambor  <mjambor@suse.cz>
30865         * ipa-prop.h (ipa_edge_args): Make a class.  Mark with for_user GTY
30866         tag.  Added a default constructor and a destructor.
30867         (ipa_edge_args_sum_t): New class;
30868         (ipa_edge_args_sum): Declare.
30869         (ipa_edge_args_vector): Remove declaration.
30870         (IPA_EDGE_REF): Use ipa_edge_args_sum.
30871         (ipa_free_edge_args_substructures): Remove declaration.
30872         (ipa_check_create_edge_args): Use ipa_edge_args_sum.
30873         (ipa_edge_args_info_available_for_edge_p): Likewise.
30874         * ipa-prop.c (ipa_edge_args_vector): Removed.
30875         (edge_removal_hook_holder): Likewise.
30876         (edge_duplication_hook_holder): Likewise.
30877         (ipa_edge_args_sum): New variable.
30878         (ipa_propagate_indirect_call_infos): Test ipa_edge_args_sum instead of
30879         ipa_edge_args_vector.
30880         (ipa_free_edge_args_substructures): Likewise.
30881         (ipa_free_all_edge_args): Free ipa_edge_args_sum instead of
30882         ipa_edge_args_vector.
30883         (ipa_edge_removal_hook): Turned into method
30884         ipa_edge_args_sum_t::remove.
30885         (ipa_edge_duplication_hook): Turned into method
30886         ipa_edge_args_sum_t::duplicate.
30887         (ipa_register_cgraph_hooks): Create ipa_edge_args_sum instead of
30888         registering edge hooks.
30889         (ipa_unregister_cgraph_hooks): Do not unregister edge hooks.
30890         * ipa-inline-analysis.c (estimate_function_body_sizes): Test
30891         ipa_edge_args_sum instead of ipa_edge_args_vector.
30892         * ipa-profile.c (ipa_profile): Likewise.
30894 2017-05-03  Martin Jambor  <mjambor@suse.cz>
30896         * symbol-summary.h (function_summary): New method exists.
30897         (function_summary::symtab_removal): Deallocate through release.
30898         (call_summary): New class.
30899         (gt_ggc_mx): New overload.
30900         (gt_pch_nx): Likewise.
30901         (gt_pch_nx): Likewise.
30903 2017-05-03  Jeff Law  <law@redhat.com>
30905         PR tree-optimization/78496
30906         * tree-vrp.c (simplify_cond_using_ranges_1): Renamed
30907         from simplify_cond_using_ranges.  Split off code to walk
30908         backwards through casts into ...
30909         (simplify_cond_using_ranges_2): New function.
30910         (simplify_stmt_using_ranges): Call simplify_cond_using_ranges_1.
30911         (execute_vrp): After identifying jump threads, call
30912         simplify_cond_using_ranges_2.
30914 2017-05-03  Jan Hubicka  <hubicka@ucw.cz>
30916         PR bootstrap/80609
30917         * ipa-inline.h (inline_summary): Add ctor.
30918         (create_ggc): Do not use ggc_cleared_alloc.
30920 2017-05-03  Jeff Downs  <heydowns@somuchpressure.net>
30921             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
30923         * gcc.c (handle_braces): Support escaping in switch matching
30924         text.
30925         * doc/invoke.texi (Spec Files): Document it.
30926         Remove superfluous @code markup in items.
30928 2017-05-03  David Malcolm  <dmalcolm@redhat.com>
30930         * diagnostic-show-locus.c (struct column_range): New struct.
30931         (get_affected_columns): New function.
30932         (get_printed_columns): New function.
30933         (struct correction): New struct.
30934         (correction::ensure_capacity): New function.
30935         (correction::ensure_terminated): New function.
30936         (struct line_corrections): New struct.
30937         (line_corrections::~line_corrections): New dtor.
30938         (line_corrections::add_hint): New function.
30939         (layout::print_trailing_fixits): Reimplement in terms of the new
30940         classes.
30941         (selftest::test_overlapped_fixit_printing): New function.
30942         (selftest::diagnostic_show_locus_c_tests): Call it.
30944 2017-05-03  Nathan Sidwell  <nathan@acm.org>
30946         Canonicalize canonical type hashing
30947         * tree.h (type_hash_canon_hash): Declare.
30948         * tree.c (type_hash_list, attribute_hash_list): Move into
30949         type_hash_canon_hash.
30950         (build_type_attribute_qual_variant): Break out hash code calc into
30951         type_hash_canon_hash.
30952         (type_hash_canon_hash): New.  Generic type hash computation.
30953         (build_range_type_1, build_array_type_1, build_function_type,
30954         build_method_type_directly, build_offset_type, build_complex_type,
30955         make_vector_type): Call it.
30957 2017-05-03  Richard Biener  <rguenther@suse.de>
30959         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
30960         When all DRs have unknown misaligned do not always peel
30961         when there is a store but apply the same costing model as if
30962         there were only loads.
30964 2017-05-03  Richard Biener  <rguenther@suse.de>
30966         Revert
30967         PR tree-optimization/80492
30968         * tree-ssa-alias.c (decl_refs_may_alias_p): Handle
30969         compare_base_decls returning dont-know properly.
30971 2017-05-03  Thomas Preud'homme  <thomas.preudhomme@arm.com>
30973         * config/arm/iterators.md (CCSI): New mode iterator.
30974         (arch): New mode attribute.
30975         * config/arm/sync.md (atomic_compare_and_swap<mode>_1): Rename into ...
30976         (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1): This and ...
30977         (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): This.  Use CCSI
30978         code iterator for success result mode.
30979         * config/arm/arm.c (arm_expand_compare_and_swap): Adapt code to use
30980         the corresponding new insn generators.
30982 2017-05-03  Bin Cheng  <bin.cheng@arm.com>
30984         Revert r247509
30985         2017-05-02  Bin Cheng  <bin.cheng@arm.com>
30986         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
30988 2017-05-03  Richard Sandiford  <richard.sandiford@linaro.org>
30990         * tree-data-ref.h (SUB_CONFLICTS_IN_A): Wrap SUB argument in brackets.
30991         (SUB_CONFLICTS_IN_B, SUB_LAST_CONFLICT, SUB_DISTANCE): Likewise.
30992         (DDR_A): Wrap DDR argument in brackets.
30993         (DDR_B, DDR_AFFINE_P, DDR_ARE_DEPENDENT, DDR_SUBSCRIPTS): Likewise.
30994         (DDR_LOOP_NEST, DDR_INNER_LOOP, DDR_SELF_REFERENCE): Likewise.
30995         (DDR_REVERSED_P): Likewise.
30997 2017-05-03  Jakub Jelinek  <jakub@redhat.com>
30999         PR tree-optimization/79472
31000         * tree-switch-conversion.c (struct switch_conv_info): Add
31001         contiguous_range and default_case_nonstandard fields.
31002         (collect_switch_conv_info): Compute contiguous_range and
31003         default_case_nonstandard fields, don't clear final_bb if
31004         contiguous_range and only the default case doesn't have the required
31005         structure.
31006         (check_all_empty_except_final): Set default_case_nonstandard instead
31007         of failing if contiguous_range and the default case doesn't have empty
31008         block.
31009         (check_final_bb): Add SWTCH argument, don't fail if contiguous_range
31010         and only the default case doesn't have the required constants.  Skip
31011         virtual phis.
31012         (gather_default_values): Skip virtual phis.  Allow non-NULL CASE_LOW
31013         if default_case_nonstandard.
31014         (build_constructors): Build constant 1 just once.  Assert that default
31015         values aren't inserted in between cases if contiguous_range.  Skip
31016         virtual phis.
31017         (build_arrays): Skip virtual phis.
31018         (prune_bbs): Add DEFAULT_BB argument, don't remove that bb.
31019         (fix_phi_nodes): Don't add e2f phi arg if default_case_nonstandard.
31020         Handle virtual phis.
31021         (gen_inbound_check): Handle default_case_nonstandard case.
31022         (process_switch): Adjust check_final_bb caller.  Call
31023         gather_default_values with the first non-default case instead of
31024         default case if default_case_nonstandard.
31026 2017-05-02  Nathan Sidwell  <nathan@acm.org>
31028         * ggc-page.c (move_ptes_to_front): Replace unsigned >0 with i--
31029         check.  Fix formatting.
31031 2017-05-02  Jan Hubicka  <hubicka@ucw.cz>
31033         * ipa-inline-analysis.c (estimate_node_size_and_time): Allow roundoff
31034         errors when comparing specialized and unspecialized times.
31036 2017-05-02  David Malcolm  <dmalcolm@redhat.com>
31038         * diagnostic-show-locus.c
31039         (layout::should_print_annotation_line_p): Make private.
31040         (layout::print_annotation_line): Make private.
31041         (layout::annotation_line_showed_range_p): Make private.
31042         (layout::show_ruler): Make private.
31043         (layout::print_source_line): Make private.  Pass in line and
31044         line_width, rather than calling location_get_source_line.  Drop
31045         returned value.
31046         (layout::print_leading_fixits): New method.
31047         (layout::print_any_fixits): Rename to...
31048         (layout::print_trailing_fixits): ...this, and make private.
31049         Don't print newline fixits.
31050         (diagnostic_show_locus): Move logic for printing one row into...
31051         (layout::print_line): ...this new function.  Move the
31052         location_get_source_line call and error-handling from
31053         print_source_line to here.  Call print_leading_fixits, and rename
31054         print_any_fixits to print_trailing_fixits.
31055         (selftest::test_fixit_insert_containing_newline): Update now that
31056         newlines are partially supported.
31057         (selftest::test_fixit_insert_containing_newline_2): New test.
31058         (selftest::test_fixit_replace_containing_newline): Update comments.
31059         (selftest::diagnostic_show_locus_c_tests): Call the new test.
31060         * edit-context.c (class added_line): New class.
31061         (class edited_line): Describe newline handling in comment.
31062         (edited_line::actually_edited_p): New method.
31063         (edited_line::print_content): Delete redundant decl.
31064         (edited_line::m_predecessors): New field.
31065         (edited_file::print_content): Call edited_line::print_content.
31066         (edited_file::print_diff): Update to support newlines.
31067         (edited_file::print_diff_hunk): Likewise.
31068         (edited_file::print_run_of_changed_lines): New function.
31069         (edited_file::print_diff_line): Convert to...
31070         (print_diff_line): ...this.
31071         (edited_file::get_effective_line_count): New function.
31072         (edited_line::edited_line): Initialize new field m_predecessors.
31073         (edited_line::~edited_line): Clean up m_predecessors.
31074         (edited_line::apply_fixit): Handle newlines.
31075         (edited_line::get_effective_line_count): New function.
31076         (edited_line::print_content): New function.
31077         (edited_line::print_diff_lines): New function.
31078         (selftest::test_applying_fixits_insert_containing_newline): New
31079         test.
31080         (selftest::test_applying_fixits_replace_containing_newline): New
31081         test.
31082         (selftest::insert_line): New function.
31083         (selftest::test_applying_fixits_multiple_lines): Add example of
31084         inserting a line.
31085         (selftest::edit_context_c_tests): Call the new tests.
31087 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
31089         * tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Delete
31090         parameter cand.  Update dump information.
31091         (get_computation_cost): Update uses.
31093 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
31095         * tree-ssa-loop-ivopts.c (get_computation_aff_1): New.
31096         (get_computation_aff): Reorder parameters.  Use get_computation_aff_1.
31097         (get_computation_at, rewrite_use_address): Update use of
31098         get_computation_aff.
31100 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
31102         * tree-ssa-loop-ivopts.c (get_computation_at): Reorder parameters.
31103         (get_computation): Delete.
31104         (get_computation_cost): Implement like get_computation_cost_at.
31105         Use get_computation_at.
31106         (get_computation_cost_at): Delete.
31107         (rewrite_use_nonlinear_expr): Use get_computation_at.
31108         (rewrite_use_compare, remove_unused_ivs): Ditto.
31110 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
31112         * tree-ssa-loop-ivopts.c (rewrite_use_address): Simple refactor.
31114 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
31116         * tree-ssa-loop-ivopts.c (struct iv_ca): Rename n_regs to n_invs.
31117         (ivopts_global_cost_for_size): Rename parameter and update uses.
31118         (iv_ca_recount_cost): Update uses.
31119         (iv_ca_set_remove_invs, iv_ca_set_no_cp): Record invariants and
31120         candidates seperately in n_invs and n_cands.
31121         (iv_ca_set_add_invs, iv_ca_set_cp, iv_ca_new): Ditto.
31123 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
31125         * tree-ssa-loop-ivopts.c (struct walk_tree_data): New.
31126         (find_inv_vars_cb): New.
31127         (find_depends): Renamed to ...
31128         (find_inv_vars): ... this.
31129         (add_candidate_1, force_var_cost): Call find_inv_vars.
31130         (split_address_cost, determine_group_iv_cost_cond): Ditto.
31132 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
31134         * tree-ssa-loop-ivopts.c (struct cost_pair): Rename depends_on to
31135         inv_vars.  Add inv_exprs.
31136         (struct iv_cand): Rename depends_on to inv_vars.
31137         (struct ivopts_data): Rename max_inv_id/n_invariant_uses to
31138         max_inv_var_id/n_inv_var_uses.  Move max_inv_expr_id around.
31139         Refactor field used_inv_exprs from has_map to array n_inv_expr_uses.
31140         (dump_cand): Dump inv_vars.
31141         (tree_ssa_iv_optimize_init): Support inv_vars and inv_exprs.
31142         (record_invariant, find_depends, add_candidate_1): Ditto.
31143         (set_group_iv_cost, force_var_cost): Ditto.
31144         (split_address_cost, ptr_difference_cost, difference_cost): Ditto.
31145         (get_computation_cost_at, get_computation_cost): Ditto.
31146         (determine_group_iv_cost_generic): Ditto.
31147         (determine_group_iv_cost_address): Ditto.
31148         (determine_group_iv_cost_cond, autoinc_possible_for_pair): Ditto.
31149         (determine_group_iv_costs): Ditto.
31150         (iv_ca_recount_cost): Update call to ivopts_global_cost_for_size.
31151         (iv_ca_set_remove_invariants): Renamed to ...
31152         (iv_ca_set_remove_invs): ... this.  Support inv_vars and inv_exprs.
31153         (iv_ca_set_no_cp): Use iv_ca_set_remove_invs.
31154         (iv_ca_set_add_invariants):  Renamed to ...
31155         (iv_ca_set_add_invs): ... this.  Support inv_vars and inv_exprs.
31156         (iv_ca_set_cp): Use iv_ca_set_add_invs.
31157         (iv_ca_has_deps): Support inv_vars and inv_exprs.
31158         (iv_ca_new, iv_ca_free, iv_ca_dump, free_loop_data): Ditto.
31159         (create_new_ivs): Remove useless dump.
31161 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
31163         * tree-ssa-loop-ivopts.c (get_computation_cost_at): Remove pseudo
31164         iv_cand code.
31165         (determine_group_iv_cost_cond, determine_iv_cost): Ditto.
31166         (iv_ca_set_no_cp, create_new_iv): Ditto.
31168 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
31170         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
31172 2017-05-02  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
31174         * tree.h (EXPR_CILK_SPAWN): Use macro TREE_CHECK2 instead of
31175         function tree_check2.
31177 2017-05-02  Martin Liska  <mliska@suse.cz>
31179         * doc/gcov.texi: Add missing preposition.
31180         * gcov.c (function_info::function_info): Properly fill up
31181         all member variables.
31183 2017-05-02  Tamar Christina  <tamar.christina@arm.com>
31185         * expr.c (expand_expr_real_2): Re-cost if previous costs are the same.
31187 2017-05-02  Tamar Christina  <tamar.christina@arm.com>
31189         * simplify-rtx.c (simplify_binary_operation_1): Add LSHIFTRT case.
31191 2017-05-02  Martin Liska  <mliska@suse.cz>
31193         PR lto/77954.
31194         * lto-streamer-in.c (lto_read_tree_1): Remove
31195         LTO_STREAMER_DEBUG.
31196         * lto-streamer.c (struct tree_hash_entry): Likewise.
31197         (struct tree_entry_hasher): Likewise.
31198         (tree_entry_hasher::hash): Likewise.
31199         (tree_entry_hasher::equal): Likewise.
31200         (lto_streamer_init): Likewise.
31201         (lto_orig_address_map): Likewise.
31202         (lto_orig_address_get): Likewise.
31203         (lto_orig_address_remove): Likewise.
31204         * lto-streamer.h: Likewise.
31205         * tree-streamer-in.c (streamer_alloc_tree): Likewise.
31206         * tree-streamer-out.c (streamer_write_tree_header): Likewise.
31208 2017-05-02  Sebastian Peryt  <sebastian.peryt@intel.com>
31210         * config/i386/avx512fintrin.h (_mm_mask_add_round_sd)
31211         (_mm_maskz_add_round_sd, _mm_mask_add_round_ss)
31212         (mm_maskz_add_round_ss, _mm_mask_sub_round_sd)
31213         (mm_maskz_sub_round_sd, _mm_mask_sub_round_ss)
31214         (mm_maskz_sub_round_ss, _mm_mask_add_sd)
31215         (mm_maskz_add_sd, _mm_mask_add_ss, _mm_maskz_add_ss)
31216         (mm_mask_sub_sd, _mm_maskz_sub_sd, _mm_mask_sub_ss)
31217         (mm_maskz_sub_ss): New intrinsics.
31218         * config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
31219         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
31220         * config/i386/i386-builtin.def (__builtin_ia32_addsd_mask_round)
31221         (__builtin_ia32_addss_mask_round, __builtin_ia32_subsd_mask_round)
31222         (__builtin_ia32_subss_mask_round): New builtins.
31223         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
31224         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
31225         * config/i386/sse.md (<sse>_vm<plusminus_insn><mode>3<round_name>):
31226         Renamed to ...
31227         (<sse>_vm<plusminus_insn><mode>3<mask_name><round_name>): ... this.
31228         (v<plusminus_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
31229         Changed to ...
31230         (v<plusminus_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
31231         ... this.
31233 2017-05-02  Martin Jambor  <mjambor@suse.cz>
31235         PR tree-optimization/78687
31236         * tree-sra.c (access): New field parent.
31237         (process_subtree_disqualification): New function.
31238         (disqualify_candidate): Call it.
31239         (build_accesses_from_assign): Reset write flag if creating an
31240         assighnment link.
31241         (build_access_subtree): Fill in parent field and also prpagate
31242         down grp_write flag.
31243         (create_artificial_child_access): New parameter set_grp_write, set
31244         grp_write to its value.
31245         (propagate_subaccesses_across_link): Also propagate grp_write flag
31246         values.
31247         (propagate_all_subaccesses): Push the closest parent back to work
31248         queue if add_access_to_work_queue returned true.
31250 2017-05-02  Richard Biener  <rguenther@suse.de>
31252         * common.opt (fstrict-overflow): Alias negative to fwrapv.
31253         * doc/invoke.texi (fstrict-overflow): Remove all traces of
31254         -fstrict-overflow documentation.
31255         * tree.h (TYPE_OVERFLOW_UNDEFINED): Do not test flag_strict_overflow.
31256         (POINTER_TYPE_OVERFLOW_UNDEFINED): Test !flag_wrapv instead of
31257         flag_strict_overflow.
31258         * ipa-inline.c (can_inline_edge_p): Do not test flag_strict_overflow.
31259         * lto-opts.c (lto_write_options): Do not stream it.
31260         * lto-wrapper.c (merge_and_complain): Do not handle it.
31261         * opts.c (default_options_table): Do not set -fstrict-overflow.
31262         (finish_options): Likewise do not clear it when sanitizing.
31263         * simplify-rtx.c (simplify_const_relational_operation): Do not
31264         test flag_strict_overflow.
31266 2017-05-02  Uros Bizjak  <ubizjak@gmail.com>
31268         * config/alpha/alpha.md (*add<mode>3_ieee): Merge to add<mode>3
31269         using enabled attribute.
31270         (*sub<mode>3_ieee): Merge to sub<mode>3 using enabled attribute.
31271         (*mul<mode>3_ieee): Merge to mul<mode>3 using enabled attribute.
31272         (*div<mode>3_ieee): Merge to div<mode>3 using enabled attribute.
31273         (*sqrt<mode>2_ieee): Merge to sqrt<mode>2 using enabled attribute.
31274         (*fix_truncdfdi_ieee): Merge to *fix_truncdfdi2 using enabled attribute.
31275         (*fix_truncsfdi_ieee): Merge to *fix_truncsfdi2 using enabled attribute.
31276         (*floatdisf_ieee): Merge to floatdisf2 using enabled attribute.
31277         (*floatdidf_ieee): Merge to floatdidf2 using enabled attribute.
31278         (*truncdfsf2_ieee): Merge to truncdfsf2 using enabled attribute.
31279         (*cmpdf_ieee): Merge to *cmpdf_internal using enabled attribute.
31281 2017-05-02  Uros Bizjak  <ubizjak@gmail.com>
31283         * config/i386/i386.c (ix86_code_end): Use {FIRST,LAST}_INT_REG.
31285 2017-05-02  Richard Biener  <rguenther@suse.de>
31287         PR tree-optimization/80591
31288         Revert
31289         2017-04-10  Richard Biener  <rguenther@suse.de>
31291         * tree-ssa-structalias.c (find_func_aliases): Properly handle
31292         asm inputs.
31294 2017-05-02  Richard Biener  <rguenther@suse.de>
31296         PR tree-optimization/80549
31297         * tree-cfgcleanup.c (mfb_keep_latches): New helper.
31298         (cleanup_tree_cfg_noloop): Create forwarders to known loop
31299         headers if they do not have a preheader.
31301 2017-05-02  Martin Liska  <mliska@suse.cz>
31303         PR other/80589
31304         * common.opt: Fix typo.
31305         * doc/invoke.texi: Likewise.
31307 2017-05-01  Jan Beulich  <jbeulich@suse.com>
31309         * config/i386/sse.md (xop_vpermil2<mode>3): Do not allow operand
31310         swapping, add (x,x,m,x,n) alternative.
31312 2017-05-01  Nathan Sidwell  <nathan@acm.org>
31314         * calls.c (combine_pending_stack_adjustment_and_call): Remove
31315         unnecessary unadjusted_alignment check.
31317 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
31319         PR c++/80038
31320         * cilk_common.c (expand_builtin_cilk_detach): Move pedigree
31321         operations here.
31322         * gimplify.c (gimplify_cilk_detach): New function.
31323         (gimplify_call_expr, gimplify_modify_expr): Call it as needed.
31324         * tree-core.h: Document EXPR_CILK_SPAWN.
31325         * tree.h (EXPR_CILK_SPAWN): Define.
31327 2017-05-01  David Malcolm  <dmalcolm@redhat.com>
31329         * diagnostic-show-locus.c (layout::get_expanded_location): Rewrite
31330         to use new fixit_hint representation, using the "replace" logic.
31331         (get_line_span_for_fixit_hint): Likewise.
31332         (layout::print_any_fixits): Likewise.
31333         (selftest::test_one_liner_many_fixits): Rename to...
31334         (selftest::test_one_liner_many_fixits_1): ...this, and update
31335         comment and expected output to reflect that the multiple fix-it
31336         hints are now consolidated into one insertion.
31337         (selftest::test_one_liner_many_fixits_2): New test.
31338         (selftest::test_diagnostic_show_locus_one_liner): Update for
31339         above.
31340         (selftest::test_fixit_consolidation): Update for fix-it API
31341         change.
31342         * diagnostic.c (print_parseable_fixits): Likewise.
31343         * edit-context.c (edited_line::m_line_events): Convert from
31344         auto_vec <line_event *> to auto_vec <line_event>.
31345         (class line_event): Convert from abstract base class to a concrete
31346         class, taking over the role of replace_event.
31347         (class insert_event): Delete.
31348         (class replace_event): Rename to class line_event.  Convert to
31349         half-open range.
31350         (edit_context::add_fixits): Reimplement.
31351         (edit_context::apply_insert): Delete.
31352         (edit_context::apply_replace): Rename to...
31353         (edit_context::apply_fixit): ...this.  Convert to half-open range.
31354         (edited_file::apply_insert): Delete.
31355         (edited_file::apply_replace): Rename to...
31356         (edited_file::apply_fixit): ...this.
31357         (edited_line::~edited_line): Drop deletion of events.
31358         (edited_line::apply_insert): Delete.
31359         (edited_line::apply_replace): Rename to...
31360         (edited_line::apply_fixit): ...this.  Convert to half-open range.
31361         Update for change to type of m_line_events.
31362         * edit-context.h (edit_context::apply_insert): Delete.
31363         (edit_context::apply_replace): Rename to...
31364         (edit_context::apply_fixit): ...this.
31366 2017-05-01  Martin Sebor  <msebor@redhat.com>
31368         * gimple-ssa-sprintf.c (format_integer): Set knownrange when it's
31369         known.
31371 2017-05-01  Uros Bizjak  <ubizjak@gmail.com>
31373         PR target/68491
31374         * config/i386/cpuid.h (__get_cpuid): Always return 0 when
31375         __get_cpuid_max returns 0.
31376         (__get_cpuid_count): Ditto.
31378 2017-05-01  Eric Botcazou  <ebotcazou@adacore.com>
31380         * tree.c (substitute_in_expr) <tcc_vl_exp>: Also inline a call if the
31381         replacement expression is another instance of one of its arguments.
31383 2017-05-01  Jakub Jelinek  <jakub@redhat.com>
31385         PR target/79430
31386         * rtlanal.c (reg_set_p): If reg is a stack_pointer_rtx, also
31387         check for stack push/pop autoinc.
31388         * config/i386/i386.c (ix86_agi_dependent): Return false
31389         if the only reason why modified_in_p returned true is that
31390         addr is SP based and set_insn is a push or pop.
31392 2017-04-29  Jan Hubicka  <hubicka@ucw.cz>
31394         * ipa-inline.c (compute_inlined_call_time): Remove now unnecesary
31395         overflow check.
31397 2017-04-29  Jan Hubicka  <hubicka@ucw.cz>
31399         PR ipa/79224
31400         * ipa-inline-analysis.c (dump_predicate): Add optional parameter NL.
31401         (account_size_time): Use two predicates - exec_pred and
31402         nonconst_pred_ptr.
31403         (evaluate_conditions_for_known_args): Compute both clause and
31404         nonspec_clause.
31405         (evaluate_properties_for_edge): Evaulate both clause and nonspec_clause.
31406         (inline_summary_t::duplicate): Update.
31407         (estimate_function_body_sizes): Caluculate exec and nonconst predicates
31408         separately.
31409         (compute_inline_parameters): Likewise.
31410         (estimate_edge_size_and_time): Update caluclation of time.
31411         (estimate_node_size_and_time): Compute both time and nonspecialized
31412         time.
31413         (estimate_ipcp_clone_size_and_time): Update.
31414         (inline_merge_summary): Update.
31415         (do_estimate_edge_time): Update.
31416         (do_estimate_edge_size): Update.
31417         (do_estimate_edge_hints): Update.
31418         (inline_read_section, inline_write_summary): Stream both new predicates.
31419         * ipa-inline.c (compute_uninlined_call_time): Take uninlined_call_time
31420         as argument.
31421         (compute_inlined_call_time): Cleanup.
31422         (big_speedup_p): Update.
31423         (edge_badness): Update.
31424         * ipa-inline.h (INLINE_TIME_SCALE): Remove.
31425         (size_time_entry): Replace predicate by exec_predicate and
31426         nonconst_predicate.
31427         (edge_growth_cache_entry): Cache both time nad nonspecialized time.
31428         (estimate_edge_time): Return also nonspec_time.
31429         (reset_edge_growth_cache): Update.
31431 2017-04-29  Jakub Jelinek  <jakub@redhat.com>
31433         PR rtl-optimization/80491
31434         * ifcvt.c (noce_process_if_block): When looking for x setter
31435         with missing else_bb, don't check only the insn right before
31436         cond_earliest, but look for the last insn that x is modified in
31437         within the same bb.
31439         PR rtl-optimization/80491
31440         * alias.c (memory_modified_in_insn_p): Return true for CALL_INSNs.
31442 2017-04-29  Marc Glisse  <marc.glisse@inria.fr>
31444         PR tree-optimization/80487
31445         * tree-ssa-alias.c (stmt_kills_ref_p): Handle stpncpy and strncpy.
31447 2017-04-29  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
31449         PR tree-optimization/79697
31450         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Check if callee
31451         is BUILT_IN_STRDUP, BUILT_IN_STRNDUP, BUILT_IN_REALLOC.
31452         (propagate_necessity): Check if def_callee is BUILT_IN_STRDUP or
31453         BUILT_IN_STRNDUP.
31454         * gimple-fold.c (gimple_fold_builtin_realloc): New function.
31455         (gimple_fold_builtin): Call gimple_fold_builtin_realloc.
31457 2017-04-28  Martin Sebor  <msebor@redhat.com>
31459         PR tree-optimization/80523
31460         * gimple-ssa-sprintf.c (target_to_host_charmap): New global variable.
31461         (init_target_to_host_charmap, target_to_host, target_strtol10): New
31462         functions.
31463         (maybe_warn, format_directive, parse_directive): Use new functions.
31464         (pass_sprintf_length::execute): Call init_target_to_host_charmap.
31466 2017-04-28  Marc Glisse  <marc.glisse@inria.fr>
31468         * match.pd (X+Z OP Y+Z, X-Z OP Y-Z, Z-X OP Z-Y): New transformations.
31470 2017-04-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
31472         * configure.ac (SYSTEM_HEADER_DIR, BUILD_SYSTEM_HEADER_DIR,
31473         target_header_dir): Set correctly.
31474         * configure: Regenerated.
31475         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
31476         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
31477         instead of SYSTEM_HEADER_DIR.
31479 2017-04-28  Jan Hubicka  <hubicka@ucw.cz>
31481         * ipa-cp.c (perform_estimation_of_a_value): Turn time to sreal.
31482         (estimate_local_effects): Likewise.
31483         * ipa-inline.c (compute_inlined_call_time, want_inline_small_function_p,
31484         edge_badness, inline_small_functions, dump_overall_stats): LIkewise.
31485         * ipa-inline.h (edge_growth_cache_entry, estimate_time_after_inlining,
31486         estimate_ipcp_clone_size_and_time, do_estimate_edge_time,
31487         do_estimate_edge_time, estimate_edge_time): Likewise.
31488         * ipa-inline-analysis.c (estimate_node_size_and_time,
31489         estimate_ipcp_clone_size_and_time, do_estimate_edge_time): Likewise.
31490         (estimate_time_after_inlining): Remove.
31492 2017-04-28  Martin Liska  <mliska@suse.cz>
31494         * doc/gcov.texi: Enhance documentation of gcov.
31496 2017-04-28  Martin Liska  <mliska@suse.cz>
31498         * doc/gcov.texi: Sort options in alphabetic order.
31499         * doc/gcov-dump.texi: Likewise.
31500         * doc/gcov-tool.texi: Likewise.
31501         * gcov.c (print_usage): Likewise.
31502         * gcov-dump.c (print_usage): Likewise.
31503         * gcov-tool.c (print_merge_usage_message): Likewise.
31504         (print_rewrite_usage_message): Likewise.
31505         (print_overlap_usage_message): Likewise.
31507 2017-04-28  Martin Liska  <mliska@suse.cz>
31509         PR gcov-profile/53915
31510         * gcov.c (format_gcov): Print 'NAN %' when top > bottom.
31512 2017-04-28  Martin Liska  <mliska@suse.cz>
31514         PR gcov-profile/79891
31515         * gcov.c (add_line_counts): Assign BBs to lines just if the BB
31516         is marked by compiler as living on a line.
31517         (get_cycles_count): Remove usage of the union.
31518         (output_intermediate_file): Likewise.
31519         (find_source): Fix GNU coding style.
31520         (accumulate_line_counts): Remove old non-all block mode.
31521         (output_lines): Remove usage of the union.
31522         * profile.c (output_location): Include all BBs, even if
31523         belonging to a same line (and file) as a previous BB.
31525 2017-04-28  Martin Liska  <mliska@suse.cz>
31527         * gcov.c (process_args): Handle new argument 'w'.
31528         (read_graph_file): Assign ID to BBs.
31529         (output_branch_count): Display BB # if verbose flag is set.
31530         (output_lines): Likewise for arcs.
31531         (print_usage): Add '--verbose' option help.
31532         * doc/gcov.texi: Document --verbose (-w) option.
31534 2017-04-28  Martin Liska  <mliska@suse.cz>
31536         * gcov.c (struct block_location_info): New struct.
31537         (process_file): Fill up the new structure.
31538         (read_graph_file): Replace usage of encoding by the newly added
31539         struct.
31540         (add_line_counts): Likewise.
31541         (accumulate_line_counts): Remove usage of the union.
31542         (function_info::function_info): New function.
31543         (function_info::~function_info): Likewise.
31544         (process_file): Call delete instead of release_function.
31545         (release_function): Release the function.
31546         (release_structures): Call delete instead of release_function.
31547         (solve_flow_graph): Replace usage of num_blocks.
31548         (find_exception_blocks): Likewise.
31549         (output_lines): Fix GNU coding style.
31551 2017-04-28  Martin Liska  <mliska@suse.cz>
31553         PR driver/56469
31554         * coverage.c (coverage_remove_note_file): New function.
31555         * coverage.h: Declare the function.
31556         * toplev.c (finalize): Clean if an error has been seen.
31558 2017-04-28  Martin Liska  <mliska@suse.cz>
31560         PR gcov-profile/80031
31561         * gcov-dump.c (tag_blocks): Just print number of basic blocks.
31562         * gcov-io.h (GCOV_TAG_BLOCKS_NUM): Remove unused macro.
31563         * gcov.c (read_graph_file): Read just number of blocks.
31564         * profile.c (branch_prob): Do not stream 0 flags per a basic
31565         block.
31567 2017-04-28  Martin Liska  <mliska@suse.cz>
31569         * gcov-dump.c (tag_*): Add new argument to declarations.
31570         (dump_gcov_file): Likewise.
31571         (tag_blocks): Add and use new argument depth.
31572         (tag_arcs): Likewise.
31573         (tag_lines): Likewise.
31574         (tag_counters): Likewise.
31575         (tag_summary): Likewise.
31576         (dump_working_sets): Use depth to do a proper indentation.
31578 2017-04-28  Jakub Jelinek  <jakub@redhat.com>
31580         PR bootstrap/80531
31581         * cgraph.h (symtab_node::debug_symtab): No longer inline.
31582         * symtab.c (symtab_node::debug_symtab): Move definition here.
31584 2017-04-28  Richard Biener  <rguenther@suse.de>
31586         * lto-streamer.h (LTO_major_version): Bump to 7.
31588 2017-04-28  Richard Biener  <rguenther@suse.de>
31590         * tree-vrp.c (assert_info): New struct.
31591         (add_assert_info): New helper.
31592         (register_edge_assert_for_2): Refactor to add asserts to a vector
31593         of assert_info.
31594         (register_edge_assert_for_1): Likewise.
31595         (register_edge_assert_for): Likewise.
31596         (finish_register_edge_assert_for): New helper actually registering
31597         asserts where live on edge.
31598         (find_conditional_asserts): Adjust.
31599         (find_switch_asserts): Likewise.
31600         (evrp_dom_walker::try_find_new_range): Generalize.
31601         (evrp_dom_walker::before_dom_children): Use register_edge_assert_for.
31603 2017-04-27  Marek Polacek  <polacek@redhat.com>
31605         PR sanitizer/80349
31606         * fold-const.c (fold_binary_loc) <case EQ_EXPR, NE_EXPR>: Convert
31607         arg10 and arg11 to itype.
31609 2017-04-27  Jonathan Wakely  <jwakely@redhat.com>
31611         * doc/extend.texi (Object Size Checking): Improve grammar.
31613 2017-04-27  Richard Earnshaw  <rearnsha@arm.com>
31615         PR target/80530
31616         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Ensure
31617         that the logic for permitting reciprocal estimates matches that
31618         in use_rsqrt_p.
31620 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
31622         PR c++/80534
31623         * tree.c (type_cache_hasher::equal): Only compare
31624         TYPE_TYPELESS_STORAGE flag on non-aggregate element types.
31625         (build_array_type_1): Only hash TYPE_TYPELESS_STORAGE flag on
31626         non-aggregate element types.
31627         * tree.h (TYPE_TYPELESS_STORAGE): Fix comment typo, add more details
31628         about the flag on ARRAY_TYPEs in the comment, formatting fix.
31630 2017-04-27  Richard Biener  <rguenther@suse.de>
31632         PR middle-end/80533
31633         * emit-rtl.c (set_mem_attributes_minus_bitpos): When
31634         stripping ARRAY_REFs from MEM_EXPR make sure we're not
31635         keeping a reference to a trailing array.
31637 2017-04-27  Richard Biener  <rguenther@suse.de>
31639         PR middle-end/80539
31640         * tree-chrec.c (chrec_fold_plus_poly_poly): Deal with not
31641         being in loop-closed SSA form conservatively.
31642         (chrec_fold_multiply_poly_poly): Likewise.
31644 2017-04-27  Tamar Christina  <tamar.christina@arm.com>
31646         PR middle-end/79665
31647         * expr.c (expand_expr_real_2): Move TRUNC_MOD_EXPR, FLOOR_MOD_EXPR,
31648         CEIL_MOD_EXPR, ROUND_MOD_EXPR cases.
31650 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
31652         PR target/77728
31653         * config/aarch64/aarch64.c (struct aarch64_fn_arg_alignment): Remove.
31654         (aarch64_function_arg_alignment): Return unsigned int again, but still
31655         ignore TYPE_FIELDS chain decls other than FIELD_DECLs.
31656         (aarch64_layout_arg): Adjust aarch64_function_arg_alignment caller.
31657         Don't emit -Wpsabi note.
31658         (aarch64_function_arg_boundary): Likewise.
31659         (aarch64_gimplify_va_arg_expr): Adjust aarch64_function_arg_alignment
31660         caller.
31662 2017-04-26  Nathan Sidwell  <nathan@acm.org>
31664         * tree.h (crc32_unsigned_n): Declare.
31665         (crc32_unsigned, crc32_unsigned): Make inline.
31666         * tree.c (crc32_unsigned_bits): Replace with ...
31667         (crc32_unsigned_n): ... this.
31668         (crc32_unsigned, crc32_byte): Remove.
31669         (crc32_string): Remove unnecessary braces.
31671 2017-04-25  Jan Hubicka  <hubicka@ucw.cz>
31673         * ipa-cp.c (estimate_local_effects): Convert sreal to int.
31674         * ipa-inline-analysis.c (MAX_TIME): Remove.
31675         (account_size_time): Use sreal for time.
31676         (dump_inline_summary): Update.
31677         (estimate_function_body_sizes): Update.
31678         (estimate_edge_size_and_time): Update.
31679         (estimate_calls_size_and_time): Update.
31680         (estimate_node_size_and_time): Update.
31681         (inline_merge_summary): Update.
31682         (inline_update_overall_summary): Update.
31683         (estimate_time_after_inlining): Update.
31684         (inline_read_section): Update.
31685         (inline_write_summary): Update.
31686         * ipa-inline.c (compute_uninlined_call_time): Update.
31687         (compute_inlined_call_time): Update.
31688         (recursive_inlining): Update.
31689         (inline_small_functions): Update.
31690         (dump_overall_stats): Update.
31691         * ipa-inline.h: Include sreal.h.
31692         (size_time_entry): Turn time to sreal.
31693         (inline_summary): Turn self_time nad time to sreal.
31695 2017-04-25  Jan Hubicka  <hubicka@ucw.cz>
31697         * sreal.c: Include backend.h, tree.h, gimple.h, cgraph.h and
31698         data-streamer.h
31699         (sreal::stream_out, sreal::stream_in): New.
31700         * sreal.h (sreal::stream_out, sreal::stream_in): Declare.
31702 2017-04-25  Jakub Jelinek  <jakub@redhat.com>
31704         * Makefile.in (s-options): Invoke opt-gather.awk with LC_ALL=C in the
31705         environment.
31707 2017-04-25  Uros Bizjak  <ubizjak@gmail.com>
31709         PR target/70799
31710         * config/i386/i386.c (dimode_scalar_to_vector_candidate_p):
31711         Handle ASHIFTRT.
31712         (dimode_scalar_chain::compute_convert_gain): Ditto.
31713         (dimode_scalar_chain::make_vector_copies): Ditto.
31714         (dimode_scalar_chain::convert_reg): Ditto.
31715         (dimode_scalar_chain::convert_insn): Ditto.
31716         * config/i386/sse.md (VI24_AVX512BW_1): Remove mode iterator.
31717         (VI248_AVX512BW_1): New mode iterator.
31718         (<mask_codefor>ashr<mode>3<mask_name>): Merge insn pattern with
31719         <mask_codefor>ashrv2di3<mask_name> insn using VI248_AVX512BW_1
31720         mode iterator.
31722 2017-04-25  Martin Sebor  <msebor@redhat.com>
31724         PR tree-optimization/80497
31725         * gimple-ssa-sprintf.c (get_int_range): Avoid assuming all integer
31726         constants are representable in HOST_WIDE_INT.
31727         (parse_directive): Ditto.
31729 2017-04-25  Martin Sebor  <msebor@redhat.com>
31731         PR bootstrap/80486
31732         * dominance.c (dom_info::m_n_basic_blocks): Change type to unsigned.
31733         (new_zero_array): Adjust signature.
31734         (dom_info::dom_init): Used unsigned rather that size_t.
31735         (dom_info::dom_info): Same.
31737 2017-04-25  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
31738             Jakub Jelinek  <jakub@redhat.com>
31740         PR target/77728
31741         * config/arm/arm.c: Include gimple.h.
31742         (aapcs_layout_arg): Emit -Wpsabi note if arm_needs_doubleword_align
31743         returns negative, increment ncrn only if it returned positive.
31744         (arm_needs_doubleword_align): Return int instead of bool,
31745         ignore DECL_ALIGN of non-FIELD_DECL TYPE_FIELDS chain
31746         members, but if there is any such non-FIELD_DECL
31747         > PARM_BOUNDARY aligned decl, return -1 instead of false.
31748         (arm_function_arg): Emit -Wpsabi note if arm_needs_doubleword_align
31749         returns negative, increment nregs only if it returned positive.
31750         (arm_setup_incoming_varargs): Likewise.
31751         (arm_function_arg_boundary): Emit -Wpsabi note if
31752         arm_needs_doubleword_align returns negative, return
31753         DOUBLEWORD_ALIGNMENT only if it returned positive.
31755 2017-04-25  Marek Polacek  <polacek@redhat.com>
31757         PR sanitizer/80349
31758         * fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
31759         first argument to type.
31761 2017-04-25  Bill Seurer  <seurer@linux.vnet.ibm.com>
31763         PR target/80482
31764         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Change
31765         type checks to test for compatibility instead of equality.
31767 2017-04-25  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
31768             Jakub Jelinek  <jakub@redhat.com>
31770         PR target/77728
31771         * config/aarch64/aarch64.c (struct aarch64_fn_arg_alignment): New
31772         type.
31773         (aarch64_function_arg_alignment): Return aarch64_fn_arg_alignment
31774         struct.  Ignore DECL_ALIGN of decls other than FIELD_DECL for
31775         the alignment computation, but return their maximum in warn_alignment.
31776         (aarch64_layout_arg): Adjust aarch64_function_arg_alignment caller.
31777         Emit a -Wpsabi note if warn_alignment is 16 bytes, but alignment
31778         is smaller.
31779         (aarch64_function_arg_boundary): Likewise.  Simplify using MIN/MAX.
31780         (aarch64_gimplify_va_arg_expr): Adjust aarch64_function_arg_alignment
31781         caller.
31783 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
31785         * config/arc/simdext.md (dmpyh): Fix typo.
31787 2017-04-25  Richard Biener  <rguenther@suse.de>
31789         PR tree-optimization/80492
31790         * alias.c (compare_base_decls): Handle registers with asm
31791         specification conservatively.
31792         * tree-ssa-alias.c (decl_refs_may_alias_p): Handle
31793         compare_base_decls returning dont-know properly.
31795 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
31797         * config/arc/arc.c (LEGITIMATE_OFFSET_ADDRESS_P): Delete macro.
31798         (legitimate_offset_address_p): New function.
31799         (arc_legitimate_address_p): Use above function.
31801 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
31803         * config/arc/arc.c (arc_output_mi_thunk): Emit PIC calls.
31805 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
31807         * config/arc/arc.c (arc_conditional_register_usage): Use ACCL,
31808         ACCH registers whenever they are available.
31810 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
31812         * config/arc/arc.c (arc_conditional_register_usage): Make D0, D1
31813         double regs fix when not used.
31815 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
31817         * config/arc/arc.h (REGNO_OK_FOR_BASE_P): Consider also extension
31818         core registers.
31819         (REG_OK_FOR_INDEX_P_NONSTRICT): Likewise.
31820         (REG_OK_FOR_BASE_P_NONSTRICT): Likewise.
31822 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
31824         * config/arc/arc.c (arc_output_addsi): Check for h-register class
31825         when emitting short ADD instructions.
31827 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
31829         * config/arc/arc.md (cmpsi_cc_insn_mixed): Use 'h' register
31830         constraint.
31831         (cmpsi_cc_c_insn): Likewise.
31832         (cbranchsi4_scratch): Compute proper instruction length using
31833         compact_hreg_operand.
31834         * config/arc/predicates.md (compact_hreg_operand): New predicate.
31836 2017-04-25  Richard Biener  <rguenther@suse.de>
31838         PR middle-end/80509
31839         * passes.c (pass_manager::pass_manager): Initialize
31840         m_name_to_pass_map.
31842 2017-04-25  Richard Biener  <rguenther@suse.de>
31844         PR tree-optimization/79201
31845         * tree-ssa-sink.c (statement_sink_location): Handle calls.
31847 2017-04-25  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
31849         PR target/80464
31850         * config/s390/vector.md: Split MEM->GPR vector moves for
31851         non-s_operand addresses.
31853 2017-04-25  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
31855         PR target/79895
31856         * config/s390/predicates.md (reload_const_wide_int_operand): New
31857         predicate.
31858         * config/s390/s390.md ("movti"): Remove d/P alternative.
31859         ("movti_bigconst"): New pattern definition.
31861 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
31863         PR target/80080
31864         * s390-protos.h (s390_expand_cs_hqi): Removed.
31865         (s390_expand_cs, s390_expand_atomic_exchange_tdsi): New prototypes.
31866         * config/s390/s390.c (s390_emit_compare_and_swap): Handle all integer
31867         modes as well as CCZ1mode and CCZmode.
31868         (s390_expand_atomic_exchange_tdsi, s390_expand_atomic): Adapt to new
31869         signature of s390_emit_compare_and_swap.
31870         (s390_expand_cs_hqi): Likewise, make static.
31871         (s390_expand_cs_tdsi): Generate an explicit compare before trying
31872         compare-and-swap, in some cases.
31873         (s390_expand_cs): Wrapper function.
31874         (s390_expand_atomic_exchange_tdsi): New backend specific expander for
31875         atomic_exchange.
31876         (s390_match_ccmode_set): Allow CCZmode <-> CCZ1 mode.
31877         * config/s390/s390.md ("atomic_compare_and_swap<mode>"): Merge the
31878         patterns for small and large integers.  Forbid symref memory operands.
31879         Move expander to s390.c.  Require cc register.
31880         ("atomic_compare_and_swap<DGPR:mode><CCZZ1:mode>_internal")
31881         ("*atomic_compare_and_swap<TDI:mode><CCZZ1:mode>_1")
31882         ("*atomic_compare_and_swapdi<CCZZ1:mode>_2")
31883         ("*atomic_compare_and_swapsi<CCZZ1:mode>_3"): Use s_operand to forbid
31884         symref memory operands.  Remove CC mode and call s390_match_ccmode
31885         instead.
31886         ("atomic_exchange<mode>"): Allow and implement all integer modes.
31888 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
31890         * config/s390/s390.md (define_peephole2): New peephole to help
31891         combining the load-and-test pattern with volatile memory.
31893 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
31895         * config/s390/s390.md ("cstorecc4"): Use load-on-condition and deal
31896         with CCZmode for TARGET_Z196.
31898 2017-04-25  Jakub Jelinek  <jakub@redhat.com>
31900         PR rtl-optimization/80501
31901         * combine.c (make_compound_operation_int): Set subreg_code to SET
31902         even for AND with mask of the sign bit of mode.
31904         PR rtl-optimization/80500
31905         * loop-unroll.c (combine_var_copies_in_loop_exit): Call copy_rtx on
31906         sum's initial value.
31908 2017-04-25  Julian Brown  <julian@codesourcery.com>
31909             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
31911         * config/aarch64/thunderx2t99.md (thunderx2t99_crc): New Reservation.
31913 2017-04-25  Marc Glisse  <marc.glisse@inria.fr>
31915         * fold-const.c (tree_single_nonzero_warnv_p): Handle SSA_NAME.
31917 2017-04-25  Julian Brown  <julian@codesourcery.com>
31918             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
31920         * config/aarch64/thunderx2t99.md (thunderx2t99_aes): New Reservation.
31921         (thunderx2t99_sha): New Reservation.
31923 2017-04-25  Julian Brown  <julian@codesourcery.com>
31924             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
31926         * config/aarch64/aarch64-simd.md (aarch64_simd_vec_set<mode>): Fix
31927         type for 1-element load.
31929 2017-04-24  Marc Glisse  <marc.glisse@inria.fr>
31931         * match.pd (X/[ex]C CMP Y/[ex]C): New transformation.
31933 2017-04-24  Martin Jambor  <mjambor@suse.cz>
31935         PR tree-optimization/80293
31936         * tree-sra.c (scalarizable_type_p): New parameter const_decl, make
31937         char arrays not totally scalarizable if it is false.
31938         (analyze_all_variable_accesses): Pass correct value in the new
31939         parameter.  Add a statistics counter.
31941 2017-04-24  Jan Hubicka  <hubicka@ucw.cz>
31943         PR middle-end/79931
31944         * ipa-devirt.c (dump_possible_polymorphic_call_targets): Fix ICE.
31946 2017-04-24  Richard Biener  <rguenther@suse.de>
31948         PR tree-optimization/80494
31949         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Bail
31950         out for complex types.
31952 2017-04-24  Richard Biener  <rguenther@suse.de>
31954         * tree-ssa-sccvn.h (run_scc_vn): Adjust prototype.
31955         * tree-ssa-sccvn.c (print_scc): Print SCC size.
31956         (extract_and_process_scc_for_name): Never fail but drop SCC to varying.
31957         (DFS): Adjust and never fail.
31958         (sccvn_dom_walker::fail): Remove.
31959         (sccvn_dom_walker::before_dom_children): Adjust.
31960         (run_scc_vn): Likewise and never fail.
31961         * tree-ssa-pre.c (pass_pre::execute): Adjust.
31962         (pass_fre::execute): Likewise.
31964 2017-04-24  Richard Biener  <rguenther@suse.de>
31966         PR tree-optimization/79725
31967         * tree-ssa-sink.c (statement_sink_location): Return whether
31968         failure reason was zero uses.  Move that check later.
31969         (sink_code_in_bb): Deal with zero uses by removing the stmt
31970         if possible.
31972 2017-04-24  Richard Biener  <rguenther@suse.de>
31974         PR c++/2972
31975         * tree-ssa-uninit.c (warn_uninitialized_vars): Handle some
31976         pointer-based references.
31978 2017-04-24  Richard Biener  <rguenther@suse.de>
31980         PR bootstrap/79814
31981         * pass_manager.h (pass_manager::operator new): Remove.
31982         (pass_manager::operator delete): Likewise.
31983         * passes.c (pass_manager::operator new): Remove.
31984         (pass_manager::operator delete): Likewise.
31985         (pass_manager::pass_manager): Zero individual pass members.
31987 2017-04-23  Uros Bizjak  <ubizjak@gmail.com>
31989         PR target/70799
31990         * config/i386/i386.c (dimode_scalar_to_vector_candidate_p)
31991         <case ASHIFT, case LSHIFTRT>: Also consider variable shifts.
31992         Check "XEXP (src, 1)" operand here.
31993         <case PLUS, case MINUS, case IOR, case XOR, case AND>:
31994         Check "XEXP (src, 1)" operand here.
31995         (dimode_scalar_chain::make_vector_copies): Detect count register
31996         of a shift instruction.  Zero extend count register from QImode
31997         to DImode to satisfy vector shift pattern count operand predicate.
31998         Substitute vector shift count operand with a DImode copy.
31999         (dimode_scalar_chain::convert_reg): Ditto, zero-extend from
32000         vector register.
32002 2017-04-21  Uros Bizjak  <ubizjak@gmail.com>
32004         * config/i386/i386.md (*extzvqi_mem_rex64): Move above *extzv<mode>.
32005         Remove UNSPEC_NOREX_MEM tag.  Update corresponding peephole2 pattern.
32006         (*insvqi_1_mem_rex64): Move above insv<mode>_1.  Remove
32007         UNSPEC_NOREX_MEM tag.  Update corresponding peephole2 pattern.
32008         (UNSPEC_NOREX_MEM): Remove definition.
32010 2017-04-21  Richard Biener  <rguenther@suse.de>
32012         PR tree-optimization/79547
32013         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
32014         Handle strlen, strcmp, strncmp, strcasecmp, strncasecmp, memcmp,
32015         bcmp, strspn, strcspn, __builtin_object_size and __builtin_constant_p
32016         without any constraints.
32018 2017-04-21  Richard Biener  <rguenther@suse.de>
32020         PR tree-optimization/78847
32021         * fold-const.c (split_tree): Handle POINTER_PLUS_EXPR.
32023 2017-04-21  Richard Biener  <rguenther@suse.de>
32025         * tree.h (build_qualified_type): Annotate with CXX_MEM_STAT_INFO.
32026         (build_distinct_type_copy): Likewise.
32027         (build_variant_type_copy): Likewise.
32028         * tree.c (build_qualified_type): Pass down mem-stat info.
32029         (build_distinct_type_copy): Likewise.
32030         (build_variant_type_copy): Likewise.
32032 2017-04-21  Richard Biener  <rguenther@suse.de>
32034         PR tree-optimization/80237
32035         * tree-ssa-pre.c (find_leader_in_sets): Add third set argument,
32036         defaulted to NULL.
32037         (phi_translate_1): Also allow a leader in AVAIL_OUT of pred
32038         for a simplified result.
32040 2016-04-21  Richard Biener  <rguenther@suse.de>
32042         * tree-ssa-loop-ivcanon.c (constant_after_peeling): Do not require
32043         sth as strict as a simple_iv but a chrec without symbols and an
32044         operand defined in the loop we are peeling (and not some subloop).
32045         (propagate_constants_for_unrolling): Propagate all constants.
32047 2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
32049         PR target/79804
32050         * config/i386/i386.c (print_reg): Remove assert for disalowed
32051         regno values, call output_operand_lossage instead.
32053 2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
32055         PR target/78090
32056         * config/i386/constraints.md (Yc): New register constraint.
32057         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
32058         Use Yc constraint for alternative 2 of operand 0.  Remove
32059         preferred_for_speed attribute.
32061 2017-04-20  Alexander Monakov  <amonakov@ispras.ru>
32063         * omp-low.c (lower_lastprivate_clauses): Correct handling of linear and
32064         lastprivate clauses in SIMT case.
32066 2017-04-20  Volker Reichelt  <v.reichelt@netcologne.de>
32068         * doc/invoke.texi (-Wextra-semi): Document new warning option.
32070 2017-04-20  Richard Biener  <rguenther@suse.de>
32072         PR tree-optimization/57796
32073         * tree-vect-stmts.c (vect_model_store_cost): Cost scatters
32074         as N scalar stores.
32075         (vect_model_load_cost): Cost gathers as N scalar loads.
32077 2017-04-20  Richard Biener  <rguenther@suse.de>
32079         * ggc-page.c (ggc_allocated_p): Rename to ...
32080         (safe_lookup_page_table_entry): ... this and return the lookup
32081         result.
32082         (gt_ggc_m_S): Use safe_lookup_page_table_entry.
32084 2017-04-20  Richard Biener  <rguenther@suse.de>
32086         PR tree-optimization/80453
32087         * tree-ssa-sccvn.h (struct vn_phi_s): Add cclhs and ccrhs members.
32088         * tree-ssa-sccvn.c (cond_stmts_equal_p): Use recorded lhs and rhs
32089         from the conditions.
32090         (vn_phi_eq): Pass them down.
32091         (vn_phi_lookup): Record them.
32092         (vn_phi_insert): Likewise.
32094 2017-04-20  Matthew Fortune  <matthew.fortune@imgtec.com>
32096         * config/mips/mips.c (mips_expand_vec_perm_const): Re-fix
32097         uninitialized variable warning to avoid buffer overrun.
32099 2017-04-20  Alexander Monakov  <amonakov@ispras.ru>
32101         PR other/71250
32102         * doc/invoke.texi (-Wmissing-field-initializers): Mention that warning
32103         is suppressed for '{ 0 }' in C.
32105 2017-04-20  Jakub Jelinek  <jakub@redhat.com>
32107         * BASE-VER: Set to 8.0.0.
32109 2017-04-20  Thomas Preud'homme  <thomas.preudhomme@arm.com>
32111         * config/arm/arm.c (arm_elf_asm_cdtor): Create non-default
32112         priority .init_array and .fini_array section with SECTION_NOTYPE
32113         flag.
32115 2017-04-20  Jakub Jelinek  <jakub@redhat.com>
32117         PR middle-end/80423
32118         * tree.h (build_array_type): Add typeless_storage default argument.
32119         * tree.c (type_cache_hasher::equal): Also compare
32120         TYPE_TYPELESS_STORAGE flag for ARRAY_TYPEs.
32121         (build_array_type): Add typeless_storage argument, set
32122         TYPE_TYPELESS_STORAGE to it, if shared also hash it, and pass to
32123         recursive call.
32124         (build_nonshared_array_type): Adjust build_array_type_1 caller.
32125         (build_array_type): Likewise.  Add typeless_storage argument.
32127 2017-04-19  Eric Botcazou  <ebotcazou@adacore.com>
32128             Jakub Jelinek  <jakub@redhat.com>
32130         PR tree-optimization/80426
32131         * tree-vrp.c (extract_range_from_binary_expr_1): For an additive
32132         operation on symbolic operands, also compute the overflow for the
32133         invariant part when the operation degenerates into a negation.
32135 2017-04-19  Jakub Jelinek  <jakub@redhat.com>
32137         PR debug/80461
32138         * dwarf2out.c (modified_type_die, gen_type_die_with_usage):
32139         Check for t with zero TYPE_QUALS_NO_ADDR_SPACE.
32141         PR debug/80436
32142         * tree-ssa-loop-manip.c (find_uses_to_rename_def): Ignore debug uses.
32144 2017-04-19  Georg-Johann Lay  <avr@gjlay.de>
32146         PR target/80462
32147         * config/avr/avr.c (tree.h): Include it.
32148         (cgraph.h): Include it.
32149         (avr_encode_section_info): Don't warn for uninitialized progmem
32150         variable if it's just an alias.
32152 2017-04-19  Richard Biener  <rguenther@suse.de>
32154         PR ipa/65972
32155         * auto-profile.c (afdo_vpt_for_early_inline): Update SSA
32156         when needed by AutoPGO.
32158 2017-04-19  Paulo J. Matos  <paulo@matos-sorge.com>
32160         PR lto/50345
32161         * doc/lto.texi: Remove an extra 'that'.
32163 2017-04-19  Segher Boessenkool  <segher@kernel.crashing.org>
32165         PR rtl-optimization/80429
32166         * ira.c (split_live_ranges_for_shrink_wrap): Don't split regs that
32167         are only used in debug insns.
32169 2017-04-19  Eric Botcazou  <ebotcazou@adacore.com>
32170             Vladimir Makarov  <vmakarov@redhat.com>
32172         * config/sparc/predicates.md (input_operand): Add comment.  Return
32173         true for any memory operand when LRA is in progress.
32174         * config/sparc/sparc.c (sparc_expand_move): Minor formatting fix.
32176 2017-04-18  Jeff Law  <law@redhat.com>
32178         PR target/74563
32179         * mips.md ({return,simple_return}_internal): Do not overwrite
32180         operands[0].
32182 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
32184         PR tree-optimization/80443
32185         * tree-vrp.c (intersect_ranges): For signed 1-bit precision type,
32186         instead of adding 1, subtract -1 and similarly instead of subtracting
32187         1 add -1.
32189 2017-04-18  Richard Sandiford  <richard.sandiford@arm.com>
32191         PR rtl-optimization/80357
32192         * haifa-sched.c (tmp_bitmap): New variable.
32193         (model_recompute): Handle duplicate use records.
32194         (alloc_global_sched_pressure_data): Initialize tmp_bitmap.
32195         (free_global_sched_pressure_data): Free it.
32197 2017-04-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
32199         Revert:
32200         2017-02-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
32201         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
32202         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
32203         instead of SYSTEM_HEADER_DIR.
32205 2017-04-18  Jeff Law  <law@redhat.com>
32207         PR middle-end/80422
32208         * cfgcleanup.c (try_crossjump_to_edge): Verify SRC1 and SRC2 have
32209         predecessors after walking up the insn chain.
32211 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
32213         PR debug/80263
32214         * dwarf2out.c (modified_type_die): Try harder not to emit internal
32215         sizetype type into debug info.
32217 2017-04-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
32219         PR target/80099
32220         * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Eliminate
32221         unneeded test for TARGET_UPPER_REGS_SF.
32222         * config/rs6000/vsx.md (vsx_extract_v4sf_var): Likewise.
32224 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
32226         PR sanitizer/80444
32227         * sancov.c (sancov_pass): Use gsi_start_nondebug_after_labels_bb
32228         instead of gsi_after_labels.
32230 2017-04-18  Jeff Law  <law@redhat.com>
32232         * regcprop.c (maybe_mode_change): Avoid creating copies of the
32233         stack pointer.
32235         Revert:
32236         2017-04-13  Jeff Law  <law@redhat.com>
32237         * config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
32238         in operands[1] if it is a MEM and TARGET_MIPS16 is active.
32240 2017-04-18  Georg-Johann Lay  <avr@gjlay.de>
32242         PR target/79453
32243         * config/avr/avr.c (intl.h): Include it.
32244         (avr_pgm_check_var_decl) [reason]: Wrap diagnostic snippets into _().
32246 2017-04-18  Martin Liska  <mliska@suse.cz>
32248         PR gcov-profile/78783
32249         * gcov-tool.c (gcov_output_files): Validate that destination
32250         file is either removed by the tool or by a user.
32252 2017-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
32253             Guy Benyei  <guybe@mellanox.com>
32255         * config/arc/arc.c (arc_reorg): Move loop_end_id into a more local
32256         block, and do not negate it, the stored id is already negative.
32258 2017-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
32260         * config/arc/arc.md (doloop_begin_i): Use @pcl assembler syntax.
32262 2017-04-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
32264         PR target/80098
32265         * config/rs6000/rs6000-cpus.def (OTHER_P9_VECTOR_MASKS): Define
32266         masks of options that should be turned off if the VSX vector
32267         options are turned off.
32268         (OTHER_P8_VECTOR_MASKS): Likewise.
32269         (OTHER_VSX_VECTOR_MASKS): Likewise.
32270         * config/rs6000/rs6000.c (rs6000_option_override_internal): Call
32271         rs6000_disable_incompatible_switches to validate no type switches
32272         like -mvsx.
32273         (rs6000_incompatible_switch): New function to disallow turning on
32274         other vector options if -mno-vsx, -mno-power8-vector, or
32275         -mno-power9-vector are specified.
32277 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
32279         * config/arc/arc.h (CRT_CALL_STATIC_FUNCTION): Use long calls.
32281 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
32283         * config/arc/arc-protos.h (arc_decl_pretend_args): Remove.
32284         * config/arc/arc.c (arc_decl_pretend_args): Likewise.
32285         * config/arc/arc.h (CFA_FRAME_BASE_OFFSET): Likewise.
32286         (ARG_POINTER_CFA_OFFSET): Likewise.
32288 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
32290         * config/arc/arc.c (arc_mode_dependent_address_p): Relax
32291         conditions to take advantage of various optimizations.
32293 2017-04-13  Jeff Law  <law@redhat.com>
32295         * config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
32296         in operands[1] if it is a MEM and TARGET_MIPS16 is active.
32297         (zero_extendsidi2_dext): Likewise.
32299 2017-04-13  Jakub Jelinek  <jakub@redhat.com>
32301         PR sanitizer/80403
32302         * fold-const.c (fold_ternary_loc): Revert
32303         use op0 instead of fold_convert_loc (loc, type, arg0) part of
32304         2017-04-12 change.
32306 2017-04-13  Vladimir Makarov  <vmakarov@redhat.com>
32308         PR rtl-optimization/80343
32309         * lra-remat.c (update_scratch_ops): Assign original hard reg to
32310         new scratch pseudo.
32312 2017-04-13  Denis Khalikov <d.khalikov@partner.samsung.com>
32314         PR sanitizer/80414
32315         * ubsan.c (ubsan_expand_bounds_ifn): Pass original index
32316         to ubsan_encode_value.
32318 2017-04-13  Jeff Law  <law@redhat.com>
32320         * reload1.c (eliminate_regs_1): Call gen_rtx_raw_SUBREG for SUBREGs
32321         appearing in DEBUG_INSNs.
32323 2017-04-13  Martin Liska  <mliska@suse.cz>
32325         PR gcov-profile/80413
32326         * gcov-io.c (gcov_write_string): Copy to buffer just when
32327         allocated size is greater than zero.
32329 2017-04-13  Jakub Jelinek  <jakub@redhat.com>
32331         PR debug/80321
32332         * dwarf2out.c (decls_for_scope): Ignore declarations of
32333         current_function_decl in BLOCK_NONLOCALIZED_VARS.
32335 2017-04-12  Jan Hubicka  <hubicka@ucw.cz>
32337         PR lto/69953
32338         * ipa-visibility.c (non_local_p): Fix typos.
32339         (localize_node): When localizing symbol in same comdat group,
32340         dissolve the group only when we know external symbols are going
32341         to be privatized.
32342         (function_and_variable_visibility): Do not localize DECL_EXTERNAL.
32344 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
32346         PR tree-optimization/79390
32347         * optabs.c (emit_conditional_move): If the preferred op2/op3 operand
32348         order does not result in usable sequence, retry with reversed operand
32349         order.
32351         PR sanitizer/80403
32352         PR sanitizer/80404
32353         PR sanitizer/80405
32354         * fold-const.c (fold_ternary_loc): Use op1 instead of arg1 as argument
32355         to fold_build2_loc.  Convert TREE_OPERAND (tem, 0) to type.  Use
32356         op0 instead of fold_convert_loc (loc, type, arg0).
32358 2017-04-12  Jeff Law  <law@redhat.com>
32360         * genattrtab.c (write_eligible_delay): Verify DELAY_INSN still
32361         has a delay slot in the generated code.
32363         * config/cris/cris.md (cris_preferred_reload_class): Return
32364         GENNONACR_REGS rather than GENERAL_REGS.
32366 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
32368         PR c/80163
32369         * expr.c <CASE_CONVERT>: For EXPAND_INITIALIZER determine SIGN_EXTEND
32370         vs. ZERO_EXTEND based on signedness of treeop0's type rather than
32371         signedness of the result type.
32373 2017-04-12  Richard Biener  <rguenther@suse.de>
32374             Jeff Law  <law@redhat.com>
32376         PR tree-optimization/80359
32377         * tree-ssa-dse.c (maybe_trim_partially_dead_store): Do not
32378         trim stores to TARGET_MEM_REFs.
32380 2017-04-12  Richard Biener  <rguenther@suse.de>
32382         PR tree-optimization/79390
32383         * gimple-ssa-split-paths.c (is_feasible_trace): Restrict
32384         threading case even more.
32386 2017-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
32388         PR target/80382
32389         * config/rs6000/sync.md (atomic_load<mode>, atomic_store<mode): Test
32390         for quad_address_p for TImode, instead of just not indexed_address.
32392 2017-04-12  Richard Biener  <rguenther@suse.de>
32393             Bernd Edlinger  <bernd.edlinger@hotmail.de>
32395         PR middle-end/79671
32396         * alias.c (component_uses_parent_alias_set_from): Handle
32397         TYPE_TYPELESS_STORAGE.
32398         (get_alias_set): Likewise.
32399         * tree-core.h (tree_type_common): Add typeless_storage flag.
32400         * tree.h (TYPE_TYPELESS_STORAGE): New macro.
32401         * stor-layout.c (place_union_field): Set TYPE_TYPELESS_STORAGE
32402         for types containing members with TYPE_TYPELESS_STORAGE.
32403         (place_field): Likewise.
32404         (layout_type): Likewise for ARRAY_TYPE.
32405         * lto-streamer-out.c (hash_tree): Hash TYPE_TYPELESS_STORAGE.
32406         * tree-streamer-in.c (unpack_ts_type_common_value_fields): Stream
32407         TYPE_TYPELESS_STORAGE.
32408         * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
32410 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
32412         PR sanitizer/80349
32413         * fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
32414         first argument to type.
32416 2017-04-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
32418         PR target/80376
32419         PR target/80315
32420         * config/rs6000/rs6000.c (rs6000_expand_unop_builtin): Return
32421         CONST0_RTX (mode) rather than const0_rtx where appropriate.
32422         (rs6000_expand_binop_builtin): Likewise.
32423         (rs6000_expand_ternop_builtin): Likewise; also add missing
32424         vsx_xxpermdi_* variants; also fix typo (arg1 => arg2) for
32425         vshasigma built-ins.
32426         * doc/extend.texi: Document that vec_xxpermdi's third argument
32427         must be a constant.
32429 2017-04-11  Uros Bizjak  <ubizjak@gmail.com>
32431         * config/i386/i386.c (dimode_scalar_chain::compute_convert_gain):
32432         Use shift_const cost parameter when calculating gain of STV shifts.
32434 2017-04-11  Vladimir Makarov  <vmakarov@redhat.com>
32436         PR rtl-optimization/70478
32437         * lra-constraints.c (process_alt_operands): Check memory for
32438         disfavoring memory insn operand.
32440 2017-04-11  Jakub Jelinek  <jakub@redhat.com>
32442         PR middle-end/80100
32443         * simplify-rtx.c (simplify_binary_operation_1) <case IOR>: Perform
32444         left shift in unsigned HOST_WIDE_INT type.
32446         PR rtl-optimization/80385
32447         * simplify-rtx.c (simplify_unary_operation_1): Don't transform
32448         (not (neg X)) into (plus X -1) for complex or non-integral modes.
32450         PR libgomp/80394
32451         * omp-low.c (scan_omp_task): Don't optimize away empty tasks
32452         if they have any depend clauses.
32454 2017-04-11  Martin Liska  <mliska@suse.cz>
32456         PR ipa/80212
32457         * cgraph.c (cgraph_node::dump): Dump calls_comdat_local.
32458         * ipa-split.c (split_function): Create a local comdat symbol
32459         if caller is in a comdat group.
32461 2017-04-11  Martin Liska  <mliska@suse.cz>
32463         PR ipa/80212
32464         * ipa-cp.c (determine_versionability): Handle calls_comdat_local
32465         flags.
32467 2017-04-11  Martin Sebor  <msebor@redhat.com>
32469         PR middle-end/80364
32470         * gimple-ssa-sprintf.c (get_int_range): Remove second argument and
32471         always use the int type.  Use INTEGRAL_TYPE_P() rather than testing
32472         for INTEGER_TYPE.
32473         (directive::set_width, directive::set_precision, format_character):
32474         Adjust.
32475         (parse_directive): Use INTEGRAL_TYPE_P() rather than testing for
32476         INTEGER_TYPE.
32478 2017-04-11  Richard Earnshaw  <rearnsha@arm.com>
32480         PR target/80389
32481         * config/arm/arm.c (arm_configure_build_target): When -mcpu and -arch
32482         conflict, set target->arch_name instead of target->cpu_name.
32484 2017-04-11  Richard Biener  <rguenther@suse.de>
32486         PR tree-optimization/80374
32487         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Use
32488         build_zero_cst, remove fold_convertible_p check again.
32490 2017-04-11  Martin Liska  <mliska@suse.cz>
32492         PR sanitizer/70878
32493         * ubsan.c (instrument_object_size): Do not instrument register
32494         variables.
32496 2017-04-11  Jakub Jelinek  <jakub@redhat.com>
32498         PR target/80381
32499         * config/i386/i386-builtin-types.def
32500         (V16HI_FTYPE_V16HI_INT_V16HI_UHI_COUNT,
32501         V16HI_FTYPE_V16HI_V8HI_V16HI_UHI_COUNT,
32502         V16SI_FTYPE_V16SI_INT_V16SI_UHI_COUNT,
32503         V16SI_FTYPE_V16SI_V4SI_V16SI_UHI_COUNT,
32504         V2DI_FTYPE_V2DI_INT_V2DI_UQI_COUNT,
32505         V2DI_FTYPE_V2DI_V2DI_V2DI_UQI_COUNT,
32506         V32HI_FTYPE_V32HI_INT_V32HI_USI_COUNT,
32507         V32HI_FTYPE_V32HI_V8HI_V32HI_USI_COUNT,
32508         V4DI_FTYPE_V4DI_INT_V4DI_UQI_COUNT,
32509         V4DI_FTYPE_V4DI_V2DI_V4DI_UQI_COUNT,
32510         V4SI_FTYPE_V4SI_INT_V4SI_UQI_COUNT,
32511         V4SI_FTYPE_V4SI_V4SI_V4SI_UQI_COUNT,
32512         V8DI_FTYPE_V8DI_INT_V8DI_UQI_COUNT,
32513         V8DI_FTYPE_V8DI_V2DI_V8DI_UQI_COUNT,
32514         V8HI_FTYPE_V8HI_INT_V8HI_UQI_COUNT,
32515         V8HI_FTYPE_V8HI_V8HI_V8HI_UQI_COUNT,
32516         V8SI_FTYPE_V8SI_INT_V8SI_UQI_COUNT,
32517         V8SI_FTYPE_V8SI_V4SI_V8SI_UQI_COUNT): New function type aliases.
32518         * config/i386/i386-builtin.def (__builtin_ia32_pslld512_mask,
32519         __builtin_ia32_pslldi512_mask, __builtin_ia32_psllq512_mask,
32520         __builtin_ia32_psllqi512_mask, __builtin_ia32_psrad512_mask,
32521         __builtin_ia32_psradi512_mask, __builtin_ia32_psraq512_mask,
32522         __builtin_ia32_psraqi512_mask, __builtin_ia32_psrld512_mask,
32523         __builtin_ia32_psrldi512_mask, __builtin_ia32_psrlq512_mask,
32524         __builtin_ia32_psrlqi512_mask, __builtin_ia32_psllwi128_mask,
32525         __builtin_ia32_pslldi128_mask, __builtin_ia32_psllqi128_mask,
32526         __builtin_ia32_psllw128_mask, __builtin_ia32_pslld128_mask,
32527         __builtin_ia32_psllq128_mask, __builtin_ia32_psllwi256_mask,
32528         __builtin_ia32_psllw256_mask, __builtin_ia32_pslldi256_mask,
32529         __builtin_ia32_pslld256_mask, __builtin_ia32_psllqi256_mask,
32530         __builtin_ia32_psllq256_mask, __builtin_ia32_psradi128_mask,
32531         __builtin_ia32_psrad128_mask, __builtin_ia32_psradi256_mask,
32532         __builtin_ia32_psrad256_mask, __builtin_ia32_psraqi128_mask,
32533         __builtin_ia32_psraq128_mask, __builtin_ia32_psraqi256_mask,
32534         __builtin_ia32_psraq256_mask, __builtin_ia32_psrldi128_mask,
32535         __builtin_ia32_psrld128_mask, __builtin_ia32_psrldi256_mask,
32536         __builtin_ia32_psrld256_mask, __builtin_ia32_psrlqi128_mask,
32537         __builtin_ia32_psrlq128_mask, __builtin_ia32_psrlqi256_mask,
32538         __builtin_ia32_psrlq256_mask, __builtin_ia32_psrawi256_mask,
32539         __builtin_ia32_psraw256_mask, __builtin_ia32_psrawi128_mask,
32540         __builtin_ia32_psraw128_mask, __builtin_ia32_psrlwi256_mask,
32541         __builtin_ia32_psrlw256_mask, __builtin_ia32_psrlwi128_mask,
32542         __builtin_ia32_psrlw128_mask, __builtin_ia32_psllwi512_mask,
32543         __builtin_ia32_psllw512_mask, __builtin_ia32_psrawi512_mask,
32544         __builtin_ia32_psraw512_mask, __builtin_ia32_psrlwi512_mask,
32545         __builtin_ia32_psrlw512_mask): Use _COUNT suffixed function type
32546         aliases.
32547         * config/i386/i386.c (ix86_expand_args_builtin): Rename last_arg_count
32548         flag to second_arg_count, handle 4 argument function type _COUNT
32549         aliases, handle second_arg_count on second argument rather than last.
32551 2017-04-10  Jeff Law  <law@redhat.com>
32553         PR tree-optimization/80374
32554         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Do not try to
32555         record anything if we can not convert integer_zero_node to the
32556         desired type.
32558 2017-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
32560         PR target/80108
32561         * config/rs6000/rs6000.c (rs6000_option_override_internal):
32562         Enhance special handling given to the TARGET_P9_MINMAX option in
32563         relation to certain other options.
32565 2017-04-10  Bin Cheng  <bin.cheng@arm.com>
32567         PR tree-optimization/80153
32568         * tree-ssa-loop-ivopts.c (add_iv_candidate_for_use): Check and
32569         remove POINTER_PLUS_EXPR's base part directly, rather than through
32570         aff_tree.
32572 2017-04-10  Richard Biener  <rguenther@suse.de>
32573             Bin Cheng  <bin.cheng@arm.com>
32575         PR tree-optimization/80153
32576         * tree-affine.c (aff_combination_to_tree): Get base pointer from
32577         the first element of pointer type aff_tree.  Build result expr in
32578         aff_tree's type.
32579         (add_elt_to_tree): Convert to type unconditionally.  Remove other
32580         fold_convert calls.
32581         * tree-ssa-loop-ivopts.c (alloc_iv): Pass in consistent types.
32582         (rewrite_use_nonlinear_expr): Check invariant using iv information.
32584 2017-04-10  Richard Biener  <rguenther@suse.de>
32586         * tree-ssa-structalias.c (find_func_aliases): Properly handle
32587         asm inputs.
32589 2017-04-10  Vladimir Makarov  <vmakarov@redhat.com>
32591         PR rtl-optimization/70478
32592         * lra-constraints.c (curr_small_class_check): New.
32593         (update_and_check_small_class_inputs): New.
32594         (process_alt_operands): Update curr_small_class_check.  Disfavor
32595         alternative insn memory operands.  Check available regs for small
32596         class operands.
32598 2017-03-31  Matthew Fortune  <matthew.fortune@imgtec.com>
32600         PR target/80057
32601         * config/mips/mips.opt (-mvirt): Update description.
32602         * doc/invoke.texi (-mvirt): Likewise.
32604 2017-04-10  Richard Biener  <rguenther@suse.de>
32606         PR middle-end/80362
32607         * fold-const.c (fold_binary_loc): Look at unstripped ops when
32608         looking for NEGATE_EXPR in -A / -B to A / B folding.
32610 2017-04-10  Martin Liska  <mliska@suse.cz>
32612         PR gcov-profile/80224
32613         * gcov.c (print_usage): Fix usage string.
32614         (get_gcov_intermediate_filename): Remove.
32615         (output_gcov_file): Use both for normal and intermediate format.
32616         (generate_results): Do not initialize special file for
32617         intermediate format.
32619 2017-04-10  Richard Biener  <rguenther@suse.de>
32621         PR tree-optimization/80304
32622         * tree-ssa-loop-im.c (ref_indep_loop_p_1): Also recurse
32623         for safelen.
32625 2017-04-10  Nathan Sidwell  <nathan@acm.org>
32627         PR target/79905
32628         * config/rs6000/rs6000.c (rs6000_vector_type): New.
32629         (rs6000_init_builtins): Use it.
32631 2016-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
32633         * config/arm/arm.md (<mrc>): Add mode to SET source.
32634         (<mrrc>): Likewise.
32636 2017-04-10  Richard Biener  <rguenther@suse.de>
32638         PR middle-end/80344
32639         * gimplify.c (is_gimple_mem_rhs_or_call): Allow CLOBBERs.
32641 2017-04-10  Jakub Jelinek  <jakub@redhat.com>
32643         PR target/80324
32644         * config/i386/avx512fintrin.h (_mm512_reduce_add_epi32,
32645         _mm512_reduce_mul_epi32, _mm512_reduce_and_epi32,
32646         _mm512_reduce_or_epi32, _mm512_mask_reduce_add_epi32,
32647         _mm512_mask_reduce_mul_epi32, _mm512_mask_reduce_and_epi32,
32648         _mm512_mask_reduce_or_epi32, _mm512_reduce_min_epi32,
32649         _mm512_reduce_max_epi32, _mm512_reduce_min_epu32,
32650         _mm512_reduce_max_epu32, _mm512_mask_reduce_min_epi32,
32651         _mm512_mask_reduce_max_epi32, _mm512_mask_reduce_min_epu32,
32652         _mm512_mask_reduce_max_epu32, _mm512_reduce_add_ps,
32653         _mm512_reduce_mul_ps, _mm512_mask_reduce_add_ps,
32654         _mm512_mask_reduce_mul_ps, _mm512_reduce_min_ps, _mm512_reduce_max_ps,
32655         _mm512_mask_reduce_min_ps, _mm512_mask_reduce_max_ps,
32656         _mm512_reduce_add_epi64, _mm512_reduce_mul_epi64,
32657         _mm512_reduce_and_epi64, _mm512_reduce_or_epi64,
32658         _mm512_mask_reduce_add_epi64, _mm512_mask_reduce_mul_epi64,
32659         _mm512_mask_reduce_and_epi64, _mm512_mask_reduce_or_epi64,
32660         _mm512_reduce_min_epi64, _mm512_reduce_max_epi64,
32661         _mm512_mask_reduce_min_epi64, _mm512_mask_reduce_max_epi64,
32662         _mm512_reduce_min_epu64, _mm512_reduce_max_epu64,
32663         _mm512_mask_reduce_min_epu64, _mm512_mask_reduce_max_epu64,
32664         _mm512_reduce_add_pd, _mm512_reduce_mul_pd, _mm512_mask_reduce_add_pd,
32665         _mm512_mask_reduce_mul_pd, _mm512_reduce_min_pd, _mm512_reduce_max_pd,
32666         _mm512_mask_reduce_min_pd, _mm512_mask_reduce_max_pd): New intrinsics.
32668 2017-04-08  Vladimir Makarov  <vmakarov@redhat.com>
32670         PR rtl-optimization/70478
32671         * lra-constraints.c: Reverse the last patch.
32673 2017-04-08  Andreas Tobler  <andreast@gcc.gnu.org>
32675         * config/aarch64/aarch64-freebsd.h: Define MCOUNT_NAME.
32676         Add comment for WCHAR_T.
32678 2017-04-08  Martin Liska  <mliska@suse.cz>
32680         Revert:
32681         2017-04-07  Martin Liska  <mliska@suse.cz>
32683         PR ipa/80212
32684         * ipa-split.c (split_function): Add function part to a same comdat
32685         group.
32687 2017-04-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
32689         PR target/80358
32690         * config/rs6000/rs6000.c (expand_block_compare): Fix boundary check.
32692 2017-04-07  Pat Haugen  <pthaugen@us.ibm.com>
32694         * rs6000/rs6000.c (vec_load_pendulum): Rename...
32695         (vec_pairing): ...to this.
32696         (power9_sched_reorder2): Rewrite code for pairing vector/vecload insns.
32697         (rs6000_sched_init): Adjust for name change.
32698         (struct rs6000_sched_context): Likewise.
32699         (rs6000_init_sched_context): Likewise.
32700         (rs6000_set_sched_context): Likewise.
32702 2017-04-07  Jakub Jelinek  <jakub@redhat.com>
32704         PR target/80322
32705         PR target/80323
32706         PR target/80325
32707         PR target/80326
32708         * config/i386/avxintrin.h (_mm256_cvtsd_f64, _mm256_cvtss_f32): New
32709         intrinsics.
32710         * config/i386/avx512fintrin.h (_mm512_int2mask, _mm512_mask2int,
32711         _mm512_abs_ps, _mm512_mask_abs_ps, _mm512_abs_pd, _mm512_mask_abs_pd,
32712         _mm512_cvtsd_f64, _mm512_cvtss_f32): Likewise.
32714 2017-04-07  Andreas Tobler  <andreast@gcc.gnu.org>
32716         * config/aarch64/aarch64-freebsd.h: Define WCHAR_TYPE.
32718 2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>
32720         PR rtl-optimization/70703
32721         * ira-color.c (update_conflict_hard_regno_costs): Use
32722         int64_t instead of HOST_WIDE_INT.
32724 2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>
32726         PR rtl-optimization/70478
32727         * lra-constraints.c (process_alt_operands): Disfavor alternative
32728         insn memory operands.
32730 2017-04-07  Jeff Law  <law@redhat.com>
32732         * config/iq2000/iq2000.c (final_prescan_insn): Do not separate a
32733         CALL and NOTE_INSN_CALL_ARG_LOCATION.
32735 2017-04-07  Martin Liska  <mliska@suse.cz>
32737         PR target/79889
32738         * config/aarch64/aarch64.c (aarch64_process_target_attr):
32739         Show error message instead of an ICE.
32741 2017-04-07  Martin Liska  <mliska@suse.cz>
32743         PR ipa/80212
32744         * ipa-split.c (split_function): Add function part to a same comdat
32745         group.
32747 2017-04-07  Richard Biener  <rguenther@suse.de>
32749         PR middle-end/80341
32750         * tree.c (get_unwidened): Also handle ! for_type case for
32751         INTEGER_CSTs.
32752         * convert.c (do_narrow): Split out from ...
32753         (convert_to_integer_1): ... here.  Do not pass final truncation
32754         type to get_unwidened for TRUNC_DIV_EXPR.
32756 2017-04-07  Richard Biener  <rguenther@suse.de>
32758         * tree-affine.c (wide_int_ext_for_comb): Take type rather
32759         than aff_tree.
32760         (aff_combination_const): Adjust.
32761         (aff_combination_scale): Likewise.
32762         (aff_combination_add_elt): Likewise.
32763         (aff_combination_add_cst): Likewise.
32764         (aff_combination_convert): Likewise.
32765         (add_elt_to_tree): Likewise.  Remove unused argument.
32766         (aff_combination_to_tree): Adjust calls to add_elt_to_tree.
32768 2017-04-07  Sebastian Huber  <sebastian.huber@embedded-brains.de>
32770         * config/arm/arm.h (ARM_DEFAULT_SHORT_ENUMS): Provide default
32771         definition.
32772         * config/arm/arm.c (arm_default_short_enums): Use
32773         ARM_DEFAULT_SHORT_ENUMS.
32774         * config/arm/rtems.h (ARM_DEFAULT_SHORT_ENUMS): Define.
32776 2017-04-06  Jakub Jelinek  <jakub@redhat.com>
32778         PR debug/80234
32779         * dwarf2out.c (gen_member_die): Handle C++17 inline static data
32780         members with redundant out-of-class redeclaration.
32782 2017-04-06  Uros Bizjak  <ubizjak@gmail.com>
32784         PR target/80286
32785         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): New pattern.
32786         * config/i386/i386.md (*zero_extendsidi2):
32787         Add (?*x,*x) and (?*v,*v) alternatives.
32789 2017-04-06  Uros Bizjak  <ubizjak@gmail.com>
32791         PR target/79733
32792         * config/i386/i386.c (ix86_expand_builtin)
32793         <case IX86_BUILTIN_K{,OR}TEST{C,Z}{8,16,32,64}>: Determine insn operand
32794         mode from insn data. Convert operands to insn operand mode.
32795         Copy operands that don't satisfy insn predicate to a register.
32797 2017-04-06  Sam Thursfield  <sam.thursfield@codethink.co.uk>
32799         * config/rs6000/x-aix: Increase memory limit for genautomata on AIX.
32800         Update comments.
32802 2017-04-06  Richard Biener  <rguenther@suse.de>
32804         PR tree-optimization/80334
32805         * tree-ssa-loop-ivopts.c (rewrite_use_address): Properly
32806         preserve alignment of accesses.
32808 2017-04-06  Richard Biener  <rguenther@suse.de>
32810         PR tree-optimization/80262
32811         * tree-sra.c (build_ref_for_offset): Preserve address-space
32812         information.
32813         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address):
32814         Drop useless address-space information on MEM_REF offsets.
32816 2017-04-05  Andreas Schwab  <schwab@linux-m68k.org>
32818         * builtins.def (BUILT_IN_UPDATE_SETJMP_BUF): Fix type.
32820 2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>
32822         PR rtl-optimization/70703
32823         * ira-color.c (update_conflict_hard_regno_costs): Use
32824         HOST_WIDE_INT instead of long.
32826 2017-04-05  Uros Bizjak  <ubizjak@gmail.com>
32828         PR target/80298
32829         * config/i386/mmintrin.h: Add -msse target option when __SSE__ is
32830         not defined for x86_64 target.  Add -mmmx target option when __SSE2__
32831         is not defined.
32832         * config/i386/mm3dnow.h: Add -msse target when __SSE__ is not defined
32833         for x86_64 target.  Handle -m3dnowa option.
32835 2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>
32837         PR rtl-optimization/70703
32838         * ira-color.c (update_costs_from_allocno): Use the smallest mode.
32839         (update_conflict_hard_regno_costs): Use long instead of unsigned
32840         arithmetic for cost calculation.
32842 2017-04-05  Jakub Jelinek  <jakub@redhat.com>
32843             Bernd Edlinger  <bernd.edlinger@hotmail.de>
32845         PR sanitizer/80308
32846         * asan.c (asan_store_shadow_bytes): Fix location of last_chunk_value
32847         for big endian.
32849 2017-04-05  Eric Botcazou  <ebotcazou@adacore.com>
32851         PR target/78002
32852         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Replace
32853         ptr_mode with Pmode throughout.
32854         * config/aarch64/aarch64.md (probe_stack_range_<PTR:mode): Rename
32855         into probe_stack_range and use DImode.
32857 2017-04-05  Dominik Vogt  <vogt@linux.vnet.ibm.com>
32859         PR target/79890
32860         * config/s390/s390.c (s390_register_info_gprtofpr): Return if
32861         call_eh_return is true.
32863 2017-04-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32865         * config/s390/s390-c.c (s390_resolve_overloaded_builtin):
32866         Initialize last_match_fntype_index.
32868 2017-04-05  Jakub Jelinek  <jakub@redhat.com>
32870         PR target/80310
32871         * tree-nvr.c: Include internal-fn.h.
32872         (pass_return_slot::execute): Ignore internal calls without
32873         direct optab.
32875 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
32876             Richard Biener  <rguenther@suse.de>
32878         PR c++/80297
32879         * genmatch.c (capture::gen_transform): For GENERIC unshare_expr
32880         captures used multiple times, except for the last use.
32881         * generic-match-head.c: Include gimplify.h.
32883 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
32885         PR tree-optimization/79390
32886         * target.h (struct noce_if_info): Declare.
32887         * targhooks.h (default_noce_conversion_profitable_p): Declare.
32888         * target.def (noce_conversion_profitable_p): New target hook.
32889         * ifcvt.h (struct noce_if_info): New type, moved from ...
32890         * ifcvt.c (struct noce_if_info): ... here.
32891         (noce_conversion_profitable_p): Renamed to ...
32892         (default_noce_conversion_profitable_p): ... this.  No longer
32893         static nor inline.
32894         (noce_try_store_flag_constants, noce_try_addcc,
32895         noce_try_store_flag_mask, noce_try_cmove, noce_try_cmove_arith,
32896         noce_convert_multiple_sets): Use targetm.noce_conversion_profitable_p
32897         instead of noce_conversion_profitable_p.
32898         * config/i386/i386.c: Include ifcvt.h.
32899         (ix86_option_override_internal): Don't override
32900         PARAM_MAX_RTL_IF_CONVERSION_INSNS default.
32901         (ix86_noce_conversion_profitable_p): New function.
32902         (TARGET_NOCE_CONVERSION_PROFITABLE_P): Redefine.
32903         * config/i386/x86-tune.def (X86_TUNE_ONE_IF_CONV_INSN): Adjust comment.
32904         * doc/tm.texi.in (TARGET_NOCE_CONVERSION_PROFITABLE_P): Add.
32905         * doc/tm.texi: Regenerated.
32907 2017-04-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
32909         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Grammar
32910         correction.
32912 2017-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
32914         PR target/80307
32915         * config/arm/arm.c (thumb1_rtx_costs): Give a cost of 32
32916         instructions for small multiply cores.
32918 2017-04-04  Jeff Law  <law@redhat.com>
32920         * config/mips/mips.c (mips_multi_add): Zero initialize the newly
32921         added member.
32922         (mips_expand_vec_perm_const): Initialize elements in orig_perm
32923         that are not set by the loop over the elements.
32925 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
32927         PR target/80286
32928         * config/i386/i386.c (ix86_expand_args_builtin): If op has scalar
32929         int mode, convert_modes it to mode as unsigned, otherwise use
32930         lowpart_subreg to mode rather than SImode.
32931         * config/i386/sse.md (<mask_codefor>ashr<mode>3<mask_name>,
32932         ashr<mode>3, ashr<mode>3<mask_name>, <shift_insn><mode>3<mask_name>):
32933         Use DImode instead of SImode for the shift count operand.
32934         * config/i386/mmx.md (mmx_ashr<mode>3, mmx_<shift_insn><mode>3):
32935         Likewise.
32937 2017-04-04  Richard Biener  <rguenther@suse.de>
32939         PR middle-end/80281
32940         * match.pd (A + (-B) -> A - B): Make sure to preserve unsigned
32941         arithmetic done for the negate or the plus.  Simplify.
32942         (A - (-B) -> A + B): Likewise.
32943         * fold-const.c (split_tree): Make sure to not negate pointers.
32945 2017-04-04  Segher Boessenkool  <segher@kernel.crashing.org>
32947         PR rtl-optimization/60818
32948         * simplify-rtx.c (simplify_binary_operation_1): Do not replace
32949         a compare of comparisons with the thing compared if this results
32950         in a different machine mode.
32952 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
32954         * alias.c (base_alias_check): Fix typo in comment.
32955         * cgraph.h (class ipa_polymorphic_call_context): Likewise.
32956         * cgraphunit.c (symbol_table::compile): Likewise.
32957         * collect2.c (maybe_run_lto_and_relink): Likewise.
32958         * config/arm/arm.c (arm_thumb1_mi_thunk): Likewise.
32959         * config/avr/avr-arch.h (avr_arch_info_t): Likewise.
32960         * config/avr/avr.c (avr_map_op_t): Likewise.
32961         * config/cr16/cr16.h (DATA_ALIGNMENT): Likewise.
32962         * config/epiphany/epiphany.c (TARGET_ARG_PARTIAL_BYTES): Likewise.
32963         * config/epiphany/epiphany.md (movcc): Likewise.
32964         * config/i386/i386.c (legitimize_pe_coff_extern_decl): Likewise.
32965         * config/m68k/m68k.c (struct _sched_ib, m68k_sched_variable_issue):
32966         Likewise.
32967         * config/mips/mips.c (mips_save_restore_reg): Likewise.
32968         * config/rx/rx.c (rx_is_restricted_memory_address): Likewise.
32969         * config/s390/s390.c (Z10_EARLYLOAD_DISTANCE): Likewise.
32970         * config/sh/sh.c (sh_rtx_costs): Likewise.
32971         * fold-const.c (fold_truth_andor): Likewise.
32972         * genautomata.c (collapse_flag): Likewise.
32973         * gengtype.h (struct type::u::s): Likewise.
32974         * gensupport.c (has_subst_attribute, add_mnemonic_string): Likewise.
32975         * input.c (FORMAT_AMOUNT): Likewise.
32976         * ipa-cp.c (class ipcp_lattice, agg_replacements_to_vector)
32977         (known_aggs_to_agg_replacement_list): Likewise.
32978         * ipa-inline-analysis.c: Likewise.
32979         * ipa-inline.h (estimate_edge_time, estimate_edge_hints): Likewise.
32980         * ipa-polymorphic-call.c
32981         (ipa_polymorphic_call_context::restrict_to_inner_class): Likewise.
32982         * loop-unroll.c (analyze_insn_to_expand_var): Likewise.
32983         * lra.c (lra_optional_reload_pseudos, lra_subreg_reload_pseudos):
32984         Likewise.
32985         * modulo-sched.c (apply_reg_moves): Likewise.
32986         * omp-expand.c (build_omp_regions_1): Likewise.
32987         * trans-mem.c (struct tm_wrapper_hasher): Likewise.
32988         * tree-ssa-loop-ivopts.c (may_eliminate_iv): Likewise.
32989         * tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Likewise.
32990         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
32991         * value-prof.c: Likewise.
32992         * var-tracking.c (val_reset): Likewise.
32994 2017-04-03  Richard Biener  <rguenther@suse.de>
32996         PR tree-optimization/80275
32997         * fold-const.c (split_address_to_core_and_offset): Handle
32998         POINTER_PLUS_EXPR.
33000 2017-04-03  Eric Botcazou  <ebotcazou@adacore.com>
33002         * tree-nested.c (get_descriptor_type): Make sure that the alignment of
33003         descriptors is at least equal to that of functions.
33005 2017-04-02  Uros Bizjak  <ubizjak@gmail.com>
33007         * config/i386/sse.md (movdi_to_sse): Add missing DONE.
33009 2017-04-02  Uros Bizjak  <ubizjak@gmail.com>
33011         PR target/80250
33012         * config/i386/sse.md (mov<IMOD4:mode>): Remove insn pattern.
33013         (mov<IMOD4:mode>): New expander.
33014         (*mov<IMOD4:mode>_internal): New insn and split pattern.
33016 2017-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
33018         PR rtl-optimization/79405
33019         * fwprop.c (propagations_left): New variable.
33020         (forward_propagate_into): Decrement it.
33021         (fwprop_init): Initialize it.
33022         (fw_prop): If the variable has reached zero, stop propagating.
33023         (fwprop_addr): Ditto.
33025 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
33027         PR debug/79255
33028         * dwarf2out.c (decls_for_scope): If BLOCK_NONLOCALIZED_VAR is
33029         a FUNCTION_DECL, pass it as decl instead of origin to
33030         process_scope_var.
33032 2017-03-31  Alexander Monakov  <amonakov@ispras.ru>
33034         * config/nvptx/nvptx.c (nvptx_output_softstack_switch): Correct format
33035         string.
33037 2017-03-31  Pat Haugen  <pthaugen@us.ibm.com>
33039         PR target/80107
33040         * config/rs6000/rs6000.md (extendhi<mode>2): Add test for
33041         TARGET_VSX_SMALL_INTEGER.
33043 2017-03-31  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
33045         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
33046         reference to the OpenPOWER 64-Bit ELF V2 ABI Specification.
33048 2017-03-31  Matthew Fortune  <matthew.fortune@imgtec.com>
33050         * config/mips/mips-msa.md (msa_vec_extract_<msafmt_f>): Update
33051         extraction from odd-numbered MSA register.
33053 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
33055         PR middle-end/80173
33056         * expmed.c (store_bit_field_1): Don't attempt to create
33057         a word subreg out of hard registers wider than word if they
33058         have HARD_REGNO_NREGS of 1 for their mode.
33060         PR middle-end/80163
33061         * varasm.c (initializer_constant_valid_p_1): Disallow sign-extending
33062         conversions to integer types wider than word and pointer.
33064         PR debug/80025
33065         * cselib.h (rtx_equal_for_cselib_1): Add depth argument.
33066         (rtx_equal_for_cselib_p): Pass 0 to it.
33067         * cselib.c (cselib_hasher::equal): Likewise.
33068         (rtx_equal_for_cselib_1): Add depth argument.  If depth
33069         is 128, don't look up VALUE locs and punt.  Increment
33070         depth in recursive calls when walking VALUE locs.
33072 2017-03-31  Bernd Edlinger  <bernd.edlinger@hotmail.de>
33074         * gcov.c (md5sum_to_hex): Fix output of MD5 hex bytes.
33075         (make_gcov_file_name): Use the canonical path name for generating
33076         the MD5 value.
33077         (read_line): Fix handling of files with ascii null bytes.
33079 2017-03-30  Matthew Fortune  <matthew.fortune@imgtec.com>
33081         * config/mips/mips.c (mips_expand_vector_init): Create a const_vector
33082         to initialise a vector register instead
33083         of using a const_int.
33085 2017-03-30  Jakub Jelinek  <jakub@redhat.com>
33087         PR translation/80189
33088         * gimplify.c (omp_default_clause): Use %qs instead of %s in
33089         diagnostic messages.
33091 2017-03-30  Peter Bergner  <bergner@vnet.ibm.com>
33093         PR target/80246
33094         * config/rs6000/dfp.md (dfp_dxex_<mode>): Update mode of operand 0.
33095         (dfp_diex_<mode>): Update mode of operand 1.
33096         * doc/extend.texi (dxex, dxexq): Document change to return type.
33097         (diex, diexq): Document change to argument type.
33099 2017-03-30  Martin Jambor  <mjambor@suse.cz>
33101         PR ipa/77333
33102         * cgraph.h (cgraph_build_function_type_skip_args): Declare.
33103         * cgraph.c (redirect_call_stmt_to_callee): Set gimple fntype so that
33104         it reflects the signature changes performed at the callee side.
33105         * cgraphclones.c (build_function_type_skip_args): Make public, renamed
33106         to cgraph_build_function_type_skip_args.
33107         (build_function_decl_skip_args): Adjust call to the above function.
33109 2017-03-30  Jakub Jelinek  <jakub@redhat.com>
33111         PR target/80206
33112         * config/i386/sse.md
33113         (<extract_type>_vextract<shuffletype><extract_suf>_mask): Use
33114         register as dest whenever it is a MEM not rtx_equal_p to the
33115         corresponding dup operand, and when forcing into reg move the
33116         reg into the memory afterwards.
33117         (<extract_type_2>_vextract<shuffletype><extract_suf_2>_mask):
33118         Likewise.  Use <ssehalfvecmode> instead of <ssequartermode>
33119         for the force_reg mode.
33120         (avx512vl_vextractf128<mode>): Use register as dest either
33121         always when a MEM, or when it is a MEM not rtx_equal_p to the
33122         corresponding dup operand, or even not when it is a CONST_VECTOR
33123         depending on the mode and lo vs. hi.
33124         (avx512dq_vextract<shuffletype>64x2_1_maskm): Remove extraneous
33125         parens.
33126         (avx512f_vextract<shuffletype>32x4_1_maskm): Likewise.
33127         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name>):
33128         Likewise.  Require that operands[2] is even.
33129         (<mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name>):
33130         Remove extraneous parens.  Require that operands[2] is a multiple
33131         of 4.
33132         (vec_extract_lo_<mode><mask_name>): Don't bother testing if
33133         operands[0] is a MEM if <mask_applied>, the predicates/constraints
33134         disallow memory then.
33136 2017-03-30  Richard Biener  <rguenther@suse.de>
33138         PR tree-optimization/77498
33139         * tree-ssa-pre.c (phi_translate_1): Do not allow simplifications
33140         to non-constants over backedges.
33142 2017-03-29  Segher Boessenkool  <segher@kernel.crashing.org>
33144         PR rtl-optimization/80233
33145         * combine.c (combine_instructions): Only take NONDEBUG_INSN_P insns
33146         as last_combined_insn.  Do not test for BARRIER_P separately.
33148 2017-03-29  Andreas Schwab  <schwab@suse.de>
33150         PR ada/80146
33151         * calls.c (prepare_call_address): Convert funexp to Pmode before
33152         copying to temp reg.
33154 2017-03-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
33156         PR tree-optimization/80158
33157         * gimple-ssa-strength-reduction.c (replace_mult_candidate):
33158         Handle possible future case of more than one alternate
33159         interpretation.
33160         (replace_rhs_if_not_dup): Likewise.
33161         (replace_one_candidate): Likewise.
33163 2017-03-28  Vladimir Makarov  <vmakarov@redhat.com>
33165         PR rtl-optimization/80193
33166         * ira.c (ira): Do not check allocation for LRA.
33168 2017-03-28  Alexander Monakov  <amonakov@ispras.ru>
33170         * config/nvptx/nvptx-protos.h (nvptx_output_simt_enter): Declare.
33171         (nvptx_output_simt_exit): Declare.
33172         * config/nvptx/nvptx.c (nvptx_init_unisimt_predicate): Use
33173         cfun->machine->unisimt_location.  Handle NULL unisimt_predicate.
33174         (init_softstack_frame): Move initialization of crtl->is_leaf to...
33175         (nvptx_declare_function_name): ...here.  Emit declaration of local
33176         memory space buffer for omp_simt_enter insn.
33177         (nvptx_output_unisimt_switch): New.
33178         (nvptx_output_softstack_switch): New.
33179         (nvptx_output_simt_enter): New.
33180         (nvptx_output_simt_exit): New.
33181         * config/nvptx/nvptx.h (struct machine_function): New fields
33182         has_simtreg, unisimt_location, simt_stack_size, simt_stack_align.
33183         * config/nvptx/nvptx.md (UNSPECV_SIMT_ENTER): New unspec.
33184         (UNSPECV_SIMT_EXIT): Ditto.
33185         (omp_simt_enter_insn): New insn.
33186         (omp_simt_enter): New expansion.
33187         (omp_simt_exit): New insn.
33188         * config/nvptx/nvptx.opt (msoft-stack-reserve-local): New option.
33190         * internal-fn.c (expand_GOMP_SIMT_ENTER): New.
33191         (expand_GOMP_SIMT_ENTER_ALLOC): New.
33192         (expand_GOMP_SIMT_EXIT): New.
33193         * internal-fn.def (GOMP_SIMT_ENTER): New internal function.
33194         (GOMP_SIMT_ENTER_ALLOC): Ditto.
33195         (GOMP_SIMT_EXIT): Ditto.
33196         * target-insns.def (omp_simt_enter): New insn.
33197         (omp_simt_exit): Ditto.
33198         * omp-low.c (struct omplow_simd_context): New fields simt_eargs,
33199         simt_dlist.
33200         (lower_rec_simd_input_clauses): Implement SIMT privatization.
33201         (lower_rec_input_clauses): Likewise.
33202         (lower_lastprivate_clauses): Handle SIMT privatization.
33204         * omp-offload.c: Include langhooks.h, tree-nested.h, stor-layout.h.
33205         (ompdevlow_adjust_simt_enter): New.
33206         (find_simtpriv_var_op): New.
33207         (execute_omp_device_lower): Handle IFN_GOMP_SIMT_ENTER,
33208         IFN_GOMP_SIMT_ENTER_ALLOC, IFN_GOMP_SIMT_EXIT.
33210         * tree-inline.h (struct copy_body_data): New field dst_simt_vars.
33211         * tree-inline.c (expand_call_inline): Handle SIMT privatization.
33212         (copy_decl_for_dup_finish): Ditto.
33214         * tree-ssa.c (execute_update_addresses_taken): Handle GOMP_SIMT_ENTER.
33216 2017-03-28  Uros Bizjak  <ubizjak@gmail.com>
33218         PR target/53383
33219         * config/i386/i386.c (ix86_option_override_internal): Always
33220         allow -mpreferred-stack-boundary=3 for 64-bit targets.
33222 2017-03-28  Bin Cheng  <bin.cheng@arm.com>
33224         * tree-vect-loop.c (optimize_mask_stores): Add bb to the right loop.
33226 2017-03-28  Bin Cheng  <bin.cheng@arm.com>
33228         * tree-vect-loop-manip.c (slpeel_add_loop_guard): New param and
33229         mark new edge's irreducible flag accordign to it.
33230         (vect_do_peeling): Check loop preheader edge's irreducible flag
33231         and pass it to function slpeel_add_loop_guard.
33233 2017-03-28  Richard Sandiford  <richard.sandiford@arm.com>
33235         PR tree-optimization/80218
33236         * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
33237         Update block frequencies and counts.
33239 2017-03-28  Richard Biener  <rguenther@suse.de>
33241         PR tree-optimization/78644
33242         * tree-ssa-ccp.c (evaluate_stmt): When we may not use the value
33243         of a simplification result we may not use it at all.
33245 2017-03-28  Richard Biener  <rguenther@suse.de>
33247         PR ipa/80205
33248         * tree-inline.c (copy_phis_for_bb): Do not create PHI node
33249         without arguments, generate default definition of a SSA name.
33251 2017-03-28  Richard Biener  <rguenther@suse.de>
33253         PR middle-end/80222
33254         * gimple-fold.c (gimple_fold_indirect_ref): Do not touch
33255         TYPE_REF_CAN_ALIAS_ALL references.
33256         * fold-const.c (fold_indirect_ref_1): Likewise.
33258 2017-03-28  Martin Liska  <mliska@suse.cz>
33260         PR ipa/80104
33261         * cgraphunit.c (cgraph_node::expand_thunk): Mark argument of a
33262         thunk call as DECL_GIMPLE_REG_P when vector or complex type.
33264 2017-03-28  Claudiu Zissulescu  <claziss@synopsys.com>
33265             Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
33267         * config/arc/arc.h (CPP_SPEC): Add subtarget_cpp_spec.
33268         (EXTRA_SPECS): Define.
33269         (SUBTARGET_EXTRA_SPECS): Likewise.
33270         (SUBTARGET_CPP_SPEC): Likewise.
33271         * config/arc/elf.h (EXTRA_SPECS): Renamed to
33272         SUBTARGET_EXTRA_SPECS.
33273         * config/arc/linux.h (SUBTARGET_CPP_SPEC): Define.
33275 2017-03-28  Claudiu Zissulescu  <claziss@synopsys.com>
33277         * config/arc/simdext.md (vst64_insn): Update pattern.
33278         (vld32wh_insn): Likewise.
33279         (vld32wl_insn): Likewise.
33280         (vld64_insn): Likewise.
33281         (vld32_insn): Likewise.
33283 2017-03-28  Marek Polacek  <polacek@redhat.com>
33285         PR sanitizer/80067
33286         * fold-const.c (fold_comparison): Use protected_set_expr_location
33287         instead of SET_EXPR_LOCATION.
33289 2017-03-28  Markus Trippelsdorf  <markus@trippelsdorf.de>
33291         * tree.c (add_expr): Avoid name lookup warning.
33293 2017-03-27  Jeff Law  <law@redhat.com>
33295         PR tree-optimization/80216
33296         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Fix typo in
33297         function name.  Limit recursion depth.
33298         (record_temporary_equivalences): Corresponding changes.
33300 2017-03-27  Jonathan Wakely  <jwakely@redhat.com>
33302         * doc/invoke.texi (-Wno-narrowing): Reorder so default behavior is
33303         covered first.
33305 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
33307         PR target/80102
33308         * reg-notes.def (REG_CFA_NOTE): Define.  Use it for CFA related
33309         notes.
33310         * cfgcleanup.c (reg_note_cfa_p): New array.
33311         (insns_have_identical_cfa_notes): New function.
33312         (old_insns_match_p): Don't cross-jump in between /f
33313         and non-/f instructions.  If both i1 and i2 are frame related,
33314         verify all CFA notes, their order and content.
33316 2017-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
33318         PR target/78543
33319         * config/rs6000/rs6000.md (bswaphi2_extenddi): Combine bswap
33320         HImode and SImode with zero extend to DImode to one insn.
33321         (bswap<mode>2_extenddi): Likewise.
33322         (bswapsi2_extenddi): Likewise.
33323         (bswaphi2_extendsi): Likewise.
33324         (bswaphi2): Combine bswap HImode and SImode into one insn.
33325         Separate memory insns from swapping register.
33326         (bswapsi2): Likewise.
33327         (bswap<mode>2): Likewise.
33328         (bswaphi2_internal): Delete, no longer used.
33329         (bswapsi2_internal): Likewise.
33330         (bswap<mode>2_load): Split bswap HImode/SImode into separate load,
33331         store, and gpr<-gpr swap insns.
33332         (bswap<mode>2_store): Likewise.
33333         (bswaphi2_reg): Register only splitter, combine with the splitter.
33334         (bswaphi2 splitter): Likewise.
33335         (bswapsi2_reg): Likewise.
33336         (bswapsi2 splitter): Likewise.
33337         (bswapdi2): If we have the LDBRX and STDBRX instructions, split
33338         the insns into load, store, and register/register insns.
33339         (bswapdi2_ldbrx): Likewise.
33340         (bswapdi2_load): Likewise.
33341         (bswapdi2_store): Likewise.
33342         (bswapdi2_reg): Likewise.
33344 2017-03-27  Gunther Nikl  <gnikl@users.sourceforge.net>
33346         * system.h (HAVE_DESIGNATED_INITIALIZERS): Fix non C++ case.
33347         (HAVE_DESIGNATED_UNION_INITIALIZERS): Likewise.
33349 2017-03-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
33351         PR target/80103
33352         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Edit and
33353         add comments.
33354         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
33355         special handling for target option conflicts between dform
33356         options (-mpower9-dform, -mpower9-dform-vector,
33357         -mpower9-dform-scalar) and -mno-direct-move.
33359 2017-03-27  Richard Biener  <rguenther@suse.de>
33361         PR tree-optimization/80181
33362         * tree-ssa-ccp.c (likely_value): UNDEFINED ^ X is UNDEFINED.
33364 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
33366         * config/arc/predicates.md (move_double_src_operand): Replace the
33367         call to move_double_src_operand with a call to address_operand.
33369 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
33371         * config/arc/elf.h (ARGET_ARC_TP_REGNO_DEFAULT): Define.
33372         * config/arc/linux.h (ARGET_ARC_TP_REGNO_DEFAULT): Likewise.
33373         * config/arc/arc.opt (mtp-regno): Use ARGET_ARC_TP_REGNO_DEFAULT.
33375 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
33377         * config/arc/predicates.md (long_immediate_loadstore_operand):
33378         Consider scaled addresses cases.
33380 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
33382         * config/arc/arc.c (arc_epilogue_uses): BLINK should be also
33383         restored when in interrupt.
33384         * config/arc/arc.md (simple_return): ARCv2 rtie instruction
33385         doesn't have delay slot.
33387 2017-03-27  Richard Biener  <rguenther@suse.de>
33389         PR ipa/79776
33390         * tree-ssa-structalias.c (associate_varinfo_to_alias): Skip
33391         inlined thunk clones.
33393 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
33395         PR sanitizer/80168
33396         * asan.c (instrument_derefs): Copy over last operand from
33397         original COMPONENT_REF to the new COMPONENT_REF with
33398         DECL_BIT_FIELD_REPRESENTATIVE.
33399         * ubsan.c (instrument_object_size): Likewise.
33401 2017-03-27  Richard Biener  <rguenther@suse.de>
33403         PR tree-optimization/80170
33404         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Make
33405         sure DR/SCEV didnt fold in constants we do not see when looking
33406         at the reference base alignment.
33408 2017-03-27  Richard Biener  <rguenther@suse.de>
33410         PR middle-end/80171
33411         * gimple-fold.c (fold_ctor_reference): Properly guard against
33412         NULL return value from canonicalize_constructor_val.
33414 2017-03-25  Uros Bizjak  <ubizjak@gmail.com>
33416         PR target/80180
33417         * config/i386/i386.c (ix86_expand_builtin)
33418         <IX86_BUILTIN_RDSEED{16,32,64}_STEP>: Do not expand arg0 between
33419         flags reg setting and flags reg using instructions.
33420         <IX86_BUILTIN_RDRAND{16,32,64}_STEP>: Ditto.  Use non-flags reg
33421         clobbering instructions to zero extend op2.
33423 2017-03-25  Gerald Pfeifer  <gerald@pfeifer.com>
33425         * doc/install.texi (Configuration) <--with-aix-soname>:
33426         Update link to AIX ld.
33428 2017-03-25  Bernd Schmidt  <bschmidt@redhat.com>
33430         PR rtl-optimization/80160
33431         PR rtl-optimization/80159
33432         * lra-assigns.c (must_not_spill_p): Tighten new test to also take
33433         reg_alternate_class into account.
33435 2017-03-24  Vladimir Makarov  <vmakarov@redhat.com>
33437         PR target/80148
33438         * lra-assigns.c (assign_by_spills): Add spilled non-reload pseudos
33439         to consider in curr_insn_transform.
33441 2017-03-24  Jakub Jelinek  <jakub@redhat.com>
33443         * genrecog.c (validate_pattern): Add VEC_SELECT validation.
33444         * genmodes.c (emit_min_insn_modes_c): Call emit_mode_nunits
33445         and emit_mode_inner.
33447 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
33449         * config/s390/s390-builtins.def: Add VXE builtins.  Add a flags
33450         argument to the overloaded builtin variants.  Use the new flag to
33451         deprecate certain builtin variants.
33452         * config/s390/s390-builtin-types.def: Add new builtin types.
33453         * config/s390/s390-builtins.h: Support new flags field for
33454         overloaded builtins.
33455         * config/s390/s390-c.c (OB_DEF_VAR): New flags field.
33456         (s390_macro_to_expand): Enable vector float data type.
33457         (s390_cpu_cpp_builtins_internal): Indicate support of the new
33458         builtins by incrementing the __VEC__ version number.
33459         (s390_expand_overloaded_builtin): Support expansion of vec_xl and
33460         vec_xst.
33461         (s390_resolve_overloaded_builtin): Emit error messages depending
33462         on the builtin flags.
33463         * config/s390/s390.c (s390_expand_builtin): Support additional
33464         flags argument.  Change error message to match the messages
33465         emitted in s390-c.c.
33466         * config/s390/s390.md: New UNSPEC_* constants.
33467         (op_type): Add new instruction types.
33468         * config/s390/vecintrin.h: Add new builtins and test data class
33469         constants.
33470         * config/s390/vx-builtins.md (V_HW_32_64): Add V4SF.
33471         (V_HW_4, VEC_HW, VECF_HW): New mode iterators.
33472         (VEC_INEXACT, VEC_NOINEXACT): New constants.
33473         ("vec_splats<mode>", "vec_insert<mode>", "vec_promote<mode>")
33474         ("vec_insert_and_zero<mode>", "vec_mergeh<mode>")
33475         ("vec_mergel<mode>"): V_HW -> VEC_HW.
33477         ("vlrlrv16qi", "vstrlrv16qi", "vbpermv16qi", "vec_msumv2di")
33478         ("vmslg", "*vftci<mode>_cconly", "vftci<mode>_intcconly")
33479         ("*vftci<mode>", "vftci<mode>_intcc", "vec_double_s64")
33480         ("vec_double_u64", "vfmin<mode>", "vfmax<mode>"): New definition.
33482         ("and_av2df3", "and_cv2df3", "vec_andc_av2df3")
33483         ("vec_andc_cv2df3", "xor_av2df3", "xor_cv2df3", "vec_nor_av2df3")
33484         ("vec_nor_cv2df3", "ior_av2df3", "ior_cv2df3", "vec_nabs")
33485         ("*vftcidb", "*vftcidb_cconly", "vftcidb"): Remove definition.
33487         ("vec_all_<fpcmpcc:code>v2df", "vec_any_<fpcmpcc:code>v2df")
33488         ("vec_scatter_elementv4si_DI", "vec_cmp<fpcmp:code>v2df")
33489         ("vec_di_to_df_s64", "vec_di_to_df_u64", "vec_df_to_di_u64")
33490         ("vfidb", "*vldeb", "*vledb", "*vec_cmp<insn_cmp>v2df_cconly")
33491         ("vec_cmpeqv2df_cc", "vec_cmpeqv2df_cc", "vec_cmphv2df_cc")
33492         ("vec_cmphev2df_cc", "*vec_cmpeqv2df_cc")
33493         ("*vec_cmphv2df_cc", "*vec_cmphev2df_cc"): Enable new modes as ...
33495         ("vec_all_<fpcmpcc:code><mode>", "vec_any_<fpcmpcc:code><mode>")
33496         ("vec_scatter_element<V_HW_4:mode>_DI")
33497         ("vec_cmp<fpcmp:code><mode>", "vcdgb", "vcdlgb", "vclgdb")
33498         ("vec_fpint<mode>", "vflls")
33499         ("vflrd", "*vec_cmp<insn_cmp><mode>_cconly", "vec_cmpeq<mode>_cc")
33500         ("vec_cmpeq<mode>_cc", "vec_cmph<mode>_cc", "vec_cmphe<mode>_cc")
33501         ("*vec_cmpeq<mode>_cc", "*vec_cmph<mode>_cc")
33502         ("*vec_cmphe<mode>_cc"): ... these.
33504         ("vec_ctd_s64", "vec_ctsl", "vec_ctul", "vec_st2f"): Use rounding
33505         mode constant instead of magic value.
33507 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
33509         * config/s390/s390.c (s390_expand_vec_compare): Support other
33510         vector floating point modes than just V2DF.
33511         (s390_expand_vcond): Likewise.
33512         (s390_hard_regno_mode_ok): Allow SFmode values in VRs.
33513         (s390_cannot_change_mode_class): Prevent mode changes between TF
33514         and V1TF in vector registers.
33515         * config/s390/s390.md (DF, SF): New mode attributes.
33516         ("*cmp<mode>_ccs", "add<mode>3", "sub<mode>3", "mul<mode>3")
33517         ("fma<mode>4", "fms<mode>4", "div<mode>3", "*neg<mode>2"): Add
33518         SFmode support for VRs.
33519         * config/s390/vector.md (V_HW, V_HW2, VT_HW, ti*, nonvec): Add new
33520         vector fp modes.
33521         (VFT, VF_HW): New mode iterators.
33522         (vw, sdx): New mode attributes.
33523         ("addv2df3", "subv2df3", "mulv2df3", "divv2df3", "sqrtv2df2")
33524         ("fmav2df4","fmsv2df4", "negv2df2", "absv2df2", "*negabsv2df2")
33525         ("smaxv2df3", "sminv2df3", "*vec_cmp<VFCMP_HW_OP:code>v2df_nocc")
33526         ("vec_cmpuneqv2df", "vec_cmpltgtv2df", "vec_orderedv2df")
33527         ("vec_unorderedv2df"): Adjust the v2df only patterns to support
33528         also the new vector floating point modes.  Renaming to ...
33530         ("add<mode>3", "sub<mode>3", "mul<mode>3", "div<mode>3")
33531         ("sqrt<mode>2", "fma<mode>4", "fms<mode>4", "neg<mode>2")
33532         ("abs<mode>2", "negabs<mode>2", "smax<mode>3")
33533         ("smin<mode>3", "*vec_cmp<VFCMP_HW_OP:code><mode>_nocc")
33534         ("vec_cmpuneq<mode>", "vec_cmpltgt<mode>", "vec_ordered<mode>")
33535         ("vec_unordered<mode>"): ... these.
33537         ("neg_fma<mode>4", "neg_fms<mode>4", "*smax<mode>3_vxe")
33538         ("*smin<mode>3_vxe", "*sminv2df3_vx", "*vec_extendv4sf")
33539         ("*vec_extendv2df"): New insn definitions.
33541 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
33543         * config/s390/s390.md ("*adddi3_sign", "*subdi3_sign", "mulditi3")
33544         ("mulditi3_2", "*muldi3_sign"): New patterns.
33545         ("muldi3", "*muldi3", "mulsi3", "*mulsi3"): Add an expander and
33546         rename the pattern definition.
33548 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
33550         * config/s390/s390.md ("indirect_jump"): Turn insn definition into
33551         expander.
33552         ("*indirect_jump", "*indirect2_jump"): New pattern definitions.
33554 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
33556         * config/s390/s390.c (s390_expand_vec_init): Use vllezl
33557         instruction if possible.
33558         * config/s390/vector.md (vec_halfnumelts): New mode
33559         attribute.
33560         ("*vec_vllezlf<mode>"): New pattern.
33562 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
33564         * config/s390/vector.md ("popcountv16qi2", "popcountv8hi2")
33565         ("popcountv4si2", "popcountv2di2"): Rename to ...
33566         ("popcount<mode>2", "popcountv8hi2_vx", "popcountv4si2_vx")
33567         ("popcountv2di2_vx"): ... these and add !TARGET_VXE to the
33568         condition.
33569         ("popcount<mode>2_vxe"): New pattern.
33571 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
33573         * common/config/s390/s390-common.c (processor_flags_table): Add
33574         arch12.
33575         * config.gcc: Add arch12.
33576         * config/s390/driver-native.c (s390_host_detect_local_cpu):
33577         Default to arch12 for unknown CPU model numbers.
33578         * config/s390/s390-builtins.def: Add B_VXE builtin flag.
33579         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Adjust
33580         PROCESSOR_max sanity check.
33581         * config/s390/s390-opts.h (enum processor_type): Add
33582         PROCESSOR_ARCH12.
33583         * config/s390/s390.c (processor_table): Add arch12.
33584         (s390_expand_builtin): Add check for B_VXE flag.
33585         (s390_issue_rate): Add PROCESSOR_ARCH12.
33586         (s390_get_sched_attrmask): Likewise.
33587         (s390_get_unit_mask): Likewise.
33588         (s390_sched_score): Enable z13 scheduling for arch12.
33589         (s390_sched_reorder): Likewise.
33590         (s390_sched_variable_issue): Likewise.
33591         * config/s390/s390.h (enum processor_flags): Add PF_ARCH12 and
33592         PF_VXE.
33593         (s390_tune_attr): Use z13 scheduling also for arch12.
33594         (TARGET_CPU_ARCH12, TARGET_CPU_ARCH12_P, TARGET_CPU_VXE)
33595         (TARGET_CPU_VXE_P, TARGET_ARCH12, TARGET_ARCH12_P, TARGET_VXE)
33596         (TARGET_VXE_P): New macros.
33597         * config/s390/s390.md: Add arch12 to cpu attribute.  Add arch12
33598         and vxe to cpu_facility.  Add arch12 and vxe to enabled attribute.
33599         * config/s390/s390.opt: Add arch12 as processor_type.
33601 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
33603         * config/s390/s390.md
33604         ("fixuns_truncdddi2", "fixuns_trunctddi2")
33605         ("fixuns_trunc<BFP:mode><GPR:mode>2"): Merge into ...
33606         ("fixuns_trunc<FP:mode><GPR:mode>2"): New expander.
33608         ("fixuns_trunc<BFP:mode><GPR:mode>2", "fixuns_trunc<mode>si2"):
33609         Rename expanders to ...
33611         ("fixuns_trunc<BFP:mode><GPR:mode>2_emu")
33612         ("fixuns_truncdddi2_emu"): ... these.
33614         ("fixuns_trunc<mode>si2_emu"): New expander.
33616         ("*fixuns_truncdfdi2_z13"): Rename to ...
33617         ("*fixuns_truncdfdi2_vx"): ... this.
33619 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
33621         * config/s390/2964.md: Remove the single element vector compare
33622         instructions which are no longer used.
33623         * config/s390/s390.c (s390_select_ccmode): Remove handling of
33624         vector CCmodes.
33625         (s390_canonicalize_comparison): Remove handling of DFmode
33626         compares.
33627         (s390_expand_vec_compare_scalar): Remove function.
33628         (s390_emit_compare): Don't call s390_expand_vec_compare_scalar.
33629         * config/s390/s390.md ("*vec_cmp<insn_cmp>df_cconly"): Remove
33630         pattern.
33631         ("*cmp<mode>_ccs"): Add wfcdb instruction.
33633 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
33635         * config/s390/s390.md ("mov<mode>_64dfp" DD_DF): Use vleig for loading a
33636         FP zero.
33637         ("*mov<mode>_64" DD_DF): Remove the vector instructions. These
33638         will anyway by matched by mov<mode>_64dfp.
33640 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
33642         * config/s390/s390.md ("mov<mode>" SD_SF): Change vleg/vsteg to
33643         vlef/vstef.  Add missing operand to vleif.
33645 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
33647         * config/s390/s390.c (s390_expand_vec_init): Enable vector load
33648         pair for all vector types with 64 bit elements.
33649         * config/s390/vx-builtins.md (V_HW_64): Move mode iterator to ...
33650         * config/s390/vector.md (V_HW_64): ... here.
33651         (V_128_NOSINGLE): New mode iterator.
33652         ("vec_init<V_HW:mode>"): Use V_128 as mode iterator.
33653         ("*vec_splat<mode>"): Use V_128_NOSINGLE mode iterator.
33654         ("*vec_tf_to_v1tf", "*vec_ti_to_v1ti"): New pattern definitions.
33655         ("*vec_load_pairv2di"): Change to ...
33656         ("*vec_load_pair<mode>"): ... this one.
33658 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
33660         * config/s390/constraints.md: Add comments.
33661         (jKK): Reject element sizes > 8 bytes.
33662         * config/s390/s390.c (s390_split_ok_p): Enable splitting also for
33663         s_operands.
33664         * config/s390/s390.md: Add the s_operand checks formerly in
33665         s390_split_ok_p to various splitters where they are still
33666         required.
33667         * config/s390/vector.md ("mov<mode>" V_128): Add GPR alternatives
33668         for 128 bit vectors.  Plus two splitters.
33670 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
33672         * config/s390/s390.md: Rename the cpu facilty vec to vx throughout
33673         the file.
33675 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
33677         PR target/79893
33678         * config/s390/s390-c.c (s390_adjust_builtin_arglist): Issue an
33679         error if the boundary argument is not constant.
33681 2017-03-24  Jakub Jelinek  <jakub@redhat.com>
33683         PR rtl-optimization/80112
33684         * loop-doloop.c (doloop_condition_get): Don't check condition
33685         if cmp isn't SET with IF_THEN_ELSE src.
33687 2017-03-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
33689         PR tree-optimization/80158
33690         * gimple-ssa-strength-reduction.c (replace_mult_candidate): When
33691         replacing a candidate statement, also replace it for the
33692         candidate's alternate interpretation.
33693         (replace_rhs_if_not_dup): Likewise.
33694         (replace_one_candidate): Likewise.
33696 2017-03-24  Richard Biener  <rguenther@suse.de>
33698         PR tree-optimization/80167
33699         * graphite-isl-ast-to-gimple.c
33700         (translate_isl_ast_to_gimple::is_valid_rename): Handle default-defs
33701         properly.
33702         (translate_isl_ast_to_gimple::get_rename): Likewise.
33704 2017-03-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>
33706         * config/rs6000/rs6000.c (rs6000_option_override_internal): Change
33707         handling of certain combinations of target options, including the
33708         combinations -mpower8-vector vs. -mno-vsx, -mpower9-vector vs.
33709         -mno-power8-vector, and -mpower9_dform vs. -mno-power9-vector.
33711 2017-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
33713         PR target/71436
33714         * config/arm/arm.md (*load_multiple): Add reload_completed to
33715         matching condition.
33717 2017-03-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
33718             Richard Biener  <rguenth@suse.de>
33720         PR tree-optimization/79908
33721         PR tree-optimization/80136
33722         * tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
33723         been cast away, gimplify_and_add suffices.
33725 2017-03-23  Markus Trippelsdorf  <markus@trippelsdorf.de>
33727         * tree-vrp.c (identify_jump_threads): Delete avail_exprs.
33729 2017-03-23  Richard Biener  <rguenther@suse.de>
33731         PR tree-optimization/80032
33732         * gimplify.c (gimple_push_cleanup): Forced unconditional
33733         cleanups still have to go to the conditional_cleanups
33734         sequence.
33736 2017-03-22  Jakub Jelinek  <jakub@redhat.com>
33738         PR tree-optimization/80072
33739         * tree-ssa-reassoc.c (struct operand_entry): Change id field type
33740         to unsigned int.
33741         (next_operand_entry_id): Change type to unsigned int.
33742         (sort_by_operand_rank): Make sure to return the right return value
33743         even if unsigned fields are bigger than INT_MAX.
33744         (struct oecount): Change cnt and id type to unsigned int.
33745         (oecount_hasher::equal): Formatting fix.
33746         (oecount_cmp): Make sure to return the right return value
33747         even if unsigned fields are bigger than INT_MAX.
33748         (undistribute_ops_list): Change next_oecount_id type to unsigned int.
33750         PR c++/80129
33751         * gimplify.c (gimplify_modify_expr_rhs) <case COND_EXPR>: Clear
33752         TREE_READONLY on result if writing it more than once.
33754         PR sanitizer/80110
33755         * doc/invoke.texi (-fsanitize=thread): Document that with
33756         -fnon-call-exceptions atomics are not able to throw
33757         exceptions.
33759         PR sanitizer/80110
33760         * tsan.c: Include tree-eh.h.
33761         (instrument_builtin_call): Call maybe_clean_eh_stmt or
33762         maybe_clean_or_replace_eh_stmt where needed.
33763         (instrument_memory_accesses): Add cfg_changed argument.
33764         Call gimple_purge_dead_eh_edges on each block and set *cfg_changed
33765         if it returned true.
33766         (tsan_pass): Adjust caller.  Return TODO_cleanup_cfg if cfg_changed.
33768         PR rtl-optimization/63191
33769         * config/i386/i386.c (ix86_delegitimize_address): Turn into small
33770         wrapper function, moved the whole old content into ...
33771         (ix86_delegitimize_address_1): ... this.  New inline function.
33772         (ix86_find_base_term): Use ix86_delegitimize_address_1 with
33773         true as last argument instead of ix86_delegitimize_address.
33775 2017-03-22  Wilco Dijkstra  <wdijkstr@arm.com>
33777         * config/aarch64/aarch64.c (generic_branch_cost): Copy
33778         cortexa57_branch_cost.
33780 2017-03-22  Wilco Dijkstra  <wdijkstr@arm.com>
33782         * config/aarch64/aarch64.c (generic_tunings): Add AES fusion.
33784 2017-03-21  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
33786         PR target/80123
33787         * doc/md.texi (Constraints): Document wA constraint.
33788         * config/rs6000/constraints.md (wA): New.
33789         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Add wA reg_class.
33790         (rs6000_init_hard_regno_mode_ok): Init wA constraint.
33791         * config/rs6000/rs6000.h (RS6000_CONSTRAINT_wA): New.
33792         * config/rs6000/vsx.md (vsx_splat_<mode>): Use wA constraint.
33794 2017-03-22  Cesar Philippidis  <cesar@codesourcery.com>
33796         PR c++/80029
33797         * gimplify.c (is_oacc_declared): New function.
33798         (oacc_default_clause): Use it to set default flags for acc declared
33799         variables inside parallel regions.
33800         (gimplify_scan_omp_clauses): Strip firstprivate pointers for acc
33801         declared variables.
33802         (gimplify_oacc_declare): Gimplify the declare clauses.  Add the
33803         declare attribute to any decl as necessary.
33805 2017-03-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
33807         PR target/80082
33808         * config/arm/arm-isa.h (isa_bit_lpae): New feature bit.
33809         (ISA_ARMv7ve): Add isa_bit_lpae to the definition.
33810         * config/arm/arm-protos.h (arm_arch7ve): Rename into ...
33811         (arm_arch_lpae): This.
33812         * config/arm/arm.c (arm_arch7ve): Rename into ...
33813         (arm_arch_lpae): This.  Define it in term of isa_bit_lpae.
33814         * config/arm/arm.h (TARGET_HAVE_LPAE): Redefine in term of
33815         arm_arch_lpae.
33817 2017-03-22  Martin Liska  <mliska@suse.cz>
33819         PR target/79906
33820         * config/rs6000/rs6000.c (rs6000_inner_target_options): Show
33821         error message instead of an ICE.
33823 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
33825         * doc/extend.texi (6.11 Additional Floating Types): Revise.
33827 2017-03-21  Kelvin Nilsen  <kelvin@gcc.gnu.org>
33829         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Add
33830         comments.
33831         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
33832         comments.
33834 2017-03-21  Martin Sebor  <msebor@redhat.com>
33836         * doc/extend.texi: Use "cannot" instead of "can't."
33837         * doc/hostconfig.texi: Same.
33838         * doc/install.texi: Same.
33839         * doc/invoke.texi: Same.
33840         * doc/loop.texi: Same.
33841         * doc/md.texi: Same.
33842         * doc/objc.texi: Same.
33843         * doc/rtl.texi: Same.
33844         * doc/tm.texi: Same.
33845         * doc/tm.texi.in: Same.
33846         * doc/trouble.texi: Same.
33848 2017-03-21  Alexandre Oliva  <aoliva@redhat.com>
33850         PR debug/63238
33851         * dwarf2out.c (struct checksum_attributes): Add at_alignment.
33852         (collect_checksum_attributes): Set it.
33853         (die_checksum_ordered): Use it.
33855 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
33857         PR tree-optimization/79908
33858         * tree-stdarg.c (expand_ifn_va_arg_1): Revert the following
33859         change: For a VA_ARG whose LHS has been cast away, use
33860         force_gimple_operand to construct the side effects.
33862 2017-03-21  David Malcolm  <dmalcolm@redhat.com>
33864         PR translation/80001
33865         * omp-offload.c (oacc_loop_fixed_partitions): Make diagnostics
33866         more amenable to translation.
33867         (oacc_loop_auto_partitions): Likewise.
33869 2017-03-21  Marek Polacek  <polacek@redhat.com>
33870             Martin Sebor  <msebor@redhat.com>
33872         PR tree-optimization/80109
33873         * gimple-ssa-warn-alloca.c (alloca_call_type): Only call get_range_info
33874         on INTEGRAL_TYPE_P.
33876 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
33877             Segher Boessenkool  <segher@kernel.crashing.org>
33879         PR target/80125
33880         * combine.c (can_combine_p): Revert the 2017-03-20 change, only
33881         check reg_used_between_p between insn and one of succ or succ2
33882         depending on if succ is artificial insn not inserted into insn
33883         stream.
33885 2017-03-21  Martin Liska  <mliska@suse.cz>
33887         PR gcov-profile/80081
33888         * Makefile.in: Add gcov-dump and fix installation of gcov-tool.
33889         * doc/gcc.texi: Include gcov-dump stuff.
33890         * doc/gcov-dump.texi: New file.
33892 2017-03-21  Toma Tabacu  <toma.tabacu@imgtec.com>
33894         PR rtl-optimization/79150
33895         * config/mips/mips.c (mips_block_move_loop): Emit a NOP after the
33896         conditional jump, if the jump is the last insn of the loop.
33898 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
33899             Richard Biener  <rguenth@suse.de>
33901         PR tree-optimization/79908
33902         * tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
33903         been cast away, use force_gimple_operand to construct the side
33904         effects.
33906 2017-03-21  Martin Liska  <mliska@suse.cz>
33908         PR libfortran/79956
33909         * simplify-rtx.c (simplify_immed_subreg): Initialize a variable
33910         to NULL.
33912 2017-03-21  Brad Spengler <spender@grsecurity.net>
33914         PR plugins/80094
33915         * plugin.c (htab_hash_plugin): New function.
33916         (add_new_plugin): Use it and adjust.
33917         (parse_plugin_arg_opt): Adjust.
33918         (init_one_plugin): Likewise.
33920 2017-03-21  Richard Biener  <rguenther@suse.de>
33922         PR tree-optimization/80032
33923         * gimplify.c (gimple_push_cleanup): Add force_uncond parameter,
33924         if set force the cleanup to happen unconditionally.
33925         (gimplify_target_expr): Push inserted clobbers with force_uncond
33926         to avoid them being removed by control-dependent DCE.
33928 2017-03-21  Richard Biener  <rguenther@suse.de>
33930         PR tree-optimization/80122
33931         * tree-inline.c (copy_bb): Do not expans va-arg packs or
33932         va_arg_pack_len when the inlined call stmt requires pack
33933         expansion itself.
33934         * tree-inline.h (struct copy_body_data): Make call_stmt a gcall *.
33936 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
33938         PR sanitizer/78158
33939         * tsan.c (instrument_builtin_call): If the memory model argument
33940         is not a constant, assume it is valid.
33942         PR c/67338
33943         * fold-const.c (round_up_loc): Negate divisor in unsigned type to
33944         avoid UB.
33946 2017-03-20  Segher Boessenkool  <segher@kernel.crashing.org>
33948         PR rtl-optimization/79910
33949         * combine.c (can_combine_p): Do not allow combining an I0 or I1
33950         if its dest is used by an insn before I2 (other than the combined
33951         insns themselves, which are properly handled already).
33953 2017-03-20  Segher Boessenkool  <segher@kernel.crashing.org>
33955         Revert:
33956         2017-03-17  Bernd Schmidt  <bschmidt@redhat.com>
33958         * combine.c (record_used_regs): New static function.
33959         (try_combine): Handle situations where there is an additional
33960         instruction between I2 and I3 which needs to have a LOG_LINK
33961         updated.
33963         Revert:
33964         2017-03-17  Jim Wilson  <jim.wilson@linaro.org>
33966         * combine.c (try_combine): Delete redundant i1 test.  Call
33967         prev_nonnote_nondebug_insn instead of prev_nonnote_insn.
33969 2017-03-20  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
33971         PR target/80083
33972         * config/rs6000/rs6000.md (*movsi_internal1): Fix constraints for
33973         alternatives 13/14.
33975 2017-03-20  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
33977         PR tree-optimization/80054
33978         * gimple-ssa-strength-reduction.c (all_phi_incrs_profitable): Fail
33979         the optimization if a PHI or any of its arguments is not dominated
33980         by the candidate's basis.  Use gphi* rather than gimple* as
33981         appropriate.
33982         (replace_profitable_candidates): Clean up a gimple* variable that
33983         should be a gphi* variable.
33985 2017-03-20  Martin Sebor  <msebor@redhat.com>
33987         PR c++/52477
33988         * doc/extend.texi (attribute constructor): Document present limitation.
33990 2017-03-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
33992         PR target/79963
33993         * config/rs6000/altivec.h (vec_all_ne): Under __cplusplus__ and
33994         __POWER9_VECTOR__ #ifdef control, change template definition to
33995         use Power9-specific built-in function.
33996         (vec_any_eq): Likewise.
33997         * config/rs6000/vector.md (vector_ae_v2di_p): Change the flag used
33998         to control outcomes from this test.
33999         (vector_ae_<mode>p): For VEC_F modes, likewise.
34001 2017-03-20  Ian Lance Taylor  <iant@google.com>
34003         * config/i386/i386.c (ix86_function_regparm): Save an extra
34004         register for -fsplit-stack with DECL_STATIC_CHAIN.
34006 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com>
34008         PR target/79912
34009         * config/riscv/riscv.c (riscv_preferred_reload_class): Remove.
34010         (TARGET_PREFERRED_RELOAD_CLASS): Likewise.
34012 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com>
34014         * config/riscv/riscv.c (riscv_print_operand): Use "fence
34015         iorw,ow".
34016         * config/riscv/sync.mc (mem_thread_fence_1): Use "fence
34017         iorw,iorw".
34019 2017-03-20  Marek Polacek  <polacek@redhat.com>
34021         PR sanitizer/80063
34022         * asan.c (DEF_SANITIZER_BUILTIN): Use do { } while (0).
34024 2017-03-20  Richard Biener  <rguenther@suse.de>
34026         PR tree-optimization/80113
34027         * graphite-isl-ast-to-gimple.c (copy_loop_phi_nodes): Do not
34028         allocate extra SSA name for PHI def.
34029         (add_close_phis_to_outer_loops): Likewise.
34030         (add_close_phis_to_merge_points): Likewise.
34031         (copy_loop_close_phi_args): Likewise.
34032         (copy_cond_phi_nodes): Likewise.
34034 2017-03-20  Martin Liska  <mliska@suse.cz>
34036         PR middle-end/79753
34037         * tree-chkp.c (chkp_build_returned_bound): Do not build
34038         returned bounds for a LHS that's not a BOUNDED_P type.
34040 2017-03-20  Martin Liska  <mliska@suse.cz>
34042         PR target/79769
34043         PR target/79770
34044         * tree-chkp.c (chkp_find_bounds_1): Handle REAL_CST,
34045         COMPLEX_CST and VECTOR_CST.
34047 2017-03-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34049         PR target/78857
34050         * config/s390/s390.md ("cmp<mode>_ccs_0"): Add a clobber of the
34051         target operand.  A new splitter adds the clobber statement in case
34052         the target operand is dead anyway.
34054 2017-03-19  Gerald Pfeifer  <gerald@pfeifer.com>
34056         * doc/install.texi (Specific) <sparc-*-linux*>: No longer refer
34057         to age-old versions of binutils and glibc.
34059 2017-03-18  Segher Boessenkool  <segher@kernel.crashing.org>
34061         * doc/contrib.texi (Contributors): Remove duplicate entry for myself.
34063 2017-03-18  Gerald Pfeifer  <gerald@pfeifer.com>
34065         * doc/contrib.texi (Contributors): Add Segher Boessenkool.
34067 2017-03-18  Gerald Pfeifer  <gerald@pfeifer.com>
34069         * doc/install.texi (Specific) <arm-*-eabi>: Remove old
34070         requirement for binutils 2.13.
34072 2017-03-17  Jim Wilson  <jim.wilson@linaro.org>
34074         * combine.c (try_combine): Delete redundant i1 test.  Call
34075         prev_nonnote_nondebug_insn instead of prev_nonnote_insn.
34077 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com
34079         * doc/install.texi (Specific) <riscv32-*-elf>: Add riscv32-*-elf,
34080         riscv32-*-linux, riscv64-*-elf, riscv64-*-linux to the table of
34081         contents.
34082         <riscv64-*-elf>: Re-arrange section
34083         <riscv32-*-elf>: Add a note about requiring binutils 2.28.
34084         <riscv32-*-linux>: Likewise.
34085         <riscv64-*-elf>: Likewise
34086         <riscv64-*-linux>: Likewise.
34088 2017-03-17  Richard Earnshaw  <rearnsha@arm.com>
34090         PR target/80052
34091         * aarch64.opt(verbose-cost-dump): Fix typo.
34093 2017-03-17  Pat Haugen  <pthaugen@us.ibm.com>
34095         PR target/79951
34096         * config/rs6000/rs6000.md (copysign<mode>3_fcpsgn): Test
34097         for VECTOR_UNIT_VSX_P (<MODE>mode) too.
34099 2017-03-17  Bernd Schmidt  <bschmidt@redhat.com>
34101         * reload.c (find_reloads): When reloading a nonoffsettable address,
34102         use RELOAD_OTHER for it and its address reloads.
34104         PR rtl-optimization/79910
34105         * combine.c (record_used_regs): New static function.
34106         (try_combine): Handle situations where there is an additional
34107         instruction between I2 and I3 which needs to have a LOG_LINK
34108         updated.
34110 2017-03-17  Jeff Law  <law@redhat.com>
34112         PR tree-optimization/71437
34113         * tree-vrp.c (simplify_stmt_for_jump_threading): Lookup the
34114         conditional in the hash table first.
34115         (vrp_dom_walker::before_dom_children): Extract condition from
34116         ASSERT_EXPR.  Record condition, its inverion and any implied
34117         conditions as well.
34119 2017-03-17  Marek Polacek  <polacek@redhat.com>
34120             Markus Trippelsdorf  <markus@trippelsdorf.de>
34122         PR tree-optimization/80079
34123         * gimple-ssa-store-merging.c (class pass_store_merging): Initialize
34124         m_stores_head.
34126 2017-03-17  Richard Biener  <rguenther@suse.de>
34128         PR middle-end/80075
34129         * tree-eh.c (stmt_could_throw_1_p): Only handle gimple assigns.
34130         Properly verify the LHS before the RHS possibly claims to be
34131         handled.
34132         (stmt_could_throw_p): Hande gimple conds fully here.  Clobbers
34133         do not throw.
34135 2017-03-17  Martin Jambor  <mjambor@suse.cz>
34137         * doc/invoke.texi (Option Options): Include -fipa-vrp in the list.
34138         (List of -O2 options): Likewise.
34139         (-fipa-bit-cp): Replace "ipa" with "interprocedural."
34140         (-fipa-vrp) New.
34142 2017-03-17  Tom de Vries  <tom@codesourcery.com>
34144         * gcov-dump.c (print_usage): Print bug_report_url.
34146 2017-03-17  Richard Biener  <rguenther@suse.de>
34148         PR middle-end/80050
34149         * genmatch.c (parser::next): Remove pointless check for CPP_EOF.
34150         (parser::peek): Likewise.
34152 2017-03-17  Richard Biener  <rguenther@suse.de>
34154         PR tree-optimization/80048
34155         * sese.c (free_sese_info): Properly release rename_map and
34156         copied_bb_map elements.
34158 2017-03-16  Alexandre Oliva  <aoliva@redhat.com>
34160         * gimple-ssa-store-merging.c (struct imm_store_chain_info):
34161         Add linked-list forward and backlinks.  Insert on
34162         construction, remove on destruction.
34163         (class pass_store_merging): Add m_stores_head field.
34164         (pass_store_merging::terminate_and_process_all_chains):
34165         Iterate over m_stores_head list.
34166         (pass_store_merging::terminate_all_aliasing_chains):
34167         Likewise.
34168         (pass_store_merging::execute): Check for debug stmts first.
34169         Push new chains onto the m_stores_head stack.
34171 2017-03-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
34173         PR target/71294
34174         * config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Allow a
34175         SPLAT operation on ISA 2.07 64-bit systems that have direct move,
34176         but no MTVSRDD support, by doing MTVSRD and XXPERMDI.
34178 2017-03-16  Jeff Law  <law@redhat.com>
34180         PR tree-optimization/71437
34181         * tree-ssa-dom.c (dom_opt_dom_walker): Remove thread_across_edge
34182         member function.  Implementation moved into after_dom_children
34183         member function and into the threader's thread_outgoing_edges
34184         function.
34185         (dom_opt_dom_walker::after_dom_children): Simplify by moving
34186         some code into new thread_outgoing_edges.
34187         * tree-ssa-threadedge.c (thread_across_edge): Make static and simplify
34188         definition.  Simplify marker handling (do it here).   Assume we always
34189         have the available expression and the const/copies tables.
34190         (thread_outgoing_edges): New function extracted from tree-ssa-dom.c
34191         and tree-vrp.c
34192         * tree-ssa-threadedge.h (thread_outgoing_edges): Declare.
34193         * tree-vrp.c (equiv_stack): No longer file scoped.
34194         (vrp_dom_walker): New class.
34195         (vrp_dom_walker::before_dom_children): New member function.
34196         (vrp_dom_walker::after_dom_children): Likewise.
34197         (identify_jump_threads):  Setup domwalker.  Use it rather than
34198         walking edges in a random order by hand.  Simplify setup/finalization.
34199         (finalize_jump_threads): Remove.
34200         (vrp_finalize): Do not call identify_jump_threads here.
34201         (execute_vrp): Do it here instead and call thread_through_all_blocks
34202         here too.
34204         PR tree-optimization/71437
34205         * tree-ssa-dom.c (pfn_simplify): Add basic_block argument.  All
34206         callers changed.
34207         (simplify_stmt_for_jump_threading): Add basic_block argument.  All
34208         callers changed.
34209         (lhs_of_dominating_assert): Moved from here into tree-vrp.c.
34210         (dom_opt_dom_walker::thread_across_edge): Remove
34211         handle_dominating_asserts argument.  All callers changed.
34212         (record_temporary_equivalences_from_stmts_at_dest): Corresponding
34213         changes.  Remove calls to lhs_of_dominating_assert.  Other
34214         uses of handle_dominating_asserts turn into unconditional code
34215         (simplify_control_stmt_condition_1): Likewise.
34216         (simplify_control_stmt_condition): Likewise.
34217         (thread_through_normal_block, thread_across_edge): Likewise.
34218         * tree-ssa-threadedge.h (thread_across_edge): Corresponding changes.
34219         * tree-vrp.c (lhs_of_dominating_assert): Move here.  Return original
34220         object if it is not an SSA_NAME.
34221         (simplify_stmt_for_jump_threading): Call lhs_of_dominating_assert
34222         before calling into the VRP specific simplifiers.
34223         (identify_jump_threads): Remove handle_dominating_asserts
34224         argument.
34226 2017-03-16  Jakub Jelinek  <jakub@redhat.com>
34228         PR fortran/79886
34229         * tree-diagnostic.c (default_tree_printer): No longer static.
34230         * tree-diagnostic.h (default_tree_printer): New prototype.
34232 2017-03-16  Tamar Christina  <tamar.christina@arm.com>
34234         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>)
34235         Change ins into fmov.
34237 2017-03-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
34239         * config/aarch64/iterators.md (h_con): Return "x" for V4HF and V8HF.
34240         * config/aarch64/aarch64-simd.md (*aarch64_fma4_elt_from_dup<mode>):
34241         Use h_con constraint for operand 1.
34242         (*aarch64_fnma4_elt_from_dup<mode>): Likewise.
34243         (*aarch64_mulx_elt_from_dup<mode>): Likewise for operand 2.
34245 2017-03-15  Jeff Law  <law@redhat.com>
34247         PR tree-optimization/71437
34248         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): New function.
34249         (record_temporary_equivalences): Use it.
34251         PR tree-optimization/71437
34252         * tree-ssa-dom.c (struct cond_equivalence): Moved from here into
34253         tree-ssa-scopedtables.
34254         (lookup_avail_expr, build_and_record_new_cond): Likewise.
34255         (record_conditions, record_cond, vuse_eq): Likewise.
34256         (record_edge_info): Adjust to API tweak of record_conditions.
34257         (simplify_stmt_for_jump_threading): Similarly for lookup_avail_expr.
34258         (record_temporary_equivalences, optimize_stmt): Likewise.
34259         (eliminate_redundant_computations): Likewise.
34260         (record_equivalences_from_stmt): Likewise.
34261         * tree-ssa-scopedtables.c: Include options.h and params.h.
34262         (vuse_eq): New function, moved from tree-ssa-dom.c
34263         (build_and_record_new_cond): Likewise.
34264         (record_conditions): Likewise.  Accept vector of conditions rather
34265         than edge_equivalence structure for first argument.
34266         for the first argument.
34267         (avail_exprs_stack::lookup_avail_expr): New member function, moved
34268         from tree-ssa-dom.c.
34269         (avail_exprs_stack::record_cond): Likewise.
34270         * tree-ssa-scopedtables.h (struct cond_equivalence): Moved here
34271         from tree-ssa-dom.c.
34272         (avail_exprs_stack): Add new member functions lookup_avail_expr
34273         and record_cond.
34274         (record_conditions): Declare.
34276 2017-03-15  Vladimir Makarov  <vmakarov@redhat.com>
34278         PR target/80017
34279         * lra-constraints.c (process_alt_operands): Increase reject for
34280         reloading an input/output operand.
34282 2017-03-15  Michael Meissner  <meissner@linux.vnet.ibm.com>
34284         PR target/79038
34285         * config/rs6000/rs6000.md (float<QHI:mode><IEEE128:mode>2): Define
34286         insns to convert from signed/unsigned char/short to IEEE 128-bit
34287         floating point.
34288         (floatuns<QHI:mode><IEEE128:mode>2): Likewise.
34290 2017-03-15  Uros Bizjak  <ubizjak@gmail.com>
34292         PR target/80019
34293         * config/i386/i386.c (ix86_vector_duplicate_value): Create
34294         subreg of inner mode for values already in registers.
34296 2017-03-15  Bernd Schmidt  <bschmidt@redhat.com>
34298         * config/c6x/c6x.c (hwloop_optimize): Handle case where the old
34299         iteration reg is used after the loop.
34301 2017-03-14  Martin Sebor  <msebor@redhat.com>
34303         PR tree-optimization/79800
34304         * gimple-ssa-sprintf.c (format_floating: Add argument.  Handle
34305         precision in negative-positive range.
34306         (format_floating): Call non-const overload with adjusted precision.
34308 2017-03-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
34310         PR target/79947
34311         * config/rs6000/rs6000.h (TARGET_FRSQRTES): Add check for
34312         -mpowerpc-gfxopt.
34314 2017-03-14  Martin Sebor  <msebor@redhat.com>
34316         PR middle-end/80020
34317         * builtin-attrs.def (ATTR_ALLOC_SIZE_2_NOTHROW_LIST): New macro.
34318         * builtins.def (aligned_alloc): Use it.
34320         PR c/79936
34321         * Makefile.in (GTFILES): Add calls.c.
34322         * calls.c: Include "gt-calls.h".
34324 2017-03-14  Bernd Schmidt  <bschmidt@redhat.com>
34326         PR rtl-optimization/79728
34327         * regs.h (struct target_regs): New field
34328         x_contains_allocatable_regs_of_mode.
34329         (contains_allocatable_regs_of_mode): New macro.
34330         * reginfo.c (init_reg_sets_1): Initialize it, and change
34331         contains_reg_of_mode so it includes global regs as well.
34332         * reload.c (push_reload): Use contains_allocatable_regs_of_mode
34333         rather than contains_regs_of_mode.
34335 2017-03-14  Martin Liska  <mliska@suse.cz>
34337         * doc/invoke.texi: Document options that can't be combined with
34338         -fcheck-pointer-bounds.
34340 2017-03-14  Martin Liska  <mliska@suse.cz>
34342         PR middle-end/79831
34343         * doc/invoke.texi (-Wchkp): Document the option.
34345 2017-03-14  Martin Liska  <mliska@suse.cz>
34347         * Makefile.in: Install gcov-dump.
34349 2017-03-14  Martin Liska  <mliska@suse.cz>
34351         * multiple_target.c (expand_target_clones): Bail out for
34352         an invalid attribute.
34354 2017-03-14  Richard Biener  <rguenther@suse.de>
34356         * alias.c (struct alias_set_entry): Pack properly.
34357         * cfgloop.h (struct loop): Likewise.
34358         * cse.c (struct set): Likewise.
34359         * ipa-utils.c (struct searchc_env): Likewise.
34360         * loop-invariant.c (struct invariant): Likewise.
34361         * lra-remat.c (struct cand): Likewise.
34362         * recog.c (struct change_t): Likewise.
34363         * rtl.h (struct address_info): Likewise.
34364         * symbol-summary.h (function_summary): Likewise.
34365         * tree-loop-distribution.c (struct partition): Likewise.
34366         * tree-object-size.c (struct object_size_info): Likewise.
34367         * tree-ssa-loop-ivopts.c (struct cost_pair): Likewise.
34368         * tree-ssa-threadupdate.c (struct ssa_local_info_t): Likewise.
34369         * tree-vect-data-refs.c (struct _vect_peel_info): Likewise.
34370         * tree-vect-slp.c (struct _slp_oprnd_info): Likewise.
34371         * tree-vect-stmts.c (struct simd_call_arg_info): Likewise.
34372         * tree-vectorizer.h (struct _loop_vec_info): Likewise.
34373         (struct _stmt_vec_info): Likewise.
34375 2017-03-14  Martin Liska  <mliska@suse.cz>
34377         PR target/79892
34378         * multiple_target.c (create_dispatcher_calls): Check that
34379         a target can create a function dispatcher.
34381 2017-03-14  Martin Liska  <mliska@suse.cz>
34383         PR lto/66295
34384         * multiple_target.c (expand_target_clones): Drop local.local
34385         flag for default implementation.
34387 2017-03-14  Richard Biener  <rguenther@suse.de>
34389         PR tree-optimization/80030
34390         * tree-vect-stmts.c (vectorizable_store): Plug memleak.
34392 2017-03-13  Kito Cheng  <kito.cheng@gmail.com>
34394         * config/riscv/riscv.c (riscv_emit_float_compare>: Use
34395         gcc_fallthrough() instead of __attribute__((fallthrough));
34397 2017-03-13  Gerald Pfeifer  <gerald@pfeifer.com>
34399         * doc/gcc.texi: Remove "up" link to (DIR).
34400         * doc/gccint.texi: Ditto.
34402 2017-03-13  Gerald Pfeifer  <gerald@pfeifer.com>
34404         * doc/install.texi (Specific) <avr>: Remove reference to
34405         binutils 2.13.
34407 2017-03-13  Jeff Law  <law@redhat.com>
34409         * config/riscv/riscv.c (riscv_emit_float_compare): Use fallthru
34410         attribute rather than comments.
34412         * config/pdp11/pdp11.md (movmemhi): Adjust operand numbers to
34413         match_scratch operand is highest.
34415 2017-03-13  Martin Liska  <mliska@suse.cz>
34417         PR middle-end/78339
34418         * ipa-pure-const.c (warn_function_noreturn): If the declarations
34419         is a CHKP clone, use original declaration.
34421 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
34423         * config/arc/arc.c (arc_init): Use multiplier whenever we have it.
34424         (arc_conditional_register_usage): Use a different allocation order
34425         when optimizing for size.
34426         * common/config/arc/arc-common.c (arc_option_optimization_table):
34427         Section anchors default on when optimizing for size.
34429 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
34431         * config/arc/arc.md (*tst_bitfield_tst): Fix pattern.
34433 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
34435         * config/arc/arc.c (arc_output_addsi): Emit code density adds.
34436         * config/arc/arc.md (cpu_facility): Add cd variant.
34437         (*movqi_insn): Add code density variant.
34438         (*movhi_insn): Likewise.
34439         (*movqi_insn): Likewise.
34440         (*addsi3_mixed): Likewise.
34441         (subsi3_insn): Likewise.
34443 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
34445         * config/arc/arc.md (movsi_cond_exec): Update constraint.
34447 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
34449         * config/arc/arc.c (arc_legitimize_pic_address): Handle PIC
34450         expressions with MINUS and UNARY ops.
34452 2017-03-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
34454         PR target/79911
34455         * config/arm/neon.md (vec_sel_widen_ssum_lo<VQI:mode><VW:mode>3):
34456         Rename to...
34457         (vec_sel_widen_ssum_lo<mode><V_half>3): ... This. Avoid mismatch
34458         between vec_select and vector argument.
34459         (vec_sel_widen_ssum_hi<VQI:mode><VW:mode>3): Rename to...
34460         (vec_sel_widen_ssum_hi<mode><V_half>3): ... This. Likewise.
34461         (vec_sel_widen_usum_lo<VQI:mode><VW:mode>3): Rename to...
34462         (vec_sel_widen_usum_lo<mode><V_half>3): ... This.
34463         (vec_sel_widen_usum_hi<VQI:mode><VW:mode>3): Rename to...
34464         (vec_sel_widen_usum_hi<mode><V_half>3): ... This.
34466 2017-03-13  Richard Biener  <rguenther@suse.de>
34468         PR other/79991
34469         * params.def (vect-max-peeling-for-alignment): Fix typo.
34471 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
34473         * doc/install.texi (Specific) <mips-*-*>: Remove description of
34474         issue that only occurred with binutils below 2.18.
34476 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
34478         * doc/install.texi (Specific) <cris-axis-elf>: No longer
34479         refer to binutils 2.11/2.12 minimum.
34481 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
34483         * doc/install.texi (Specific) <powerpc-*-*>: Remove link to
34484         ftp.kernel.org and simplify binutils requirement.
34486 2017-03-11  Gerald Pfeifer  <gerald@pfeifer.com>
34488         * doc/invoke.texi (Warning Options): Fix spelling of link-time
34489         optimization.
34490         (Optimize Options): Ditto.  Also remove redundancy.
34492 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
34494         PR translation/79848
34495         * ipa-devirt.c (warn_types_mismatch): Simplify uses of "%<%s%>" to
34496         "%qs".
34497         * ipa-pure-const.c (suggest_attribute): Likewise.  Convert _
34498         to G_ to avoid double translation.
34500 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
34502         PR translation/79923
34503         * auto-profile.c (get_combined_location): Convert leading
34504         character of diagnostics to lower case and remove trailing period.
34505         (read_profile): Likewise for various diagnostics.
34506         * config/arm/arm.c (arm_option_override): Remove trailing period
34507         from various diagnostics.
34508         * config/msp430/msp430.c (msp430_expand_delay_cycles): Likewise.
34509         (msp430_expand_delay_cycles): Likewise.
34511 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
34513         PR target/79925
34514         * config/aarch64/aarch64.c (aarch64_validate_mcpu): Quote the
34515         full command-line argument, rather than just "str".
34516         (aarch64_validate_march): Likewise.
34517         (aarch64_validate_mtune): Likewise.
34519 2017-03-10  Bernd Schmidt  <bschmidt@redhat.com>
34521         PR rtl-optimization/78911
34522         * lra-assigns.c (must_not_spill_p): New function.
34523         (spill_for): Use it.
34525 2017-03-10  Jakub Jelinek  <jakub@redhat.com>
34527         PR tree-optimization/79981
34528         * tree-vrp.c (extract_range_basic): Handle IMAGPART_EXPR of
34529         ATOMIC_COMPARE_EXCHANGE ifn result.
34530         (stmt_interesting_for_vrp, vrp_visit_stmt): Handle
34531         IFN_ATOMIC_COMPARE_EXCHANGE.
34533 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
34535         PR driver/79875
34536         * opts.c (parse_sanitizer_options): Add missing question mark to
34537         "did you mean" message.
34539 2017-03-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
34541         * config/rs6000/rs6000-builtin.def (VMULEUB_UNS): Remove orphaned
34542         built-in.
34543         (VMULEUH_UNS): Likewise.
34544         (VMULOUB_UNS): Likewise.
34545         (VMULOUH_UNS): Likewise.
34546         * config/rs6000/rs6000.c (builtin_function_type): Remove
34547         references to ALTIVEC_BUILTIN_VMUL[EO]U[BH]_UNS.
34549 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
34551         PR bootstrap/79952
34552         * read-rtl-function.c (function_reader::read_rtx_operand): Update
34553         x with result of extra_parsing_for_operand_code_0.
34554         (function_reader::extra_parsing_for_operand_code_0): Convert
34555         return type from void to rtx, returning x.  When reading
34556         SYMBOL_REF with SYMBOL_FLAG_HAS_BLOCK_INFO, reallocate x to the
34557         larger size containing struct block_symbol.
34559 2017-03-10  Segher Boessenkool  <segher@kernel.crashing.org>
34561         * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
34562         -mfloat128-hardware without -m64.
34564 2017-03-10  Will Schmidt <will_schmidt@vnet.ibm.com>
34566         PR target/79941
34567         * config/rs6000/rs6000.c (builtin_function_type): Add VMUL*U[HB]
34568         entries to the case statement that marks unsigned arguments to
34569         overloaded functions.
34571 2017-03-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
34573         * config/rs6000/rs6000.c (rs6000_option_override_internal): Fix
34574         two typographic errors in the handling of TARGET_UPPER_REGS_DI.
34576 2017-03-10  Pat Haugen  <pthaugen@us.ibm.com>
34578         PR target/79907
34579         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Test
34580         TARGET_UPPER_REGS_DI when setting 'wi' constraint regclass.
34582 2017-03-10  Martin Liska  <mliska@suse.cz>
34584         PR target/65705
34585         PR target/69804
34586         * toplev.c (process_options): Enable MPX with LSAN and UBSAN.
34587         * tree-chkp.c (chkp_walk_pointer_assignments): Verify that
34588         FIELD != NULL.
34590 2017-03-10  Olivier Hainque  <hainque@adacore.com>
34592         * tree-switch-conversion (array_value_type): Start by resetting
34593         candidate type to it's main variant.
34595 2017-03-10  Jakub Jelinek  <jakub@redhat.com>
34597         PR rtl-optimization/79909
34598         * combine.c (try_combine): Use simplify_replace_rtx on individual
34599         CALL_INSN_FUNCTION_USAGE elements instead of replace_rtx on copy_rtx
34600         of the whole CALL_INSN_FUNCTION_USAGE.
34602         PR tree-optimization/79972
34603         * gimple-ssa-warn-alloca.c (alloca_call_type): Only call
34604         get_range_info on SSA_NAMEs.  Formatting fixes.
34606 2017-03-10  Richard Biener  <rguenther@suse.de>
34607             Jakub Jelinek  <jakub@redhat.com>
34609         PR tree-optimization/77975
34610         * tree-ssa-loop-niter.c (get_base_for): Allow phi argument from latch
34611         edge to be constant.
34612         (get_val_for): For constant x return it.  Formatting fix.
34613         (loop_niter_by_eval): Avoid pointless looping if the next iteration
34614         would use the same bases as the current one.
34616 2017-03-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
34618         * config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Use rotate
34619         instead of vec_select for V1TImode.
34620         * conifg/rs6000/vsx.md (VSX_LE): Remove mode iterator that is no
34621         longer needed.
34622         (VSX_LE_128): Add V1TI to this mode iterator.
34623         (*vsx_le_perm_load_<mode>): Change to use VSX_D mode iterator.
34624         (*vsx_le_perm_store_<mode>): Likewise.
34625         (pre-reload splitter for VSX stores): Likewise.
34626         (post-reload splitter for VSX stores): Likewise.
34627         (*vsx_xxpermdi2_le_<mode>): Likewise.
34628         (*vsx_lxvd2x2_le_<mode>): Likewise.
34629         (*vsx_stxvd2x2_le_<mode>): Likewise.
34631 2017-03-09  Michael Eager  <eager@eagercon.com>
34633         Correct failures with --enable-checking=yes,rtl.
34635         * config/microblaze/microblaze.c (microblaze_expand_shift):
34636         Replace GET_CODE test with CONST_INT_P and INTVAL test with
34637         test for const0_rtx.
34638         * config/microblaze/microblaze.md (ashlsi3_byone, ashrsi3_byone,
34639         lshrsi3_byone): Replace INTVAL with test for const1_rtx.
34641 2017-03-09  Richard Biener  <rguenther@suse.de>
34643         PR tree-optimization/79977
34644         * graphite-scop-detection.c (scop_detection::merge_sese):
34645         Handle the case of extra exits to blocks dominating the entry.
34647 2017-03-09  Toma Tabacu  <toma.tabacu@imgtec.com>
34649         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
34650         Document rdynamic.
34652 2017-03-09  Vladimir Makarov  <vmakarov@redhat.com>
34654         PR rtl-optimization/79949
34655         * lra-constraints.c (process_alt_operands): Check memory when
34656         trying to predict a cycle.  Print about the overall increase.
34658 2017-03-09  Richard Biener  <rguenther@suse.de>
34660         PR middle-end/79971
34661         * gimple-expr.c (useless_type_conversion_p): Preserve
34662         TYPE_SATURATING for fixed-point types.
34664 2017-03-09  Richard Biener  <rguenther@suse.de>
34666         PR ipa/79970
34667         * ipa-prop.c (ipa_modify_formal_parameters): Avoid changing
34668         alignment of BLKmode params.
34670 2017-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
34672         PR target/79913
34673         * config/aarch64/iterators.md (VALL_F16_NO_V2Q): New mode iterator.
34674         (VALL_NO_V2Q): Likewise.
34675         (VDQF_DF): Delete.
34676         * config/aarch64/aarch64-simd.md
34677         (aarch64_dup_lane_<vswap_width_name><mode>): Use VALL_F16_NO_V2Q
34678         iterator.
34679         (*aarch64_simd_vec_copy_lane_<vswap_width_name><mode>): Use
34680         VALL_NO_V2Q mode iterator.
34681         (*aarch64_vgetfmulx<mode>): Use VDQF iterator.
34683 2017-03-09  Martin Liska  <mliska@suse.cz>
34685         PR tree-optimization/79631
34686         * tree-chkp-opt.c (chkp_is_constant_addr): Call
34687         tree_int_cst_sign_bit just for INTEGER constants.
34689 2017-03-09  Martin Liska  <mliska@suse.cz>
34691         PR target/65705
34692         PR target/69804
34693         * toplev.c (process_options): Disable -fcheck-pointer-bounds with
34694         sanitizers.
34696 2017-03-09  Marek Polacek  <polacek@redhat.com>
34698         PR c++/79672
34699         * tree.c (inchash::add_expr): Handle TREE_VEC.
34701 2017-03-09  Martin Liska  <mliska@suse.cz>
34703         PR ipa/79764
34704         (chkp_narrow_size_and_offset): New function.
34705         (chkp_parse_array_and_component_ref): Support BIT_FIELD_REF.
34706         (void chkp_parse_bit_field_ref): New function.
34707         (chkp_make_addressed_object_bounds): Add case for BIT_FIELD_REF.
34708         (chkp_process_stmt): Use chkp_parse_bit_field_ref.
34710 2017-03-09  Martin Liska  <mliska@suse.cz>
34712         PR ipa/79761
34713         * tree-chkp.c (chkp_get_bound_for_parm): Get bounds for a param.
34714         (chkp_find_bounds_1): Remove gcc_unreachable.
34716 2017-03-09  Jakub Jelinek  <jakub@redhat.com>
34718         PR sanitizer/79944
34719         * asan.c (get_mem_refs_of_builtin_call): For BUILT_IN_ATOMIC* and
34720         BUILT_IN_SYNC*, determine the access type from the size suffix and
34721         always build a MEM_REF with that type.  Handle forgotten
34722         BUILT_IN_SYNC_FETCH_AND_NAND_16 and BUILT_IN_SYNC_NAND_AND_FETCH_16.
34724         PR target/79932
34725         * config/i386/avx512vlintrin.h (_mm256_cmpge_epi32_mask,
34726         _mm256_cmpge_epi64_mask, _mm256_cmpge_epu32_mask,
34727         _mm256_cmpge_epu64_mask, _mm256_cmple_epi32_mask,
34728         _mm256_cmple_epi64_mask, _mm256_cmple_epu32_mask,
34729         _mm256_cmple_epu64_mask, _mm256_cmplt_epi32_mask,
34730         _mm256_cmplt_epi64_mask, _mm256_cmplt_epu32_mask,
34731         _mm256_cmplt_epu64_mask, _mm256_cmpneq_epi32_mask,
34732         _mm256_cmpneq_epi64_mask, _mm256_cmpneq_epu32_mask,
34733         _mm256_cmpneq_epu64_mask, _mm256_mask_cmpge_epi32_mask,
34734         _mm256_mask_cmpge_epi64_mask, _mm256_mask_cmpge_epu32_mask,
34735         _mm256_mask_cmpge_epu64_mask, _mm256_mask_cmple_epi32_mask,
34736         _mm256_mask_cmple_epi64_mask, _mm256_mask_cmple_epu32_mask,
34737         _mm256_mask_cmple_epu64_mask, _mm256_mask_cmplt_epi32_mask,
34738         _mm256_mask_cmplt_epi64_mask, _mm256_mask_cmplt_epu32_mask,
34739         _mm256_mask_cmplt_epu64_mask, _mm256_mask_cmpneq_epi32_mask,
34740         _mm256_mask_cmpneq_epi64_mask, _mm256_mask_cmpneq_epu32_mask,
34741         _mm256_mask_cmpneq_epu64_mask, _mm_cmpge_epi32_mask,
34742         _mm_cmpge_epi64_mask, _mm_cmpge_epu32_mask, _mm_cmpge_epu64_mask,
34743         _mm_cmple_epi32_mask, _mm_cmple_epi64_mask, _mm_cmple_epu32_mask,
34744         _mm_cmple_epu64_mask, _mm_cmplt_epi32_mask, _mm_cmplt_epi64_mask,
34745         _mm_cmplt_epu32_mask, _mm_cmplt_epu64_mask, _mm_cmpneq_epi32_mask,
34746         _mm_cmpneq_epi64_mask, _mm_cmpneq_epu32_mask, _mm_cmpneq_epu64_mask,
34747         _mm_mask_cmpge_epi32_mask, _mm_mask_cmpge_epi64_mask,
34748         _mm_mask_cmpge_epu32_mask, _mm_mask_cmpge_epu64_mask,
34749         _mm_mask_cmple_epi32_mask, _mm_mask_cmple_epi64_mask,
34750         _mm_mask_cmple_epu32_mask, _mm_mask_cmple_epu64_mask,
34751         _mm_mask_cmplt_epi32_mask, _mm_mask_cmplt_epi64_mask,
34752         _mm_mask_cmplt_epu32_mask, _mm_mask_cmplt_epu64_mask,
34753         _mm_mask_cmpneq_epi32_mask, _mm_mask_cmpneq_epi64_mask,
34754         _mm_mask_cmpneq_epu32_mask, _mm_mask_cmpneq_epu64_mask): Move
34755         definitions outside of __OPTIMIZE__ guarded section.
34757         PR target/79932
34758         * config/i386/avx512bwintrin.h (_mm512_packs_epi32,
34759         _mm512_maskz_packs_epi32, _mm512_mask_packs_epi32,
34760         _mm512_packus_epi32, _mm512_maskz_packus_epi32,
34761         _mm512_mask_packus_epi32): Move definitions outside of __OPTIMIZE__
34762         guarded section.
34764 2017-03-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34766         * config/s390/vx-builtins.md ("vfee<mode>", "vfeez<mode>")
34767         ("vfenez<mode>"): Add missing constraints.
34769 2017-03-08  Martin Sebor  <msebor@redhat.com>
34771         PR target/79928
34772         * config/nds32/nds32.c (nds32_option_override):
34773         Fix misspelled diagnostic.
34775 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
34777         PR c/79940
34778         * gimplify.c (gimplify_omp_for): Replace index var in outer
34779         taskloop statement with an artificial variable and add
34780         OMP_CLAUSE_PRIVATE clause for it.
34782 2017-03-08  Richard Biener  <rguenther@suse.de>
34784         PR tree-optimization/79955
34785         * tree-ssa-uninit.c (warn_uninitialized_vars): Do not warn
34786         for accesses that are completely outside of the variable.
34788 2017-03-08  Andrew Haley  <aph@redhat.com>
34790         PR tree-optimization/79943
34791         * tree-ssa-loop-split.c (compute_new_first_bound): When
34792         calculating the new upper bound, (END-BEG) should be added, not
34793         subtracted.
34795 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
34797         * config/avr/avr.md (setmemhi): Make sure match_dup
34798         operand number comes before match_scratch.
34800 2017-03-08  Richard Biener  <rguenther@suse.de>
34802         PR tree-optimization/79920
34803         * tree-vect-slp.c (vect_create_mask_and_perm): Remove and inline
34804         with ncopies == 1 to ...
34805         (vect_transform_slp_perm_load): ... here.  Properly compute
34806         all element loads by iterating VF times over the group.  Do
34807         not handle ncopies (computed in a broken way) in
34808         vect_create_mask_and_perm.
34810 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
34812         PR sanitizer/79904
34813         * internal-fn.c (expand_vector_ubsan_overflow): If arg0 or arg1
34814         is a uniform vector, use uniform_vector_p return value instead of
34815         building ARRAY_REF on folded VIEW_CONVERT_EXPR to array type.
34817 2017-03-07  Marek Polacek  <polacek@redhat.com>
34819         PR middle-end/79809
34820         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Use HOST_WIDE_INT.
34821         (alloca_call_type): Likewise.
34823 2017-03-07  Martin Liska  <mliska@suse.cz>
34825         * gcov.c (process_args): Put comment to correct location.
34827 2017-03-07  Martin Liska  <mliska@suse.cz>
34829         PR middle-end/68270
34830         * tree-chkp.c (chkp_may_narrow_to_field): Add new argument ref.
34831         Use array_at_struct_end_p instead of DECL_CHAIN (field).
34832         (chkp_narrow_bounds_for_field): Likewise.
34833         (chkp_parse_array_and_component_ref): Pass one more argument to
34834         call.
34836 2017-03-07  Richard Biener  <rguenther@suse.de>
34838         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve
34839         preheaders.
34841 2017-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
34843         * config/i386/i386.c (ix86_local_alignment): Align most aggregates
34844         of 16 bytes and more to 16 bytes, not those of 16 bits and more.
34846 2017-03-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
34848         PR c/79855
34849         * params.def (PARAM_STORE_MERGING_ALLOW_UNALIGNED): Add full stop
34850         to end of description.
34851         (PARAM_MAX_STORES_TO_MERGE): Likewise.
34853 2017-03-07  Jakub Jelinek  <jakub@redhat.com>
34855         PR rtl-optimization/79901
34856         * config/i386/sse.md (*avx512bw_<code><mode>3<mask_name>): Renamed to
34857         ...
34858         (*avx512f_<code><mode>3<mask_name>): ... this.
34859         (<code><mode>3 with maxmin code iterator): Use VI8_AVX2_AVX512F
34860         iterator instead of VI8_AVX2_AVX512BW.
34862         PR rtl-optimization/79901
34863         * expr.c (expand_expr_real_2): For vector MIN/MAX, if there is no
34864         min/max expander, expand it using expand_vec_cond_expr.
34866         PR sanitizer/79897
34867         * ubsan.c (ubsan_encode_value): Call mark_addressable on the
34868         temporary.
34870 2017-03-06  Jakub Jelinek  <jakub@redhat.com>
34872         PR c++/79821
34873         * dwarf2out.h (dw_vec_const): Change array type from unsigned char *
34874         to void * for PCH reasons.
34875         * dwarf2out.c (output_loc_operands, output_die): Cast
34876         v.val_vec.array to unsigned char *.
34878 2017-03-06  John David Anglin  <danglin@gcc.gnu.org>
34880         PR target/77850
34881         * config/pa/pa-64.h (PAD_VARARGS_DOWN): Don't pad down complex and
34882         vector types.
34884 2017-03-06  Vladimir Makarov  <vmakarov@redhat.com>
34886         PR rtl-optimization/79571
34887         * lra-constraints.c (process_alt_operands): Calculate static
34888         reject and subtract it from overall when only addresses will be
34889         reloaded.
34891 2017-03-06  Julia Koval  <julia.koval@intel.com>
34893         PR target/79793
34894         * config/i386/i386.c (ix86_minimum_incoming_stack_boundary): Set
34895         incoming stack boundary to 128 for 64-bit targets.
34897 2017-03-06  Richard Biener  <rguenther@suse.de>
34899         PR tree-optimization/79894
34900         * tree-vectorizer.c (vectorize_loops): Set loop_vectorized_call
34901         to NULL after folding it.
34903 2017-03-06  Richard Biener  <rguenther@suse.de>
34905         PR tree-optimization/79824
34906         * tree-vect-stmts.c (get_group_load_store_type): Fix alignment
34907         check disabling peeling for gaps.
34909 2017-03-06  Toma Tabacu  <toma.tabacu@imgtec.com>
34911         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
34912         attributes): Document gettimeofday.
34914 2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>
34916         * config/s390/s390.c (s390_option_override_internal): Set
34917         PARAM_MIN_VECT_LOOP_BOUND
34919 2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>
34921         * config/s390/s390.c (s390_asm_output_function_label): Use nopr %r0.
34922         * config/s390/s390.md: Likewise.
34924 2017-03-06  Jakub Jelinek  <jakub@redhat.com>
34926         PR target/79812
34927         * config/i386/sse.md (VI8F_256_512): Remove mode iterator.
34928         (<avx2_avx512>_perm<mode>): Rename to ...
34929         (avx2_perm<mode>): ... this.  Use VI8F_256 iterator instead
34930         of VI8F_256_512.
34931         (<avx512>_perm<mode>_mask): Rename to ...
34932         (avx512vl_perm<mode>_mask): ... this.  Use VI8F_256 iterator instead
34933         of VI8F_256_512.
34934         (<avx2_avx512>_perm<mode>_1<mask_name>): Rename to ...
34935         (avx2_perm<mode>_1<mask_name): ... this.  Use VI8F_256 iterator
34936         instead of VI8F_256_512.
34937         (avx512f_perm<mode>): New define_expand.
34938         (avx512f_perm<mode>_mask): Likewise.
34939         (avx512f_perm<mode>_1<mask_name>): New define_insn.
34940         (<avx512>_vec_dup<mode>_1): Fix up vec_select mode.
34942 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
34944         * config/mips/mips-msa.md (msa_fmax_a_<msafmt>, msa_fmin_a_<msafmt>,
34945         msa_max_a_<msafmt>, msa_min_a_<msafmt>): Introduce mode interator for
34946         if_then_else.
34947         (smin<mode>3, smax<mode>3): Change operand print code from 'B' to 'E'.
34949 2017-03-06  Martin Liska  <mliska@suse.cz>
34951         PR sanitize/79783
34952         * asan.c (asan_expand_poison_ifn): Do not expand ASAN_POISON
34953         when having a SSA NAME w/o VAR_DECL assigned to it.
34955 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
34957         * config/mips/mips-msa.md (msa_dotp_<su>_d, msa_dpadd_<su>_d,
34958         msa_dpsub_<su>_d): Fix MODE for vec_select.
34960 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
34962         * config/mips/mips.c (mips_gen_const_int_vector): Change type of last
34963         argument.
34964         * config/mips/mips-protos.h (mips_gen_const_int_vector): Likewise.
34966 2017-03-06  Richard Biener  <rguenther@suse.de>
34968         * lto-streamer.c (lto_check_version): Use %qs in diagnostics.
34969         * plugin.c (register_plugin_info): Likewise.
34970         * tree-chkp.c (chkp_make_static_const_bounds): Likewise.
34972 2017-03-05  Jakub Jelinek  <jakub@redhat.com>
34974         * config/i386/sse.md (sse_storehps, sse_storelps,
34975         avx_<castmode><avxsizesuffix>_<castmode>,
34976         avx512f_<castmode><avxsizesuffix>_<castmode>,
34977         avx512f_<castmode><avxsizesuffix>_256<castmode>): Require
34978         in condition that at least one operand is not a MEM.
34980 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
34982         PR middle-end/79805
34983         * internal-fn.def (ATOMIC_BIT_TEST_AND_SET, ATOMIC_BIT_TEST_AND_RESET,
34984         ATOMIC_BIT_TEST_AND_COMPLEMENT, ATOMIC_COMPARE_EXCHANGE): Remove
34985         ECF_NOTHROW.
34986         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Set
34987         gimple_call_nothrow_p flag based on whether original builtin can throw.
34988         If it can, emit following stmts on the fallthrough edge.
34989         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Similarly, except
34990         don't create new bb if inserting just debug stmts on the edge, try to
34991         insert them on the fallthru bb or just reset debug stmts.
34993 2017-03-03  Segher Boesssenkool  <segher@kernel.crashing.org>
34995         PR target/43763
34996         * config/rs6000/rs6000.c (rs6000_final_prescan_insn): Save and
34997         restore recog_data (including the operand rtxes inside it) around
34998         the call to get_insn_template.
35000 2017-03-03  Martin Sebor  <msebor@redhat.com>
35002         PR tree-optimization/79699
35003         * context.c (context::~context): Free MPFR caches to avoid
35004         a memory leak on program exit.
35006 2017-03-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
35008         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
35009         Use wide_int::ulow () instead of .elt (0).
35011 2017-03-03  Uros Bizjak  <ubizjak@gmail.com>
35013         * config/i386/i386.md (*pushtf): Change *roF constraint to *roC.
35014         (*pushxf): Limit oF constraint to 32bit targets and add oC
35015         constraint for 64bit targets.
35016         (pushxf splitter): Use PUSH_ROUNDING to calculate stack adjustment.
35017         (*pushdf): Change rmF constraint to rmC.
35019 2017-03-03  Martin Liska  <mliska@suse.cz>
35021         * tree-ssa-loop-prefetch.c (pass_loop_prefetch::execute):
35022         Remove unused variable.
35024 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
35026         PR target/79807
35027         * config/i386/i386.c (ix86_expand_multi_arg_builtin): If target
35028         is a memory operand, increase num_memory.
35029         (ix86_expand_args_builtin): Likewise.
35031 2017-03-03  Jan Hubicka  <jh@suse.cz>
35033         PR lto/79760
35034         * ipa-devirt.c (maybe_record_node): Properly handle
35035         __cxa_pure_virtual visibility.
35037 2017-03-03  Martin Liska  <mliska@suse.cz>
35039         PR tree-optimization/79803
35040         * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Remove
35041         assert.
35042         (pass_loop_prefetch::execute): Disabled optimization if an
35043         assumption about L1 cache size is not met.
35045 2017-03-03  Martin Liska  <mliska@suse.cz>
35047         PR rtl-optimization/79574
35048         * gcse.c (struct gcse_expr): Use HOST_WIDE_INT instead of int.
35049         (hash_scan_set): Likewise.
35050         (dump_hash_table): Likewise.
35051         (hoist_code): Likewise.
35053 2017-03-03  Richard Biener  <rguenther@suse.de>
35055         * fixed-value.c (fixed_from_string): Restore use of elt (1)
35056         in place of uhigh ().
35057         (fixed_convert_from_real): Likewise.
35059 2017-03-03  Uros Bizjak  <ubizjak@gmail.com>
35061         PR target/79514
35062         * config/i386/i386.md (*pushxf_rounded): Use Pmode instead of DImode.
35064 2017-03-03  Richard Biener  <rguenther@suse.de>
35066         PR middle-end/79818
35067         * match.pd ( X +- C1 CMP C2 -> X CMP C2 -+ C1): Add missing
35068         TYPE_OVERFLOW_UNDEFINED check.
35070 2017-03-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
35072         * config/rs6000/vector.md (vector_ne_<mode>_p): Correct operand
35073         numbers.
35074         (vector_ae_<mode>_p): Likewise.
35075         (vector_nez_<mode>_p): Likewise.
35076         (vector_ne_v2di_p): Likewise.
35077         (vector_ae_v2di_p): Likewise.
35078         (vector_ne_<mode>_p): Likewise.
35079         * config/rs6000/vsx.md (vsx_tsqrt<mode>2_fg): Correct operand
35080         numbers.
35081         (vsx_tsqrt<mode>2_fe): Likewise.
35083 2017-03-02  Uros Bizjak  <ubizjak@gmail.com>
35085         PR target/79514
35086         * config/i386/i386.md (*pushxf_rounded): New insn_and_split pattern.
35088 2017-03-02  Jakub Jelinek  <jakub@redhat.com>
35090         PR rtl-optimization/79780
35091         * cprop.c (one_cprop_pass): When second and further conditional trap
35092         in a single basic block is turned into an unconditional trap, turn it
35093         into a deleted note to avoid RTL verification failures.
35095 2017-03-02  Richard Biener  <rguenther@suse.de>
35097         * fold-const.c (const_binop): Use ulow () instead of elt (0).
35099 2017-03-02  Richard Biener  <rguenther@suse.de>
35101         PR tree-optimization/79345
35102         PR c++/42000
35103         * tree-ssa-alias.c (walk_aliased_vdefs_1): Take a limit
35104         param and abort the walk, returning -1 if it is hit.
35105         (walk_aliased_vdefs): Take a limit param and pass it on.
35106         * tree-ssa-alias.h (walk_aliased_vdefs): Add a limit param,
35107         defaulting to 0 and return a signed int.
35108         * tree-ssa-uninit.c (struct check_defs_data): New struct.
35109         (check_defs): New helper.
35110         (warn_uninitialized_vars): Use walk_aliased_vdefs to warn
35111         about uninitialized memory.
35112         * fixed-value.c (fixed_from_string): Use ulow/uhigh to avoid
35113         bogus uninitialized warning.
35114         (fixed_convert_from_real): Likewise.
35116 2017-03-02  Bin Cheng  <bin.cheng@arm.com>
35118         PR tree-optimization/66768
35119         * tree-ssa-loop-ivopts.c (find_interesting_uses_address): Skip addr
35120         iv_use if base object can't be determined.
35122 2017-03-02  Jakub Jelinek  <jakub@redhat.com>
35124         PR tree-optimization/79345
35125         * gensupport.h (struct pattern_stats): Add min_scratch_opno field.
35126         * gensupport.c (get_pattern_stats_1) <case MATCH_SCRATCH>: Update it.
35127         (get_pattern_stats): Initialize it.
35128         * genemit.c (gen_expand): Verify match_scratch numbers come after
35129         match_operand/match_dup numbers.
35130         * config/i386/i386.md (<s>mul<mode>3_highpart): Swap match_dup and
35131         match_scratch numbers.
35132         * config/i386/sse.md (avx2_gathersi<mode>, avx2_gatherdi<mode>):
35133         Likewise.
35134         * config/s390/s390.md (trunctdsd2): Likewise.
35136 2017-03-02  Richard Biener  <rguenther@suse.de>
35138         * wide-int.h (wide_int_storage::operator=): Implement in terms
35139         of wi::copy.
35141 2017-03-02  Richard Biener  <rguenther@suse.de>
35143         PR tree-optimization/79777
35144         * tree-ssa-pre.c (eliminate_insert): Give up if we simplify
35145         the to insert expression to sth existing.
35147 2017-03-01  Martin Sebor  <msebor@redhat.com>
35149         PR middle-end/79692
35150         * gimple-ssa-sprintf.c
35151         (directive::known_width_and_precision): New function.
35152         (format_integer): Use it.
35153         (get_mpfr_format_length): Consider the full range of precision
35154         when computing %g output with the # flag.  Set the likely byte
35155         count to 3 rather than 1 when precision is indeterminate.
35156         (format_floating): Correct the lower bound of precision.
35158 2017-03-01  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
35160         * doc/invoke.texi: Document default code model for 64-bit Linux.
35162 2017-03-01  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
35164         PR target/79752
35165         * config/rs6000/rs6000.md (peephole2 for udiv/umod): Should emit
35166         udiv rather than div since input pattern is unsigned.
35168 2017-03-01  Uros Bizjak  <ubizjak@gmail.com>
35170         * config/i386/i386.c (print_reg): Warn for values of
35171         unsupported size in integer register.
35173 2017-03-01  Michael Meissner  <meissner@linux.vnet.ibm.com>
35175         PR target/79439
35176         * config/rs6000/predicates.md (current_file_function_operand): Do
35177         not allow self calls to be local if the function is replaceable.
35179 2017-03-01  Kelvin Nilsen  <kelvin@gcc.gnu.org>
35181         PR target/79395
35182         * config/rs6000/altivec.h (vec_ctz and others): Change the
35183         preprocessor macro that controls conditional compilation from
35184         _ARCH_PWR9 to __POWER9_VECTOR__.
35185         (vec_all_ne): Change parameterization of __altivec_scalar_pred
35186         macro expansion under preprocessor #ifdef __POWER9_VECTOR__
35187         control (instead of _ARCH_PWR9 control) so that template
35188         definition uses power9-specific function.
35189         (vec_any_eq): Likewise.
35190         (vec_all_ne): Change macro definition to use a power9-specific
35191         expansion under #ifdef __POWER9_VECTOR__ control (instead of
35192         _ARCH_PWR9 control).
35193         (vec_any_eq) Likewise.
35194         * config/rs6000/rs6000-builtin.def (CMPNEF): Remove BU_P9V_AV_2
35195         expansion for CMPNEF to remove support for xvcmpnesp instruction.
35196         (CMPNED): Remove BU_P9V_AV2 expansion for CMPNED to remove
35197         support for xvcmpnedp instruction.
35198         (VCMPNEB_P): Replace BU_P9V_AV_P macro expansion with BU_P9V_AV_2
35199         macro expansion so that Power9 implementation of vec_all_ne does
35200         not use the AltiVec predicate framework.
35201         (VCMPNEH_P): Likewise.
35202         (VCMPNEW_P): Likewise.
35203         (VCMPNED_P): Likewise.
35204         (VCMPNEFP_P): Likewise.
35205         (VCMPNEDP_P): Likewise.
35206         (VCMPAEB_P): Add BU_P9V_AV_2 macro expansion to change
35207         implementation of vec_any_eq to not use AltiVec predicate
35208         framework.
35209         (VCMPAEH_P): Likewise.
35210         (VCMPAEW_P): Likewise.
35211         (VCMPAED_P): Likewise.
35212         (VCMPAEFP_P): Likewise.
35213         (VCMPAEDP_P): Likewise.
35214         (VCMPNE_P): Replace BU_P9V_OVERLOAD_P macro expansion with
35215         BU_P9V_OVERLOAD_2 so that Power9 implementation of vec_all_ne does
35216         not use the AltiVec predicate framework.
35217         (VCMPAE_P): Add BU_P9V_OVERLOAD_2 macro to change implementation
35218         of vec_any_eq to not use AltiVec predicate framework.
35219         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Add
35220         support for predefined __POWER9_VECTOR__ macro to indicate that
35221         Power9 instruction selection is enabled.
35222         (altivec_overloaded_builtins): Remove extraneous
35223         ALTIVEC_BUILTIN_VEC_CMPNE entry for overloaded
35224         function argument types RS6000_BTI_bool_V16QI and
35225         RS6000_BTI_bool_V16QI.  Remove erroneous ALTIVEC_BUILTIN_VEC_CMPNE
35226         entry for overloaded function argument types RS6000_BTI_bool_V4SI
35227         andRS6000_BTI_bool_V4SI, mapping to P9V_BUILTIN_CMPNEB.  Remove
35228         two entries mapping to P9V_BUITIN_CMPNED and one entry mapping to
35229         P9V_BUILTIN_CMPNEF to force use of instructions not specific to
35230         Power9 for implementations of vec_cmpne.  Change the signature for
35231         all definitions of the overloaded P9V_BUILTIN_VEC_CMPNE_P function
35232         (representing vec_all_ne) to remove the previously described first
35233         argument of type RS6000_BTI_INTSI, as this was an artifact of
35234         reliance on the AltiVec predicate framework, which is no longer
35235         used in the implementation of these functions.  Add
35236         P9V_BUILTIN_VEC_VCMPAE_P entries (representing the vec_anyeq
35237         function) to match all of the P9V_BUILTIN_VEC_VCMNE_P entries
35238         since, unlike the AltiVec predicate framework implementation, we
35239         do not share function descriptors between vec_alle and vec_anyeq.
35240         (altivec_resolve_overloaded_builtin): Add SFmode and DFmode to the
35241         set of modes that receive special treatment even when
35242         TARGET_P9_VECTOR is true.  The special treatment emits code that
35243         does not depend on Power9 instructions.
35244         * config/rs6000/vector.md (vector_ne_<mode>_p): Change this
35245         define_expand to not rely on AltiVec predicate framework.
35246         (vector_ae_<mode>p): New define_expand to represent vec_any_eq
35247         function.
35248         (vector_ne_v2di_p): Change this define_expand to not rely on
35249         AltiVec predicate framework.
35250         (vector_ae_v2di_p): New define_expand to represent vec_any_eq
35251         function.
35252         (vector_ne_<mode>_p): Change this define_expand to not rely on
35253         AltiVec predicate framework.
35254         (vector_ae_<mode>p): New define_expand to represent vec_any_eq
35255         function.
35256         * config/rs6000/vsx.md (*vsx_ne_<mode>_p): For modes VSX_EXTRACT_I
35257         (V16QI, V8HI, V4SI), correct a typo in the code emitted for this
35258         define_insn pattern.
35259         (*vsx_ne_<mode>_p): For modes VSX_F (V4SF and V2DF), remove this
35260         define_insn pattern because the xvcmpne<VSs>. instruction is not
35261         supported.
35262         (vcmpne<VSs>): Remove this define_insn because xvcmpne<VSs>
35263         instruction is not supported.
35265 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
35267         * config/nvptx/nvptx.c: Include intl.h.
35269 2017-03-01  Martin Jambor  <mjambor@suse.cz>
35271         PR lto/78140
35272         * ipa-prop.h (ipa_bits): Removed field known.
35273         (ipa_jump_func): Removed field vr_known.  Changed fields bits and m_vr
35274         to pointers.  Adjusted their comments to warn about their sharing.
35275         (ipcp_transformation_summary): Change bits to a vector of pointers.
35276         (ipa_check_create_edge_args): Moved to ipa-prop.c, declare.
35277         (ipa_get_ipa_bits_for_value): Declare.
35278         * tree-vrp.h (value_range): Mark as GTY((for_user)).
35279         * ipa-prop.c (ipa_bit_ggc_hash_traits): New.
35280         (ipa_bits_hash_table): Likewise.
35281         (ipa_vr_ggc_hash_traits): Likewise.
35282         (ipa_vr_hash_table): Likewise.
35283         (ipa_print_node_jump_functions_for_edge): Adjust for bits and m_vr
35284         being pointers and vr_known being removed.
35285         (ipa_set_jf_unknown): Likewise.
35286         (ipa_get_ipa_bits_for_value): New function.
35287         (ipa_set_jfunc_bits): Likewise.
35288         (ipa_get_value_range): New overloaded functions.
35289         (ipa_set_jfunc_vr): Likewise.
35290         (ipa_compute_jump_functions_for_edge): Use the above functions to
35291         construct bits and vr parts of jump functions.
35292         (ipa_check_create_edge_args): Move here from ipa-prop.h, also allocate
35293         ipa_bits_hash_table and ipa_vr_hash_table if they do not already
35294         exist.
35295         (ipcp_grow_transformations_if_necessary): Also allocate
35296         ipa_bits_hash_table and ipa_vr_hash_table if they do not already
35297         exist.
35298         (ipa_node_params_t::duplicate): Do not copy bits, just pointers to
35299         them.  Fix too long lines.
35300         (ipa_write_jump_function): Adjust for bits and m_vr being pointers and
35301         vr_known being removed.
35302         (ipa_read_jump_function): Use new setter functions to construct bits
35303         and vr parts of jump functions or set them to NULL.
35304         (write_ipcp_transformation_info): Adjust for bits being pointers.
35305         (read_ipcp_transformation_info): Likewise.
35306         (ipcp_update_bits): Likewise.  Fix excessively long lines a trailing
35307         space.
35308         Include gt-ipa-prop.h.
35309         * ipa-cp.c (propagate_bits_across_jump_function): Adjust for bits
35310         being pointers.
35311         (ipcp_store_bits_results): Likewise.
35312         (propagate_vr_across_jump_function): Adjust for m_vr being a pointer.
35313         Do not write to existing jump functions but use a temporary instead.
35315 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
35317         PR c++/79681
35318         * fold-const.c (make_bit_field_ref): If orig_inner is COMPONENT_REF,
35319         attempt to use its first operand as BIT_FIELD_REF base.
35321 2017-03-01  Richard Biener  <rguenther@suse.de>
35323         PR middle-end/79721
35324         * tree-chrec.c (chrec_evaluate): Perform computation of Newtons
35325         interpolating formula in wrapping arithmetic.
35326         (chrec_apply): Convert chrec_evaluate return value to wanted type.
35328 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
35330         PR tree-optimization/79734
35331         * tree-vect-generic.c (expand_vector_condition): Optimize
35332         AVX512 vector boolean VEC_COND_EXPRs into bitwise operations.
35333         Handle VEC_COND_EXPR where comparison has different inner width from
35334         type's inner width.
35336 2017-02-28  Sandra Loosemore  <sandra@codesourcery.com>
35338         * doc/invoke.texi (ARC Options): Copy-edit to fix punctuation,
35339         markup, and similar issues.  Remove @opindex entries for things
35340         that aren't options.  Add missing -mmpy-option entries.
35342 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
35344         PR tree-optimization/79737
35345         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): If bitlen is
35346         a multiple of BITS_PER_UNIT and !BYTES_BIG_ENDIAN, clear
35347         tmpbuf[byte_size - 1].  Call natice_encode_expr with byte_size - 1
35348         instead of byte_size.  Formatting fix.
35349         (shift_bytes_in_array_right): Formatting fix.
35351 2017-02-28  Eric Botcazou  <ebotcazou@adacore.com>
35353         PR target/79749
35354         * config/sparc/sparc.c (sparc_frame_pointer_required): Add missing
35355         condition on optimize for the leaf function test.
35357 2017-02-28  Martin Liska  <mliska@suse.cz>
35359         PR lto/79625
35360         * read-rtl-function.c (function_reader::handle_unknown_directive):
35361         Bail out when one uses -flto.
35363 2017-02-28  Martin Liska  <mliska@suse.cz>
35365         * common.opt: Replace space with tabular for options of <number>
35366         type.
35367         * config/i386/i386.opt: Show <number> value for
35368         -mlarge-data-threshold.
35369         * opts.c (print_filtered_help): Do not display number in hexadecimal
35370         format.
35372 2017-02-28  Martin Liska  <mliska@suse.cz>
35374         * common.opt: Fix --help=option -Q for options which are of
35375         an enum type.
35377 2017-02-28  Uros Bizjak  <ubizjak@gmail.com>
35379         * config/i386/i386.c (print_reg): Error out for values
35380         of 8-bit size in invalid integer register.
35382 2017-02-28  Martin Sebor  <msebor@redhat.com>
35384         PR tree-optimization/79691
35385         * passes.def (pass_all_optimizations_g): Enable pass_sprintf_length.
35387 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
35389         PR target/79729
35390         * config/i386/i386.c (ix86_print_operand) <case 'R'>: Replace
35391         gcc_unreachable with output_operand_lossage.
35393 2017-02-28  Richard Biener  <rguenther@suse.de>
35395         PR tree-optimization/79740
35396         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Allow redundant
35397         inserts.
35398         (visit_nary_op): Insert the nary into the hashtable if we
35399         pattern-matched sth.
35400         * tree-ssa-pre.c (eliminate_insert): Robustify.
35402 2017-02-28  Richard Biener  <rguenther@suse.de>
35404         PR middle-end/79731
35405         * fold-const.c (decode_field_reference): Reject out-of-bound
35406         accesses.
35408 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
35410         * config/i386/i386.c: Include intl.h.
35411         (ix86_option_override_internal): Use cond ? G_("...") : G_("...")
35412         instead of just cond ? "..." : "...".
35413         * config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Likewise.
35414         * coverage.c (read_counts_file): Likewise.
35415         * omp-offload.c: Include intl.h.
35416         (oacc_loop_fixed_partitions): Use cond ? G_("...") : G_("...") instead
35417         of just cond ? "..." : "...".
35418         * gcov.c (read_count_file): Use cond ? N_("...") : N_("...") instead
35419         of just cond ? "..." : "...".
35421 2017-02-28  Richard Earnshaw  <rearnsha@arm.com>
35423         PR target/79742
35424         * config/arm/parsecpu.awk (gen_data): Set tuning target to 'tune for'
35425         entry, if present.
35426         * config/arm/arm-cpus.in (cortex-m0plus.small-multiply): Correct
35427         'tune for' CPU name.
35428         * config/arm/arm-cpu-data.h: Regenerated.
35430 2017-02-28  Richard Biener  <rguenther@suse.de>
35432         PR tree-optimization/79732
35433         * tree-inline.c (expand_call_inline): Do not shadow var.
35435 2017-02-28  Richard Biener  <rguenther@suse.de>
35437         PR tree-optimization/79723
35438         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Preserve
35439         address-space properly.
35441 2017-02-28  Thomas Schwinge  <thomas@codesourcery.com>
35443         * doc/optinfo.texi (Optimization groups): Fix option used for
35444         OPTGROUP_ALL.
35445         * doc/invoke.texi (-fopt-info): Document "omp".
35446         * dumpfile.h: Sort OPTGROUP_OMP before OPTGROUP_VEC.
35447         (OPTGROUP_ALL): Add OPTGROUP_OMP.
35448         * hsa-gen.c (pass_data_gen_hsail): Use OPTGROUP_OMP.
35449         * ipa-hsa.c (pass_data_ipa_hsa): Likewise.
35450         * omp-simd-clone.c (pass_data_omp_simd_clone): Likewise.
35452         * dumpfile.h (OPTGROUP_OPENMP): Rename to OPTGROUP_OMP.  Adjust
35453         all users.
35454         * dumpfile.c (optgroup_options): Instead of "openmp", associate
35455         OPTGROUP_OMP with "omp".
35457 2017-02-27  Pat Haugen  <pthaugen@us.ibm.com>
35459         PR target/79544
35460         * config/rs6000/rs6000-c.c (struct altivec_builtin_types): Use VSRAD
35461         for arithmetic shift of unsigned V2DI.
35463 2017-02-27  Claudiu Zissulescu  <claziss@synopsys.com>
35465         * config.gcc (arc*-): Clean up, use arc/big.h, arc/elf.h, and
35466         arc/linux.h headers.
35467         * config/arc/arc.h (TARGET_OS_CPP_BUILTINS): Remove.
35468         (LINK_SPEC): Likewise.
35469         (ARC_TLS_EXTRA_START_SPEC): Likewise.
35470         (EXTRA_SPECS): Likewise.
35471         (STARTFILE_SPEC): Likewise.
35472         (ENDFILE_SPEC): Likewise.
35473         (LIB_SPEC): Likewise.
35474         (TARGET_SDATA_DEFAULT): Likewise.
35475         (TARGET_MMEDIUM_CALLS_DEFAULT): Likewise.
35476         (MULTILIB_DEFAULTS): Likewise.
35477         (DWARF2_UNWIND_INFO): Likewise.
35478         * config/arc/big.h: New file.
35479         * config/arc/elf.h: Likewise.
35480         * config/arc/linux.h: Likewise.
35481         * config/arc/t-uClibc: Remove.
35483 2017-02-27  Bin Cheng  <bin.cheng@arm.com>
35485         PR tree-optimization/77536
35486         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): New function.
35487         (tree_transform_and_unroll_loop): Use above function to compute the
35488         estimated niter of unrolled loop and use it when scaling profile.
35489         Also use count info rather than frequency if it's non-zero.
35490         * tree-ssa-loop-manip.h niter_for_unrolled_loop(): New declaration.
35491         * tree-vect-loop.c (scale_profile_for_vect_loop): New function.
35492         (vect_transform_loop): Call above function.
35494 2017-02-27  Richard Biener  <rguenther@suse.de>
35496         PR tree-optimization/45397
35497         * tree-ssa-pre.c (eliminate_insert): Handle BIT_AND_EXPR.
35498         * tree-ssa-sccvn.c (valueized_wider_op): New helper.
35499         (visit_nary_op): Add pattern matching for CSEing sign-changed
35500         or truncated operations with wider ones.
35502 2017-02-27  Richard Biener  <rguenther@suse.de>
35504         PR tree-optimization/79690
35505         * tree-vect-stmts.c (vectorizable_store): Use vector type
35506         built from the DR with address-space.
35508 2017-02-26  Gerald Pfeifer  <gerald@pfeifer.com>
35510         * doc/invoke.texi (Optimize Options): Refine the description
35511         of asan-use-after-return.
35513 2017-02-25  Alan Modra  <amodra@gmail.com>
35515         PR rtl-optimization/79584
35516         * lra-constraints.c (base_to_reg): Reload ad->base, the entire
35517         base, not ad->base_term, the reg within base.  Remove assertion
35518         that ad->base == ad->base_term.  Replace gen_int_mode using
35519         bogus mode with const0_rtx.
35521 2017-02-25  Jakub Jelinek  <jakub@redhat.com>
35523         PR middle-end/79396
35524         * tree-eh.c (operation_could_trap_p, stmt_could_throw_1_p): Handle
35525         FMA_EXPR like tcc_binary or tcc_unary.
35527         * tree-ssa-loop-niter.c (number_of_iterations_exit): Simplify warning.
35529         PR debug/77589
35530         * dwarf2out.c (struct dw_loc_list_struct): Add noted_variable_value
35531         bitfield.
35532         (size_of_loc_descr): Handle DW_OP_GNU_variable_value.
35533         (output_loc_operands): Handle DW_OP_call_ref and
35534         DW_OP_GNU_variable_value.
35535         (struct variable_value_struct): New type.
35536         (struct variable_value_hasher): Likewise.
35537         (variable_value_hash): New variable.
35538         (string_types): Remove.
35539         (copy_loc_descr): New function.
35540         (add_loc_descr_to_each): Clarify comment.  Use copy_loc_descr.
35541         (prepend_loc_descr_to_each): New function.
35542         (add_loc_list): Fix comment typo.  Use prepend_loc_descr_to_each
35543         instead of add_loc_descr_to_each if the first argument is single
35544         location list and the second has multiple.
35545         (resolve_args_picking_1): Handle DW_OP_GNU_variable_value.
35546         (loc_list_from_tree_1): For early_dwarf, emit DW_OP_GNU_variable_value
35547         when looking for variable value which doesn't have other location info.
35548         (loc_list_from_tree): Formatting fix.
35549         (gen_array_type_die): Simplify DW_AT_string_length handling.
35550         (adjust_string_types): Remove.
35551         (gen_subprogram_die): Don't call adjust_string_types nor test/set
35552         string_types.  Call resolve_variable_values.
35553         (prune_unused_types_walk_loc_descr): Handle DW_OP_GNU_variable_value.
35554         (resolve_addr_in_expr): Likewise.  Add A argument.
35555         (copy_deref_exprloc): Remove deref argument.  Adjust for the
35556         original expression being DW_OP_GNU_variable_value with optionally
35557         DW_OP_stack_value after it instead of DW_OP_call4 with DW_OP_deref
35558         optionally after it.
35559         (optimize_string_length): Rework for DW_OP_GNU_variable_value.
35560         (resolve_addr): Adjust optimize_string_length and resolve_addr_in_expr
35561         callers.  Set remove_AT_byte_size if removing DW_AT_string_length.
35562         (variable_value_hasher::hash, variable_value_hasher::equal): New
35563         methods.
35564         (resolve_variable_value_in_expr, resolve_variable_value,
35565         resolve_variable_values, note_variable_value_in_expr,
35566         note_variable_value): New functions.
35567         (dwarf2out_early_finish): Call note_variable_value on all toplevel
35568         DIEs.
35570 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
35572         PR c/79677
35573         * opts.h (handle_generated_option): Add GENERATED_P argument.
35574         * opts-common.c (handle_option): Adjust function comment.
35575         (handle_generated_option): Add GENERATED_P argument, pass it to
35576         handle_option.
35577         (control_warning_option): Pass false to handle_generated_option
35578         GENERATED_P.
35579         * opts.c (maybe_default_option): Pass true to handle_generated_option
35580         GENERATED_P.
35581         * optc-gen.awk: Likewise.
35583 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
35585         * config/sh/sh.md (tstsi_t): If operands[0] is a SUBREG instead of
35586         a REG, look at the REG it is a SUBREG of.
35587         (splitter for cmpeqsi_t): Ditto.
35589 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
35591         * config/pa/pa.c (pa_combine_instructions): Do not share RTL.  Make
35592         the special USEs with the pattern of the insn, not the insn itself.
35594 2017-02-24  Matthew Fortune  <matthew.fortune@imgtec.com>
35596         PR target/79473
35597         * doc/invoke.texi: Document -mload-store-pairs.
35599 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
35600             Sandra Loosemore  <sandra@codesourcery.com>
35602         * config/nios2/nios2.c (nios2_simple_const_p): Returns false if the
35603         argument isn't a CONST_INT.
35604         (nios2_alternate_compare_const): Assert op is a CONST_INT.
35605         (nios2_valid_compare_const_p): Assert op is a CONST_INT.
35606         (nios2_validate_compare): Bypass alternate compare logic if *op2
35607         is not a CONST_INT.
35608         (ldstwm_operation_p): Return false if first_base is not a REG or
35609         if first_offset is not a CONST_INT.
35611 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
35613         * config/cris/cris.md: Use correct operand in a define_peephole2.
35615 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
35617         * config/c6x/c6x.c (predicate_insn): Do not incorrectly share RTL.
35619 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
35621         * config/arc/arc.c (arc_ccfsm_advance): Only take the PATTERN of
35622         this_insn if it is an INSN or JUMP_INSN.
35623         (force_offsettable): Look at base, not at addr.
35624         * config/arc/predicates.md (brcc_nolimm_operator): Don't call INTVAL
35625         on things that aren't necessarily CONST_INTs.
35627 2017-02-24  Uros Bizjak  <ubizjak@gmail.com>
35629         * doc/invoke.texi (x86 Options, -mfpmath=sse): Mention that
35630         -mfpmath=sse is the default also for x86-32 targets with SSE2
35631         instruction set when @option{-ffast-math} is enabled
35633 2017-02-24  Jeff Law  <law@redhat.com>
35635         PR rtl-optimizatoin/79286
35636         * ira.c (update_equiv_regs): Drop may_trap_p exception to
35637         dominance test.
35639 2017-02-24  Richard Biener  <rguenther@suse.de>
35641         PR tree-optimization/79389
35642         * gimple-ssa-split-paths.c (is_feasible_trace): Properly skip
35643         debug insns.
35645 2017-02-24  Aldy Hernandez  <aldyh@redhat.com>
35647         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update
35648         function comment to reflect reality.
35649         (loop_exits_before_overflow): Fix typo in function description.
35651 2017-02-24  Richard Biener  <rguenther@suse.de>
35653         PR tree-optimization/79389
35654         * gimple-ssa-split-paths.c (is_feasible_trace): Verify more
35655         properly that a threading opportunity exists.  Detect conditional
35656         copy/constant propagation opportunities.
35658 2017-02-23  Eric Botcazou  <ebotcazou@adacore.com>
35660         * config/visium/visium.md (type): Add trap.
35661         (b): New mode attribute.
35662         (*btst): Rename into...
35663         (*btst<mode>): ...this and adjust.
35664         (*cbranchsi4_btst_insn): Rename into...
35665         (*cbranch<mode>4_btst_insn): ...this and adjust.
35666         (trap): New define_insn.
35668 2017-02-23  Jakub Jelinek  <jakub@redhat.com>
35670         PR tree-optimization/79389
35671         * ifcvt.c (struct noce_if_info): Add rev_cond field.
35672         (noce_reversed_cond_code): New function.
35673         (noce_emit_store_flag): Use rev_cond if non-NULL instead of
35674         reversed_comparison_code.  Formatting fix.
35675         (noce_try_store_flag): Test rev_cond != NULL in addition to
35676         reversed_comparison_code.
35677         (noce_try_store_flag_constants): Likewise.
35678         (noce_try_store_flag_mask): Likewise.
35679         (noce_try_addcc): Use rev_cond if non-NULL instead of
35680         reversed_comparison_code.
35681         (noce_try_cmove_arith): Likewise.  Formatting fixes.
35682         (noce_try_minmax, noce_try_abs): Clear rev_cond.
35683         (noce_find_if_block): Initialize rev_cond.
35684         (find_cond_trap): Call noce_get_condition with then_bb == trap_bb
35685         instead of false as last argument never attempt to reverse it
35686         afterwards.
35688 2017-02-23  Bin Cheng  <bin.cheng@arm.com>
35690         PR tree-optimization/79663
35691         * tree-predcom.c (combine_chains): Process refs in reverse order
35692         only for ZERO length chains, and add explaining comment.
35694 2017-02-23  Jeff Law  <law@redhat.com>
35696         PR tree-optimization/79578
35697         * tree-ssa-dse.c (clear_bytes_written_by): Use OEP_ADDRESS_OF
35698         in call to operand_equal_p.
35700 2017-01-23  Dominique d'Humieres  <dominiq@lps.ens.fr>
35702         PR target/71017
35703         * config/i386/cpuid.h: Fix another undefined behavior.
35705 2017-02-23  Richard Biener  <rguenther@suse.de>
35707         PR tree-optimization/79683
35708         * tree-vect-stmts.c (vect_analyze_stmt): Do not overwrite
35709         vector types for data-refs.
35711 2017-02-23  Martin Liska  <mliska@suse.cz>
35713         * params.def (PARAM_MIN_NONDEBUG_INSN_UID): Change default to 0.
35715 2017-02-23  Jakub Jelinek  <jakub@redhat.com>
35717         PR middle-end/79665
35718         * internal-fn.c (get_range_pos_neg): Moved to ...
35719         * tree.c (get_range_pos_neg): ... here.  No longer static.
35720         * tree.h (get_range_pos_neg): New prototype.
35721         * expr.c (expand_expr_real_2) <case TRUNC_DIV_EXPR>: If both arguments
35722         are known to be in between 0 and signed maximum inclusive, try to
35723         expand both unsigned and signed divmod and use the cheaper one from
35724         those.
35726 2017-02-22  Jeff Law  <law@redhat.com>
35728         PR tree-optimization/79578
35729         * tree-ssa-dse.c (clear_bytes_written_by): Use operand_equal_p
35730         to compare base operands.
35732 2017-02-22  Segher Boessenkool  <segher@kernel.crashing.org>
35734         PR target/79211
35735         * config/rs6000/rs6000.md (*fsel<SFDF:mode><SFDF2:mode>4): Use
35736         gpc_reg_operand instead of fpr_reg_operand.
35738 2017-02-22  Sameera Deshpande  <sameera.deshpande@imgtec.com>
35740         * config/mips/mips.c (mips_return_in_memory): Force FP
35741         vector types to be returned in memory for o32 ABI.
35743 2017-02-22  Jakub Jelinek  <jakub@redhat.com>
35745         * dwarf2out.c (gen_variable_die): For -gdwarf-5, use DW_TAG_variable
35746         instead of DW_TAG_member for static data member declarations and don't
35747         set no_linkage_name for static inline data members.
35748         (gen_member_die): For -gdwarf-5 don't change DW_TAG_variable
35749         to DW_TAG_member.
35751 2017-02-22  Martin Liska  <mliska@suse.cz>
35753         * doc/invoke.texi: Replace inequality signs with square brackets
35754         for -Wnormalized.
35756 2017-02-22  Matthew Fortune  <matthew.fortune@imgtec.com>
35758         PR target/78660
35759         * lra-constraints.c (simplify_operand_subreg): Handle
35760         WORD_REGISTER_OPERATIONS targets.
35762 2017-02-22  Jakub Jelinek  <jakub@redhat.com>
35764         PR target/70465
35765         * reg-stack.c (emit_swap_insn): Treat (float_extend:?F (mem:?F))
35766         and (const_double:?F) like (mem:?F) for the purpose of fxch %st(1)
35767         elimination by swapping fld*.
35769 2017-02-22  Richard Biener  <rguenther@suse.de>
35771         PR tree-optimization/79673
35772         * tree-ssa-pre.c (compute_avail): Use wide_int_to_tree to
35773         convert the [TARGET_]MEM_REF offset INTEGER_CST, scrapping off
35774         irrelevant address-space qualifiers and avoiding a
35775         ADDR_SPACE_CONVERT_EXPR from fold_convert.
35777 2017-02-22  Richard Biener  <rguenther@suse.de>
35779         PR tree-optimization/79666
35780         * tree-vrp.c (extract_range_from_binary_expr_1): Make sure
35781         to not symbolically negate if that may introduce undefined
35782         overflow.
35784 2017-02-22  Martin Liska  <mliska@suse.cz>
35786         PR lto/79587
35787         * data-streamer-in.c (streamer_read_gcov_count): Remove assert.
35788         * data-streamer-out.c (streamer_write_gcov_count_stream):
35789         Likewise.
35790         * value-prof.c (stream_out_histogram_value): Make assert more
35791         precise based on type of counter.
35793 2017-02-21  Uros Bizjak  <ubizjak@gmail.com>
35795         PR target/79593
35796         * config/i386/i386.md (standard_x87sse_constant_load splitter):
35797         Use nonimmediate_operand instead of memory_operand for operand 1.
35798         (float-extend standard_x87sse_constant_load splitter): Ditto.
35800 2017-02-21  Jeff Law  <law@redhat.com>
35802         PR tree-optimization/79621
35803         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Ignore
35804         blocks with edges to themselves.
35806 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
35808         PR target/79633
35809         * tree-chkp-opt.c (chkp_optimize_string_function_calls): Use
35810         is_gimple_call instead of comparing gimple_code with GIMPLE_CALL.
35811         Use gimple_call_builtin_p.
35813         PR target/79570
35814         * sel-sched.c (moveup_expr_cached): Don't call sel_bb_head
35815         on temporarily removed DEBUG_INSNs.
35817         PR tree-optimization/79649
35818         * tree-loop-distribution.c (classify_partition): Give up on
35819         non-generic address space loads/stores.
35821 2017-02-21  Aldy Hernandez  <aldyh@redhat.com>
35823         * doc/loop.texi (Loop manipulation): Remove nonexistent
35824         tree_ssa_loop_version from the documentation.
35825         * cfgloopmanip.c (loop_version): Document CONDITION_BB argument.
35827 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
35829         PR target/79494
35830         * config/i386/i386.c (ix86_expand_split_stack_prologue): Call
35831         make_reg_eh_region_note_nothrow_nononlocal on call_insn.
35832         * config/rs6000/rs6000.c: Include except.h.
35833         (rs6000_expand_split_stack_prologue): Call
35834         make_reg_eh_region_note_nothrow_nononlocal on the call insn.
35836 2017-02-21  Martin Jambor  <mjambor@suse.cz>
35838         PR lto/79579
35839         * ipa-prop.c (ipa_prop_write_jump_functions): Bail out if no edges
35840         have been analyzed.
35842 2017-02-21  Martin Jambor  <mjambor@suse.cz>
35844         * common.opt (-fipa-cp-alignment): Mark as ignored and preserved
35845         for backward compatibility only.
35846         * doc/invoke.texi (Option Summary): Remove all references to
35847         -fipa-cp-alignment.
35849 2017-02-21  Matthew Fortune  <matthew.fortune@imgtec.com>
35851         PR target/78660
35852         Revert:
35853         2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
35855         * lra-constraints.c (curr_insn_transform): Handle
35856         WORD_REGISTER_OPERATIONS requirements when reloading SUBREGs.
35858 2017-02-21  Martin Liska  <mliska@suse.cz>
35860         * config/i386/i386.opt: Replace -masm-dialect with -masm.
35862 2017-02-21  Thomas Schwinge  <thomas@codesourcery.com>
35864         PR translation/79638
35865         * config/nvptx/nvptx.c (ENTRY_TEMPLATE): Single out "%ntid.y".
35867 2017-02-21  Eric Botcazou  <ebotcazou@adacore.com>
35869         PR ada/67205
35870         * config/arm/arm.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define.
35871         (arm_function_ok_for_sibcall): Return false for an indirect call by
35872         descriptor if all the argument registers are used.
35873         (arm_relayout_function): Use FUNCTION_ALIGNMENT macro to adjust the
35874         alignment of the function.
35876 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
35878         PR tree-optimization/61441
35879         * simplify-rtx.c (simplify_const_unary_operation): For
35880         -fsignaling-nans and sNaN operand, return NULL_RTX rather than
35881         the sNaN unmodified.
35883 2017-02-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
35885         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
35886         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
35887         instead of SYSTEM_HEADER_DIR.
35889 2017-02-20  Gerald Pfeifer  <gerald@pfeifer.com>
35890             Martin LiÅ¡ka  <mliska@suse.cz>
35892         * doc/invoke.texi (use-after-scope-direct-emission-threshold):
35893         Fix typos and grammar, use active voice, and clarify.
35895 2017-02-20  Marek Polacek  <polacek@redhat.com>
35897         PR middle-end/79537
35898         * gimplify.c (gimplify_expr): Handle unused *&&L;.
35900         PR sanitizer/79558
35901         * ubsan.c (ubsan_type_descriptor): Check if TYPE_MAX_VALUE is null.
35903 2017-02-20  Jakub Jelinek  <jakub@redhat.com>
35905         PR target/79568
35906         * config/i386/i386.c (ix86_expand_builtin): Handle
35907         OPTION_MASK_ISA_AVX512VL and OPTION_MASK_ISA_64BIT in
35908         ix86_builtins_isa[fcode].isa as a requirement of those
35909         flags and any other flag in the bitmask.
35910         (ix86_init_mmx_sse_builtins): Use 0 instead of
35911         ~OPTION_MASK_ISA_64BIT as mask.
35912         * config/i386/i386-builtin.def (__builtin_ia32_rdtsc,
35913         __builtin_ia32_rdtscp, __builtin_ia32_pause, __builtin_ia32_bsrsi,
35914         __builtin_ia32_rdpmc, __builtin_ia32_rolqi, __builtin_ia32_rolhi,
35915         __builtin_ia32_rorqi, __builtin_ia32_rorhi): Likewise.
35917 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
35919         PR target/78012
35920         * lra-constraints.c (split_reg): Check requested split mode
35921         is supported by the register.
35923 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
35925         * lra-constraints.c (simplify_operand_subreg): Remove early
35926         return false.
35928 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
35930         PR target/78660
35931         * lra-constraints.c (curr_insn_transform): Tighten condition
35932         for converting SUBREG reloads from OP_OUT to OP_INOUT.
35934 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
35936         PR target/78660
35937         * lra-constraints.c (curr_insn_transform): Handle
35938         WORD_REGISTER_OPERATIONS requirements when reloading SUBREGs.
35940 2017-02-19  Uros Bizjak  <ubizjak@gmail.com>
35942         Revert:
35943         2016-05-30  Uros Bizjak  <ubizjak@gmail.com>
35945         * config/i386/sync.md (mfence_nosse): Use "lock orl $0, -4(%esp)".
35947 2017-02-19  Jonathan Wakely  <jwakely@redhat.com>
35949         PR c++/69523
35950         * doc/invoke.texi (C++ Dialect Options) [-Wliteral-suffix]: Update
35951         description.
35953 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
35955         * gimple-pretty-print.c (dump_ternary_rhs): Adjust gimple dump format
35956         for FMA_EXPR.
35958 2017-02-18  Jakub Jelinek  <jakub@redhat.com>
35960         * final.c (last_columnnum, override_columnnum): New variables.
35961         (final_start_function): Set last_columnnum, pass it to begin_prologue
35962         hook and pass 0 to dwarf2out_begin_prologue.
35963         (final_scan_insn): Update override_columnnum.  Pass last_columnnum
35964         to source_line debug hook.
35965         (notice_source_line): Compute last_columnnum and for debug_column_info
35966         return true on column changes.
35967         * debug.h (struct gcc_debug_hooks): Add column argument to
35968         source_line and begin_prologue hooks.
35969         (debug_nothing_int_charstar_int_bool): Remove prototype.
35970         (debug_nothing_int_int_charstar,
35971         debug_nothing_int_int_charstar_int_bool): New prototypes.
35972         (dwarf2out_begin_prologue): Add column argument.
35973         * debug.c (do_nothing_debug_hooks): Adjust source_line and
35974         begin_prologue hooks.
35975         (debug_nothing_int_charstar_int_bool): Remove.
35976         (debug_nothing_int_int_charstar,
35977         debug_nothing_int_int_charstar_int_bool): New functions.
35978         * dwarf2out.c (dwarf2out_begin_prologue): Add column argument, pass it
35979         through to dwarf2out_source_line.
35980         (dwarf2_lineno_debug_hooks): Adjust begin_prologue hook.
35981         (dwarf2out_source_line): Add column argument, emit it if requested.
35982         * sdbout.c (sdbout_source_line, sdbout_begin_prologue): Add column
35983         arguments.
35984         * xcoffout.h (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
35985         * xcoffout.c (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
35986         * vmsdbgout.c (vmsdbgout_begin_prologue): Add column argument, pass it
35987         through to dwarf2out_begin_prologue.
35988         (vmsdbgout_source_line): Add column argument, pass it through to
35989         dwarf2out_source_line.
35990         * dbxout.c (dbxout_begin_prologue): Add column argument, adjust
35991         dbxout_source_line caller.
35992         (dbxout_source_line): Add column argument.
35994         * common.opt (gno-column-info, gcolumn-info): New options.
35995         * dwarf2out.c (dwarf2_lineno_debug_hooks): Formatting fix.
35996         (check_die): Also test for multiple DW_AT_decl_column attributes.
35997         (add_src_coords_attributes, dwarf2out_imported_module_or_decl_1): Add
35998         DW_AT_decl_column if requested.
35999         (gen_subprogram_die): Compare and/or add also DW_AT_decl_column
36000         if requested.
36001         (gen_variable_die): Likewise.
36002         (add_call_src_coords_attributes): Add DW_AT_call_column if requested.
36003         * doc/invoke.texi (-gcolumn-info, -gno-column-info): Document.
36005         PR target/79569
36006         * config/i386/i386.opt (m3dnowa): Replace Undocumented with Report.
36007         * common/config/i386/i386-common.c (OPTION_MASK_ISA_3DNOW_A_SET): Define.
36008         (ix86_handle_option): Handle OPT_m3dnowa.
36009         * doc/invoke.texi (-m3dnowa): Document.
36010         * doc/extend.texi (__builtin_ia32_pmulhuw, __builtin_ia32_pf2iw): Use
36011         -m3dnowa instead of -m3dnow -march=athlon.
36013         PR target/79559
36014         * config/i386/i386.c (ix86_print_operand): Use output_operand_lossage
36015         instead of gcc_assert for K, r and R code checks.  Formatting fixes.
36017 2017-02-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
36019         PR target/79261
36020         * config/rs6000/rs6000.c (rs6000_expand_ternop_builtin): Add
36021         support for CODE_FOR_vsx_xxpermdi_v2d[fi]_be.
36022         * config/rs6000/rs6000.md (reload_gpr_from_vsx<mode>): Call
36023         generator for vsx_xxpermdi_<mode>_be.
36024         * config/rs6000/vsx.md (vsx_xxpermdi_<mode>): Remove logic to
36025         force big-endian semantics.
36026         (vsx_xxpermdi_<mode>_be): New define_expand with same
36027         implementation as previous version of vsx_xxpermdi_<mode>.
36029 2017-02-17  Jakub Jelinek  <jakub@redhat.com>
36031         PR tree-optimization/79327
36032         * gimple-ssa-sprintf.c (format_integer): Remove likely_adjust
36033         variable, its initialization and use.
36035 2017-02-17  Julia Koval  <julia.koval@intel.com>
36037         * common/config/i386/i386-common.c (OPTION_MASK_ISA_RDPID_SET): New.
36038         (OPTION_MASK_ISA_PKU_UNSET): New.
36039         (ix86_handle_option): Handle -mrdpid.
36040         * config/i386/cpuid.h (bit_RDPID): New.
36041         * config/i386/driver-i386.c (host_detect_local_cpu):
36042         Detect RDPID feature.
36043         * config/i386/i386-builtin.def (__builtin_ia32_rdpid): New.
36044         * config/i386/i386-c.c (ix86_target_macros_internal):
36045         Handle RDPID flag.
36046         * config/i386/i386.c (ix86_target_string): Add -mrdpid to isa2_opts.
36047         (ix86_valid_target_attribute_inner_p): Add "rdpid".
36048         (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
36049         * config/i386/i386.h (TARGET_RDPID, TARGET_RDPID_P): New.
36050         * config/i386/i386.md (define_insn "rdpid"): New.
36051         * config/i386/i386.opt Add -mrdpid.
36052         * config/i386/immintrin.h (_rdpid_u32): New.
36054 2017-02-17  Vladimir Makarov  <vmakarov@redhat.com>
36056         PR rtl-optimization/79541
36057         * lra-constraints.c (curr_insn_transform): Remove wrong asm insn
36058         instead of transforming it into USE.
36060 2017-02-17  Segher Boessenkool  <segher@kernel.crashing.org>
36062         * config/rs6000/rs6000.md (extendsfdf2): Remove default arguments.
36063         If HONOR_SNANS (SFmode) force the input to a register.
36064         (*extendsfdf2_fpr): Add !HONOR_SNANS (SFmode) condition.
36065         (*extendsfdf2_snan): New pattern, used when using SNaNs; it generates
36066         an frsp or similar insn.
36068 2017-02-17  Martin Liska  <mliska@suse.cz>
36070         PR rtl-optimization/79577
36071         * params.def (selsched-max-sched-times): Increase minimum to 1.
36073 2017-02-17  Martin Liska  <mliska@suse.cz>
36075         PR rtl-optimization/79574
36076         * gcse.c (want_to_gcse_p): Prevent integer overflow.
36078 2017-02-17  Martin Liska  <mliska@suse.cz>
36080         PR tree-optimization/79529
36081         * tree-ssa-loop-unswitch.c (is_maybe_undefined): Use
36082         ssa_defined_default_def_p to handle cases which are implicitly
36083         defined.
36084         * tree-ssa.c (ssa_defined_default_def_p): New function.
36085         (ssa_undefined_value_p): Use ssa_defined_default_def_p to handle cases
36086         which are implicitly defined.
36087         * tree-ssa.h (ssa_defined_default_def_p): Declare.
36089 2017-02-17  Richard Biener  <rguenther@suse.de>
36091         PR middle-end/79576
36092         * params.def (max-ssa-name-query-depth): Limit to 10.
36094 2017-02-17  Richard Biener  <rguenther@suse.de>
36096         PR tree-optimization/79552
36097         * tree-ssa-structalias.c (visit_loadstore): Properly verify
36098         default defs.
36100 2017-02-17  Richard Biener  <rguenther@suse.de>
36102         PR bootstrap/79567
36103         * genmatch.c (output_line_directive): Handle DIR_SEPARATOR_2.
36105 2017-02-17  Marek Polacek  <polacek@redhat.com>
36107         PR middle-end/79536
36108         * fold-const.c (fold_negate_expr_1): Renamed from fold_negate_expr.
36109         (fold_negate_expr): New wrapper.
36111 2017-02-16  Sandra Loosemore  <sandra@codesourcery.com>
36113         * doc/invoke.texi (C++ Dialect Options) [-Wno-non-template-friend]: 
36114         Correct terminology and de-emphasize pre-standard behavior.
36116 2017-02-16  Alan Modra  <amodra@gmail.com>
36118         PR rtl-optimization/79286
36119         * ira.c (def_dominates_uses): New function.
36120         (update_equiv_regs): Don't create an equivalence for insns that
36121         may trap where the register def does not dominate the use.
36123 2017-02-16  Vladimir Makarov  <vmakarov@redhat.com>
36125         PR rtl-optimization/78127
36126         * lra.c (lra): Call lra_eliminate before finish the loop after
36127         lra_constraint.
36129 2017-02-16  Richard Biener  <rguenther@suse.de>
36131         * graphite.h: Do not include isl/isl_val_gmp.h, instead include
36132         isl/isl_val.h.
36133         * graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): Remove.
36134         (gcc_expression_from_isl_expr_int): Use generic isl_val interface.
36135         * graphite-sese-to-poly.c: Do not include isl/isl_val_gmp.h.
36136         (isl_val_int_from_wi): New function.
36137         (extract_affine_gmp): Rename to ...
36138         (extract_affine_wi): ... this, take a widest_int.
36139         (extract_affine_int): Just wrap extract_affine_wi.
36140         (add_param_constraints): Use isl_val_int_from_wi.
36141         (add_loop_constraints): Likewise, and extract_affine_wi.
36143 2017-02-15  Jeff Law  <law@redhat.com>
36145         PR middle-end/79521
36146         * ira-costs.c (scan_one_insn): Check have_regs_of_mode before calling
36147         ira_init_register_move_cost_if_necessary.
36149 2017-02-15  Martin Sebor  <msebor@redhat.com>
36151         PR middle-end/32003
36152         * doc/invoke.texi (-fdump-final-insns): Replace option accidentally
36153         removed in a prior commit.
36155 2017-02-15  Bin Cheng  <bin.cheng@arm.com>
36157         PR tree-optimization/79347
36158         * tree-vect-loop-manip.c (vect_do_peeling): Maintain profile
36159         counters during peeling.
36161 2017-02-15  Thomas Schwinge  <thomas@codesourcery.com>
36163         * Makefile.in (site.exp): Remove "set ISLVER".
36165 2017-02-15  Jakub Jelinek  <jakub@redhat.com>
36167         PR target/79487
36168         * real.c (real_from_integer): Call real_convert even for decimal.
36170 2017-02-15  Dominik Vogt  <vogt@linux.vnet.ibm.com>
36172         PR target/79421
36173         * config/s390/s390.c: define TARGET_CUSTOM_FUNCTION_DESCRIPTORS.
36175 2017-02-14  Andrew Pinski  <apinski@cavium.com>
36177         * config/aarch64/aarch64-cores.def (thunderx2t99): Move to under 'C"
36178         cores and change the partno/implementer to be correct.
36179         (thunderx2t99p1): New core which replaces thunderx2t99 and still has
36180         the 'B" as the implementer.
36181         * config/aarch64/aarch64-tune.md: Regenerate.
36183 2017-02-14  Carl Love  <cel@us.ibm.com>
36185         * config/rs6000/rs6000.c: Add case statement entry to make the
36186         xvcvuxdsp built-in argument unsigned.
36187         * config/rs6000/vsx.md: Fix the source and return operand types so they
36188         match the instruction definitions from the ISA document.  Fix typo
36189         in the instruction generation for the (define_insn "vsx_xvcvuxdsp"
36190         statement.
36192 2017-02-14  Vladimir Makarov  <vmakarov@redhat.com>
36194         PR target/79282
36195         * lra-int.h (struct lra_operand_data, struct lra_insn_reg): Add
36196         member early_clobber_alts.
36197         * lra-lives.c (reg_early_clobber_p): New.
36198         (process_bb_lives): Use it.
36199         * lra.c (new_insn_reg): New arg early_clobber_alts.  Use it.
36200         (debug_operand_data): Initialize early_clobber_alts.
36201         (setup_operand_alternative): Set up early_clobber_alts.
36202         (collect_non_operand_hard_regs): Ditto.  Pass early clobber
36203         alternatives to new_insn_reg.
36204         (add_regs_to_insn_regno_info): Add arg early_clobber_alts.  Use
36205         it.
36206         (lra_update_insn_regno_info): Pass the new arg.
36208 2017-02-14  Jakub Jelinek  <jakub@redhat.com>
36210         PR middle-end/79505
36211         * omp-offload.c (free_oacc_loop): Release loop->ifns vector.
36212         (new_oacc_loop_raw): Don't clear already cleared fields.
36214         PR target/79481
36215         * config/i386/avx512pfintrin.h (_mm512_prefetch_i32gather_pd,
36216         _mm512_prefetch_i32gather_ps, _mm512_prefetch_i64gather_pd,
36217         _mm512_prefetch_i64gather_ps): New inline functions and macros.
36219 2017-02-14  Uros Bizjak  <ubizjak@gmail.com>
36221         PR target/79495
36222         * config/i386/i386.md (*movxf_internal): Add (o,rC) alternative.
36224 2017-02-14  H.J. Lu  <hongjiu.lu@intel.com>
36226         PR target/79498
36227         * config/i386/i386.c (timode_scalar_chain::convert_insn): Insert
36228         the extra instruction to the right place to store 128-bit constant
36229         when needed.
36231 2017-02-14  Martin Sebor  <msebor@redhat.com>
36233         PR middle-end/79448
36234         * gimple-ssa-sprintf.c (format_directive): Avoid issuing INT_MAX
36235           warning for strings of unknown length.
36237 2017-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
36239         * config.gcc (supported_defaults) [powerpc*-*-*]: Update.
36241 2017-02-14  Jeff Law  <law@redhat.com>
36243         PR target/79404
36244         * ira-costs.c (scan_one_insn): Initialize register move costs
36245         for pseudos seen in USE/CLOBBER insns.
36247         PR tree-optimization/79095
36248         * tree-vrp.c (extract_range_from_binary_expr_1): For EXACT_DIV_EXPR,
36249         if the numerator has the range ~[0,0] make the resultant range ~[0,0].
36250         (extract_range_from_binary_expr): For MINUS_EXPR with no derived range,
36251         if the operands are known to be not equal, then the resulting range
36252         is ~[0,0].
36253         (intersect_ranges): If the new range is ~[0,0] and the old range is
36254         wide, then prefer ~[0,0].
36255         * tree-vrp.c (overflow_comparison_p_1): New function.
36256         (overflow_comparison_p): New function.
36257         * tree-vrp.c (register_edge_assert_for_2): Register additional asserts
36258         if NAME is used in an overflow test.
36259         (vrp_evaluate_conditional_warnv_with_ops): If the ops represent an
36260         overflow check that can be expressed as an equality test, then adjust
36261         ops to be that equality test.
36263 2017-02-14  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
36265         * config/s390/s390-builtin-types.def: Remove flags argument.
36266         * config/s390/s390.c (s390_init_builtins): Likewise.
36268 2017-02-14  Martin Liska  <mliska@suse.cz>
36270         * tree-ssa-loop-unswitch.c (hoist_guard): Release get_loop_body
36271         vector.  Fix trailing white spaces.
36273 2017-02-14  James Greenhalgh  <james.greenhalgh@arm.com>
36275         * config/aarch64/aarch64.c (aarch64_simd_container_mode): Handle
36276         HFmode.
36278 2017-02-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
36280         PR rtl-optimization/68664
36281         * config/arm/arm.c (arm_sched_can_speculate_insn):
36282         New function.  Declare prototype.
36283         (TARGET_SCHED_CAN_SPECULATE_INSN): Define.
36285 2017-02-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
36287         PR rtl-optimization/68664
36288         * config/aarch64/aarch64.c (aarch64_sched_can_speculate_insn):
36289         New function.
36290         (TARGET_SCHED_CAN_SPECULATE_INSN): Define.
36292 2017-02-14  Amit Pawar  <amit.pawar@amd.com>
36294         * config/i386/i386.c (znver1_cost): Fix the alignment for function and
36295         max skip bytes for function, loop and jump.
36297 2017-02-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
36299         * gimple-pretty-print.c (dump_unary_rhs): Adjust dump format for
36300         ABS_EXPR for gimple dump.
36302 2017-02-14  Jakub Jelinek  <jakub@redhat.com>
36304         PR target/79462
36305         * config/sh/sh.c (expand_cbranchdi4): Don't clear operands[4].
36307         PR tree-optimization/79408
36308         * tree-vrp.c (simplify_div_or_mod_using_ranges): Handle also the
36309         case when on TRUNC_MOD_EXPR op0 is INTEGER_CST.
36310         (simplify_stmt_using_ranges): Call simplify_div_or_mod_using_ranges
36311         also if rhs1 is INTEGER_CST.
36313 2017-02-14  Richard Biener  <rguenther@suse.de>
36315         PR middle-end/79432
36316         * tree-into-ssa.c (insert_phi_nodes): When the function can
36317         have abnormal edges rewrite SSA names with broken use-def
36318         dominance out of SSA and register them for PHI insertion.
36320 2017-02-13  Martin Sebor  <msebor@redhat.com>
36322         PR middle-end/79496
36323         * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call): Avoid
36324         clearing info.nowrite flag when snprintf size argument is a range.
36326 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
36328         * cprop.c (cprop_jump): Add missing space in string literal.
36329         * tree-ssa-structalias.c (rewrite_constraints): Likewise.
36330         (get_constraint_for_component_ref): Likewise.
36331         * df-core.c (df_worklist_dataflow_doublequeue): Likewise.
36332         * tree-outof-ssa.c (insert_partition_copy_on_edge): Likewise.
36333         * lra-constraints.c (process_alt_operands): Likewise.
36334         * ipa-inline.c (inline_small_functions): Likewise.
36335         * tree-ssa-sccvn.c (visit_reference_op_store): Likewise.
36336         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
36337         * trans-mem.c (diagnose_tm_1_op): Likewise.
36338         * omp-grid.c (grid_find_single_omp_among_assignments): Likewise.
36339         (grid_parallel_clauses_gridifiable): Likewise.
36341         * config/nvptx/mkoffload.c (process): Add space in between
36342         , and %d.
36344         * config/i386/i386.h (REG_CLASS_NAMES): Add , in between
36345         "MOD4_SSE_REGS" and "ALL_REGS".
36347         * spellcheck.c (test_data): Add , in between "foo" and "food".
36349 2017-02-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
36351         PR target/79449
36352         * config/rs6000/rs6000.c (expand_block_compare): Make sure runtime
36353         boundary crossing check and subsequent code generation agree.
36355 2017-02-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
36357         * config/aarch64/aarch64.c (has_memory_op): Delete.
36358         (aarch64_madd_needs_nop): Use contains_mem_rtx_p instead of
36359         has_memory_op.
36361 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
36363         PR rtl-optimization/79388
36364         PR rtl-optimization/79450
36365         * combine.c (distribute_notes): When removing TEM_INSN for which
36366         corresponding dest has last value recorded, invalidate that last
36367         value.
36369 2017-02-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
36371         * config/arm/arm.c (arm_print_tune_info): Use ASM_COMMENT_START instead
36372         of explicit '@'.  Add missing assembly comment marker on branch costs
36373         printout.
36375 2017-02-13  Nathan Sidwell  <nathan@acm.org>
36377         * gengtype-lex.l (<in_struct>): Add '/'.
36379 2017-02-13  Martin Liska  <mliska@suse.cz>
36381         PR c/79471
36382         * calls.c (expand_call): Replace XALLOCAVEC with XCNEWVEC.
36384 2017-02-13  Richard Biener  <rguenther@suse.de>
36386         * configure.ac (HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS):
36387         Remove.
36388         * configure: Re-generate.
36389         * config.in: Likewise.
36390         * graphite-dependences.c: Simplify as if
36391         HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS was defined.
36392         * graphite-isl-ast-to-gimple.c: Likewise.
36393         * graphite-optimize-isl.c: Likewise.
36394         * graphite-poly.c: Likewise.
36395         * graphite-sese-to-poly.c: Likewise.
36396         * graphite.h: Likewise.
36397         * toplev.c: Include isl/version.h and use isl_version () for
36398         printing the ISL version.
36399         * doc/install.texi: Update ISL requirement.
36401 2017-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
36403         * doc/standards.texi (Standards): Update reference to
36404         Objective-C 2.0.
36406 2017-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
36408         * doc/extend.texi (Named Address Spaces): sourceware.org now
36409         defaults to https.
36410         * doc/install.texi (Binaries): Ditto.
36411         (Specific): Ditto.
36413 2017-02-11  Sandra Loosemore  <sandra@codesourcery.com>
36415         * doc/cpp.texi: Replace "stringify"/"stringification" with C
36416         standard terminology "stringize"/"stringizing" throughout.
36417         * doc/cppinternals.texi: Likewise.
36419 2017-02-11  Sandra Loosemore  <sandra@codesourcery.com>
36421         * doc/extend.texi: Fix some spelling mistakes and typos.
36422         * doc/invoke.texi: Likewise.
36424 2017-02-11  Jan Hubicka  <hubicka@ucw.cz>
36426         PR ipa/79224
36427         * params.def (inline-min-speedup) Change from 10 to 8.
36429 2017-02-11  Jakub Jelinek  <jakub@redhat.com>
36431         * doc/invoke.texi (fopenmp): Bump OpenMP version from 4.0 to
36432         4.5.
36434 2017-02-11  Jan Hubicka  <hubicka@ucw.cz>
36436         PR ipa/79224
36437         * ipa-inline-analysis.c (get_minimal_bb): New function.
36438         (record_modified): Use it.
36439         (remap_edge_change_prob): Handle also ancestor functions.
36441 2017-02-11  Gerald Pfeifer  <gerald@pfeifer.com>
36443         * doc/contrib.texi (Contributors): Remove broken link into
36444         the Mauve CVS repository.
36446 2017-02-11  Jakub Jelinek  <jakub@redhat.com>
36448         PR middle-end/79454
36449         * internal-fn.c (expand_vector_ubsan_overflow): Use piece-wise
36450         result computation whenever lhs doesn't have vector mode, not
36451         just when it has BLKmode.
36453 2017-02-10  Gerald Pfeifer  <gerald@pfeifer.com>
36455         * doc/makefile.texi (profiledbootstrap): Refer to the
36456         installation instructions only in textual form.
36458 2017-02-10  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
36460         PR target/79295
36461         * config/rs6000/altivec.md (bcd<bcd_add_sub>): Fix constraints.
36463 2017-02-10  Gerald Pfeifer  <gerald@pfeifer.com>
36465         * doc/install.texi (Specific): Use https for blackfin.uclinux.org.
36466         (Specific): Update mingw-w64 reference.
36467         (Binaries): Ditto.
36468         (Specific): Remove broken link to Renesas RX processor.
36470 2017-02-10  Richard Biener  <rguenther@suse.de>
36472         * toplev.c (process_options): Do not mention obsolete graphite
36473         options when printing sorry message about missing graphite support.
36474         Mention -floop-nest-optimize.
36476 2017-02-10  Christophe Lyon  <christophe.lyon@linaro.org>
36478         * config/aarch64/arm_neon.h (vtst_p8): Rewrite without asm.
36479         (vtst_p16): Likewise.
36480         (vtstq_p8): Likewise.
36481         (vtstq_p16): Likewise.
36482         (vtst_p64): New.
36483         (vtstq_p64): Likewise.
36484         * config/arm/arm_neon.h (vgetq_lane_p64): New.
36485         (vset_lane_p64): New.
36486         (vsetq_lane_p64): New.
36488 2017-02-10  Jakub Jelinek  <jakub@redhat.com>
36490         PR tree-optimization/79411
36491         * tree-ssa-reassoc.c (is_reassociable_op): Return false if
36492         stmt operands are SSA_NAMEs used in abnormal phis.
36493         (can_reassociate_p): Return false if op is SSA_NAME used in abnormal
36494         phis.
36496 2017-02-09  Jan Hubicka  <hubicka@ucw.cz>
36498         PR ipa/70795
36499         * cgraphunit.c (cgraph_node::add_new_function): Set externally_visible
36500         flag if needed.
36502 2017-02-09  Jan Hubicka  <hubicka@ucw.cz>
36504         * tree-ssa-loop-unswitch.c (hoist_guard): Update profile.
36506 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
36508         * omp-offload.c (oacc_loop_auto_partitions): Use || instead of |
36509         to avoid warning.
36511         PR c/79413
36512         * gimplify.h (is_gimple_sizepos): Only test for INTEGER_CST constants,
36513         not arbitrary TREE_CONSTANT.
36515         PR c/79431
36516         * gimplify.c (gimplify_adjust_omp_clauses): Ignore
36517         "omp declare target link" attribute unless is_global_var.
36518         * omp-offload.c (find_link_var_op): Likewise.
36520 2017-02-09  Nathan Sidwell  <nathan@codesourcery.com>
36521             Chung-Lin Tang  <cltang@codesourcery.com>
36523         * gimplify.c (gimplify_scan_omp_clauses): No special handling for
36524         OMP_CLAUSE_TILE.
36525         (gimplify_adjust_omp_clauses): Don't delete TILE.
36526         (gimplify_omp_for): Deal with TILE.
36527         * internal-fn.c (expand_GOACC_TILE): New function.
36528         * internal-fn.def (GOACC_DIM_POS): Comment may be overly conservative.
36529         (GOACC_TILE): New.
36530         * omp-expand.c (struct oacc_collapse): Add tile and outer fields.
36531         (expand_oacc_collapse_init): Add LOC paramter.  Initialize tile
36532         element fields.
36533         (expand_oacc_collapse_vars): Add INNER parm, adjust for tiling,
36534         avoid DIV for outermost collapse var.
36535         (expand_oacc_for): Insert tile element loop as needed.  Adjust.
36536         Remove out of date comments, fix whitespace.
36537         * omp-general.c (omp_extract_for_data): Deal with tiling.
36538         * omp-general.h (enum oacc_loop_flags): Add OLF_TILE flag,
36539         adjust OLF_DIM_BASE value.
36540         (struct omp_for_data): Add tiling field.
36541         * omp-low.c (scan_sharing_clauses): Allow OMP_CLAUSE_TILE.
36542         (lower_oacc_head_mark): Add OLF_TILE as appropriate.  Ensure 2 levels
36543         for auto loops.  Remove default auto determining, moved to
36544         oacc_loop_fixed_partitions.
36545         * omp-offload.c (struct oacc_loop): Change 'ifns' to vector of call
36546         stmts, add e_mask field.
36547         (oacc_dim_call): New function, abstracted out from oacc_thread_numbers.
36548         (oacc_thread_numbers): Use oacc_dim_call.
36549         (oacc_xform_tile): New.
36550         (new_oacc_loop_raw): Initialize e_mask, adjust for ifns vector.
36551         (finish_oacc_loop): Adjust for ifns vector.
36552         (oacc_loop_discover_walk): Append loop abstraction sites to list,
36553         add case for GOACC_TILE fns.
36554         (oacc_loop_xform_loop): Delete.
36555         (oacc_loop_process): Iterate over call list directly, and add
36556         handling for GOACC_TILE fns.
36557         (oacc_loop_fixed_partitions): Determine default auto, deal with TILE,
36558         dump partitioning.
36559         (oacc_loop_auto_partitions): Add outer_assign parm. Assign all but
36560         vector partitioning to outer loops.  Assign 2 partitions to loops
36561         when available. Add TILE handling.
36562         (oacc_loop_partition): Adjust oacc_loop_auto_partitions call.
36563         (execite_oacc_device_lower): Process GOACC_TILE fns,
36564         ignore unknown specs.
36565         * tree-nested.c (convert_nonlocal_omp_clauses): Allow OMP_CLAUSE_TILE.
36566         * tree.c (omp_clause_num_ops): Adjust TILE ops.
36567         * tree.h (OMP_CLAUSE_TILE_ITERVAR, OMP_CLAUSE_TILE_COUNT): New.
36569 2017-02-09  Gerald Pfeifer  <gerald@pfeifer.com>
36571         * configure.ac (ACX_BUGURL): Update.
36572         * configure: Regenerate.
36574 2017-02-09  Richard Biener  <rguenther@suse.de>
36576         PR tree-optimization/69823
36577         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
36578         Properly enumerate all BBs in the region.  Use auto_vec/auto_bitmap.
36580 2017-02-09  Andrew Burgess  <andrew.burgess@embecosm.com>
36582         * config/arc/arc-c.def: Add __NPS400__ definition.
36583         * config/arc/arc.h (CPP_SPEC): Don't define __NPS400__ here.
36584         (TARGET_NPS400): Define.
36586 2017-02-09  Andrew Burgess  <andrew.burgess@embecosm.com>
36588         * config/arc/arc-arch.h (arc_arch_t): Move unchanged to earlier in
36589         file.
36590         (arc_cpu_t): Change base_architecture field, arch, to a arc_arc_t
36591         pointer, arch_info.
36592         (arc_cpu_types): Fill the arch_info field with a pointer into the
36593         arc_arch_types table.
36594         (arc_selected_cpu): Declare.
36595         * config/arc/arc.c (arc_selected_cpu): Make global.
36596         (arc_selected_arch): Delete.
36597         (arc_base_cpu): Delete.
36598         (arc_override_options): Remove references to deleted variables,
36599         update access to arch information.
36600         (ARC_OPT): Update access to arch information.
36601         (ARC_OPTX): Likewise.
36602         * config/arc/arc.h (arc_base_cpu): Remove declaration.
36603         (TARGET_ARC600): Update access to arch information.
36604         (TARGET_ARC601): Likewise.
36605         (TARGET_ARC700): Likewise.
36606         (TARGET_EM): Likewise.
36607         (TARGET_HS): Likewise.
36608         * config/arc/driver-arc.c (arc_cpu_to_as): Update access to arch
36609         information.
36611 2017-02-08  Pat Haugen  <pthaugen@us.ibm.com>
36613         PR target/78604
36614         * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Invert
36615         condition/operands for integer GE/LE/GEU/LEU operations.
36617 2017-02-08  Segher Boessenkool  <segher@kernel.crashing.org>
36619         PR translation/79397
36620         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Fix spelling
36621         of AltiVec.
36623 2017-02-08  Martin Jambor  <mjambor@suse.cz>
36625         PR ipa/79375
36626         * ipa-prop.c (ipa_alloc_node_params): Make static, return bool
36627         whether allocation happened.
36628         (ipa_initialize_node_params): Do not call ipa_alloc_node_params if
36629         nothing was allocated.
36631 2017-02-08  Jakub Jelinek  <jakub@redhat.com>
36633         PR tree-optimization/79408
36634         * tree-vrp.c (simplify_div_or_mod_using_ranges): If op1 is not
36635         constant, but SSA_NAME with a known integer range, use the minimum
36636         of that range instead of op1 to determine if modulo can be replaced
36637         with its first operand.
36639 2016-02-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
36641         * config/riscv/riscv.c (riscv_build_integer_1): Avoid use of INT16_MAX.
36643 2017-02-08  Richard Biener  <rguenther@suse.de>
36645         PR tree-optimization/71824
36646         * graphite-scop-detection.c (scop_detection::build_scop_breadth):
36647         Check all loops contained in the merged region.
36649 2017-02-07  Andrew Pinski  <apinski@cavium.com>
36651         * config/aarch64/aarch64.md (popcount<mode>2): New pattern.
36653 2017-02-07  Andrew Pinski  <apinski@cavium.com>
36655         * config/aarch64/aarch64-cores.def (thunderx): Disable LSE.
36656         (thunderxt88): Likewise.
36657         (thunderxt81): Disable LSE and change v8.1 to v8.
36658         (thunderxt83): Likewise.
36660 2017-02-07  Jakub Jelinek  <jakub@redhat.com>
36661             Richard Biener  <rguenther@suse.de>
36663         PR middle-end/79399
36664         * ira-int.h (struct target_ira_int): Change x_max_struct_costs_size
36665         type from int to size_t.
36666         * ira-costs.c (struct_costs_size): Change type from int to size_t.
36668 2017-02-07  Jakub Jelinek  <jakub@redhat.com>
36670         PR rtl-optimization/79386
36671         * cprop.c (bypass_conditional_jumps): Initialize
36672         bypass_last_basic_block already before splitting bbs after
36673         unconditional traps...
36674         (bypass_conditional_jumps): ... rather than here.
36676         PR target/79299
36677         * config/i386/sse.md (xtg_mode, gatherq_mode): New mode attrs.
36678         (*avx512f_gathersi<mode>, *avx512f_gathersi<mode>_2,
36679         *avx512f_gatherdi<mode>, *avx512f_gatherdi<mode>_2): Use them,
36680         fix -masm=intel patterns.
36682 2017-02-07  Richard Biener  <rguenther@suse.de>
36684         PR tree-optimization/79256
36685         PR middle-end/79278
36686         * builtins.c (get_object_alignment_2): Use min_align_of_type
36687         to extract alignment for MEM_REFs to honor BIGGEST_FIELD_ALIGNMENT
36688         and ADJUST_FIELD_ALIGN.
36690         * doc/tm.texi.in (ADJUST_FIELD_ALIGN): Adjust to take additional
36691         type parameter.
36692         * doc/tm.texi: Regenerate.
36693         * stor-layout.c (layout_decl): Adjust.
36694         (update_alignment_for_field): Likewise.
36695         (place_field): Likewise.
36696         (min_align_of_type): Likewise.
36697         * config/arc/arc.h (ADJUST_FIELD_ALIGN): Adjust.
36698         * config/epiphany/epiphany.h (ADJUST_FIELD_ALIGN): Likewise.
36699         * config/epiphany/epiphany.c (epiphany_adjust_field_align): Likewise.
36700         * config/frv/frv.h (ADJUST_FIELD_ALIGN): Likewise.
36701         * config/frv/frv.c (frv_adjust_field_align): Likewise.
36702         * config/i386/i386.h (ADJUST_FIELD_ALIGN): Likewise.
36703         * config/i386/i386.c (x86_field_alignment): Likewise.
36704         * config/rs6000/aix.h (ADJUST_FIELD_ALIGN): Likewise.
36705         * config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Likewise.
36706         * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
36707         * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
36708         * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Likewise.
36709         * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p):
36710          Likewise.
36712         Revert
36713         2017-01-30  Richard Biener  <rguenther@suse.de>
36715         PR tree-optimization/79256
36716         * targhooks.c (default_builtin_vector_alignment_reachable): Honor
36717         BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus
36718         alignment on TYPE.
36720 2017-02-07  Toma Tabacu  <toma.tabacu@imgtec.com>
36722         * config/mips/mips.c (mips_expand_builtin_insn): Convert the QImode
36723         argument of the pshufh, psllh, psllw, psrah, psraw, psrlh, psrlw
36724         builtins to SImode and emit a zero-extend, if necessary.
36726 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
36728         * docs/invoke.texi (RISC-V Options): Alphabetize.
36730 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
36732         * doc/invoke.texi (RISC-V Options): Use two spaces to separate
36733         options.
36735 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
36737         * config/riscv/riscv.c: New file.
36738         * common/config/riscv/riscv-common.c: Likewise.
36739         * config.gcc: Likewise.
36740         * config/riscv/constraints.md: Likewise.
36741         * config/riscv/elf.h: Likewise.
36742         * config/riscv/generic.md: Likewise.
36743         * config/riscv/linux.h: Likewise.
36744         * config/riscv/multilib-generator: Likewise.
36745         * config/riscv/peephole.md: Likewise.
36746         * config/riscv/pic.md: Likewise.
36747         * config/riscv/predicates.md: Likewise.
36748         * config/riscv/riscv-builtins.c: Likewise.
36749         * config/riscv/riscv-c.c: Likewise.
36750         * config/riscv/riscv-ftypes.def: Likewise.
36751         * config/riscv/riscv-modes.def: Likewise.
36752         * config/riscv/riscv-opts.h: Likewise.
36753         * config/riscv/riscv-protos.h: Likewise.
36754         * config/riscv/riscv.h: Likewise.
36755         * config/riscv/riscv.md: Likewise.
36756         * config/riscv/riscv.opt: Likewise.
36757         * config/riscv/sync.md: Likewise.
36758         * config/riscv/t-elf-multilib: Likewise.
36759         * config/riscv/t-linux: Likewise.
36760         * config/riscv/t-linux-multilib: Likewise.
36761         * config/riscv/t-riscv: Likewise.
36762         * configure.ac: Likewise.
36763         * doc/contrib.texi: Add Kito Cheng, Palmer Dabbelt, and Andrew
36764         Waterman as RISC-V maintainers.
36765         * doc/install.texi: Add RISC-V entries.
36766         * doc/invoke.texi: Add RISC-V options section.
36767         * doc/md.texi: Add RISC-V constraints section.
36768         * configure: Regenerated.
36770 2017-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
36772         PR target/66144
36773         * config/rs6000/vector.md (vcond<mode><mode>): Allow the true and
36774         false values to be constant vectors with all 0 or all 1 bits set.
36775         (vcondu<mode><mode>): Likewise.
36776         * config/rs6000/predicates.md (vector_int_reg_or_same_bit): New
36777         predicate.
36778         (fpmask_comparison_operator): Update comment.
36779         (vecint_comparison_operator): New predicate.
36780         * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Optimize
36781         vector conditionals when the true and false values are constant
36782         vectors with all 0 bits or all 1 bits set.
36784 2017-02-06  Martin Sebor  <msebor@redhat.com>
36786         PR  tree-optimization/79376
36787         * gimple-fold.c (get_range_strlen): Set the minimum length to zero.
36789 2017-02-06  Uros Bizjak  <ubizjak@gmail.com>
36791         * config/i386/sse.md (vector modes -> vec_extract* splitter): Use
36792         explicit subreg RTX with operand 1.  Use VECTOR_MODE_P predicate
36793         to simplify split condition.
36795 2017-02-06  Jakub Jelinek  <jakub@redhat.com>
36797         * omp-expand.c (oxpand_omp_atomic_fetch_op,
36798         expand_omp_atomic_pipeline): Return false if can_atomic_load_p is
36799         false.
36801 2017-02-06  Segher Boessenkool  <segher@kernel.crashing.org>
36803         PR rtl-optimization/68664
36804         * target.def (can_speculate_insn): New hook.
36805         * doc/tm.texi.in (TARGET_SCHED_CAN_SPECULATE_INSN): New hook.
36806         * doc/tm.texi: Regenerate.
36807         * sched-rgn.c (can_schedule_ready_p): Use the new hook.
36808         * config/rs6000/rs6000.c (TARGET_SCHED_CAN_SPECULATE_INSN): New macro.
36809         (rs6000_sched_can_speculate_insn): New function.
36811 2017-02-06  Jakub Jelinek  <jakub@redhat.com>
36813         PR tree-optimization/79284
36814         * tree-vectorizer.h (VECT_SCALAR_BOOLEAN_TYPE_P): Define.
36815         * tree-vect-stmts.c (vect_get_vec_def_for_operand,
36816         vectorizable_mask_load_store, vectorizable_operation,
36817         vect_is_simple_cond, get_same_sized_vectype): Use it instead
36818         of comparing TREE_CODE of a type against BOOLEAN_TYPE.
36819         * tree-vect-patterns.c (check_bool_pattern, search_type_for_mask_1,
36820         vect_recog_bool_pattern, vect_recog_mask_conversion_pattern): Likewise.
36821         * tree-vect-slp.c (vect_get_constant_vectors): Likewise.
36822         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
36823         Remove redundant gimple_code (stmt) == GIMPLE_ASSIGN test after
36824         is_gimple_assign (stmt).  Replace another such test with
36825         is_gimple_assign (stmt).
36827 2017-02-06  Georg-Johann Lay  <avr@gjlay.de>
36829         PR target/78883
36830         * config/avr/avr.c (rtl-iter.h): Include it.
36831         (TARGET_LEGITIMATE_COMBINED_INSN): New hook define...
36832         (avr_legitimate_combined_insn): ...and implementation.
36834 2017-02-06  Dominik Vogt  <vogt@linux.vnet.ibm.com>
36836         * config/s390/predicates.md ("larl_operand"): Use macros from hwint.h.
36837         * config/s390/s390.c (s390_const_operand_ok)
36838         (s390_canonicalize_comparison, s390_extract_part)
36839         (s390_single_part, s390_contiguous_bitmask_nowrap_p)
36840         (s390_contiguous_bitmask_p, s390_rtx_costs)
36841         (legitimize_pic_address): Likewise.
36842         * config/s390/s390.md ("clzdi2", "clztidi2"): Likewise.
36843         * config/s390/vx-builtins.md ("vec_genbytemaskv16qi")
36844         ("vec_permi<mode>", "vfae<mode>", "*vfaes<mode>", "vstrc<mode>")
36845         ("*vstrcs<mode>"): Use UINTVAL() to set unsigned HOST_WIDE_INT.
36846         * config/s390/vector.md ("vec_vfenes<mode>"): Likewise.
36848 2017-02-06  Georg-Johann Lay  <avr@gjlay.de>
36850         * config/avr/avr.md (*addhi3_zero_extend): Add alternative where
36851         REGNO($0) == REGNO($1).
36853 2017-02-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
36855         * config/s390/linux.h(SIZE_TYPE): Add comment.
36857 2017-02-06  Julian Brown  <julian@codesourcery.com>
36858             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
36859             Virendra Pathak  <virendra.pathak@broadcom.com>
36861         * config/aarch64/aarch64-cores.def: Change the scheduler
36862         to Thunderx2t99.
36863         * config/aarch64/aarch64.md: Include thunderx2t99.md.
36864         * config/aarch64/thunderx2t99.md: New file.
36866 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
36868         * doc/standards.texi (Go Language): Update link to language
36869         standard.
36871 2017-02-05  Jan Hubicka  <hubicka@ucw.cz>
36873         * tree-eh.c (lower_resx): Sanitize profile.
36874         (cleanup_empty_eh_move_lp): Likewise.
36876 2017-02-05  Jan Hubicka  <hubicka@ucw.cz>
36878         PR tree-ssa/79347
36879         * cfgloopmanip.c (lv_adjust_loop_entry_edge, loop_version): Add
36880         ELSE_PROB.
36881         * cfgloopmanip.h (loop_version): Update prototype.
36882         * modulo-sched.c (sms_schedule): Update call of loop_version.
36883         * tree-if-conv.c(version_loop_for_if_conversion): Likewise.
36884         * tree-parloops.c (gen_parallel_loop): Likewise.
36885         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Likewise.
36886         * tree-ssa-loop-split.c (split_loop): Likewise.
36887         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Likewise.
36888         * tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
36890 2017-02-05  Martin Liska  <mliska@suse.cz>
36892         PR bootstrap/78985
36893         * config/s390/s390.c (s390_gimplify_va_arg): Initialize local
36894         variable to NULL.
36895         (print_operand_address): Initialize a struct to zero.
36897 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
36899         * doc/contrib.texi (Contributors): Refer to Hans Boehm's
36900         garbage collector only in textual form.
36902 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
36904         * doc/extend.texi (x86 specific memory model extensions for
36905         transactional memory): Simplify a phrase.
36907 2017-02-05  Eric Botcazou  <ebotcazou@adacore.com>
36909         PR target/79353
36910         * config/sparc/sync.md (atomic_loaddi_1): Replace 'U' constraint with
36911         'r', 'm' constraint with 'T' and !TARGET_ARCH64 with TARGET_ARCH32.
36912         (atomic_storedi_1): Likewise.
36914 2017-02-04  Jakub Jelinek  <jakub@redhat.com>
36916         PR tree-optimization/79338
36917         * tree-parloops.c (gather_scalar_reductions): Don't call
36918         vect_analyze_loop_form for loop->inner before destroying loop's
36919         loop_vinfo.
36921 2017-02-03  Martin Sebor  <msebor@redhat.com>
36923         PR tree-optimization/79327
36924         * gimple-ssa-sprintf.c (tree_digits): Avoid adding the base prefix
36925         when precision has resulted in leading zeros.
36926         (format_integer): Adjust the likely counter to assume an unknown
36927         argument that may be zero is non-zero.
36929 2017-02-03  Jason Merrill  <jason@redhat.com>
36931         PR c++/78689
36932         * tree-inline.c (copy_tree_body_r) [COND_EXPR]: Revert change to
36933         avoid copying non-taken branch.
36935 2017-02-03  Jakub Jelinek  <jakub@redhat.com>
36937         PR tree-optimization/79340
36938         * tree-vect-loop.c (vectorizable_reduction): Release
36939         vec_defs elements after safe_splicing them into other vectors.
36940         Formatting fixes.
36942         PR tree-optimization/79327
36943         * gimple-ssa-sprintf.c (adjust_range_for_overflow): If returning
36944         true, always set *argmin and *argmax to TYPE_{MIN,MAX}_VALUE of
36945         dirtype.
36946         (format_integer): Use wide_int_to_tree instead of build_int_cst
36947         + to_?hwi.  If argmin is NULL, just set argmin and argmax to
36948         TYPE_{MIN,MAX}_VALUE of argtype.  Simplify and fix computation
36949         of shortest and longest sequence.
36951 2017-02-03  Uros Bizjak  <ubizjak@gmail.com>
36953         * config/i386/i386.c (dimode_scalar_chain::convert_reg):
36954         Use pextrd for TARGET_SSE4_1 when creating scalar copy.
36956 2017-02-03  Walter Lee  <walt@tilera.com>
36958         PR target/78862
36959         * config/tilegx/tilegx.md (tilegx_expand_prologue): Add blockage
36960         after initial stackframe link reg save.
36961         * config/tilepro/tilepro.md (tilepro_expand_prologue): Likewise.
36963 2017-02-03  Jakub Jelinek  <jakub@redhat.com>
36965         PR target/79354
36966         * config/rs6000/rs6000.md (movsi_from_sf): Use wb constraint instead of
36967         wu for stxssp alternative.
36969 2017-02-03  Martin Sebor  <msebor@redhat.com>
36971         PR tree-optimization/79352
36972         * gimple-fold.c (get_range_strlen): Add argument.
36973         (get_range_strlen): Change return type to bool.
36974         (get_maxval_strlen): Pass in a dummy argument.
36975         * gimple-fold.h (get_range_strlen): Change return type to bool.
36976         * gimple-ssa-sprintf.c (get_string_length): Set unlikely counter.
36977         * tree.h (array_at_struct_end_p): Add argument.
36978         * tree.c (array_at_struct_end_p): Handle it.
36980 2017-02-03  Martin Liska  <mliska@suse.cz>
36982         PR lto/66295
36983         * multiple_target.c (create_dispatcher_calls): Redirect edge
36984         from a caller of a dispatcher.
36985         (expand_target_clones): Make the clones local.
36986         (ipa_target_clone): Do both target clones and resolvers.
36987         (ipa_dispatcher_calls): Remove the pass.
36988         (pass_dispatcher_calls::gate): Likewise.
36989         (make_pass_dispatcher_calls): Likewise.
36990         * passes.def (pass_target_clone): Put as very first IPA early
36991         pass.
36993 2017-02-03  Martin Liska  <mliska@suse.cz>
36995         * symtab.c (symtab_node::binds_to_current_def_p): Bail out
36996         in case of a function with ifunc attribute.
36998 2017-02-03  Martin Liska  <mliska@suse.cz>
37000         * cgraph.c (cgraph_node::dump): Dump function version info.
37001         * symtab.c (symtab_node::dump_base): Add missing new line.
37003 2017-02-02  Jan Hubicka  <hubicka@ucw.cz>
37005         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): New function.
37006         (ifcombine_ifandif): Use it.
37008 2017-02-03  Martin Liska  <mliska@suse.cz>
37010         * doc/invoke.texi: Document default value for
37011         use-after-scope-direct-emission-threshold.
37013 2017-02-03  Martin Liska  <mliska@suse.cz>
37015         PR tree-optimization/79339
37016         * gimple-ssa-sprintf.c (format_floating_max): Call mpfr_clear.
37017         (format_floating): Likewise.
37019 2017-02-03  Martin Liska  <mliska@suse.cz>
37021         PR ipa/79337
37022         * ipa-prop.c (ipa_node_params_t::insert): Remove current
37023         implementation.
37024         (ipa_node_params_t::remove): Likewise.
37025         * ipa-prop.h (ipa_node_params::ipa_node_params): Make default
37026         initialization from removed ipa_node_params_t::insert.
37027         (ipa_node_params::~ipa_node_params): Move from removed
37028         ipa_node_params_t::release.
37029         * symbol-summary.h (symbol_summary::m_released): New member.
37030         Do not release a summary twice.  Do not allow to call finalizer
37031         for types of a summary that live in GGC memory.
37033 2017-02-02  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
37035         * config/aarch64/aarch64.c (thunderx2t99_tunings): Enable AES and
37036         cmp_branch fusion.
37038 2017-02-02  Martin Sebor  <msebor@redhat.com>
37040         PR middle-end/79275
37041         * gimple-ssa-sprintf.c (get_string_length): Set lower bound to zero.
37042         (format_string): Tighten up the range of output for non-constant
37043         strings and correct the expected range for wide non-constant strings.
37045 2017-02-02  Martin Sebor  <msebor@redhat.com>
37047         * doc/invoke.texi (-maccumulate-args): Fix bad grammar.
37049         PR middle-end/32003
37050         * doc/invoke.texi (-fdump-tree-): Remove pass-specific options from
37051         index.
37052         (-fdump-tree-@var): Add to index and document how to come up
37053         with pass-specific option and dump file names.
37054         (-fdump-passes): Clarify where to look for output.
37056 2017-02-02  Jan Hubicka  <hubicka@ucw.cz>
37058         PR middle-end/77445
37059         * tree-ssa-threadbackward.c (profitable_jump_thread_path): Dump
37060         statistics of the analyzed path; allow threading for speed when
37061         any of BBs along the path are optimized for speed.
37063 2017-02-02  Eric Botcazou  <ebotcazou@adacore.com>
37065         PR middle-end/78468
37066         * emit-rtl.c (init_emit): Add ??? comment for problematic alignment
37067         settings of the virtual registers.
37069         Revert again
37070         2016-08-23  Dominik Vogt  <vogt@linux.vnet.ibm.com>
37072         * explow.c (get_dynamic_stack_size): Take known alignment of stack
37073         pointer + STACK_DYNAMIC_OFFSET into account when calculating the size
37074         needed.
37076 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
37078         * config/s390/vx-builtins.md ("vec_ceil", "vec_floor")
37079         ("vec_trunc", "vec_roundc", "vec_round"): Remove expanders.
37081 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
37083         * config/s390/s390.md: Add missing comments with the expanded
37084         mnemonics.
37085         * config/s390/vector.md: Likewise.
37086         * config/s390/vx-builtins.md: Likewise.
37088 2017-02-02  Jakub Jelinek  <jakub@redhat.com>
37090         PR target/79197
37091         * config/rs6000/rs6000.md (*fixuns_trunc<mode>di2_fctiduz): Rename to ...
37092         (fixuns_trunc<mode>di2): ... this, remove previous expander.  Put all
37093         conditions on a single line.
37095 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
37097         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename
37098         __S390_VX__ to __VX__.
37100 2017-02-01  Andrew Pinski  <apinski@cavium.com>
37102         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost): Pass
37103         stmt_info to record_stmt_cost.
37104         (vect_get_known_peeling_cost): Pass stmt_info if known to
37105         record_stmt_cost.
37106         * config/aarch64/aarch64-protos.h (cpu_vector_cost): Split
37107         cpu_vector_cost field into
37108         scalar_int_stmt_cost and scalar_fp_stmt_cost.  Split vec_stmt_cost
37109         field into vec_int_stmt_cost and vec_fp_stmt_cost.
37110         * config/aarch64/aarch64.c (generic_vector_cost): Update for the
37111         splitting of scalar_stmt_cost and vec_stmt_cost.
37112         (thunderx_vector_cost): Likewise.
37113         (cortexa57_vector_cost): LIkewise.
37114         (exynosm1_vector_cost): Likewise.
37115         (xgene1_vector_cost): Likewise.
37116         (thunderx2t99_vector_cost): Improve after the splitting of the two
37117         fields.
37118         (aarch64_builtin_vectorization_cost): Update for the splitting of
37119         scalar_stmt_cost and vec_stmt_cost.
37121 2017-02-01  Torvald Riegel  <triegel@redhat.com>
37122             Richard Henderson  <rth@redhat.com>
37124         * builtins.c (fold_builtin_atomic_always_lock_free): Make "lock-free"
37125         conditional on existance of a fast atomic load.
37126         * optabs-query.c (can_atomic_load_p): New function.
37127         * optabs-query.h (can_atomic_load_p): Declare it.
37128         * optabs.c (expand_atomic_exchange): Always delegate to libatomic if
37129         no fast atomic load is available for the particular size of access.
37130         (expand_atomic_compare_and_swap): Likewise.
37131         (expand_atomic_load): Likewise.
37132         (expand_atomic_store): Likewise.
37133         (expand_atomic_fetch_op): Likewise.
37134         * testsuite/lib/target-supports.exp
37135         (check_effective_target_sync_int_128): Remove x86 because it provides
37136         no fast atomic load.
37137         (check_effective_target_sync_int_128_runtime): Likewise.
37139 2017-02-01  Richard Biener  <rguenther@suse.de>
37141         * graphite.c: Include tree-vectorizer.h for find_loop_location.
37142         (graphite_transform_loops): Provide opt-info for optimized nests.
37143         * tree-parloop.c (parallelize_loops): Provide opt-info for
37144         parallelized loops.
37146 2017-02-01  Richard Biener  <rguenther@suse.de>
37148         PR middle-end/79315
37149         * tree-cfg.c (move_stmt_op): Never set TREE_BLOCK when it
37150         was not set before.
37152 2017-02-01  Richard Biener  <rguenther@suse.de>
37154         PR tree-optimization/71824
37155         * graphite-scop-detection.c (scop_detection::build_scop_breadth):
37156         Verify the loops are valid in the merged SESE region.
37157         (scop_detection::can_represent_loop_1): Check analyzing the
37158         evolution of the number of iterations in the region succeeds.
37160 2017-01-31  Ian Lance Taylor  <iant@golang.org>
37162         * config/i386/i386.c (ix86_expand_split_stack_prologue): Add
37163         REG_ARGS_SIZE note to 32-bit push insns and call insn.
37165 2017-01-31  David Malcolm  <dmalcolm@redhat.com>
37167         PR preprocessor/79210
37168         * input.c (get_substring_ranges_for_loc): Replace line_width
37169         assertion with error-handling.
37171 2017-01-31  Richard Biener  <rguenther@suse.de>
37173         PR tree-optimization/77318
37174         * graphite-sese-to-poly.c (extract_affine): Fix assert.
37175         (create_pw_aff_from_tree): Take loop parameter.
37176         (add_condition_to_pbb): Pass loop of the condition to
37177         create_pw_aff_from_tree.
37179 2017-01-31  Jakub Jelinek  <jakub@redhat.com>
37181         * config/s390/s390.c (s390_asan_shadow_offset): New function.
37182         (TARGET_ASAN_SHADOW_OFFSET): Redefine.
37184 2017-01-31  Michael Meissner  <meissner@linux.vnet.ibm.com>
37186         PR target/78597
37187         PR target/79038
37188         * config/rs6000/rs6000-protos.h (convert_float128_to_int): Delete,
37189         no longer used.
37190         (convert_int_to_float128): Likewise.
37191         * config/rs6000/rs6000.c (convert_float128_to_int): Likewise.
37192         (convert_int_to_float128): Likewise.
37193         * config/rs6000/rs6000.md (UNSPEC_IEEE128_MOVE): Likewise.
37194         (UNSPEC_IEEE128_CONVERT): Likewise.
37195         (floatsi<mode>2, FLOAT128 iterator): Bypass calling
37196         rs6000_expand_float128_convert if we have IEEE 128-bit hardware.
37197         Use local variables for IBM extended format.
37198         (fix_trunc<mode>si2, FLOAT128 iterator): Likewise.
37199         (fix_trunc<mode>si2_fprs): Likewise.
37200         (fixuns_trunc<IEEE128:mode><SDI:mode>2): Likewise.
37201         (floatuns<IEEE128:mode>2, IEEE128 iterator): Likewise.
37202         (fix<uns>_<mode>si2_hw): Rework the IEEE 128-bt hardware support
37203         to know that we can now have integers of all sizes in vector
37204         registers.
37205         (fix<uns>_<mode>di2_hw): Likewise.
37206         (float<uns>_<mode>si2_hw): Likewise.
37207         (fix_<mode>si2_hw): Likewise.
37208         (fixuns_<mode>si2_hw): Likewise.
37209         (float<uns>_<mode>di2_hw): Likewise.
37210         (float_<mode>di2_hw): Likewise.
37211         (float_<mode>si2_hw): Likewise.
37212         (floatuns_<mode>di2_hw): Likewise.
37213         (floatuns_<mode>si2_hw): Likewise.
37214         (xscvqp<su>wz_<mode>): Delete, no longer used.
37215         (xscvqp<su>dz_<mode>): Likewise.
37216         (xscv<su>dqp_<mode>): Likewise.
37217         (ieee128_mfvsrd_64bit): Likewise.
37218         (ieee128_mfvsrd_32bit): Likewise.
37219         (ieee128_mfvsrwz): Likewise.
37220         (ieee128_mtvsrw): Likewise.
37221         (ieee128_mtvsrd_64bit): Likewise.
37222         (ieee128_mtvsrd_32bit): Likewise.
37224 2017-01-31  Martin Liska  <mliska@suse.cz>
37226         PR ipa/79285
37227         * ipa-prop.c (ipa_free_all_node_params): Call release method
37228         instead of ~sumbol_summary to not to trigger double times
37229         dtor of hash_map.
37231 2017-01-31  Aldy Hernandez  <aldyh@redhat.com>
37233         PR tree-optimization/71691
37234         * bitmap.h (class auto_bitmap): New.
37235         * tree-ssa-loop-unswitch.c (tree_may_unswitch_on): Call
37236         is_maybe_undefined instead of ssa_undefined_value_p.
37238 2017-01-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
37240         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename
37241         __S390_ARCH_LEVEL__ to __ARCH__.
37243 2017-01-31  Jakub Jelinek  <jakub@redhat.com>
37245         PR tree-optimization/79267
37246         * value-prof.c (gimple_ic): Only drop lhs for noreturn calls
37247         if should_remove_lhs_p is true.
37249 2017-01-30  Alexandre Oliva  <aoliva@redhat.com>
37251         PR debug/63238
37252         * dwarf2out.c (clone_as_declaration): Drop DW_AT_alignment.
37253         (add_alignment_attribute): New.
37254         (base_type_die): Add alignment attribute.
37255         (subrange_type_die): Likewise.
37256         (modified_type_die): Likewise.
37257         (gen_array_type_die): Likewise.
37258         (gen_descr_array_type_die: Likewise.
37259         (gen_enumeration_type_die): Likewise.
37260         (gen_subprogram_die): Likewise.
37261         (gen_variable_die): Likewise.
37262         (gen_field_die): Likewise.
37263         (gen_ptr_to_mbr_type_die): Likewise.
37264         (gen_struct_or_union_type_die): Likewise.
37265         (gen_subroutine_type_die): Likewise.
37266         (gen_typedef_die): Likewise.
37267         (base_type_cmp): Compare alignment attribute.
37269 2017-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
37271         PR target/79170
37272         * config/rs6000/altivec.md (*setb_internal): Rename to setb_signed.
37273         (setb_unsigned) New pattern for setb with CCUNS.
37274         * config/rs6000/rs6000.c (expand_block_compare): Use a different
37275         subfc./subfe sequence to avoid overflow problems.  Generate a
37276         shorter sequence with cmpld/setb for power9.
37277         * config/rs6000/rs6000.md (subf<mode>3_carry_dot2): Add a new pattern
37278         for generating subfc. instruction.
37279         (cmpstrsi): Add TARGET_POPCNTD predicate as the generate sequence
37280         now uses this instruction.
37282 2017-01-30  Ian Lance Taylor  <iant@google.com>
37284         PR debug/79289
37285         * dwarf2out.c (gen_type_die_with_usage): When picking a variant
37286         for FUNCTION_TYPE/METHOD_TYPE, use the first matching one.
37288 2017-01-30  Martin Sebor  <msebor@redhat.com>
37290         * gimple-ssa-sprintf.c (fmtresult::adjust_for_width_or_precision):
37291         Move constant to the right of a relational operator.
37292         (get_mpfr_format_length, format_character, format_string): Ditto.
37293         (should_warn_p, maybe_warn): Same.
37295         * doc/invoke.texi (-Wformat-truncation=1): Fix typo.
37297 2017-01-30  Maxim Ostapenko  <m.ostapenko@samsung.com>
37299         PR lto/79061
37300         * asan.c (get_translation_unit_decl): Remove function.
37301         (asan_add_global): Force has_dynamic_init to zero in LTO mode.
37303 2017-01-30  Martin Liska  <mliska@suse.cz>
37305         PR gcov-profile/79259
37306         * opts.c (common_handle_option): Enable flag_ipa_bit_cp w/
37307         -fprofile-generate.
37309 2017-01-30  Martin Liska  <mliska@suse.cz>
37311         PR bootstrap/78985
37312         * config/aarch64/cortex-a57-fma-steering.c (func_fma_steering::analyze):
37313         Initialize variables with NULL value.
37315 2017-01-30  Richard Earnshaw  <rearnsh@arm.com>
37317         PR target/79260
37318         * config.gcc (arm*-*-*): Add arm/arm-flags.h and arm/arm-isa.h to
37319         tm_p_file.
37320         * arm/arm-protos.h: Don't directly include arm-flags.h and arm-isa.h.
37322 2017-01-30  Richard Biener  <rguenther@suse.de>
37324         PR tree-optimization/79276
37325         * tree-vrp.c (process_assert_insertions): Properly adjust common
37326         when removing a duplicate.
37328 2017-01-30  Richard Biener  <rguenther@suse.de>
37330         PR tree-optimization/79256
37331         * targhooks.c (default_builtin_vector_alignment_reachable): Honor
37332         BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus
37333         alignment on TYPE.
37334         * tree.c (build_aligned_type): Set TYPE_USER_ALIGN.
37336 2017-01-30  Dominik Vogt  <vogt@linux.vnet.ibm.com>
37338         PR target/79240
37339         * config/s390/s390.md ("*r<noxa>sbg_<mode>_srl_bitmask")
37340         ("*r<noxa>sbg_<mode>_sll_bitmask")
37341         ("*extzv_<mode>_srl<clobbercc_or_nocc>")
37342         ("*extzv_<mode>_sll<clobbercc_or_nocc>"):
37343         Use contiguous_bitmask_nowrap_operand.
37345 2017-01-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
37347         PR target/79268
37348         * config/rs6000/altivec.h (vec_xl): Revise #define.
37349         (vec_xst): Likewise.
37351 2017-01-27  Uros Bizjak  <ubizjak@gmail.com>
37353         * config/i386/i386.c (print_reg): Use REGNO instead of true_regnum.
37355 2017-01-27  Bernd Schmidt  <bschmidt@redhat.com>
37357         PR rtl-optimization/79194
37358         * cprop.c (one_cprop_pass): Move deletion of code after unconditional
37359         traps before call to bypass_conditional_jumps.
37361 2017-01-27  Vladimir Makarov  <vmakarov@redhat.com>
37363         PR tree-optimization/71374
37364         * lra-constraints.c (check_conflict_input_operands): New.
37365         (match_reload): Use it.
37367 2017-01-27  Vladimir Makarov  <vmakarov@redhat.com>
37369         PR target/79131
37370         * lra-assigns.c (find_hard_regno_for_1): Take endianess for into
37371         account to calculate conflict_set.
37373 2017-01-27  Bin Cheng  <bin.cheng@arm.com>
37375         PR rtl-optimization/78559
37376         * combine.c (try_combine): Discard REG_EQUAL and REG_EQUIV for
37377         other_insn in combine.
37379 2017-01-27  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
37381         * builtin-types.def: Use unsigned_char_type_node for BT_UINT8.  Use
37382         uint16_type_node for BT_UINT16.
37384 2017-01-27  David Malcolm  <dmalcolm@redhat.com>
37386         * doc/sourcebuild.texi (Testsuites): Add "GIMPLE Tests" and
37387         "RTL Tests" to menu.
37388         (GIMPLE Tests): New node.
37389         (RTL Tests): New node.
37391 2017-01-27  Richard Biener  <rguenther@suse.de>
37393         PR tree-optimization/79245
37394         * tree-loop-distribution.c (distribute_loop): Apply cost
37395         modeling also to detected patterns.
37397 2017-01-27  Richard Biener  <rguenther@suse.de>
37399         PR tree-optimization/71433
37400         * tree-vrp.c (register_new_assert_for): Revert earlier changes.
37401         (compare_assert_loc): New function.
37402         (process_assert_insertions): Sort and optimize assert locations
37403         to remove duplicates and push down identical assertions on
37404         edges to their destination block.
37406 2017-01-27  Richard Biener  <rguenther@suse.de>
37408         PR tree-optimization/79244
37409         * tree-vrp.c (remove_range_assertions): Forcefully propagate
37410         out SSA names even if abnormal.
37412 2017-01-27  Jakub Jelinek  <jakub@redhat.com>
37414         * realmpfr.h: Poison MPFR_RND{N,Z,U,D}.
37415         * gimple-ssa-sprintf.c (format_floating_max): Use GMP_RNDN
37416         instead of MPFR_RNDN.
37418 2017-01-27  Richard Earnshaw  <rearnsha@arm.com>
37420         PR target/79239
37421         * arm.c (arm_option_override): Don't call build_target_option_node
37422         until after doing all option overrides.
37423         (arm_valid_target_attribute_tree): Likewise.
37425 2017-01-27  Martin Liska  <mliska@suse.cz>
37427         * doc/invoke.texi (-fprofile-arcs): Document profiling support
37428         for {cd}tors and C++ {cd}tors.
37430 2017-01-27  Dominik Vogt  <vogt@linux.vnet.ibm.com>
37432         * config/s390/s390.md ("*setmem_long_and")
37433         ("*setmem_long_and_31z"): Use zero_extend instead of and.
37435 2017-01-26  Martin Sebor  <msebor@redhat.com>
37437         * gimple-ssa-sprintf.c (format_floating): Simplify the computation
37438         of precision.
37440 2017-01-26  Martin Sebor  <msebor@redhat.com>
37442         * gimple-ssa-sprintf.c (format_floating): Test HAVE_XFmode and
37443         HAVE_DFmode before using XFmode or DFmode.
37444         (parse_directive): Avoid using the z length modifier to avoid
37445         the ISO C++98 does not support the â€˜z’ gnu_printf length modifier.
37447         PR middle-end/78703
37448         * gimple-ssa-sprintf.c (adjust_for_width_or_precision): Change
37449         to accept adjustment as an array.
37450         (get_int_range): New function.
37451         (struct directive): Make width and prec arrays.
37452         (directive::set_width, directive::set_precision): Call get_int_range.
37453         (format_integer, format_floating): Handle width and precision ranges.
37454         (format_string, parse_directive): Same.
37456 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
37458         PR debug/79129
37459         * dwarf2out.c (generate_skeleton_bottom_up): For children with
37460         comdat_type_p set, just clone them, but keep the children in the
37461         original DIE.
37463         PR debug/78835
37464         * dwarf2out.c (prune_unused_types): Mark all functions with DIEs
37465         which have direct callers with -fvar-tracking-assignments enabled
37466         in the current TU.
37467         (resolve_addr): Avoid adding skeleton DIEs for DW_AT_call_origin
37468         inside of type units.
37470 2017-01-26  Martin Sebor  <msebor@redhat.com>
37472         PR middle-end/78703
37473         * gimple-ssa-sprintf.c (struct result_range): Add likely and
37474         unlikely counters.
37475         (struct format_result): Replace number_chars, number_chars_min,
37476         and number_chars_max with a single member of struct result_range.
37477         Remove bounded.
37478         (format_result::operator+=): Adjust.
37479         (struct fmtresult): Remove bounded.  Handle likely and unlikely
37480         counters.
37481         (fmtresult::adjust_for_width_or_precision): New function.
37482         (fmtresult:type_max_digits): New function.
37483         (bytes_remaining): Handle likely and unlikely counters.
37484         (min_bytes_remaining): Remove.
37485         (format_percent): Simplify.
37486         (format_integer, format_floating): Set likely and unlikely counters.
37487         (get_string_length, format_character, format_string): Same.
37488         (format_plain, should_warn_p): New function.
37489         (maybe_warn): Call should_warn_p.  Update diagnostic messages
37490         and handle those for all directives, including plain strings.
37491         (format_directive): Handle likely and unlikely counters.
37492         Remove unnecessary quoting from diagnostics.  Add an informational
37493         note.
37494         (add_bytes): Remove.
37495         (pass_sprintf_length::compute_format_length): Simplify.
37496         (try_substitute_return_value): Handle likely and unlikely counters.
37498 2017-01-26  Carl Love  <cel@us.ibm.com>
37500         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Remove
37501         bogus entries for the P8V_BUILTIN_VEC_VGBBD built-ins
37503 2017-01-26  Vladimir Makarov  <vmakarov@redhat.com>
37505         PR target/79131
37506         * lra-assigns.c (setup_live_pseudos_and_spill_after_risky): Take
37507         endianess for subregs into account.
37508         * lra-constraints.c (lra_constraints): Do risky transformations
37509         always on the first iteration.
37510         * lra-lives.c (check_pseudos_live_through_calls): Add arg
37511         last_call_used_reg_set.
37512         (process_bb_lives): Define and use last_call_used_reg_set.
37513         * lra.c (lra): Always continue after lra_constraints on the first
37514         iteration.
37516 2017-01-26  Kirill Yukhin  <kirill.yukhin@gmail.com>
37518         * gcc.target/i386/avx512bw-kshiftlq-2.c: Use unsigned long long
37519         constant.
37520         * gcc.target/i386/avx512bw-kshiftrq-2.c: Ditto.
37522 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
37524         * config/i386/avx512fintrin.h (_ktest_mask16_u8,
37525         _ktestz_mask16_u8, _ktestc_mask16_u8, _kadd_mask16): Move to ...
37526         * config/i386/avx512dqintrin.h (_ktest_mask16_u8,
37527         _ktestz_mask16_u8, _ktestc_mask16_u8, _kadd_mask16): ... here.
37528         * config/i386/i386-builtin.def (__builtin_ia32_ktestchi,
37529         __builtin_ia32_ktestzhi, __builtin_ia32_kaddhi): Use
37530         OPTION_MASK_ISA_AVX512DQ instead of OPTION_MASK_ISA_AVX512F.
37531         * config/i386/sse.md (SWI1248_AVX512BWDQ2): New mode iterator.
37532         (kadd<mode>, ktest<mode>): Use it instead of SWI1248_AVX512BWDQ.
37534 2017-01-26  Marek Polacek  <polacek@redhat.com>
37536         PR c/79199
37537         * fold-const.c (operand_equal_p) [COND_EXPR]: Use OP_SAME_WITH_NULL
37538         for the third operand.
37540 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
37542         PR middle-end/79236
37543         * omp-low.c (struct omp_context): Add simt_stmt field.
37544         (scan_omp_for): Return omp_context *.
37545         (scan_omp_simd): Set simt_stmt on the non-_simt_ SIMD
37546         context to the _simt_ SIMD stmt.
37547         (lower_omp_for): For combined SIMD with sibling _simt_
37548         SIMD, make sure to use the same decls in _looptemp_
37549         clauses as in the sibling.
37551 2017-01-26  David Sherwood  <david.sherwood@arm.com>
37553         PR middle-end/79212
37554         * gimplify.c (omp_notice_variable): Add GOVD_SEEN flag to variables in
37555         all contexts.
37557 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
37559         PR target/70465
37560         * reg-stack.c (emit_swap_insn): Instead of fld a; fld b; fxchg %st(1);
37561         emit fld b; fld a; if possible.
37563         * brig-builtins.def: Update copyright years.
37564         * config/arm/arm_acle_builtins.def: Update copyright years.
37566 2017-01-25  Michael Meissner  <meissner@linux.vnet.ibm.com>
37568         PR target/79179
37569         * config/rs6000/vsx.md (vsx_extract_<mode>_store): Use wY
37570         constraint instead of o for the stxsd instruction.
37572 2017-01-25  Carl Love  <cel@us.ibm.com>
37574         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Fix order
37575         of entries for ALTIVEC_BUILTIN_VEC_PACKS and P8V_BUILTIN_VEC_VGBBD.
37577 2017-01-25  Jonathan Wakely  <jwakely@redhat.com>
37579         * doc/invoke.texi (C++ Dialect Options): Fix typo.
37581 2017-01-25  Richard Biener  <rguenther@suse.de>
37583         PR tree-optimization/69264
37584         * target.def (vector_alignment_reachable): Improve documentation.
37585         * doc/tm.texi: Regenerate.
37586         * targhooks.c (default_builtin_vector_alignment_reachable): Simplify
37587         and add a comment.
37588         * tree-vect-data-refs.c (vect_supportable_dr_alignment): Revert
37589         earlier changes with respect to TYPE_USER_ALIGN.
37590         (vector_alignment_reachable_p): Likewise.  Improve dumping.
37592 2016-01-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
37594         PR target/79145
37595         * config/arm/arm.md (xordi3): Force constant operand into a register
37596         for TARGET_IWMMXT.
37598 2016-01-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
37600         * doc/invoke.texi (-fstore-merging): Correct default optimization
37601         levels at which it is enabled.
37602         (-O): Move -fstore-merging from list to...
37603         (-O2): ... Here.
37605 2017-01-25  Richard Biener  <rguenther@suse.de>
37607         PR debug/78363
37608         * omp-expand.c: Include debug.h.
37609         (expand_omp_taskreg): Make sure to generate early debug before
37610         outlining anything from a function.
37611         (expand_omp_target): Likewise.
37612         (grid_expand_target_grid_body): Likewise.
37614 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
37616         PR lto/79061
37617         * asan.c (get_translation_unit_decl): New function.
37618         (asan_add_global): Extract modules file name from globals
37619         TRANSLATION_UNIT_DECL name.
37621 2017-01-24  Eric Botcazou  <ebotcazou@adacore.com>
37623         PR target/77439
37624         * config/arm/arm.c (arm_function_ok_for_sibcall): Add back restriction
37625         for long calls with APCS frame and VFP.
37627 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
37629         * cfg.c (original_copy_tables_initialized_p): New function.
37630         * cfg.h (original_copy_tables_initialized_p): New decl.
37631         * cfgrtl.c (relink_block_chain): Guard the call to
37632         free_original_copy_tables with a call to
37633         original_copy_tables_initialized_p.
37634         * cgraph.h (symtab_node::native_rtl_p): New decl.
37635         * cgraphunit.c (symtab_node::native_rtl_p): New function.
37636         (symtab_node::needed_p): Don't assert for early assembly output
37637         for __RTL functions.
37638         (cgraph_node::finalize_function): Set "force_output" for __RTL
37639         functions.
37640         (cgraph_node::analyze): Bail out early for __RTL functions.
37641         (analyze_functions): Update assertion to support __RTL functions.
37642         (cgraph_node::expand): Bail out early for __RTL functions.
37643         * final.c (rest_of_clean_state): Don't call delete_tree_ssa for
37644         __RTL functions.
37645         * function.h (struct function): Update comment for field
37646         "pass_startwith".
37647         * gimple-expr.c: Include "tree-pass.h".
37648         (gimple_has_body_p): Return false for __RTL functions.
37649         * Makefile.in (OBJS): Add run-rtl-passes.o.
37650         * pass_manager.h (gcc::pass_manager::get_rest_of_compilation): New
37651         accessor.
37652         (gcc::pass_manager::get_clean_slate): New accessor.
37653         * passes.c: Include "insn-addr.h".
37654         (should_skip_pass_p): Add logging.  Update logic for running
37655         "expand" to be compatible with both __GIMPLE and __RTL.  Guard
37656         property-provider override so it is only done for gimple passes.
37657         Don't skip dfinit.
37658         (skip_pass): New function.
37659         (execute_one_pass): Call skip_pass when skipping passes.
37660         * read-md.c (md_reader::read_char): Support filtering
37661         the input to a subset of line numbers.
37662         (md_reader::md_reader): Initialize fields
37663         m_first_line and m_last_line.
37664         (md_reader::read_file_fragment): New function.
37665         * read-md.h (md_reader::read_file_fragment): New decl.
37666         (md_reader::m_first_line): New field.
37667         (md_reader::m_last_line): New field.
37668         * read-rtl-function.c (function_reader::create_function): Only
37669         create cfun if it doesn't already exist.  Set PROP_rtl on cfun's
37670         curr_properties.  Set DECL_INITIAL to a dummy block.
37671         (read_rtl_function_body_from_file_range): New function.
37672         * read-rtl-function.h (read_rtl_function_body_from_file_range):
37673         New decl.
37674         * run-rtl-passes.c: New file.
37675         * run-rtl-passes.h: New file.
37677 2017-01-24  Jeff Law  <law@redhat.com>
37679         * config/microblaze/microblaze.h (ASM_FORMAT_PRIVATE_NAME): Increase
37680         buffer size.
37682 2017-01-24  Bin Cheng  <bin.cheng@arm.com>
37684         PR tree-optimization/79159
37685         * tree-ssa-loop-niter.c (get_cst_init_from_scev): New function.
37686         (record_nonwrapping_iv): Improve boundary using above function if no
37687         value range information.
37689 2017-01-24  Pekka Jääskeläinen  <pekka@parmance.com>
37690             Martin Jambor  <mjambor@suse.cz>
37692         * brig-builtins.def: New file.
37693         * builtins.def (DEF_HSAIL_BUILTIN): New macro.
37694         (DEF_HSAIL_ATOMIC_BUILTIN): Likewise.
37695         (DEF_HSAIL_SAT_BUILTIN): Likewise.
37696         (DEF_HSAIL_INTR_BUILTIN): Likewise.
37697         (DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN): Likewise.
37698         * builtin-types.def (BT_INT8): New.
37699         (BT_INT16): Likewise.
37700         (BT_UINT8): Likewise.
37701         (BT_UINT16): Likewise.
37702         (BT_FN_ULONG): Likewise.
37703         (BT_FN_UINT_INT): Likewise.
37704         (BT_FN_UINT_ULONG): Likewise.
37705         (BT_FN_UINT_LONG): Likewise.
37706         (BT_FN_UINT_PTR): Likewise.
37707         (BT_FN_ULONG_PTR): Likewise.
37708         (BT_FN_INT8_FLOAT): Likewise.
37709         (BT_FN_INT16_FLOAT): Likewise.
37710         (BT_FN_UINT32_FLOAT): Likewise.
37711         (BT_FN_UINT16_FLOAT): Likewise.
37712         (BT_FN_UINT8_FLOAT): Likewise.
37713         (BT_FN_UINT64_FLOAT): Likewise.
37714         (BT_FN_UINT16_UINT32): Likewise.
37715         (BT_FN_UINT32_UINT16): Likewise.
37716         (BT_FN_UINT16_UINT16_UINT16): Likewise.
37717         (BT_FN_INT_PTR_INT): Likewise.
37718         (BT_FN_UINT_PTR_UINT): Likewise.
37719         (BT_FN_LONG_PTR_LONG): Likewise.
37720         (BT_FN_ULONG_PTR_ULONG): Likewise.
37721         (BT_FN_VOID_UINT64_UINT64): Likewise.
37722         (BT_FN_UINT8_UINT8_UINT8): Likewise.
37723         (BT_FN_INT8_INT8_INT8): Likewise.
37724         (BT_FN_INT16_INT16_INT16): Likewise.
37725         (BT_FN_INT_INT_INT): Likewise.
37726         (BT_FN_UINT_FLOAT_UINT): Likewise.
37727         (BT_FN_FLOAT_UINT_UINT): Likewise.
37728         (BT_FN_ULONG_UINT_UINT): Likewise.
37729         (BT_FN_ULONG_UINT_PTR): Likewise.
37730         (BT_FN_ULONG_ULONG_ULONG): Likewise.
37731         (BT_FN_UINT_UINT_UINT): Likewise.
37732         (BT_FN_VOID_UINT_PTR): Likewise.
37733         (BT_FN_UINT_UINT_PTR: Likewise.
37734         (BT_FN_UINT32_UINT64_PTR): Likewise.
37735         (BT_FN_INT_INT_UINT_UINT): Likewise.
37736         (BT_FN_UINT_UINT_UINT_UINT): Likewise.
37737         (BT_FN_UINT_UINT_UINT_PTR): Likewise.
37738         (BT_FN_UINT_ULONG_ULONG_UINT): Likewise.
37739         (BT_FN_ULONG_ULONG_ULONG_ULONG): Likewise.
37740         (BT_FN_LONG_LONG_UINT_UINT): Likewise.
37741         (BT_FN_ULONG_ULONG_UINT_UINT): Likewise.
37742         (BT_FN_VOID_UINT32_UINT64_PTR): Likewise.
37743         (BT_FN_VOID_UINT32_UINT32_PTR): Likewise.
37744         (BT_FN_UINT_UINT_UINT_UINT_UINT): Likewise.
37745         (BT_FN_UINT_FLOAT_FLOAT_FLOAT_FLOAT): Likewise.
37746         (BT_FN_ULONG_ULONG_ULONG_UINT_UINT): Likewise.
37747         * doc/frontends.texi: List BRIG FE.
37748         * doc/install.texi (Testing): Add BRIG tesring requirements.
37749         * doc/invoke.texi (Overall Options): Mention BRIG.
37750         * doc/standards.texi (Standards): Doucment BRIG HSA version.
37752 2017-01-24  Richard Biener  <rguenther@suse.de>
37754         PR translation/79208
37755         * ipa-devirt.c (odr_types_equivalent_p): Fix typo in diagnostic.
37757 2017-01-24  Martin Jambor  <mjambor@suse.cz>
37759         PR bootstrap/79198
37760         * ipa-prop.c (ipa_free_all_node_params): Call summary destructor.
37761         * ipa-prop.c (ipa_node_params_t::insert): Initialize fields known_csts
37762         and known_contexts.
37764 2017-01-24  Aldy Hernandez  <aldyh@redhat.com>
37766         PR middle-end/79123
37767         * gimple-ssa-warn-alloca.c (alloca_call_type): Make sure
37768         casts from signed to unsigned really don't have a range.
37770 2017-01-24  Markus Trippelsdorf  <markus@trippelsdorf.de>
37772         * gimple-ssa-sprintf.c (format_floating): Change MPFR_RNDx to
37773         GMP_RNDx for compatiblity.
37775 2017-01-24  Martin Liska  <mliska@suse.cz>
37777         PR bootstrap/79132
37778         * tree-ssa-reassoc.c (rewrite_expr_tree_parallel): Insert assert
37779         that would prevent us to call alloca with -1 as argument.
37781 2017-01-24  Jakub Jelinek  <jakub@redhat.com>
37783         * dwarf2out.c (output_compilation_unit_header, output_file_names):
37784         Avoid -Wformat-security warning.
37786 2017-01-23  Andrew Pinski  <apinski@cavium.com>
37788         * config/aarch64/aarch64.c (thunderx2t99_addrcost_table): Improve
37789         cost table.
37791 2017-01-23  Martin Sebor  <msebor@redhat.com>
37793         PR middle-end/78703
37794         * gimple-ssa-sprintf.c (warn_level): New global.
37795         (format_integer): Use it here and throughout the rest of the file.
37796         Use the same switch to compute sign as base.
37797         (maybe_warn): New function.
37798         (format_directive): Factor out warnings into maybe_warn.
37799         Add debugging output.  Use warn_level.
37800         (add_bytes): Use warn_level.
37801         (pass_sprintf_length::compute_format_length): Add debugging output.
37802         (try_substitute_return_value): Same.
37803         (pass_sprintf_length::handle_gimple_call): Set and use warn_level.
37805         PR middle-end/78703
37806         * gimple-ssa-sprintf.c (struct format_result): Remove constant member.
37807         (struct fmtresult, format_integer, format_floating): Adjust.
37808         (fmtresult::fmtresult): Set max correctly in two argument ctor.
37809         (get_string_length, format_string,format_directive): Same.
37810         (pass_sprintf_length::compute_format_length): Same.
37811         (try_substitute_return_value): Simplify slightly.
37813         PR middle-end/78703
37814         * gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust formatting.
37815         (fmtresult::operator+=): Outlined.
37816         (struct fmtresult): Add ctors.
37817         (struct conversion_spec): Rename...
37818         (struct directive): ...to this.  Add and remove data members.
37819         (directive::set_width, directive::set_precision): New functions.
37820         (format_percent): Use fmtresult ctor.
37821         (get_width_and_precision): Remove.
37822         (format_integer): Make naming changes.  Avoid computing width and
37823         precision.
37824         (format_floating): Same.  Adjust indentation.
37825         (format_character, format_none): New functions.
37826         (format_string): Moved character handling to format_character.
37827         (format_directive): Remove arguments, change return type.
37828         (parse_directive): New function.
37829         (pass_sprintf_length::compute_format_length): Move directive
37830         parsing to parse_directive.
37832 2017-01-23  Jakub Jelinek  <jakub@redhat.com>
37834         * tree.h (assign_assembler_name_if_neeeded): Rename to ...
37835         (assign_assembler_name_if_needed): ... this.
37836         * tree.c (assign_assembler_name_if_neeeded): Rename to ...
37837         (assign_assembler_name_if_needed): ... this.
37838         (free_lang_data_in_cgraph): Adjust callers.
37839         * cgraphunit.c (cgraph_node::analyze): Likewise.
37840         * omp-expand.c (expand_omp_taskreg, expand_omp_target):
37841         Likewise.
37843 2017-01-23  Richard Biener  <rguenther@suse.de>
37845         PR tree-optimization/79088
37846         PR tree-optimization/79188
37847         * tree-ssa-threadupdate.c (mark_threaded_blocks): Move code
37848         resetting loop bounds after last path deletion.  Reset loop
37849         bounds of the target loop, make code match the comments.
37850         * tree-ssa-threadbackwards.c (pass_early_thread_jumps::execute):
37851         Make sure loops need no fixups.
37853 2017-01-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>
37855         * config/rs6000/rs6000-builtin.def (VSIEDPF): Add scalar insert
37856         exponent support with double type for first argument.
37857         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Changed
37858         type returned by __builtin_vec_extract_sig,
37859         __builtin_vec_extract_sig_sp, and __builtin_vec_extract_sig_dp
37860         functions from "vector int" to "vector unsigned int" or from
37861         "vector long long int" to "vector unsigned long long int".
37862         Changed type returned by __builtin_vec_extract_exp,
37863         __builtin_vec_extract_exp_sp, and __builtin_vec_extract_exp_dp
37864         functions from "vector int" to "vector unsigned int" or from
37865         "vector long long int" to "vector unsigned long long int".
37866         Changed return type of __builtin_vec_test_data_class,
37867         __builtin_vec_test_data_class_sp, and
37868         __builtin_vec_test_data_class_dp from "vector int" to
37869         "vector bool int" or from "vector long long int" to "vector bool
37870         long long int" and changed second argument type from "unsigned
37871         int" to "int".  Added new overloaded function forms "vector float
37872         __builtin_vec_insert_exp (vector float, vector unsigned int)" and
37873         "vector float __builtin_vec_insert_exp_sp (vector float, vector
37874         unsigned int)" and "vector double __builtin_vec_insert_exp (vector
37875         double, vector unsigned long long int)" and "vector double
37876         __builtin_vec_insert_exp_dp (vector double, vector unsigned long
37877         long int)".  Changed return type of
37878         __builtin_scalar_test_data_class and
37879         __builtin_scalar_test_data_class_sp and
37880         __builtin_scalar_test_data_class_dp from "unsigned int" to "bool
37881         int" and changed second argument from "unsigned int" to "int".
37882         Changed type returned by __builtin_scalar_test_neg,
37883         __builtin_scalar_test_neg_sp, and __builtin_scalar_test_neg_dp
37884         from "int" to "bool int".  Added new overloaded function form
37885         "double __builtin_scalar_insert_exp (double, unsigned long long int)".
37886         * config/rs6000/vsx.md (xsiexpdpf): New insn for scalar insert
37887         exponent double-precision with floating point first argument.
37888         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
37889         documentation of scalar_test_data_class, scalar_test_neg,
37890         scalar_extract_sig, scalar_extract_exp, scalar_insert_exp,
37891         vector_extract_exp, vec_extract_sig, vec_insert_exp, and
37892         vec_test_data_class built-in functions to reflect refinements in
37893         their type signatures.
37895 2017-01-23  Andreas Tobler  <andreast@gcc.gnu.org>
37897         * config/aarch64/aarch64.c (aarch64_elf_asm_constructor): Increase
37898         size of buf.
37899         (aarch64_elf_asm_destructor): Likewise.
37901 2017-01-23  Bernd Schmidt  <bschmidt@redhat.com>
37903         PR rtl-optimization/78634
37904         * config/i386/i386.c (ix86_max_noce_ifcvt_seq_cost): New function.
37905         (TARGET_MAX_NOCE_IFCVT_SEQ_COST): Define.
37906         * ifcvt.c (noce_try_cmove): Add missing cost check.
37908         PR rtl-optimization/71724
37909         * combine.c (if_then_else_cond): Look for situations where it is
37910         beneficial to undo the work of one of the recursive calls.
37912 2017-01-23  Bin Cheng  <bin.cheng@arm.com>
37914         PR tree-optimization/70754
37915         * tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE.
37916         (reassociate_to_the_same_stmt): New parameter INSERT_BEFORE.  Insert
37917         combined stmt before it if not NULL.
37918         (combine_chains): Process refs reversely and compute dominance point
37919         for root ref.
37921 2017-01-23  Martin Liska  <mliska@suse.cz>
37923         PR tree-optimization/79196
37924         * tree-ssa-strlen.c (fold_strstr_to_memcmp): Rename to ...
37925         (fold_strstr_to_strncmp): ... this.  Fold the pattern to strncmp
37926         instead of memcmp.
37927         (strlen_optimize_stmt): Call the renamed function.
37929 2017-01-23  Michael Matz  <matz@suse.de>
37931         PR tree-optimization/78384
37932         * tree-ssa-loop-split.c (patch_loop_exit): Use correct edge.
37934 2017-01-23  Richard Biener  <rguenther@suse.de>
37936         PR tree-optimization/79186
37937         * tree-vrp.c (register_new_assert_for): Make sure we've seen
37938         both incoming edges before moving an assert.
37940 2017-01-23  Martin Jambor  <mjambor@suse.cz>
37942         * ipa-prop.c (load_from_param_1): Removed.
37943         (load_from_unmodified_param): Bits from load_from_param_1 put back
37944         here.
37945         (load_from_param): Removed.
37946         (compute_complex_assign_jump_func): Removed stmt2 and just replaced it
37947         with stmt.  Reverted back to use of load_from_unmodified_param.
37949 2017-01-23  Martin Jambor  <mjambor@suse.cz>
37951         PR ipa/79108
37952         * ipa-prop.h (ipa_param_descriptor): Anotate with with GTY(()).
37953         (ipa_node_params): Annotate with GTY((for_user)).  Make descriptors
37954         field a pointer to garbage collected vector, mark lattices and
37955         ipcp_orig_node with GTY((skip)).
37956         (ipa_get_param_count): Adjust to descriptors being a pointer.
37957         (ipa_get_param): Likewise.
37958         (ipa_get_type): Likewise.
37959         (ipa_get_param_move_cost): Likewise.
37960         (ipa_set_param_used): Likewise.
37961         (ipa_get_controlled_uses): Likewise.
37962         (ipa_set_controlled_uses): Likewise.
37963         (ipa_is_param_used): Likewise.
37964         (ipa_node_params_t): Move into garbage collector.  New methods insert
37965         and remove.
37966         (ipa_node_params_sum): Annotate wth GTY(()).
37967         (ipa_check_create_node_params): Adjust to ipa_node_params_sum being
37968         garbage collected.
37969         (ipa_load_from_parm_agg): Adjust declaration.
37970         * ipa-icf.c (param_used_p): Adjust to descriptors being a pointer.
37971         * ipa-profile.c (ipa_profile): Likewise.
37972         * ipa-prop.c (ipa_get_param_decl_index_1): Likewise.
37973         (ipa_populate_param_decls): Make descriptors parameter garbage
37974         collected.
37975         (ipa_dump_param): Adjust to descriptors being a pointer.
37976         (ipa_alloc_node_params): Likewise.
37977         (ipa_initialize_node_params): Likewise.
37978         (load_from_param_1): Make descriptors parameter garbage collected.
37979         (load_from_unmodified_param): Likewise.
37980         (load_from_param): Likewise.
37981         (ipa_load_from_parm_agg): Likewise.
37982         (ipa_node_params::~ipa_node_params): Removed.
37983         (ipa_free_all_node_params): Remove call to delete operator.
37984         (ipa_node_params_t::insert): New.
37985         (ipa_node_params_t::remove): Likewise.
37986         (ipa_node_params_t::duplicate): Adjust to descriptors being a pointer,
37987         copy known_csts and known_contexts vectors.
37988         (ipa_read_node_info): Adjust to descriptors being a pointer.
37989         (ipcp_modif_dom_walker): Make m_descriptors field garbage
37990         collected.
37991         (ipcp_transform_function): Make descriptors variable garbage
37992         collected.
37994 2017-01-23  Andrew Senkevich  <andrew.senkevich@intel.com>
37996         * config/i386/avx512bwintrin.h: Add k-mask test, kortest intrinsics.
37997         * config/i386/avx512dqintrin.h: Ditto.
37998         * config/i386/avx512fintrin.h: Ditto.
37999         * config/i386/i386.c: Handle new builtins.
38000         * config/i386/i386-builtin.def: Add new builtins.
38001         * config/i386/sse.md (ktest<mode>, kortest<mode>): New.
38002         (UNSPEC_KORTEST, UNSPEC_KTEST): New.
38004 2017-01-23  Jakub Jelinek  <jakub@redhat.com>
38005             Martin Liska  <mliska@suse.cz>
38007         * asan.h: Define ASAN_USE_AFTER_SCOPE_ATTRIBUTE.
38008         * asan.c (asan_expand_poison_ifn): Support stores and use
38009         appropriate ASAN report function.
38010         * internal-fn.c (expand_ASAN_POISON_USE): New function.
38011         * internal-fn.def (ASAN_POISON_USE): Declare.
38012         * tree-into-ssa.c (maybe_add_asan_poison_write): New function.
38013         (maybe_register_def): Create ASAN_POISON_USE when sanitizing.
38014         * tree-ssa-dce.c (eliminate_unnecessary_stmts): Remove
38015         ASAN_POISON calls w/o LHS.
38016         * tree-ssa.c (execute_update_addresses_taken): Create clobber
38017         for ASAN_MARK (UNPOISON, &x, ...) in order to prevent usage of a LHS
38018         from ASAN_MARK (POISON, &x, ...) coming to a PHI node.
38019         * gimplify.c (asan_poison_variables): Add attribute
38020         use_after_scope_memory to variables that really needs to live
38021         in memory.
38022         * tree-ssa.c (is_asan_mark_p): Do not rewrite into SSA when
38023         having the attribute.
38025 2017-01-23  Martin Liska  <mliska@suse.cz>
38027         * asan.c (create_asan_shadow_var): New function.
38028         (asan_expand_poison_ifn): Likewise.
38029         * asan.h (asan_expand_poison_ifn): New declaration.
38030         * internal-fn.c (expand_ASAN_POISON): Likewise.
38031         * internal-fn.def (ASAN_POISON): New builtin.
38032         * sanopt.c (pass_sanopt::execute): Expand
38033         asan_expand_poison_ifn.
38034         * tree-inline.c (copy_decl_for_dup_finish): Make function
38035         external.
38036         * tree-inline.h (copy_decl_for_dup_finish): Likewise.
38037         * tree-ssa.c (is_asan_mark_p): New function.
38038         (execute_update_addresses_taken): Rewrite local variables
38039         (identified just by use-after-scope as addressable) into SSA.
38041 2017-01-22  Gerald Pfeifer  <gerald@pfeifer.com>
38043         * doc/install.texi (Specific): opensource.apple.com uses https
38044         now. Remove trailing slash.
38046 2017-01-22  Gerald Pfeifer  <gerald@pfeifer.com>
38048         * README.Portability: Remove note on an Irix compatibility issue.
38050 2017-01-22  Dimitry Andric <dim@FreeBSD.org>
38052         * gcov.c (INCLUDE_ALGORITHM): Define.
38053         (INCLUDE_VECTOR): Define.
38054         No longer include <vector> and <algorithm> directly.
38056 2017-01-21  Gerald Pfeifer  <gerald@pfeifer.com>
38058         * doc/extend.texi (Thread-Local): Change www.akkadia.org reference
38059         to https.
38060         * doc/invoke.texi (Code Gen Options): Ditto.
38062 2017-01-21  Jan Hubicka  <hubicka@ucw.cz>
38064         PR lto/78407
38065         * cfg.c (update_bb_profile_for_threading): Fix updating of probablity.
38067 2017-01-21  Bernd Schmidt  <bschmidt@redhat.com>
38069         rtl-optimization/79125
38070         * cprop.c (local_cprop_pass): Handle cases where we make an
38071         unconditional trap.
38073 2017-01-20  Segher Boessenkool  <segher@kernel.crashing.org>
38075         PR target/61729
38076         PR target/77850
38077         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
38078         read from, for big endian.
38080 2017-01-20  Jiong Wang  <jiong.wang@arm.com>
38082         * config/aarch64/aarch64-builtins.c (aarch64_init_builtins): Register
38083         register pauth builtins for LP64 only.
38085 2017-01-20  Marek Polacek  <polacek@redhat.com>
38087         PR c/79152
38088         * gimplify.c (should_warn_for_implicit_fallthrough): Handle consecutive
38089         non-case labels.
38091 2017-01-20  Alexander Monakov  <amonakov@ispras.ru>
38093         * omp-expand.c (expand_omp_simd): Clear PROP_gimple_lomp_dev regardless
38094         of safelen status.
38095         * omp-offload.c (pass_omp_device_lower::gate): Use PROP_gimple_lomp_dev.
38096         * passes.c (dump_properties): Handle PROP_gimple_lomp_dev.
38097         * tree-inline.c (expand_call_inline): Propagate PROP_gimple_lomp_dev.
38099 2017-01-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
38101         PR target/71270
38102         * config/arm/arm.c (neon_valid_immediate): Reject vector constants
38103         in big-endian mode when they are not a single duplicated value.
38105 2017-01-20  Richard Biener  <rguenther@suse.de>
38107         * BASE-VER: Bump to 7.0.1.
38109 2017-01-20  Alexander Monakov  <amonakov@ispras.ru>
38111         * omp-low.c (omplow_simd_context): New struct.  Use it...
38112         (lower_rec_simd_input_clauses): ...here and...
38113         (lower_rec_input_clauses): ...here to hold common data.  Adjust all
38114         references to idx, lane, max_vf, is_simt.
38116 2017-01-20  Graham Markall  <graham.markall@embecosm.com>
38118         * config/arc/arc.h (LINK_SPEC): Use arclinux_nps emulation when
38119         mcpu=nps400.
38121 2017-01-20  Martin Jambor  <mjambor@suse.cz>
38123         * hsa.h: Renaed to hsa-common.h.  Adjusted a comment.
38124         * hsa.c: Renaed to hsa-common.c.  Change include of gt-hsa.h to
38125         gt-hsa-common.h.
38126         * Makefile.in (OBJS): Rename hsa.o to hsa-common.o.
38127         (GTFILES): Rename hsa.c to hsa-common.c.
38128         * hsa-brig.c: Change include of hsa.h to hsa-common.h.
38129         * hsa-dump.c: Likewise.
38130         * hsa-gen.c: Likewise.
38131         * hsa-regalloc.c: Likewise.
38132         * ipa-hsa.c: Likewise.
38133         * omp-expand.c: Likewise.
38134         * omp-low.c: Likewise.
38135         * toplev.c: Likewise.
38137 2017-01-20  Marek Polacek  <polacek@redhat.com>
38139         PR c/64279
38140         * doc/invoke.texi: Document -Wduplicated-branches.
38141         * fold-const.c (operand_equal_p): Handle MODIFY_EXPR, INIT_EXPR,
38142         COMPOUND_EXPR, PREDECREMENT_EXPR, PREINCREMENT_EXPR,
38143         POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, CLEANUP_POINT_EXPR, EXPR_STMT,
38144         STATEMENT_LIST, and RETURN_EXPR.  For non-pure non-const functions
38145         return 0 only when not OEP_LEXICOGRAPHIC.
38146         (fold_build_cleanup_point_expr): Use the expression
38147         location when building CLEANUP_POINT_EXPR.
38148         * tree-core.h (enum operand_equal_flag): Add OEP_LEXICOGRAPHIC.
38149         * tree.c (add_expr): Handle error_mark_node.
38151 2017-01-20  Martin Liska  <mliska@suse.cz>
38153         PR lto/69188
38154         * tree-profile.c (init_ic_make_global_vars): Do not call
38155         finalize_decl.
38156         (gimple_init_gcov_profiler): Likewise.
38158 2017-01-20  Martin Liska  <mliska@suse.cz>
38160         PR ipa/71190
38161         * cgraph.h (maybe_create_reference): Remove argument and
38162         update comment.
38163         * cgraphclones.c (cgraph_node::create_virtual_clone): Remove one
38164         argument.
38165         * ipa-cp.c (create_specialized_node): Likewise.
38166         * symtab.c (symtab_node::maybe_create_reference): Handle
38167         VAR_DECLs and ADDR_EXPRs and select ipa_ref_use type.
38169 2017-01-20  Martin Liska  <mliska@suse.cz>
38171         * read-rtl-function.c (function_reader::create_function): Use
38172         build_decl instread of build_decl_stat.
38174 2017-01-20  Andrew Senkevich  <andrew.senkevich@intel.com>
38176         * config/i386/avx512bwintrin.h: Add k-mask registers shift intrinsics.
38177         * config/i386/avx512dqintrin.h: Ditto.
38178         * config/i386/avx512fintrin.h: Ditto.
38179         * config/i386/i386-builtin-types.def: Add new types.
38180         * config/i386/i386.c: Handle new types.
38181         * config/i386/i386-builtin.def (__builtin_ia32_kshiftliqi)
38182         (__builtin_ia32_kshiftlihi, __builtin_ia32_kshiftlisi)
38183         (__builtin_ia32_kshiftlidi, __builtin_ia32_kshiftriqi)
38184         (__builtin_ia32_kshiftrihi, __builtin_ia32_kshiftrisi)
38185         (__builtin_ia32_kshiftridi): New.
38186         * config/i386/sse.md (k<code><mode>): Rename *k<code><mode>.
38188 2017-01-19  Segher Boessenkool  <segher@kernel.crashing.org>
38190         PR target/78875
38191         PR target/79140
38192         * config/rs6000/rs6000.c (TARGET_STACK_PROTECT_GUARD): Unconditionally
38193         define to rs6000_init_stack_protect_guard.
38194         (rs6000_init_stack_protect_guard): New function.
38196 2017-01-19  Matthew Fortune  <matthew.fortune@imgtec.com>
38197             Yunqiang Su  <yunqiang.su@imgtec.com>
38199         * config.gcc (supported_defaults): Add madd4.
38200         (with_madd4): Add validation.
38201         (all_defaults): Add madd4.
38202         * config/mips/mips.opt (mmadd4): New option.
38203         * config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
38204         mmadd4.
38205         (TARGET_CPU_CPP_BUILTINS): Add builtin_define for
38206         __mips_no_madd4.
38207         (ISA_HAS_UNFUSED_MADD4): Gate with mips_madd4.
38208         (ISA_HAS_FUSED_MADD4): Likewise.
38209         * doc/invoke.texi (-mmadd4): Document the new option.
38210         * doc/install.texi (--with-madd4): Document the new option.
38212 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
38214         * config/aarch64/aarch64-builtins.c (enum aarch64_builtins): New
38215         entries for AARCH64_PAUTH_BUILTIN_XPACLRI,
38216         AARCH64_PAUTH_BUILTIN_PACIA1716, AARCH64_PAUTH_BUILTIN_AUTIA1716.
38217         (aarch64_init_pauth_hint_builtins): New.
38218         (aarch64_init_builtins): Call aarch64_init_pauth_hint_builtins.
38219         (aarch64_expand_builtin): Expand new builtins.
38221 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
38223         * reg-notes.def (CFA_TOGGLE_RA_MANGLE): New reg-note.
38224         * combine-stack-adj.c (no_unhandled_cfa): Handle
38225         REG_CFA_TOGGLE_RA_MANGLE.
38226         * dwarf2cfi.c (dwarf2out_frame_debug): Handle REG_CFA_TOGGLE_RA_MANGLE.
38227         * config/aarch64/aarch64.c (aarch64_expand_prologue): Generates DWARF
38228         info for return address signing.
38229         (aarch64_expand_epilogue): Likewise.
38231 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
38233         * config/aarch64/aarch64-opts.h (aarch64_function_type): New enum.
38234         * config/aarch64/aarch64-protos.h
38235         (aarch64_return_address_signing_enabled): New declaration.
38236         * config/aarch64/aarch64.c (aarch64_return_address_signing_enabled):
38237         New function.
38238         (aarch64_expand_prologue): Sign return address before it's pushed onto
38239         stack.
38240         (aarch64_expand_epilogue): Authenticate return address fetched from
38241         stack.
38242         (aarch64_override_options): Sanity check for ILP32 and ISA level.
38243         (aarch64_attributes): New function attributes for "sign-return-address".
38244         * config/aarch64/aarch64.md (UNSPEC_AUTI1716, UNSPEC_AUTISP,
38245         UNSPEC_PACI1716, UNSPEC_PACISP, UNSPEC_XPACLRI): New unspecs.
38246         ("*do_return"): Generate combined instructions according to key index.
38247         ("<pauth_mnem_prefix>sp", "<pauth_mnem_prefix1716", "xpaclri"): New.
38248         * config/aarch64/iterators.md (PAUTH_LR_SP, PAUTH_17_16): New integer
38249         iterators.
38250         (pauth_mnem_prefix, pauth_hint_num_a): New integer attributes.
38251         * config/aarch64/aarch64.opt (msign-return-address=): New.
38252         * doc/extend.texi (AArch64 Function Attributes): Documents
38253         "sign-return-address=".
38254         * doc/invoke.texi (AArch64 Options): Documents "-msign-return-address=".
38256 2017-01-19  Matthew Fortune  <matthew.fortune@imgtec.com>
38258         * doc/invoke.texi: Add missing -mlxc1-sxc1 options to
38259         overall option summary.
38261 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
38263         * config/aarch64/aarch64-arches.def: New entry for "armv8.3-a".
38264         * config/aarch64/aarch64.h (AARCH64_FL_V8_3, AARCH64_FL_FOR_ARCH8_3,
38265         AARCH64_ISA_V8_3, TARGET_ARMV8_3): New.
38266         * doc/invoke.texi (AArch64 Options): Document "armv8.3-a".
38268 2017-01-19  Michael Meissner  <meissner@linux.vnet.ibm.com>
38270         * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Enable
38271         -mpower9-minmax by default for -mcpu=power9.
38272         (ISA_3_MASKS_IEEE): Require -mvsx-small-integer to enable IEEE
38273         128-bit floating point.
38275 2017-01-20  Alan Modra  <amodra@gmail.com>
38277         * config/rs6000/rs6000.md (cmpstrnsi, cmpstrsi): Fail if
38278         optimizing for size.
38280 2017-01-20  Alan Modra  <amodra@gmail.com>
38282         PR target/79144
38283         * config/rs6000/rs6000.c (expand_strn_compare): Get the asm name
38284         for strcmp and strncmp from corresponding builtin decl.
38286 2017-01-19  Uros Bizjak  <ubizjak@gmail.com>
38288         * config.gcc (x86_64-*-rtems*): Use i386/rtemself.h
38289         instead of i386/rtems-64.h.
38290         * config/i386/rtems-64.h: Remove.
38292 2017-01-19  Uros Bizjak  <ubizjak@gmail.com>
38294         PR target/78478
38295         Revert:
38296         2013-11-05  Uros Bizjak  <ubizjak@gmail.com>
38298         * config/i386/rtemself.h (LONG_DOUBLE_TYPE_SIZE): New define.
38300 2017-01-19  Tamar Christina  <tamar.christina@arm.com>
38302         * config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup):
38303         Change int to HOST_WIDE_INT.
38304         * config/aarch64/aarch64-protos.h
38305         (aarch64_simd_gen_const_vector_dup): Likewise.
38306         * config/aarch64/aarch64-simd.md: Add copysign<mode>3.
38308 2017-01-19  David Malcolm  <dmalcolm@redhat.com>
38310         * langhooks-def.h (lhd_type_for_size): New decl.
38311         (LANG_HOOKS_TYPE_FOR_SIZE): Define as lhd_type_for_size.
38312         * langhooks.c (lhd_type_for_size): New function, taken from
38313         lto_type_for_size.
38315 2017-01-19  Pat Haugen  <pthaugen@us.ibm.com>
38317         * config/rs6000/power9.md (power9-alu): Remove 'cmp' type and add
38318         define_bypass for CR latency.
38319         (power9-cracked-alu): Update bypass latency and remove power9-branch.
38320         (power9-alu2): Add define_bypass for CR latency.
38321         (power9-cmp): New.
38322         (power9-mul): Update insn latency.
38323         (power9-mul-compare): Update insn latency, bypass latency and remove
38324         power9-branch.
38326 2016-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
38328         * config/aarch64/aarch64-protos.h (aarch64_nopcrelative_literal_loads):
38329         Delete.
38330         * config/aarch64/aarch64.md
38331         (aarch64_reload_movcp<GPF_TF:mode><P:mode>): Delete reference to
38332         aarch64_nopcrelative_literal_loads.
38333         (aarch64_reload_movcp<VALL:mode><P:mode>): Likewise.
38335 2017-01-19  Chenghua Xu  <paul.hua.gm@gmail.com>
38337         * config/mips/mips.h (ISA_HAS_FUSED_MADD4): Enable for
38338         TARGET_LOONGSON_3A.
38339         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_LOONGSON_3A.
38341 2017-01-19  Doug Gilmore  <doug.gilmore@imgtec.com>
38343         PR target/78176
38344         * config.gcc (supported_defaults): Add lxc1-sxc1.
38345         (with_lxc1_sxc1): Add validation.
38346         (all_defaults): Add lxc1-sxc1.
38347         * config/mips/mips.opt (mlxc1-sxc1): New option.
38348         * config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
38349         mlxc1-sxc1.
38350         (TARGET_CPU_CPP_BUILTINS): Add builtin_define for
38351         __mips_no_lxc1_sxc1.
38352         (ISA_HAS_LXC1_SXC1): Gate with mips_lxc1_sxc1.
38353         * doc/invoke.texi (-mlxc1-sxc1): Document the new option.
38354         * doc/install.texi (--with-lxc1-sxc1): Document the new option.
38356 2017-01-19  Richard Biener  <rguenther@suse.de>
38358         PR tree-optimization/72488
38359         * tree-ssa-sccvn.c (run_scc_vn): When we abort the VN make
38360         sure to restore SSA info.
38361         * tree-ssa.c (verify_ssa): Verify SSA info is not shared.
38363 2017-01-19  Richard Earnshaw  <rearnsha@arm.com>
38365         PR rtl-optimization/79121
38366         * expr.c (expand_expr_real_2, case LSHIFT_EXPR): Look at the signedness
38367         of the inner type when shifting an extended value.
38369 2017-01-17  Jan Hubicka  <hubicka@ucw.cz>
38371         PR lto/78407
38372         * symtab.c (symtab_node::equal_address_to): Fix comparing of
38373         interposable aliases.
38375 2017-01-18  Peter Bergner  <bergner@vnet.ibm.com>
38377         PR target/78516
38378         * config/rs6000/spe.md (mov_si<mode>_e500_subreg0): Fix constraints.
38379         Use the evmergelohi instruction.
38380         (mov_si<mode>_e500_subreg4_2_le): Likewise.
38381         (mov_sitf_e500_subreg8_2_be): Likewise.
38382         (mov_sitf_e500_subreg12_2_le): Likewise.
38383         (mov_si<mode>_e500_subreg0_2_le): Fix constraints.
38384         (mov_si<mode>_e500_subreg4_2_be): Likewise.
38385         (mov_sitf_e500_subreg8_2_le): Likewise.
38386         (mov_sitf_e500_subreg12_2_be): Likewise.
38388 2017-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
38390         * config/rs6000/altivec.md (altivec_vbpermq): Change "type"
38391         attribute from vecsimple to vecperm.
38392         (altivec_vbpermq2): Likewise.
38394 2017-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
38396         PR target/79040
38397         * config/rs6000/altivec.h: Fix typo of vec_cntlz to vec_cnttz.
38399 2017-01-18  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
38400         * config/rs6000/rs6000-protos.h (expand_strn_compare): Add arg.
38401         * config/rs6000/rs6000.c (expand_strn_compare): Add ability to expand
38402         strcmp. Fix bug where comparison didn't stop with zero byte. Fix
38403         case where N arg is SIZE_MAX.
38404         * config/rs6000/rs6000.md (cmpstrnsi): Args to expand_strn_compare.
38405         (cmpstrsi): Add pattern.
38407 2017-01-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
38409         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
38410         __builtin_vec_revb builtins.
38411         * config/rs6000/rs6000-builtins.def (P9V_BUILTIN_XXBRQ_V16QI): Add
38412         built-in functions to support generation of the ISA 3.0 XXBR<x>
38413         vector byte reverse instructions.
38414         (P9V_BUILTIN_XXBRQ_V1TI): Likewise.
38415         (P9V_BUILTIN_XXBRD_V2DI): Likewise.
38416         (P9V_BUILTIN_XXBRD_V2DF): Likewise.
38417         (P9V_BUILTIN_XXBGW_V4SI): Likewise.
38418         (P9V_BUILTIN_XXBGW_V4SF): Likewise.
38419         (P9V_BUILTIN_XXBGH_V8HI): Likewise.
38420         (P9V_BUILTIN_VEC_REVB): Likewise.
38421         * config/rs6000/vsx.md (p9_xxbrq_v1ti): New insns/expanders to
38422         generate the ISA 3.0 XXBR<x> vector byte reverse instructions.
38423         (p9_xxbrq_v16qi): Likewise.
38424         (p9_xxbrd_<mode>, VSX_D iterator): Likewise.
38425         (p9_xxbrw_<mode>, VSX_W iterator): Likewise.
38426         (p9_xxbrh_v8hi): Likewise.
38427         * config/rs6000/altivec.h (vec_revb): Define if ISA 3.0.
38428         * doc/extend.texi (RS/6000 Altivec Built-ins): Document the
38429         vec_revb built-in functions.
38431 2017-01-18  Uros Bizjak  <ubizjak@gmail.com>
38433         PR rtl-optimization/78952
38434         * config/i386/i386.md (any_extract): New code iterator.
38435         (*insvqi_2): Use any_extract for source operand.
38436         (*insvqi_3): Use any_shiftrt for source operand.
38438 2017-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
38440         * config/aarch64/aarch64.c (aarch64_sched_adjust_priority)
38441         New function.
38442         (TARGET_SCHED_ADJUST_PRIORITY): Define target hook.
38444 2017-01-18  Matthias Klose  <doko@ubuntu.com>
38446         * doc/install.texi: Allow default for --with-target-bdw-gc-include.
38448 2016-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
38450         * config/rs6000/altivec.h (vec_bperm): Change #define.
38451         * config/rs6000/altivec.md (UNSPEC_VBPERMD): New enum constant.
38452         (altivec_vbpermq2): New define_insn.
38453         (altivec_vbpermd): Likewise.
38454         * config/rs6000/rs6000-builtin.def (VBPERMQ2): New monomorphic
38455         function interface.
38456         (VBPERMD): Likewise.
38457         (VBPERM): New polymorphic function interface.
38458         * config/rs6000/r6000-c.c (altivec_overloaded_builtins_table):
38459         Add entries for P9V_BUILTIN_VEC_VBPERM.
38460         * doc/extend.texi: Add interfaces for vec_bperm.
38462 2017-01-18  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
38464         * config/s390/s390-c.c (s390_expand_overloaded_builtin): Downcase
38465         first letter of error messages.
38466         (s390_resolve_overloaded_builtin): Likewise.
38467         * config/s390/s390.c (s390_expand_builtin): Likewise.
38468         (s390_invalid_arg_for_unprototyped_fn): Likewise.
38469         (s390_valid_target_attribute_inner_p): Likewise.
38470         * config/s390/s390.md ("tabort"): Likewise.
38472 2017-01-18  Toma Tabacu  <toma.tabacu@imgtec.com>
38474         * config/mips/mips.h (ISA_HAS_DIV3): Remove unused macro.
38475         (ISA_AVOID_DIV_HILO): New macro.
38476         (ISA_HAS_DIV): Use new ISA_AVOID_DIV_HILO macro.
38477         (ISA_HAS_DDIV): Likewise.
38479 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
38481         * doc/invoke.texi (fabi-version): Correct number of occurrences.
38483 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
38485         * doc/invoke.texi (fabi-version): Spelling fix.
38487 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
38489         PR c++/70182
38490         * doc/invoke.texi (fabi-version): Mention mangling fix for
38491         operator names.
38493 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
38495         PR c++/77489
38496         * doc/invoke.texi (fabi-version): Document discriminator mangling.
38498 2017-01-17  Segher Boessenkool  <segher@kernel.crashing.org>
38500         PR target/78875
38501         * config/rs6000/rs6000-opts.h (stack_protector_guard): New enum.
38502         * config/rs6000/rs6000.c (rs6000_option_override_internal): Handle
38503         the new options.
38504         * config/rs6000/rs6000.md (stack_protect_set): Handle the new more
38505         flexible settings.
38506         (stack_protect_test): Ditto.
38507         * config/rs6000/rs6000.opt (mstack-protector-guard=,
38508         mstack-protector-guard-reg=, mstack-protector-guard-offset=): New
38509         options.
38510         * doc/invoke.texi (Option Summary) [RS/6000 and PowerPC Options]:
38511         Add -mstack-protector-guard=, -mstack-protector-guard-reg=, and
38512         -mstack-protector-guard-offset=.
38513         (RS/6000 and PowerPC Options): Ditto.
38515 2017-01-17  Uros Bizjak  <ubizjak@gmail.com>
38517         * config/i386/i386.h (MASK_CLASS_P): New define.
38518         * config/i386/i386.c (inline_secondary_memory_needed): Ensure that
38519         there are no registers from different register sets also when
38520         mask registers are used.  Update function comment.
38521         * config/i386/i386.md (*movsi_internal): Split (*k/*krm) alternative
38522         to (*k/*r) and (*k/*km) alternatives.
38524 2017-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
38526         * config/aarch64/aarch64.md (eh_return): Remove pattern and splitter.
38527         * config/aarch64/aarch64.h (AARCH64_EH_STACKADJ_REGNUM): Remove.
38528         (EH_RETURN_HANDLER_RTX): New define.
38529         * config/aarch64/aarch64.c (aarch64_frame_pointer_required):
38530         Force frame pointer in EH return functions.
38531         (aarch64_expand_epilogue): Add barrier for eh_return.
38532         (aarch64_final_eh_return_addr): Remove.
38533         (aarch64_eh_return_handler_rtx): New function.
38534         * config/aarch64/aarch64-protos.h (aarch64_final_eh_return_addr):
38535         Remove.
38536         (aarch64_eh_return_handler_rtx): New prototype.
38538 2017-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
38540         * config/rs6000/altivec.h (vec_rlmi): New #define.
38541         (vec_vrlnm): Likewise.
38542         (vec_rlnm): Likewise.
38543         * config/rs6000/altivec.md (UNSPEC_VRLMI): New UNSPEC enum value.
38544         (UNSPEC_VRLNM): Likewise.
38545         (VIlong): New mode iterator.
38546         (altivec_vrl<VI_char>mi): New define_insn.
38547         (altivec_vrl<VI_char>nm): Likewise.
38548         * config/rs6000/rs6000-builtin.def (VRLWNM): New monomorphic
38549         function entry.
38550         (VRLDNM): Likewise.
38551         (RLNM): New polymorphic function entry.
38552         (VRLWMI): New monomorphic function entry.
38553         (VRLDMI): Likewise.
38554         (RLMI): New polymorphic function entry.
38555         * config/rs6000/r6000-c.c (altivec_overloaded_builtin_table): Add
38556         new entries for P9V_BUILTIN_VEC_RLMI and P9V_BUILTIN_VEC_RLNM.
38557         * doc/extend.texi: Add description of vec_rlmi, vec_rlnm, and
38558         vec_vrlnm.
38560 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
38562         PR debug/78839
38563         * dwarf2out.c (field_byte_offset): Restore the
38564         PCC_BITFIELD_TYPE_MATTERS behavior for INTEGER_CST DECL_FIELD_OFFSET
38565         and DECL_FIELD_BIT_OFFSET.  Use fold_build2 instead of build2 + fold.
38566         (analyze_variants_discr, gen_variant_part): Use fold_build2 instead
38567         of build2 + fold.
38569 2017-01-17  Eric Botcazou  <ebotcazou@adacore.com>
38571         PR ada/67205
38572         * config/aarch64/aarch64.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define
38574 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
38576         PR debug/71669
38577         * dwarf2out.c (add_data_member_location_attribute): For constant
38578         offset bitfield emit for -gdwarf-5 DW_AT_data_bit_offset attribute
38579         instead of DW_AT_data_member_location, DW_AT_bit_offset and
38580         DW_AT_byte_size attributes.
38582 2017-01-17  Eric Botcazou  <ebotcazou@adacore.com>
38584         * config/rs6000/rs6000.c (rs6000_emit_move): Also use a TOC reference
38585         after forcing to constant memory when the code model is medium.
38587 2017-01-17  Julia Koval  <julia.koval@intel.com>
38589         PR target/76731
38590         * config/i386/avx512fintrin.h
38591         (_mm512_i32gather_ps): Change __addr type to void const*.
38592         (_mm512_mask_i32gather_ps): Ditto.
38593         (_mm512_i32gather_pd): Ditto.
38594         (_mm512_mask_i32gather_pd): Ditto.
38595         (_mm512_i64gather_ps): Ditto.
38596         (_mm512_mask_i64gather_ps): Ditto.
38597         (_mm512_i64gather_pd): Ditto.
38598         (_mm512_mask_i64gather_pd): Ditto.
38599         (_mm512_i32gather_epi32): Ditto.
38600         (_mm512_mask_i32gather_epi32): Ditto.
38601         (_mm512_i32gather_epi64): Ditto.
38602         (_mm512_mask_i32gather_epi64): Ditto.
38603         (_mm512_i64gather_epi32): Ditto.
38604         (_mm512_mask_i64gather_epi32): Ditto.
38605         (_mm512_i64gather_epi64): Ditto.
38606         (_mm512_mask_i64gather_epi64): Ditto.
38607         (_mm512_i32scatter_ps): Change __addr type to void*.
38608         (_mm512_mask_i32scatter_ps): Ditto.
38609         (_mm512_i32scatter_pd): Ditto.
38610         (_mm512_mask_i32scatter_pd): Ditto.
38611         (_mm512_i64scatter_ps): Ditto.
38612         (_mm512_mask_i64scatter_ps): Ditto.
38613         (_mm512_i64scatter_pd): Ditto.
38614         (_mm512_mask_i64scatter_pd): Ditto.
38615         (_mm512_i32scatter_epi32): Ditto.
38616         (_mm512_mask_i32scatter_epi32): Ditto.
38617         (_mm512_i32scatter_epi64): Ditto.
38618         (_mm512_mask_i32scatter_epi64): Ditto.
38619         (_mm512_i64scatter_epi32): Ditto.
38620         (_mm512_mask_i64scatter_epi32): Ditto.
38621         (_mm512_i64scatter_epi64): Ditto.
38622         (_mm512_mask_i64scatter_epi64): Ditto.
38623         * config/i386/avx512pfintrin.h
38624         (_mm512_mask_prefetch_i32gather_pd): Change __addr type to void const*.
38625         (_mm512_mask_prefetch_i32gather_ps): Ditto.
38626         (_mm512_mask_prefetch_i64gather_pd): Ditto.
38627         (_mm512_mask_prefetch_i64gather_ps): Ditto.
38628         (_mm512_prefetch_i32scatter_pd): Change __addr type to void*.
38629         (_mm512_prefetch_i32scatter_ps): Ditto.
38630         (_mm512_mask_prefetch_i32scatter_pd): Ditto.
38631         (_mm512_mask_prefetch_i32scatter_ps): Ditto.
38632         (_mm512_prefetch_i64scatter_pd): Ditto.
38633         (_mm512_prefetch_i64scatter_ps): Ditto.
38634         (_mm512_mask_prefetch_i64scatter_pd): Ditto.
38635         (_mm512_mask_prefetch_i64scatter_ps): Ditto.
38636         * config/i386/avx512vlintrin.h
38637         (_mm256_mmask_i32gather_ps): Change __addr type to void const*.
38638         (_mm_mmask_i32gather_ps): Ditto.
38639         (_mm256_mmask_i32gather_pd): Ditto.
38640         (_mm_mmask_i32gather_pd): Ditto.
38641         (_mm256_mmask_i64gather_ps): Ditto.
38642         (_mm_mmask_i64gather_ps): Ditto.
38643         (_mm256_mmask_i64gather_pd): Ditto.
38644         (_mm_mmask_i64gather_pd): Ditto.
38645         (_mm256_mmask_i32gather_epi32): Ditto.
38646         (_mm_mmask_i32gather_epi32): Ditto.
38647         (_mm256_mmask_i32gather_epi64): Ditto.
38648         (_mm_mmask_i32gather_epi64): Ditto.
38649         (_mm256_mmask_i64gather_epi32): Ditto.
38650         (_mm_mmask_i64gather_epi32): Ditto.
38651         (_mm256_mmask_i64gather_epi64): Ditto.
38652         (_mm_mmask_i64gather_epi64): Ditto.
38653         (_mm256_i32scatter_ps): Change __addr type to void*.
38654         (_mm256_mask_i32scatter_ps): Ditto.
38655         (_mm_i32scatter_ps): Ditto.
38656         (_mm_mask_i32scatter_ps): Ditto.
38657         (_mm256_i32scatter_pd): Ditto.
38658         (_mm256_mask_i32scatter_pd): Ditto.
38659         (_mm_i32scatter_pd): Ditto.
38660         (_mm_mask_i32scatter_pd): Ditto.
38661         (_mm256_i64scatter_ps): Ditto.
38662         (_mm256_mask_i64scatter_ps): Ditto.
38663         (_mm_i64scatter_ps): Ditto.
38664         (_mm_mask_i64scatter_ps): Ditto.
38665         (_mm256_i64scatter_pd): Ditto.
38666         (_mm256_mask_i64scatter_pd): Ditto.
38667         (_mm_i64scatter_pd): Ditto.
38668         (_mm_mask_i64scatter_pd): Ditto.
38669         (_mm256_i32scatter_epi32): Ditto.
38670         (_mm256_mask_i32scatter_epi32): Ditto.
38671         (_mm_i32scatter_epi32): Ditto.
38672         (_mm_mask_i32scatter_epi32): Ditto.
38673         (_mm256_i32scatter_epi64): Ditto.
38674         (_mm256_mask_i32scatter_epi64): Ditto.
38675         (_mm_i32scatter_epi64): Ditto.
38676         (_mm_mask_i32scatter_epi64): Ditto.
38677         (_mm256_i64scatter_epi32): Ditto.
38678         (_mm256_mask_i64scatter_epi32): Ditto.
38679         (_mm_i64scatter_epi32): Ditto.
38680         (_mm_mask_i64scatter_epi32): Ditto.
38681         (_mm256_i64scatter_epi64): Ditto.
38682         (_mm256_mask_i64scatter_epi64): Ditto.
38683         (_mm_i64scatter_epi64): Ditto.
38684         (_mm_mask_i64scatter_epi64): Ditto.
38685         * config/i386/i386-builtin-types.def (V16SF_V16SF_PCFLOAT_V16SI_HI_INT)
38686         (V8DF_V8DF_PCDOUBLE_V8SI_QI_INT, V8SF_V8SF_PCFLOAT_V8DI_QI_INT)
38687         (V8DF_V8DF_PCDOUBLE_V8DI_QI_INT, V16SI_V16SI_PCINT_V16SI_HI_INT)
38688         (V8DI_V8DI_PCINT64_V8SI_QI_INT, V8SI_V8SI_PCINT_V8DI_QI_INT)
38689         (V8DI_V8DI_PCINT64_V8DI_QI_INT, V2DF_V2DF_PCDOUBLE_V4SI_QI_INT)
38690         (V4DF_V4DF_PCDOUBLE_V4SI_QI_INT, V2DF_V2DF_PCDOUBLE_V2DI_QI_INT)
38691         (V4DF_V4DF_PCDOUBLE_V4DI_QI_INT, V4SF_V4SF_PCFLOAT_V4SI_QI_INT)
38692         (V8SF_V8SF_PCFLOAT_V8SI_QI_INT, V4SF_V4SF_PCFLOAT_V2DI_QI_INT)
38693         (V4SF_V4SF_PCFLOAT_V4DI_QI_INT, V2DI_V2DI_PCINT64_V4SI_QI_INT)
38694         (V4DI_V4DI_PCINT64_V4SI_QI_INT, V2DI_V2DI_PCINT64_V2DI_QI_INT)
38695         (V4DI_V4DI_PCINT64_V4DI_QI_INT, V4SI_V4SI_PCINT_V4SI_QI_INT)
38696         (V8SI_V8SI_PCINT_V8SI_QI_INT, V4SI_V4SI_PCINT_V2DI_QI_INT)
38697         (V4SI_V4SI_PCINT_V4DI_QI_INT, VOID_PFLOAT_HI_V16SI_V16SF_INT)
38698         (VOID_PFLOAT_QI_V8SI_V8SF_INT, VOID_PFLOAT_QI_V4SI_V4SF_INT)
38699         (VOID_PDOUBLE_QI_V8SI_V8DF_INT, VOID_PDOUBLE_QI_V4SI_V4DF_INT)
38700         (VOID_PDOUBLE_QI_V4SI_V2DF_INT, VOID_PFLOAT_QI_V8DI_V8SF_INT)
38701         (VOID_PFLOAT_QI_V4DI_V4SF_INT, VOID_PFLOAT_QI_V2DI_V4SF_INT)
38702         (VOID_PDOUBLE_QI_V8DI_V8DF_INT, VOID_PDOUBLE_QI_V4DI_V4DF_INT)
38703         (VOID_PDOUBLE_QI_V2DI_V2DF_INT, VOID_PINT_HI_V16SI_V16SI_INT)
38704         (VOID_PINT_QI_V8SI_V8SI_INT, VOID_PINT_QI_V4SI_V4SI_INT)
38705         (VOID_PLONGLONG_QI_V8SI_V8DI_INT, VOID_PLONGLONG_QI_V4SI_V4DI_INT)
38706         (VOID_PLONGLONG_QI_V4SI_V2DI_INT, VOID_PINT_QI_V8DI_V8SI_INT)
38707         (VOID_PINT_QI_V4DI_V4SI_INT, VOID_PINT_QI_V2DI_V4SI_INT)
38708         (VOID_PLONGLONG_QI_V8DI_V8DI_INT, VOID_QI_V8SI_PCINT64_INT_INT)
38709         (VOID_PLONGLONG_QI_V4DI_V4DI_INT, VOID_PLONGLONG_QI_V2DI_V2DI_INT)
38710         (VOID_HI_V16SI_PCINT_INT_INT, VOID_QI_V8DI_PCINT64_INT_INT)
38711         (VOID_QI_V8DI_PCINT_INT_INT): Remove.
38712         (V16SF_V16SF_PCVOID_V16SI_HI_INT,  V8DF_V8DF_PCVOID_V8SI_QI_INT)
38713         (V8SF_V8SF_PCVOID_V8DI_QI_INT, V8DF_V8DF_PCVOID_V8DI_QI_INT)
38714         (V16SI_V16SI_PCVOID_V16SI_HI_INT, V8DI_V8DI_PCVOID_V8SI_QI_INT)
38715         (V8SI_V8SI_PCVOID_V8DI_QI_INT, V8DI_V8DI_PCVOID_V8DI_QI_INT)
38716         (VOID_PVOID_HI_V16SI_V16SF_INT, VOID_PVOID_QI_V8SI_V8DF_INT)
38717         (VOID_PVOID_QI_V8DI_V8SF_INT, VOID_PVOID_QI_V8DI_V8DF_INT)
38718         (VOID_PVOID_HI_V16SI_V16SI_INT, VOID_PVOID_QI_V8SI_V8DI_INT)
38719         (VOID_PVOID_QI_V8DI_V8SI_INT, VOID_PVOID_QI_V8DI_V8DI_INT)
38720         (V2DF_V2DF_PCVOID_V4SI_QI_INT, V4DF_V4DF_PCVOID_V4SI_QI_INT)
38721         (V2DF_V2DF_PCVOID_V2DI_QI_INT, V4DF_V4DF_PCVOID_V4DI_QI_INT
38722         (V4SF_V4SF_PCVOID_V4SI_QI_INT, V8SF_V8SF_PCVOID_V8SI_QI_INT)
38723         (V4SF_V4SF_PCVOID_V2DI_QI_INT, V4SF_V4SF_PCVOID_V4DI_QI_INT)
38724         (V2DI_V2DI_PCVOID_V4SI_QI_INT, V4DI_V4DI_PCVOID_V4SI_QI_INT)
38725         (V2DI_V2DI_PCVOID_V2DI_QI_INT, V4DI_V4DI_PCVOID_V4DI_QI_INT)
38726         (V4SI_V4SI_PCVOID_V4SI_QI_INT, V8SI_V8SI_PCVOID_V8SI_QI_INT)
38727         (V4SI_V4SI_PCVOID_V2DI_QI_INT, V4SI_V4SI_PCVOID_V4DI_QI_INT)
38728         (VOID_PVOID_QI_V8SI_V8SF_INT, VOID_PVOID_QI_V4SI_V4SF_INT)
38729         (VOID_PVOID_QI_V4SI_V4DF_INT, VOID_PVOID_QI_V4SI_V2DF_INT)
38730         (VOID_PVOID_QI_V4DI_V4SF_INT, VOID_PVOID_QI_V2DI_V4SF_INT)
38731         (VOID_PVOID_QI_V4DI_V4DF_INT, VOID_PVOID_QI_V2DI_V2DF_INT)
38732         (VOID_PVOID_QI_V8SI_V8SI_INT, VOID_PVOID_QI_V4SI_V4SI_INT)
38733         (VOID_PVOID_QI_V4SI_V4DI_INT, VOID_PVOID_QI_V4SI_V2DI_INT)
38734         (VOID_PVOID_QI_V4DI_V4SI_INT, VOID_PVOID_QI_V2DI_V4SI_INT)
38735         (VOID_PVOID_QI_V4DI_V4DI_INT, VOID_PVOID_QI_V2DI_V2DI_INT)
38736         (VOID_QI_V8SI_PCVOID_INT_INT, VOID_HI_V16SI_PCVOID_INT_INT)
38737         (VOID_QI_V8DI_PCVOID_INT_INT): Add.
38738         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Adjust builtin
38739         definitions accordingly.
38741 2017-01-17  Kito Cheng  <kito.cheng@gmail.com>
38742             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
38744         PR target/79079
38745         * internal-fn.c (expand_mul_overflow): Use convert_modes instead of
38746         gen_lowpart.
38748 2017-01-17  Vladimir Makarov  <vmakarov@redhat.com>
38750         PR target/79058
38751         * ira-conflicts.c (ira_build_conflicts): Update total conflict
38752         hard regs for inner regno.
38754 2017-01-17  Martin Liska  <mliska@suse.cz>
38756         PR ipa/71207
38757         * ipa-polymorphic-call.c (contains_type_p): Fix wrong
38758         assumption and add comment.
38760 2017-01-17  Nathan Sidwell  <nathan@acm.org>
38762         * ipa-visibility.c (localize_node): New function, broken out of ...
38763         (function_and_variable_visibility): ... here. Call it.
38765 2017-01-17  Jan Hubicka  <hubicka@ucw.cz>
38767         PR middle-end/77445
38768         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges):
38769         correctly set frequency of oudgoing edge.
38770         (duplicate_thread_path): Fix profile updating.
38772 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
38774         PR other/79046
38775         * configure.ac: Add GCC_BASE_VER.
38776         * Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
38777         version from BASE-VER file.
38778         (CFLAGS-gcc.o): Add -DBASEVER=$(BASEVER_s).
38779         (gcc.o): Depend on $(BASEVER).
38780         * common.opt (dumpfullversion): New option.
38781         * gcc.c (driver_handle_option): Handle OPT_dumpfullversion.
38782         * doc/invoke.texi: Document -dumpfullversion.
38783         * doc/install.texi: Document --with-gcc-major-version-only.
38784         * configure: Regenerated.
38786 2017-01-17  Richard Biener  <rguenther@suse.de>
38788         PR tree-optimization/71433
38789         * tree-vrp.c (register_new_assert_for): Merge same asserts
38790         on all incoming edges.
38791         (process_assert_insertions_for): Handle insertions at the
38792         beginning of BBs.
38794 2017-01-17  Gerald Pfeifer  <gerald@pfeifer.com>
38796         * config/i386/cygwin.h (LIBGCJ_SONAME): Remove.
38797         * config/i386/mingw32.h (LIBGCJ_SONAME): Remove.
38799 2017-01-17  Kaz Kojima  <kkojima@gcc.gnu.org>
38801         PR target/78633
38802         * config/sh/sh.md (cmpeqsi_t+1): Call copy_rtx to avoid invalid
38803         RTL sharing.
38805 2017-01-17  Alan Modra  <amodra@gmail.com>
38807         PR target/79066
38808         * config/rs6000/rs6000.md (elf_high, elf_low): Disable when pic.
38809         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Don't allow
38810         symbolic stack limit when pic.
38812 2017-01-16  Martin Sebor  <msebor@redhat.com>
38814         PR tree-optimization/78608
38815         * gimple-ssa-sprintf.c (tree_digits): Avoid negating TYPE_MIN.
38817 2017-01-16  Jeff Law  <law@redhat.com>
38819         Revert:
38820         2016-12-02  Tadek Kijkowski  <tkijkowski@gmail.com>
38821         * Makefile.in (PREPROCESSOR_DEFINES): Add a level of indirection
38822         for several include directories that may be relative to sysroot.
38823         * config/i386/x-mingw32 (gplus_includedir): Define.
38824         (gplus_tool_includedir, gplus_backward_include_dir): Likewise.
38825         (native_system_includedir): Likewise.
38826         * config/i386/mingw32.h (STANDARD_STARTFILE_PREFIX_1): Do not
38827         override if TARGET_SYSTEM_ROOT is defined.
38828         (NATIVE_SYSTEM_HEADER_DIR): Likewise.
38830         PR tree-optimization/79090
38831         PR tree-optimization/33562
38832         PR tree-optimization/61912
38833         PR tree-optimization/77485
38834         * tree-ssa-dse.c (compute_trims): Accept STMT argument.  Dump STMT
38835         and computed trims into the dump file.
38837 2017-01-17  Uros Bizjak  <ubizjak@gmail.com>
38839         * config/i386/i386.h (LIMIT_RELOAD_CLASS): Remove.
38841 2017-01-16  Jakub Jelinek  <jakub@redhat.com>
38843         PR c/79089
38844         * gimplify.c (gimplify_init_constructor): If want_value and
38845         object == lhs, unshare lhs to avoid invalid tree sharing.  Formatting
38846         fix.
38848         PR target/79080
38849         * loop-doloop.c (doloop_modify): Call unshare_all_rtl_in_chain on
38850         sequence.  Formatting fixes.
38851         (doloop_optimize): Formatting fixes.
38853         PR driver/49726
38854         * gcc.c (debug_level_greater_than_spec_func): New function.
38855         (static_spec_functions): Add debug-level-gt spec function.
38856         (ASM_DEBUG_SPEC, cpp_options): Use %:debug-level-gt(0) instead of
38857         !g0.
38858         * config/darwin.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
38859         * config/darwin9.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
38860         * common.opt (g, gcoff, gdwarf, gdwarf-, ggdb, gno-pubnames,
38861         gpubnames, ggnu-pubnames, gno-record-gcc-switches,
38862         grecord-gcc-switches, gno-strict-dwarf, gstrict-dwarf, gstabs,
38863         gstabs+, gtoggle, gvms, gxcoff, gxcoff+): Add Driver flag.
38865 2017-01-16  Uros Bizjak  <ubizjak@gmail.com>
38867         * config/i386/i386.h (HARD_REGNO_CALLER_SAVE_MODE): Apply HImode and
38868         QImode fixups to general and mask registers only.
38870 2017-01-16  Carl Love  <cel@us.ibm.com>
38872         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Add support
38873         for built-in functions
38874         vector signed char vec_nabs (vector signed char)
38875         vector signed short vec_nabs (vector signed short)
38876         vector signed int vec_nabs (vector signed int)
38877         vector signed long long vec_nabs (vector signed long long)
38878         vector float vec_nabs (vector float)
38879         vector double vec_nabs (vector double)
38880         * config/rs6000/rs6000-builtin.def: Add definitions for NABS functions
38881         and NABS overload.
38882         * config/rs6000/altivec.md: New define_expand nabs<mode>2 types
38883         * config/rs6000/altivec.h: New define for vec_nabs built-in function.
38884         * doc/extend.texi: Update the documentation file for the new built-in
38885         functions.
38887 2017-01-16  Martin Sebor  <msebor@redhat.com>
38889         * gimple-ssa-sprintf.c (format_directive): Correct a typo in a warning
38890         message.
38892 2017-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
38894         * config/rs6000/rs6000.c (rtx_is_swappable_p): Change
38895         UNSPEC_VSX__XXSPLTD to require special splat handling.
38897 2017-01-16  David Malcolm  <dmalcolm@redhat.com>
38899         PR bootstrap/78616
38900         * system.h: Poison strndup.
38902 2017-01-16  Alan Modra  <amodra@gmail.com>
38904         PR target/79098
38905         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Don't
38906         use a switch.
38908 2017-01-16  Georg-Johann Lay  <avr@gjlay.de>
38910         * config/avr/avr.h (BRANCH_COST) [reload_completed]: Increase by 4.
38912 2017-01-15  Uros Bizjak  <ubizjak@gmail.com>
38914         * config/i386/i386.c (ix86_legitimate_combined_insn): Do not
38915         call recog here.  Assert that INSN_CODE (insn) is non-negative.
38917 2017-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
38919         PR target/72749
38920         * cfgrtl.c (rtl_split_edge): Also patch jump insns that jump to the
38921         fallthrough.
38922         * haifa-sched.c (dump_insn_stream): Don't crash if there is a label
38923         in the currently scheduled RTL fragment.
38925 2017-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
38927         PR rtl-optimization/78751
38928         * ifcvt.c (find_cond_trap): If we generated a non-existing insn,
38929         give up.
38931 2017-01-14  Jeff Law  <law@redhat.com>
38933         PR tree-optimization/79090
38934         * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject zero length and
38935         variable length stores.
38936         (compute_trims): Delete dead assignment to *trim_tail.
38937         (dse_dom_walker::dse_optimize_stmt): Optimize mem* calls with
38938         zero length.
38940 2017-01-14  Bernd Schmidt  <bschmidt@redhat.com>
38942         PR rtl-optimization/78626
38943         PR rtl-optimization/78727
38944         * cprop.c (one_cprop_pass): Collect unconditional traps in the middle
38945         of a block, and split such blocks after everything else is finished.
38947 2017-01-14  Alan Modra  <amodra@gmail.com>
38949         PR target/72749
38950         * combine.c (recog_for_combine_1): Set INSN_CODE before calling
38951         target legitimate_combined_insn.
38952         * config/rs6000/rs6000.c (TARGET_LEGITIMATE_COMBINED_INSN): Define.
38953         (rs6000_legitimate_combined_insn): New function.
38954         * config/rs6000/rs6000.md (UNSPEC_DOLOOP): Delete, and remove
38955         all uses.
38956         (ctr<mode>_internal3): Rename from *ctr<mode>_internal5.
38957         (ctr<mode>_internal4): Rename from *ctr<mode>_internal6.
38958         (ctr<mode>_internal1, ctr<mode>_internal2): Remove '*' from name.
38960 2017-01-14  Gerald Pfeifer  <gerald@pfeifer.com>
38962         * doc/frontends.texi (G++ and GCC): Remove references to Java.
38964 2017-01-13  Jeff Law  <law@redhat.com>
38966         PR tree-optimization/33562
38967         PR tree-optimization/61912
38968         PR tree-optimization/77485
38969         * tree-ssa-dse.c (delete_dead_call): Accept gsi rather than
38970         a statement.
38971         (delete_dead_assignment): Likewise.
38972         (dse_dom_walker::dse_optimize_stmt): Pass in the gsi rather than
38973         statement to delete_dead_call and delete_dead_assignment.
38975 2017-01-13  David Malcolm  <dmalcolm@redhat.com>
38977         PR c/78304
38978         * substring-locations.c (format_warning_va): Strengthen case 1 so
38979         that both endpoints of the substring must be within the format
38980         range for just the substring to be printed.
38982 2017-01-13  Uros Bizjak  <ubizjak@gmail.com>
38984         * config/i386/i386.opt (msgx): Use ix86_isa_flags2 variable.
38985         * config/i386/i386.c (ix86_target_string): Add missing options
38986         to isa_opts and reorder options by implied ISAs.  Rename isa_opts2 to
38987         isa2_opts, ix86_flag_opts to flag2_opts, ix86_target_other to
38988         flags_other and ix86_target_other to flags2_other.  Display unknown
38989         isa2 options.
38990         (ix86_valid_target_attribute_inner_p): Add missing options and
38991         reorder options by implied ISAs, as in ix86_target_string.
38993 2017-01-13  Richard Sandiford  <richard.sandiford@arm.com>
38995         * hash-table.h (hash_table::too_empty_p): New function.
38996         (hash_table::expand): Use it.
38997         (hash_table::traverse): Likewise.
38998         (hash_table::empty_slot): Use sizeof (value_type) instead of
38999         sizeof (PTR) to convert bytes to elements.  Shrink the table
39000         if the current size is excessive for the current number of
39001         elements.
39003 2017-01-13  Richard Sandiford  <richard.sandiford@arm.com>
39005         * ira-costs.c (record_reg_classes): Break from the inner loop
39006         early once alt_fail is known to be true.  Update outer loop
39007         handling accordingly.
39009 2017-01-13  Jeff Law  <law@redhat.com>
39011         * tree-ssa-dse.c (decrement_count): New function.
39012         (increment_start_addr, maybe_trim_memstar_call): Likewise.
39013         (dse_dom_walker::optimize_stmt): Call maybe_trim_memstar_call directly
39014         when we know the partially dead statement is a mem* function.
39016         PR tree-optimization/61912
39017         PR tree-optimization/77485
39018         * tree-ssa-dse.c: Include expr.h.
39019         (maybe_trim_constructor_store): New function.
39020         (maybe_trim_partially_dead_store): Call maybe_trim_constructor_store.
39022         PR tree-optimization/33562
39023         PR tree-optimization/61912
39024         PR tree-optimization/77485
39025         * doc/invoke.texi: Document new dse-max-object-size param.
39026         * params.def (PARM_DSE_MAX_OBJECT_SIZE): New PARAM.
39027         * tree-ssa-dse.c: Include params.h.
39028         (dse_store_status): New enum.
39029         (initialize_ao_ref_for_dse): New, partially extracted from
39030         dse_optimize_stmt.
39031         (valid_ao_ref_for_dse, normalize_ref): New.
39032         (setup_live_bytes_from_ref, compute_trims): Likewise.
39033         (clear_bytes_written_by, maybe_trim_complex_store): Likewise.
39034         (maybe_trim_partially_dead_store): Likewise.
39035         (maybe_trim_complex_store): Likewise.
39036         (dse_classify_store): Renamed from dse_possibly_dead_store_p.
39037         Track what bytes live from the original store.  Return tri-state
39038         for dead, partially dead or live.
39039         (dse_dom_walker): Add constructor, destructor and new private members.
39040         (delete_dead_call, delete_dead_assignment): New extracted from
39041         dse_optimize_stmt.
39042         (dse_optimize_stmt): Make a member of dse_dom_walker.
39043         Use initialize_ao_ref_for_dse.
39045         PR tree-optimization/33562
39046         PR tree-optimization/61912
39047         PR tree-optimization/77485
39048         * sbitmap.h (bitmap_count_bits): Prototype.
39049         (bitmap_clear_range, bitmap_set_range): Likewise.
39050         * sbitmap.c (bitmap_clear_range): New function.
39051         (bitmap_set_range, sbitmap_popcount, bitmap_count_bits): Likewise.
39053 2017-01-13  Martin Liska  <mliska@suse.cz>
39055         PR ipa/79043
39056         * function.c (set_cfun): Add new argument force.
39057         * function.h (set_cfun): Likewise.
39058         * ipa-inline-transform.c (inline_call): Use the function when
39059         strict alising from is dropped for function we inline to.
39061 2017-01-13  Richard Biener  <rguenther@suse.de>
39063         * tree-pretty-print.c (dump_generic_node): Fix inverted condition
39064         for dumping GIMPLE INTEGER_CSTs.
39066 2017-01-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
39068         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define __STDC_VERSION__
39069         to 201112L since C++17.
39071 2017-01-13  Maxim Ostapenko  <m.ostapenko@samsung.com>
39073         PR sanitizer/78887
39074         * asan.c (asan_needs_odr_indicator_p): Don't emit ODR indicators
39075         if -fsanitize=kernel-address is present.
39077 2017-01-13  Richard Biener  <rguenther@suse.de>
39079         * tree-pretty-print.c (dump_generic_node): Dump INTEGER_CSTs
39080         as _Literal ( type ) number in case usual suffixes do not
39081         preserve all information.
39083 2017-01-13  Richard Biener  <rguenther@suse.de>
39085         PR tree-optimization/77283
39086         * gimple-ssa-split-paths.c: Include gimple-ssa.h, tree-phinodes.h
39087         and ssa-iterators.h.
39088         (is_feasible_trace): Implement a cost model based on joiner
39089         PHI node uses.
39091 2017-01-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
39093         PR target/79004
39094         * config/rs6000/rs6000.md (FP_ISA3): Do not optimize converting
39095         char or short to __float128/_Float128 directly.
39097 2017-01-12  Martin Sebor  <msebor@redhat.com>
39099         to -Wformat-overflow.
39100         * gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust.
39101         (min_bytes_remaining): Same.
39102         (get_string_length): Same.
39103         (format_string): Same.
39104         (format_directive): Same.
39105         (add_bytes): Same.
39106         (pass_sprintf_length::handle_gimple_call): Same.
39108 2017-01-12  Jakub Jelinek  <jakub@redhat.com>
39110         * gimple-ssa-sprintf.c (try_substitute_return_value): Remove
39111         info.nowrite calls with no lhs that can't throw.  Return bool
39112         whether gsi_remove has been called or not.
39113         (pass_sprintf_length::handle_gimple_call): Return bool whether
39114         try_substitute_return_value called gsi_remove.  Formatting fix.
39115         (pass_sprintf_length::execute): Don't use gsi_remove if
39116         handle_gimple_call returned true.
39118         PR bootstrap/79069
39119         * cfgrtl.c (rtl_tidy_fallthru_edge): For any_uncondjump_p that can't
39120         be removed due to side-effects, don't remove following barrier nor
39121         turn the successor edge into fallthru edge.
39123 2017-01-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
39125         PR target/79044
39126         * config/rs6000/rs6000.c (insn_is_swappable_p): Mark
39127         element-reversing loads and stores as not swappable.
39129 2017-01-12  Nathan Sidwell  <nathan@acm.org>
39130             Nicolai Stange  <nicstange@gmail.com>
39132         * combine.c (try_combine): Don't ignore result of overlap checking
39133         loop.  Combine overlap & asm check into single loop.
39135 2017-01-12  Richard Biener  <rguenther@suse.de>
39137         * tree-pretty-print.c (dump_generic_node): Provide -gimple
39138         variant for MEM_REF.  Sanitize INTEGER_CST for -gimple.
39140 2017-01-12  Richard Biener  <rguenther@suse.de>
39142         * tree.c (initialize_tree_contains_struct): Make TS_OPTIMIZATION
39143         and TS_TARGET_OPTION directly derive from TS_BASE.
39144         * tree-core.h (tree_optimization_option): Derive from tree_base.
39145         (tree_target_option): Likewise.
39147 2017-01-11  Uros Bizjak  <ubizjak@gmail.com>
39149         * config/i386/i386.c (memory_address_length): Increase len
39150         only when rip_relative_addr_p returns false.
39152 2017-01-11  Julia Koval  <julia.koval@intel.com>
39154         * common/config/i386/i386-common.c (OPTION_MASK_ISA_SGX_UNSET): New.
39155         (OPTION_MASK_ISA_SGX_SET): New.
39156         (ix86_handle_option): Handle OPT_msgx.
39157         * config.gcc: Added sgxintrin.h.
39158         * config/i386/driver-i386.c (host_detect_local_cpu): Detect sgx.
39159         * config/i386/i386-c.c (ix86_target_macros_internal): Define __SGX__.
39160         * config/i386/i386.c (ix86_target_string): Add -msgx.
39161         (PTA_SGX): New.
39162         (ix86_option_override_internal): Handle new options.
39163         (ix86_valid_target_attribute_inner_p): Add sgx.
39164         * config/i386/i386.h (TARGET_SGX, TARGET_SGX_P): New.
39165         * config/i386/i386.opt: Add msgx.
39166         * config/i386/sgxintrin.h: New file.
39167         * config/i386/x86intrin.h: Add sgxintrin.h.
39169 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
39171         PR c++/71537
39172         * fold-const.c (maybe_nonzero_address): Return 1 for function
39173         local objects.
39174         (tree_single_nonzero_warnv_p): Don't handle function local objects
39175         here.
39177         PR c++/72813
39178         * gcc.c (default_compilers): Don't add -o %g.s for -S -save-temps
39179         of c-header.
39181 2017-01-11  David Malcolm  <dmalcolm@redhat.com>
39183         PR driver/78877
39184         * opts.c: Include "spellcheck.h"
39185         (struct string_fragment): New struct.
39186         (struct edit_distance_traits<const string_fragment &>): New
39187         struct.
39188         (get_closest_sanitizer_option): New function.
39189         (parse_sanitizer_options): Offer suggestions for unrecognized arguments.
39191 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
39193         * dwarf2out.c (DWARF_COMPILE_UNIT_HEADER_SIZE): For DWARF5 decrease
39194         by 12.
39195         (DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE): Always
39196         DWARF_COMPILE_UNIT_HEADER_SIZE plus 12.
39197         (DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE): Define.
39198         (calc_base_type_die_sizes): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE
39199         for initial die_offset if dwarf_split_debug_info.
39200         (output_comp_unit): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE for
39201         initial next_die_offset if dwo_id is non-NULL.  Don't emit padding
39202         fields.
39203         (output_skeleton_debug_sections): Formatting fix.  Use
39204         DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE instead of
39205         DWARF_COMPILE_UNIT_HEADER_SIZE.  Don't emit padding.
39207 2017-01-11  Wilco Dijkstra  <wdijkstr@arm.com>
39209         * config/arm/cortex-a53.md: Add bypasses for
39210         cortex_a53_r2f_cvt.
39211         (cortex_a53_r2f): Only use for transfers.
39212         (cortex_a53_f2r): Likewise.
39213         (cortex_a53_r2f_cvt): Add reservation for conversions.
39214         (cortex_a53_f2r_cvt): Likewise.
39216 2017-01-11  Tamar Christina  <tamar.christina@arm.com>
39218         * config/arm/arm_neon.h: Add __artificial__ and gnu_inline
39219         to all inlined functions, change static to extern.
39221 2017-01-11  Christophe Lyon  <christophe.lyon@linaro.org>
39223         PR target/78253
39224         * config/arm/arm.c (legitimize_pic_address): Handle reference to
39225         weak symbol.
39226         (arm_assemble_integer): Likewise.
39228 2017-01-11  Richard Earnshaw  <rearnsha@arm.com>
39230         * config.gcc: Use new awk script to check CPU, FPU and architecture
39231         parameters for --with-... options.
39232         * config/arm/parsecpu.awk: New file
39233         * config/arm/arm-cpus.in: New file.
39234         * config/arm/arm-opts.h: Include arm-cpu.h instead of processing .def
39235         files.
39236         * config/arm/arm.c: Include arm-cpu-data.h instead of processing .def
39237         files.
39238         * config/arm/t-arm: Update dependency rules.
39239         * common/config/arm/arm-common.c: Include arm-cpu-cdata.h instead
39240         of processing .def files.
39241         * config/arm/genopt.sh: Deleted.
39242         * config/arm/gentune.sh: Deleted.
39243         * config/arm/arm-cores.def: Deleted.
39244         * config/arm/arm-arches.def: Deleted.
39245         * config/arm/arm-fpus.def: Deleted.
39246         * config/arm/arm-tune.md: Regenerated.
39247         * config/arm/arm-tables.opt: Regenerated.
39248         * config/arm/arm-cpu.h: New generated file.
39249         * config/arm/arm-cpu-data.h: New generated file.
39250         * config/arm/arm-cpu-cdata.h: New generated file.
39252 2017-01-11  Maxim Ostapenko  <m.ostapenko@samsung.com>
39254         PR lto/79042
39255         * lto-cgraph.c (lto_output_varpool_node): Pack dynamically_initialized
39256         bit.
39257         (input_varpool_node): Unpack dynamically_initialized bit.
39259 2017-01-11  Eric Botcazou  <ebotcazou@adacore.com>
39261         PR rtl-optimization/79032
39262         * lra-constraints.c (simplify_operand_subreg): In the MEM case, test
39263         the alignment of the adjusted memory reference against that of MODE,
39264         instead of the alignment of the original memory reference.
39266 2017-01-11  Martin Jambor  <mjambor@suse.cz>
39268         * hsa.c (hsa_callable_function_p): Revert addition of DECL_ARTIFICIAL
39269         test.
39270         * ipa-hsa.c (process_hsa_functions): Only duplicate non-artificial
39271         decorated functions.
39273 2017-01-11  Richard Biener  <rguenther@suse.de>
39275         * tree-vrp.c (evrp_dom_walker::before_dom_children): Also
39276         set range/nonnull info for PHI results.  Do not set it on
39277         stmts marked for removal.
39279 2017-01-10  Eric Botcazou  <ebotcazou@adacore.com>
39281         * expr.c (store_field): In the bitfield case, fetch the return value
39282         from the registers before applying a single big-endian adjustment.
39283         Always do a final load for a BLKmode value not larger than a word.
39285 2017-01-10  David Malcolm  <dmalcolm@redhat.com>
39287         PR c++/77949
39288         * input.c (selftest::test_accessing_ordinary_linemaps): Verify
39289         that we correctly handle column numbers greater than
39290         LINE_MAP_MAX_COLUMN_NUMBER.
39292 2017-01-10  Martin Sebor  <msebor@redhat.com>
39294         PR middle-end/78245
39295         * gimple-ssa-sprintf.c (get_destination_size): Call
39296         {init,fini}object_sizes.
39297         * tree-object-size.c (addr_object_size): Adjust.
39298         (pass_through_call): Adjust.
39299         (pass_object_sizes::execute): Adjust.
39300         * tree-object-size.h (fini_object_sizes): Declare.
39302 2017-01-10  Martin Sebor  <msebor@redhat.com>
39304         PR tree-optimization/78775
39305         * builtins.c (get_size_range): Move...
39306         * calls.c: ...to here.
39307         (alloc_max_size): Accept zero argument.
39308         (operand_signed_p): Remove.
39309         (maybe_warn_alloc_args_overflow): Call get_size_range.
39310         * calls.h (get_size_range): Declare.
39312 2017-01-10  Joe Seymour  <joe.s@somniumtech.com>
39314         * config/msp430/driver-msp430.c (msp430_mcu_data): Sync with data
39315         from TI's devices.csv file as of September 2016.
39316         * config/msp430/msp430.c (msp430_mcu_data): Likewise.
39318 2017-01-10  Sandra Loosemore  <sandra@codesourcery.com>
39320         * doc/extend.texi: Tweak formatting to fix overfull hbox warnings.
39321         * doc/invoke.texi: Likewise.
39322         * doc/md.texi: Likewise.
39323         * doc/objc.texi: Likewise.
39325 2017-01-10  Joshua Conner  <joshconner@google.com>
39327         * config/arm/fuchsia-elf.h: New file.
39328         * config/fuchsia.h: New file.
39329         * config.gcc (*-*-fuchsia*): Set native_system_header_dir.
39330         (aarch64*-*-fuchsia*, arm*-*-fuchsia*, x86_64-*-fuchsia*): Add to
39331         targets.
39332         * config.host: (aarch64*-*-fuchsia*, arm*-*-fuchsia*): Add to hosts.
39334 2016-01-10  Richard Biener  <rguenther@suse.de>
39336         PR tree-optimization/79034
39337         * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
39338         Propagate out degenerate PHIs in the joiner.
39340 2017-01-10  Martin Liska  <mliska@suse.cz>
39342         * ipa-icf.c (sort_sem_items_by_decl_uid): New function.
39343         (sort_congruence_classes_by_decl_uid): Likewise.
39344         (sort_congruence_class_groups_by_decl_uid): Likewise.
39345         (sem_item_optimizer::merge_classes): Sort class, groups in these
39346         classes and members in the groups by DECL_UID of declarations.
39347         This would make merge operations stable.
39349 2017-01-10  Martin Liska  <mliska@suse.cz>
39351         * ipa-icf.c (sem_item_optimizer::sem_item_optimizer): Remove
39352         usage of m_classes_vec.
39353         (sem_item_optimizer::~sem_item_optimizer):  Likewise.
39354         (sem_item_optimizer::get_group_by_hash): Likewise.
39355         (sem_item_optimizer::subdivide_classes_by_equality): Likewise.
39356         (sem_item_optimizer::subdivide_classes_by_sensitive_refs): Likewise.
39357         (sem_item_optimizer::verify_classes): Likewise.
39358         (sem_item_optimizer::process_cong_reduction): Likewise.
39359         (sem_item_optimizer::dump_cong_classes): Likewise.
39360         (sem_item_optimizer::merge_classes): Likewise.
39361         * ipa-icf.h (congruence_class_hash): Rename from
39362         congruence_class_group_hash.  Remove declaration of m_classes_vec.
39364 2017-01-10  Andrew Senkevich  <andrew.senkevich@intel.com>
39366         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VPOPCNTDQ_SET,
39367         OPTION_MASK_ISA_AVX512VPOPCNTDQ_UNSET): New.
39368         * config.gcc: Add avx512vpopcntdqintrin.h.
39369         * config/i386/avx512vpopcntdqintrin.h: New.
39370         * config/i386/cpuid.h (bit_AVX512VPOPCNTDQ): New.
39371         * config/i386/i386-builtin-types.def: Add new types.
39372         * config/i386/i386-builtin.def (__builtin_ia32_vpopcountd_v16si,
39373         __builtin_ia32_vpopcountd_v16si_mask, __builtin_ia32_vpopcountq_v8di,
39374         __builtin_ia32_vpopcountq_v8di_mask): New.
39375         * config/i386/i386-c.c (ix86_target_macros_internal): Define
39376         __AVX512VPOPCNTDQ__.
39377         * config/i386/i386.c (ix86_target_string): Add -mavx512vpopcntdq.
39378         (PTA_AVX512VPOPCNTDQ): Define.
39379         * config/i386/i386.h (TARGET_AVX512VPOPCNTDQ,
39380         TARGET_AVX512VPOPCNTDQ_P): Define.
39381         * config/i386/i386.opt: Add mavx512vpopcntdq.
39382         * config/i386/immintrin.h: Include avx512vpopcntdqintrin.h.
39383         * config/i386/sse.md (define_insn "vpopcount<mode><mask_name>"): New.
39385 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
39387         PR middle-end/77484
39388         * predict.def (PRED_CALL): Set to 67.
39390 2017-01-09  Eric Botcazou  <ebotcazou@adacore.com>
39392         * expr.c (store_field): In the bitfield case, if the value comes from
39393         a function call and is of an aggregate type returned in registers, do
39394         not modify the field mode; extract the value in all cases if the mode
39395         is BLKmode and the size is not larger than a word.
39397 2017-01-09  Dominique d'Humieres  <dominiq@lps.ens.fr>
39399         PR target/71017
39400         * config/i386/cpuid.h: Fix undefined behavior.
39402 2017-01-04  Jeff Law  <law@redhat.com>
39404         PR tree-optimization/79007
39405         PR tree-optimization/67955
39406         * tree-ssa-alias.c (same_addr_size_stores_p): Only need to be
39407         conservative for pt.null when flag_non_call_exceptions is on.
39409 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
39411         PR translation/79019
39412         PR translation/79020
39413         * params.def (PARAM_INLINE_MIN_SPEEDUP,
39414         PARAM_IPA_CP_SINGLE_CALL_PENALTY,
39415         PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD): Fix typos
39416         in descriptions.
39417         * config/avr/avr.opt (maccumulate-args): Likewise.
39418         * config/msp430/msp430.opt (mwarn-mcu): Likewise.
39419         * common.opt (freport-bug): Likewise.
39420         * cif-code.def (CIF_FINAL_ERROR): Likewise.
39421         * doc/invoke.texi (ipa-cp-single-call-penalty): Likewise.
39422         * config/s390/s390.c (s390_invalid_binary_op): Fix spelling in
39423         translatable string.
39424         * config/i386/i386.c (function_value_32): Likewise.
39425         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Likewise.
39426         * config/msp430/msp430.c (msp430_option_override, msp430_attr):
39427         Likewise.
39428         * config/msp430/driver-msp430.c (msp430_select_hwmult_lib): Likewise.
39429         * common/config/msp430/msp430-common.c (msp430_handle_option):
39430         Likewise.
39431         * symtab.c (symtab_node::verify_base): Likewise.
39432         * opts.c (set_debug_level): Likewise.
39433         * tree.c (verify_type_variant): Likewise.  Fix typo in comment.
39434         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add
39435         missing whitespace to translatable strings.
39436         * config/avr/avr.md (bswapsi2): Fix typo in comment.
39437         * config/sh/superh.h: Likewise.
39438         * config/i386/xopintrin.h: Likewise.
39439         * config/i386/znver1.md: Likewise.
39440         * config/rs6000/rs6000.c (struct rs6000_opt_mask): Likewise.
39441         * ipa-inline-analysis.c (compute_inline_parameters): Likewise.
39442         * double-int.h (struct double_int): Likewise.
39443         * double-int.c (div_and_round_double): Likewise.
39444         * wide-int.cc: Likewise.
39445         * tree-ssa.c (non_rewritable_mem_ref_base): Likewise.
39446         * tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise.
39447         * cfgcleanup.c (crossjumps_occured): Renamed to ...
39448         (crossjumps_occurred): ... this.
39449         (try_crossjump_bb, try_head_merge_bb, try_optimize_cfg, cleanup_cfg):
39450         Adjust all uses.
39452         PR tree-optimization/78899
39453         * tree-if-conv.c (version_loop_for_if_conversion): Instead of
39454         returning bool return struct loop *, NULL for failure and the new
39455         loop on success.
39456         (versionable_outer_loop_p): Don't version outer loop if it has
39457         dont_vectorized bit set.
39458         (tree_if_conversion): When versioning outer loop, ensure
39459         tree_if_conversion is performed also on the inner loop of the
39460         non-vectorizable outer loop copy.
39461         * tree-vectorizer.c (set_uid_loop_bbs): Formatting fix.  Fold
39462         LOOP_VECTORIZED in inner loop of the scalar outer loop and
39463         prevent vectorization of it.
39464         (vectorize_loops): For outer + inner LOOP_VECTORIZED, ensure
39465         the outer loop vectorization of the non-scalar version is attempted
39466         before vectorization of the inner loop in scalar version.  If
39467         outer LOOP_VECTORIZED guarded loop is not vectorized, prevent
39468         vectorization of its inner loop.
39469         * tree-vect-loop-manip.c (rename_variables_in_bb): If outer_loop
39470         has 2 inner loops, rename also on edges from bb whose single pred
39471         is outer_loop->header.  Fix typo in function comment.
39473 2017-01-09  Martin Sebor  <msebor@redhat.com>
39475         PR bootstrap/79033
39476         * asan.c (asan_emit_stack_protection): Increase local buffer size
39477         to avoid snprintf truncation warning.
39479 2017-01-09  Andrew Pinski  <apinski@cavium.com>
39481         * config/aarch64/aarch64-cores.def: Add thunderx2t99.  Change vulcan
39482         to reference thunderx2t99 for the tuning structure
39483         * config/aarch64/aarch64-cost-tables.h (vulcan_extra_costs):
39484         Rename to ...
39485         (thunderx2t99_extra_costs): This.
39486         * config/aarch64/aarch64-tune.md: Regenerate.
39487         * config/aarch64/aarch64.c (vulcan_addrcost_table): Rename to ...
39488         (vulcan_addrcost_table): This.
39489         (vulcan_regmove_cost): Rename to ...
39490         (thunderx2t99_regmove_cost): This.
39491         (vulcan_vector_cost): Rename to ...
39492         (thunderx2t99_vector_cost): this.
39493         (vulcan_branch_cost): Rename to ...
39494         (thunderx2t99_branch_cost): This.
39495         (vulcan_tunings): Rename to ...
39496         (thunderx2t99_tunings): This and s/vulcan/thunderx2t99 .
39497         * doc/invoke.texi (AARCH64/mtune): Add thunderx2t99.
39499 2017-01-09  Martin Jambor  <mjambor@suse.cz>
39501         PR ipa/78365
39502         PR ipa/78599
39503         * ipa-prop.h (ipa_jump_func): Swap positions of vr_known and m_vr.
39504         * ipa-cp.c (ipa_vr_operation_and_type_effects): New function.
39505         (propagate_vr_accross_jump_function): Use the above function for all
39506         value range computations for pass-through jump functions and type
39507         converasion from explicit value range values.
39508         (ipcp_propagate_stage): Do not attempt to deduce types of formal
39509         parameters from TYPE_ARG_TYPES.
39510         * ipa-prop.c (ipa_write_jump_function): Remove trailing whitespace.
39511         (ipa_write_node_info): Stream type of the actual argument.
39512         (ipa_read_node_info): Likewise. Also remove trailing whitespace.
39514 2017-01-09  Martin Liska  <mliska@suse.cz>
39516         PR pch/78970
39517         * gcc.c (driver_handle_option): Handle OPT_E and set have_E.
39518         (lookup_compiler): Do not show error message with have_E.
39520 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
39522         PR tree-optimization/78938
39523         * tree-vect-stmts.c (vectorizable_condition): For non-masked COND_EXPR
39524         where comp_vectype is VECTOR_BOOLEAN_TYPE_P, use
39525         BIT_{NOT,XOR,AND,IOR}_EXPR on the comparison operands instead of
39526         {EQ,NE,GE,GT,LE,LT}_EXPR directly inside of VEC_COND_EXPR.  Formatting
39527         fixes.
39529 2017-01-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
39531         * tree-ssa-address.c (gen_addr_rtx): Don't handle index if it
39532         is const0_rtx.
39534 2017-01-09  Richard Biener  <rguenther@suse.de>
39536         PR tree-optimization/78997
39537         * tree-vect-slp.c (vect_mask_constant_operand_p): Handle SSA
39538         name condition properly.
39540 2017-01-09  Richard Biener  <rguenther@suse.de>
39542         PR debug/79000
39543         * dwarf2out.c (is_cxx): New overload with context.
39544         (is_naming_typedef_decl): Use it.
39546 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
39548         * invoke.texi (Option Summary): Correct spacing in option lists
39549         and add line breaks to fix over-long lines.
39551 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
39553         PR middle-end/17660
39555         * extend.texi (Common Variable Attributes): Add xref to GCC
39556         Internals manual to explain mode attribute keywords.
39558 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
39560         PR other/16519
39561         * doc/invoke.texi (Option Summary): Move -pthread to Linker Options
39562         and Preprocessor Options.
39563         (Options for Linking): Document -pthread here....
39564         (RS/6000 and PowerPC Options): ...not here.
39565         (Solaris 2 Options): ...or here.
39566         * doc/cppopts.texi: Document -pthread.
39568 2017-01-08  Martin Sebor  <msebor@redhat.com>
39570         PR middle-end/77708
39571         * doc/invoke.texi (Warning Options): Document -Wformat-truncation.
39572         * gimple-ssa-sprintf.c (call_info::reval_used, call_info::warnopt):
39573         New member functions.
39574         (format_directive): Used them.
39575         (add_bytes): Same.
39576         (pass_sprintf_length::handle_gimple_call): Same.
39577         * graphite-sese-to-poly.c (tree_int_to_gmp): Increase buffer size
39578         to avoid truncation for any argument.
39579         (extract_affine_mul): Same.
39580         * tree.c (get_file_function_name): Same.
39582 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
39584         PR middle-end/77484
39585         * predict.def (PRED_INDIR_CALL): Set to 86.
39587 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
39589         PR preprocessor/54124
39590         * doc/cppopts.texi: Reformat -d subtable to list the full name
39591         of the options.  Add cross-reference to the docs for the general
39592         compiler -d options.
39593         * doc/invoke.texi (Developer Options): Add cross-reference to the
39594         preprocessor-specific -d option documentation.
39596 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
39598         PR preprocessor/13498
39599         * doc/cpp.texi (Search Path): Rewrite to remove obsolete and
39600         redudant material, and reflect new command-line options.
39601         (System Headers): Likewise.
39603 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
39605         * doc/cppdiropts.texi: Merge documentation of -I, -iquote,
39606         -isystem, and -idirafter.  Copy-edit.
39607         * doc/cppopts.texi: Copy-edit.  Remove contradiction about
39608         default for -ftrack-macro-expansion.  Delete obsolete and
39609         badly-formatted implementation details about -fdebug-cpp output.
39610         * doc/cppwarnopts.texi: Copy-edit.
39612 2017-01-07  David Malcolm  <dmalcolm@redhat.com>
39614         PR c++/72803
39615         * input.c (selftest::test_accessing_ordinary_linemaps): Verify
39616         that the transition from a max line width >= 1<<10 to narrower
39617         lines works correctly.
39619 2017-01-07  Alexandre Oliva  <aoliva@redhat.com>
39621         * doc/options.texi (PerFunction): New.
39622         * opt-functions.awk (switch_flags): Map both Optimization and
39623         PerFunction to CL_OPTIMIZATION.
39624         * opth-gen.awk: Test for PerFunction flag along with
39625         Optimization.
39626         * optc-save-gen.awk: Likewise.  Introduce var_opt_hash and set
39627         it only when the latter is present.  Skip those that don't in
39628         the hash function generator.
39629         * common.opt (fvar-tracking): Mark as PerFunction instead of
39630         Optimization.
39631         (fvar-tracking-assignments): Likewise.
39632         (fvar-tracking-assignments-toggle): Likewise.
39633         (fvar-tracking-uninit): Likewise.
39635 2017-01-07  Jakub Jelinek  <jakub@redhat.com>
39637         PR translation/79018
39638         * params.def (PARAM_MAX_STORES_TO_MERGE): Add missing space between
39639         the and store.
39641 2017-01-06  Mikael Pettersson  <mikpelinux@gmail.com>
39643         PR target/57583
39644         * config/m68k/m68k.opt (LONG_JUMP_TABLE_OFFSETS): New option.
39645         * config/m68k/linux.h (ASM_RETURN_CASE_JUMP): Handle
39646         TARGET_LONG_JUMP_TABLE_OFFSETS.
39647         * config/m68k/m68kelf.h (ASM_RETURN_CASE_JUMP): Likewise.
39648         * config/m68k/netbsd-elf.h (ASM_RETURN_CASE_JUMP): Likewise.
39649         * config/m68k/m68k.h (CASE_VECTOR_MODE): Likewise.
39650         (ASM_OUTPUT_ADDR_DIFF_ELF): Likewise.
39651         * config/m68k/m68k.md (tablejump expander): Likewise.
39652         (*tablejump_pcrel_hi): Renamed from unnamed insn, reject
39653         TARGET_LONG_JUMP_TABLE_OFFSETS.
39654         (*tablejump_pcrel_si): New insn, handle TARGET_LONG_JUMP_TABLE_OFFSETS.
39655         * doc/invoke.texi (M68K options): Add -mlong-jump-table-offsets.
39657 2017-01-06  Edgar E. Iglesias <edgar.iglesias@xilinx.com>
39658             David Holsgrove <david.holsgrove@xilinx.com>
39660         * common/config/microblaze/microblaze-common.c
39661         (TARGET_EXCEPT_UNWIND_INFO): Remove.
39662         * config/microblaze/microblaze-protos.h (microblaze_eh_return):
39663         New prototype.
39664         * config/microblaze/microblaze.c (microblaze_must_save_register)
39665         (microblaze_expand_epilogue, microblaze_return_addr): Handle
39666         calls_eh_return.
39667         (microblaze_eh_return): New function.
39668         * config/microblaze/microblaze.h (RETURN_ADDR_OFFSET)
39669         (EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM)
39670         (EH_RETURN_STACKADJ_RTX, ASM_PREFERRED_EH_DATA_FORMAT): New macros.
39671         * config/microblaze/microblaze.md (eh_return): New pattern.
39673 2017-01-06  Jakub Jelinek  <jakub@redhat.com>
39675         * system.h (GCC_DIAGNOSTIC_PUSH_IGNORED, GCC_DIAGNOSTIC_POP,
39676         GCC_DIAGNOSTIC_STRINGIFY): Define.
39678         * read-rtl.c (rtx_reader::read_rtx_code): Avoid -Wsign-compare warning.
39680 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
39682         * config/arm/arm.md (<mcrr>): New.
39683         (<mrrc>): New.
39684         * config/arm/arm.c (arm_arch5te): New.
39685         (arm_option_override): Set arm_arch5te.
39686         (arm_coproc_builtin_available): Add support for mcrr, mcrr2, mrrc
39687         and mrrc2.
39688         * config/arm/arm-builtins.c (MCRR_QUALIFIERS): Define to...
39689         (arm_mcrr_qualifiers): ... this. New.
39690         (MRRC_QUALIFIERS): Define to...
39691         (arm_mrrc_qualifiers): ... this. New.
39692         * config/arm/arm_acle.h (__arm_mcrr, __arm_mcrr2, __arm_mrrc,
39693         __arm_mrrc2): New.
39694         * config/arm/arm_acle_builtins.def (mcrr, mcrr2, mrrc, mrrc2): New.
39695         * config/arm/iterators.md (MCRRI, mcrr, MCRR): New.
39696         (MRRCI, mrrc, MRRC): New.
39697         * config/arm/unspecs.md (VUNSPEC_MCRR, VUNSPEC_MCRR2, VUNSPEC_MRRC,
39698         VUNSPEC_MRRC2): New.
39700 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
39702         * config/arm/arm.md (<mcr>): New.
39703         (<mrc>): New.
39704         * config/arm/arm.c (arm_coproc_builtin_available): Add
39705         support for mcr, mrc, mcr2 and mrc2.
39706         * config/arm/arm-builtins.c (MCR_QUALIFIERS): Define to...
39707         (arm_mcr_qualifiers): ... this. New.
39708         (MRC_QUALIFIERS): Define to ...
39709         (arm_mrc_qualifiers): ... this. New.
39710         (MCR_QUALIFIERS): Define to ...
39711         (arm_mcr_qualifiers): ... this. New.
39712         * config/arm/arm_acle.h (__arm_mcr, __arm_mrc, __arm_mcr2,
39713         __arm_mrc2): New.
39714         * config/arm/arm_acle_builtins.def (mcr, mcr2, mrc, mrc2): New.
39715         * config/arm/iterators.md (MCRI, mcr, MCR, MRCI, mrc, MRC): New.
39716         * config/arm/unspecs.md (VUNSPEC_MCR, VUNSPEC_MCR2, VUNSPEC_MRC,
39717         VUNSPEC_MRC2): New.
39719 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
39721         * config/arm/arm.md (*ldc): New.
39722         (*stc): New.
39723         (<ldc>): New.
39724         (<stc>): New.
39725         * config/arm/arm.c (arm_coproc_builtin_available): Add
39726         support for ldc,ldcl,stc,stcl,ldc2,ldc2l,stc2 and stc2l.
39727         (arm_coproc_ldc_stc_legitimate_address): New.
39728         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
39729         'qualifier_const_pointer'.
39730         (LDC_QUALIFIERS): Define to...
39731         (arm_ldc_qualifiers): ... this. New.
39732         (STC_QUALIFIERS): Define to...
39733         (arm_stc_qualifiers): ... this. New.
39734         * config/arm/arm-protos.h
39735         (arm_coproc_ldc_stc_legitimate_address): New.
39736         * config/arm/arm_acle.h (__arm_ldc, __arm_ldcl, __arm_stc,
39737         __arm_stcl, __arm_ldc2, __arm_ldc2l, __arm_stc2, __arm_stc2l): New.
39738         * config/arm/arm_acle_builtins.def (ldc, ldc2, ldcl, ldc2l, stc,
39739         stc2, stcl, stc2l): New.
39740         * config/arm/constraints.md (Uz): New.
39741         * config/arm/iterators.md (LDCI, STCI, ldc, stc, LDC STC): New.
39742         * config/arm/unspecs.md (VUNSPEC_LDC, VUNSPEC_LDC2, VUNSPEC_LDCL,
39743         VUNSPEC_LDC2L, VUNSPEC_STC, VUNSPEC_STC2, VUNSPEC_STCL,
39744         VUNSPEC_STC2L): New.
39746 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
39748         * config/arm/arm.md (<cdp>): New.
39749         * config/arm/arm.c (neon_const_bounds): Rename this ...
39750         (arm_const_bounds): ... this.
39751         (arm_coproc_builtin_available): New.
39752         * config/arm/arm-builtins.c (SIMD_MAX_BUILTIN_ARGS): Increase.
39753         (arm_type_qualifiers): Add 'qualifier_unsigned_immediate'.
39754         (CDP_QUALIFIERS): Define to...
39755         (arm_cdp_qualifiers): ... this. New.
39756         (void_UP): Define.
39757         (arm_expand_builtin_args): Add case for 6 arguments.
39758         * config/arm/arm-protos.h (neon_const_bounds): Rename this ...
39759         (arm_const_bounds): ... this.
39760         (arm_coproc_builtin_available): New.
39761         * config/arm/arm_acle.h (__arm_cdp): New.
39762         (__arm_cdp2): New.
39763         * config/arm/arm_acle_builtins.def (cdp): New.
39764         (cdp2): New.
39765         * config/arm/iterators.md (CDPI,CDP,cdp): New.
39766         * config/arm/neon.md: Rename all 'neon_const_bounds' to
39767         'arm_const_bounds'.
39768         * config/arm/types.md (coproc): New.
39769         * config/arm/unspecs.md (VUNSPEC_CDP, VUNSPEC_CDP2): New.
39770         * doc/extend.texi (ACLE): Add a mention of Coprocessor intrinsics.
39771         * doc/sourcebuild.texi (arm_coproc1_ok, arm_coproc2_ok,
39772         arm_coproc3_ok, arm_coproc4_ok): Document new effective targets.
39774 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
39776         * config/arm/arm-builtins.c (arm_unsigned_binop_qualifiers): New.
39777         (UBINOP_QUALIFIERS): New.
39778         (si_UP): Define.
39779         (acle_builtin_data): New. Change comment.
39780         (arm_builtins): Remove ARM_BUILTIN_CRC32B, ARM_BUILTIN_CRC32H,
39781         ARM_BUILTIN_CRC32W, ARM_BUILTIN_CRC32CB, ARM_BUILTIN_CRC32CH,
39782         ARM_BUILTIN_CRC32CW. Add ARM_BUILTIN_ACLE_BASE and include
39783         arm_acle_builtins.def.
39784         (ARM_BUILTIN_ACLE_PATTERN_START): Define.
39785         (arm_init_acle_builtins): New.
39786         (CRC32_BUILTIN): Remove.
39787         (bdesc_2arg): Remove entries for crc32b, crc32h, crc32w,
39788         crc32cb, crc32ch and crc32cw.
39789         (arm_init_crc32_builtins): Remove.
39790         (arm_init_builtins): Use arm_init_acle_builtins rather
39791         than arm_init_crc32_builtins.
39792         (arm_expand_acle_builtin): New.
39793         (arm_expand_builtin): Use 'arm_expand_acle_builtin'.
39794         * config/arm/arm_acle_builtins.def: New.
39796 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
39798         * config/arm/arm-builtins.c (neon_builtin_datum): Rename to ..
39799         (arm_builtin_datum): ... this.
39800         (arm_init_neon_builtin): Rename to ...
39801         (arm_init_builtin): ... this. Add a new parameters PREFIX
39802         and USE_SIG_IN_NAME.
39803         (arm_init_neon_builtins): Replace 'arm_init_neon_builtin' with
39804         'arm_init_builtin'. Replace type 'neon_builtin_datum' with
39805         'arm_builtin_datum'.
39806         (arm_init_vfp_builtins): Likewise.
39807         (builtin_arg): Rename enum's replacing 'NEON_ARG' with
39808         'ARG_BUILTIN' and add a 'ARG_BUILTIN_NEON_MEMORY.
39809         (arm_expand_neon_args): Rename to ...
39810         (arm_expand_builtin_args): ... this. Rename builtin_arg
39811         enum values and differentiate between ARG_BUILTIN_MEMORY
39812         and ARG_BUILTIN_NEON_MEMORY.
39813         (arm_expand_neon_builtin_1): Rename to ...
39814         (arm_expand_builtin_1): ... this. Rename builtin_arg enum
39815         values, arm_expand_builtin_args and add bool parameter NEON.
39816         (arm_expand_neon_builtin): Use arm_expand_builtin_1.
39817         (arm_expand_vfp_builtin): Likewise.
39818         (NEON_MAX_BUILTIN_ARGS): Remove, it was unused.
39820 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
39822         PR middle-end/77484
39823         * predict.def (PRED_POLYMORPHIC_CALL): Set to 59.
39824         * predict.c (tree_estimate_probability_bb): Reverse direction of
39825         polymorphic call predictor.
39827 2017-01-06  David Malcolm  <dmalcolm@redhat.com>
39829         * passes.c (execute_one_pass): Split out pass-skipping logic into...
39830         (determine_pass_name_match): ...this new function and...
39831         (should_skip_pass_p): ...this new function.
39833 2017-01-06  Nathan Sidwell  <nathan@acm.org>
39835         * ipa-visibility.c (function_and_variable_visibility): Reformat
39836         comments and long lines.  Remove extrneous if.
39837         * symtab.c (symtab_node::make_decl_local): Fix code format.
39838         (symtab_node::set_section_for_node): Fix comment typo.
39840 2017-01-06  Martin Liska  <mliska@suse.cz>
39842         PR bootstrap/79003
39843         * lra-constraints.c: Rename invariant to lra_invariant.
39844         * predict.c (set_even_probabilities): Initialize e to NULL.
39846 2017-01-05  Martin Sebor  <msebor@redhat.com>
39848         PR tree-optimization/78910
39849         * gimple-ssa-sprintf.c (tree_digits): Add an argument.
39850         (format_integer): Correct off-by-one error in the handling
39851         of precision with negative numbers in signed conversions..
39853 2017-01-05  Eric Botcazou  <ebotcazou@adacore.com>
39855         * doc/invoke.texi (C Dialect Options): Adjust -fsso-struct entry.
39857 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
39859         PR tree-optimization/71016
39860         * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Pass cond_stmt to
39861         factor_out_conditional_conversion.  Formatting fix.
39862         (factor_out_conditional_conversion): Add cond_stmt argument.
39863         If arg1 is INTEGER_CST, punt if new_arg0 is not any operand of
39864         cond_stmt and if arg0_def_stmt is not the only stmt in its bb.
39865         Formatting fix.
39867 2017-01-05  David Malcolm  <dmalcolm@redhat.com>
39869         * Makefile.in (OBJS): Add read-md.o, read-rtl.o,
39870         read-rtl-function.o, and selftest-rtl.o.
39871         * config/aarch64/aarch64.c: Include selftest.h and selftest-rtl.h.
39872         (selftest::aarch64_test_loading_full_dump): New function.
39873         (selftest::aarch64_run_selftests): New function.
39874         (TARGET_RUN_TARGET_SELFTESTS): Wire it up to
39875         selftest::aarch64_run_selftests.
39876         * config/i386/i386.c
39877         (selftest::ix86_test_loading_dump_fragment_1): New function.
39878         (selftest::ix86_test_loading_call_insn): New function.
39879         (selftest::ix86_test_loading_full_dump): New function.
39880         (selftest::ix86_test_loading_unspec): New function.
39881         (selftest::ix86_run_selftests): Call the new functions.
39882         * emit-rtl.c (maybe_set_max_label_num): New function.
39883         * emit-rtl.h (maybe_set_max_label_num): New decl.
39884         * function.c (instantiate_decls): Guard call to
39885         instantiate_decls_1 with if (DECL_INITIAL (fndecl)).
39886         * function-tests.c (selftest::verify_three_block_rtl_cfg): Remove
39887         "static".
39888         * gensupport.c (gen_reader::gen_reader): Pass "false"
39889         for new "compact" param of rtx_reader.
39890         * print-rtl.c (rtx_writer::print_rtx_operand): Print "(nil)"
39891         rather than an empty string for NULL strings.
39892         * read-md.c: Potentially include config.h rather than bconfig.h.
39893         Wrap include of errors.h with #ifdef GENERATOR_FILE.
39894         (have_error): New global, copied from errors.c.
39895         (md_reader::read_name): Rename to...
39896         (md_reader::read_name_1): ...this, adding "out_loc" param,
39897         and converting "missing name or number" to returning false, rather
39898         than failing.
39899         (md_reader::read_name): Reimplement in terms of read_name_1.
39900         (md_reader::read_name_or_nil): New function.
39901         (md_reader::read_string): Handle "(nil)" by returning NULL.
39902         (md_reader::md_reader): Add new param "compact".
39903         (md_reader::read_md_files): Wrap with #ifdef GENERATOR_FILE.
39904         (md_reader::read_file): New method.
39905         * read-md.h (md_reader::md_reader): Add new param "compact".
39906         (md_reader::read_file): New method.
39907         (md_reader::is_compact): New accessor.
39908         (md_reader::read_name): Convert return type from void to file_location.
39909         (md_reader::read_name_or_nil): New decl.
39910         (md_reader::read_name_1): New decl.
39911         (md_reader::m_compact): New field.
39912         (noop_reader::noop_reader): Pass "false" for new "compact" param
39913         of rtx_reader.
39914         (rtx_reader::rtx_reader): Add new "compact" param.
39915         (rtx_reader::read_rtx_operand): Make virtual and convert return
39916         type from void to rtx.
39917         (rtx_reader::read_until): New decl.
39918         (rtx_reader::handle_any_trailing_information): New virtual function.
39919         (rtx_reader::postprocess): New virtual function.
39920         (rtx_reader::finalize_string): New virtual function.
39921         (rtx_reader::m_in_call_function_usage): New field.
39922         (rtx_reader::m_reuse_rtx_by_id): New field.
39923         * read-rtl-function.c: New file.
39924         * selftest-rtl.c (selftest::assert_rtx_ptr_eq_at): New function.
39925         * selftest-rtl.h (ASSERT_RTX_PTR_EQ): New macro.
39926         (selftest::verify_three_block_rtl_cfg): New decl.
39927         * read-rtl-function.h: New file.
39928         * read-rtl.c: Potentially include config.h rather than bconfig.h.
39929         For host, include function.h, memmodel.h, and emit-rtl.h.
39930         (one_time_initialization): New function.
39931         (struct compact_insn_name): New struct.
39932         (compact_insn_names): New array.
39933         (find_code): Handle insn codes in compact dumps.
39934         (apply_subst_iterator): Wrap with #ifdef GENERATOR_FILE.
39935         (bind_subst_iter_and_attr): Likewise.
39936         (add_condition_to_string): Likewise.
39937         (add_condition_to_rtx): Likewise.
39938         (apply_attribute_uses): Likewise.
39939         (add_current_iterators): Likewise.
39940         (apply_iterators): Likewise.
39941         (initialize_iterators): Guard usage of apply_subst_iterator with
39942         #ifdef GENERATOR_FILE.
39943         (read_conditions): Wrap with #ifdef GENERATOR_FILE.
39944         (md_reader::read_mapping): Likewise.
39945         (add_define_attr_for_define_subst): Likewise.
39946         (add_define_subst_attr): Likewise.
39947         (read_subst_mapping): Likewise.
39948         (check_code_iterator): Likewise.
39949         (rtx_reader::read_rtx): Likewise.  Move one-time initialization
39950         logic to...
39951         (one_time_initialization): New function.
39952         (rtx_reader::read_until): New method.
39953         (read_flags): New function.
39954         (parse_reg_note_name): New function.
39955         (rtx_reader::read_rtx_code): Initialize "iterator" to NULL.
39956         Handle reuse_rtx ids.
39957         Wrap iterator lookup within #ifdef GENERATOR_FILE.
39958         Add parsing support for RTL dumps, mirroring the special-cases in
39959         print_rtx, by calling read_flags, reading REG_NOTE names, INSN_UID
39960         values, and calling handle_any_trailing_information.
39961         (rtx_reader::read_rtx_operand): Convert return type from void
39962         to rtx, returning return_rtx.  Handle case 'e'.  Call
39963         finalize_string on XSTR and XTMPL fields.
39964         (rtx_reader::read_nested_rtx):  Handle dumps in which trailing
39965          "(nil)" values were omitted.  Call the postprocess vfunc on the
39966         return_rtx.
39967         (rtx_reader::rtx_reader): Add new "compact" param and pass to base
39968         class ctor.  Initialize m_in_call_function_usage.  Call
39969         one_time_initialization.
39970         * rtl-tests.c (selftest::test_uncond_jump): Call
39971         set_new_first_and_last_insn.
39972         * rtl.h (read_rtx): Wrap decl with #ifdef GENERATOR_FILE.
39973         * selftest-rtl.c: New file.
39974         * selftest-rtl.h (class selftest::rtl_dump_test): New class.
39975         (selftest::get_insn_by_uid): New decl.
39976         * selftest-run-tests.c (selftest::run_tests): Call
39977         read_rtl_function_c_tests.
39978         * selftest.h  (selftest::read_rtl_function_c_tests): New decl.
39979         * tree-dfa.c (ssa_default_def): Return NULL_TREE for rtl function
39980         dumps.
39982 2017-01-05  Uros Bizjak  <ubizjak@gmail.com>
39984         * config/i386/i386.md (*testqi_ext_3): No need to handle memory
39985         operands in a special way.  Assert that pos+len <= mode precision.
39987 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
39989         * common.opt (fvect-cost-model): Remove RejectNegative flag, use
39990         3 argument Alias with unlimited for the negative form.
39991         (fno-vect-cost-model): Removed.
39993 2017-01-05  Martin Liska  <mliska@suse.cz>
39995         * hsa-gen.c (gen_hsa_divmod): New function.
39996         (gen_hsa_insn_for_internal_fn_call): Use the function for IFN_DIVMOD.
39998 2017-01-05  Martin Liska  <mliska@suse.cz>
40000         PR pch/78970
40001         * gcc.c (lookup_compiler): Reject '-' filename for a precompiled
40002         header.
40004 2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
40006         * config/s390/s390.c (s390_expand_setmem): Unroll the loop for
40007         small constant length operands.
40009 2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
40011         * config/s390/s390.c (s390_expand_setmem): Avoid overlapping bytes
40012         between loop iterations.
40014 2017-01-05  Martin Liska  <mliska@suse.cz>
40016         PR sanitizer/78815
40017         * gimplify.c (gimplify_decl_expr): Compare to
40018         asan_poisoned_variables instread of checking flags.
40019         (gimplify_target_expr): Likewise.
40020         (gimplify_expr): Likewise.
40021         (gimplify_function_tree): Conditionally initialize
40022         asan_poisoned_variables.
40024 2017-01-04  Jeff Law  <law@redhat.com>
40026         PR tree-optimizatin/78812
40027         * rtl.h (contains_mem_rtx_p): Prototype.
40028         * ifcvt.c (containts_mem_rtx_p): Move from here to...
40029         * rtlanal.c (contains_mem_rtx_p): Here and remove static linkage.
40030         * gcse.c (prune_expressions): Use contains_mem_rtx_p to discover
40031         and prune MEMs that are not at the toplevel of a SET_SRC rtx.  Look
40032         through ZERO_EXTEND and SIGN_EXTEND when trying to avoid pruning MEMs.
40034 2017-01-04  Alexandre Oliva  <aoliva@redhat.com>
40036         * input.c (assert_char_at_range): Default-initialize actual_range.
40038 2017-01-04  Alexandre Oliva  <aoliva@redhat.com>
40040         * df-scan.c (df_ref_create_structure): Make regno unsigned,
40041         to match the caller.
40043 2017-01-04  Alexandre Oliva  <aoliva@redhat.com>
40045         * cfgexpand.c (expand_gimple_basic_block): Disregard debug
40046         insns after final jump in test to emit dummy move.
40048 2017-01-04  Alexandre Oliva  <aoliva@redhat.com>
40050         * gimple-iterator.h (gsi_one_nondebug_before_end_p): New.
40051         * tree-eh.c (cleanup_empty_eh): Skip more debug stmts.
40053 2017-01-04  Alexandre Oliva  <aoliva@redhat.com>
40055         * multiple_target.c (create_dispatcher_calls): Init e_next.
40056         * tree-ssa-loop-split.c (split_loop): Init border.
40057         * tree-vect-loop.c (vect_determine_vectorization_factor): Init
40058         scalar_type.
40060 2017-01-04  Michael Meissner  <meissner@linux.vnet.ibm.com>
40062         PR target/71977
40063         PR target/70568
40064         PR target/78823
40065         * config/rs6000/predicates.md (sf_subreg_operand): New predicate.
40066         (altivec_register_operand): Do not return true if the operand
40067         contains a SUBREG mixing SImode and SFmode.
40068         (vsx_register_operand): Likewise.
40069         (vsx_reg_sfsubreg_ok): New predicate.
40070         (vfloat_operand): Do not return true if the operand contains a
40071         SUBREG mixing SImode and SFmode.
40072         (vint_operand): Likewise.
40073         (vlogical_operand): Likewise.
40074         (gpc_reg_operand): Likewise.
40075         (int_reg_operand): Likewise.
40076         * config/rs6000/rs6000-protos.h (valid_sf_si_move): Add declaration.
40077         * config/rs6000/rs6000.c (valid_sf_si_move): New function to
40078         determine if a MOVSI or MOVSF operation contains SUBREGs that mix
40079         SImode and SFmode.
40080         (rs6000_emit_move_si_sf_subreg): New helper function.
40081         (rs6000_emit_move): Call rs6000_emit_move_si_sf_subreg to possbily
40082         fixup SUBREGs involving SImode and SFmode.
40083         * config/rs6000/vsx.md (SFBOOL_*): New constants that are operand
40084         numbers for the new peephole2 optimization.
40085         (peephole2 for SFmode unions): New peephole2 to optimize cases in
40086         the GLIBC math library that do AND/IOR/XOR operations on single
40087         precision floating point.
40088         * config/rs6000/rs6000.h (TARGET_NO_SF_SUBREG): New internal
40089         target macros to say whether we need to avoid SUBREGs mixing
40090         SImode and SFmode.
40091         (TARGET_ALLOW_SF_SUBREG): Likewise.
40092         * config/rs6000/rs6000.md (UNSPEC_SF_FROM_SI): New unspecs.
40093         (UNSPEC_SI_FROM_SF): Likewise.
40094         (iorxor): Change spacing.
40095         (and_ior_xor): New iterator for AND, IOR, and XOR.
40096         (movsi_from_sf): New insns for SImode/SFmode SUBREG support.
40097         (movdi_from_sf_zero_ext): Likewise.
40098         (mov<mode>_hardfloat, FMOVE32 iterator): Use register_operand
40099         instead of gpc_reg_operand.  Add SImode/SFmode SUBREG support.
40100         (movsf_from_si): New insn for SImode/SFmode SUBREG support.
40101         (fma<mode>4): Use gpc_reg_operand instead of register_operand.
40102         (fms<mode>4): Likewise.
40103         (fnma<mode>4): Likewise.
40104         (fnms<mode>4): Likewise.
40105         (nfma<mode>4): Likewise.
40106         (nfms<mode>4): Likewise.
40108 2017-01-04  Marek Polacek  <polacek@redhat.com>
40110         PR c++/64767
40111         * doc/invoke.texi: Document -Wpointer-compare.
40113 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
40115         * optc-gen.awk: Emit #error for -W*/-f*/-m* Enum without
40116         RejectNegative.
40118         * dwarf2out.c (output_loc_list): Don't throw away 64K+ location
40119         descriptions for -gdwarf-5 and emit them as uleb128 instead of
40120         2-byte data.
40122 2017-01-04  Kelvin Nilsen  <kelvin@gcc.gnu.org>
40124         PR target/78056
40125         * doc/sourcebuild.texi (PowerPC-specific attributes): Add
40126         documentation of the powerpc_popcntb_ok attribute.
40127         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
40128         code to issue warning messages if a requested CPU configuration is
40129         not supported by the binary (assembler and loader) toolchain.
40130         (spe_init_builtins): Add two assertions to prevent ICE if attempt is
40131         made to define a built-in function that has been disabled.
40132         (paired_init_builtins): Add assertion to prevent ICE if attempt is
40133         made to define a built-in function that has been disabled.
40134         (altivec_init_builtins): Add comment explaining why definition
40135         of the DST built-in functions is not preceded by an assertion
40136         check.  Add assertions to prevent ICE if attempts are made to
40137         define an altivec predicate or an abs* built-in function that has
40138         been disabled.
40139         (htm_init_builtins): Add comment explaining why definition of the
40140         htm built-in functions is not preceded by an assertion check.
40142 2017-01-04  Jeff Law  <law@redhat.com>
40144         PR tree-optimizatin/67955
40145         * tree-ssa-alias.c (same_addr_size_stores_p): Check offsets first.
40146         Allow any SSA_VAR_P as the base objects.  Use integer_zerop.  Verify
40147         the points-to solution does not include pt_null.  Use DECL_PT_UID
40148         unconditionally.
40150 2017-01-04  Uros Bizjak  <ubizjak@gmail.com>
40152         * config/i386/i386.md (HI/SImode test with imm to QImode splitters):
40153         Use gen_int_mode instead of gen_lopwart for const_int operands.
40155 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
40157         PR tree-optimization/71563
40158         * match.pd: Simplify X << Y into X if Y is known to be 0 or
40159         out of range value - has low bits known to be zero.
40161 2017-01-04  Alan Modra  <amodra@gmail.com>
40163         * Makefile.in (aclocal_deps): Update and order as per aclocal.m4.
40164         * configure: Regenerate.
40165         * config.in: Regenerate.
40167 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
40169         PR bootstrap/77569
40170         * input.c (ebcdic_execution_charset::on_error): Don't use strstr for
40171         a substring of the message, but strcmp with the whole message.  Ifdef
40172         ENABLE_NLS, translate the message first using dgettext.
40174 2017-01-03  Jeff Law  <law@redhat.com>
40176         PR tree-optimizatin/78856
40177         * tree-ssa-threadupdate.c: Include tree-vectorizer.h.
40178         (mark_threaded_blocks): Remove code to truncate thread paths that
40179         cross multiple loop headers.  Instead invalidate the cached loop
40180         iteration information and handle case of a thread path walking
40181         into an irreducible region.
40183 2017-01-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
40185         PR target/78900
40186         * config/rs6000/rs6000.c (rs6000_split_signbit): Change some
40187         assertions.  Add support for doing the signbit if the IEEE 128-bit
40188         floating point value is in a GPR.
40189         * config/rs6000/rs6000.md (Fsignbit): Delete.
40190         (signbit<mode>2_dm): Delete using <Fsignbit> and just use "wa".
40191         Update the length attribute if the value is in a GPR.
40192         (signbit<mode>2_dm_<su>ext): Add combiner pattern to eliminate
40193         the sign or zero extension instruction, since the value is always 0/1.
40194         (signbit<mode>2_dm2): Delete using <Fsignbit>.
40196         PR target/78953
40197         * config/rs6000/vsx.md (vsx_extract_<mode>_store_p9): If we are
40198         extracting SImode to a GPR register so that we can generate a
40199         store, limit the vector to be in a traditional Altivec register
40200         for the vextuwrx instruction.
40202 2017-01-03  Ian Lance Taylor  <iant@google.com>
40204         * godump.c (go_format_type): Treat ENUMERAL_TYPE like INTEGER_TYPE.
40206 2017-01-03  Martin Sebor  <msebor@redhat.com>
40208         PR tree-optimization/78696
40209         * gimple-ssa-sprintf.c (format_floating): Correct handling of
40210         precision.  Use MPFR for %f for greater fidelity.  Correct handling
40211         of %g.
40212         (pass_sprintf_length::compute_format_length): Set width and precision
40213         specified by asrerisk to void_node for vararg functions.
40214         (try_substitute_return_value): Adjust dump output.
40216 2017-01-03  David Edelsohn  <dje.gcc@gmail.com>
40218         * doc/invoke.texi (RS6000 options): LRA is enabled by default.
40220 2017-01-03  Eric Botcazou  <ebotcazou@adacore.com>
40222         * doc/invoke.texi (SPARC options): Document -mlra as the default.
40223         * config/sparc/sparc.c (sparc_option_override): Force LRA unless
40224         -mlra/-mno-lra was passed to the compiler.
40226 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
40228         PR rtl-optimization/65618
40229         * emit-rtl.c (try_split): Move initialization of "before" and
40230         "after" to just before the call to emit_insn_after_setloc.
40232 2017-01-03  Gerald Pfeifer  <gerald@pfeifer.com>
40234         * doc/md.texi (Standard Names): Remove reference to Java frontend.
40236 2017-01-03  Pierre-Marie de Rodat  <derodat@adacore.com>
40238         * dwarf2out.c (gen_enumeration_type_die): When
40239         -gno-strict-dwarf, add a DW_AT_encoding attribute.
40241 2017-01-03  Jakub Jelinek  <jakub@redhat.com>
40243         PR tree-optimization/78965
40244         * gimple-ssa-sprintf.c (pass_sprintf_length::compute_format_length):
40245         Change first argument from const call_info & to call_info &.  For %n
40246         set info.nowrite to false.
40248         PR middle-end/78901
40249         * gimple-ssa-sprintf.c (try_substitute_return_value): Don't change
40250         possibly throwing calls.
40252         * genmatch.c (dt_node::gen_kids_1): If generic_exprs include SSA_NAME
40253         and exprs_len || fns_len, emit the code for SSA_NAME next to the exprs
40254         and fns handling, rather than in a separate case SSA_NAME.
40256 2017-01-02  Jeff Law  <law@redhat.com>
40258         * config/darwin-driver.c (darwin_driver_init): Const-correctness
40259         fixes for first_period and second_period variables.
40261 2017-01-02  Uros Bizjak  <ubizjak@gmail.com>
40263         PR target/78967
40264         * config/i386/i386.md (UNSPEC_NOREX_MEM): New unspec.
40265         (*insvqi_1): New insn pattern.
40266         (*insvqi_1_mem_rex64): Ditto.
40267         (*insvqi_2): Ditto.
40268         (*insvqi_3): Rename from *insvqi.
40270         (*extzvqi_mem_rex64): Add UNSPEC_NOREX_MEM tag.
40272 2017-01-02  Gerald Pfeifer  <gerald@pfeifer.com>
40274         * doc/cfg.texi (Edges): Remove reference to Java.
40275         (Maintaining the CFG): Ditto.
40277 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
40279         PR middle-end/77674
40280         * symtab.c (symtab_node::binds_to_current_def_p): Fix handling of
40281         transparent aliases.
40283 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
40285         PR middle-end/77484
40286         * predict.def (PRED_CALL): Update hitrate.
40287         (PRED_INDIR_CALL, PRED_POLYMORPHIC_CALL): New predictors.
40288         * predict.c (tree_estimate_probability_bb): Split CALL predictor
40289         into direct/indirect/polymorphic variants.
40291 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
40293         Update copyright years.
40295         * gcc.c (process_command): Update copyright notice dates.
40296         * gcov-dump.c (print_version): Ditto.
40297         * gcov.c (print_version): Ditto.
40298         * gcov-tool.c (print_version): Ditto.
40299         * gengtype.c (create_file): Ditto.
40300         * doc/cpp.texi: Bump @copying's copyright year.
40301         * doc/cppinternals.texi: Ditto.
40302         * doc/gcc.texi: Ditto.
40303         * doc/gccint.texi: Ditto.
40304         * doc/gcov.texi: Ditto.
40305         * doc/install.texi: Ditto.
40306         * doc/invoke.texi: Ditto.
40308 Copyright (C) 2017 Free Software Foundation, Inc.
40310 Copying and distribution of this file, with or without modification,
40311 are permitted in any medium without royalty provided the copyright
40312 notice and this notice are preserved.