[Patch combine] Don't create ZERO_EXTEND from subregs unless we have a scalar int...
[platform/upstream/gcc.git] / gcc / ChangeLog
1 2017-12-21  James Greenhalgh  <james.greenhalgh@arm.com>
2
3         * combine.c (simplify_set): Do not transform subregs to zero_extends
4         if the destination is not a scalar int mode.
5
6 2017-12-21  Eric Botcazou  <ebotcazou@adacore.com>
7
8         PR c++/82872
9         * convert.c (convert_to_integer_1) <POINTER_TYPE>: Do not return the
10         shared zero if the input has overflowed.
11
12 2017-12-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13
14         * config/arm/driver-arm.c (arm_cpu_table): Specify dotprod
15         support for Cortex-A55 and Cortex-A75.
16
17 2017-12-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18
19         * common/config/arm/arm-common.c (compare_opt_names): Add function
20         comment.  Use strcmp instead of manual loop.
21
22 2017-12-21  Martin Liska  <mliska@suse.cz>
23
24         PR gcov-profile/83509
25         * gcov-dump.c (dump_gcov_file): Do not read info about
26         support_unexecuted_blocks for gcda files.
27
28 2017-12-21  Jakub Jelinek  <jakub@redhat.com>
29
30         PR rtl-optimization/82973
31         * emit-rtl.h (valid_for_const_vec_duplicate_p): Rename to ...
32         (valid_for_const_vector_p): ... this.
33         * emit-rtl.c (valid_for_const_vec_duplicate_p): Rename to ...
34         (valid_for_const_vector_p): ... this.  Adjust function comment.
35         (gen_vec_duplicate): Adjust caller.
36         * optabs.c (expand_vector_broadcast): Likewise.
37         * simplify-rtx.c (simplify_const_unary_operation): Don't optimize into
38         CONST_VECTOR if some element isn't simplified valid_for_const_vector_p
39         constant.
40         (simplify_const_binary_operation): Likewise.  Use CONST_FIXED_P macro
41         instead of GET_CODE == CONST_FIXED.
42         (simplify_subreg): Use CONST_FIXED_P macro instead of
43         GET_CODE == CONST_FIXED.
44
45         PR target/83488
46         * config/i386/i386.c (ix86_target_string): Move -mavx512vbmi2 and
47         -mshstk entries from isa_opts2 to isa_opts and -mhle, -mmovbe,
48         -mclzero and -mmwaitx entries from isa_opts to isa_opts2.
49         (ix86_option_override_internal): Adjust for
50         OPTION_MASK_ISA_{HLE,MOVBE,CLZERO,MWAITX} moving to ix86_isa_flags2
51         and OPTION_MASK_ISA_SHSTK moving to ix86_isa_flags.
52         (BDESC_VERIFYS): Remove SPECIAL_ARGS2 related checks.
53         (ix86_init_mmx_sse_builtins): Remove bdesc_special_args2 handling.
54         Use def_builtin2 instead of def_builtin for OPTION_MASK_ISA_MWAITX
55         and OPTION_MASK_ISA_CLZERO builtins.  Use def_builtin instead of
56         def_builtin2 for CET builtins.
57         (ix86_expand_builtin): Remove bdesc_special_args2 handling.  Fix
58         up formatting in IX86_BUILTIN_RDPID code.
59         * config/i386/i386-builtin.def: Move VBMI2 builtins from SPECIAL_ARGS2
60         section to SPECIAL_ARGS and from ARGS2 section to ARGS.
61         * config/i386/i386.opt (mavx512vbmi2, mshstk): Move from
62         ix86_isa_flags2 to ix86_isa_flags.
63         (mhle, mmovbe, mclzero, mmwaitx): Move from ix86_isa_flags to
64         ix86_isa_flags2.
65         * config/i386/i386-c.c (ix86_target_macros_internal): Check for
66         OPTION_MASK_ISA_{CLZERO,MWAITX} in isa_flag2 instead of isa_flag.
67         Check for OPTION_MASK_ISA_{SHSTK,AVX512VBMI2} in isa_flag instead
68         of isa_flag2.
69         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VBMI2_SET):
70         Or in OPTION_MASK_ISA_AVX512F_SET.
71         (OPTION_MASK_ISA_AVX512F_UNSET): Or in
72         OPTION_MASK_ISA_AVX512VBMI2_UNSET.
73         (ix86_handle_option): Adjust for
74         OPTION_MASK_ISA_{SHSTK,AVX512VBMI2}_*SET being in ix86_isa_flags
75         and OPTION_MASK_ISA_{MOVBE,MWAITX,CLZERO}_*SET in ix86_isa_flags2.
76
77 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
78             Alan Hayward  <alan.hayward@arm.com>
79             David Sherwood  <david.sherwood@arm.com>
80
81         * tree-data-ref.h (prune_runtime_alias_test_list): Take the
82         factor as a poly_uint64 rather than an unsigned HOST_WIDE_INT.
83         * tree-data-ref.c (prune_runtime_alias_test_list): Likewise.
84         Track polynomial offsets.
85
86 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
87             Alan Hayward  <alan.hayward@arm.com>
88             David Sherwood  <david.sherwood@arm.com>
89
90         * tree-vect-data-refs.c (vect_compute_data_ref_alignment):
91         Treat drb->init as a poly_int.  Fail if its misalignment wrt
92         vector_alignment isn't known.
93
94 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
95             Alan Hayward  <alan.hayward@arm.com>
96             David Sherwood  <david.sherwood@arm.com>
97
98         * tree-vectorizer.h (_loop_vec_info): Add a versioning_threshold
99         field.
100         (LOOP_VINFO_VERSIONING_THRESHOLD): New macro
101         (vect_loop_versioning): Take the loop versioning threshold as a
102         separate parameter.
103         * tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
104         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
105         versioning_threshold.
106         (vect_analyze_loop_2): Compute the loop versioning threshold
107         whenever loop versioning is needed, and store it in the new
108         field rather than combining it with the cost model threshold.
109         (vect_transform_loop): Update call to vect_loop_versioning.
110         Try to combine the loop versioning and cost thresholds here.
111
112 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
113             Alan Hayward  <alan.hayward@arm.com>
114             David Sherwood  <david.sherwood@arm.com>
115
116         * tree-ssa-loop-ivopts.h (strip_offset): Return the offset as
117         poly_uint64_pod rather than an unsigned HOST_WIDE_INT.
118         * tree-loop-distribution.c (classify_builtin_st): Update accordingly.
119         * tree-ssa-loop-ivopts.c (iv_use::addr_offset): Change from
120         an unsigned HOST_WIDE_INT to a poly_uint64_pod.
121         (group_compare_offset): Update accordingly.
122         (split_small_address_groups_p): Likewise.
123         (record_use): Take addr_offset as a poly_uint64 rather than
124         an unsigned HOST_WIDE_INT.
125         (strip_offset): Return the offset as a poly_uint64 rather than
126         an unsigned HOST_WIDE_INT.
127         (record_group_use, split_address_groups): Track polynomial offsets.
128         (add_iv_candidate_for_use): Likewise.
129         (addr_offset_valid_p): Take the offset as a poly_int64 rather
130         than a HOST_WIDE_INT.
131         (strip_offset_1): Return the offset as a poly_int64 rather than
132         a HOST_WIDE_INT.
133
134 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
135             Alan Hayward  <alan.hayward@arm.com>
136             David Sherwood  <david.sherwood@arm.com>
137
138         * tree.h (get_binfo_at_offset): Take the offset as a poly_int64
139         rather than a HOST_WIDE_INT.
140         * tree.c (get_binfo_at_offset): Likewise.
141
142 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
143             Alan Hayward  <alan.hayward@arm.com>
144             David Sherwood  <david.sherwood@arm.com>
145
146         * ipa-prop.h (build_ref_for_offset): Take the offset as a poly_int64
147         rather than a HOST_WIDE_INT.
148         * tree-sra.c (build_ref_for_offset): Likewise.
149
150 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
151             Alan Hayward  <alan.hayward@arm.com>
152             David Sherwood  <david.sherwood@arm.com>
153
154         * fold-const.h (mem_ref_offset): Return a poly_offset_int rather
155         than an offset_int.
156         * tree.c (mem_ref_offset): Likewise.
157         (build_simple_mem_ref_loc): Treat MEM_REF offsets as poly_ints.
158         * builtins.c (get_object_alignment_2): Likewise.
159         * expr.c (get_inner_reference, expand_expr_real_1): Likewise.
160         * gimple-fold.c (get_base_constructor): Likewise.
161         * gimple-ssa-strength-reduction.c (restructure_reference): Likewise.
162         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref):
163         Likewise.
164         * ipa-polymorphic-call.c
165         (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Likewise.
166         * ipa-prop.c (compute_complex_assign_jump_func): Likewise.
167         (get_ancestor_addr_info): Likewise.
168         * ipa-param-manipulation.c (ipa_get_adjustment_candidate): Likewise.
169         * match.pd: Likewise.
170         * tree-data-ref.c (dr_analyze_innermost): Likewise.
171         * tree-dfa.c (get_addr_base_and_unit_offset_1): Likewise.
172         * tree-eh.c (tree_could_trap_p): Likewise.
173         * tree-object-size.c (addr_object_size): Likewise.
174         * tree-ssa-address.c (copy_ref_info): Likewise.
175         * tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Likewise.
176         (indirect_refs_may_alias_p): Likewise.
177         * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise.
178         * tree-ssa.c (maybe_rewrite_mem_ref_base): Likewise.
179         (non_rewritable_mem_ref_base): Likewise.
180         * tree-vect-data-refs.c (vect_check_gather_scatter): Likewise.
181         * tree-vrp.c (vrp_prop::check_array_ref): Likewise.
182         * varasm.c (decode_addr_const): Likewise.
183
184 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
185             Alan Hayward  <alan.hayward@arm.com>
186             David Sherwood  <david.sherwood@arm.com>
187
188         * gimple-ssa-stor-merging.c (find_bswap_or_nop_load): Track polynomial
189         offsets for MEM_REFs.
190
191 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
192             Alan Hayward  <alan.hayward@arm.com>
193             David Sherwood  <david.sherwood@arm.com>
194
195         * tree-ssanames.h (adjust_ptr_info_misalignment): Take the increment
196         as a poly_uint64 rather than an unsigned int.
197         * tree-ssanames.c (adjust_ptr_info_misalignment): Likewise.
198
199 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
200             Alan Hayward  <alan.hayward@arm.com>
201             David Sherwood  <david.sherwood@arm.com>
202
203         * varasm.c (addr_const::offset): Change from HOST_WIDE_INT
204         to poly_int64.
205         (decode_addr_const): Update accordingly.
206
207 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
208             Alan Hayward  <alan.hayward@arm.com>
209             David Sherwood  <david.sherwood@arm.com>
210
211         * tree.h (bit_field_size, bit_field_offset): New functions.
212         * hsa-gen.c (gen_hsa_addr): Use them.
213         * tree-ssa-forwprop.c (simplify_bitfield_ref): Likewise.
214         (simplify_vector_constructor): Likewise.
215         * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise.
216         * tree-cfg.c (verify_expr): Require the sizes and offsets of a
217         BIT_FIELD_REF to be poly_uint64s rather than uhwis.
218         * fold-const.c (fold_ternary_loc): Protect tree_to_uhwi with
219         tree_fits_uhwi_p.
220
221 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
222             Alan Hayward  <alan.hayward@arm.com>
223             David Sherwood  <david.sherwood@arm.com>
224
225         * expr.h (emit_group_load, emit_group_load_into_temps)
226         (emit_group_store): Take the size as a poly_int64 rather than an int.
227         * expr.c (emit_group_load_1, emit_group_load): Likewise.
228         (emit_group_load_into_temp, emit_group_store): Likewise.
229
230 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
231             Alan Hayward  <alan.hayward@arm.com>
232             David Sherwood  <david.sherwood@arm.com>
233
234         * ira-int.h (ira_spilled_reg_stack_slot::width): Change from
235         an unsigned int to a poly_uint64.
236         * ira.h (ira_reuse_stack_slot, ira_mark_new_stack_slot): Take the
237         sizes as poly_uint64s rather than unsigned ints.
238         * ira-color.c (ira_reuse_stack_slot, ira_mark_new_stack_slot):
239         Likewise.
240
241 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
242             Alan Hayward  <alan.hayward@arm.com>
243             David Sherwood  <david.sherwood@arm.com>
244
245         * lra-constraints.c (emit_inc): Change inc_amount from an int
246         to a poly_int64.
247
248 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
249             Alan Hayward  <alan.hayward@arm.com>
250             David Sherwood  <david.sherwood@arm.com>
251
252         * cfgexpand.c (stack_var::size): Change from a HOST_WIDE_INT
253         to a poly_uint64.
254         (add_stack_var, stack_var_cmp, partition_stack_vars)
255         (dump_stack_var_partition): Update accordingly.
256         (alloc_stack_frame_space): Take the size as a poly_int64 rather
257         than a HOST_WIDE_INT.
258         (expand_stack_vars, expand_one_stack_var_1): Handle polynomial sizes.
259         (defer_stack_allocation, estimated_stack_frame_size): Likewise.
260         (account_stack_vars, expand_one_var): Likewise.  Return a poly_uint64
261         rather than a HOST_WIDE_INT.
262
263 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
264             Alan Hayward  <alan.hayward@arm.com>
265             David Sherwood  <david.sherwood@arm.com>
266
267         * target.def (return_pops_args): Treat both the input and output
268         sizes as poly_int64s rather than HOST_WIDE_INTS.
269         * targhooks.h (default_return_pops_args): Update accordingly.
270         * targhooks.c (default_return_pops_args): Likewise.
271         * doc/tm.texi: Regenerate.
272         * emit-rtl.h (incoming_args): Change pops_args, size and
273         outgoing_args_size from int to poly_int64_pod.
274         * function.h (expr_status): Change x_pending_stack_adjust and
275         x_stack_pointer_delta from int to poly_int64.
276         (args_size::constant): Change from HOST_WIDE_INT to poly_int64.
277         (ARGS_SIZE_RTX): Update accordingly.
278         * calls.c (highest_outgoing_arg_in_use): Change from int to
279         unsigned int.
280         (stack_usage_watermark, stored_args_watermark): New variables.
281         (stack_region_maybe_used_p, mark_stack_region_used): New functions.
282         (emit_call_1): Change the stack_size and rounded_stack_size
283         parameters from HOST_WIDE_INT to poly_int64.  Track n_popped
284         as a poly_int64.
285         (save_fixed_argument_area): Check stack_usage_watermark.
286         (initialize_argument_information): Change old_pending_adj from
287         a HOST_WIDE_INT * to a poly_int64_pod *.
288         (compute_argument_block_size): Return the size as a poly_int64
289         rather than an int.
290         (finalize_must_preallocate): Track polynomial argument sizes.
291         (compute_argument_addresses): Likewise.
292         (internal_arg_pointer_based_exp): Track polynomial offsets.
293         (mem_overlaps_already_clobbered_arg_p): Rename to...
294         (mem_might_overlap_already_clobbered_arg_p): ...this and take the
295         size as a poly_uint64 rather than an unsigned HOST_WIDE_INT.
296         Check stored_args_used_watermark.
297         (load_register_parameters): Update accordingly.
298         (check_sibcall_argument_overlap_1): Likewise.
299         (combine_pending_stack_adjustment_and_call): Take the unadjusted
300         args size as a poly_int64 rather than an int.  Return a bool
301         indicating whether the optimization was possible and return
302         the new adjustment by reference.
303         (check_sibcall_argument_overlap): Track polynomail argument sizes.
304         Update stored_args_watermark.
305         (can_implement_as_sibling_call_p): Handle polynomial argument sizes.
306         (expand_call): Likewise.  Maintain stack_usage_watermark and
307         stored_args_watermark.  Update calls to
308         combine_pending_stack_adjustment_and_call.
309         (emit_library_call_value_1): Handle polynomial argument sizes.
310         Call stack_region_maybe_used_p and mark_stack_region_used.
311         Maintain stack_usage_watermark.
312         (store_one_arg): Likewise.  Update call to
313         mem_overlaps_already_clobbered_arg_p.
314         * config/arm/arm.c (arm_output_function_prologue): Add a cast to
315         HOST_WIDE_INT.
316         * config/avr/avr.c (avr_outgoing_args_size): Likewise.
317         * config/microblaze/microblaze.c (microblaze_function_prologue):
318         Likewise.
319         * config/cr16/cr16.c (cr16_return_pops_args): Update for new
320         TARGET_RETURN_POPS_ARGS interface.
321         (cr16_compute_frame, cr16_initial_elimination_offset): Add casts
322         to HOST_WIDE_INT.
323         * config/ft32/ft32.c (ft32_compute_frame): Likewise.
324         * config/i386/i386.c (ix86_return_pops_args): Update for new
325         TARGET_RETURN_POPS_ARGS interface.
326         (ix86_expand_split_stack_prologue): Add a cast to HOST_WIDE_INT.
327         * config/moxie/moxie.c (moxie_compute_frame): Likewise.
328         * config/m68k/m68k.c (m68k_return_pops_args): Update for new
329         TARGET_RETURN_POPS_ARGS interface.
330         * config/vax/vax.c (vax_return_pops_args): Likewise.
331         * config/pa/pa.h (STACK_POINTER_OFFSET): Add a cast to poly_int64.
332         (EXIT_IGNORE_STACK): Update reference to crtl->outgoing_args_size.
333         * config/arm/arm.h (CALLER_INTERWORKING_SLOT_SIZE): Likewise.
334         * config/powerpcspe/aix.h (STACK_DYNAMIC_OFFSET): Likewise.
335         * config/powerpcspe/darwin.h (STACK_DYNAMIC_OFFSET): Likewise.
336         * config/powerpcspe/powerpcspe.h (STACK_DYNAMIC_OFFSET): Likewise.
337         * config/rs6000/aix.h (STACK_DYNAMIC_OFFSET): Likewise.
338         * config/rs6000/darwin.h (STACK_DYNAMIC_OFFSET): Likewise.
339         * config/rs6000/rs6000.h (STACK_DYNAMIC_OFFSET): Likewise.
340         * dojump.h (saved_pending_stack_adjust): Change x_pending_stack_adjust
341         and x_stack_pointer_delta from int to poly_int64.
342         * dojump.c (do_pending_stack_adjust): Update accordingly.
343         * explow.c (allocate_dynamic_stack_space): Handle polynomial
344         stack_pointer_deltas.
345         * function.c (STACK_DYNAMIC_OFFSET): Add a cast to poly_int64.
346         (pad_to_arg_alignment): Track polynomial offsets.
347         (assign_parm_find_stack_rtl): Likewise.
348         (assign_parms, locate_and_pad_parm): Handle polynomial argument sizes.
349         * toplev.c (output_stack_usage): Update reference to
350         current_function_pushed_stack_size.
351
352 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
353             Alan Hayward  <alan.hayward@arm.com>
354             David Sherwood  <david.sherwood@arm.com>
355
356         * function.c (in_arg_offset, var_offset, dynamic_offset)
357         (out_arg_offset, cfa_offset): Change from int to poly_int64.
358         (instantiate_new_reg): Return the new offset as a poly_int64_pod
359         rather than a HOST_WIDE_INT.
360         (instantiate_virtual_regs_in_rtx): Track polynomial offsets.
361         (instantiate_virtual_regs_in_insn): Likewise.
362
363 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
364             Alan Hayward  <alan.hayward@arm.com>
365             David Sherwood  <david.sherwood@arm.com>
366
367         * rtl.h (get_args_size, add_args_size_note): New functions.
368         (find_args_size_adjust): Return a poly_int64 rather than a
369         HOST_WIDE_INT.
370         (fixup_args_size_notes): Likewise.  Make the same change to the
371         end_args_size parameter.
372         * rtlanal.c (get_args_size, add_args_size_note): New functions.
373         * builtins.c (expand_builtin_trap): Use add_args_size_note.
374         * calls.c (emit_call_1): Likewise.
375         * explow.c (adjust_stack_1): Likewise.
376         * cfgcleanup.c (old_insns_match_p): Update use of
377         find_args_size_adjust.
378         * combine.c (distribute_notes): Track polynomial arg sizes.
379         * dwarf2cfi.c (dw_trace_info): Change beg_true_args_size,
380         end_true_args_size, beg_delay_args_size and end_delay_args_size
381         from HOST_WIDE_INT to poly_int64.
382         (add_cfi_args_size): Take the args_size as a poly_int64 rather
383         than a HOST_WIDE_INT.
384         (notice_args_size, notice_eh_throw, maybe_record_trace_start)
385         (maybe_record_trace_start_abnormal, scan_trace, connect_traces): Track
386         polynomial arg sizes.
387         * emit-rtl.c (try_split): Use get_args_size.
388         * recog.c (peep2_attempt): Likewise.
389         * reload1.c (reload_as_needed): Likewise.
390         * expr.c (find_args_size_adjust): Return the adjustment as a
391         poly_int64 rather than a HOST_WIDE_INT.
392         (fixup_args_size_notes): Change end_args_size from a HOST_WIDE_INT
393         to a poly_int64 and change the return type in the same way.
394         (emit_single_push_insn): Track polynomial arg sizes.
395
396 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
397             Alan Hayward  <alan.hayward@arm.com>
398             David Sherwood  <david.sherwood@arm.com>
399
400         * expr.h (push_block, emit_push_insn): Change the "extra" parameter
401         from HOST_WIDE_INT to poly_int64.
402         * expr.c (push_block, emit_push_insn): Likewise.
403
404 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
405             Alan Hayward  <alan.hayward@arm.com>
406             David Sherwood  <david.sherwood@arm.com>
407
408         * function.h (frame_space): Change start and length from HOST_WIDE_INT
409         to poly_int64.
410         (get_frame_size): Return the size as a poly_int64 rather than a
411         HOST_WIDE_INT.
412         (frame_offset_overflow): Take the offset as a poly_int64 rather
413         than a HOST_WIDE_INT.
414         (assign_stack_local_1, assign_stack_local, assign_stack_temp_for_type)
415         (assign_stack_temp): Likewise for the size.
416         * function.c (get_frame_size): Return a poly_int64 rather than
417         a HOST_WIDE_INT.
418         (frame_offset_overflow): Take the offset as a poly_int64 rather
419         than a HOST_WIDE_INT.
420         (try_fit_stack_local): Take the start, length and size as poly_int64s
421         rather than HOST_WIDE_INTs.  Return the offset as a poly_int64_pod
422         rather than a HOST_WIDE_INT.
423         (add_frame_space): Take the start and end as poly_int64s rather than
424         HOST_WIDE_INTs.
425         (assign_stack_local_1, assign_stack_local, assign_stack_temp_for_type)
426         (assign_stack_temp): Likewise for the size.
427         (temp_slot): Change size, base_offset and full_size from HOST_WIDE_INT
428         to poly_int64.
429         (find_temp_slot_from_address): Handle polynomial offsets.
430         (combine_temp_slots): Likewise.
431         * emit-rtl.h (rtl_data::x_frame_offset): Change from HOST_WIDE_INT
432         to poly_int64.
433         * cfgexpand.c (alloc_stack_frame_space): Return the offset as a
434         poly_int64 rather than a HOST_WIDE_INT.
435         (expand_one_stack_var_at): Take the offset as a poly_int64 rather
436         than a HOST_WIDE_INT.
437         (expand_stack_vars, expand_one_stack_var_1, expand_used_vars): Handle
438         polynomial frame offsets.
439         * config/m32r/m32r-protos.h (m32r_compute_frame_size): Take the size
440         as a poly_int64 rather than an int.
441         * config/m32r/m32r.c (m32r_compute_frame_size): Likewise.
442         * config/v850/v850-protos.h (compute_frame_size): Likewise.
443         * config/v850/v850.c (compute_frame_size): Likewise.
444         * config/xtensa/xtensa-protos.h (compute_frame_size): Likewise.
445         * config/xtensa/xtensa.c (compute_frame_size): Likewise.
446         * config/pa/pa-protos.h (pa_compute_frame_size): Likewise.
447         * config/pa/pa.c (pa_compute_frame_size): Likewise.
448         * explow.h (get_dynamic_stack_base): Take the offset as a poly_int64
449         rather than a HOST_WIDE_INT.
450         * explow.c (get_dynamic_stack_base): Likewise.
451         * final.c (final_start_function): Use the constant lower bound
452         of the frame size for -Wframe-larger-than.
453         * ira.c (do_reload): Adjust for new get_frame_size return type.
454         * lra.c (lra): Likewise.
455         * reload1.c (reload): Likewise.
456         * config/avr/avr.c (avr_asm_function_end_prologue): Likewise.
457         * config/pa/pa.h (EXIT_IGNORE_STACK): Likewise.
458         * rtlanal.c (get_initial_register_offset): Return the offset as
459         a poly_int64 rather than a HOST_WIDE_INT.
460
461 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
462             Alan Hayward  <alan.hayward@arm.com>
463             David Sherwood  <david.sherwood@arm.com>
464
465         * reload1.c (elim_table): Change initial_offset, offset and
466         previous_offset from HOST_WIDE_INT to poly_int64_pod.
467         (offsets_at): Change the target array's element type from
468         HOST_WIDE_INT to poly_int64_pod.
469         (set_label_offsets, eliminate_regs_1, eliminate_regs_in_insn)
470         (elimination_costs_in_insn, update_eliminable_offsets)
471         (verify_initial_elim_offsets, set_offsets_for_label)
472         (init_eliminable_invariants): Update after above changes.
473
474 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
475             Alan Hayward  <alan.hayward@arm.com>
476             David Sherwood  <david.sherwood@arm.com>
477
478         * reload.h (reload::inc): Change from an int to a poly_int64_pod.
479         * reload.c (combine_reloads, debug_reload_to_stream): Likewise.
480         (decomposition): Change start and end from HOST_WIDE_INT
481         to poly_int64_pod.
482         (decompose, immune_p): Update accordingly.
483         (find_inc_amount): Return a poly_int64 rather than an int.
484         * reload1.c (inc_for_reload): Take the inc_amount as a poly_int64
485         rather than an int.
486
487 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
488             Alan Hayward  <alan.hayward@arm.com>
489             David Sherwood  <david.sherwood@arm.com>
490
491         * tree.h (get_inner_reference): Return the bitsize and bitpos
492         as poly_int64_pods rather than HOST_WIDE_INT.
493         * fold-const.h (ptr_difference_const): Return the pointer difference
494         as a poly_int64_pod rather than a HOST_WIDE_INT.
495         * expr.c (get_inner_reference): Return the bitsize and bitpos
496         as poly_int64_pods rather than HOST_WIDE_INT.
497         (expand_expr_addr_expr_1, expand_expr_real_1): Track polynomial
498         offsets and sizes.
499         * fold-const.c (make_bit_field_ref): Take the bitpos as a poly_int64
500         rather than a HOST_WIDE_INT.  Update call to get_inner_reference.
501         (optimize_bit_field_compare): Update call to get_inner_reference.
502         (decode_field_reference): Likewise.
503         (fold_unary_loc): Track polynomial offsets and sizes.
504         (split_address_to_core_and_offset): Return the bitpos as a
505         poly_int64_pod rather than a HOST_WIDE_INT.
506         (ptr_difference_const): Likewise for the pointer difference.
507         * asan.c (instrument_derefs): Track polynomial offsets and sizes.
508         * config/mips/mips.c (r10k_safe_mem_expr_p): Likewise.
509         * dbxout.c (dbxout_expand_expr): Likewise.
510         * dwarf2out.c (loc_list_for_address_of_addr_expr_of_indirect_ref)
511         (loc_list_from_tree_1, fortran_common): Likewise.
512         * gimple-laddress.c (pass_laddress::execute): Likewise.
513         * gimple-ssa-store-merging.c (find_bswap_or_nop_load): Likewise.
514         * gimplify.c (gimplify_scan_omp_clauses): Likewise.
515         * simplify-rtx.c (delegitimize_mem_from_attrs): Likewise.
516         * tree-affine.c (tree_to_aff_combination): Likewise.
517         (get_inner_reference_aff): Likewise.
518         * tree-data-ref.c (split_constant_offset_1): Likewise.
519         (dr_analyze_innermost): Likewise.
520         * tree-scalar-evolution.c (interpret_rhs_expr): Likewise.
521         * tree-sra.c (ipa_sra_check_caller): Likewise.
522         * tree-vect-data-refs.c (vect_check_gather_scatter): Likewise.
523         * ubsan.c (maybe_instrument_pointer_overflow): Likewise.
524         (instrument_bool_enum_load, instrument_object_size): Likewise.
525         * gimple-ssa-strength-reduction.c (slsr_process_ref): Update call
526         to get_inner_reference.
527         * hsa-gen.c (gen_hsa_addr): Likewise.
528         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Likewise.
529         * tsan.c (instrument_expr): Likewise.
530         * match.pd: Update call to ptr_difference_const.
531
532 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
533             Alan Hayward  <alan.hayward@arm.com>
534             David Sherwood  <david.sherwood@arm.com>
535
536         * fold-const.c (fold_comparison): Track sizes and offsets as
537         poly_int64s rather than HOST_WIDE_INTs when folding address
538         comparisons.
539
540 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
541             Alan Hayward  <alan.hayward@arm.com>
542             David Sherwood  <david.sherwood@arm.com>
543
544         * expr.h (get_bit_range): Return the bitstart and bitend as
545         poly_uint64s rather than unsigned HOST_WIDE_INTs.  Return the bitpos
546         as a poly_int64 rather than a HOST_WIDE_INT.
547         * expr.c (get_bit_range): Likewise.
548         (expand_assignment): Update call accordingly.
549         * fold-const.c (optimize_bit_field_compare): Likewise.
550
551 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
552             Alan Hayward  <alan.hayward@arm.com>
553             David Sherwood  <david.sherwood@arm.com>
554
555         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): New enum.
556         (aarch64_legitimate_address_p): Use it instead of an rtx code,
557         as an optional final parameter.
558         * config/aarch64/aarch64.c (aarch64_classify_address): Likewise.
559         (aarch64_legitimate_address_p): Likewise.
560         (aarch64_print_address_internal): Take an aarch64_addr_query_type
561         instead of an rtx code.
562         (aarch64_address_valid_for_prefetch_p): Update calls accordingly.
563         (aarch64_legitimate_address_hook_p): Likewise.
564         (aarch64_print_ldpstp_address): Likewise.
565         (aarch64_print_operand_address): Likewise.
566         (aarch64_address_cost): Likewise.
567         * config/aarch64/constraints.md (Uml, Umq, Ump, Utq): Likewise.
568         * config/aarch64/predicates.md (aarch64_mem_pair_operand): Likewise.
569         (aarch64_mem_pair_lanes_operand): Likewise.
570
571 2017-12-20  Richard Biener  <rguenther@suse.de>
572
573         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Call
574         update_stmt_if_modified.
575
576 2017-12-20  Wilco Dijkstra  <wdijkstr@arm.com>
577
578         PR tree-optimization/83491
579         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Check for SSA_NAME
580         before walking uses.  Improve coding style and comments.
581
582 2017-12-20  Tom de Vries  <tom@codesourcery.com>
583
584         * gimple-fold.c (fold_internal_goacc_dim): Simplify.
585
586 2017-12-20  Jakub Jelinek  <jakub@redhat.com>
587
588         PR ipa/83506
589         * ipa-fnsummary.c (pass_data_ipa_free_fn_summary): Use 0 for
590         todo_flags_finish.
591         (pass_ipa_free_fn_summary): Add small_p private data member,
592         initialize to false in the ctor.
593         (pass_ipa_free_fn_summary::clone,
594         pass_ipa_free_fn_summary::set_pass_param,
595         pass_ipa_free_fn_summary::gate): New methods.
596         (pass_ipa_free_fn_summary::execute): Return TODO_remove_functions
597         | TODO_dump_symtab if small_p.
598         * passes.def: Add true parm for the existing pass_ipa_free_fn_summary
599         entry and add another instance of the pass with false parm after
600         ipa-pure-const.
601         * ipa-pure-const.c (pass_ipa_pure_const): Don't call
602         ipa_free_fn_summary here.
603
604 2017-12-20  Paolo Carlini  <paolo.carlini@oracle.com>
605
606         * gimplify.c (gimplify_return_expr): Remove dead error_mark_node check.
607
608 2017-12-20  Martin Sebor  <msebor@redhat.com>
609
610         PR testsuite/83131
611         * builtins.c (expand_builtin_strlen): Use get_callee_fndecl.
612         (expand_builtin_strcmp): Call maybe_warn_nonstring_arg.
613         (expand_builtin_strncmp): Same.
614
615 2017-12-20  Alexandre Oliva <aoliva@redhat.com>
616
617         PR bootstrap/83396
618         * cfgexpand.c (label_rtx_for_bb): Revert SFN changes that
619         allowed debug stmts before labels.
620         (expand_gimple_basic_block): Likewise.
621         * gimple-iterator.c (gimple_find_edge_insert_loc): Likewise.
622         * gimple-iterator.h (gsi_after_labels): Likewise.
623         * tree-cfgcleanup (remove_forwarder_block): Likewise, but
624         rename reused variable, and simplify using gsi_move_before.
625         * tree-ssa-tail-merge.c (find_duplicate): Likewise.
626         * tree-cfg.c (make_edges, cleanup_dead_labels): Likewise.
627         (gimple_can_merge_blocks_p, verify_gimple_in_cfg): Likewise.
628         (gimple_verify_flow_info, gimple_block_label): Likewise.
629         (make_blocks): Move debug markers after adjacent labels.
630         * cfgrtl.c (skip_insns_after_block): Revert SFN changes that
631         allowed debug insns outside blocks.
632         * df-scan.c (df_insn_delete): Likewise.
633         * lra-constraints.c (update_ebb_live_info): Likewise.
634         * var-tracking.c (get_first_insn, vt_emit_notes): Likewise.
635         (vt_initialize, delete_vta_debug_insns): Likewise.
636         (reemit_marker_as_note): Drop BB parm.  Adjust callers.
637
638 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
639             Alan Hayward  <alan.hayward@arm.com>
640             David Sherwood  <david.sherwood@arm.com>
641
642         * poly-int-types.h (round_down_to_byte_boundary): New macro.
643         (round_up_to_byte_boundary): Likewise.
644         * expr.h (get_bit_range): Add temporary shim.
645         * gimple-ssa-store-merging.c (store_operand_info): Change the
646         bitsize, bitpos, bitregion_start and bitregion_end fields from
647         unsigned HOST_WIDE_INT to poly_uint64.
648         (merged_store_group): Likewise load_align_base.
649         (compatible_load_p, compatible_load_p): Update accordingly.
650         (imm_store_chain_info::coalesce_immediate_stores): Likewise.
651         (split_group, imm_store_chain_info::output_merged_store): Likewise.
652         (mem_valid_for_store_merging): Return the bitsize, bitpos,
653         bitregion_start and bitregion_end as poly_uint64s rather than
654         unsigned HOST_WIDE_INTs.  Track polynomial offsets internally.
655         (handled_load): Take the bitsize, bitpos,
656         bitregion_start and bitregion_end as poly_uint64s rather than
657         unsigned HOST_WIDE_INTs.
658         (pass_store_merging::process_store): Update call to
659         mem_valid_for_store_merging.
660
661 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
662             Alan Hayward  <alan.hayward@arm.com>
663             David Sherwood  <david.sherwood@arm.com>
664
665         * builtins.c (get_object_alignment_2): Track polynomial offsets
666         and sizes.  Update the alignment handling.
667
668 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
669             Alan Hayward  <alan.hayward@arm.com>
670             David Sherwood  <david.sherwood@arm.com>
671
672         * tree.h (get_inner_reference): Add a version that returns the
673         offset and size as poly_int64_pods rather than HOST_WIDE_INTs.
674         * cfgexpand.c (expand_debug_expr): Track polynomial offsets.  Simply
675         the case in which bitpos is not associated with the first byte.
676
677 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
678             Alan Hayward  <alan.hayward@arm.com>
679             David Sherwood  <david.sherwood@arm.com>
680
681         * tree-affine.h (get_inner_reference_aff): Return the size as a
682         poly_widest_int.
683         * tree-affine.c (get_inner_reference_aff): Likewise.
684         * tree-data-ref.c (dr_may_alias_p): Update accordingly.
685         * tree-ssa-loop-im.c (mem_refs_may_alias_p): Likewise.
686
687 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
688             Alan Hayward  <alan.hayward@arm.com>
689             David Sherwood  <david.sherwood@arm.com>
690
691         * fold-const.c (pointer_may_wrap_p): Take the offset as a
692         HOST_WIDE_INT rather than a poly_int64.
693
694 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
695             Alan Hayward  <alan.hayward@arm.com>
696             David Sherwood  <david.sherwood@arm.com>
697
698         * gimple-ssa-store-merging.c (symbolic_number::bytepos): Change from
699         HOST_WIDE_INT to poly_int64_pod.
700         (perform_symbolic_merge): Update accordingly.
701         (bswap_replace): Likewise.
702
703 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
704             Alan Hayward  <alan.hayward@arm.com>
705             David Sherwood  <david.sherwood@arm.com>
706
707         * tree-affine.h (aff_tree::offset): Change from widest_int
708         to poly_widest_int.
709         (wide_int_ext_for_comb): Delete.
710         (aff_combination_const, aff_comb_cannot_overlap_p): Take the
711         constants as poly_widest_int rather than widest_int.
712         (aff_combination_constant_multiple_p): Return the multiplier
713         as a poly_widest_int.
714         (aff_combination_zero_p, aff_combination_singleton_var_p): Handle
715         polynomial offsets.
716         * tree-affine.c (wide_int_ext_for_comb): Make original widest_int
717         version static and add an overload for poly_widest_int.
718         (aff_combination_const, aff_combination_add_cst)
719         (wide_int_constant_multiple_p, aff_comb_cannot_overlap_p): Take
720         the constants as poly_widest_int rather than widest_int.
721         (tree_to_aff_combination): Generalize INTEGER_CST case to
722         poly_int_tree_p.
723         (aff_combination_to_tree): Track offsets as poly_widest_ints.
724         (aff_combination_add_product, aff_combination_mult): Handle
725         polynomial offsets.
726         (aff_combination_constant_multiple_p): Return the multiplier
727         as a poly_widest_int.
728         * tree-predcom.c (determine_offset): Return the offset as a
729         poly_widest_int.
730         (split_data_refs_to_components, suitable_component_p): Update
731         accordingly.
732         (valid_initializer_p): Update call to
733         aff_combination_constant_multiple_p.
734         * tree-ssa-address.c (addr_to_parts): Handle polynomial offsets.
735         * tree-ssa-loop-ivopts.c (get_address_cost_ainc): Take the step
736         as a poly_int64 rather than a HOST_WIDE_INT.
737         (get_address_cost): Handle polynomial offsets.
738         (iv_elimination_compare_lt): Likewise.
739         (rewrite_use_nonlinear_expr): Likewise.
740
741 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
742             Alan Hayward  <alan.hayward@arm.com>
743             David Sherwood  <david.sherwood@arm.com>
744
745         * tree-dfa.h (get_addr_base_and_unit_offset_1): Return the offset
746         as a poly_int64_pod rather than a HOST_WIDE_INT.
747         (get_addr_base_and_unit_offset): Likewise.
748         * tree-dfa.c (get_addr_base_and_unit_offset_1): Likewise.
749         (get_addr_base_and_unit_offset): Likewise.
750         * doc/match-and-simplify.texi: Change off from HOST_WIDE_INT
751         to poly_int64 in example.
752         * fold-const.c (fold_binary_loc): Update call to
753         get_addr_base_and_unit_offset.
754         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
755         (maybe_canonicalize_mem_ref_addr): Likewise.
756         (gimple_fold_stmt_to_constant_1): Likewise.
757         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref):
758         Likewise.
759         * ipa-param-manipulation.c (ipa_modify_call_arguments): Likewise.
760         * match.pd: Likewise.
761         * omp-low.c (lower_omp_target): Likewise.
762         * tree-sra.c (build_ref_for_offset): Likewise.
763         (build_debug_ref_for_model): Likewise.
764         * tree-ssa-address.c (maybe_fold_tmr): Likewise.
765         * tree-ssa-alias.c (ao_ref_init_from_ptr_and_size): Likewise.
766         * tree-ssa-ccp.c (optimize_memcpy): Likewise.
767         * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Likewise.
768         (constant_pointer_difference): Likewise.
769         * tree-ssa-loop-niter.c (expand_simple_operations): Likewise.
770         * tree-ssa-phiopt.c (jump_function_from_stmt): Likewise.
771         * tree-ssa-pre.c (create_component_ref_by_pieces_1): Likewise.
772         * tree-ssa-sccvn.c (vn_reference_fold_indirect): Likewise.
773         (vn_reference_maybe_forwprop_address, vn_reference_lookup_3): Likewise.
774         (set_ssa_val_to): Likewise.
775         * tree-ssa-strlen.c (get_addr_stridx, addr_stridxptr)
776         (maybe_diag_stxncpy_trunc): Likewise.
777         * tree-vrp.c (vrp_prop::check_array_ref): Likewise.
778         * tree.c (build_simple_mem_ref_loc): Likewise.
779         (array_at_struct_end_p): Likewise.
780
781 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
782             Alan Hayward  <alan.hayward@arm.com>
783             David Sherwood  <david.sherwood@arm.com>
784
785         * tree-dfa.h (get_ref_base_and_extent): Return the base, size and
786         max_size as poly_int64_pods rather than HOST_WIDE_INTs.
787         (get_ref_base_and_extent_hwi): Declare.
788         * tree-dfa.c (get_ref_base_and_extent): Return the base, size and
789         max_size as poly_int64_pods rather than HOST_WIDE_INTs.
790         (get_ref_base_and_extent_hwi): New function.
791         * cfgexpand.c (expand_debug_expr): Update call to
792         get_ref_base_and_extent.
793         * dwarf2out.c (add_var_loc_to_decl): Likewise.
794         * gimple-fold.c (get_base_constructor): Return the offset as a
795         poly_int64_pod rather than a HOST_WIDE_INT.
796         (fold_const_aggregate_ref_1): Track polynomial sizes and offsets.
797         * ipa-polymorphic-call.c
798         (ipa_polymorphic_call_context::set_by_invariant)
799         (extr_type_from_vtbl_ptr_store): Track polynomial offsets.
800         (ipa_polymorphic_call_context::ipa_polymorphic_call_context)
801         (check_stmt_for_type_change): Use get_ref_base_and_extent_hwi
802         rather than get_ref_base_and_extent.
803         (ipa_polymorphic_call_context::get_dynamic_type): Likewise.
804         * ipa-prop.c (ipa_load_from_parm_agg, compute_complex_assign_jump_func)
805         (get_ancestor_addr_info, determine_locally_known_aggregate_parts):
806         Likewise.
807         * ipa-param-manipulation.c (ipa_get_adjustment_candidate): Update
808         call to get_ref_base_and_extent.
809         * tree-sra.c (create_access, get_access_for_expr): Likewise.
810         * tree-ssa-alias.c (ao_ref_base, aliasing_component_refs_p)
811         (stmt_kills_ref_p): Likewise.
812         * tree-ssa-dce.c (mark_aliased_reaching_defs_necessary_1): Likewise.
813         * tree-ssa-scopedtables.c (avail_expr_hash, equal_mem_array_ref_p):
814         Likewise.
815         * tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise.
816         Use get_ref_base_and_extent_hwi rather than get_ref_base_and_extent
817         when calling native_encode_expr.
818         * tree-ssa-structalias.c (get_constraint_for_component_ref): Update
819         call to get_ref_base_and_extent.
820         (do_structure_copy): Use get_ref_base_and_extent_hwi rather than
821         get_ref_base_and_extent.
822         * var-tracking.c (track_expr_p): Likewise.
823
824 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
825             Alan Hayward  <alan.hayward@arm.com>
826             David Sherwood  <david.sherwood@arm.com>
827
828         * ipa-param-manipulation.h (ipa_parm_adjustment::offset): Change from
829         HOST_WIDE_INT to poly_int64_pod.
830         * ipa-param-manipulation.c (ipa_modify_call_arguments): Track
831         polynomail parameter offsets.
832
833 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
834             Alan Hayward  <alan.hayward@arm.com>
835             David Sherwood  <david.sherwood@arm.com>
836
837         * gengtype.c (main): Handle poly_int64_pod.
838         * dwarf2out.h (dw_cfi_oprnd_cfa_loc): New dw_cfi_oprnd_type.
839         (dw_cfi_oprnd::dw_cfi_cfa_loc): New field.
840         (dw_cfa_location::offset, dw_cfa_location::base_offset): Change
841         from HOST_WIDE_INT to poly_int64_pod.
842         * dwarf2cfi.c (queued_reg_save::cfa_offset): Likewise.
843         (copy_cfa): New function.
844         (lookup_cfa_1): Use the cached dw_cfi_cfa_loc, if it exists.
845         (cfi_oprnd_equal_p): Handle dw_cfi_oprnd_cfa_loc.
846         (cfa_equal_p, dwarf2out_frame_debug_adjust_cfa)
847         (dwarf2out_frame_debug_cfa_offset, dwarf2out_frame_debug_expr)
848         (initial_return_save): Treat offsets as poly_ints.
849         (def_cfa_0): Likewise.  Cache the CFA in dw_cfi_cfa_loc if either
850         offset is nonconstant.
851         (reg_save): Take the offset as a poly_int64.  Fall back to
852         DW_CFA_expression for nonconstant offsets.
853         (queue_reg_save): Take the offset as a poly_int64.
854         * dwarf2out.c (dw_cfi_oprnd2_desc): Handle DW_CFA_def_cfa_expression.
855
856 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
857             Alan Hayward  <alan.hayward@arm.com>
858             David Sherwood  <david.sherwood@arm.com>
859
860         * rtl.h (operand_subword, operand_subword_force): Take the offset
861         as a poly_uint64 an unsigned int.
862         * emit-rtl.c (operand_subword, operand_subword_force): Likewise.
863
864 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
865             Alan Hayward  <alan.hayward@arm.com>
866             David Sherwood  <david.sherwood@arm.com>
867
868         * doc/rtl.texi: Update documentation of SUBREG_BYTE.  Document the
869         'p' format code.  Use INT_LIST rather than SUBREG as the example of
870         a code with an XINT and an XEXP.  Remove the implication that
871         accessing an rtx field using XINT is expected to work.
872         * rtl.def (SUBREG): Change format from "ei" to "ep".
873         * rtl.h (rtunion::rt_subreg): New field.
874         (XCSUBREG): New macro.
875         (SUBREG_BYTE): Use it.
876         (subreg_shape): Change offset from an unsigned int to a poly_uint16.
877         Update constructor accordingly.
878         (subreg_shape::operator ==): Update accordingly.
879         (subreg_shape::unique_id): Return an unsigned HOST_WIDE_INT rather
880         than an unsigned int.
881         (subreg_lsb, subreg_lowpart_offset, subreg_highpart_offset): Return
882         a poly_uint64 rather than an unsigned int.
883         (subreg_lsb_1): Likewise.  Take the offset as a poly_uint64 rather
884         than an unsigned int.
885         (subreg_size_offset_from_lsb, subreg_size_lowpart_offset)
886         (subreg_size_highpart_offset): Return a poly_uint64 rather than
887         an unsigned int.  Take the sizes as poly_uint64s.
888         (subreg_offset_from_lsb): Return a poly_uint64 rather than
889         an unsigned int.  Take the shift as a poly_uint64 rather than
890         an unsigned int.
891         (subreg_regno_offset, subreg_offset_representable_p): Take the offset
892         as a poly_uint64 rather than an unsigned int.
893         (simplify_subreg_regno): Likewise.
894         (byte_lowpart_offset): Return the memory offset as a poly_int64
895         rather than an int.
896         (subreg_memory_offset): Likewise.  Take the subreg offset as a
897         poly_uint64 rather than an unsigned int.
898         (simplify_subreg, simplify_gen_subreg, subreg_get_info)
899         (gen_rtx_SUBREG, validate_subreg): Take the subreg offset as a
900         poly_uint64 rather than an unsigned int.
901         * rtl.c (rtx_format): Describe 'p' in comment.
902         (copy_rtx, rtx_equal_p_cb, rtx_equal_p): Handle 'p'.
903         * emit-rtl.c (validate_subreg, gen_rtx_SUBREG): Take the subreg
904         offset as a poly_uint64 rather than an unsigned int.
905         (byte_lowpart_offset): Return the memory offset as a poly_int64
906         rather than an int.
907         (subreg_memory_offset): Likewise.  Take the subreg offset as a
908         poly_uint64 rather than an unsigned int.
909         (subreg_size_lowpart_offset, subreg_size_highpart_offset): Take the
910         mode sizes as poly_uint64s rather than unsigned ints.  Return a
911         poly_uint64 rather than an unsigned int.
912         (subreg_lowpart_p): Treat subreg offsets as poly_ints.
913         (copy_insn_1): Handle 'p'.
914         * rtlanal.c (set_noop_p): Treat subregs offsets as poly_uint64s.
915         (subreg_lsb_1): Take the subreg offset as a poly_uint64 rather than
916         an unsigned int.  Return the shift in the same way.
917         (subreg_lsb): Return the shift as a poly_uint64 rather than an
918         unsigned int.
919         (subreg_size_offset_from_lsb): Take the sizes and shift as
920         poly_uint64s rather than unsigned ints.  Return the offset as
921         a poly_uint64.
922         (subreg_get_info, subreg_regno_offset, subreg_offset_representable_p)
923         (simplify_subreg_regno): Take the offset as a poly_uint64 rather than
924         an unsigned int.
925         * rtlhash.c (add_rtx): Handle 'p'.
926         * genemit.c (gen_exp): Likewise.
927         * gengenrtl.c (type_from_format, gendef): Likewise.
928         * gensupport.c (subst_pattern_match, get_alternatives_number)
929         (collect_insn_data, alter_predicate_for_insn, alter_constraints)
930         (subst_dup): Likewise.
931         * gengtype.c (adjust_field_rtx_def): Likewise.
932         * genrecog.c (find_operand, find_matching_operand, validate_pattern)
933         (match_pattern_2): Likewise.
934         (rtx_test::SUBREG_FIELD): New rtx_test::kind_enum.
935         (rtx_test::subreg_field): New function.
936         (operator ==, safe_to_hoist_p, transition_parameter_type)
937         (print_nonbool_test, print_test): Handle SUBREG_FIELD.
938         * genattrtab.c (attr_rtx_1): Say that 'p' is deliberately not handled.
939         * genpeep.c (match_rtx): Likewise.
940         * print-rtl.c (print_poly_int): Include if GENERATOR_FILE too.
941         (rtx_writer::print_rtx_operand): Handle 'p'.
942         (print_value): Handle SUBREG.
943         * read-rtl.c (apply_int_iterator): Likewise.
944         (rtx_reader::read_rtx_operand): Handle 'p'.
945         * alias.c (rtx_equal_for_memref_p): Likewise.
946         * cselib.c (rtx_equal_for_cselib_1, cselib_hash_rtx): Likewise.
947         * caller-save.c (replace_reg_with_saved_mem): Treat subreg offsets
948         as poly_ints.
949         * calls.c (expand_call): Likewise.
950         * combine.c (combine_simplify_rtx, expand_field_assignment): Likewise.
951         (make_extraction, gen_lowpart_for_combine): Likewise.
952         * loop-invariant.c (hash_invariant_expr_1, invariant_expr_equal_p):
953         Likewise.
954         * cse.c (remove_invalid_subreg_refs): Take the offset as a poly_uint64
955         rather than an unsigned int.  Treat subreg offsets as poly_ints.
956         (exp_equiv_p): Handle 'p'.
957         (hash_rtx_cb): Likewise.  Treat subreg offsets as poly_ints.
958         (equiv_constant, cse_insn): Treat subreg offsets as poly_ints.
959         * dse.c (find_shift_sequence): Likewise.
960         * dwarf2out.c (rtl_for_decl_location): Likewise.
961         * expmed.c (extract_low_bits): Likewise.
962         * expr.c (emit_group_store, undefined_operand_subword_p): Likewise.
963         (expand_expr_real_2): Likewise.
964         * final.c (alter_subreg): Likewise.
965         (leaf_renumber_regs_insn): Handle 'p'.
966         * function.c (assign_parm_find_stack_rtl, assign_parm_setup_stack):
967         Treat subreg offsets as poly_ints.
968         * fwprop.c (forward_propagate_and_simplify): Likewise.
969         * ifcvt.c (noce_emit_move_insn, noce_emit_cmove): Likewise.
970         * ira.c (get_subreg_tracking_sizes): Likewise.
971         * ira-conflicts.c (go_through_subreg): Likewise.
972         * ira-lives.c (process_single_reg_class_operands): Likewise.
973         * jump.c (rtx_renumbered_equal_p): Likewise.  Handle 'p'.
974         * lower-subreg.c (simplify_subreg_concatn): Take the subreg offset
975         as a poly_uint64 rather than an unsigned int.
976         (simplify_gen_subreg_concatn, resolve_simple_move): Treat
977         subreg offsets as poly_ints.
978         * lra-constraints.c (operands_match_p): Handle 'p'.
979         (match_reload, curr_insn_transform): Treat subreg offsets as poly_ints.
980         * lra-spills.c (assign_mem_slot): Likewise.
981         * postreload.c (move2add_valid_value_p): Likewise.
982         * recog.c (general_operand, indirect_operand): Likewise.
983         * regcprop.c (copy_value, maybe_mode_change): Likewise.
984         (copyprop_hardreg_forward_1): Likewise.
985         * reginfo.c (simplifiable_subregs_hasher::hash, simplifiable_subregs)
986         (record_subregs_of_mode): Likewise.
987         * rtlhooks.c (gen_lowpart_general, gen_lowpart_if_possible): Likewise.
988         * reload.c (operands_match_p): Handle 'p'.
989         (find_reloads_subreg_address): Treat subreg offsets as poly_ints.
990         * reload1.c (alter_reg, choose_reload_regs): Likewise.
991         (compute_reload_subreg_offset): Likewise, and return an poly_int64.
992         * simplify-rtx.c (simplify_truncation, simplify_binary_operation_1):
993         (test_vector_ops_duplicate): Treat subreg offsets as poly_ints.
994         (simplify_const_poly_int_tests<N>::run): Likewise.
995         (simplify_subreg, simplify_gen_subreg): Take the subreg offset as
996         a poly_uint64 rather than an unsigned int.
997         * valtrack.c (debug_lowpart_subreg): Likewise.
998         * var-tracking.c (var_lowpart): Likewise.
999         (loc_cmp): Handle 'p'.
1000
1001 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1002             Alan Hayward  <alan.hayward@arm.com>
1003             David Sherwood  <david.sherwood@arm.com>
1004
1005         * ira.c (get_subreg_tracking_sizes): New function.
1006         (init_live_subregs): Take an integer size rather than a register.
1007         (build_insn_chain): Use get_subreg_tracking_sizes.  Update calls
1008         to init_live_subregs.
1009
1010 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1011             Alan Hayward  <alan.hayward@arm.com>
1012             David Sherwood  <david.sherwood@arm.com>
1013
1014         * expr.c (store_constructor_field): Change bitsize from a
1015         unsigned HOST_WIDE_INT to a poly_uint64 and bitpos from a
1016         HOST_WIDE_INT to a poly_int64.
1017         (store_constructor): Change size from a HOST_WIDE_INT to
1018         a poly_int64.
1019         (store_field): Likewise bitsize and bitpos.
1020
1021 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1022             Alan Hayward  <alan.hayward@arm.com>
1023             David Sherwood  <david.sherwood@arm.com>
1024
1025         * expmed.h (store_bit_field): Change bitregion_start and
1026         bitregion_end from unsigned HOST_WIDE_INT to poly_uint64.
1027         * expmed.c (adjust_bit_field_mem_for_reg, strict_volatile_bitfield_p)
1028         (store_bit_field_1, store_integral_bit_field, store_bit_field)
1029         (store_fixed_bit_field, store_split_bit_field): Likewise.
1030         * expr.c (store_constructor_field, store_field): Likewise.
1031         (optimize_bitfield_assignment_op): Likewise.  Make the same change
1032         to bitsize and bitpos.
1033         * machmode.h (bit_field_mode_iterator): Change m_bitregion_start
1034         and m_bitregion_end from HOST_WIDE_INT to poly_int64.  Make the
1035         same change in the constructor arguments.
1036         (get_best_mode): Change bitregion_start and bitregion_end from
1037         unsigned HOST_WIDE_INT to poly_uint64.
1038         * stor-layout.c (bit_field_mode_iterator::bit_field_mode_iterator):
1039         Change bitregion_start and bitregion_end from HOST_WIDE_INT to
1040         poly_int64.
1041         (bit_field_mode_iterator::next_mode): Update for new types
1042         of m_bitregion_start and m_bitregion_end.
1043         (get_best_mode): Change bitregion_start and bitregion_end from
1044         unsigned HOST_WIDE_INT to poly_uint64.
1045
1046 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1047             Alan Hayward  <alan.hayward@arm.com>
1048             David Sherwood  <david.sherwood@arm.com>
1049
1050         * rtl.h (simplify_gen_subreg): Add a temporary overload that
1051         accepts poly_uint64 offsets.
1052         * expmed.h (extract_bit_field): Take bitsize and bitnum as
1053         poly_uint64s rather than unsigned HOST_WIDE_INTs.
1054         * expmed.c (lowpart_bit_field_p): Likewise.
1055         (extract_bit_field_as_subreg): New function, split out from...
1056         (extract_bit_field_1): ...here.  Take bitsize and bitnum as
1057         poly_uint64s rather than unsigned HOST_WIDE_INTs.  For vector
1058         extractions, check that BITSIZE matches the size of the extracted
1059         value and that BITNUM is an exact multiple of that size.
1060         If all else fails, try forcing the value into memory if
1061         BITNUM is variable, and adjusting the address so that the
1062         offset is constant.  Split the part that can only handle constant
1063         bitsize and bitnum out into...
1064         (extract_integral_bit_field): ...this new function.
1065         (extract_bit_field): Take bitsize and bitnum as poly_uint64s
1066         rather than unsigned HOST_WIDE_INTs.
1067
1068 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1069             Alan Hayward  <alan.hayward@arm.com>
1070             David Sherwood  <david.sherwood@arm.com>
1071
1072         * expmed.h (store_bit_field): Take bitsize and bitnum as
1073         poly_uint64s rather than unsigned HOST_WIDE_INTs.
1074         * expmed.c (simple_mem_bitfield_p): Likewise.  Add a parameter
1075         that returns the byte size.
1076         (store_bit_field_1): Take bitsize and bitnum as
1077         poly_uint64s rather than unsigned HOST_WIDE_INTs.  Update call
1078         to simple_mem_bitfield_p.  Split the part that can only handle
1079         constant bitsize and bitnum out into...
1080         (store_integral_bit_field): ...this new function.
1081         (store_bit_field): Take bitsize and bitnum as poly_uint64s rather
1082         than unsigned HOST_WIDE_INTs.
1083         (extract_bit_field_1): Update call to simple_mem_bitfield_p.
1084
1085 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1086             Alan Hayward  <alan.hayward@arm.com>
1087             David Sherwood  <david.sherwood@arm.com>
1088
1089         * lra-int.h (lra_reg): Change offset from int to poly_int64.
1090         (lra_insn_recog_data): Change sp_offset from HOST_WIDE_INT
1091         to poly_int64.
1092         (lra_eliminate_regs_1, eliminate_regs_in_insn): Change
1093         update_sp_offset from a HOST_WIDE_INT to a poly_int64.
1094         (lra_update_reg_val_offset, lra_reg_val_equal_p): Take the
1095         offset as a poly_int64 rather than an int.
1096         * lra-assigns.c (find_hard_regno_for_1): Handle poly_int64 offsets.
1097         (setup_live_pseudos_and_spill_after_risky_transforms): Likewise.
1098         * lra-constraints.c (equiv_address_substitution): Track offsets
1099         as poly_int64s.
1100         (emit_inc): Check poly_int_rtx_p instead of CONST_INT_P.
1101         (curr_insn_transform): Handle the new form of sp_offset.
1102         * lra-eliminations.c (lra_elim_table): Change previous_offset
1103         and offset from HOST_WIDE_INT to poly_int64.
1104         (print_elim_table, update_reg_eliminate): Update accordingly.
1105         (self_elim_offsets): Change from HOST_WIDE_INT to poly_int64_pod.
1106         (get_elimination): Update accordingly.
1107         (form_sum): Check poly_int_rtx_p instead of CONST_INT_P.
1108         (lra_eliminate_regs_1, eliminate_regs_in_insn): Change
1109         update_sp_offset from a HOST_WIDE_INT to a poly_int64.  Handle
1110         poly_int64 offsets generally.
1111         (curr_sp_change): Change from HOST_WIDE_INT to poly_int64.
1112         (mark_not_eliminable, init_elimination): Update accordingly.
1113         (remove_reg_equal_offset_note): Return a bool and pass the new
1114         offset back by pointer as a poly_int64.
1115         * lra-remat.c (change_sp_offset): Take sp_offset as a poly_int64
1116         rather than a HOST_WIDE_INT.
1117         (do_remat): Track offsets poly_int64s.
1118         * lra.c (lra_update_insn_recog_data, setup_sp_offset): Likewise.
1119
1120 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1121             Alan Hayward  <alan.hayward@arm.com>
1122             David Sherwood  <david.sherwood@arm.com>
1123
1124         * rtl.h (mem_attrs): Add a default constructor.  Change size and
1125         offset from HOST_WIDE_INT to poly_int64.
1126         * emit-rtl.h (set_mem_offset, set_mem_size, adjust_address_1)
1127         (adjust_automodify_address_1, set_mem_attributes_minus_bitpos)
1128         (widen_memory_access): Take the sizes and offsets as poly_int64s
1129         rather than HOST_WIDE_INTs.
1130         * alias.c (ao_ref_from_mem): Handle the new form of MEM_OFFSET.
1131         (offset_overlap_p): Take poly_int64s rather than HOST_WIDE_INTs
1132         and ints.
1133         (adjust_offset_for_component_ref): Change the offset from a
1134         HOST_WIDE_INT to a poly_int64.
1135         (nonoverlapping_memrefs_p): Track polynomial offsets and sizes.
1136         * cfgcleanup.c (merge_memattrs): Update after mem_attrs changes.
1137         * dce.c (find_call_stack_args): Likewise.
1138         * dse.c (record_store): Likewise.
1139         * dwarf2out.c (tls_mem_loc_descriptor, dw_sra_loc_expr): Likewise.
1140         * print-rtl.c (rtx_writer::print_rtx): Likewise.
1141         * read-rtl-function.c (test_loading_mem): Likewise.
1142         * rtlanal.c (may_trap_p_1): Likewise.
1143         * simplify-rtx.c (delegitimize_mem_from_attrs): Likewise.
1144         * var-tracking.c (int_mem_offset, track_expr_p): Likewise.
1145         * emit-rtl.c (mem_attrs_eq_p, get_mem_align_offset): Likewise.
1146         (mem_attrs::mem_attrs): New function.
1147         (set_mem_attributes_minus_bitpos): Change bitpos from a
1148         HOST_WIDE_INT to poly_int64.
1149         (set_mem_alias_set, set_mem_addr_space, set_mem_align, set_mem_expr)
1150         (clear_mem_offset, clear_mem_size, change_address)
1151         (get_spill_slot_decl, set_mem_attrs_for_spill): Directly
1152         initialize mem_attrs.
1153         (set_mem_offset, set_mem_size, adjust_address_1)
1154         (adjust_automodify_address_1, offset_address, widen_memory_access):
1155         Likewise.  Take poly_int64s rather than HOST_WIDE_INT.
1156
1157 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1158             Alan Hayward  <alan.hayward@arm.com>
1159             David Sherwood  <david.sherwood@arm.com>
1160
1161         * rtlanal.c (rtx_addr_can_trap_p_1): Take the offset and size
1162         as poly_int64s rather than HOST_WIDE_INTs.  Use a size of -1
1163         rather than 0 to represent an unknown size.  Assert that the size
1164         is known when the mode isn't BLKmode.
1165         (may_trap_p_1): Use -1 for unknown sizes.
1166         (rtx_addr_can_trap_p): Likewise.  Pass BLKmode rather than VOIDmode.
1167
1168 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1169             Alan Hayward  <alan.hayward@arm.com>
1170             David Sherwood  <david.sherwood@arm.com>
1171
1172         * dse.c (store_info): Change offset and width from HOST_WIDE_INT
1173         to poly_int64.  Update commentary for positions_needed.large.
1174         (read_info_type): Change offset and width from HOST_WIDE_INT
1175         to poly_int64.
1176         (set_usage_bits): Likewise.
1177         (canon_address): Return the offset as a poly_int64 rather than
1178         a HOST_WIDE_INT.  Use strip_offset_and_add.
1179         (set_all_positions_unneeded, any_positions_needed_p): Use
1180         positions_needed.large to track stores with non-constant widths.
1181         (all_positions_needed_p): Likewise.  Take the offset and width
1182         as poly_int64s rather than ints.  Assert that rhs is nonnull.
1183         (record_store): Cope with non-constant offsets and widths.
1184         Nullify the rhs of an earlier store if we can't tell which bytes
1185         of it are needed.
1186         (find_shift_sequence): Take the access_size and shift as poly_int64s
1187         rather than ints.
1188         (get_stored_val): Take the read_offset and read_width as poly_int64s
1189         rather than HOST_WIDE_INTs.
1190         (check_mem_read_rtx, scan_stores, scan_reads, dse_step5): Handle
1191         non-constant offsets and widths.
1192
1193 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1194             Alan Hayward  <alan.hayward@arm.com>
1195             David Sherwood  <david.sherwood@arm.com>
1196
1197         * inchash.h (inchash::hash::add_poly_int): New function.
1198         * tree-ssa-alias.h (ao_ref::offset, ao_ref::size, ao_ref::max_size):
1199         Use poly_int64 rather than HOST_WIDE_INT.
1200         (ao_ref::max_size_known_p): New function.
1201         * tree-ssa-sccvn.h (vn_reference_op_struct::off): Use poly_int64_pod
1202         rather than HOST_WIDE_INT.
1203         * tree-ssa-alias.c (ao_ref_base): Apply get_ref_base_and_extent
1204         to temporaries until its interface is adjusted to match.
1205         (ao_ref_init_from_ptr_and_size): Handle polynomial offsets and sizes.
1206         (aliasing_component_refs_p, decl_refs_may_alias_p)
1207         (indirect_ref_may_alias_decl_p, indirect_refs_may_alias_p): Take
1208         the offsets and max_sizes as poly_int64s instead of HOST_WIDE_INTs.
1209         (refs_may_alias_p_1, stmt_kills_ref_p): Adjust for changes to
1210         ao_ref fields.
1211         * alias.c (ao_ref_from_mem): Likewise.
1212         * tree-ssa-dce.c (mark_aliased_reaching_defs_necessary_1): Likewise.
1213         * tree-ssa-dse.c (valid_ao_ref_for_dse, normalize_ref)
1214         (clear_bytes_written_by, setup_live_bytes_from_ref, compute_trims)
1215         (maybe_trim_complex_store, maybe_trim_constructor_store)
1216         (live_bytes_read, dse_classify_store): Likewise.
1217         * tree-ssa-sccvn.c (vn_reference_compute_hash, vn_reference_eq):
1218         (copy_reference_ops_from_ref, ao_ref_init_from_vn_reference)
1219         (fully_constant_vn_reference_p, valueize_refs_1): Likewise.
1220         (vn_reference_lookup_3): Likewise.
1221         * tree-ssa-uninit.c (warn_uninitialized_vars): Likewise.
1222
1223 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1224             Alan Hayward  <alan.hayward@arm.com>
1225             David Sherwood  <david.sherwood@arm.com>
1226
1227         * tree-ssa-alias.c (indirect_ref_may_alias_decl_p)
1228         (indirect_refs_may_alias_p): Use ranges_may_overlap_p
1229         instead of ranges_overlap_p.
1230
1231 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1232             Alan Hayward  <alan.hayward@arm.com>
1233             David Sherwood  <david.sherwood@arm.com>
1234
1235         * tree-ssa-alias.c (same_addr_size_stores_p): Take the offsets and
1236         sizes as poly_int64s rather than HOST_WIDE_INTs.
1237
1238 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1239             Alan Hayward  <alan.hayward@arm.com>
1240             David Sherwood  <david.sherwood@arm.com>
1241
1242         * gimple-fold.h (fold_ctor_reference): Take the offset and size
1243         as poly_uint64 rather than unsigned HOST_WIDE_INT.
1244         * gimple-fold.c (fold_ctor_reference): Likewise.
1245
1246 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1247             Alan Hayward  <alan.hayward@arm.com>
1248             David Sherwood  <david.sherwood@arm.com>
1249
1250         * target.def (dwarf_poly_indeterminate_value): New hook.
1251         * targhooks.h (default_dwarf_poly_indeterminate_value): Declare.
1252         * targhooks.c (default_dwarf_poly_indeterminate_value): New function.
1253         * doc/tm.texi.in (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Document.
1254         * doc/tm.texi: Regenerate.
1255         * dwarf2out.h (build_cfa_loc, build_cfa_aligned_loc): Take the
1256         offset as a poly_int64.
1257         * dwarf2out.c (new_reg_loc_descr): Move later in file.  Take the
1258         offset as a poly_int64.
1259         (loc_descr_plus_const, loc_list_plus_const, build_cfa_aligned_loc):
1260         Take the offset as a poly_int64.
1261         (build_cfa_loc): Likewise.  Use loc_descr_plus_const.
1262         (frame_pointer_fb_offset): Change to a poly_int64.
1263         (int_loc_descriptor): Take the offset as a poly_int64.  Use
1264         targetm.dwarf_poly_indeterminate_value for polynomial offsets.
1265         (based_loc_descr): Take the offset as a poly_int64.
1266         Use strip_offset_and_add to handle (plus X (const)).
1267         Use new_reg_loc_descr instead of an open-coded version of the
1268         previous implementation.
1269         (mem_loc_descriptor): Handle CONST_POLY_INT.
1270         (compute_frame_pointer_to_fb_displacement): Take the offset as a
1271         poly_int64.  Use strip_offset_and_add to handle (plus X (const)).
1272
1273 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1274             Alan Hayward  <alan.hayward@arm.com>
1275             David Sherwood  <david.sherwood@arm.com>
1276
1277         * rtl.h (reg_attrs::offset): Change from HOST_WIDE_INT to poly_int64.
1278         (gen_rtx_REG_offset): Take the offset as a poly_int64.
1279         * inchash.h (inchash::hash::add_poly_hwi): New function.
1280         * gengtype.c (main): Register poly_int64.
1281         * emit-rtl.c (reg_attr_hasher::hash): Use inchash.  Treat the
1282         offset as a poly_int.
1283         (reg_attr_hasher::equal): Use must_eq to compare offsets.
1284         (get_reg_attrs, update_reg_offset, gen_rtx_REG_offset): Take the
1285         offset as a poly_int64.
1286         (set_reg_attrs_from_value): Treat the offset as a poly_int64.
1287         * print-rtl.c (print_poly_int): New function.
1288         (rtx_writer::print_rtx_operand_code_r): Treat REG_OFFSET as
1289         a poly_int.
1290         * var-tracking.c (track_offset_p, get_tracked_reg_offset): New
1291         functions.
1292         (var_reg_set, var_reg_delete_and_set, var_reg_delete): Use them.
1293         (same_variable_part_p, track_loc_p): Take the offset as a poly_int64.
1294         (vt_get_decl_and_offset): Return the offset as a poly_int64.
1295         Enforce track_offset_p for parts of a PARALLEL.
1296         (vt_add_function_parameter): Use const_offset for the final
1297         offset to track.  Use get_tracked_reg_offset for the parts
1298         of a PARALLEL.
1299
1300 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1301             Alan Hayward  <alan.hayward@arm.com>
1302             David Sherwood  <david.sherwood@arm.com>
1303
1304         * target.def (truly_noop_truncation): Take poly_uint64s instead of
1305         unsigned ints.  Change default to hook_bool_puint64_puint64_true.
1306         * doc/tm.texi: Regenerate.
1307         * hooks.h (hook_bool_uint_uint_true): Delete.
1308         (hook_bool_puint64_puint64_true): Declare.
1309         * hooks.c (hook_bool_uint_uint_true): Delete.
1310         (hook_bool_puint64_puint64_true): New function.
1311         * config/mips/mips.c (mips_truly_noop_truncation): Take poly_uint64s
1312         instead of unsigned ints.
1313         * config/spu/spu.c (spu_truly_noop_truncation): Likewise.
1314         * config/tilegx/tilegx.c (tilegx_truly_noop_truncation): Likewise.
1315
1316 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1317             Alan Hayward  <alan.hayward@arm.com>
1318             David Sherwood  <david.sherwood@arm.com>
1319
1320         * optabs.h (expand_operand): Add an int_value field.
1321         (create_expand_operand): Add an int_value parameter and use it
1322         to initialize the new expand_operand field.
1323         (create_integer_operand): Replace with a declaration of a function
1324         that accepts poly_int64s.  Move the implementation to...
1325         * optabs.c (create_integer_operand): ...here.
1326         (maybe_legitimize_operand): For EXPAND_INTEGER, check whether
1327         the mode preserves the value of int_value, instead of calling
1328         const_int_operand on the rtx.  Use gen_int_mode to generate
1329         the new rtx.
1330
1331 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1332             Alan Hayward  <alan.hayward@arm.com>
1333             David Sherwood  <david.sherwood@arm.com>
1334
1335         * dumpfile.h (dump_dec): Declare.
1336         * dumpfile.c (dump_dec): New function.
1337         * pretty-print.h (pp_wide_integer): Turn into a function and
1338         declare a poly_int version.
1339         * pretty-print.c (pp_wide_integer): New function for poly_ints.
1340
1341 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1342             Alan Hayward  <alan.hayward@arm.com>
1343             David Sherwood  <david.sherwood@arm.com>
1344
1345         * doc/generic.texi (POLY_INT_CST): Document.
1346         * tree.def (POLY_INT_CST): New tree code.
1347         * treestruct.def (TS_POLY_INT_CST): New tree layout.
1348         * tree-core.h (tree_poly_int_cst): New struct.
1349         (tree_node): Add a poly_int_cst field.
1350         * tree.h (POLY_INT_CST_P, POLY_INT_CST_COEFF): New macros.
1351         (wide_int_to_tree, force_fit_type): Take a poly_wide_int_ref
1352         instead of a wide_int_ref.
1353         (build_int_cst, build_int_cst_type): Take a poly_int64 instead
1354         of a HOST_WIDE_INT.
1355         (build_int_cstu, build_array_type_nelts): Take a poly_uint64
1356         instead of an unsigned HOST_WIDE_INT.
1357         (build_poly_int_cst, tree_fits_poly_int64_p, tree_fits_poly_uint64_p)
1358         (ptrdiff_tree_p): Declare.
1359         (tree_to_poly_int64, tree_to_poly_uint64): Likewise.  Provide
1360         extern inline implementations if the target doesn't use POLY_INT_CST.
1361         (poly_int_tree_p): New function.
1362         (wi::unextended_tree): New class.
1363         (wi::int_traits <unextended_tree>): New override.
1364         (wi::extended_tree): Add a default constructor.
1365         (wi::extended_tree::get_tree): New function.
1366         (wi::widest_extended_tree, wi::offset_extended_tree): New typedefs.
1367         (wi::tree_to_widest_ref, wi::tree_to_offset_ref): Use them.
1368         (wi::tree_to_poly_widest_ref, wi::tree_to_poly_offset_ref)
1369         (wi::tree_to_poly_wide_ref): New typedefs.
1370         (wi::ints_for): Provide overloads for extended_tree and
1371         unextended_tree.
1372         (poly_int_cst_value, wi::to_poly_widest, wi::to_poly_offset)
1373         (wi::to_wide): New functions.
1374         (wi::fits_to_boolean_p, wi::fits_to_tree_p): Handle poly_ints.
1375         * tree.c (poly_int_cst_hasher): New struct.
1376         (poly_int_cst_hash_table): New variable.
1377         (tree_node_structure_for_code, tree_code_size, simple_cst_equal)
1378         (valid_constant_size_p, add_expr, drop_tree_overflow): Handle
1379         POLY_INT_CST.
1380         (initialize_tree_contains_struct): Handle TS_POLY_INT_CST.
1381         (init_ttree): Initialize poly_int_cst_hash_table.
1382         (build_int_cst, build_int_cst_type, build_invariant_address): Take
1383         a poly_int64 instead of a HOST_WIDE_INT.
1384         (build_int_cstu, build_array_type_nelts): Take a poly_uint64
1385         instead of an unsigned HOST_WIDE_INT.
1386         (wide_int_to_tree): Rename to...
1387         (wide_int_to_tree_1): ...this.
1388         (build_new_poly_int_cst, build_poly_int_cst): New functions.
1389         (force_fit_type): Take a poly_wide_int_ref instead of a wide_int_ref.
1390         (wide_int_to_tree): New function that takes a poly_wide_int_ref.
1391         (ptrdiff_tree_p, tree_to_poly_int64, tree_to_poly_uint64)
1392         (tree_fits_poly_int64_p, tree_fits_poly_uint64_p): New functions.
1393         * lto-streamer-out.c (DFS::DFS_write_tree_body, hash_tree): Handle
1394         TS_POLY_INT_CST.
1395         * tree-streamer-in.c (lto_input_ts_poly_tree_pointers): Likewise.
1396         (streamer_read_tree_body): Likewise.
1397         * tree-streamer-out.c (write_ts_poly_tree_pointers): Likewise.
1398         (streamer_write_tree_body): Likewise.
1399         * tree-streamer.c (streamer_check_handled_ts_structures): Likewise.
1400         * asan.c (asan_protect_global): Require the size to be an INTEGER_CST.
1401         * cfgexpand.c (expand_debug_expr): Handle POLY_INT_CST.
1402         * expr.c (expand_expr_real_1, const_vector_from_tree): Likewise.
1403         * gimple-expr.h (is_gimple_constant): Likewise.
1404         * gimplify.c (maybe_with_size_expr): Likewise.
1405         * print-tree.c (print_node): Likewise.
1406         * tree-data-ref.c (data_ref_compare_tree): Likewise.
1407         * tree-pretty-print.c (dump_generic_node): Likewise.
1408         * tree-ssa-address.c (addr_for_mem_ref): Likewise.
1409         * tree-vect-data-refs.c (dr_group_sort_cmp): Likewise.
1410         * tree-vrp.c (compare_values_warnv): Likewise.
1411         * tree-ssa-loop-ivopts.c (determine_base_object, constant_multiple_of)
1412         (get_loop_invariant_expr, add_candidate_1, get_computation_aff_1)
1413         (force_expr_to_var_cost): Likewise.
1414         * tree-ssa-loop.c (for_each_index): Likewise.
1415         * fold-const.h (build_invariant_address, size_int_kind): Take a
1416         poly_int64 instead of a HOST_WIDE_INT.
1417         * fold-const.c (fold_negate_expr_1, const_binop, const_unop)
1418         (fold_convert_const, multiple_of_p, fold_negate_const): Handle
1419         POLY_INT_CST.
1420         (size_binop_loc): Likewise.  Allow int_const_binop_1 to fail.
1421         (int_const_binop_2): New function, split out from...
1422         (int_const_binop_1): ...here.  Handle POLY_INT_CST.
1423         (size_int_kind): Take a poly_int64 instead of a HOST_WIDE_INT.
1424         * expmed.c (make_tree): Handle CONST_POLY_INT_P.
1425         * gimple-ssa-strength-reduction.c (slsr_process_add)
1426         (slsr_process_mul): Check for INTEGER_CSTs before using them
1427         as candidates.
1428         * stor-layout.c (bits_from_bytes): New function.
1429         (bit_from_pos): Use it.
1430         (layout_type): Likewise.  For vectors, multiply the TYPE_SIZE_UNIT
1431         by BITS_PER_UNIT to get the TYPE_SIZE.
1432         * tree-cfg.c (verify_expr, verify_types_in_gimple_reference): Allow
1433         MEM_REF and TARGET_MEM_REF offsets to be a POLY_INT_CST.
1434
1435 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1436             Alan Hayward  <alan.hayward@arm.com>
1437             David Sherwood  <david.sherwood@arm.com>
1438
1439         * doc/rtl.texi (const_poly_int): Document.  Also document the
1440         rtl sharing behavior.
1441         * gengenrtl.c (excluded_rtx): Return true for CONST_POLY_INT.
1442         * rtl.h (const_poly_int_def): New struct.
1443         (rtx_def::u): Add a cpi field.
1444         (CASE_CONST_UNIQUE, CASE_CONST_ANY): Add CONST_POLY_INT.
1445         (CONST_POLY_INT_P, CONST_POLY_INT_COEFFS): New macros.
1446         (wi::rtx_to_poly_wide_ref): New typedef
1447         (const_poly_int_value, wi::to_poly_wide, rtx_to_poly_int64)
1448         (poly_int_rtx_p): New functions.
1449         (trunc_int_for_mode): Declare a poly_int64 version.
1450         (plus_constant): Take a poly_int64 instead of a HOST_WIDE_INT.
1451         (immed_wide_int_const): Take a poly_wide_int_ref rather than
1452         a wide_int_ref.
1453         (strip_offset): Declare.
1454         (strip_offset_and_add): New function.
1455         * rtl.def (CONST_POLY_INT): New rtx code.
1456         * rtl.c (rtx_size): Handle CONST_POLY_INT.
1457         (shared_const_p): Use poly_int_rtx_p.
1458         * emit-rtl.h (gen_int_mode): Take a poly_int64 instead of a
1459         HOST_WIDE_INT.
1460         (gen_int_shift_amount): Likewise.
1461         * emit-rtl.c (const_poly_int_hasher): New class.
1462         (const_poly_int_htab): New variable.
1463         (init_emit_once): Initialize it when NUM_POLY_INT_COEFFS > 1.
1464         (const_poly_int_hasher::hash): New function.
1465         (const_poly_int_hasher::equal): Likewise.
1466         (gen_int_mode): Take a poly_int64 instead of a HOST_WIDE_INT.
1467         (immed_wide_int_const): Rename to...
1468         (immed_wide_int_const_1): ...this and make static.
1469         (immed_wide_int_const): New function, taking a poly_wide_int_ref
1470         instead of a wide_int_ref.
1471         (gen_int_shift_amount): Take a poly_int64 instead of a HOST_WIDE_INT.
1472         (gen_lowpart_common): Handle CONST_POLY_INT.
1473         * cse.c (hash_rtx_cb, equiv_constant): Likewise.
1474         * cselib.c (cselib_hash_rtx): Likewise.
1475         * dwarf2out.c (const_ok_for_output_1): Likewise.
1476         * expr.c (convert_modes): Likewise.
1477         * print-rtl.c (rtx_writer::print_rtx, print_value): Likewise.
1478         * rtlhash.c (add_rtx): Likewise.
1479         * explow.c (trunc_int_for_mode): Add a poly_int64 version.
1480         (plus_constant): Take a poly_int64 instead of a HOST_WIDE_INT.
1481         Handle existing CONST_POLY_INT rtxes.
1482         * expmed.h (expand_shift): Take a poly_int64 instead of a
1483         HOST_WIDE_INT.
1484         * expmed.c (expand_shift): Likewise.
1485         * rtlanal.c (strip_offset): New function.
1486         (commutative_operand_precedence): Give CONST_POLY_INT the same
1487         precedence as CONST_DOUBLE and put CONST_WIDE_INT between that
1488         and CONST_INT.
1489         * rtl-tests.c (const_poly_int_tests): New struct.
1490         (rtl_tests_c_tests): Use it.
1491         * simplify-rtx.c (simplify_const_unary_operation): Handle
1492         CONST_POLY_INT.
1493         (simplify_const_binary_operation): Likewise.
1494         (simplify_binary_operation_1): Fold additions of symbolic constants
1495         and CONST_POLY_INTs.
1496         (simplify_subreg): Handle extensions and truncations of
1497         CONST_POLY_INTs.
1498         (simplify_const_poly_int_tests): New struct.
1499         (simplify_rtx_c_tests): Use it.
1500         * wide-int.h (storage_ref): Add default constructor.
1501         (wide_int_ref_storage): Likewise.
1502         (trailing_wide_ints): Use GTY((user)).
1503         (trailing_wide_ints::operator[]): Add a const version.
1504         (trailing_wide_ints::get_precision): New function.
1505         (trailing_wide_ints::extra_size): Likewise.
1506
1507 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1508             Alan Hayward  <alan.hayward@arm.com>
1509             David Sherwood  <david.sherwood@arm.com>
1510
1511         * emit-rtl.h (gen_int_shift_amount): Declare.
1512         * emit-rtl.c (gen_int_shift_amount): New function.
1513         * asan.c (asan_emit_stack_protection): Use gen_int_shift_amount
1514         instead of GEN_INT.
1515         * calls.c (shift_return_value): Likewise.
1516         * cse.c (fold_rtx): Likewise.
1517         * dse.c (find_shift_sequence): Likewise.
1518         * expmed.c (init_expmed_one_mode, store_bit_field_1, expand_shift_1)
1519         (expand_shift, expand_smod_pow2): Likewise.
1520         * lower-subreg.c (shift_cost): Likewise.
1521         * optabs.c (expand_superword_shift, expand_doubleword_mult)
1522         (expand_unop, expand_binop, shift_amt_for_vec_perm_mask)
1523         (expand_vec_perm_var): Likewise.
1524         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
1525         (simplify_binary_operation_1): Likewise.
1526         * combine.c (try_combine, find_split_point, force_int_to_mode)
1527         (simplify_shift_const_1, simplify_shift_const): Likewise.
1528         (change_zero_ext): Likewise.  Use simplify_gen_binary.
1529
1530 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1531
1532         * poly-int.h (multiple_p): Fix handling of two non-poly_ints.
1533
1534 2017-12-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1535
1536         * doc/invoke.texi (ARM Options): Document accepted extension options
1537         for -march=armv8.3-a.
1538
1539 2017-12-20  Richard Earnshaw  <rearnsha@arm.com>
1540
1541         PR target/83105
1542         * config.gcc (arm*-*-linux*): When configured with --with-float=hard
1543         or --with-float=softfp, set the default CPU to arm10e.
1544
1545 2017-12-20  Eric Botcazou  <ebotcazou@adacore.com>
1546
1547         * config/visium/constraints.md (J, K, L): Use IN_RANGE macro.
1548         * config/visium/predicates.md (const_shift_operand): Likewise.
1549         * config/visium/visium.c (visium_legitimize_address): Fix oversight.
1550         (visium_legitimize_reload_address): Likewise.
1551
1552 2017-12-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1553
1554         PR target/82975
1555         * config/arm/arm.h (TEST_REGNO): Adjust comment as expected in r255830.
1556
1557 2017-12-20  Jakub Jelinek  <jakub@redhat.com>
1558
1559         PR c++/83490
1560         * calls.c (compute_argument_addresses): Ignore TYPE_EMPTY_P arguments.
1561
1562 2017-12-20  Julia Koval  <julia.koval@intel.com>
1563
1564         * common/config/i386/i386-common.c (OPTION_MASK_ISA_VPCLMULQDQ_SET,
1565         OPTION_MASK_ISA_VPCLMULQDQ_UNSET): New.
1566         (ix86_handle_option): Handle -mvpclmulqdq, move cx6 to flags2.
1567         * config.gcc: Include vpclmulqdqintrin.h.
1568         * config/i386/cpuid.h: Handle bit_VPCLMULQDQ.
1569         * config/i386/driver-i386.c (host_detect_local_cpu): Handle
1570         -mvpclmulqdq.
1571         * config/i386/i386-builtin.def (__builtin_ia32_vpclmulqdq_v2di,
1572         __builtin_ia32_vpclmulqdq_v4di, __builtin_ia32_vpclmulqdq_v8di): New.
1573         * config/i386/i386-c.c (__VPCLMULQDQ__): New.
1574         * config/i386/i386.c (isa2_opts): Add -mcx16.
1575         (isa_opts): Add -mpclmulqdq, remove -mcx16.
1576         (ix86_option_override_internal): Move mcx16 to flags2.
1577         (ix86_valid_target_attribute_inner_p): Add vpclmulqdq.
1578         (ix86_expand_builtin): Handle OPTION_MASK_ISA_VPCLMULQDQ.
1579         * config/i386/i386.h (TARGET_VPCLMULQDQ, TARGET_VPCLMULQDQ_P): New.
1580         * config/i386/i386.opt: Add mvpclmulqdq, move mcx16 to flags2.
1581         * config/i386/immintrin.h: Include vpclmulqdqintrin.h.
1582         * config/i386/sse.md (vpclmulqdq_<mode>): New pattern.
1583         * config/i386/vpclmulqdqintrin.h (_mm512_clmulepi64_epi128,
1584         _mm_clmulepi64_epi128, _mm256_clmulepi64_epi128): New intrinsics.
1585         * doc/invoke.texi: Add -mvpclmulqdq.
1586
1587 2017-12-20  Tom de Vries  <tom@codesourcery.com>
1588
1589         PR middle-end/83423
1590         * config/i386/i386.c (ix86_static_chain): Move DECL_STATIC_CHAIN test ...
1591         * calls.c (rtx_for_static_chain): ... here.  New function.
1592         * calls.h (rtx_for_static_chain): Declare.
1593         * builtins.c (expand_builtin_setjmp_receiver): Use rtx_for_static_chain
1594         instead of targetm.calls.static_chain.
1595         * df-scan.c (df_get_entry_block_def_set): Same.
1596
1597 2017-12-19  Tom de Vries  <tom@codesourcery.com>
1598
1599         PR tree-optimization/83493
1600         * graphite-isl-ast-to-gimple.c (translate_isl_ast_node_for): Unshare ub
1601         and lb.
1602
1603 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
1604
1605         * gimple-ssa-sprintf.c (format_directive): Use inform_n instead of
1606         inform with hardcoded english plural handling.
1607
1608 2017-12-18  Jeff Law  <law@redhat.com>
1609
1610         PR tree-optimization/83477
1611         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis): For
1612         a non-virtual PHI, always push a new range.
1613
1614 2017-12-19  Martin Sebor  <msebor@redhat.com>
1615
1616         PR middle-end/77608
1617         * builtins.c (compute_objsize): Handle non-constant offsets.
1618
1619 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
1620
1621         PR tree-optimization/83444
1622         * tree-ssa-strlen.c (strlen_check_and_optimize_stmt): For the
1623         character load case, if get_stridx on MEM_REF's operand doesn't
1624         look usable, retry with get_addr_stridx.
1625
1626 2017-12-19  Alexandre Oliva <aoliva@redhat.com>
1627
1628         PR debug/83422
1629         * var-tracking.c (vt_debug_insns_local): Do not drop markers.
1630         (variable_tracking_main_1): Keep markers even when VTA fails.
1631
1632         PR bootstrap/83396
1633         * cfgexpand.c (expand_gimple_basic_block): Expand label first,
1634         even if there are markers before it.
1635         * cfgrtl.c (rtl_verify_bb_layout): Reject DEBUG_INSNs outside BBs.
1636
1637 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
1638
1639         * read-rtl.c (parse_reg_note_name): Replace Yoda conditions with
1640         typical order conditions.
1641         * sel-sched.c (extract_new_fences_from): Likewise.
1642         * config/visium/constraints.md (J, K, L): Likewise.
1643         * config/visium/predicates.md (const_shift_operand): Likewise.
1644         * config/visium/visium.c (visium_legitimize_address,
1645         visium_legitimize_reload_address): Likewise.
1646         * config/m68k/m68k.c (output_reg_adjust, emit_reg_adjust): Likewise.
1647         * config/arm/arm.c (arm_block_move_unaligned_straight): Likewise.
1648         * config/avr/constraints.md (Y01, Ym1, Y02, Ym2): Likewise.
1649         * config/avr/avr-log.c (avr_vdump, avr_log_set_avr_log,
1650         SET_DUMP_DETAIL): Likewise.
1651         * config/avr/predicates.md (const_8_16_24_operand): Likewise.
1652         * config/avr/avr.c (STR_PREFIX_P, avr_popcount_each_byte,
1653         avr_is_casesi_sequence, avr_casei_sequence_check_operands,
1654         avr_set_core_architecture, avr_set_current_function,
1655         avr_legitimize_reload_address, avr_asm_len, avr_print_operand,
1656         output_movqi, output_movsisf, avr_out_plus, avr_out_bitop,
1657         avr_out_fract, avr_adjust_insn_length, avr_encode_section_info,
1658         avr_2word_insn_p, output_reload_in_const, avr_has_nibble_0xf,
1659         avr_map_decompose, avr_fold_builtin): Likewise.
1660         * config/avr/driver-avr.c (avr_devicespecs_file): Likewise.
1661         * config/avr/gen-avr-mmcu-specs.c (str_prefix_p, print_mcu): Likewise.
1662         * config/i386/i386.c (ix86_parse_stringop_strategy_string): Likewise.
1663         * config/m32c/m32c-pragma.c (m32c_pragma_memregs): Likewise.
1664         * config/m32c/m32c.c (m32c_conditional_register_usage,
1665         m32c_address_cost): Likewise.
1666         * config/m32c/predicates.md (shiftcount_operand,
1667         longshiftcount_operand): Likewise.
1668         * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise.
1669         * config/nios2/nios2.c (nios2_handle_custom_fpu_insn_option,
1670         can_use_cdx_ldstw): Likewise.
1671         * config/nios2/nios2.h (CDX_REG_P): Likewise.
1672         * config/cr16/cr16.h (RETURN_ADDR_RTX, REGNO_MODE_OK_FOR_BASE_P):
1673         Likewise.
1674         * config/cr16/cr16.md (*mov<mode>_double): Likewise.
1675         * config/cr16/cr16.c (cr16_create_dwarf_for_multi_push): Likewise.
1676         * config/h8300/h8300.c (h8300_rtx_costs, get_shift_alg): Likewise.
1677         * config/vax/constraints.md (U06, U08, U16, CN6, S08, S16): Likewise.
1678         * config/vax/vax.c (adjacent_operands_p): Likewise.
1679         * config/ft32/constraints.md (L, b, KA): Likewise.
1680         * config/ft32/ft32.c (ft32_load_immediate, ft32_expand_prologue):
1681         Likewise.
1682         * cfgexpand.c (expand_stack_alignment): Likewise.
1683         * gcse.c (insert_expr_in_table): Likewise.
1684         * print-rtl.c (rtx_writer::print_rtx_operand_codes_E_and_V): Likewise.
1685         * cgraphunit.c (cgraph_node::expand): Likewise.
1686         * ira-build.c (setup_min_max_allocno_live_range_point): Likewise.
1687         * emit-rtl.c (add_insn): Likewise.
1688         * input.c (dump_location_info): Likewise.
1689         * passes.c (NEXT_PASS): Likewise.
1690         * read-rtl-function.c (parse_note_insn_name,
1691         function_reader::read_rtx_operand_r, function_reader::parse_mem_expr):
1692         Likewise.
1693         * sched-rgn.c (sched_rgn_init): Likewise.
1694         * diagnostic-show-locus.c (layout::show_ruler): Likewise.
1695         * combine.c (find_split_point, simplify_if_then_else, force_to_mode,
1696         if_then_else_cond, simplify_shift_const_1, simplify_comparison): Likewise.
1697         * explow.c (eliminate_constant_term): Likewise.
1698         * final.c (leaf_renumber_regs_insn): Likewise.
1699         * cfgrtl.c (print_rtl_with_bb): Likewise.
1700         * genhooks.c (emit_init_macros): Likewise.
1701         * poly-int.h (maybe_ne, maybe_le, maybe_lt): Likewise.
1702         * tree-data-ref.c (conflict_fn): Likewise.
1703         * selftest.c (assert_streq): Likewise.
1704         * expr.c (store_constructor_field, expand_expr_real_1): Likewise.
1705         * fold-const.c (fold_range_test, extract_muldiv_1, fold_truth_andor,
1706         fold_binary_loc, multiple_of_p): Likewise.
1707         * reload.c (push_reload, find_equiv_reg): Likewise.
1708         * et-forest.c (et_nca, et_below): Likewise.
1709         * dbxout.c (dbxout_symbol_location): Likewise.
1710         * reorg.c (relax_delay_slots): Likewise.
1711         * dojump.c (do_compare_rtx_and_jump): Likewise.
1712         * gengtype-parse.c (type): Likewise.
1713         * simplify-rtx.c (simplify_gen_ternary, simplify_gen_relational,
1714         simplify_const_relational_operation): Likewise.
1715         * reload1.c (do_output_reload): Likewise.
1716         * dumpfile.c (get_dump_file_info_by_switch): Likewise.
1717         * gengtype.c (type_for_name): Likewise.
1718         * gimple-ssa-sprintf.c (format_directive): Likewise.
1719
1720 2017-12-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1721
1722         PR target/82975
1723         * config/arm/arm.h (TEST_REGNO): Check reg_renumber is set before
1724         accessing it.  Adjust comment.
1725
1726 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
1727
1728         PR middle-end/81914
1729         * predict.c (zero_one_minusone): New function.
1730         (apply_return_prediction): Avoid return prediction for functions
1731         returning only -1, 0 and 1 values, unless they only return -1 and 0
1732         or 0 and 1.
1733
1734 2017-12-19  Claudiu Zissulescu  <claziss@synopsys.com>
1735
1736         * config/arc/arc.c (legitimate_scaled_address_p): Clean
1737         fall-through warning.
1738         (arc_compute_frame_size): Remove unused variables.
1739         (arc_print_operand): Fix fprintif format.
1740         (arc_can_follow_jump): Clean fall-through warning.
1741
1742 2017-12-19  Marek Polacek  <polacek@redhat.com>
1743
1744         PR c++/83489
1745         * config/i386/i386.c (init_cumulative_args): Don't check TYPE_EMPTY_P
1746         on an error node.                                                    
1747
1748 2017-12-19  Claudiu Zissulescu  <claziss@synopsys.com>
1749
1750         * config/arc/arc.c (overriderregs): New variable.
1751         (arc_override_options): Track fixed/call saved/call options.
1752         (arc_conditional_register_usage): Check against overrideregs
1753         variable whenever we change register properties.
1754
1755 2017-12-19  Nathan Sidwell  <nathan@acm.org>
1756
1757         * opts.c (finish_options): Don't prefix dump_base_name if it
1758         already contains directories.
1759
1760 2017-12-19  Martin Liska  <mliska@suse.cz>
1761
1762         PR rtl-optimization/82675
1763         * loop-unroll.c (unroll_loop_constant_iterations): Allocate one
1764         more element in sbitmap.
1765
1766 2017-12-19  Paolo Carlini  <paolo.carlini@oracle.com>
1767
1768         * gimplify.c (gimplify_expr): Use error_operand_p.
1769
1770 2017-12-19  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1771
1772         PR target/83387
1773         * config/rs6000/t-rtems (MULTILIB_REQUIRED): Remove 64-bit soft-float
1774         multilib.
1775
1776 2017-12-19  Daniel Cederman  <cederman@gaisler.com>
1777
1778         * config/sparc/sparc.c (sparc_do_work_around_errata): Make sure
1779         the jump is to a label.
1780
1781 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
1782
1783         PR tree-optimization/83444
1784         * tree-ssa-strlen.c (strlen_check_and_optimize_stmt): Optimize
1785         character loads.
1786
1787         PR ipa/82801
1788         PR ipa/83346
1789         * ipa-inline.c (flatten_remove_node_hook): New function.
1790         (ipa_inline): Keep only nodes with flatten attribute at the end of
1791         the array in the order from ipa_reverse_postorder, only walk that
1792         portion of array for flattening, if there is more than one such
1793         node, temporarily register a removal hook and ignore removed nodes.
1794
1795         PR tree-optimization/80631
1796         * tree-vect-loop.c (vect_create_epilog_for_reduction): Compare
1797         induc_code against MAX_EXPR or MIN_EXPR instead of reduc_fn against
1798         IFN_REDUC_MAX or IFN_REDUC_MIN.
1799
1800 2017-12-18  Jeff Law  <law@redhat.com>
1801
1802         * tree-ssa-dom.c (record_equivalences_from_phis): Do not
1803         record symbolic equivalences from backedges in the CFG.
1804
1805         Revert
1806         2017-11-19  Jeff Law  <law@redhat.com>
1807
1808         * tree-ssa-dom.c (record_equivalences_from_phis): Fix handling
1809         of degenerates resulting from ignoring an edge.
1810
1811 2017-12-18  Martin Sebor  <msebor@redhat.com>
1812
1813         PR middle-end/83373
1814         PR tree-optimization/78450
1815         * tree-ssa-strlen.c (maybe_set_strlen_range): New function.
1816         (handle_builtin_strlen): Call it.
1817
1818 2017-12-18  Segher Boessenkool  <segher@kernel.crashing.org>
1819
1820         PR rtl-optimization/83424
1821         * rtlanal.c (dead_or_set_regno_p): Handle CLOBBER just like SET.
1822
1823 2017-12-18  Marek Polacek  <polacek@redhat.com>
1824
1825         PR middle-end/83463
1826         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref):
1827         Check if TYPE is INTEGRAL_TYPE_P before accessing its min/max
1828         values.
1829
1830 2017-12-18  Claudiu Zissulescu  <claziss@synopsys.com>
1831
1832         * config/arc/arc.md (maddsidi4, maddsidi4_split): Update pattern.
1833         (umaddsidi4, umaddsidi_split): Likewise.
1834
1835 2017-12-18  Claudiu Zissulescu  <claziss@synopsys.com>
1836
1837         * config/arc/arc.c (arc_legitimate_constant_p): Always check all
1838         constants.
1839
1840 2017-12-18  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1841
1842         PR target/83420
1843         * config/s390/s390.c (s390_option_override): Avoid strncpy.
1844
1845 2017-12-18  Richard Biener  <rguenther@suse.de>
1846
1847         PR tree-optimization/81877
1848         * tree-ssa-loop-im.c (ref_indep_loop_p): Remove safelen parameters.
1849         (outermost_indep_loop): Adjust.
1850         (ref_indep_loop_p_1): Likewise.  Remove safelen handling again.
1851         (can_sm_ref_p): Adjust.
1852
1853 2017-12-18  Richard Biener  <rguenther@suse.de>
1854
1855         PR middle-end/77291
1856         * tree.c (array_at_struct_end_p): Return true if the underlying
1857         object has space for at least one element in excess of what
1858         the array domain specifies.
1859
1860 2017-12-17  Sandra Loosemore  <sandra@codesourcery.com>
1861
1862         * doc/extend.texi (x86 Function Attributes): Reformat nocf_check
1863         example to avoid overfull hbox.
1864         * doc/invoke.texi (Option Summary): Add missing @gol.
1865         (C++ Dialect Options): Reformat -Wnoexcept-type example to avoid 
1866         overfull hbox.
1867         
1868 2017-12-17  Sandra Loosemore  <sandra@codesourcery.com>
1869             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1870
1871         * doc/invoke.texi (Option Summary): Add -mverbose-cost-dump
1872         to AArch64 and ARM lists, plus missing -mflip-thumb for ARM.
1873         (AArch64 Options): Document -mverbose-cost-dump.
1874         (ARM Options): Likewise, plus -mflip-thumb.
1875
1876 2017-12-17  Martin Sebor  <msebor@redhat.com>
1877
1878         PR bootstrap/83446
1879         * gimple-ssa-warn-restrict.c
1880         (builtin_memref::offset_out_of_bounds): Correct the handling of
1881         anti-ranges.
1882
1883 2017-12-17  Sandra Loosemore  <sandra@codesourcery.com>
1884
1885         * doc/invoke.texi (ARC Options): Add missing -mlra entry.
1886
1887 2017-12-17  John David Anglin  <danglin@gcc.gnu.org>
1888
1889         * config/pa/pa.c (pa_som_asm_init_sections): Fix comment.
1890
1891 2017-12-17  Markus Trippelsdorf  <markus@trippelsdorf.de>
1892
1893         * x86-tune-costs.h (skylake_cost, core_cost): Decrease r64 multiply
1894         latencies.
1895
1896 2017-12-16  Sandra Loosemore  <sandra@codesourcery.com>
1897
1898         * doc/invoke.texi: Fix some typos.
1899
1900 2017-12-16  Martin Sebor  <msebor@redhat.com>
1901
1902         PR tree-optimization/78918
1903         * Makefile.in (OBJS): Add gimple-ssa-warn-restrict.o.
1904         * builtins.c (check_sizes): Rename...
1905         (check_access): ...to this.  Rename function arguments for clarity.
1906         (check_memop_sizes): Adjust names.
1907         (expand_builtin_memchr, expand_builtin_memcpy): Same.
1908         (expand_builtin_memmove, expand_builtin_mempcpy): Same.
1909         (expand_builtin_strcat, expand_builtin_stpncpy): Same.
1910         (check_strncat_sizes, expand_builtin_strncat): Same.
1911         (expand_builtin_strncpy, expand_builtin_memset): Same.
1912         (expand_builtin_bzero, expand_builtin_memcmp): Same.
1913         (expand_builtin_memory_chk, maybe_emit_chk_warning): Same.
1914         (maybe_emit_sprintf_chk_warning): Same.
1915         (expand_builtin_strcpy): Adjust.
1916         (expand_builtin_stpcpy): Same.
1917         (expand_builtin_with_bounds): Detect out-of-bounds accesses
1918         in pointer-checking forms of memcpy, memmove, and mempcpy.
1919         (gcall_to_tree_minimal, max_object_size): Define new functions.
1920         * builtins.h (max_object_size): Declare.
1921         * calls.c (alloc_max_size): Call max_object_size instead of
1922         hardcoding ssizetype limit.
1923         (get_size_range): Handle new argument.
1924         * calls.h (get_size_range): Add a new argument.
1925         * cfgexpand.c (expand_call_stmt): Propagate no-warning bit.
1926         * doc/invoke.texi (-Wrestrict): Adjust, add example.
1927         * gimple-fold.c (gimple_fold_builtin_memory_op): Detect overlapping
1928         operations.
1929         (gimple_fold_builtin_memory_chk): Same.
1930         (gimple_fold_builtin_stxcpy_chk): New function.
1931         * gimple-ssa-warn-restrict.c: New source.
1932         * gimple-ssa-warn-restrict.h: New header.
1933         * gimple.c (gimple_build_call_from_tree): Propagate location.
1934         * passes.def (pass_warn_restrict): Add new pass.
1935         * tree-pass.h (make_pass_warn_restrict): Declare.
1936         * tree-ssa-strlen.c (handle_builtin_strcpy): Detect overlapping
1937         operations.
1938         (handle_builtin_strcat): Same.
1939         (strlen_optimize_stmt): Rename...
1940         (strlen_check_and_optimize_stmt): ...to this.  Handle strncat,
1941         stpncpy, strncpy, and their checking forms.
1942
1943 2017-12-16  Jan Hubicka  <hubicka@ucw.cz>
1944
1945         PR rtl-optimization/82849
1946         * modulo-sched.c (sms_schedule): Use get_estimated_loop_iterations_int
1947         and get_max_loop_iterations_int.
1948
1949 2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
1950             Alan Hayward  <alan.hayward@arm.com>
1951             David Sherwood  <david.sherwood@arm.com>
1952
1953         * machmode.h (mode_for_size, int_mode_for_size, float_mode_for_size)
1954         (smallest_mode_for_size, smallest_int_mode_for_size): Take the mode
1955         size as a poly_uint64.
1956         (mode_for_vector, mode_for_int_vector): Take the number of vector
1957         elements as a poly_uint64.
1958         * stor-layout.c (mode_for_size, smallest_mode_for_size): Take the mode
1959         size as a poly_uint64.
1960         (mode_for_vector, mode_for_int_vector): Take the number of vector
1961         elements as a poly_uint64.
1962
1963 2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
1964             Alan Hayward  <alan.hayward@arm.com>
1965             David Sherwood  <david.sherwood@arm.com>
1966
1967         * machmode.h (MACRO_MODE): New macro.
1968         * addresses.h (base_reg_class, ok_for_base_p_1): Use it.
1969         * targhooks.c (default_libcall_value, default_secondary_reload)
1970         (default_memory_move_cost, default_register_move_cost)
1971         (default_class_max_nregs): Likewise.
1972
1973 2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
1974             Alan Hayward  <alan.hayward@arm.com>
1975             David Sherwood  <david.sherwood@arm.com>
1976
1977         * doc/sourcebuild.texi: Document IN_TARGET_CODE.
1978         * genattrtab.c (write_header): Define IN_TARGET_CODE to 1 in the
1979         target C file.
1980         * genautomata.c (main): Likewise.
1981         * genconditions.c (write_header): Likewise.
1982         * genemit.c (main): Likewise.
1983         * genextract.c (print_header): Likewise.
1984         * genopinit.c (main): Likewise.
1985         * genoutput.c (output_prologue): Likewise.
1986         * genpeep.c (main): Likewise.
1987         * genpreds.c (write_insn_preds_c): Likewise.
1988         * genrecog.c (writer_header): Likewise.
1989         * config/aarch64/aarch64-builtins.c (IN_TARGET_CODE): Define.
1990         * config/aarch64/aarch64-c.c (IN_TARGET_CODE): Likewise.
1991         * config/aarch64/aarch64.c (IN_TARGET_CODE): Likewise.
1992         * config/aarch64/cortex-a57-fma-steering.c (IN_TARGET_CODE): Likewise.
1993         * config/aarch64/driver-aarch64.c (IN_TARGET_CODE): Likewise.
1994         * config/alpha/alpha.c (IN_TARGET_CODE): Likewise.
1995         * config/alpha/driver-alpha.c (IN_TARGET_CODE): Likewise.
1996         * config/arc/arc-c.c (IN_TARGET_CODE): Likewise.
1997         * config/arc/arc.c (IN_TARGET_CODE): Likewise.
1998         * config/arc/driver-arc.c (IN_TARGET_CODE): Likewise.
1999         * config/arm/aarch-common.c (IN_TARGET_CODE): Likewise.
2000         * config/arm/arm-builtins.c (IN_TARGET_CODE): Likewise.
2001         * config/arm/arm-c.c (IN_TARGET_CODE): Likewise.
2002         * config/arm/arm.c (IN_TARGET_CODE): Likewise.
2003         * config/arm/driver-arm.c (IN_TARGET_CODE): Likewise.
2004         * config/avr/avr-c.c (IN_TARGET_CODE): Likewise.
2005         * config/avr/avr-devices.c (IN_TARGET_CODE): Likewise.
2006         * config/avr/avr-log.c (IN_TARGET_CODE): Likewise.
2007         * config/avr/avr.c (IN_TARGET_CODE): Likewise.
2008         * config/avr/driver-avr.c (IN_TARGET_CODE): Likewise.
2009         * config/avr/gen-avr-mmcu-specs.c (IN_TARGET_CODE): Likewise.
2010         * config/bfin/bfin.c (IN_TARGET_CODE): Likewise.
2011         * config/c6x/c6x.c (IN_TARGET_CODE): Likewise.
2012         * config/cr16/cr16.c (IN_TARGET_CODE): Likewise.
2013         * config/cris/cris.c (IN_TARGET_CODE): Likewise.
2014         * config/darwin.c (IN_TARGET_CODE): Likewise.
2015         * config/epiphany/epiphany.c (IN_TARGET_CODE): Likewise.
2016         * config/epiphany/mode-switch-use.c (IN_TARGET_CODE): Likewise.
2017         * config/epiphany/resolve-sw-modes.c (IN_TARGET_CODE): Likewise.
2018         * config/fr30/fr30.c (IN_TARGET_CODE): Likewise.
2019         * config/frv/frv.c (IN_TARGET_CODE): Likewise.
2020         * config/ft32/ft32.c (IN_TARGET_CODE): Likewise.
2021         * config/h8300/h8300.c (IN_TARGET_CODE): Likewise.
2022         * config/i386/djgpp.c (IN_TARGET_CODE): Likewise.
2023         * config/i386/driver-i386.c (IN_TARGET_CODE): Likewise.
2024         * config/i386/driver-mingw32.c (IN_TARGET_CODE): Likewise.
2025         * config/i386/host-cygwin.c (IN_TARGET_CODE): Likewise.
2026         * config/i386/host-i386-darwin.c (IN_TARGET_CODE): Likewise.
2027         * config/i386/host-mingw32.c (IN_TARGET_CODE): Likewise.
2028         * config/i386/i386-c.c (IN_TARGET_CODE): Likewise.
2029         * config/i386/i386.c (IN_TARGET_CODE): Likewise.
2030         * config/i386/intelmic-mkoffload.c (IN_TARGET_CODE): Likewise.
2031         * config/i386/msformat-c.c (IN_TARGET_CODE): Likewise.
2032         * config/i386/winnt-cxx.c (IN_TARGET_CODE): Likewise.
2033         * config/i386/winnt-stubs.c (IN_TARGET_CODE): Likewise.
2034         * config/i386/winnt.c (IN_TARGET_CODE): Likewise.
2035         * config/i386/x86-tune-sched-atom.c (IN_TARGET_CODE): Likewise.
2036         * config/i386/x86-tune-sched-bd.c (IN_TARGET_CODE): Likewise.
2037         * config/i386/x86-tune-sched-core.c (IN_TARGET_CODE): Likewise.
2038         * config/i386/x86-tune-sched.c (IN_TARGET_CODE): Likewise.
2039         * config/ia64/ia64-c.c (IN_TARGET_CODE): Likewise.
2040         * config/ia64/ia64.c (IN_TARGET_CODE): Likewise.
2041         * config/iq2000/iq2000.c (IN_TARGET_CODE): Likewise.
2042         * config/lm32/lm32.c (IN_TARGET_CODE): Likewise.
2043         * config/m32c/m32c-pragma.c (IN_TARGET_CODE): Likewise.
2044         * config/m32c/m32c.c (IN_TARGET_CODE): Likewise.
2045         * config/m32r/m32r.c (IN_TARGET_CODE): Likewise.
2046         * config/m68k/m68k.c (IN_TARGET_CODE): Likewise.
2047         * config/mcore/mcore.c (IN_TARGET_CODE): Likewise.
2048         * config/microblaze/microblaze-c.c (IN_TARGET_CODE): Likewise.
2049         * config/microblaze/microblaze.c (IN_TARGET_CODE): Likewise.
2050         * config/mips/driver-native.c (IN_TARGET_CODE): Likewise.
2051         * config/mips/frame-header-opt.c (IN_TARGET_CODE): Likewise.
2052         * config/mips/mips.c (IN_TARGET_CODE): Likewise.
2053         * config/mmix/mmix.c (IN_TARGET_CODE): Likewise.
2054         * config/mn10300/mn10300.c (IN_TARGET_CODE): Likewise.
2055         * config/moxie/moxie.c (IN_TARGET_CODE): Likewise.
2056         * config/msp430/driver-msp430.c (IN_TARGET_CODE): Likewise.
2057         * config/msp430/msp430-c.c (IN_TARGET_CODE): Likewise.
2058         * config/msp430/msp430.c (IN_TARGET_CODE): Likewise.
2059         * config/nds32/nds32-cost.c (IN_TARGET_CODE): Likewise.
2060         * config/nds32/nds32-fp-as-gp.c (IN_TARGET_CODE): Likewise.
2061         * config/nds32/nds32-intrinsic.c (IN_TARGET_CODE): Likewise.
2062         * config/nds32/nds32-isr.c (IN_TARGET_CODE): Likewise.
2063         * config/nds32/nds32-md-auxiliary.c (IN_TARGET_CODE): Likewise.
2064         * config/nds32/nds32-memory-manipulation.c (IN_TARGET_CODE): Likewise.
2065         * config/nds32/nds32-pipelines-auxiliary.c (IN_TARGET_CODE): Likewise.
2066         * config/nds32/nds32-predicates.c (IN_TARGET_CODE): Likewise.
2067         * config/nds32/nds32.c (IN_TARGET_CODE): Likewise.
2068         * config/nios2/nios2.c (IN_TARGET_CODE): Likewise.
2069         * config/nvptx/mkoffload.c (IN_TARGET_CODE): Likewise.
2070         * config/nvptx/nvptx.c (IN_TARGET_CODE): Likewise.
2071         * config/pa/pa.c (IN_TARGET_CODE): Likewise.
2072         * config/pdp11/pdp11.c (IN_TARGET_CODE): Likewise.
2073         * config/powerpcspe/driver-powerpcspe.c (IN_TARGET_CODE): Likewise.
2074         * config/powerpcspe/host-darwin.c (IN_TARGET_CODE): Likewise.
2075         * config/powerpcspe/host-ppc64-darwin.c (IN_TARGET_CODE): Likewise.
2076         * config/powerpcspe/powerpcspe-c.c (IN_TARGET_CODE): Likewise.
2077         * config/powerpcspe/powerpcspe-linux.c (IN_TARGET_CODE): Likewise.
2078         * config/powerpcspe/powerpcspe.c (IN_TARGET_CODE): Likewise.
2079         * config/riscv/riscv-builtins.c (IN_TARGET_CODE): Likewise.
2080         * config/riscv/riscv-c.c (IN_TARGET_CODE): Likewise.
2081         * config/riscv/riscv.c (IN_TARGET_CODE): Likewise.
2082         * config/rl78/rl78-c.c (IN_TARGET_CODE): Likewise.
2083         * config/rl78/rl78.c (IN_TARGET_CODE): Likewise.
2084         * config/rs6000/driver-rs6000.c (IN_TARGET_CODE): Likewise.
2085         * config/rs6000/host-darwin.c (IN_TARGET_CODE): Likewise.
2086         * config/rs6000/host-ppc64-darwin.c (IN_TARGET_CODE): Likewise.
2087         * config/rs6000/rs6000-c.c (IN_TARGET_CODE): Likewise.
2088         * config/rs6000/rs6000-linux.c (IN_TARGET_CODE): Likewise.
2089         * config/rs6000/rs6000-p8swap.c (IN_TARGET_CODE): Likewise.
2090         * config/rs6000/rs6000-string.c (IN_TARGET_CODE): Likewise.
2091         * config/rs6000/rs6000.c (IN_TARGET_CODE): Likewise.
2092         * config/rx/rx.c (IN_TARGET_CODE): Likewise.
2093         * config/s390/driver-native.c (IN_TARGET_CODE): Likewise.
2094         * config/s390/s390-c.c (IN_TARGET_CODE): Likewise.
2095         * config/s390/s390.c (IN_TARGET_CODE): Likewise.
2096         * config/sh/sh-c.c (IN_TARGET_CODE): Likewise.
2097         * config/sh/sh-mem.cc (IN_TARGET_CODE): Likewise.
2098         * config/sh/sh.c (IN_TARGET_CODE): Likewise.
2099         * config/sh/sh_optimize_sett_clrt.cc (IN_TARGET_CODE): Likewise.
2100         * config/sh/sh_treg_combine.cc (IN_TARGET_CODE): Likewise.
2101         * config/sparc/driver-sparc.c (IN_TARGET_CODE): Likewise.
2102         * config/sparc/sparc-c.c (IN_TARGET_CODE): Likewise.
2103         * config/sparc/sparc.c (IN_TARGET_CODE): Likewise.
2104         * config/spu/spu-c.c (IN_TARGET_CODE): Likewise.
2105         * config/spu/spu.c (IN_TARGET_CODE): Likewise.
2106         * config/stormy16/stormy16.c (IN_TARGET_CODE): Likewise.
2107         * config/tilegx/mul-tables.c (IN_TARGET_CODE): Likewise.
2108         * config/tilegx/tilegx-c.c (IN_TARGET_CODE): Likewise.
2109         * config/tilegx/tilegx.c (IN_TARGET_CODE): Likewise.
2110         * config/tilepro/mul-tables.c (IN_TARGET_CODE): Likewise.
2111         * config/tilepro/tilepro-c.c (IN_TARGET_CODE): Likewise.
2112         * config/tilepro/tilepro.c (IN_TARGET_CODE): Likewise.
2113         * config/v850/v850-c.c (IN_TARGET_CODE): Likewise.
2114         * config/v850/v850.c (IN_TARGET_CODE): Likewise.
2115         * config/vax/vax.c (IN_TARGET_CODE): Likewise.
2116         * config/visium/visium.c (IN_TARGET_CODE): Likewise.
2117         * config/vms/vms-c.c (IN_TARGET_CODE): Likewise.
2118         * config/vms/vms-f.c (IN_TARGET_CODE): Likewise.
2119         * config/vms/vms.c (IN_TARGET_CODE): Likewise.
2120         * config/xtensa/xtensa.c (IN_TARGET_CODE): Likewise.
2121
2122 2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
2123             Alan Hayward  <alan.hayward@arm.com>
2124             David Sherwood  <david.sherwood@arm.com>
2125
2126         * tree-ssa-sccvn.c (vn_reference_lookup_3): Avoid repeated
2127         checks for MEM_REF.
2128
2129 2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
2130             Alan Hayward  <alan.hayward@arm.com>
2131             David Sherwood  <david.sherwood@arm.com>
2132
2133         * doc/generic.texi (VEC_SERIES_EXPR): Document.
2134         * doc/md.texi (vec_series@var{m}): Document.
2135         * tree.def (VEC_SERIES_EXPR): New tree code.
2136         * tree.h (build_vec_series): Declare.
2137         * tree.c (build_vec_series): New function.
2138         * cfgexpand.c (expand_debug_expr): Handle VEC_SERIES_EXPR.
2139         * tree-pretty-print.c (dump_generic_node): Likewise.
2140         * gimple-pretty-print.c (dump_binary_rhs): Likewise.
2141         * tree-inline.c (estimate_operator_cost): Likewise.
2142         * expr.c (expand_expr_real_2): Likewise.
2143         * optabs-tree.c (optab_for_tree_code): Likewise.
2144         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
2145         * fold-const.c (const_binop): Fold VEC_SERIES_EXPRs of constants.
2146         * expmed.c (make_tree): Handle VEC_SERIES.
2147         * optabs.def (vec_series_optab): New optab.
2148         * optabs.h (expand_vec_series_expr): Declare.
2149         * optabs.c (expand_vec_series_expr): New function.
2150         * tree-vect-generic.c (expand_vector_operations_1): Check that
2151         the operands also have vector type.
2152
2153 2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
2154             Alan Hayward  <alan.hawyard@arm.com>
2155             David Sherwood  <david.sherwood@arm.com>
2156
2157         * doc/generic.texi (VEC_DUPLICATE_EXPR): Document.
2158         (VEC_COND_EXPR): Add missing @tindex.
2159         * doc/md.texi (vec_duplicate@var{m}): Document.
2160         * tree.def (VEC_DUPLICATE_EXPR): New tree codes.
2161         * tree.c (build_vector_from_val): Add stubbed-out handling of
2162         variable-length vectors, using VEC_DUPLICATE_EXPR.
2163         (uniform_vector_p): Handle VEC_DUPLICATE_EXPR.
2164         * cfgexpand.c (expand_debug_expr): Likewise.
2165         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
2166         * tree-inline.c (estimate_operator_cost): Likewise.
2167         * tree-pretty-print.c (dump_generic_node): Likewise.
2168         * tree-vect-generic.c (ssa_uniform_vector_p): Likewise.
2169         * fold-const.c (const_unop): Fold VEC_DUPLICATE_EXPRs of a constant.
2170         (test_vec_duplicate_folding): New function.
2171         (fold_const_c_tests): Call it.
2172         * optabs.def (vec_duplicate_optab): New optab.
2173         * optabs-tree.c (optab_for_tree_code): Handle VEC_DUPLICATE_EXPR.
2174         * optabs.h (expand_vector_broadcast): Declare.
2175         * optabs.c (expand_vector_broadcast): Make non-static.  Try using
2176         vec_duplicate_optab.
2177         * expr.c (store_constructor): Try using vec_duplicate_optab for
2178         uniform vectors.
2179         (expand_expr_real_2): Handle VEC_DUPLICATE_EXPR.
2180
2181 2017-12-15  Markus Trippelsdorf  <markus@trippelsdorf.de>
2182
2183         PR target/83358
2184         * config/i386/x86-tune-costs.h (skylake_cost, core_cost): Increase
2185         div/mod latencies a bit.
2186
2187 2017-12-15  Jeff Law  <law@redhat.com>
2188
2189         PR tree-optimization/36550
2190         * tree-ssa-threadupdate.c (count_stmts_and_phis_in_block): New.
2191         (mark_threaded_blocks): Rewrite code to avoid block copying when
2192         optimizing for size.  Don't pessimize blocks which will be
2193         copied, but all the statements will be dead.
2194
2195 2017-12-15  Alexandre Oliva <aoliva@redhat.com>
2196
2197         PR tree-optimization/81165
2198         * tree-ssa-threadupdate.c (uses_in_bb): New.
2199         (estimate_threading_killed_stmts): New.
2200         * tree-ssa-threadupdate.h (estimate_threading_killed_stmts): Prototype.
2201         * tree-ssa-threadedge.c 
2202         (record_temporary_equivalences_from_stmts_at_dest): Expand limit
2203         when its hit.
2204
2205 2017-12-15  Jeff Law  <law@redhat.com>
2206
2207         PR tree-optimization/83410
2208         * tree-ssa-threadupdate.c (thread_block_1): Avoid certain jump
2209         threads when parallelizing loops.
2210
2211 2017-12-15  Jakub Jelinek  <jakub@redhat.com>
2212
2213         * tree-core.h (struct attribute_spec): Swap affects_type_identity and
2214         handler fields.
2215         * config/alpha/alpha.c (vms_attribute_table): Swap
2216         affects_type_identity and handler fields, adjust comments.
2217         * config/mips/mips.c (mips_attribute_table): Likewise.
2218         * config/visium/visium.c (visium_attribute_table): Likewise.
2219         * config/epiphany/epiphany.c (epiphany_attribute_table): Likewise.
2220         * config/microblaze/microblaze.c (microblaze_attribute_table):
2221         Likewise.
2222         * config/spu/spu.c (spu_attribute_table): Likewise.
2223         * config/mcore/mcore.c (mcore_attribute_table): Likewise.
2224         * config/arc/arc.c (arc_attribute_table): Likewise.
2225         * config/m68k/m68k.c (m68k_attribute_table): Likewise.
2226         * config/v850/v850.c (v850_handle_interrupt_attribute,
2227         v850_handle_data_area_attribute): Formatting fixes.
2228         (v850_attribute_table): Swap affects_type_identity and handler
2229         fields, adjust comments.
2230         * config/m32r/m32r.c (m32r_attribute_table): Likewise.
2231         * config/arm/arm.c (arm_attribute_table): Likewise.
2232         * config/avr/avr.c (avr_attribute_table): Likewise.
2233         * config/s390/s390.c (s390_attribute_table): Likewise.
2234         * config/sh/sh.c (sh_attribute_table): Likewise.
2235         * config/i386/i386.c (ix86_handle_cconv_attribute,
2236         ix86_handle_callee_pop_aggregate_return): Formatting fixes.
2237         (ix86_attribute_table): Swap affects_type_identity and handler
2238         fields, adjust comments.
2239         * config/i386/cygming.h (SUBTARGET_ATTRIBUTE_TABLE): Likewise.
2240         * config/sparc/sparc.c (sparc_attribute_table): Likewise.
2241         * config/m32c/m32c.c (m32c_attribute_table): Likewise.
2242         * config/sol2.h (SOLARIS_ATTRIBUTE_TABLE): Likewise.
2243         * config/ia64/ia64.c (ia64_attribute_table): Likewise.
2244         * config/msp430/msp430.c (msp430_attribute_table): Likewise.
2245         * config/rx/rx.c (rx_attribute_table): Likewise.
2246         * config/cr16/cr16.c (cr16_attribute_table): Likewise.
2247         * config/h8300/h8300.c (h8300_attribute_table): Likewise.
2248         * config/nvptx/nvptx.c (nvptx_attribute_table): Likewise.
2249         * config/powerpcspe/powerpcspe.c (rs6000_attribute_table): Likewise.
2250         * config/darwin.h (SUBTARGET_ATTRIBUTE_TABLE): Likewise.
2251         * config/stormy16/stormy16.c (xstormy16_attribute_table): Likewise.
2252         * config/bfin/bfin.c (bfin_attribute_table): Likewise.
2253         * config/rs6000/rs6000.c (rs6000_attribute_table): Likewise.
2254         * config/rl78/rl78.c (rl78_attribute_table): Likewise.
2255         * config/nds32/nds32.c (nds32_attribute_table): Likewise.
2256         * doc/plugins.texi (user_attr): Likewise.  Add NULL for
2257         exclude.
2258         * attribs.c (empty_attribute_table): Swap affects_type_identity and
2259         handler fields.
2260         (register_scoped_attributes, decl_attributes): Formatting fixes.
2261
2262         PR tree-optimization/83269
2263         * fold-const.c (fold_binary_loc): Perform (-A) - B -> (-B) - A
2264         subtraction in arg0's type if type is signed and arg0 is unsigned.
2265         Formatting fix.
2266
2267         PR sanitizer/81281
2268         * match.pd ((T)(P + A) - (T)P -> (T) A): Use @@0 instead of @0 and
2269         convert? on @0 instead of convert.  Check type of @1, not @0.
2270         ((T)P - (T)(P + A) -> -(T) A): Use @@0 instead of @0 and
2271         convert? on @0 instead of convert.  Check type of @1, not @0.
2272         ((T)(P + A) - (T)(P + B) -> (T)A - (T)B): Use @@0 instead of @0,
2273         only optimize if either both @1 and @2 types are narrower
2274         precision, or both are wider or equal precision, and in the former
2275         case only if both have undefined overflow.
2276
2277 2017-12-15  Richard Biener  <rguenther@suse.de>
2278
2279         PR lto/83388
2280         * internal-fn.def (IFN_NOP): Add.
2281         * internal-fn.c (expand_NOP): Do nothing.
2282         * lto-streamer-in.c (input_function): Instead of removing
2283         sanitizer calls replace them with IFN_NOP calls.
2284
2285 2017-12-15  Richard Sandiford  <richard.sandiford@linaro.org>
2286             Alan Hayward  <alan.hayward@arm.com>
2287             David Sherwood  <david.sherwood@arm.com>
2288
2289         * dse.c (store_info, read_info_type): Replace begin and end with
2290         offset and width.
2291         (print_range): New function.
2292         (set_all_positions_unneeded, any_positions_needed_p)
2293         (check_mem_read_rtx, scan_stores, scan_reads, dse_step5): Update
2294         accordingly.
2295         (record_store): Likewise.  Optimize the case in which all positions
2296         are unneeded.
2297         (get_stored_val): Replace read_begin and read_end with read_offset
2298         and read_width.
2299         (replace_read): Update call accordingly.
2300
2301 2017-12-15  Bin Cheng  <bin.cheng@arm.com>
2302
2303         * gimple-loop-interchange.cc (STMT_COST_RATIO): New macro.
2304         (loop_cand::m_num_stmts, loop_cand::m_const_init_reduc): New members.
2305         (loop_cand::loop_cand): Initialize above members.
2306         (loop_cand::supported_operations): Delete.
2307         (loop_cand::can_interchange_p): Inline above function.
2308         (loop_cand::classify_simple_reduction): Record number of constant
2309         initialized simple reductions.
2310         (should_interchange_loops): New parameters.  Check stmt cost of loops
2311         to be interchange.
2312         (tree_loop_interchange::interchange): Prepare stmt cost of outer loop.
2313         Update call to should_interchange_loops.
2314         (should_interchange_loop_nest): Update call to
2315         should_interchange_loops.
2316
2317 2017-12-15  Eric Botcazou  <ebotcazou@adacore.com>
2318
2319         PR target/66488
2320         * ggc-page.c (HOST_BITS_PER_PTR): Do not define here...
2321         * hwint.h (HOST_BITS_PER_PTR): ...but here instead.
2322         * config/i386/xm-mingw32.h (HOST_BITS_PER_PTR): Delete.
2323
2324 2017-12-15  Julia Koval  <julia.koval@intel.com>
2325
2326         * config/i386/i386-builtin.def (__builtin_ia32_vaesenclast_v16qi,
2327         __builtin_ia32_vaesenclast_v32qi, __builtin_ia32_vaesenclast_v64qi): New.
2328         * config/i386/sse.md (vaesenclast_<mode>): New pattern.
2329         * config/i386/vaesintrin.h (_mm256_aesenclast_epi128,
2330         _mm512_aesenclast_epi128, _mm_aesenclast_epi128): New intrinsics.
2331
2332 2017-12-15  Julia Koval  <julia.koval@intel.com>
2333
2334         * config/i386/i386-builtin.def (__builtin_ia32_vaesenc_v16qi,
2335         __builtin_ia32_vaesenc_v32qi, __builtin_ia32_vaesenc_v64qi): New.
2336         * config/i386/sse.md (vaesenc_<mode>): New pattern.
2337         * config/i386/vaesintrin.h (_mm256_aesenc_epi128, _mm512_aesenc_epi128,
2338         _mm_aesenc_epi128): New intrinsics.
2339
2340 2017-12-15  Julia Koval  <julia.koval@intel.com>
2341
2342         * config/i386/i386-builtin.def (__builtin_ia32_vaesdeclast_v16qi,
2343         __builtin_ia32_vaesdeclast_v32qi, __builtin_ia32_vaesdeclast_v64qi): New.
2344         * config/i386/sse.md (vaesdeclast_<mode>): New pattern.
2345         * config/i386/vaesintrin.h (_mm256_aesdeclast_epi128,
2346         _mm512_aesdeclast_epi128, _mm_aesdeclast_epi128): New intrinsics.
2347
2348 2017-12-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
2349
2350         * gimple-ssa-strength-reduction.c (analyze_increments):
2351         Distinguish replacement costs for constant strides from those for
2352         unknown strides.
2353
2354 2017-12-14  Jakub Jelinek  <jakub@redhat.com>
2355
2356         * var-tracking.c (variable_tracking_main_1): Formatting fix.
2357
2358 2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2359
2360         * doc/invoke.texi: Document -Wcast-function-type.
2361         * recog.h (stored_funcptr): Change signature.
2362         * tree-dump.c (dump_node): Avoid warning.
2363         * typed-splay-tree.h (typed_splay_tree): Avoid warning.
2364
2365 2017-12-14  Qing Zhao  <qing.zhao@oracle.com>
2366
2367         PR middle_end/79538
2368         * gimple-fold.c (get_range_strlen): Add the handling of non-member 
2369         array.
2370
2371 2017-12-14  David Malcolm  <dmalcolm@redhat.com>
2372
2373         PR tree-optimization/83312
2374         * domwalk.h (dom_walker::dom_walker): Fix typo in comment.
2375         * tree-cfg.c (find_taken_edge): Update to handle NULL_TREE for
2376         "val" param, and to cope with arbitrary basic blocks.
2377         (find_taken_edge_cond_expr): Add "cond_stmt" param and use it to
2378         handle NULL_TREE for "val", dropping "bb" param.
2379         (find_taken_edge_switch_expr): Make "switch_stmt" param const and
2380         drop "bb" param.  Handle NULL_TREE for "val".
2381         (find_case_label_for_value): Make "switch_stmt" param const.
2382         * tree-vrp.c (class check_array_bounds_dom_walker): New subclass
2383         of dom_walker.
2384         (vrp_prop::check_all_array_refs): Reimplement as...
2385         (check_array_bounds_dom_walker::before_dom_children): ...this new
2386         vfunc.  Replace linear search through BB block list, excluding
2387         those with non-executable in-edges via dominator walk.
2388
2389 2017-12-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2390
2391         * config/arm/arm.opt (mverbose-cost-dump): New option.
2392         * config/arm/arm.c (arm_rtx_costs): Use it.
2393
2394 2017-12-14  Andreas Schwab  <schwab@linux-m68k.org>
2395
2396         PR bootstrap/83396
2397         * reload1.c (emit_input_reload_insns): Skip debug markers.
2398
2399 2017-12-14  Alexandre Oliva <aoliva@redhat.com>
2400
2401         * config/i386/i386.c (rest_of_insert_endbranch): Use call loc
2402         for its nop_endbr.
2403
2404         PR bootstrap/83396
2405         * config/arc/arc.c (hwloop_optimize): Skip debug insns.
2406         * config/sh/sh-protos.h (sh_find_set_of_reg): Adjust.
2407         * config/sh/sh.c: Skip debug insns besides notes.
2408         * config/sh/sh.md: Likewise.
2409         * config/sh/sh_treg_combine.cc: Likewise.
2410         * config/sh/sync.md: Likewise.
2411
2412 2017-12-14  Tom de Vries  <tom@codesourcery.com>
2413
2414         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
2415         Add item for weak_undefined.
2416
2417 2017-12-14  Richard Biener  <rguenther@suse.de>
2418
2419         PR tree-optimization/67842
2420         * sese.h (bb_in_region): Remove #if 0'ed code.
2421
2422 2017-12-14  Richard Biener  <rguenther@suse.de>
2423
2424         PR tree-optimization/83326
2425         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Add
2426         may_be_zero parameter and handle it by not marking the first
2427         peeled copy as not exiting the loop.
2428         (try_peel_loop): Likewise.
2429         (canonicalize_loop_induction_variables): Use number_of_iterations_exit
2430         to handle the case of constant or zero iterations and perform
2431         loop header copying on-the-fly.
2432
2433 2017-12-14  Richard Biener  <rguenther@suse.de>
2434
2435         PR tree-optimization/83418
2436         * vr-values.c (vr_values::extract_range_for_var_from_comparison_expr):
2437         Instead of asserting we don't get unfolded comparisons deal with
2438         them.
2439
2440 2017-12-14  Jakub Jelinek  <jakub@redhat.com>
2441
2442         PR bootstrap/83396
2443         * var-tracking.c (vt_initialize): Ignore non-DEBUG_INSNs outside of
2444         basic blocks.  Assert debug bind insns don't appear outside of bbs,
2445         don't reset them.  Assert insns without BLOCK_FOR_INSN are outside of
2446         bb.  Simplify.
2447
2448         PR tree-optimization/83198
2449         * gimple-ssa-sprintf.c (format_floating): Set type solely based on
2450         dir.modifier, regardless of TREE_TYPE (arg).  Assume non-REAL_CST
2451         value if arg is a REAL_CST with incompatible type.
2452
2453 2017-12-14  Sudakshina Das  <sudi.das@arm.com>
2454             Bin Cheng  <bin.cheng@arm.com>
2455
2456         PR target/81228
2457         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Move LTGT
2458         to CCFPEmode.
2459         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Add
2460         LTGT.
2461
2462 2017-12-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2463
2464         * config/aarch64/aarch64-cores.def (cortex-a55, cortex-a75,
2465         cortex-a75.cortex-a55): Specify AARCH64_FL_F16 in the arch features.
2466
2467 2017-12-14  Richard Sandiford  <richard.sandiford@linaro.org>
2468             Alan Hayward  <alan.hayward@arm.com>
2469             David Sherwood  <david.sherwood@arm.com>
2470
2471         * poly-int.h: New file.
2472         * poly-int-types.h: Likewise.
2473         * coretypes.h: Include them.
2474         (POLY_INT_CONVERSION): Define.
2475         * target.def (estimated_poly_value): New hook.
2476         * doc/tm.texi.in (TARGET_ESTIMATED_POLY_VALUE): New hook.
2477         * doc/tm.texi: Regenerate.
2478         * doc/poly-int.texi: New file.
2479         * doc/gccint.texi: Include it.
2480         * doc/rtl.texi: Describe restrictions on subreg modes.
2481         * Makefile.in (TEXI_GCCINT_FILES): Add poly-int.texi.
2482         * genmodes.c (NUM_POLY_INT_COEFFS): Provide a default definition.
2483         (emit_insn_modes_h): Emit a definition of NUM_POLY_INT_COEFFS.
2484         * targhooks.h (default_estimated_poly_value): Declare.
2485         * targhooks.c (default_estimated_poly_value): New function.
2486         * target.h (estimated_poly_value): Likewise.
2487         * wide-int.h (WI_UNARY_RESULT): Use wi::binary_traits.
2488         (wi::unary_traits): Delete.
2489         (wi::binary_traits::signed_shift_result_type): Define for
2490         offset_int << HOST_WIDE_INT, etc.
2491         (generic_wide_int::operator <<=): Define for all types and use
2492         wi::lshift instead of <<.
2493         (wi::hwi_with_prec): Add a default constructor.
2494         (wi::ints_for): New class.
2495         (operator <<): Define for all wide-int types.
2496         (operator /): New function.
2497         (operator %): Likewise.
2498         * selftest.h (ASSERT_KNOWN_EQ, ASSERT_KNOWN_EQ_AT, ASSERT_MAYBE_NE)
2499         (ASSERT_MAYBE_NE_AT): New macros.
2500
2501 2017-12-13  Eric Botcazou  <ebotcazou@adacore.com>
2502             Dominik Vogt  <vogt@linux.vnet.ibm.com>
2503
2504         PR middle-end/78468
2505         * emit-rtl.c (init_emit): Remove ??? comment.
2506         * explow.c (get_dynamic_stack_size): Take known alignment of stack
2507         pointer + STACK_DYNAMIC_OFFSET into account in lieu of STACK_BOUNDARY.
2508         * config/sparc/sparc.h (INIT_EXPANDERS): In 32-bit mode, lower the
2509         alignment of 3 virtual registers to BITS_PER_WORD.
2510
2511         * config/sparc/sparc.c (sparc_compute_frame_size): Simplify.
2512
2513 2017-12-13  Peter Bergner  <bergner@vnet.ibm.com>
2514
2515         * config/rs6000/ppc-auxv.h (PPC_FEATURE2_HTM_NO_SUSPEND): New define.
2516         * config/rs6000/rs6000.c (cpu_supports_info): Use it.
2517
2518 2017-12-13  Alexandre Oliva <aoliva@redhat.com>
2519
2520         PR bootstrap/83396
2521         * reload1.c (eliminate_regs_in_insn): Skip debug markers.
2522
2523 2017-12-13  Jakub Jelinek  <jakub@redhat.com>
2524
2525         * tree-cfg.c (verify_gimple_in_cfg): Verify no non-label stmts
2526         with the exception of debug begin stmt markers appear before
2527         labels.
2528
2529         PR bootstrap/83396
2530         * final.c (rest_of_handle_final): Call variable_tracking_main only
2531         if !flag_var_tracking.
2532
2533 2017-12-13  Alexandre Oliva  <aoliva@redhat.com>
2534             Jakub Jelinek  <jakub@redhat.com>
2535
2536         PR bootstrap/83396
2537         PR debug/83391
2538         * tree-cfgcleanup.c (remove_forwarder_block): Keep after
2539         labels debug stmts that can only appear after labels.
2540
2541 2017-12-13  Alexander Monakov  <amonakov@ispras.ru>
2542
2543         PR rtl-optimization/82398
2544         * sel-sched.c (sel_rank_for_schedule): Fix check for zero
2545         EXPR_USEFULNESS in priority comparison.
2546
2547 2017-12-13  Segher Boessenkool  <segher@kernel.crashing.org>
2548
2549         PR rtl-optimization/83393
2550         * combine.c (move_deaths): If reg_stat points to a too new insn in
2551         last_death, do not use it: find the proper insn instead.
2552
2553 2017-12-12  Jeff Law  <law@redhat.com>
2554
2555         PR tree-optimization/83298
2556         PR tree-optimization/83362
2557         PR tree-optimization/83383
2558         * gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Make
2559         push_value_range a public interface.  Add new argument to
2560         record_ranges_from_stmt.
2561         * gimple-ssa-evrp-analyze.c
2562         (evrp_range_analyzer::record_ranges_from_stmt): Add new argument.
2563         Update comments.  Handle recording temporary equivalences.
2564         * tree-ssa-dom.c (dom_opt_opt_walker::before_dom_children): Add
2565         new argument to call to evrp_range_analyzer::record_ranges_from_stmt.
2566         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Likewise.
2567         * tree-ssa-threadedge.c: Include alloc-pool.h, vr-values.h and
2568         gimple-ssa-evrp-analyze.h.
2569         (record_temporary_equivalences_from_phis): Add new argument.  When
2570         the PHI arg is an SSA_NAME, set the result's range to the range
2571         of the PHI arg.
2572         (record_temporary_equivalences_from_stmts_at_dest): Record ranges
2573         from statements too.
2574         (thread_through_normal_block): Accept new argument, evrp_range_analyzer.
2575         Pass it down to children as needed.
2576         (thread_outgoing_edges): Likewise.
2577         (thread_across_edge): Likewise.   Push/pop range state as needed.
2578         * tree-ssa-threadedge.h (thread_outgoing_edges): Update prototype.
2579
2580 2017-12-12  Julia Koval  <julia.koval@intel.com>
2581
2582         * config/i386/i386.c (PTA_SKYLAKE_AVX512): Add PTA_CLWB.
2583         (PTA_CANNONLAKE): Remove PTA_CLWB.
2584
2585 2017-12-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
2586
2587         PR target/83332
2588         * config/rs6000/vector.md (vcondv2dfv2di): New define_expand.
2589         (vcondv2div2df): Likewise.
2590         (vconduv2dfv2di): Likewise.
2591
2592 2017-12-12  Jakub Jelinek  <jakub@redhat.com>
2593
2594         * builtins.def (BUILT_IN_NEXTAFTER, BUILT_IN_NEXTAFTERF,
2595         BUILT_IN_NEXTAFTERL, BUILT_IN_NEXTTOWARD, BUILT_IN_NEXTTOWARDF,
2596         BUILT_IN_NEXTTOWARDL): Use ATTR_MATHFN_ERRNO instead of
2597         ATTR_MATHFN_FPROUNDING_ERRNO.
2598
2599 2017-12-12  Richard Biener  <rguenther@suse.de>
2600
2601         PR tree-optimization/83385
2602         * graphite-scop-detection.c (get_order, order): Remove.
2603         (bb_to_rpo): New global.
2604         (cmp_pbbs): Adjust.
2605         (build_scops): Sort pbbs in RPO order.
2606
2607 2017-12-12  James Greenhalgh  <james.greenhalgh@arm.com>
2608
2609         * combine.c (simplify_set): Do not transform subregs to zero_extends
2610         if the destination mode is a vector mode.
2611
2612 2017-12-12  Jakub Jelinek  <jakub@redhat.com>
2613
2614         PR tree-optimization/83359
2615         * tree-cfg.h (fold_loop_internal_call): Declare.
2616         * tree-vectorizer.c (fold_loop_internal_call): Moved to ...
2617         * tree-cfg.c (fold_loop_internal_call): ... here.  No longer static.
2618         (find_loop_dist_alias): New function.
2619         (move_sese_region_to_fn): If any dloop->orig_loop_num value is
2620         updated, also adjust any corresponding LOOP_DIST_ALIAS internal
2621         calls.
2622
2623         PR tree-optimization/80631
2624         * tree-vect-loop.c (get_initial_def_for_reduction): Fix comment typo.
2625         (vect_create_epilog_for_reduction): Add INDUC_VAL and INDUC_CODE
2626         arguments, for INTEGER_INDUC_COND_REDUCTION use INDUC_VAL instead of
2627         hardcoding zero as the value if COND_EXPR is never true.  For
2628         INTEGER_INDUC_COND_REDUCTION don't emit the final COND_EXPR if
2629         INDUC_VAL is equal to INITIAL_DEF, and use INDUC_CODE instead of
2630         hardcoding MAX_EXPR as the reduction operation.
2631         (is_nonwrapping_integer_induction): Allow negative step.
2632         (vectorizable_reduction): Compute INDUC_VAL and INDUC_CODE for
2633         vect_create_epilog_for_reduction, if no value is suitable, don't
2634         use INTEGER_INDUC_COND_REDUCTION for now.  Formatting fixes.
2635
2636 2017-12-12  Richard Biener  <rguenther@suse.de>
2637
2638         PR tree-optimization/81889
2639         * tree-ssa-loop-niter.c (infer_loop_bounds_from_signedness): Use
2640         range info from the non-wrapping IV instead of just the range
2641         of the type.
2642
2643 2017-12-12  Julia Koval  <julia.koval@intel.com>
2644
2645         * config.gcc: Add vaesintrin.h.
2646         * config/i386/i386-builtin-types.def (V64QI_FTYPE_V64QI_V64QI):
2647         New type.
2648         * config/i386/i386-builtin.def (__builtin_ia32_vaesdec_v16qi,
2649         __builtin_ia32_vaesdec_v32qi, __builtin_ia32_vaesdec_v64qi):
2650         New builtins.
2651         * config/i386/i386.c (ix86_expand_args_builtin): Handle new type.
2652         * config/i386/immintrin.h: Include vaesintrin.h.
2653         * config/i386/sse.md (vaesdec_<mode>): New pattern.
2654         * config/i386/vaesintrin.h (_mm256_aesdec_epi128, _mm512_aesdec_epi128,
2655         _mm_aesdec_epi128): New intrinsics.
2656
2657 2017-12-12  Julia Koval  <julia.koval@intel.com>
2658
2659         * common/config/i386/i386-common.c (OPTION_MASK_ISA_VAES_SET,
2660         OPTION_MASK_ISA_VAES_UNSET): New.
2661         (ix86_handle_option): Handle -mvaes.
2662         * config/i386/cpuid.h: Define bit_VAES.
2663         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mvaes.
2664         * config/i386/i386-c.c (__VAES__): New.
2665         * config/i386/i386.c (ix86_target_string): Add -mvaes.
2666         (ix86_valid_target_attribute_inner_p): Ditto.
2667         * config/i386/i386.h (TARGET_VAES, TARGET_VAES_P): New.
2668         * config/i386/i386.opt: Add -mvaes.
2669         * doc/invoke.texi: Ditto.
2670
2671 2017-12-12  Alexandre Oliva  <aoliva@redhat.com>
2672
2673         * debug.h (gcc_debug_hooks): Add inline_entry.
2674         * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
2675         * debug.c (do_nothing_debug_hooks): Likewise.
2676         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
2677         * dwarf2out.c (dwarf2_debug_hooks): Likewise.
2678         (dwarf2_lineno_debug_hooks): Likewise.
2679
2680         * common.opt (gstatement-frontiers): New, setting
2681         debug_nonbind_markers_p.
2682         * rtl.h (MAY_HAVE_DEBUG_MARKER_INSNS): Activate.
2683         * toplev.c (process_options): Autodetect value for debug statement
2684         frontiers option.
2685         * tree.h (MAY_HAVE_DEBUG_MARKER_STMTS): Activate.
2686         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers): New.
2687
2688         * cfgexpand.c (expand_gimple_basic_block): Handle begin stmt
2689         markers.  Integrate source bind into debug stmt expand loop.
2690         (pass_expand::execute): Check debug marker limit.  Avoid deep
2691         TER and expand debug locations for debug bind insns only.
2692         * cse.c (insn_live_p): Keep nonbind markers and debug bindings
2693         followed by them.
2694         * df-scan.c (df_insn_delete): Accept out-of-block debug insn.
2695         * final.c (reemit_insn_block_notes): Take current block from
2696         nonbind markers.  Declare note where it's first set.
2697         (final_scan_insn): Handle begin stmt notes.  Emit is_stmt according to
2698         begin stmt markers if enabled.
2699         (notice_source_line): Handle nonbind markers.  Fail if their
2700         location is unknown or that of builtins.
2701         (rest_of_handle_final): Convert begin stmt markers to notes if
2702         var-tracking didn't run.
2703         (rest_of_clean_state): Skip begin stmt markers.
2704         * gimple-pretty-print.c (dump_gimple_debug): Handle begin stmt
2705         markers.
2706         * function.c (allocate_struct_function): Set begin_stmt_markers.
2707         * function.h (struct function): Add debug_marker_count counter
2708         and debug_nonbind_markers flag.
2709         * gimple-iterator.c (gsi_remove): Adjust debug_marker_count.
2710         * gimple-low.c (lower_function_body): Adjust
2711         debug_nonbind_markers.
2712         (lower_stmt): Drop or skip gimple debug stmts.
2713         (lower_try_catch): Skip debug stmts.
2714         * gimple.c (gimple_build_debug_begin_stmt): New.
2715         (gimple_copy): Increment debug_marker_count if copying one.
2716         * gimple.h (gimple_build_debug_begin_stmt): Declare.
2717         * gimplify.c (rexpr_location): New.
2718         (rexpr_has_location): New.
2719         (warn_switch_unreachable_r): Handle gimple debug stmts.
2720         (shortcut_cond_r): Call expr_location.
2721         (find_goto): New.
2722         (find_goto_label): New.
2723         (shortcut_cond_expr): Call expr_has_location, expr_location, and
2724         find_goto_label.
2725         (gimplify_cond_expr): Call find_goto_label, expr_has_location, and
2726         expr_location.
2727         (gimplify_expr): Handle begin stmt markers.  Reject debug expr decls.
2728         * langhooks-def.h (LANG_HOOKS_EMITS_BEGIN_STMT): New.  Add to...
2729         (LANG_HOOKS_INITIALIZER): ... this.
2730         * langhooks.h (struct lang_hooks): Add emits_begin_stmt.
2731         * lra-contraints.c (inherit_reload_reg): Tolerate between-blocks
2732         debug insns.
2733         (update_ebb_live_info): Skip debug insn markers.
2734         * lra.c (debug_insn_static_data): Rename to...
2735         (debug_bind_static_data): ... this.
2736         (debug_marker_static_data): New.
2737         (lra_set_insn_recog_data): Select one of the above depending
2738         on debug insn kind.
2739         (lra_update_isn_regno_info): Don't assume debug insns have
2740         freqs.
2741         (push_insns): Skip debug insns.
2742         * lto-streamer-in.c (input_function): Drop debug stmts
2743         depending on active options.  Adjust debug_nonbind_markers.
2744         * params.def (PARAM_MAX_DEBUG_MARKER_COUNT): New.
2745         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
2746         begin stmt marker notes.
2747         (print_insn): Likewise.
2748         * recog.c (extract_insn): Recognize rtl for debug markers.
2749         * rtl.def (DEBUG_MARKER): New.
2750         * tree-inline.c: Include params.h.
2751         (remap_gimple_stmt): Handle nonbind markers.
2752         (maybe_move_debug_stmts_to_successors): Likewise.
2753         (copy_debug_stmt): Likewise.
2754         * tree-iterator.c (append_to_statement_list_1): Append begin stmt
2755         markers regardless of no side effects.
2756         (tsi_link_before): Don't update container's side effects when adding
2757         a begin stmt marker.
2758         (tsi_link_after): Likewise.
2759         (expr_first): Skip begin stmt markers.
2760         (expr_last): Likewise.
2761         * tree-pretty-print (dump_generic_node): Handle begin stmt markers.
2762         * tree-ssa-threadedge.c (propagate_threaded_block_debug_info):
2763         Disregard nonbind markers.
2764         * tree.c (make_node_stat): Don't set side effects for begin stmt
2765         markers.
2766         (build1_stat): Likewise.
2767         * tree.def (DEBUG_BEGIN_STMT): New.
2768         * tree.h (GOTO_DESTINATION): Require a GOTO_EXPR.
2769         * var-tracking.c (delete_debug_insns): Renamed to...
2770         (delete_vta_debug_insns): ... this.
2771         (reemit_marker_as_note): New.
2772         (vt_initialize): Reemit markers.
2773         (delete_vta_debug_insns): Likewise.
2774         (vt_debug_insns_local): Reemit or delete markers.
2775         (variable_tracking_main_1): Likewise.
2776         * doc/generic.texi (DEBUG_BEGIN_STMT): Document.
2777         * doc/gimple.texi (gimple_debug_begin_stmt_p): New.
2778         (gimple_debug_nonbind_marker_p): New.
2779         (gimple_build_debug_bind): Adjust.
2780         (gimple_build_debug_begin_stmt): New.
2781         * doc/invoke.texi (max-debug-marker-count): New param.
2782         * doc/rtl.texi (debug_implicit_ptr, entry_value): New.
2783         (debug_parameter_ref, debug_marker): New.
2784         (NOTE_INSN_BEGIN_STMT): New.
2785         (DEBUG_INSN): Describe begin stmt markers.
2786
2787         * cfgbuild.c (find_bb_boundaries): Don't purge dead edges if,
2788         without debug insns, we wouldn't, but clean up debug insns
2789         after a control flow insn nevertheless.
2790
2791         * cfgcleanup.c (delete_unreachable_blocks): Use alternate
2792         block removal order if MAY_HAVE_DEBUG_BIND_INSNS.
2793         * cfgexpand.c (label_rtx_for_bb): Skip debug insns.
2794         * cfgrtl.c (try_redirect_by_replacing_jump): Skip debug insns.
2795         (rtl_tidy_fallthru_edge): Likewise.
2796         (rtl_verify_fallthru): Likewise.
2797         (rtl_verify_bb_layout): Likewise.
2798         (skip_insns_after_block): Likewise.
2799         (duplicate_insn_chain): Use DEBUG_BIND_INSN_P.
2800         * dwarf2out.c: Include print-rtl.h.
2801         (dwarf2out_next_real_insn): New.
2802         (dwarf2out_var_location): Call it.  Disregard begin stmt markers.
2803         Dump debug binds in asm comments.
2804         * gimple-iterator.c (gimple_find_edge_insert_loc): Skip debug stmts.
2805         * gimple-iterator.h (gsi_start_bb_nondebug): Remove; adjust
2806         callers to use gsi_start_nondebug_bb instead.
2807         (gsi_after_labels): Skip gimple debug stmts.
2808         (gsi_start_nondebug): New.
2809         * gimple-loop-interchange.c (find_deps_in_bb_for_stmt): Adjust.
2810         (proper_loop_form_for_interchange): Adjust.
2811         * gimple-low.c (gimple_seq_may_fallthru): Take last nondebug stmt.
2812         * gimple.h (gimple_seq_last_nondebug_stmt): New.
2813         * gimplify.c (last_stmt_in_scope): Skip debug stmts.
2814         (collect_fallthrough_labels): Likewise.
2815         (should_warn_for_implicit_fallthrough): Likewise.
2816         (warn_implicit_fallthrough_r): Likewise.
2817         (expand_FALLTHROUGH_r): Likewise.
2818         * graphite-isl-ast-to-gimple.c (gsi_insert_earliest): Adjust.
2819         (graphite_copy_stmts_from_block): Skip nonbind markers.
2820         * haifa-sched.c (sched_extend_bb): Skip debug insns.
2821         * ipa-icf-gimple.c (func_checker::compare_bb): Adjust.
2822         * jump.c (clean_barriers): Skip debug insns.
2823         * omp-expand.c (expand_parallel_call): Skip debug insns.
2824         (expand_task_call): Likewise.
2825         (remove_exit_barrier): Likewise.
2826         (expand_omp_taskreg): Likewise.
2827         (expand_omp_for_init_counts): Likewise.
2828         (expand_omp_for_generic): Likewise.
2829         (expand_omp_for_static_nochunk): Likewise.
2830         (expand_omp_for_static_chunk): Likewise.
2831         (expand_omp_simd): Likewise.
2832         (expand_omp_taskloop_for_outer): Likewise.
2833         (expand_omp_taskloop_for_inner): Likewise.
2834         (expand_oacc_for): Likewise.
2835         (expand_omp_sections): Likewise.
2836         (expand_omp_single): Likewise.
2837         (expand_omp_synch): Likewise.
2838         (expand_omp_atomic_load): Likewise.
2839         (expand_omp_atomic_store): Likewise.
2840         (expand_omp_atomic_fetch_op): Likewise.
2841         (expand_omp_atomic_pipeline): Likewise.
2842         (expand_omp_atomic_mutex): Likewise.
2843         (expand_omp_target): Likewise.
2844         (grid_expand_omp_for_loop): Likewise.
2845         (grid_expand_target_grid_body): Likewise.
2846         (build_omp_regions_1): Likewise.
2847         * omp-low.c (check_combined_parallel): Skip debug stmts.
2848         * postreload.c (fixup_debug_insns): Skip nonbind debug insns.
2849         * regcprop.c (find_oldest_value_reg): Ensure REGNO is not a pseudo.
2850         * sese.c (sese_trivially_empty_bb_p): Call is_gimple_debug in
2851         test.
2852         * tree-cfg.c (make_blobs_1): Skip debug stmts.
2853         (make_edges): Likewise.
2854         (cleanup_dead_labels): Likewise.
2855         (gimple_can_merge_blocks_p): Likewise.
2856         (stmt_starts_bb_p): Likewise.
2857         (gimple_block_label): Likewise.
2858         (gimple_redirect_edge_and_branch): Likewise.
2859         * tree-cfgcleanup.c (remove_forwarder_block): Rearrange skipping
2860         of debug stmts.
2861         (execute_cleanup_cfg_post_optimizing): Dump enumerated decls with
2862         TDF_SLIM.
2863         * tree-pretty-print (print_declaration): Omit initializer in slim
2864         dumps.
2865         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Mark begin stmt
2866         markers.
2867         (eliminate_unnecessary_stmts): Stabilize block removal order.
2868         * tree-ssa-tail-merge.c (find_duplicate): Skip debug stmts.
2869         * var-tracking.c (get_first_insn): New.
2870         (vt_emit_notes): Call it.
2871         (vt_initialize): Walk any insns before the first BB.
2872         (delete_debug_insns): Likewise.
2873
2874         * gimple.h (enum gimple_debug_subcode): Add
2875         GIMPLE_DEBUG_BEGIN_STMT.
2876         (gimple_debug_begin_stmt_p): New.
2877         (gimple_debug_nonbind_marker_p): New.
2878         * tree.h (MAY_HAVE_DEBUG_MARKER_STMTS): New.
2879         (MAY_HAVE_DEBUG_BIND_STMTS): Renamed from....
2880         (MAY_HAVE_DEBUG_STMTS): ... this.  Check both.
2881         * insn-notes.def (BEGIN_STMT): New.
2882         * rtl.h (MAY_HAVE_DEBUG_MARKER_INSNS): New.
2883         (MAY_HAVE_DEBUG_BIND_INSNS): Renamed from....
2884         (MAY_HAVE_DEBUG_INSNS): ... this.  Check both.
2885         (NOTE_MARKER_LOCATION, NOTE_MARKER_P): New.
2886         (DEBUG_BIND_INSN_P, DEBUG_MARKER_INSN_P): New.
2887         (INSN_DEBUG_MARKER_KIND): New.
2888         (GEN_RTX_DEBUG_MARKER_BEGIN_STMT_PAT): New.
2889         (INSN_VAR_LOCATION): Check for VAR_LOCATION.
2890         (INSN_VAR_LOCATION_PTR): New.
2891         * cfgexpand.c (expand_debug_locations): Handle debug bind insns
2892         only.
2893         (expand_gimple_basic_block): Likewise.  Emit debug temps for TER
2894         deps only if debug bind insns are enabled.
2895         (pass_expand::execute): Avoid deep TER and expand
2896         debug locations for debug bind insns only.
2897         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Narrow
2898         debug stmts special handling down to debug bind stmts.
2899         * combine.c (try_combine): Narrow debug insns special handling
2900         down to debug bind insns.
2901         * cse.c (delete_trivially_dead_insns): Handle debug bindings.
2902         Narrow debug insns preexisting special handling down to debug
2903         bind insns.
2904         * dce.c (rest_of_handle_ud_dce): Narrow debug insns special
2905         handling down to debug bind insns.
2906         * function.c (instantiate_virtual_regs): Skip debug markers,
2907         adjust handling of debug binds.
2908         * gimple-ssa-backprop.c (backprop::prepare_change): Try debug
2909         temp insertion iff MAY_HAVE_DEBUG_BIND_STMTS.
2910         * haifa-sched.c (schedule_insn): Narrow special handling of debug
2911         insns to debug bind insns.
2912         * ipa-param-manipulation.c (ipa_modify_call_arguments): Narrow
2913         special handling of debug stmts to debug bind stmts.
2914         * ipa-split.c (split_function): Likewise.
2915         * ira.c (combine_and_move_insns): Adjust debug bind insns only.
2916         * loop-unroll.c (apply_opt_in_copies): Adjust tests on bind
2917         debug insns.
2918         * reg-stack.c (convert_regs_1): Use DEBUG_BIND_INSN_P.
2919         * regrename.c (build_def_use): Likewise.
2920         * regcprop.c (copyprop_hardreg_forward_1): Likewise.
2921         (pass_cprop_hardreg): Narrow special casing of debug insns to
2922         debug bind insns.
2923         * regstat.c (regstat_init_n_sets_and_refs): Likewise.
2924         * reload1.c (reload): Likewise.
2925         * sese.c (sese_insert_phis_for_liveouts): Narrow special
2926         casing of debug stmts to debug bind stmts.
2927         * shrink-wrap.c (move_insn_for_shrink_wrap): Likewise.
2928         * ssa-iterators.h (num_imm_uses): Likewise.
2929         * tree-cfg.c (gimple_merge_blocks): Narrow special casing of
2930         debug stmts to debug bind stmts.
2931         * tree-inline.c (tree_function_versioning): Narrow special casing
2932         of debug stmts to debug bind stmts.
2933         * tree-loop-distribution.c (generate_loops_for_partition):
2934         Narrow special casing of debug stmts to debug bind stmts.
2935         * tree-sra.c (analyze_access_subtree): Narrow special casing
2936         of debug stmts to debug bind stmts.
2937         * tree-ssa-dce.c (remove_dead_stmt): Narrow special casing of debug
2938         stmts to debug bind stmts.
2939         * tree-ssa-loop-ivopt.c (remove_unused_ivs): Narrow special
2940         casing of debug stmts to debug bind stmts.
2941         * tree-ssa-reassoc.c (reassoc_remove_stmt): Likewise.
2942         * tree-ssa-tail-merge.c (tail_merge_optimize): Narrow special
2943         casing of debug stmts to debug bind stmts.
2944         * tree-ssa-threadedge.c (propagate_threaded_block_debug_info):
2945         Likewise.
2946         * tree-ssa.c (flush_pending_stmts): Narrow special casing of
2947         debug stmts to debug bind stmts.
2948         (gimple_replace_ssa_lhs): Likewise.
2949         (insert_debug_temp_for_var_def): Likewise.
2950         (insert_debug_temps_for_defs): Likewise.
2951         (reset_debug_uses): Likewise.
2952         * tree-ssanames.c (release_ssa_name_fn): Likewise.
2953         * tree-vect-loop-manip.c (adjust_debug_stmts_now): Likewise.
2954         (adjust_debug_stmts): Likewise.
2955         (adjust_phi_and_debug_stmts): Likewise.
2956         (vect_do_peeling): Likewise.
2957         * tree-vect-loop.c (vect_transform_loop): Likewise.
2958         * valtrack.c (propagate_for_debug): Use BIND_DEBUG_INSN_P.
2959         * var-tracking.c (adjust_mems): Narrow special casing of debug
2960         insns to debug bind insns.
2961         (dv_onepart_p, dataflow_set_clar_at_call, use_type): Likewise.
2962         (compute_bb_dataflow, vt_find_locations): Likewise.
2963         (vt_expand_loc, emit_notes_for_changes): Likewise.
2964         (vt_init_cfa_base): Likewise.
2965         (vt_emit_notes): Likewise.
2966         (vt_initialize): Likewise.
2967         (vt_finalize): Likewise.
2968
2969         * emit-rtl.c (next_nondebug_insn, prev_nondebug_insn): Reorder.
2970         (next_nonnote_nondebug_insn, prev_nonnote_nondebug_insn): Reorder.
2971         (next_nonnote_nondebug_insn_bb): New.
2972         (prev_nonnote_nondebug_insn_bb): New.
2973         (prev_nonnote_insn_bb, next_nonnote_insn_bb): Remove.
2974         * rtl.h (prev_nonnote_insn_bb, next_nonnote_insn_bb): Remove decls.
2975         (prev_nonnote_nondebug_insn_bb): Declare.
2976         (next_nonnote_nondebug_insn_bb): Declare.
2977         * cfgbuild.c (find_bb_boundaries): Adjust to skip debug insns.
2978         * cfgrtl.c (get_last_bb_insn): Likewise.
2979         * lra.c (push_insns): Likewise.
2980
2981 2017-12-11  David Malcolm  <dmalcolm@redhat.com>
2982
2983         PR c/82050
2984         * selftest-run-tests.c (selftest::run_tests): Move start/finish code
2985         to...
2986         * selftest.c (selftest::test_runner::test_runner): New ctor.
2987         (selftest::test_runner::~test_runner): New dtor.
2988         * selftest.h (class selftest::test_runner): New class.
2989
2990 2017-12-11  Carl Love  <cel@us.ibm.com>
2991
2992         * config/rs6000/altivec.h (vec_extract_fp32_from_shorth,
2993         vec_extract_fp32_from_shortl]): Add #defines.
2994         * config/rs6000/rs6000-builtin.def (VSLDOI_2DI): Add macro expansion.
2995         * config/rs6000/rs6000-c.c (ALTIVEC_BUILTIN_VEC_UNPACKH,
2996         ALTIVEC_BUILTIN_VEC_UNPACKL, ALTIVEC_BUILTIN_VEC_AND,
2997         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SRL,
2998         ALTIVEC_BUILTIN_VEC_SRO, ALTIVEC_BUILTIN_VEC_SLD,
2999         ALTIVEC_BUILTIN_VEC_SLL): Add expansions.
3000         * doc/extend.texi: Add documentation for the added builtins.
3001
3002 2017-12-11  Alexandre Oliva  <aoliva@redhat.com>
3003
3004         PR rtl-optimization/80693
3005         PR rtl-optimization/81019
3006         PR rtl-optimization/81020
3007         * combine.c (distribute_notes): Reset any REG_UNUSED REGs that
3008         are not mentioned in i3.  Place the REG_UNUSED note on i2,
3009         possibly modified to REG_DEAD, if it did not originate in i3.
3010
3011 2017-12-11  Jakub Jelinek  <jakub@redhat.com>
3012
3013         * recog.c (store_data_bypass_p_1): New function.
3014         (store_data_bypass_p): Handle USE in a PARALLEL like CLOBBER.  Use
3015         store_data_bypass_p_1 to avoid code duplication.  Formatting fixes.
3016
3017 2017-12-11  Segher Boessenkool  <segher@kernel.crashing.org>
3018
3019         PR rtl-optimization/83361
3020         * ifcvt.c (if_convert): Call fixup_partitions.
3021
3022 2017-12-11  Will Schmidt  <will_schmidt@vnet.ibm.com>
3023
3024         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
3025         early folding of splat_u{8,16,32}.
3026
3027 2017-12-11  Jakub Jelinek  <jakub@redhat.com>
3028
3029         * config/aarch64/aarch64.c (aarch64_print_operand): Don't start
3030         output_operand_lossage first argument with capital letter.
3031         (aarch64_override_options): Don't start error and sorry first argument
3032         with capital letter.
3033
3034 2017-12-11  Andi Kleen  <ak@linux.intel.com>
3035
3036         PR gcov-profile/83355
3037         * auto-profile.c (string_table::get_index_by_decl): Don't
3038         recurse when abstract origin points to itself.
3039
3040 2017-12-11  Bin Cheng  <bin.cheng@arm.com>
3041
3042         PR tree-optimization/83320
3043         * gimple-loop-interchange.cc (free_data_refs_with_aux): Use delete.
3044         (prune_datarefs_not_in_loop): Ditto.
3045
3046 2017-12-10  Gerald Pfeifer  <gerald@pfeifer.com>
3047
3048         * doc/install.texi (Specific): Tweak link to mkssoftware.com.
3049
3050 2017-12-10  Jakub Jelinek  <jakub@redhat.com>
3051
3052         PR tree-optimization/83337
3053         * gimple-loop-interchange.cc (compute_access_stride): Handle
3054         bitfield DRs properly.
3055
3056 2017-12-09  Jakub Jelinek  <jakub@redhat.com>
3057
3058         PR tree-optimization/83338
3059         * tree-vect-stmts.c (vectorizable_operation): Handle POINTER_DIFF_EXPR
3060         vectorization as MINUS_EXPR with a subsequent VIEW_CONVERT_EXPR from
3061         vector of unsigned integers to vector of signed integers.
3062
3063 2017-12-08  Vladimir Makarov  <vmakarov@redhat.com>
3064
3065         PR rtl-optimization/83317
3066         * lra-constraints.c (process_address_1): Add insn code check.
3067
3068 2017-12-08  Michael Matz  <matz@suse.de>
3069
3070         Fix PR tree-optimization/83323
3071         * gimple-loop-jam (unroll_jam_possible_p): Correct test for
3072         head-controlled loops and loop BBs.
3073         * common.opt (funroll-and-jam): Remove, instead ...
3074         (floop-unroll-and-jam): ... reuse this option.
3075         * opts.c (default_options_table): Use OPT_floop_unroll_and_jam.
3076         * doc/invoke.texi (-funroll-and-jam): Move docu to ...
3077         (-floop-unroll-and-jam): ... this option.
3078
3079 2017-12-08  Jakub Jelinek  <jakub@redhat.com>
3080
3081         * ipa-polymorphic-call.c (noncall_stmt_may_be_vtbl_ptr_store): Fix
3082         a comment typo, get_base_ref_and_offset -> get_ref_base_and_extent.
3083         * ipa-prop.c (stmt_may_be_vtbl_ptr_store): Likewise.
3084
3085 2017-12-08  Richard Biener  <rguenther@suse.de>
3086
3087         PR middle-end/81782
3088         * tree-ssa-uninit.c (warn_uninitialized_vars): Properly
3089         handle accesses outside of zero-sized vars.
3090
3091 2017-12-08  Martin Jambor  <mjambor@suse.cz>
3092
3093         PR tree-optimization/83141
3094         * tree-sra.c (contains_vce_or_bfcref_p): Move up in the file, also
3095         test for MEM_REFs implicitely changing types with padding.  Remove
3096         inline keyword.
3097         (build_accesses_from_assign): Added contains_vce_or_bfcref_p checks.
3098
3099 2017-12-08  Jakub Jelinek  <jakub@redhat.com>
3100
3101         * config/arc/arc.c (arc_attribute_table): Add exclusions to
3102         the comment.
3103         * config/avr/avr.c (avr_attribute_table): Likewise.
3104         * config/msp430/msp430.c (msp430_attribute_table): Likewise.
3105         * config/rl78/rl78.c (rl78_attribute_table): Likewise.
3106         * config/nds32/nds32.c (nds32_attribute_table): Likewise.
3107         * config/darwin.h (SUBTARGET_ATTRIBUTE_TABLE): Initialize new member
3108         of struct attribute_spec.
3109         * config/i386/cygming.h (SUBTARGET_ATTRIBUTE_TABLE): Likewise.
3110
3111 2017-12-08  Ulrich Weigand  <uweigand@de.ibm.com>
3112
3113         PR target/82960
3114         * config/spu/spu.c (pad_bb): Only check INSN_CODE when INSN_P is true.
3115
3116 2017-12-08  Jan Hubicka  <hubicka@ucw.cz>
3117
3118         PR middle-end/83609
3119         * profile-count.c (profile_count::from_gcov_type): Move from
3120         profile-count.h; handle overflow.
3121         * profile-count.h (profile_count::from_gcov_type): Move offline.
3122
3123 2017-12-08  Segher Boessenkool  <segher@kernel.crashing.org>
3124
3125         PR rtl-optimization/83304
3126         * combine.c (move_deaths): If we do not know where a register died,
3127         search for it.
3128
3129 2017-12-08  Richard Biener  <rguenther@suse.de>
3130
3131         * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
3132         Provide -fopt-info-loop feedback when we interchange in a nest.
3133
3134 2017-06-08  Richard Earnshaw  <rearnsha@arm.com>
3135
3136         * config/arm/driver-arm.c (arm_cpu_table): Use fp-capable product names
3137         for armv6 ARM CPU IDs.
3138
3139 2017-06-08  Richard Earnshaw  <rearnsha@arm.com>
3140
3141         * common/config/arm/arm-common.c: Include <algorithm>.
3142         (INCLUDE_VECTOR): Define.
3143         (compare_opt_names): New function.
3144         (arm_rewrite_selected_arch): Only strip out extensions that can be
3145         expressed through -mfpu.  Sort the remaining extensions
3146         alphabetically.
3147
3148 2017-06-08  Richard Earnshaw  <rearnsha@arm.com>
3149
3150         * config/arm/arm.h (arm_asm_auto_mfpu): Declare.
3151         (ASM_CPU_SPEC_FUNCTIONS): Add new rule asm_auto_mfpu.
3152         (ASM_CPU_SPEC): Use it if -mfpu is set to auto.
3153         * common/config/arm/arm-common.c (arm_asm_auto_mfpu): New function.
3154
3155 2017-06-08  Tristan Gingold  <gindold@adacore.com>
3156
3157         PR ada/81470
3158         * dwarf2out.c (dwarf2out_do_cfi_startproc): Only emit
3159         .cfi_personality or .cfi_lsda if the eh data format is dwarf2.
3160
3161 2017-12-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3162
3163         * config/sol2.h (SOLARIS_ATTRIBUTE_TABLE): Initialize new member
3164         of struct attribute_spec.
3165
3166 2017-12-08  Julia Koval  <julia.koval@intel.com>
3167
3168         * config/i386/avx512vnniintrin.h (_mm512_dpwssds_epi32,
3169         _mm512_mask_dpwssds_epi32, _mm512_maskz_dpwssds_epi32): New intrinsics.
3170         * config/i386/avx512vnnivlintrin.h (_mm256_dpwssds_epi32,
3171         _mm256_mask_dpwssds_epi32, _mm256_maskz_dpwssds_epi32,
3172         _mm_dpwssds_epi32, _mm_mask_dpwssds_epi32,
3173         _mm_maskz_dpwssds_epi32): Ditto.
3174
3175 2017-12-08  Richard Biener  <rguenther@suse.de>
3176
3177         PR tree-optimization/81303
3178         * tree-vect-stmts.c (vect_is_simple_cond): For invariant
3179         conditions try to create a comparison vector type matching
3180         the data vector type.
3181         (vectorizable_condition): Adjust.
3182         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
3183         Leave invariant conditions alone in case we can vectorize those.
3184
3185 2017-12-08  Julia Koval  <julia.koval@intel.com>
3186
3187         * config/i386/avx512vnniintrin.h (_mm512_dpwssd_epi32,
3188         _mm512_mask_dpwssd_epi32, _mm512_maskz_dpwssd_epi32): New intrinsics.
3189         * config/i386/avx512vnnivlintrin.h (_mm256_dpwssd_epi32,
3190         _mm256_mask_dpwssd_epi32, _mm256_maskz_dpwssd_epi32, _mm_dpwssd_epi32,
3191         _mm_mask_dpwssd_epi32, _mm_maskz_dpwssd_epi32): Ditto.
3192
3193 2017-12-08  Julia Koval  <julia.koval@intel.com>
3194
3195         * config/i386/avx512vnniintrin.h (_mm512_dpbusds_epi32,
3196         _mm512_mask_dpbusds_epi32, _mm512_maskz_dpbusds_epi32): New.
3197         * config/i386/avx512vnnivlintrin.h (_mm256_dpbusds_epi32,
3198         _mm256_mask_dpbusds_epi32, _mm256_maskz_dpbusds_epi32,
3199         _mm_dpbusds_epi32, _mm_mask_dpbusds_epi32,
3200         _mm_maskz_dpbusds_epi32): New intrinsics.
3201
3202 2017-12-07  Sandra Loosemore  <sandra@codesourcery.com>
3203
3204         * config/nios2/nios2.md (ld<bhw_uns>io): Add splitter for memory
3205         operand.
3206         (ld<bh>io_signed): Likewise.
3207         (st<bhw>io): Likewise.
3208         * config/nios2/predicates.md (ldstio_memory_operand): Allow
3209         SMALL_INT12 constant integer operand.
3210
3211 2017-12-07  Sandra Loosemore  <sandra@codesourcery.com>
3212
3213         * config/nios2/nios2.c (nios2_symbolic_constant_allowed):
3214         Rename to...
3215         (nios2_large_constant_allowed): ...this.  Adjust uses.
3216         (nios2_plus_symbolic_constant_p): Rename to...
3217         (nios2_plus_large_constant_p): ...this.  Adjust uses.
3218         (nios2_legitimate_address_p): Correct CONST_INT handling.
3219         (nios2_symbolic_memory_operand_p): Rename to...
3220         (nios2_large_constant_memory_operand_p): ...this.  Adjust uses.
3221         (nios2_large_constant_p): Check for large constant integers too.
3222         (nios2_split_large_constant): Handle constant integers.
3223         (nios2_split_symbolic_memory_operand): Rename to...
3224         (nios2_split_large_constant_memory_operand): ...this.  Adjust uses.
3225         (nios2_legitimize_constant_address): Handle constant integers.
3226         (r0rel_constant_p): Handle small constant integers.
3227         (nios2_print_operand_address): Handle r0-relative integer addresses.
3228         * config/nios2/nios2-protos.h: Adjust for renamed functions.
3229         * config/nios2/nios2.md: Adjust for renamed functions.
3230
3231 2017-12-07  Andrew Waterman  <andrew@sifive.com>
3232
3233         * config/riscv/riscv.c (TARGET_ASM_SELECT_SECTION): New define.
3234         (TARGET_HAVE_SRODATA_SECTION): New define.
3235         (riscv_select_section): New function.
3236
3237 2017-12-08  Joseph Myers  <joseph@codesourcery.com>
3238             Alexander Monakov  <amonakov@ispras.ru>
3239             Jakub Jelinek  <jakub@redhat.com>
3240
3241         PR target/81906
3242         * config/i386/i386.c (ix86_expand_rint): Handle flag_rounding_math.
3243
3244 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
3245
3246         * config/aarch64/aarch64.c (aarch64_print_address_internal): Return
3247         a bool success value.  Don't call output_operand_lossage here.
3248         (aarch64_print_ldpstp_address): Return a bool success value.
3249         (aarch64_print_operand_address): Call output_addr_const if
3250         aarch64_print_address_internal fails.
3251         (aarch64_print_operand): Don't assert that the mode is 16 bytes for
3252         'y'; call output_operand_lossage instead.  Call output_operand_lossage
3253         if aarch64_print_ldpstp_address fails.
3254
3255 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
3256
3257         * tree-vector-builder.h
3258         (tree_vector_builder::binary_encoded_nelts): Declare.
3259         * tree-vector-builder.c
3260         (tree_vector_builder::binary_encoded_nelts): New function.
3261         * fold-const.c (negate_expr_p): Likewise.
3262         (operand_equal_p, fold_checksum_tree): Likewise.
3263         * tree-loop-distribution.c (const_with_all_bytes_same): Likewise.
3264         * tree.c (integer_zerop, integer_onep, integer_all_onesp, real_zerop)
3265         (real_onep, real_minus_onep, add_expr, initializer_zerop): Likewise.
3266         (uniform_vector_p): Likewise.
3267         * varasm.c (const_hash_1, compare_constant): Likewise.
3268         * tree-ssa-ccp.c: Include tree-vector-builder.h.
3269         (valid_lattice_transition): Operate directly on the VECTOR_CST
3270         encoding.
3271         * ipa-icf.c: Include tree-vector-builder.h.
3272         (sem_variable::equals): Operate directly on the VECTOR_CST encoding.
3273         * print-tree.c (print_node): Print encoding of VECTOR_CSTs.
3274
3275 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
3276
3277         * tree.c (build_vector): Delete.
3278         * tree.h (build_vector): Make static and move into the self-testing
3279         block.
3280
3281 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
3282
3283         * vector-builder.h (vector_builder::derived): New const overload.
3284         (vector_builder::elt): New function.
3285         * tree-vector-builder.h (tree_vector_builder::type): New function.
3286         (tree_vector_builder::apply_step): Declare.
3287         * tree-vector-builder.c (tree_vector_builder::apply_step): New
3288         function.
3289         * gimple-fold.h (tree_vector_builder): Declare.
3290         (gimple_build_vector): Take a tree_vector_builder instead of a
3291         type and vector of elements.
3292         * gimple-fold.c (gimple_build_vector): Likewise.
3293         * tree-vect-loop.c (get_initial_def_for_reduction): Update call
3294         accordingly.
3295         (get_initial_defs_for_reduction): Likewise.
3296         (vectorizable_induction): Likewise.
3297
3298 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
3299
3300         * tree-vector-builder.h
3301         (tree_vector_builder::new_binary_operation): Declare.
3302         * tree-vector-builder.c
3303         (tree_vector_builder::new_binary_operation): New function.
3304         * fold-const.c (fold_relational_const): Use it.
3305         (const_binop): Likewise.  Check that both input vectors have
3306         the same number of elements, thus excluding things like WIDEN_SUM.
3307         Check whether it is possible to operate directly on the encodings
3308         of stepped inputs.
3309
3310 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
3311
3312         * fold-const.c (fold_negate_expr_1): Use tree_vector_builder and
3313         new_unary_operation, operating only on the encoded elements.
3314         (const_unop): Likewise.
3315         (exact_inverse): Likewise.
3316         (distributes_over_addition_p): New function.
3317         (const_binop): Use tree_vector_builder and new_unary_operation
3318         for combinations of VECTOR_CST and INTEGER_CST.  Operate only
3319         on the encoded elements unless the encoding is strided and the
3320         operation does not distribute over addition.
3321         (fold_convert_const):  Use tree_vector_builder and
3322         new_unary_operation.  Operate only on the encoded elements
3323         for truncating integer conversions, or for non-stepped encodings.
3324
3325 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
3326
3327         * config/sparc/sparc.c: Include tree-vector-builder.h.
3328         (sparc_fold_builtin): Use tree_vector_builder instead of build_vector.
3329         * expmed.c: Include tree-vector-builder.h.
3330         (make_tree): Use tree_vector_builder instead of build_vector.
3331         * fold-const.c: Include tree-vector-builder.h.
3332         (const_binop): Use tree_vector_builder instead of build_vector.
3333         (const_unop): Likewise.
3334         (native_interpret_vector): Likewise.
3335         (fold_vec_perm): Likewise.
3336         (fold_ternary_loc): Likewise.
3337         * gimple-fold.c: Include tree-vector-builder.h.
3338         (gimple_fold_stmt_to_constant_1): Use tree_vector_builder instead
3339         of build_vector.
3340         * tree-ssa-forwprop.c: Include tree-vector-builder.h.
3341         (simplify_vector_constructor): Use tree_vector_builder instead
3342         of build_vector.
3343         * tree-vect-generic.c: Include tree-vector-builder.h.
3344         (add_rshift): Use tree_vector_builder instead of build_vector.
3345         (expand_vector_divmod): Likewise.
3346         (optimize_vector_constructor): Likewise.
3347         * tree-vect-loop.c: Include tree-vector-builder.h.
3348         (vect_create_epilog_for_reduction): Use tree_vector_builder instead
3349         of build_vector.  Explicitly use a stepped encoding for
3350         { 1, 2, 3, ... }.
3351         * tree-vect-slp.c: Include tree-vector-builder.h.
3352         (vect_get_constant_vectors): Use tree_vector_builder instead
3353         of build_vector.
3354         (vect_transform_slp_perm_load): Likewise.
3355         (vect_schedule_slp_instance): Likewise.
3356         * tree-vect-stmts.c: Include tree-vector-builder.h.
3357         (vectorizable_bswap): Use tree_vector_builder instead of build_vector.
3358         (vect_gen_perm_mask_any): Likewise.
3359         (vectorizable_call): Likewise.  Explicitly use a stepped encoding.
3360         * tree.c: (build_vector_from_ctor): Use tree_vector_builder instead
3361         of build_vector.
3362         (build_vector_from_val): Likewise.  Explicitly use a duplicate
3363         encoding.
3364
3365 2017-12-07  Richard Sandiford  <richard.sandiford@arm.com>
3366
3367         * doc/generic.texi (VECTOR_CST): Describe new representation of
3368         vector constants.
3369         * vector-builder.h: New file.
3370         * tree-vector-builder.h: Likewise.
3371         * tree-vector-builder.c: Likewise.
3372         * Makefile.in (OBJS): Add tree-vector-builder.o.
3373         * tree.def (VECTOR_CST): Update comment to refer to generic.texi.
3374         * tree-core.h (tree_base): Add a vector_cst field to the u union.
3375         (tree_vector): Change the number of elements to
3376         vector_cst_encoded_nelts.
3377         * tree.h (VECTOR_CST_NELTS): Redefine using TYPE_VECTOR_SUBPARTS.
3378         (VECTOR_CST_ELTS): Delete.
3379         (VECTOR_CST_ELT): Redefine using vector_cst_elt.
3380         (VECTOR_CST_LOG2_NPATTERNS, VECTOR_CST_NPATTERNS): New macros.
3381         (VECTOR_CST_NELTS_PER_PATTERN, VECTOR_CST_DUPLICATE_P): Likewise.
3382         (VECTOR_CST_STEPPED_P, VECTOR_CST_ENCODED_ELTS): Likewise.
3383         (VECTOR_CST_ENCODED_ELT): Likewise.
3384         (vector_cst_encoded_nelts): New function.
3385         (make_vector): Take the values of VECTOR_CST_LOG2_NPATTERNS and
3386         VECTOR_CST_NELTS_PER_PATTERN as arguments.
3387         (vector_cst_int_elt, vector_cst_elt): Declare.
3388         * tree.c: Include tree-vector-builder.h.
3389         (tree_code_size): Abort if passed VECTOR_CST.
3390         (tree_size): Update for new VECTOR_CST layout.
3391         (make_vector): Take the values of VECTOR_CST_LOG2_NPATTERNS and
3392         VECTOR_CST_NELTS_PER_PATTERN as arguments.
3393         (build_vector): Use tree_vector_builder.
3394         (vector_cst_int_elt, vector_cst_elt): New functions.
3395         (drop_tree_overflow): For VECTOR_CST, drop the TREE_OVERFLOW from the
3396         encoded elements and then create the vector in the canonical form.
3397         (check_vector_cst, check_vector_cst_duplicate, check_vector_cst_fill)
3398         (check_vector_cst_stepped, test_vector_cst_patterns): New functions.
3399         (tree_c_tests): Call test_vector_cst_patterns.
3400         * lto-streamer-out.c (DFS::DFS_write_tree_body): Handle the new
3401         VECTOR_CST fields.
3402         (hash_tree): Likewise.
3403         * tree-streamer-out.c (write_ts_vector_tree_pointers): Likewise.
3404         (streamer_write_tree_header): Likewise.
3405         * tree-streamer-in.c (lto_input_ts_vector_tree_pointers): Likewise.
3406         (streamer_alloc_tree): Likewise.  Update call to make_vector.
3407         * fold-const.c (fold_ternary_loc): Avoid using VECTOR_CST_ELTS.
3408
3409 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
3410
3411         * selftest.h (ASSERT_TRUE_AT, ASSERT_FALSE_AT, ASSERT_EQ_AT)
3412         (ASSERT_NE, ASSERT_PRED1): Add underscores to local variable names
3413         * selftest-rtl.h (ASSERT_RTX_EQ, ASSERT_RTX_PTR_EQ): Likewise.
3414
3415 2017-12-07  Bin Cheng  <bin.cheng@arm.com>
3416             Richard Biener  <rguenther@suse.de>
3417
3418         PR tree-optimization/81303
3419         * Makefile.in (gimple-loop-interchange.o): New object file.
3420         * common.opt (floop-interchange): Reuse the option from graphite.
3421         * doc/invoke.texi (-floop-interchange): Ditto.  New document for
3422         -floop-interchange and mention it for -O3.
3423         * opts.c (default_options_table): Enable -floop-interchange at -O3.
3424         * gimple-loop-interchange.cc: New file.
3425         * params.def (PARAM_LOOP_INTERCHANGE_MAX_NUM_STMTS): New parameter.
3426         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): New parameter.
3427         * passes.def (pass_linterchange): New pass.
3428         * timevar.def (TV_LINTERCHANGE): New time var.
3429         * tree-pass.h (make_pass_linterchange): New declaration.
3430         * tree-ssa-loop-ivcanon.c (create_canonical_iv): Change to external
3431         interchange.  Record IV before/after increment in new parameters.
3432         * tree-ssa-loop-ivopts.h (create_canonical_iv): New declaration.
3433         * tree-vect-loop.c (vect_is_simple_reduction): Factor out reduction
3434         path check into...
3435         (check_reduction_path): ...New function here.
3436         * tree-vectorizer.h (check_reduction_path): New declaration.
3437
3438 2017-12-07  Vladimir Makarov  <vmakarov@redhat.com>
3439
3440         PR target/83252
3441         PR rtl-optimization/80818
3442         * lra.c (add_regs_to_insn_regno_info): Make a hard reg in CLOBBER
3443         always early clobbered.
3444         * lra-lives.c (process_bb_lives): Check input hard regs for early
3445         clobbered non-operand hard reg.
3446
3447 2017-12-07  Jakub Jelinek  <jakub@redhat.com>
3448
3449         PR middle-end/83164
3450         * tree-cfg.c (verify_gimple_assign_binary): Don't require
3451         types_compatible_p, just that TYPE_MODE is the same.
3452
3453 2017-12-07  Martin Sebor  <msebor@redhat.com>
3454
3455         PR c/81544
3456         * attribs.c (empty_attribute_table): Initialize new member of
3457         struct attribute_spec.
3458         (decl_attributes): Add argument.  Handle mutually exclusive
3459         combinations of attributes.
3460         (selftests::test_attribute_exclusions): New function.
3461         (selftests::attribute_c_tests): Ditto.
3462         * attribs.h (decl_attributes): Add default argument.
3463         * selftest.h (attribute_c_tests): Declare.
3464         * selftest-run-tests.c (selftest::run_tests): Call attribute_c_tests.
3465         * tree-core.h (attribute_spec::exclusions, exclude): New type and
3466         member.
3467         * doc/extend.texi (Common Function Attributes): Update const and pure.
3468         * config/alpha/alpha.c (vms_attribute_table): Initialize new member
3469         of struct attribute_spec.
3470         * config/arc/arc.c (arc_attribute_table): Same.
3471         * config/arm/arm.c (arm_attribute_table): Same.
3472         * config/avr/avr.c ( avr_attribute_table): Same.
3473         * config/bfin/bfin.c (bfin_attribute_table): Same.
3474         * config/cr16/cr16.c (cr16_attribute_table): Same.
3475         * config/epiphany/epiphany.c (epiphany_attribute_table): Same.
3476         * config/h8300/h8300.c (h8300_attribute_table): Same.
3477         * config/i386/i386.c (ix86_attribute_table): Same.
3478         * config/ia64/ia64.c (ia64_attribute_table): Same.
3479         * config/m32c/m32c.c (m32c_attribute_table): Same.
3480         * config/m32r/m32r.c (m32r_attribute_table): Same.
3481         * config/m68k/m68k.c (m68k_attribute_table): Same.
3482         * config/mcore/mcore.c (mcore_attribute_table): Same.
3483         * config/microblaze/microblaze.c (microblaze_attribute_table): Same.
3484         * config/mips/mips.c (mips_attribute_table): Same.
3485         * config/msp430/msp430.c (msp430_attribute_table): Same.
3486         * config/nds32/nds32.c (nds32_attribute_table): Same.
3487         * config/nvptx/nvptx.c (nvptx_attribute_table): Same.
3488         * config/powerpcspe/powerpcspe.c (rs6000_attribute_table): Same.
3489         * config/rl78/rl78.c (rl78__attribute_table): Same.
3490         * config/rs6000/rs6000.c (rs6000_attribute_table): Same.
3491         * onfig/rx/rx.c (rx_attribute_table): Same.
3492         * config/s390/s390.c (s390_handle_vectorbool_attribute): Same.
3493         * config/sh/sh.c (sh_attribute_table): Same.
3494         * config/sparc/sparc.c (sparc_attribute_table): Same.
3495         * config/spu/spu.c (spu_attribute_table): Same.
3496         * config/stormy16/stormy16.c (xstormy16_attribute_table): Same.
3497         * config/v850/v850.c (v850_attribute_table): Same.
3498         * config/visium/visium.c (visium_attribute_table): Same.
3499
3500 2017-12-07  Tamar Christina  <tamar.christina@arm.com>
3501
3502         PR target/82641
3503         * config/arm/arm.c (INCLUDE_STRING): Define.
3504         (arm_last_printed_arch_string, arm_last_printed_fpu_string): New.
3505         (arm_declare_function_name): Conservatively emit .arch, .arch_extensions
3506         and .fpu.
3507
3508 2017-12-07  Michael Matz  <matz@suse.de>
3509
3510         Add unroll and jam pass
3511
3512         * gimple-loop-jam.c: New file.
3513         * Makefile.in (OBJS): Add gimple-loop-jam.o.
3514         * common.opt (funroll-and-jam): New option.
3515         * opts.c (default_options_table): Add unroll-and-jam at -O3.
3516         * params.def (PARAM_UNROLL_JAM_MIN_PERCENT): New param.
3517         (PARAM_UNROLL_JAM_MAX_UNROLL): Ditto.
3518         * passes.def: Add pass_loop_jam.
3519         * timevar.def (TV_LOOP_JAM): Add.
3520         * tree-pass.h (make_pass_loop_jam): Declare.
3521         * cfgloop.c (flow_loop_tree_node_add): Add AT argument.
3522         * cfgloop.h (flow_loop_tree_node_add): Adjust declaration.
3523         * cfgloopmanip.c (duplicate_loop): Add AT argument, adjust call
3524         to flow_loop_tree_node_add.
3525         (duplicate_subloops, copy_loops_to): Append to sibling list.
3526         * cfgloopmanip.h: (duplicate_loop): Adjust declaration.
3527         * doc/invoke.texi (-funroll-and-jam): Document new option.
3528         (unroll-jam-min-percent, unroll-jam-max-unroll): Document new params.
3529
3530 2017-12-07  Richard Biener  <rguenther@suse.de>
3531
3532         PR tree-optimization/83296
3533         PR tree-optimization/67769
3534         * tree-ssa-phiopt.c (conditional_replacement): Do not reset
3535         flow sensitive info in an unrelated BB.
3536         (value_replacement): Use reset_flow_sensitive_info.
3537         (minmax_replacement): Reset flow sensitive info on the def
3538         we move.  Do not reset flow sensitive info in the whole BB
3539         we move the stmt to.
3540         (abs_replacement): Likewise.
3541
3542 2017-12-07  Segher Boessenkool  <segher@kernel.crashing.org>
3543
3544         PR target/43871
3545         * config/rs6000/rs6000.c (rs6000_option_override_internal): Set
3546         rs6000_cpu to the given -mcpu=, or to the default processor.
3547
3548 2017-12-07  Segher Boessenkool  <segher@kernel.crashing.org>
3549
3550         * config/rs6000/rs6000.h (rs6000_cpu_attr): Delete.
3551         * config/rs6000/rs6000.c (rs6000_variable_issue_1): Use rs6000_tune
3552         instead of rs6000_cpu_attr.
3553         (rs6000_adjust_cost): Ditto.
3554         (is_microcoded_insn): Ditto.
3555         (rs6000_adjust_priority): Ditto.
3556         (rs6000_issue_rate): Ditto.
3557         (rs6000_use_sched_lookahead): Ditto.
3558         (rs6000_use_sched_lookahead_guard): Ditto.
3559         (rs6000_sched_reorder): Ditto.
3560         (force_new_group): Ditto.
3561         * config/rs6000/rs6000.md (cpu attribute): Ditto.
3562         (group_ending_nop): Ditto.
3563
3564 2017-12-07  Segher Boessenkool  <segher@kernel.crashing.org>
3565
3566         * config/rs6000/rs6000.opt (rs6000_tune): New variable.
3567         * config/rs6000/rs6000.c (rs6000_option_override_internal): Also set
3568         rs6000_tune.  Use rs6000_tune instead of rs6000_cpu where appropriate.
3569         (rs6000_loop_align): Use rs6000_tune instead of rs6000_cpu where
3570         appropriate.
3571         (rs6000_reassociation_width): Ditto.
3572         (rs6000_emit_epilogue): Ditto.
3573         (rs6000_adjust_cost): Ditto.
3574         (is_microcoded_insn): Ditto.
3575         (is_cracked_insn): Ditto.
3576         (rs6000_adjust_priority): Ditto.
3577         (rs6000_sched_reorder): Ditto.
3578         (rs6000_sched_reorder2): Ditto.
3579         (insn_must_be_first_in_group): Ditto.
3580         (insn_must_be_last_in_group): Ditto.
3581         (rs6000_register_move_cost): Ditto.
3582         * config/rs6000/rs6000.h (rs6000_cpu_attr): Use rs6000_tune instead of
3583         rs6000_cpu.
3584
3585 2017-12-07  Julia Koval  <julia.koval@intel.com>
3586
3587         * config.gcc: Add vaesintrin.h.
3588         * config/i386/i386-builtin-types.def (V64QI_FTYPE_V64QI_V64QI):
3589         New type.
3590         * config/i386/i386-builtin.def (__builtin_ia32_vaesdec_v16qi,
3591         __builtin_ia32_vaesdec_v32qi, __builtin_ia32_vaesdec_v64qi):
3592         New builtins.
3593         * config/i386/i386.c (ix86_expand_args_builtin): Handle new type.
3594         * config/i386/immintrin.h: Include vaesintrin.h.
3595         * config/i386/sse.md (vaesdec_<mode>): New pattern.
3596         * config/i386/vaesintrin.h (_mm256_aesdec_epi128, _mm512_aesdec_epi128,
3597         _mm_aesdec_epi128): New intrinsics.
3598
3599 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
3600
3601         * Makefile.in (C_COMMON_OBJS): Add c-family/c-spellcheck.o.
3602         * spellcheck-tree.c (find_closest_macro_cpp_cb): Move to
3603         c-family/c-spellcheck.cc.
3604         (best_macro_match::best_macro_match): Likewise.
3605         * spellcheck-tree.h
3606         (struct edit_distance_traits<cpp_hashnode *>): Move to
3607         c-family/c-spellcheck.h.
3608         (class best_macro_match): Likewise.
3609
3610 2017-12-06  Jakub Jelinek  <jakub@redhat.com>
3611
3612         PR tree-optimization/83293
3613         * gimple-ssa-strength-reduction.c (insert_initializers): Use
3614         GSI_NEW_STMT instead of GSI_SAME_STMT in gsi_insert_after that
3615         might insert into empty bb.
3616
3617         PR sanitizer/81281
3618         * match.pd ((T)(P + A) - (T)P -> (T) A): Split into separate
3619         simplify for plus with :c added, and pointer_plus without that.
3620         ((T)P - (T)(P + A) -> -(T) A): Likewise.  If type is integral
3621         with undefined overflow and the conversion is not widening,
3622         perform negation in utype and only convert to type afterwards.
3623         ((T)(P + A) - (T)(P + B) -> (T)A - (T)B): Split into separate
3624         simplify for plus with :c added, and pointer_plus without that.
3625         If type is integral with undefined overflow and the conversion is
3626         not widening, perform minus in utype and only convert to type
3627         afterwards.  Move the last pointer_diff_expr simplify into the
3628         two outermost ifs.
3629
3630 2017-12-06  Martin Sebor  <msebor@redhat.com>
3631
3632         PR tree-optimization/82646
3633         * builtins.c (maybe_emit_chk_warning): Use size as the bound for
3634         strncpy, not maxlen.
3635
3636 2017-12-06  Martin Sebor  <msebor@redhat.com>
3637
3638         * doc/invoke.texi (-Wstringop-truncation): Mention attribute
3639         nonstring.
3640
3641         PR tree-optimization/83075
3642         * tree-ssa-strlen.c (handle_builtin_stxncpy): Avoid assuming
3643         strncat/strncpy don't change length of source string.
3644
3645 2017-12-06  Eric Botcazou  <ebotcazou@adacore.com>
3646
3647         Revert
3648         2017-11-29  Martin Aberg  <maberg@gaisler.com>
3649
3650         * config/sparc/sparc.md (divdf3_fix): Add NOP and adjust length
3651         to prevent b2bst errata sequence.
3652         (sqrtdf2_fix): Likewise.
3653
3654 2017-12-06  Jakub Jelinek  <jakub@redhat.com>
3655
3656         PR tree-optimization/81945
3657         * cfgloop.h (FOR_EACH_LOOP_FN): Use FN instead of hardcoding fn.
3658         * tree-cfg.c (move_sese_region_to_fn): If any of the loops moved
3659         to dest_cfun has orig_loop_num set, either remap it to the new
3660         loop number if the loop got moved too, or clear it.
3661
3662 2017-12-05  Steve Ellcey  <sellcey@cavium.com>
3663
3664         * config/aarch64/thunderx2-t99.md (thunderx2t99_branch): Add trap
3665         to reservation.
3666         (thunderx2t99_nothing): New insn reservation.
3667         (thunderx2t99_mrs): New insn reservation.
3668         (thunderx2t99_multiple): New insn reservation.
3669         (thunderx2t99_alu_basi): Add bfx to reservation.
3670         (thunderx2t99_fp_cmp): Add fccmps and fccmpd to reservation.
3671
3672 2017-12-05  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3673
3674         PR target/82248
3675         * config/arm/arm.md (probe_stack) : Use the 'o' constraint.
3676
3677 2017-12-05  Bin Cheng  <bin.cheng@arm.com>
3678
3679         * tree-ssa-dce.c (simple_dce_from_worklist): Move and rename from
3680         tree-ssa-pre.c::remove_dead_inserted_code.
3681         * tree-ssa-dce.h: New file.
3682         * tree-ssa-pre.c (tree-ssa-dce.h): Include new header file.
3683         (remove_dead_inserted_code): Move and rename to function
3684         tree-ssa-dce.c::simple_dce_from_worklist.
3685         (pass_pre::execute): Update use.
3686
3687 2017-12-05  Richard Biener  <rguenther@suse.de>
3688
3689         PR tree-optimization/83277
3690         * graphite-isl-ast-to-gimple.c (should_copy_to_new_region): Make sure
3691         to code-gen liveout vars.
3692
3693 2017-12-05  Richard Sandiford  <richard.sandiford@linaro.org>
3694
3695         * config/aarch64/aarch64-simd.md (aarch64_simd_bsldi_internal)
3696         (aarch64_simd_bsldi_alt): Check REG_P before GP_REGNUM_P.
3697         (aarch64_cm<optab>di, aarch64_cmtstdi): Add leading "&&" to
3698         split condition.
3699
3700 2017-12-05  Max Filippov  <jcmvbkbc@gmail.com>
3701
3702         * config/xtensa/xtensa.c (xtensa_asan_shadow_offset): New
3703         function.
3704         (TARGET_ASAN_SHADOW_OFFSET): New macro definition.
3705         * config/xtensa/xtensa.h (FRAME_GROWS_DOWNWARD): Set to 1 if
3706         ASAN is enabled.
3707
3708 2017-12-05  Richard Biener  <rguenther@suse.de>
3709
3710         * timevar.def (TV_TREE_RECIP, TV_TREE_SINCOS, TV_TREE_WIDEN_MUL): Add.
3711         * tree-ssa-math-opts.c (pass_data_cse_reciprocal): Use TV_TREE_RECIP.
3712         (pass_data_cse_sincos): Use TV_TREE_SINCOS.
3713         (pass_data_optimize_widening_mul): Use TV_TREE_WIDEN_MUL.
3714
3715 2017-12-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3716
3717         * dbxout.c (dbxout_block): Grow buf to 30 bytes.
3718
3719 2017-12-05  Martin Liska  <mliska@suse.cz>
3720             Jakub Jelinek  <jakub@redhat.com>
3721
3722         * doc/invoke.texi: Document the options.
3723         * flag-types.h (enum sanitize_code): Add
3724         SANITIZE_POINTER_COMPARE and SANITIZE_POINTER_SUBTRACT.
3725         * ipa-inline.c (sanitize_attrs_match_for_inline_p): Add handling
3726         of SANITIZE_POINTER_COMPARE and SANITIZE_POINTER_SUBTRACT.
3727         * opts.c: Define new sanitizer options.
3728         * sanitizer.def (BUILT_IN_ASAN_POINTER_COMPARE): Likewise.
3729         (BUILT_IN_ASAN_POINTER_SUBTRACT): Likewise.
3730
3731 2017-12-05  Julia Koval  <julia.koval@intel.com>
3732
3733         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VNNI_SET,
3734         OPTION_MASK_ISA_AVX512VNNI_UNSET): New.
3735         (ix86_handle_option): Handle -mavx512vnni.
3736         * config/i386/cpuid.h (bit_AVX512VNNI): New bit.
3737         * config/i386/driver-i386.c (host_detect_local_cpu): Handle new bit.
3738         * config/i386/i386-c (__AVX512VNNI__): New.
3739         * config/i386/i386.c (ix86_target_string): Handle new option.
3740         (ix86_valid_target_attribute_inner_p): Handle new option.
3741         * config/i386/i386.h (TARGET_AVX512VNNI, TARGET_AVX512VNNI_P): New.
3742         * config/i386/i386.opt (mavx512vnni): New option.
3743
3744 2017-12-01  Jan Hubicka  <hubicka@ucw.cz>
3745
3746         PR target/81616
3747         * athlon.md: Disable for generic.
3748         * haswell.md: Enable for generic.
3749         * i386.c (ix86_sched_init_global): Add core hooks for generic.
3750         * x86-tune-sched.c (ix86_issue_rate): Increase issue rate for generic
3751         to 4.
3752         (ix86_adjust_cost): Move generic to haswell path.
3753
3754 2017-12-04  Eric Botcazou  <ebotcazou@adacore.com>
3755
3756         * config/sparc/sparc.c (sparc_do_work_around_errata): Use mem_ref
3757         instead of MEM_P in a couple more places.  Fix formatting issues.
3758
3759 2017-12-04  Jim Wilson  <jimw@sifive.com>
3760
3761         * config/riscv/riscv.c (riscv_for_each_saved_reg): Use GP_REG_LAST
3762         instead of GP_REG_LAST-1.
3763         (riscv_adjust_libcall_cfi_prologue): Likewise.
3764         (riscv_adjust_libcall_cri_epilogue): Likewise.
3765         * config/riscv/riscv.h (CALL_USED_REGISTERS): Change a6 to t6 in
3766         comment.
3767
3768 2017-12-04  Luis Machado  <luis.machado@linaro.org>
3769
3770         * ipa-pure-const.c (check_decl): Add missing newline.
3771         (state_from_flags): Likewise.
3772
3773 2017-12-04  Jeff Law  <law@redhat.com>
3774
3775         PR tree-optimizatin/78496
3776         * gimple-ssa-evrp-analyze.h
3777         (evrp_range_analyzer::get_vr_values): Simplify.
3778         * gimple-ssa-evrp-analyze.c: Corresponding changes.
3779         * tree-ssa-dom.c: Include alloc-pool.h, tree-vrp.h, vr-values.h
3780         and gimple-ssa-evrp-analyze.h.
3781         (dom_opt_dom_walker class): Add evrp_range_analyzer member.
3782         (simplify_stmt_for_jump_threading): Copy a blob of code from
3783         tree-vrp.c to use ranges to simplify statements.
3784         (dom_opt_dom_walker::before_dom_children): Call
3785         evrp_range_analyzer::{enter,record_ranges_from_stmt} methods.
3786         (dom_opt_dom_walker::after_dom_children): Similarly for
3787         evrp_range_analyzer::leave.
3788         (dom_opt_dom_walker::optimize_stmt): Use EVRP ranges to optimize
3789         conditionals.
3790
3791         * gimple-ssa-evrp-analyze.c
3792         (evrp_range_analyzer::extract_range_from_stmt):  Always use
3793         vr_values::update_value_range so preexisting range info is
3794         medged with new range info, even if the new range is VR_VARYING.
3795
3796 2017-12-04  Segher Boessenkool  <segher@kernel.crashing.org>
3797
3798         * combine.c: Adjust comment.
3799         (use_crosses_set_p): Delete.
3800         (can_combine_p): Use modified_between_p instead of use_crosses_set_p.
3801         (try_combine): Ditto.
3802
3803 2017-12-04  Richard Biener  <rguenther@suse.de>
3804
3805         PR tree-optimization/83255
3806         * graphite-isl-ast-to-gimple.c (translate_isl_ast_node_for):
3807         Re-add zero-iteration check.
3808
3809 2017-12-04  Segher Boessenkool  <segher@kernel.crashing.org>
3810
3811         PR rtl-optimization/83245
3812         * lra.c (collect_non_operand_hard_regs): Treat clobbers of non-operand
3813         hard registers as earlyclobber, also if not in an asm.
3814
3815 2017-12-04  Segher Boessenkool  <segher@kernel.crashing.org>
3816
3817         PR bootstrap/83265
3818         Revert
3819         2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
3820
3821         PR target/43871
3822         * config/rs6000/rs6000.c (rs6000_option_override_internal): Set
3823         rs6000_cpu based on cpu_index, not tune_index.
3824
3825 2017-12-04  Richard Biener  <rguenther@suse.de>
3826
3827         PR tree-optimization/83238
3828         * graphite-scop-detection.c (scop_detection::merge_sese): Make
3829         code match comment, rejecting invalid SESE regions.
3830
3831 2017-12-03  John David Anglin  <danglin@gcc.gnu.org>
3832
3833         * config/pa/pa.c (pa_legitimate_address_p): For scaled indexing,
3834         require base operand is a REG_POINTER prior to reload on targets
3835         with non-equivalent space registers.
3836
3837 2017-12-01  Jan Hubicka  <hubicka@ucw.cz>
3838
3839         * ipa-cp.c (ipcp_lattice<valtype>::print): Update dumping.
3840         (update_specialized_profile): Fix updating of counts.
3841         (perhaps_add_new_callers): Likewise.
3842
3843 2017-12-01  Jan Hubicka  <hubicka@ucw.cz>
3844
3845         PR target/81616
3846         * x86-tune.def: Remove obsolette FIXMEs.
3847         (X86_TUNE_PARTIAL_FLAG_REG_STALL): Disable for generic
3848         (X86_TUNE_FUSE_CMP_AND_BRANCH_32, X86_TUNE_FUSE_CMP_AND_BRANCH_64,
3849         X86_TUNE_FUSE_CMP_AND_BRANCH_SOFLAGS, X86_TUNE_FUSE_ALU_AND_BRANCH):
3850         Enable for generic.
3851         (X86_TUNE_PAD_RETURNS): Disable for generic.
3852
3853 2017-12-02  Jakub Jelinek  <jakub@redhat.com>
3854
3855         PR tree-optimization/83170
3856         PR tree-optimization/83241
3857         * gimple-ssa-store-merging.c
3858         (imm_store_chain_info::try_coalesce_bswap): Update vuse field from
3859         gimple_vuse (ins_stmt) in case it has changed.
3860         (imm_store_chain_info::output_merged_store): Likewise.
3861
3862         * tree-chkp.c (chkp_compute_bounds_for_assignment): Handle
3863         POINTER_DIFF_EXPR.
3864
3865         PR c++/81212
3866         * tree-cfg.c (pass_warn_function_return::execute): Handle
3867         __builtin_ubsan_handle_missing_return like __builtin_unreachable
3868         with BUILTINS_LOCATION.
3869
3870         PR target/78643
3871         PR target/80583
3872         * expr.c (get_inner_reference): If DECL_MODE of a non-bitfield
3873         is BLKmode for vector field with vector raw mode, use TYPE_MODE
3874         instead of DECL_MODE.
3875
3876         * config/i386/i386-protos.h (standard_sse_constant_opcode): Change
3877         last argument to rtx pointer.
3878         * config/i386/i386.c (standard_sse_constant_opcode): Replace X argument
3879         with OPERANDS.  For AVX+ 128-bit VEX encoded instructions over 256-bit
3880         or 512-bit.  If setting EXT_REX_SSE_REG_P, use EVEX encoded insn
3881         depending on the chosen ISAs.
3882         * config/i386/i386.md (*movxi_internal_avx512f, *movoi_internal_avx,
3883         *movti_internal, *movdi_internal, *movsi_internal, *movtf_internal,
3884         *movdf_internal, *movsf_internal): Adjust standard_sse_constant_opcode
3885         callers.
3886         * config/i386/sse.md (mov<mode>_internal): Likewise.
3887         * config/i386/mmx.md (*mov<mode>_internal): Likewise.
3888
3889 2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
3890
3891         * doc/invoke.texi (-dp): Say that instruction cost is printed as well.
3892
3893 2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
3894
3895         * config/rs6000/rs6000-protos.h (emit_fusion_addis): Remove last two
3896         parameters from prototype.
3897         * config/rs6000/rs6000.c (emit_fusion_addis): Remove last two
3898         parameters.  Don't print a comment.
3899         (emit_fusion_gpr_load): Adjust.
3900         (emit_fusion_load_store): Adjust.
3901         * config/rs6000/rs6000.md (*fusion_p9_<mode>_constant): Adjust.
3902         * config/rs6000/vsx.md (two peepholes): Print the "vector load fusion"
3903         comment on the second line.
3904
3905 2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
3906
3907         PR target/43871
3908         * config/rs6000/rs6000.c (rs6000_option_override_internal): Set
3909         rs6000_cpu based on cpu_index, not tune_index.
3910
3911 2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
3912
3913         * final.c (output_asm_name): Print insn_cost.  Shorten output.  Print
3914         which_alternative instead of which_alternative + 1.
3915         (output_asm_insn): Print an extra tab if the template is short.
3916
3917 2017-12-01  Jim Wilson  <jimw@sifive.com>
3918
3919         * common.opt (use_gnu_debug_info_extensions): Delete DWARF_DEBUG from
3920         comment.
3921         * config/vx-common.h (DWARF_DEBUGGING_INFO): Delete undef.
3922         * doc/tm.texi.in (PREFERRED_DEBUGGING_TYPE): Delete DWARF_DEBUG
3923         reference.
3924         * doc/tm.texi: Regenerate.
3925
3926 2017-12-01  Michael Meissner  <meissner@linux.vnet.ibm.com>
3927
3928         PR target/81959
3929         * config/rs6000/rs6000.c (rs6000_address_for_fpconvert): Check for
3930         whether we can allocate pseudos before trying to fix an address.
3931         * config/rs6000/rs6000.md (float_<mode>si2_hw): Make sure the
3932         memory address is indexed or indirect.
3933         (floatuns_<mode>si2_hw2): Likewise.
3934
3935 2017-12-01  Jason Merrill  <jason@redhat.com>
3936
3937         * Makefile.in (TAGS): Add c-family/*.cc.
3938
3939 2017-12-01  Wilco Dijkstra  <wdijkstr@arm.com>
3940
3941         * config/aarch64/aarch64.md (call_insn): Use %c rather than %a.
3942         (call_value_insn): Likewise.
3943         (sibcall_insn): Likewise.
3944         (sibcall_value_insn): Likewise.
3945         (movsi_aarch64): Likewise.
3946         (movdi_aarch64): Likewise.
3947         (add_losym_): Likewise.
3948         (ldr_got_small_): Likewise.
3949         (ldr_got_small_sidi): Likewise.
3950         (ldr_got_small_28k_): Likewise.
3951         (ldr_got_small_28k_sidi): Likewise.
3952         * config/aarch64/aarch64.c (aarch64_print_address_internal):
3953         Move output_addr_const to symbolic case. Add error check.
3954
3955 2017-12-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
3956
3957         * config/s390/predicates.md (plus16_Q_operand): New predicate.
3958         * config/s390/s390.md: Disable MVC merging peephole if it would
3959         disable operand forwarding.
3960         (new peephole2): Split MVCs if it would turn them into up to 2
3961         forwardable MVCs.
3962
3963 2017-12-01  Richard Biener  <rguenther@suse.de>
3964
3965         PR tree-optimization/83232
3966         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Fix
3967         detection of same access. Instead of breaking the group here
3968         do not consider the duplicate.  Add comment explaining real fix.
3969
3970 2017-12-01  Jonathan Wakely  <jwakely@redhat.com>
3971
3972         * doc/md.texi (Insn Splitting): Fix "central flowgraph" typo.
3973
3974 2017-12-01  Sudakshina Das  <sudi.das@arm.com>
3975
3976         * config/arm/vfp.md (*movhf_vfp_fp16): Add conds attribute.
3977
3978 2017-12-01  Jakub Jelinek  <jakub@redhat.com>
3979
3980         * function.h (struct function): Remove cilk_frame_decl,
3981         is_cilk_function and calls_cilk_spawn fields.
3982         * tree-inline.h (struct copy_body_data): Remove remap_var_for_cilk
3983         field.
3984         * omp-simd-clone.c (simd_clone_clauses_extract): Don't clear
3985         cilk_elemental field.
3986         * cgraph.h (struct cgraph_simd_clone): Remove cilk_elemental field.
3987         * target.def: Adjust comment.
3988         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
3989         Don't test cilk_elemental.
3990
3991         PR tree-optimization/83233
3992         * gimple-ssa-store-merging.c (nop_stats, bswap_stats): Use
3993         bswap_stat name for the struct.
3994
3995         PR c/79153
3996         * tree.h (SWITCH_BREAK_LABEL_P): Define.
3997         * gimplify.c (collect_fallthrough_labels): Handle GIMPLE_BIND
3998         starting with a GIMPLE_SWITCH and ending with GIMPLE_LABEL with
3999         SWITCH_BREAK_LABEL_P set on the label.
4000         (gimplify_switch_expr): Set SWITCH_BREAK_LABEL_P on the label
4001         added for default case if it was missing and not all cases covered.
4002         Wrap GIMPLE_SWITCH and the switch_body_seq into a GIMPLE_BIND if
4003         switch_body_seq ends with a GIMPLE_LABEL with SWITCH_BREAK_LABEL_P
4004         set on the label.
4005         * tree-chrec.c (evolution_function_is_univariate_p): Add return true;
4006         to avoid -Wimplicit-fallthrough warning.
4007         * config/i386/i386.c (ix86_expand_special_args_builtin): Add
4008         FALLTHRU comment to avoid -Wimplicit-fallthrough warning.
4009
4010         PR tree-optimization/83221
4011         * tree-ssa-reassoc.c (sort_by_operand_rank): Shift bb_rank
4012         down by 16.
4013         (init_reassoc): Formatting fix.
4014
4015         PR sanitizer/81275
4016         * tree-cfg.c (group_case_labels_stmt): Don't optimize away
4017         C++ FE implicitly added __builtin_unreachable () until -Wreturn-type
4018         is diagnosed.
4019
4020         PR sanitizer/83219
4021         * tree-cfg.c: Include asan.h.
4022         (gimple_seq_unreachable_p): Return false for -fsanitize=unreachable.
4023
4024 2017-12-01  Sergey Shalnov  <Sergey.Shalnov@intel.com>
4025
4026         * config/i386/i386.md: Fix AVX512 register width in AVX512 instruction.
4027
4028 2017-12-01  Sergey Shalnov  <Sergey.Shalnov@intel.com>
4029
4030         * config/i386/i386.c (standard_sse_constant_opcode): Fix wrong form for
4031         vpcmpeqd instruction.
4032
4033 2017-12-01  Sergey Shalnov  <Sergey.Shalnov@intel.com>
4034
4035         * config/i386/i386.c (standard_sse_constant_opcode): Fix
4036         registers type for 128bit mode.
4037
4038 2017-11-30  Jakub Jelinek  <jakub@redhat.com>
4039
4040         * spellcheck-tree.c (test_find_closest_identifier): Use ; instead
4041         of ;;.
4042         * gengtype-state.c (read_state_pair): Likewise.
4043         * gimple-fold.c (gimple_fold_builtin_string_compare): Likewise.
4044         * sel-sched-dump.c (dump_insn_rtx_1): Likewise.
4045         * ipa-cp.c (intersect_aggregates_with_edge): Likewise.
4046         * ifcvt.c (noce_try_store_flag_constants): Likewise.
4047         * tree-ssa-ccp.c (ccp_finalize): Likewise.
4048         * omp-grid.c (grid_process_kernel_body_copy): Likewise.
4049         * builtins.c (fold_builtin_3): Likewise.
4050         * graphite-scop-detection.c
4051         (scop_detection::stmt_has_simple_data_refs_p): Likewise.
4052         * hsa-gen.c (hsa_function_representation::hsa_function_representation):
4053         Likewise.
4054
4055 2017-12-01  Maxim Ostapenko  <m.ostapenko@samsung.com>
4056
4057         PR sanitizer/81697
4058         * asan.c (asan_protect_global): Add new ignore_decl_rtl_set_p
4059         parameter. Return true if ignore_decl_rtl_set_p is true and other
4060         conditions are satisfied.
4061         * asan.h (asan_protect_global): Add new parameter.
4062         * varasm.c (categorize_decl_for_section): Pass true as second parameter
4063         to asan_protect_global calls.
4064
4065 2017-11-30  Jim Wilson  <jimw@sifive.com>
4066
4067         * doc/invoke.texi (RISC-V Options): Delete nonexistent -mmemcpy and
4068         -mno-memcpy options.  For -mplt, -mfdiv, -mdiv, -msave-restore, and
4069         -mstrict-align, add info on default value.  Delete redundant lines for
4070         -mabi.  Add missing -mexplicit-relocs docs.
4071
4072 2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>
4073
4074         * config/arc/arc.md (trap): New pattern.
4075
4076 2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>
4077
4078         * config/arc/arc.c (hwloop_optimize): Prevent the last ZOL
4079         instruction to end into a delay slot.
4080         * config/arc/arc.md (cond_delay_insn): Check if the instruction
4081         can be placed into a delay slot against reg_note.
4082
4083 2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>
4084
4085         * config/arc/arc.c (hwloop_optimize): Update hw-loop's end/start
4086         labels number of usages.
4087
4088 2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>
4089
4090         * config/arc/arc.c (arc_cannot_substitue_mem_equiv_p): New
4091         function.
4092         (TARGET_CANNOT_SUBSTITUTE_MEM_EQUIV_P): Define.
4093
4094 2017-11-30  Jakub Jelinek  <jakub@redhat.com>
4095
4096         PR target/83210
4097         * internal-fn.c (expand_mul_overflow): Optimize unsigned
4098         multiplication by power of 2 constant into two shifts + comparison.
4099
4100 2017-11-30  Jan Hubicka  <hubicka@ucw.cz>
4101
4102         PR target/81616
4103         * config/i386/x86-tune-costs.h (generic_cost): Revise for modern CPUs.
4104
4105 2017-11-30  Richard Biener  <rguenther@suse.de>
4106
4107         PR tree-optimization/83202
4108         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Add
4109         allow_peel argument and guard peeling.
4110         (canonicalize_loop_induction_variables): Likewise.
4111         (canonicalize_induction_variables): Pass false.
4112         (tree_unroll_loops_completely_1): Pass unroll_outer to disallow
4113         peeling from cunrolli.
4114
4115 2017-11-29  Segher Boessenkool  <segher@kernel.crashing.org>
4116
4117         * combine.c (try_combine): Print a message to dump file whenever
4118         I0, I1, or I2 cannot be combined into I3.
4119
4120 2017-11-29  Segher Boessenkool  <segher@kernel.crashing.org>
4121
4122         PR rtl-optimization/83156
4123         PR rtl-optimization/82621
4124         * combine.c (try_combine): Don't split an I2 if one of the dests is
4125         set again before I3.  Allow unused dests.
4126
4127 2017-11-29  Segher Boessenkool  <segher@kernel.crashing.org>
4128
4129         * config/rs6000/rs6000.md (*add<mode>3_carry_in_internal2): New.
4130
4131 2017-11-29  Vladimir Makarov  <vmakarov@redhat.com>
4132
4133         PR rtl-optimization/80818
4134         * lra.c (collect_non_operand_hard_regs): New arg insn.  Pass it
4135         recursively.  Use insn code for clobber.
4136         (lra_set_insn_recog_data): Pass the new arg to
4137         collect_non_operand_hard_regs.
4138         (add_regs_to_insn_regno_info): Pass insn instead of uid.  Use insn
4139         code for clobber.
4140         (lra_update_insn_regno_info): Pass insn to
4141         add_regs_to_insn_regno_info.
4142
4143 2017-11-29  Jim Wilson  <jimw@sifive.com>
4144             Andrew Waterman  <andrew@sifive.com>
4145
4146         * config/riscv/riscv.c (SINGLE_SHIFT_COST): New.
4147         (riscv_rtx_costs): Case ZERO_EXTRACT, match new pattern, and return
4148         SINGLE_SHIFT_COST.  Case LT and ZERO_EXTEND, likewise.  Case ASHIFT,
4149         use SINGLE_SHIFT_COST.
4150         * config/riscv/riscv.md (lshrsi3_zero_extend_1): New.
4151         (lshrsi3_zero_extend_2, lshrsi3_zero_extend_3): New.
4152
4153 2017-11-29  Julia Koval  <julia.koval@intel.com>
4154
4155         * config/i386/avx512vbmi2intrin.h (_mm512_shldv_epi16,
4156         _mm512_mask_shldv_epi16, _mm512_maskz_shldv_epi16, _mm512_shldv_epi32,
4157         _mm512_mask_shldv_epi32, _mm512_maskz_shldv_epi32, _mm512_shldv_epi64,
4158         _mm512_mask_shldv_epi64, _mm512_maskz_shldv_epi64): New intrinsics.
4159         * config/i386/avx512vbmi2vlintrin.h (_mm256_shldv_epi16,
4160         _mm256_mask_shldv_epi16, _mm256_maskz_shldv_epi16, _mm256_shldv_epi32,
4161         _mm256_mask_shldv_epi32, _mm256_maskz_shldv_epi32, _mm256_shldv_epi64,
4162         _mm256_mask_shldv_epi64, _mm256_maskz_shldv_epi64, _mm_shldv_epi16,
4163         _mm_mask_shldv_epi16, _mm_maskz_shldv_epi16, _mm_shldv_epi32,
4164         _mm_mask_shldv_epi32, _mm_maskz_shldv_epi32, _mm_shldv_epi64,
4165         _mm_mask_shldv_epi64, _mm_maskz_shldv_epi64): Ditto.
4166         * config/i386/i386-builtin.def (__builtin_ia32_vpshldv_v32hi,
4167         __builtin_ia32_vpshldv_v32hi_mask, __builtin_ia32_vpshldv_v32hi_maskz,
4168         __builtin_ia32_vpshldv_v16hi, __builtin_ia32_vpshldv_v16hi_mask,
4169         __builtin_ia32_vpshldv_v16hi_maskz, __builtin_ia32_vpshldv_v8hi,
4170         __builtin_ia32_vpshldv_v8hi_mask, __builtin_ia32_vpshldv_v8hi_maskz,
4171         __builtin_ia32_vpshldv_v16si, __builtin_ia32_vpshldv_v16si_mask,
4172         __builtin_ia32_vpshldv_v16si_maskz, __builtin_ia32_vpshldv_v8si,
4173         __builtin_ia32_vpshldv_v8si_mask, __builtin_ia32_vpshldv_v8si_maskz,
4174         __builtin_ia32_vpshldv_v4si, __builtin_ia32_vpshldv_v4si_mask,
4175         __builtin_ia32_vpshldv_v4si_maskz, __builtin_ia32_vpshldv_v8di,
4176         __builtin_ia32_vpshldv_v8di_mask, __builtin_ia32_vpshldv_v8di_maskz,
4177         __builtin_ia32_vpshldv_v4di, __builtin_ia32_vpshldv_v4di_mask,
4178         __builtin_ia32_vpshldv_v4di_maskz, __builtin_ia32_vpshldv_v2di,
4179         __builtin_ia32_vpshldv_v2di_mask,
4180         __builtin_ia32_vpshldv_v2di_maskz): New builtins.
4181         * config/i386/sse.md (vpshldv_<mode>, vpshldv_<mode>_mask,
4182         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): New patterns.
4183
4184 2017-11-29  Julia Koval  <julia.koval@intel.com>
4185
4186         * config/i386/avx512vbmi2intrin.h (_mm512_shrdv_epi16,
4187         _mm512_mask_shrdv_epi16, _mm512_maskz_shrdv_epi16, _mm512_shrdv_epi32,
4188         _mm512_mask_shrdv_epi32, _mm512_maskz_shrdv_epi32, _mm512_shrdv_epi64,
4189         _mm512_mask_shrdv_epi64, _mm512_maskz_shrdv_epi64): New intrinsics.
4190         * config/i386/avx512vbmi2vlintrin.h (_mm256_shrdv_epi16,
4191         _mm256_mask_shrdv_epi16, _mm256_maskz_shrdv_epi16, _mm256_shrdv_epi32,
4192         _mm256_mask_shrdv_epi32, _mm256_maskz_shrdv_epi32, _mm256_shrdv_epi64,
4193         _mm256_mask_shrdv_epi64, _mm256_maskz_shrdv_epi64, _mm_shrdv_epi16,
4194         _mm_mask_shrdv_epi16, _mm_maskz_shrdv_epi16, _mm_shrdv_epi32,
4195         _mm_mask_shrdv_epi32, _mm_maskz_shrdv_epi32, _mm_shrdv_epi64,
4196         _mm_mask_shrdv_epi64, _mm_maskz_shrdv_epi64): Ditto.
4197         * config/i386/i386-builtin-types.def (V32HI_FTYPE_V32HI_V32HI_V32HI,
4198         V32HI_FTYPE_V32HI_V32HI_V32HI_INT, V16HI_FTYPE_V16HI_V16HI_V16HI_INT,
4199         V8HI_FTYPE_V8HI_V8HI_V8HI_INT, V8SI_FTYPE_V8SI_V8SI_V8SI_INT,
4200         V4SI_FTYPE_V4SI_V4SI_V4SI_INT, V8DI_FTYPE_V8DI_V8DI_V8DI,
4201         V8DI_FTYPE_V8DI_V8DI_V8DI_INT, V4DI_FTYPE_V4DI_V4DI_V4DI_INT,
4202         V16SI_FTYPE_V16SI_V16SI_V16SI, V16SI_FTYPE_V16SI_V16SI_V16SI_INT,
4203         V2DI_FTYPE_V2DI_V2DI_V2DI_INT): New types.
4204         * config/i386/i386.c (ix86_expand_args_builtin): Handle new types.
4205         * config/i386/sse.md (vpshrdv_<mode>, vpshrdv_<mode>_mask,
4206         vpshrdv_<mode>_maskz, vpshrdv_<mode>_maskz_1): New pattern.
4207
4208 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
4209
4210         * config/sparc/sparc.c (sparc_do_work_around_errata): Treat the
4211         movsi_pic_gotdata_op instruction as a load for the UT699 errata
4212         workaround.
4213
4214 2017-11-29  Martin Aberg  <maberg@gaisler.com>
4215
4216         * config/sparc/sparc.md (divdf3_fix): Add NOP and adjust length
4217         to prevent b2bst errata sequence.
4218         (sqrtdf2_fix): Likewise.
4219
4220 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
4221
4222         * config/sparc/sparc.c (fpop_reg_depend_p): New function.
4223         (div_sqrt_insn_p): New function.
4224         (sparc_do_work_around_errata): Insert NOP instructions to
4225         prevent sequences that could trigger the TN-0013 errata for
4226         certain LEON3 processors.
4227         (pass_work_around_errata::gate): Also test sparc_fix_lost_divsqrt.
4228         (sparc_option_override): Set sparc_fix_lost_divsqrt appropriately.
4229         * config/sparc/sparc.md (fix_lost_divsqrt): New attribute.
4230         (in_branch_delay): Prevent div and sqrt in delay slot if
4231         fix_lost_divsqrt.
4232         * config/sparc/sparc.opt (sparc_fix_lost_divsqrt): New variable.
4233
4234 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
4235
4236         * config/sparc/sparc.c (atomic_insn_p): New function.
4237         (sparc_do_work_around_errata): Insert NOP instructions to
4238         prevent sequences that could trigger the TN-0010 errata for
4239         UT700.
4240         * config/sparc/sync.md (atomic_compare_and_swap_leon3_1): Make
4241         instruction referable in atomic_insns_p.
4242
4243 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
4244
4245         * config/sparc/sync.md (swapsi): 16-byte align if sparc_fix_gr712rc.
4246         (atomic_compare_and_swap_leon3_1): Likewise.
4247         (ldstub): Likewise.
4248
4249 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
4250
4251         * config/sparc/sparc.c (fpop_insn_p): New function.
4252         (sparc_do_work_around_errata): Insert NOP instructions to
4253         prevent sequences that could trigger the TN-0012 errata for
4254         GR712RC.
4255         (pass_work_around_errata::gate): Also test sparc_fix_gr712rc.
4256         * config/sparc/sparc.md (fix_gr712rc): New attribute.
4257         (in_branch_annul_delay): Prevent floating-point instructions
4258         in delay slot of annulled integer branch.
4259
4260 2017-11-29  Richard Biener  <rguenther@suse.de>
4261
4262         PR tree-optimization/83202
4263         * tree-vect-slp.c (scalar_stmts_set_t): New typedef.
4264         (bst_fail): Use it.
4265         (vect_analyze_slp_cost_1): Add visited set, do not account SLP
4266         nodes vectorized to the same stmts multiple times.
4267         (vect_analyze_slp_cost): Allocate a visited set and pass it down.
4268         (vect_analyze_slp_instance): Adjust.
4269         (scalar_stmts_to_slp_tree_map_t): New typedef.
4270         (vect_schedule_slp_instance): Add a map recording the SLP node
4271         representing the vectorized stmts for a set of scalar stmts.
4272         Avoid code-generating redundancies.
4273         (vect_schedule_slp): Allocate map and pass it down.
4274
4275 2017-11-29  Nathan Sidwell  <nathan@acm.org>
4276
4277         PR c++/83187
4278         * tree.c (build_complex_type): Fix canonicalization.  Only fill in
4279         type if it is new.
4280
4281 2017-11-29  Wilco Dijkstra  <wdijkstr@arm.com>
4282
4283         * config/aarch64/aarch64.c (aarch64_print_operand): Add new
4284         cases for printing LDP/STP memory addresses.
4285         (aarch64_print_address_internal): Renamed from
4286         aarch64_print_operand_address, added parameter, add Pmode check.
4287         (aarch64_print_ldpstp_address): New function for LDP/STP addresses.
4288         (aarch64_print_operand_address): Indirect to
4289         aarch64_print_address_internal.
4290         * config/aarch64/aarch64-simd.md (store_pair_lanes): Use new
4291         'y' operand output specifier.
4292
4293 2017-11-29  Jakub Jelinek  <jakub@redhat.com>
4294
4295         PR middle-end/83185
4296         * tree.c (build_simple_mem_ref_loc): Handle
4297         get_addr_base_and_unit_offset returning a MEM_REF.
4298
4299         PR middle-end/80929
4300         * rtlanal.c (seq_cost): For non-single_set insns try to use insn_cost.
4301
4302         PR target/80819
4303         * config/i386/sse.md (vec_concatv2di): Remove * from (=Yr,0,*rm)
4304         alternative.
4305
4306 2017-11-28  David Malcolm  <dmalcolm@redhat.com>
4307
4308         * diagnostic-show-locus.c (layout::print_trailing_fixits): Handle
4309         m_x_offset.
4310         (layout::move_to_column): Likewise.
4311
4312 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
4313
4314         PR sanitizer/81275
4315         * tree.c (block_may_fallthru): Return false if SWITCH_ALL_CASES_P
4316         is set on SWITCH_EXPR and !block_may_fallthru (SWITCH_BODY ()).
4317
4318 2017-11-28  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4319             Martin Jambor  <mjambor@suse.cz>
4320
4321         PR ipa/82808
4322         * tree.h (expr_type_first_operand_type_p): Declare
4323         * tree.c (expr_type_first_operand_type_p): New function.
4324         * ipa-prop.h (ipa_get_type): Allow i to be out of bounds.
4325         (ipa_value_from_jfunc): Adjust declaration.
4326         * ipa-cp.c (ipa_get_jf_pass_through_result): New parameter RES_TYPE.
4327         Use it as result type for arithmetics, unless it is NULL in which case
4328         be more conservative.
4329         (ipa_value_from_jfunc): New parameter PARM_TYPE, pass it to
4330         ipa_get_jf_pass_through_result.
4331         (propagate_vals_across_pass_through): Likewise.
4332         (propagate_scalar_across_jump_function): New parameter PARM_TYPE, pass
4333         is to propagate_vals_across_pass_through.
4334         (propagate_constants_across_call): Pass PARM_TYPE to
4335         propagate_scalar_across_jump_function.
4336         (find_more_scalar_values_for_callers_subset): Pass parameter type to
4337         ipa_value_from_jfunc.
4338         (cgraph_edge_brings_all_scalars_for_node): Likewise.
4339         * ipa-fnsummary.c (evaluate_properties_for_edge): Renamed parms_info
4340         to caller_parms_info, pass parameter type to ipa_value_from_jfunc.
4341         * ipa-prop.c (try_make_edge_direct_simple_call): New parameter
4342         target_type, pass it to ipa_value_from_jfunc.
4343         (update_indirect_edges_after_inlining): Pass parameter type to
4344         try_make_edge_direct_simple_call.
4345
4346 2017-11-28  Jeff Law  <law@redhat.com>
4347
4348         * gimple-ssa-evrp-analyze.c
4349         (evrp_range_analyzer::record_ranges_from_phis): Only use SCEV to
4350         refine ranges if scev_initialized_p returns true.
4351         * vr-values.c (vr_values::extract_range_from_phi_node): Likewise.
4352
4353 2017-11-28  Julia Koval  <julia.koval@intel.com>
4354
4355         * config/i386/avx512vbmi2intrin.h (_mm512_shrdi_epi16,
4356         _mm512_mask_shrdi_epi16, _mm512_maskz_shrdi_epi16, _mm512_shrdi_epi32,
4357         _mm512_mask_shrdi_epi32, _mm512_maskz_shrdi_epi32, _mm512_shrdi_epi64,
4358         _mm512_mask_shrdi_epi64, _mm512_maskz_shrdi_epi64): New intrinsics.
4359         * config/i386/avx512vbmi2vlintrin.h (_mm256_shrdi_epi16,
4360         _mm256_mask_shrdi_epi16, _mm256_maskz_shrdi_epi16,
4361         _mm256_mask_shrdi_epi32, _mm256_maskz_shrdi_epi32, _mm256_shrdi_epi32,
4362         _mm256_mask_shrdi_epi64, _mm256_maskz_shrdi_epi64, _mm256_shrdi_epi64,
4363         _mm_mask_shrdi_epi16, _mm_maskz_shrdi_epi16, _mm_shrdi_epi16,
4364         _mm_mask_shrdi_epi32, _mm_maskz_shrdi_epi32, _mm_shrdi_epi32,
4365         _mm_mask_shrdi_epi64, _mm_maskz_shrdi_epi64, _mm_shrdi_epi64): Ditto.
4366         * config/i386/i386-builtin.def (__builtin_ia32_vpshrd_v32hi,
4367         __builtin_ia32_vpshrd_v32hi_mask, __builtin_ia32_vpshrd_v16hi,
4368         __builtin_ia32_vpshrd_v16hi_mask, __builtin_ia32_vpshrd_v8hi,
4369         __builtin_ia32_vpshrd_v8hi_mask, __builtin_ia32_vpshrd_v16si,
4370         __builtin_ia32_vpshrd_v16si_mask, __builtin_ia32_vpshrd_v8si,
4371         __builtin_ia32_vpshrd_v8si_mask, __builtin_ia32_vpshrd_v4si,
4372         __builtin_ia32_vpshrd_v4si_mask, __builtin_ia32_vpshrd_v8di,
4373         __builtin_ia32_vpshrd_v8di_mask, __builtin_ia32_vpshrd_v4di,
4374         __builtin_ia32_vpshrd_v4di_mask, __builtin_ia32_vpshrd_v2di,
4375         __builtin_ia32_vpshrd_v2di_mask): New builtins.
4376         * config/i386/sse.md (vpshrd_<mode><mask_name>): New pattern.
4377
4378 2017-11-28  Julia Koval  <julia.koval@intel.com>
4379
4380         * config/i386/avx512vbmi2intrin.h (_mm512_shldi_epi16,
4381         _mm512_mask_shldi_epi16, _mm512_maskz_shldi_epi16, _mm512_shldi_epi32,
4382         _mm512_mask_shldi_epi32, _mm512_maskz_shldi_epi32, _mm512_shldi_epi64,
4383         _mm512_mask_shldi_epi64, _mm512_maskz_shldi_epi64): New intrinsics.
4384         * config/i386/avx512vbmi2vlintrin.h (_mm256_shldi_epi16,
4385         _mm256_mask_shldi_epi16, _mm256_maskz_shldi_epi16,
4386         _mm256_mask_shldi_epi32, _mm256_maskz_shldi_epi32, _mm256_shldi_epi32,
4387         _mm256_mask_shldi_epi64, _mm256_maskz_shldi_epi64, _mm256_shldi_epi64,
4388         _mm_mask_shldi_epi16, _mm_maskz_shldi_epi16, _mm_shldi_epi16,
4389         _mm_mask_shldi_epi32, _mm_maskz_shldi_epi32, _mm_shldi_epi32,
4390         _mm_mask_shldi_epi64, _mm_maskz_shldi_epi64, _mm_shldi_epi64): Ditto.
4391         * config/i386/i386-builtin-types.def (V32HI_FTYPE_V32HI_V32HI_INT,
4392         V32HI_FTYPE_V32HI_V32HI_INT_V32HI_INT, V16SI_FTYPE_V16SI_V16SI_INT,
4393         V16SI_FTYPE_V16SI_V16SI_INT_V16SI_INT,
4394         V8DI_FTYPE_V8DI_V8DI_INT_V8DI_INT, V8SI_FTYPE_V8SI_V8SI_INT_V8SI_INT,
4395         V16HI_FTYPE_V16HI_V16HI_INT_V16HI_INT,
4396         V4DI_FTYPE_V4DI_V4DI_INT_V4DI_INT,
4397         V8HI_FTYPE_V8HI_V8HI_INT_V8HI_INT,
4398         V4SI_FTYPE_V4SI_V4SI_INT_V4SI_INT,
4399         V2DI_FTYPE_V2DI_V2DI_INT_V2DI_INT): New types.
4400         * config/i386/i386-builtin.def (__builtin_ia32_vpshld_v32hi,
4401         __builtin_ia32_vpshld_v32hi_mask, __builtin_ia32_vpshld_v16hi,
4402         __builtin_ia32_vpshld_v16hi_mask, __builtin_ia32_vpshld_v8hi,
4403         __builtin_ia32_vpshld_v8hi_mask, __builtin_ia32_vpshld_v16si,
4404         __builtin_ia32_vpshld_v16si_mask, __builtin_ia32_vpshld_v8si,
4405         __builtin_ia32_vpshld_v8si_mask, __builtin_ia32_vpshld_v4si,
4406         __builtin_ia32_vpshld_v4si_mask, __builtin_ia32_vpshld_v8di,
4407         __builtin_ia32_vpshld_v8di_mask, __builtin_ia32_vpshld_v4di,
4408         __builtin_ia32_vpshld_v4di_mask, __builtin_ia32_vpshld_v2di,
4409         __builtin_ia32_vpshld_v2di_mask): New builtins.
4410         * config/i386/i386.c (ix86_expand_args_builtin): Handle new types.
4411         * config/i386/sse.md (vpshld_<mode><mask_name>): New pattern.
4412
4413 2017-11-28  Richard Biener  <rguenther@suse.de>
4414
4415         PR tree-optimization/80776
4416         * gimple-ssa-evrp-analyze.h (evrp_range_analyzer::set_ssa_range_info):
4417         Declare.
4418         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::set_ssa_range_info):
4419         New function.
4420         (evrp_range_analyzer::record_ranges_from_incoming_edges):
4421         If the incoming edge is an effective fallthru because the other
4422         edge only reaches a __builtin_unreachable () then record ranges
4423         derived from the controlling condition in SSA info.
4424         (evrp_range_analyzer::record_ranges_from_phis): Use set_ssa_range_info.
4425         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
4426
4427 2017-11-28  Olivier Hainque  <hainque@adacore.com>
4428
4429         * Makefile.in (SELFTEST_FLAGS): Use nul instead of /dev/null
4430         on mingw build hosts.
4431
4432 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
4433
4434         PR debug/81307
4435         * dbxout.c (dbx_block_with_cold_children): Fix function comment.
4436
4437 2017-11-28  Richard Biener  <rguenther@suse.de>
4438
4439         PR middle-end/83141
4440         * gimple-fold.c (gimple_fold_builtin_memory_op): For aggregate
4441         copies generated from memcpy use a character array as reference
4442         type.
4443
4444 2017-11-28  Julia Koval  <julia.koval@intel.com>
4445             Sebastian Peryt  <sebastian.peryt@intel.com>
4446
4447         * Makefile.in (cilkplus.def, cilk-builtins.def, c-family/cilk.o,
4448         c-family/c-cilkplus.o, c-family/array-notation-common.o,
4449         cilk-common.o, cilk.h, cilk-common.c): Remove.
4450         * builtin-types.def
4451         (BT_FN_INT_PTR_PTR_PTR_FTYPE_BT_INT_BT_PTR_BT_PTR_BT_PTR): Remove.
4452         * builtins.c (is_builtin_name): Remove cilkplus condition.
4453         (BUILT_IN_CILK_DETACH, BUILT_IN_CILK_POP_FRAME): Remove.
4454         * builtins.def (DEF_CILK_BUILTIN_STUB, DEF_CILKPLUS_BUILTIN,
4455         cilk-builtins.def, cilkplus.def): Remove.
4456         * cif-code.def (CILK_SPAWN): Remove.
4457         * cilk-builtins.def: Delete.
4458         * cilk-common.c: Ditto.
4459         * cilk.h: Ditto.
4460         * cilkplus.def: Ditto.
4461         * config/darwin.h (fcilkplus): Delete.
4462         * cppbuiltin.c: Ditto.
4463         * doc/extend.texi: Remove cilkplus doc.
4464         * doc/generic.texi: Ditto.
4465         * doc/invoke.texi: Ditto.
4466         * doc/passes.texi: Ditto.
4467         * gcc.c (fcilkplus): Remove.
4468         * gengtype.c (cilk.h): Remove.
4469         * gimple-pretty-print.c (dump_gimple_omp_for): Remove cilkplus
4470         support.
4471         * gimple.h (GF_OMP_FOR_KIND_CILKFOR, GF_OMP_FOR_KIND_CILKSIMD):
4472         Remove.
4473         * gimplify.c (gimplify_return_expr, maybe_fold_stmt,
4474         gimplify_call_expr,
4475         is_gimple_stmt, gimplify_modify_expr, gimplify_scan_omp_clauses,
4476         gimplify_adjust_omp_clauses, gimplify_omp_for, gimplify_expr): Remove
4477         cilkplus conditions.
4478         * ipa-fnsummary.c (ipa_dump_fn_summary, compute_fn_summary,
4479         inline_read_section): Ditto.
4480         * ipa-inline-analysis.c (cilk.h): Remove.
4481         * ira.c (ira_setup_eliminable_regset): Remove cilkplus support.
4482         * lto-wrapper.c (merge_and_complain, append_compiler_options,
4483         append_linker_options): Remove condition for fcilkplus.
4484         * lto/lto-lang.c (cilk.h): Remove.
4485         (lto_init): Remove condition for fcilkplus.
4486         * omp-expand.c (expand_cilk_for_call): Delete.
4487         (expand_omp_taskreg, expand_omp_for_static_chunk,
4488         expand_omp_for): Remove cilkplus
4489         conditions.
4490         (expand_cilk_for): Delete.
4491         * omp-general.c (omp_extract_for_data): Remove cilkplus support.
4492         * omp-low.c (scan_sharing_clauses, create_omp_child_function,
4493         execute_lower_omp, diagnose_sb_0): Ditto.
4494         * omp-simd-clone.c (simd_clone_clauses_extract): Ditto.
4495         * tree-core.h (OMP_CLAUSE__CILK_FOR_COUNT_): Delete.
4496         * tree-nested.c: Ditto.
4497         * tree-pretty-print.c (dump_omp_clause): Remove cilkplus support.
4498         (dump_generic_node): Ditto.
4499         * tree.c (OMP_CLAUSE__CILK_FOR_COUNT_): Delete.
4500         * tree.def (cilk_simd, cilk_for, cilk_spawn_stmt, cilk_sync_stmt):
4501         Delete.
4502         * tree.h (CILK_SPAWN_FN, EXPR_CILK_SPAWN): Delete.
4503
4504 2017-11-28  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
4505
4506         * config/aarch64/aarch64.md (div<mode>3): Change check to TARGET_FLOAT.
4507         * config/aarch64/aarch64.c (aarch64_emit_approx_div): Add early exit
4508         for vector mode and !TARGET_SIMD.
4509
4510 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
4511
4512         * tree.def (SWITCH_EXPR): Change from 3 operand to 2 operand tree.
4513         Adjust comment.
4514         * tree.h (SWITCH_LABELS): Remove.
4515         * gimplify.c (gimplify_switch_expr): Don't test SWITCH_LABELS,
4516         assert SWITCH_BODY is non-NULL.
4517         * tree-pretty-print.c (dump_generic_node): Remove SWITCH_LABELS
4518         handling.
4519         * tree.c (block_may_fallthru): Always return true; for SWITCH_EXPR.
4520
4521         PR tree-optimization/80788
4522         * match.pd (X +- C1 CMP C2 -> X CMP C2 -+ C1): If res
4523         has TREE_OVERFLOW set, call drop_tree_overflow.
4524
4525 2017-11-28  Richard Biener  <rguenther@suse.de>
4526
4527         PR tree-optimization/83158
4528         * tree-vrp.c (intersect_ranges): Prefer ~[0, 0] in a few more cases.
4529
4530 2017-11-28  Segher Boessenkool  <segher@kernel.crashing.org>
4531
4532         PR 81288/target
4533         * config/rs6000/rs6000.c (rs6000_rtx_costs): Do not handle
4534         TARGET_ISEL && !TARGET_MFCRF differently.  Simplify code.
4535
4536 2017-11-27  Segher Boessenkool  <segher@kernel.crashing.org>
4537
4538         * config/rs6000/rs6000.md (<code><GPR:mode><GPR2:mode>2_isel): Change
4539         LT/GT/LTU/GTU to LE/GE/LEU/GEU where possible.
4540
4541 2017-11-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
4542
4543         PR middle_end/82333
4544         * varasm.c (compare_constant): Take the mode of the constants into
4545         account when comparing floating point constants.
4546
4547 2017-11-27  Gerald Pfeifer  <gerald@pfeifer.com>
4548
4549         * hash-set.h (DEFINE_DEBUG_HASH_SET): Remove static qualifier
4550         from explicit instantiation of debug_helper.
4551         * vec.h (DEFINE_DEBUG_VEC): Ditto.
4552
4553 2017-11-27  Richard Biener  <rguenther@suse.de>
4554
4555         * gimple-fold.c (gimple_fold_builtin_memory_op): Remove dead code,
4556         refactor a bit.
4557
4558 2017-11-27  Richard Biener  <rguenther@suse.de>
4559
4560         * tree.c (wide_int_to_tree): Free discarded INTEGER_CST.
4561         (type_hash_canon): Also clear int_cst_hash_table entry for
4562         TYPE_MIN/MAX_VALUE.
4563         (build_nonstandard_integer_type): Hash all TYPE_MAX_VALUEs.
4564
4565 2017-11-27  Tamar Christina  <tamar.christina@arm.com>
4566
4567         * doc/extend.texi: Add -A suffix (ARMv8*-A, ARMv7-A).
4568         * doc/invoke.texi: Add -A suffix (ARMv8*-A, ARMv7-A).
4569         * doc/sourcebuild.texi: Add -A suffix (ARMv8*-A, ARMv7-A).
4570
4571 2017-11-27  Markus Trippelsdorf  <markus@trippelsdorf.de>
4572
4573         * hash-map.h (gt_cleare_cache): Avoid UB.
4574
4575 2017-11-27  Eric Botcazou  <ebotcazou@adacore.com>
4576
4577         * cfgloop.h (struct loop): Document usage of USHRT_MAX for unroll.
4578         * loop-unroll.c (decide_unroll_constant_iterations): Implement it.
4579         (decide_unroll_runtime_iterations): Likewise.
4580         (decide_unroll_stupid): Likewise.
4581
4582 2017-11-27  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
4583
4584         PR target/83109
4585         * config/i386/i386.md: Add a loop with incssp.
4586
4587 2017-11-27  Martin Jambor  <mjambor@suse.cz>
4588
4589         PR tree-optimization/81248
4590         * tree-sra.c (splice_param_accesses): Remove size check.
4591         (decide_one_param_reduction): Fix size check.
4592         * gimple-pretty-print.c (dump_profile): Silence warning.
4593         * params.def (PARAM_IPA_SRA_PTR_GROWTH_FACTOR): Adjust description.
4594
4595 2017-11-27  Jakub Jelinek  <jakub@redhat.com>
4596
4597         PR debug/81307
4598         * dbxout.c (lastlineno): New variable.
4599         (dbx_debug_hooks): Use dbxout_switch_text_section as
4600         switch_text_section debug hook.
4601         (dbxout_function_end): Switch to current_function_section
4602         rather than function_section.  If crtl->has_bb_partition,
4603         output just one N_FUN, depending on in_cold_section_p.
4604         (dbxout_source_line): Remember last lineno in lastlineno.
4605         (dbxout_switch_text_section): New function.
4606         (dbxout_function_decl): Adjust dbxout_block caller.
4607         (dbx_block_with_cold_children): New function.
4608         (dbxout_block): Return true if any LBRAC/RBRAC have been
4609         emitted.  Use dbx_block_with_cold_children at depth == 0
4610         in second partition.  Add PARENT_BLOCKNUM argument, pass
4611         it optionally adjusted to children.  Output LBRAC/RBRAC
4612         around recursive call only if the block is in the current
4613         partition, if not and anything was output, emit empty
4614         range LBRAC/RBRAC.
4615         * final.c (final_scan_insn): Compute cold_function_name
4616         before calling switch_text_section debug hook.  Call
4617         that hook even if dwarf2out_do_frame if not emitting
4618         dwarf debug info.
4619
4620         PR target/83100
4621         * varasm.c (bss_initializer_p): Return true for DECL_COMMON
4622         TREE_READONLY decls.
4623
4624 2017-11-27  Markus Trippelsdorf  <markus@trippelsdorf.de>
4625
4626         PR rtl-optimization/82488
4627         * expr.c (fixup_args_size_notes): Avoid signed integer overflow.
4628
4629 2017-11-26  Julia Koval  <julia.koval@intel.com>
4630
4631         * config/i386/i386.c (processor_target_table): Add skylake_cost for
4632         skylake-avx512.
4633         * config/i386/x86-tune-costs.h (skylake_memcpy, skylake_memset,
4634         skylake_cost): New.
4635
4636 2017-11-26  Julia Koval  <julia.koval@intel.com>
4637
4638         * config/i386/driver-i386.c (host_detect_local_cpu):
4639         Detect skylake-avx512.
4640
4641 2017-11-26  Julia Koval  <julia.koval@intel.com>
4642
4643         * config.gcc: Add -march=cannonlake.
4644         * config/i386/driver-i386.c (host_detect_local_cpu): Detect cannonlake.
4645         * config/i386/i386-c.c (ix86_target_macros_internal): Handle cannonlake.
4646         * config/i386/i386.c (processor_costs): Add m_CANNONLAKE.
4647         (PTA_CANNONLAKE): New.
4648         (processor_target_table): Add cannonlake.
4649         (ix86_option_override_internal): Ditto.
4650         (fold_builtin_cpu): Ditto.
4651         (get_builtin_code_for_version): Handle cannonlake.
4652         (M_INTEL_COREI7_CANNONLAKE): New.
4653         * config/i386/i386.h (TARGET_CANNONLAKE, PROCESSOR_CANNONLAKE): New.
4654         * doc/invoke.texi: Add -march=cannonlake.
4655
4656 2017-11-14  Boris Kolpackov  <boris@codesynthesis.com>
4657
4658         * plugin.c (add_new_plugin): Use platform-specific library extensions.
4659         (try_init_one_plugin): Alternative implementation for MinGW.
4660         * Makefile.in (plugin_implib): New.
4661         (gengtype-lex.c): Fix broken AIX workaround.
4662         * configure: Regenerate.
4663         * doc/plugins.texi: Document support for MinGW.
4664
4665 2017-11-25  Jakub Jelinek  <jakub@redhat.com>
4666
4667         PR rtl-optimization/81553
4668         * combine.c (simplify_if_then_else): In (if_then_else COND (OP Z C1) Z)
4669         to (OP Z (mult COND (C1 * STORE_FLAG_VALUE))) optimization, if OP
4670         is a shift where C1 has different mode than the whole shift, use C1's
4671         mode for MULT rather than the shift's mode.
4672
4673         PR target/82848
4674         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Don't fold
4675         builtins not enabled in the currently selected ISA.
4676
4677 2017-11-24  Jackson Woodruff  <jackson.woodruff@arm.com>
4678
4679         PR tree-optimization/71026
4680         * tree-ssa-math-opts (is_division_by_square, is_square_of): New.
4681         (insert_reciprocals): Change to insert reciprocals before a division
4682         by a square and to insert the square of a reciprocal.
4683         (execute_cse_reciprocals_1): Change to consider division by a square.
4684         (register_division_in): Add importance parameter.
4685
4686 2017-11-24  Richard Biener  <rguenther@suse.de>
4687
4688         PR tree-optimization/82402
4689         * tree-vect-loop-manip.c (create_lcssa_for_virtual_phi): Properly
4690         set SSA_NAME_OCCURS_IN_ABNORMAL_PHI.
4691
4692 2017-11-24  Marc Glisse  <marc.glisse@inria.fr>
4693
4694         * match.pd (0-ptr): New transformation.
4695
4696 2017-11-24  Jan Hubicka  <hubicka@ucw.cz>
4697
4698         PR bootstrap/83015
4699         * ipa-inline.c (inline_small_functions): Set current badnes correctly
4700         when skipping checking.
4701
4702 2017-11-24  Richard Biener  <rguenther@suse.de>
4703
4704         PR tree-optimization/83128
4705         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Handle STRING_CSTs.
4706         (vn_reference_lookup_3): Likewise.
4707
4708 2017-11-24  Jakub Jelinek  <jakub@redhat.com>
4709
4710         PR sanitizer/83014
4711         * ubsan.c (ubsan_type_descriptor): Use pp_unsigned_wide_integer
4712         instead of pp_printf with HOST_WIDE_INT_PRINT_DEC.  Avoid calling
4713         tree_to_uhwi twice.
4714
4715         * tree-object-size.c (pass_through_call): Use gimple_call_return_flags
4716         ERF_RETURN*ARG* for builtins other than BUILT_IN_ASSUME_ALIGNED,
4717         check for the latter with gimple_call_builtin_p.  Do not handle
4718         BUILT_IN_STPNCPY_CHK which is not a pass through call.
4719
4720 2017-11-24  Christophe Lyon  <christophe.lyon@linaro.org>
4721
4722         * config/arm/arm_neon.h: Fix pragma GCC push_options before
4723         vdot_u32.
4724
4725 2017-11-23  Julia Koval  <julia.koval@intel.com>
4726
4727         * config/i386/avx512vbmi2intrin.h (_mm512_mask_expand_epi8,
4728         _mm512_maskz_expand_epi8, _mm512_mask_expandloadu_epi8,
4729         _mm512_maskz_expandloadu_epi8, _mm512_mask_expand_epi16,
4730         _mm512_maskz_expand_epi16, _mm512_mask_expandloadu_epi16,
4731         _mm512_maskz_expandloadu_epi16): New intrinsics.
4732         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_expand_epi8,
4733         _mm_maskz_expand_epi8, _mm_mask_expandloadu_epi8,
4734         _mm_maskz_expandloadu_epi8, _mm_mask_expand_epi16,
4735         _mm_maskz_expand_epi16, _mm_mask_expandloadu_epi16,
4736         _mm_maskz_expandloadu_epi16, _mm256_mask_expand_epi16,
4737         _mm256_maskz_expand_epi16, _mm256_mask_expandloadu_epi16,
4738         _mm256_maskz_expandloadu_epi16, _mm256_mask_expand_epi8,
4739         _mm256_maskz_expand_epi8, _mm256_mask_expandloadu_epi8,
4740         _mm256_maskz_expandloadu_epi8): New intrinsics.
4741         * config/i386/i386-builtin-types.def (V64QI_FTYPE_PCV64QI_V64QI_UDI,
4742         V32HI_FTYPE_PCV32HI_V32HI_USI, V32QI_FTYPE_PCV32QI_V32QI_USI,
4743         V16HI_FTYPE_PCV16HI_V16HI_UHI, V16QI_FTYPE_PCV16QI_V16QI_UHI,
4744         V8HI_FTYPE_PCV8HI_V8HI_UQI): New types.
4745         * config/i386/i386.c (ix86_expand_special_args_builtin): Use new types.
4746         * config/i386/sse.md (VI248_VLBW): New iterator.
4747         (expand<mode>_mask, expand<mode>_maskz): New patterns.
4748
4749 2017-11-23  Julia Koval  <julia.koval@intel.com>
4750
4751         * config.gcc (avx512vbmi2intrin.h, avx512vbmi2vlintrin): New headers.
4752         * config/i386/avx512vbmi2intrin.h (_mm512_mask_compress_epi8,
4753         _mm512_maskz_compress_epi8, _mm512_mask_compressstoreu_epi8,
4754         _mm512_mask_compress_epi16, _mm512_maskz_compress_epi16,
4755         _mm512_mask_compressstoreu_epi16): New.
4756         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_compress_epi8,
4757         _mm_maskz_compress_epi8, _mm256_mask_compressstoreu_epi16,
4758         _mm_mask_compress_epi16, _mm_maskz_compress_epi16,
4759         _mm256_mask_compress_epi16, _mm256_maskz_compress_epi16,
4760         _mm_mask_compressstoreu_epi8, _mm_mask_compressstoreu_epi16,
4761         _mm256_mask_compress_epi8, _mm256_maskz_compress_epi8,
4762         _mm256_mask_compressstoreu_epi8): New.
4763         * config/i386/i386-builtin-types.def (VOID_FTYPE_PV64QI_V64QI_UDI,
4764         VOID_FTYPE_PV32HI_V32HI_USI, VOID_FTYPE_PV32QI_V32QI_USI,
4765         VOID_FTYPE_PV16QI_V16QI_UHI, VOID_FTYPE_PV16HI_V16HI_UHI,
4766         VOID_FTYPE_PV8HI_V8HI_UQI): New types.
4767         * config/i386/i386-builtin.def (__builtin_ia32_compressqi512_mask,
4768         __builtin_ia32_compresshi512_mask, __builtin_ia32_compressqi256_mask,
4769         __builtin_ia32_compressqi128_mask, __builtin_ia32_compresshi256_mask,
4770         __builtin_ia32_compresshi128_mask,
4771         __builtin_ia32_compressstoreuqi512_mask,
4772         __builtin_ia32_compressstoreuhi512_mask,
4773         __builtin_ia32_compressstoreuqi256_mask,
4774         __builtin_ia32_compressstoreuqi128_mask,
4775         __builtin_ia32_compressstoreuhi256_mask,
4776         __builtin_ia32_compressstoreuhi128_mask): New builtins.
4777         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Create special args
4778         array for flags2.
4779         (ix86_expand_special_args_builtin): Handle new types.
4780         (s4fma_expand): Handle new builtin array.
4781         * config/i386/immintrin.h: Include new headers.
4782         * config/i386/sse.md (VI12_AVX512VLBW): New iterator.
4783         (compress<mode>_mask, compressstore<mode>_mask): New patterns.
4784
4785 2017-11-23  Jakub Jelinek  <jakub@redhat.com>
4786
4787         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Formatting
4788         fixes.  Declare temp and g variables at the top in order to avoid
4789         {} in most of the cases.
4790
4791 2017-11-23  Marc Glisse  <marc.glisse@inria.fr>
4792
4793         * match.pd (ptr-0): New transformation.
4794
4795 2017-11-23  Charles Baylis  <charles.baylis@linaro.org>
4796
4797         * config/arm/arm-protos.h (enum arm_addr_mode_op): New.
4798         (struct addr_mode_cost_table): New.
4799         (struct tune_params): Add field addr_mode_costs.
4800         * config/arm/arm.c (generic_addr_mode_costs): New.
4801         (arm_slowmul_tune): Initialise addr_mode_costs field.
4802         (arm_fastmul_tune): Likewise.
4803         (arm_strongarm_tune): Likewise.
4804         (arm_xscale_tune): Likewise.
4805         (arm_9e_tune): Likewise.
4806         (arm_marvell_pj4_tune): Likewise.
4807         (arm_v6t2_tune): Likewise.
4808         (arm_cortex_tune): Likewise.
4809         (arm_cortex_a8_tune): Likewise.
4810         (arm_cortex_a7_tune): Likewise.
4811         (arm_cortex_a15_tune): Likewise.
4812         (arm_cortex_a35_tune): Likewise.
4813         (arm_cortex_a53_tune): Likewise.
4814         (arm_cortex_a57_tune): Likewise.
4815         (arm_exynosm1_tune): Likewise.
4816         (arm_xgene1_tune): Likewise.
4817         (arm_cortex_a5_tune): Likewise.
4818         (arm_cortex_a9_tune): Likewise.
4819         (arm_cortex_a12_tune): Likewise.
4820         (arm_cortex_a73_tune): Likewise.
4821         (arm_v7m_tune): Likewise.
4822         (arm_cortex_m7_tune): Likewise.
4823         (arm_v6m_tune): Likewise.
4824         (arm_fa726te_tune): Likewise.
4825         (arm_mem_costs): Use table lookup to calculate cost of addressing mode.
4826
4827 2017-11-23  Charles Baylis  <charles.baylis@linaro.org>
4828
4829         * config/arm/arm.c (arm_mem_costs): New function.
4830         (arm_rtx_costs_internal): Use arm_mem_costs.
4831
4832 2017-11-23  Mark Wielaard  <mark@klomp.org>
4833
4834         * dwarf2out.c (init_sections_and_labels): Use generation to create
4835         unique ranges_section_label and ranges_base_label. Return generation.
4836         (output_rnglists): Add generation argument. Use generation to create
4837         unique ranges labels.
4838         (dwarf2out_finish): Get generation from init_sections_and_labels
4839         and pass generation to output_rnglists.
4840
4841 2017-11-23  Mike Stump  <mikestump@comcast.net>
4842             Eric Botcazou  <ebotcazou@adacore.com>
4843
4844         * doc/generic.texi (ANNOTATE_EXPR): Document 3rd operand.
4845         * cfgloop.h (struct loop): Add unroll field.
4846         * function.h (struct function): Add has_unroll bitfield.
4847         * gimplify.c (gimple_boolify) <ANNOTATE_EXPR>: Deal with unroll kind.
4848         (gimplify_expr) <ANNOTATE_EXPR>: Propagate 3rd operand.
4849         * loop-init.c (pass_loop2::gate): Return true if cfun->has_unroll.
4850         (pass_rtl_unroll_loops::gate): Likewise.
4851         * loop-unroll.c (decide_unrolling): Tweak note message.  Skip loops
4852         for which loop->unroll==1.
4853         (decide_unroll_constant_iterations): Use note for consistency and
4854         take loop->unroll into account.  Return early if loop->unroll is set.
4855         Fix thinko in existing test.
4856         (decide_unroll_runtime_iterations): Use note for consistency and
4857         take loop->unroll into account.
4858         (decide_unroll_stupid): Likewise.
4859         * lto-streamer-in.c (input_cfg): Read loop->unroll.
4860         * lto-streamer-out.c (output_cfg): Write loop->unroll.
4861         * tree-cfg.c (replace_loop_annotate_in_block) <annot_expr_unroll_kind>:
4862         New case.
4863         (replace_loop_annotate) <annot_expr_unroll_kind>: Likewise.
4864         (print_loop): Print loop->unroll if set.
4865         * tree-core.h (enum annot_expr_kind): Add annot_expr_unroll_kind.
4866         * tree-inline.c (copy_loops): Copy unroll and set cfun->has_unroll.
4867         * tree-pretty-print.c (dump_generic_node) <annot_expr_unroll_kind>:
4868         New case.
4869         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Bail out if
4870         loop->unroll is set and smaller than the trip count.  Otherwise bypass
4871         entirely the heuristics if loop->unroll is set.  Remove dead note.
4872         Fix off-by-one bug in other note.
4873         (try_peel_loop): Bail out if loop->unroll is set.  Fix formatting.
4874         (tree_unroll_loops_completely_1): Force unrolling if loop->unroll
4875         is greater than 1.
4876         (tree_unroll_loops_completely): Make static.
4877         (pass_complete_unroll::execute): Use correct type for variable.
4878         (pass_complete_unrolli::execute): Fix formatting.
4879         * tree.def (ANNOTATE_EXPR): Add 3rd operand.
4880
4881 2017-11-23  Sergey Shalnov  <Sergey.Shalnov@intel.com>
4882
4883         * config/i386/i386.h (TARGET_PREFER_AVX256): Also
4884         enable when TARGET_PREFER_AVX128 is set.
4885
4886 2017-11-23  Jan Hubicka  <hubicka@ucw.cz>
4887
4888         * ipa-profile.c (ipa_propagate_frequency_1): Use count instead of
4889         frequency.
4890         * cgraph.c (cgraph_edge::dump_edge_flags): Dump sreal frequencies.
4891         (cgraph_edge::maybe_hot_p): Use sreal frequencies.
4892
4893 2017-11-23  Jan Hubicka  <hubicka@ucw.cz>
4894
4895         * ipa-fnsummary.c (record_modified_bb_info): Use sreal
4896         frequencies. Fix estimation of aggregate parameters.
4897
4898 2017-11-23  Jan Hubicka  <hubicka@ucw.cz>
4899
4900         * cgraphclones.c (cgraph_node::create_clone): Fix updating of profile
4901         when inlining.
4902
4903 2017-11-23  Tom de Vries  <tom@codesourcery.com>
4904
4905         * config/sh/sh.h (ASM_OUTPUT_ADDR_VEC_ELT): Wrap in "do {} while (0)".
4906
4907 2017-11-23  Tom de Vries  <tom@codesourcery.com>
4908
4909         * config/ft32/ft32.h (ASM_OUTPUT_ADDR_VEC_ELT): Remove semicolon after
4910         macro.
4911
4912 2017-11-23  Oleg Endo  <olegendo@gcc.gnu.org>
4913
4914         PR target/83111
4915         * config/sh/sh.md (udivsi3, divsi3, sibcall_value_pcrel,
4916         sibcall_value_pcrel_fdpic): Use local variable instead of
4917         operands[3].
4918         (calli_tbr_rel): Add missing operand 2.
4919         (call_valuei_tbr_rel): Add missing operand 3.
4920
4921 2017-11-23  Jakub Jelinek  <jakub@redhat.com>
4922
4923         PR middle-end/82253
4924         * expr.c (expand_assignment): For CONCAT to_rtx, complex type from and
4925         bitpos/bitsize covering the whole destination, use store_expr only if
4926         the complex mode is the same.  Otherwise, use expand_normal and if
4927         it returns CONCAT, subreg each part separately instead of trying to
4928         subreg the whole result.
4929
4930 2017-11-23  Richard Biener  <rguenther@suse.de>
4931
4932         PR tree-optimization/23094
4933         * tree-ssa-sccvn.c (vuse_ssa_val): Handle VN_TOP when we
4934         come here from walking over backedges in the first iteration.
4935         (vn_reference_lookup_3): Skip clobbers that store the same value.
4936
4937 2017-11-23  Richard Biener  <rguenther@suse.de>
4938
4939         PR tree-optimization/81403
4940         * tree-ssa-pre.c (get_representative_for): Add parameter specifying
4941         a block we need a leader relative to.
4942         (phi_translate_1): For nary processing require a leader from
4943         get_representative_for given we run expression simplification
4944         using match-and-simplify.  Remove previous fix.
4945
4946 2017-11-22  Jeff Law  <law@redhat.com>
4947
4948         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
4949         Use new method allocate_value_range rather than accessing the
4950         vrp_value_range_pool data member directly.
4951         * tree-vrp.c (simplify_stmt_for_jump_threading): Tweak slightly
4952         to use extract_range_from_stmt method to avoid need for
4953         extract_range_from_assignment method.
4954         (vrp_prop::vrp_finalize): Use set_lattice_propagation_complete
4955         method rather than setting values_propgated data member directly.
4956         * vr-values.h (class vr_values): Privatize vrp_value_range_pool,
4957         and values propagated data members and extract_range_from_assignment
4958         method.  Reorder private data members to conform to standards.
4959         Add new methods set_lattice_propagation_complete and
4960         allocate_value_range.
4961
4962 2017-11-22  Eric Botcazou  <ebotcazou@adacore.com>
4963
4964         PR rtl-optimization/83030
4965         * doc/rtl.texi (Flags in an RTL Expression): Alphabetize, add entry
4966         for CROSSING_JUMP_P and mention usage of 'jump' for JUMP_INSNs.
4967         (Insns): Delete entry for REG_CROSSING_JUMP in register notes.
4968         * bb-reorder.c (update_crossing_jump_flags): Do not test whether the
4969         CROSSING_JUMP_P flag is already set before setting it.
4970         * cfgrtl.c (fixup_partition_crossing): Likewise.
4971         * reorg.c (relax_delay_slots): Do not consider a CROSSING_JUMP_P
4972         insn as useless.
4973
4974 2017-11-22  Jakub Jelinek  <jakub@redhat.com>
4975
4976         * simplify-rtx.c (simplify_binary_operation_1) <case VEC_SERIES>:
4977         Handle the case where both arguments are using gen_const_vec_series.
4978
4979 2017-11-22  David Malcolm  <dmalcolm@redhat.com>
4980
4981         PR c++/62170
4982         * pretty-print.c (pp_format): Move quoting implementation to
4983         pp_begin_quote and pp_end_quote.  Update pp_format_decoder call
4984         to pass address of "quote" local.
4985         (pp_begin_quote): New function.
4986         (pp_end_quote): New function.
4987         * pretty-print.h (printer_fn): Convert penultimate param from bool
4988         to bool *.
4989         (pp_begin_quote): New decl.
4990         (pp_end_quote): New decl.
4991         * tree-diagnostic.c (default_tree_printer): Convert penultimate
4992         param from bool to bool *.
4993         * tree-diagnostic.h (default_tree_printer): Likewise.
4994
4995 2017-11-22  Jeff Law  <law@redhat.com>
4996
4997         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::evrp_range_analyzer)
4998         Initialize vr_values.
4999         (evrp_range_analyzer::try_find_new_range): Call methods attached to
5000         vr_values via vr_values class instance rather than delegators.
5001         (evrp_range_analyzer::record_ranges_from_phis): Likewise.
5002         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
5003         (evrp_range_analyzer::push_value_range): Likewise.
5004         (evrp_range_analyzer::pop_value_range): Likewise.
5005         * gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Remove
5006         most delegators.  Those remaining are exposed as public interfaces.
5007         Make vr_values a pointer and private.
5008         (evrp_range_analyzer::~evrp_range_analyzer): Delete the attached
5009         vr_values.
5010         (evrp_range_analyzer::get_vr_value): New method.
5011         * gimple-ssa-evrp.c (class evrp_folder): Use DISABLE_COPY_AND_ASSIGN.
5012         (evrp_folder::evrp_folder): New ctor to initialize vr_values.
5013         (class evrp_dom_walker): Attach evrp_folder class, initialize
5014         it in the ctor.  Remove temporary delegators.
5015         (evrp_dom_walker::before_dom_children): Call methods in attached
5016         evrp_range_analyzer class via class instance pointer.  Use
5017         free value_range_constant_singleton to remove need for
5018         op_with_constant_singleton_value delegator method.  Do not
5019         create a vrp_prop class instance for every call!  Narrow
5020         scope of a couple variables.
5021         (evrp_dom_walker::cleanup): Call methods in attached
5022         evrp_range_analyzer class via class instance pointer.
5023         * vr-values.h (class vr_values): Privatize many methods and
5024         data members.
5025
5026 2017-11-22  Richard Sandiford  <richard.sandiford@linaro.org>
5027
5028         * tree.def (REDUC_MAX_EXPR, REDUC_MIN_EXPR, REDUC_PLUS_EXPR): Delete.
5029         * cfgexpand.c (expand_debug_expr): Remove handling for them.
5030         * expr.c (expand_expr_real_2): Likewise.
5031         * fold-const.c (const_unop): Likewise.
5032         * optabs-tree.c (optab_for_tree_code): Likewise.
5033         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5034         * tree-inline.c (estimate_operator_cost): Likewise.
5035         * tree-pretty-print.c (dump_generic_node): Likewise.
5036         (op_code_prio): Likewise.
5037         (op_symbol_code): Likewise.
5038         * internal-fn.def (DEF_INTERNAL_SIGNED_OPTAB_FN): Define.
5039         (IFN_REDUC_PLUS, IFN_REDUC_MAX, IFN_REDUC_MIN): New internal functions.
5040         * internal-fn.c (direct_internal_fn_optab): New function.
5041         (direct_internal_fn_array, direct_internal_fn_supported_p
5042         (internal_fn_expanders): Handle DEF_INTERNAL_SIGNED_OPTAB_FN.
5043         * fold-const-call.c (fold_const_reduction): New function.
5044         (fold_const_call): Handle CFN_REDUC_PLUS, CFN_REDUC_MAX and
5045         CFN_REDUC_MIN.
5046         * tree-vect-loop.c: Include internal-fn.h.
5047         (reduction_code_for_scalar_code): Rename to...
5048         (reduction_fn_for_scalar_code): ...this and return an internal
5049         function.
5050         (vect_model_reduction_cost): Take an internal_fn rather than
5051         a tree_code.
5052         (vect_create_epilog_for_reduction): Likewise.  Build calls rather
5053         than assignments.
5054         (vectorizable_reduction): Use internal functions rather than tree
5055         codes for the reduction operation.  Update calls to the functions
5056         above.
5057         * config/aarch64/aarch64-builtins.c (aarch64_gimple_fold_builtin):
5058         Use calls to internal functions rather than REDUC tree codes.
5059         * config/aarch64/aarch64-simd.md: Update comment accordingly.
5060
5061 2017-11-22  Olivier Hainque  <hainque@adacore.com>
5062
5063         * config/vxworks.c (vxworks_override_options): Pick default
5064         dwarf version from macro value, VXWORKS_DWARF_VERSION_DEFAULT.
5065         * config/vxworks.h: Define VXWORKS_DWARF_VERSION_DEFAULT and
5066         DWARF_GNAT_ENCODINGS_DEFAULT.
5067         * config/vxworksae.h: Likewise.
5068
5069 2017-11-22  Marc Glisse  <marc.glisse@inria.fr>
5070
5071         PR tree-optimization/83104
5072         * vr-values.c (simplify_stmt_using_ranges): Check integral argument,
5073         not result.
5074
5075 2017-11-22  Marek Polacek  <polacek@redhat.com>
5076             H.J. Lu  <hongjiu.lu@intel.com>
5077             Jason Merrill  <jason@redhat.com>
5078
5079         PR c++/60336
5080         PR middle-end/67239
5081         PR target/68355
5082         * calls.c (initialize_argument_information): Call
5083         warn_parameter_passing_abi target hook.
5084         (store_one_arg): Use 0 for empty record size.  Don't push 0 size
5085         argument onto stack.
5086         (must_pass_in_stack_var_size_or_pad): Return false for empty types.
5087         * common.opt: Update -fabi-version description.
5088         * config/i386/i386.c (init_cumulative_args): Set cum->warn_empty.
5089         (ix86_gimplify_va_arg): Call arg_int_size_in_bytes instead of
5090         int_size_in_bytes.
5091         (ix86_is_empty_record): New function.
5092         (ix86_warn_parameter_passing_abi): New function.
5093         (TARGET_EMPTY_RECORD_P): Redefine.
5094         (TARGET_WARN_PARAMETER_PASSING_ABI): Redefine.
5095         * config/i386/i386.h (CUMULATIVE_ARGS): Add warn_empty.
5096         * doc/tm.texi: Regenerated.
5097         * doc/tm.texi.in (TARGET_EMPTY_RECORD_P,
5098         TARGET_WARN_PARAMETER_PASSING_ABI): Add.
5099         * dwarf2out.c (get_ultimate_context): Move to tree.c.
5100         * explow.c (hard_function_value): Call arg_int_size_in_bytes
5101         instead of int_size_in_bytes.
5102         * expr.c (copy_blkmode_to_reg): Likewise.
5103         * function.c (aggregate_value_p): Return 0 for empty types.
5104         (assign_parm_find_entry_rtl): Call warn_parameter_passing_abi
5105         target hook.
5106         (locate_and_pad_parm): Call arg size_in_bytes instead
5107         size_in_bytes.
5108         * lto-streamer-out.c (hash_tree): Hash TYPE_EMPTY_P and DECL_PADDING_P.
5109         * stor-layout.c (finalize_type_size): Set TYPE_EMPTY_P.
5110         * target.def (empty_record_p, warn_parameter_passing_abi): New target
5111         hooks.
5112         * targhooks.c (hook_void_CUMULATIVE_ARGS_tree): New hook.
5113         (std_gimplify_va_arg_expr): Skip empty records.  Call
5114         arg_size_in_bytes instead size_in_bytes.
5115         * targhooks.h (hook_void_CUMULATIVE_ARGS_tree): Declare.
5116         * tree-core.h (tree_type_common): Add empty_flag.
5117         (tree_decl_common): Update comments.
5118         * tree-streamer-in.c (unpack_ts_decl_common_value_fields): Stream
5119         DECL_PADDING_P.
5120         (unpack_ts_type_common_value_fields): Stream TYPE_EMPTY_P.
5121         * tree-streamer-out.c (pack_ts_decl_common_value_fields): Stream
5122         DECL_PADDING_P.
5123         (pack_ts_type_common_value_fields): Stream TYPE_EMPTY_P.
5124         * tree.c (default_is_empty_type): New function.
5125         (default_is_empty_record): New function.
5126         (arg_int_size_in_bytes): New function.
5127         (arg_size_in_bytes): New function.
5128         (get_ultimate_context): New function.
5129         * tree.h: Define TYPE_EMPTY_P, DECL_PADDING_P and
5130         TRANSLATION_UNIT_WARN_EMPTY_P.
5131         (default_is_empty_record, arg_int_size_in_bytes,
5132         arg_size_in_bytes, get_ultimate_context): Declare.
5133
5134 2017-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
5135
5136         * config/arm/arm.c (cmse_clear_registers): New function.
5137         (cmse_nonsecure_call_clear_caller_saved): Replace register clearing
5138         code by call to cmse_clear_registers.
5139         (cmse_nonsecure_entry_clear_before_return): Likewise.
5140
5141 2017-11-22  Tamar Christina  <tamar.christina@arm.com>
5142
5143         * config/arm/arm_neon.h (vdot_u32, vdotq_u32)
5144         (vdot_s32, vdotq_s32): New.
5145         (vdot_lane_u32, vdotq_lane_u32): New.
5146         (vdot_lane_s32, vdotq_lane_s32): New.
5147
5148
5149 2017-11-22  Richard Sandiford  <richard.sandiford@linaro.org>
5150
5151         PR middle-end/82547
5152         * wide-int.cc (wi::add_large, wi::sub_large): Fix overflow detection
5153         for unsigned values with fewer HWIs than the precision.
5154         (test_overflow): New function.
5155         (wide_int_cc_tests): Call it.
5156
5157 2017-11-22  Richard Sandiford  <richard.sandiford@linaro.org>
5158
5159         * emit-rtl.c (init_derived_machine_modes): Make sure ptr_mode
5160         has the same mode class as Pmode.
5161
5162 2017-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
5163
5164         * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Get rid of
5165         padding_bits_to_clear_ptr.
5166         (cmse_nonsecure_entry_clear_before_return): Likewise.
5167
5168 2017-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
5169
5170         * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Use
5171         auto_sbitap instead of integer bitfield to control register needing
5172         clearing.
5173
5174 2017-11-22  Jakub Jelinek  <jakub@redhat.com>
5175
5176         PR tree-optimization/83044
5177         * tree-vrp.c (vrp_prop::check_array_ref): If eltsize is not
5178         INTEGER_CST or is 0, clear up_bound{,_p1} and later ignore tests
5179         that need the upper bound.  Subtract offset from
5180         get_addr_base_and_unit_offset only if positive and subtract it
5181         before division by eltsize rather than after it.
5182
5183         PR debug/83084
5184         * valtrack.c (propagate_for_debug_subst, propagate_for_debug): Reset
5185         debug insns if they would contain UNSPEC_VOLATILE or volatile asm.
5186         (dead_debug_insert_temp): Likewise, but also ignore even non-volatile
5187         asm.
5188
5189         PR middle-end/82875
5190         * optabs.c (expand_doubleword_mult, expand_binop): Before calling
5191         expand_binop with *mul_widen_optab, make sure at least one of the
5192         operands doesn't have VOIDmode.
5193
5194         PR debug/83034
5195         * dwarf2out.c (mem_loc_descriptor): Handle VEC_SERIES.
5196
5197         PR rtl-optimization/82044
5198         PR tree-optimization/82042
5199         * dse.c (record_store): Check for overflow.
5200         (check_mem_read_rtx): Properly check for overflow if width == -1, call
5201         add_wild_read instead of clear_rhs_from_active_local_stores on
5202         overflow and log it into dump_file.
5203
5204 2017-11-22  Richard Biener  <rguenther@suse.de>
5205
5206         * gimple-iterator.c (gimple_find_edge_insert_loc): Ignore
5207         fake edges to exit when looking for a place to insert.
5208         * tree-ssa-pre.c (clear_expression_ids): Inline into callers
5209         and remove.
5210         (insert_into_preds_of_block): Commit edge insertion immediately,
5211         assert that doesn't require new BBs.
5212         (fini_pre): Release expressions.
5213         (pass_pre::execute): Shuffle things around a bit, if the fn
5214         is too large do not compute AVAIL either as this is really the
5215         quadratic bit.
5216
5217 2017-11-22  Richard Biener  <rguenther@suse.de>
5218
5219         PR tree-optimization/83089
5220         * tree-if-conv.c (pass_if_conversion::execute): If anything
5221         changed reset SCEV and free the number of iteration estimates.
5222
5223 2017-11-21  Martin Sebor  <msebor@redhat.com>
5224
5225         PR tree-optimization/82945
5226         * calls.h (warn_nonstring_bound): Remove unused function.
5227
5228 2017-11-21  Martin Sebor  <msebor@redhat.com>
5229
5230         PR tree-optimization/82945
5231         * builtins.c (expand_builtin_strlen): Call maybe_warn_nonstring_arg.
5232         * calls.h (maybe_warn_nonstring_arg): Declare new function.
5233         * calls.c (get_attr_nonstring_decl, maybe_warn_nonstring_arg): New
5234         functions.
5235         (initialize_argument_information): Call maybe_warn_nonstring_arg.
5236         * calls.h (get_attr_nonstring_decl): Declare new function.
5237         * doc/extend.texi (attribute nonstring): Update.
5238         * gimple-fold.c (gimple_fold_builtin_strncpy): Call
5239         get_attr_nonstring_decl and handle it.
5240         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Same.  Improve
5241         detection of nul-termination.
5242         (strlen_to_stridx): Change to a pointer.
5243         (handle_builtin_strlen, handle_builtin_stxncpy): Adjust.
5244         (pass_strlen::execute): Same.
5245
5246 2017-11-21  Sergey Shalnov  <Sergey.Shalnov@intel.com>
5247
5248         * config/i386/i386-opts.h (enum prefer_vector_width): Added new enum
5249         for the new option -mprefer-vector-width=[none|128|256|512].
5250         * config/i386/i386.c (ix86_target_string): remove old style options
5251         -mprefer-avx256 and make -mprefer-avx128 as alias.
5252         (ix86_option_override_internal):  Apply defaults for the
5253         -mprefer-vector-width=[128|256] option.
5254         * config/i386/i386.h (TARGET_PREFER_AVX128, TARGET_PREFER_AVX256):
5255         Implement macros to work with -mprefer-vector-width=.
5256         * config/i386/i386.opt: Implemented option
5257         -mprefer-vector-width=[none|128|256|512].
5258         * doc/invoke.texi: Documentation for
5259         -mprefer-vector-width=[none|128|256|512].
5260
5261 2017-11-21  Pat Haugen  <pthaugen@us.ibm.com>
5262
5263         * config/rs6000/ppc-asm.h (f50, vs50): Fix values.
5264
5265 2017-11-21  Jonathan Wakely  <jwakely@redhat.com>
5266
5267         * doc/invoke.texi (-Wmaybe-uninitialized): Rephrase for clarity.
5268
5269 2017-11-21  Marc Glisse  <marc.glisse@inria.fr>
5270
5271         * doc/generic.texi: Document POINTER_DIFF_EXPR, update
5272         POINTER_PLUS_EXPR.
5273         * cfgexpand.c (expand_debug_expr): Handle POINTER_DIFF_EXPR.
5274         * expr.c (expand_expr_real_2): Likewise.
5275         * fold-const.c (const_binop, fold_addr_of_array_ref_difference,
5276         fold_binary_loc): Likewise.
5277         * match.pd (X-X, P+(Q-P), &D-P, (P+N)-P, P-(P+N), (P+M)-(P+N),
5278         P-Q==0, -(A-B), X-Z<Y-Z, (X-Z)-(Y-Z), Z-X<Z-Y, (Z-X)-(Z-Y),
5279         (A-B)+(C-A)): New transformations for POINTER_DIFF_EXPR, based on
5280         MINUS_EXPR transformations.
5281         * optabs-tree.c (optab_for_tree_code): Handle POINTER_DIFF_EXPR.
5282         * tree-cfg.c (verify_expr, verify_gimple_assign_binary): Likewise.
5283         * tree-inline.c (estimate_operator_cost): Likewise.
5284         * tree-pretty-print.c (dump_generic_node, op_code_prio,
5285         op_symbol_code): Likewise.
5286         * tree-vect-stmts.c (vectorizable_operation): Likewise.
5287         * vr-values.c (extract_range_from_binary_expr): Likewise.
5288         * varasm.c (initializer_constant_valid_p_1): Likewise.
5289         * tree.def: New tree code POINTER_DIFF_EXPR.
5290
5291 2017-11-21  Uros Bizjak  <ubizjak@gmail.com>
5292
5293         * config/i386/i386.md (*bswap<mode>2_movbe): Add
5294         integer suffix to movbe mnemonic.
5295         (*bswaphi2_movbe): Ditto.
5296         (bswaphi_lowpart): Merge with *bswaphi_lowpart_1.
5297
5298 2017-11-21  Jakub Jelinek  <jakub@redhat.com>
5299
5300         PR c++/83045
5301         * tree-cfg.c (pass_warn_function_return::execute): Formatting fix.
5302         Also warn if seen __builtin_unreachable () call with BUILTINS_LOCATION.
5303         Use LOCATION_LOCUS when comparing against UNKNOWN_LOCATION.
5304
5305 2017-11-21  Martin Liska  <mliska@suse.cz>
5306
5307         * tree-inline.c (expand_call_inline): Remove not needed
5308         xstrdup_for_dump.
5309
5310 2017-11-21  James Cowgill  <James.Cowgill@imgtec.com>
5311             Jakub Jelinek  <jakub@redhat.com>
5312
5313         PR target/82880
5314         * config/mips/frame-header-opt.c (mips_register_frame_header_opt):
5315         Remove static keyword from f variable.
5316
5317 2017-11-21  Jakub Jelinek  <jakub@redhat.com>
5318
5319         PR tree-optimization/83086
5320         * gimple-ssa-store-merging.c
5321         (imm_store_chain_info::try_coalesce_bswap): Test this_n.base_addr
5322         rather than n.base_addr.
5323
5324 2017-11-21  Martin Liska  <mliska@suse.cz>
5325
5326         PR rtl-optimization/82044
5327         PR tree-optimization/82042
5328         * dse.c (check_mem_read_rtx): Check for overflow.
5329
5330 2017-11-21  Aldy Hernandez  <aldyh@redhat.com>
5331
5332         * tree-ssa-threadbackward.c (find_jump_threads_backwards): Fix
5333         typo in comment.
5334
5335 2017-11-21  Claudiu Zissulescu  <claziss@synopsys.com>
5336
5337         * cfgrtl.c (force_nonfallthru_and_redirect): Don't split a call
5338         and its corresponding call arg location note.
5339
5340 2017-11-21  Claudiu Zissulescu  <claziss@synopsys.com>
5341             Andrew Burgess  <andrew.burgess@embecosm.com>
5342
5343         * config/arc/arc-protos.h (arc_compute_frame_size): Delete
5344         declaration.
5345         (arc_return_slot_offset): Likewise.
5346         (arc_eh_return_address_location): New declaration.
5347         * config/arc/arc.c (TARGET_BUILTIN_SETJMP_FRAME_VALUE): Define.
5348         (MUST_SAVE_REGISTER): Add exception handler case.
5349         (MUST_SAVE_RETURN_ADDR): Likewise.
5350         (arc_frame_pointer_required): Likewise.
5351         (arc_frame_pointer_needed): New function.
5352         (arc_compute_frame_size): Changed.
5353         (arc_expand_prologue): Likewise.
5354         (arc_expand_epilogue): Likewise.
5355         (arc_initial_elimination_offset): Likewise.
5356         (arc_return_slot_offset): Delete.
5357         (arc_eh_return_address_location): New function.
5358         (arc_builtin_setjmp_frame_value): Likewise.
5359         * config/arc/arc.h (EH_RETURN_DATA_REGNO): Use 2 registers.
5360         (EH_RETURN_STACKADJ_RTX): Define.
5361         (EH_RETURN_HANDLER_RTX): Likewise.
5362         * config/arc/arc.md (eh_return): Delete.
5363
5364 2017-11-21  Aldy Hernandez  <aldyh@redhat.com>
5365
5366         * print-tree.h (debug_vec_tree): Remove prototype.
5367         * gdbinit.in (pvt): Remove macro.
5368
5369 2017-11-21  Jakub Jelinek  <jakub@redhat.com>
5370
5371         PR tree-optimization/83047
5372         * gimple-ssa-store-merging.c
5373         (imm_store_chain_info::output_merged_store): If the loads with the
5374         same vuse are in different basic blocks, for load_gsi pick a load
5375         location that is dominated by the other loads.
5376
5377         PR c++/83059
5378         * config/i386/i386.c (ix86_memmodel_check): Start
5379         -Winvalid-memory-model diagnostics with lowercase letter.
5380
5381         PR debug/82718
5382         * dwarf2out.c (dw_loc_list): If crtl->has_bb_partition, temporarily
5383         set in_cold_section_p to the partition containing loc_list->first.
5384         When seeing loc_list->last_before_switch node, update secname and
5385         perform range_across_switch second partition handling only after that.
5386
5387         PR debug/82933
5388         * run-rtl-passes.c: Include debug.h.
5389         (run_rtl_passes): Call debug_hooks->assembly_start.
5390         * dwarf2out.c (dwarf2out_assembly_start): Return early if invoked
5391         multiple times.
5392
5393         PR target/82981
5394         * internal-fn.c (expand_mul_overflow): Use OPTAB_WIDEN instead of
5395         OPTAB_DIRECT in calls to expand_simple_binop.
5396
5397 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
5398
5399         PR c/81404
5400         * Makefile.in (C_COMMON_OBJS): Add c-family/known-headers.o.
5401
5402 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
5403
5404         PR c++/72786
5405         * spellcheck.h (best_match::blithely_get_best_candidate): New
5406         accessor.
5407
5408 2017-11-20  Jakub Jelinek  <jakub@redhat.com>
5409
5410         * config/i386/i386.c (parse_mtune_ctrl_str): Start diagnostics
5411         with lower case letter.
5412
5413 2017-11-20  Uros Bizjak  <ubizjak@gmail.com>
5414
5415         * config/i386/i386.md (bswaphi2): New expander.
5416         (*bswaphi2_movbe): New insn pattern.
5417         (bswaphi -> rorhi pepehole2): New peephole pattern.
5418
5419 2017-11-20  Jeff Law  <law@redhat.com>
5420
5421         * Makefile.in (OBJS): Add gimple-ssa-evrp-analyze.o.
5422         * gimple-ssa-evrp-analyze.c: New file pulled from gimple-ssa-evrp.c.
5423         * gimple-ssa-evrp-analyze.h: New file pulled from gimple-ssa-evrp.c.
5424         * gimple-ssa-evrp.c: Remove bits moved into new files.  Include
5425         gimple-ssa-evrp-analyze.h.
5426
5427         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Do not
5428         set BB_VISITED here.
5429         (evrp_range_analyzer::enter): Set BB_VISITED here instead.
5430
5431 2017-11-20  Bin Cheng  <bin.cheng@arm.com>
5432
5433         * tree-predcom.c: Add general comment on Store-Store chains.
5434         (split_data_refs_to_components): Postpone clearing eliminate_store_p
5435         flag in component.
5436         (get_chain_last_ref_at): Rename into...
5437         (get_chain_last_write_at): ...this.
5438         (get_chain_last_write_before_load): New function.
5439         (add_ref_to_chain): Promote type of chain from CT_STORE_LOAD to
5440         CT_STORE_STORE when write reference is added.
5441         (determine_roots_comp): Support load ref in CT_STORE_STORE chains.
5442         (is_inv_store_elimination_chain): Update get_chain_last_write_at call.
5443         (initialize_root_vars_store_elim_1): Ditto.
5444         (initialize_root_vars_store_elim_2): Ditto.  Replace rhs once default
5445         definition is created.
5446         (execute_pred_commoning_chain): Support load ref in CT_STORE_STORE
5447         chain by replacing it with dominant stored value.
5448
5449 2017-11-20  Bin Cheng  <bin.cheng@arm.com>
5450
5451         * tree-predcom.c (add_ref_to_chain): Remove check on distance.
5452
5453 2017-11-20  Marc Glisse  <marc.glisse@inria.fr>
5454
5455         * vr-values.c (extract_range_from_binary_expr): Use a full range
5456         for VR_VARYING.
5457
5458 2017-11-20  Thomas Preud'homme  <thomas.preudhomme@arm.com>
5459
5460         * config/arm/arm.md (R4_REGNUM): Define constant.
5461         (nonsecure_call_internal): Remove r4 clobber.
5462         (nonsecure_call_value_internal): Likewise.
5463         * config/arm/thumb1.md (nonsecure_call_reg_thumb1_v5): Remove second
5464         clobber and resequence match_operands.
5465         (nonsecure_call_value_reg_thumb1_v5): Likewise.
5466         * config/arm/thumb2.md (nonsecure_call_reg_thumb2): Likewise.
5467         (nonsecure_call_value_reg_thumb2): Likewise.
5468
5469 2017-11-20  Jakub Jelinek  <jakub@redhat.com>
5470
5471         PR tree-optimization/78821
5472         * gimple-ssa-store-merging.c (find_bswap_or_nop_load): Give up
5473         if base is TARGET_MEM_REF.  If base is not MEM_REF, set base_addr
5474         to the address of the base rather than the base itself.
5475         (find_bswap_or_nop_1): Just use pointer comparison for vuse check.
5476         (find_bswap_or_nop_finalize): New function.
5477         (find_bswap_or_nop): Use it.
5478         (bswap_replace): Return a tree rather than bool, change first
5479         argument from gimple * to gimple_stmt_iterator, allow inserting
5480         into an empty sequence, allow ins_stmt to be NULL - then emit
5481         all stmts into gsi.  Fix up MEM_REF address gimplification.
5482         (pass_optimize_bswap::execute): Adjust bswap_replace caller.
5483         (struct store_immediate_info): Add N and INS_STMT non-static
5484         data members.
5485         (store_immediate_info::store_immediate_info): Initialize them
5486         from newly added ctor args.
5487         (merged_store_group::apply_stores): Formatting fixes.  Sort by
5488         bitpos at the end.
5489         (stmts_may_clobber_ref_p): For stores call also
5490         refs_anti_dependent_p.
5491         (gather_bswap_load_refs): New function.
5492         (imm_store_chain_info::try_coalesce_bswap): New method.
5493         (imm_store_chain_info::coalesce_immediate_stores): Use it.
5494         (split_group): Handle LROTATE_EXPR and NOP_EXPR rhs_code specially.
5495         (imm_store_chain_info::output_merged_store): Fail if number of
5496         new estimated stmts is bigger or equal than old.  Handle LROTATE_EXPR
5497         and NOP_EXPR rhs_code.
5498         (pass_store_merging::process_store): Compute n and ins_stmt, if
5499         ins_stmt is non-NULL and the store rhs is otherwise invalid, use
5500         LROTATE_EXPR rhs_code.  Pass n and ins_stmt to store_immediate_info
5501         ctor.
5502         (pass_store_merging::execute): Calculate dominators.
5503
5504         * tree-ssa-math-opts.c (nop_stats, bswap_stats, struct symbolic_number,
5505         BITS_PER_MARKER, MARKER_MASK, MARKER_BYTE_UNKNOWN, HEAD_MARKER, CMPNOP,
5506         CMPXCHG, do_shift_rotate, verify_symbolic_number_p,
5507         init_symbolic_number, find_bswap_or_nop_load, perform_symbolic_merge,
5508         find_bswap_or_nop_1, find_bswap_or_nop, pass_data_optimize_bswap,
5509         class pass_optimize_bswap, bswap_replace,
5510         pass_optimize_bswap::execute): Moved to ...
5511         * gimple-ssa-store-merging.c: ... this file.
5512         Include optabs-tree.h.
5513         (nop_stats, bswap_stats, do_shift_rotate, verify_symbolic_number_p,
5514         init_symbolic_number, find_bswap_or_nop_load, perform_symbolic_merge,
5515         find_bswap_or_nop_1, find_bswap_or_nop, bswap_replace): Put into
5516         anonymous namespace, remove static keywords.
5517         (pass_optimize_bswap::gate): Test BITS_PER_UNIT == 8 here...
5518         (pass_optimize_bswap::execute): ... rather than here.  Formatting fix.
5519
5520 2017-11-20  Jan Hubicka  <hubicka@ucw.cz>
5521
5522         PR bootstrap/83062
5523         * ipa-inline.c (can_inline_edge_p): Fix typo in previous patch.
5524
5525 2017-11-20  Aldy Hernandez  <aldyh@redhat.com>
5526
5527         * vec.h (debug_helper): New function.
5528         (DEFINE_DEBUG_VEC): New macro.
5529         * hash-set.h (debug_helper): New function.
5530         (DEFINE_DEBUG_HASH_SET): New macro.
5531         * cfg.c (debug_slim (edge)): New function.
5532         Call DEFINE_DEBUG_VEC for edges.
5533         Call DEFINE_DEBUG_HASH_SET for edges.
5534         * cfghooks.c (debug_slim (basic_block)): New function.
5535         Call DEFINE_DEBUG_VEC for basic blocks.
5536         Call DEFINE_DEBUG_HASH_SET for basic blocks.
5537         * print-tree.c (debug_slim): New function to handle trees.
5538         Call DEFINE_DEBUG_VEC for trees.
5539         Call DEFINE_DEBUG_HASH_SET for trees.
5540         (debug (vec<tree, va_gc>) &): Remove.
5541         (debug (<vec<tree, va_gc>) *): Remove.
5542         * print-rtl.c (debug_slim): New function to handle const_rtx.
5543         Call DEFINE_DEBUG_VEC for rtx_def.
5544         Call DEFINE_DEBUG_VEC for rtx_insn.
5545         Call DEFINE_DEBUG_HASH_SET for rtx_def.
5546         Call DEFINE_DEBUG_HASH_SET for rtx_insn.
5547         * sel-sched-dump.c (debug (vec<rtx_insn *> &): Remove.
5548         (debug (vec<rtx_insn *> *ptr): Remove.
5549         (debug_insn_vector): Remove.
5550         * stor-layout.c (debug_rli): Call debug() instead of debug_vec_tree.
5551
5552 2017-11-20  Tom de Vries  <tom@codesourcery.com>
5553
5554         PR rtl-optimization/82020
5555         * simplify-rtx.c (simplify_ternary_operation): Fix comparison mode of
5556         IF_THEN_ELSE condition.
5557
5558 2017-11-19  Jeff Law  <law@redhat.com>
5559
5560         * tree-ssa-dom.c (record_equivalences_from_phis): Fix handling
5561         of degenerates resulting from ignoring an edge.
5562
5563 2017-11-19  Jan Hubicka  <hubicka@ucw.cz>
5564
5565         PR ipa/81360
5566         * ipa-inline.c (can_inline_edge_p): Also check that caller is optimized
5567
5568 2017-11-19  Jan Hubicka  <hubicka@ucw.cz>
5569
5570         PR ipa/83001
5571         * profile-count.c (profile_count::to_sreal_scale): Fix return value
5572         for uninitialied counts.
5573
5574 2017-11-19  Jan Hubicka  <hubicka@ucw.cz>
5575
5576         PR ipa/60243
5577         * tree-inline.c (estimate_num_insns): Set to 1 at least.
5578
5579 2017-11-19  Jan Hubicka  <hubicka@ucw.cz>
5580
5581         PR target/82713
5582         * i386.c (ix86_builtin_vectorization_cost): Be ready for insane types.
5583
5584 2017-11-19  Tom de Vries  <tom@codesourcery.com>
5585
5586         * config/arc/arc.h (FUNCTION_PROFILER): Remove semicolon after
5587         "do while (0)".
5588
5589 2017-11-19  Tom de Vries  <tom@codesourcery.com>
5590
5591         * config/phoenix.h (TARGET_OS_CPP_BUILTINS): Remove semicolon after
5592         "do {} while (0)".
5593
5594 2017-11-19  Tom de Vries  <tom@codesourcery.com>
5595
5596         * config/visium/visium.h (ASM_OUTPUT_CASE_END): Remove semicolon after
5597         macro body.
5598
5599 2017-11-19  Tom de Vries  <tom@codesourcery.com>
5600
5601         * config/ft32/ft32.h (REGISTER_TARGET_PRAGMAS): Remove semicolon after
5602         "do {} while (0)".
5603         * config/spu/spu.h (REGISTER_TARGET_PRAGMAS): Same.
5604
5605 2017-11-19  Tom de Vries  <tom@codesourcery.com>
5606
5607         * config/mcore/mcore-elf.h (MCORE_EXPORT_NAME): Remove semicolon after
5608         "do {} while (0)".
5609         * config/mcore/mcore.h (ASM_OUTPUT_ALIGNED_COMMON): After missing
5610         semicolon after MCORE_EXPORT_NAME call.
5611
5612 2017-11-19  Tom de Vries  <tom@codesourcery.com>
5613
5614         PR target/82961
5615         * vmsdbgout.c (vmsdbgout_early_finish): New function.
5616         (vmsdbg_debug_hooks): Set early_finish field to vmsdbgout_early_finish.
5617
5618 2017-11-18  Jan Hubicka  <hubicka@ucw.cz>
5619
5620         * cgraphclones.c (cgraph_edge::clone): Rename gcov_count to prof_count.
5621         (cgraph_edge::clone): Cleanup updating of profile.
5622         * ipa-cp.c (update_profiling_info): Likewise.
5623         * ipa-inline-transform.c (inline_transform): Likewise.
5624         * ipa-inline.c (inline_small_functions): Add missing space to dump.
5625         * ipa-split.c (execute_split_functions): Do not split when function
5626         is cold.
5627         * predict.c (estimate_bb_frequencies): Cleanup updating of profile.
5628         * profile-count.c (profile_count::dump): Add global0.
5629         (profile_count::to_cgraph_frequency): Do not ICE when entry is
5630         undefined.
5631         (profile_count::to_sreal_scale): Likewise.
5632         (profile_count::adjust_for_ipa_scaling): Fix typo in comment.
5633         (profile_count::combine_with_ipa_count): New function.
5634         * profile-count.h (profile_guessed_global0adjusted): New.
5635         (profile_count::adjusted_zero): New.
5636         (profile_count::global0adjusted): New.
5637         (profile_count::combine_with_ipa_count): New.
5638         * tree-inline.c (copy_edges_for_bb): Add NUM/DEN arugment;
5639         correct profile of return block of split functions.
5640         (copy_cfg_body): Remove unused profile_count.
5641         (copy_body): Likewise.
5642         (expand_call_inline): Update.
5643         (tree_function_versioning): Update.
5644
5645 2017-11-18  Aldy Hernandez  <aldyh@redhat.com>
5646
5647         * hash-set.h (hash_set::empty): New.
5648         * tree-ssa-threadbackward.h: Delete.
5649         * tree-ssa-threadbackward.c (class thread_jumps): New.
5650         Move max_threaded_paths into class.
5651         (fsm_find_thread_path): Remove arguments that are now in class.
5652         (profitable_jump_thread_path): Rename to...
5653         (thread_jumps::profitable_jump_thread_path): ...this.
5654         (convert_and_register_jump_thread_path): Rename to...
5655         (thread_jumps::convert_and_register_current_path): ...this.
5656         (check_subpath_and_update_thread_path): Rename to...
5657         (thread_jumps::check_subpath_and_update_thread_path): ...this.
5658         (register_jump_thread_path_if_profitable): Rename to...
5659         (thread_jumps::register_jump_thread_path_if_profitable): ...this.
5660         (handle_phi): Rename to...
5661         (thread_jumps::handle_phi): ...this.
5662         (handle_assignment): Rename to...
5663         (thread_jumps::handle_assignment): ...this.
5664         (fsm_find_control_statement_thread_paths): Rename to...
5665         (thread_jumps::fsm_find_control_statement_thread_paths): ...this.
5666         (find_jump_threads_backwards): Rename to...
5667         (thread_jumps::find_jump_threads_backwards): ...this.
5668         Initialize path local data.
5669         (pass_thread_jumps::execute): Call find_jump_threads_backwards
5670         from within thread_jumps class.
5671         (pass_early_thread_jumps::execute): Same.
5672
5673 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
5674
5675         * cgraph.c (cgraph_node::dump): Do IPA sanity checking on IPA counts.
5676
5677 2017-11-17  Steve Ellcey  <sellcey@cavium.com>
5678
5679         * config/aarch64/aarch64-simd.md (fnma<mode>4): Move neg operator
5680         to canonical location.
5681
5682 2017-11-17  Steve Ellcey  <sellcey@cavium.com>
5683
5684         PR target/81356
5685         * config/aarch64/aarch64.c (aarch64_use_by_pieces_infrastructure_p):
5686         Remove.
5687         (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): Remove define.
5688
5689 2017-11-17  H.J. Lu  <hongjiu.lu@intel.com>
5690
5691         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Use
5692         rcrt1.o%s/grcrt1.o%s for -static-pie.
5693
5694 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
5695
5696         * i386.c (ix86_multiplication_cost, ix86_division_cost,
5697         ix86_shift_rotate_cost): Break out from ...
5698         (ix86_rtx_costs): ... here.
5699         (ix86_add_stmt_cost): Use rtx cost machinery to compute cost of
5700         vector operations.
5701
5702 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
5703
5704         * predict.c (determine_unlikely_bbs): Set cgraph node count to 0
5705         when entry block was promoted unlikely.
5706         (estimate_bb_frequencies): Increase frequency scale.
5707         * profile-count.h (profile_count): Export precision info.
5708
5709 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
5710
5711         * tree-tailcall.c (eliminate_tail_call): Be more careful about not
5712         disturbin profile of entry block.
5713
5714 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
5715
5716         * ipa-fnsummary.c (estimate_node_size_and_time): Be more tolerant for
5717         roundoff errors.
5718
5719 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
5720
5721         * ipa-cp.c (update_profiling_info): Handle conversion to local profile.
5722         * tree-cfg.c (execute_fixup_cfg): Do fixup same way as inliner does.
5723
5724 2017-11-17  Jeff Law  <law@redhat.com>
5725
5726         * gimple-ssa-evrp.c (class evrp_range_analyzer): New class extracted
5727         from evrp_dom_walker class.  Various methods moved into new class.
5728         (evrp_range_analyzer::evrp_range_analyzer): Constructor for new class.
5729         (evrp_range_analyzer::enter): New method.
5730         (evrp_range_analyzer::leave): New method.
5731         (evrp_dom_walker): Remove delegators no longer needed by this class.
5732         Replace vr_values data member with evrp_range_analyzer
5733
5734         * gimple-ssa-evrp.c (evrp_dom_walker::record_ranges_from_phis): New
5735         method extracted from evrp_dom_walker::before_dom_children.
5736         (evrp_dom_walker::record_ranges_from_stmt): Likewise.
5737         (evrp_dom_walker::record_ranges_from_incoming_edge): Likewise.
5738
5739         * gimple-ssa-evrp.c (evrp_dom_walker): Add cleanup method.
5740         Add private copy constructor and move assignment operators.
5741         Privatize methods and class data where trivially possible.
5742         (evrp_dom_walker::cleanup): New function, extracted from
5743         execute_early_vrp.  Simplify access to class data.
5744
5745         * vr-values.h (get_output_for_vrp): Prototype.
5746         * vr-values.c (get_output_for_vrp): New function extracted from
5747         vrp_visit_assignment_or_call and extract_range_from_stmt.
5748         (vrp_visit_assignment_or_call): Use get_output_for_vrp.  Simplify.
5749
5750 2017-11-17  Luis Machado  <luis.machado@linaro.org>
5751
5752         * config/aarch64/aarch64.c
5753         (qdf24xx_prefetch_tune) <default_opt_level>: Set to -1.
5754         (qdf24xx_tunings) <autoprefetcher_model>: Set to
5755         tune_params::AUTOPREFETCHER_WEAK.
5756
5757 2017-11-17  Tamar Christina  <tamar.christina@arm.com>
5758
5759         PR target/82641
5760         * config/arm/arm.c (arm_valid_target_attribute_rec):
5761         Parse "arch=" and "+<ext>".
5762         (arm_valid_target_attribute_tree): Re-init global options.
5763         (arm_option_override): Make non-static.
5764         (arm_options_perform_arch_sanity_checks): Make errors fatal.
5765         * gcc/config/arm/arm-c.c (__ARM_FEATURE_CMSE): Support undef.
5766         (__ARM_FEATURE_CRC32): Support undef.
5767         * config/arm/arm_acle.h (__ARM_FEATURE_CRC32): Replace with pragma.
5768         * doc/extend.texi (ARM Function Attributes): Add pragma and target.
5769
5770 2017-11-17  David Malcolm  <dmalcolm@redhat.com>
5771
5772         * gdbinit.in (break-on-diagnostic): New command.
5773
5774 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
5775
5776         * config/i386/i386.c (ix86_expand_epilogue): Change simple
5777         return to indirect jump for EH return if control-flow
5778         protection is enabled. Change explicit 'false' argument in
5779         pro_epilogue_adjust_stack with a value of
5780         flag_cf_protection.
5781         * config/i386/i386.md (simple_return_indirect_internal):
5782         Remove SImode restriction to support 64-bit.
5783
5784 2017-11-17  Segher Boessenkool  <segher@kernel.crashing.org>
5785
5786         * combine.c (added_notes_insn): New.
5787         (try_combine): Handle added_notes_insn like added_links_insn.
5788         Rewrite return value code.
5789         (distribute_notes): Set added_notes_insn to the earliest insn we added
5790         a note to.
5791
5792 2017-11-17  Segher Boessenkool  <segher@kernel.crashing.org>
5793
5794         PR rtl-optimization/82621
5795         * combine.c (try_combine): Do not split PARALLELs of two SETs if the
5796         dest of one of those SETs is unused.
5797
5798 2017-11-17  Richard Biener  <rguenther@suse.de>
5799
5800         PR fortran/83017
5801         * tree-core.h (enum annot_expr_kind): Add annot_expr_parallel_kind.
5802         * tree-pretty-print.c (dump_generic_node): Handle
5803         annot_expr_parallel_kind.
5804         * tree-cfg.c (replace_loop_annotate_in_block): Likewise.
5805         * gimplify.c (gimple_boolify): Likewise.
5806
5807 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
5808
5809         * config.gcc (extra_headers): Add cet.h for x86 targets.
5810         * config/i386/cet.h: New file.
5811         * doc/install.texi: Add --enable-cet/--disable-cet.
5812
5813 2017-11-17  Richard Biener  <rguenther@suse.de>
5814
5815         PR tree-optimization/83017
5816         * tree-parloops.c (MIN_PER_THREAD): Use --param parloops-min-per-thread.
5817         (gen_parallel_loop): Properly count iterations.
5818         (parallelize_loops): Handle loop->can_be_parallel independent
5819         of flag_loop_parallelize_all.  Make static profitability test match
5820         the runtime one.
5821         * params.def (PARAM_PARLOOPS_MIN_PER_THREAD): New.
5822         * invoke.texi (parloops-min-per-thread): Document.
5823
5824 2017-11-17  Vineet Gupta  <vgupta@synopsys.com>
5825
5826         * config/arc/linux.h: GLIBC_DYNAMIC_LINKER update per glibc
5827         upstreaming review comments.
5828
5829 2017-11-17  Tamar Christina  <tamar.christina@arm.com>
5830
5831         * expr.c (copy_blkmode_to_reg): Fix bitsize for targets
5832         with fast unaligned access.
5833         * doc/sourcebuild.texi (word_mode_no_slow_unalign): New.
5834
5835 2017-11-17  Thomas Preud'homme  <thomas.preudhomme@arm.com>
5836
5837         * config/arm/arm.c (cmse_nonsecure_entry_clear_before_return): Allocate
5838         to_clear_arg_regs_bitmap to the same size as to_clear_bitmap.
5839
5840 2017-11-17  Richard Biener  <rguenther@suse.de>
5841
5842         * tree-ssa-pre.c (phi_translate_1): Remove redundant constant
5843         folding of references.
5844
5845 2017-11-17  Qing Zhao  <qing.zhao@oracle.com>
5846
5847         PR middle-end/78809
5848         * gimple-fold.c (gimple_fold_builtin_string_compare): Add handling
5849         of replacing call to strncmp with corresponding call to strcmp when
5850         meeting conditions.
5851
5852 2017-11-17  Sergey Shalnov  <Sergey.Shalnov@intel.com>
5853
5854         * config/i386/x86-tune.def (X86_TUNE_AVX256_OPTIMAL): Add tuning
5855         option prefer-avx256 for skylake-avx512 configuration.
5856         * config/i386/i386.c (ix86_option_override_internal): Ditto.
5857         (get_builtin_code_for_version): Ditto.
5858
5859 2017-11-17  Chung-Ju Wu  <jasonwucj@gmail.com>
5860             Monk Chiang  <sh.chiang04@gmail.com>
5861
5862         * config/nds32/nds32.h (FIRST_PSEUDO_REGISTER): Modify.
5863         (FIXED_REGISTERS): Reserve more register numbers.
5864         (CALL_USED_REGISTERS): Likewise.
5865         (REG_ALLOC_ORDER): Likewise.
5866         (REG_CLASS_CONTENTS): Likewise.
5867         (REGISTER_NAMES): Likewise.
5868
5869 2017-11-17  Chung-Ju Wu  <jasonwucj@gmail.com>
5870             Kito Cheng  <kito.cheng@gmail.com>
5871
5872         * config/nds32/nds32-modes.def: Add vector mode V4QI V2HI V8QI V4HI
5873         V2SI.
5874         * config/nds32/iterators.md: Add vector mode iterators and attributes.
5875
5876 2017-11-16  Steven Munroe  <munroesj@gcc.gnu.org>
5877
5878         * config/rs6000/mmintrin.h (_mm_add_pi32[_ARCH_PWR]): Correct
5879         parameter list for vec_splats.
5880
5881 2017-11-16  Joseph Myers  <joseph@codesourcery.com>
5882
5883         * doc/invoke.texi (-std=c17): Refer to 2018 expected publication
5884         date of C17.
5885         (-std=c18, -std=iso9899:2018, -std=gnu18): Document option aliases.
5886
5887 2017-11-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
5888
5889         PR bootstrap/82856
5890         * doc/install.texi: Document incompatibility of Perl >=5.6.26
5891         with the required version of automake 1.11.6.
5892
5893 2017-11-16  Pat Haugen  <pthaugen@us.ibm.com>
5894
5895         * rs6000/power9.md (power9fpdiv): New automaton and cpu_unit defined
5896         for it.
5897         (DU_C2_3_power9): Correct reservation combinations.
5898         (FP_DIV_power9, VEC_DIV_power9): New.
5899         (power9-alu): Split out rotate/shift...
5900         (power9-rot): ...to here, correct dispatch resource.
5901         (power9-cracked-alu, power9-mul, power9-mul-compare): Correct dispatch
5902         resource.
5903         (power9-fp): Correct latency.
5904         (power9-sdiv): Add div/sqrt resource.
5905         (power9-ddiv): Correct latency, add div/sqrt resource.
5906         (power9-sqrt, power9-dsqrt): Add div/sqrt resource.
5907         (power9-vecfdiv, power9-vecdiv): Correct latency, add div/sqrt
5908         resource.
5909         (power9-qpdiv, power9-qpmul): Adjust resource usage.
5910
5911 2017-11-15  Michael Meissner  <meissner@linux.vnet.ibm.com>
5912
5913         * config/rs6000/rs6000.c (rs6000_expand_builtin): Do not do the
5914         switch statement mapping KF built-ins to TF built-ins if we don't
5915         have the proper ISA 3.0 assembler support.
5916
5917 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
5918
5919         * tree-emutls.c (lower_emutls_data): Remove unused bb_freq.
5920         (lower_emutls_function_body): Do not compute it.
5921
5922 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
5923
5924         * ipa-split.c (split_bb_info): Turn time to sreal.
5925         (split_point): Likewise.
5926         (dump_split_point): Likewise.
5927         (fine_split_points): Likewise.
5928         (execute_split_functions): Only zero split_bbs; turn time to sreals.
5929
5930 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
5931
5932         * ipa-fnsummary.c (analyze_function_body): Accumulate time consistently
5933         in sreal.
5934
5935 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
5936
5937         * predict.c (combine_predictions_for_bb): Preserve zero predicted
5938         edges.
5939         (expensive_function_p): Remove useless assert.
5940         (determine_unlikely_bbs): Propagate also forward; determine cold blocks
5941
5942 2017-11-16  Martin Sebor  <msebor@redhat.com>
5943
5944         PR tree-optimization/82588
5945         PR tree-optimization/82583
5946         * tree-vrp.c (check_array_ref): Handle flexible array members,
5947         string literals, and inner indices.
5948         (search_for_addr_array): Add detail to diagnostics.
5949
5950 2017-11-16  Nathan Sidwell  <nathan@acm.org>
5951
5952         PR c++/82836
5953         PR c++/82737
5954         * tree.h (COPY_DECL_RTL): Rename parms for clarity.
5955         (SET_DECL_ASSEMBLER_NAME): Forward to
5956         overwrite_decl_assembler_name.
5957         (COPY_DECL_ASSEMBLER_NAME): Rename parms for clarity.
5958         (overwrite_decl_assembler_name): Declare.
5959         * tree.c (overwrite_decl_assembler_name): New.
5960         * langhooks-def.h (lhd_overwrite_decl_assembler_name): Declare.
5961         (LANG_HOOKS_OVERWRITE_DECL_ASSEMBLER_NAME): Provide default.
5962         (LANG_HOOKS_INITIALIZER): Add it.
5963         * langhooks.h (struct lang_hooks): Add overwrite_decl_assembler_name.
5964         * langhooks.c (lhd_set_decl_assembler_name): Use
5965         SET_DECL_ASSEMBLER_NAME.
5966         (lhd_overwrite_decl_assembler_name): Default implementation.
5967
5968 2017-11-16  Wilco Dijkstra  <wdijkstr@arm.com>
5969             Jackson Woodruff  <jackson.woodruff@arm.com>
5970
5971         PR tree-optimization/71026
5972         * match.pd: Canonicalize constant multiplies in division.
5973
5974 2017-11-16  Wilco Dijkstra  <wdijkstr@arm.com>
5975
5976         * opts.c (default_options_table): Add OPT_fomit_frame_pointer entry.
5977         * common/config/alpha/alpha-common.c (TARGET_OPTION_OPTIMIZATION_TABLE):
5978         Remove OPT_fomit_frame_pointer entry.
5979         * common/config/arc/arc-common.c: Likewise.
5980         * common/config/arm/arm-common.c: Likewise.
5981         * common/config/avr/avr-common.c: Likewise.
5982         * common/config/c6x/c6x-common.c: Likewise.
5983         * common/config/cr16/cr16-common.c: Likewise.
5984         * common/config/cris/cris-common.c: Likewise.
5985         * common/config/epiphany/epiphany-common.c: Likewise.
5986         * common/config/fr30/fr30-common.c: Likewise.
5987         * common/config/frv/frv-common.c: Likewise.
5988         * common/config/ia64/ia64-common.c: Likewise.
5989         * common/config/iq2000/iq2000-common.c: Likewise.
5990         * common/config/lm32/lm32-common.c: Likewise.
5991         * common/config/m32r/m32r-common.c: Likewise.
5992         * common/config/mcore/mcore-common.c: Likewise.
5993         * common/config/microblaze/microblaze-common.c: Likewise.
5994         * common/config/mips/mips-common.c: Likewise.
5995         * common/config/mmix/mmix-common.c: Likewise.
5996         * common/config/mn10300/mn10300-common.c: Likewise.
5997         * common/config/nios2/nios2-common.c: Likewise.
5998         * common/config/pa/pa-common.c: Likewise.
5999         * common/config/pdp11/pdp11-common.c: Likewise.
6000         * common/config/powerpcspe/powerpcspe-common.c: Likewise.
6001         * common/config/riscv/riscv-common.c: Likewise.
6002         * common/config/rs6000/rs6000-common.c: Likewise.
6003         * common/config/rx/rx-common.c: Likewise.
6004         * common/config/s390/s390-common.c: Likewise.
6005         * common/config/sh/sh-common.c: Likewise.
6006         * common/config/sparc/sparc-common.c: Likewise.
6007         * common/config/tilegx/tilegx-common.c: Likewise.
6008         * common/config/tilepro/tilepro-common.c: Likewise.
6009         * common/config/v850/v850-common.c: Likewise.
6010         * common/config/visium/visium-common.c: Likewise.
6011         * common/config/xstormy16/xstormy16-common.c: Likewise.
6012         * common/config/xtensa/xtensa-common.c: Likewise.
6013         * invoke.texi (-fomit-frame-pointer): Update documentation.
6014
6015 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
6016
6017         * tree-cfg.c (gimple_find_sub_bbs): Do not compute freq.
6018
6019 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
6020
6021         * cfg.c (scale_bbs_frequencies_int,
6022         cale_bbs_frequencies_gcov_type): Remove.
6023         * cfg.h (scale_bbs_frequencies_int,
6024         cale_bbs_frequencies_gcov_type): Remove.
6025
6026 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
6027
6028         * tree-ssa-loop-manip.c
6029         (scale_dominated_blocks_in_loop): Update to profile counts.
6030         (tree_transform_and_unroll_loop): Likewise.
6031
6032 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
6033
6034         * tree-vect-loop-manip.c (vect_do_peeling): Do not use
6035         scale_bbs_frequencies_int.
6036
6037 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
6038
6039         * final.c (compute_alignments): Use counts rather than frequencies.
6040
6041 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
6042
6043         * cfgloopanal.c: Include sreal.h
6044         (average_num_loop_insns): Use counts and sreal for accounting.
6045
6046 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
6047
6048         * cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
6049         manipulation.
6050
6051 2017-11-16  Chung-Ju Wu  <jasonwucj@gmail.com>
6052             Kito Cheng  <kito.cheng@gmail.com>
6053
6054         * config/nds32/constraints.md: Provide more constraints.
6055         * config/nds32/nds32.h (enum reg_class, REG_CLASS_NAMES,
6056         REG_CLASS_CONTENTS): Define R5_REG, R8_REG, and FRAME_POINTER_REG to
6057         support constraints usage.
6058
6059 2017-11-16  Chung-Ju Wu  <jasonwucj@gmail.com>
6060
6061         * config/nds32/constants.md (UNSPEC_VOLATILE_FUNC_RETURN): Remove.
6062
6063 2017-11-16  Chung-Ju Wu  <jasonwucj@gmail.com>
6064             Kito Cheng  <kito.cheng@gmail.com>
6065
6066         * config/nds32/nds32.opt: Add mext-perf, mext-perf2, mext-string.
6067         * config/nds32/nds32.opt: Refine the layout.
6068         * config/nds32/nds32.c (TARGET_EXT_PERF, TARGET_EXT_PERF2,
6069         TARGET_EXT_STRING): Support new options.
6070         * config/nds32/nds32.h: Likewise.
6071         * config/nds32/nds32.md: Likewise.
6072         * config/nds32/nds32-predicates.c: Likewise.
6073         * config/nds32/constraints.md: Likewise.
6074         * common/config/nds32/nds32-common.c: Likewise.
6075
6076 2017-11-16  Julia Koval  <julia.koval@intel.com>
6077
6078         PR target/82983
6079         * config/i386/gfniintrin.h: Add sse check.
6080         * config/i386/i386.c (ix86_expand_builtin): Fix gfni check.
6081
6082 2017-11-16  Julia Koval  <julia.koval@intel.com>
6083
6084         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VBMI2_SET,
6085         OPTION_MASK_ISA_AVX512VBMI2_UNSET): New.
6086         (ix86_handle_option): Handle -mavx512vbmi2.
6087         * config/i386/cpuid.h: Add bit_AVX512VBMI2.
6088         * config/i386/driver-i386.c (host_detect_local_cpu): Handle new bit.
6089         * config/i386/i386-c.c (__AVX512VBMI2__): New.
6090         * config/i386/i386.c (ix86_target_string): Handle -mavx512vbmi2.
6091         (ix86_valid_target_attribute_inner_p): Ditto.
6092         * config/i386/i386.h (TARGET_AVX512VBMI2, TARGET_AVX512VBMI2_P): New.
6093         * config/i386/i386.opt (mavx512vbmi2): New option.
6094         * doc/invoke.texi: Add new option.
6095
6096 2017-11-16  Julia Koval  <julia.koval@intel.com>
6097
6098         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8, _mm256_gf2p8mul_epi8,
6099         _mm_mask_gf2p8mul_epi8, _mm_maskz_gf2p8mul_epi8,
6100         _mm256_mask_gf2p8mul_epi8, _mm256_maskz_gf2p8mul_epi8,
6101         _mm512_mask_gf2p8mul_epi8, _mm512_maskz_gf2p8mul_epi8,
6102         _mm512_gf2p8mul_epi8): New intrinsics.
6103         * config/i386/i386-builtin-types.def
6104         (V64QI_FTYPE_V64QI_V64QI): New type.
6105         * config/i386/i386-builtin.def (__builtin_ia32_vgf2p8mulb_v64qi,
6106         __builtin_ia32_vgf2p8mulb_v64qi_mask, __builtin_ia32_vgf2p8mulb_v32qi,
6107         __builtin_ia32_vgf2p8mulb_v32qi_mask, __builtin_ia32_vgf2p8mulb_v16qi,
6108         __builtin_ia32_vgf2p8mulb_v16qi_mask): New builtins.
6109         * config/i386/sse.md (vgf2p8mulb_*): New pattern.
6110         * config/i386/i386.c (ix86_expand_args_builtin): Handle new type.
6111
6112 2017-11-15  Uros Bizjak  <ubizjak@gmail.com>
6113
6114         * config/i386/i386.c (x86_print_call_or_nop): Emit 5 byte nop
6115         explicitly as a stream of bytes.
6116
6117 2017-11-15  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
6118
6119         * config/rs6000/altivec.h (vec_xst_be): New #define.
6120         * config/rs6000/altivec.md (altivec_vperm_<mode>_direct): Rename
6121         and externalize from *altivec_vperm_<mode>_internal.
6122         * config/rs6000/rs6000-builtin.def (XL_BE_V16QI): Remove macro
6123         instantiation.
6124         (XL_BE_V8HI): Likewise.
6125         (XL_BE_V4SI): Likewise.
6126         (XL_BE_V4SI): Likewise.
6127         (XL_BE_V2DI): Likewise.
6128         (XL_BE_V4SF): Likewise.
6129         (XL_BE_V2DF): Likewise.
6130         (XST_BE): Add BU_VSX_OVERLOAD_X macro instantiation.
6131         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Correct
6132         all array entries with these keys: VSX_BUILTIN_VEC_XL,
6133         VSX_BUILTIN_VEC_XL_BE, VSX_BUILTIN_VEC_XST.  Add entries for key
6134         VSX_BUILTIN_VEC_XST_BE.
6135         * config/rs6000/rs6000.c (altivec_expand_xl_be_builtin): Remove.
6136         (altivec_expand_builtin): Remove handling for VSX_BUILTIN_XL_BE_*
6137         built-ins.
6138         (altivec_init_builtins): Replace conditional calls to def_builtin
6139         for __builtin_vsx_ld_elemrev_{v8hi,v16qi} and
6140         __builtin_vsx_st_elemrev_{v8hi,v16qi} based on TARGET_P9_VECTOR
6141         with unconditional calls.  Remove calls to def_builtin for
6142         __builtin_vsx_le_be_<mode>.  Add a call to def_builtin for
6143         __builtin_vec_xst_be.
6144         * config/rs6000/vsx.md (vsx_ld_elemrev_v8hi): Convert define_insn
6145         to define_expand, and add alternate RTL generation for P8.
6146         (*vsx_ld_elemrev_v8hi_internal): New define_insn based on
6147         vsx_ld_elemrev_v8hi.
6148         (vsx_ld_elemrev_v16qi): Convert define_insn to define_expand, and
6149         add alternate RTL generation for P8.
6150         (*vsx_ld_elemrev_v16qi_internal): New define_insn based on
6151         vsx_ld_elemrev_v16qi.
6152         (vsx_st_elemrev_v8hi): Convert define_insn
6153         to define_expand, and add alternate RTL generation for P8.
6154         (*vsx_st_elemrev_v8hi_internal): New define_insn based on
6155         vsx_st_elemrev_v8hi.
6156         (vsx_st_elemrev_v16qi): Convert define_insn to define_expand, and
6157         add alternate RTL generation for P8.
6158         (*vsx_st_elemrev_v16qi_internal): New define_insn based on
6159         vsx_st_elemrev_v16qi.
6160
6161 2017-11-15  H.J. Lu  <hongjiu.lu@intel.com>
6162
6163         PR target/82990
6164         * config/i386/i386.c (pass_insert_vzeroupper::gate): Remove
6165         TARGET_AVX512ER check.
6166         (ix86_option_override_internal): Set MASK_VZEROUPPER if
6167         neither -mzeroupper nor -mno-zeroupper is used and
6168         TARGET_EMIT_VZEROUPPER is set.
6169         * config/i386/i386.h (TARGET_EMIT_VZEROUPPER): New.
6170         * config/i386/x86-tune.def: Add X86_TUNE_EMIT_VZEROUPPER.
6171
6172 2017-11-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
6173
6174         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
6175         folding of vector compares.
6176         (fold_build_vec_cmp): New helper function.
6177         (fold_compare_helper): New helper function.
6178         (builtin_function_type): Add compare builtins to the list of functions
6179         having unsigned arguments.  Cosmetic updates to comment indentation.
6180         * config/rs6000/vsx.md (vcmpneb, vcmpneh, vcmpnew): Update to specify
6181         the not+eq combination.
6182
6183 2017-11-15  Bin Cheng  <bin.cheng@arm.com>
6184
6185         PR tree-optimization/82726
6186         PR tree-optimization/70754
6187         * tree-predcom.c (order_drefs_by_pos): New function.
6188         (combine_chains): Move code setting has_max_use_after to...
6189         (try_combine_chains): ...here.  New parameter.  Sort combined chains
6190         according to position information.
6191         (tree_predictive_commoning_loop): Update call to above function.
6192         (update_pos_for_combined_chains, pcom_stmt_dominates_stmt_p): New.
6193
6194 2017-11-15  Bin Cheng  <bin.cheng@arm.com>
6195
6196         PR tree-optimization/82726
6197         Revert
6198         2017-01-23  Bin Cheng  <bin.cheng@arm.com>
6199
6200         PR tree-optimization/70754
6201         * tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE.
6202         (reassociate_to_the_same_stmt): New parameter INSERT_BEFORE.  Insert
6203         combined stmt before it if not NULL.
6204         (combine_chains): Process refs reversely and compute dominance point
6205         for root ref.
6206
6207         Revert
6208         2017-02-23  Bin Cheng  <bin.cheng@arm.com>
6209
6210         PR tree-optimization/79663
6211         * tree-predcom.c (combine_chains): Process refs in reverse order
6212         only for ZERO length chains, and add explaining comment.
6213
6214 2017-11-15  Tamar Christina  <tamar.christina@arm.com>
6215
6216         * config/arm/arm-cpus.in (armv8_3, ARMv8_3a, armv8.3-a): New
6217         * config/arm/arm-tables.opt (armv8.3-a): Regenerated.
6218         * doc/invoke.texi (ARM Options): Add armv8.3-a.
6219
6220 2017-11-15  Tamar Christina  <tamar.christina@arm.com>
6221
6222         * config/arm/arm.h (TARGET_DOTPROD): Add arm_arch8_2.
6223
6224 2017-11-15  Martin Liska  <mliska@suse.cz>
6225
6226         * tree-cfg.c (pass_warn_function_return::execute):
6227         Compare warn_return_type for greater than zero.
6228
6229 2017-11-15  Sebastian Peryt  <sebastian.peryt@intel.com>
6230
6231         PR target/82941
6232         PR target/82942
6233         * config/i386/i386.c (pass_insert_vzeroupper): Modify gate condition
6234         to return true on Xeon and not on Xeon Phi.
6235         (ix86_check_avx256_register): Changed to ...
6236         (ix86_check_avx_upper_register): ... this. Add extra check for
6237         VALID_AVX512F_REG_OR_XI_MODE.
6238         (ix86_avx_u128_mode_needed): Changed
6239         ix86_check_avx256_register to ix86_check_avx_upper_register.
6240         (ix86_check_avx256_stores): Changed to ...
6241         (ix86_check_avx_upper_stores): ... this. Changed
6242         ix86_check_avx256_register to ix86_check_avx_upper_register.
6243         (ix86_avx_u128_mode_after): Changed
6244         avx_reg256_found to avx_upper_reg_found. Changed
6245         ix86_check_avx256_stores to ix86_check_avx_upper_stores.
6246         (ix86_avx_u128_mode_entry): Changed
6247         ix86_check_avx256_register to ix86_check_avx_upper_register.
6248         (ix86_avx_u128_mode_exit): Ditto.
6249         * config/i386/i386.h: (host_detect_local_cpu): New define.
6250
6251 2017-11-15  Dominik Infuehr  <dominik.infuehr@theobroma-systems.com>
6252
6253         * config/arm/xgene1.md (xgene1): Split into automatons
6254         xgene1_main, xgene1_decoder, xgene1_div, xgene1_simd.
6255         (xgene1_f_load): Adjust reservations and/or types.
6256         (xgene1_f_store): Likewise.
6257         (xgene1_load_pair): Likewise.
6258         (xgene1_store_pair): Likewise.
6259         (xgene1_fp_load1): Likewise.
6260         (xgene1_load1): Likewise.
6261         (xgene1_store1): Likewise.
6262         (xgene1_move): Likewise.
6263         (xgene1_alu): Likewise.
6264         (xgene1_simd): Likewise.
6265         (xgene1_bfm): Likewise.
6266         (xgene1_neon_load1): Likewise.
6267         (xgene1_neon_store1): Likewise.
6268         (xgene1_neon_logic): Likewise.
6269         (xgene1_neon_st1): Likewise.
6270         (xgene1_neon_ld1r): Likewise.
6271         (xgene1_alu_cond): Added.
6272         (xgene1_shift_reg): Likwise.
6273         (xgene1_bfx): Likewise.
6274         (xgene1_mul): Split into xgene1_mul32, xgene1_mul64.
6275
6276 2017-11-15  Jakub Jelinek  <jakub@redhat.com>
6277
6278         PR target/82981
6279         * internal-fn.c: Include gimple-ssa.h, tree-phinodes.h and
6280         ssa-iterators.h.
6281         (can_widen_mult_without_libcall): New function.
6282         (expand_mul_overflow): If only checking unsigned mul overflow,
6283         not result, and can do efficiently MULT_HIGHPART_EXPR, emit that.
6284         Don't use WIDEN_MULT_EXPR if it would involve a libcall, unless
6285         no other way works.  Add MULT_HIGHPART_EXPR + MULT_EXPR support.
6286         (expand_DIVMOD): Formatting fix.
6287         * expmed.h (expand_mult): Add NO_LIBCALL argument.
6288         * expmed.c (expand_mult): Likewise.  Use OPTAB_WIDEN rather
6289         than OPTAB_LIB_WIDEN if NO_LIBCALL is true, and allow it to fail.
6290
6291         PR tree-optimization/82977
6292         * tree-ssa-strlen.c (strlen_optimize_stmt): Pass a reference to a copy
6293         constructed temporary to strlen_to_stridx.put.
6294
6295 2017-11-15  Martin Liska  <mliska@suse.cz>
6296
6297         * configure.ac: Remove -fkeep-inline-functions from coverage_flags.
6298         * configure: Regenerate.
6299
6300 2017-11-15  Martin Liska  <mliska@suse.cz>
6301
6302         PR target/82927
6303         * config/sh/sh-mem.cc: Use proper probability for
6304         REG_BR_PROB_NOTE.
6305
6306 2017-11-14  Jeff Law  <law@redhat.com>
6307
6308         * explow.c (anti_adjust_stack_and_probe_stack_clash): Avoid probing
6309         the red zone for stack_clash_protection_final_dynamic_probe targets
6310         when the total dynamic stack size is zero bytes.
6311
6312         * tree-ssa-threadupdate.c (thread_through_all_blocks): Thread
6313         blocks is post order.
6314
6315 2017-11-15  Alexandre Oliva  <aoliva@redhat.com>
6316
6317         * dumpfile.h (TDF_COMPARE_DEBUG): New.
6318         * final.c (rest_of_clean_state): Set it for the
6319         -fcompare-debug dump.
6320         * tree-pretty-print.c (dump_generic_node): Omit OBJ_TYPE_REF
6321         class when TDF_COMPARE_DEBUG is set.
6322
6323         * dwarf2out.c (gen_producer_string): Discard
6324         OPT_fcompare_debug.
6325
6326 2017-11-15  Joseph Myers  <joseph@codesourcery.com>
6327
6328         PR c/81156
6329         * doc/extend.texi (Other Builtins): Document __builtin_tgmath.
6330         * ginclude/tgmath.h (__tg_cplx, __tg_ldbl, __tg_dbl, __tg_choose)
6331         (__tg_choose_2, __tg_choose_3, __TGMATH_REAL_1_2)
6332         (__TGMATH_REAL_2_3): Remove macros.
6333         (__TGMATH_CPLX, __TGMATH_CPLX_2, __TGMATH_REAL, __TGMATH_REAL_2)
6334         (__TGMATH_REAL_3, __TGMATH_CPLX_ONLY): Define using
6335         __builtin_tgmath.
6336         (frexp, ldexp, nexttoward, scalbn, scalbln): Define using
6337         __TGMATH_REAL_2.
6338         (remquo): Define using __TGMATH_REAL_3.
6339
6340 2017-11-14  Jeff Law  <law@redhat.com>
6341
6342         * vr-values.c: New file with contents extracted from tree-vrp.c.
6343         * Makefile.in (OBJS): Add vr-values.o
6344         * tree-vrp.h (set_value_range_to_nonnull): Prototype.
6345         (set_value_range, set_and_canonicalize_value_range): Likewise.
6346         (vrp_bitmap_equal_p, range_is_nonnull): Likewise.
6347         (value_range_constant_singleton, symbolic_range_p): Likewise.
6348         (compare_values, compare_values_warnv, vrp_val_is_min): Likewise.
6349         (vrp_val_is_max, copy_value_range, set_value_range_to_value): Likewise.
6350         (extract_range_from_binary_expr_1, vrp_val_min, vrp_val_max): Likewise.
6351         (set_value_range_to_null, range_int_cst_p, opreand_less_p): Likewise.
6352         (find_case_label_range, find_case_label_index): Likewise.
6353         (zero_nonzero_bits_from_vr, overflow_comparison_p): Likewise.
6354         (range_int_cst_singleton_p, value_inside_range): Likewise.
6355         (get_single_symbol): Likewise.
6356         (switch_update): Move structure definition here.
6357         (to_remove_edges, to_update_switch_stmts): Provide externs.
6358         * tree-vrp.c: Move all methods for vr-values class to vr-values.c
6359         (vrp_val_max, vrp_val_min, vrp_val_is_max): Make externally visible.
6360         (vrp_val_is_min, set_value_range): Likewise.
6361         (set_and_canonicalize_value_range, copy_value_range): Likewise.
6362         (set_value_range_to_value, set_value_range_to_nonnull): Likewise.
6363         (set_value_range_to_null, vrp_bitmap_equal_p): Likewise.
6364         (range_is_nonnull, range_int_cst_p): Likewwise.
6365         (range_int_cst_singleton_p, symbolic_range_p): Likewise.
6366         (get_single_symbol, operand_less_p): Likewise
6367         (compare_values_warnv, compare_values): Likewise.
6368         (value_inside_range, value_range_constant_singleton): Likewise.
6369         (zero_nonzero_bitgs_from_vr): Likewise.
6370         (extract_range_from_binary_expr_1): Likewise.
6371         (overflow_comparison_p): Likewise.
6372         (to_remove_edges, to_update_switch_stmts): Likewise.
6373         (find_case_label-index, find_case_label_range): Likewise.
6374         (switch_update, set_value_range_to_nonnegative): Remove.
6375         (set_value_range_to_truthvalue): Likewise.
6376         (symbolic_range_based_on_p, gimple_assign_nonzero_p): Likewise.
6377         (gimple_stmt_nonzero_p, compare_ranges): Likewise.
6378         (compare_range_with_value, vrp_valueize, vrp_valueize_1): Likewise.
6379         (find_case_label_ranges, test_for_singularity): Likewise.
6380         (range_fits_type_p, simplify_conversion_using_ranges): LIkewise.
6381         (x_vr_values): Move to its remaining use site.
6382
6383 2017-11-10  Jeff Law  <law@redhat.com>
6384
6385         * vr-values.h (VR_INITIALIZER): Move #define here.
6386         * gimple-ssa-evrp.c: New file with contents extracted from tree-vrp.c
6387         * Makefile.in (OBJS): Add tree-evrp.o
6388         * tree-vrp.h (assert_info): Move structure definition here.
6389         (set_value_range_to_varying): Prototype.
6390         (vrp_operand_equal_p, range_includes_zero_p): Likewise.
6391         (infer_value_range, register_edge_assert_for): Likewise.
6392         (stmt_interesting_for_vrp): Likewise.
6393         * tree-vrp.c: Move all methods for evrp class into gimple-ssa-evrp.c.
6394         (set_value_range_to_varying): No longer static.
6395         (vrp_operand_equal_p, range_includes_zero_p): Likewise.
6396         (infer_value_range, register_edge_assert_for): Likewise.
6397
6398 2017-11-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
6399
6400         * config/rs6000/rs6000.md (bswapdi2): On 32-bit ISA 3.0, don't
6401         generate the XXBRD instruction.
6402
6403         * config/rs6000/rs6000-c.c (is_float128_p): New helper function.
6404         (rs6000_builtin_type_compatible): Treat _Float128 and long double
6405         as being compatible if -mabi=ieeelongdouble.
6406         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_HW_1): New macros
6407         to setup float128 built-ins with hardware support.
6408         (BU_FLOAT128_HW_2): Likewise.
6409         (BU_FLOAT128_HW_3): Likewise.
6410         (BU_FLOAT128_HW_VSX_1): Likewise.
6411         (BU_FLOAT128_HW_VSX_2): Likewise.
6412         (scalar_extract_expq): Change float128 built-in functions to
6413         accommodate having both KFmode and TFmode functions.  Use the
6414         KFmode variant as the default.
6415         (scalar_extract_sigq): Likewise.
6416         (scalar_test_neg_qp): Likewise.
6417         (scalar_insert_exp_q): Likewise.
6418         (scalar_insert_exp_qp): Likewise.
6419         (scalar_test_data_class_qp): Likewise.
6420         (sqrtf128_round_to_odd): Delete processing the round to odd
6421         built-in functions as special built-in functions, and define them
6422         as float128 built-ins.  Use the KFmode variant as the default.
6423         (truncf128_round_to_odd): Likewise.
6424         (addf128_round_to_odd): Likewise.
6425         (subf128_round_to_odd): Likewise.
6426         (mulf128_round_to_odd): Likewise.
6427         (divf128_round_to_odd): Likewise.
6428         (fmaf128_round_to_odd): Likewise.
6429         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Add
6430         support for KFmode and TFmode xststdcqp calls.
6431         (rs6000_expand_builtin): If long double is IEEE 128-bit floating
6432         point, switch the built-in handlers for the get/set float128
6433         exponent, get float128 mantissa, float128 test built-ins, and the
6434         float128 round to odd built-in functions.  Eliminate creating the
6435         float128 round to odd built-in functions as special built-ins.
6436         (rs6000_init_builtins): Eliminate special creation of the float128
6437         round to odd built-in functions.
6438         * config/rs6000/vsx.md (xsxexpqp_<mode>): Change float128 built-in
6439         function insns to support both TFmode and KFmode variants.
6440         (xsxsigqp_<mode>): Likewise.
6441         (xsiexpqpf_<mode>): Likewise.
6442         (xsiexpqp_<mode>): Likewise.
6443         (xststdcqp_<mode>): Likewise.
6444         (xststdcnegqp_<mode>): Likewise.
6445         (xststdcqp_<mode>): Likewise.
6446
6447 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
6448
6449         * tree-ssa-threadupdate.c (compute_path_counts): Remove
6450         unused path_in_freq_ptr parameter.
6451         (ssa_fix_duplicate_block_edges): Do not pass around path_in_freq
6452
6453 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
6454
6455         * ipa-inline.c (edge_badness): Dump sreal frequency.
6456         (compute_inlined_call_time): Match natural implementaiton ...
6457         * ipa-fnsummary.c (estimate_edge_size_and_time): ... here; remove
6458         forgotten division by CGRAPH_FREQ_BASE.
6459
6460 2017-11-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6461
6462         * config.gcc (*-*-solaris2*): Enable default_use_cxa_atexit since
6463         Solaris 11.  Update comment.
6464         * configure.ac (gcc_cv_ld_pid): Adapt comment for Solaris 12
6465         renaming.
6466         * config/sol2.h (STARTFILE_SPEC): Likewise.
6467         * configure: Regenerate.
6468
6469 2017-11-14  Carl Love  <cel@us.ibm.com>
6470
6471         * config/rs6000/rs6000.c (swap_endian_selector_for_mode): Remove
6472         le_ and be_ prefixes to swap* variables.  Remove
6473         if (VECTOR_ELT_ORDER_BIG) statement. Remove E_V16QImode case
6474         statements.
6475
6476 2017-11-14  Jason Merrill  <jason@redhat.com>
6477
6478         Support GTY((cache)) on hash_map.
6479         * hash-traits.h (ggc_remove): Add ggc_maybe_mx member function.
6480         (ggc_cache_remove): Override it instead of ggc_mx.
6481         * hash-table.h (gt_ggc_mx): Call it instead of ggc_mx.
6482         (gt_cleare_cache): Call ggc_mx instead of gt_ggc_mx.
6483         * hash-map-traits.h (simple_hashmap_traits): Add maybe_mx member.
6484         (simple_cache_map_traits): Override maybe_mx.
6485         * hash-map.h (hash_entry): Add ggc_maybe_mx and keep_cache_entry.
6486         (hash_map): Friend gt_cleare_cache.
6487         (gt_cleare_cache): New.
6488         * tree.h (tree_cache_traits): New hash_map traits class.
6489         (tree_cache_map): New typedef.
6490
6491 2017-11-14  Richard Biener  <rguenther@suse.de>
6492
6493         * tree-cfgcleanup.c (cleanup_control_expr_graph): Remove first_p
6494         paramter and handling.
6495         (cleanup_control_flow_bb): Likewise.
6496         (cleanup_control_flow_pre): New helper performing a DFS walk
6497         to call cleanup_control_flow_bb in PRE order.
6498         (cleanup_tree_cfg_1): Do the first phase of cleanup_control_flow_bb
6499         via cleanup_control_flow_pre.
6500
6501 2017-11-14  James Greenhalgh  <james.greenhalgh@arm.com>
6502
6503         * config/aarch64/aarch64-simd.md
6504         (aarch64_simd_bsl<mode>_internal): Remove DImode.
6505         (*aarch64_simd_bsl<mode>_alt): Likewise.
6506         (aarch64_simd_bsldi_internal): New.
6507         (aarch64_simd_bsldi_alt): Likewise.
6508
6509 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
6510
6511         * tracer.c (better_p): Do not compare frequencies.
6512         * reg-stack.c (better_edge): Likewise.
6513         * shrink-wrap.c (try_shrink_wrapping): Do not convert to gcov counts
6514         and back.
6515
6516 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
6517
6518         * auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
6519         * cgraphunit.c (cgraph_node::expand_thunk): Use update_max_bb_count.
6520         * ipa-utils.c (ipa_merge_profiles): Use update_max_bb_count.
6521         * lto-streamer-in.c (input_function): Use update_max_bb_count.
6522         * omp-expand.c (expand_omp_taskreg): Use update_max_bb_count.
6523         * predict.c (maybe_hot_frequency_p): Inline to ...
6524         (maybe_hot_count_p): ... here; rewrite to counts.
6525         (counts_to_freqs): Rename to ...
6526         (update_max_bb_count): ... this one.
6527         (expensive_function_p): Use counts.
6528         (estimate_bb_frequencies): Update.
6529         (rebuild_frequencies): Update.
6530         * predict.h (counts_to_freqs): Rename to ...
6531         (update_max_bb_count): ... this one.
6532         * profile.c (compute_branch_probabilities): Add debug info
6533         * tree-inline.c (expand_call_inline): Update debug info.
6534         (optimize_inline_calls): Use update_max_bb_count..
6535         (tree_function_versioning): Use update_max_bb_count..
6536         * value-prof.c (gimple_value_profile_transformations):
6537         Do not use update_max_bb_count.
6538
6539 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
6540
6541         * ipa-inline.c (compute_uninlined_call_time, compute_inlined_call_time):
6542         always use frequencies.
6543
6544 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
6545
6546         * bb-reorder.c: Remove frequencies from comments.
6547         (better_edge_p): Use profile counts.
6548         (find_traces): Dump profile counts.
6549         (rotate_loop): Use profile counts.
6550         (find_traces_1_round): Likewise.
6551         (connect_better_edge_p): Use counts instead of probabilities for
6552         reverse walk.
6553         (copy_bb_p): Drop early check for non-0 frequency.
6554         (sanitize_hot_paths): Update comments.
6555
6556 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
6557
6558         * ipa-split.c (struct split_point): Add count.
6559         (consider_split): Do not compute incoming frequency; compute incoming
6560         count and store it to split_point.
6561         (split_function): Set count of the call to split part correctly.
6562
6563 2017-11-13  Carl Love  <cel@us.ibm.com>
6564
6565         * config/rs6000/altivec.md (altivec_vsumsws_be): Add define_expand.
6566
6567 2017-11-13  Tom Tromey  <tom@tromey.com>
6568
6569         * doc/cpp.texi (Variadic Macros): Document __VA_OPT__.
6570
6571 2017-11-13  Carl Love  <cel@us.ibm.com>
6572
6573         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins):
6574         Add support for builtins:
6575         unsigned int vec_first_{,miss}_match_{,or_eos}index,
6576         vector {un,}signed {char,int,short},
6577         vector {un,}signed {char,int,short}) arguments.
6578         * config/rs6000/rs6000-builtin.def (VFIRSTMATCHINDEX,
6579         VFIRSTMATCHOREOSINDEX, VFIRSTMISMATCHINDEX, VFIRSTMISMATCHOREOSINDEX):
6580         Add BU_P9V_AV_2 expansions for the builtins.
6581         * config/rs6000/altivec.h (vec_first_match_index,
6582         vec_first_mismatch_index, vec_first_match_or_eos_index,
6583         vec_first_mismatch_or_eos_index): Add #defines for the builtins.
6584         * config/rs6000/rs6000-protos.h (bytes_in_mode): Add
6585         new extern declaration.
6586         * config/rs6000/rs6000.c (bytes_in_mode): Add new function.
6587         * config/rs6000/vsx.md (first_match_index_<mode>,
6588         first_match_or_eos_index_<mode>, first_mismatch_index_<mode>,
6589         first_mismatch_or_eos_index_<mode>): Add define expand.
6590         (vctzlsbb_<mode>): Add mode field to define_insn for vctzlsbb.
6591         * doc/extend.texi: Update the built-in documenation file for the new
6592         built-in functions.
6593
6594 2017-11-13  Michael Meissner  <meissner@linux.vnet.ibm.com>
6595
6596         * match.pd: Convert fminf<N>, fminf<N>x, fmax<N>, and fmax<N>x
6597         into the min/max operations for _Float<N> and _Float<N>X types.
6598
6599 2017-11-13  Eric Botcazou  <ebotcazou@adacore.com>
6600
6601         PR lto/81351
6602         * dwarf2out.c (do_eh_frame): New static variable.
6603         (dwarf2out_begin_prologue): Set it.
6604         (dwarf2out_frame_finish): Test it instead of dwarf2out_do_eh_frame.
6605
6606 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
6607
6608         * tree-ssa-coalesce.c (coalesce_cost): Fix formating.
6609
6610         * tree-ssa-sink.c (select_best_block): Do not use frequencies.
6611
6612 2017-11-13  Eric Botcazou  <ebotcazou@adacore.com>
6613
6614         PR lto/81351
6615         * debug.h (dwarf2out_do_eh_frame): Declare.
6616         * dwarf2cfi.c (dwarf2out_do_eh_frame): New predicate.
6617         (dwarf2out_do_frame): Use it.
6618         (dwarf2out_do_cfi_asm): Likewise.
6619         * dwarf2out.c (dwarf2out_frame_finish): Likewise.
6620         (dwarf2out_assembly_start): Likewise.
6621         (dwarf2out_begin_prologue): Fix comment.
6622         * toplev.c (compile_file): Always call dwarf2out_frame_finish
6623         if the target needs either debug or unwind DWARF2 info.
6624         * lto-opts.c (lto_write_options): Do not save -fexceptions,
6625         -fnon-call-exceptions, -ffp-contract, -fmath-errno, -fsigned-zeros,
6626         -ftrapping-math, -ftrapv and -fwrapv.
6627
6628 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
6629
6630         * cgraph.c (cgraph_edge::sreal_frequency): New function.
6631         * cgraph.h (cgraph_edge::sreal_frequency): Declare.
6632         * ipa-fnsummary.c (dump_ipa_call_summary): Use sreal_frequency.
6633         (estimate_edge_size_and_time): Likewise.
6634         (ipa_merge_fn_summary_after_inlining): Likewise.
6635         * ipa-inline.c (cgraph_freq_base_rec): Remove.
6636         (compute_uninlined_call_time): Use sreal_frequency.
6637         (compute_inlined_call_time): Likewise.
6638         (ipa_inline): Do not initialize cgraph_freq_base_rec.
6639         * profile-count.c: Include sreal.h.
6640         (profile_count::to_sreal_scale): New.
6641         * profile-count.h: Forward declare sreal.
6642         (profile_count::to_sreal_scale): Declare.
6643
6644 2017-11-13  Nathan Sidwell  <nathan@acm.org>
6645
6646         * diagnostic.c (maybe_line_and_column): New.
6647         (diagnostic_get_location_text): Use it.
6648         (diagnostic_report_current_module): Likewise.
6649         (test_diagnostic_get_location_text): Add tests.
6650
6651 2017-11-13  Luis Machado  <luis.machado@linaro.org>
6652
6653         * doc/md.texi (Specifying processor pipeline description): Fix
6654         incorrect latency for the div instruction example.
6655
6656 2017-11-13  Jakub Jelinek  <jakub@redhat.com>
6657
6658         PR tree-optimization/78821
6659         * gimple-ssa-store-merging.c (compatible_load_p): Don't require
6660         that bit_not_p is the same.
6661         (imm_store_chain_info::coalesce_immediate_stores): Likewise.
6662         (split_group): Count precisely bit_not_p bits in each statement.
6663         (invert_op): New function.
6664         (imm_store_chain_info::output_merged_store): Use invert_op to
6665         emit BIT_XOR_EXPR with a xor_mask instead of BIT_NOT_EXPR if some
6666         but not all orig_stores have BIT_NOT_EXPR in the corresponding spots.
6667
6668 2017-11-13  Martin Liska  <mliska@suse.cz>
6669
6670         * gcov.c (struct coverage_info): Remove typedef of coverage_t.
6671         (struct source_info): Likewise.
6672         (add_branch_counts): Likewise.
6673         (add_line_counts): Likewise.
6674         (function_summary): Likewise.
6675         (output_intermediate_line): Likewise.
6676         (generate_results): Likewise.
6677
6678 2017-11-13  Martin Liska  <mliska@suse.cz>
6679
6680         * gcov.c (struct block_info): Remove typedef for block_t.
6681         (struct line_info): Likewise.
6682         (line_info::has_block): Likewise.
6683         (EXIT_BLOCK): Likewise.
6684         (unblock): Likewise.
6685         (circuit): Likewise.
6686         (get_cycles_count): Likewise.
6687         (process_file): Likewise.
6688         (read_graph_file): Likewise.
6689         (solve_flow_graph): Likewise.
6690         (find_exception_blocks): Likewise.
6691         (add_line_counts): Likewise.
6692         (accumulate_line_info): Likewise.
6693         (output_line_details): Likewise.
6694
6695 2017-11-13  Martin Liska  <mliska@suse.cz>
6696
6697         * gcov.c (struct arc_info): Remove typedef for arc_t.
6698         (struct line_info): Likewise.
6699         (add_branch_counts): Likewise.
6700         (output_branch_count): Likewise.
6701         (function_info::~function_info): Likewise.
6702         (circuit): Likewise.
6703         (output_intermediate_line): Likewise.
6704         (read_graph_file): Likewise.
6705         (solve_flow_graph): Likewise.
6706         (find_exception_blocks): Likewise.
6707         (add_line_counts): Likewise.
6708         (accumulate_line_info): Likewise.
6709         (output_line_details): Likewise.
6710         (output_function_details): Likewise.
6711
6712 2017-11-13  Martin Liska  <mliska@suse.cz>
6713
6714         * gcov.c (struct function_info): Remove typedef for function_t.
6715         (struct source_info): Likewise.
6716         (source_info::get_functions_at_location): Likewise.
6717         (solve_flow_graph): Likewise.
6718         (find_exception_blocks): Likewise.
6719         (add_line_counts): Likewise.
6720         (output_intermediate_file): Likewise.
6721         (process_file): Likewise.
6722         (generate_results): Likewise.
6723         (release_structures): Likewise.
6724         (read_graph_file): Likewise.
6725         (read_count_file): Likewise.
6726         (accumulate_line_counts): Likewise.
6727         (output_lines): Likewise.
6728
6729 2017-11-13  Martin Liska  <mliska@suse.cz>
6730
6731         * gcov.c (function_info::function_info): Remove num_counts
6732         and add vector<gcov_type>.
6733         (function_info::~function_info): Use the vector.
6734         (process_file): Likewise.
6735         (read_graph_file): Likewise.
6736         (read_count_file): Likewise.
6737         (solve_flow_graph): Likewise.
6738
6739 2017-11-13  Martin Liska  <mliska@suse.cz>
6740
6741         * gcov.c (function_info::is_artificial): New function.
6742         (process_file): Erase all artificial early.
6743         (generate_results): Skip as all artificial are already
6744         removed.
6745
6746 2017-11-13  Martin Liska  <mliska@suse.cz>
6747
6748         * gcov.c (read_graph_file): Store to global vector of functions.
6749         (read_count_file): Iterate the vector.
6750         (process_file): Likewise.
6751         (generate_results): Likewise.
6752         (release_structures): Likewise.
6753
6754 2017-11-13  Jakub Jelinek  <jakub@redhat.com>
6755
6756         PR tree-optimization/82954
6757         * gimple-ssa-store-merging.c
6758         (imm_store_chain_info::coalesce_immediate_stores): If
6759         !infof->ops[N].base_addr, split group if info->ops[N].base_addr.
6760
6761 2017-11-13  Richard Sandiford  <richard.sandiford@linaro.org>
6762
6763         * config/aarch64/aarch64-simd.md (aarch64_store_lane0<mode>):
6764         Upddate call to ENDIAN_LANE_N.
6765         (aarch64_<sur>dot_lane<vsi2qi>): Use aarch64_endian_lane_rtx.
6766         (aarch64_<sur>dot_laneq<vsi2qi>): Likewise.
6767         (*aarch64_simd_vec_copy_lane<mode>): Update calls to ENDIAN_LANE_N
6768         and use aarch64_endian_lane_rtx.
6769         (*aarch64_simd_vec_copy_lane_<vswap_width_name><mode>): Likewise.
6770
6771 2017-11-12  Tom de Vries  <tom@codesourcery.com>
6772
6773         * config/riscv/riscv.h (ASM_OUTPUT_LABELREF): Wrap in do {} while (0).
6774
6775 2017-11-12  Tom de Vries  <tom@codesourcery.com>
6776
6777         * config/elfos.h (ASM_OUTPUT_ASCII): Remove semicolon after macro body.
6778
6779 2017-11-12  Tom de Vries  <tom@codesourcery.com>
6780
6781         * config/cr16/cr16.h (ASM_OUTPUT_LABELREF): Remove semicolon after macro
6782         body.
6783         * config/powerpcspe/xcoff.h (ASM_OUTPUT_LABELREF): Same.
6784         * config/rs6000/xcoff.h (ASM_OUTPUT_LABELREF): Same.
6785         * defaults.h (ASM_OUTPUT_LABELREF): Same.
6786
6787 2017-11-11  Martin Sebor  <msebor@redhat.com>
6788
6789         PR c/81117
6790         * doc/extend.texi (attribute nonstring): Remove spurious argument.
6791
6792         PR bootstrap/82948
6793         * prefic.c (translate_name): Replace strncpy with memcpy to
6794         avoid -Wstringop-truncation.
6795
6796 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
6797
6798         * tree-ssa-loop-im.c (execute_sm_if_changed): Do not compute freq_sum.
6799
6800 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
6801
6802         * predict.c (maybe_hot_frequency_p): Do not use cfun.
6803
6804 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
6805
6806         * tree-ssa-tail-merge.c (replace_block_by): Fix and re-enable profile
6807         merging.
6808
6809 2017-11-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
6810
6811         * config/rs6000/rs6000.md (bswaphi2_reg): On ISA 3.0 systems,
6812         enable generating XXBRH if the value is in a vector register.
6813         (bswapsi2_reg): On ISA 3.0 systems, enable generating XXBRW if the
6814         value is in a vector register.
6815         (bswapdi2_reg): On ISA 3.0 systems, always use XXBRD to do
6816         register to register bswap64's instead of doing the GPR sequence
6817         used on previous machines.
6818         (bswapdi2_xxbrd): New insn.
6819         (bswapdi2_reg): Disallow on ISA 3.0.
6820         (register to register bswap64 splitter): Do not split the insn on
6821         ISA 3.0 systems that use XXBRD.
6822
6823 2017-11-10  Martin Sebor  <msebor@redhat.com>
6824
6825         PR c/81117
6826         * config/darwin-c.c (framework_construct_pathname): Replace strncpy
6827         with memcpy.
6828         (find_subframework_file): Same.
6829
6830 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
6831
6832         * auto-profile.c (afdo_indirect_call): Drop frequency.
6833         * cgraph.c (symbol_table::create_edge): Drop frequency argument.
6834         (cgraph_node::create_edge): Drop frequency argument.
6835         (cgraph_node::create_indirect_edge): Drop frequency argument.
6836         (cgraph_edge::make_speculative): Drop frequency arguments.
6837         (cgraph_edge::resolve_speculation): Do not update frequencies
6838         (cgraph_edge::dump_edge_flags): Do not dump frequency.
6839         (cgraph_node::dump): Check consistency in IPA mode.
6840         (cgraph_edge::maybe_hot_p): Use IPA counter.
6841         (cgraph_edge::verify_count_and_frequency): Rename to ...
6842         (cgraph_edge::verify_count): ... this one; drop frequency checking.
6843         (cgraph_node::verify_node): Update.
6844         * cgraph.h (struct cgraph_edge): Drop frequency.
6845         (cgraph_edge::frequency): New function.
6846         * cgraphbuild.c (pass_build_cgraph_edges::execute): Donot pass
6847         frequencies.
6848         (cgraph_edge::rebuild_edges): Likewise.
6849         * cgraphclones.c (cgraph_edge::clone): Scale only counts.
6850         (duplicate_thunk_for_node): Do not pass frequency.
6851         (cgraph_node::create_clone): Scale only counts.
6852         (cgraph_node::create_virtual_clone): Do not pass frequency.
6853         (cgraph_node::create_edge_including_clones): Do not pass frequency.
6854         (cgraph_node::create_version_clone): Do not pass frequency.
6855         * cgraphunit.c (cgraph_node::analyze): Do not pass frequency.
6856         (cgraph_node::expand_thunk): Do not pass frequency.
6857         (cgraph_node::create_wrapper): Do not pass frequency.
6858         * gimple-iterator.c (update_call_edge_frequencies): Do not pass
6859         frequency.
6860         * gimple-streamer-in.c (input_bb): Scale only IPA counts.
6861         * ipa-chkp.c (chkp_produce_thunks): Do not pass frequency.
6862         * ipa-cp.c (ipcp_lattice::print): Use frequency function.
6863         (gather_caller_stats): Use frequency function.
6864         (ipcp_cloning_candidate_p): Use frequency function.
6865         (ipcp_propagate_stage): Use frequency function.
6866         (get_info_about_necessary_edges): Use frequency function.
6867         (update_profiling_info): Update only IPA profile.
6868         (update_specialized_profile): Use frequency functoin.
6869         (perhaps_add_new_callers): Update only IPA profile.
6870         * ipa-devirt.c (ipa_devirt): Use IPA profile.
6871         * ipa-fnsummary.c (redirect_to_unreachable): Do not set frequrency.
6872         (dump_ipa_call_summary): Use frequency function.
6873         (estimate_edge_size_and_time): Use frequency function.
6874         (ipa_merge_fn_summary_after_inlining): Use frequency function.
6875         * ipa-inline-analysis.c (do_estimate_edge_time): Use IPA profile.
6876         * ipa-inline-transform.c (update_noncloned_frequencies): Rename to ..
6877         (update_noncloned_counts): ... ths one; scale counts only.
6878         (clone_inlined_nodes): Do not scale frequency.
6879         (inline_call): Do not pass frequency.
6880         * ipa-inline.c (compute_uninlined_call_time): Use IPA profile.
6881         (compute_inlined_call_time): Use IPA profile.
6882         (want_inline_small_function_p): Use IPA profile.
6883         (want_inline_self_recursive_call_p): Use IPA profile.
6884         (edge_badness): Use IPA profile.
6885         (lookup_recursive_calls): Use IPA profile.
6886         (recursive_inlining): Do not pass frequency.
6887         (resolve_noninline_speculation): Do not update frequency.
6888         (inline_small_functions): Collect max of IPA profile.
6889         (dump_overall_stats): Dump IPA porfile.
6890         (dump_inline_stats): Dump IPA porfile.
6891         (ipa_inline): Collect IPA stats.
6892         * ipa-inline.h (clone_inlined_nodes): Update prototype.
6893         * ipa-profile.c (ipa_propagate_frequency_1): Use frequency function.
6894         (ipa_propagate_frequency): Use frequency function.
6895         (ipa_profile): Cleanup.
6896         * ipa-prop.c (ipa_make_edge_direct_to_target): Do not pass frequency
6897         * ipa-utils.c (ipa_merge_profiles): Merge all profiles.
6898         * lto-cgraph.c (lto_output_edge): Do not stream frequency.
6899         (input_node): Do not stream frequency.
6900         (input_edge): Do not stream frequency.
6901         (merge_profile_summaries): Scale only IPA profiles.
6902         * omp-simd-clone.c (simd_clone_adjust): Do not pass frequency.
6903         * predict.c (drop_profile): Do not recompute frequency.
6904         * trans-mem.c (ipa_tm_insert_irr_call): Do not pass frequency.
6905         (ipa_tm_insert_gettmclone_call): Do not pass frequency.
6906         * tree-cfg.c (execute_fixup_cfg): Drop profile to global0 if needed.
6907         * tree-chkp.c (chkp_copy_bounds_for_assign): Do not pass frequency.
6908         * tree-emutls.c (gen_emutls_addr): Do not pass frequency.
6909         * tree-inline.c (copy_bb): Do not scale frequency.
6910         (expand_call_inline): Do not scale frequency.
6911         (tree_function_versioning): Do not scale frequency.
6912         * ubsan.c (ubsan_create_edge): Do not pass frequency.
6913
6914 2017-11-10  Julia Koval  <julia.koval@intel.com>
6915
6916         * config/i386/gfniintrin.h (_mm_gf2p8affine_epi64_epi8)
6917         (_mm256_gf2p8affine_epi64_epi8, _mm_mask_gf2p8affine_epi64_epi8)
6918         (_mm_maskz_gf2p8affine_epi64_epi8, _mm256_mask_gf2p8affine_epi64_epi8)
6919         (_mm256_maskz_gf2p8affine_epi64_epi8)
6920         (_mm512_mask_gf2p8affine_epi64_epi8, _mm512_gf2p8affine_epi64_epi8)
6921         (_mm512_maskz_gf2p8affine_epi64_epi8): New intrinsics.
6922         * config/i386/i386-builtin.def (__builtin_ia32_vgf2p8affineqb_v64qi)
6923         (__builtin_ia32_vgf2p8affineqb_v32qi)
6924         (__builtin_ia32_vgf2p8affineqb_v16qi): New builtins.
6925         * config/i386/sse.md (vgf2p8affineqb_<mode><mask_name>): New pattern.
6926
6927 2017-11-10  Tamar Christina  <tamar.christina@arm.com>
6928
6929         PR target/82641
6930         * config/arm/arm.c
6931         (arm_option_override): Refactor.
6932         (arm_option_reconfigure_globals): New.
6933         (arm_options_perform_arch_sanity_checks): New.
6934         * config/arm/arm-protos.h (arm_option_reconfigure_globals):
6935         New prototype.
6936         (arm_options_perform_arch_sanity_checks): Likewise
6937
6938 2017-11-10  Pat Haugen  <pthaugen@us.ibm.com>
6939
6940         * rs6000/power9.md (power9-qpdiv): Correct DFU pipe usage.
6941         (power9-qpmul): New.
6942         * rs6000/rs6000.md ("type" attr): Add qmul.
6943         (mul<mode>3, fma<mode>4_hw, *fms<mode>4_hw, *nfma<mode>4_hw,
6944         *nfms<mode>4_hw, mul<mode>3_odd, fma<mode>4_odd, *fms<mode>4_odd,
6945         *nfma<mode>4_odd, *nfms<mode>4_odd): Change type to qmul.
6946
6947 2017-11-10  Martin Sebor  <msebor@redhat.com>
6948
6949         PR c/81117
6950         * builtins.c (compute_objsize): Handle arrays that
6951         compute_builtin_object_size likes to fail for.  Make extern.
6952         * builtins.h (compute_objsize): Declare.
6953         (check_strncpy_sizes): New function.
6954         (expand_builtin_strncpy): Call check_strncpy_sizes.
6955         * gimple-fold.c (gimple_fold_builtin_strncpy): Implement
6956         -Wstringop-truncation.
6957         (gimple_fold_builtin_strncat): Same.
6958         * gimple.c (gimple_build_call_from_tree): Set call location.
6959         * tree-ssa-strlen.c (strlen_to_stridx): New global variable.
6960         (maybe_diag_bound_equal_length, is_strlen_related_p): New functions.
6961         (handle_builtin_stxncpy, handle_builtin_strncat): Same.
6962         (handle_builtin_strlen): Use strlen_to_stridx.
6963         (strlen_optimize_stmt): Handle flavors of strncat, strncpy, and
6964         stpncpy.
6965         Use strlen_to_stridx.
6966         (pass_strlen::execute): Release strlen_to_stridx.
6967         * doc/invoke.texi (-Wsizeof-pointer-memaccess): Document enhancement.
6968         (-Wstringop-truncation): Document new option.
6969
6970 2017-11-10  Martin Liska  <mliska@suse.cz>
6971
6972         PR gcov-profile/82702
6973         * gcov.c (main): Handle intermediate files in a different
6974         way.
6975         (get_gcov_intermediate_filename): New function.
6976         (output_gcov_file): Remove support of intermediate files.
6977         (generate_results): Allocate intermediate file.
6978         (release_structures): Clean-up properly fn_end.
6979         (output_intermediate_file): Start iterating with line 1.
6980
6981 2017-11-10  Jakub Jelinek  <jakub@redhat.com>
6982
6983         PR tree-optimization/82929
6984         * gimple-ssa-store-merging.c (struct store_immediate_info): Add
6985         ops_swapped_p non-static data member.
6986         (store_immediate_info::store_immediate_info): Clear it.
6987         (imm_store_chain_info::coalesce_immediate_stores): If swapping
6988         ops set ops_swapped_p.
6989         (count_multiple_uses): Handle ops_swapped_p.
6990
6991 2017-11-10  Martin Liska  <mliska@suse.cz>
6992
6993         * coverage.c (coverage_init): Stream information about
6994         support of has_unexecuted_blocks.
6995         * doc/gcov.texi: Document that.
6996         * gcov-dump.c (dump_gcov_file): Support it in gcov_dump tool.
6997         * gcov.c (read_graph_file): Likewise.
6998         (output_line_beginning): Fix a small issue with
6999         color output.
7000
7001 2017-11-10  Bin Cheng  <bin.cheng@arm.com>
7002
7003         * tree-predcom.c (determine_roots_comp): Avoid memory leak by freeing
7004         reference of trivial component.
7005
7006 2017-11-10  Jakub Jelinek  <jakub@redhat.com>
7007
7008         PR bootstrap/82916
7009         * gimple-ssa-store-merging.c
7010         (pass_store_merging::terminate_all_aliasing_chains): For
7011         gimple_store_p stmts also call refs_output_dependent_p.
7012
7013         PR rtl-optimization/82913
7014         * compare-elim.c (try_merge_compare): Punt if def_insn is not
7015         single set.
7016
7017 2017-11-09  Jeff Law  <law@redhat.com>
7018
7019         * vr-values.h: New file with vr_values class.
7020         * tree-vrp.c: Include vr-values.h
7021         (vrp_value_range_pool, vrp_equiv_obstack, num_vr_values): Move static
7022         data objects into the vr_values class.
7023         (vr_value, values_propagated, vr_phi_edge_counts): Likewise.
7024         (get_value_range): Make it a member function within vr_values class.
7025         (set_defs_to_varying, update_value_range, add_equivalence): Likewise.
7026         (vrp_stmt_computes_nonzero_p, op_with_boolean_value_range_p): Likewise.
7027         (op_with_constant_singleton_value_range): Likewise.
7028         (extract_range_for_var_from_comparison_expr): Likewise.
7029         (extract_range_from_assert, extract_range_from_ssa_name): Likewise.
7030         (extract_range_from_binary_expr): Likewise.
7031         (extract_range_from_unary_expr): Likewise.
7032         (extract_range_from_cond_expr, extrat_range_from_comparison): Likewise.
7033         (check_for_binary_op_overflow, extract_range_basic): Likewise.
7034         (extract_range_from_assignment, adjust_range_with_scev): Likewise.
7035         (dump_all_value_ranges, get_vr_for_comparison): Likewise.
7036         (compare_name_with_value, compare_names): Likewise.
7037         (vrp_evaluate_conditional_warnv_with_ops_using_ranges): Likewise.
7038         (vrp_evaluate_conditional_warnv_with_ops): Likewise.  Remove prototype.
7039         (vrp_evaluate_conditional, vrp_visit_cond_stmt): Likewise.
7040         (vrp_visit_switch_stmt, extract_range_from_stmt): Likewise.
7041         (extract_range_from_phi_node): Likewise.
7042         (simplify_truth_ops_using_ranges): Likewise.
7043         (simplify_div_or_mod_using_ranges): Likewise.
7044         (simplify_min_or_max_using_ranges, simplify_abs_using_ranges): Likewise.
7045         (simplify_bit_ops_using_ranges, simplify_cond_using_ranges_1): Likewise.
7046         (simplify_cond_using_ranges_2, simplify_switch_using_ranges): Likewise.
7047         (simplify_float_conversion_using_ranges): Likewise.
7048         (simplify_internal_call_using_ranges): Likewise.
7049         (two_valued_val_range_p, simplify_stmt_using_ranges): Likewise.
7050         (vrp_visit_assignment_or_call): Likewise.  Smuggle class instance
7051         poitner via x_vr_values for calls into gimple folder.
7052         (vrp_initialize_lattice): Make this the vr_values ctor.
7053         (vrp_free_lattice): Make this the vr_values dtor.
7054         (set_vr_value): New function.
7055         (class vrp_prop): Add vr_values data member.  Add various member
7056         functions as well as member functions that delegate to vr_values.
7057         (check_array_ref): Make a member function within vrp_prop class.
7058         (search_for_addr_array, vrp_initialize): Likewise.
7059         (vrp_finalize): Likewise.  Revamp to avoid direct access to
7060         vr_value, values_propagated, etc.
7061         (check_array_bounds): Extract vrp_prop class instance pointer from
7062         walk info structure.  Use it to call member functions.
7063         (check_all_array_refs): Make a member function within vrp_prop class.
7064         Smuggle class instance pointer via walk info structure.
7065         (x_vr_values): New local static.
7066         (vrp_valueize): Use x_vr_values to get class instance.
7067         (vr_valueize_1): Likewise.
7068         (class vrp_folder): Add vr_values data member.  Add various member
7069         functions as well as member functions that delegate to vr_values.
7070         (fold_predicate_in): Make a mber fucntion within vrp_folder class.
7071         (simplify_stmt_for_jump_threading): Extract smuggled vr_values
7072         class instance from vr_values.  Use it to call member functions.
7073         (vrp_dom_walker): Add vr_values data member.
7074         (vrp_dom_walker::after_dom_children): Smuggle vr_values class
7075         instance via x_vr_values.
7076         (identify_jump_threads): Accept vr_values as argument.  Store
7077         it into the walker structure.
7078         (evrp_dom_walker): Add vr_values class data member.  Add various
7079         delegators.
7080         (evrp_dom_walker::try_find_new_range): Use vr_values data
7081         member to access the memory allocator.
7082         (evrp_dom_walker::before_dom_children): Store vr_values class
7083         instance into the vrp_folder class.
7084         (evrp_dom_walker::push_value_range): Rework to avoid direct
7085         access to num_vr_values and vr_value.
7086         (evrp_dom_walker::pop_value_range): Likewise.
7087         (execute_early_vrp): Remove call to vrp_initialize_lattice.
7088         Use vr_values to get to dump_all_value_ranges member function.
7089         Remove call to vrp_free_lattice.  Call vrp_initialize, vrp_finalize,
7090         and simplify_cond_using_ranges_2 via vrp_prop class instance.
7091         Pass vr_values class instance down to identify_jump_threads.
7092         Remove call to vrp_free_lattice.
7093         (debug_all_value_ranges): Remove.
7094
7095         * tree-vrp.c (vrp_prop): Move class to earlier point in the file.
7096         (vrp_folder): Likewise.
7097
7098         * tree-vrp.c (set_value_range): Do not reference vrp_equiv_obstack.
7099         Get it from the existing bitmap instead.
7100         (vrp_intersect_ranges_1): Likewise.
7101
7102 2017-11-09  Jakub Jelinek  <jakub@redhat.com>
7103
7104         * gimple-ssa-store-merging.c (struct store_immediate_info): Add
7105         bit_not_p field.
7106         (store_immediate_info::store_immediate_info): Add bitnotp argument,
7107         set bit_not_p to it.
7108         (imm_store_chain_info::coalesce_immediate_stores): Break group
7109         if bit_not_p is different.
7110         (count_multiple_uses, split_group,
7111         imm_store_chain_info::output_merged_store): Handle info->bit_not_p.
7112         (handled_load): Avoid multiple chained BIT_NOT_EXPRs.
7113         (pass_store_merging::process_store): Handle BIT_{AND,IOR,XOR}_EXPR
7114         result inverted using BIT_NOT_EXPR, compute bit_not_p, pass it
7115         to store_immediate_info ctor.
7116
7117 2017-11-09  Jim Wilson  <jimw@sifive.com>
7118
7119         * collect2.c (OBJECT_FORMAT_COFF): Remove EXTENDED_COFF support.
7120         (scan_prog_file): Likewise.
7121
7122 2017-11-09  Jan Hubicka  <hubicka@ucw.cz>
7123
7124         * bb-reorder.c (max_entry_frequency): Remove.
7125         (find_traces, rotate_loop, mark_bb_visited, connect_better_edge_p,
7126         connect_traces, push_to_next_round_p): Remove prototypes.
7127         (find_traces_1_round): Use counts only.
7128         (push_to_next_round_p): Likewise.
7129         (find_traces): Likewise.
7130         (rotate_loop): Likewise.
7131         (find_traces_1_round): Likewise.
7132         (connect_traces): Likewise.
7133         (edge_order): Likewise.
7134
7135 2017-11-09  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7136
7137         * config/arm/arm.c (output_return_instruction): Add comments to
7138         indicate requirement for cmse_nonsecure_entry return to account
7139         for the size of clearing instruction output here.
7140         (thumb_exit): Likewise.
7141         * config/arm/thumb2.md (thumb2_cmse_entry_return): Fix length for
7142         return in hardfloat mode.
7143
7144 2017-11-09  Segher Boessenkool  <segher@kernel.crashing.org>
7145
7146         * config/rs6000/rs6000.c (machine_function): Add a bool,
7147         "toc_is_wrapped_separately".
7148         (rs6000_option_override_internal): Enable OPTION_MASK_SAVE_TOC_INDIRECT
7149         if it wasn't explicitly set or unset, we are optimizing for speed, and
7150         doing separate shrink-wrapping.
7151         (rs6000_get_separate_components): Enable the TOC component if
7152         saving the TOC register in the prologue.
7153         (rs6000_components_for_bb): Handle the TOC component.
7154         (rs6000_emit_prologue_components): Store the TOC register where needed.
7155         (rs6000_set_handled_components): Mark TOC as handled, if handled.
7156         (rs6000_emit_prologue): Don't save the TOC if that is already done.
7157
7158 2017-11-09  Martin Jambor  <mjambor@suse.cz>
7159
7160         * ipa-param-manipulation.c: New file.
7161         * ipa-param-manipulation.h: Likewise.
7162         * Makefile.in (OBJS): Add ipa-param-manipulation.o.
7163         (PLUGIN_HEADERS): Addded ipa-param-manipulation.h
7164         * ipa-param.h (ipa_parm_op): Moved to ipa-param-manipulation.h.
7165         (ipa_parm_adjustment): Likewise.
7166         (ipa_parm_adjustment_vec): Likewise.
7167         (ipa_get_vector_of_formal_parms): Moved declaration to
7168         ipa-param-manipulation.h.
7169         (ipa_get_vector_of_formal_parm_types): Likewise.
7170         (ipa_modify_formal_parameters): Likewise.
7171         (ipa_modify_call_arguments): Likewise.
7172         (ipa_combine_adjustments): Likewise.
7173         (ipa_dump_param_adjustments): Likewise.
7174         (ipa_modify_expr): Likewise.
7175         (ipa_get_adjustment_candidate): Likewise.
7176         * ipa-prop.c (ipa_get_vector_of_formal_parms): Moved to
7177         ipa-param-manipulation.c.
7178         (ipa_get_vector_of_formal_parm_types): Likewise.
7179         (ipa_modify_formal_parameters): Likewise.
7180         (ipa_modify_call_arguments): Likewise.
7181         (ipa_modify_expr): Likewise.
7182         (get_ssa_base_param): Likewise.
7183         (ipa_get_adjustment_candidate): Likewise.
7184         (index_in_adjustments_multiple_times_p): Likewise.
7185         (ipa_combine_adjustments): Likewise.
7186         (ipa_dump_param_adjustments): Likewise.
7187         * tree-sra.c: Also include ipa-param-manipulation.h
7188         * omp-simd-clone.c: Include ipa-param-manipulation.h instead of
7189         ipa-param.h.
7190
7191 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
7192             Alan Hayward  <alan.hayward@arm.com>
7193             David Sherwood  <david.sherwood@arm.com>
7194
7195         * doc/sourcebuild.texi (vect_masked_store): Document.
7196
7197 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
7198             Alan Hayward  <alan.hayward@arm.com>
7199             David Sherwood  <david.sherwood@arm.com>
7200
7201         * doc/sourcebuild.texi (vect_align_stack_vars): Document.
7202
7203 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
7204             Alan Hayward  <alan.hayward@arm.com>
7205             David Sherwood  <david.sherwood@arm.com>
7206
7207         * doc/sourcebuild.texi (vect_variable_length): Document.
7208
7209 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
7210             Alan Hayward  <alan.hayward@arm.com>
7211             David Sherwood  <david.sherwood@arm.com>
7212
7213         * doc/sourcebuild.texi (vect_unaligned_possible): Document.
7214
7215 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
7216             Alan Hayward  <alan.hayward@arm.com>
7217             David Sherwood  <david.sherwood@arm.com>
7218
7219         * doc/sourcebuild.texi (vect_element_align_preferred): Document.
7220
7221 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
7222             Alan Hayward  <alan.hayward@arm.com>
7223             David Sherwood  <david.sherwood@arm.com>
7224
7225         * doc/sourcebuild.texi (vect_perm_short, vect_perm_byte): Document
7226         previously undocumented selectors.
7227         (vect_perm3_byte, vect_perm3_short, vect_perm3_int): Document.
7228
7229 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
7230
7231         * doc/rtl.texi (const_vector): Say that elements can be
7232         const_wide_ints too.
7233         * emit-rtl.h (valid_for_const_vec_duplicate_p): Declare.
7234         * emit-rtl.c (valid_for_const_vec_duplicate_p): New function.
7235         (gen_vec_duplicate): Use it instead of CONSTANT_P.
7236         * optabs.c (expand_vector_broadcast): Likewise.
7237
7238 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
7239             Alan Hayward  <alan.hayward@arm.com>
7240             David Sherwood  <david.sherwood@arm.com>
7241
7242         * tree-ssa-loop-ivopts.c (get_address_cost): Try using a
7243         scaled index even if the unscaled address was invalid.
7244         Don't increase the complexity of using a scale in that case.
7245
7246 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
7247             Alan Hayward  <alan.hayward@arm.com>
7248             David Sherwood  <david.sherwood@arm.com>
7249
7250         * doc/rtl.texi: Rewrite the subreg rules so that they partition
7251         the inner register into REGMODE_NATURAL_SIZE bytes rather than
7252         UNITS_PER_WORD bytes.
7253         * emit-rtl.c (validate_subreg): Divide subregs into blocks
7254         based on REGMODE_NATURAL_SIZE of the inner mode.
7255         (gen_lowpart_common): Split the SCALAR_FLOAT_MODE_P and
7256         !SCALAR_FLOAT_MODE_P cases.  Use REGMODE_NATURAL_SIZE for the latter.
7257         * expmed.c (lowpart_bit_field_p): Divide the value up into
7258         chunks of REGMODE_NATURAL_SIZE rather than UNITS_PER_WORD.
7259         * expr.c (store_constructor): Use REGMODE_NATURAL_SIZE to test
7260         whether something is likely to occupy more than one register.
7261
7262 2017-11-09  Jan Hubicka  <hubicka@ucw.cz>
7263
7264         PR ipa/82879
7265         * ipa-inline-transform.c (update_noncloned_frequencies): Use
7266         profile_count::adjust_for_ipa_scaling.
7267         * tree-inline.c (copy_bb, copy_cfg_body): Likewise.
7268         * profile-count.c (profile_count::adjust_for_ipa_scaling): New member
7269         function.
7270         * profile-count.h (profile_count::adjust_for_ipa_scaling): Declare.
7271
7272 2017-11-09  Jakub Jelinek  <jakub@redhat.com>
7273
7274         * gimple-ssa-store-merging.c (count_multiple_uses): New function.
7275         (split_group): Add total_orig and total_new arguments, estimate the
7276         number of statements related to the store group without store merging
7277         and with store merging.
7278         (imm_store_chain_info::output_merged_store): Adjust split_group
7279         callers, punt if estimated number of statements with store merging
7280         is not smaller than estimated number of statements without it.
7281         Formatting fix.
7282         (handled_load): Remove has_single_use checks.
7283         (pass_store_merging::process_store): Likewise.
7284
7285 2017-11-09  Richard Biener  <rguenther@suse.de>
7286
7287         PR tree-optimization/82902
7288         * tree-ssa-phiprop.c (propagate_with_phi): Test proper type.
7289
7290 2017-11-09  Martin Liska  <mliska@suse.cz>
7291
7292         PR target/82863
7293         * emit-rtl.c (init_emit_regs): Initialize split_branch_probability to
7294         uninitialized.
7295
7296 2017-11-09  Martin Liska  <mliska@suse.cz>
7297
7298         PR tree-optimization/82669
7299         * sbitmap.h (bmp_iter_set_init): Remove non needed check.
7300
7301 2017-11-09  Martin Liska  <mliska@suse.cz>
7302
7303         PR gcov-profile/48463
7304         * coverage.c (coverage_begin_function): Output also end locus
7305         of a function and information whether the function is
7306         artificial.
7307         * gcov-dump.c (tag_function): Parse and print the information.
7308         * gcov.c (INCLUDE_MAP): Add include.
7309         (INCLUDE_SET): Likewise.
7310         (struct line_info): Move earlier in the source file because
7311         of vector<line_info> in function_info structure.
7312         (line_info::line_info): Likewise.
7313         (line_info::has_block): Likewise.
7314         (struct source_info): Add new member index.
7315         (source_info::get_functions_at_location): New function.
7316         (function_info::group_line_p): New function.
7317         (output_intermediate_line): New function.
7318         (output_intermediate_file): Use the mentioned function.
7319         (struct function_start): New.
7320         (struct function_start_pair_hash): Likewise.
7321         (process_file): Add code that identifies group functions.
7322         Assign lines either to global or function scope.
7323         (generate_results): Skip artificial functions.
7324         (find_source): Assign index for each source file.
7325         (read_graph_file): Read new flag artificial and end_line.
7326         (add_line_counts): Assign it either to global of function scope.
7327         (accumulate_line_counts): Isolate core of the function to
7328         accumulate_line_info and call it for both function and global
7329         scope lines.
7330         (accumulate_line_info): New function.
7331         (output_line_beginning): Fix GNU coding style.
7332         (print_source_line): New function.
7333         (output_line_details): Likewise.
7334         (output_function_details): Likewise.
7335         (output_lines): Iterate both source (global) scope and function
7336         scope.
7337         (struct function_line_start_cmp): New class.
7338         * doc/gcov.texi: Reflect changes in documentation.
7339
7340 2017-11-09  Jakub Jelinek  <jakub@redhat.com>
7341
7342         PR debug/82837
7343         * dwarf2out.c (const_ok_for_output_1): Reject NEG in addition to NOT.
7344         (mem_loc_descriptor): Handle (const (neg (...))) as (neg (const (...)))
7345         and similarly for not instead of neg.
7346
7347 2017-11-08  Andi Kleen  <ak@linux.intel.com>
7348
7349         * config/i386/i386.opt: Add -mforce-indirect-call.
7350         * config/i386/predicates.md: Check for flag_force_indirect_call.
7351         * doc/invoke.texi: Document -mforce-indirect-call
7352
7353 2017-11-08  Kito Cheng  <kito.cheng@gmail.com>
7354
7355         * config/riscv/riscv-protos.h (riscv_slow_unaligned_access_p):
7356         New extern.
7357         (MOVE_RATIO): Use riscv_slow_unaligned_access_p.
7358         config/riscv/riscv.c (predict.h): New include.
7359         (riscv_slow_unaligned_access_p): No longer static.
7360         (riscv_block_move_straight): Add require.
7361         * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): Delete.
7362
7363 2017-11-08  Jakub Jelinek  <jakub@redhat.com>
7364
7365         PR target/82855
7366         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>,
7367         <avx512>_eq<mode>3<mask_scalar_merge_name>_1): Use
7368         nonimmediate_operand predicate for operand 1 instead of
7369         register_operand.
7370
7371 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7372
7373         * config/aarch64/aarch64-simd.md (store_pair_lanes<mode>):
7374         New pattern.
7375         * config/aarch64/constraints.md (Uml): New constraint.
7376         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): New
7377         predicate.
7378
7379 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7380
7381         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
7382         of two vec_duplicates into a vec_concat.
7383
7384 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7385
7386         * simplify-rtx.c (simplify_ternary_operation, VEC_MERGE):
7387         Simplify vec_merge of vec_duplicate and vec_concat.
7388         * config/aarch64/constraints.md (Utq): New constraint.
7389         * config/aarch64/aarch64-simd.md (load_pair_lanes<mode>): New
7390         define_insn.
7391
7392 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7393
7394         * simplify-rtx.c (simplify_ternary_operation, VEC_MERGE):
7395         Simplify vec_merge of vec_duplicate and const_vector.
7396         * config/aarch64/predicates.md (aarch64_simd_or_scalar_imm_zero):
7397         New predicate.
7398         * config/aarch64/aarch64-simd.md (*aarch64_combinez<mode>): Use VDC
7399         mode iterator.  Update predicate on operand 1 to
7400         handle non-const_vec constants.  Delete constraints.
7401         (*aarch64_combinez_be<mode>): Likewise for operand 2.
7402
7403 2017-11-08  Jakub Jelinek  <jakub@redhat.com>
7404
7405         PR tree-optimization/78821
7406         * gimple-ssa-store-merging.c (struct store_operand_info): Add bit_not_p
7407         data member.
7408         (store_operand_info::store_operand_info): Initialize it to false.
7409         (pass_store_merging::terminate_all_aliasing_chains): Rewritten to use
7410         ref_maybe_used_by_stmt_p and stmt_may_clobber_ref_p on lhs of each
7411         store in the group, and if chain_info is non-NULL, to ignore altogether
7412         that chain.
7413         (compatible_load_p): Fail if bit_not_p does not match.
7414         (imm_store_chain_info::output_merged_store): Handle bit_not_p loads.
7415         (handled_load): Fill in bit_not_p.  Handle BIT_NOT_EXPR.
7416         (pass_store_merging::process_store): Adjust
7417         terminate_all_aliasing_chains calls to pass NULL in all current spots,
7418         call terminate_all_aliasing_chains newly when adding a store into
7419         a chain with non-NULL chain_info.
7420
7421 2017-11-08  Wilco Dijkstra  <wdijkstr@arm.com>
7422
7423         * config/aarch64/aarch64.c (aarch64_can_eliminate): Simplify logic.
7424
7425 2017-11-08  Wilco Dijkstra  <wdijkstr@arm.com>
7426
7427         * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
7428         Remove.
7429         (aarch64_layout_frame): Initialise emit_frame_chain.
7430         (aarch64_can_eliminate): Remove omit leaf frame pointer code.
7431         (TARGET_FRAME_POINTER_REQUIRED): Remove define.
7432
7433 2017-11-08  Martin Liska  <mliska@suse.cz>
7434
7435         * gimplify.c (expand_FALLTHROUGH_r): Simplify usage
7436         of gimple_call_internal_p.
7437
7438 2017-11-07  Tom de Vries  <tom@codesourcery.com>
7439
7440         * config/mips/mips.h (ASM_OUTPUT_LABELREF): Wrap in "do {} while (0)".
7441
7442 2017-11-07  Tom de Vries  <tom@codesourcery.com>
7443
7444         * config/mips/mips.h (ASM_OUTPUT_CASE_END): Remove semicolon after
7445         "do {} while (0)".
7446
7447 2017-11-08  Martin Liska  <mliska@suse.cz>
7448
7449         PR sanitizer/82792
7450         * gimplify.c (expand_FALLTHROUGH_r): Skip IFN_ASAN_MARK.
7451
7452 2017-11-07  Eric Botcazou  <ebotcazou@adacore.com>
7453
7454         * gimple-pretty-print.c (dump_profile): Return "" instead of NULL.
7455
7456 2017-11-07  Jakub Jelinek  <jakub@redhat.com>
7457
7458         PR target/82855
7459         * config/i386/i386.md (SWI1248_AVX512BWDQ2_64): New mode iterator.
7460         (*cmp<mode>_ccz_1): New insn with $k alternative.
7461
7462         PR target/82855
7463         * config/i386/i386.c (ix86_swap_binary_operands_p): Treat
7464         RTX_COMM_COMPARE as commutative as well.
7465         (ix86_binary_operator_ok): Formatting fix.
7466         * config/i386/sse.md (*mul<mode>3<mask_name><round_name>,
7467         *<code><mode>3<mask_name><round_saeonly_name>,
7468         *<code><mode>3<mask_name>, *<code>tf3, *mul<mode>3<mask_name>,
7469         *<s>mul<mode>3_highpart<mask_name>,
7470         *vec_widen_umult_even_v16si<mask_name>,
7471         *vec_widen_umult_even_v8si<mask_name>,
7472         *vec_widen_umult_even_v4si<mask_name>,
7473         *vec_widen_smult_even_v16si<mask_name>,
7474         *vec_widen_smult_even_v8si<mask_name>, *sse4_1_mulv2siv2di3<mask_name>,
7475         *avx2_pmaddwd, *sse2_pmaddwd, *<sse4_1_avx2>_mul<mode>3<mask_name>,
7476         *avx2_<code><mode>3, *avx512f_<code><mode>3<mask_name>,
7477         *sse4_1_<code><mode>3<mask_name>, *<code>v8hi3,
7478         *sse4_1_<code><mode>3<mask_name>, *<code>v16qi3, *avx2_eq<mode>3,
7479         <avx512>_eq<mode>3<mask_scalar_merge_name>_1, *sse4_1_eqv2di3,
7480         *sse2_eq<mode>3, <mask_codefor><code><mode>3<mask_name>,
7481         *<code><mode>3, *<sse2_avx2>_uavg<mode>3<mask_name>,
7482         *<ssse3_avx2>_pmulhrsw<mode>3<mask_name>, *ssse3_pmulhrswv4hi3): Use
7483         !(MEM_P (operands[1]) && MEM_P (operands[2])) condition instead of
7484         ix86_binary_operator_ok.  Formatting fixes.
7485         (*<plusminus_insn><mode>3<mask_name><round_name>,
7486         *<plusminus_insn><mode>3, *<plusminus_insn><mode>3_m): Formatting
7487         fixes.
7488
7489 2017-11-07  Segher Boessenkool  <segher@kernel.crashing.org>
7490
7491         * config/rs6000/rs6000.md (GPR2): New mode_iterator.
7492         ("cstore<mode>4"): Don't always expand with rs6000_emit_int_cmove for
7493         eq and ne if TARGET_ISEL.
7494         (cmp): New code_iterator.
7495         (UNS, UNSU_, UNSIK): New code_attrs.
7496         (<code><GPR:mode><GPR2:mode>2_isel): New define_insn_and_split.
7497         ("eq<mode>3"): New define_expand, rename the define_insn_and_split
7498         to...
7499         ("eq<mode>3"): ... this.
7500         ("ne<mode>3"): New define_expand, rename the define_insn_and_split
7501         to...
7502         ("ne<mode>3"): ... this.
7503
7504 2017-11-07  Julia Koval  <julia.koval@intel.com>
7505
7506         PR target/82812
7507         * common/config/i386/i386-common.c
7508         (OPTION_MASK_ISA_GENERAL_REGS_ONLY_UNSET): Remove MPX from flag.
7509         (ix86_handle_option): Move MPX to isa_flags2 and GFNI to isa_flags.
7510         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto.
7511         * config/i386/i386.opt: Ditto.
7512         * config/i386/i386.c (ix86_target_string): Ditto.
7513         (ix86_option_override_internal): Ditto.
7514         (ix86_init_mpx_builtins): Move MPX to args2.
7515         (ix86_expand_builtin): Special handling for OPTION_MASK_ISA_GFNI.
7516         * config/i386/i386-builtin.def (__builtin_ia32_vgf2p8affineinvqb_v64qi,
7517         __builtin_ia32_vgf2p8affineinvqb_v64qi_mask,
7518         __builtin_ia32_vgf2p8affineinvqb_v32qi,
7519         __builtin_ia32_vgf2p8affineinvqb_v32qi_mask,
7520         __builtin_ia32_vgf2p8affineinvqb_v16qi,
7521         __builtin_ia32_vgf2p8affineinvqb_v16qi_mask): Move to ARGS array.
7522
7523 2017-11-07  Uros Bizjak  <ubizjak@gmail.com>
7524
7525         PR target/80425
7526         * config/i386.i386.md (*zero_extendsidi2): Change (?r,*Yj), (?*Yi,r)
7527         and (*x,m) to ($r,Yj), ($Yi,r) and ($x,m).
7528         (zero-extendsidi peephole2): Remove peephole.
7529
7530 2017-11-07  Eric Botcazou  <ebotcazou@adacore.com>
7531
7532         PR c/53037
7533         * stor-layout.c: Include attribs.h.
7534         (handle_warn_if_not_align): Replace test on TYPE_USER_ALIGN with
7535         explicit lookup of "aligned" attribute.
7536
7537 2017-11-07  Andrew Waterman  <andrew@sifive.com>
7538
7539         * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): New prototype.
7540         (riscv_expand_block_move): Likewise.
7541         * config/riscv/riscv.h (MOVE_RATIO): Tune cost to movmemsi
7542         implementation.
7543         (RISCV_MAX_MOVE_BYTES_PER_LOOP_ITER): New define.
7544         (RISCV_MAX_MOVE_BYTES_STRAIGHT): New define.
7545         * config/riscv/riscv.c (riscv_block_move_straight): New function.
7546         (riscv_adjust_block_mem): Likewise.
7547         (riscv_block_move_loop): Likewise.
7548         (riscv_expand_block_move): Likewise.
7549         * config/riscv/riscv.md (movmemsi): New pattern.
7550
7551 2017-11-07  Michael Clark  <michaeljclark@mac.com>
7552
7553         * config/riscv/linux.h (MUSL_ABI_SUFFIX): New define.
7554         (MUSL_DYNAMIC_LINKER): Likewise.
7555
7556 2017-11-07  Richard Sandiford  <richard.sandiford@linaro.org>
7557
7558         * config/aarch64/aarch64.md (ashl<mode>3, ashr<mode>3, lshr<mode>3)
7559         (rotr<mode>3, rotl<mode>3): Use aarch64_reg_or_imm instead of
7560         nonmmory_operand.
7561
7562 2017-11-07  Richard Biener  <rguenther@suse.de>
7563
7564         * match.pd: Fix build.
7565
7566 2017-11-07  Wilco Dijkstra  <wdijkstr@arm.com>
7567             Jackson Woodruff  <jackson.woodruff@arm.com>
7568
7569         PR tree-optimization/71026
7570         * match.pd: Canonicalize negate in division.
7571
7572 2017-11-07  Sudakshina Das  <sudi.das@arm.com>
7573
7574         PR middle-end/80131
7575         * match.pd: Simplify 1 << (C - x) where C = precision (x) - 1.
7576
7577 2017-11-07  Marc Glisse  <marc.glisse@inria.fr>
7578
7579         * match.pd ((a&~b)|(a^b),(a&~b)^~a,(a|b)&~(a^b),a|~(a^b),
7580         (a|b)|(a&^b),(a&b)|~(a^b),~(~a&b),~X^Y): New transformations.
7581
7582 2017-11-07  Marc Glisse  <marc.glisse@inria.fr>
7583
7584         * fold-const.c (negate_expr_p) [PLUS_EXPR, MINUS_EXPR]: Handle
7585         non-scalar integral types.
7586         * match.pd (negate_expr_p): Handle MINUS_EXPR.
7587         (-(A-B), -(~A)): New transformations.
7588
7589 2017-11-07  Tom de Vries  <tom@codesourcery.com>
7590
7591         * config/powerpcspe/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Remove
7592         semicolon after "do {} while (0)".
7593         * config/powerpcspe/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
7594         * config/powerpcspe/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
7595         * config/powerpcspe/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
7596         * config/powerpcspe/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
7597         * config/powerpcspe/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
7598
7599 2017-11-07  Tom de Vries  <tom@codesourcery.com>
7600
7601         * config/rs6000/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Remove semicolon
7602         after "do {} while (0)".
7603         * config/rs6000/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
7604         * config/rs6000/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
7605         * config/rs6000/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
7606         * config/rs6000/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
7607         * config/rs6000/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
7608
7609 2017-11-07  Tom de Vries  <tom@codesourcery.com>
7610
7611         PR other/82784
7612         * config/arm/arm.c (HANDLE_NARROW_SHIFT_ARITH): Remove semicolon after
7613         "while {} do (0)".
7614         (arm_rtx_costs_internal): Add missing semicolon after
7615         HANDLE_NARROW_SHIFT_ARITH call.
7616
7617 2017-11-06  Segher Boessenkool  <segher@kernel.crashing.org>
7618
7619         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
7620         disable isel if it was not set explicitly.
7621
7622 2017-11-06  James Bowman  <james.bowman@ftdichip.com>
7623
7624         * gcc/dwarf2out.c (modified_type_die): Retain ADDR_SPACE qualifiers.
7625         (add_type_attribute) likewise.
7626
7627 2017-11-06  H.J. Lu  <hongjiu.lu@intel.com>
7628
7629         * config/i386/i386.c (ix86_can_use_return_insn_p): Use reference
7630         of struct ix86_frame.
7631         (ix86_initial_elimination_offset): Likewise.
7632         (ix86_expand_split_stack_prologue): Likewise.
7633
7634 2017-11-06  Marc Glisse  <marc.glisse@inria.fr>
7635
7636         * tree-vrp.h (enum value_range_type): Update stale comment.
7637
7638 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
7639             Alan Hayward  <alan.hayward@arm.com>
7640             David Sherwood  <david.sherwood@arm.com>
7641
7642         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm)
7643         (aarch64_expand_vec_perm_const): Take the number of units too.
7644         * config/aarch64/aarch64.c (aarch64_expand_vec_perm)
7645         (aarch64_expand_vec_perm_const): Likewise.
7646         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>)
7647         (vec_perm<mode>): Update accordingly.
7648
7649 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
7650             Alan Hayward  <alan.hayward@arm.com>
7651             David Sherwood  <david.sherwood@arm.com>
7652
7653         * config/aarch64/aarch64-protos.h (aarch64_simd_vect_par_cnst_half):
7654         Take the number of units too.
7655         * config/aarch64/aarch64.c (aarch64_simd_vect_par_cnst_half): Likewise.
7656         (aarch64_simd_check_vect_par_cnst_half): Update call accordingly,
7657         but check for a vector mode before rather than after the call.
7658         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
7659         (move_hi_quad_<mode>, vec_unpack<su>_hi_<mode>)
7660         (vec_unpack<su>_lo_<mode, vec_widen_<su>mult_lo_<mode>)
7661         (vec_widen_<su>mult_hi_<mode>, vec_unpacks_lo_<mode>)
7662         (vec_unpacks_hi_<mode>, aarch64_saddl2<mode>, aarch64_uaddl2<mode>)
7663         (aarch64_ssubl2<mode>, aarch64_usubl2<mode>, widen_ssum<mode>3)
7664         (widen_usum<mode>3, aarch64_saddw2<mode>, aarch64_uaddw2<mode>)
7665         (aarch64_ssubw2<mode>, aarch64_usubw2<mode>, aarch64_sqdmlal2<mode>)
7666         (aarch64_sqdmlsl2<mode>, aarch64_sqdmlal2_lane<mode>)
7667         (aarch64_sqdmlal2_laneq<mode>, aarch64_sqdmlsl2_lane<mode>)
7668         (aarch64_sqdmlsl2_laneq<mode>, aarch64_sqdmlal2_n<mode>)
7669         (aarch64_sqdmlsl2_n<mode>, aarch64_sqdmull2<mode>)
7670         (aarch64_sqdmull2_lane<mode>, aarch64_sqdmull2_laneq<mode>)
7671         (aarch64_sqdmull2_n<mode>): Update accordingly.
7672
7673 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
7674             Alan Hayward  <alan.hayward@arm.com>
7675             David Sherwood  <david.sherwood@arm.com>
7676
7677         * config/aarch64/aarch64-protos.h (aarch64_reverse_mask): Take
7678         the number of units too.
7679         * config/aarch64/aarch64.c (aarch64_reverse_mask): Likewise.
7680         * config/aarch64/aarch64-simd.md (vec_load_lanesoi<mode>)
7681         (vec_store_lanesoi<mode>, vec_load_lanesci<mode>)
7682         (vec_store_lanesci<mode>, vec_load_lanesxi<mode>)
7683         (vec_store_lanesxi<mode>): Update accordingly.
7684
7685 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
7686             Alan Hayward  <alan.hayward@arm.com>
7687             David Sherwood  <david.sherwood@arm.com>
7688
7689         * config/aarch64/aarch64-protos.h (aarch64_endian_lane_rtx): Declare.
7690         * config/aarch64/aarch64.c (aarch64_endian_lane_rtx): New function.
7691         * config/aarch64/aarch64.h (ENDIAN_LANE_N): Take the number
7692         of units rather than the mode.
7693         * config/aarch64/iterators.md (nunits): New mode attribute.
7694         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args):
7695         Use aarch64_endian_lane_rtx instead of GEN_INT (ENDIAN_LANE_N ...).
7696         * config/aarch64/aarch64-simd.md (aarch64_dup_lane<mode>)
7697         (aarch64_dup_lane_<vswap_width_name><mode>, *aarch64_mul3_elt<mode>)
7698         (*aarch64_mul3_elt_<vswap_width_name><mode>): Likewise.
7699         (*aarch64_mul3_elt_to_64v2df, *aarch64_mla_elt<mode>): Likewise.
7700         (*aarch64_mla_elt_<vswap_width_name><mode>, *aarch64_mls_elt<mode>)
7701         (*aarch64_mls_elt_<vswap_width_name><mode>, *aarch64_fma4_elt<mode>)
7702         (*aarch64_fma4_elt_<vswap_width_name><mode>):: Likewise.
7703         (*aarch64_fma4_elt_to_64v2df, *aarch64_fnma4_elt<mode>): Likewise.
7704         (*aarch64_fnma4_elt_<vswap_width_name><mode>): Likewise.
7705         (*aarch64_fnma4_elt_to_64v2df, reduc_plus_scal_<mode>): Likewise.
7706         (reduc_plus_scal_v4sf, reduc_<maxmin_uns>_scal_<mode>): Likewise.
7707         (reduc_<maxmin_uns>_scal_<mode>): Likewise.
7708         (*aarch64_get_lane_extend<GPI:mode><VDQQH:mode>): Likewise.
7709         (*aarch64_get_lane_zero_extendsi<mode>): Likewise.
7710         (aarch64_get_lane<mode>, *aarch64_mulx_elt_<vswap_width_name><mode>)
7711         (*aarch64_mulx_elt<mode>, *aarch64_vgetfmulx<mode>): Likewise.
7712         (aarch64_sq<r>dmulh_lane<mode>, aarch64_sq<r>dmulh_laneq<mode>)
7713         (aarch64_sqrdml<SQRDMLH_AS:rdma_as>h_lane<mode>): Likewise.
7714         (aarch64_sqrdml<SQRDMLH_AS:rdma_as>h_laneq<mode>): Likewise.
7715         (aarch64_sqdml<SBINQOPS:as>l_lane<mode>): Likewise.
7716         (aarch64_sqdml<SBINQOPS:as>l_laneq<mode>): Likewise.
7717         (aarch64_sqdml<SBINQOPS:as>l2_lane<mode>_internal): Likewise.
7718         (aarch64_sqdml<SBINQOPS:as>l2_laneq<mode>_internal): Likewise.
7719         (aarch64_sqdmull_lane<mode>, aarch64_sqdmull_laneq<mode>): Likewise.
7720         (aarch64_sqdmull2_lane<mode>_internal): Likewise.
7721         (aarch64_sqdmull2_laneq<mode>_internal): Likewise.
7722         (aarch64_vec_load_lanesoi_lane<mode>): Likewise.
7723         (aarch64_vec_store_lanesoi_lane<mode>): Likewise.
7724         (aarch64_vec_load_lanesci_lane<mode>): Likewise.
7725         (aarch64_vec_store_lanesci_lane<mode>): Likewise.
7726         (aarch64_vec_load_lanesxi_lane<mode>): Likewise.
7727         (aarch64_vec_store_lanesxi_lane<mode>): Likewise.
7728         (aarch64_simd_vec_set<mode>): Update use of ENDIAN_LANE_N.
7729         (aarch64_simd_vec_setv2di): Likewise.
7730
7731 2017-11-06  Carl Love  <cel@us.ibm.com>
7732
7733         * config/rs6000/rs6000-c.c (P8V_BUILTIN_VEC_REVB): Add power 8
7734         definitions.
7735         (P9V_BUILTIN_VEC_REVB): Remove the power 9 instance definitions.
7736         * config/rs6000/altivec.h (vec_revb): Change the #define from power 9
7737         to power 8.
7738         * config/rs6000/r6000-protos.h (swap_endian_selector_for_mode): Add new
7739         extern declaration.
7740         * config/rs6000/rs6000.c (swap_endian_selector_for_mode): Add function.
7741         * config/rs6000/rs6000-builtin.def (BU_P8V_VSX_1, BU_P8V_OVERLOAD_1):
7742         Add power 8 macro expansions.
7743         (BU_P9V_OVERLOAD_1): Remove power 9 overload expansion.
7744         * config/rs6000/vsx.md (revb_<mode>): Add define_expand to generate
7745         power 8 instructions.  (VSX_XXBR): Add iterator.
7746
7747 2017-11-06  Wilco Dijkstra  <wdijkstr@arm.com>
7748
7749         * config/arm/arm.md (predicable_short_it): Change default to "no",
7750         improve documentation, remove uses that are identical to the default.
7751         (enabled_for_depr_it): Rename to enabled_for_short_it.
7752         * gcc/config/arm/arm-fixed.md (predicable_short_it):
7753         Remove default uses.
7754         * gcc/config/arm/ldmstm.md (predicable_short_it): Likewise.
7755         * gcc/config/arm/sync.md (predicable_short_it): Likewise.
7756         * gcc/config/arm/thumb2.md (predicable_short_it): Likewise.
7757         * gcc/config/arm/vfp.md (predicable_short_it): Likewise.
7758
7759 2017-11-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
7760
7761         PR target/82748
7762         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_1): Delete
7763         float128 helper macros, which are no longer used after deleting
7764         the old 'q' built-in functions, and moving the round to odd
7765         built-in functions to being special built-in functions.
7766         (BU_FLOAT128_2): Likewise.
7767         (BU_FLOAT128_1_HW): Likewise.
7768         (BU_FLOAT128_2_HW): Likewise.
7769         (BU_FLOAT128_3_HW): Likewise.
7770         (FABSQ): Delete old 'q' built-in functions.
7771         (COPYSIGNQ): Likewise.
7772         (SQRTF128_ODD): Move round to odd built-in functions to be
7773         special built-in functions, so that we can handle
7774         -mabi=ieeelongdouble.
7775         (TRUNCF128_ODD): Likewise.
7776         (ADDF128_ODD): Likewise.
7777         (SUBF128_ODD): Likewise.
7778         (MULF128_ODD): Likewise.
7779         (DIVF128_ODD): Likewise.
7780         (FMAF128_ODD): Likewise.
7781         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Map old 'q'
7782         built-in names to 'f128'.
7783         * config/rs6000/rs6000.c (rs6000_fold_builtin): Remove folding the
7784         old 'q' built-in functions, as the machine independent code for
7785         'f128' built-in functions handles this.
7786         (rs6000_expand_builtin): Add expansion for float128 round to odd
7787         functions, keying off on -mabi=ieeelongdouble of whether to use
7788         the KFmode or TFmode variant.
7789         (rs6000_init_builtins): Initialize the _Float128 round to odd
7790         built-in functions.
7791         * doc/extend.texi (PowerPC Built-in Functions): Document the old
7792         _Float128 'q' built-in functions are now mapped into the new
7793         'f128' built-in functions.
7794
7795 2017-11-06  David Edelsohn  <dje.gcc@gmail.com>
7796
7797         * collect2.c (add_lto_object): Compile for OBJECT_COFF.
7798         (scan_prog_file): Don't skip PASS_LTOINFO. Scan for LTO objects.
7799
7800 2017-11-06  David Malcolm  <dmalcolm@redhat.com>
7801
7802         PR jit/82826
7803         * ipa-fnsummary.c (ipa_fnsummary_c_finalize): New function.
7804         * ipa-fnsummary.h (ipa_fnsummary_c_finalize): New decl.
7805         * toplev.c: Include "ipa-fnsummary.h".
7806         (toplev::finalize): Call ipa_fnsummary_c_finalize.
7807
7808 2017-11-06  Jakub Jelinek  <jakub@redhat.com>
7809
7810         PR tree-optimization/82838
7811         * gimple-ssa-store-merging.c
7812         (imm_store_chain_info::output_merged_store): Call force_gimple_operand_1
7813         on a separate gimple_seq which is then appended to seq.
7814
7815 2017-11-06  Jeff Law  <law@redhat.com>
7816
7817         PR target/82788
7818         * config/i386/i386.c (PROBE_INTERVAL): Remove.
7819         (get_probe_interval): New functions.
7820         (ix86_adjust_stack_and_probe_stack_clash): Use get_probe_interval.
7821         (ix86_adjust_stack_and_probe): Likewise.
7822         (output_adjust_stack_and_probe): Likewise.
7823         (ix86_emit_probe_stack_range): Likewise.
7824         (ix86_expand_prologue): Likewise.
7825
7826 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
7827
7828         PR tree-optimization/82816
7829         * tree-ssa-math-opts.c (convert_mult_to_widen): Return false
7830         if the modes of the two types are the same.
7831         (convert_plusminus_to_widen): Likewise.
7832
7833 2017-11-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
7834
7835         * config/rs6000/altivec.md (*p9_vadu<mode>3) Rename to
7836         p9_vadu<mode>3.
7837         (usadv16qi): New define_expand.
7838         (usadv8hi): New define_expand.
7839
7840 2017-11-06  Jan Hubicka  <hubicka@ucw.cz>
7841
7842         PR bootstrap/82832
7843         * ipa-inline-transform.c (update_noncloned_frequencies): Always
7844         scale.
7845         (inline_transform): Likewise.
7846         * predict.c (counts_to_freqs): Remove useless conditional.
7847         * profile-count.h (profile_count::apply_scale): Move sanity check.
7848         * tree-inline.c (copy_bb): Always scale.
7849         (copy_cfg_body): Likewise.
7850
7851 2017-11-06  Christophe Lyon  <christophe.lyon@linaro.org>
7852
7853         PR target/67591
7854         * config/arm/arm.md (*sub_shiftsi): Add predicable_short_it
7855         attribute.
7856         (*cmp_ite0): Add enabled_for_depr_it attribute.
7857         (*cmp_ite1): Likewise.
7858
7859 2017-11-06  Segher Boessenkool  <segher@kernel.crashing.org>
7860
7861         * config/rs6000/rs6000.c (rs6000_insn_cost): Handle TYPE_MFCR and
7862         TYPE_MFCRF.
7863
7864 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
7865
7866         * tree-vrp.c (vrp_int_const_binop): Return true on success and
7867         return the value by pointer.
7868         (extract_range_from_multiplicative_op_1): Update accordingly.
7869         Return as soon as an operation fails.
7870
7871 2017-11-05  Tom de Vries  <tom@codesourcery.com>
7872
7873         PR other/82784
7874         * asan.c (DEF_SANITIZER_BUILTIN_1): Factor out of ...
7875         (DEF_SANITIZER_BUILTIN): ... here.
7876         (initialize_sanitizer_builtins): Use DEF_SANITIZER_BUILTIN_1 instead of
7877         DEF_SANITIZER_BUILTIN in if stmt.  Add missing semicolon.
7878
7879 2017-11-05  Tom de Vries  <tom@codesourcery.com>
7880
7881         PR other/82784
7882         * config/elfos.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove semicolon after
7883         macro body.
7884         (ASM_OUTPUT_CASE_LABEL): Add semicolon after
7885         ASM_OUTPUT_BEFORE_CASE_LABEL call.
7886         * config/arc/arc.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove semicolon
7887         after macro body.
7888         * config/m68k/m68kelf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
7889         * config/mips/mips.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
7890         * config/v850/v850.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
7891
7892 2017-11-05  Tom de Vries  <tom@codesourcery.com>
7893
7894         PR other/82784
7895         * graphite-scop-detection.c (DEBUG_PRINT): Remove semicolon after
7896         "do {} while (0)".
7897
7898 2017-11-04  Michael Clark  <michaeljclark@mac.com>
7899
7900         * config/riscv/riscv.c (riscv_print_operand): Add a 'i' format.
7901         config/riscv/riscv.md (addsi3): Use 'i' for immediates.
7902         (adddi3): Likewise.
7903         (*addsi3_extended): Likewise.
7904         (*addsi3_extended2): Likewise.
7905         (<optab>si3): Likewise.
7906         (<optab>di3): Likewise.
7907         (<optab><mode>3): Likewise.
7908         (<*optabe>si3_internal): Likewise.
7909         (zero_extendqi<SUPERQI:mode>2): Likewise.
7910         (*add<mode>hi3): Likewise.
7911         (*xor<mode>hi3): Likewise.
7912         (<optab>di3): Likewise.
7913         (*<optab>si3_extend): Likewise.
7914         (*sge<u>_<X:mode><GPR:mode>): Likewise.
7915         (*slt<u>_<X:mode><GPR:mode>): Likewise.
7916         (*sle<u>_<X:mode><GPR:mode>): Likewise.
7917
7918 2017-11-04  Andrew Waterman  <andrew@sifive.com>
7919
7920         * config/riscv/riscv.c (riscv_option_override): Conditionally set
7921         TARGET_STRICT_ALIGN based upon -mtune argument.
7922
7923 2017-11-04  Andrew Waterman  <andrew@sifive.com>
7924
7925         * config/riscv/riscv.h (SLOW_BYTE_ACCESS): Change to 1.
7926
7927 2017-11-04  Daniel Santos  <daniel.santos@pobox.com>
7928
7929         * config/i386/i386.c (choose_basereg): Use optional scratch
7930         register and add assertion.
7931         (x86_emit_outlined_ms2sysv_save): Use scratch register when
7932         needed, and don't allocate stack.
7933         (ix86_expand_prologue): Rearrange where SSE saves/stub call is
7934         emitted, correct wrong allocation with -mcall-ms2sysv-xlogues.
7935         (ix86_emit_outlined_ms2sysv_restore): Fix non-immediate offsets.
7936
7937 2017-11-03  Jeff Law  <law@redhat.com>
7938
7939         * config/i386/i386.c (ix86_emit_restore_reg_using_pop): Prototype.
7940         (ix86_adjust_stack_and_probe_stack_clash): Use a push/pop sequence
7941         to probe at the start of a noreturn function.
7942
7943 2017-11-03  Jakub Jelinek  <jakub@redhat.com>
7944
7945         PR tree-optimization/78821
7946         * gimple-ssa-store-merging.c: Update the file comment.
7947         (MAX_STORE_ALIAS_CHECKS): Define.
7948         (struct store_operand_info): New type.
7949         (store_operand_info::store_operand_info): New constructor.
7950         (struct store_immediate_info): Add rhs_code and ops data members.
7951         (store_immediate_info::store_immediate_info): Add rhscode, op0r
7952         and op1r arguments to the ctor, initialize corresponding data members.
7953         (struct merged_store_group): Add load_align_base and load_align
7954         data members.
7955         (merged_store_group::merged_store_group): Initialize them.
7956         (merged_store_group::do_merge): Update them.
7957         (merged_store_group::apply_stores): Pick the constant for
7958         encode_tree_to_bitpos from one of the two operands, or skip
7959         encode_tree_to_bitpos if neither operand is a constant.
7960         (class pass_store_merging): Add process_store method decl.  Remove
7961         bool argument from terminate_all_aliasing_chains method decl.
7962         (pass_store_merging::terminate_all_aliasing_chains): Remove
7963         var_offset_p argument and corresponding handling.
7964         (stmts_may_clobber_ref_p): New function.
7965         (compatible_load_p): New function.
7966         (imm_store_chain_info::coalesce_immediate_stores): Terminate group
7967         if there is overlap and rhs_code is not INTEGER_CST.  For
7968         non-overlapping stores terminate group if rhs is not mergeable.
7969         (get_alias_type_for_stmts): Change first argument from
7970         auto_vec<gimple *> & to vec<gimple *> &.  Add IS_LOAD, CLIQUEP and
7971         BASEP arguments.  If IS_LOAD is true, look at rhs1 of the stmts
7972         instead of lhs.  Compute *CLIQUEP and *BASEP in addition to the
7973         alias type.
7974         (get_location_for_stmts): Change first argument from
7975         auto_vec<gimple *> & to vec<gimple *> &.
7976         (struct split_store): Remove orig_stmts data member, add orig_stores.
7977         (split_store::split_store): Create orig_stores rather than orig_stmts.
7978         (find_constituent_stmts): Renamed to ...
7979         (find_constituent_stores): ... this.  Change second argument from
7980         vec<gimple *> * to vec<store_immediate_info *> *, push pointers
7981         to info structures rather than the statements.
7982         (split_group): Rename ALLOW_UNALIGNED argument to
7983         ALLOW_UNALIGNED_STORE, add ALLOW_UNALIGNED_LOAD argument and handle
7984         it.  Adjust find_constituent_stores caller.
7985         (imm_store_chain_info::output_merged_store): Handle rhs_code other
7986         than INTEGER_CST, adjust split_group, get_alias_type_for_stmts and
7987         get_location_for_stmts callers.  Set MR_DEPENDENCE_CLIQUE and
7988         MR_DEPENDENCE_BASE on the MEM_REFs if they are the same in all stores.
7989         (mem_valid_for_store_merging): New function.
7990         (handled_load): New function.
7991         (pass_store_merging::process_store): New method.
7992         (pass_store_merging::execute): Use process_store method.  Adjust
7993         terminate_all_aliasing_chains caller.
7994
7995 2017-11-03  Wilco Dijkstra  <wdijkstr@arm.com>
7996
7997         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
7998         Return true for more constants, symbols and label references.
7999         (aarch64_valid_floating_const): Remove unused function.
8000
8001 2017-11-03  Wilco Dijkstra  <wdijkstr@arm.com>
8002
8003         PR target/82786
8004         * config/aarch64/aarch64.c (aarch64_layout_frame):
8005         Undo forcing of LR at bottom of frame.
8006
8007 2017-11-03  Jeff Law  <law@redhat.com>
8008
8009         PR target/82823
8010         * config/i386/i386.c (ix86_expand_prologue): Tighten assert
8011         for int_registers_saved.
8012
8013         * cfganal.c (single_pred_edge_ignoring_loop_edges): New function
8014         extracted from tree-ssa-dom.c.
8015         * cfganal.h (single_pred_edge_ignoring_loop_edges): Prototype.
8016         * tree-ssa-dom.c (single_incoming_edge_ignoring_loop_edges): Remove.
8017         (record_equivalences_from_incoming_edge): Add additional argument
8018         to single_pred_edge_ignoring_loop_edges call.
8019         * tree-ssa-uncprop.c (single_incoming_edge_ignoring_loop_edges): Remove.
8020         (uncprop_dom_walker::before_dom_children): Add additional argument
8021         to single_pred_edge_ignoring_loop_edges call.
8022         * tree-ssa-sccvn.c (sccvn_dom_walker::before_dom_children): Use
8023         single_pred_edge_ignoring_loop_edges rather than open coding.
8024         * tree-vrp.c (evrp_dom_walker::before_dom_children): Similarly.
8025
8026 2017-11-03  Marc Glisse  <marc.glisse@inria.fr>
8027
8028         * match.pd (-(-A)): Rewrite.
8029
8030 2017-11-03  Segher Boessenkool  <segher@kernel.crashing.org>
8031
8032         * config/rs6000/rs60000-protos.h (rs6000_emit_sISEL): Delete.
8033         (rs6000_emit_int_cmove): New declaration.
8034         * config/rs6000/rs6000.c (rs6000_emit_int_cmove): Delete declaration.
8035         (rs6000_emit_sISEL): Delete.
8036         (rs6000_emit_int_cmove): Make non-static.
8037         * config/rs6000/rs6000.md (cstore<mode>4): Use rs6000_emit_int_cmove
8038         instead of rs6000_emit_sISEL.
8039
8040 2017-11-03  Jan Hubicka  <hubicka@ucw.cz>
8041
8042         * asan.c (create_cond_insert_point): Maintain profile.
8043         * ipa-utils.c (ipa_merge_profiles): Be sure only IPA profiles are
8044         merged.
8045         * basic-block.h (struct basic_block_def): Remove frequency.
8046         (EDGE_FREQUENCY): Use to_frequency
8047         * bb-reorder.c (push_to_next_round_p): Use only IPA counts for global
8048         heuristics.
8049         (find_traces): Update to use to_frequency.
8050         (find_traces_1_round): Likewise; use only IPA counts.
8051         (bb_to_key): Likewise.
8052         (connect_traces): Use IPA counts only.
8053         (copy_bb_p): Update to use to_frequency.
8054         (fix_up_crossing_landing_pad): Likewise.
8055         (sanitize_hot_paths): Likewise.
8056         * bt-load.c (basic_block_freq): Likewise.
8057         * cfg.c (init_flow): Set count_max to uninitialized.
8058         (check_bb_profile): Remove frequencies; check counts.
8059         (dump_bb_info): Do not dump frequencies.
8060         (update_bb_profile_for_threading): Update counts only.
8061         (scale_bbs_frequencies_int): Likewise.
8062         (MAX_SAFE_MULTIPLIER): Remove.
8063         (scale_bbs_frequencies_gcov_type): Update counts only.
8064         (scale_bbs_frequencies_profile_count): Update counts only.
8065         (scale_bbs_frequencies): Update counts only.
8066         * cfg.h (struct control_flow_graph): Add count-max.
8067         (update_bb_profile_for_threading): Update prototype.
8068         * cfgbuild.c (find_bb_boundaries): Do not update frequencies.
8069         (find_many_sub_basic_blocks): Likewise.
8070         * cfgcleanup.c (try_forward_edges): Likewise.
8071         (try_crossjump_to_edge): Likewise.
8072         * cfgexpand.c (expand_gimple_cond): Likewise.
8073         (expand_gimple_tailcall): Likewise.
8074         (construct_init_block): Likewise.
8075         (construct_exit_block): Likewise.
8076         * cfghooks.c (verify_flow_info): Check consistency of counts.
8077         (dump_bb_for_graph): Do not dump frequencies.
8078         (split_block_1): Do not update frequencies.
8079         (split_edge): Do not update frequencies.
8080         (make_forwarder_block): Do not update frequencies.
8081         (duplicate_block): Do not update frequencies.
8082         (account_profile_record): Do not update frequencies.
8083         * cfgloop.c (find_subloop_latch_edge_by_profile): Use IPA counts
8084         for global heuristics.
8085         * cfgloopanal.c (average_num_loop_insns): Update to use to_frequency.
8086         (expected_loop_iterations_unbounded): Use counts only.
8087         * cfgloopmanip.c (scale_loop_profile): Simplify.
8088         (create_empty_loop_on_edge): Simplify
8089         (loopify): Simplify
8090         (duplicate_loop_to_header_edge): Simplify
8091         * cfgrtl.c (force_nonfallthru_and_redirect): Update profile.
8092         (update_br_prob_note): Take care of removing note when profile
8093         becomes undefined.
8094         (relink_block_chain): Do not dump frequency.
8095         (rtl_account_profile_record): Use to_frequency.
8096         * cgraph.c (symbol_table::create_edge): Convert count to ipa count.
8097         (cgraph_edge::redirect_call_stmt_to_calle): Conver tcount to ipa count.
8098         (cgraph_update_edges_for_call_stmt_node): Likewise.
8099         (cgraph_edge::verify_count_and_frequency): Update.
8100         (cgraph_node::verify_node): Temporarily disable frequency verification.
8101         * cgraphbuild.c (compute_call_stmt_bb_frequency): Use
8102         to_cgraph_frequency.
8103         (cgraph_edge::rebuild_edges): Convert to ipa counts.
8104         * cgraphunit.c (init_lowered_empty_function): Do not initialize
8105         frequencies.
8106         (cgraph_node::expand_thunk): Update profile.
8107         * except.c (dw2_build_landing_pads): Do not update frequency.
8108         * final.c (compute_alignments): Use to_frequency.
8109         (dump_basic_block_info): Do not dump frequency.
8110         * gimple-pretty-print.c (dump_profile): Do not dump frequency.
8111         (dump_gimple_bb_header): Do not dump frequency.
8112         * gimple-ssa-isolate-paths.c (isolate_path): Do not update frequency;
8113         do update count.
8114         * gimple-streamer-in.c (input_bb): Do not stream frequency.
8115         * gimple-streamer-out.c (output_bb): Do not stream frequency.
8116         * haifa-sched.c (sched_pressure_start_bb): Use to_freuqency.
8117         (init_before_recovery): Do not update frequency.
8118         (sched_create_recovery_edges): Do not update frequency.
8119         * hsa-gen.c (convert_switch_statements): Do not update frequency.
8120         * ipa-cp.c (ipcp_propagate_stage): Update search for max_count.
8121         (ipa_cp_c_finalize): Set max_count to uninitialized.
8122         * ipa-fnsummary.c (get_minimal_bb): Use counts.
8123         (param_change_prob): Use counts.
8124         * ipa-profile.c (ipa_profile_generate_summary): Do not summarize
8125         local profiles.
8126         * ipa-split.c (consider_split): Use to_frequency.
8127         (split_function): Use to_frequency.
8128         * ira-build.c (loop_compare_func): Likewise.
8129         (mark_loops_for_removal): Likewise.
8130         (mark_all_loops_for_removal): Likewise.
8131         * loop-doloop.c (doloop_modify): Do not update frequency.
8132         * loop-unroll.c (unroll_loop_runtime_iterations): Do not update
8133         frequency.
8134         * lto-streamer-in.c (input_function): Update count_max.
8135         * omp-expand.c (expand_omp_taskreg): Update count_max.
8136         * omp-simd-clone.c (simd_clone_adjust): Update profile.
8137         * predict.c (maybe_hot_frequency_p): Use to_frequency.
8138         (maybe_hot_count_p): Use ipa counts only.
8139         (maybe_hot_bb_p): Simplify.
8140         (maybe_hot_edge_p): Simplify.
8141         (probably_never_executed): Do not take frequency argument.
8142         (probably_never_executed_bb_p): Do not pass frequency.
8143         (probably_never_executed_edge_p): Likewise.
8144         (combine_predictions_for_bb): Check that profile is nonzero.
8145         (propagate_freq): Do not set frequency.
8146         (drop_profile): Simplify.
8147         (counts_to_freqs): Simplify.
8148         (expensive_function_p): Use to_frequency.
8149         (propagate_unlikely_bbs_forward): Simplify.
8150         (determine_unlikely_bbs): Simplify.
8151         (estimate_bb_frequencies): Add hack to silence graphite issues.
8152         (compute_function_frequency): Use ipa counts.
8153         (pass_profile::execute): Update.
8154         (rebuild_frequencies): Use counts only.
8155         (force_edge_cold): Use counts only.
8156         * profile-count.c (profile_count::dump): Dump new count types.
8157         (profile_count::differs_from_p): Check compatiblity.
8158         (profile_count::to_frequency): New function.
8159         (profile_count::to_cgraph_frequency): New function.
8160         * profile-count.h (struct function): Declare.
8161         (enum profile_quality): Add profile_guessed_local and
8162         profile_guessed_global0.
8163         (class profile_proability): Decrease number of bits to 29;
8164         update from_reg_br_prob_note and to_reg_br_prob_note.
8165         (class profile_count: Update comment; decrease number of bits
8166         to 61. Check compatibility.
8167         (profile_count::compatible_p): New private member function.
8168         (profile_count::ipa_p): New member function.
8169         (profile_count::operator<): Handle global zero correctly.
8170         (profile_count::operator>): Handle global zero correctly.
8171         (profile_count::operator<=): Handle global zero correctly.
8172         (profile_count::operator>=): Handle global zero correctly.
8173         (profile_count::nonzero_p): New member function.
8174         (profile_count::force_nonzero): New member function.
8175         (profile_count::max): New member function.
8176         (profile_count::apply_scale): Handle IPA scalling.
8177         (profile_count::guessed_local): New member function.
8178         (profile_count::global0): New member function.
8179         (profile_count::ipa): New member function.
8180         (profile_count::to_frequency): Declare.
8181         (profile_count::to_cgraph_frequency): Declare.
8182         * profile.c (OVERLAP_BASE): Delete.
8183         (compute_frequency_overlap): Delete.
8184         (compute_branch_probabilities): Do not use compute_frequency_overlap.
8185         * regs.h (REG_FREQ_FROM_BB): Use to_frequency.
8186         * sched-ebb.c (rank): Use counts only.
8187         * shrink-wrap.c (handle_simple_exit): Use counts only.
8188         (try_shrink_wrapping): Use counts only.
8189         (place_prologue_for_one_component): Use counts only.
8190         * tracer.c (find_best_predecessor): Use to_frequency.
8191         (find_trace): Use to_frequency.
8192         (tail_duplicate): Use to_frequency.
8193         * trans-mem.c (expand_transaction): Do not update frequency.
8194         * tree-call-cdce.c: Do not update frequency.
8195         * tree-cfg.c (gimple_find_sub_bbs): Likewise.
8196         (gimple_merge_blocks): Likewise.
8197         (gimple_split_edge): Likewise.
8198         (gimple_duplicate_sese_region): Likewise.
8199         (gimple_duplicate_sese_tail): Likewise.
8200         (move_sese_region_to_fn): Likewise.
8201         (gimple_account_profile_record): Likewise.
8202         (insert_cond_bb): Likewise.
8203         * tree-complex.c (expand_complex_div_wide): Likewise.
8204         * tree-eh.c (lower_resx): Update profile.
8205         * tree-inline.c (copy_bb): Simplify count scaling; do not scale
8206         frequencies.
8207         (initialize_cfun): Do not initialize frequencies
8208         (freqs_to_counts): Delete.
8209         (copy_cfg_body): Ignore count parameter.
8210         (copy_body): Update.
8211         (expand_call_inline): Update count_max.
8212         (optimize_inline_calls): Update count_max.
8213         (tree_function_versioning): Update count_max.
8214         * tree-ssa-coalesce.c (coalesce_cost_bb): Use to_frequency.
8215         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Do not update
8216         frequency.
8217         * tree-ssa-loop-im.c (execute_sm_if_changed): Use counts only.
8218         * tree-ssa-loop-ivcanon.c (unloop_loops): Do not update freuqency.
8219         (try_peel_loop): Likewise.
8220         * tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Use
8221         to_frequency.
8222         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): Pass -1.
8223         (tree_transform_and_unroll_loop): Do not use frequencies
8224         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations):
8225         Use reliable prediction only.
8226         * tree-ssa-loop-unswitch.c (hoist_guard): Do not use frequencies.
8227         * tree-ssa-sink.c (select_best_block): Use to_frequency.
8228         * tree-ssa-tail-merge.c (replace_block_by): Temporarily disable
8229         probability scaling.
8230         * tree-ssa-threadupdate.c (create_block_for_threading): Do
8231         not update frequency
8232         (any_remaining_duplicated_blocks): Likewise.
8233         (update_profile): Likewise.
8234         (estimated_freqs_path): Delete.
8235         (freqs_to_counts_path): Delete.
8236         (clear_counts_path): Delete.
8237         (ssa_fix_duplicate_block_edges): Likewise.
8238         (duplicate_thread_path): Likewise.
8239         * tree-switch-conversion.c (gen_inbound_check): Use counts.
8240         * tree-tailcall.c (decrease_profile): Do not update frequency.
8241         (eliminate_tail_call): Likewise.
8242         * tree-vect-loop-manip.c (vect_do_peeling): Likewise.
8243         * tree-vect-loop.c (scale_profile_for_vect_loop): Likewise.
8244         (optimize_mask_stores): Likewise.
8245         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
8246         * ubsan.c (ubsan_expand_null_ifn): Update profile.
8247         (ubsan_expand_ptr_ifn): Update profile.
8248         * value-prof.c (gimple_ic): Simplify.
8249         * value-prof.h (gimple_ic): Update prototype.
8250         * ipa-inline-transform.c (inline_transform): Fix scaling conditoins.
8251         * ipa-inline.c (compute_uninlined_call_time): Be sure that
8252         counts are nonzero.
8253         (want_inline_self_recursive_call_p): Likewise.
8254         (resolve_noninline_speculation): Only cummulate defined counts.
8255         (inline_small_functions): Use nonzero_p.
8256         (ipa_inline): Do not access freed node.
8257
8258 2017-11-03  Wilco Dijkstra  <wdijkstr@arm.com>
8259
8260         * config/aarch64/aarch64.c (aarch64_override_options_internal):
8261         Set PARAM_SCHED_PRESSURE_ALGORITHM to SCHED_PRESSURE_MODEL.
8262
8263 2017-11-03  Kito Cheng  <kito.cheng@gmail.com>
8264
8265         * config/riscv/riscv.c (riscv_legitimize_move): Handle
8266         non-legitimate address.
8267
8268 2017-11-03  Segher Boessenkool  <segher@kernel.crashing.org>
8269
8270         * config/rs6000/rs6000.md (*lt0_disi): Delete.
8271         (*lt0_<mode>di, *lt0_<mode>si): New.
8272
8273 2017-11-03  Segher Boessenkool  <segher@kernel.crashing.org>
8274
8275         * config/rs6000/rs6000.md (move_from_CR_ov_bit): Change condition to
8276         TARGET_PAIRED_FLOAT.
8277
8278 2017-11-03  Siddhesh Poyarekar  <siddhesh.poyarekar@linaro.org>
8279             Jim Wilson  <jim.wilson@linaro.org>
8280
8281         * config/aarch64/aarch64-cores.def (saphira): New CPU.
8282         * config/aarch64/aarch64-tune.md: Regenerated.
8283         * doc/invoke.texi (AArch64 Options/-mtune): Add "saphira".
8284         * gcc/config/aarch64/aarch64.c (saphira_tunings): New tuning table.
8285
8286 2017-11-03  Cupertino Miranda  <cmiranda@synopsys.com>
8287
8288         * config/arc/arc.c (arc_save_restore): Corrected CFA note.
8289         (arc_expand_prologue): Restore blink for millicode.
8290         * config/arc/linux.h (LINK_EH_SPEC): Defined.
8291
8292 2017-11-03  Richard Sandiford  <richard.sandiford@linaro.org>
8293
8294         PR target/82809
8295         * config/i386/i386.c (ix86_vector_duplicate_value): Use
8296         gen_vec_duplicate after forcing the scalar into a register.
8297
8298 2017-11-02  Segher Boessenkool  <segher@kernel.crashing.org>
8299
8300         * combine (try_combine): Print the insns input to try_combine to the
8301         dump file.
8302
8303 2017-11-02  Steve Ellcey  <sellcey@cavium.com>
8304
8305         PR target/79868
8306         * config/aarch64/aarch64-c.c (aarch64_pragma_target_parse):
8307         Remove second argument from aarch64_process_target_attr call.
8308         * config/aarch64/aarch64-protos.h (aarch64_process_target_attr):
8309         Ditto.
8310         * config/aarch64/aarch64.c (aarch64_attribute_info): Change
8311         field type.
8312         (aarch64_handle_attr_arch): Remove second argument.
8313         (aarch64_handle_attr_cpu): Ditto.
8314         (aarch64_handle_attr_tune): Ditto.
8315         (aarch64_handle_attr_isa_flags): Ditto.
8316         (aarch64_process_one_target_attr): Ditto.
8317         (aarch64_process_target_attr): Ditto.
8318         (aarch64_option_valid_attribute_p): Remove second argument.
8319         on aarch64_process_target_attr call.
8320
8321 2017-11-02  David Malcolm  <dmalcolm@redhat.com>
8322
8323         * diagnostic.c: Include "selftest-diagnostic.h".
8324         (selftest::assert_location_text): New function.
8325         (selftest::test_diagnostic_get_location_text): New function.
8326         (selftest::diagnostic_c_tests): Call it.
8327
8328 2017-11-02  David Malcolm  <dmalcolm@redhat.com>
8329
8330         * Makefile.in (OBJS-libcommon): Add selftest-diagnostic.o.
8331         * diagnostic-show-locus.c: Include "selftest-diagnostic.h".
8332         (class selftest::test_diagnostic_context): Move to...
8333         * selftest-diagnostic.c: New file.
8334         * selftest-diagnostic.h: New file.
8335
8336 2017-11-02  James Bowman  <james.bowman@ftdichip.com>
8337
8338         * config/ft32/ft32.c (ft32_addr_space_legitimate_address_p): increase
8339         offset range for FT32B.
8340         * config/ft32/ft32.h: option "mcompress" enables relaxation.
8341         * config/ft32/ft32.md: Add TARGET_NOPM.
8342         * config/ft32/ft32.opt: Add mft32b, mcompress, mnopm.
8343         * gcc/doc/invoke.texi: Add mft32b, mcompress, mnopm.
8344
8345 2017-11-02  Wilco Dijkstra  <wdijkstr@arm.com>
8346
8347         * config/aarch64/aarch64.h (MALLOC_ABI_ALIGNMENT): New define.
8348
8349 2017-11-02  Jeff Law  <law@redhat.com>
8350
8351         * gimple-ssa-sprintf.c (sprintf_dom_walker): Remove
8352         virtual keyword on FINAL OVERRIDE members.
8353
8354         * tree-ssa-propagate.h (ssa_propagation_engine): Group
8355         virtuals together.  Add virtual destructor.
8356         (substitute_and_fold_engine): Similarly.
8357
8358 2017-11-02  Jan Hubicka  <hubicka@ucw.cz>
8359
8360         * x86-tune.def (X86_TUNE_USE_INCDEC): Enable for Haswell+.
8361
8362 2017-11-02  Richard Biener  <rguenther@suse.de>
8363
8364         PR tree-optimization/82795
8365         * tree-if-conv.c (predicate_mem_writes): Remove bogus assert.
8366
8367 2017-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8368
8369         * acinclude.m4 (gcc_AC_INITFINI_ARRAY): Don't require
8370         gcc_SUN_LD_VERSION.
8371         (gcc_GAS_CHECK_FEATURE): Remove.
8372         * configure.ac (ld_vers) <*-*-solaris2*>: Move comments from
8373         gcc_AC_INITFINI_ARRAY here.  Update for Solaris 11.4 changes.
8374         * configure: Regenerate.
8375
8376 2017-11-02  Claudiu Zissulescu <claziss@synopsys.com>
8377
8378         * config/arc/arc.c (hwloop_optimize): Account for empty
8379         body loops.
8380
8381 2017-11-02  Richard Biener  <rguenther@suse.de>
8382
8383         PR middle-end/82765
8384         * varasm.c (decode_addr_const): Make offset HOST_WIDE_INT.
8385         Truncate ARRAY_REF index and element size.
8386
8387 2017-11-01  Palmer Dabbelt  <palmer@dabbelt.com>
8388
8389         * doc/invoke.texi (RISC-V Options): Use "@minus{}2 GB", not "-2 GB".
8390
8391 2017-11-01  Jeff Law  <law@redhat.com>
8392
8393         * tree-ssa-ccp.c (ccp_folder): New class derived from
8394         substitute_and_fold_engine.
8395         (ccp_folder::get_value): New member function.
8396         (ccp_folder::fold_stmt): Renamed from ccp_fold_stmt.
8397         (ccp_fold_stmt): Remove prototype.
8398         (ccp_finalize): Call substitute_and_fold from the ccp_class.
8399         * tree-ssa-copy.c (copy_folder): New class derived from
8400         substitute_and_fold_engine.
8401         (copy_folder::get_value): Renamed from get_value.
8402         (fini_copy_prop): Call substitute_and_fold from copy_folder class.
8403         * tree-vrp.c (vrp_folder): New class derived from
8404         substitute_and_fold_engine.
8405         (vrp_folder::fold_stmt): Renamed from vrp_fold_stmt.
8406         (vrp_folder::get_value): New member function.
8407         (vrp_finalize): Call substitute_and_fold from vrp_folder class.
8408         (evrp_dom_walker::before_dom_children): Similarly for replace_uses_in.
8409         * tree-ssa-propagate.h (substitute_and_fold_engine): New class to
8410         provide a class interface to folder/substitute routines.
8411         (ssa_prop_fold_stmt_fn): Remove typedef.
8412         (ssa_prop_get_value_fn): Likewise.
8413         (subsitute_and_fold): Remove prototype.
8414         (replace_uses_in): Likewise.
8415         * tree-ssa-propagate.c (substitute_and_fold_engine::replace_uses_in):
8416         Renamed from replace_uses_in.  Call the virtual member function
8417         (substitute_and_fold_engine::replace_phi_args_in): Similarly.
8418         (substitute_and_fold_dom_walker): Remove initialization of
8419         data member entries for calbacks.  Add substitute_and_fold_engine
8420         member and initialize it.
8421         (substitute_and_fold_dom_walker::before_dom_children0: Use the
8422         member functions for get_value, replace_phi_args_in c
8423         replace_uses_in, and fold_stmt calls.
8424         (substitute_and_fold_engine::substitute_and_fold): Renamed from
8425         substitute_and_fold.  Remove assert.   Update ctor call.
8426
8427         * tree-ssa-propagate.h (ssa_prop_visit_stmt_fn): Remove typedef.
8428         (ssa_prop_visit_phi_fn): Likewise.
8429         (class ssa_propagation_engine): New class to provide an interface
8430         into ssa_propagate.
8431         * tree-ssa-propagate.c (ssa_prop_visit_stmt): Remove file scoped
8432         variable.
8433         (ssa_prop_visit_phi): Likewise.
8434         (ssa_propagation_engine::simulate_stmt): Moved into class.
8435         Call visit_phi/visit_stmt from the class rather than via
8436         file scoped static variables.
8437         (ssa_propagation_engine::simulate_block): Moved into class.
8438         (ssa_propagation_engine::process_ssa_edge_worklist): Similarly.
8439         (ssa_propagation_engine::ssa_propagate): Similarly.  No longer
8440         set file scoped statics for the visit_stmt/visit_phi callbacks.
8441         * tree-complex.c (complex_propagate): New class derived from
8442         ssa_propagation_engine.
8443         (complex_propagate::visit_stmt): Renamed from complex_visit_stmt.
8444         (complex_propagate::visit_phi): Renamed from complex_visit_phi.
8445         (tree_lower_complex): Call ssa_propagate via the complex_propagate
8446         class.
8447         * tree-ssa-ccp.c: (ccp_propagate): New class derived from
8448         ssa_propagation_engine.
8449         (ccp_propagate::visit_phi): Renamed from ccp_visit_phi_node.
8450         (ccp_propagate::visit_stmt): Renamed from ccp_visit_stmt.
8451         (do_ssa_ccp): Call ssa_propagate from the ccp_propagate class.
8452         * tree-ssa-copy.c (copy_prop): New class derived from
8453         ssa_propagation_engine.
8454         (copy_prop::visit_stmt): Renamed from copy_prop_visit_stmt.
8455         (copy_prop::visit_phi): Renamed from copy_prop_visit_phi_node.
8456         (execute_copy_prop): Call ssa_propagate from the copy_prop class.
8457         * tree-vrp.c (vrp_prop): New class derived from ssa_propagation_engine.
8458         (vrp_prop::visit_stmt): Renamed from vrp_visit_stmt.
8459         (vrp_prop::visit_phi): Renamed from vrp_visit_phi_node.
8460         (execute_vrp): Call ssa_propagate from the vrp_prop class.
8461
8462 2017-11-01  Jakub Jelinek  <jakub@redhat.com>
8463
8464         PR rtl-optimization/82778
8465         PR rtl-optimization/82597
8466         * compare-elim.c (struct comparison): Add in_a_setter field.
8467         (find_comparison_dom_walker::before_dom_children): Remove killed
8468         bitmap and df_simulate_find_defs call, instead walk the defs.
8469         Compute last_setter and initialize in_a_setter.  Merge definitions
8470         with first initialization for a few variables.
8471         (try_validate_parallel): Use insn_invalid_p instead of
8472         recog_memoized.  Return insn rather than just the pattern.
8473         (try_merge_compare): Fix up comment.  Don't uselessly test if
8474         in_a is a REG_P.  Use cmp->in_a_setter instead of walking UD
8475         chains.
8476         (execute_compare_elim_after_reload): Remove df_chain_add_problem
8477         call.
8478
8479 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8480             Alan Hayward  <alan.hayward@arm.com>
8481             David Sherwood  <david.sherwood@arm.com>
8482
8483         * config/aarch64/aarch64.c (aarch64_rtx_costs): Use
8484         aarch64_hard_regno_nregs to get the number of registers
8485         in a mode.
8486
8487 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8488             Alan Hayward  <alan.hayward@arm.com>
8489             David Sherwood  <david.sherwood@arm.com>
8490
8491         * config/aarch64/constraints.md (Upl): Rename to...
8492         (Uaa): ...this.
8493         * config/aarch64/aarch64.md
8494         (*zero_extend<SHORT:mode><GPI:mode>2_aarch64, *addsi3_aarch64_uxtw):
8495         Update accordingly.
8496
8497 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8498             Alan Hayward  <alan.hayward@arm.com>
8499             David Sherwood  <david.sherwood@arm.com>
8500
8501         * config/aarch64/aarch64.c (aarch64_add_constant_internal)
8502         (aarch64_add_constant, aarch64_add_sp, aarch64_sub_sp): Move
8503         earlier in file.
8504
8505 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8506             Alan Hayward  <alan.hayward@arm.com>
8507             David Sherwood  <david.sherwood@arm.com>
8508
8509         * config/aarch64/aarch64.c (aarch64_evpc_trn, aarch64_evpc_uzp)
8510         (aarch64_evpc_zip, aarch64_evpc_ext, aarch64_evpc_rev)
8511         (aarch64_evpc_dup): Generate rtl direcly, rather than using
8512         named expanders.
8513         (aarch64_expand_vec_perm_const_1): Explicitly check for permutes
8514         of a single element.
8515         * config/aarch64/iterators.md: Add a comment above the permute
8516         unspecs to say that they are generated directly by
8517         aarch64_expand_vec_perm_const.
8518         * config/aarch64/aarch64-simd.md: Likewise the permute instructions.
8519
8520 2017-11-01  Nathan Sidwell  <nathan@acm.org>
8521
8522         * tree-dump.c (dequeue_and_dump): Use HAS_DECL_ASSEMBLER_NAME_P.
8523
8524 2017-11-01  Palmer Dabbelt  <palmer@dabbelt.com>
8525
8526         * doc/invoke.texi (RISC-V Options): Explicitly name the medlow
8527         and medany code models, and describe what they do.
8528
8529 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8530
8531         Revert accidental duplicate:
8532
8533         * combine.c (can_change_dest_mode): Reject changes in
8534         REGMODE_NATURAL_SIZE.
8535
8536 2017-11-01  Segher Boessenkool  <segher@kernel.crashing.org>
8537
8538         PR rtl-optimization/64682
8539         PR rtl-optimization/69567
8540         PR rtl-optimization/69737
8541         PR rtl-optimization/82683
8542         * combine.c (distribute_notes) <REG_DEAD>: If the new I2 sets the same
8543         register mentioned in the note, drop the note, unless it came from I3,
8544         in which case it should go to I3 again.
8545
8546 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8547
8548         * tree-ssa-dse.c (normalize_ref): Check whether the ranges overlap
8549         and return false if not.
8550         (clear_bytes_written_by, live_bytes_read): Update accordingly.
8551
8552 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8553
8554         * tree-ssa-alias.h (ranges_overlap_p): Return false if either
8555         range is known to be empty.
8556
8557 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8558             Alan Hayward  <alan.hayward@arm.com>
8559             David Sherwood  <david.sherwood@arm.com>
8560
8561         * simplify-rtx.c (simplify_const_unary_operation): Use GET_MODE_NUNITS
8562         and CONST_VECTOR_NUNITS instead of computing the number of units from
8563         the byte sizes of the vector and element.
8564         (simplify_binary_operation_1): Likewise.
8565         (simplify_const_binary_operation): Likewise.
8566         (simplify_ternary_operation): Likewise.
8567
8568 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8569             Alan Hayward  <alan.hayward@arm.com>
8570             David Sherwood  <david.sherwood@arm.com>
8571
8572         * var-tracking.c (INT_MEM_OFFSET): Replace with...
8573         (int_mem_offset): ...this new function.
8574         (var_mem_set, var_mem_delete_and_set, var_mem_delete)
8575         (find_mem_expr_in_1pdv, dataflow_set_preserve_mem_locs)
8576         (same_variable_part_p, use_type, add_stores, vt_get_decl_and_offset):
8577         Update accordingly.
8578
8579 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8580             Alan Hayward  <alan.hayward@arm.com>
8581             David Sherwood  <david.sherwood@arm.com>
8582
8583         * lower-subreg.c (interesting_mode_p): New function.
8584         (compute_costs, find_decomposable_subregs, decompose_register)
8585         (simplify_subreg_concatn, can_decompose_p, resolve_simple_move)
8586         (resolve_clobber, dump_choices): Use it.
8587
8588 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8589             Alan Hayward  <alan.hayward@arm.com>
8590             David Sherwood  <david.sherwood@arm.com>
8591
8592         * rtlhash.c (add_rtx): Use add_hwi for 'w' and add_int for 'i'.
8593
8594 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8595             Alan Hayward  <alan.hayward@arm.com>
8596             David Sherwood  <david.sherwood@arm.com>
8597
8598         * alias.c (find_base_value, find_base_term): Only process integer
8599         truncations.  Check the precision rather than the size.
8600
8601 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8602             Alan Hayward  <alan.hayward@arm.com>
8603             David Sherwood  <david.sherwood@arm.com>
8604
8605         * machmode.h (is_narrower_int_mode): New function
8606         * optabs.c (expand_float, expand_fix): Use it.
8607         * dwarf2out.c (rotate_loc_descriptor): Likewise.
8608
8609 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8610             Alan Hayward  <alan.hayward@arm.com>
8611             David Sherwood  <david.sherwood@arm.com>
8612
8613         * rtl.h (narrower_subreg_mode): New function.
8614         * ira-color.c (update_costs_from_allocno): Use it.
8615
8616 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8617             Alan Hayward  <alan.hayward@arm.com>
8618             David Sherwood  <david.sherwood@arm.com>
8619
8620         * optabs-query.h (convert_optab_p): New function, split out from...
8621         (convert_optab_handler): ...here.
8622         (widening_optab_handler): Delete.
8623         (find_widening_optab_handler): Remove permit_non_widening parameter.
8624         (find_widening_optab_handler_and_mode): Likewise.  Provide an
8625         override that operates on mode class wrappers.
8626         * optabs-query.c (widening_optab_handler): Delete.
8627         (find_widening_optab_handler_and_mode): Remove permit_non_widening
8628         parameter.  Assert that the two modes are the same class and that
8629         the "from" mode is narrower than the "to" mode.  Use
8630         convert_optab_handler instead of widening_optab_handler.
8631         * expmed.c (expmed_mult_highpart_optab): Use convert_optab_handler
8632         instead of widening_optab_handler.
8633         * expr.c (expand_expr_real_2): Update calls to
8634         find_widening_optab_handler.
8635         * optabs.c (expand_widen_pattern_expr): Likewise.
8636         (expand_binop_directly): Take the insn_code as a parameter.
8637         (expand_binop): Only call find_widening_optab_handler for
8638         conversion optabs; use optab_handler otherwise.  Update calls
8639         to find_widening_optab_handler and expand_binop_directly.
8640         Use convert_optab_handler instead of widening_optab_handler.
8641         * tree-ssa-math-opts.c (convert_mult_to_widen): Update calls to
8642         find_widening_optab_handler and use scalar_mode rather than
8643         machine_mode.
8644         (convert_plusminus_to_widen): Likewise.
8645
8646 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8647             Alan Hayward  <alan.hayward@arm.com>
8648             David Sherwood  <david.sherwood@arm.com>
8649
8650         * machmode.h (fixed_size_mode): New class.
8651         * rtl.h (get_pool_mode): Return fixed_size_mode.
8652         * gengtype.c (main): Add fixed_size_mode.
8653         * target.def (get_raw_result_mode): Return a fixed_size_mode.
8654         (get_raw_arg_mode): Likewise.
8655         * doc/tm.texi: Regenerate.
8656         * targhooks.h (default_get_reg_raw_mode): Return a fixed_size_mode.
8657         * targhooks.c (default_get_reg_raw_mode): Likewise.
8658         * config/ia64/ia64.c (ia64_get_reg_raw_mode): Likewise.
8659         * config/mips/mips.c (mips_get_reg_raw_mode): Likewise.
8660         * config/msp430/msp430.c (msp430_get_raw_arg_mode): Likewise.
8661         (msp430_get_raw_result_mode): Likewise.
8662         * config/avr/avr-protos.h (regmask): Use as_a <fixed_side_mode>
8663         * dbxout.c (dbxout_parms): Require fixed-size modes.
8664         * expr.c (copy_blkmode_from_reg, copy_blkmode_to_reg): Likewise.
8665         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Likewise.
8666         * omp-low.c (lower_oacc_reductions): Likewise.
8667         * simplify-rtx.c (simplify_immed_subreg): Take fixed_size_modes.
8668         (simplify_subreg): Update accordingly.
8669         * varasm.c (constant_descriptor_rtx::mode): Change to fixed_size_mode.
8670         (force_const_mem): Update accordingly.  Return NULL_RTX for modes
8671         that aren't fixed-size.
8672         (get_pool_mode): Return a fixed_size_mode.
8673         (output_constant_pool_2): Take a fixed_size_mode.
8674
8675 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8676             Alan Hayward  <alan.hayward@arm.com>
8677             David Sherwood  <david.sherwood@arm.com>
8678
8679         * doc/rtl.texi (vec_series): Document.
8680         (const): Say that the operand can be a vec_series.
8681         * rtl.def (VEC_SERIES): New rtx code.
8682         * rtl.h (const_vec_series_p_1): Declare.
8683         (const_vec_series_p): New function.
8684         * emit-rtl.h (gen_const_vec_series): Declare.
8685         (gen_vec_series): Likewise.
8686         * emit-rtl.c (const_vec_series_p_1, gen_const_vec_series)
8687         (gen_vec_series): Likewise.
8688         * optabs.c (expand_mult_highpart): Use gen_const_vec_series.
8689         * simplify-rtx.c (simplify_unary_operation): Handle negations
8690         of vector series.
8691         (simplify_binary_operation_series): New function.
8692         (simplify_binary_operation_1): Use it.  Handle VEC_SERIES.
8693         (test_vector_ops_series): New function.
8694         (test_vector_ops): Call it.
8695         * config/powerpcspe/altivec.md (altivec_lvsl): Use
8696         gen_const_vec_series.
8697         (altivec_lvsr): Likewise.
8698         * config/rs6000/altivec.md (altivec_lvsl, altivec_lvsr): Likewise.
8699
8700 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8701             Alan Hayward  <alan.hayward@arm.com>
8702             David Sherwood  <david.sherwood@arm.com>
8703
8704         * doc/rtl.texi (const): Update description of address constants.
8705         Say that vector constants are allowed too.
8706         * common.md (E, F): Use CONSTANT_P instead of checking for
8707         CONST_VECTOR.
8708         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
8709         checking for CONST_VECTOR.
8710         * expmed.c (make_tree): Use build_vector_from_val for a CONST
8711         VEC_DUPLICATE.
8712         * expr.c (expand_expr_real_2): Check for vector modes instead
8713         of checking for CONST_VECTOR.
8714         * rtl.h (const_vec_p): New function.
8715         (const_vec_duplicate_p): Check for a CONST VEC_DUPLICATE.
8716         (unwrap_const_vec_duplicate): Handle them here too.
8717
8718 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8719             David Malcolm  <dmalcolm@redhat.com>
8720             Alan Hayward  <alan.hayward@arm.com>
8721             David Sherwood  <david.sherwood@arm.com>
8722
8723         * rtl.h (vec_duplicate_p): New function.
8724         * selftest-rtl.c (assert_rtx_eq_at): New function.
8725         * selftest-rtl.h (ASSERT_RTX_EQ): New macro.
8726         (assert_rtx_eq_at): Declare.
8727         * selftest.h (selftest::simplify_rtx_c_tests): Declare.
8728         * selftest-run-tests.c (selftest::run_tests): Call it.
8729         * simplify-rtx.c: Include selftest.h and selftest-rtl.h.
8730         (simplify_unary_operation_1): Recursively handle vector duplicates.
8731         (simplify_binary_operation_1): Likewise.  Handle VEC_SELECTs of
8732         vector duplicates.
8733         (simplify_subreg): Handle subregs of vector duplicates.
8734         (make_test_reg, test_vector_ops_duplicate, test_vector_ops)
8735         (selftest::simplify_rtx_c_tests): New functions.
8736
8737 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8738             Alan Hayward  <alan.hayward@arm.com>
8739             David Sherwood  <david.sherwood@arm.com>
8740
8741         * emit-rtl.h (gen_const_vec_duplicate): Declare.
8742         (gen_vec_duplicate): Likewise.
8743         * emit-rtl.c (gen_const_vec_duplicate_1): New function, split
8744         out from...
8745         (gen_const_vector): ...here.
8746         (gen_const_vec_duplicate, gen_vec_duplicate): New functions.
8747         (gen_rtx_CONST_VECTOR): Use gen_const_vec_duplicate for constants
8748         whose elements are all equal.
8749         * optabs.c (expand_vector_broadcast): Use gen_const_vec_duplicate.
8750         * simplify-rtx.c (simplify_const_unary_operation): Likewise.
8751         (simplify_relational_operation): Likewise.
8752         * config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup):
8753         Likewise.
8754         (aarch64_simd_dup_constant): Use gen_vec_duplicate.
8755         (aarch64_expand_vector_init): Likewise.
8756         * config/arm/arm.c (neon_vdup_constant): Likewise.
8757         (neon_expand_vector_init): Likewise.
8758         (arm_expand_vec_perm): Use gen_const_vec_duplicate.
8759         (arm_block_set_unaligned_vect): Likewise.
8760         (arm_block_set_aligned_vect): Likewise.
8761         * config/arm/neon.md (neon_copysignf<mode>): Likewise.
8762         * config/i386/i386.c (ix86_expand_vec_perm): Likewise.
8763         (expand_vec_perm_even_odd_pack): Likewise.
8764         (ix86_vector_duplicate_value): Use gen_vec_duplicate.
8765         * config/i386/sse.md (one_cmpl<mode>2): Use CONSTM1_RTX.
8766         * config/ia64/ia64.c (ia64_expand_vecint_compare): Use
8767         gen_const_vec_duplicate.
8768         * config/ia64/vect.md (addv2sf3, subv2sf3): Use CONST1_RTX.
8769         * config/mips/mips.c (mips_gen_const_int_vector): Use
8770         gen_const_vec_duplicate.
8771         (mips_expand_vector_init): Use CONST0_RTX.
8772         * config/powerpcspe/altivec.md (abs<mode>2, nabs<mode>2): Likewise.
8773         (define_split): Use gen_const_vec_duplicate.
8774         * config/rs6000/altivec.md (abs<mode>2, nabs<mode>2): Use CONST0_RTX.
8775         (define_split): Use gen_const_vec_duplicate.
8776         * config/s390/vx-builtins.md (vec_genmask<mode>): Likewise.
8777         (vec_ctd_s64, vec_ctd_u64, vec_ctsl, vec_ctul): Likewise.
8778         * config/spu/spu.c (spu_const): Likewise.
8779
8780 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8781             Alan Hayward  <alan.hayward@arm.com>
8782             David Sherwood  <david.sherwood@arm.com>
8783
8784         * combine.c (can_change_dest_mode): Reject changes in
8785         REGMODE_NATURAL_SIZE.
8786
8787 2017-10-31  Sandra Loosemore  <sandra@codesourcery.com>
8788
8789         * configure.ac (--enable-libssp): New.
8790         (gcc_cv_libc_provides_ssp): Check for explicit setting before
8791         trying to determine target-specific default.  Adjust indentation.
8792         * configure: Regenerated.
8793         * doc/install.texi (Configuration): Expand --disable-libssp
8794         documentation.
8795
8796 2017-10-31  Daniel Santos  <daniel.santos@pobox.com>
8797
8798         config/i386/i386.c (ix86_expand_epilogue): Correct stack
8799         calculation.
8800
8801 2017-10-31  Martin Jambor  <mjambor@suse.cz>
8802
8803         PR c++/81702
8804         * gimple-fold.c (gimple_get_virt_method_for_vtable): Remove assert.
8805
8806 2017-10-31  David Malcolm  <dmalcolm@redhat.com>
8807
8808         * auto-profile.c (autofdo_source_profile::read): Use
8809         UNKNOWN_LOCATION rather than 0.
8810         * diagnostic-core.h (warning_at_rich_loc): Rename to...
8811         (warning_at): ...this overload.
8812         (warning_at_rich_loc_n): Rename to...
8813         (warning_n): ...this overload.
8814         (error_at_rich_loc): Rename to...
8815         (error_at): ...this overload.
8816         (pedwarn_at_rich_loc): Rename to...
8817         (pedwarn): ...this overload.
8818         (permerror_at_rich_loc): Rename to...
8819         (permerror): ...this overload.
8820         (inform_at_rich_loc): Rename to...
8821         (inform): ...this overload.
8822         * diagnostic.c: (diagnostic_n_impl): Delete location_t-based decl.
8823         (diagnostic_n_impl_richloc): Rename to...
8824         (diagnostic_n_impl): ...this rich_location *-based decl.
8825         (inform_at_rich_loc): Rename to...
8826         (inform): ...this, and add an assertion.
8827         (inform_n): Update for removal of location_t-based diagnostic_n_impl.
8828         (warning_at_rich_loc): Rename to...
8829         (warning_at): ...this, and add an assertion.
8830         (warning_at_rich_loc_n): Rename to...
8831         (warning_n): ...this, and add an assertion.
8832         (warning_n): Update location_t-based implementation for removal of
8833         location_t-based diagnostic_n_impl.
8834         (pedwarn_at_rich_loc): Rename to...
8835         (pedwarn): ...this, and add an assertion.
8836         (permerror_at_rich_loc): Rename to...
8837         (permerror): ...this, and add an assertion.
8838         (error_n): Update for removal of location_t-based diagnostic_n_impl.
8839         (error_at_rich_loc): Rename to...
8840         (error_at): ...this, and add an assertion.
8841         * gcc.c (do_spec_1): Use UNKNOWN_LOCATION rather than 0.
8842         (driver::do_spec_on_infiles): Likewise.
8843         * substring-locations.c (format_warning_va): Update for renaming
8844         of inform_at_rich_loc.
8845
8846 2017-10-31  Michael Meissner  <meissner@linux.vnet.ibm.com>
8847
8848         * builtins.def (DEF_FLOATN_BUILTIN): Change most _Float<N> and
8849         _Float<N>X built-in functions so that the variant without the
8850         "__builtin_" prefix is only enabled for the GNU C and Objective C
8851         languages when they are in non-strict ANSI/ISO mode.
8852         (DEF_EXT_LIB_FLOATN_NX_BUILTINS): Likewise.
8853         * target.def (floatn_builtin_p): Add a target hook to control
8854         whether _Float<N> and _Float<N>X built-in functions without the
8855         "__builtin_" prefix are enabled, and return true for C and
8856         Objective C in the default hook.  Include langhooks.h in
8857         targhooks.c.
8858         * targhooks.h (default_floatn_builtin_p): Likewise.
8859         * targhooks.c (default_floatn_builtin_p): Likewise.
8860         * doc/tm.texi.in (TARGET_FLOATN_BUILTIN_P): Document the
8861         floatn_builtin_p target hook.
8862         * doc/tm.texi (TARGET_FLOATN_BUILTIN_P): Likewise.
8863
8864 2017-10-31  Matthew Fortune  <matthew.fortune@imgtec.com>
8865             Eric Botcazou  <ebotcazou@adacore.com>
8866
8867         PR rtl-optimization/81803
8868         * lra-constraints.c (curr_insn_transform): Also reload the whole
8869         register for a strict subreg no wider than a word if this is for
8870         a WORD_REGISTER_OPERATIONS target.
8871
8872 2017-10-31  Jason Merrill  <jason@redhat.com>
8873
8874         * gdbinit.in: Skip over inlines from timevar.h.
8875
8876 2017-10-31  Martin Liska  <mliska@suse.cz>
8877
8878         * doc/gcov.texi: Document new option.
8879         * gcov.c (print_usage): Likewise print it.
8880         (process_args): Support the argument.
8881         (format_count): New function.
8882         (format_gcov): Use the function.
8883
8884 2017-10-31  Martin Liska  <mliska@suse.cz>
8885
8886         * gcov.c (struct name_map): do not use typedef.
8887         Define operator== and operator<.
8888         (name_search): Remove.
8889         (name_sort): Remove.
8890         (main): Do not allocate names.
8891         (process_file): Add vertical space.
8892         (generate_results): Use std::find.
8893         (release_structures): Do not release memory.
8894         (find_source): Use std::find.
8895
8896 2017-10-31  Martin Liska  <mliska@suse.cz>
8897
8898         * gcov.c (struct line_info): Remove it's typedef.
8899         (line_info::line_info): Add proper ctor.
8900         (line_info::has_block): Do not use a typedef.
8901         (struct source_info): Do not use typedef.
8902         (circuit): Likewise.
8903         (get_cycles_count): Likewise.
8904         (output_intermediate_file): Iterate via vector iterator.
8905         (add_line_counts): Use std::vector methods.
8906         (accumulate_line_counts): Likewise.
8907         (output_lines): Likewise.
8908
8909 2017-10-31  Martin Liska  <mliska@suse.cz>
8910
8911         * gcov.c (struct source_info): Remove typedef.
8912         (source_info::source_info): Add proper ctor.
8913         (accumulate_line_counts): Use struct, not it's typedef.
8914         (output_gcov_file): Likewise.
8915         (output_lines): Likewise.
8916         (main): Do not allocate an array.
8917         (output_intermediate_file): Use size of vector container.
8918         (process_file): Resize the vector.
8919         (generate_results): Do not preallocate, use newly added vector
8920         lines.
8921         (release_structures): Do not release sources.
8922         (find_source): Use vector methods.
8923         (add_line_counts): Do not use typedef.
8924
8925 2017-10-31  Martin Liska  <mliska@suse.cz>
8926
8927         * doc/gcov.texi: Document that.
8928         * gcov.c (add_line_counts): Mark lines with a non-executed
8929         statement.
8930         (output_line_beginning): Handle such lines.
8931         (output_lines): Pass new argument.
8932         (output_intermediate_file): Print it in intermediate format.
8933
8934 2017-10-31  Martin Liska  <mliska@suse.cz>
8935
8936         * color-macros.h: New file.
8937         * diagnostic-color.c: Factor out color related to macros to
8938         color-macros.h.
8939         * doc/gcov.texi: Document -k option.
8940         * gcov.c (INCLUDE_STRING): Include string.h.
8941         (print_usage): Add -k option.
8942         (process_args): Parse it.
8943         (pad_count_string): New function.
8944         (output_line_beginning): Likewise.
8945         (DEFAULT_LINE_START): New macro.
8946         (output_lines): Support color output.
8947
8948 2017-10-31  Martin Liska  <mliska@suse.cz>
8949
8950         PR gcov-profile/82633
8951         * doc/gcov.texi: Document -fkeep-{static,inline}-functions and
8952         their interaction with GCOV infrastructure.
8953         * configure.ac: Add -fkeep-{inline,static}-functions to
8954         coverage_flags.
8955         * configure: Regenerate.
8956
8957 2017-10-31  Uros Bizjak  <ubizjak@gmail.com>
8958
8959         PR target/82772
8960         * config/alpha/sync.md (fetchop_constr) <and>: Change to "rINM".
8961
8962 2017-10-31  Segher Boessenkool  <segher@kernel.crashing.org>
8963
8964         PR target/82674
8965         * config/rs6000/rs6000.md (allocate_stack): Force update interval
8966         into a register if it does not fit into an immediate offset field.
8967
8968 2017-10-31  Olivier Hainque  <hainque@adacore.com>
8969
8970         * gcc/Makefile.in (FLAGS_TO_PASS): Pass libsubdir as well.
8971
8972 2017-10-31  Julia Koval  <julia.koval@intel.com>
8973
8974         * config.gcc: Add gfniintrin.h.
8975         * config/i386/gfniintrin.h: New.
8976         * config/i386/i386-builtin-types.def
8977         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
8978         __builtin_ia32_vgf2p8affineinvqb_v64qi_mask,
8979         __builtin_ia32_vgf2p8affineinvqb_v32qi,
8980         __builtin_ia32_vgf2p8affineinvqb_v32qi_mask,
8981         __builtin_ia32_vgf2p8affineinvqb_v16qi,
8982         __builtin_ia32_vgf2p8affineinvqb_v16qi_mask): New builtins.
8983         * config/i386/i386-builtin.def (V64QI_FTYPE_V64QI_V64QI_INT_V64QI_UDI,
8984         V32QI_FTYPE_V32QI_V32QI_INT_V32QI_USI,
8985         V16QI_FTYPE_V16QI_V16QI_INT_V16QI_UHI,
8986         V64QI_FTYPE_V64QI_V64QI_INT): New types.
8987         * config/i386/i386.c (ix86_expand_args_builtin): Handle new types.
8988         * config/i386/immintrin.h: Include gfniintrin.h.
8989         * config/i386/sse.md (vgf2p8affineinvqb_*) New pattern.
8990
8991 2017-10-30  Eric Botcazou  <ebotcazou@adacore.com>
8992
8993         * gcc.c (HAVE_TARGET_EXECUTABLE_SUFFIX): Remove old kludge.
8994
8995 2017-10-30  Wilco Dijkstra  <wdijkstr@arm.com>
8996
8997         * config/arm/arm.md (ashldi3): Remove shift by 1 expansion.
8998         (arm_ashldi3_1bit): Remove pattern.
8999         (ashrdi3): Remove shift by 1 expansion.
9000         (arm_ashrdi3_1bit): Remove pattern.
9001         (lshrdi3): Remove shift by 1 expansion.
9002         (arm_lshrdi3_1bit): Remove pattern.
9003         * config/arm/arm.c (arm_rtx_costs_internal): Slightly increase
9004         cost of ashldi3 by 1.
9005         * config/arm/neon.md (ashldi3_neon): Remove shift by 1 expansion.
9006         (<shift>di3_neon): Likewise.
9007
9008 2017-10-30  Dominik Infuehr  <dominik.infuehr@theobroma-systems.com>
9009
9010         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov): Rename
9011         both identically named patterns to (*aarch64_simd_mov<VD:mode>)
9012         and (*aarch64_simd_mov<VQ:mode>).
9013         (*aarch64_simd_mov<VD:mode>): Change type attribute to match
9014         pattern alternative.
9015         (*aarch64_simd_mov<VQ:mode>): Re-order and change type
9016         attributes to match pattern alternative.
9017
9018 2017-10-30  Steven Munroe  <munroesj@gcc.gnu.org>
9019
9020         * config.gcc (powerpc*-*-*): Add emmintrin.h.
9021         * config/rs6000/emmintrin.h: New file.
9022         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include emmintrin.h.
9023
9024 2017-10-30  Wilco Dijkstra  <wdijkstr@arm.com>
9025
9026         * config/arm/vfp.md (movdi_vfp): Merge changes from movdi_vfp_cortexa8.
9027         * (movdi_vfp_cortexa8): Remove pattern.
9028
9029 2017-10-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9030
9031         * doc/install.texi (Specific, alpha*-*-*): Remove DEC OSF/1
9032         etc. reference.
9033         (Specific, alpha*-dec-osf5.1): Remove.
9034         (Specific, mips-sgi-irix5): Remove.
9035         (Specific, mips-sgi-irix6): Remove.
9036
9037 2017-10-30  Jakub Jelinek  <jakub@redhat.com>
9038
9039         PR middle-end/22141
9040         * gimple-ssa-store-merging.c (merged_store_group::apply_stores): Fix
9041         arguments to clear_bit_region_be.
9042
9043 2017-10-30  Jim Wilson  <wilson@tuliptree.org>
9044
9045         * gimplify.c: Include memmodel.h.
9046
9047 2017-10-30  Martin Jambor  <mjambor@suse.cz>
9048
9049         * omp-grid.c (grid_attempt_target_gridification): Also insert a
9050         condition whether loop should be executed at all.
9051
9052 2017-10-30  Will Schmidt  <will_schmidt@vnet.ibm.com>
9053
9054         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
9055         gimple folding of vec_madd() intrinsics.
9056         * config/rs6000/altivec.md (mulv8hi3): Rename altivec_vmladduhm to
9057         fmav8hi4.  (altivec_vmladduhm): Rename to fmav8hi4.
9058         * config/rs6000/rs6000-builtin.def: Rename vmladduhm to fmav8hi4
9059
9060 2017-10-30  Richard Biener  <rguenther@suse.de>
9061
9062         PR tree-optimization/82762
9063         Revert
9064         2017-10-23  Richard Biener  <rguenther@suse.de>
9065
9066         PR tree-optimization/82129
9067         Revert
9068         2017-08-01  Richard Biener  <rguenther@suse.de>
9069
9070         PR tree-optimization/81181
9071         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
9072         (compute_antic): ... end of iteration here.
9073
9074 2017-10-30  Joseph Myers  <joseph@codesourcery.com>
9075
9076         * doc/invoke.texi (C Dialect Options): Document -std=c17,
9077         -std=iso9899:2017 and -std=gnu17.
9078         * doc/standards.texi (C Language): Document C17 support.
9079         * doc/cpp.texi (Overview): Mention -std=c17.
9080         (Standard Predefined Macros): Document C11 and C17 values of
9081         __STDC_VERSION__.  Do not refer to C99 support as incomplete.
9082         * doc/extend.texi (Inline): Do not list individual options for
9083         standards newer than C99.
9084         * dwarf2out.c (highest_c_language, gen_compile_unit_die): Handle
9085         "GNU C17".
9086         * config/rl78/rl78.c (rl78_option_override): Handle "GNU C17"
9087         language name.
9088
9089 2017-10-30  Maxim Ostapenko  <m.ostapenko@samsung.com>
9090
9091         * asan.c (asan_finish_file): Align asan globals array by shadow
9092         granularity.
9093
9094 2017-10-30  Jakub Jelinek  <jakub@redhat.com>
9095
9096         PR middle-end/22141
9097         * gimple-ssa-store-merging.c: Include rtl.h and expr.h.
9098         (struct store_immediate_info): Add bitregion_start and bitregion_end
9099         fields.
9100         (store_immediate_info::store_immediate_info): Add brs and bre
9101         arguments and initialize bitregion_{start,end} from those.
9102         (struct merged_store_group): Add bitregion_start, bitregion_end,
9103         align_base and mask fields.  Drop unnecessary struct keyword from
9104         struct store_immediate_info.  Add do_merge method.
9105         (clear_bit_region_be): Use memset instead of loop storing zeros.
9106         (merged_store_group::do_merge): New method.
9107         (merged_store_group::merge_into): Use do_merge.  Allow gaps in between
9108         stores as long as the surrounding bitregions have no gaps.
9109         (merged_store_group::merge_overlapping): Use do_merge.
9110         (merged_store_group::apply_stores): Test that bitregion_{start,end}
9111         is byte aligned, rather than requiring that start and width are
9112         byte aligned.  Drop unnecessary struct keyword from
9113         struct store_immediate_info.  Allocate and populate also mask array.
9114         Make start of the arrays relative to bitregion_start rather than
9115         start and size them according to bitregion_{end,start} difference.
9116         (struct imm_store_chain_info): Drop unnecessary struct keyword from
9117         struct store_immediate_info.
9118         (pass_store_merging::gate): Punt if BITS_PER_UNIT or CHAR_BIT is not 8.
9119         (pass_store_merging::terminate_all_aliasing_chains): Drop unnecessary
9120         struct keyword from struct store_immediate_info.
9121         (imm_store_chain_info::coalesce_immediate_stores): Allow gaps in
9122         between stores as long as the surrounding bitregions have no gaps.
9123         Formatting fixes.
9124         (struct split_store): Add orig non-static data member.
9125         (split_store::split_store): Initialize orig to false.
9126         (find_constituent_stmts): Return store_immediate_info *, non-NULL
9127         if there is exactly a single original stmt.  Change stmts argument
9128         to pointer from reference, if NULL, don't push anything to it.  Add
9129         first argument, use it to optimize skipping over orig stmts that
9130         are known to be before bitpos already.  Simplify.
9131         (split_group): Return unsigned int count how many stores are or
9132         would be needed rather than a bool.  Add allow_unaligned argument.
9133         Change split_stores argument from reference to pointer, if NULL,
9134         only do a dry run computing how many stores would be produced.
9135         Rewritten algorithm to use both alignment and misalign if
9136         !allow_unaligned and handle bitfield stores with gaps.
9137         (imm_store_chain_info::output_merged_store): Set start_byte_pos
9138         from bitregion_start instead of start.  Compute allow_unaligned
9139         here, if true, do 2 split_group dry runs to compute which one
9140         produces fewer stores and prefer aligned if equal.  Punt if
9141         new count is bigger or equal than original before emitting any
9142         statements, rather than during that.  Remove no longer needed
9143         new_ssa_names tracking.  Replace num_stmts with
9144         split_stores.length ().  Use 32-bit stack allocated entries
9145         in split_stores auto_vec.  Try to reuse original store lhs/rhs1
9146         if possible.  Handle bitfields with gaps.
9147         (pass_store_merging::execute): Ignore bitsize == 0 stores.
9148         Compute bitregion_{start,end} for the stores and construct
9149         store_immediate_info with that.  Formatting fixes.
9150
9151 2017-10-30  Uros Bizjak  <ubizjak@gmail.com>
9152
9153         PR target/82725
9154         * config/i386/i386.c (legitimate_pic_address_disp_p): Allow
9155         UNSPEC_DTPOFF and UNSPEC_NTPOFF with SImode immediate offset.
9156
9157 2017-10-29  Jim Wilson  <wilson@tuliptree.org>
9158
9159         * gimplify.c: Include tm_p.h.
9160
9161         * common.opt (gcoff): Re-add as ignored option.
9162         (gcoff1, gcoff2, gcoff3): Likewise.
9163
9164         * Makefile.in (OBJS): Delete sdbout.o.
9165         (GTFILES): Delete $(srcdir)/sdbout.c.
9166         * debug.h: Delete sdb_debug_hooks.
9167         * final.c: Delete sdbout.h include.
9168         (final_scan_insn): Delete SDB_DEBUG check.
9169         (rest_of_clean_state): Likewise.
9170         * output.h: Delete sdb_begin_function_line.
9171         * sdbout.c: Delete.
9172         * sdbout.h: Delete.
9173         * toplev.c: Delete sdbout.h include.
9174         (process_options): Delete SDB_DEBUG check.
9175         * tree-core.h (tree_type_common): Delete pointer field of
9176         tree_type_symtab.
9177         * tree.c (copy_node): Clear TYPE_SYMTAB_DIE instead of
9178         TYPE_SYMTAB_POINTER.
9179         * tree.h (TYPE_SYMTAB_POINTER): Delete.
9180         (TYPE_SYMTAB_IS_POINTER): Delete.
9181         (TYPE_SYMTAB_IS_DIE): Renumber.
9182         * xcoffout.c: Refer to former sdbout.c file.
9183         (xcoffout_begin_prologue): Use past tense for sdbout.c reference.
9184
9185         * doc/install.texi (--with-stabs): Delete COFF and ECOFF info.
9186         * doc/invoke.texi (SEEALSO): Delete adb and sdb references.
9187         (Debugging Options): Delete -gcoff.
9188         (-gstabs): Delete SDB reference.
9189         (-gcoff): Delete.
9190         (-gcoff@var{level}): Delete.
9191         * doc/passes.texi (Debugging information output): Delete SDB and
9192         sdbout.c references.
9193         * doc/tm.texi: Regenerate.
9194         * doc/tm.texi.in (DWARF_CIE_DATA_ALIGNMENT): Delete SDB from xref.
9195         (SDB and DWARF): Change node name to DWARF and delete SDB and COFF
9196         references.
9197         (DEBUGGER_AUTO_OFFSET): Delete COFF and SDB references.
9198         (PREFERRED_DEBUGGING_TYPE): Delete SDB_DEBUG and -gcoff references.
9199         (SDB_DEBUGGING_INFO): Delete.
9200         (PUT_SDB_@dots{}, SDB_DELIM, SDB_ALLOW_UNKNOWN_REFERENCES)
9201         SDB_ALLOW_FORWARD_REFERENCES, SDB_OUTPUT_SOURCE_LINE): Delete.
9202         * target.def (output_source_filename): Delete COFF reference.
9203
9204         * common.opt (gcoff): Delete.
9205         (gxcoff+): Update Negative chain.
9206         * defaults.h: Delete all references to SDB_DEBUGGING_INFO and
9207         SDB_DEBUG.
9208         * dwarf2out.c (gen_array_type_die): Change SDB to debuggers.
9209         * flag-types.h (enum debug_info_type): Delete SDB_DEBUG.
9210         * function.c (number_blocks): Delete SDB_DEBUGGING_INFO, SDB_DEBUG,
9211         and SDB references.
9212         (expand_function_start): Change sdb reference to past tense.
9213         (expand_function_end): Change sdb reference to past tense.
9214         * gcc.c (cpp_unique_options): Delete gcoff3 reference.
9215         * opts.c (debug_type_names): Delete coff entry.
9216         (common_handle_option): Delete OPT_gcoff case.
9217         * system.h (SDB_DEBUG, SDB_DEBUGGING_INFO): Poison.
9218
9219         * config/dbxcoff.h (PREFERRED_DEBUGGING_TYPE): Set to DBX_DEBUG.
9220         * config/cris/cris.h: Delete SDB reference in comment.
9221         * config/i386/cygming.h: Don't define SDB_DEBUGGING_INFO.
9222         (ASM_DECLARE_FUNCTION_NAME): Delete SDB reference from comment.
9223         * config/i386/gas.h: Don't define SDB_DEBUGGING_INFO.
9224         * config/i386/i386.c (svr4_dbx_register_map): Change SDB references
9225         to past tense.
9226         (ix86_expand_prologue): Likewise.
9227         * config/i386/winnt.c (i386_pe_start_function): Don't check SDB_DEBUG.
9228         * config/ia64/ia64.h: Likewise.
9229         * config/m68k/m68kelf.h (DBX_REGISTER_NUMBER): Delete SDB reference.
9230         * config/mips/mips.h (SUBTARGET_ASM_DEBUGGING_SPEC): Delete gcoff*
9231         support.
9232         * config/mmix/mmix.h: Likewise.
9233         * config/nds32/nds32.c: Likewise.
9234         * config/stormy/storym16.h: Likewise.
9235         * config/visium/visium.h: Likewise.
9236         * config/vx-common.h (SDB_DEBUGGING_INFO): Delete undef.
9237
9238 2017-10-28  Sandra Loosemore  <sandra@codesourcery.com>
9239
9240         * config/nios2/nios2.h (FRAME_GROWS_DOWNWARD): Define to 1.
9241         * config/nios2/nios2.c (nios2_initial_elimination_offset):  Make
9242         FRAME_POINTER_REGNUM point at high end of local var area.
9243
9244 2017-10-27  Eric Botcazou  <ebotcazou@adacore.com>
9245
9246         * bb-reorder.c (find_traces_1_round): Fix off-by-one index.
9247         Move comment around.  Do not reset best_edge for a copiable
9248         destination if the copy would cause a partition change.
9249         (better_edge_p): Remove redundant check.
9250
9251 2017-10-27  Uros Bizjak  <ubizjak@gmail.com>
9252
9253         * config/i386/i386-protos.h (ix86_fp_compare_mode): Remove prototype.
9254
9255 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
9256
9257         * builtins.c (CASE_MATHFN_FLOATN): New helper macro to add cases
9258         for math functions that have _Float<N> and _Float<N>X variants.
9259         (mathfn_built_in_2): Add support for math functions that have
9260         _Float<N> and _Float<N>X variants.
9261         (DEF_INTERNAL_FLT_FLOATN_FN): New helper macro.
9262         (expand_builtin_mathfn_ternary): Add support for fma with
9263         _Float<N> and _Float<N>X variants.
9264         (expand_builtin): Likewise.
9265         (fold_builtin_3): Likewise.
9266         * builtins.def (DEF_EXT_LIB_FLOATN_NX_BUILTINS): New macro to
9267         create math function _Float<N> and _Float<N>X variants as external
9268         library builtins.
9269         (BUILT_IN_COPYSIGN _Float<N> and _Float<N>X variants) Use
9270         DEF_EXT_LIB_FLOATN_NX_BUILTINS to make built-in functions using
9271         the __builtin_ prefix and if not strict ansi, without the prefix.
9272         (BUILT_IN_FABS _Float<N> and _Float<N>X variants): Likewise.
9273         (BUILT_IN_FMA _Float<N> and _Float<N>X variants): Likewise.
9274         (BUILT_IN_FMAX _Float<N> and _Float<N>X variants): Likewise.
9275         (BUILT_IN_FMIN _Float<N> and _Float<N>X variants): Likewise.
9276         (BUILT_IN_NAN _Float<N> and _Float<N>X variants): Likewise.
9277         (BUILT_IN_SQRT _Float<N> and _Float<N>X variants): Likewise.
9278         * builtin-types.def (BT_FN_FLOAT16_FLOAT16_FLOAT16_FLOAT16): New
9279         function signatures for fma _Float<N> and _Float<N>X variants.
9280         (BT_FN_FLOAT32_FLOAT32_FLOAT32_FLOAT32): Likewise.
9281         (BT_FN_FLOAT64_FLOAT64_FLOAT64_FLOAT64): Likewise.
9282         (BT_FN_FLOAT128_FLOAT128_FLOAT128_FLOAT128): Likewise.
9283         (BT_FN_FLOAT32X_FLOAT32X_FLOAT32X_FLOAT32X): Likewise.
9284         (BT_FN_FLOAT64X_FLOAT64X_FLOAT64X_FLOAT64X): Likewise.
9285         (BT_FN_FLOAT128X_FLOAT128X_FLOAT128X_FLOAT128X): Likewise.
9286         * gencfn-macros.c (print_case_cfn): Add support for math functions
9287         that have _Float<N> and _Float<N>X variants.
9288         (print_define_operator_list): Likewise.
9289         (fltfn_suffixes): Likewise.
9290         (main): Likewise.
9291         * internal-fn.def (DEF_INTERNAL_FLT_FLOATN_FN): New helper macro
9292         for math functions that have _Float<N> and _Float<N>X variants.
9293         (SQRT): Add support for sqrt, copysign, fmin and fmax _Float<N>
9294         and _Float<N>X variants.
9295         (COPYSIGN): Likewise.
9296         (FMIN): Likewise.
9297         (FMAX): Likewise.
9298         * fold-const.c (tree_call_nonnegative_warnv_p): Add support for
9299         copysign, fma, fmax, fmin, and sqrt _Float<N> and _Float<N>X
9300         variants.
9301         (integer_valued_read_call_p): Likewise.
9302         * fold-const-call.c (fold_const_call_ss): Likewise.
9303         (fold_const_call_sss): Add support for copysign, fmin, and fmax
9304         _Float<N> and _Float<N>X variants.
9305         (fold_const_call_ssss): Add support for fma _Float<N> and
9306         _Float<N>X variants.
9307         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Add
9308         support for copysign and fma _Float<N> and _Float<N>X variants.
9309         (backprop::process_builtin_call_use): Likewise.
9310         * tree-call-cdce.c (can_test_argument_range); Add support for
9311         sqrt _Float<N> and _Float<N>X variants.
9312         (edom_only_function): Likewise.
9313         (get_no_error_domain): Likewise.
9314         * tree-ssa-math-opts.c (internal_fn_reciprocal): Likewise.
9315         * tree-ssa-reassoc.c (attempt_builtin_copysign): Add support for
9316         copysign _Float<N> and _Float<N>X variants.
9317         * config/rs6000/rs6000-builtin.def (SQRTF128): Delete, this is now
9318         handled by machine independent code.
9319         (FMAF128): Likewise.
9320         * doc/cpp.texi (Common Predefined Macros): Document defining
9321         __FP_FAST_FMAF<N> and __FP_FAST_FMAF<N>X if the backend supports
9322         fma _Float<N> and _Float<N>X variants.
9323
9324 2017-10-27  Uros Bizjak  <ubizjak@gmail.com>
9325
9326         PR target/82692
9327         * config/i386/i386-modes.def (CCFPU): Remove definition.
9328         * config/i386/i386.c (put_condition_mode): Remove CCFPU mode handling.
9329         (ix86_cc_modes_compatible): Ditto.
9330         (ix86_expand_carry_flag_compare): Ditto.
9331         (ix86_expand_int_movcc): Ditto.
9332         (ix86_expand_int_addcc): Ditto.
9333         (ix86_reverse_condition): Ditto.
9334         (ix86_unordered_fp_compare): Rename from ix86_fp_compare_mode.
9335         Return true/false for unordered/ordered fp comparisons.
9336         (ix86_cc_mode): Always return CCFPmode for float mode comparisons.
9337         (ix86_prepare_fp_compare_args): Update for rename.
9338         (ix86_expand_fp_compare): Update for rename.  Generate unordered
9339         compare RTXes wrapped with UNSPEC_NOTRAP unspec.
9340         (ix86_expand_sse_compare_and_jump): Ditto.
9341         * config/i386/predicates.md (fcmov_comparison_operator):
9342         Remove CCFPU mode handling.
9343         (ix86_comparison_operator): Ditto.
9344         (ix86_carry_flag_operator): Ditto.
9345         * config/i386/i386.md (UNSPEC_NOTRAP): New unspec.
9346         (*cmpu<mode>_i387): Wrap compare RTX with UNSPEC_NOTRAP unspec.
9347         (*cmpu<mode>_cc_i387): Ditto.
9348         (FPCMP): Remove mode iterator.
9349         (unord): Remove mode attribute.
9350         (unord_subst): New define_subst transformation
9351         (unord): New define_subst attribute.
9352         (unordered): Ditto.
9353         (*cmpi<unord><MODEF:mode>): Rewrite using unord_subst transformation.
9354         (*cmpi<unord>xf_i387): Ditto.
9355         * config/i386/sse.md (<sse>_<unord>comi<round_saeonly_name>): Merge
9356         from <sse>_comi<round_saeonly_name> and <sse>_ucomi<round_saeonly_name>
9357         using unord_subst transformation.
9358         * config/i386/subst.md (SUBST_A): Remove CCFP and CCFPU modes.
9359         (round_saeonly): Also handle CCFP mode.
9360         * reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_NOTRAP unspec.
9361         Remove UNSPEC_SAHF unspec handling.
9362
9363 2017-10-27  Jan Hubicka  <hubicka@ucw.cz>
9364
9365         * x86-tune.def (X86_TUNE_INTER_UNIT_MOVES_TO_VEC): Disable for Zen.
9366
9367 2017-10-27  Jeff Law  <law@redhat.com>
9368
9369         * gimple-ssa-sprintf.c: Include domwalk.h.
9370         (class sprintf_dom_walker): New class, derived from dom_walker.
9371         (sprintf_dom_walker::before_dom_children): New function.
9372         (struct call_info): Moved into sprintf_dom_walker class
9373         (compute_formath_length, handle_gimple_call): Likewise.
9374         (sprintf_length::execute): Call the dominator walker rather
9375         than walking the statements.
9376
9377         * tree-vrp.c (check_all_array_refs): Do not use wi->info to smuggle
9378         gimple statement locations.
9379         (check_array_bounds): Corresponding changes.  Get the statement's
9380         location directly from wi->stmt.
9381
9382 2017-10-27  Palmer Dabbelt  <palmer@dabbelt.com>
9383
9384         PR target/82717
9385         * doc/invoke.texi (RISC-V) <-mabi>: Correct and improve.
9386
9387 2017-10-27  Jan Hubicka  <hubicka@ucw.cz>
9388
9389         * config/i386/x86-tune.def (X86_TUNE_PARTIAL_REG_DEPENDENCY,
9390         X86_TUNE_MOVX): Disable for Haswell and newer CPUs.
9391
9392 2017-10-27  Jakub Jelinek  <jakub@redhat.com>
9393
9394         PR target/82703
9395         * config/i386/i386-protos.h (maybe_get_pool_constant): Removed.
9396         * config/i386/i386.c (maybe_get_pool_constant): Removed.
9397         (ix86_split_to_parts): Use avoid_constant_pool_reference instead of
9398         maybe_get_pool_constant.
9399         * config/i386/predicates.md (zero_extended_scalar_load_operand):
9400         Likewise.
9401
9402 2017-10-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9403
9404         * doc/install.texi (Specific, i?86-*-solaris2.10): Simplify gas
9405         2.26 caveat.  Update gas and gld versions.
9406         (Specific, *-*-solaris2*): Update binutils version.  Remove caveat
9407         reference.
9408
9409 2017-10-27  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
9410
9411         * cgraph.h (set_malloc_flag): Declare.
9412         * cgraph.c (set_malloc_flag_1): New function.
9413         (set_malloc_flag): Likewise.
9414         * ipa-fnsummary.h (ipa_call_summary): Add new field is_return_callee.
9415         * ipa-fnsummary.c (ipa_call_summary::reset): Set is_return_callee to
9416         false.
9417         (read_ipa_call_summary): Add support for reading is_return_callee.
9418         (write_ipa_call_summary): Stream is_return_callee.
9419         * ipa-inline.c (ipa_inline): Remove call to ipa_free_fn_summary.
9420         * ipa-pure-const.c: Add headers ssa.h, alloc-pool.h, symbol-summary.h,
9421         ipa-prop.h, ipa-fnsummary.h.
9422         (pure_const_names): Change to static.
9423         (malloc_state_e): Define.
9424         (malloc_state_names): Define.
9425         (funct_state_d): Add field malloc_state.
9426         (varying_state): Set malloc_state to STATE_MALLOC_BOTTOM.
9427         (check_retval_uses): New function.
9428         (malloc_candidate_p): Likewise.
9429         (analyze_function): Add support for malloc attribute.
9430         (pure_const_write_summary): Stream malloc_state.
9431         (pure_const_read_summary): Add support for reading malloc_state.
9432         (dump_malloc_lattice): New function.
9433         (propagate_malloc): New function.
9434         (warn_function_malloc): New function.
9435         (ipa_pure_const::execute): Call propagate_malloc and
9436         ipa_free_fn_summary.
9437         (pass_local_pure_const::execute): Add support for malloc attribute.
9438         * ssa-iterators.h (RETURN_FROM_IMM_USE_STMT): New macro.
9439         * doc/invoke.texi: Document Wsuggest-attribute=malloc.
9440
9441 2017-10-27  Martin Liska  <mliska@suse.cz>
9442
9443         PR gcov-profile/82457
9444         * doc/invoke.texi: Document that one needs a non-strict ISO mode
9445         for fork-like functions to be properly instrumented.
9446
9447 2017-10-27  Richard Biener  <rguenther@suse.de>
9448
9449         PR middle-end/81659
9450         * tree-eh.c (pass_lower_eh_dispatch::execute): Free dominator
9451         info when we redirected EH.
9452
9453 2017-10-26  Michael Collison  <michael.collison@arm.com>
9454
9455         * config/aarch64/aarch64.md(<optab>_trunc><vf><GPI:mode>2):
9456         New pattern.
9457         (<optab>_trunchf<GPI:mode>2: New pattern.
9458         (<optab>_trunc<vgp><GPI:mode>2: New pattern.
9459         * config/aarch64/iterators.md (wv): New mode attribute.
9460         (vf, VF): New mode attributes.
9461         (vgp, VGP): New mode attributes.
9462         (s): Update attribute with SImode and DImode prefixes.
9463
9464 2017-10-26  Sandra Loosemore  <sandra@codesourcery.com>
9465
9466         * config/nios2/constraints.md ("S"): Match r0rel_constant_p too.
9467         * config/nios2/nios2-protos.h (r0rel_constant_p): Declare.
9468         * config/nios2/nios2.c: (nios2_r0rel_sec_regex): New.
9469         (nios2_option_overide): Initialize it.  Don't allow R0-relative
9470         addressing with PIC.
9471         (nios2_rtx_costs): Handle r0rel_constant_p like gprel_constant_p.
9472         (nios2_symbolic_constant_p): Likewise.
9473         (nios2_legitimate_address_p): Likewise.
9474         (nios2_r0rel_section_name_p): New.
9475         (nios2_symbol_ref_in_r0rel_data_p): New.
9476         (nios2_emit_move_sequence): Handle r0rel_constant_p.
9477         (r0rel_constant_p): New.
9478         (nios2_print_operand_address): Handle r0rel_constant_p.
9479         (nios2_cdx_narrow_form_p): Likewise.
9480         * config/nios2/nios2.opt (mr0rel-sec=): New option.
9481         * doc/invoke.texi (Option Summary): Add -mr0rel-sec.
9482         (Nios II Options): Document -mr0rel-sec.
9483
9484 2017-10-26  Sandra Loosemore  <sandra@codesourcery.com>
9485
9486         * config/nios2/nios2.c: Include xregex.h.
9487         (nios2_gprel_sec_regex): New.
9488         (nios2_option_overide): Initialize it.  Don't allow GP-relative
9489         addressing with PIC.
9490         (nios2_small_section_name_p): Check for regex match.
9491         * config/nios2/nios2.opt (mgprel-sec=): New option.
9492         * doc/invoke.texi (Option Summary): Add -mgprel-sec.
9493         (Nios II Options): Document -mgprel-sec.
9494
9495 2017-10-26  Jim Wilson  <wilson@tuliptree.org>
9496
9497         * doc/invoke.texi (-fdebug-prefix-map): Expand documentation.
9498
9499 2017-10-26  Tom de Vries  <tom@codesourcery.com>
9500
9501         PR tree-optimization/82707
9502         * gimple.c (gimple_copy): Fix unsharing of
9503         GIMPLE_OMP_{SINGLE,TARGET,TEAMS}.
9504
9505 2017-10-26  Olga Makhotina  <olga.makhotina@intel.com>
9506
9507         * config/i386/avx512fintrin.h (_mm512_cmpeq_pd_mask,
9508         _mm512_cmple_pd_mask, _mm512_cmplt_pd_mask,
9509         _mm512_cmpneq_pd_mask, _mm512_cmpnle_pd_mask,
9510         _mm512_cmpnlt_pd_mask, _mm512_cmpord_pd_mask,
9511         _mm512_cmpunord_pd_mask, _mm512_mask_cmpeq_pd_mask,
9512         _mm512_mask_cmple_pd_mask, _mm512_mask_cmplt_pd_mask,
9513         _mm512_mask_cmpneq_pd_mask, _mm512_mask_cmpnle_pd_mask,
9514         _mm512_mask_cmpnlt_pd_mask, _mm512_mask_cmpord_pd_mask,
9515         _mm512_mask_cmpunord_pd_mask, _mm512_cmpeq_ps_mask,
9516         _mm512_cmple_ps_mask, _mm512_cmplt_ps_mask,
9517         _mm512_cmpneq_ps_mask, _mm512_cmpnle_ps_mask,
9518         _mm512_cmpnlt_ps_mask, _mm512_cmpord_ps_mask,
9519         _mm512_cmpunord_ps_mask, _mm512_mask_cmpeq_ps_mask,
9520         _mm512_mask_cmple_ps_mask, _mm512_mask_cmplt_ps_mask,
9521         _mm512_mask_cmpneq_ps_mask, _mm512_mask_cmpnle_ps_mask,
9522         _mm512_mask_cmpnlt_ps_mask, _mm512_mask_cmpord_ps_mask,
9523         _mm512_mask_cmpunord_ps_mask): New intrinsics.
9524
9525 2017-10-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
9526
9527         * config/rs6000/aix.h (TARGET_IEEEQUAD_DEFAULT): Set long double
9528         default to IBM.
9529         * config/rs6000/darwin.h (TARGET_IEEEQUAD_DEFAULT): Likewise.
9530         * config/rs6000/rs6000.opt (-mabi=ieeelongdouble): Move the
9531         warning to rs6000.c.  Remove the Undocumented flag, since it has
9532         been documented.
9533         (-mabi=ibmlongdouble): Likewise.
9534         * config/rs6000/rs6000.c (TARGET_IEEEQUAD_DEFAULT): If it is not
9535         already set, set the default format for long double.
9536         (rs6000_debug_reg_global): Print whether long double is IBM or
9537         IEEE.
9538         (rs6000_option_override_internal): Rework setting long double
9539         format.  Only warn if the user is changing the long double default
9540         and they did not use -Wno-psabi.
9541         * doc/invoke.texi (PowerPC options): Update the documentation for
9542         -mabi=ieeelongdouble and -mabi=ibmlongdouble.
9543
9544 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
9545             Alan Hayward  <alan.hayward@arm.com>
9546             David Sherwood  <david.sherwood@arm.com>
9547
9548         * rtl.h (wider_subreg_mode): New function.
9549         * ira.h (ira_sort_regnos_for_alter_reg): Take a machine_mode *
9550         rather than an unsigned int *.
9551         * ira-color.c (regno_max_ref_width): Replace with...
9552         (regno_max_ref_mode): ...this new variable.
9553         (coalesced_pseudo_reg_slot_compare): Update accordingly.
9554         Use wider_subreg_mode.
9555         (ira_sort_regnos_for_alter_reg): Likewise.  Take a machine_mode *
9556         rather than an unsigned int *.
9557         * lra-constraints.c (uses_hard_regs_p): Use wider_subreg_mode.
9558         (process_alt_operands): Likewise.
9559         (invariant_p): Likewise.
9560         * lra-spills.c (assign_mem_slot): Likewise.
9561         (add_pseudo_to_slot): Likewise.
9562         * lra.c (collect_non_operand_hard_regs): Likewise.
9563         (add_regs_to_insn_regno_info): Likewise.
9564         * reload1.c (regno_max_ref_width): Replace with...
9565         (regno_max_ref_mode): ...this new variable.
9566         (reload): Update accordingly.  Update call to
9567         ira_sort_regnos_for_alter_reg.
9568         (alter_reg): Update to use regno_max_ref_mode.  Call wider_subreg_mode.
9569         (init_eliminable_invariants): Update to use regno_max_ref_mode.
9570         (scan_paradoxical_subregs): Likewise.
9571
9572 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
9573
9574         * config/aarch64/aarch64.h (EXIT_IGNORE_STACK): Set if alloca is used.
9575         (aarch64_frame): Add emit_frame_chain boolean.
9576         * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
9577         Move eh_return case to aarch64_layout_frame.
9578         (aarch64_layout_frame): Initialize emit_frame_chain.
9579         (aarch64_expand_prologue): Use emit_frame_chain.
9580
9581 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
9582
9583         * config/aarch64/aarch64.c (aarch64_layout_frame):
9584         Ensure LR is always stored at the bottom of the callee-saves.
9585         Remove rarely used frame layout which saves callee-saves at top of
9586         frame, so the store of LR can be used as a valid probe in all cases.
9587
9588 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
9589
9590         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
9591         Improve unaligned TImode/TFmode base/offset split.
9592
9593 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
9594             Alan Hayward  <alan.hayward@arm.com>
9595             David Sherwood  <david.sherwood@arm.com>
9596
9597         * caller-save.c (mark_referenced_regs):  Use read_modify_subreg_p.
9598         * combine.c (find_single_use_1): Likewise.
9599         (expand_field_assignment): Likewise.
9600         (move_deaths): Likewise.
9601         * lra-constraints.c (simplify_operand_subreg): Likewise.
9602         (curr_insn_transform): Likewise.
9603         * lra.c (collect_non_operand_hard_regs): Likewise.
9604         (add_regs_to_insn_regno_info): Likewise.
9605         * rtlanal.c (reg_referenced_p): Likewise.
9606         (covers_regno_no_parallel_p): Likewise.
9607
9608 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
9609
9610         * wide-int-print.cc (print_hex): Loop based on extract_uhwi.
9611         Don't print any bits outside the precision of the value.
9612         * wide-int.cc (test_printing): Add some new tests.
9613
9614 2017-10-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9615
9616         * configure.ac (gcc_cv_as_ix86_xbrace_comment): Check if assembler
9617         supports -xbrace_comment option.
9618         * configure: Regenerate.
9619         * config.in: Regenerate.
9620         * config/i386/sol2.h (ASM_XBRACE_COMMENT_SPEC): Define.
9621         (ASM_CPU_SPEC): Use it.
9622
9623 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
9624
9625         * target.def (static_rtx_alignment): New hook.
9626         * targhooks.h (default_static_rtx_alignment): Declare.
9627         * targhooks.c (default_static_rtx_alignment): New function.
9628         * doc/tm.texi.in (TARGET_STATIC_RTX_ALIGNMENT): New hook.
9629         * doc/tm.texi: Regenerate.
9630         * varasm.c (force_const_mem): Use targetm.static_rtx_alignment
9631         instead of targetm.constant_alignment.  Remove call to
9632         set_mem_attributes.
9633         * config/cris/cris.c (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
9634         (cris_preferred_mininum_alignment): New function, split out from...
9635         (cris_constant_alignment): ...here.
9636         (cris_static_rtx_alignment): New function.
9637         * config/i386/i386.c (ix86_static_rtx_alignment): New function,
9638         split out from...
9639         (ix86_constant_alignment): ...here.
9640         (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
9641         * config/mmix/mmix.c (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
9642         (mmix_static_rtx_alignment): New function.
9643         * config/spu/spu.c (spu_static_rtx_alignment): New function.
9644         (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
9645
9646 2017-10-26  Tamar Christina  <tamar.christina@arm.com>
9647
9648         PR target/81800
9649         * config/aarch64/aarch64.md (lrint<GPF:mode><GPI:mode>2):
9650         Add flag_trapping_math and flag_fp_int_builtin_inexact.
9651
9652 2017-10-25  Palmer Dabbelt  <palmer@dabbelt.com>
9653
9654         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Define.
9655         * config/riscv/pic.md (local_pic_load): Rename to local_pic_load_s,
9656         mark as a sign-extending load.
9657         (local_pic_load_u): Define.
9658
9659 2017-10-25  Eric Botcazou  <ebotcazou@adacore.com>
9660
9661         PR middle-end/82062
9662         * fold-const.c (operand_equal_for_comparison_p): Also return true
9663         if ARG0 is a simple variant of ARG1 with narrower precision.
9664         (fold_ternary_loc): Always pass unstripped operands to the predicate.
9665
9666 2017-10-25  Jan Hubicka  <hubicka@ucw.cz>
9667
9668         * i386.c (ix86_builtin_vectorization_cost): Compute scatter/gather
9669         cost correctly.
9670         * i386.h (processor_costs): Add gather_static, gather_per_elt,
9671         scatter_static, scatter_per_elt.
9672         * x86-tune-costs.h: Add new cost entries.
9673
9674 2017-10-25  Richard Biener  <rguenther@suse.de>
9675
9676         * tree-ssa-sccvn.h (vn_eliminate): Declare.
9677         * tree-ssa-pre.c (class eliminate_dom_walker, eliminate,
9678         class pass_fre): Move to ...
9679         * tree-ssa-sccvn.c (class eliminate_dom_walker, vn_eliminate,
9680         class pass_fre): ... here and adjust for statistics.
9681
9682 2017-10-25  Jakub Jelinek  <jakub@redhat.com>
9683
9684         PR libstdc++/81706
9685         * attribs.c (attribute_value_equal): Use omp_declare_simd_clauses_equal
9686         for comparison of OMP_CLAUSEs regardless of flag_openmp{,_simd}.
9687         (duplicate_one_attribute, copy_attributes_to_builtin): New functions.
9688         * attribs.h (duplicate_one_attribute, copy_attributes_to_builtin): New
9689         declarations.
9690
9691 2017-10-25  Richard Biener  <rguenther@suse.de>
9692
9693         * tree-ssa-pre.c (need_eh_cleanup, need_ab_cleanup, el_to_remove,
9694         el_to_fixup, el_todo, el_avail, el_avail_stack, eliminate_avail,
9695         eliminate_push_avail, eliminate_insert): Move inside...
9696         (class eliminate_dom_walker): ... this class in preparation
9697         of move.
9698         (fini_eliminate): Remove by merging with ...
9699         (eliminate): ... this function.  Adjust for class changes.
9700         (pass_pre::execute): Remove fini_eliminate call.
9701         (pass_fre::execute): Likewise.
9702
9703 2017-10-24  Jakub Jelinek  <jakub@redhat.com>
9704
9705         PR target/82460
9706         * config/i386/sse.md (UNSPEC_VPERMI2, UNSPEC_VPERMI2_MASK): Remove.
9707         (VPERMI2, VPERMI2I): New mode iterators.
9708         (<avx512>_vpermi2var<mode>3_maskz): Remove 3 define_expand patterns.
9709         (<avx512>_vpermi2var<mode>3<sd_maskz_name>): Remove 3 define_insn
9710         patterns.
9711         (<avx512>_vpermi2var<mode>3_mask): New define_expand using VPERMI2
9712         mode iterator.  Remove 3 old define_insn patterns.
9713         (*<avx512>_vpermi2var<mode>3_mask): 2 new define_insn patterns.
9714         (<avx512>_vpermt2var<mode>3_maskz): Adjust 1 define_expand to use
9715         VPERMI2 mode iterator, remove the other two expanders.
9716         (<avx512>_vpermt2var<mode>3<sd_maskz_name>): Adjust 1 define_insn
9717         to use VPERMI2 mode iterator, add another alternative for vpermi2*
9718         instructions, remove the other two patterns.
9719         (<avx512>_vpermt2var<mode>3_mask): Adjust 1 define_insn to use VPERMI2
9720         mode iterator, remove the other two patterns.
9721         * config/i386/i386.c (ix86_expand_vec_perm_vpermi2): Renamed to ...
9722         (ix86_expand_vec_perm_vpermt2): ... this.  Swap mask and op0
9723         arguments, use gen_*vpermt2* expanders instead of gen_*vpermi2*
9724         and adjust argument order accordingly.
9725         (ix86_expand_vec_perm): Adjust caller.
9726         (expand_vec_perm_1): Likewise.
9727         (expand_vec_perm_vpermi2_vpshub2): Rename to ...
9728         (expand_vec_perm_vpermt2_vpshub2): ... this.
9729         (ix86_expand_vec_perm_const_1): Adjust caller.
9730         (ix86_vectorize_vec_perm_const_ok): Adjust comments.
9731
9732         PR target/82370
9733         * config/i386/sse.md (VIMAX_AVX2): Remove V4TImode.
9734         (VIMAX_AVX2_AVX512BW, VIMAX_AVX512VL): New mode iterators.
9735         (vec_shl_<mode>): Remove unused expander.
9736         (avx512bw_<shift_insn><mode>3): New define_insn.
9737         (<sse2_avx2>_ashl<mode>3, <sse2_avx2>_lshr<mode>3): Replaced by ...
9738         (<sse2_avx2>_<shift_insn><mode>3): ... this.  New define_insn.
9739
9740 2017-10-24  Paolo Carlini  <paolo.carlini@oracle.com>
9741
9742         PR c++/82466
9743         * doc/invoke.texi ([Wbuiltin-declaration-mismatch]): Extend
9744         description.
9745
9746 2017-10-24  Wilco Dijkstra  <wdijkstr@arm.com>
9747
9748         PR rtl-optimization/82396
9749         * gcc/haifa-sched.c (ready_sort_real): Remove qsort workaround.
9750         (autopref_multipass_init): Simplify initialization.
9751         (autopref_rank_data): Simplify sort order.
9752         * gcc/sched-int.h (autopref_multipass_data_): Remove
9753         multi_mem_insn_p, min_offset and max_offset.
9754
9755 2017-10-24  Wilco Dijkstra  <wdijkstr@arm.com>
9756
9757         PR middle-end/60580
9758         * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
9759         Check special value of flag_omit_frame_pointer.
9760         (aarch64_can_eliminate): Likewise.
9761         (aarch64_override_options_after_change_1): Simplify handling of
9762         -fomit-frame-pointer and -fomit-leaf-frame-pointer.
9763
9764 2017-10-24  Richard Biener  <rguenther@suse.de>
9765
9766         PR tree-optimization/82697
9767         * tree-ssa-phiopt.c (cond_store_replacement): Use alias-set
9768         zero for conditional load and unconditional store.
9769
9770 2017-10-24  H.J. Lu  <hongjiu.lu@intel.com>
9771
9772         * doc/install.texi: Document bootstrap-cet.
9773
9774 2017-10-24  H.J. Lu  <hongjiu.lu@intel.com>
9775
9776         PR target/82659
9777         * config/i386/i386.c (rest_of_insert_endbranch): Don't insert
9778         ENDBR instruction at function entrance if function is only
9779         called directly.
9780
9781 2017-10-24  Jakub Jelinek  <jakub@redhat.com>
9782
9783         PR target/82628
9784         * config/i386/i386.md (addcarry<mode>, subborrow<mode>): Change
9785         patterns to better describe from which operation the CF is computed.
9786         (addcarry<mode>_0, subborrow<mode>_0): New patterns.
9787         * config/i386/i386.c (ix86_expand_builtin) <case handlecarry>: Pass
9788         one LTU with [DT]Imode and another one with [SD]Imode.  If arg0
9789         is 0, use _0 suffixed expanders instead of emitting a comparison
9790         before it.
9791
9792 2017-10-06  Sergey Shalnov  <Sergey.Shalnov@intel.com>
9793
9794         * config/i386/i386.md(*movsf_internal, *movdf_internal):
9795         Avoid 512-bit AVX modes for TARGET_PREFER_AVX256.
9796
9797 2017-10-24  Eric Botcazou  <ebotcazou@adacore.com>
9798
9799         PR middle-end/82569
9800         * tree-outof-ssa.h (always_initialized_rtx_for_ssa_name_p): Delete.
9801         * expr.c (expand_expr_real_1) <expand_decl_rtl>: Revert latest change.
9802         * loop-iv.c (iv_get_reaching_def): Likewise.
9803         * cfgexpand.c (expand_one_ssa_partition): Initialize the RTX if the
9804         variable is promoted and the partition contains undefined values.
9805
9806 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
9807
9808         * config/nios2/nios2.c (nios2_rtx_costs): Make costs better
9809         reflect reality.
9810         (nios2_address_cost): Define.
9811         (nios2_legitimize_address): Recognize (exp + constant) directly.
9812         (TARGET_ADDRESS_COST): Define.
9813
9814 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
9815
9816         * config/nios2/nios2-protos.h (nios2_large_constant_p): Declare.
9817         (nios2_symbolic_memory_operand_p): Declare.
9818         (nios2_split_large_constant): Declare.
9819         (nios2_split_symbolic_memory_operand): Declare.
9820         * config/nios2/nios2.c: Adjust includes.
9821         (nios2_symbolic_constant_allowed): New.
9822         (nios2_symbolic_constant_p): New.
9823         (nios2_plus_symbolic_constant_p): New.
9824         (nios2_valid_addr_expr_p): Recognize addresses involving
9825         symbolic constants.
9826         (nios2_legitimate_address_p): Likewise, also LO_SUM.
9827         (nios2_symbolic_memory_operand_p): New.
9828         (nios2_large_constant_p): New.
9829         (nios2_split_large_constant): New.
9830         (nios2_split_plus_large_constant): New.
9831         (nios2_split_symbolic_memory_operand): New.
9832         (nios2_legitimize_address): Code refactoring.  Handle addresses
9833         involving symbolic constants.
9834         (nios2_emit_move_sequence): Likewise.
9835         (nios2_print_operand): Improve error output.
9836         (nios2_print_operand_address): Handle LO_SUM.
9837         (nios2_cdx_narrow_form_p): Likewise.
9838         * config/nios2/nios2.md (movqi_internal): Add splitter for memory
9839         operands involving symbolic constants.
9840         (movhi_internal, movsi_internal): Likewise.
9841         (zero_extendhisi2, zero_extendqi<mode>2): Likewise.
9842         (extendhisi2, extendqi<mode>2): Likewise.
9843
9844 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
9845
9846         * tree-pass.h (PROP_rtl_split_insns): Define.
9847         * recog.c (pass_data_split_all_insns): Provide PROP_rtl_split_insns.
9848
9849 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
9850
9851         * config/nios2/nios2.c (TARGET_LRA_P): Don't override.
9852
9853 2017-10-23  Jakub Jelinek  <jakub@redhat.com>
9854
9855         PR debug/82630
9856         * target.def (const_not_ok_for_debug_p): Default to
9857         default_const_not_ok_for_debug_p instead of hook_bool_rtx_false.
9858         * targhooks.h (default_const_not_ok_for_debug_p): New declaration.
9859         * targhooks.c (default_const_not_ok_for_debug_p): New function.
9860         * dwarf2out.c (const_ok_for_output_1): Only reject UNSPECs for
9861         which targetm.const_not_ok_for_debug_p returned true.
9862         * config/arm/arm.c (arm_const_not_ok_for_debug_p): Return true
9863         for UNSPECs.
9864         * config/powerpcspe/powerpcspe.c (rs6000_const_not_ok_for_debug_p):
9865         Likewise.
9866         * config/rs6000/rs6000.c (rs6000_const_not_ok_for_debug_p): Likewise.
9867         * config/i386/i386.c (ix86_delegitimize_address_1): Don't delegitimize
9868         UNSPEC_GOTOFF with addend into addend - _GLOBAL_OFFSET_TABLE_ + symbol
9869         if !base_term_p.
9870         (ix86_const_not_ok_for_debug_p): New function.
9871         (i386_asm_output_addr_const_extra): Handle UNSPEC_GOTOFF.
9872         (TARGET_CONST_NOT_OK_FOR_DEBUG_P): Redefine.
9873
9874 2017-10-23  David Malcolm  <dmalcolm@redhat.com>
9875
9876         PR bootstrap/82610
9877         * system.h: Conditionally include "unique-ptr.h" if
9878         INCLUDE_UNIQUE_PTR is defined.
9879         * unique-ptr-tests.cc: Remove include of "unique-ptr.h" in favor
9880         of defining INCLUDE_UNIQUE_PTR before including "system.h".
9881
9882 2017-10-23  Sebastian Perta  <sebastian.perta@renesas.com>
9883
9884         * config/rl78/rl78.md: New define_expand "subdi3".
9885
9886 2017-10-23  H.J. Lu  <hongjiu.lu@intel.com>
9887
9888         PR target/82673
9889         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Skip
9890         DF_REF_INSN if DF_REF_INSN_INFO is false.
9891
9892 2017-10-23  Jan Hubicka  <hubicka@ucw.cz>
9893
9894         * i386.c (dimode_scalar_chain::compute_convert_gain): Use
9895         xmm_move instead of sse_move.
9896         (sse_store_index): New function.
9897         (ix86_register_move_cost): Be more sensible about mismatch stall;
9898         model AVX moves correctly; make difference between sse->integer and
9899         integer->sse.
9900         (ix86_builtin_vectorization_cost): Model correctly aligned and unaligned
9901         moves; make difference between SSE and AVX.
9902         * i386.h (processor_costs): Remove sse_move; add xmm_move, ymm_move
9903         and zmm_move. Increase size of sse load and store tables;
9904         add unaligned load and store tables; add ssemmx_to_integer.
9905         * x86-tune-costs.h: Update all entries according to real
9906         move latencies from Agner Fog's manual and chip documentation.
9907
9908 2017-10-23  Jakub Jelinek  <jakub@redhat.com>
9909
9910         PR target/82628
9911         * config/i386/predicates.md (x86_64_dwzext_immediate_operand): New.
9912         * config/i386/constraints.md (Wf): New constraint.
9913         * config/i386/i386.md (UNSPEC_SBB): New unspec.
9914         (cmp<dwi>_doubleword): Removed.
9915         (sub<mode>3_carry_ccc, *sub<mode>3_carry_ccc_1): New patterns.
9916         (sub<mode>3_carry_ccgz): Use unspec instead of compare.
9917         * config/i386/i386.c (ix86_expand_branch) <case E_TImode>: Don't
9918         expand with cmp<dwi>_doubleword.  For LTU and GEU use
9919         sub<mode>3_carry_ccc instead of sub<mode>3_carry_ccgz and use CCCmode.
9920
9921         * common.opt (gcolumn-info): Enable by default.
9922         * doc/invoke.texi (gcolumn-info): Document new default.
9923
9924 2017-10-23  Richard Biener  <rguenther@suse.de>
9925
9926         PR tree-optimization/82672
9927         * graphite-isl-ast-to-gimple.c (graphite_copy_stmts_from_block):
9928         Fold the stmt if we propagated into it.
9929
9930 2017-10-23  Richard Biener  <rguenther@suse.de>
9931
9932         * tree-ssa-pre.c (bitmap_remove_from_set): Rename to...
9933         (bitmap_remove_expr_from_set): ... this.  All callers call this
9934         for non-constant values.
9935         (bitmap_set_subtract): Rename to...
9936         (bitmap_set_subtract_expressions): ... this.  Adjust and
9937         optimize.
9938         (bitmap_set_contains_value): Remove superfluous check.
9939         (bitmap_set_replace_value): Inline into single caller ...
9940         (bitmap_value_replace_in_set): ... here and simplify.
9941         (dependent_clean): Merge into ...
9942         (clean): ... this using an overload.  Adjust.
9943         (prune_clobbered_mems): Adjust.
9944         (compute_antic_aux): Likewise.
9945         (compute_partial_antic_aux): Likewise.
9946
9947 2017-10-23  Richard Biener  <rguenther@suse.de>
9948
9949         PR tree-optimization/82129
9950         Revert
9951         2017-08-01  Richard Biener  <rguenther@suse.de>
9952
9953         PR tree-optimization/81181
9954         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
9955         (compute_antic): ... end of iteration here.
9956
9957 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
9958
9959         * target.def (starting_frame_offset): New hook.
9960         * doc/tm.texi (STARTING_FRAME_OFFSET): Remove in favor of...
9961         (TARGET_STARTING_FRAME_OFFSET): ...this new hook.
9962         * doc/tm.texi.in: Regenerate.
9963         * hooks.h (hook_hwi_void_0): Declare.
9964         * hooks.c (hook_hwi_void_0): New function.
9965         * doc/rtl.texi: Refer to TARGET_STARTING_FRAME_OFFSET instead of
9966         STARTING_FRAME_OFFSET.
9967         * builtins.c (expand_builtin_setjmp_receiver): Likewise.
9968         * reload1.c (reload): Likewise.
9969         * cfgexpand.c (expand_used_vars): Use targetm.starting_frame_offset
9970         instead of STARTING_FRAME_OFFSET.
9971         * function.c (try_fit_stack_local): Likewise.
9972         (assign_stack_local_1): Likewise
9973         (instantiate_virtual_regs): Likewise.
9974         * rtlanal.c (rtx_addr_can_trap_p_1): Likewise.
9975         * config/avr/avr.md (nonlocal_goto_receiver): Likewise.
9976         * config/aarch64/aarch64.h (STARTING_FRAME_OFFSET): Delete.
9977         * config/alpha/alpha.h (STARTING_FRAME_OFFSET): Likewise.
9978         * config/arc/arc.h (STARTING_FRAME_OFFSET): Likewise.
9979         * config/arm/arm.h (STARTING_FRAME_OFFSET): Likewise.
9980         * config/bfin/bfin.h (STARTING_FRAME_OFFSET): Likewise.
9981         * config/c6x/c6x.h (STARTING_FRAME_OFFSET): Likewise.
9982         * config/cr16/cr16.h (STARTING_FRAME_OFFSET): Likewise.
9983         * config/cris/cris.h (STARTING_FRAME_OFFSET): Likewise.
9984         * config/fr30/fr30.h (STARTING_FRAME_OFFSET): Likewise.
9985         * config/frv/frv.h (STARTING_FRAME_OFFSET): Likewise.
9986         * config/ft32/ft32.h (STARTING_FRAME_OFFSET): Likewise.
9987         * config/h8300/h8300.h (STARTING_FRAME_OFFSET): Likewise.
9988         * config/i386/i386.h (STARTING_FRAME_OFFSET): Likewise.
9989         * config/ia64/ia64.h (STARTING_FRAME_OFFSET): Likewise.
9990         * config/m32c/m32c.h (STARTING_FRAME_OFFSET): Likewise.
9991         * config/m68k/m68k.h (STARTING_FRAME_OFFSET): Likewise.
9992         * config/mcore/mcore.h (STARTING_FRAME_OFFSET): Likewise.
9993         * config/mn10300/mn10300.h (STARTING_FRAME_OFFSET): Likewise.
9994         * config/moxie/moxie.h (STARTING_FRAME_OFFSET): Likewise.
9995         * config/msp430/msp430.h (STARTING_FRAME_OFFSET): Likewise.
9996         * config/nds32/nds32.h (STARTING_FRAME_OFFSET): Likewise.
9997         * config/nios2/nios2.h (STARTING_FRAME_OFFSET): Likewise.
9998         * config/nvptx/nvptx.h (STARTING_FRAME_OFFSET): Likewise.
9999         * config/pdp11/pdp11.h (STARTING_FRAME_OFFSET): Likewise.
10000         * config/riscv/riscv.h (STARTING_FRAME_OFFSET): Likewise.
10001         * config/rl78/rl78.h (STARTING_FRAME_OFFSET): Likewise.
10002         * config/rx/rx.h (STARTING_FRAME_OFFSET): Likewise.
10003         * config/s390/s390.h (STARTING_FRAME_OFFSET): Likewise.
10004         * config/sh/sh.h (STARTING_FRAME_OFFSET): Likewise.
10005         * config/sparc/sparc.c (sparc_compute_frame_size): Likewise.
10006         * config/sparc/sparc.h (STARTING_FRAME_OFFSET): Likewise.
10007         * config/spu/spu.h (STARTING_FRAME_OFFSET): Likewise.
10008         * config/stormy16/stormy16.h (STARTING_FRAME_OFFSET): Likewise.
10009         * config/tilegx/tilegx.h (STARTING_FRAME_OFFSET): Likewise.
10010         * config/tilepro/tilepro.h (STARTING_FRAME_OFFSET): Likewise.
10011         * config/v850/v850.h (STARTING_FRAME_OFFSET): Likewise.
10012         * config/visium/visium.h (STARTING_FRAME_OFFSET): Likewise.
10013         * config/avr/avr.h (STARTING_FRAME_OFFSET): Likewise.
10014         * config/avr/avr-protos.h (avr_starting_frame_offset): Likewise.
10015         * config/avr/avr.c (avr_starting_frame_offset): Make static and
10016         return a HOST_WIDE_INT.
10017         (avr_builtin_setjmp_frame_value): Use it instead of
10018         STARTING_FRAME_OFFSET.
10019         (TARGET_STARTING_FRAME_OFFSET): Redefine.
10020         * config/epiphany/epiphany.h (STARTING_FRAME_OFFSET): Delete.
10021         * config/epiphany/epiphany.c (epiphany_starting_frame_offset):
10022         New function.
10023         (TARGET_STARTING_FRAME_OFFSET): Redefine.
10024         * config/iq2000/iq2000.h (STARTING_FRAME_OFFSET): Delete.
10025         * config/iq2000/iq2000.c (iq2000_starting_frame_offset): New function.
10026         (TARGET_CONSTANT_ALIGNMENT): Redefine.
10027         * config/lm32/lm32.h (STARTING_FRAME_OFFSET): Delete.
10028         * config/lm32/lm32.c (lm32_starting_frame_offset): New function.
10029         (TARGET_STARTING_FRAME_OFFSET): Redefine.
10030         * config/m32r/m32r.h (STARTING_FRAME_OFFSET): Delete.
10031         * config/m32r/m32r.c (m32r_starting_frame_offset): New function.
10032         (TARGET_STARTING_FRAME_OFFSET): Redefine.
10033         * config/microblaze/microblaze.h (STARTING_FRAME_OFFSET): Delete.
10034         * config/microblaze/microblaze.c (microblaze_starting_frame_offset):
10035         New function.
10036         (TARGET_STARTING_FRAME_OFFSET): Redefine.
10037         * config/mips/mips.h (STARTING_FRAME_OFFSET): Delete.
10038         * config/mips/mips.c (mips_compute_frame_info): Refer to
10039         TARGET_STARTING_FRAME_OFFSET instead of STARTING_FRAME_OFFSET.
10040         (mips_starting_frame_offset): New function.
10041         (TARGET_STARTING_FRAME_OFFSET): Redefine.
10042         * config/mmix/mmix.h (STARTING_FRAME_OFFSET): Delete.
10043         * config/mmix/mmix-protos.h (mmix_starting_frame_offset): Delete.
10044         * config/mmix/mmix.c (mmix_starting_frame_offset): Make static
10045         and return a HOST_WIDE_INT.
10046         (TARGET_STARTING_FRAME_OFFSET): Redefine.
10047         (mmix_initial_elimination_offset): Refer to
10048         TARGET_STARTING_FRAME_OFFSET instead of STARTING_FRAME_OFFSET.
10049         * config/pa/pa.h (STARTING_FRAME_OFFSET): Delete.
10050         * config/pa/pa.c (pa_starting_frame_offset): New function.
10051         (pa_compute_frame_size): Use it instead of STARTING_FRAME_OFFSET.
10052         (pa_expand_prologue): Likewise.
10053         (TARGET_STARTING_FRAME_OFFSET): Redefine.
10054         * config/powerpcspe/aix.h (STARTING_FRAME_OFFSET): Split out
10055         !FRAME_GROWS_DOWNWARD handling to...
10056         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
10057         * config/powerpcspe/darwin.h (STARTING_FRAME_OFFSET): Split out
10058         !FRAME_GROWS_DOWNWARD handling to...
10059         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
10060         * config/powerpcspe/powerpcspe.h (STARTING_FRAME_OFFSET): Split out
10061         !FRAME_GROWS_DOWNWARD handling to...
10062         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
10063         * config/powerpcspe/powerpcspe.c (TARGET_STARTING_FRAME_OFFSET):
10064         Redefine.
10065         (rs6000_starting_frame_offset): New function.
10066         * config/rs6000/aix.h (STARTING_FRAME_OFFSET): Split out
10067         !FRAME_GROWS_DOWNWARD handling to...
10068         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
10069         * config/rs6000/darwin.h (STARTING_FRAME_OFFSET): Split out
10070         !FRAME_GROWS_DOWNWARD handling to...
10071         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
10072         * config/rs6000/rs6000.h (STARTING_FRAME_OFFSET): Split out
10073         !FRAME_GROWS_DOWNWARD handling to...
10074         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
10075         * config/rs6000/rs6000.c (TARGET_STARTING_FRAME_OFFSET): Refine.
10076         (rs6000_starting_frame_offset): New function.
10077         * config/vax/elf.h (STARTING_FRAME_OFFSET): Delete.
10078         * config/vax/vax.h (STARTING_FRAME_OFFSET): Delete.
10079         * config/vax/vax.c (vax_starting_frame_offset): New function.
10080         (vax_expand_prologue): Use it instead of STARTING_FRAME_OFFSET.
10081         (TARGET_STARTING_FRAME_OFFSET): Redefine.
10082         * config/xtensa/xtensa.h (STARTING_FRAME_OFFSET): Delete.
10083         * config/xtensa/xtensa.c (xtensa_starting_frame_offset): New function.
10084         (TARGET_STARTING_FRAME_OFFSET): Redefine.
10085         * system.h (STARTING_FRAME_OFFSET): Poison.
10086
10087 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
10088
10089         * tree-vect-loop.c (vect_create_epilog_for_reduction): Use
10090         SCALAR_TYPE_MODE instead of TYPE_MODE.
10091
10092 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
10093             Alan Hayward  <alan.hayward@arm.com>
10094             David Sherwood  <david.sherwood@arm.com>
10095
10096         * dwarf2out.c (loc_list_from_tree_1): Use SCALAR_INT_TYPE_MODE
10097
10098 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
10099             Alan Hayward  <alan.hayward@arm.com>
10100             David Sherwood  <david.sherwood@arm.com>
10101
10102         * expmed.c (expand_shift_1): Use scalar_mode for scalar_mode.
10103
10104 2017-10-23  Richard Biener  <rguenther@suse.de>
10105
10106         PR tree-optimization/82129
10107         * tree-ssa-pre.c (bitmap_set_and): Remove.
10108         (compute_antic_aux): Compute ANTIC_OUT intersection in a way
10109         canonicalizing expressions in the set to those with lowest
10110         ID rather than taking that from the first edge.
10111
10112 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
10113
10114         * combine.c (rtx_equal_for_field_assignment_p): Use
10115         byte_lowpart_offset.
10116
10117 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
10118             Alan Hayward  <alan.hayward@arm.com>
10119             David Sherwood  <david.sherwood@arm.com>
10120
10121         * internal-fn.c (expand_direct_optab_fn): Don't assign directly
10122         to a SUBREG_PROMOTED_VAR.
10123
10124 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
10125             Alan Hayward  <alan.hayward@arm.com>
10126             David Sherwood  <david.sherwood@arm.com>
10127
10128         * cfgexpand.c (expand_debug_expr): Use GET_MODE_UNIT_PRECISION.
10129         (expand_debug_source_expr): Likewise.
10130         * combine.c (combine_simplify_rtx): Likewise.
10131         * cse.c (fold_rtx): Likewise.
10132         * optabs.c (expand_float): Likewise.
10133         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
10134         (simplify_binary_operation_1): Likewise.
10135
10136 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
10137             Alan Hayward  <alan.hayward@arm.com>
10138             David Sherwood  <david.sherwood@arm.com>
10139
10140         * combine.c (simplify_comparison): Use HWI_COMPUTABLE_MODE_P.
10141         (record_promoted_value): Likewise.
10142         * expr.c (expand_expr_real_2): Likewise.
10143         * ree.c (update_reg_equal_equiv_notes): Likewise.
10144         (combine_set_extension): Likewise.
10145         * rtlanal.c (low_bitmask_len): Likewise.
10146         * simplify-rtx.c (neg_const_int): Likewise.
10147         (simplify_binary_operation_1): Likewise.
10148
10149 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
10150             Alan Hayward  <alan.hayward@arm.com>
10151             David Sherwood  <david.sherwood@arm.com>
10152
10153         * lra-spills.c (assign_mem_slot): Use subreg_size_lowpart_offset.
10154         * regcprop.c (maybe_mode_change): Likewise.
10155         * reload1.c (alter_reg): Likewise.
10156
10157 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
10158
10159         * inchash.h (inchash::hash::add_wide_int): New function.
10160         * lto-streamer-out.c (hash_tree): Use it.
10161
10162 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
10163
10164         * inchash.h (inchash::hash::add_wide_int): Rename to...
10165         (inchash::hash::add_hwi): ...this.
10166         * ipa-devirt.c (hash_odr_vtable): Update accordingly.
10167         (polymorphic_call_target_hasher::hash): Likewise.
10168         * ipa-icf.c (sem_function::get_hash, sem_function::init): Likewise.
10169         (sem_item::add_expr, sem_item::add_type, sem_variable::get_hash)
10170         (sem_item_optimizer::update_hash_by_addr_refs): Likewise.
10171         * lto-streamer-out.c (hash_tree): Likewise.
10172         * optc-save-gen.awk: Likewise.
10173         * tree.c (add_expr): Likewise.
10174
10175 2017-10-22  Uros Bizjak  <ubizjak@gmail.com>
10176
10177         PR target/52451
10178         * config/i386/i386.c (ix86_fp_compare_mode): Return CCFPmode
10179         for ordered inequality comparisons even with TARGET_IEEE_FP.
10180
10181 2017-10-22  Uros Bizjak  <ubizjak@gmail.com>
10182
10183         PR target/82628
10184         * config/i386/i386.md (cmp<dwi>_doubleword): New pattern.
10185         * config/i386/i386.c (ix86_expand_branch) <case E_TImode>:
10186         Expand with cmp<dwi>_doubleword.
10187
10188 2017-10-21  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
10189
10190         * extend.texi: Add x86 specific to 'nocf_check' attribute.
10191         List CET intrinsics.
10192         * invoke.texi: Add -mcet, -mibt, -mshstk options.  Add x86
10193         specific to -fcf-protection option.
10194
10195 2017-10-21  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
10196
10197         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET): New.
10198         (OPTION_MASK_ISA_SHSTK_SET): Likewise.
10199         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
10200         (OPTION_MASK_ISA_SHSTK_UNSET): Likewise.
10201         (ix86_handle_option): Add -mibt, -mshstk, -mcet handling.
10202         * config.gcc (extra_headers): Add cetintrin.h for x86 targets.
10203         (extra_objs): Add cet.o for Linux/x86 targets.
10204         (tmake_file): Add i386/t-cet for Linux/x86 targets.
10205         * config/i386/cet.c: New file.
10206         * config/i386/cetintrin.h: Likewise.
10207         * config/i386/t-cet: Likewise.
10208         * config/i386/cpuid.h (bit_SHSTK): New.
10209         (bit_IBT): Likewise.
10210         * config/i386/driver-i386.c (host_detect_local_cpu): Detect and
10211         pass IBT and SHSTK bits.
10212         * config/i386/i386-builtin-types.def
10213         (VOID_FTYPE_UNSIGNED_PVOID): New.
10214         (VOID_FTYPE_UINT64_PVOID): Likewise.
10215         * config/i386/i386-builtin.def: Add CET intrinsics.
10216         * config/i386/i386-c.c (ix86_target_macros_internal): Add
10217         OPTION_MASK_ISA_IBT, OPTION_MASK_ISA_SHSTK handling.
10218         * config/i386/i386-passes.def: Add pass_insert_endbranch pass.
10219         * config/i386/i386-protos.h (make_pass_insert_endbranch): New
10220         prototype.
10221         * config/i386/i386.c (rest_of_insert_endbranch): New.
10222         (pass_data_insert_endbranch): Likewise.
10223         (pass_insert_endbranch): Likewise.
10224         (make_pass_insert_endbranch): Likewise.
10225         (ix86_notrack_prefixed_insn_p): Likewise.
10226         (ix86_target_string): Add -mibt, -mshstk flags.
10227         (ix86_option_override_internal): Add flag_cf_protection
10228         processing.
10229         (ix86_valid_target_attribute_inner_p): Set OPT_mibt, OPT_mshstk.
10230         (ix86_print_operand): Add 'notrack' prefix output.
10231         (ix86_init_mmx_sse_builtins): Add CET intrinsics.
10232         (ix86_expand_builtin): Expand CET intrinsics.
10233         (x86_output_mi_thunk): Add 'endbranch' instruction.
10234         * config/i386/i386.h (TARGET_IBT): New.
10235         (TARGET_IBT_P): Likewise.
10236         (TARGET_SHSTK): Likewise.
10237         (TARGET_SHSTK_P): Likewise.
10238         * config/i386/i386.md (unspecv): Add UNSPECV_NOP_RDSSP,
10239         UNSPECV_INCSSP, UNSPECV_SAVEPREVSSP, UNSPECV_RSTORSSP,
10240         UNSPECV_WRSS, UNSPECV_WRUSS, UNSPECV_SETSSBSY, UNSPECV_CLRSSBSY.
10241         (builtin_setjmp_setup): New pattern.
10242         (builtin_longjmp): Likewise.
10243         (rdssp<mode>): Likewise.
10244         (incssp<mode>): Likewise.
10245         (saveprevssp): Likewise.
10246         (rstorssp): Likewise.
10247         (wrss<mode>): Likewise.
10248         (wruss<mode>): Likewise.
10249         (setssbsy): Likewise.
10250         (clrssbsy): Likewise.
10251         (nop_endbr): Likewise.
10252         * config/i386/i386.opt: Add -mcet, -mibt, -mshstk and -mcet-switch
10253         options.
10254         * config/i386/immintrin.h: Include <cetintrin.h>.
10255         * config/i386/linux-common.h
10256         (file_end_indicate_exec_stack_and_cet): New prototype.
10257         (TARGET_ASM_FILE_END): New.
10258
10259 2017-10-20  Jan Hubicka  <hubicka@ucw.cz>
10260
10261         * i386.c (ix86_builtin_vectorization_cost): Use existing rtx_cost
10262         latencies instead of having separate table; make difference between
10263         integer and float costs.
10264         * i386.h (processor_costs): Remove scalar_stmt_cost,
10265         scalar_load_cost, scalar_store_cost, vec_stmt_cost, vec_to_scalar_cost,
10266         scalar_to_vec_cost, vec_align_load_cost, vec_unalign_load_cost,
10267         vec_store_cost.
10268         * x86-tune-costs.h: Remove entries which has been removed in
10269         procesor_costs from all tables; make cond_taken_branch_cost
10270         and cond_not_taken_branch_cost COST_N_INSNS based.
10271
10272 2017-10-20  Jan Hubicka  <hubicka@ucw.cz>
10273
10274         * x86-tune-costs.h (intel_cost, generic_cost): Fix move costs.
10275
10276 2017-10-20  Jakub Jelinek  <jakub@redhat.com>
10277
10278         * config/i386/i386.md (isa): Remove fma_avx512f.
10279         * config/i386/sse.md (<avx512>_fmadd_<mode>_mask<round_name>,
10280         <avx512>_fmadd_<mode>_mask3<round_name>,
10281         <avx512>_fmsub_<mode>_mask<round_name>,
10282         <avx512>_fmsub_<mode>_mask3<round_name>,
10283         <avx512>_fnmadd_<mode>_mask<round_name>,
10284         <avx512>_fnmadd_<mode>_mask3<round_name>,
10285         <avx512>_fnmsub_<mode>_mask<round_name>,
10286         <avx512>_fnmsub_<mode>_mask3<round_name>,
10287         <avx512>_fmaddsub_<mode>_mask<round_name>,
10288         <avx512>_fmaddsub_<mode>_mask3<round_name>,
10289         <avx512>_fmsubadd_<mode>_mask<round_name>,
10290         <avx512>_fmsubadd_<mode>_mask3<round_name>): Remove isa attribute.
10291         (*vec_widen_umult_even_v16si<mask_name>,
10292         *vec_widen_smult_even_v16si<mask_name>): Likewise.
10293         (<mask_codefor>avx512bw_dbpsadbw<mode><mask_name>): Likewise.
10294
10295 2017-10-20  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
10296
10297         * extend.texi: Add 'nocf_check' documentation.
10298         * gimple.texi: Add second parameter to
10299         gimple_build_call_from_tree.
10300         * invoke.texi: Add -fcf-protection documentation.
10301         * rtl.texi: Add REG_CALL_NOTRACK documenation.
10302
10303 2017-10-20  Richard Biener  <rguenther@suse.de>
10304
10305         PR tree-optimization/82473
10306         * tree-vect-loop.c (vectorizable_reduction): Properly get at
10307         the largest input type.
10308
10309 2017-10-20  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
10310
10311         * c-attribs.c (handle_nocf_check_attribute): New function.
10312         (c_common_attribute_table): Add 'nocf_check' handling.
10313         * gimple-parser.c: Add second argument NULL to
10314         gimple_build_call_from_tree.
10315         * attrib.c (comp_type_attributes): Check nocf_check attribute.
10316         * cfgexpand.c (expand_call_stmt): Set REG_CALL_NOCF_CHECK for
10317         call insn.
10318         * combine.c (distribute_notes): Add REG_CALL_NOCF_CHECK handling.
10319         * common.opt: Add fcf-protection flag.
10320         * emit-rtl.c (try_split): Add REG_CALL_NOCF_CHECK handling.
10321         * flag-types.h: Add enum cf_protection_level.
10322         * gimple.c (gimple_build_call_from_tree): Add second parameter.
10323         Add 'nocf_check' attribute propagation to gimple call.
10324         * gimple.h (gf_mask): Add GF_CALL_NOCF_CHECK.
10325         (gimple_build_call_from_tree): Update prototype.
10326         (gimple_call_nocf_check_p): New function.
10327         (gimple_call_set_nocf_check): Likewise.
10328         * gimplify.c: Add second argument to gimple_build_call_from_tree.
10329         * ipa-icf.c: Add nocf_check attribute in statement hash.
10330         * recog.c (peep2_attempt): Add REG_CALL_NOCF_CHECK handling.
10331         * reg-notes.def: Add REG_NOTE (CALL_NOCF_CHECK).
10332         * toplev.c (process_options): Add flag_cf_protection handling.
10333
10334 2017-10-19  Jan Hubicka  <hubicka@ucw.cz>
10335
10336         * x86-tune-costs.h (core_cost): Fix div, move and sqrt latencies.
10337
10338 2017-10-20  Richard Biener  <rguenther@suse.de>
10339
10340         PR tree-optimization/82603
10341         * tree-if-conv.c (predicate_mem_writes): Make sure to only
10342         remove false predicated stores.
10343
10344 2017-10-20  Richard Biener  <rguenther@suse.de>
10345
10346         * graphite-isl-ast-to-gimple.c
10347         (translate_isl_ast_to_gimple::graphite_copy_stmts_from_block):
10348         Remove return value and simplify, dump copied stmt after lhs
10349         adjustment.
10350         (translate_isl_ast_to_gimple::translate_isl_ast_node_user):
10351         Reduce dump verbosity.
10352         (gsi_insert_earliest): Likewise.
10353         (translate_isl_ast_to_gimple::copy_bb_and_scalar_dependences): Adjust.
10354         * graphite.c (print_global_statistics): Adjust dumping.
10355         (print_graphite_scop_statistics): Likewise.
10356         (print_graphite_statistics): Do not dump loops here.
10357         (graphite_transform_loops): But here.
10358
10359 2017-10-20  Nicolas Roche  <roche@adacore.com>
10360
10361         * configure.ac (ACX_PROG_GNAT): Append "libgnat" to include search dir.
10362         * configure: Regenerate.
10363
10364 2017-10-20  Jakub Jelinek  <jakub@redhat.com>
10365
10366         PR target/82158
10367         * tree-cfg.c (pass_warn_function_return::execute): In noreturn
10368         functions when optimizing replace GIMPLE_RETURN stmts with
10369         calls to __builtin_unreachable ().
10370
10371         PR sanitizer/82595
10372         * config/gnu-user.h (LIBTSAN_EARLY_SPEC): Add libtsan_preinit.o
10373         for -fsanitize=thread link of executables.
10374         (LIBLSAN_EARLY_SPEC): Add liblsan_preinit.o for -fsanitize=leak
10375         link of executables.
10376
10377         PR target/82370
10378         * config/i386/sse.md (VI248_AVX2, VI248_AVX512BW, VI248_AVX512BW_2):
10379         New mode iterators.
10380         (<shift_insn><mode>3<mask_name>): Change the last of the 3
10381         define_insns for logical vector shifts to use VI248_AVX512BW
10382         iterator instead of VI48_AVX512, remove <mask_mode512bit_condition>
10383         condition, useless isa and prefix attributes.  Change the first
10384         2 of these define_insns to ...
10385         (<mask_codefor><shift_insn><mode>3<mask_name>): ... this, new
10386         define_insn for avx512vl.
10387         (<shift_insn><mode>3): ... and this, new define_insn without
10388         masking for non-avx512vl.
10389
10390         PR target/82370
10391         * config/i386/sse.md (*andnot<mode>3,
10392         <mask_codefor><code><mode>3<mask_name>, *<code><mode>3): Split
10393         (=v,v,vm) alternative into (=x,x,xm) and (=v,v,vm), for 128-bit
10394         and 256-bit vectors, the (=x,x,xm) alternative and when mask is
10395         not applied use empty suffix even for TARGET_AVX512VL.
10396         * config/i386/subst.md (mask_prefix3, mask_prefix4): When mask
10397         is applied, supply evex,evex or evex,evex,evex instead of just
10398         evex.
10399
10400 2017-10-20  Julia Koval  <julia.koval@intel.com>
10401
10402         * common/config/i386/i386-common.c (OPTION_MASK_ISA_GFNI_SET,
10403         (OPTION_MASK_ISA_GFNI_UNSET): New.
10404         (ix86_handle_option): Handle OPT_mgfni.
10405         * config/i386/cpuid.h (bit_GFNI): New.
10406         * config/i386/driver-i386.c (host_detect_local_cpu): Detect gfni.
10407         * config/i386/i386-c.c (ix86_target_macros_internal): Define __GFNI__.
10408         * config/i386/i386.c (ix86_target_string): Add -mgfni.
10409         (ix86_valid_target_attribute_inner_p): Add OPT_mgfni.
10410         * config/i386/i386.h (TARGET_GFNI, TARGET_GFNI_P): New.
10411         * config/i386/i386.opt: Add mgfni.
10412
10413 2017-10-20  Orlando Arias  <oarias@knights.ucf.edu>
10414
10415         * config/msp430/msp430.c (msp430_option_override): Disable
10416         -fdelete-null-pointer-checks.
10417         * doc/invoke.text (-fdelete-null-pointer-checks): Document that.
10418
10419 2017-10-19  Jan Hubicka  <hubicka@ucw.cz>
10420
10421         * x86-tune-costs.h (generic_cost, core_cost): Correct costs
10422         of x87 and SSE instructions.
10423
10424 2017-10-19  Jan Hubicka  <hubicka@ucw.cz>
10425
10426         * asan.c (create_cond_insert_point): Do not update edge count.
10427         * auto-profile.c (afdo_propagate_edge): Update for edge count removal.
10428         (afdo_propagate_circuit): Likewise.
10429         (afdo_calculate_branch_prob): Likewise.
10430         (afdo_annotate_cfg): Likewise.
10431         * basic-block.h (struct edge_def): Remove count.
10432         (edge_def::count): New accessor.
10433         * bb-reorder.c (rotate_loop): Update.
10434         (find_traces_1_round): Update.
10435         (connect_traces): Update.
10436         (sanitize_hot_paths): Update.
10437         * cfg.c (unchecked_make_edge): Update.
10438         (make_single_succ_edge): Update.
10439         (check_bb_profile): Update.
10440         (dump_edge_info): Update.
10441         (update_bb_profile_for_threading): Update.
10442         (scale_bbs_frequencies_int): Update.
10443         (scale_bbs_frequencies_gcov_type): Update.
10444         (scale_bbs_frequencies_profile_count): Update.
10445         (scale_bbs_frequencies): Update.
10446         * cfganal.c (connect_infinite_loops_to_exit): Update.
10447         * cfgbuild.c (compute_outgoing_frequencies): Update.
10448         (find_many_sub_basic_blocks): Update.
10449         * cfgcleanup.c (try_forward_edges): Update.
10450         (try_crossjump_to_edge): Update
10451         * cfgexpand.c (expand_gimple_cond): Update
10452         (expand_gimple_tailcall): Update
10453         (construct_exit_block): Update
10454         * cfghooks.c (verify_flow_info): Update
10455         (redirect_edge_succ_nodup): Update
10456         (split_edge): Update
10457         (make_forwarder_block): Update
10458         (duplicate_block): Update
10459         (account_profile_record): Update
10460         * cfgloop.c (find_subloop_latch_edge_by_profile): Update.
10461         * cfgloopanal.c (expected_loop_iterations_unbounded): Update.
10462         * cfgloopmanip.c (scale_loop_profile): Update.
10463         (loopify): Update.
10464         (lv_adjust_loop_entry_edge): Update.
10465         * cfgrtl.c (try_redirect_by_replacing_jump): Update.
10466         (force_nonfallthru_and_redirect): Update.
10467         (purge_dead_edges): Update.
10468         (rtl_flow_call_edges_add): Update.
10469         * cgraphunit.c (init_lowered_empty_function): Update.
10470         (cgraph_node::expand_thunk): Update.
10471         * gimple-pretty-print.c (dump_probability): Update.
10472         (dump_edge_probability): Update.
10473         * gimple-ssa-isolate-paths.c (isolate_path): Update.
10474         * haifa-sched.c (sched_create_recovery_edges): Update.
10475         * hsa-gen.c (convert_switch_statements): Update.
10476         * ifcvt.c (dead_or_predicable): Update.
10477         * ipa-inline-transform.c (inline_transform): Update.
10478         * ipa-split.c (split_function): Update.
10479         * ipa-utils.c (ipa_merge_profiles): Update.
10480         * loop-doloop.c (add_test): Update.
10481         * loop-unroll.c (unroll_loop_runtime_iterations): Update.
10482         * lto-streamer-in.c (input_cfg): Update.
10483         (input_function): Update.
10484         * lto-streamer-out.c (output_cfg): Update.
10485         * modulo-sched.c (sms_schedule): Update.
10486         * postreload-gcse.c (eliminate_partially_redundant_load): Update.
10487         * predict.c (maybe_hot_edge_p): Update.
10488         (unlikely_executed_edge_p): Update.
10489         (probably_never_executed_edge_p): Update.
10490         (dump_prediction): Update.
10491         (drop_profile): Update.
10492         (propagate_unlikely_bbs_forward): Update.
10493         (determine_unlikely_bbs): Update.
10494         (force_edge_cold): Update.
10495         * profile.c (compute_branch_probabilities): Update.
10496         * reg-stack.c (better_edge): Update.
10497         * shrink-wrap.c (handle_simple_exit): Update.
10498         * tracer.c (better_p): Update.
10499         * trans-mem.c (expand_transaction): Update.
10500         (split_bb_make_tm_edge): Update.
10501         * tree-call-cdce.c: Update.
10502         * tree-cfg.c (gimple_find_sub_bbs): Update.
10503         (gimple_split_edge): Update.
10504         (gimple_duplicate_sese_region): Update.
10505         (gimple_duplicate_sese_tail): Update.
10506         (gimple_flow_call_edges_add): Update.
10507         (insert_cond_bb): Update.
10508         (execute_fixup_cfg): Update.
10509         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update.
10510         * tree-complex.c (expand_complex_div_wide): Update.
10511         * tree-eh.c (lower_resx): Update.
10512         (unsplit_eh): Update.
10513         (cleanup_empty_eh_move_lp): Update.
10514         * tree-inline.c (copy_edges_for_bb): Update.
10515         (freqs_to_counts): Update.
10516         (copy_cfg_body): Update.
10517         * tree-ssa-dce.c (remove_dead_stmt): Update.
10518         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
10519         * tree-ssa-loop-im.c (execute_sm_if_changed): Update.
10520         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update.
10521         (unloop_loops): Update.
10522         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
10523         * tree-ssa-loop-split.c (connect_loops): Update.
10524         (split_loop): Update.
10525         * tree-ssa-loop-unswitch.c (hoist_guard): Update.
10526         * tree-ssa-phionlycprop.c (propagate_rhs_into_lhs): Update.
10527         * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Update.
10528         * tree-ssa-reassoc.c (branch_fixup): Update.
10529         * tree-ssa-tail-merge.c (replace_block_by): Update.
10530         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Update.
10531         (compute_path_counts): Update.
10532         (update_profile): Update.
10533         (recompute_probabilities): Update.
10534         (update_joiner_offpath_counts): Update.
10535         (estimated_freqs_path): Update.
10536         (freqs_to_counts_path): Update.
10537         (clear_counts_path): Update.
10538         (ssa_fix_duplicate_block_edges): Update.
10539         (duplicate_thread_path): Update.
10540         * tree-switch-conversion.c (hoist_edge_and_branch_if_true): Update.
10541         (case_bit_test_cmp): Update.
10542         (collect_switch_conv_info): Update.
10543         (gen_inbound_check): Update.
10544         (do_jump_if_equal): Update.
10545         (emit_cmp_and_jump_insns): Update.
10546         * tree-tailcall.c (decrease_profile): Update.
10547         (eliminate_tail_call): Update.
10548         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
10549         (vect_do_peeling): Update.
10550         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
10551         * ubsan.c (ubsan_expand_null_ifn): Update.
10552         (ubsan_expand_ptr_ifn): Update.
10553         * value-prof.c (gimple_divmod_fixed_value): Update.
10554         (gimple_mod_pow2): Update.
10555         (gimple_mod_subtract): Update.
10556         (gimple_ic): Update.
10557         (gimple_stringop_fixed_value): Update.
10558
10559 2017-10-19  Uros Bizjak  <ubizjak@gmail.com>
10560
10561         PR target/82618
10562         * config/i386/i386.md (sub to cmp): New peephole2 pattern.
10563
10564 2017-10-19  Alexander Monakov  <amonakov@ispras.ru>
10565
10566         PR rtl-optimization/82395
10567         * ira-color.c (allocno_priority_compare_func): Fix comparison step
10568         based on non_spilled_static_chain_regno_p.
10569
10570 2017-10-19  Uros Bizjak  <ubizjak@gmail.com>
10571
10572         * config/i386/i386.c (output_387_binary_op): Rewrite SSE part.
10573         (ix86_emit_mode_set): Rewrite insn mnemonic construction.
10574         (ix86_prepare_fp_compare_args): Redefine is_sse as bool.
10575
10576 2017-10-19  Martin Sebor  <msebor@redhat.com>
10577
10578         PR tree-optimization/82596
10579         * tree.c (array_at_struct_end_p): Handle STRING_CST.
10580
10581 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
10582
10583         * asan.c (handle_builtin_alloca): Deal with all alloca variants.
10584         (get_mem_refs_of_builtin_call): Likewise.
10585         * builtins.c (expand_builtin_apply): Adjust call to
10586         allocate_dynamic_stack_space.
10587         (expand_builtin_alloca): For __builtin_alloca_with_align_and_max, pass
10588         the third argument to allocate_dynamic_stack_space, otherwise -1.
10589         (expand_builtin): Deal with all alloca variants.
10590         (is_inexpensive_builtin): Likewise.
10591         * builtins.def (BUILT_IN_ALLOCA_WITH_ALIGN_AND_MAX): New.
10592         * calls.c (special_function_p): Deal with all alloca variants.
10593         (initialize_argument_information): Adjust call to
10594         allocate_dynamic_stack_space.
10595         (expand_call): Likewise.
10596         * cfgexpand.c (expand_call_stmt): Deal with all alloca variants.
10597         * doc/extend.texi (Built-ins): Add __builtin_alloca_with_align_and_max
10598         * explow.c (allocate_dynamic_stack_space): Add MAX_SIZE parameter and
10599         use it for the stack usage computation.
10600         * explow.h (allocate_dynamic_stack_space): Adjust prototype.
10601         * function.c (gimplify_parameters): Call build_alloca_call_expr.
10602         * gimple-ssa-warn-alloca.c (alloca_call_type): Simplify control flow.
10603         Take into account 3rd argument of __builtin_alloca_with_align_and_max.
10604         (in_loop_p): Remove first argument and useless check.
10605         (pass_walloca::execute): Remove useless test and adjust call to above.
10606         * gimple.c (gimple_build_call_from_tree): Deal with all alloc variants
10607         * gimplify.c (gimplify_vla_decl): Call build_alloca_call_expr.
10608         (gimplify_call_expr): Deal with all alloca variants.
10609         * hsa-gen.c (gen_hsa_alloca): Likewise.
10610         (gen_hsa_insns_for_call): Likewise.
10611         * ipa-pure-const.c (special_builtin_state): Likewise.
10612         * tree-chkp.c (chkp_build_returned_bound): Likewise.
10613         * tree-object-size.c (alloc_object_size): Likewise.
10614         * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Likewise.
10615         (call_may_clobber_ref_p_1): Likewise.
10616         * tree-ssa-ccp.c (evaluate_stmt): Likewise.
10617         (ccp_fold_stmt): Likewise.
10618         (optimize_stack_restore): Likewise.
10619         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
10620         (mark_all_reaching_defs_necessary_1): Likewise.
10621         (propagate_necessity): Likewise.
10622         (eliminate_unnecessary_stmts): Likewise.
10623         * tree.c (build_common_builtin_nodes): Build
10624         BUILT_IN_ALLOCA_WITH_ALIGN_AND_MAX.
10625         (build_alloca_call_expr): New function.
10626         * tree.h (ALLOCA_FUNCTION_CODE_P): New macro.
10627         (CASE_BUILT_IN_ALLOCA): Likewise.
10628         (build_alloca_call_expr): Declare.
10629         * varasm.c (incorporeal_function_p): Deal with all alloca variants.
10630
10631 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
10632
10633         PR debug/82509
10634         * dwarf2out.c (new_die_raw): New static inline function.
10635         (new_die): Use it to create the DIE.
10636         (add_AT_external_die_ref): Likewise.
10637         (clone_die): Likewise.
10638         (clone_as_declaration): Likewise.
10639         (dwarf2out_vms_debug_main_pointer): Likewise.
10640         (base_type_die): Likewise.  Remove early return for corner cases.
10641         Do not call add_pubtype on the DIE here.
10642         (is_base_type): Remove ERROR_MARK and return 0 for VOID_TYPE.
10643         (modified_type_die): Adjust the lookup for reverse order DIEs.  Skip
10644         typedefs for base types with DW_AT_endianity.  Make sure a DIE with
10645         native order exists for base types, attach the DIE manually and call
10646         add_pubtype on it.  Do not equate a reverse order DIE to the type.
10647
10648 2017-10-19  Richard Earnshaw  <rearnsha@arm.com>
10649
10650         * config/arm/arm.c (align_ok_ldrd_strd): New function.
10651         (mem_ok_for_ldrd_strd): New parameter align.  Extract the alignment of
10652         the mem into it.
10653         (gen_operands_ldrd_strd): Validate the alignment of the accesses.
10654
10655 2017-10-19  Jakub Jelinek  <jakub@redhat.com>
10656
10657         * flag-types.h (enum sanitize_code): Add SANITIZE_BUILTIN.  Or
10658         SANITIZE_BUILTIN into SANITIZE_UNDEFINED.
10659         * sanitizer.def (BUILT_IN_UBSAN_HANDLE_INVALID_BUILTIN,
10660         BUILT_IN_UBSAN_HANDLE_INVALID_BUILTIN_ABORT): New builtins.
10661         * opts.c (sanitizer_opts): Add builtin.
10662         * ubsan.c (instrument_builtin): New function.
10663         (pass_ubsan::execute): Call it.
10664         (pass_ubsan::gate): Enable even for SANITIZE_BUILTIN.
10665         * doc/invoke.texi: Document -fsanitize=builtin.
10666
10667         * ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch
10668         builtins, store max (log2 (align), 0) into uchar field instead of
10669         align into uptr field.
10670         (ubsan_expand_objsize_ifn): Use _v1 suffixed type mismatch builtins,
10671         store uchar 0 field instead of uptr 0 field.
10672         (instrument_nonnull_return): Use _v1 suffixed nonnull return builtin,
10673         instead of passing one address of struct with 2 locations pass
10674         two addresses of structs with 1 location each.
10675         * sanitizer.def (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH,
10676         BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_ABORT,
10677         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN,
10678         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_ABORT): Removed.
10679         (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1,
10680         BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1_ABORT,
10681         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1,
10682         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1_ABORT): New builtins.
10683
10684 2017-10-19  Martin Liska  <mliska@suse.cz>
10685
10686         PR driver/81829
10687         * file-find.c (remove_prefix): Remove.
10688         * file-find.h (remove_prefix): Likewise.
10689         * gcc-ar.c: Remove smartness of lookup.
10690
10691 2017-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
10692
10693         * config/rs6000/rs6000.md (*call_indirect_aix<mode>,
10694         *call_value_indirect_aix<mode>, *call_indirect_elfv2<mode>,
10695         *call_value_indirect_elfv2<mode>): Add correct mode to the unspec.
10696
10697 2017-10-19  Jakub Jelinek  <jakub@redhat.com>
10698
10699         PR target/82580
10700         * config/i386/i386.md (setcc + movzbl to xor + setcc): New peephole2.
10701         (setcc + and to xor + setcc): New peephole2.
10702
10703 2017-10-19  Tom de Vries  <tom@codesourcery.com>
10704
10705         * doc/sourcebuild.texi (Test Directives, Variants of
10706         dg-require-support): Add dg-require-stack-size.
10707
10708 2017-10-19  Martin Liska  <mliska@suse.cz>
10709
10710         PR sanitizer/82517
10711         * gimplify.c (gimplify_decl_expr): Do not instrument variables
10712         that have a large alignment.
10713         (gimplify_target_expr): Likewise.
10714
10715 2017-10-18  Segher Boessenkool  <segher@kernel.crashing.org>
10716
10717         PR rtl-optimization/82602
10718         * ira.c (rtx_moveable_p): Return false for volatile asm.
10719
10720 2017-10-18  Uros Bizjak  <ubizjak@gmail.com>
10721
10722         PR target/82580
10723         * config/i386/i386-modes.def (CCGZ): New CC mode.
10724         * config/i386/i386.md (sub<mode>3_carry_ccgz): New insn pattern.
10725         * config/i386/predicates.md (ix86_comparison_operator):
10726         Handle CCGZmode.
10727         * config/i386/i386.c (ix86_expand_branch) <case E_TImode>:
10728         Emulate LE, LEU, GT, GTU, LT, LTU, GE and GEU double-word comparisons
10729         with double-word subtraction.
10730         (put_condition_code): Handle CCGZmode.
10731
10732 2017-10-18  Aldy Hernandez  <aldyh@redhat.com>
10733
10734         * wide-int.cc (debug (const wide_int &)): New.
10735         (debug (const wide_int *)): New.
10736         (debug (const widest_int &)): New.
10737         (debug (const widest_int *)): New.
10738
10739 2017-10-18  Vladimir Makarov  <vmakarov@redhat.com>
10740
10741         PR middle-end/82556
10742         * lra-constraints.c (curr_insn_transform): Use non-input operand
10743         instead of output one for matched reload.
10744
10745 2017-10-18  Bin Cheng  <bin.cheng@arm.com>
10746
10747         * tree-loop-distribution.c (INCLUDE_ALGORITHM): New header file.
10748         (tree-ssa-loop-ivopts.h): New header file.
10749         (struct builtin_info): New fields.
10750         (classify_builtin_1): Compute and record base and offset parts for
10751         memset builtin partition by calling strip_offset.
10752         (offset_cmp, fuse_memset_builtins): New functions.
10753         (finalize_partitions): Fuse adjacent memset partitions by calling
10754         above function.
10755         * tree-ssa-loop-ivopts.c (strip_offset): Delete static declaration.
10756         Expose the interface.
10757         * tree-ssa-loop-ivopts.h (strip_offset): New declaration.
10758
10759 2017-10-18  Bin Cheng  <bin.cheng@arm.com>
10760
10761         PR tree-optimization/82574
10762         * tree-loop-distribution.c (find_single_drs): New parameter.  Check
10763         that data reference must be executed exactly once per iteration
10764         against the outermost loop in nest.
10765         (classify_partition): Update call to above function.
10766
10767 2017-10-18  Richard Biener  <rguenther@suse.de>
10768
10769         PR tree-optimization/82591
10770         * graphite.c (graphite_transform_loops): Move code gen message
10771         printing ...
10772         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
10773         Here.  Handle scop_to_isl_ast failing.
10774         (scop_to_isl_ast): Limit the number of ISL operations.
10775
10776 2017-10-18  Richard Biener  <rguenther@suse.de>
10777
10778         * graphite-isl-ast-to-gimple.c
10779         (translate_isl_ast_to_gimple::set_rename): Simplify.
10780         (translate_isl_ast_to_gimple::set_rename_for_each_def): Inline...
10781         (graphite_copy_stmts_from_block): ... here.
10782         (copy_bb_and_scalar_dependences): Simplify.
10783         (add_parameters_to_ivs_params): Canonicalize.
10784         (generate_entry_out_of_ssa_copies): Simplify.
10785         * graphite-sese-to-poly.c (extract_affine_name): Simplify
10786         by passing in ISL dimension.
10787         (parameter_index_in_region_1): Rename to ...
10788         (parameter_index_in_region): ... this.
10789         (extract_affine): Adjust assert, pass down parameter index.
10790         (add_param_constraints): Use range-info when available.
10791         (build_scop_context): Adjust.
10792         * sese.c (new_sese_info): Adjust.
10793         (free_sese_info): Likewise.
10794         * sese.h (bb_map_t, rename_map_t, phi_rename, init_back_edge_pair_t):
10795         Remove unused typedefs.
10796         (struct sese_info_t): Simplify rename_map, remove incomplete_phis.
10797
10798 2017-10-18  Martin Liska  <mliska@suse.cz>
10799
10800         * combine.c (simplify_compare_const): Add gcc_fallthrough.
10801
10802 2017-10-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
10803
10804         * config/s390/s390.c (s390_bb_fallthru_entry_likely): New function.
10805         (s390_sched_init): Do not reset s390_sched_state if we entered the
10806         current basic block via a fallthru edge and all others are unlikely.
10807
10808 2017-10-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
10809
10810         * config/s390/s390.c (NUM_SIDES): New variable.
10811         (LONGRUNNING_THRESHOLD): New variable.
10812         (LATENCY_FACTOR): New variable.
10813         (s390_sched_score): Decrease score for long-running instructions on
10814         wrong side.
10815         (s390_sched_variable_issue): Perform bookkeeping for long-running
10816         instructions.
10817
10818 2017-10-18  Richard Biener  <rguenther@suse.de>
10819
10820         * graphite-isl-ast-to-gimple.c (gcc_expression_from_isl_ast_expr_id):
10821         Simplify with removal of the parameter rename map.
10822         (set_rename): Likewise.
10823         (should_copy_to_new_region): Likewise.
10824         (graphite_copy_stmts_from_block): Likewise.
10825         (copy_bb_and_scalar_dependences): Remove initialization of
10826         unused copied_bb_map.
10827         (copy_def): Remove.
10828         (copy_internal_parameters): Likewise.
10829         (graphite_regenerate_ast_isl): Do not call copy_internal_parameters.
10830         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
10831         Use INTEGRAL_TYPE_P.
10832         (parameter_index_in_region_1): Rename to ...
10833         (assign_parameter_index_in_region): ... this.  Assert we have
10834         a parameter we handle.
10835         (scan_tree_for_params): Adjust.
10836         * sese.h (parameter_rename_map_t): Remove.
10837         (struct sese_info_t): Remove unused parameter_rename_map and
10838         copied_bb_map members.
10839         * sese.c (new_sese_info): Adjust.
10840         (free_sese_info): Likewise.
10841
10842 2017-10-18  Martin Liska  <mliska@suse.cz>
10843
10844         PR sanitizer/82545
10845         * asan.c (asan_expand_poison_ifn): Do not put gimple stmt
10846         on an abnormal edge.
10847
10848 2017-10-18  Sebastian Huber  <sebastian.huber@embedded-brains.de>
10849
10850         * doc/invoke.texi (ffunction-sections and fdata-sections):
10851         Update.
10852
10853 2017-10-17  Eric Botcazou  <ebotcazou@adacore.com>
10854
10855         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Bail out only if
10856         the use statement can throw internally.
10857
10858 2017-10-17  Eric Botcazou  <ebotcazou@adacore.com>
10859
10860         * config/visium/visium.c (visium_select_cc_mode): Return CCmode for
10861         any RTX present on the RHS of a SET.
10862         * compare-elim.c (try_eliminate_compare): Restore comment.
10863
10864 2017-10-17  Jakub Jelinek  <jakub@redhat.com>
10865
10866         * langhooks.h (struct lang_hooks): Document that tree_size langhook
10867         may be also called on tcc_type nodes.
10868         * langhooks.c (lhd_tree_size): Likewise.
10869
10870 2017-10-17  David Malcolm  <dmalcolm@redhat.com>
10871
10872         * gimple-ssa-sprintf.c (fmtwarn): Update for changed signature of
10873         format_warning_at_substring.
10874         (maybe_warn): Convert source_range * param to a location_t.  Pass
10875         UNKNOWN_LOCATION rather than NULL to fmtwarn.
10876         (format_directive): Remove code to extract source_ranges and
10877         source_range * in favor of just a location_t.
10878         (parse_directive): Pass UNKNOWN_LOCATION rather than NULL to
10879         fmtwarn.
10880         * substring-locations.c (format_warning_va): Convert
10881         source_range * param to a location_t.
10882         (format_warning_at_substring): Likewise.
10883         * substring-locations.h (format_warning_va): Likewise.
10884         (format_warning_at_substring): Likewise.
10885
10886 2017-10-17  Jan Hubicka  <hubicka@ucw.cz>
10887
10888         * target.h (enum vect_cost_for_stmt): Add vec_gather_load and
10889         vec_scatter_store
10890         * tree-vect-stmts.c (record_stmt_cost): Make difference between normal
10891         and scatter/gather ops.
10892
10893         * aarch64/aarch64.c (aarch64_builtin_vectorization_cost): Add
10894         vec_gather_load and vec_scatter_store.
10895         * arm/arm.c (arm_builtin_vectorization_cost): Likewise.
10896         * powerpcspe/powerpcspe.c (rs6000_builtin_vectorization_cost): Likewise.
10897         * rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Likewise.
10898         * s390/s390.c (s390_builtin_vectorization_cost): Likewise.
10899         * spu/spu.c (spu_builtin_vectorization_cost): Likewise.
10900         * i386/i386.c (x86_builtin_vectorization_cost): Likewise.
10901
10902 2017-10-17  Uros Bizjak  <ubizjak@gmail.com>
10903
10904         * reg-stack.c (compare_for_stack_reg): Add bool argument.
10905         Detect FTST instruction and handle its register pops.  Only pop
10906         second operand if can_pop_second_op is true.
10907         (subst_stack_regs_pat) <case COMPARE>: Detect FCOMI instruction to
10908         set can_pop_second_op to false in the compare_for_stack_reg call.
10909
10910         * config/i386/i386.md (*cmpi<FPCMP:unord><MODEF:mode>): Only call
10911         output_fp_compare for stack register operands.
10912         * config/i386/i386.c (output_fp_compare): Do not output SSE compare
10913         instructions here.  Do not emit stack register pops here.  Assert
10914         that FCOMPP pops next to top stack register.  Rewrite function.
10915
10916 2017-10-17  Nathan Sidwell  <nathan@acm.org>
10917
10918         PR middle-end/82577
10919         * alias.c (compare_base_decls): Check HAS_DECL_ASSEMBLER_NAME_P,
10920         use DECL_ASSEMBLER_NAME_RAW.
10921
10922         PR middle-end/82546
10923         * tree.c (tree_code_size): Reformat.  Punt to lang hook for unknown
10924         TYPE nodes.
10925
10926 2017-10-17  Qing Zhao <qing.zhao@oracle.com>
10927             Wilco Dijkstra <wilco.dijkstra@arm.com>
10928
10929         * builtins.c (expand_builtin_update_setjmp_buf): Add a
10930         converstion to Pmode from the buf_addr.
10931
10932 2017-10-17  Richard Biener  <rguenther@suse.de>
10933
10934         * graphite-dependences.c (scop_get_reads_and_writes): Change
10935         output parameters to references.
10936
10937 2017-10-17  Jackson Woodruff  <jackson.woodruff@arm.com>
10938
10939         PR 71026/tree-optimization
10940         * fold-const.c (distribute_real_division): Removed.
10941         (fold_binary_loc): Remove calls to distribute_real_divison.
10942
10943 2017-10-17  Richard Biener  <rguenther@suse.de>
10944
10945         * graphite-scop-detection.c
10946         (scop_detection::stmt_has_simple_data_refs_p): Always use
10947         the full nest as region.
10948         (try_generate_gimple_bb): Likewise.
10949         * sese.c (scalar_evolution_in_region): Simplify now that
10950         SCEV can handle instantiation in regions.
10951         * tree-scalar-evolution.c (instantiate_scev_name): Also instantiate
10952         in the non-loop part of a function if requested.
10953
10954 2017-10-17  Richard Biener  <rguenther@suse.de>
10955
10956         PR tree-optimization/82563
10957         * graphite-isl-ast-to-gimple.c (generate_entry_out_of_ssa_copies):
10958         New function.
10959         (graphite_regenerate_ast_isl): Call it.
10960         * graphite-scop-detection.c (build_scops): Remove entry edge split.
10961
10962 2017-10-17  Jakub Jelinek  <jakub@redhat.com>
10963
10964         PR tree-optimization/82549
10965         * fold-const.c (optimize_bit_field_compare, fold_truth_andor_1):
10966         Formatting fixes.  Instead of calling make_bit_field_ref with negative
10967         bitpos return 0.
10968
10969 2017-10-17  Olga Makhotina  <olga.makhotina@intel.com>
10970
10971         * config/i386/avx512dqintrin.h (_mm_mask_reduce_sd,
10972         _mm_maskz_reduce_sd, _mm_mask_reduce_ss,=20
10973         _mm_maskz_reduce_ss): New.
10974         * config/i386/i386-builtin.def (__builtin_ia32_reducesd_mask,
10975         __builtin_ia32_reducess_mask): Ditto..
10976         (__builtin_ia32_reducesd, __builtin_ia32_reducess): Remove.
10977         * config/i386/sse.md (reduces<mode>): Renamed to ...
10978         (reduces<mode><mask_scalar_name>): ... this.
10979         (vreduce<ssescalarmodesuffix>\t{%3, %2, %1, %0|%0, %1, %2, %3}):
10980         Changed to ...
10981         (vreduce<ssescalarmodesuffix>\t{%3, %2, %1, %0<mask_scalar_operand4>|
10982         %0<mask_scalar_operand4>, %1, %2, %3}): ... this.
10983
10984 2017-10-16  David Malcolm  <dmalcolm@redhat.com>
10985
10986         * Makefile.in (OBJS): Add unique-ptr-tests.o.
10987         * selftest-run-tests.c (selftest::run_tests): Call
10988         selftest::unique_ptr_tests_cc_tests.
10989         * selftest.h (selftest::unique_ptr_tests_cc_tests): New decl.
10990         * unique-ptr-tests.cc: New file.
10991
10992 2017-10-16  Vladimir Makarov  <vmakarov@redhat.com>
10993
10994         PR sanitizer/82353
10995         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
10996         locations.
10997         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
10998         (make_hard_regno_born, make_hard_regno_dead): Update
10999         bb_killed_pseudos and bb_gen_pseudos for fixed regs.
11000
11001 2017-10-16  Jeff Law  <law@redhat.com>
11002
11003         * tree-ssa-dse.c (live_bytes_read): Fix thinko.
11004
11005 2017-10-16  Jan Hubicka  <hubicka@ucw.cz>
11006
11007         * x86-tune-costs.h (znver1_cost): Fix move cost tables.
11008
11009 2017-10-16  Olivier Hainque  <hainque@adacore.com>
11010
11011         * gcc/config.gcc (powerpc*-*-*spe*): Pick 8548 as the default
11012         with_cpu if we were configured for an e500v2 target cpu name.
11013
11014 2017-10-16  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11015
11016         * config/arm/arm-cpus.in (cortex-m33): Add nodsp option.
11017         * doc/invoke.texi: Document +nodsp as a valid extension for
11018         -mcpu=cortex-m33.
11019
11020 2017-10-16  Martin Liska  <mliska@suse.cz>
11021
11022         * sbitmap.c (bitmap_bit_in_range_p_checking): New function.
11023         (test_set_range): Likewise.
11024         (test_range_functions): Rename to ...
11025         (test_bit_in_range): ... this.
11026         (sbitmap_c_tests): Add new test.
11027
11028 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
11029
11030         * config/aarch64/arm_neon.h (vdot_u32, vdotq_u32, vdot_s32, vdotq_s32):
11031         New.
11032         (vdot_lane_u32, vdot_laneq_u32, vdotq_lane_u32, vdotq_laneq_u32): New.
11033         (vdot_lane_s32, vdot_laneq_s32, vdotq_lane_s32, vdotq_laneq_s32): New.
11034
11035 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
11036
11037         * config/aarch64/aarch64-builtins.c
11038         (aarch64_types_quadopu_lane_qualifiers): New.
11039         (TYPES_QUADOPU_LANE): New.
11040         * config/aarch64/aarch64-simd.md (aarch64_<sur>dot<vsi2qi>): New.
11041         (<sur>dot_prod<vsi2qi>, aarch64_<sur>dot_lane<vsi2qi>): New.
11042         (aarch64_<sur>dot_laneq<vsi2qi>): New.
11043         * config/aarch64/aarch64-simd-builtins.def (sdot, udot): New.
11044         (sdot_lane, udot_lane, sdot_laneq, udot_laneq): New.
11045         * config/aarch64/iterators.md (sur): Add UNSPEC_SDOT, UNSPEC_UDOT.
11046         (Vdottype, DOTPROD): New.
11047         (sur): Add SDOT and UDOT.
11048
11049 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
11050
11051         * config/aarch64/aarch64.h (AARCH64_FL_DOTPROD): New.
11052         (AARCH64_ISA_DOTPROD, TARGET_DOTPROD): New.
11053         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11054         Add TARGET_DOTPROD.
11055         * config/aarch64/aarch64-option-extensions.def (dotprod): New.
11056         * config/aarch64/aarch64-cores.def (cortex-a55, cortex-a75):
11057         Enable TARGET_DOTPROD.
11058         (cortex-a75.cortex-a55): Likewise.
11059         * doc/invoke.texi (aarch64-feature-modifiers): Document dotprod.
11060
11061 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
11062
11063         * config/arm/arm-builtins.c (arm_unsigned_uternop_qualifiers): New.
11064         (UTERNOP_QUALIFIERS, arm_umac_lane_qualifiers, UMAC_LANE_QUALIFIERS):
11065         New.
11066         * config/arm/arm_neon_builtins.def (sdot, udot, sdot_lane, udot_lane):
11067         New.
11068         * config/arm/iterators.md (DOTPROD, VSI2QI, vsi2qi): New.
11069         (UNSPEC_DOT_S, UNSPEC_DOT_U, opsuffix): New.
11070         * config/arm/neon.md (neon_<sup>dot<vsi2qi>): New.
11071         (neon_<sup>dot_lane<vsi2qi>, <sup>dot_prod<vsi2qi>): New.
11072         * config/arm/types.md (neon_dot, neon_dot_q): New.
11073         * config/arm/unspecs.md (sup): Add UNSPEC_DOT_S, UNSPEC_DOT_U.
11074
11075 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
11076
11077         * config/arm/arm.h (TARGET_DOTPROD): New.
11078         * config/arm/arm.c (arm_arch_dotprod): New.
11079         (arm_option_reconfigure_globals): Add arm_arch_dotprod.
11080         * config/arm/arm-c.c (__ARM_FEATURE_DOTPROD): New.
11081         * config/arm/arm-cpus.in (armv8.2-a): Enabled +dotprod.
11082         (feature dotprod, group dotprod, ALL_SIMD_INTERNAL): New.
11083         (ALL_FPU_INTERNAL): Use ALL_SIMD_INTERNAL.
11084         * config/arm/t-multilib (v8_2_a_simd_variants): Add dotprod.
11085         * doc/invoke.texi (armv8.2-a): Document dotprod
11086
11087 2017-10-14  Jan Hubicka  <hubicka@ucw.cz>
11088
11089         * i386.c (ix86_vec_cost): New function.
11090         (ix86_rtx_costs): Handle vector operations better.
11091         * i386.h (struct processor_costs): Add sse_op, fmasd, fmass.
11092         * x86-tune-costs.h: Add new costs to all tables.
11093
11094 2017-10-14  Jan Hubicka  <hubicka@ucw.cz>
11095
11096         * i386.c (ix86_rtx_costs): Make difference between x87 and SSE
11097         operations.
11098         * i386.h (struct processor_costs): Add addss, mulss, mulsd, divss,
11099         divsd, sqrtss and sqrtsd
11100         * x86-tune-costs.h: Add new entries to all costs.
11101         (znver1_cost): Fix to match real instruction latencies.
11102
11103 2017-10-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11104             Michael Collison <michael.collison@arm.com>
11105
11106         * compare-elim.c: Include emit-rtl.h.
11107         (can_merge_compare_into_arith): New function.
11108         (try_validate_parallel): Likewise.
11109         (try_merge_compare): Likewise.
11110         (try_eliminate_compare): Call the above when no previous clobber
11111         is available.
11112         (execute_compare_elim_after_reload): Add DF_UD_CHAIN and DF_DU_CHAIN
11113         dataflow problems.
11114
11115 2017-10-14  Jakub Jelinek  <jakub@redhat.com>
11116
11117         PR middle-end/62263
11118         PR middle-end/82498
11119         * tree-ssa-phiopt.c (value_replacement): Comment fix.  Handle
11120         up to 2 preparation statements for ASSIGN in MIDDLE_BB.
11121
11122         PR middle-end/62263
11123         PR middle-end/82498
11124         * tree-ssa-forwprop.c (simplify_rotate): Allow def_arg1[N]
11125         to be any operand_equal_p operands.  For & (B - 1) require
11126         B to be power of 2.  Recognize
11127         (X << (Y & (B - 1))) | (X >> ((-Y) & (B - 1))) and similar patterns.
11128
11129 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
11130
11131         PR bootstrap/82553
11132         * optabs.c (expand_memory_blockage): Fix call of
11133         targetm.have_memory_blockage.
11134
11135 2017-10-14  Jakub Jelinek  <jakub@redhat.com>
11136
11137         PR bootstrap/82548
11138         * config.gcc (*-*-solaris2*, i[34567]86-*-cygwin*,
11139         x86_64-*-cygwin*, i[34567]86-*-mingw* | x86_64-*-mingw*): Append
11140         objects to extra_objs instead of overwriting it.
11141
11142 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
11143
11144         * config/i386/sync.md (FILD_ATOMIC/FIST_ATOMIC FP load peephole2):
11145         Use any_fp_register_operand as operand[3] predicate.  Simplify
11146         equality test for operands[2] and operands[4] memory location.
11147         (LDX_ATOMIC/STX_ATOMIC FP load peephole2): Ditto.
11148         (FILD_ATOMIC/FIST_ATOMIC FP load peephole2 with mem blockage): New.
11149         (LDX_ATOMIC/LDX_ATOMIC FP load peephole2 with mem blockage): Ditto.
11150         (FILD_ATOMIC/FIST_ATOMIC FP store peephole2): Use
11151         any_fp_register_operand as operand[1] predicate.  Simplify
11152         equality test for operands[0] and operands[3] memory location.
11153         (LDX_ATOMIC/STX_ATOMIC FP store peephole2): Ditto.
11154         (FILD_ATOMIC/FIST_ATOMIC FP store peephole2 with mem blockage): New.
11155         (LDX_ATOMIC/LDX_ATOMIC FP storepeephole2 with mem blockage): Ditto.
11156
11157 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
11158
11159         * target-insns.def: Add memory_blockage.
11160         * optabs.c (expand_memory_blockage): New function.
11161         (expand_asm_memory_barrier): Rename ...
11162         (expand_asm_memory_blockage): ... to this.
11163         (expand_mem_thread_fence): Call expand_memory_blockage
11164         instead of expand_asm_memory_barrier.
11165         (expand_mem_singnal_fence): Ditto.
11166         (expand_atomic_load): Ditto.
11167         (expand_atomic_store): Ditto.
11168         * doc/md.texi (Standard Pattern Names For Generation):
11169         Document memory_blockage instruction pattern.
11170
11171 2017-10-13  Sebastian Perta  <sebastian.perta@renesas.com>
11172
11173         * config/rl78/rl78.c (rl78_emit_libcall): New function.
11174         * config/rl78/rl78-protos.h (rl78_emit_libcall): New function.
11175         * config/rl78/rl78.md: New define_expand "adddi3".
11176
11177 2017-10-13  Jan Hubicka  <hubicka@ucw.cz>
11178
11179         * cfghooks.c (verify_flow_info): Disable check that all probabilities
11180         are set correctly.
11181
11182 2017-10-13  Jeff Law  <law@redhat.com>
11183
11184         * tree-ssa-reassoc.c (reassociate_bb): Clarify code slighly.
11185
11186 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
11187
11188         PR target/82274
11189         * internal-fn.c (expand_mul_overflow): If both operands have
11190         the same highpart of -1 or 0 and the topmost bit of lowpart
11191         is different, overflow is if res <= 0 rather than res < 0.
11192
11193 2017-10-13  Pat Haugen  <pthaugen@us.ibm.com>
11194
11195         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Remove
11196         TARGET_P9_VECTOR code for unaligned_load case.
11197
11198 2017-10-13  Jan Hubicka  <hubicka@ucw.cz>
11199
11200         * cfghooks.c (verify_flow_info): Check that edge probabilities are set.
11201
11202 2017-10-13  Nathan Sidwell  <nathan@acm.org>
11203
11204         * tree-core.h (tree_contains_struct): Make bool.
11205         * tree.c (tree_contains_struct): Likewise.
11206         * tree.h (MARK_TS_BASE): Remove do ... while (0) idiom.
11207         (MARK_TS_TYPED, MARK_TS_COMMON, MARK_TS_TYPE_COMMON,
11208         MARK_TS_TYPE_WITH_LANG_SPECIFIC, MARK_TS_DECL_MINIMAL,
11209         MARK_TS_DECL_COMMON, MARK_TS_DECL_WRTL, MARK_TS_DECL_WITH_VIS,
11210         MARK_TS_DECL_NON_COMMON): Likewise, use comma operator.
11211
11212 2017-10-13  Richard Biener  <rguenther@suse.de>
11213
11214         * graphite-isl-ast-to-gimple.c
11215         (translate_isl_ast_to_gimple::get_rename_from_scev): Remove unused
11216         parameters and dominance check.
11217         (translate_isl_ast_to_gimple::graphite_copy_stmts_from_block): Adjust.
11218         (translate_isl_ast_to_gimple::copy_bb_and_scalar_dependences): Likewise.
11219         (translate_isl_ast_to_gimple::graphite_regenerate_ast_isl):
11220         Do not update SSA form here or do intermediate IL verification.
11221         * graphite.c: Include tree-ssa.h and tree-into-ssa.h.
11222         (graphite_initialize): Remove check on the number of loops in
11223         the function and inline into graphite_transform_loops.
11224         (graphite_finalize): Inline into graphite_transform_loops.
11225         (graphite_transform_loops): Perform SSA update and IL verification
11226         here.
11227         * params.def (PARAM_GRAPHITE_MIN_LOOPS_PER_FUNCTION): Remove.
11228
11229 2017-10-13  Richard Biener  <rguenther@suse.de>
11230
11231         * graphite-isl-ast-to-gimple.c (max_mode_int_precision,
11232         graphite_expression_type_precision): Avoid global constructor
11233         by moving ...
11234         (translate_isl_ast_to_gimple::translate_isl_ast_to_gimple): Here.
11235         (translate_isl_ast_to_gimple::graphite_expr_type): Add type member.
11236         (translate_isl_ast_to_gimple::translate_isl_ast_node_for): Use it.
11237         (translate_isl_ast_to_gimple::build_iv_mapping): Likewise.
11238         (translate_isl_ast_to_gimple::graphite_create_new_guard): Likewise.
11239         * graphite-sese-to-poly.c (build_original_schedule): Return nothing.
11240
11241 2017-10-13  H.J. Lu  <hongjiu.lu@intel.com>
11242
11243         PR target/82499
11244         * config/i386/i386.h (ix86_red_zone_size): New.
11245         * config/i386/i386.md (push peephole2s): Replace
11246         "!ix86_using_red_zone ()" with "ix86_red_zone_size == 0".
11247
11248 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
11249             Alan Hayward  <alan.hayward@arm.com>
11250             David Sherwood  <david.sherwood@arm.com>
11251
11252         * combine.c (can_change_dest_mode): Reject changes in
11253         REGMODE_NATURAL_SIZE.
11254
11255 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
11256             Alan Hayward  <alan.hayward@arm.com>
11257             David Sherwood  <david.sherwood@arm.com>
11258
11259         * cfgexpand.c (expand_debug_expr): Use GET_MODE_UNIT_BITSIZE.
11260         (expand_debug_source_expr): Likewise.
11261         * combine.c (combine_simplify_rtx): Likewise.
11262         * cse.c (fold_rtx): Likewise.
11263         * fwprop.c (canonicalize_address): Likewise.
11264         * targhooks.c (default_shift_truncation_mask): Likewise.
11265
11266 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
11267             Alan Hayward  <alan.hayward@arm.com>
11268             David Sherwood  <david.sherwood@arm.com>
11269
11270         * optabs.c (add_equal_note): Use GET_MODE_UNIT_SIZE.
11271         (widened_mode): Likewise.
11272         (expand_unop): Likewise.
11273         * ree.c (transform_ifelse): Likewise.
11274         (merge_def_and_ext): Likewise.
11275         (combine_reaching_defs): Likewise.
11276         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
11277
11278 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
11279             Alan Hayward  <alan.hayward@arm.com>
11280             David Sherwood  <david.sherwood@arm.com>
11281
11282         * caller-save.c (replace_reg_with_saved_mem): Use byte_lowpart_offset.
11283         * combine.c (gen_lowpart_for_combine): Likewise.
11284         * dwarf2out.c (rtl_for_decl_location): Likewise.
11285         * final.c (alter_subreg): Likewise.
11286         * rtlhooks.c (gen_lowpart_general): Likewise.
11287         (gen_lowpart_if_possible): Likewise.
11288
11289 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
11290             Alan Hayward  <alan.hayward@arm.com>
11291             David Sherwood  <david.sherwood@arm.com>
11292
11293         * calls.c (expand_call): Use subreg_lowpart_offset.
11294         * cse.c (cse_insn): Likewise.
11295         * regcprop.c (copy_value): Likewise.
11296         (copyprop_hardreg_forward_1): Likewise.
11297
11298 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
11299
11300         PR target/82524
11301         * config/i386/i386.md (addqi_ext_1, andqi_ext_1,
11302         *andqi_ext_1_cc, *<code>qi_ext_1, *xorqi_ext_1_cc): Change
11303         =Q constraints to +Q and into insn condition add check
11304         that operands[0] and operands[1] are equal.
11305         (*addqi_ext_2, *andqi_ext_2, *<code>qi_ext_2): Change
11306         =Q constraints to +Q and into insn condition add check
11307         that operands[0] is equal to either operands[1] or operands[2].
11308
11309         PR target/82498
11310         * fold-const.c (fold_binary_loc) <bit_rotate>: Code cleanups,
11311         instead of handling MINUS_EXPR twice (once for each argument),
11312         canonicalize operand order and handle just once, use rtype where
11313         possible.  Handle (A << B) | (A >> (-B & (Z - 1))).
11314
11315         PR target/82498
11316         * config/i386/ia32intrin.h (__rold, __rord, __rolq, __rorq): Allow
11317         any values of __C while still being pattern recognizable as a simple
11318         rotate instruction.
11319
11320 2017-10-13  Richard Biener  <rguenther@suse.de>
11321
11322         PR tree-optimization/82451
11323         Revert
11324         2017-10-02  Richard Biener  <rguenther@suse.de>
11325
11326         PR tree-optimization/82355
11327         * graphite-isl-ast-to-gimple.c (build_iv_mapping): Also build
11328         a mapping for the enclosing loop but avoid generating one for
11329         the loop tree root.
11330         (copy_bb_and_scalar_dependences): Remove premature codegen
11331         error on PHIs in blocks duplicated into multiple places.
11332         * graphite-scop-detection.c
11333         (scop_detection::stmt_has_simple_data_refs_p): For a loop not
11334         in the region use it as loop and nest to analyze the DR in.
11335         (try_generate_gimple_bb): Likewise.
11336         * graphite-sese-to-poly.c (extract_affine_chrec): Adjust.
11337         (add_loop_constraints): For blocks in a loop not in the region
11338         create a dimension with a single iteration.
11339         * sese.h (gbb_loop_at_index): Remove assert.
11340
11341         * cfgloop.c (loop_preheader_edge): For the loop tree root
11342         return the single successor of the entry block.
11343         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
11344         Reset the SCEV hashtable and niters.
11345         * graphite-scop-detection.c
11346         (scop_detection::graphite_can_represent_scev): Add SCOP parameter,
11347         assert that we only have POLYNOMIAL_CHREC that vary in loops
11348         contained in the region.
11349         (scop_detection::graphite_can_represent_expr): Adjust.
11350         (scop_detection::stmt_has_simple_data_refs_p): For loops
11351         not in the region set loop to NULL.  The nest is now the
11352         entry edge to the region.
11353         (try_generate_gimple_bb): Likewise.
11354         * sese.c (scalar_evolution_in_region): Adjust for
11355         instantiate_scev change.
11356         * tree-data-ref.h (graphite_find_data_references_in_stmt):
11357         Make nest parameter the edge into the region.
11358         (create_data_ref): Likewise.
11359         * tree-data-ref.c (dr_analyze_indices): Make nest parameter an
11360         entry edge into a region and adjust instantiate_scev calls.
11361         (create_data_ref): Likewise.
11362         (graphite_find_data_references_in_stmt): Likewise.
11363         (find_data_references_in_stmt): Pass the loop preheader edge
11364         from the nest argument.
11365         * tree-scalar-evolution.h (instantiate_scev): Make instantiate_below
11366         parameter the edge into the region.
11367         (instantiate_parameters): Use the loop preheader edge as entry.
11368         * tree-scalar-evolution.c (analyze_scalar_evolution): Handle
11369         NULL loop.
11370         (get_instantiated_value_entry): Make instantiate_below parameter
11371         the edge into the region.
11372         (instantiate_scev_name): Likewise.  Adjust dominance checks,
11373         when we cannot use loop-based instantiation instantiate by
11374         walking use-def chains.
11375         (instantiate_scev_poly): Adjust.
11376         (instantiate_scev_binary): Likewise.
11377         (instantiate_scev_convert): Likewise.
11378         (instantiate_scev_not): Likewise.
11379         (instantiate_array_ref): Remove.
11380         (instantiate_scev_3): Likewise.
11381         (instantiate_scev_2): Likewise.
11382         (instantiate_scev_1): Likewise.
11383         (instantiate_scev_r): Do not blindly handle N-operand trees.
11384         Do not instantiate array-refs.  Handle all constants and invariants.
11385         (instantiate_scev): Make instantiate_below parameter
11386         the edge into the region.
11387         (resolve_mixers): Use the loop preheader edge for the region
11388         parameter to instantiate_scev_r.
11389         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Adjust.
11390
11391 2017-10-13  Richard Biener  <rguenther@suse.de>
11392
11393         PR tree-optimization/82525
11394         * graphite-isl-ast-to-gimple.c
11395         (translate_isl_ast_to_gimple::widest_int_from_isl_expr_int): Split
11396         out from ...
11397         (translate_isl_ast_to_gimple::gcc_expression_from_isl_expr_int): Here.
11398         Fail code generation when we cannot represent the isl integer.
11399         (binary_op_to_tree): Elide modulo operations that are no-ops
11400         in the type we code generate.  Remove now superfluous code
11401         generation errors.
11402
11403 2017-10-13  Richard Biener  <rguenther@suse.de>
11404
11405         * graphite-scop-detection.c (loop_ivs_can_be_represented): Remove.
11406         (scop_detection::harmful_loop_in_region): Remove premature
11407         IV type restriction.
11408         (scop_detection::graphite_can_represent_scev): We can handle
11409         pointer IVs just fine.
11410
11411 2017-10-13  Alan Modra  <amodra@gmail.com>
11412
11413         * doc/extend.texi (Extended Asm <Clobbers>): Rename to
11414         "Clobbers and Scratch Registers".  Add paragraph on
11415         alternative to clobbers for scratch registers and OpenBLAS
11416         example.
11417
11418 2017-10-13  Alan Modra  <amodra@gmail.com>
11419
11420         * doc/extend.texi (Clobbers): Correct vax example.  Delete old
11421         example of a memory input for a string of known length.  Move
11422         commentary out of table.  Add a number of new examples
11423         covering array memory inputs.
11424
11425 2017-10-12  Martin Liska  <mliska@suse.cz>
11426
11427         PR tree-optimization/82493
11428         * sbitmap.c (bitmap_bit_in_range_p): Fix the implementation.
11429         (test_range_functions): New function.
11430         (sbitmap_c_tests): Likewise.
11431         * selftest-run-tests.c (selftest::run_tests): Run new tests.
11432         * selftest.h (sbitmap_c_tests): New function.
11433
11434         * tree-ssa-dse.c (live_bytes_read): Fix thinko.
11435
11436 2017-10-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
11437
11438         * config/rs6000/amo.h: Fix spacing issue.
11439
11440 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
11441
11442         PR target/82498
11443         * config/i386/i386.md (*ashl<mode>3_mask_1,
11444         *<shift_insn><mode>3_mask_1, *<rotate_insn><mode>3_mask_1,
11445         *<btsc><mode>_mask_1, *btr<mode>_mask_1): New define_insn_and_split
11446         patterns.
11447
11448 2017-10-12  Jan Hubicka  <hubicka@ucw.cz>
11449
11450         * profile-count.h (safe_scale_64bit): Fix GCC4.x path.
11451         (profile_probability): Set max_probability
11452         to (uint32_t) 1 << (n_bits - 2) and update accessors to avoid overlfows
11453         in temporaries.
11454         * profile-count.c (profile_probability::differs_from_p): Do not
11455         rely on max_probaiblity == 10000
11456
11457 2017-10-12  Jeff Law  <law@redhat.com>
11458
11459         * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject ao_refs with
11460         negative offsets.
11461
11462 2017-10-12  Martin Sebor  <msebor@redhat.com>
11463
11464         PR other/82301
11465         PR c/82435
11466         * cgraphunit.c (maybe_diag_incompatible_alias): New function.
11467         (handle_alias_pairs): Call it.
11468         * common.opt (-Wattribute-alias): New option.
11469         * doc/extend.texi (ifunc attribute): Discuss C++ specifics.
11470         * doc/invoke.texi (-Wattribute-alias): Document.
11471
11472 2017-10-12  Vladimir Makarov  <vmakarov@redhat.com>
11473
11474         Revert
11475         2017-10-11  Vladimir Makarov  <vmakarov@redhat.com>
11476         PR sanitizer/82353
11477         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
11478         locations.
11479         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
11480         (make_hard_regno_born, make_hard_regno_dead): Update
11481         bb_killed_pseudos and bb_gen_pseudos.
11482
11483 2017-10-12  Jan Hubicka  <hubicka@ucw.cz>
11484
11485         * config/i386/x86-tune-sched.c (ix86_adjust_cost): Fix Zen support.
11486
11487 2017-10-12  Uros Bizjak  <ubizjak@gmail.com>
11488
11489         * config/alpha/alpha.c (alpha_split_conditional_move):
11490         Use std::swap instead of manually swapping.
11491         (alpha_stdarg_optimize_hook): Ditto.
11492         (alpha_canonicalize_comparison): Ditto.
11493
11494 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
11495
11496         * tree-loop-distribution.c (struct builtin_info): New struct.
11497         (struct partition): Refactor fields into struct builtin_info.
11498         (partition_free): Free struct builtin_info.
11499         (build_size_arg_loc, build_addr_arg_loc): Delete.
11500         (generate_memset_builtin, generate_memcpy_builtin): Get memory range
11501         information from struct builtin_info.
11502         (find_single_drs): New function refactored from classify_partition.
11503         Also moved builtin validity checks to this function.
11504         (compute_access_range, alloc_builtin): New functions.
11505         (classify_builtin_st, classify_builtin_ldst): New functions.
11506         (classify_partition): Refactor code into functions find_single_drs,
11507         classify_builtin_st and classify_builtin_ldst.
11508         (distribute_loop): Don't do runtime alias check when distributing
11509         loop nest.
11510         (find_seed_stmts_for_distribution): New function.
11511         (pass_loop_distribution::execute): Refactor code finding seed
11512         stmts into above function.  Support distribution for the innermost
11513         two-level loop nest.  Adjust dump information.
11514
11515 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
11516
11517         * tree-loop-distribution.c: Adjust the general comment.
11518         (NUM_PARTITION_THRESHOLD): New macro.
11519         (ssa_name_has_uses_outside_loop_p): Support loop nest distribution.
11520         (classify_partition): Skip builtin pattern of loop nest's inner loop.
11521         (merge_dep_scc_partitions): New parameter ignore_alias_p and use it
11522         in call to build_partition_graph.
11523         (finalize_partitions): New parameter.  Make loop distribution more
11524         conservative by fusing more partitions.
11525         (distribute_loop): Don't do runtime alias check in case of loop nest
11526         distribution.
11527         (find_seed_stmts_for_distribution): New function.
11528         (prepare_perfect_loop_nest): New function.
11529         (pass_loop_distribution::execute): Refactor code finding seed stmts
11530         and loop nest into above functions.  Support loop nest distribution.
11531         Adjust dump information accordingly.
11532
11533 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
11534
11535         * tree-loop-distribution.c (break_alias_scc_partitions): Add comment
11536         and set PTYPE_SEQUENTIAL for merged partition.
11537
11538 2017-10-12  Richard Biener  <rguenther@suse.de>
11539
11540         PR tree-optimization/69728
11541         Revert
11542         2017-09-19  Richard Biener  <rguenther@suse.de>
11543
11544         PR tree-optimization/69728
11545         * graphite-sese-to-poly.c (schedule_error): New global.
11546         (add_loop_schedule): Handle empty domain by failing the
11547         schedule.
11548         (build_original_schedule): Handle schedule_error.
11549
11550         * graphite-sese-to-poly.c (add_loop_schedule): Handle empty
11551         domain by returning an unchanged schedule.
11552
11553 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
11554
11555         * genrecog.c (validate_pattern): For VEC_SELECT verify that
11556         CONST_INT selectors are 0 to GET_MODE_NUNITS (imode) - 1.
11557
11558 2017-10-12  Aldy Hernandez  <aldyh@redhat.com>
11559
11560         * Makefile.in (TAGS): Merge all the *.def files into one pattern.
11561         Handle params.def.
11562
11563 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
11564
11565         PR c++/82159
11566         * expr.c (store_field): Don't optimize away bitsize == 0 store
11567         from CALL_EXPR with addressable return type.
11568
11569 2017-10-11  Segher Boessenkool  <segher@kernel.crashing.org>
11570
11571         * config/rs6000/rs6000.h (TARGET_ISEL64): Delete.
11572         * config/rs6000/rs6000.md (sel): Delete mode attribute.
11573         (mov<mode>cc, isel_signed_<mode>, isel_unsigned_<mode>,
11574         *isel_reversed_signed_<mode>, *isel_reversed_unsigned_<mode>): Use
11575         TARGET_ISEL instead of TARGET_ISEL<sel>.
11576
11577 2017-10-11  David Edelsohn  <dje.gcc@gmail.com>
11578
11579         * config/rs6000/rs6000.c
11580         (rs6000_xcoff_asm_output_aligned_decl_common): Test for NULL decl.
11581
11582 2017-10-11  Segher Boessenkool  <segher@kernel.crashing.org>
11583
11584         * config/rs6000/predicates.md (zero_constant, all_ones_constant):
11585         Move up in file.
11586         (reg_or_cint_operand): Fix comment.
11587         (reg_or_zero_operand): New predicate.
11588         * config/rs6000/rs6000-protos.h (output_isel): Delete.
11589         * config/rs6000/rs6000.c (output_isel): Delete.
11590         * config/rs6000/rs6000.md (isel_signed_<mode>): Use reg_or_zero_operand
11591         instead of reg_or_cint_operand.  Output instruction directly (not via
11592         output_isel).
11593         (isel_unsigned_<mode>): Ditto.
11594         (*isel_reversed_signed_<mode>): Use reg_or_zero_operand instead of
11595         gpc_reg_operand.  Add an instruction alternative for this.  Output
11596         instruction directly.
11597         (*isel_reversed_unsigned_<mode>): Ditto.
11598
11599 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
11600
11601         * config/i386/i386.c (ix86_canonicalize_comparison): New function.
11602         (TARGET_CANONICALIZE_COMPARISON): Define.
11603
11604 2017-10-11  Qing Zhao  <qing.zhao@oracle.com>
11605
11606         PR target/81422
11607         * config/aarch64/aarch64.c (aarch64_load_symref_appropriately):
11608         Check whether the dest is REG before adding REG_EQUIV note.
11609
11610 2017-10-11  Vladimir Makarov  <vmakarov@redhat.com>
11611
11612         PR sanitizer/82353
11613         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
11614         locations.
11615         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
11616         (make_hard_regno_born, make_hard_regno_dead): Update
11617         bb_killed_pseudos and bb_gen_pseudos.
11618
11619 2017-10-11  Nathan Sidwell  <nathan@acm.org>
11620
11621         * incpath.h (enum incpath_kind): Name enum, prefix values.
11622         (add_path, add_cpp_dir_path, get_added_cpp_dirs): Use incpath_kind.
11623         * incpath.c (heads, tails): Use INC_MAX.
11624         (add_env_var_paths, add_standard_paths): Use incpath_kind.
11625         (merge_include_chains, split_quote_chain,
11626         register_include_chains): Update incpath_kind names.
11627         (add_cpp_dir_path, add_path, get_added_cpp_dirs): Use incpath_kind.
11628         * config/darwin-c.c (add_system_framework_path): Update incpath_kind
11629         names.
11630         (add_framework_path, darwin_register_objc_includes): Likewise.
11631         * config/vms/vms-c.c (vms_c_register_includes): Likewise.
11632
11633 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
11634
11635         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
11636         Do not use float_operator operator predicate.
11637         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
11638         * config/i386/predicates.md (float_operator): Remove predicate.
11639
11640 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
11641
11642         * config/i386/i386.md (*jcc<mode>_0_i387): Remove insn pattern.
11643         (*jccxf_i387): Ditto.
11644         (*jcc<mode>_i387): Ditto.
11645         (*jccu<mode>_i387): Ditto.
11646         (*jcc<X87MODEF:mode>_<SWI24:mode>_i387): Ditto.
11647         (*jcc_*_i387 splitters): Remove.
11648         * config/i386/i386-protos.h (ix86_split_fp_branch): Remove prototype.
11649         * config/i386/i386.c (ix86_split_fp_branch): Remove.
11650         * config/i386/predicates.md (ix86_swapped_fp_comparison_operator):
11651         Remove predicate.
11652
11653 2017-10-11  Jan Hubicka  <hubicka@ucw.cz>
11654
11655         * profile-count.h (slow_safe_scale_64bit): New function.
11656         (safe_scale_64bit): New inline.
11657         (profile_count::max_safe_multiplier): Remove; use safe_scale_64bit.
11658         * profile-count.c: Include wide-int.h
11659         (slow_safe_scale_64bit): New.
11660
11661 2017-10-11  Nathan Sidwell  <nathan@acm.org>
11662
11663         * tree.h (DECL_ASSEMBLER_NAME_SET_P): Don't check
11664         HAS_DECL_ASSEMBLER_NAME_P.
11665         * gimple-expr.c (gimple_decl_printable_name: Check
11666         HAS_DECL_ASSEMBLER_NAME_P too.
11667         * ipa-utils.h (type_in_anonymous_namespace_p): Check
11668         DECL_ASSEMBLER_NAME_SET_P of TYPE_NAME.
11669         (odr_type_p): No need to assert TYPE_NAME is a TYPE_DECL.
11670         * passes.c (rest_of_decl_compilation): Check
11671         HAS_DECL_ASSEMBLER_NAME_P too.
11672         * recog.c (verify_changes): Likewise.
11673         * tree-pretty-print.c (dump_decl_name): Likewise.
11674         * tree-ssa-structalias.c (alias_get_name): Likewise.  Reimplement.
11675
11676         * tree.h (DECL_ASSEMBLER_NAME_RAW): New.
11677         (SET_DECL_ASSEMBLER_NAME): Use it.
11678         (DECL_ASSEMBLER_NAME_SET_P): Likewise.
11679         (COPY_DECL_ASSEMBLER_NAME): Likewise.
11680         * tree.c (decl_assembler_name): Use DECL_ASSEMBLER_NAME_RAW.
11681
11682 2017-10-11  Jan Hubicka  <hubicka@ucw.cz>
11683
11684         * config.gcc (i386, x86_64): Add extra objects.
11685         * config/i386/i386-protos.h (ix86_rip_relative_addr_p): Declare.
11686         (ix86_min_insn_size): Declare.
11687         (ix86_issue_rate): Declare.
11688         (ix86_adjust_cost): Declare.
11689         (ia32_multipass_dfa_lookahead): Declare.
11690         (ix86_macro_fusion_p): Declare.
11691         (ix86_macro_fusion_pair_p): Declare.
11692         (ix86_bd_has_dispatch): Declare.
11693         (ix86_bd_do_dispatch): Declare.
11694         (ix86_core2i7_init_hooks): Declare.
11695         (ix86_atom_sched_reorder): Declare.
11696         * config/i386/i386.c Move all CPU cost tables to x86-tune-costs.h.
11697         (COSTS_N_BYTES): Move to x86-tune-costs.h.
11698         (DUMMY_STRINGOP_ALGS):Move to x86-tune-costs.h.
11699         (rip_relative_addr_p): Rename to ...
11700         (ix86_rip_relative_addr_p): ... this one; export.
11701         (memory_address_length): Update.
11702         (ix86_issue_rate): Move to x86-tune-sched.c.
11703         (ix86_flags_dependent): Move to x86-tune-sched.c.
11704         (ix86_agi_dependent): Move to x86-tune-sched.c.
11705         (exact_dependency_1): Move to x86-tune-sched.c.
11706         (exact_store_load_dependency): Move to x86-tune-sched.c.
11707         (ix86_adjust_cost): Move to x86-tune-sched.c.
11708         (ia32_multipass_dfa_lookahead): Move to x86-tune-sched.c.
11709         (ix86_macro_fusion_p): Move to x86-tune-sched.c.
11710         (ix86_macro_fusion_pair_p): Move to x86-tune-sched.c.
11711         (do_reorder_for_imul): Move to x86-tune-sched-atom.c.
11712         (swap_top_of_ready_list): Move to x86-tune-sched-atom.c.
11713         (ix86_sched_reorder): Move to x86-tune-sched-atom.c.
11714         (core2i7_first_cycle_multipass_init): Move to x86-tune-sched-core.c.
11715         (core2i7_dfa_post_advance_cycle): Move to x86-tune-sched-core.c.
11716         (min_insn_size): Rename to ...
11717         (ix86_min_insn_size): ... this one; export.
11718         (core2i7_first_cycle_multipass_begin): Move to x86-tune-sched-core.c.
11719         (core2i7_first_cycle_multipass_issue): Move to x86-tune-sched-core.c.
11720         (core2i7_first_cycle_multipass_backtrack): Move to
11721         x86-tune-sched-core.c.
11722         (core2i7_first_cycle_multipass_end): Move to x86-tune-sched-core.c.
11723         (core2i7_first_cycle_multipass_fini): Move to x86-tune-sched-core.c.
11724         (ix86_sched_init_global): Break up logic to ix86_core2i7_init_hooks.
11725         (ix86_avoid_jump_mispredicts): Update.
11726         (TARGET_SCHED_DISPATCH): Move to ix86-tune-sched-bd.c.
11727         (TARGET_SCHED_DISPATCH_DO): Move to ix86-tune-sched-bd.c.
11728         (TARGET_SCHED_REORDER): Move to ix86-tune-sched-bd.c.
11729         (DISPATCH_WINDOW_SIZE): Move to ix86-tune-sched-bd.c.
11730         (MAX_DISPATCH_WINDOWS): Move to ix86-tune-sched-bd.c.
11731         (MAX_INSN): Move to ix86-tune-sched-bd.c.
11732         (MAX_IMM): Move to ix86-tune-sched-bd.c.
11733         (MAX_IMM_SIZE): Move to ix86-tune-sched-bd.c.
11734         (MAX_IMM_32): Move to ix86-tune-sched-bd.c.
11735         (MAX_IMM_64): Move to ix86-tune-sched-bd.c.
11736         (MAX_LOAD): Move to ix86-tune-sched-bd.c.
11737         (MAX_STORE): Move to ix86-tune-sched-bd.c.
11738         (BIG): Move to ix86-tune-sched-bd.c.
11739         (enum dispatch_group): Move to ix86-tune-sched-bd.c.
11740         (enum insn_path): Move to ix86-tune-sched-bd.c.
11741         (get_mem_group): Move to ix86-tune-sched-bd.c.
11742         (is_cmp): Move to ix86-tune-sched-bd.c.
11743         (dispatch_violation): Move to ix86-tune-sched-bd.c.
11744         (is_branch): Move to ix86-tune-sched-bd.c.
11745         (is_prefetch): Move to ix86-tune-sched-bd.c.
11746         (init_window): Move to ix86-tune-sched-bd.c.
11747         (allocate_window): Move to ix86-tune-sched-bd.c.
11748         (init_dispatch_sched): Move to ix86-tune-sched-bd.c.
11749         (is_end_basic_block): Move to ix86-tune-sched-bd.c.
11750         (process_end_window): Move to ix86-tune-sched-bd.c.
11751         (allocate_next_window): Move to ix86-tune-sched-bd.c.
11752         (find_constant): Move to ix86-tune-sched-bd.c.
11753         (get_num_immediates): Move to ix86-tune-sched-bd.c.
11754         (has_immediate): Move to ix86-tune-sched-bd.c.
11755         (get_insn_path): Move to ix86-tune-sched-bd.c.
11756         (get_insn_group): Move to ix86-tune-sched-bd.c.
11757         (count_num_restricted): Move to ix86-tune-sched-bd.c.
11758         (fits_dispatch_window): Move to ix86-tune-sched-bd.c.
11759         (add_insn_window): Move to ix86-tune-sched-bd.c.
11760         (add_to_dispatch_window): Move to ix86-tune-sched-bd.c.
11761         (debug_dispatch_window_file): Move to ix86-tune-sched-bd.c.
11762         (debug_dispatch_window): Move to ix86-tune-sched-bd.c.
11763         (debug_insn_dispatch_info_file): Move to ix86-tune-sched-bd.c.
11764         (debug_ready_dispatch): Move to ix86-tune-sched-bd.c.
11765         (do_dispatch): Move to ix86-tune-sched-bd.c.
11766         (has_dispatch): Move to ix86-tune-sched-bd.c.
11767         * config/i386/t-i386: Add new object files.
11768         * config/i386/x86-tune-costs.h: New file.
11769         * config/i386/x86-tune-sched-atom.c: New file.
11770         * config/i386/x86-tune-sched-bd.c: New file.
11771         * config/i386/x86-tune-sched-core.c: New file.
11772         * config/i386/x86-tune-sched.c: New file.
11773
11774 2017-10-11  Liu Hao  <lh_mouse@126.com>
11775
11776         * pretty-print.c [_WIN32] (colorize_init): Remove.  Use
11777         the generic version below instead.
11778         (should_colorize): Recognize Windows consoles as terminals
11779         for MinGW targets.
11780         * pretty-print.c [__MINGW32__] (write_all): New function.
11781         [__MINGW32__] (find_esc_head): Likewise.
11782         [__MINGW32__] (find_esc_terminator): Likewise.
11783         [__MINGW32__] (eat_esc_sequence): Likewise.
11784         [__MINGW32__] (mingw_ansi_fputs): New function that handles
11785         ANSI escape codes.
11786         (pp_write_text_to_stream): Use mingw_ansi_fputs instead of fputs
11787         for MinGW targets.
11788
11789 2017-10-11  Richard Biener  <rguenther@suse.de>
11790
11791         * tree-ssa-loop-niter.c (infer_loop_bounds_from_pointer_arith):
11792         Properly call analyze_scalar_evolution with the loop of the stmt.
11793
11794 2017-10-11  Richard Biener  <rguenther@suse.de>
11795
11796         * tree.def (POLYNOMIAL_CHREC): Remove CHREC_VARIABLE tree operand.
11797         * tree-core.h (tree_base): Add chrec_var union member.
11798         * tree.h (CHREC_VAR): Remove.
11799         (CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): Adjust.
11800         * tree-chrec.h (build_polynomial_chrec): Adjust.
11801         * tree-chrec.c (reset_evolution_in_loop): Use build_polynomial_chrec.
11802         * tree-pretty-print.c (dump_generic_node): Use CHREC_VARIABLE.
11803
11804 2017-10-11  Marc Glisse  <marc.glisse@inria.fr>
11805
11806         * fold-const.c (fold_binary_loc) [X +- Y CMP X]: Move ...
11807         * match.pd: ... here.
11808         ((T) X == (T) Y): Relax condition.
11809
11810 2017-10-11  Bin Cheng  <bin.cheng@arm.com>
11811
11812         PR tree-optimization/82472
11813         * tree-loop-distribution.c (sort_partitions_by_post_order): Refine
11814         comment.
11815         (break_alias_scc_partitions): Update postorder number.
11816
11817 2017-10-11  Martin Liska  <mliska@suse.cz>
11818
11819         PR sanitizer/82490
11820         * opts.c (parse_no_sanitize_attribute): Do not use error_value
11821         variable.
11822         * opts.h (parse_no_sanitize_attribute): Remove last argument.
11823
11824 2017-10-11  Martin Liska  <mliska@suse.cz>
11825
11826         * print-rtl.c (print_insn): Move declaration of idbuf
11827         to same scope as name.
11828
11829 2017-10-11  Martin Liska  <mliska@suse.cz>
11830
11831         Revert r253637:
11832
11833         PR sanitizer/82484
11834         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
11835         volatile arguments.
11836
11837 2017-10-11  Martin Liska  <mliska@suse.cz>
11838
11839         PR sanitizer/82484
11840         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
11841         volatile arguments.
11842
11843 2017-10-11  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
11844
11845         * config.gcc (default_gnu_indirect_function): Default to yes for
11846         arm*-*-linux* with glibc.
11847
11848 2017-10-11  Richard Biener  <rguenther@suse.de>
11849
11850         * tree-scalar-evolution.c (get_scalar_evolution): Handle
11851         default-defs and types we do not want to analyze.
11852         (interpret_loop_phi): Replace unreachable code with an assert.
11853         (compute_scalar_evolution_in_loop): Remove and inline ...
11854         (analyze_scalar_evolution_1): ... here, replacing condition with
11855         what makes the intent clearer.  Remove handling of cases
11856         get_scalar_evolution now handles.
11857
11858 2017-10-10  Jim Wilson  <wilson@tuliptree.org>
11859
11860         PR rtl-optimization/81434
11861         * haifa-sched.c (prune_ready_list): Init min_cost_group to 0.  Update
11862         comment for main loop.  In sched_group_found if, also add checks for
11863         pass and min_cost_group.
11864
11865 2017-10-10  Segher Boessenkool  <segher@kernel.crashing.org>
11866
11867         * config/rs6000/rs6000.c (TARGET_INSN_COST): New.
11868         (rs6000_insn_cost): New function.
11869         * config/rs6000/rs6000.md (cost): New attribute.
11870
11871 2017-10-10  Jakub Jelinek  <jakub@redhat.com>
11872             H.J. Lu  <hongjiu.lu@intel.com>
11873
11874         PR target/79565
11875         PR target/82483
11876         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Add
11877         OPTION_MASK_ISA_MMX for __builtin_ia32_maskmovq,
11878         __builtin_ia32_vec_ext_v4hi and __builtin_ia32_vec_set_v4hi.
11879         (ix86_expand_builtin): Treat OPTION_MASK_ISA_MMX similarly
11880         to OPTION_MASK_ISA_AVX512VL - builtins that have both
11881         OPTION_MASK_ISA_MMX and some other bit set require both
11882         mmx and the ISAs without the mmx bit.
11883         * config/i386/i386-builtin.def (__builtin_ia32_cvtps2pi,
11884         __builtin_ia32_cvttps2pi, __builtin_ia32_cvtpi2ps,
11885         __builtin_ia32_pavgb, __builtin_ia32_pavgw, __builtin_ia32_pmulhuw,
11886         __builtin_ia32_pmaxub, __builtin_ia32_pmaxsw, __builtin_ia32_pminub,
11887         __builtin_ia32_pminsw, __builtin_ia32_psadbw, __builtin_ia32_pmovmskb,
11888         __builtin_ia32_pshufw, __builtin_ia32_cvtpd2pi,
11889         __builtin_ia32_cvttpd2pi, __builtin_ia32_cvtpi2pd,
11890         __builtin_ia32_pmuludq, __builtin_ia32_pabsb, __builtin_ia32_pabsw,
11891         __builtin_ia32_pabsd, __builtin_ia32_phaddw, __builtin_ia32_phaddd,
11892         __builtin_ia32_phaddsw, __builtin_ia32_phsubw, __builtin_ia32_phsubd,
11893         __builtin_ia32_phsubsw, __builtin_ia32_pmaddubsw,
11894         __builtin_ia32_pmulhrsw, __builtin_ia32_pshufb, __builtin_ia32_psignb,
11895         __builtin_ia32_psignw, __builtin_ia32_psignd, __builtin_ia32_movntq,
11896         __builtin_ia32_paddq, __builtin_ia32_psubq, __builtin_ia32_palignr):
11897         Add OPTION_MASK_ISA_MMX.
11898
11899 2017-10-10  Andreas Tobler  <andreast@gcc.gnu.org>
11900
11901         * config.gcc (armv7*-*-freebsd*): New target.
11902         (armv6*-*-freebsd*): Remove obsolete TARGET_FREEBSD_ARMv6 define.
11903
11904 2017-10-10  Jan Hubicka  <hubicka@ucw.cz>
11905
11906         * x86-tune.def (X86_TUNE_AVOID_FALSE_DEP_FOR_BMI,
11907         X86_TUNE_ADJUST_UNROLL, X86_TUNE_ONE_IF_CONV_INSN): Move to right
11908         spot in the file.
11909
11910 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
11911
11912         * wide-int.h (wide_int_ref_storage): Make host_dependent_precision
11913         a template parameter.
11914         (WIDE_INT_REF_FOR): Update accordingly.
11915         * tree.h (wi::int_traits <const_tree>): Delete.
11916         (wi::tree_to_widest_ref, wi::tree_to_offset_ref): New typedefs.
11917         (wi::to_widest, wi::to_offset): Use them.  Expand commentary.
11918         (wi::tree_to_wide_ref): New typedef.
11919         (wi::to_wide): New function.
11920         * calls.c (get_size_range): Use wi::to_wide when operating on
11921         trees as wide_ints.
11922         * cgraph.c (cgraph_node::create_thunk): Likewise.
11923         * config/i386/i386.c (ix86_data_alignment): Likewise.
11924         (ix86_local_alignment): Likewise.
11925         * dbxout.c (stabstr_O): Likewise.
11926         * dwarf2out.c (add_scalar_info, gen_enumeration_type_die): Likewise.
11927         * expr.c (const_vector_from_tree): Likewise.
11928         * fold-const-call.c (host_size_t_cst_p, fold_const_call_1): Likewise.
11929         * fold-const.c (may_negate_without_overflow_p, negate_expr_p)
11930         (fold_negate_expr_1, int_const_binop_1, const_binop)
11931         (fold_convert_const_int_from_real, optimize_bit_field_compare)
11932         (all_ones_mask_p, sign_bit_p, unextend, extract_muldiv_1)
11933         (fold_div_compare, fold_single_bit_test, fold_plusminus_mult_expr)
11934         (pointer_may_wrap_p, expr_not_equal_to, fold_binary_loc)
11935         (fold_ternary_loc, multiple_of_p, fold_negate_const, fold_abs_const)
11936         (fold_not_const, round_up_loc): Likewise.
11937         * gimple-fold.c (gimple_fold_indirect_ref): Likewise.
11938         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Likewise.
11939         (alloca_call_type): Likewise.
11940         * gimple.c (preprocess_case_label_vec_for_gimple): Likewise.
11941         * godump.c (go_output_typedef): Likewise.
11942         * graphite-sese-to-poly.c (tree_int_to_gmp): Likewise.
11943         * internal-fn.c (get_min_precision): Likewise.
11944         * ipa-cp.c (ipcp_store_vr_results): Likewise.
11945         * ipa-polymorphic-call.c
11946         (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Likewise.
11947         * ipa-prop.c (ipa_print_node_jump_functions_for_edge): Likewise.
11948         (ipa_modify_call_arguments): Likewise.
11949         * match.pd: Likewise.
11950         * omp-low.c (scan_omp_1_op, lower_omp_ordered_clauses): Likewise.
11951         * print-tree.c (print_node_brief, print_node): Likewise.
11952         * stmt.c (expand_case): Likewise.
11953         * stor-layout.c (layout_type): Likewise.
11954         * tree-affine.c (tree_to_aff_combination): Likewise.
11955         * tree-cfg.c (group_case_labels_stmt): Likewise.
11956         * tree-data-ref.c (dr_analyze_indices): Likewise.
11957         (prune_runtime_alias_test_list): Likewise.
11958         * tree-dump.c (dequeue_and_dump): Likewise.
11959         * tree-inline.c (remap_gimple_op_r, copy_tree_body_r): Likewise.
11960         * tree-predcom.c (is_inv_store_elimination_chain): Likewise.
11961         * tree-pretty-print.c (dump_generic_node): Likewise.
11962         * tree-scalar-evolution.c (iv_can_overflow_p): Likewise.
11963         (simple_iv_with_niters): Likewise.
11964         * tree-ssa-address.c (addr_for_mem_ref): Likewise.
11965         * tree-ssa-ccp.c (ccp_finalize, evaluate_stmt): Likewise.
11966         * tree-ssa-loop-ivopts.c (constant_multiple_of): Likewise.
11967         * tree-ssa-loop-niter.c (split_to_var_and_offset)
11968         (refine_value_range_using_guard, number_of_iterations_ne_max)
11969         (number_of_iterations_lt_to_ne, number_of_iterations_lt)
11970         (get_cst_init_from_scev, record_nonwrapping_iv)
11971         (scev_var_range_cant_overflow): Likewise.
11972         * tree-ssa-phiopt.c (minmax_replacement): Likewise.
11973         * tree-ssa-pre.c (compute_avail): Likewise.
11974         * tree-ssa-sccvn.c (vn_reference_fold_indirect): Likewise.
11975         (vn_reference_maybe_forwprop_address, valueized_wider_op): Likewise.
11976         * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Likewise.
11977         * tree-ssa-uninit.c (is_pred_expr_subset_of): Likewise.
11978         * tree-ssanames.c (set_nonzero_bits, get_nonzero_bits): Likewise.
11979         * tree-switch-conversion.c (collect_switch_conv_info, array_value_type)
11980         (dump_case_nodes, try_switch_expansion): Likewise.
11981         * tree-vect-loop-manip.c (vect_gen_vector_loop_niters): Likewise.
11982         (vect_do_peeling): Likewise.
11983         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
11984         * tree-vect-stmts.c (vectorizable_load): Likewise.
11985         * tree-vrp.c (compare_values_warnv, vrp_int_const_binop): Likewise.
11986         (zero_nonzero_bits_from_vr, ranges_from_anti_range): Likewise.
11987         (extract_range_from_binary_expr_1, adjust_range_with_scev): Likewise.
11988         (overflow_comparison_p_1, register_edge_assert_for_2): Likewise.
11989         (is_masked_range_test, find_switch_asserts, maybe_set_nonzero_bits)
11990         (vrp_evaluate_conditional_warnv_with_ops, intersect_ranges): Likewise.
11991         (range_fits_type_p, two_valued_val_range_p, vrp_finalize): Likewise.
11992         (evrp_dom_walker::before_dom_children): Likewise.
11993         * tree.c (cache_integer_cst, real_value_from_int_cst, integer_zerop)
11994         (integer_all_onesp, integer_pow2p, integer_nonzerop, tree_log2)
11995         (tree_floor_log2, tree_ctz, mem_ref_offset, tree_int_cst_sign_bit)
11996         (tree_int_cst_sgn, get_unwidened, int_fits_type_p): Likewise.
11997         (get_type_static_bounds, num_ending_zeros, drop_tree_overflow)
11998         (get_range_pos_neg): Likewise.
11999         * ubsan.c (ubsan_expand_ptr_ifn): Likewise.
12000         * config/darwin.c (darwin_mergeable_constant_section): Likewise.
12001         * config/aarch64/aarch64.c (aapcs_vfp_sub_candidate): Likewise.
12002         * config/arm/arm.c (aapcs_vfp_sub_candidate): Likewise.
12003         * config/avr/avr.c (avr_fold_builtin): Likewise.
12004         * config/bfin/bfin.c (bfin_local_alignment): Likewise.
12005         * config/msp430/msp430.c (msp430_attr): Likewise.
12006         * config/nds32/nds32.c (nds32_insert_attributes): Likewise.
12007         * config/powerpcspe/powerpcspe-c.c
12008         (altivec_resolve_overloaded_builtin): Likewise.
12009         * config/powerpcspe/powerpcspe.c (rs6000_aggregate_candidate)
12010         (rs6000_expand_ternop_builtin): Likewise.
12011         * config/rs6000/rs6000-c.c
12012         (altivec_resolve_overloaded_builtin): Likewise.
12013         * config/rs6000/rs6000.c (rs6000_aggregate_candidate): Likewise.
12014         (rs6000_expand_ternop_builtin): Likewise.
12015         * config/s390/s390.c (s390_handle_hotpatch_attribute): Likewise.
12016
12017 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
12018
12019         * tree-vect-loop-manip.c (rename_variables_in_bb): Rename PHI nodes
12020         when copying loop nest with only one inner loop.
12021
12022 2017-10-10  Richard Biener  <rguenther@suse.de>
12023
12024         * tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Avoid compacting
12025         blocks if SCEV is active.
12026         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Remove
12027         dead code.
12028         (analyze_scalar_evolution): Handle cached evolutions the obvious way.
12029         (scev_initialize): Assert we are not yet initialized.
12030
12031 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
12032
12033         * tree-loop-distribution.c (generate_loops_for_partition): Remove
12034         inner loop's exit stmt by making it always exit the loop, otherwise
12035         we would generate an infinite empty loop.
12036
12037 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
12038
12039         * tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg): Skip
12040         renaming variables in new preheader if it's deleted.
12041
12042 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
12043
12044         * tree-loop-distribution.c (struct partition): Remove unused field
12045         loops of the structure.
12046         (partition_alloc, partition_free): Ditto.
12047         (build_rdg_partition_for_vertex): Ditto.
12048
12049 2017-10-09  Jeff Law  <law@redhat.com>
12050
12051         * targhooks.c (default_stack_clash_protection_final_dynamic_probe): Fix
12052         return type to match prototype and documentation.
12053
12054 2010-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
12055
12056         * config/rs6000/rs6000.c (processor_costs): Move to ...
12057         * config/rs6000/rs6000.h: ... here.
12058         (rs6000_cost): Declare.
12059
12060 2017-10-09  Eric Botcazou  <ebotcazou@adacore.com>
12061
12062         * except.c (setjmp_fn): New global variable.
12063         (init_eh): Initialize it if DONT_USE_BUILTIN_SETJMP is defined.
12064         (sjlj_emit_function_enter): Call it instead of BUILTIN_SETJMP
12065         if DONT_USE_BUILTIN_SETJMP is defined.
12066
12067 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
12068
12069         * target.def (insn_cost): New hook.
12070         * doc/tm.texi.in (TARGET_INSN_COST): New hook.
12071         * doc/tm.texi: Regenerate.
12072         * rtlanal.c (insn_cost): Use the new hook.
12073
12074 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
12075
12076         * combine.c (combine_validate_cost): Compute the new insn_cost,
12077         not just pattern_cost.
12078         (try_combine): Adjust comment.
12079
12080 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
12081
12082         * cfgrtl.c (rtl_account_profile_record): Replace insn_rtx_cost with
12083         insn_cost.
12084         * combine.c (uid_insn_cost): Adjust comment.
12085         (combine_validate_cost): Adjust comment.  Use pattern_cost instead
12086         of insn_rtx_cost
12087         (combine_instructions): Use insn_cost instead of insn_rtx_cost.
12088         * dse.c (find_shift_sequence): Ditto.
12089         * ifcvt.c (cheap_bb_rtx_cost_p): Ditto.
12090         (bb_valid_for_noce_process_p): Use pattern_cost.
12091         * rtl.h (insn_rtx_cost): Delete.
12092         (pattern_cost): New prototype.
12093         (insn_cost): New prototype.
12094         * rtlanal.c (insn_rtx_cost): Rename to...
12095         (pattern_cost): ... this.
12096         (insn_cost): New.
12097
12098 2017-10-09  Uros Bizjak  <ubizjak@gmail.com>
12099
12100         * config/i386/i386.md (*jcc_2): Remove insn pattern.
12101         (*jcc<mode>_0_r_i387): Ditto.
12102         (*jccxf_r_i387): Ditto.
12103         (*jcc<mode>_r_i387): Ditto.
12104         (*jccu<mode>_r_i387): Ditto.
12105         (*jcc<X87MODEF:mode>_<SWI24:mode>_r_i387): Ditto.
12106         (*jcc): Rename from *jcc_1.
12107
12108 2017-10-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12109
12110         * config/rs6000/rs6000-p8swap.c (rs6000_analyze_swaps): Process
12111         deferred rescans after the lvx/stvx recombination pre-pass.
12112
12113 2017-10-09  Michael Meissner  <meissner@linux.vnet.ibm.com>
12114
12115         * config/rs6000/amo.h: New include file to provide ISA 3.0 atomic
12116         memory operation instruction support.
12117         * config.gcc (powerpc*-*-*): Include amo.h as an extra header.
12118         (rs6000-ibm-aix[789]*): Likewise.
12119         * doc/extend.texi (PowerPC Atomic Memory Operation Functions):
12120         Document new functions.
12121
12122 2017-10-09  Richard Biener  <rguenther@suse.de>
12123
12124         PR tree-optimization/82397
12125         * tree-data-ref.c (data_ref_compare_tree): Make sure to return
12126         equality only for semantically equal trees.
12127
12128 2017-10-09  Richard Biener  <rguenther@suse.de>
12129
12130         PR tree-optimization/82449
12131         * sese.c (scev_analyzable_p): Check whether the SCEV is linear.
12132         * tree-chrec.h (evolution_function_is_constant_p): Adjust to
12133         allow constant addresses.
12134         * tree-chrec.c (scev_is_linear_expression): Constant evolutions
12135         are linear.
12136
12137 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12138
12139         * config/s390/s390-builtins.def (vec_nabs, vec_vfi): Fix builtin
12140         flags.
12141
12142 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12143
12144         PR target/82463
12145         * config/s390/vecintrin.h (vec_madd, vec_msub): Fix macro
12146         definitions.
12147
12148 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12149
12150         PR target/82465
12151         * config/s390/s390-builtins.def (vec_sqrt): Fix builtin flags.
12152
12153 2017-10-09  Jakub Jelinek  <jakub@redhat.com>
12154
12155         PR target/82464
12156         * config/s390/s390-builtins.def (s390_vec_xor_flt_a,
12157         s390_vec_xor_flt_b, s390_vec_xor_flt_c): New.
12158
12159 2017-10-09  Richard Sandiford  <richard.sandiford@linaro.org>
12160
12161         * wide-int.h (WI_BINARY_OPERATOR_RESULT): New macro.
12162         (WI_BINARY_PREDICATE_RESULT): Likewise.
12163         (wi::binary_traits::operator_result): New type.
12164         (wi::binary_traits::predicate_result): Likewise.
12165         (generic_wide_int::operator~, unary generic_wide_int::operator-)
12166         (generic_wide_int::operator==, generic_wide_int::operator!=)
12167         (generic_wide_int::operator&, generic_wide_int::and_not)
12168         (generic_wide_int::operator|, generic_wide_int::or_not)
12169         (generic_wide_int::operator^, generic_wide_int::operator+
12170         (binary generic_wide_int::operator-, generic_wide_int::operator*):
12171         Delete.
12172         (operator~, unary operator-, operator==, operator!=, operator&)
12173         (operator|, operator^, operator+, binary operator-, operator*): New
12174         functions.
12175         * expr.c (get_inner_reference): Use wi::bit_and_not.
12176         * fold-const.c (fold_binary_loc): Likewise.
12177         * ipa-prop.c (ipa_compute_jump_functions_for_edge): Likewise.
12178         * tree-ssa-ccp.c (get_value_from_alignment): Likewise.
12179         (bit_value_binop): Likewise.
12180         * tree-ssa-math-opts.c (find_bswap_or_nop_load): Likewise.
12181         * tree-vrp.c (zero_nonzero_bits_from_vr): Likewise.
12182         (extract_range_from_binary_expr_1): Likewise.
12183         (masked_increment): Likewise.
12184         (simplify_bit_ops_using_ranges): Likewise.
12185
12186 2017-10-09  Martin Jambor  <mjambor@suse.cz>
12187
12188         PR hsa/82416
12189         * hsa-common.h (hsa_op_with_type): New method extend_int_to_32bit.
12190         * hsa-gen.c (hsa_extend_inttype_to_32bit): New function.
12191         (hsa_type_for_scalar_tree_type): Use it.  Always force min32int for
12192         COMPLEX types.
12193         (hsa_fixup_mov_insn_type): New function.
12194         (hsa_op_with_type::get_in_type): Use it.
12195         (hsa_build_append_simple_mov): Likewise.  Allow sub-32bit
12196         immediates in an assert.
12197         (hsa_op_with_type::extend_int_to_32bit): New method.
12198         (gen_hsa_insns_for_bitfield): Fixup instruction and intermediary
12199         types.  Convert to dest type if necessary.
12200         (gen_hsa_insns_for_bitfield_load): Fixup load type if necessary.
12201         (reg_for_gimple_ssa): Pass false as min32int to
12202         hsa_type_for_scalar_tree_type.
12203         (gen_hsa_addr): Fixup type when creating addresable temporary.
12204         (gen_hsa_cmp_insn_from_gimple): Extend operands if necessary.
12205         (gen_hsa_unary_operation): Extend operands and convert to dest type if
12206         necessary.  Call hsa_fixup_mov_insn_type.
12207         (gen_hsa_binary_operation): Changed operand types to hsa_op_with_type,
12208         extend operands and convert to dest type if necessary.
12209         (gen_hsa_insns_for_operation_assignment): Extend operands and convert
12210         to dest type if necessary.
12211         (set_output_in_type): Call hsa_fixup_mov_insn_type.  Just ude dest
12212         if conversion nt necessary and size matches.
12213         (gen_hsa_insns_for_load): Call hsa_fixup_mov_insn_type, convert
12214         to dest type if necessary.
12215         (gen_hsa_insns_for_store): Call hsa_fixup_mov_insn_type.
12216         (gen_hsa_insns_for_switch_stmt): Likewise. Also extend operands if
12217         necessary.
12218         (gen_hsa_clrsb): Likewise.
12219         (gen_hsa_ffs): Likewise.
12220         (gen_hsa_divmod): Extend operands and convert to dest type if
12221         necessary.
12222         (gen_hsa_atomic_for_builtin): Change type of op to hsa_op_with_type.
12223
12224 2017-10-08  Segher Boessenkool  <segher@kernel.crashing.org>
12225
12226         * config/rs6000/rs6000.md (conditional branch): Clean up formatting.
12227         Remove empty default arguments.  Use a brace block as output
12228         statement.
12229         (conditional return): Ditto.
12230         (jump): Ditto.
12231         (indirect_jump): Ditto.  Use b%T0 instead of bctr/blr.
12232         (tablejump, tablejumpsi, tablejumpdi, *tablejump<mode>_internal1):
12233         Ditto.
12234         (group_ending_nop): Ditto.
12235         (doloop_end): Ditto.
12236         (ctr<mode>, ctr<mode>_internal1, ctr<mode>_internal2): Ditto.
12237         (splitters for those): Ditto.
12238
12239 2017-10-08  Segher Boessenkool  <segher@kernel.crashing.org>
12240
12241         * config/rs6000/rs6000-string.c (expand_strncmp_align_check): Invert
12242         a conditional jump (and the compare for it) so that pc_rtx is the
12243         last operand.
12244         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Adjust
12245         for the deleted and renamed ctr<mode>_internal[234] patterns.
12246         * config/rs6000/rs6000.md: Delete second conditional branch pattern.
12247         Delete second conditional return pattern.
12248         (ctr<mode>_internal2): Delete this second bdnz pattern.
12249         (ctr<mode>_internal3): Rename to ctr<mode>_internal2.
12250         (ctr<mode>_internal4): Delete this second bdz pattern.
12251
12252 2017-10-08  Eric Botcazou  <ebotcazou@adacore.com>
12253
12254         * tree-outof-ssa.h (ssaexpand): Add partitions_for_undefined_values.
12255         (always_initialized_rtx_for_ssa_name_p): New predicate.
12256         * tree-outof-ssa.c (remove_ssa_form): Initialize new field of SA.
12257         (finish_out_of_ssa): Free new field of SA.
12258         * tree-ssa-coalesce.h (get_undefined_value_partitions): Declare.
12259         * tree-ssa-coalesce.c: Include tree-ssa.h.
12260         (get_parm_default_def_partitions): Remove extern keyword.
12261         (get_undefined_value_partitions): New function.
12262         * expr.c (expand_expr_real_1) <expand_decl_rtl>: For a SSA_NAME, do
12263         not set SUBREG_PROMOTED_VAR_P on the sub-register if it may contain
12264         uninitialized bits.
12265         * loop-iv.c (iv_get_reaching_def): Disqualify all subregs.
12266
12267 2017-10-08  Eric Botcazou  <ebotcazou@adacore.com>
12268
12269         * builtins.def (BUILT_IN_SETJMP): Revert latest change.
12270
12271 2017-10-08  Jan Hubicka  <hubicka@ucw.cz>
12272
12273         * config/i386/i386.c (ix86_expand_set_or_movmem): Disable 512bit loops
12274         for targets that preffer 128bit.
12275
12276 2017-10-08  Jan Hubicka  <hubicka@ucw.cz>
12277
12278         * config/i386/i386.c (has_dispatch): Disable for Ryzen.
12279
12280 2017-10-08  Olivier Hainque  <hainque@adacore.com>
12281
12282         * config/arm/arm.c (arm_set_return_address): Use MEM_VOLATILE_P
12283         on the target mem instead of RTX_FRAME_RELATED_P on the insn to
12284         prevent DSE.
12285         (thumb_set_return_address): Likewise.
12286
12287 2017-10-08  Olivier Hainque  <hainque@adacore.com>
12288
12289         * common/config/arm/arm-common.c (arm_except_unwind_info):
12290         Handle DWARF2_UNWIND_INFO.
12291
12292 2017-10-07  Michael Collison <michael.collison@arm.com>
12293
12294         * config/aarch64/aarch64.md (*aarch64_reg_<optab>_minus<mode>3):
12295         New pattern.
12296
12297 2017-10-07  Eric Botcazou  <ebotcazou@adacore.com>
12298
12299         * builtins.def (BUILT_IN_SETJMP): Declare as library builtin instead
12300         of GCC builtin if DONT_USE_BUILTIN_SETJMP is defined.
12301         * except.c (sjlj_emit_function_enter): If DONT_USE_BUILTIN_SETJMP is
12302         defined, force the creation of a new block for a dispatch label.
12303
12304 2017-10-07  Jan Hubicka  <hubicka@ucw.cz>
12305
12306         * invoke.texi (Wsuggest-attribute=cold): Document.
12307         * common.opt (Wsuggest-attribute=cold): New
12308         * ipa-pure-const.c (warn_function_cold): New function.
12309         * predict.c (compute_function_frequency): Use it.
12310         * predict.h (warn_function_cold): Declare.
12311
12312 2017-10-06  Jan Hubicka  <hubicka@ucw.cz>
12313
12314         * tree-switch-conversion.c (do_jump_if_equal, emit_cmp_and_jump_insns):
12315         Update profile.
12316
12317 2017-10-06  Martin Liska  <mliska@suse.cz>
12318
12319         * sanopt.c (struct sanopt_tree_triplet_hash): Remove inline
12320         keyword for member functions.
12321         (struct sanopt_tree_couple): New struct.
12322         (struct sanopt_tree_couple_hash): New function.
12323         (struct sanopt_ctx): Add new hash_map.
12324         (has_dominating_ubsan_ptr_check): New function.
12325         (record_ubsan_ptr_check_stmt): Likewise.
12326         (maybe_optimize_ubsan_ptr_ifn): Likewise.
12327         (sanopt_optimize_walker): Handle IFN_UBSAN_PTR.
12328         (pass_sanopt::execute): Handle also SANITIZE_POINTER_OVERFLOW.
12329
12330 2017-10-06  Sudakshina Das  <sudi.das@arm.com>
12331
12332         PR target/82440
12333         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Only call
12334         aarch64_simd_valid_immediate on CONST_VECTORs.
12335         (aarch64_reg_or_bic_imm): Likewise.
12336
12337 2017-10-06  Wilco Dijkstra  <wdijkstr@arm.com>
12338
12339         PR rtl-optimization/82396
12340         * haifa-sched.c (ready_sort_real): Disable qsort checking.
12341
12342 2017-10-06  Sebastian Pop  <sebpop@gmail.com>
12343
12344         * graphite-dependences.c (scop_get_reads): Move code to...
12345         (scop_get_must_writes): Move code to...
12346         (scop_get_may_writes): Move code to...
12347         (scop_get_reads_and_writes): ... here.
12348         (scop_get_dependences): Call scop_get_reads_and_writes.
12349
12350 2017-10-06  Jakub Jelinek  <jakub@redhat.com>
12351
12352         PR tree-optimization/82434
12353         * fold-const.h (can_native_encode_type_p,
12354         can_native_encode_string_p): Remove.
12355         * fold-const.c (native_encode_int): Formatting fixes.  If ptr is NULL,
12356         don't encode anything, just return what would be otherwise returned.
12357         (native_encode_fixed, native_encode_complex, native_encode_vector):
12358         Likewise.
12359         (native_encode_string): Likewise.  Inline by hand
12360         can_native_encode_string_p.
12361         (can_native_encode_type_p): Remove.
12362         (can_native_encode_string_p): Remove.
12363         * tree-vect-stmts.c (vectorizable_store): Instead of testing just
12364         STRING_CSTs using can_native_encode_string_p, test all
12365         CONSTANT_CLASS_P values using native_encode_expr with NULL ptr.
12366         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Remove last
12367         argument from native_encode_expr.
12368         (rhs_valid_for_store_merging_p): Use native_encode_expr with NULL ptr.
12369         (pass_store_merging::execute): Don't unnecessarily look for 3 stmts,
12370         but just 2.
12371
12372 2017-10-06  Richard Biener  <rguenther@suse.de>
12373
12374         PR tree-optimization/82397
12375         * tree-vect-data-refs.c (dr_group_sort_cmp): Do not use
12376         operand_equal_p but rely on data_ref_compare_tree for detecting
12377         equalities.
12378         (vect_analyze_data_ref_accesses): Use data_ref_compare_tree
12379         to match up with dr_group_sort_cmp.
12380
12381 2017-10-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12382
12383         PR target/82322
12384         * config/s390/s390-builtins.def (s390_vfi): Define new overloaded
12385         builtin.
12386         * config/s390/s390-builtin-types.def: Regenerate.
12387
12388 2017-10-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12389
12390         PR target/82317
12391         * config/s390/s390-builtin-types.def: Regenerate.
12392         * config/s390/s390-builtins.def (s390_vfmaxdb_4, s390_vfmindb_4):
12393         Change flag from B_VXE to B_VX.
12394         (s390_vec_min_dbl): Remove B_VXE flag.
12395
12396 2017-10-06  Richard Biener  <rguenther@suse.de>
12397
12398         * graphite-isl-ast-to-gimple.c: Include ssa.h and tree-ssa.h.
12399         (translate_isl_ast_to_gimple::translate_pending_phi_nodes,
12400         translate_isl_ast_to_gimple::is_valid_rename,
12401         translate_isl_ast_to_gimple::get_rename,
12402         translate_isl_ast_to_gimple::get_def_bb_for_const,
12403         translate_isl_ast_to_gimple::get_new_name,
12404         translate_isl_ast_to_gimple::collect_all_ssa_names,
12405         translate_isl_ast_to_gimple::copy_loop_phi_args,
12406         translate_isl_ast_to_gimple::collect_all_ssa_names,
12407         translate_isl_ast_to_gimple::copy_loop_phi_args,
12408         translate_isl_ast_to_gimple::copy_loop_phi_nodes,
12409         translate_isl_ast_to_gimple::add_close_phis_to_merge_points,
12410         translate_isl_ast_to_gimple::add_close_phis_to_outer_loops,
12411         translate_isl_ast_to_gimple::copy_loop_close_phi_args,
12412         translate_isl_ast_to_gimple::copy_loop_close_phi_nodes,
12413         translate_isl_ast_to_gimple::copy_cond_phi_args,
12414         translate_isl_ast_to_gimple::copy_cond_phi_nodes,
12415         translate_isl_ast_to_gimple::edge_for_new_close_phis,
12416         translate_isl_ast_to_gimple::add_phi_arg_for_new_expr,
12417         translate_isl_ast_to_gimple::rename_uses,
12418         translate_isl_ast_to_gimple::rename_all_uses): Remove.
12419         (translate_isl_ast_to_gimple::get_rename_from_scev): Simplify.
12420         (set_rename_for_each_def): Likewise.
12421         (graphite_copy_stmts_from_block): Handle debug stmt resetting
12422         here.  Handle rewriting SCEV analyzable uses here.
12423         (copy_bb_and_scalar_dependences): Generate code for PHI
12424         copy-in/outs.
12425         (graphite_regenerate_ast_isl): Adjust.
12426         * graphite-scop-detection.c (trivially_empty_bb_p): Move to sese.[ch].
12427         (add_write, add_read): New functions.
12428         (build_cross_bb_scalars_def): Use it and simplify.
12429         (build_cross_bb_scalars_use): Likewise.
12430         (graphite_find_cross_bb_scalar_vars): Inline into...
12431         (try_generate_gimple_bb): ...here.  Add dependences for PHIs,
12432         simulating out-of-SSA.  Compute liveout and add dependencies.
12433         (build_scops): Force an empty entry block.
12434         * sese.h (sese_info_t::liveout, sese_info_t::debug_liveout): New
12435         members.
12436         (sese_build_liveouts): Declare.
12437         (sese_trivially_empty_bb_p): Likewise.
12438         * sese.c (sese_build_liveouts_bb): Properly handle PHIs,
12439         compute liveout and debug_liveout.
12440         (sese_bad_liveouts_use): Remove.
12441         (sese_reset_debug_liveouts_bb): Likewise.
12442         (sese_reset_debug_liveouts): Rewrite in terms of debug_liveout.
12443         (sese_build_liveouts): Build liveout and debug_liveout and store
12444         it in region.
12445         (new_sese_info): Adjust.
12446         (free_sese_info): Likewise.
12447         (sese_insert_phis_for_liveouts): Reset debug stmts from here,
12448         do not build liveout here.
12449         (move_sese_in_condition): Adjust region entry.
12450         (scev_analyzable_p): Match up with chrec_apply requirements.
12451         (sese_trivially_empty_bb_p): New.
12452         * tree-into-ssa.c (get_reaching_def): Properly support generating
12453         default-defs for incremental rewrite of anonymous names.
12454
12455 2017-10-06  Richard Biener  <rguenther@suse.de>
12456
12457         * graphite-sese-to-poly.c (extract_affine): For casts increasing
12458         precision do not perform modulo reduction.
12459
12460 2017-10-06  Richard Biener  <rguenther@suse.de>
12461
12462         PR tree-optimization/82436
12463         * tree-vect-slp.c (vect_supported_load_permutation_p): More
12464         conservatively choose the vectorization factor when checking
12465         whether we can perform the required load permutation.
12466         (vect_transform_slp_perm_load): Assert when we may not fail.
12467
12468 2017-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
12469
12470         * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Correct error
12471         message for incompatible -msdata=* and -mcall-* options.
12472
12473 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
12474
12475         * config/i386/i386.c (ia32_multipass_dfa_lookahead): Default to issue
12476         rate for post-reload scheduling.
12477
12478 2017-10-05  Tamar Christina  <tamar.christina@arm.com>
12479
12480         * doc/sourcebuild.texi (vect_sizes_16B_8B, vect_sizes_32B_16B): New.
12481
12482 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
12483
12484         * config/i386/i386.c (znver1_cost): Set branch_cost to 3 (instead of 2)
12485         to improve monte carlo in scimark.
12486
12487 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
12488
12489         * config/i386/i386.c (ix86_size_cost, i386_cost, i486_cost,
12490         pentium_cost, lakemont_cost, pentiumpro_cost, geode_cost, k6_cost,
12491         athlon_cost, k8_cost, amdfam10_cost, btver1_cost, btver2_cost,
12492         pentium4_cost, nocona_cost): Set reassociation width to 1.
12493         (bdver1_cost, bdver2_cost, bdver3_cost, bdver4_cost): Set reassociation
12494         width to 2 for fp operations and 1 otherwise.
12495         (znver1_cost): Set scalar reassoc width to 4 and vector to 3 and 6
12496         for int and fp.
12497         (atom_cost): Set reassociation width to 2.
12498         (slm_cost, generic_cost): Set fp reassociation width
12499         to 2 and 1 otherwise.
12500         (intel_cost): Set fp reassociation width to 4 and 1 otherwise.
12501         (core_cost): Set fp reassociation width to 4 and vector to 2.
12502         (ix86_reassociation_width): Rewrite using cost table; special case
12503         plus/minus on Zen; honor X86_TUNE_SSE_SPLIT_REGS
12504         and TARGET_AVX128_OPTIMAL.
12505         * config/i386/i386.h (processor_costs): Add
12506         reassoc_int, reassoc_fp, reassoc_vec_int, reassoc_vec_fp.
12507         (TARGET_VECTOR_PARALLEL_EXECUTION, TARGET_REASSOC_INT_TO_PARALLEL,
12508         TARGET_REASSOC_FP_TO_PARALLEL): Remove.
12509         * x86-tune.def (X86_TUNE_REASSOC_INT_TO_PARALLEL): Remove.
12510         (X86_TUNE_REASSOC_FP_TO_PARALLEL): Remove.
12511         (X86_TUNE_VECTOR_PARALLEL_EXECUTION):  Remove.
12512
12513 2017-10-05  Nathan Sidwell  <nathan@acm.org>
12514
12515         * doc/invoke.texi (Wparentheses): Document C++ MVP behaviour.
12516
12517 2017-10-05  Tamar Christina  <tamar.christina@arm.com>
12518
12519         * config/arm/arm.c (arm_test_fpu_data): New.
12520         (arm_run_selftests): Call arm_test_fpu_data.
12521
12522 2017-10-04  Nathan Sidwell  <nathan@acm.org>
12523
12524         * toplev.c (toplev::main): Remove excess parens on pretty_printer
12525         decl.
12526         * caller-save.c (insert_save): Remove excess parens on TO_SAVE parm.
12527
12528 2017-10-04  Sudakshina Das  <sudi.das@arm.com>
12529
12530         * config/aarch64/aarch64-protos.h (enum simd_immediate_check): New
12531         check type for aarch64_simd_valid_immediate.
12532         (aarch64_output_simd_mov_immediate): Update prototype.
12533         (aarch64_simd_valid_immediate): Update prototype.
12534         * config/aarch64/aarch64-simd.md (orr<mode>3): modified pattern to add
12535         support for ORR-immediate.
12536         (and<mode>3): modified pattern to add support for BIC-immediate.
12537         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Function
12538         now checks for valid immediate for BIC and ORR based on new enum
12539         argument.
12540         (aarch64_output_simd_mov_immediate): Function now used to output
12541         BIC/ORR imm as well based on new enum argument.
12542         * config/aarch64/constraints.md (Do): New vector immediate constraint.
12543         (Db) : Likewise.
12544         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): New predicate.
12545         (aarch64_reg_or_bic_imm): Likewise.
12546
12547 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12548
12549         * config/s390/vx-builtins.md ("vec_mergeh<mode>")
12550         ("vec_mergel<mode>"): Change mode iterator to V_128_NOSINGLE.
12551
12552 2017-10-04  Wilco Dijkstra  <wdijkstr@arm.com>
12553
12554         Revert r253399:
12555
12556         PR rtl-optimization/82396
12557         * haifa-sched.c (autopref_multipass_init): Simplify
12558         initialization.
12559         (autopref_rank_data): Simplify sort order.
12560         * sched-int.h (autopref_multipass_data_): Remove
12561         multi_mem_insn_p, min_offset and max_offset.
12562
12563 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12564
12565         * doc/sourcebuild.texi: Document vect_peeling_profitable.
12566
12567 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12568
12569         * doc/sourcebuild.texi: Document vect_intdouble_cvt and
12570         vect_doubleint_cvt.
12571
12572 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12573
12574         * doc/sourcebuild.texi: Document vect_long_mult.
12575
12576 2017-10-04  Richard Sandiford  <richard.sandiford@linaro.org>
12577
12578         PR tree-optimization/82413
12579         * fold-const.c (build_range_check): Use widest_int when comparing
12580         the maximum ETYPE value with HIGH.
12581
12582 2017-10-04  Wilco Dijkstra  <wdijkstr@arm.com>
12583
12584         PR rtl-optimization/82396
12585         * haifa-sched.c (autopref_multipass_init): Simplify
12586         initialization.
12587         (autopref_rank_data): Simplify sort order.
12588         * sched-int.h (autopref_multipass_data_): Remove
12589         multi_mem_insn_p, min_offset and max_offset.
12590
12591 2017-10-04  Jakub Jelinek  <jakub@redhat.com>
12592
12593         PR tree-optimization/82381
12594         * tree-ssa-reassoc.c (sort_by_operand_rank): Check for different
12595         oeN->rank first.  Return 1 or -1 if one op is SSA_NAME and the other
12596         is not.
12597
12598         PR tree-optimization/82374
12599         * omp-low.c (create_omp_child_function): Copy DECL_ATTRIBUTES,
12600         DECL_FUNCTION_SPECIFIC_OPTIMIZATION,
12601         DECL_FUNCTION_SPECIFIC_TARGET and DECL_FUNCTION_VERSIONED from
12602         current_function_decl to the new decl.
12603
12604 2017-10-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
12605
12606         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_2_HW): Define new
12607         helper macro for IEEE float128 hardware built-in functions.
12608         (SQRTF128_ODD): Add built-in functions with the round-to-odd
12609         semantics.
12610         (TRUNCF128_ODD): Likewise.
12611         (ADDF128_ODD): Likewise.
12612         (SUBF128_ODD): Likewise.
12613         (MULF128_ODD): Likewise.
12614         (DIVF128_ODD): Likewise.
12615         (FMAF128_ODD): Likewise.
12616         * config/rs6000/rs6000.md (UNSPEC_ROUND_TO_ODD): Rename to
12617         UNSPEC_TRUNC_ROUND_TO_ODD.
12618         (UNSPEC_TRUNC_ROUND_TO_ODD): Likewise.
12619         (UNSPEC_ADD_ROUND_TO_ODD): New unspec codes for the IEEE 128-bit
12620         floating point round to odd instructions.
12621         (UNSPEC_SUB_ROUND_TO_ODD): Likewise.
12622         (UNSPEC_MUL_ROUND_TO_ODD): Likewise.
12623         (UNSPEC_DIV_ROUND_TO_ODD): Likewise.
12624         (UNSPEC_FMA_ROUND_TO_ODD): Likewise.
12625         (UNSPEC_SQRT_ROUND_TO_ODD): Likewise.
12626         (trunc<mode>sf2_hw): Change the truncate with round to odd
12627         expansion to use UNSPEC_TRUNC_ROUND_TO_ODD.
12628         (add<mode>3_odd): Add insns for IEEE 128-bit floating point round
12629         to odd hardware instructions.
12630         (sub<mode>3_odd): Likewise.
12631         (mul<mode>3_odd): Likewise.
12632         (div<mode>3_odd): Likewise.
12633         (sqrt<mode>2_odd): Likewise.
12634         (fma<mode>4_odd): Likewise.
12635         (fms<mode>4_odd): Likewise.
12636         (nfma<mode>4_odd): Likewise.
12637         (nfms<mode>4_odd): Likewise.
12638         (trunc<mode>df2_odd): Change the truncate with round to odd
12639         expansion to use UNSPEC_TRUNC_ROUND_TO_ODD.  Add a generator
12640         function.
12641         * doc/extend.texi (PowerPC built-in functions): Update documentation
12642         for existing IEEE float128-bit built-in functions.  Add built-in
12643         functions that generate the IEEE 128-bit floating point round to
12644         odd instructions.
12645
12646 2017-10-03  Segher Boessenkool  <segher@kernel.crashing.org>
12647
12648         PR rtl-optimization/77729
12649         * simplify-rtx.c (simplify_binary_operation_1): Delete the (X&C1)|C2
12650         to (X&(C1&~C2))|C2 transformations.
12651
12652 2017-10-03  Martin Jambor  <mjambor@suse.cz>
12653
12654         PR tree-optimization/82363
12655         * tree-sra.c (propagate_subaccesses_across_link): In unrecoverable
12656         mismatch, mark lacc written regardless of racc.
12657
12658 2017-10-03  Jakub Jelinek  <jakub@redhat.com>
12659
12660         PR tree-optimization/82381
12661         * tree-ssa-reassoc.c (sort_by_operand_rank): Don't check
12662         stmt_to_insert nor wheather SSA_NAMEs are default defs.
12663         Return 1 or -1 if one of bba and bbb is NULL. If bb_rank is equal,
12664         fallthrough into reassoc_stmt_dominates_stmt_p.
12665
12666         PR target/82386
12667         * combine.c (combine_instructions): Don't combine in unreachable
12668         basic blocks.
12669
12670 2017-10-02  Peter Bergner  <bergner@vnet.ibm.com>
12671
12672         PR target/80210
12673         * config/rs6000/rs6000.c (rs6000_option_override_internal): Rewrite
12674         function to not use the have_cpu variable.  Do not set cpu_index,
12675         rs6000_cpu_index or rs6000_tune_index if we end up using TARGET_DEFAULT
12676         or the default cpu.
12677         (rs6000_valid_attribute_p): Remove duplicate initializations of
12678         old_optimize and func_optimize.
12679         (rs6000_pragma_target_parse): Call rs6000_activate_target_options ().
12680         (rs6000_activate_target_options): Make global.
12681         * config/rs6000/rs6000-protos.h (rs6000_activate_target_options): Add
12682         prototype.
12683
12684 2017-10-02  Jakub Jelinek  <jakub@redhat.com>
12685
12686         * tree-dfa.c (get_ref_base_and_extent): Set *pmax_size to -1
12687         if *poffset + *pmax_size overflows in HOST_WIDE_INT.
12688         Set *poffset to 0 and *psize and *pmax_size to -1 if
12689         *poffset + *psize overflows in HOST_WIDE_INT.
12690
12691         PR tree-optimization/82387
12692         PR tree-optimization/82388
12693         PR tree-optimization/82389
12694         * tree-ssa-dse.c (dse_classify_store): Test byte_tracking_enabled
12695         instead of live_bytes non-NULL.
12696
12697 2017-10-02  Georg-Johann Lay  <avr@gjlay.de>
12698
12699         PR target/41076
12700         * confg/avr/avr.md (*iorhi3.ashift8-ext.zerox): Add "r,r,0"
12701         alternative.
12702
12703 2017-10-02  Richard Biener  <rguenther@suse.de>
12704
12705         * graphite-isl-ast-to-gimple.c (set_codegen_error): With
12706         -fchecking and --param graphite-allow-codegen-errors=0 ICE.
12707         * params.def (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): New param.
12708
12709 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
12710
12711         * tree.h (wi::int_traits <const_tree>::decompose): Assert that the
12712         requested precision matches the type's.
12713         * calls.c (alloc_max_size): Calculate the new candidate size as
12714         a widest_int and use wi::to_widest when comparing it with the
12715         current candidate size.
12716         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Compare with
12717         zero rather than integer_zero_node.
12718         * match.pd: Check for a no-op conversion before using wi::add
12719         rather than after.  Use tree_to_uhwi when summing small shift
12720         counts into an unsigned int.
12721
12722 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
12723             Alan Hayward  <alan.hayward@arm.com>
12724             David Sherwood  <david.sherwood@arm.com>
12725
12726         PR target/71307
12727         * config/aarch64/aarch64.h (POINTER_AND_FP_REGS): New reg class.
12728         (REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update accordingly.
12729         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
12730         POINTER_AND_FP_REGS.
12731
12732 2017-10-02  Richard Biener  <rguenther@suse.de>
12733
12734         PR tree-optimization/82355
12735         * graphite-isl-ast-to-gimple.c (build_iv_mapping): Also build
12736         a mapping for the enclosing loop but avoid generating one for
12737         the loop tree root.
12738         (copy_bb_and_scalar_dependences): Remove premature codegen
12739         error on PHIs in blocks duplicated into multiple places.
12740         * graphite-scop-detection.c
12741         (scop_detection::stmt_has_simple_data_refs_p): For a loop not
12742         in the region use it as loop and nest to analyze the DR in.
12743         (try_generate_gimple_bb): Likewise.
12744         * graphite-sese-to-poly.c (extract_affine_chrec): Adjust.
12745         (add_loop_constraints): For blocks in a loop not in the region
12746         create a dimension with a single iteration.
12747         * sese.h (gbb_loop_at_index): Remove assert.
12748
12749 2017-10-01  Kevin Buettner  <kevinb@redhat.com>
12750
12751         * omp-expand.c (adjust_context_scope): New function.
12752         (expand_parallel_call): Call adjust_context_scope.
12753
12754 2017-10-01  Jeff Law  <law@redhat.com>
12755
12756         * tree-ssa-dom.c (optimize_stmt): Make this a method within the
12757         dom_opt_dom_walker class with direct access to private members.
12758         Add comments.  Call test_for_singularity.
12759         (dom_opt_dom_walker::before_dom_children): Corresponding changes.
12760         (dom_opt_dom_walker::after_dom_children): Do not lazily initialize
12761         m_dummy_cond anymore.
12762         (class dom_opt_dom_walker): Initialize m_dummy_cond member in the
12763         class ctor.
12764         (pass_dominator:execute): Build the dummy_cond here and pass it
12765         to the dom_opt_dom_walker ctor.
12766         (test_for_singularity): New function.
12767
12768 2017-09-30  Krister Walfridsson  <krister.walfridsson@gmail.com>
12769             Maya Rashish  <coypu@sdf.org>
12770
12771         * config.gcc (*-*-netbsd*): New variable nbsd_tm_file containing
12772         netbsd.h, netbsd-stdint.h, and netbsd-elf.h.
12773         (alpha*-*-netbsd*) Use nbsd_tm_file.
12774         (arm*-*-netbsdelf*) Likewise.
12775         (i[34567]86-*-netbsdelf*) Likewise.
12776         (x86_64-*-netbsd*) Likewise.
12777         (mips*-*-netbsd*) Likewise.
12778         (powerpc-*-netbsd*) Likewise.
12779         (sh*-*-netbsd*) Likewise.
12780         (sparc-*-netbsdelf*) Likewise.
12781         (sparc64-*-netbsd*) Likewise.
12782         (m68k*-*-netbsdelf*) Use nbsd_tm_file and add CHAR_FAST8/SHORT_FAST16
12783         to tm_defines.
12784         (vax-*-netbsdelf*) Likewise.
12785         * config/netbsd-stdint.h (INT_FAST8_TYPE): Check CHAR_FAST8.
12786         (UINT_FAST8_TYPE) Likewise.
12787         (INT_FAST16_TYPE) Check CHAR_FAST16.
12788         (UINT_FAST16_TYPE) Likewise.
12789
12790 2017-09-30  Jakub Jelinek  <jakub@redhat.com>
12791
12792         PR target/82361
12793         * config/i386/i386.md
12794         (TARGET_USE_8BIT_IDIV zext divmodsi4 splitter): New define_split.
12795         (divmodsi4_zext_1, divmodsi4_zext_2, *divmodsi4_zext_1,
12796         *divmodsi4_zext_2): New define_insn_and_split.
12797         (*divmodsi4_noext_zext_1, *divmodsi4_noext_zext_2): New define_insn.
12798         (TARGET_USE_8BIT_IDIV zext udivmodsi4 splitter): New define_split.
12799         (udivmodsi4_zext_1, udivmodsi4_zext_2, *udivmodsi4_zext_1,
12800         *udivmodsi4_zext_2, *udivmodsi4_pow2_zext_1, *udivmodsi4_pow2_zext_2):
12801         New define_insn_and_split.
12802         (*udivmodsi4_noext_zext_1, *udivmodsi4_noext_zext_2): New define_insn.
12803         * config/i386/i386.c (ix86_split_idivmod): Handle operands[0] or
12804         operands[1] having DImode when mode is SImode.
12805
12806         * config/i386/i386.c (ix86_split_idivmod): Use mode instead of
12807         always SImode for DIV and MOD in REG_EQUAL notes.
12808
12809 2017-09-29  Yury Gribov  <tetra2005@gmail.com>
12810
12811         PR middle-end/82319
12812         * match.pd: Fix handling of NaNs in pattern.
12813
12814 2017-09-29  Jeff Law  <law@redhat.com>
12815
12816         * sbitmap.c (bitmap_bit_in_range_p): New function.
12817         * sbitmap.h (bitmap_bit_in_range_p): Prototype.
12818         * tree-ssa-dse.c (live_bytes_read): New function.
12819         (dse_classify_store): Ignore reads of dead bytes.
12820
12821         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Fix
12822         typos and whitespace errors.
12823         * config/i386/predicates.md (address_no_seg_operand): Likewise.
12824         * config/s390/s390.c (s390_emit_prologue): Likewise.
12825
12826 2017-09-29  Vladimir Makarov  <vmakarov@redhat.com>
12827
12828         PR target/81481
12829         * ira-costs.c (scan_one_insn): Don't take into account PIC equiv
12830         with a symbol for LRA.
12831
12832 2017-09-29  Vladimir Makarov  <vmakarov@redhat.com>
12833
12834         PR rtl-optimization/82338
12835         * lra-constraints.c (inherit_in_ebb): Check usage_insns check.
12836
12837 2017-09-29  Alexander Monakov  <amonakov@ispras.ru>
12838
12839         * genmodes.c (calc_wider_mode): Suppress qsort macro.
12840         * system.h [CHECKING_P] (qsort): Redirect to qsort_chk.
12841         (qsort_chk): Declare.
12842         * vec.c [CHECKING_P] (qsort_chk_error): New static function.
12843         (qsort_chk): New function.
12844
12845 2017-09-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12846
12847         PR tree-optimization/82337
12848         * gimple-ssa-strength-reduction.c (find_phi_def): Don't record a
12849         phi definition if the PHI result appears in an abnormal PHI.
12850         (find_basis_for_base_expr): Don't record a basis if the LHS of the
12851         basis appears in an abnormal PHI.
12852
12853 2017-09-29  Richard Biener  <rguenther@suse.de>
12854
12855         * graphite-isl-ast-to-gimple.c
12856         (translate_isl_ast_to_gimple::set_codegen_error): New function.
12857         (binary_op_to_tree): Use it.
12858         (get_rename_from_scev): Likewise.
12859         (copy_loop_phi_nodes): Likewise.
12860         (copy_bb_and_scalar_dependences): Likewise.
12861         (translate_pending_phi_nodes): Likewise.
12862
12863 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
12864
12865         PR target/82339
12866         * config/i386/i386.md (*movdi_internal peephole2): New -Os peephole
12867         for movabsq $(i32 << shift), r64.
12868
12869 2017-09-28  Uros Bizjak  <ubizjak@gmail.com>
12870
12871         * config/i386/i386.c (ix86_print_operand_address_as): Do not check
12872         index when encoding %esp as %rsp to avoid 0x67 prefix.
12873
12874 2017-09-28  Sergey Shalnov  <Sergey.Shalnov@intel.com>
12875
12876         * config/i386/i386.md (*movsf_internal, *movdf_internal):
12877         Return 256-bit AVX modes for TARGET_PREFER_AVX256.
12878
12879 2017-09-28  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12880
12881         * config/arm/arm.c (arm_option_override): Forbid ARMv8-M Security
12882         Extensions with more than 16 double VFP registers.
12883         (cmse_nonsecure_entry_clear_before_return): Remove second entry of
12884         to_clear_mask and all code related to it.  Replace the remaining
12885         entry by a sbitmap and adapt code accordingly.
12886
12887 2017-09-28  Henry Linjamäki  <henry.linjamaki@parmance.com>
12888
12889         * brig-builtins.def: Change pure attributes to const.
12890
12891 2017-09-28  Joseph Myers  <joseph@codesourcery.com>
12892
12893         * config.gcc (default_gnu_indirect_function): Default to yes for
12894         sparc*-*-linux* with glibc.
12895
12896 2017-09-28  Joseph Myers  <joseph@codesourcery.com>
12897
12898         * config/aarch64/aarch64.c (aarch64_elf_asm_constructor)
12899         (aarch64_elf_asm_destructor): Pass SECTION_NOTYPE to get_section
12900         when creating .init_array and .fini_array sections with priority
12901         specified.
12902
12903 2017-09-27  Christophe Lyon  <christophe.lyon@linaro.org>
12904
12905         PR target/71727
12906         * config/aarch64/aarch64.c
12907         (aarch64_builtin_support_vector_misalignment): Always return false
12908         when misalignment is unknown.
12909
12910 2017-09-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12911
12912         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Revise
12913         this function to return false if the definition used by the swap
12914         instruction is artificial, or if the memory address from which the
12915         constant value is loaded is not represented by a base address held
12916         in a register or if the base address register is a frame or stack
12917         pointer.  Additionally, return false if the base address of the
12918         loaded constant is a SYMBOL_REF but is not considered to be a
12919         constant.
12920         (replace_swapped_load_constant): New function.
12921         (rs6000_analyze_swaps): Add a new pass to replace a swap of a
12922         loaded constant vector with a load of a swapped constant vector.
12923
12924 2017-09-27  Carl Love  <cel@us.ibm.com>
12925
12926         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
12927         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
12928         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
12929         fctiw instruction.
12930
12931 2017-09-27  Alexander Monakov  <amonakov@ispras.ru>
12932
12933         * haifa-sched.c (autopref_rank_for_schedule): Order 'irrelevant' insns
12934         first, always call autopref_rank_data otherwise.
12935
12936 2017-09-27  Richard Biener  <rguenther@suse.de>
12937
12938         * graphite-scop-detection.c (find_scop_parameters): Move
12939         loop bound handling ...
12940         (gather_bbs::before_dom_children): ... here, avoiding the need
12941         to build scop_info->loop_nest.
12942         (record_loop_in_sese): Remove.
12943         * sese.h (sese_info_t::loop_nest): Remove.
12944         * sese.c (new_sese_info): Do not allocate loop_nest.
12945         (free_sese_info): Do not free loop_nest.
12946
12947 2017-09-27  Jakub Jelinek  <jakub@redhat.com>
12948
12949         PR c++/82159
12950         * gimplify.c (gimplify_modify_expr): Don't optimize away zero sized
12951         lhs from calls if the lhs has addressable type.
12952
12953 2017-09-27  Richard Biener  <rguenther@suse.de>
12954
12955         * graphite.h (scop::max_alias_set): New member.
12956         * graphite-scop-detection.c: Remove references to non-existing
12957         --param in comments.
12958         (build_alias_sets): Record the maximum alias set used for drs.
12959         (build_scops): Support zero as unlimited for
12960         --param graphite-max-arrays-per-scop.
12961         * graphite-sese-to-poly.c (add_scalar_version_numbers): Remove
12962         and inline into ...
12963         (build_poly_sr_1): ... here.  Compute alias set based on the
12964         maximum alias set used for drs rather than
12965         PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP
12966
12967 2017-09-27  Richard Biener  <rguenther@suse.de>
12968
12969         * graphite-optimize-isl.c (get_schedule_for_node_st): Allow
12970         --param loop-block-tile-size=0 to disable tiling.
12971
12972 2017-09-27  Richard Biener  <rguenther@suse.de>
12973
12974         * doc/invoke.texi (graphite-max-bbs-per-function): Remove.
12975         (graphite-max-nb-scop-params): Document special value zero.
12976         * domwalk.h (dom_walker::STOP): New symbolical constant.
12977         (dom_walker::dom_walker): Add optional parameter for bb to
12978         RPO mapping.
12979         (dom_walker::~dom_walker): Declare.
12980         (dom_walker::before_dom_children): Document STOP return value.
12981         (dom_walker::m_user_bb_to_rpo): New member.
12982         (dom_walker::m_bb_to_rpo): Likewise.
12983         * domwalk.c (dom_walker::dom_walker): Compute bb to RPO
12984         mapping here if not provided by the user.
12985         (dom_walker::~dom_walker): Free bb to RPO mapping if not
12986         provided by the user.
12987         (dom_walker::STOP): Define.
12988         (dom_walker::walk): Do not compute bb to RPO mapping here.
12989         Support STOP return value from before_dom_children to stop
12990         walking.
12991         * graphite-optimize-isl.c (optimize_isl): If the schedule
12992         is the same still generate code if -fgraphite-identity
12993         or -floop-parallelize-all are given.
12994         * graphite-scop-detection.c: Include cfganal.h.
12995         (gather_bbs::gather_bbs): Get and pass through bb to RPO
12996         mapping.
12997         (gather_bbs::before_dom_children): Return STOP for BBs
12998         not in the region.
12999         (build_scops): Compute bb to RPO mapping and pass it to
13000         the domwalk.  Treat --param graphite-max-nb-scop-params=0
13001         as not limiting the number of params.
13002         * graphite.c (graphite_initialize): Remove limit on the
13003         number of basic-blocks in a function.
13004         * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Remove.
13005         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Adjust to documented
13006         default value of 10.
13007
13008 2017-09-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
13009
13010         * config/rs6000/vsx.md (peephole for optimizing move SF to GPR):
13011         Adjust code to eliminate needing to do the shift right 32-bits
13012         operation after XSCVDPSPN.
13013
13014 2017-09-26  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13015
13016         * match.pd ((X / Y) == 0 -> X < Y): New pattern.
13017         ((X / Y) != 0 -> X >= Y): Likewise.
13018
13019 2017-09-26  Carl Love  <cel@us.ibm.com>
13020
13021         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_XL_LEN_R,
13022         P9V_BUILTIN_VEC_XST_LEN_R): Add support for builtins
13023         vector unsigned char vec_xl_len_r (unsigned char *, size_t);
13024         void vec_xst_len_r (vector unsigned char, unsigned char *, size_t);
13025         * config/rs6000/altivec.h (vec_xl_len_r, vec_xst_len_r): Add defines.
13026         * config/rs6000/rs6000-builtin.def (XL_LEN_R, XST_LEN_R): Add
13027         definitions and overloading.
13028         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case
13029         statement for P9V_BUILTIN_XST_LEN_R.
13030         (altivec_init_builtins): Add def_builtin for P9V_BUILTIN_STXVLL.
13031         * config/rs6000/vsx.md (lxvll, stxvll, xl_len_r, xst_len_r): Add
13032         define_expand and define_insn for the instructions and builtins.
13033         * doc/extend.texi: Update the built-in documentation file for the new
13034         built-in functions.
13035         * config/rs6000/altivec.md (altivec_lvsl_reg, altivec_lvsr_reg): Add
13036         define_insn for the instructions
13037
13038 2017-09-26  Krister Walfridsson  <krister.walfridsson@gmail.com>
13039
13040         PR target/39570
13041         * gcc/config/netbsd-protos.h: New file.
13042         * gcc/config/netbsd.c: New file.
13043         * gcc/config/netbsd.h (SUBTARGET_INIT_BUILTINS): Define.
13044         * gcc/config/t-netbsd: New file.
13045         * gcc/config.gcc (tm_p_file): Add netbsd-protos.h.
13046         (tmake_file) Add t-netbsd.
13047         (extra_objs) Add netbsd.o.
13048
13049 2017-09-26  Janus Weil  <janus@gcc.gnu.org>
13050
13051         PR fortran/82143
13052         PR fortran/82324
13053         * doc/sourcebuild.texi: Document fortran_real_10 and fortran_real_16.
13054
13055 2017-09-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
13056
13057         * config/rs6000/rs6000.md (extendsi<mode>2): Add a splitter to do
13058         sign extension from a vector register to a GPR by doing a 32-bit
13059         direct move and then an EXTSW.
13060         (extendsi<mode>2 splitter): Likewise.
13061         (movsi_from_sf): Adjust code to eliminate doing a 32-bit shift
13062         right or vector extract after doing XSCVDPSPN.  Use
13063         zero_extendsidi2 instead of p8_mfvsrd_4_disf to move the value to
13064         the GPRs.
13065         (movdi_from_sf_zero_ext): Likewise.
13066         (reload_gpr_from_vsxsf): Likewise.
13067         (p8_mfvsrd_4_disf): Delete, no longer used.
13068         (movsi_from_df): Optimize converting a DFmode to a SFmode, and
13069         then needing to move the SFmode to a GPR to use the XSCVDPSP
13070         instruction instead of FRSP and XSCVDPSPN.
13071         * config/rs6000/vsx.md (vsx_xscvspdp_scalar2): Move insn so that
13072         it is adjacent to the other XSCVSPDP insns.
13073         (vsx_xscvdpsp_scalar): Use "ww" constraint instead of "f" to allow
13074         SFmode to be in traditional Altivec registers.
13075         (vsx_xscvdpspn): Eliminate useless alternative constraint.
13076         (vsx_xscvspdpn): Likewise.
13077         (vsx_xscvspdpn_scalar): Likewise.
13078
13079 2017-09-26  Martin Jambor  <mjambor@suse.cz>
13080
13081         * tree-sra.c (compare_access_positions): Put integral types first,
13082         stabilize sorting of integral types, remove conditions putting
13083         non-full-precision integers last.
13084         (sort_and_splice_var_accesses): Disable scalarization if a
13085         non-integert would be represented by a non-full-precision integer.
13086
13087 2017-09-26  Joseph Myers  <joseph@codesourcery.com>
13088
13089         * config/microblaze/linux.h (TARGET_ASM_FILE_END): Likewise.
13090         * config/pa/pa.h (NEED_INDICATE_EXEC_STACK): Likewise.
13091         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Likewise.
13092         * config/pa/pa.c (pa_hpux_file_end): Rename to pa_file_end.
13093         Define unconditionally, with [ASM_OUTPUT_EXTERNAL_REAL]
13094         conditionals inside the function instead of around it.  Call
13095         file_end_indicate_exec_stack if NEED_INDICATE_EXEC_STACK.
13096         (TARGET_ASM_FILE_END): Define unconditionally to pa_file_end.
13097
13098 2017-09-26  Richard Biener  <rguenther@suse.de>
13099
13100         * graphite-scop-detection.c (scop_detection::build_scop_depth): Rewrite,
13101         fold in ...
13102         (scop_detection::build_scop_breadth): ... this.  Removed.
13103         (scop_detection::loop_is_valid_in_scop): Fold into single caller.
13104         (scop_detection::harmful_stmt_in_bb): Likewise.
13105         (scop_detection::graphite_can_represent_stmt): Likewise.
13106         (scop_detection::loop_body_is_valid_scop): Likewise.  Remove recursion.
13107         (scop_detection::can_represent_loop): Remove recursion, fold in ...
13108         (scop_detection::can_represent_loop_1): ... this.  Removed.
13109         (scop_detection::harmful_loop_in_region): Simplify after inlining
13110         the above and remove more quadraticness.
13111         (build_scops): Adjust.
13112         * tree-data-ref.c (loop_nest_has_data_refs): Remove pointless
13113         quadraticness.
13114
13115 2017-09-26  Jakub Jelinek  <jakub@redhat.com>
13116
13117         PR target/82267
13118         * config/i386/i386.c (ix86_print_operand_address_as): Only test
13119         REGNO (base) == SP_REG if base is a REG.
13120
13121         PR middle-end/35691
13122         * tree-ssa-reassoc.c (update_range_test): Dump r->exp each time
13123         if it is different SSA_NAME.
13124         (optimize_range_tests_cmp_bitwise): New function.
13125         (optimize_range_tests): Call it.
13126
13127 2017-09-26  Richard Biener  <rguenther@suse.de>
13128
13129         PR tree-optimization/82321
13130         * graphite.c (canonicalize_loop_closed_ssa): Properly check
13131         for the def being inside the loop.
13132
13133 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13134
13135         * config/s390/vx-builtins.md ("vmslg"): Add missing operand in
13136         assembler output.
13137         * config/s390/s390-builtins.def: Fix constraint on op4.
13138
13139 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13140
13141         * config/s390/s390.c (s390_expand_vec_compare): Use the new mode
13142         independent expanders.
13143         * config/s390/vector.md ("vec_cmpuneq", "vec_cmpltgt")
13144         ("vec_ordered", "vec_unordered"): New expanders.
13145
13146 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13147
13148         * config/s390/s390.c (s390_preferred_simd_mode): Return V4SFmode
13149         for SFmode.
13150
13151 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13152
13153         * config/s390/vector.md ("vec_unpacks_low_v16qi"): Rename to
13154         vec_unpacks_lo_v16qi.
13155         ("vec_unpacku_low_v16qi"): Rename to vec_unpacku_lo_v16qi.
13156
13157 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13158
13159         * config/s390/vector.md ("vec_unpacks_lo_v4sf")
13160         ("vec_unpacks_hi_v4sf", "vec_unpacks_lo_v2df")
13161         ("vec_unpacks_hi_v2df", "vec_pack_trunc_v2df"): New expanders.
13162
13163 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13164
13165         * config/s390/predicates.md ("const_shift_by_byte_operand"): New
13166         predicate.
13167         * config/s390/vector.md ("*vec_srb<mode>"): Change modes to V_128
13168         and V16QI.
13169         ("*vec_slb<mode>"): New insn pattern.
13170         ("vec_shr_<mode>"): New expander.
13171         * config/s390/vx-builtins.md ("vec_slb<mode>"): Turn into expander
13172         and force the shift count operand to V16QImode.
13173         ("vec_srb<mode>"): Set shift count mode to V16QI.
13174
13175 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13176
13177         * config/s390/vector.md ("vec_widen_umult_lo_<mode>")
13178         ("vec_widen_umult_hi_<mode>", "vec_widen_smult_lo_<mode>")
13179         ("vec_widen_smult_hi_<mode>"): New expander definitions.
13180
13181 2017-09-26  Richard Earnshaw  <rearnsha@arm.com>
13182
13183         PR target/82175
13184         * config/arm/arm.h (DRIVER_SELF_SPECS): Separate sub-rules with commas.
13185
13186 2017-09-26  Richard Biener  <rguenther@suse.de>
13187
13188         PR tree-optimization/82320
13189         * tree-ssa-sccvn.c (set_ssa_val_to): Changing undef to undef
13190         isn't a change.
13191
13192 2017-09-25  Jeff Law  <law@redhat.com>
13193
13194         * config/rs6000/rs6000-protos.h (output_probe_stack_range): Update
13195         prototype for new argument.
13196         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack_1): New function,
13197         mostly extracted from rs6000_emit_allocate_stack.
13198         (rs6000_emit_probe_stack_range_stack_clash): New function.
13199         (rs6000_emit_allocate_stack): Call
13200         rs6000_emit_probe_stack_range_stack_clash as needed.
13201         (rs6000_emit_probe_stack_range): Add additional argument
13202         to call to gen_probe_stack_range{si,di}.
13203         (output_probe_stack_range): New.
13204         (output_probe_stack_range_1): Renamed from output_probe_stack_range.
13205         (output_probe_stack_range_stack_clash): New.
13206         (rs6000_emit_prologue): Emit notes into dump file as requested.
13207         * rs6000.md (allocate_stack): Handle -fstack-clash-protection.
13208         (probe_stack_range<P:mode>): Operand 0 is now early-clobbered.
13209         Add additional operand and pass it to output_probe_stack_range.
13210
13211 2017-09-25  Bin Cheng  <bin.cheng@arm.com>
13212
13213         PR tree-optimization/82163
13214         * tree-ssa-loop-manip.h (verify_loop_closed_ssa): New parameter.
13215         (checking_verify_loop_closed_ssa): New parameter.
13216         * tree-ssa-loop-manip.c (check_loop_closed_ssa_use): Delete.
13217         (check_loop_closed_ssa_stmt): Delete.
13218         (check_loop_closed_ssa_def, check_loop_closed_ssa_bb): New functions.
13219         (verify_loop_closed_ssa): Check loop closed ssa form for LOOP.
13220         (tree_transform_and_unroll_loop): Check loop closed ssa form only for
13221         changed loops.
13222
13223 2017-09-25  Pekka Jaaskelainen <pekka@parmance.com>
13224
13225         * brig-builtins.def: Treat HSAIL barrier builtins as
13226         setjmp/longjump style functions.
13227
13228 2017-09-25  Richard Sandiford  <richard.sandiford@linaro.org>
13229
13230         * target.def (constant_alignment): New hook.
13231         * defaults.h (CONSTANT_ALIGNMENT): Delete.
13232         * doc/tm.texi.in (CONSTANT_ALIGNMENT): Replace with...
13233         (TARGET_CONSTANT_ALIGNMENT): ...this new hook.
13234         * doc/tm.texi: Regenerate.
13235         * targhooks.h (default_constant_alignment): Declare.
13236         (constant_alignment_word_strings): Likewise.
13237         * targhooks.c (default_constant_alignment): New function.
13238         (constant_alignment_word_strings): Likewise.
13239         * builtins.c (get_object_alignment_2): Use targetm.constant_alignment
13240         instead of CONSTANT_ALIGNMENT.
13241         * varasm.c (align_variable, get_variable_align, build_constant_desc)
13242         (force_const_mem): Likewise.
13243         * config/aarch64/aarch64.h (CONSTANT_ALIGNMENT): Delete.
13244         * config/aarch64/aarch64.c (aarch64_constant_alignment): New function.
13245         (aarch64_classify_address): Call it instead of CONSTANT_ALIGNMENT.
13246         (TARGET_CONSTANT_ALIGNMENT): Redefine.
13247         * config/alpha/alpha.h (CONSTANT_ALIGNMENT): Delete commented-out
13248         definition.
13249         * config/arc/arc.h (CONSTANT_ALIGNMENT): Delete.
13250         * config/arc/arc.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13251         constant_alignment_word_strings.
13252         * config/arm/arm.h (CONSTANT_ALIGNMENT_FACTOR): Delete.
13253         (CONSTANT_ALIGNMENT): Likewise.
13254         * config/arm/arm.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
13255         (arm_constant_alignment): New function.
13256         * config/bfin/bfin.h (CONSTANT_ALIGNMENT): Delete.
13257         * config/bfin/bfin.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13258         constant_alignment_word_strings.
13259         * config/cr16/cr16.h (CONSTANT_ALIGNMENT): Delete.
13260         * config/cr16/cr16.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13261         constant_alignment_word_strings.
13262         * config/cris/cris.h (CONSTANT_ALIGNMENT): Delete.
13263         * config/cris/cris.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
13264         (cris_constant_alignment): New function.
13265         * config/epiphany/epiphany.h (CONSTANT_ALIGNMENT): Delete.
13266         * config/epiphany/epiphany.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
13267         (epiphany_constant_alignment): New function.
13268         * config/fr30/fr30.h (CONSTANT_ALIGNMENT): Delete.
13269         * config/fr30/fr30.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13270         constant_alignment_word_strings.
13271         * config/frv/frv.h (CONSTANT_ALIGNMENT): Delete.
13272         * config/frv/frv.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13273         constant_alignment_word_strings.
13274         * config/ft32/ft32.h (CONSTANT_ALIGNMENT): Delete.
13275         * config/ft32/ft32.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13276         constant_alignment_word_strings.
13277         * config/i386/i386.h (CONSTANT_ALIGNMENT): Delete.
13278         * config/i386/i386-protos.h (ix86_constant_alignment): Delete.
13279         * config/i386/i386.c (ix86_constant_alignment): Make static.
13280         Use the same interface as the target hook.
13281         (TARGET_CONSTANT_ALIGNMENT): Redefine.
13282         * config/ia64/ia64.h (CONSTANT_ALIGNMENT): Delete.
13283         * config/ia64/ia64.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13284         constant_alignment_word_strings.
13285         * config/iq2000/iq2000.h (CONSTANT_ALIGNMENT): Delete.
13286         * config/iq2000/iq2000.c (iq2000_constant_alignment): New function.
13287         (TARGET_CONSTANT_ALIGNMENT): Redefine.
13288         * config/lm32/lm32.h (CONSTANT_ALIGNMENT): Delete.
13289         * config/lm32/lm32.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13290         constant_alignment_word_strings.
13291         * config/m32r/m32r.h (CONSTANT_ALIGNMENT): Delete.
13292         * config/m32r/m32r.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13293         constant_alignment_word_strings.
13294         * config/mcore/mcore.h (CONSTANT_ALIGNMENT): Delete.
13295         * config/mcore/mcore.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13296         constant_alignment_word_strings.
13297         * config/microblaze/microblaze.h (CONSTANT_ALIGNMENT): Delete.
13298         * config/microblaze/microblaze.c (microblaze_constant_alignment):
13299         New function.
13300         (TARGET_CONSTANT_ALIGNMENT): Redefine.
13301         * config/mips/mips.h (CONSTANT_ALIGNMENT): Delete.
13302         * config/mips/mips.c (mips_constant_alignment): New function.
13303         (TARGET_CONSTANT_ALIGNMENT): Redefine.
13304         * config/mmix/mmix.h (CONSTANT_ALIGNMENT): Delete.
13305         * config/mmix/mmix-protos.h (mmix_constant_alignment): Delete.
13306         * config/mmix/mmix.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
13307         (mmix_constant_alignment): Make static.  Use the same interface
13308         as the target hook.
13309         * config/moxie/moxie.h (CONSTANT_ALIGNMENT): Delete.
13310         * config/moxie/moxie.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13311         constant_alignment_word_strings.
13312         * config/nios2/nios2.h (CONSTANT_ALIGNMENT): Delete.
13313         * config/nios2/nios2.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13314         constant_alignment_word_strings.
13315         * config/pa/pa.h (CONSTANT_ALIGNMENT): Delete.
13316         * config/pa/pa.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13317         constant_alignment_word_strings.
13318         * config/powerpcspe/powerpcspe.h (CONSTANT_ALIGNMENT): Delete.
13319         * config/powerpcspe/powerpcspe.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
13320         (rs6000_constant_alignment): New function.
13321         * config/riscv/riscv.h (CONSTANT_ALIGNMENT): Delete.
13322         * config/riscv/riscv.c (riscv_constant_alignment): New function.
13323         (TARGET_CONSTANT_ALIGNMENT): Redefine.
13324         * config/rs6000/rs6000.h (CONSTANT_ALIGNMENT): Delete.
13325         * config/rs6000/rs6000.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
13326         (rs6000_constant_alignment): New function.
13327         * config/s390/s390.h (CONSTANT_ALIGNMENT): Delete.
13328         * config/s390/s390.c (s390_constant_alignment): New function.
13329         (TARGET_CONSTANT_ALIGNMENT): Redefine.
13330         * config/sh/sh.h (CONSTANT_ALIGNMENT): Delete.
13331         * config/sh/sh.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13332         constant_alignment_word_strings.
13333         * config/sparc/sparc.h (CONSTANT_ALIGNMENT): Delete.
13334         * config/sparc/sparc.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
13335         (sparc_constant_alignment): New function.
13336         * config/spu/spu.h (CONSTANT_ALIGNMENT): Delete.
13337         * config/spu/spu.c (spu_constant_alignment): New function.
13338         (TARGET_CONSTANT_ALIGNMENT): Redefine.
13339         * config/stormy16/stormy16.h (CONSTANT_ALIGNMENT): Delete.
13340         * config/stormy16/stormy16.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13341         constant_alignment_word_strings.
13342         * config/tilegx/tilegx.h (CONSTANT_ALIGNMENT): Delete.
13343         * config/tilegx/tilegx.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13344         constant_alignment_word_strings.
13345         * config/tilepro/tilepro.h (CONSTANT_ALIGNMENT): Delete.
13346         * config/tilepro/tilepro.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13347         constant_alignment_word_strings.
13348         * config/visium/visium.h (CONSTANT_ALIGNMENT): Delete.
13349         * config/visium/visium.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
13350         (visium_constant_alignment): New function.
13351         * config/xtensa/xtensa.h (CONSTANT_ALIGNMENT): Delete.
13352         * config/xtensa/xtensa.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
13353         (xtensa_constant_alignment): New function.
13354         * system.h (CONSTANT_ALIGNMENT): Poison.
13355
13356 2017-09-25  Will Schmidt  <will_schmidt@vnet.ibm.com>
13357
13358         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
13359         for early folding of vector stores (ALTIVEC_BUILTIN_ST_*).
13360         (rs6000_builtin_valid_without_lhs): New helper function.
13361         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
13362         Remove obsoleted code for handling ALTIVEC_BUILTIN_VEC_ST.
13363
13364 2017-09-25  Richard Sandiford  <richard.sandiford@linaro.org>
13365
13366         * target.h (vec_perm_indices): Use unsigned short rather than
13367         unsigned char.
13368         (auto_vec_perm_indices): Likewise.
13369         * config/aarch64/aarch64.c (aarch64_vectorize_vec_perm_const_ok):
13370         Use unsigned int rather than unsigned char.
13371         * config/arm/arm.c (arm_vectorize_vec_perm_const_ok): Likewise.
13372
13373 2017-09-25  Richard Biener  <rguenther@suse.de>
13374
13375         * cfgloop.h (sort_sibling_loops): Declare.
13376         * cfgloop.c (sort_sibling_loops_cmp): New helper.
13377         (sort_sibling_loops): New function sorting the sibling loop list
13378         in RPO order.
13379         * graphite.c (graphite_transform_loops): Sort sibling loops.
13380
13381 2017-09-25  Richard Sandiford  <richard.sandifird@linaro.org>
13382
13383         * target.def (vec_perm_const_ok): Change sel parameter to
13384         vec_perm_indices.
13385         * optabs-query.c (can_vec_perm_p): Update accordingly.
13386         * doc/tm.texi: Regenerate.
13387         * config/aarch64/aarch64.c (expand_vec_perm_d): Change perm to
13388         auto_vec_perm_indices and remove separate nelt field.
13389         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
13390         (aarch64_evpc_ext, aarch64_evpc_rev, aarch64_evpc_dup)
13391         (aarch64_evpc_tbl, aarch64_expand_vec_perm_const_1)
13392         (aarch64_expand_vec_perm_const): Update accordingly.
13393         (aarch64_vectorize_vec_perm_const_ok): Likewise.  Change sel
13394         to vec_perm_indices.
13395         * config/arm/arm.c (expand_vec_perm_d): Change perm to
13396         auto_vec_perm_indices and remove separate nelt field.
13397         (arm_evpc_neon_vuzp, arm_evpc_neon_vzip, arm_evpc_neon_vrev)
13398         (arm_evpc_neon_vtrn, arm_evpc_neon_vext, arm_evpc_neon_vtbl)
13399         (arm_expand_vec_perm_const_1, arm_expand_vec_perm_const): Update
13400         accordingly.
13401         (arm_vectorize_vec_perm_const_ok): Likewise.  Change sel
13402         to vec_perm_indices.
13403         * config/i386/i386.c (ix86_vectorize_vec_perm_const_ok): Change
13404         sel to vec_perm_indices.
13405         * config/ia64/ia64.c (ia64_vectorize_vec_perm_const_ok): Likewise.
13406         * config/mips/mips.c (mips_vectorize_vec_perm_const_ok): Likewise.
13407         * config/powerpcspe/powerpcspe.c (rs6000_vectorize_vec_perm_const_ok):
13408         Likewise.
13409         * config/rs6000/rs6000.c (rs6000_vectorize_vec_perm_const_ok):
13410         Likewise.
13411
13412 2017-09-25  Pierre-Marie de Rodat  <derodat@adacore.com>
13413
13414         PR debug/82155
13415         * dwarf2out.c (dwarf2out_early_global_decl): Call dwarf2out_decl
13416         on the FUNCTION_DECL function context if it has a DIE that is a
13417         declaration.
13418
13419 2017-09-25  Richard Biener  <rguenther@suse.de>
13420
13421         PR tree-optimization/82285
13422         * tree-vect-patterns.c (vect_recog_bool_pattern): Also handle
13423         enumeral types.
13424
13425 2017-09-25  Tom de Vries  <tom@codesourcery.com>
13426
13427         PR target/80035
13428         PR target/81069
13429         * config/nvptx/nvptx.c (nvptx_output_call_insn): Add exit after call to
13430         noreturn function.
13431
13432 2017-09-25  Richard Biener  <rguenther@suse.de>
13433
13434         * graphite-optimize-isl.c (optimize_isl): Fail and dump if
13435         ISL errors other than isl_error_quota happen.  Dump if the
13436         schedule is the same.
13437         * graphite-sese-to-poly.c (build_poly_scop): Fail on ISL
13438         errors instead of aborting inside ISL.
13439
13440 2017-09-25  Iain Sandoe  <iain@codesourcery.com>
13441
13442         PR target/80556
13443         * config/i386/darwin.h (REAL_LIB_SPEC): New; put libSystem ahead
13444         of libgcc_eh for m64.
13445         * config/i386/darwin64.h: Likewise.
13446
13447 2017-09-25  Richard Biener  <rguenther@suse.de>
13448
13449         PR middle-end/82144
13450         * dwarf2out.c (gen_enumeration_type_die): Do not add alignment
13451         attribute for incomplete types nor twice for complete ones.
13452
13453 2017-09-24  Uros Bizjak  <ubizjak@gmail.com>
13454
13455         PR target/82267
13456         * config/i386/i386.c (ix86_print_operand_address_as): Encode
13457         %esp as %rsp to avoid 0x67 prefix if there is no index or base
13458         register.
13459
13460 2017-09-23  Uros Bizjak  <ubizjak@gmail.com>
13461
13462         PR bootstrap/82306
13463         * config/i386/i386.opt (mprefer-avx256): Use
13464         ix86_target_flags variable.
13465         * config/i386/i386.c (ix86_target_string): Move
13466         -mprefer-avx256 to flag2_opts.
13467
13468 2017-09-22  Jakub Jelinek  <jakub@redhat.com>
13469
13470         PR middle-end/35691
13471         * match.pd: Simplify x == -1 & y == -1 into (x & y) == -1
13472         and x != -1 | y != -1 into (x & y) != -1.
13473
13474 2017-09-22  Steve Ellcey  <sellcey@cavium.com>
13475
13476         * config.gcc: Add new case statement to set
13477         default_gnu_indirect_function.  Remove it from x86_64-*-linux*,
13478         i[34567]86-*, powerpc*-*-linux*spe*, powerpc*-*-linux*, s390-*-linux*,
13479         s390x-*-linux* case statements.   Added aarch64 to the list of
13480         supported architectures.
13481
13482 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
13483
13484         PR tree-optimization/82289
13485         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Check
13486         STMT_VINFO_RELEVANT_P.
13487
13488 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
13489             Alan Hayward  <alan.hayward@arm.com>
13490             David Sherwood  <david.sherwood@arm.com>
13491
13492         * tree-vrp.c (extract_range_from_multiplicative_op_1): Assert
13493         for VR_RANGE only; don't allow VR_ANTI_RANGE.
13494         (extract_range_from_binary_expr_1): Don't call
13495         extract_range_from_multiplicative_op_1 if !range_int_cst_p.
13496
13497 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
13498             Alan Hayward  <alan.hayward@arm.com>
13499             David Sherwood  <david.sherwood@arm.com>
13500
13501         * target.def (preferred_vector_alignment): New hook.
13502         * doc/tm.texi.in (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): New
13503         hook.
13504         * doc/tm.texi: Regenerate.
13505         * targhooks.h (default_preferred_vector_alignment): Declare.
13506         * targhooks.c (default_preferred_vector_alignment): New function.
13507         * tree-vectorizer.h (dataref_aux): Add a target_alignment field.
13508         Expand commentary.
13509         (DR_TARGET_ALIGNMENT): New macro.
13510         (aligned_access_p): Update commentary.
13511         (vect_known_alignment_in_bytes): New function.
13512         * tree-vect-data-refs.c (vect_calculate_required_alignment): New
13513         function.
13514         (vect_compute_data_ref_alignment): Set DR_TARGET_ALIGNMENT.
13515         Calculate the misalignment based on the target alignment rather than
13516         the vector size.
13517         (vect_update_misalignment_for_peel): Use DR_TARGET_ALIGMENT
13518         rather than TYPE_ALIGN / BITS_PER_UNIT to update the misalignment.
13519         (vect_enhance_data_refs_alignment): Mask the byte misalignment with
13520         the target alignment, rather than masking the element misalignment
13521         with the number of elements in a vector.  Also use the target
13522         alignment when calculating the maximum number of peels.
13523         (vect_find_same_alignment_drs): Use vect_calculate_required_alignment
13524         instead of TYPE_ALIGN_UNIT.
13525         (vect_duplicate_ssa_name_ptr_info): Remove stmt_info parameter.
13526         Measure DR_MISALIGNMENT relative to DR_TARGET_ALIGNMENT.
13527         (vect_create_addr_base_for_vector_ref): Update call accordingly.
13528         (vect_create_data_ref_ptr): Likewise.
13529         (vect_setup_realignment): Realign by ANDing with
13530         -DR_TARGET_MISALIGNMENT.
13531         * tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Calculate
13532         the number of peels based on DR_TARGET_ALIGNMENT.
13533         * tree-vect-stmts.c (get_group_load_store_type): Compare the gap
13534         with the guaranteed alignment boundary when deciding whether
13535         overrun is OK.
13536         (vectorizable_mask_load_store): Interpret DR_MISALIGNMENT
13537         relative to DR_TARGET_ALIGNMENT instead of TYPE_ALIGN_UNIT.
13538         (ensure_base_align): Remove stmt_info parameter.  Get the
13539         target base alignment from DR_TARGET_ALIGNMENT.
13540         (vectorizable_store): Update call accordingly.   Interpret
13541         DR_MISALIGNMENT relative to DR_TARGET_ALIGNMENT instead of
13542         TYPE_ALIGN_UNIT.
13543         (vectorizable_load): Likewise.
13544
13545 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
13546             Alan Hayward  <alan.hayward@arm.com>
13547             David Sherwood  <david.sherwood@arm.com>
13548
13549         * tree-vectorizer.h (vect_get_scalar_dr_size): New function.
13550         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Use it.
13551         (vect_enhance_data_refs_alignment): Likewise.
13552
13553 2017-09-22  Richard Earnshaw  <richard.earnshaw@arm.com>
13554
13555         * config/arm/parsecpu.awk (fatal): Note that we've encountered an
13556         error.  Only quit immediately if parsing is complete.
13557         (BEGIN): Initialize fatal_err and parse_done.
13558         (begin fpu, end fpu): Check number of arguments.
13559         (begin arch, end arch): Likewise.
13560         (begin cpu, end cpu): Likewise.
13561         (cname, tune for, tune flags, architecture, fpu, option): Likewise.
13562         (optalias): Likewise.
13563
13564 2017-09-22  Richard Earnshaw  <richard.earnshaw@arm.com>
13565
13566         * config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.
13567         * config/arm/arm-isa.h: Delete.  Move definitions to ...
13568         * arm-cpus.in: ... here.  Use new feature and fgroup values.
13569         * config/arm/arm.c (arm_option_override): Use lower case for feature
13570         bit names.
13571         * config/arm/arm.h (TARGET_HARD_FLOAT): Likewise.
13572         (TARGET_VFP3, TARGET_VFP5, TARGET_FMA): Likewise.
13573         * config/arm/parsecpu.awk (END): Add new command 'isa'.
13574         (isa_pfx): Delete.
13575         (print_isa_bits_for): New function.
13576         (gen_isa): New function.
13577         (gen_comm_data): Use print_isa_bits_for.
13578         (define feature): New keyword.
13579         (define fgroup): New keyword.
13580         * config/arm/t-arm (TM_H): Remove.
13581         (GTM_H): Add arm-isa.h.
13582         (arm-isa.h): Add rule to generate file.
13583         * common/config/arm/arm-common.c: (arm_canon_arch_option): Use lower
13584         case for feature bit names.
13585
13586 2017-09-22  Richard Biener  <rguenther@suse.de>
13587
13588         * graphite-isl-ast-to-gimple.c (graphite_verify): Inline into
13589         single caller.
13590         (graphite_regenerate_ast_isl): Do not reset SCEV.  Move debug
13591         print of no dependency loops ...
13592         * graphite.c (graphite_transform_loops): ... here.
13593         (canonicalize_loop_closed_ssa_form): Work from inner to outer
13594         loops.
13595         (same_close_phi_node, remove_duplicate_close_phi,
13596         make_close_phi_nodes_unique, defined_in_loop_p): Fold into ...
13597         (canonicalize_loop_closed_ssa): ... here and simplify.
13598         * graphite-optimize-isl.c: Include tree-vectorizer.h.
13599         (optimize_isl): Use dump_printf_loc to tell when we stopped
13600         optimizing because of an ISL timeout.
13601
13602 2017-09-22  Richard Biener  <rguenther@suse.de>
13603
13604         PR tree-optimization/82291
13605         * tree-if-conv.c (predicate_mem_writes): Make sure to
13606         remove writes in blocks predicated with false.
13607
13608 2017-09-22  Richard Biener  <rguenther@suse.de>
13609
13610         * sese.c: Include cfganal.h.
13611         (if_region_set_false_region): Remove.
13612         (create_if_region_on_edge): Likewise.
13613         (move_sese_in_condition): Re-implement without destroying
13614         dominators.
13615
13616 2017-09-22  Richard Biener  <rguenther@suse.de>
13617
13618         * graphite-isl-ast-to-gimple.c (translate_pending_phi_nodes):
13619         Verify both BBs contain loop PHI nodes before dispatching to
13620         copy_loop_phi_args.
13621         (graphite_regenerate_ast_isl): Do not recompute dominators,
13622         do not verify three times.  Restructure for clarity.
13623         * graphite-scop-detection.c (same_close_phi_node,
13624         remove_duplicate_close_phi, make_close_phi_nodes_unique,
13625         defined_in_loop_p, canonicalize_loop_closed_ssa,
13626         canonicalize_loop_closed_ssa_form): Simplify, remove excess
13627         checking and SSA rewrite, move to ...
13628         * graphite.c: ... here.  Include ssa.h and tree-ssa-loop-manip.h.
13629         (graphite_initialize): Do not pass in ctx, do not reset the
13630         SCEV cache, compute only dominators.
13631         (graphite_transform_loops): Allocate ISL ctx after
13632         graphite_initialize.  Call canonicalize_loop_closed_ssa_form.
13633         Maintain post-dominators only around build_scops.
13634         * sese.c (if_region_set_false_region): Make static.  Free
13635         and recompute dominators.
13636         (move_sese_in_condition): Assert we don't get called with
13637         post-dominators computed.
13638         * sese.h (if_region_set_false_region): Remove.
13639
13640 2017-09-22  Sergey Shalnov  <sergey.shalnov@intel.com>
13641
13642         * config/i386/sse.md ("mov<mode>_internal"): Use <sseinsnmode>
13643         mode attribute for TARGET_AVX512VL.
13644
13645 2017-09-21  Sergey Shalnov  <sergey.shalnov@intel.com>
13646
13647         * config/i386/i386.opt (mprefer-avx256): New option.
13648         * config/i386/i386.c (ix86_target_string): Add -mprefer-avx256
13649         to flag_opts.
13650         (ix86_preferred_simd_mode): Return 256-bit AVX modes
13651         for TARGET_PREFER_AVX256.
13652         * doc/invoke.texi (x86 Options): Document -mprefer-avx256.
13653
13654 2017-09-21  Jeff Law  <law@redhat.com>
13655
13656         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash):
13657         Fix dump output if the only stack space is for pushed registers.
13658
13659 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
13660
13661         * config/spu/spu.c (spu_sched_adjust_cost): Update after renaming
13662         of insn_cost.
13663
13664 2017-09-21  Martin Sebor  <msebor@redhat.com>
13665
13666         PR c/81882
13667         * doc/extend.texi (attribute ifunc): Avoid relying on ill-formed
13668         code (in C++) or code that triggers warnings.
13669
13670 2017-09-21  Eric Botcazou  <ebotcazou@adacore.com>
13671
13672         * stor-layout.c (bit_from_pos): Do not distribute the conversion.
13673
13674 2017-09-21  Segher Boessenkool  <segher@kernel.crashing.org>
13675
13676         * haifa-sched.c: Rename insn_cost to insn_sched_cost.
13677         * sched-rgn.c: Ditto.
13678         * sel-sched-ir.c: Ditto.
13679
13680 2017-09-21  Alexander Monakov  <amonakov@ispras.ru>
13681
13682         * toplev.h (set_random_seed): Adjust return type.
13683         * toplev.c (init_local_tick): Move eager initialization of random_seed
13684         to get_random_seed.  Adjust comment.
13685         (init_random_seed): Inline to get_random_seed, delete.
13686         (get_random_seed): Initialize random_seed lazily.
13687         (set_random_seed): Do not return previous value.
13688         (print_switch_value): Do not call get_random_seed.
13689
13690 2017-09-21  Evgeny Kudryashov  <kudryashov@ispras.ru>
13691
13692         * cgraph.c (delete_function_version): New, broken out from...
13693         (cgraph_node::delete_function_version): ...here.  Rename to
13694         cgraph_node::delete_function_version_by_decl.  Update all uses.
13695         (cgraph_node::remove): Call delete_function_version.
13696
13697 2017-09-21  Jakub Jelinek  <jakub@redhat.com>
13698
13699         PR sanitizer/81715
13700         * tree-inline.c (expand_call_inline): Emit clobber stmts for
13701         VAR_DECLs to which addressable non-volatile parameters are mapped
13702         and for id->retvar after the return value assignment.  Clear
13703         id->retval and id->retbnd after inlining.
13704
13705 2017-09-21  Richard Biener  <rguenther@suse.de>
13706
13707         PR tree-optimization/82276
13708         PR tree-optimization/82244
13709         * tree-vrp.c (build_assert_expr_for): Set
13710         SSA_NAME_OCCURS_IN_ABNORMAL_PHI if the variable we assert on
13711         has it set.
13712         (remove_range_assertions): Revert earlier change.
13713
13714 2017-09-21  Wilco Dijkstra  <wdijkstr@arm.com>
13715
13716         PR target/71951
13717         * config/aarch64/aarch64.h (LIBGCC2_UNWIND_ATTRIBUTE): Define.
13718
13719 2017-09-21  Richard Biener  <rguenther@suse.de>
13720
13721         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
13722         Restore valid IL after code generation errors.
13723         * graphite.c (graphite_transform_loops): Diagnose code
13724         generation issues as MSG_MISSED_OPTIMIZATION and continue
13725         with processing SCOPs.
13726
13727 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
13728             Alan Hayward  <alan.hayward@arm.com>
13729             David Sherwood  <david.sherwood@arm.com>
13730
13731         * calls.c (compute_argument_addresses): Use simplify_gen_binary
13732         rather than choosing between plus_constant and gen_rtx_<CODE>.
13733         * expr.c (emit_push_insn): Likewise.
13734         (expand_expr_real_2): Likewise.
13735
13736 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
13737             Alan Hayward  <alan.hayward@arm.com>
13738             David Sherwood  <david.sherwood@arm.com>
13739
13740         * loop-unroll.c (split_iv): Call copy_rtx on the step.
13741
13742 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
13743             Alan Hayward  <alan.hayward@arm.com>
13744             David Sherwood  <david.sherwood@arm.com>
13745
13746         * tree.c (find_atomic_core_type): Check tree_fits_uhwi_p before
13747         calling tree_to_uhwi.
13748
13749 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
13750             Alan Hayward  <alan.hayward@arm.com>
13751             David Sherwood  <david.sherwood@arm.com>
13752
13753         * tree-ssa-ccp.c (get_value_for_expr): Use a positive test for
13754         INTEGER_CST rather than a negative test for ADDR_EXPR.
13755
13756 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
13757             Alan Hayward  <alan.hayward@arm.com>
13758             David Sherwood  <david.sherwood@arm.com>
13759
13760         * tree-vrp.c (extract_range_from_binary_expr_1): Check
13761         int_cst_rangeN before calling value_range_constant_singleton (&vrN).
13762
13763 2017-09-21  Richard Biener  <rguenther@suse.de>
13764
13765         PR tree-optimization/71351
13766         * graphite-isl-ast-to-gimple.c (translate_isl_ast_to_gimple::
13767         graphite_create_new_loop_guard): Remove, fold remaining parts
13768         into caller ...
13769         (translate_isl_ast_node_for): ... here and simplify.
13770
13771 2017-09-21  Jakub Jelinek  <jakub@redhat.com>
13772
13773         PR target/82260
13774         * config/i386/i386.md (*movqi_internal): Replace (=q,q) alternative
13775         with (=Q,Q), (=R,R) and (=r,r) alternatives, only enable the
13776         latter two for 64-bit, renumber alternatives, for -Os imov (=q,n)
13777         alternative always use QI mode, for -Os imov (=R,R) alternative
13778         always use SI mode, for imov (=Q,Q) or (=r,r) alternatives
13779         ignore -Os.
13780
13781 2017-09-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13782             Jeff Law  <law@redhat.com>
13783
13784         * config/s390/s390.c (MIN_UNROLL_PROBES): Define.
13785         (allocate_stack_space): New function, partially extracted from
13786         s390_emit_prologue.
13787         (s390_emit_prologue): Track offset to most recent stack probe.
13788         Code to allocate space moved into allocate_stack_space.
13789         Dump actions when no stack is allocated.
13790         (s390_prologue_plus_offset): New function.
13791         (s390_emit_stack_probe): Likewise.
13792
13793 2017-09-20  Alexandre Oliva  <aoliva@redhat.com>
13794
13795         * common.opt (Wa, Wl, Wp, g, gz=): Add
13796         RejectNegative.
13797         (gno-column-info): Remove.
13798         (gcolumn-info): Drop RejectNegative.
13799         (gno-): New prefix.
13800         (gno-record-gcc-switches): Remove.
13801         (grecord-gcc-switches): Drop RejectNegative.
13802         (gno-split-dwarf): Remove.
13803         (gsplit-dwarf): Drop RejectNegative.
13804         (gno-strict-dwarf): Remove.
13805         (gstrict-dwarf): Drop RejectNegative.
13806         * config/darwin.opt (gfull, gused): Add RejectNegative.
13807         * dwarf2out.c (gen_producer_string): Drop
13808         gno-record-gcc-switches handler.
13809         * optc-gen.awk: Add g to prefixes with negative forms.
13810         * opts-common.c (remapping_prefix_p): New.
13811         (find_opt): Check it.
13812         (generate_canonical_option): Test g prefix.
13813         (option_map): Add -gno- mapping.
13814         (add_misspelling_candidates): Check remapping_prefix_p.
13815
13816 2017-09-20  Jeff Law  <law@redhat.com>
13817
13818         * config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Fix
13819         thinko in stack clash protection support.
13820
13821         * explow.c (compute_stack_clash_protection_loop_data): Use
13822         CONST_INT_P instead of explicit test.  Verify object is a
13823         CONST_INT_P before looking at INTVAL.
13824         (anti_adjust_stack_and_probe_stack_clash): Use CONST_INT_P
13825         instead of explicit test.
13826
13827 2017-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
13828
13829         PR target/77687
13830         * config/rs6000/rs6000.md (stack_restore_tie): Store to a scratch
13831         address instead of to r1 and r11.
13832
13833 2017-09-20  Sebastian Peryt  <sebastian.peryt@intel.com>
13834
13835         * config.gcc: Support "knm".
13836         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "knm".
13837         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13838         PROCESSOR_KNM.
13839         * config/i386/i386.c (m_KNM): Define.
13840         (processor_target_table): Add "knm".
13841         (PTA_KNM): Define.
13842         (ix86_option_override_internal): Add "knm".
13843         (ix86_issue_rate): Add PROCESSOR_KNM.
13844         (ix86_adjust_cost): Ditto.
13845         (ia32_multipass_dfa_lookahead): Ditto.
13846         (get_builtin_code_for_version): Handle PROCESSOR_KNM.
13847         (fold_builtin_cpu): Add M_INTEL_KNM.
13848         * config/i386/i386.h (processor_costs): Define TARGET_KNM.
13849         (processor_type): Add PROCESSOR_KNM.
13850         * config/i386/x86-tune.def: Add m_KNM.
13851         * doc/invoke.texi: Add knm as x86 -march=/-mtune= CPU type.
13852
13853 2017-09-20  Richard Biener  <rguenther@suse.de>
13854
13855         PR tree-optimization/80213
13856         * graphite-scop-detection.c (trivially_empty_bb_p): Labels
13857         are allowed in empty BBs as well.
13858         (canonicalize_loop_closed_ssa): Also look for other complex
13859         edges.
13860         (scop_detection::get_sese): Include the loop-closed PHI block
13861         in loop SESEs.
13862         (scop_detection::merge_sese): Remove code adding extra blocks.
13863         (scop_detection::region_has_one_loop): Adjust for get_sese changes.
13864         (build_scops): Assert the final returned scop is invalid.
13865
13866 2017-09-20  Richard Biener  <rguenther@suse.de>
13867
13868         PR tree-optimization/82264
13869         * tree-ssa-sccvn.c (vn_phi_eq): Use safe_dyn_cast to check
13870         for GIMPLE_CONDs.
13871         (vn_phi_lookup): Likewise.
13872         (vn_phi_insert): Likewise.
13873
13874 2017-09-20  Jakub Jelinek  <jakub@redhat.com>
13875
13876         * dwarf2out.c (tree_add_const_value_attribute): For INTEGER_CST
13877         that fits into uhwi or shwi, add DW_AT_const_value regardless
13878         of early_dwarf without going through RTL, using add_AT_unsigned
13879         or add_AT_int.
13880
13881         * dwarf2out.c (DEBUG_LTO_DWO_INFO_SECTION): Reorder defines.
13882         (DEBUG_LTO_ABBREV_SECTION): Likewise.
13883         (DEBUG_LTO_MACINFO_SECTION): Likewise.
13884         (DEBUG_MACRO_SECTION): Likewise.
13885         (DEBUG_LTO_MACRO_SECTION): Likewise.
13886         (DEBUG_STR_DWO_SECTION): Likewise.
13887         (DEBUG_LTO_STR_DWO_SECTION): Likewise.
13888         (DEBUG_LTO_LINE_SECTION): Drop .dwo suffix from the name.
13889         (DEBUG_LTO_DWO_LINE_SECTION): Define.
13890         (DEBUG_LTO_LINE_STR_SECTION): Define.
13891         (init_sections_and_labels): Initialize debug_line_str_section
13892         variable.  Initialize debug_loc_section for -gdwarf-5 to
13893         DEBUG_LOCLISTS_SECTION.  Formatting fixes.
13894
13895 2017-09-20  Richard Biener  <rguenther@suse.de>
13896
13897         * graphite-sese-to-poly.c (extract_affine): Properly handle
13898         POINTER_PLUS_EXPR, BIT_NOT_EXPR and conversion to signed.
13899
13900 2017-09-20  Richard Biener  <rguenther@suse.de>
13901
13902         PR tree-optimization/81373
13903         * graphite-scop-detection.c (build_cross_bb_scalars_def):
13904         Force SESE live-out defs to be handled even if they are
13905         scev_analyzable_p.
13906
13907 2017-09-19  Jeff Law  <law@redhat.com>
13908
13909         * combine-stack-adj.c (combine_stack_adjustments_for_block): Do
13910         nothing for stack adjustments with REG_STACK_CHECK.
13911         * sched-deps.c (parse_add_or_inc): Reject insns with
13912         REG_STACK_CHECK from dependency breaking.
13913         * config/i386/i386.c (pro_epilogue_adjust_stack): Return insn.
13914         (ix86_adjust_satck_and_probe_stack_clash): Add REG_STACK_NOTEs.
13915         * reg-notes.def (STACK_CHECK): New note.
13916
13917         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): New.
13918         (ix86_expand_prologue): Dump stack clash info as needed.
13919         Call ix86_adjust_stack_and_probe_stack_clash as needed.
13920
13921         * function.c (dump_stack_clash_frame_info): New function.
13922         * function.h (dump_stack_clash_frame_info): Prototype.
13923         (enum stack_clash_probes): New enum.
13924
13925         * config/alpha/alpha.c (alpha_expand_prologue): Also check
13926         flag_stack_clash_protection.
13927         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Likewise.
13928         (arm_expand_prologue, thumb1_expand_prologue): Likewise.
13929         (arm_frame_pointer_required): Likewise.
13930         * config/ia64/ia64.c (ia64_compute_frame_size): Likewise.
13931         (ia64_expand_prologue): Likewise.
13932         * config/mips/mips.c (mips_expand_prologue): Likewise.
13933         * config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Likewise.
13934         * config/sparc/sparc.c (sparc_expand_prologue): Likewise.
13935         (sparc_flat_expand_prologue): Likewise.
13936         * config/spu/spu.c (spu_expand_prologue): Likewise.
13937
13938         * explow.c: Include "params.h".
13939         (anti_adjust_stack_and_probe_stack_clash): New function.
13940         (get_stack_check_protect): Likewise.
13941         (compute_stack_clash_protection_loop_data): Likewise.
13942         (emit_stack_clash_protection_loop_start): Likewise.
13943         (emit_stack_clash_protection_loop_end): Likewise.
13944         (allocate_dynamic_stack_space): Use get_stack_check_protect.
13945         Use anti_adjust_stack_and_probe_stack_clash.
13946         * explow.h (compute_stack_clash_protection_loop_data): Prototype.
13947         (emit_stack_clash_protection_loop_start): Likewise.
13948         (emit_stack_clash_protection_loop_end): Likewise.
13949         * rtl.h (get_stack_check_protect): Prototype.
13950         * target.def (stack_clash_protection_final_dynamic_probe): New hook.
13951         * targhooks.c (default_stack_clash_protection_final_dynamic_probe): New.
13952         * targhooks.h (default_stack_clash_protection_final_dynamic_probe):
13953         Prototype.
13954         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE):
13955         Add @hook.
13956         * doc/tm.texi: Rebuilt.
13957         * config/aarch64/aarch64.c (aarch64_expand_prologue): Use
13958         get_stack_check_protect.
13959         * config/alpha/alpha.c (alpha_expand_prologue): Likewise.
13960         * config/arm/arm.c (arm_expand_prologue): Likewise.
13961         (arm_frame_pointer_required): Likewise.
13962         * config/i386/i386.c (ix86_expand_prologue): Likewise.
13963         * config/ia64/ia64.c (ia64_expand_prologue): Likewise.
13964         * config/mips/mips.c (mips_expand_prologue): Likewise.
13965         * config/powerpcspe/powerpcspe.c (rs6000_emit_prologue): Likewise.
13966         * config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise.
13967         * config/sparc/sparc.c (sparc_expand_prologue): Likewise.
13968         (sparc_flat_expand_prologue): Likewise.
13969
13970         * common.opt (-fstack-clash-protection): New option.
13971         * flag-types.h (enum stack_check_type): Note difference between
13972         -fstack-check= and -fstack-clash-protection.
13973         * params.def (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE): New PARAM.
13974         (PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Likewise.
13975         * toplev.c (process_options): Issue warnings/errors for cases
13976         not handled with -fstack-clash-protection.
13977         * doc/invoke.texi (-fstack-clash-protection): Document new option.
13978         (-fstack-check): Note additional problem with -fstack-check=generic.
13979         Note that -fstack-check is primarily for Ada and refer users
13980         to -fstack-clash-protection for stack-clash-protection.
13981         Document new params for stack clash protection.
13982
13983 2017-09-19  Uros Bizjak  <ubizjak@gmail.com>
13984
13985         * config/i386/i386.c (ix86_split_long_move): Do not handle
13986         address used for LEA in a special way.
13987
13988 2017-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
13989
13990         * simplify-rtx.c (simplify_binary_operation_1): Fix typo in comment.
13991
13992 2017-09-19  Martin Sebor  <msebor@redhat.com>
13993
13994         PR c/81854
13995         * cgraphunit.c (handle_alias_pairs): Reject aliases between functions
13996         of incompatible types.
13997
13998 2017-09-19  Will Schmidt  <will_schmidt@vnet.ibm.com>
13999
14000         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
14001         for early folding of vector loads (ALTIVEC_BUILTIN_LVX_*).
14002         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14003         Remove obsoleted code for handling ALTIVEC_BUILTIN_VEC_LD.
14004
14005 2017-09-19  Richard Biener  <rguenther@suse.de>
14006
14007         PR tree-optimization/82244
14008         * tree-vrp.c (remove_range_assertions): Do not propagate
14009         a constant to abnormals but replace the assert with a copy.
14010
14011 2017-09-19  Alexander Monakov  <amonakov@ispras.ru>
14012
14013         PR rtl-optimization/57878
14014         PR rtl-optimization/68988
14015         * lra-assigns.c (reload_pseudo_compare_func): Remove fragmentation
14016         avoidance test involving non_reload_pseudos.  Move frequency test
14017         below the general fragmentation avoidance test.
14018
14019 2017-09-19  Richard Biener  <rguenther@suse.de>
14020
14021         PR tree-optimization/69728
14022         * graphite-sese-to-poly.c (schedule_error): New global.
14023         (add_loop_schedule): Handle empty domain by failing the
14024         schedule.
14025         (build_original_schedule): Handle schedule_error.
14026
14027 2017-09-19  Richard Biener  <rguenther@suse.de>
14028
14029         * graphite-scop-detection.c (scop_detection::can_represent_loop):
14030         Do not iterate to sibling loops but only to siblings of inner
14031         loops.
14032
14033 2017-09-18  Andreas Schwab  <schwab@linux-m68k.org>
14034
14035         PR target/81613
14036         * config/m68k/m68k.md (moveq feeding equality comparison): Check
14037         that the registers are different.
14038
14039 2017-09-18  Uros Bizjak  <ubizjak@gmail.com>
14040
14041         * config/i386/i386.c (fold_builtin_cpu): Add M_AMDFAM17H
14042         to processor_model and "amdfam17h" to arch_names_table.
14043         * doc/extend.texi (__builtin_cpu_is): Document amdfam17h CPU name.
14044
14045 2017-09-18  Jakub Jelinek  <jakub@redhat.com>
14046
14047         PR c/82234
14048         * doc/extend.texi: Add @findex entry for __builtin_shuffle.
14049
14050 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
14051             Alan Hayward  <alan.hayward@arm.com>
14052             David Sherwood  <david.sherwood@arm.com>
14053
14054         * tree-vectorizer.h (vect_slp_analyze_operations): Replace parameters
14055         with a vec_info *.
14056         * tree-vect-loop.c (vect_analyze_loop_operations): Update call
14057         accordingly.
14058         * tree-vect-slp.c (vect_slp_analyze_node_operations): Add vec_info *
14059         parameter.  Set SLP_TREE_NUMBER_OF_VEC_STMTS here rather than in
14060         vect_schedule_slp_instance.
14061         (vect_slp_analyze_operations): Replace parameters with a vec_info *.
14062         Update call to vect_slp_analyze_node_operations.  Simplify return
14063         value.
14064         (vect_slp_analyze_bb_1): Update call accordingly.
14065         (vect_schedule_slp_instance): Remove vectorization_factor parameter.
14066         Don't calculate SLP_TREE_NUMBER_OF_VEC_STMTS here.
14067         (vect_schedule_slp): Update call accordingly.
14068
14069 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
14070             Alan Hayward  <alan.hayward@arm.com>
14071             David Sherwood  <david.sherwood@arm.com>
14072
14073         * tree-vect-data-refs.c (vect_get_smallest_scalar_type): Cope
14074         with types that aren't in fact scalar.
14075
14076 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
14077
14078         * tree-vect-slp.c (vect_record_max_nunits): New function,
14079         split out from...
14080         (vect_build_slp_tree_1): ...here.
14081         (vect_build_slp_tree_2): Call it for phis too.
14082
14083 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
14084
14085         * tree-vect-stmts.c (vectorizable_mask_load_store): Pass mask_vectype
14086         to vect_get_vec_def_for_operand when getting the mask operand.
14087
14088 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
14089             Alan Hayward  <alan.hayward@arm.com>
14090             David Sherwood  <david.sherwood@arm.com>
14091
14092         * tree-vect-loop.c (vectorizable_live_operation): Fix type of
14093         bitstart.
14094
14095 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
14096             Alan Hayward  <alan.hayward@arm.com>
14097             David Sherwood  <david.sherwood@arm.com>
14098
14099         * tree-vect-loop.c (vectorizable_live_operation): Fix element size
14100         calculation for vector booleans.
14101
14102 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
14103             Alan Hayward  <alan.hayward@arm.com>
14104             David Sherwood  <david.sherwood@arm.com>
14105
14106         * tree-vect-stmts.c (can_vectorize_live_stmts): New function,
14107         split out from...
14108         (vect_transform_stmt): ...here.
14109         (vect_analyze_stmt): Use it instead of calling
14110         vectorizable_live_operation directly.
14111
14112 2017-09-18  Cesar Philippidis  <cesar@codesourcery.com>
14113
14114         * omp-offload.c (oacc_xform_loop): Enable SIMD vectorization on
14115         non-SIMT targets in acc vector loops.
14116
14117 2017-09-18  Claudiu Zissulescu  <claziss@synopsys.com>
14118
14119         * configure.ac: Add arc and check if assembler supports gdwarf2.
14120         * configure: Regenerate.
14121
14122 2017-09-18  Richard Biener  <rguenther@suse.de>
14123
14124         PR tree-optimization/82220
14125         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Exclude
14126         epilogue niters from the min_profitable_iters compute.
14127
14128 2017-09-18  Jakub Jelinek  <jakub@redhat.com>
14129
14130         PR target/82145
14131         * config/i386/i386.c (ix86_init_large_pic_reg): Revert 2017-09-01
14132         changes.  Turn CODE_LABEL into NOTE_INSN_DELETED_LABEL immediately.
14133         (ix86_init_pic_reg): Revert 2017-09-01 changes.
14134
14135 2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>
14136
14137         PR target/81361
14138         * dwarf2cfi.c (add_cfis_to_fde): Do not generate DW_CFA_set_loc after
14139         switching to a new text section.
14140
14141 2017-09-18  Richard Biener  <rguenther@suse.de>
14142
14143         * graphite-scop-detection.c (scop_detection::stmt_has_simple_data_ref):
14144         Simplify.
14145         (build_alias_set): Reject aliases with no access function.
14146
14147 2017-09-18  Richard Biener  <rguenther@suse.de>
14148
14149         PR tree-optimization/79622
14150         * graphite-scop-detection.c (build_cross_bb_scalars_def): Properly
14151         handle PHIs.
14152         (build_cross_bb_scalars_use): Likewise.
14153
14154 2017-09-18  Pierre-Marie de Rodat  <derodat@adacore.com>
14155
14156         * cgraph.h (cgraph_thunk_info): Fix a typo in a comment.
14157
14158 2017-09-18  Alan Modra  <amodra@gmail.com>
14159
14160         PR target/81996
14161         * gcc/config/rs6000/rs6000.c (rs6000_return_addr): Use
14162         stack_pointer_rtx for count 0.  Update comments.  Break up
14163         large rtl expression.
14164
14165 2017-09-17  Daniel Santos  <daniel.santos@pobox.com>
14166
14167         * config/i386/i386.c (xlogue_layout::STUB_NAME_MAX_LEN):
14168         Increase to 20 bytes.
14169         (xlogue_layout::s_stub_names): Add an additional size-2 diminsion.
14170         (xlogue_layout::get_stub_name): Modify to select the appropairate sse
14171         or avx version of the stub.
14172
14173 2017-09-17  H.J. Lu  <hongjiu.lu@intel.com>
14174
14175         PR target/82166
14176         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Properly
14177         compute the minimum stack alignment.  Also update preferred stack
14178         boundary for leaf functions.
14179
14180 2017-09-16  Richard Sandiford  <richard.sandiford@linaro.org>
14181
14182         PR tree-optimization/82228
14183         * tree-vect-loop.c (vectorizable_live_operation): Move initialization
14184         of ncopies.
14185
14186 2017-09-16  Chung-Ju Wu  <jasonwucj@gmail.com>
14187
14188         * common/config/nds32/nds32-common.c
14189         (nds32_option_optimization_table): Refine formatting.
14190         (nds32_option_optimization_table): Use -fsched-pressure and
14191         -fomit-frame-pointer for specific optimization level.
14192
14193 2017-09-16  Chung-Ju Wu  <jasonwucj@gmail.com>
14194
14195         * config/nds32/nds32.c: Refine formatting and comments.
14196         * config/nds32/nds32.h: Likewise.
14197         * config/nds32/nds32.md: Likewise.
14198         * config/nds32/nds32-cost.c: Likewise.
14199         * config/nds32/nds32-isr.c: Likewise.
14200         * config/nds32/nds32-md-auxiliary.c: Likewise.
14201         * config/nds32/nds32-multiple.md: Likewise.
14202         * config/nds32/nds32-predicates.c: Likewise.
14203
14204 2017-09-15  Andrew Sutton  <andrew.n.sutton@gmail.com>
14205             Jakub Jelinek  <jakub@redhat.com>
14206
14207         Add support for -std=c++2a.
14208         * doc/cpp.texi (__cplusplus): Document value for -std=c++2a
14209         or -std=gnu+2a.
14210         * doc/invoke.texi: Document -std=c++2a and -std=gnu++2a.
14211
14212 2017-09-15  Steve Ellcey  <sellcey@cavium.com>
14213
14214         PR target/82066
14215         * doc/extend.texi (Common Function Attributes): Add 
14216         references to ARM, AArch64, and S/390 specific attributes.
14217         (Function Specific Option Pragmas): Add AArch64 and S/390
14218         to list of back ends that support the target pragma.
14219
14220 2017-09-15  Nathan Sidwell  <nathan@acm.org>
14221
14222         * doc/standards.texi: Fix C++17 description.  Update URLs for
14223         C++11 & 14.
14224
14225 2017-09-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14226
14227         * common.opt (Wcast-align=strict): New warning option.
14228         * doc/invoke.texi: Document -Wcast-align=strict. 
14229
14230 2017-09-15  Pierre-Marie de Rodat  <derodat@adacore.com>
14231
14232         * cgraph.h (cgraph_thunk_info): Add comments.
14233         * cgraph.c (cgraph_node::create_thunk): Adjust comment, make
14234         assert for VIRTUAL_* arguments stricter.
14235
14236 2017-09-15  Jackson Woodruff  <jackson.woodruff@arm.com>
14237
14238         PR tree-optimization/71026
14239         * match.pd: Move RDIV patterns from fold-const.c
14240         * fold-const.c (distribute_real_division): Removed.
14241         (fold_binary_loc): Remove calls to distribute_real_divison.
14242
14243 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
14244
14245         * doc/invoke.texi: Document -std=c++17 and -std=gnu++17 and document
14246         c++1z and gnu++1z as deprecated.  Change other references to
14247         -std=c++1z to -std=c++17 and -std=gnu++1z to -std=gnu++17.
14248         Change -Wc++1z-compat to -Wc++17-compat.
14249         * doc/cpp.texi: Document -std=c++17 defines __cplusplus 201703L.
14250         * dwarf2out.c (highest_c_language): Handle C++17.
14251         (gen_compile_unit_die): Likewise.
14252
14253 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
14254
14255         PR rtl-optimization/82192
14256         * combine.c (make_extraction): Don't look through non-paradoxical
14257         SUBREGs or TRUNCATE if pos + len is or might be bigger than
14258         inner's mode.
14259
14260 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
14261             Alan Hayward  <alan.hayward@arm.com>
14262             David Sherwood  <david.sherwood@arm.com>
14263
14264         * target.def (function_arg_offset): New hook.
14265         * targhooks.h (default_function_arg_offset): Declare.
14266         * targhooks.c (default_function_arg_offset): New function.
14267         * function.c (locate_and_pad_parm): Use
14268         targetm.calls.function_arg_offset instead of FUNCTION_ARG_OFFSET.
14269         * doc/tm.texi.in (FUNCTION_ARG_OFFSET): Replace with...
14270         (TARGET_FUNCTION_ARG_OFFSET): ...this.
14271         * doc/tm.texi: Regenerate.
14272         * config/spu/spu.h (FUNCTION_ARG_OFFSET): Delete.
14273         * config/spu/spu.c (spu_function_arg_offset): New function.
14274         (TARGET_FUNCTION_ARG_OFFSET): Redefine.
14275         * system.h (FUNCTION_ARG_OFFSET): Poison.
14276
14277 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
14278             Alan Hayard  <alan.hayward@arm.com>
14279             David Sherwood  <david.sherwood@arm.com>
14280
14281         * target.def (truly_noop_truncation): New hook.
14282         (mode_rep_extended): Refer to TARGET_TRULY_NOOP_TRUNCATION rather
14283         than TRULY_NOOP_TRUNCATION.
14284         * hooks.h (hook_bool_uint_uint_true): Declare.
14285         * hooks.c (hook_bool_uint_uint_true): New function.
14286         * doc/tm.texi.in (TRULY_NOOP_TRUNCATION): Replace with...
14287         (TARGET_TRULY_NOOP_TRUNCATION): ...this.
14288         * doc/tm.texi: Regenerate.
14289         * combine.c (make_extraction): Refer to TARGET_TRULY_NOOP_TRUNCATION
14290         rather than TRULY_NOOP_TRUNCATION in comments.
14291         (simplify_comparison): Likewise.
14292         (record_truncated_value): Likewise.
14293         * expmed.c (extract_bit_field_1): Likewise.
14294         (extract_split_bit_field): Likewise.
14295         * convert.c (convert_to_integer_1): Use targetm.truly_noop_truncation
14296         instead of TRULY_NOOP_TRUNCATION.
14297         * function.c (assign_parm_setup_block): Likewise.
14298         * machmode.h (TRULY_NOOP_TRUNCATION_MODES_P): Likewise.
14299         * rtlhooks.c: Include target.h.
14300         * config/aarch64/aarch64.h (TRULY_NOOP_TRUNCATION): Delete.
14301         * config/alpha/alpha.h (TRULY_NOOP_TRUNCATION): Delete.
14302         * config/arc/arc.h (TRULY_NOOP_TRUNCATION): Delete.
14303         * config/arm/arm.h (TRULY_NOOP_TRUNCATION): Delete.
14304         * config/avr/avr.h (TRULY_NOOP_TRUNCATION): Delete.
14305         * config/bfin/bfin.h (TRULY_NOOP_TRUNCATION): Delete.
14306         * config/c6x/c6x.h (TRULY_NOOP_TRUNCATION): Delete.
14307         * config/cr16/cr16.h (TRULY_NOOP_TRUNCATION): Delete.
14308         * config/cris/cris.h (TRULY_NOOP_TRUNCATION): Delete.
14309         * config/epiphany/epiphany.h (TRULY_NOOP_TRUNCATION): Delete.
14310         * config/fr30/fr30.h (TRULY_NOOP_TRUNCATION): Delete.
14311         * config/frv/frv.h (TRULY_NOOP_TRUNCATION): Delete.
14312         * config/ft32/ft32.h (TRULY_NOOP_TRUNCATION): Delete.
14313         * config/h8300/h8300.h (TRULY_NOOP_TRUNCATION): Delete.
14314         * config/i386/i386.h (TRULY_NOOP_TRUNCATION): Delete.
14315         * config/ia64/ia64.h (TRULY_NOOP_TRUNCATION): Delete.
14316         * config/iq2000/iq2000.h (TRULY_NOOP_TRUNCATION): Delete.
14317         * config/lm32/lm32.h (TRULY_NOOP_TRUNCATION): Delete.
14318         * config/m32c/m32c.h (TRULY_NOOP_TRUNCATION): Delete.
14319         * config/m32r/m32r.h (TRULY_NOOP_TRUNCATION): Delete.
14320         * config/m68k/m68k.h (TRULY_NOOP_TRUNCATION): Delete.
14321         * config/mcore/mcore.h (TRULY_NOOP_TRUNCATION): Delete.
14322         * config/microblaze/microblaze.h (TRULY_NOOP_TRUNCATION): Delete.
14323         * config/mips/mips.h (TRULY_NOOP_TRUNCATION): Delete.
14324         * config/mips/mips.c (mips_truly_noop_truncation): New function.
14325         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
14326         * config/mips/mips.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
14327         rather than TRULY_NOOP_TRUNCATION in comments.
14328         * config/mmix/mmix.h (TRULY_NOOP_TRUNCATION): Delete.
14329         * config/mn10300/mn10300.h (TRULY_NOOP_TRUNCATION): Delete.
14330         * config/moxie/moxie.h (TRULY_NOOP_TRUNCATION): Delete.
14331         * config/msp430/msp430.h (TRULY_NOOP_TRUNCATION): Delete.
14332         * config/nds32/nds32.h (TRULY_NOOP_TRUNCATION): Delete.
14333         * config/nios2/nios2.h (TRULY_NOOP_TRUNCATION): Delete.
14334         * config/nvptx/nvptx.h (TRULY_NOOP_TRUNCATION): Delete.
14335         * config/pa/pa.h (TRULY_NOOP_TRUNCATION): Delete.
14336         * config/pdp11/pdp11.h (TRULY_NOOP_TRUNCATION): Delete.
14337         * config/powerpcspe/powerpcspe.h (TRULY_NOOP_TRUNCATION): Delete.
14338         * config/riscv/riscv.h (TRULY_NOOP_TRUNCATION): Delete.
14339         * config/riscv/riscv.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
14340         rather than TRULY_NOOP_TRUNCATION in comments.
14341         * config/rl78/rl78.h (TRULY_NOOP_TRUNCATION): Delete.
14342         * config/rs6000/rs6000.h (TRULY_NOOP_TRUNCATION): Delete.
14343         * config/rx/rx.h (TRULY_NOOP_TRUNCATION): Delete.
14344         * config/s390/s390.h (TRULY_NOOP_TRUNCATION): Delete.
14345         * config/sh/sh.h (MAYBE_BASE_REGISTER_RTX_P): Remove
14346         TRULY_NOOP_TRUNCATION condition.
14347         (MAYBE_INDEX_REGISTER_RTX_P): Likewise.
14348         (TRULY_NOOP_TRUNCATION): Delete.
14349         * config/sparc/sparc.h (TRULY_NOOP_TRUNCATION): Delete.
14350         * config/spu/spu.h (TRULY_NOOP_TRUNCATION): Delete.
14351         * config/spu/spu.c (spu_truly_noop_truncation): New function.
14352         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
14353         * config/stormy16/stormy16.h (TRULY_NOOP_TRUNCATION): Delete.
14354         * config/tilegx/tilegx.h (TRULY_NOOP_TRUNCATION): Delete.
14355         * config/tilegx/tilegx.c (tilegx_truly_noop_truncation): New fuction.
14356         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
14357         * config/tilegx/tilegx.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
14358         rather than TRULY_NOOP_TRUNCATION in comments.
14359         * config/tilepro/tilepro.h (TRULY_NOOP_TRUNCATION): Delete.
14360         * config/v850/v850.h (TRULY_NOOP_TRUNCATION): Delete.
14361         * config/vax/vax.h (TRULY_NOOP_TRUNCATION): Delete.
14362         * config/visium/visium.h (TRULY_NOOP_TRUNCATION): Delete.
14363         * config/xtensa/xtensa.h (TRULY_NOOP_TRUNCATION): Delete.
14364         * system.h (TRULY_NOOP_TRUNCATION): Poison.
14365
14366 2017-09-15  Christophe Lyon  <christophe.lyon@linaro.org>
14367
14368         PR target/67591
14369         * config/arm/arm.md (*cmp_and): Add enabled_for_depr_it attribute.
14370         (*cmp_ior): Likewise.
14371         (*ior_scc_scc): Add alternative for enabled_for_depr_it attribute.
14372         (*ior_scc_scc_cmp): Likewise.
14373         (*and_scc_scc): Likewise.
14374         (*and_scc_scc_cmp): Likewise.
14375
14376 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
14377             Alan Hayard  <alan.hayward@arm.com>
14378             David Sherwood  <david.sherwood@arm.com>
14379
14380         * target.def (can_change_mode_class): New hook.
14381         (mode_rep_extended): Refer to it instead of CANNOT_CHANGE_MODE_CLASS.
14382         (hard_regno_nregs): Likewise.
14383         * hooks.h (hook_bool_mode_mode_reg_class_t_true): Declare.
14384         * hooks.c (hook_bool_mode_mode_reg_class_t_true): New function.
14385         * doc/tm.texi.in (CANNOT_CHANGE_MODE_CLASS): Replace with...
14386         (TARGET_CAN_CHANGE_MODE_CLASS): ...this.
14387         (LOAD_EXTEND_OP): Update accordingly.
14388         * doc/tm.texi: Regenerate.
14389         * doc/rtl.texi: Refer to TARGET_CAN_CHANGE_MODE_CLASS instead of
14390         CANNOT_CHANGE_MODE_CLASS.
14391         * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): Replace with...
14392         (REG_CAN_CHANGE_MODE_P): ...this new macro.
14393         * combine.c (simplify_set): Update accordingly.
14394         * emit-rtl.c (validate_subreg): Likewise.
14395         * recog.c (general_operand): Likewise.
14396         * regcprop.c (mode_change_ok): Likewise.
14397         * reload1.c (choose_reload_regs): Likewise.
14398         (inherit_piecemeal_p): Likewise.
14399         * rtlanal.c (simplify_subreg_regno): Likewise.
14400         * postreload.c (reload_cse_simplify_set): Use REG_CAN_CHANGE_MODE_P
14401         instead of CANNOT_CHANGE_MODE_CLASS.
14402         (reload_cse_simplify_operands): Likewise.
14403         * reload.c (push_reload): Use targetm.can_change_mode_class
14404         instead of CANNOT_CHANGE_MODE_CLASS.
14405         (push_reload): Likewise.  Also use REG_CAN_CHANGE_MODE_P instead of
14406         REG_CANNOT_CHANGE_MODE_P.
14407         * config/alpha/alpha.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14408         * config/alpha/alpha.c (alpha_can_change_mode_class): New function.
14409         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14410         * config/arm/arm.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14411         * config/arm/arm.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14412         (arm_can_change_mode_class): New function.
14413         * config/arm/neon.md: Refer to TARGET_CAN_CHANGE_MODE_CLASS rather
14414         than CANNOT_CHANGE_MODE_CLASS in comments.
14415         * config/i386/i386.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14416         * config/i386/i386-protos.h (ix86_cannot_change_mode_class): Delete.
14417         * config/i386/i386.c (ix86_cannot_change_mode_class): Replace with...
14418         (ix86_can_change_mode_class): ...this new function, inverting the
14419         sense of the return value.
14420         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14421         * config/ia64/ia64.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14422         * config/ia64/ia64.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14423         (ia64_can_change_mode_class): New function.
14424         * config/m32c/m32c.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14425         * config/m32c/m32c-protos.h (m32c_cannot_change_mode_class): Delete.
14426         * config/m32c/m32c.c (m32c_cannot_change_mode_class): Replace with...
14427         (m32c_can_change_mode_class): ...this new function, inverting the
14428         sense of the return value.
14429         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14430         * config/mips/mips.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14431         * config/mips/mips-protos.h (mips_cannot_change_mode_class): Delete.
14432         * config/mips/mips.c (mips_cannot_change_mode_class): Replace with...
14433         (mips_can_change_mode_class): ...this new function, inverting the
14434         sense of the return value.
14435         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14436         * config/msp430/msp430.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14437         * config/msp430/msp430.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14438         (msp430_can_change_mode_class): New function.
14439         * config/nvptx/nvptx.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14440         * config/nvptx/nvptx.c (nvptx_can_change_mode_class): New function.
14441         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14442         * config/pa/pa32-regs.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14443         * config/pa/pa64-regs.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14444         * config/pa/pa-protos.h (pa_cannot_change_mode_class): Delete.
14445         * config/pa/pa.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14446         (pa_cannot_change_mode_class): Replace with...
14447         (pa_can_change_mode_class): ...this new function, inverting the
14448         sense of the return value.
14449         (pa_modes_tieable_p): Refer to TARGET_CAN_CHANGE_MODE_CLASS rather
14450         than CANNOT_CHANGE_MODE_CLASS in comments.
14451         * config/pdp11/pdp11.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14452         * config/pdp11/pdp11-protos.h (pdp11_cannot_change_mode_class): Delete.
14453         * config/pdp11/pdp11.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14454         (pdp11_cannot_change_mode_class): Replace with...
14455         (pdp11_can_change_mode_class): ...this new function, inverting the
14456         sense of the return value.
14457         * config/powerpcspe/powerpcspe.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14458         * config/powerpcspe/powerpcspe-protos.h
14459         (rs6000_cannot_change_mode_class_ptr): Delete.
14460         * config/powerpcspe/powerpcspe.c
14461         (rs6000_cannot_change_mode_class_ptr): Delete.
14462         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14463         (rs6000_option_override_internal): Assign to
14464         targetm.can_change_mode_class instead of
14465         rs6000_cannot_change_mode_class_ptr.
14466         (rs6000_cannot_change_mode_class): Replace with...
14467         (rs6000_can_change_mode_class): ...this new function, inverting the
14468         sense of the return value.
14469         (rs6000_debug_cannot_change_mode_class): Replace with...
14470         (rs6000_debug_can_change_mode_class): ...this new function.
14471         * config/riscv/riscv.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14472         * config/riscv/riscv.c (riscv_can_change_mode_class): New function.
14473         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14474         * config/rs6000/rs6000.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14475         * config/rs6000/rs6000-protos.h (rs6000_cannot_change_mode_class_ptr):
14476         Delete.
14477         * config/rs6000/rs6000.c (rs6000_cannot_change_mode_class_ptr): Delete.
14478         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14479         (rs6000_option_override_internal): Assign to
14480         targetm.can_change_mode_class instead of
14481         rs6000_cannot_change_mode_class_ptr.
14482         (rs6000_cannot_change_mode_class): Replace with...
14483         (rs6000_can_change_mode_class): ...this new function, inverting the
14484         sense of the return value.
14485         (rs6000_debug_cannot_change_mode_class): Replace with...
14486         (rs6000_debug_can_change_mode_class): ...this new function.
14487         * config/s390/s390.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14488         * config/s390/s390-protos.h (s390_cannot_change_mode_class): Delete.
14489         * config/s390/s390.c (s390_cannot_change_mode_class): Replace with...
14490         (s390_can_change_mode_class): ...this new function, inverting the
14491         sense of the return value.
14492         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14493         * config/sh/sh.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14494         * config/sh/sh-protos.h (sh_cannot_change_mode_class): Delete.
14495         * config/sh/sh.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14496         (sh_cannot_change_mode_class): Replace with...
14497         (sh_can_change_mode_class): ...this new function, inverting the
14498         sense of the return value.
14499         * config/sparc/sparc.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14500         * config/sparc/sparc.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14501         (sparc_can_change_mode_class): New function.
14502         * config/spu/spu.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14503         * config/spu/spu.c (spu_can_change_mode_class): New function.
14504         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14505         * config/visium/visium.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14506         * config/visium/visium.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14507         (visium_can_change_mode_class): New function.
14508         * system.h (CANNOT_CHANGE_MODE_CLASS): Poison.
14509
14510 2017-09-15  Richard Biener  <rguenther@suse.de>
14511
14512         PR tree-optimization/82217
14513         * tree-ssa-sccvn.c (visit_phi): Properly handle all VN_TOP
14514         but not undefined case.
14515
14516 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
14517
14518         PR target/82145
14519         * postreload.c (reload_cse_simplify_operands): Skip
14520         NOTE_INSN_DELETED_LABEL similarly to skipping CODE_LABEL.
14521
14522 2017-09-15  Richard Biener  <rguenther@suse.de>
14523
14524         PR tree-optimization/68823
14525         * graphite-scop-detection.c (build_alias_set): If we have a
14526         possible dependence check whether we can handle them by just
14527         looking at the DRs DR_ACCESS_FNs.
14528         (build_scops): If build_alias_set fails, fail the SCOP.
14529
14530 2017-09-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
14531
14532         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_1_HW): New macros
14533         to support float128 built-in functions that require the ISA 3.0
14534         hardware.
14535         (BU_FLOAT128_3_HW): Likewise.
14536         (SQRTF128): Add support for the IEEE 128-bit square root and fma
14537         built-in functions.
14538         (FMAF128): Likewise.
14539         (FMAQ): Likewise.
14540         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
14541         support for built-in functions that need the ISA 3.0 IEEE 128-bit
14542         floating point instructions.
14543         (rs6000_invalid_builtin): Likewise.
14544         (rs6000_builtin_mask_names): Likewise.
14545         * config/rs6000/rs6000.h (MASK_FLOAT128_HW): Likewise.
14546         (RS6000_BTM_FLOAT128_HW): Likewise.
14547         (RS6000_BTM_COMMON): Likewise.
14548         * config/rs6000/rs6000.md (fma<mode>4_hw): Add a generator
14549         function.
14550         * doc/extend.texi (RS/6000 built-in functions): Document the
14551         IEEE 128-bit floating point square root and fused multiply-add
14552         built-in functions.
14553
14554 2017-09-14  Pat Haugen  <pthaugen@us.ibm.com>
14555
14556         * config/rs6000/rs6000.c (rs6000_set_up_by_prologue): Make sure the TOC
14557         reg (r2) isn't in the set of registers defined in the prologue.
14558
14559 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
14560             Alan Hayward  <alan.hayward@arm.com>
14561             David Sherwood  <david.sherwood@arm.com>
14562
14563         * tree-vectorizer.h (_loop_vec_info): Add max_vectorization_factor.
14564         (LOOP_VINFO_MAX_VECT_FACTOR): New macro.
14565         (LOOP_VINFO_ORIG_VECT_FACTOR): Replace with...
14566         (LOOP_VINFO_ORIG_MAX_VECT_FACTOR): ...this new macro.
14567         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Update
14568         accordingly.
14569         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14570         max_vectorization_factor.
14571         (vect_analyze_loop_2): Set LOOP_VINFO_MAX_VECT_FACTOR.
14572
14573 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
14574             Alan Hayward  <alan.hayward@arm.com>
14575             David Sherwood  <david.sherwood@arm.com>
14576
14577         * tree-vectorizer.h (vect_min_worthwhile_factor): Delete.
14578         (vect_worthwhile_without_simd_p): Declare.
14579         * tree-vect-loop.c (vect_worthwhile_without_simd_p): New function.
14580         (vectorizable_reduction): Use it.
14581         * tree-vect-stmts.c (vectorizable_shift): Likewise.
14582         (vectorizable_operation): Likewise.
14583
14584 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
14585             Alan Hayward  <alan.hayward@arm.com>
14586             David Sherwood  <david.sherwood@arm.com>
14587
14588         * tree-vectorizer.h (vect_get_num_copies): New function.
14589         * tree-vect-data-refs.c (vect_get_data_access_cost): Use it.
14590         * tree-vect-loop.c (vectorizable_reduction): Likewise.
14591         (vectorizable_induction): Likewise.
14592         (vectorizable_live_operation): Likewise.
14593         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
14594         (vectorizable_bswap): Likewise.
14595         (vectorizable_call): Likewise.
14596         (vectorizable_conversion): Likewise.
14597         (vectorizable_assignment): Likewise.
14598         (vectorizable_shift): Likewise.
14599         (vectorizable_operation): Likewise.
14600         (vectorizable_store): Likewise.
14601         (vectorizable_load): Likewise.
14602         (vectorizable_condition): Likewise.
14603         (vectorizable_comparison): Likewise.
14604         (vect_analyze_stmt): Pass the slp node to vectorizable_live_operation.
14605
14606 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
14607             Alan Hayward  <alan.hayward@arm.com>
14608             David Sherwood  <david.sherwood@arm.com>
14609
14610         * tree-vect-loop.c (vectorizable_induction): Use gimple_build instead
14611         of vect_init_vector.
14612
14613 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
14614             Alan Hayward  <alan.hayward@arm.com>
14615             David Sherwood  <david.sherwood@arm.com>
14616
14617         * gimple-fold.h (gimple_build_vector_from_val): Declare, and provide
14618         an inline wrapper that provides a location.
14619         (gimple_build_vector): Likewise.
14620         * gimple-fold.c (gimple_build_vector_from_val): New function.
14621         (gimple_build_vector): Likewise.
14622         * tree-vect-loop.c (get_initial_def_for_reduction): Use the new
14623         functions to build the initial value.  Always return a gimple value.
14624         (get_initial_defs_for_reduction): Likewise.  Only compute
14625         neutral_vec once.
14626         (vect_create_epilog_for_reduction): Don't call force_gimple_operand or
14627         vect_init_vector on the results from get_initial_def(s)_for_reduction.
14628         (vectorizable_induction): Use gimple_build_vector rather than
14629         vect_init_vector.
14630
14631 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
14632             Alan Hayward  <alan.hayward@arm.com>
14633             David Sherwood  <david.sherwood@arm.com>
14634
14635         * target.h (vec_perm_indices): New typedef.
14636         (auto_vec_perm_indices): Likewise.
14637         * optabs-query.h: Include target.h
14638         (can_vec_perm_p): Take a vec_perm_indices *.
14639         * optabs-query.c (can_vec_perm_p): Likewise.
14640         (can_mult_highpart_p): Update accordingly.  Use auto_vec_perm_indices.
14641         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14642         * tree-vect-generic.c (lower_vec_perm): Likewise.
14643         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14644         (vect_grouped_load_supported): Likewise.
14645         (vect_shift_permute_load_chain): Likewise.
14646         (vect_permute_store_chain): Use auto_vec_perm_indices.
14647         (vect_permute_load_chain): Likewise.
14648         * fold-const.c (fold_vec_perm): Take vec_perm_indices.
14649         (fold_ternary_loc): Update accordingly.  Use auto_vec_perm_indices.
14650         Update uses of can_vec_perm_p.
14651         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Replace the
14652         mode with a number of elements.  Take a vec_perm_indices *.
14653         (vect_create_epilog_for_reduction): Update accordingly.
14654         Use auto_vec_perm_indices.
14655         (have_whole_vector_shift): Likewise.  Update call to can_vec_perm_p.
14656         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
14657         (vect_transform_slp_perm_load): Likewise.
14658         (vect_schedule_slp_instance): Use auto_vec_perm_indices.
14659         * tree-vectorizer.h (vect_gen_perm_mask_any): Take a vec_perm_indices.
14660         (vect_gen_perm_mask_checked): Likewise.
14661         * tree-vect-stmts.c (vect_gen_perm_mask_any): Take a vec_perm_indices.
14662         (vect_gen_perm_mask_checked): Likewise.
14663         (vectorizable_mask_load_store): Use auto_vec_perm_indices.
14664         (vectorizable_store): Likewise.
14665         (vectorizable_load): Likewise.
14666         (perm_mask_for_reverse): Likewise.  Update call to can_vec_perm_p.
14667         (vectorizable_bswap): Likewise.
14668
14669 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
14670             Alan Hayward  <alan.hayward@arm.com>
14671             David Sherwood  <david.sherwood@arm.com>
14672
14673         * tree.h (build_vector): Take a vec<tree> instead of a tree *.
14674         * tree.c (build_vector): Likewise.
14675         (build_vector_from_ctor): Update accordingly.
14676         (build_vector_from_val): Likewise.
14677         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
14678         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14679         * tree-vect-generic.c (add_rshift): Likewise.
14680         (expand_vector_divmod): Likewise.
14681         (optimize_vector_constructor): Likewise.
14682         * tree-vect-slp.c (vect_get_constant_vectors): Likewise.
14683         (vect_transform_slp_perm_load): Likewise.
14684         (vect_schedule_slp_instance): Likewise.
14685         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
14686         (vectorizable_call): Likewise.
14687         (vect_gen_perm_mask_any): Likewise.  Add elements in order.
14688         * expmed.c (make_tree): Likewise.
14689         * fold-const.c (fold_negate_expr_1): Use auto_vec<tree> when building
14690         a vector passed to build_vector.
14691         (fold_convert_const): Likewise.
14692         (exact_inverse): Likewise.
14693         (fold_ternary_loc): Likewise.
14694         (fold_relational_const): Likewise.
14695         (const_binop): Likewise.  Use VECTOR_CST_ELT directly when operating
14696         on VECTOR_CSTs, rather than going through vec_cst_ctor_to_array.
14697         (const_unop): Likewise.  Store the reduction accumulator in a
14698         variable rather than an array.
14699         (vec_cst_ctor_to_array): Take the number of elements as a parameter.
14700         (fold_vec_perm): Update calls accordingly.  Use auto_vec<tree> for
14701         the new vector, rather than constructing it after the input arrays.
14702         (native_interpret_vector): Use auto_vec<tree> when building
14703         a vector passed to build_vector.  Add elements in order.
14704         * tree-vect-loop.c (get_initial_defs_for_reduction): Use
14705         auto_vec<tree> when building a vector passed to build_vector.
14706         (vect_create_epilog_for_reduction): Likewise.
14707         (vectorizable_induction): Likewise.
14708         (get_initial_def_for_reduction): Likewise.  Fix indentation of
14709         case statements.
14710         * config/sparc/sparc.c (sparc_handle_vis_mul8x16): Change n_elts
14711         to a vec<tree> *.
14712         (sparc_fold_builtin): Use auto_vec<tree> when building a vector
14713         passed to build_vector.
14714
14715 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
14716             Alan Hayward  <alan.hayward@arm.com>
14717             David Sherwood  <david.sherwood@arm.com>
14718
14719         * tree-core.h (tree_base::u): Add an "nelts" field.
14720         (tree_vector): Use VECTOR_CST_NELTS as the length.
14721         * tree.c (tree_size): Likewise.
14722         (make_vector): Initialize VECTOR_CST_NELTS.
14723         * tree.h (VECTOR_CST_NELTS): Use the u.nelts field.
14724         * cfgexpand.c (expand_debug_expr): Use VECTOR_CST_NELTS instead of
14725         TYPE_VECTOR_SUBPARTS.
14726         * expr.c (const_vector_mask_from_tree): Consistently use "units"
14727         as the number of units, setting it from VECTOR_CST_NELTS.
14728         (const_vector_from_tree): Likewise.
14729         * fold-const.c (negate_expr_p): Use VECTOR_CST_NELTS instead of
14730         TYPE_VECTOR_SUBPARTS for the number of elements in a VECTOR_CST.
14731         (fold_negate_expr_1): Likewise.
14732         (fold_convert_const): Likewise.
14733         (const_binop): Likewise.  Differentiate the number of output and
14734         input elements.
14735         (const_unop): Likewise.
14736         (fold_ternary_loc): Use VECTOR_CST_NELTS for the number of elements
14737         in a VECTOR_CST, asserting that it is the same as TYPE_VECTOR_SUBPARTS
14738         in cases that did the opposite.
14739
14740 2017-09-14  Richard Biener  <rguenther@suse.de>
14741
14742         * tree-ssa-sccvn.c (visit_phi): Merge undefined values similar
14743         to VN_TOP.
14744
14745 2017-09-14  Eric Botcazou  <ebotcazou@adacore.com>
14746
14747         * dwarf2out.c (dwarf2out_source_line): Remove superfluous test.
14748
14749 2017-09-14  Jakub Jelinek  <jakub@redhat.com>
14750
14751         PR target/81325
14752         * cfgbuild.c (find_bb_boundaries): Ignore debug insns in decisions
14753         if and where to split a bb, except for splitting before debug insn
14754         sequences followed by non-label real insn.  Delete debug insns
14755         in between basic blocks.
14756
14757         * combine.c (make_compound_operation_int): Formatting fixes.
14758
14759         * config/alpha/elf.h (LINK_EH_SPEC): Add -static-pie support.
14760         * config/alpha/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
14761         * config/netbsd.h (LINK_EH_SPEC): Likewise.
14762         * config/sol2.h (LINK_EH_SPEC): Likewise.
14763         * config/arm/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
14764         * config/s390/linux.h (LINK_SPEC): Likewise.
14765         * config/freebsd.h (LINK_EH_SPEC): Likewise.
14766         * config/openbsd.h (LINK_EH_SPEC): Likewise.
14767         * config/lm32/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
14768         * config/aarch64/aarch64-linux.h (LINUX_TARGET_LINK_SPEC): Likewise.
14769         * config/powerpcspe/sysv4.h (LINK_EH_SPEC): Likewise.
14770         * config/bfin/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
14771         * config/i386/gnu-user64.h (GNU_USER_TARGET_LINK_SPEC): Fix a typo.
14772         * config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Formatting fix.
14773
14774 2017-09-13  Jakub Jelinek  <jakub@redhat.com>
14775
14776         * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Add -static-pie
14777         support.
14778         (ENDFILE_LINUX_SPEC): Likewise.
14779         (LINK_EH_SPEC): Likewise.
14780         * config/rs6000/linux64.h (LINK_SHLIB_SPEC): Likewise.
14781         (LINK_OS_LINUX_SPEC32): Likewise.
14782         (LINK_OS_LINUX_SPEC64): Likewise.
14783         * config/rs6000/linux.h (LINK_SHLIB_SPEC): Likewise.
14784         (LINK_OS_LINUX_SPEC): Likewise.
14785
14786 2017-09-13  Martin Liska  <mliska@suse.cz>
14787
14788         PR middle-end/82154
14789         * stmt.c (expand_sjlj_dispatch_table): Use CASE_LOW when
14790         CASE_HIGH is NULL_TREE.
14791
14792 2017-09-13  Richard Sandiford  <richard.sandiford@linaro.org>
14793             Alan Hayward  <alan.hayward@arm.com>
14794             David Sherwood  <david.sherwood@arm.com>
14795
14796         * target.def (secondary_memory_needed): New hook.
14797         (secondary_reload): Refer to TARGET_SECONDARY_MEMORY_NEEDED
14798         instead of SECONDARY_MEMORY_NEEDED.
14799         (secondary_memory_needed_mode): Likewise.
14800         * hooks.h (hook_bool_mode_reg_class_t_reg_class_t_false): Declare.
14801         * hooks.c (hook_bool_mode_reg_class_t_reg_class_t_false): New function.
14802         * doc/tm.texi.in (SECONDARY_MEMORY_NEEDED): Replace with...
14803         (TARGET_SECONDARY_MEMORY_NEEDED): ...this.
14804         (SECONDARY_MEMORY_NEEDED_RTX): Update reference accordingly.
14805         * doc/tm.texi: Regenerate.
14806         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED): Delete.
14807         * config/alpha/alpha.c (alpha_secondary_memory_needed): New function.
14808         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
14809         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED): Delete.
14810         * config/i386/i386-protos.h (ix86_secondary_memory_needed): Delete.
14811         * config/i386/i386.c (inline_secondary_memory_needed): Put the
14812         mode argument first and change the reg_class arguments to reg_class_t.
14813         (ix86_secondary_memory_needed): Likewise.  Remove the strict parameter.
14814         Make static.  Update the call to inline_secondary_memory_needed.
14815         (ix86_register_move_cost): Update the call to
14816         inline_secondary_memory_needed.
14817         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
14818         * config/ia64/ia64.h (SECONDARY_MEMORY_NEEDED): Delete commented-out
14819         definition.
14820         * config/ia64/ia64.c (spill_xfmode_rfmode_operand): Refer to
14821         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
14822         in comment.
14823         * config/mips/mips.h (SECONDARY_MEMORY_NEEDED): Delete.
14824         * config/mips/mips-protos.h (mips_secondary_memory_needed): Delete.
14825         * config/mips/mips.c (mips_secondary_memory_needed): Make static
14826         and match hook interface.  Add comment from mips.h.
14827         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
14828         * config/mmix/mmix.md (truncdfsf2): Refer to
14829         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
14830         in comment.
14831         * config/pa/pa-64.h (SECONDARY_MEMORY_NEEDED): Rename to...
14832         (PA_SECONDARY_MEMORY_NEEDED): ...this, and put the mode argument first.
14833         * config/pa/pa.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
14834         (pa_secondary_memory_needed): New function.
14835         * config/pdp11/pdp11.h (SECONDARY_MEMORY_NEEDED): Delete.
14836         * config/pdp11/pdp11-protos.h (pdp11_secondary_memory_needed): Delete.
14837         * config/pdp11/pdp11.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
14838         (pdp11_secondary_memory_needed): Make static and match hook interface.
14839         * config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED): Delete.
14840         * config/powerpcspe/powerpcspe-protos.h
14841         (rs6000_secondary_memory_needed_ptr): Delete.
14842         * config/powerpcspe/powerpcspe.c (rs6000_secondary_memory_needed_ptr):
14843         Delete.
14844         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
14845         (rs6000_option_override_internal): Assign to
14846         targetm.secondary_memory_needed rather than
14847         rs6000_secondary_memory_needed_ptr.
14848         (rs6000_secondary_memory_needed): Match hook interface.
14849         (rs6000_debug_secondary_memory_needed): Likewise.
14850         * config/riscv/riscv.h (SECONDARY_MEMORY_NEEDED): Delete.
14851         * config/riscv/riscv.c (riscv_secondary_memory_needed): New function.
14852         (riscv_register_move_cost): Use it instead of SECONDARY_MEMORY_NEEDED.
14853         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
14854         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED): Delete.
14855         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_ptr):
14856         Delete.
14857         * config/rs6000/rs6000.c (rs6000_secondary_memory_needed_ptr): Delete.
14858         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
14859         (rs6000_option_override_internal): Assign to
14860         targetm.secondary_memory_needed rather than
14861         rs6000_secondary_memory_needed_ptr.
14862         (rs6000_secondary_memory_needed): Match hook interface.
14863         (rs6000_debug_secondary_memory_needed): Likewise.
14864         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED): Delete.
14865         * config/s390/s390.c (s390_secondary_memory_needed): New function.
14866         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
14867         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED): Delete.
14868         * config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
14869         (sparc_secondary_memory_needed): New function.
14870         * lra-constraints.c (check_and_process_move): Refer to
14871         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
14872         in comment.
14873         (curr_insn_transform): Likewise.
14874         (process_alt_operands): Use targetm.secondary_memory_needed
14875         instead of TARGET_SECONDARY_MEMORY_NEEDED.
14876         (check_secondary_memory_needed_p): Likewise.
14877         (choose_split_class): Likewise.
14878         * reload.c: Unconditionally include code that was previously
14879         conditional on SECONDARY_MEMORY_NEEDED.
14880         (push_secondary_reload): Use targetm.secondary_memory_needed
14881         instead of TARGET_SECONDARY_MEMORY_NEEDED.
14882         (push_reload): Likewise.
14883         * reload1.c: Unconditionally include code that was previously
14884         conditional on SECONDARY_MEMORY_NEEDED.
14885         (choose_reload_regs): Use targetm.secondary_memory_needed
14886         instead of TARGET_SECONDARY_MEMORY_NEEDED.
14887         (gen_reload): Likewise.
14888         * system.h (SECONDARY_MEMORY_NEEDED): Poison.
14889
14890 2017-09-13  Richard Sandiford  <richard.sandiford@linaro.org>
14891             Alan Hayward  <alan.hayward@arm.com>
14892             David Sherwood  <david.sherwood@arm.com>
14893
14894         * target.def (secondary_memory_needed_mode): New hook:
14895         * targhooks.c (default_secondary_memory_needed_mode): Declare.
14896         * targhooks.h (default_secondary_memory_needed_mode): New function.
14897         * doc/tm.texi.in (SECONDARY_MEMORY_NEEDED_MODE): Replace with...
14898         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): ...this.
14899         * doc/tm.texi: Regenerate.
14900         * lra-constraints.c (check_and_process_move): Use
14901         targetm.secondary_memory_needed_mode instead of
14902         TARGET_SECONDARY_MEMORY_NEEDED_MODE.
14903         (curr_insn_transform): Likewise.
14904         * reload.c (get_secondary_mem): Likewise.
14905         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
14906         * config/alpha/alpha.c (alpha_secondary_memory_needed_mode): New
14907         function.
14908         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
14909         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
14910         * config/i386/i386.c (ix86_secondary_memory_needed_mode): New function.
14911         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
14912         * config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED_MODE):
14913         Delete.
14914         * config/powerpcspe/powerpcspe-protos.h
14915         (rs6000_secondary_memory_needed_mode): Delete.
14916         * config/powerpcspe/powerpcspe.c
14917         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
14918         (rs6000_secondary_memory_needed_mode): Make static.
14919         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
14920         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_mode):
14921         Delete.
14922         * config/rs6000/rs6000.c (TARGET_SECONDARY_MEMORY_NEEDED_MODE):
14923         Redefine.
14924         (rs6000_secondary_memory_needed_mode): Make static.
14925         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
14926         * config/s390/s390.c (s390_secondary_memory_needed_mode): New function.
14927         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
14928         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
14929         * config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED_MODE):
14930         Redefine.
14931         (sparc_secondary_memory_needed_mode): New function.
14932         * system.h (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Poison.
14933
14934 2017-09-13  Jackson Woodruff  <jackson.woodruff@arm.com>
14935
14936         * config/aarch64/constraints.md (Umq): New constraint.
14937         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>):
14938         Change to use Umq.
14939         (mov<mode>): Update condition.
14940
14941 2017-09-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14942
14943         * gimple-ssa-store-merging.c (sort_by_bitpos): Compare store order
14944         when bitposition is the same.
14945
14946 2017-09-13  Richard Biener  <rguenther@suse.de>
14947
14948         * dwarf2out.c (output_die_symbol): Remove.
14949         (output_die): Do not output a DIEs symbol.
14950
14951 2017-09-13  Richard Biener  <rguenther@suse.de>
14952
14953         PR middle-end/82128
14954         * gimple-fold.c (gimple_fold_call): Update SSA name in-place to
14955         default-def to avoid breaking iterator update with the weird
14956         interaction with cgraph_update_edges_for_call_stmt_node.
14957
14958 2017-09-13  Richard Biener  <rguenther@suse.de>
14959
14960         * tree-cfg.c (verify_gimple_assign_binary): Add verification
14961         for WIDEN_SUM_EXPR, VEC_WIDEN_MULT_{HI,LO,EVEN,ODD}_EXPR,
14962         VEC_PACK_{TRUNC,SAT,FIX_TRUNC}_EXPR.
14963         (verify_gimple_assign_ternary): Add verification for DOT_PROD_EXPR.
14964
14965 2017-09-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
14966
14967         * config/aarch64/aarch64.c (aarch64_override_options_after_change_1):
14968         Disable pc relative literal load irrespective of
14969         TARGET_FIX_ERR_A53_84341 for default.
14970
14971 2017-09-12  Eric Botcazou  <ebotcazou@adacore.com>
14972
14973         * config/sparc/sparc.c (output_return): Output the source location of
14974         the insn in the delay slot, if any.
14975         (output_sibcall): Likewise.
14976
14977 2017-09-12  H.J. Lu  <hongjiu.lu@intel.com>
14978
14979         PR driver/81498
14980         * common.opt (-static-pie): New alias.
14981         (shared): Negate static-pie.
14982         (-no-pie): Update help text.
14983         (-pie): Likewise.
14984         (static-pie): New option.
14985         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Add
14986         -static-pie support.
14987         (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
14988         (LINK_EH_SPEC): Likewise.
14989         (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
14990         * config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Likewise.
14991         * config/i386/gnu-user64.h (GNU_USER_TARGET_LINK_SPEC): Likewise.
14992         * gcc.c (LINK_COMMAND_SPEC): Likewise.
14993         (init_gcc_specs): Likewise.
14994         (init_spec): Likewise.
14995         (display_help): Update help message for -pie.
14996         * doc/invoke.texi: Update -pie, -no-pie and -static.  Document
14997         -static-pie.
14998
14999 2017-09-12  Wilco Dijkstra  <wdijkstr@arm.com>
15000
15001         * config/aarch64/aarch64.md (movsi_aarch64): Remove all '*'.
15002         (movdi_aarch64): Likewise.
15003         (movti_aarch64): Likewise.
15004
15005 2017-09-12 Simon Wright <simon@pushface.org>
15006
15007         PR target/80204
15008         * config/darwin-driver.c (darwin_find_version_from_kernel): Eliminate
15009         calculation of the minor version, always output as 0.
15010
15011 2017-09-12  Jakub Jelinek  <jakub@redhat.com>
15012
15013         PR target/82112
15014         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
15015         ALTIVEC_BUILTIN_VEC_LD if arg1 has array type call default_conversion
15016         on it early, rather than manual conversion late.  For
15017         ALTIVEC_BUILTIN_VEC_ST if arg2 has array type call default_conversion
15018         instead of performing manual conversion.
15019
15020 2017-09-12  Carl Love  <cel@us.ibm.com>
15021
15022         * config/rs6000/altivec.md (vec_widen_umult_even_v4si,
15023         vec_widen_smult_even_v4si): Add define expands for vmuleuw, vmulesw,
15024         vmulouw, vmulosw.
15025         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
15026         VMULOSW): Add definitions.
15027         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
15028         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
15029         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
15030         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
15031         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
15032
15033 2017-09-12  James Greenhalgh  <james.greenhalgh@arm.com>
15034
15035         * config/aarch64/aarch64.md (movdi_aarch64): Set load/store
15036         types correctly.
15037         (movti_aarch64): Likewise.
15038         (movdf_aarch64): Likewise.
15039         (movtf_aarch64): Likewise.
15040         (load_pairdi): Likewise.
15041         (store_pairdi): Likewise.
15042         (load_pairdf): Likewise.
15043         (store_pairdf): Likewise.
15044         (loadwb_pair<GPI:mode>_<P:mode>): Likewise.
15045         (storewb_pair<GPI:mode>_<P:mode>): Likewise.
15046         (ldr_got_small_<mode>): Likewise.
15047         (ldr_got_small_28k_<mode>): Likewise.
15048         (ldr_got_tiny): Likewise.
15049         * config/aarch64/iterators.md (ldst_sz): New.
15050         (ldpstp_sz): Likewise.
15051         * config/aarch64/thunderx.md (thunderx_storepair): Split store_8
15052         to store_16.
15053         (thunderx_load): Split load_8 to load_16.
15054         * config/aarch64/thunderx2t99.md (thunderx2t99_loadpair): Split
15055         load_8 to load_16.
15056         (thunderx2t99_storepair_basic): Split store_8 to store_16.
15057         * config/arm/xgene1.md (xgene1_load_pair): Split load_8 to load_16.
15058         (xgene1_store_pair): Split store_8 to store_16.
15059         * config/aarch64/falkor.md (falkor_ld_3_ld): Split load_8 to load_16.
15060         (falkor_st_0_st_sd): Split store_8 to store_16.
15061
15062 2017-09-12  James Greenhalgh  <james.greenhalgh@arm.com>
15063
15064         * config/arm/types.md (type): Rename load1/2/3/4 to load_4/8/12/16
15065         and store1/2/3/4 to store_4/8/12/16.
15066         * config/aarch64/aarch64.md: Update for rename.
15067         * config/arm/arm.md: Likewise.: Likewise.
15068         * config/arm/arm.c: Likewise.
15069         * config/arm/thumb1.md: Likewise.
15070         * config/arm/thumb2.md: Likewise.
15071         * config/arm/vfp.md: Likewise.
15072         * config/arm/arm-generic.md: Likewise.
15073         * config/arm/arm1020e.md: Likewise.
15074         * config/arm/arm1026ejs.md: Likewise.
15075         * config/arm/arm1136jfs.md: Likewise.
15076         * config/arm/arm926ejs.md: Likewise.
15077         * config/arm/cortex-a15.md: Likewise.
15078         * config/arm/cortex-a17.md: Likewise.
15079         * config/arm/cortex-a5.md: Likewise.
15080         * config/arm/cortex-a53.md: Likewise.
15081         * config/arm/cortex-a57.md: Likewise.
15082         * config/arm/cortex-a7.md: Likewise.
15083         * config/arm/cortex-a8.md: Likewise.
15084         * config/arm/cortex-a9.md: Likewise.
15085         * config/arm/cortex-m4.md: Likewise.
15086         * config/arm/cortex-m7.md: Likewise.
15087         * config/arm/cortex-r4.md: Likewise.
15088         * config/arm/exynos-m1.md: Likewise.
15089         * config/arm/fa526.md: Likewise.
15090         * config/arm/fa606te.md: Likewise.
15091         * config/arm/fa626te.md: Likewise.
15092         * config/arm/fa726te.md: Likewise.
15093         * config/arm/fmp626.md: Likewise.
15094         * config/arm/iwmmxt.md: Likewise.
15095         * config/arm/ldmstm.md: Likewise.
15096         * config/arm/marvell-pj4.md: Likewise.
15097         * config/arm/xgene1.md: Likewise.
15098         * config/aarch64/thunderx.md: Likewise.
15099         * config/aarch64/thunderx2t99.md: Likewise.
15100         * config/aarch64/falkor.md: Likewise.
15101
15102 2017-09-12  Martin Liska  <mliska@suse.cz>
15103
15104         * attribs.c (private_lookup_attribute): New function.
15105         * attribs.h (private_lookup_attribute): Declared here.
15106         (lookup_attribute): Called from this place.
15107
15108 2017-09-12  Richard Biener  <rguenther@suse.de>
15109
15110         PR tree-optimization/82157
15111         * tree-ssa-pre.c (remove_dead_inserted_code): Do not remove
15112         stmts with side-effects.
15113
15114 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
15115             Alan Hayward  <alan.hayward@arm.com>
15116             David Sherwood <david.sherwood@arm.com>
15117
15118         * target.def (hard_regno_nregs): New hook.
15119         (class_max_nregs): Refer to it instead of HARD_REGNO_NREGS.
15120         * targhooks.h (default_hard_regno_nregs): Declare.
15121         * targhooks.c (default_hard_regno_nregs): New function.
15122         * doc/tm.texi.in (HARD_REGNO_NREGS): Replace with...
15123         (TARGET_HARD_REGNO_NREGS): ...this hook.
15124         (HARD_REGNO_NREGS_HAS_PADDING): Update accordingly.
15125         (CLASS_MAX_NREGS): Likewise.
15126         * doc/tm.texi: Regenerate.
15127         * reginfo.c (init_reg_modes_target): Use targetm.hard_regno_nregs
15128         instead of HARD_REGNO_NREGS.
15129         * rtl.h (REG_NREGS): Refer to TARGET_HARD_REGNO_NREGS rather than
15130         HARD_REGNO_NREGS in the comment.
15131         * config/aarch64/aarch64.h (HARD_REGNO_NREGS): Delete.
15132         * config/aarch64/aarch64-protos.h (aarch64_hard_regno_nregs): Delete.
15133         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs): Make static.
15134         Return an unsigned int.
15135         (TARGET_HARD_REGNO_NREGS): Redefine.
15136         * config/alpha/alpha.h (HARD_REGNO_NREGS): Delete.
15137         * config/arc/arc.h (HARD_REGNO_NREGS): Delete.
15138         * config/arc/arc.c (TARGET_HARD_REGNO_NREGS): Redefine.
15139         (arc_hard_regno_nregs): New function.
15140         * config/arm/arm.h (HARD_REGNO_NREGS): Delete.
15141         * config/arm/arm.c (TARGET_HARD_REGNO_NREGS): Redefine.
15142         (arm_hard_regno_nregs): New function.
15143         * config/avr/avr.h (HARD_REGNO_NREGS): Delete.
15144         * config/bfin/bfin.h (HARD_REGNO_NREGS): Delete.
15145         * config/bfin/bfin.c (bfin_hard_regno_nregs): New function.
15146         (TARGET_HARD_REGNO_NREGS): Redefine.
15147         * config/c6x/c6x.h (HARD_REGNO_NREGS): Delete.
15148         * config/cr16/cr16.h (LONG_REG_P): Use targetm.hard_regno_nregs.
15149         (HARD_REGNO_NREGS): Delete.
15150         * config/cr16/cr16.c (TARGET_HARD_REGNO_NREGS): Redefine.
15151         (cr16_hard_regno_nregs): New function.
15152         (cr16_memory_move_cost): Use it instead of HARD_REGNO_NREGS.
15153         * config/cris/cris.h (HARD_REGNO_NREGS): Delete.
15154         * config/cris/cris.c (TARGET_HARD_REGNO_NREGS): Redefine.
15155         (cris_hard_regno_nregs): New function.
15156         * config/epiphany/epiphany.h (HARD_REGNO_NREGS): Delete.
15157         * config/fr30/fr30.h (HARD_REGNO_NREGS): Delete.
15158         (CLASS_MAX_NREGS): Use targetm.hard_regno_nregs.
15159         * config/frv/frv.h (HARD_REGNO_NREGS): Delete.
15160         (CLASS_MAX_NREGS): Remove outdated copy of documentation.
15161         * config/frv/frv-protos.h (frv_hard_regno_nregs): Delete.
15162         * config/frv/frv.c (TARGET_HARD_REGNO_NREGS): Redefine.
15163         (frv_hard_regno_nregs): Make static.  Take and return an
15164         unsigned int.
15165         (frv_class_max_nregs): Remove outdated copy of documentation.
15166         * config/ft32/ft32.h (HARD_REGNO_NREGS): Delete.
15167         * config/h8300/h8300.h (HARD_REGNO_NREGS): Delete.
15168         * config/h8300/h8300-protos.h (h8300_hard_regno_nregs): Delete.
15169         * config/h8300/h8300.c (h8300_hard_regno_nregs): Delete.
15170         * config/i386/i386.h (HARD_REGNO_NREGS): Delete.
15171         * config/i386/i386.c (ix86_hard_regno_nregs): New function.
15172         (TARGET_HARD_REGNO_NREGS): Redefine.
15173         * config/ia64/ia64.h (HARD_REGNO_NREGS): Delete.
15174         (CLASS_MAX_NREGS): Update comment.
15175         * config/ia64/ia64.c (TARGET_HARD_REGNO_NREGS): Redefine.
15176         (ia64_hard_regno_nregs): New function.
15177         * config/iq2000/iq2000.h (HARD_REGNO_NREGS): Delete.
15178         * config/lm32/lm32.h (HARD_REGNO_NREGS): Delete.
15179         * config/m32c/m32c.h (HARD_REGNO_NREGS): Delete.
15180         * config/m32c/m32c-protos.h (m32c_hard_regno_nregs): Delete.
15181         * config/m32c/m32c.c (m32c_hard_regno_nregs_1): Take and return
15182         an unsigned int.
15183         (m32c_hard_regno_nregs): Likewise.  Make static.
15184         (TARGET_HARD_REGNO_NREGS): Redefine.
15185         * config/m32r/m32r.h (HARD_REGNO_NREGS): Delete.
15186         * config/m68k/m68k.h (HARD_REGNO_NREGS): Delete.
15187         * config/m68k/m68k.c (TARGET_HARD_REGNO_NREGS): Redefine.
15188         (m68k_hard_regno_nregs): New function.
15189         * config/mcore/mcore.h (HARD_REGNO_NREGS): Delete.
15190         * config/microblaze/microblaze.h (HARD_REGNO_NREGS): Delete.
15191         * config/mips/mips.h (HARD_REGNO_NREGS): Delete.
15192         * config/mips/mips-protos.h (mips_hard_regno_nregs): Delete.
15193         * config/mips/mips.c (mips_hard_regno_nregs): Make static.
15194         Take and return an unsigned int.
15195         (TARGET_HARD_REGNO_NREGS): Redefine.
15196         * config/mmix/mmix.h (HARD_REGNO_NREGS): Delete.
15197         (CLASS_MAX_NREGS): Use targetm.hard_regno_nregs.
15198         * config/mn10300/mn10300.h (HARD_REGNO_NREGS): Delete.
15199         * config/moxie/moxie.h (HARD_REGNO_NREGS): Delete.
15200         * config/msp430/msp430.h (HARD_REGNO_NREGS): Delete.
15201         * config/msp430/msp430-protos.h (msp430_hard_regno_nregs): Delete.
15202         * config/msp430/msp430.c (TARGET_HARD_REGNO_NREGS): Redefine.
15203         (msp430_hard_regno_nregs): Make static.  Take and return an
15204         unsigned int.
15205         * config/nds32/nds32.h (HARD_REGNO_NREGS): Delete.
15206         * config/nds32/nds32-protos.h (nds32_hard_regno_nregs): Delete.
15207         * config/nds32/nds32.c (nds32_hard_regno_nregs): Delete.
15208         (nds32_hard_regno_mode_ok): Use targetm.hard_regno_nregs.
15209         * config/nios2/nios2.h (HARD_REGNO_NREGS): Delete.
15210         * config/nvptx/nvptx.h (HARD_REGNO_NREGS): Delete.
15211         * config/nvptx/nvptx.c (nvptx_hard_regno_nregs): New function.
15212         (TARGET_HARD_REGNO_NREGS): Redefine.
15213         * config/pa/pa32-regs.h (HARD_REGNO_NREGS): Rename to...
15214         (PA_HARD_REGNO_NREGS): ...this.
15215         * config/pa/pa64-regs.h (HARD_REGNO_NREGS): Rename to...
15216         (PA_HARD_REGNO_NREGS): ...this.
15217         * config/pa/pa.c (TARGET_HARD_REGNO_NREGS): Redefine.
15218         (pa_hard_regno_nregs): New function.
15219         * config/pdp11/pdp11.h (HARD_REGNO_NREGS): Delete.
15220         * config/pdp11/pdp11.c (TARGET_HARD_REGNO_NREGS): Redefine.
15221         (pdp11_hard_regno_nregs): New function.
15222         * config/powerpcspe/powerpcspe.h (HARD_REGNO_NREGS): Delete.
15223         * config/powerpcspe/powerpcspe.c (TARGET_HARD_REGNO_NREGS): Redefine.
15224         (rs6000_hard_regno_nregs_hook): New function.
15225         * config/riscv/riscv.h (HARD_REGNO_NREGS): Delete.
15226         * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): Delete.
15227         * config/riscv/riscv.c (riscv_hard_regno_nregs): Make static.
15228         Take and return an unsigned int.  Move earlier in file.
15229         (TARGET_HARD_REGNO_NREGS): Redefine.
15230         * config/rl78/rl78.h (HARD_REGNO_NREGS): Delete.
15231         * config/rl78/rl78-protos.h (rl78_hard_regno_nregs): Delete.
15232         * config/rl78/rl78.c (TARGET_HARD_REGNO_NREGS): Reefine.
15233         (rl78_hard_regno_nregs): Make static.  Take and return an
15234         unsigned int.
15235         * config/rs6000/rs6000.h (HARD_REGNO_NREGS): Delete.
15236         * config/rs6000/rs6000.c (TARGET_HARD_REGNO_NREGS): Redefine.
15237         (rs6000_hard_regno_nregs_hook): New function.
15238         * config/rx/rx.h (HARD_REGNO_NREGS): Delete.
15239         * config/rx/rx.c (rx_hard_regno_nregs): New function.
15240         (TARGET_HARD_REGNO_NREGS): Redefine.
15241         * config/s390/s390.h (HARD_REGNO_NREGS): Delete.
15242         * config/s390/s390.c (REGNO_PAIR_OK): Use s390_hard_regno_nregs
15243         instead of HARD_REGNO_NREGS.
15244         (s390_hard_regno_nregs): New function.
15245         (s390_hard_regno_mode_ok): Add comment from s390.h.
15246         (TARGET_HARD_REGNO_NREGS): Redefine.
15247         * config/sh/sh.h (HARD_REGNO_NREGS): Delete.
15248         * config/sh/sh.c (TARGET_HARD_REGNO_NREGS): Redefine.
15249         (sh_hard_regno_nregs): New function.
15250         (sh_pass_in_reg_p): Use it.
15251         * config/sparc/sparc.h (HARD_REGNO_NREGS): Delete.
15252         * config/sparc/sparc.c (TARGET_HARD_REGNO_NREGS): Redefine.
15253         (sparc_hard_regno_nregs): New function.
15254         * config/spu/spu.h (HARD_REGNO_NREGS): Delete.
15255         * config/spu/spu.c (spu_hard_regno_nregs): New function.
15256         (spu_function_arg_advance): Use it, supplying a valid register number.
15257         (TARGET_HARD_REGNO_NREGS): Redefine.
15258         * config/stormy16/stormy16.h (HARD_REGNO_NREGS): Delete.
15259         * config/tilegx/tilegx.h (HARD_REGNO_NREGS): Delete.
15260         * config/tilepro/tilepro.h (HARD_REGNO_NREGS): Delete.
15261         * config/v850/v850.h (HARD_REGNO_NREGS): Delete.
15262         * config/vax/vax.h (HARD_REGNO_NREGS): Delete.
15263         * config/visium/visium.h (HARD_REGNO_NREGS): Delete.
15264         (CLASS_MAX_NREGS): Remove copy of old documentation.
15265         * config/visium/visium.c (TARGET_HARD_REGNO_NREGS): Redefine.
15266         (visium_hard_regno_nregs): New function.
15267         (visium_hard_regno_mode_ok): Use it instead of HARD_REGNO_NREGS.
15268         * config/xtensa/xtensa.h (HARD_REGNO_NREGS): Delete.
15269         * config/xtensa/xtensa.c (TARGET_HARD_REGNO_NREGS): Redefine.
15270         xtensa_hard_regno_nregs): New function.
15271         * system.h (HARD_REGNO_NREGS): Poison.
15272
15273 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
15274
15275         * config/arm/arm.h (THUMB_SECONDARY_INPUT_RELOAD_CLASS): Use
15276         hard_regno_nregs instead of HARD_REGNO_NREGS.
15277         (THUMB_SECONDARY_OUTPUT_RELOAD_CLASS): Likewise.
15278         * config/c6x/c6x.c (c6x_expand_prologue): Likewise.
15279         (c6x_expand_epilogue): Likewise.
15280         * config/frv/frv.c (frv_alloc_temp_reg): Likewise.
15281         (frv_read_iacc_argument): Likewise.
15282         * config/sh/sh.c: Include regs.h.
15283         (sh_print_operand): Use hard_regno_nregs instead of HARD_REGNO_NREGS.
15284         (regs_used): Likewise.
15285         (output_stack_adjust): Likewise.
15286         * config/xtensa/xtensa.c (xtensa_copy_incoming_a7): Likewise.
15287         * expmed.c: Include regs.h.
15288         (store_bit_field_1): Use hard_regno_nregs instead of HARD_REGNO_NREGS.
15289         * ree.c: Include regs.h.
15290         (combine_reaching_defs): Use hard_regno_nregs instead of
15291         HARD_REGNO_NREGS.
15292         (add_removable_extension): Likewise.
15293
15294 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
15295
15296         * regs.h (hard_regno_nregs): Turn into a function.
15297         (end_hard_regno): Update accordingly.
15298         * caller-save.c (setup_save_areas): Likewise.
15299         (save_call_clobbered_regs): Likewise.
15300         (replace_reg_with_saved_mem): Likewise.
15301         (insert_restore): Likewise.
15302         (insert_save): Likewise.
15303         * combine.c (can_change_dest_mode): Likewise.
15304         (move_deaths): Likewise.
15305         (distribute_notes): Likewise.
15306         * config/mips/mips.c (mips_hard_regno_call_part_clobbered): Likewise.
15307         * config/powerpcspe/powerpcspe.c (rs6000_cannot_change_mode_class)
15308         (rs6000_split_multireg_move): Likewise.
15309         (rs6000_register_move_cost): Likewise.
15310         (rs6000_memory_move_cost): Likewise.
15311         * config/rs6000/rs6000.c (rs6000_cannot_change_mode_class): Likewise.
15312         (rs6000_split_multireg_move): Likewise.
15313         (rs6000_register_move_cost): Likewise.
15314         (rs6000_memory_move_cost): Likewise.
15315         * cselib.c (cselib_reset_table): Likewise.
15316         (cselib_lookup_1): Likewise.
15317         * emit-rtl.c (set_mode_and_regno): Likewise.
15318         * function.c (aggregate_value_p): Likewise.
15319         * ira-color.c (setup_profitable_hard_regs): Likewise.
15320         (check_hard_reg_p): Likewise.
15321         (calculate_saved_nregs): Likewise.
15322         (assign_hard_reg): Likewise.
15323         (improve_allocation): Likewise.
15324         (calculate_spill_cost): Likewise.
15325         * ira-emit.c (modify_move_list): Likewise.
15326         * ira-int.h (ira_hard_reg_set_intersection_p): Likewise.
15327         (ira_hard_reg_in_set_p): Likewise.
15328         * ira.c (setup_reg_mode_hard_regset): Likewise.
15329         (clarify_prohibited_class_mode_regs): Likewise.
15330         (check_allocation): Likewise.
15331         * lra-assigns.c (find_hard_regno_for_1): Likewise.
15332         (lra_setup_reg_renumber): Likewise.
15333         (setup_try_hard_regno_pseudos): Likewise.
15334         (spill_for): Likewise.
15335         (assign_hard_regno): Likewise.
15336         (setup_live_pseudos_and_spill_after_risky_transforms): Likewise.
15337         * lra-constraints.c (in_class_p): Likewise.
15338         (lra_constraint_offset): Likewise.
15339         (simplify_operand_subreg): Likewise.
15340         (lra_constraints): Likewise.
15341         (split_reg): Likewise.
15342         (split_if_necessary): Likewise.
15343         (invariant_p): Likewise.
15344         (inherit_in_ebb): Likewise.
15345         * lra-lives.c (process_bb_lives): Likewise.
15346         * lra-remat.c (reg_overlap_for_remat_p): Likewise.
15347         (get_hard_regs): Likewise.
15348         (do_remat): Likewise.
15349         * lra-spills.c (assign_spill_hard_regs): Likewise.
15350         * mode-switching.c (create_pre_exit): Likewise.
15351         * postreload.c (reload_combine_recognize_pattern): Likewise.
15352         * recog.c (peep2_find_free_register): Likewise.
15353         * regcprop.c (kill_value_regno): Likewise.
15354         (set_value_regno): Likewise.
15355         (copy_value): Likewise.
15356         (maybe_mode_change): Likewise.
15357         (find_oldest_value_reg): Likewise.
15358         (copyprop_hardreg_forward_1): Likewise.
15359         * regrename.c (check_new_reg_p): Likewise.
15360         (regrename_do_replace): Likewise.
15361         * reload.c (push_reload): Likewise.
15362         (combine_reloads): Likewise.
15363         (find_dummy_reload): Likewise.
15364         (operands_match_p): Likewise.
15365         (find_reloads): Likewise.
15366         (find_equiv_reg): Likewise.
15367         (reload_adjust_reg_for_mode): Likewise.
15368         * reload1.c (count_pseudo): Likewise.
15369         (count_spilled_pseudo): Likewise.
15370         (find_reg): Likewise.
15371         (clear_reload_reg_in_use): Likewise.
15372         (free_for_value_p): Likewise.
15373         (allocate_reload_reg): Likewise.
15374         (choose_reload_regs): Likewise.
15375         (reload_adjust_reg_for_temp): Likewise.
15376         (emit_reload_insns): Likewise.
15377         (delete_output_reload): Likewise.
15378         * rtlanal.c (subreg_get_info): Likewise.
15379         * sched-deps.c (sched_analyze_reg): Likewise.
15380         * sel-sched.c (init_regs_for_mode): Likewise.
15381         (mark_unavailable_hard_regs): Likewise.
15382         (choose_best_reg_1): Likewise.
15383         (verify_target_availability): Likewise.
15384         * valtrack.c (dead_debug_insert_temp): Likewise.
15385         * var-tracking.c (track_loc_p): Likewise.
15386         (emit_note_insn_var_location): Likewise.
15387         * varasm.c (make_decl_rtl): Likewise.
15388         * reginfo.c (choose_hard_reg_mode): Likewise.
15389         (init_reg_modes_target): Refer directly to
15390         this_target_regs->x_hard_regno_nregs.
15391
15392 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
15393
15394         * ira-costs.c (record_operand_costs): Use in_hard_reg_set_p
15395         instead of hard_regno_nregs.
15396
15397 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
15398
15399         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Use
15400         end_hard_regno instead of hard_regno_nregs.
15401         * config/s390/s390.c (s390_reg_clobbered_rtx): Likewise.
15402         * config/sparc/sparc.h (ASM_DECLARE_REGISTER_GLOBAL): Likewise.
15403         * config/visium/visium.c (visium_hard_regno_mode_ok): Likewise.
15404         * ira-color.c (improve_allocation): Likewise.
15405         * lra-assigns.c (find_hard_regno_for_1): Likewise.
15406         * lra-lives.c (mark_regno_live): Likewise.
15407         (mark_regno_dead): Likewise.
15408         * lra-remat.c (operand_to_remat): Likewise.
15409         * lra.c (collect_non_operand_hard_regs): Likewise.
15410         * postreload.c (reload_combine_note_store): Likewise.
15411         (move2add_valid_value_p): Likewise.
15412         * reload.c (regno_clobbered_p): Likewise.
15413
15414 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
15415
15416         * config/frv/frv.c (FOR_EACH_REGNO): Use END_REGNO instead of
15417         hard_regno_nregs.
15418         * config/v850/v850.c (v850_reorg): Likewise.
15419         * reload.c (refers_to_regno_for_reload_p): Likewise.
15420         (find_equiv_reg): Likewise.
15421         * reload1.c (reload_reg_reaches_end_p): Likewise.
15422
15423 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
15424
15425         * caller-save.c (add_used_regs): Use REG_NREGS instead of
15426         hard_regno_nregs.
15427         * config/aarch64/aarch64.c (aarch64_split_combinev16qi): Likewise.
15428         * config/arm/arm.c (output_move_neon): Likewise.
15429         (arm_attr_length_move_neon): Likewise.
15430         (neon_split_vcombine): Likewise.
15431         * config/c6x/c6x.c (c6x_mark_reg_read): Likewise.
15432         (c6x_mark_reg_written): Likewise.
15433         (c6x_dwarf_register_span): Likewise.
15434         * config/i386/i386.c (ix86_save_reg): Likewise.
15435         * config/ia64/ia64.c (mark_reg_gr_used_mask): Likewise.
15436         (rws_access_reg): Likewise.
15437         * config/s390/s390.c (s390_call_saved_register_used): Likewise.
15438         * mode-switching.c (create_pre_exit): Likewise.
15439         * ree.c (combine_reaching_defs): Likewise.
15440         (add_removable_extension): Likewise.
15441         * regcprop.c (find_oldest_value_reg): Likewise.
15442         (copyprop_hardreg_forward_1): Likewise.
15443         * reload.c (reload_inner_reg_of_subreg): Likewise.
15444         (push_reload): Likewise.
15445         (combine_reloads): Likewise.
15446         (find_dummy_reload): Likewise.
15447         (reload_adjust_reg_for_mode): Likewise.
15448         * reload1.c (find_reload_regs): Likewise.
15449         (forget_old_reloads_1): Likewise.
15450         (reload_reg_free_for_value_p): Likewise.
15451         (reload_adjust_reg_for_temp): Likewise.
15452         (emit_reload_insns): Likewise.
15453         (delete_output_reload): Likewise.
15454         * sel-sched.c (choose_best_reg_1): Likewise.
15455         (choose_best_pseudo_reg): Likewise.
15456
15457 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
15458             Alan Hayward  <alan.hayward@arm.com>
15459             David Sherwood <david.sherwood@arm.com>
15460
15461         * defaults.h (SLOW_UNALIGNED_ACCESS): Delete.
15462         * target.def (slow_unaligned_access): New hook.
15463         * targhooks.h (default_slow_unaligned_access): Declare.
15464         * targhooks.c (default_slow_unaligned_access): New function.
15465         * doc/tm.texi.in (SLOW_UNALIGNED_ACCESS): Replace with...
15466         (TARGET_SLOW_UNALIGNED_ACCESS): ...this.
15467         * doc/tm.texi: Regenerate.
15468         * config/alpha/alpha.h (SLOW_UNALIGNED_ACCESS): Delete.
15469         * config/arm/arm.h (SLOW_UNALIGNED_ACCESS): Delete.
15470         * config/i386/i386.h (SLOW_UNALIGNED_ACCESS): Delete commented-out
15471         definition.
15472         * config/powerpcspe/powerpcspe.h (SLOW_UNALIGNED_ACCESS): Delete.
15473         * config/powerpcspe/powerpcspe.c (TARGET_SLOW_UNALIGNED_ACCESS):
15474         Redefine.
15475         (rs6000_slow_unaligned_access): New function.
15476         (rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS.
15477         (expand_block_compare): Likewise.
15478         (expand_strn_compare): Likewise.
15479         (rs6000_rtx_costs): Likewise.
15480         * config/riscv/riscv.h (SLOW_UNALIGNED_ACCESS): Delete.
15481         (riscv_slow_unaligned_access): Likewise.
15482         * config/riscv/riscv.c (riscv_slow_unaligned_access): Rename to...
15483         (riscv_slow_unaligned_access_p): ...this and make static.
15484         (riscv_option_override): Update accordingly.
15485         (riscv_slow_unaligned_access): New function.
15486         (TARGET_SLOW_UNALIGNED_ACCESS): Redefine.
15487         * config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Delete.
15488         * config/rs6000/rs6000.c (TARGET_SLOW_UNALIGNED_ACCESS): Redefine.
15489         (rs6000_slow_unaligned_access): New function.
15490         (rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS.
15491         (rs6000_rtx_costs): Likewise.
15492         * config/rs6000/rs6000-string.c (expand_block_compare)
15493         (expand_strn_compare): Use targetm.slow_unaligned_access instead
15494         of SLOW_UNALIGNED_ACCESS.
15495         * config/tilegx/tilegx.h (SLOW_UNALIGNED_ACCESS): Delete.
15496         * config/tilepro/tilepro.h (SLOW_UNALIGNED_ACCESS): Delete.
15497         * calls.c (expand_call): Use targetm.slow_unaligned_access instead
15498         of SLOW_UNALIGNED_ACCESS.
15499         * expmed.c (simple_mem_bitfield_p): Likewise.
15500         * expr.c (alignment_for_piecewise_move): Likewise.
15501         (emit_group_load_1): Likewise.
15502         (emit_group_store): Likewise.
15503         (copy_blkmode_from_reg): Likewise.
15504         (emit_push_insn): Likewise.
15505         (expand_assignment): Likewise.
15506         (store_field): Likewise.
15507         (expand_expr_real_1): Likewise.
15508         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
15509         * lra-constraints.c (simplify_operand_subreg): Likewise.
15510         * stor-layout.c (bit_field_mode_iterator::next_mode): Likewise.
15511         * gimple-ssa-store-merging.c: Likewise in block comment at start
15512         of file.
15513         * tree-ssa-strlen.c: Include target.h.
15514         (handle_builtin_memcmp): Use targetm.slow_unaligned_access instead
15515         of SLOW_UNALIGNED_ACCESS.
15516         * system.h (SLOW_UNALIGNED_ACCESS): Poison.
15517
15518 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
15519
15520         PR rtl-optimization/82185
15521         * expmed.c (emit_store_flag_int): Only test tem if it has been
15522         initialized.
15523
15524 2017-09-12  Richard Biener  <rguenther@suse.de>
15525
15526         PR middle-end/82149
15527         * match.pd ((FTYPE) N CMP CST): Fix typo.
15528
15529 2017-09-12  Simon Atanasyan  <simon.atanasyan@imgtec.com>
15530
15531         * config/mips/mips.c (mips_attribute_table): Add 'short_call'
15532         attribute.
15533         (mips_near_type_p): Add 'short_call' attribute as a synonym
15534         for 'near'.
15535         * doc/extend.texi (short_call): Document new function attribute.
15536
15537 2017-09-12  Jakub Jelinek  <jakub@redhat.com>
15538
15539         PR target/82112
15540         * c-common.c (sync_resolve_size): Instead of c_dialect_cxx ()
15541         assertion check that in the condition.
15542         (get_atomic_generic_size): Likewise.  Before testing if parameter
15543         has pointer type, if it has array type, call for C++
15544         default_conversion to perform array-to-pointer conversion.
15545
15546 2017-09-12  Richard Biener  <rguenther@suse.de>
15547
15548         * tree-vect-generic.c (expand_vector_operations_1): Do nothing
15549         for operations we cannot scalarize.
15550
15551 2017-09-12  Aldy Hernandez  <aldyh@redhat.com>
15552
15553         * tree-ssa-threadbackward.c (fsm_find_thread_path): Make GC
15554         vectors heap vectors.  Clean up comments.
15555         Make visited_bbs a reference.
15556         (profitable_jump_thread_path): Make GC
15557         vectors heap vectors.  Clean up comments.
15558         Misc cleanups.
15559         (convert_and_register_jump_thread_path): Make GC vectors heap
15560         vectors.
15561         (check_subpath_and_update_thread_path): Same.  Clean up comments.
15562         Make visited_bbs a reference.
15563         (handle_phi): Abstract common code to to
15564         register_jump_thread_path_if_profitable.
15565         Rename VAR_BB to DEF_BB.
15566         Update comments.
15567         Make GC vectors heap vectors.
15568         Make visited_bbs a reference.
15569         (handle_assignment): Same.
15570         (register_jump_thread_path_if_profitable): New.
15571         (fsm_find_control_statement_thread_paths): Rename VAR_BB to
15572         DEF_BB.
15573         Make GC vectors heap vectors.  Clean up comments.
15574         Make visited_bbs a reference.
15575         (find_jump_threads_backwards): Make visited_bbs live in the stack.
15576         * tree-ssa-threadupdate.c (delete_jump_thread_path): Fix typo in
15577         comment.
15578
15579 2017-09-11  Max Filippov  <jcmvbkbc@gmail.com>
15580
15581         PR target/82181
15582         * config/xtensa/xtensa.c (xtensa_mem_offset): Check that both
15583         words of E_DImode object are reachable by xtensa_uimm8x4 access.
15584
15585 2017-09-11  Vidya Praveen  <vidyapraveen@arm.com>
15586
15587         Revert r251800 and r251799.
15588
15589 2017-09-11  Martin Jambor  <mjambor@suse.cz>
15590
15591         PR hsa/82119
15592         * hsa-gen.c (gen_hsa_phi_from_gimple_phi): Process ADDR_EXPRs in
15593         arguments in advance.
15594         * hsa-regalloc.c (naive_process_phi): New parameter predecessors,
15595         use it to find predecessor edges.
15596         (naive_outof_ssa): Collect vector of predecessors.
15597
15598 2017-09-08  Jason Merrill  <jason@redhat.com>
15599
15600         PR c++/70029 - ICE with ref-qualifier and -flto
15601         * langhooks.h (struct lang_hooks_for_types): Add
15602         copy_lang_qualifiers.
15603         * attribs.c (build_type_attribute_qual_variant): Use it.
15604         * langhooks-def.h (LANG_HOOKS_COPY_LANG_QUALIFIERS): Default to
15605         NULL.
15606         (LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it.
15607         * tree.c (verify_type): Re-enable TYPE_CANONICAL main variant check.
15608
15609 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
15610
15611         PR target/81988
15612         * config/sparc/sparc.md (mulsi3): Rename into *mulsi3_sp32.
15613         (*mulsi3_sp64): New instruction.
15614         (mulsi3): New expander.
15615
15616 2017-09-08  Uros Bizjak  <ubizjak@gmail.com>
15617
15618         * config/alpha/alpha.c (alpha_print_operand) <case 'S'>: Remove.
15619
15620 2017-09-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15621
15622         * sancov.c: Include memmodel.h.
15623
15624 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
15625
15626         PR target/80897
15627         * config/sparc/sparc.c (sparc_emit_set_symbolic_const64): Deal with too
15628         large offsets.
15629
15630 2017-09-07  Carl Love  <cel@us.ibm.com>
15631
15632         * config/rs6000/vsx.md (define_insn "*stxvl"): Add missing argument to
15633         the sldi instruction.
15634
15635 2017-09-07  David Edelsohn  <dje.gcc@gmail.com>
15636
15637         * sancov.c: Include tm_p.h.
15638
15639 2017-09-07  Jakub Jelinek  <jakub@redhat.com>
15640
15641         PR target/81979
15642         * output.h (switch_to_other_text_partition): New declaration.
15643         * varasm.c (switch_to_other_text_partition): New function.
15644         * config/rs6000/rs6000.c (uses_TOC): Return 2 if
15645         NOTE_INSN_SWITCH_TEXT_SECTIONS is seen before finding load_toc_* insn.
15646         (rs6000_elf_declare_function_name): If uses_TOC returned 2, switch
15647         to the other text partition before emitting LCL label and switch back
15648         after emitting the word after it.
15649
15650 2017-09-07  Richard Biener  <rguenther@suse.de>
15651
15652         * passes.def (pass_split_crit_edges): Remove instance before PRE.
15653         * tree-ssa-pre.c (pass_pre::execute): Instead manually split
15654         critical edges here, after loop init.
15655         (pass_data_pre): Remove PROP_no_crit_edges flags.
15656         * tree-ssa-sccvn.c (vn_reference_lookup_3): Use vn_valueize
15657         for valueization of call args to avoid leaking VN_TOP.
15658         (visit_use): Assert we do not visit default defs.
15659         (init_scc_vn): Use build_decl for VN_TOP to make name nicer.
15660         Use error_mark_node to more easily detect leaking VN_TOP.
15661         All default-defs are varying, not VN_TOP.  Mark them visited.
15662         (run_scc_vn): Make code match comment.
15663
15664 2017-09-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
15665
15666         * config/rs6000/rs6000-cpus.def (OTHER_VSX_VECTOR_MASKS): Delete
15667         OPTION_MASK_FLOAT128_KEYWORD.
15668         (POWERPC_MASKS): Likewise.
15669         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Delete
15670         support for the -mfloat128-type option, and make -mfloat128
15671         default on PowerPC Linux systems.  Define or undefine
15672         __FLOAT128__ and  __FLOAT128_HARDWARE__ for the current options.
15673         Define __float128 to be __ieee128 if IEEE 128-bit support is
15674         enabled, or undefine it.
15675         (rs6000_cpu_cpp_builtins): Delete defining __FLOAT128__ here.
15676         Delete defining __FLOAT128_TYPE__.
15677         * config/rs6000/rs6000.opt (x_TARGET_FLOAT128_TYPE): Delete the
15678         -mfloat128-type option and make -mfloat128 default on PowerPC
15679         Linux systems.
15680         (TARGET_FLOAT128_TYPE): Likewise.
15681         (-mfloat128-type): Likewise.
15682         * config/rs6000/rs6000.c (rs6000_option_override_internal):
15683         Delete the -mfloat128-type option and make -mfloat128 default on
15684         PowerPC Linux systems.  Always use __ieee128 to be the keyword for
15685         the IEEE 128-bit type, and map __float128 to __ieee128 if IEEE
15686         128-bit floating point is enabled.  Change tests from using
15687         -mfloat128-type to -mfloat128.
15688         (rs6000_mangle_type): Use the correct mangling for the __float128
15689         type even if normal long double is restricted to 64-bits.
15690         (floatn_mode): Enable the _Float128 type by default on VSX Linux
15691         systems.
15692         * config/rs6000/rs6000.h (MASK_FLOAT128_TYPE): Delete.
15693         (MASK_FLOAT128_KEYWORD): Define new shortcut macro.
15694         (RS6000BTM_FLOAT128): Define in terms of -mfloat128, not
15695         -mfloat128-type.
15696         * doc/invoke.texi (RS/6000 and PowerPC Options): Update
15697         documentation for -mfloat128.
15698
15699 2017-09-06  Olivier Hainque  <hainque@adacore.com>
15700
15701         * config.gcc (powerpc-wrs-vxworksspe): Now match as vxworks*spe.
15702
15703 2017-09-06  Wish Wu  <wishwu007@gmail.com>
15704             Jakub Jelinek  <jakub@redhat.com>
15705
15706         * asan.c (initialize_sanitizer_builtins): Add
15707         BT_FN_VOID_UINT8_UINT8, BT_FN_VOID_UINT16_UINT16,
15708         BT_FN_VOID_UINT32_UINT32, BT_FN_VOID_UINT64_UINT64,
15709         BT_FN_VOID_FLOAT_FLOAT, BT_FN_VOID_DOUBLE_DOUBLE and
15710         BT_FN_VOID_UINT64_PTR variables.
15711         * builtin-types.def (BT_FN_VOID_UINT8_UINT8): New fn type.
15712         (BT_FN_VOID_UINT16_UINT16): Likewise.
15713         (BT_FN_VOID_UINT32_UINT32): Likewise.
15714         (BT_FN_VOID_FLOAT_FLOAT): Likewise.
15715         (BT_FN_VOID_DOUBLE_DOUBLE): Likewise.
15716         (BT_FN_VOID_UINT64_PTR): Likewise.
15717         * common.opt (flag_sanitize_coverage): New variable.
15718         (fsanitize-coverage=trace-pc): Remove.
15719         (fsanitize-coverage=): Add.
15720         * flag-types.h (enum sanitize_coverage_code): New enum.
15721         * fold-const.c (fold_range_test): Disable non-short-circuit
15722         optimization if flag_sanitize_coverage.
15723         (fold_truth_andor): Likewise.
15724         * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
15725         * opts.c (COVERAGE_SANITIZER_OPT): Define.
15726         (coverage_sanitizer_opts): New array.
15727         (get_closest_sanitizer_option): Add OPTS argument, handle also
15728         OPT_fsanitize_coverage_.
15729         (parse_sanitizer_options): Adjusted to also handle
15730         OPT_fsanitize_coverage_.
15731         (common_handle_option): Add OPT_fsanitize_coverage_.
15732         * sancov.c (instrument_comparison, instrument_switch): New function.
15733         (sancov_pass): Add trace-cmp support.
15734         * sanitizer.def (BUILT_IN_SANITIZER_COV_TRACE_CMP1,
15735         BUILT_IN_SANITIZER_COV_TRACE_CMP2, BUILT_IN_SANITIZER_COV_TRACE_CMP4,
15736         BUILT_IN_SANITIZER_COV_TRACE_CMP8,
15737         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP1,
15738         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP2,
15739         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP4,
15740         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP8,
15741         BUILT_IN_SANITIZER_COV_TRACE_CMPF, BUILT_IN_SANITIZER_COV_TRACE_CMPD,
15742         BUILT_IN_SANITIZER_COV_TRACE_SWITCH): New builtins.
15743         * doc/invoke.texi: Document -fsanitize-coverage=trace-cmp.
15744
15745 2017-09-06  Richard Earnshaw  <rearnsha@arm.com>
15746
15747         * config/arm/parsecpu.awk (fatal): Note that we've encountered an
15748         error.  Only quit immediately if parsing is complete.
15749         (BEGIN): Initialize fatal_err and parse_done.
15750         (begin fpu, end fpu): Check number of arguments.
15751         (begin arch, end arch): Likewise.
15752         (begin cpu, end cpu): Likewise.
15753         (cname, tune for, tune flags, architecture, fpu, option): Likewise.
15754         (optalias): Likewise.
15755
15756 2017-09-06  Richard Earnshaw  <rearnsha@arm.com>
15757
15758         * config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.
15759         * config/arm/arm-isa.h: Delete.  Move definitions to ...
15760         * arm-cpus.in: ... here.  Use new feature and fgroup values.
15761         * config/arm/arm.c (arm_option_override): Use lower case for feature
15762         bit names.
15763         * config/arm/arm.h (TARGET_HARD_FLOAT): Likewise.
15764         (TARGET_VFP3, TARGET_VFP5, TARGET_FMA): Likewise.
15765         * config/arm/parsecpu.awk (END): Add new command 'isa'.
15766         (isa_pfx): Delete.
15767         (print_isa_bits_for): New function.
15768         (gen_isa): New function.
15769         (gen_comm_data): Use print_isa_bits_for.
15770         (define feature): New keyword.
15771         (define fgroup): New keyword.
15772         * config/arm/t-arm (OPTIONS_H_EXTRA): Add arm-isa.h
15773         (arm-isa.h): Add rule to generate file.
15774         * common/config/arm/arm-common.c: (arm_canon_arch_option): Use lower
15775         case for feature bit names.
15776
15777 2017-09-06  Richard Biener  <rguenther@suse.de>
15778
15779         * tree-ssa-pre.c (NECESSARY): Remove.
15780         (create_expression_by_pieces): Do not touch pass-local flags.
15781         (insert_into_preds_of_block): Likewise.
15782         (do_pre_regular_insertion): Likewise.
15783         (eliminate_insert): Likewise.
15784         (eliminate_dom_walker::before_dom_children): Likewise.
15785         (fini_eliminate): Do not look at inserted_exprs.
15786         (mark_operand_necessary): Remove.
15787         (remove_dead_inserted_code): Replace with simple work-list
15788         algorithm based on inserted_exprs and SSA uses.
15789         (pass_pre::execute): Re-order fini_eliminate and
15790         remove_dead_inserted_code.
15791
15792 2017-09-06  Olivier Hainque  <hainque@adacore.com>
15793
15794         * config/powerpcspe/vxworks.h (VXCPU_FOR_8548): Correct definition
15795         for VxWorks 7.  Adjust surrounding comments.
15796
15797 2017-09-06  Richard Biener  <rguenther@suse.de>
15798
15799         * gimple-ssa-strength-reduction.c
15800         (find_candidates_dom_walker::before_dom_children): Also allow
15801         pointer types.
15802
15803 2017-09-06  Richard Biener  <rguenther@suse.de>
15804
15805         PR tree-optimization/82108
15806         * tree-vect-stmts.c (vectorizable_load): Fix pointer adjustment
15807         for gap in the non-permutation SLP case.
15808
15809 2017-09-06  Martin Jambor  <mjambor@suse.cz>
15810
15811         PR tree-optimization/82078
15812         * tree-sra.c (sort_and_splice_var_accesses): Move call to
15813         add_access_to_work_queue...
15814         (build_accesses_from_assign): ...here.
15815         (propagate_all_subaccesses): Make sure racc is the group
15816         representative, if there is one.
15817
15818 2017-09-06  Jakub Jelinek  <jakub@redhat.com>
15819
15820         PR middle-end/82095
15821         * varasm.c (categorize_decl_for_section): Use SECCAT_TBSS for TLS vars with
15822         NULL DECL_INITIAL.
15823
15824 2017-09-06  Richard Biener  <rguenther@suse.de>
15825
15826         * gimple-ssa-strength-reduction.c
15827         (find_candidates_dom_walker::before_doom_children): Use a
15828         type and not a mode check.
15829
15830 2017-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
15831
15832         PR target/77308
15833         * config/arm/predicates.md (arm_general_adddi_operand): Create new
15834         non-vfp predicate.
15835         * config/arm/arm.md (*arm_adddi3, *arm_subdi3): Use new predicates.
15836
15837 2017-09-05  Jeff Law  <law@redhat.com>
15838
15839         PR tree-optimization/64910
15840         * tree-ssa-reassoc.c (reassociate_bb): Restrict last change to
15841         cases where we have 3 or more operands.
15842
15843 2017-09-05  Jakub Jelinek  <jakub@redhat.com>
15844
15845         PR middle-end/81768
15846         * omp-low.c (lower_omp_for): Recompute tree invariant if
15847         gimple_omp_for_initial/final is ADDR_EXPR.
15848
15849         PR middle-end/81768
15850         * omp-expand.c (expand_omp_simd): Force second operands of COND_EXPR
15851         into gimple val before gimplification fo the COND_EXPR.
15852
15853 2017-09-05  Aldy Hernandez  <aldyh@redhat.com>
15854
15855         * tree-ssa-threadupdate.c (duplicate_thread_path): Remove unused
15856         REGION_COPY argument.
15857         (thread_through_all_blocks): Remove unused argument to
15858         duplicate_thread_path.
15859
15860 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
15861             Alan Hayward  <alan.hayward@arm.com>
15862             David Sherwood  <david.sherwood@arm.com>
15863
15864         * config/aarch64/aarch64-protos.h (aarch64_gen_adjusted_ldpstp):
15865         Take a scalar_mode rather than a machine_mode.
15866         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
15867         * config/aarch64/aarch64.c (aarch64_simd_container_mode): Likewise.
15868         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
15869         (aarch64_gen_adjusted_ldpstp): Likewise.
15870         (aarch64_expand_vector_init): Use scalar_mode instead of machine_mode.
15871
15872 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
15873             Alan Hayward  <alan.hayward@arm.com>
15874             David Sherwood  <david.sherwood@arm.com>
15875
15876         * config/aarch64/aarch64-protos.h (aarch64_is_extend_from_extract):
15877         Take a scalar_int_mode instead of a machine_mode.
15878         (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
15879         (aarch64_output_scalar_simd_mov_immediate): Likewise.
15880         (aarch64_simd_scalar_immediate_valid_for_move): Likewise.
15881         (aarch64_simd_attr_length_rglist): Delete.
15882         * config/aarch64/aarch64.c (aarch64_is_extend_from_extract): Take
15883         a scalar_int_mode instead of a machine_mode.
15884         (aarch64_add_offset): Likewise.
15885         (aarch64_internal_mov_immediate): Likewise
15886         (aarch64_add_constant_internal): Likewise.
15887         (aarch64_add_constant): Likewise.
15888         (aarch64_movw_imm): Likewise.
15889         (aarch64_rtx_arith_op_extract_p): Likewise.
15890         (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
15891         (aarch64_simd_scalar_immediate_valid_for_move): Likewise.
15892         Remove assert that the mode isn't a vector.
15893         (aarch64_output_scalar_simd_mov_immediate): Likewise.
15894         (aarch64_expand_mov_immediate): Update calls after above changes.
15895         (aarch64_output_casesi): Use as_a <scalar_int_mode>.
15896         (aarch64_and_bitmask_imm): Check for scalar integer modes.
15897         (aarch64_move_imm): Likewise.
15898         (aarch64_can_const_movi_rtx_p): Likewise.
15899         (aarch64_strip_extend): Likewise.
15900         (aarch64_extr_rtx_p): Likewise.
15901         (aarch64_rtx_costs): Likewise, using wode_mode as the mode of
15902         a CONST_INT when the mode parameter is VOIDmode.
15903         (aarch64_float_const_rtx_p): Use scalar_int_mode for a temporary.
15904
15905 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
15906
15907         * machmode.h (bitwise_mode_for_mode): Return opt_mode.
15908         * stor-layout.c (bitwise_mode_for_mode): Likewise.
15909         (bitwise_type_for_mode): Update accordingly.
15910
15911 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
15912
15913         * stor-layout.h (mode_for_size_tree): Return an opt_mode.
15914         * stor-layout.c (mode_for_size_tree): Likewise.
15915         (mode_for_array): Update accordingly.
15916         (layout_decl): Likewise.
15917         (compute_record_mode): Likewise.  Only set the mode once.
15918
15919 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
15920
15921         * target.def (get_mask_mode): Change return type to opt_mode.
15922         Expand commentary.
15923         * doc/tm.texi: Regenerate.
15924         * targhooks.h (default_get_mask_mode): Return an opt_mode.
15925         * targhooks.c (default_get_mask_mode): Likewise.
15926         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
15927         * optabs-query.c (can_vec_mask_load_store_p): Update use of
15928         targetm.get_mask_mode.
15929         * tree.c (build_truth_vector_type): Likewise.
15930
15931 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
15932
15933         * machmode.h (mode_for_vector): Return an opt_mode.
15934         * stor-layout.c (mode_for_vector): Likewise.
15935         (mode_for_int_vector): Update accordingly.
15936         (layout_type): Likewise.
15937         * config/i386/i386.c (emit_memmov): Likewise.
15938         (ix86_expand_set_or_movmem): Likewise.
15939         (ix86_expand_vector_init): Likewise.
15940         (ix86_get_mask_mode): Likewise.
15941         * config/powerpcspe/powerpcspe.c (rs6000_expand_vec_perm_const_1):
15942         Likewise.
15943         * config/rs6000/rs6000.c (rs6000_expand_vec_perm_const_1): Likewise.
15944         * expmed.c (extract_bit_field_1): Likewise.
15945         * expr.c (expand_expr_real_2): Likewise.
15946         * optabs-query.c (can_vec_perm_p): Likewise.
15947         (can_vec_mask_load_store_p): Likewise.
15948         * optabs.c (expand_vec_perm): Likewise.
15949         * targhooks.c (default_get_mask_mode): Likewise.
15950         * tree-vect-stmts.c (vectorizable_store): Likewise.
15951         (vectorizable_load): Likewise.
15952         (get_vectype_for_scalar_type_and_size): Likewise.
15953
15954 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
15955
15956         * machmode.h (mode_for_int_vector): New function.
15957         * stor-layout.c (mode_for_int_vector): Likewise.
15958         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Use it.
15959         * config/powerpcspe/powerpcspe.c (rs6000_do_expand_vec_perm): Likewise.
15960         * config/rs6000/rs6000.c (rs6000_do_expand_vec_perm): Likewise.
15961         * config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
15962         (s390_expand_vcond): Likewise.
15963
15964 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
15965
15966         * machmode.h (opt_machine_mode): New type.
15967         (opt_mode<T>): Allow construction from anything that can be
15968         converted to a T.
15969         (is_a, as_a, dyn_cast): Add overloads for opt_mode.
15970         (mode_for_size): Return an opt_machine_mode.
15971         * stor-layout.c (mode_for_size): Likewise.
15972         (mode_for_size_tree): Update call accordingly.
15973         (bitwise_mode_for_mode): Likewise.
15974         (make_fract_type): Likewise.
15975         (make_accum_type): Likewise.
15976         * caller-save.c (replace_reg_with_saved_mem): Update call
15977         accordingly.
15978         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
15979         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
15980         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
15981         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
15982         * expmed.c (extract_bit_field_1): Likewise.
15983         * reload.c (get_secondary_mem): Likewise.
15984         * varasm.c (assemble_integer): Likewise.
15985         * lower-subreg.c (simplify_subreg_concatn): Likewise.  Move
15986         early-out.
15987
15988 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
15989
15990         * machmode.h (decimal_float_mode_for_size): New function.
15991         * real.h (REAL_VALUE_TO_TARGET_LONG_DOUBLE): Use float_mode_for_size.
15992         (REAL_VALUE_TO_TARGET_DOUBLE): Likewise.
15993         (REAL_VALUE_TO_TARGET_SINGLE): Likewise.
15994         (REAL_VALUE_TO_TARGET_DECIMAL128): Use decimal_float_mode_for_size.
15995         (REAL_VALUE_TO_TARGET_DECIMAL64): Likewise.
15996         (REAL_VALUE_TO_TARGET_DECIMAL32): Likewise.
15997
15998 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
15999
16000         * builtins.c (expand_builtin_powi): Use int_mode_for_size.
16001         (get_builtin_sync_mode): Likewise.
16002         (expand_ifn_atomic_compare_exchange): Likewise.
16003         (expand_builtin_atomic_clear): Likewise.
16004         (expand_builtin_atomic_test_and_set): Likewise.
16005         (fold_builtin_atomic_always_lock_free): Likewise.
16006         * calls.c (compute_argument_addresses): Likewise.
16007         (emit_library_call_value_1): Likewise.
16008         (store_one_arg): Likewise.
16009         * combine.c (combine_instructions): Likewise.
16010         * config/aarch64/aarch64.c (aarch64_function_value): Likewise.
16011         * config/arm/arm.c (arm_function_value): Likewise.
16012         (aapcs_allocate_return_reg): Likewise.
16013         * config/c6x/c6x.c (c6x_expand_movmem): Likewise.
16014         * config/i386/i386.c (construct_container): Likewise.
16015         (ix86_gimplify_va_arg): Likewise.
16016         (ix86_expand_sse_cmp): Likewise.
16017         (emit_memmov): Likewise.
16018         (emit_memset): Likewise.
16019         (expand_small_movmem_or_setmem): Likewise.
16020         (ix86_expand_pextr): Likewise.
16021         (ix86_expand_pinsr): Likewise.
16022         * config/lm32/lm32.c (lm32_block_move_inline): Likewise.
16023         * config/microblaze/microblaze.c (microblaze_block_move_straight):
16024         Likewise.
16025         * config/mips/mips.c (mips_function_value_1) Likewise.
16026         (mips_block_move_straight): Likewise.
16027         (mips_expand_ins_as_unaligned_store): Likewise.
16028         * config/powerpcspe/powerpcspe.c
16029         (rs6000_darwin64_record_arg_advance_flush): Likewise.
16030         (rs6000_darwin64_record_arg_flush): Likewise.
16031         * config/rs6000/rs6000.c
16032         (rs6000_darwin64_record_arg_advance_flush): Likewise.
16033         (rs6000_darwin64_record_arg_flush): Likewise.
16034         * config/sparc/sparc.c (sparc_function_arg_1): Likewise.
16035         (sparc_function_value_1): Likewise.
16036         * config/spu/spu.c (adjust_operand): Likewise.
16037         (spu_emit_branch_or_set): Likewise.
16038         (arith_immediate_p): Likewise.
16039         * emit-rtl.c (gen_lowpart_common): Likewise.
16040         * expr.c (expand_expr_real_1): Likewise.
16041         * function.c (assign_parm_setup_block): Likewise.
16042         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Likewise.
16043         * reload1.c (alter_reg): Likewise.
16044         * stor-layout.c (mode_for_vector): Likewise.
16045         (layout_type): Likewise.
16046
16047 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
16048
16049         * config/spu/spu.c (exp2_immediate_p): Use int_mode_for_mode.
16050         (spu_convert_move): Likewise.
16051         * lower-subreg.c (resolve_simple_move): Likewise.
16052
16053 2017-09-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16054
16055         PR target/81833
16056         * config/rs6000/altivec.md (altivec_vsum2sws): Convert from a
16057         define_insn to a define_expand.
16058         (altivec_vsum2sws_direct): New define_insn.
16059         (altivec_vsumsws): Convert from a define_insn to a define_expand.
16060
16061 2017-09-05  Wilco Dijkstra  <wdijkstr@arm.com>
16062
16063         * config/arm/arm.c (arm_option_params_internal): Improve setting of
16064         max_insns_skipped.
16065
16066 2017-09-05  H.J. Lu  <hongjiu.lu@intel.com>
16067
16068         PR target/59501
16069         PR target/81624
16070         PR target/81769
16071         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Don't
16072         realign stack if stack alignment needed is less than incoming
16073         stack boundary.
16074
16075 2017-09-05  Marek Polacek  <polacek@redhat.com>
16076
16077         PR sanitizer/82072
16078         * convert.c (convert_to_integer_1) <case NEGATE_EXPR>: Move the ubsan
16079         check earlier.
16080
16081 2017-09-05  Wilco Dijkstra  <wdijkstr@arm.com>
16082
16083         * explow.c (get_dynamic_stack_size): Improve dynamic alignment.
16084
16085 2017-09-05  Richard Biener  <rguenther@suse.de>
16086
16087         PR tree-optimization/82084
16088         * fold-const.c (can_native_encode_string_p): Handle wide characters.
16089
16090 2017-09-05  Richard Biener  <rguenther@suse.de>
16091
16092         PR tree-optimization/82102
16093         * tree-ssa-pre.c (fini_eliminate): Check if lhs is NULL.
16094
16095 2017-09-05  Martin Liska  <mliska@suse.cz>
16096
16097         PR tree-optimization/82032
16098         * tree-cfg.c (generate_range_test): New function.
16099         * tree-cfg.h (generate_range_test): Declared here.
16100         * tree-cfgcleanup.c (convert_single_case_switch): New function.
16101         (cleanup_control_expr_graph): Use it.
16102         * tree-switch-conversion.c (try_switch_expansion): Remove
16103         assert.
16104         (emit_case_nodes): Use generate_range_test.
16105
16106 2017-09-04  Uros Bizjak  <ubizjak@gmail.com>
16107
16108         PR target/82098
16109         * config/i386/i386.md (*<btsc><mode>_mask): Add
16110         TARGET_USE_BT to insn constraint.
16111         (*btr<mode>_mask): Ditto.
16112
16113 2017-09-04  Wilco Dijkstra  <wdijkstr@arm.com>
16114
16115         * config/arm/arm.c (arm_legitimate_index_p): Add comment.
16116         (thumb2_legitimate_index_p): Use correct range for DI/DF mode.
16117
16118 2017-09-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
16119
16120         PR target/77308
16121         * config/arm/arm.md (*arm_adddi3, *arm_subdi3): Split early except for
16122         TARGET_NEON and TARGET_IWMMXT.
16123         (anddi3, iordi3, xordi3, one_cmpldi2): Split while expanding except for
16124         TARGET_NEON and TARGET_IWMMXT.
16125         (*one_cmpldi2_insn): Moved the body of one_cmpldi2 here.
16126
16127 2017-09-04  Uros Bizjak  <ubizjak@gmail.com>
16128
16129         * config/i386/i386-protos.h (ix86_tls_address_pattern_p) New prototype.
16130         (ix86_rewrite_tls_address): Ditto.
16131         * config/i386/i386.c (ix86_tls_address_pattern_p) New function.
16132         (ix86_rewrite_tls_address_1): Ditto.
16133         (ix86_rewrite_tls_address): Ditto.
16134         * config/i386/predicates.md (tls_address_pattern): New predicate.
16135         * config/i386/i386.md (TLS address splitter): New splitter.
16136
16137 2017-09-04  Richard Biener  <rguenther@suse.de>
16138
16139         PR tree-optimization/82084
16140         * fold-const.h (can_native_encode_string_p): Declare.
16141         * fold-const.c (can_native_encode_string_p): Factor out from ...
16142         (native_encode_string): ... here.
16143         * tree-vect-stmts.c (vectorizable_store): Call it to avoid
16144         vectorizing stores from constants we later cannot handle.
16145
16146 2017-09-04  Marek Polacek  <polacek@redhat.com>
16147
16148         PR c/81783
16149         * doc/invoke.texi: Update -Wtautological-compare documentation.
16150
16151 2017-09-04  Jeff Law  <law@redhat.com>
16152
16153         PR tree-optimization/64910
16154         * tree-ssa-reassoc.c (reassociate_bb): For bitwise binary ops,
16155         swap the first and last operand if the last is a constant.
16156
16157 2017-09-04  Marek Polacek  <polacek@redhat.com>
16158
16159         PR sanitizer/82072
16160         * convert.c (do_narrow): When sanitizing signed integer overflows,
16161         bail out for signed types.
16162         (convert_to_integer_1) <case NEGATE_EXPR>: Likewise.
16163
16164 2017-09-04  Richard Biener  <rguenther@suse.de>
16165
16166         PR tree-optimization/82060
16167         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
16168         Move devirtualization after stmt folding and before EH/AB/noreturn
16169         cleanup to get the stmt refs canonicalized.  Use a bool instead
16170         of gimple_modified_p since that doesn't work for NOPs.  Schedule
16171         NOPs generated by folding for removal.
16172
16173 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
16174             Alan Hayward  <alan.hayward@arm.com>
16175             David Sherwood  <david.sherwood@arm.com>
16176
16177         * coretypes.h (pad_direction): New enum.
16178         * defaults.h (DEFAULT_FUNCTION_ARG_PADDING): Delete.
16179         (FUNCTION_ARG_PADDING): Likewise.
16180         * target.def (function_arg_padding): New hook.
16181         * targhooks.h (default_function_arg_padding): Declare.
16182         * targhooks.c (default_function_arg_padding): New function.
16183         * doc/tm.texi.in (FUNCTION_ARG_PADDING): Replace with...
16184         (TARGET_FUNCTION_ARG_PADDING): ...this.
16185         * doc/tm.texi: Regenerate.
16186         * calls.c (store_unaligned_arguments_into_pseudos): Use pad_direction
16187         instead of direction.
16188         (compute_argument_addresses): Likewise.
16189         (load_register_parameters): Likewise.
16190         (emit_library_call_value_1): Likewise.
16191         (store_one_arg): Use targetm.calls.function_arg_padding instead
16192         of FUNCTION_ARG_PADDING.
16193         (must_pass_in_stack_var_size_or_pad): Likewise.
16194         * expr.c (emit_group_load_1): Use pad_direction instead of direction.
16195         (emit_group_store): Likewise.
16196         (emit_single_push_insn_1): Use targetm.calls.function_arg_padding
16197         instead of FUNCTION_ARG_PADDING.
16198         (emit_push_insn): Likewise, and propagate enum change throughout
16199         function.
16200         * function.h (direction): Delete.
16201         (locate_and_pad_arg_data::where_pad): Use pad_direction instead
16202         of direction.
16203         * function.c (assign_parm_find_stack_rtl): Likewise.
16204         (assign_parm_setup_block_p): Likewise.
16205         (assign_parm_setup_block): Likewise.
16206         (gimplify_parameters): Likewise.
16207         (locate_and_pad_parm): Use targetm.calls.function_arg_padding
16208         instead of FUNCTION_ARG_PADDING, and propagate enum change throughout
16209         function.
16210         * config/aarch64/aarch64.h (FUNCTION_ARG_PADDING): Delete.
16211         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
16212         * config/aarch64/aarch64-protos.h (aarch64_pad_arg_upward): Delete.
16213         * config/aarch64/aarch64.c (aarch64_pad_arg_upward): Replace with...
16214         (aarch64_function_arg_padding): ...this new function.
16215         (aarch64_gimplify_va_arg_expr): Use pad_direction instead of direction.
16216         (TARGET_FUNCTION_ARG_PADDING): Redefine.
16217         * config/arm/arm.h (FUNCTION_ARG_PADDING): Delete.
16218         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
16219         * config/arm/arm-protos.h (arm_pad_arg_upward): Delete.
16220         * config/arm/arm.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
16221         (arm_pad_arg_upward): Replace with...
16222         (arm_function_arg_padding): ...this new function.
16223         * config/c6x/c6x.h (BLOCK_REG_PADDING): Use pad_direction instead
16224         of direction.
16225         * config/ia64/hpux.h (FUNCTION_ARG_PADDING): Delete.
16226         * config/ia64/ia64-protos.h (ia64_hpux_function_arg_padding): Delete.
16227         * config/ia64/ia64.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
16228         (ia64_hpux_function_arg_padding): Replace with...
16229         (ia64_function_arg_padding): ...this new function.  Use pad_direction
16230         instead of direction.  Check for TARGET_HPUX.
16231         * config/iq2000/iq2000.h (FUNCTION_ARG_PADDING): Delete.
16232         * config/iq2000/iq2000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
16233         (iq2000_function_arg_padding): New function.
16234         * config/mips/mips-protos.h (mips_pad_arg_upward): Delete.
16235         * config/mips/mips.c (mips_pad_arg_upward): Replace with...
16236         (mips_function_arg_padding): ...this new function.
16237         (mips_pad_reg_upward): Update accordingly.
16238         (TARGET_FUNCTION_ARG_PADDING): Redefine.
16239         * config/mips/mips.h (PAD_VARARGS_DOWN): Use
16240         targetm.calls.function_arg_padding.
16241         (FUNCTION_ARG_PADDING): Delete.
16242         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
16243         * config/nios2/nios2.h (FUNCTION_ARG_PADDING): Delete.
16244         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
16245         * config/nios2/nios2-protos.h (nios2_function_arg_padding): Delete.
16246         (nios2_block_reg_padding): Return pad_direction instead of direction.
16247         * config/nios2/nios2.c (nios2_block_reg_padding): Return pad_direction
16248         instead of direction.
16249         (nios2_function_arg_padding): Likewise.  Make static.
16250         (TARGET_FUNCTION_ARG_PADDING): Redefine.
16251         * config/pa/pa.h (FUNCTION_ARG_PADDING): Delete.
16252         (BLOCK_REG_PADDING): Use targetm.calls.function_arg_padding.
16253         * config/pa/pa-protos.h (pa_function_arg_padding): Delete.
16254         * config/pa/pa.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
16255         (pa_function_arg_padding): Make static.  Return pad_direction instead
16256         of direction.
16257         * config/powerpcspe/powerpcspe.h (FUNCTION_ARG_PADDING): Delete.
16258         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
16259         * config/powerpcspe/aix.h (BLOCK_REG_PADDING): Use pad_direction
16260         instead of direction.  Use targetm.calls.function_arg_padding.
16261         * config/powerpcspe/darwin.h (BLOCK_REG_PADDING): Likewise.
16262         * config/powerpcspe/freebsd64.h (BLOCK_REG_PADDING): Likewise.
16263         * config/powerpcspe/linux64.h (BLOCK_REG_PADDING): Likewise.
16264         * config/powerpcspe/powerpcspe-protos.h (function_arg_padding): Delete.
16265         * config/powerpcspe/powerpcspe.c (TARGET_FUNCTION_ARG_PADDING):
16266         Redefine.
16267         (function_arg_padding): Rename to...
16268         (rs6000_function_arg_padding): ...this.  Make static.  Return
16269         pad_direction instead of direction.
16270         (rs6000_return_in_msb): Use rs6000_function_arg_padding.
16271         * config/rs6000/rs6000.h (FUNCTION_ARG_PADDING): Delete.
16272         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
16273         * config/rs6000/aix.h (BLOCK_REG_PADDING): Use pad_direction
16274         instead of direction.  Use targetm.calls.function_arg_padding.
16275         * config/rs6000/darwin.h (BLOCK_REG_PADDING): Likewise.
16276         * config/rs6000/freebsd64.h (BLOCK_REG_PADDING): Likewise.
16277         * config/rs6000/linux64.h (BLOCK_REG_PADDING): Likewise.
16278         * config/rs6000/rs6000-protos.h (function_arg_padding): Delete.
16279         * config/rs6000/rs6000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
16280         (function_arg_padding): Rename to...
16281         (rs6000_function_arg_padding): ...this.  Make static.  Return
16282         pad_direction instead of direction.
16283         (rs6000_return_in_msb): Use rs6000_function_arg_padding.
16284         * config/s390/s390.h (FUNCTION_ARG_PADDING): Delete.
16285         * config/s390/s390.c (s390_function_arg_padding): New function.
16286         (TARGET_FUNCTION_ARG_PADDING): Redefine.
16287         * config/sparc/sparc.h (FUNCTION_ARG_PADDING): Delete.
16288         * config/sparc/sparc-protos.h (function_arg_padding): Delete.
16289         * config/sparc/sparc.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
16290         (function_arg_padding): Rename to...
16291         (sparc_function_arg_padding): ...this.  Make static.  Return
16292         pad_direction instead of direction.
16293         * config/spu/spu.h (FUNCTION_ARG_PADDING): Delete.
16294         * config/spu/spu.c (spu_function_arg_padding): New function.
16295         (TARGET_FUNCTION_ARG_PADDING): Redefine.
16296         * system.h (FUNCTION_ARG_PADDING): Poison.
16297
16298 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
16299             Alan Hayward  <alan.hayward@arm.com>
16300             David Sherwood  <david.sherwood@arm.com>
16301
16302         * target.def (modes_tieable_p): New hook.
16303         * doc/tm.texi (MODES_TIEABLE_P): Replace with...
16304         (TARGET_MODES_TIEABLE_P): ...this.
16305         * doc/tm.texi.in: Regenerate.
16306         * hooks.h (hook_bool_mode_mode_true): Declare.
16307         * hooks.c (hook_bool_mode_mode_true): New function.
16308         * combine.c (subst): Use targetm.modes_tieable_p instead of
16309         MODES_TIEABLE_P.
16310         * dse.c (find_shift_sequence): Likewise.
16311         * expmed.c (extract_low_bits): Likewise.
16312         * lower-subreg.c: Include target.h.
16313         (find_decomposable_subregs): Use targetm.modes_tieable_p instead of
16314         MODES_TIEABLE_P.
16315         * rtlanal.c (rtx_cost): Likewise.
16316         * config/aarch64/aarch64.h (MODES_TIEABLE_P): Delete.
16317         * config/aarch64/aarch64-protos.h (aarch64_modes_tieable_p): Delete.
16318         * config/aarch64/aarch64.c (aarch64_modes_tieable_p): Make static.
16319         (TARGET_MODES_TIEABLE_P): Redefine.
16320         * config/alpha/alpha.h (MODES_TIEABLE_P): Delete.
16321         * config/alpha/alpha.c (alpha_modes_tieable_p): New function.
16322         (TARGET_MODES_TIEABLE_P): Redefine.
16323         * config/arc/arc.h (MODES_TIEABLE_P): Delete.
16324         * config/arc/arc.c (TARGET_MODES_TIEABLE_P): Redefine.
16325         (arc_modes_tieable_p): New function.
16326         * config/arm/arm.h (MODES_TIEABLE_P): Delete.
16327         * config/arm/arm-protos.h (arm_modes_tieable_p): Delete.
16328         * config/arm/arm.c (TARGET_MODES_TIEABLE_P): Redefine.
16329         (arm_modes_tieable_p): Make static.
16330         * config/avr/avr.h (MODES_TIEABLE_P): Delete.
16331         * config/bfin/bfin.h (MODES_TIEABLE_P): Delete.
16332         * config/bfin/bfin.c (bfin_modes_tieable_p): New function.
16333         (TARGET_MODES_TIEABLE_P): Redefine.
16334         * config/c6x/c6x.h (MODES_TIEABLE_P): Delete.
16335         * config/c6x/c6x.c (c6x_modes_tieable_p): New function.
16336         (TARGET_MODES_TIEABLE_P): Redefine.
16337         * config/cr16/cr16.h (MODES_TIEABLE_P): Delete.
16338         * config/cr16/cr16.c (TARGET_MODES_TIEABLE_P): Redefine.
16339         (cr16_modes_tieable_p): New function.
16340         * config/cris/cris.h (MODES_TIEABLE_P): Delete.
16341         * config/epiphany/epiphany.h (MODES_TIEABLE_P): Delete.
16342         * config/fr30/fr30.h (MODES_TIEABLE_P): Delete.
16343         (TRULY_NOOP_TRUNCATION): Update comment.
16344         * config/frv/frv.h (MODES_TIEABLE_P): Delete.
16345         (TRULY_NOOP_TRUNCATION): Update comment.
16346         * config/frv/frv.c (TARGET_MODES_TIEABLE_P): Redefine.
16347         (frv_modes_tieable_p): New function.
16348         * config/ft32/ft32.h (MODES_TIEABLE_P): Delete.
16349         * config/h8300/h8300.h (MODES_TIEABLE_P): Delete.
16350         * config/h8300/h8300.c (h8300_modes_tieable_p): New function.
16351         (TARGET_MODES_TIEABLE_P): Redefine.
16352         * config/i386/i386.h (MODES_TIEABLE_P): Delete.
16353         * config/i386/i386-protos.h (ix86_modes_tieable_p): Delete.
16354         * config/i386/i386.c (ix86_modes_tieable_p): Make static.
16355         (TARGET_MODES_TIEABLE_P): Redefine.
16356         * config/ia64/ia64.h (MODES_TIEABLE_P): Delete.
16357         * config/ia64/ia64.c (TARGET_MODES_TIEABLE_P): Redefine.
16358         (ia64_modes_tieable_p): New function.
16359         * config/iq2000/iq2000.h (MODES_TIEABLE_P): Delete.
16360         * config/iq2000/iq2000.c (TARGET_MODES_TIEABLE_P): Redefine.
16361         (iq2000_modes_tieable_p): New function.
16362         * config/lm32/lm32.h (MODES_TIEABLE_P): Delete.
16363         * config/lm32/lm32.c (TARGET_MODES_TIEABLE_P): Redefine.
16364         (lm32_modes_tieable_p): New function.
16365         * config/m32c/m32c.h (MODES_TIEABLE_P): Delete.
16366         * config/m32c/m32c-protos.h (m32c_modes_tieable_p): Delete.
16367         * config/m32c/m32c.c (m32c_modes_tieable_p): Make static.
16368         (TARGET_MODES_TIEABLE_P): Redefine.
16369         * config/m32r/m32r.h (MODES_TIEABLE_P): Delete.
16370         * config/m32r/m32r.c (TARGET_MODES_TIEABLE_P): Redefine.
16371         (m32r_modes_tieable_p): New function.
16372         * config/m68k/m68k.h (MODES_TIEABLE_P): Delete.
16373         * config/m68k/m68k.c (TARGET_MODES_TIEABLE_P): Redefine.
16374         (m68k_modes_tieable_p): New function.
16375         * config/mcore/mcore.h (MODES_TIEABLE_P): Delete.
16376         * config/mcore/mcore.c (TARGET_MODES_TIEABLE_P): Redefine.
16377         (mcore_modes_tieable_p): New function.
16378         * config/microblaze/microblaze.h (MODES_TIEABLE_P): Delete.
16379         * config/microblaze/microblaze.c (microblaze_modes_tieable_p): New
16380         function.
16381         (TARGET_MODES_TIEABLE_P): Redefine.
16382         * config/mips/mips.h (MODES_TIEABLE_P): Delete.
16383         * config/mips/mips-protos.h (mips_modes_tieable_p): Delete.
16384         * config/mips/mips.c (mips_modes_tieable_p): Make static.
16385         (TARGET_MODES_TIEABLE_P): Redefine.
16386         * config/mmix/mmix.h (MODES_TIEABLE_P): Delete.
16387         * config/mn10300/mn10300.h (MODES_TIEABLE_P): Delete.
16388         * config/mn10300/mn10300-protos.h (mn10300_modes_tieable): Delete.
16389         * config/mn10300/mn10300.c (mn10300_modes_tieable): Rename to...
16390         (mn10300_modes_tieable_p): ...this and make static.
16391         (TARGET_MODES_TIEABLE_P): Redefine.
16392         * config/moxie/moxie.h (MODES_TIEABLE_P): Delete.
16393         * config/msp430/msp430.h (MODES_TIEABLE_P): Delete.
16394         * config/msp430/msp430-protos.h (msp430_modes_tieable_p): Delete.
16395         * config/msp430/msp430.c (TARGET_MODES_TIEABLE_P): Redefine.
16396         (msp430_modes_tieable_p): Make static.
16397         * config/nds32/nds32.h (MODES_TIEABLE_P): Delete.
16398         * config/nds32/nds32.c (nds32_modes_tieable_p): New function.
16399         (TARGET_MODES_TIEABLE_P): Redefine.
16400         * config/nios2/nios2.h (MODES_TIEABLE_P): Delete.
16401         * config/nvptx/nvptx.h (MODES_TIEABLE_P): Delete.
16402         * config/nvptx/nvptx.c (nvptx_modes_tieable_p): New function.
16403         (TARGET_MODES_TIEABLE_P): Redefine.
16404         * config/pa/pa.h (MODES_TIEABLE_P): Delete.
16405         * config/pa/pa-protos.h (pa_modes_tieable_p): Delete.
16406         * config/pa/pa.c (pa_modes_tieable_p): Make static.
16407         (TARGET_MODES_TIEABLE_P): Redefine.
16408         * config/pdp11/pdp11.h (MODES_TIEABLE_P): Delete.
16409         * config/pdp11/pdp11.c (TARGET_MODES_TIEABLE_P): Redefine.
16410         (pdp11_modes_tieable_p): New function.
16411         * config/powerpcspe/powerpcspe.h (MODES_TIEABLE_P): Delete.
16412         * config/powerpcspe/powerpcspe.c (TARGET_MODES_TIEABLE_P): Redefine.
16413         (rs6000_modes_tieable_p): New function.
16414         (rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
16415         * config/powerpcspe/powerpcspe.md: Update comment.
16416         * config/riscv/riscv.h (MODES_TIEABLE_P): Delete.
16417         * config/riscv/riscv.c (riscv_modes_tieable_p): New function.
16418         (TARGET_MODES_TIEABLE_P): Redefine.
16419         * config/rl78/rl78.h (MODES_TIEABLE_P): Delete.
16420         * config/rl78/rl78.c (TARGET_MODES_TIEABLE_P): Redefine.
16421         (rl78_modes_tieable_p): New function.
16422         * config/rs6000/rs6000.h (MODES_TIEABLE_P): Delete.
16423         * config/rs6000/rs6000.c (TARGET_MODES_TIEABLE_P): Redefine.
16424         (rs6000_modes_tieable_p): New function.
16425         (rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
16426         * config/rs6000/rs6000.md: Update comment.
16427         * config/rx/rx.h (MODES_TIEABLE_P): Delete.
16428         * config/rx/rx.c (rx_modes_tieable_p): New function.
16429         (TARGET_MODES_TIEABLE_P): Redefine.
16430         * config/s390/s390.h (MODES_TIEABLE_P): Delete.
16431         * config/s390/s390.c (s390_modes_tieable_p): New function.
16432         (TARGET_MODES_TIEABLE_P): Redefine.
16433         * config/sh/sh.h (MODES_TIEABLE_P): Delete.
16434         * config/sh/sh.c (TARGET_MODES_TIEABLE_P): Redefine.
16435         (sh_modes_tieable_p): New function.
16436         * config/sparc/sparc.h (MODES_TIEABLE_P): Delete.
16437         * config/sparc/sparc-protos.h (sparc_modes_tieable_p): Delete.
16438         * config/sparc/sparc.c (TARGET_MODES_TIEABLE_P): Redefine.
16439         (sparc_modes_tieable_p): Make static.
16440         * config/spu/spu.h (MODES_TIEABLE_P): Delete.
16441         * config/spu/spu.c (spu_modes_tieable_p): New function.
16442         (TARGET_MODES_TIEABLE_P): Redefine.
16443         * config/stormy16/stormy16.h (MODES_TIEABLE_P): Delete.
16444         * config/stormy16/stormy16.c (xstormy16_modes_tieable_p): New function.
16445         (TARGET_MODES_TIEABLE_P): Redefine.
16446         * config/tilegx/tilegx.h (MODES_TIEABLE_P): Delete.
16447         * config/tilepro/tilepro.h (MODES_TIEABLE_P): Delete.
16448         * config/v850/v850.h (MODES_TIEABLE_P): Delete.
16449         * config/v850/v850.c (v850_modes_tieable_p): New function.
16450         (TARGET_MODES_TIEABLE_P): Redefine.
16451         * config/vax/vax.h (MODES_TIEABLE_P): Delete.
16452         * config/visium/visium.h (MODES_TIEABLE_P): Delete.
16453         * config/visium/visium.c (TARGET_MODES_TIEABLE_P): Redefine.
16454         (visium_modes_tieable_p): New function.
16455         * config/xtensa/xtensa.h (MODES_TIEABLE_P): Delete.
16456         * config/xtensa/xtensa.c (TARGET_MODES_TIEABLE_P): Redefine.
16457         (xtensa_modes_tieable_p): New function.
16458         * system.h (MODES_TIEABLE_P): Poison.
16459
16460 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
16461             Alan Hayward  <alan.hayward@arm.com>
16462             David Sherwood  <david.sherwood@arm.com>
16463
16464         * target.def (hard_regno_mode_ok): New hook.
16465         * doc/tm.texi (HARD_REGNO_MODE_OK): Replace with...
16466         (TARGET_HARD_REGNO_MODE_OK): ...this.
16467         * doc/tm.texi.in: Regenerate.
16468         * hooks.h (hook_bool_uint_mode_true): Declare.
16469         * hooks.c (hook_bool_uint_mode_true): New function.
16470         * doc/md.texi: Refer to targetm.hard_regno_mode_ok instead of
16471         HARD_REGNO_MODE_OK.
16472         * genpreds.c (write_insn_preds_c): Add an include of target.h.
16473         * alias.c (init_alias_target): Use targetm.hard_regno_mode_ok
16474         instead of HARD_REGNO_MODE_OK.
16475         * caller-save.c: Include target.h.
16476         (reg_save_code): Use targetm.hard_regno_mode_ok instead of
16477         HARD_REGNO_MODE_OK.
16478         * combine.c (can_combine_p): Likewise.
16479         (combinable_i3pat): Likewise.
16480         (can_change_dest_mode): Likewise.
16481         * expr.c (init_expr_target): Likewise.
16482         (convert_move): Likewise.
16483         (convert_modes): Likewise.
16484         * ira.c (setup_prohibited_class_mode_regs): Likewise.
16485         (setup_prohibited_mode_move_regs): Likewise.
16486         * ira.h (target_ira): Likewise.
16487         * lra-assigns.c (find_hard_regno_for_1): Likewise.
16488         * lra-constraints.c (process_alt_operands): Likewise.
16489         (split_reg): Likewise.
16490         * recog.c (peep2_find_free_register): Likewise.
16491         * ree.c (combine_reaching_defs): Likewise.
16492         * regcprop.c (maybe_mode_change): Likewise.
16493         * reginfo.c (init_reg_sets_1): Likewise.
16494         (choose_hard_reg_mode): Likewise.
16495         (simplifiable_subregs): Likewise.
16496         * regrename.c (check_new_reg_p): Likewise.
16497         * reload.c (find_valid_class): Likewise.
16498         (find_valid_class_1): Likewise.
16499         (reload_inner_reg_of_subreg): Likewise.
16500         (push_reload): Likewise.
16501         (combine_reloads): Likewise.
16502         (find_dummy_reload): Likewise.
16503         (find_reloads): Likewise.
16504         * reload1.c (find_reg): Likewise.
16505         (set_reload_reg): Likewise.
16506         (allocate_reload_reg): Likewise.
16507         (choose_reload_regs): Likewise.
16508         (reload_adjust_reg_for_temp): Likewise.
16509         * rtlanal.c (subreg_size_offset_from_lsb): Likewise.
16510         (simplify_subreg_regno): Likewise.
16511         * sel-sched.c (init_regs_for_mode): Likewise.
16512         * varasm.c (make_decl_rtl): Likewise.
16513         * config/aarch64/aarch64.h (HARD_REGNO_MODE_OK): Delete.
16514         (MODES_TIEABLE_P): Use targetm.hard_regno_mode_ok instead of
16515         HARD_REGNO_MODE_OK.
16516         * config/aarch64/aarch64-protos.h (aarch64_hard_regno_mode_ok): Delete.
16517         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Make static.
16518         (TARGET_HARD_REGNO_MODE_OK): Redefine.
16519         * config/alpha/alpha.h (HARD_REGNO_MODE_OK): Delete.
16520         * config/alpha/alpha.c (alpha_hard_regno_mode_ok): New function.
16521         (TARGET_HARD_REGNO_MODE_OK): Redefine.
16522         * config/arc/arc.h (arc_hard_regno_mode_ok): Delete.
16523         (arc_mode_class): Delete.
16524         (HARD_REGNO_MODE_OK): Delete.
16525         * config/arc/arc.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
16526         (arc_hard_regno_mode_ok): Rename old array to...
16527         (arc_hard_regno_mode_ok_modes): ...this.
16528         (arc_conditional_register_usage): Update accordingly.
16529         (arc_mode_class): Make static.
16530         (arc_hard_regno_mode_ok): New function.
16531         * config/arm/arm.h (HARD_REGNO_MODE_OK): Delete.
16532         * config/arm/arm-protos.h (arm_hard_regno_mode_ok): Delete.
16533         * config/arm/arm.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
16534         (arm_hard_regno_mode_ok): Make static.
16535         * config/arm/arm.md (movdi): Use targetm.hard_regno_mode_ok instead of
16536         HARD_REGNO_MODE_OK.
16537         * config/avr/avr-protos.h (avr_hard_regno_mode_ok): Delete.
16538         * config/avr/avr.h (HARD_REGNO_MODE_OK): Delete.
16539         * config/avr/avr.c (avr_hard_regno_mode_ok): Make static and
16540         return a bool.
16541         (TARGET_HARD_REGNO_MODE_OK): Redefine.
16542         * config/bfin/bfin-protos.h (hard_regno_mode_ok): Delete.
16543         * config/bfin/bfin.h (HARD_REGNO_MODE_OK): Delete.
16544         * config/bfin/bfin.c (hard_regno_mode_ok): Rename to...
16545         (bfin_hard_regno_mode_ok): ...this.  Make static and return a bool.
16546         (TARGET_HARD_REGNO_MODE_OK): Redefine.
16547         * config/bfin/predicates.md (valid_reg_operand): Use
16548         targetm.hard_regno_mode_ok instead of HARD_REGNO_MODE_OK.
16549         * config/c6x/c6x.h (HARD_REGNO_MODE_OK): Delete.
16550         * config/c6x/c6x.c (c6x_hard_regno_mode_ok): New function.
16551         (TARGET_HARD_REGNO_MODE_OK): Redefine.
16552         * config/cr16/cr16.h (HARD_REGNO_MODE_OK): Delete.
16553         * config/cr16/cr16-protos.h (cr16_hard_regno_mode_ok): Delete.
16554         * config/cr16/cr16.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
16555         (cr16_hard_regno_mode_ok): Make static and return a bool.
16556         * config/cris/cris.h (HARD_REGNO_MODE_OK): Delete.
16557         * config/cris/cris.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
16558         (cris_hard_regno_mode_ok): New function.
16559         * config/epiphany/epiphany.h (epiphany_hard_regno_mode_ok): Delete.
16560         (epiphany_mode_class): Delete.
16561         (HARD_REGNO_MODE_OK): Delete.
16562         * config/epiphany/epiphany-protos.h (hard_regno_mode_ok): Delete.
16563         * config/epiphany/epiphany.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
16564         (hard_regno_mode_ok): Rename to...
16565         (epiphany_hard_regno_mode_ok): ...this.  Make static and return a bool.
16566         * config/fr30/fr30.h (HARD_REGNO_MODE_OK): Delete.
16567         * config/fr30/fr30.md: Refer to targetm.hard_regno_mode_ok instead of
16568         HARD_REGNO_MODE_OK.
16569         * config/frv/frv.h (HARD_REGNO_MODE_OK): Delete.
16570         * config/frv/frv-protos.h (frv_hard_regno_mode_ok): Delete.
16571         * config/frv/frv.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
16572         (frv_hard_regno_mode_ok): Make static and return a bool.
16573         * config/frv/frv.md: Refer to targetm.hard_regno_mode_ok instead of
16574         HARD_REGNO_MODE_OK.
16575         * config/ft32/ft32.h (HARD_REGNO_MODE_OK): Delete.
16576         * config/h8300/h8300.h (HARD_REGNO_MODE_OK): Delete.
16577         * config/h8300/h8300-protos.h (h8300_hard_regno_mode_ok): Delete.
16578         * config/h8300/h8300.c (h8300_hard_regno_mode_ok): Make static
16579         and return a bool.
16580         (TARGET_HARD_REGNO_MODE_OK): Redefine.
16581         * config/i386/i386.h (HARD_REGNO_MODE_OK): Delete.
16582         * config/i386/i386-protos.h (ix86_hard_regno_mode_ok): Delete.
16583         * config/i386/i386.c (ix86_hard_regno_mode_ok): Make static and
16584         return a bool.
16585         (TARGET_HARD_REGNO_MODE_OK): Redefine.
16586         * config/ia64/ia64.h (HARD_REGNO_MODE_OK): Delete.
16587         * config/ia64/ia64.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
16588         (ia64_hard_regno_mode_ok): New function.
16589         * config/iq2000/iq2000.h (HARD_REGNO_MODE_OK): Delete.
16590         * config/iq2000/iq2000.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
16591         (iq2000_hard_regno_mode_ok): New function.
16592         * config/lm32/lm32.h (HARD_REGNO_MODE_OK): Delete.
16593         * config/lm32/lm32.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
16594         (lm32_hard_regno_mode_ok): New function.
16595         * config/m32c/m32c.h (HARD_REGNO_MODE_OK): Delete.
16596         * config/m32c/m32c-protos.h (m32c_hard_regno_ok): Delete.
16597         * config/m32c/m32c.c (class_can_hold_mode): Use m32c_hard_regno_mode_ok
16598         instead of HARD_REGNO_MODE_OK.
16599         (m32c_hard_regno_ok): Rename to...
16600         (m32c_hard_regno_mode_ok): ...this.  Make static and return a bool.
16601         (m32c_cannot_change_mode_class): Update accordingly.
16602         (TARGET_HARD_REGNO_MODE_OK): Redefine.
16603         * config/m32r/m32r.h (m32r_hard_regno_mode_ok): Delete.
16604         (m32r_mode_class): Delete.
16605         (HARD_REGNO_MODE_OK): Delete.
16606         * config/m32r/m32r.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
16607         (m32r_hard_regno_mode_ok): Rename to...
16608         (m32r_hard_regno_modes): ...this.
16609         (m32r_mode_class): Make static.
16610         (m32r_hard_regno_mode_ok): New function.
16611         * config/m68k/m68k.h (HARD_REGNO_MODE_OK): Delete.
16612         * config/m68k/m68k-protos.h (m68k_regno_mode_ok): Delete.
16613         * config/m68k/m68k.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
16614         (m68k_hard_regno_mode_ok): Make static.
16615         * config/mcore/mcore.h (HARD_REGNO_MODE_OK): Delete.
16616         * config/mcore/mcore.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
16617         (mcore_hard_regno_mode_ok): New function.
16618         * config/microblaze/microblaze.h (microblaze_hard_regno_mode_ok)
16619         (HARD_REGNO_MODE_OK): Delete.
16620         * config/microblaze/microblaze.c (microblaze_hard_regno_mode_ok):
16621         Rename to...
16622         (microblaze_hard_regno_mode_ok_p): ...this and make static.
16623         (microblaze_hard_regno_mode_ok): New function.
16624         (TARGET_HARD_REGNO_MODE_OK): Redefine.
16625         * config/mips/mips.h (HARD_REGNO_MODE_OK): Delete.
16626         (mips_hard_regno_mode_ok): Delete.
16627         * config/mips/mips.c (mips_hard_regno_mode_ok): Rename to...
16628         (mips_hard_regno_mode_ok_p): ...this and make static.
16629         (mips_hard_regno_mode_ok_p): Rename to...
16630         (mips_hard_regno_mode_ok_uncached): ...this.
16631         (mips_hard_regno_mode_ok): New function.
16632         (mips_class_max_nregs): Use mips_hard_regno_mode_ok instead
16633         of HARD_REGNO_MODE_OK.
16634         (mips_option_override): Update after above name changes.
16635         (TARGET_HARD_REGNO_MODE_OK): Redefine.
16636         * config/mmix/mmix.h (HARD_REGNO_MODE_OK): Delete.
16637         * config/mn10300/mn10300.h (HARD_REGNO_MODE_OK): Delete.
16638         * config/mn10300/mn10300-protos.h (mn10300_hard_regno_mode_ok): Delete.
16639         * config/mn10300/mn10300.c (mn10300_hard_regno_mode_ok): Make static.
16640         (TARGET_HARD_REGNO_MODE_OK): Redefine.
16641         * config/moxie/moxie.h (HARD_REGNO_MODE_OK): Delete.
16642         * config/msp430/msp430.h (HARD_REGNO_MODE_OK): Delete.
16643         * config/msp430/msp430-protos.h (msp430_hard_regno_mode_ok): Delete.
16644         * config/msp430/msp430.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
16645         (msp430_hard_regno_mode_ok): Make static and return a bool.
16646         * config/nds32/nds32.h (HARD_REGNO_MODE_OK): Delete.
16647         * config/nds32/nds32-protos.h (nds32_hard_regno_mode_ok): Delete.
16648         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Make static
16649         and return a bool.
16650         (TARGET_HARD_REGNO_MODE_OK): Redefine.
16651         * config/nios2/nios2.h (HARD_REGNO_MODE_OK): Delete.
16652         * config/nvptx/nvptx.h (HARD_REGNO_MODE_OK): Delete.
16653         * config/pa/pa.h (MODES_TIEABLE_P): Update commentary.
16654         * config/pa/pa32-regs.h (HARD_REGNO_MODE_OK): Rename to...
16655         (PA_HARD_REGNO_MODE_OK): ...this
16656         * config/pa/pa64-regs.h (HARD_REGNO_MODE_OK): Rename to...
16657         (PA_HARD_REGNO_MODE_OK): ...this.
16658         * config/pa/pa.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
16659         (pa_hard_regno_mode_ok): New function.
16660         * config/pdp11/pdp11.h (HARD_REGNO_MODE_OK): Delete.
16661         * config/pdp11/pdp11.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
16662         (pdp11_hard_regno_mode_ok): New function.
16663         * config/powerpcspe/powerpcspe.h (HARD_REGNO_MODE_OK): Delete.
16664         * config/powerpcspe/powerpcspe-protos.h (rs6000_hard_regno_mode_ok_p):
16665         Delete.
16666         * config/powerpcspe/powerpcspe.c (rs6000_hard_regno_mode_ok_p):
16667         Make static.
16668         (TARGET_HARD_REGNO_MODE_OK): Redefine.
16669         (rs6000_hard_regno_mode_ok): Rename to...
16670         (rs6000_hard_regno_mode_ok_uncached): ...this.
16671         (rs6000_init_hard_regno_mode_ok): Update accordingly.
16672         (rs6000_hard_regno_mode_ok): New function.
16673         * config/riscv/riscv.h (HARD_REGNO_MODE_OK): Delete.
16674         * config/riscv/riscv-protos.h (riscv_hard_regno_mode_ok_p): Delete.
16675         * config/riscv/riscv.c (riscv_hard_regno_mode_ok_p): Rename to...
16676         (riscv_hard_regno_mode_ok): ...this and make static.
16677         (TARGET_HARD_REGNO_MODE_OK): Redefine.
16678         * config/rl78/rl78.h (HARD_REGNO_MODE_OK): Delete.
16679         * config/rl78/rl78-protos.h (rl78_hard_regno_mode_ok): Delete.
16680         * config/rl78/rl78.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
16681         (rl78_hard_regno_mode_ok): Make static and return bool.
16682         * config/rs6000/rs6000.h (HARD_REGNO_MODE_OK): Delete.
16683         * config/rs6000/rs6000-protos.h (rs6000_hard_regno_mode_ok_p):
16684         Delete.
16685         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok_p): Make static.
16686         (TARGET_HARD_REGNO_MODE_OK): Redefine.
16687         (rs6000_hard_regno_mode_ok): Rename to...
16688         (rs6000_hard_regno_mode_ok_uncached): ...this.
16689         (rs6000_init_hard_regno_mode_ok): Update accordingly.
16690         (rs6000_hard_regno_mode_ok): New function.
16691         * config/rx/rx.h (HARD_REGNO_MODE_OK): Delete.
16692         * config/rx/rx.c (rx_hard_regno_mode_ok): New function.
16693         (TARGET_HARD_REGNO_MODE_OK): Redefine.
16694         * config/s390/s390.h (HARD_REGNO_MODE_OK): Delete.
16695         * config/s390/s390-protos.h (s390_hard_regno_mode_ok): Delete.
16696         * config/s390/s390.c (s390_hard_regno_mode_ok): Make static.
16697         (TARGET_HARD_REGNO_MODE_OK): Redefine.
16698         * config/sh/sh.h (HARD_REGNO_MODE_OK): Delete.
16699         * config/sh/sh-protos.h (sh_hard_regno_mode_ok): Delete.
16700         * config/sh/sh.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
16701         (sh_hard_regno_mode_ok): Make static.
16702         * config/sparc/constraints.md: Refer to targetm.hard_regno_mode_ok
16703         instead of HARD_REGNO_MODE_OK.
16704         * config/sparc/sparc.h (hard_regno_mode_classes): Delete.
16705         (sparc_mode_class): Delete.
16706         (HARD_REGNO_MODE_OK): Delete.
16707         * config/sparc/sparc.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
16708         (hard_regno_mode_classes): Make static.
16709         (sparc_mode_class): Likewise.
16710         (sparc_hard_regno_mode_ok): New function.
16711         * config/spu/spu.h (HARD_REGNO_MODE_OK): Delete.
16712         * config/stormy16/stormy16.h (HARD_REGNO_MODE_OK): Delete.
16713         * config/stormy16/stormy16.c (xstormy16_hard_regno_mode_ok): New
16714         function.
16715         (TARGET_HARD_REGNO_MODE_OK): Redefine.
16716         * config/tilegx/tilegx.h (HARD_REGNO_MODE_OK): Delete.
16717         * config/tilepro/tilepro.h (HARD_REGNO_MODE_OK): Delete.
16718         * config/v850/v850.h (HARD_REGNO_MODE_OK): Delete.
16719         * config/v850/v850.c (v850_hard_regno_mode_ok): New function.
16720         (TARGET_HARD_REGNO_MODE_OK): Redefine.
16721         * config/vax/vax.h (HARD_REGNO_MODE_OK): Delete.
16722         * config/visium/visium.h (HARD_REGNO_MODE_OK): Delete.
16723         * config/visium/visium.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
16724         (visium_hard_regno_mode_ok): New function.
16725         * config/visium/visium.md: Refer to targetm.hard_regno_mode_ok
16726         instead of HARD_REGNO_MODE_OK.
16727         * config/xtensa/xtensa.h (xtensa_hard_regno_mode_ok): Delete.
16728         (HARD_REGNO_MODE_OK): Delete.
16729         * config/xtensa/xtensa.c (xtensa_hard_regno_mode_ok): Rename to...
16730         (xtensa_hard_regno_mode_ok_p): ...this and make static.
16731         (xtensa_option_override): Update accordingly.
16732         (TARGET_HARD_REGNO_MODE_OK): Redefine.
16733         (xtensa_hard_regno_mode_ok): New function.
16734         * system.h (HARD_REGNO_MODE_OK): Poison.
16735
16736 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
16737             Alan Hayward  <alan.hayward@arm.com>
16738             David Sherwood  <david.sherwood@arm.com>
16739
16740         * target.def (hard_regno_call_part_clobbered): New hook.
16741         * doc/tm.texi.in (HARD_REGNO_CALL_PART_CLOBBERED): Replace with...
16742         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): ...this hook.
16743         * doc/tm.texi: Regenerate.
16744         * hooks.h (hook_bool_uint_mode_false): Declare.
16745         * hooks.c (hook_bool_uint_mode_false): New function.
16746         * regs.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
16747         * cselib.c (cselib_process_insn): Use
16748         targetm.hard_regno_call_part_clobbered instead of
16749         HARD_REGNO_CALL_PART_CLOBBERED.
16750         * ira-conflicts.c (ira_build_conflicts): Likewise.
16751         * ira-costs.c (ira_tune_allocno_costs): Likewise.
16752         * lra-constraints.c (need_for_call_save_p): Likewise.
16753         * lra-lives.c: Include target.h.
16754         (check_pseudos_live_through_calls): Use
16755         targetm.hard_regno_call_part_clobbered instead of
16756         HARD_REGNO_CALL_PART_CLOBBERED.
16757         * regcprop.c: Include target.h.
16758         (copyprop_hardreg_forward_1): Use
16759         targetm.hard_regno_call_part_clobbered instead of
16760         HARD_REGNO_CALL_PART_CLOBBERED.
16761         * reginfo.c (choose_hard_reg_mode): Likewise.
16762         * regrename.c (check_new_reg_p): Likewise.
16763         * reload.c (find_equiv_reg): Likewise.
16764         * reload1.c (emit_reload_insns): Likewise.
16765         * sched-deps.c (deps_analyze_insn): Likewise.
16766         * sel-sched.c (init_regs_for_mode): Likewise.
16767         (mark_unavailable_hard_regs): Likewise.
16768         * targhooks.c (default_dwarf_frame_reg_mode): Likewise.
16769         * config/aarch64/aarch64.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
16770         * config/aarch64/aarch64.c (aarch64_hard_regno_call_part_clobbered):
16771         New function.
16772         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
16773         * config/avr/avr.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
16774         * config/avr/avr-protos.h (avr_hard_regno_call_part_clobbered):
16775         Delete.
16776         * config/avr/avr.c (avr_hard_regno_call_part_clobbered): Make static
16777         and return a bool.
16778         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
16779         * config/i386/i386.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
16780         * config/i386/i386.c (ix86_hard_regno_call_part_clobbered): New
16781         function.
16782         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
16783         * config/mips/mips.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
16784         * config/mips/mips.c (mips_hard_regno_call_part_clobbered): New
16785         function.
16786         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
16787         * config/powerpcspe/powerpcspe.h (HARD_REGNO_CALL_PART_CLOBBERED):
16788         Delete.
16789         * config/powerpcspe/powerpcspe.c
16790         (rs6000_hard_regno_call_part_clobbered): New function.
16791         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
16792         * config/rs6000/rs6000.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
16793         * config/rs6000/rs6000.c (rs6000_hard_regno_call_part_clobbered):
16794         New function.
16795         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
16796         * config/s390/s390.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
16797         * config/s390/s390.c (s390_hard_regno_call_part_clobbered): New
16798         function.
16799         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
16800         * config/sh/sh.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
16801         * system.h (HARD_REGNO_CALL_PART_CLOBBERED): Poison.
16802
16803 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
16804             Alan Hayward  <alan.hayward@arm.com>
16805             David Sherwood  <david.sherwood@arm.com>
16806
16807         * rtl.h (subreg_memory_offset): Declare.
16808         * emit-rtl.c (subreg_memory_offset): New function.
16809         * expmed.c (store_bit_field_1): Use it.
16810         * expr.c (undefined_operand_subword_p): Likewise.
16811         * simplify-rtx.c (simplify_subreg): Likewise.
16812
16813 2017-09-04  Alexander Monakov  <amonakov@ispras.ru>
16814
16815         PR rtl-optimization/57448
16816         PR target/67458
16817         PR target/81316
16818         * optabs.c (expand_atomic_load): Place compiler memory barriers if
16819         using atomic_load pattern.
16820         (expand_atomic_store): Likewise.
16821
16822 2017-09-04  Jakub Jelinek  <jakub@redhat.com>
16823
16824         PR sanitizer/81981
16825         * gimple-fold.c (gimple_fold_call): Optimize away useless UBSAN_PTR
16826         and UBSAN_BOUNDS internal calls.  Clean up IFN_UBSAN_OBJECT_SIZE
16827         handling.  Use replace_call_with_value with NULL instead of
16828         gsi_replace, unlink_stmt_vdef and release_defs.
16829
16830         * gdbhooks.py (OptMachineModePrinter.to_string): Use 8 spaces
16831         instead of tab.
16832
16833         * lra-remat.c (reg_overlap_for_remat_p): Fix a pasto.
16834
16835 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
16836
16837         PR bootstrap/82045
16838         * rtl.h (emit_library_call_value_1): Declare.
16839         (emit_library_call): Replace declaration with a series of overloads.
16840         Remove the parameter count argument.
16841         (emit_library_call_value): Likewise.
16842         * calls.c (emit_library_call_value_1): Make global.  Replace varargs
16843         with an "rtx_mode_t *".
16844         (emit_library_call_value): Delete.
16845         (emit_library_call): Likewise.
16846         * asan.c (asan_emit_stack_protection): Update calls accordingly.
16847         (asan_emit_allocas_unpoison): Likewise.
16848         * builtins.c (expand_builtin_powi): Likewise.
16849         (expand_asan_emit_allocas_unpoison): Likewise.
16850         * cfgexpand.c (expand_main_function): Likewise.
16851         * config/aarch64/aarch64.c (aarch64_trampoline_init): Likewise.
16852         * config/aarch64/aarch64.h (PROFILE_HOOK): Likewise.
16853         * config/alpha/alpha.c (alpha_trampoline_init): Likewise.
16854         * config/arm/arm.c (arm_trampoline_init): Likewise.
16855         (arm_call_tls_get_addr): Likewise.
16856         (arm_expand_divmod_libfunc): Likewise.
16857         * config/bfin/bfin.md (umulsi3_highpart): Likewise.
16858         (smulsi3_highpart): Likewise.
16859         * config/c6x/c6x.c (c6x_initialize_trampoline): Likewise.
16860         (c6x_expand_compare): Likewise.
16861         (c6x_expand_movmem): Likewise.
16862         * config/frv/frv.c (frv_trampoline_init): Likewise.
16863         * config/i386/i386.c (ix86_trampoline_init): Likewise.
16864         (ix86_expand_divmod_libfunc): Likewise.
16865         * config/ia64/ia64.c (ia64_expand_tls_address): Likewise.
16866         (ia64_expand_compare): Likewise.
16867         (ia64_profile_hook): Likewise.
16868         * config/ia64/ia64.md (save_stack_nonlocal): Likewise.
16869         (nonlocal_goto): Likewise.
16870         (restore_stack_nonlocal): Likewise.
16871         * config/m32r/m32r.c (block_move_call): Likewise.
16872         (m32r_trampoline_init): Likewise.
16873         * config/m68k/linux.h (FINALIZE_TRAMPOLINE): Likewise.
16874         * config/m68k/m68k.c (m68k_call_tls_get_addr): Likewise.
16875         (m68k_call_m68k_read_tp): Likewise.
16876         * config/microblaze/microblaze.c (microblaze_call_tls_get_addr)
16877         (microblaze_expand_divide): Likewise.
16878         * config/mips/mips.h (mips_args): Likewise.
16879         * config/mips/sdemtk.h (mips_sync_icache): Likewise.
16880         (MIPS_ICACHE_SYNC): Likewise.
16881         * config/nios2/nios2.c (nios2_emit_expensive_div): Likewise.
16882         (nios2_trampoline_init): Likewise.
16883         * config/pa/pa.c (hppa_tls_call): Likewise.
16884         (pa_trampoline_init): Likewise.
16885         * config/pa/pa.md (canonicalize_funcptr_for_compare): Likewise.
16886         * config/powerpcspe/powerpcspe.c (rs6000_legitimize_tls_address)
16887         (expand_strn_compare): Likewise.
16888         (rs6000_generate_compare): Likewise.
16889         (rs6000_expand_float128_convert): Likewise.
16890         (output_profile_hook): Likewise.
16891         (rs6000_trampoline_init): Likewise.
16892         * config/powerpcspe/powerpcspe.md (neg<mode>2): Likewise.
16893         * config/riscv/riscv.h (PROFILE_HOOK): Likewise.
16894         * config/rs6000/rs6000-string.c (expand_strn_compare): Likewise.
16895         * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise.
16896         (rs6000_generate_compare): Likewise.
16897         (rs6000_expand_float128_convert): Likewise.
16898         (output_profile_hook): Likewise.
16899         (rs6000_trampoline_init): Likewise.
16900         * config/rs6000/rs6000.md (neg<mode>2): Likewise.
16901         * config/sh/sh.c (sh_trampoline_init): Likewise.
16902         * config/sparc/sparc.c (emit_soft_tfmode_libcall): Likewise.
16903         (sparc_emit_float_lib_cmp): Likewise.
16904         (sparc32_initialize_trampoline): Likewise.
16905         (sparc64_initialize_trampoline): Likewise.
16906         (sparc_profile_hook): Likewise.
16907         * config/spu/spu.c (ea_load_store): Likewise.
16908         * config/spu/spu.md (floatunssidf2): Likewise.
16909         * config/tilegx/tilegx.c (tilegx_trampoline_init): Likewise.
16910         * config/tilepro/tilepro.c (tilepro_trampoline_init): Likewise.
16911         * config/visium/visium.c (expand_block_move_4): Likewise.
16912         (expand_block_move_2): Likewise.
16913         (expand_block_move_1): Likewise.
16914         (expand_block_set_4): Likewise.
16915         (expand_block_set_2): Likewise.
16916         (expand_block_set_1): Likewise.
16917         (visium_trampoline_init): Likewise.
16918         (visium_profile_hook): Likewise.
16919         * config/xtensa/xtensa.c (xtensa_expand_nonlocal_goto): Likewise.
16920         (xtensa_setup_frame_addresses): Likewise.
16921         (xtensa_trampoline_init): Likewise.
16922         * except.c (sjlj_emit_function_enter): Likewise.
16923         (sjlj_emit_function_exit): Likewise.
16924         * explow.c (allocate_dynamic_stack_space): Likewise.
16925         (probe_stack_range): Likewise.
16926         * expr.c (convert_mode_scalar): Likewise.
16927         * optabs.c (expand_binop): Likewise.
16928         (expand_twoval_binop_libfunc): Likewise.
16929         (expand_unop): Likewise.
16930         (prepare_cmp_insn): Likewise.
16931         (prepare_float_lib_cmp): Likewise.
16932         (expand_float): Likewise.
16933         (expand_fix): Likewise.
16934         (expand_fixed_convert): Likewise.
16935         (maybe_emit_sync_lock_test_and_set): Likewise.
16936         (expand_atomic_compare_and_swap): Likewise.
16937         (expand_mem_thread_fence): Likewise.
16938         (expand_atomic_fetch_op): Likewise.
16939
16940 2017-09-03  Gerald Pfeifer  <gerald@pfeifer.com>
16941
16942         * doc/generic.texi (OpenACC): Adjust URL.
16943         * doc/invoke.texi (C Dialect Options): Ditto.
16944
16945 2017-09-03  Uros Bizjak  <ubizjak@gmail.com>
16946
16947         * config/i386/i386.md (*bt<mode>): Use nonimmediate_operand
16948         predicate for operand 1.  Add (m,<S>) constraint.
16949         (*jcc_bt<mode>): Use nonimmediate_operand predicate for operand 1.
16950         Prevent memory operand 1 with register operand 2.
16951
16952 2017-09-01  Segher Boessenkool  <segher@kernel.crashing.org>
16953
16954         PR rtl-optimization/82024
16955         * combine.c (try_combine): If the combination result is a PARALLEL,
16956         and we only need to retain the SET in there that would be placed
16957         at I2, check that we can place that at I3 instead, before doing so.
16958
16959 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
16960
16961         PR target/81766
16962         * config/i386/i386.c (ix86_init_large_pic_reg): Return label
16963         instead of void.
16964         (ix86_init_pic_reg): Remember label from ix86_init_large_pic_reg,
16965         if non-NULL and preceded by NOTE_INSN_BASIC_BLOCK, swap the note
16966         and label.
16967
16968 2017-09-01  Joerg Sonnenberger  <joerg@bec.de>
16969             Jeff Law  <law@redhat.com>
16970
16971         * varasm.c (bss_initializer_p): Do not put constants into .bss
16972         (categorize_decl_for_section): Handle bss_initializer_p returning
16973         false when DECL_INITIAL is NULL.
16974
16975 2017-09-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16976
16977         PR target/82012
16978         * config/s390/s390.c (s390_can_inline_p): New function.
16979
16980 2017-09-01  Jeff Law  <law@redhat.com>
16981
16982         PR tree-optimization/82052
16983         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
16984         Always initialize the returned slot after a hash table miss
16985         when INSERT is true.
16986
16987 2017-09-01  Alexander Monakov  <amonakov@ispras.ru>
16988
16989         * config/s390/s390.md (mem_signal_fence): Remove.
16990         * doc/md.texi (mem_signal_fence): Remove.
16991         * optabs.c (expand_mem_signal_fence): Remove uses of mem_signal_fence.
16992         Update comments.
16993         * target-insns.def (mem_signal_fence): Remove.
16994
16995 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
16996
16997         PR sanitizer/81902
16998         * doc/invoke.texi: Document -fsanitize=pointer-overflow.
16999
17000         PR sanitizer/81923
17001         * asan.c (create_odr_indicator): Strip name encoding from assembler
17002         name before appending it after __odr_asan_.
17003
17004 2017-09-01  Martin Liska  <mliska@suse.cz>
17005
17006         PR tree-optimization/82059
17007         * gimple-ssa-isolate-paths.c (isolate_path): Add profile and
17008         frequency only when an edge is redirected.
17009
17010 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
17011
17012         * config/arc/arc-c.c (__ARC_LPC_WIDTH__): Add builtin define.
17013         * config/arc/arc.c (ARC_MAX_LOOP_LENGTH): Define.
17014         (arc_conditional_register_usage): Remove ARC600 lp_count
17015         exception.
17016         (arc_file_start): Emit Tag_ARC_CPU_variation.
17017         (arc_can_use_doloop_p): New conditions to use ZOLs.
17018         (hwloop_fail): New function.
17019         (hwloop_optimize): Likewise.
17020         (hwloop_pattern_reg): Likewise.
17021         (arc_doloop_hooks): New struct, to be used with reorg_loops.
17022         (arc_reorg_loops): New function, calls reorg_loops.
17023         (arc_reorg): Call arc_reorg_loops.  Remove old ZOL handling.
17024         (arc600_corereg_hazard): Remove ZOL checking, case handled by
17025         hwloop_optimize.
17026         (arc_loop_hazard): Remove function, functionality moved into
17027         hwloop_optimize.
17028         (arc_hazard): Remove arc_loop_hazard call.
17029         (arc_adjust_insn_length): Remove ZOL handling, functionality moved
17030         into hwloop_optimize.
17031         (arc_label_align): Remove ZOL handling.
17032         * config/arc/arc.h (LOOP_ALIGN): Changed to 0.
17033         * config/arc/arc.md (doloop_begin): Remove pattern.
17034         (doloop_begin_i): Likewise.
17035         (doloop_end_i): Likewise.
17036         (doloop_fallback): Likewise.
17037         (doloop_fallback_m): Likewise.
17038         (doloop_end): Reimplement expand.
17039         (arc_lp): New pattern for LP instruction.
17040         (loop_end): New pattern.
17041         (loop_fail): Likewise.
17042         (decrement_and_branch_until_zero): Likewise.
17043         * config/arc/arc.opt (mlpc-width): New option.
17044         * doc/invoke.texi (mlpc-width): Document option.
17045
17046 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
17047
17048         * config/arc/arc.c (arc_ifcvt): Remove use of merge_blocks call.
17049         (arc_ccfsm_advance): Fix checking for delay slots.
17050         (arc_reorg): Add rtl dump after each call to arc_ifcvt.
17051
17052 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
17053
17054         * config/arc/arc.md (movqi_insn): Add stores to save constant long
17055         immediates.
17056         (movhi_insn): Update store instruction constraint which are saving
17057         6-bit short immediates.
17058         (movsi_insn): Consider also short scaled load operations.
17059         (zero_extendhisi2_i): Use Usd constraint instead of T.
17060         (extendhisi2_i): Add q constraint.
17061         (arc_clzsi2): Add type and length attributes.
17062         (arc_ctzsi2): Likewise.
17063         * config/arc/constraints.md (Usc): Update constraint, the
17064         assembler can parse two relocations for a single instruction.
17065
17066 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
17067
17068         * config/arc/arc.c (arc_use_anchors_for_symbol_p): New function.
17069         (TARGET_USE_ANCHORS_FOR_SYMBOL_P): Define.
17070
17071 2017-08-31  Olivier Hainque  <hainque@adacore.com>
17072
17073         * config.gcc (powerpc-wrs-vxworks|vxworksae|vxworksmils): Now
17074         match as powerpc-wrs-vxworks*.
17075
17076 2017-08-31  James Greenhalgh  <james.greenhalgh@arm.com>
17077
17078         * config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): Fix
17079         register constraint for by-element operand.
17080         (aarch64_mls_elt_merge<mode>): Likewise.
17081
17082 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
17083
17084         * config/arc/arc.c (arc_can_follow_jump): Check for short
17085         branches.
17086
17087 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
17088
17089         * config.gcc: Use g.opt for arc.
17090         * config/arc/arc.c (LEGITIMATE_SCALED_ADDRESS_P): Deleted,
17091         functionality moved to ...
17092         (legitimate_scaled_address_p): New function, ...here.
17093         (LEGITIMATE_SMALL_DATA_OFFSET_P): New define.
17094         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Use the above define.
17095         (legitimate_offset_address_p): Delete TARGET_NO_SDATA_SET
17096         condition.
17097         (arc_override_options): Handle G option.
17098         (arc_output_pic_addr_const): Correct function definition.
17099         (arc_legitimate_address_p): Use legitimate_scaled_address_p.
17100         (arc_decl_anon_ns_mem_p): Delete.
17101         (arc_in_small_data_p): Overhaul this function to take into
17102         consideration the value given via G option.
17103         (arc_rewrite_small_data_1): Renamed and corrected old
17104         arc_rewrite_small_data function.
17105         (arc_rewrite_small_data): New function.
17106         (small_data_pattern): Don't use pic_offset_table_rtx.
17107         * config/arc/arc.h (CC1_SPEC): Recognize G option.
17108         * config/arc/simdext.md (movmisalignv2hi): Use
17109         prepare_move_operands function.
17110         (mov*): Likewise.
17111         (movmisalign*): Likewise.
17112         * doc/invoke.texi (ARC options): Document -G option.
17113
17114 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
17115
17116         * config/arc/arc-protos.h (compact_sda_memory_operand): Update
17117         prototype.
17118         * config/arc/arc.c (arc_print_operand): Output scalled address for
17119         sdata whenever is possible.
17120         (arc_in_small_data_p): Allow sdata for 64bit datum when double
17121         load/stores are available.
17122         (compact_sda_memory_operand): Check for the alignment required by
17123         code density instructions.
17124         * config/arc/arc.md (movsi_insn): Use newly introduced Us0
17125         constraint.
17126         * config/arc/constraints.md (Usd): Update constraint.
17127         (Us0): New constraint.
17128         (Usc): Update constraint.
17129
17130 2017-08-31  Richard Biener  <rguenther@suse.de>
17131
17132         PR middle-end/82054
17133         * dwarf2out.c (dwarf2out_early_global_decl): Process each
17134         function only once.
17135
17136 2017-08-31  Tamar Christina  <tamar.christina@arm.com>
17137
17138         * config/aarch64/aarch64-builtins.c (aarch64_init_simd_builtins):
17139         Resize type_signature.
17140
17141 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
17142             Alan Hayward  <alan.hayward@arm.com>
17143             David Sherwood  <david.sherwood@arm.com>
17144
17145         * config/aarch64/aarch64.c (aarch64_base_register_rtx_p): Only allow
17146         subregs whose inner modes can be stored in GPRs.
17147         (aarch64_classify_index): Likewise.
17148
17149 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
17150             Alan Hayward  <alan.hayward@arm.com>
17151             David Sherwood  <david.sherwood@arm.com>
17152
17153         * config/aarch64/iterators.md (V_cmp_result): Rename to...
17154         (V_INT_EQUIV): ...this.
17155         (v_cmp_result): Rename to...
17156         (v_int_equiv): ...this.
17157         * config/aarch64/aarch64.md (xorsign<mode>3): Update accordingly.
17158         * config/aarch64/aarch64-simd.md (xorsign<mode>3): Likewise.
17159         (copysign<mode>3): Likewise.
17160         (aarch64_simd_bsl<mode>_internal): Likewise.
17161         (aarch64_simd_bsl<mode>): Likewise.
17162         (vec_cmp<mode><mode>): Likewise.
17163         (vcond<mode><mode>): Likewise.
17164         (vcond<v_cmp_mixed><mode>): Likewise.
17165         (vcondu<mode><v_cmp_mixed>): Likewise.
17166         (aarch64_cm<optab><mode>): Likewise.
17167         (aarch64_cmtst<mode>): Likewise.
17168         (aarch64_fac<optab><mode>): Likewise.
17169         (vec_perm_const<mode>): Likewise.
17170         (vcond_mask_<mode><v_cmp_result>): Rename to...
17171         (vcond_mask_<mode><v_int_equiv>): ...this.
17172         (vec_cmp<mode><v_cmp_result>): Rename to...
17173         (vec_cmp<mode><v_int_equiv>): ...this.
17174
17175 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
17176             Alan Hayward  <alan.hayward@arm.com>
17177             David Sherwood  <david.sherwood@arm.com>
17178
17179         * config/aarch64/aarch64-modes.def: Remove 32-, 48- and 64-byte
17180         vector modes.
17181         * config/aarch64/iterators.md (VRL2, VRL3, VRL4): Delete.
17182         * config/aarch64/aarch64.md (UNSPEC_LD2_DREG, UNSPEC_LD3_DREG)
17183         (UNSPEC_LD4_DREG): New unspecs.
17184         * config/aarch64/aarch64-simd.md (aarch64_ld2<mode>_dreg_le)
17185         (aarch64_ld2<mode>_dreg_be): Replace with...
17186         (aarch64_ld2<mode>_dreg): ...this pattern and use the new DREG
17187         unspec.
17188         (aarch64_ld3<mode>_dreg_le)
17189         (aarch64_ld3<mode>_dreg_be): Replace with...
17190         (aarch64_ld3<mode>_dreg): ...this pattern and use the new DREG
17191         unspec.
17192         (aarch64_ld4<mode>_dreg_le)
17193         (aarch64_ld4<mode>_dreg_be): Replace with...
17194         (aarch64_ld4<mode>_dreg): ...this pattern and use the new DREG
17195         unspec.
17196
17197 2017-08-30  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17198
17199         PR tree-optimization/81987
17200         * gimple-ssa-strength-reduction.c (insert_initializers): Don't
17201         insert an initializer in a location not dominated by the stride
17202         definition.
17203
17204 2017-08-30  Eric Botcazou  <ebotcazou@adacore.com>
17205
17206         * tree-eh.c (lower_try_finally_switch): Set the location of the finally
17207         on the entire header of the finally block in the fallthru case.
17208
17209 2017-08-30  Eric Botcazou  <ebotcazou@adacore.com>
17210
17211         * varasm.c (decode_addr_const): Deal with INDIRECT_REF <INTEGER_CST>.
17212
17213 2017-08-30  Pat Haugen  <pthaugen@us.ibm.com>
17214
17215         * config/rs6000/rs6000.c (rs6000_emit_prologue_move_from_cr): Rename from
17216         rs6000_emit_move_from_cr and call renamed function.
17217         (rs6000_emit_prologue): Call renamed functions.
17218         * config/rs6000/rs6000.md (prologue_movesi_from_cr): Rename from
17219         movesi_from_cr, remove volatile CRs.
17220
17221 2017-08-30  Jon Beniston  <jon@beniston.com>
17222             Richard Biener  <rguenther@suse.de>
17223
17224         * tree-vect-patterns.c (vect_pattern_recog_1): Use VECTOR_TYPE_P instead
17225         of VECTOR_MODE_P check.
17226         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Allow single
17227         element vector types.
17228
17229 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17230
17231         * df.h (df_read_modify_subreg_p): Remove in favor of...
17232         * rtl.h (read_modify_subreg_p): ...this new function.  Take a
17233         const_rtx instead of an rtx.
17234         * cprop.c (local_cprop_find_used_regs): Update accordingly.
17235         * df-problems.c (df_word_lr_mark_ref): Likewise.
17236         * ira-lives.c (mark_pseudo_reg_live): Likewise.
17237         (mark_pseudo_reg_dead): Likewise.
17238         (mark_ref_dead): Likewise.
17239         * reginfo.c (init_subregs_of_mode): Likewise.
17240         * sched-deps.c (sched_analyze_1): Likewise.
17241         * df-scan.c (df_def_record_1): Likewise.
17242         (df_uses_record): Likewise.
17243         (df_read_modify_subreg_p): Remove in favor of...
17244         * rtlanal.c (read_modify_subreg_p): ...this new function.  Take a
17245         const_rtx instead of an rtx.
17246
17247 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17248             Alan Hayward  <alan.hayward@arm.com>
17249             David Sherwood  <david.sherwood@arm.com>
17250
17251         * rtl.h (partial_subreg_p): New function.
17252         * caller-save.c (save_call_clobbered_regs): Use it.
17253         * calls.c (expand_call): Likewise.
17254         * combine.c (combinable_i3pat): Likewise.
17255         (simplify_set): Likewise.
17256         (make_extraction): Likewise.
17257         (make_compound_operation_int): Likewise.
17258         (gen_lowpart_or_truncate): Likewise.
17259         (force_to_mode): Likewise.
17260         (make_field_assignment): Likewise.
17261         (reg_truncated_to_mode): Likewise.
17262         (record_truncated_value): Likewise.
17263         (move_deaths): Likewise.
17264         * cse.c (record_jump_cond): Likewise.
17265         (cse_insn): Likewise.
17266         * cselib.c (cselib_lookup_1): Likewise.
17267         * expmed.c (extract_bit_field_using_extv): Likewise.
17268         * function.c (assign_parm_setup_reg): Likewise.
17269         * ifcvt.c (noce_convert_multiple_sets): Likewise.
17270         * ira-build.c (create_insn_allocnos): Likewise.
17271         * lra-coalesce.c (merge_pseudos): Likewise.
17272         * lra-constraints.c (match_reload): Likewise.
17273         (simplify_operand_subreg): Likewise.
17274         (curr_insn_transform): Likewise.
17275         * lra-lives.c (process_bb_lives): Likewise.
17276         * lra.c (new_insn_reg): Likewise.
17277         (lra_substitute_pseudo): Likewise.
17278         * regcprop.c (mode_change_ok): Likewise.
17279         (maybe_mode_change): Likewise.
17280         (copyprop_hardreg_forward_1): Likewise.
17281         * reload.c (push_reload): Likewise.
17282         (find_reloads): Likewise.
17283         (find_reloads_subreg_address): Likewise.
17284         * reload1.c (alter_reg): Likewise.
17285         (eliminate_regs_1): Likewise.
17286         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
17287
17288 2017-08-30  David Edelsohn  <dje.gcc@gmail.com>
17289
17290         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Revert
17291         back to if statements, including unpack.
17292
17293 2017-08-30  Martin Liska  <mliska@suse.cz>
17294
17295         PR inline-asm/82001
17296         * ipa-icf-gimple.c (func_checker::compare_tree_list_operand):
17297         Rename to ...
17298         (func_checker::compare_asm_inputs_outputs): ... this function.
17299         (func_checker::compare_gimple_asm): Use the function to compare
17300         also ASM constrains.
17301         * ipa-icf-gimple.h: Rename the function.
17302
17303 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17304             Alan Hayward  <alan.hayward@arm.com>
17305             David Sherwood  <david.sherwood@arm.com>
17306
17307         * coretypes.h (complex_mode): New type.
17308         * gdbhooks.py (build_pretty_printer): Handle it.
17309         * machmode.h (complex_mode): New class.
17310         (complex_mode::includes_p): New function.
17311         (is_complex_int_mode): Likewise.
17312         (is_complex_float_mode): Likewise.
17313         * genmodes.c (get_mode_class): Handle complex mode classes.
17314         * function.c (expand_function_end): Use is_complex_int_mode.
17315
17316 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17317             Alan Hayward  <alan.hayward@arm.com>
17318             David Sherwood  <david.sherwood@arm.com>
17319
17320         * coretypes.h (scalar_mode_pod): New typedef.
17321         * gdbhooks.py (build_pretty_printer): Handle it.
17322         * machmode.h (gt_ggc_mx, gt_pch_nx): New functions.
17323         * fixed-value.h (fixed_value::mode): Change type to scalar_mode_pod.
17324         * fold-const.c (fold_convert_const_int_from_fixed): Use scalar_mode.
17325         * tree-streamer-in.c (unpack_ts_fixed_cst_value_fields): Use
17326         as_a <scalar_mode>.
17327
17328 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17329             Alan Hayward  <alan.hayward@arm.com>
17330             David Sherwood  <david.sherwood@arm.com>
17331
17332         * machmode.h (mode_for_vector): Take a scalar_mode instead
17333         of a machine_mode.
17334         * stor-layout.c (mode_for_vector): Likewise.
17335         * explow.c (promote_mode): Use as_a <scalar_mode>.
17336         * sdbout.c (sdbout_parms): Use is_a <scalar_mode>.
17337
17338 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17339             Alan Hayward  <alan.hayward@arm.com>
17340             David Sherwood  <david.sherwood@arm.com>
17341
17342         * target.def (preferred_simd_mode): Take a scalar_mode
17343         instead of a machine_mode.
17344         * targhooks.h (default_preferred_simd_mode): Likewise.
17345         * targhooks.c (default_preferred_simd_mode): Likewise.
17346         * config/arc/arc.c (arc_preferred_simd_mode): Likewise.
17347         * config/arm/arm.c (arm_preferred_simd_mode): Likewise.
17348         * config/c6x/c6x.c (c6x_preferred_simd_mode): Likewise.
17349         * config/epiphany/epiphany.c (epiphany_preferred_simd_mode): Likewise.
17350         * config/i386/i386.c (ix86_preferred_simd_mode): Likewise.
17351         * config/mips/mips.c (mips_preferred_simd_mode): Likewise.
17352         * config/nvptx/nvptx.c (nvptx_preferred_simd_mode): Likewise.
17353         * config/powerpcspe/powerpcspe.c (rs6000_preferred_simd_mode):
17354         Likewise.
17355         * config/rs6000/rs6000.c (rs6000_preferred_simd_mode): Likewise.
17356         * config/s390/s390.c (s390_preferred_simd_mode): Likewise.
17357         * config/sparc/sparc.c (sparc_preferred_simd_mode): Likewise.
17358         * config/aarch64/aarch64.c (aarch64_preferred_simd_mode): Likewise.
17359         (aarch64_simd_scalar_immediate_valid_for_move): Update accordingly.
17360         * doc/tm.texi: Regenerate.
17361         * optabs-query.c (can_vec_mask_load_store_p): Return false for
17362         non-scalar modes.
17363
17364 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17365             Alan Hayward  <alan.hayward@arm.com>
17366             David Sherwood  <david.sherwood@arm.com>
17367
17368         * target.def (scalar_mode_supported_p): Take a scalar_mode
17369         instead of a machine_mode.
17370         * targhooks.h (default_scalar_mode_supported_p): Likewise.
17371         * targhooks.c (default_scalar_mode_supported_p): Likewise.
17372         * config/aarch64/aarch64.c (aarch64_scalar_mode_supported_p): Likewise.
17373         * config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
17374         * config/arm/arm.c (arm_scalar_mode_supported_p): Likewise.
17375         * config/avr/avr.c (avr_scalar_mode_supported_p): Likewise.
17376         * config/c6x/c6x.c (c6x_scalar_mode_supported_p): Likewise.
17377         * config/i386/i386.c (ix86_scalar_mode_supported_p): Likewise.
17378         * config/ia64/ia64.c (ia64_scalar_mode_supported_p): Likewise.
17379         * config/mips/mips.c (mips_scalar_mode_supported_p): Likewise.
17380         * config/msp430/msp430.c (msp430_scalar_mode_supported_p): Likewise.
17381         * config/pa/pa.c (pa_scalar_mode_supported_p): Likewise.
17382         * config/pdp11/pdp11.c (pdp11_scalar_mode_supported_p): Likewise.
17383         * config/powerpcspe/powerpcspe.c (rs6000_scalar_mode_supported_p):
17384         Likewise.
17385         * config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p): Likewise.
17386         * config/s390/s390.c (s390_scalar_mode_supported_p): Likewise.
17387         * config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
17388         * config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
17389         * config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p):
17390         Likewise.
17391         * doc/tm.texi: Regenerate.
17392
17393 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17394             Alan Hayward  <alan.hayward@arm.com>
17395             David Sherwood  <david.sherwood@arm.com>
17396
17397         * coretypes.h (opt_scalar_mode): New typedef.
17398         * gdbhooks.py (build_pretty_printers): Handle it.
17399         * machmode.h (mode_iterator::get_2xwider): Add overload for
17400         opt_mode<T>.
17401         * emit-rtl.c (init_emit_once): Use opt_scalar_mode when iterating
17402         over scalar modes.
17403         * expr.c (convert_mode_scalar): Likewise.
17404         * omp-low.c (omp_clause_aligned_alignment): Likewise.
17405         * optabs.c (expand_float): Likewise.
17406         (expand_fix): Likewise.
17407         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
17408
17409 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17410             Alan Hayward  <alan.hayward@arm.com>
17411             David Sherwood  <david.sherwood@arm.com>
17412
17413         * optabs.c (expand_float): Explicitly check for scalars before
17414         using a branching expansion.
17415         (expand_fix): Likewise.
17416
17417 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17418             Alan Hayward  <alan.hayward@arm.com>
17419             David Sherwood  <david.sherwood@arm.com>
17420
17421         * expr.c (convert_mode): Split scalar handling out into...
17422         (convert_mode_scalar): ...this new function.  Treat the modes
17423         as scalar_modes.
17424
17425 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17426             Alan Hayward  <alan.hayward@arm.com>
17427             David Sherwood  <david.sherwood@arm.com>
17428
17429         * omp-expand.c (expand_omp_atomic): Use is_int_mode, is_float_mode
17430         and scalar_mode.
17431         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Likewise.
17432
17433 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17434             Alan Hayward  <alan.hayward@arm.com>
17435             David Sherwood  <david.sherwood@arm.com>
17436
17437         * fixed-value.h (fixed_from_double_int): Take a scalar_mode
17438         rather than a machine_mode.
17439         (fixed_from_string): Likewise.
17440         (fixed_convert): Likewise.
17441         (fixed_convert_from_int): Likewise.
17442         (fixed_convert_from_real): Likewise.
17443         (real_convert_from_fixed): Likewise.
17444         * fixed-value.c (fixed_from_double_int): Likewise.
17445         (fixed_from_string): Likewise.
17446         (fixed_convert): Likewise.
17447         (fixed_convert_from_int): Likewise.
17448         (fixed_convert_from_real): Likewise.
17449         (real_convert_from_fixed): Likewise.
17450         * config/avr/avr.c (avr_out_round): Use as_a <scalar_mode>.
17451
17452 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17453             Alan Hayward  <alan.hayward@arm.com>
17454             David Sherwood  <david.sherwood@arm.com>
17455
17456         * emit-rtl.c (immed_double_const): Use is_a <scalar_mode> instead
17457         of separate mode class checks.  Do not allow vector modes here.
17458         (immed_wide_int_const): Use as_a <scalar_mode>.
17459         * explow.c (trunc_int_for_mode): Likewise.
17460         * rtl.h (wi::int_traits<rtx_mode_t>::get_precision): Likewise.
17461         (wi::shwi): Likewise.
17462         (wi::min_value): Likewise.
17463         (wi::max_value): Likewise.
17464         * dwarf2out.c (loc_descriptor): Likewise.
17465         * simplify-rtx.c (simplify_immed_subreg): Fix rtx_mode_t argument
17466         for CONST_WIDE_INT.
17467
17468 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17469             Alan Hayward  <alan.hayward@arm.com>
17470             David Sherwood  <david.sherwood@arm.com>
17471
17472         * tree.h (SCALAR_TYPE_MODE): New macro.
17473         * expr.c (expand_expr_addr_expr_1): Use it.
17474         (expand_expr_real_2): Likewise.
17475         * fold-const.c (fold_convert_const_fixed_from_fixed): Likeise.
17476         (fold_convert_const_fixed_from_int): Likewise.
17477         (fold_convert_const_fixed_from_real): Likewise.
17478         (native_encode_fixed): Likewise
17479         (native_encode_complex): Likewise
17480         (native_encode_vector): Likewise.
17481         (native_interpret_fixed): Likewise.
17482         (native_interpret_real): Likewise.
17483         (native_interpret_complex): Likewise.
17484         (native_interpret_vector): Likewise.
17485         * omp-simd-clone.c (simd_clone_adjust_return_type): Likewise.
17486         (simd_clone_adjust_argument_types): Likewise.
17487         (simd_clone_init_simd_arrays): Likewise.
17488         (simd_clone_adjust): Likewise.
17489         * stor-layout.c (layout_type): Likewise.
17490         * tree.c (build_minus_one_cst): Likewise.
17491         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
17492         * tree-inline.c (estimate_move_cost): Likewise.
17493         * tree-ssa-math-opts.c (convert_plusminus_to_widen): Likewise.
17494         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise.
17495         (vectorizable_reduction): Likewise.
17496         * tree-vect-patterns.c (vect_recog_widen_mult_pattern): Likewise.
17497         (vect_recog_mixed_size_cond_pattern): Likewise.
17498         (check_bool_pattern): Likewise.
17499         (adjust_bool_pattern): Likewise.
17500         (search_type_for_mask_1): Likewise.
17501         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
17502         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
17503         (vectorizable_load): Likewise.
17504         (vectorizable_store): Likewise.
17505         * ubsan.c (ubsan_encode_value): Likewise.
17506         * varasm.c (output_constant): Likewise.
17507
17508 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17509             Alan Hayward  <alan.hayward@arm.com>
17510             David Sherwood  <david.sherwood@arm.com>
17511
17512         * coretypes.h (scalar_mode): New class.
17513         * machmode.h (scalar_mode): Likewise.
17514         (scalar_mode::includes_p): New function.
17515         (mode_to_inner): Return a scalar_mode rather than a machine_mode.
17516         * gdbhooks.py (build_pretty_printers): Handle scalar_mode.
17517         * genmodes.c (get_mode_class): Handle remaining scalar modes.
17518         * cfgexpand.c (expand_debug_expr): Use scalar_mode.
17519         * expmed.c (store_bit_field_1): Likewise.
17520         (extract_bit_field_1): Likewise.
17521         * expr.c (write_complex_part): Likewise.
17522         (read_complex_part): Likewise.
17523         (emit_move_complex_push): Likewise.
17524         (expand_expr_real_2): Likewise.
17525         * function.c (assign_parm_setup_reg): Likewise.
17526         (assign_parms_unsplit_complex): Likewise.
17527         * optabs.c (expand_binop): Likewise.
17528         * rtlanal.c (subreg_get_info): Likewise.
17529         * simplify-rtx.c (simplify_immed_subreg): Likewise.
17530         * varasm.c (output_constant_pool_2): Likewise.
17531
17532 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17533             Alan Hayward  <alan.hayward@arm.com>
17534             David Sherwood  <david.sherwood@arm.com>
17535
17536         * expmed.c (extract_high_half): Use scalar_int_mode and remove
17537         assertion.
17538         (expmed_mult_highpart_optab): Likewise.
17539         (expmed_mult_highpart): Likewise.
17540
17541 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17542             Alan Hayward  <alan.hayward@arm.com>
17543             David Sherwood  <david.sherwood@arm.com>
17544
17545         * builtins.h (builtin_strncpy_read_str): Take a scalar_int_mode
17546         instead of a machine_mode.
17547         (builtin_memset_read_str): Likewise.
17548         * builtins.c (c_readstr): Likewise.
17549         (builtin_memcpy_read_str): Likewise.
17550         (builtin_strncpy_read_str): Likewise.
17551         (builtin_memset_read_str): Likewise.
17552         (builtin_memset_gen_str): Likewise.
17553         (expand_builtin_signbit): Use scalar_int_mode for local variables.
17554         * cfgexpand.c (convert_debug_memory_address): Take a scalar_int_mode
17555         instead of a machine_mode.
17556         * combine.c (simplify_if_then_else): Use scalar_int_mode for local
17557         variables.
17558         (make_extraction): Likewise.
17559         (try_widen_shift_mode): Take and return scalar_int_modes instead
17560         of machine_modes.
17561         * config/aarch64/aarch64.c (aarch64_libgcc_cmp_return_mode): Return
17562         a scalar_int_mode instead of a machine_mode.
17563         * config/avr/avr.c (avr_addr_space_address_mode): Likewise.
17564         (avr_addr_space_pointer_mode): Likewise.
17565         * config/cr16/cr16.c (cr16_unwind_word_mode): Likewise.
17566         * config/msp430/msp430.c (msp430_addr_space_pointer_mode): Likewise.
17567         (msp430_unwind_word_mode): Likewise.
17568         * config/spu/spu.c (spu_unwind_word_mode): Likewise.
17569         (spu_addr_space_pointer_mode): Likewise.
17570         (spu_addr_space_address_mode): Likewise.
17571         (spu_libgcc_cmp_return_mode): Likewise.
17572         (spu_libgcc_shift_count_mode): Likewise.
17573         * config/rl78/rl78.c (rl78_addr_space_address_mode): Likewise.
17574         (rl78_addr_space_pointer_mode): Likewise.
17575         (fl78_unwind_word_mode): Likewise.
17576         (rl78_valid_pointer_mode): Take a scalar_int_mode instead of a
17577         machine_mode.
17578         * config/alpha/alpha.c (vms_valid_pointer_mode): Likewise.
17579         * config/ia64/ia64.c (ia64_vms_valid_pointer_mode): Likewise.
17580         * config/mips/mips.c (mips_mode_rep_extended): Likewise.
17581         (mips_valid_pointer_mode): Likewise.
17582         * config/tilegx/tilegx.c (tilegx_mode_rep_extended): Likewise.
17583         * config/ft32/ft32.c (ft32_valid_pointer_mode): Likewise.
17584         (ft32_addr_space_pointer_mode): Return a scalar_int_mode instead
17585         of a machine_mode.
17586         (ft32_addr_space_address_mode): Likewise.
17587         * config/m32c/m32c.c (m32c_valid_pointer_mode): Take a
17588         scalar_int_mode instead of a machine_mode.
17589         (m32c_addr_space_pointer_mode): Return a scalar_int_mode instead
17590         of a machine_mode.
17591         (m32c_addr_space_address_mode): Likewise.
17592         * config/powerpcspe/powerpcspe.c (rs6000_abi_word_mode): Likewise.
17593         (rs6000_eh_return_filter_mode): Likewise.
17594         * config/rs6000/rs6000.c (rs6000_abi_word_mode): Likewise.
17595         (rs6000_eh_return_filter_mode): Likewise.
17596         * config/s390/s390.c (s390_libgcc_cmp_return_mode): Likewise.
17597         (s390_libgcc_shift_count_mode): Likewise.
17598         (s390_unwind_word_mode): Likewise.
17599         (s390_valid_pointer_mode): Take a scalar_int_mode rather than a
17600         machine_mode.
17601         * target.def (mode_rep_extended): Likewise.
17602         (valid_pointer_mode): Likewise.
17603         (addr_space.valid_pointer_mode): Likewise.
17604         (eh_return_filter_mode): Return a scalar_int_mode rather than
17605         a machine_mode.
17606         (libgcc_cmp_return_mode): Likewise.
17607         (libgcc_shift_count_mode): Likewise.
17608         (unwind_word_mode): Likewise.
17609         (addr_space.pointer_mode): Likewise.
17610         (addr_space.address_mode): Likewise.
17611         * doc/tm.texi: Regenerate.
17612         * dojump.c (prefer_and_bit_test): Take a scalar_int_mode rather than
17613         a machine_mode.
17614         (do_jump): Use scalar_int_mode for local variables.
17615         * dwarf2cfi.c (init_return_column_size): Take a scalar_int_mode
17616         rather than a machine_mode.
17617         * dwarf2out.c (convert_descriptor_to_mode): Likewise.
17618         (scompare_loc_descriptor_wide): Likewise.
17619         (scompare_loc_descriptor_narrow): Likewise.
17620         * emit-rtl.c (adjust_address_1): Use scalar_int_mode for local
17621         variables.
17622         * except.c (sjlj_emit_dispatch_table): Likewise.
17623         (expand_builtin_eh_copy_values): Likewise.
17624         * explow.c (convert_memory_address_addr_space_1): Likewise.
17625         Take a scalar_int_mode rather than a machine_mode.
17626         (convert_memory_address_addr_space): Take a scalar_int_mode rather
17627         than a machine_mode.
17628         (memory_address_addr_space): Use scalar_int_mode for local variables.
17629         * expmed.h (expand_mult_highpart_adjust): Take a scalar_int_mode
17630         rather than a machine_mode.
17631         * expmed.c (mask_rtx): Likewise.
17632         (init_expmed_one_conv): Likewise.
17633         (expand_mult_highpart_adjust): Likewise.
17634         (extract_high_half): Likewise.
17635         (expmed_mult_highpart_optab): Likewise.
17636         (expmed_mult_highpart): Likewise.
17637         (expand_smod_pow2): Likewise.
17638         (expand_sdiv_pow2): Likewise.
17639         (emit_store_flag_int): Likewise.
17640         (adjust_bit_field_mem_for_reg): Use scalar_int_mode for local
17641         variables.
17642         (extract_low_bits): Likewise.
17643         * expr.h (by_pieces_constfn): Take a scalar_int_mode rather than
17644         a machine_mode.
17645         * expr.c (pieces_addr::adjust):  Likewise.
17646         (can_store_by_pieces): Likewise.
17647         (store_by_pieces): Likewise.
17648         (clear_by_pieces_1): Likewise.
17649         (expand_expr_addr_expr_1): Likewise.
17650         (expand_expr_addr_expr): Use scalar_int_mode for local variables.
17651         (expand_expr_real_1): Likewise.
17652         (try_casesi): Likewise.
17653         * final.c (shorten_branches): Likewise.
17654         * fold-const.c (fold_convert_const_int_from_fixed): Change the
17655         type of "mode" to machine_mode.
17656         * internal-fn.c (expand_arith_overflow_result_store): Take a
17657         scalar_int_mode rather than a machine_mode.
17658         (expand_mul_overflow): Use scalar_int_mode for local variables.
17659         * loop-doloop.c (doloop_modify): Likewise.
17660         (doloop_optimize): Likewise.
17661         * optabs.c (expand_subword_shift): Take a scalar_int_mode rather
17662         than a machine_mode.
17663         (expand_doubleword_shift_condmove): Likewise.
17664         (expand_doubleword_shift): Likewise.
17665         (expand_doubleword_clz): Likewise.
17666         (expand_doubleword_popcount): Likewise.
17667         (expand_doubleword_parity): Likewise.
17668         (expand_absneg_bit): Use scalar_int_mode for local variables.
17669         (prepare_float_lib_cmp): Likewise.
17670         * rtl.h (convert_memory_address_addr_space_1): Take a scalar_int_mode
17671         rather than a machine_mode.
17672         (convert_memory_address_addr_space): Likewise.
17673         (get_mode_bounds): Likewise.
17674         (get_address_mode): Return a scalar_int_mode rather than a
17675         machine_mode.
17676         * rtlanal.c (get_address_mode): Likewise.
17677         * stor-layout.c (get_mode_bounds): Take a scalar_int_mode rather
17678         than a machine_mode.
17679         * targhooks.c (default_mode_rep_extended): Likewise.
17680         (default_valid_pointer_mode): Likewise.
17681         (default_addr_space_valid_pointer_mode): Likewise.
17682         (default_eh_return_filter_mode): Return a scalar_int_mode rather
17683         than a machine_mode.
17684         (default_libgcc_cmp_return_mode): Likewise.
17685         (default_libgcc_shift_count_mode): Likewise.
17686         (default_unwind_word_mode): Likewise.
17687         (default_addr_space_pointer_mode): Likewise.
17688         (default_addr_space_address_mode): Likewise.
17689         * targhooks.h (default_eh_return_filter_mode): Likewise.
17690         (default_libgcc_cmp_return_mode): Likewise.
17691         (default_libgcc_shift_count_mode): Likewise.
17692         (default_unwind_word_mode): Likewise.
17693         (default_addr_space_pointer_mode): Likewise.
17694         (default_addr_space_address_mode): Likewise.
17695         (default_mode_rep_extended): Take a scalar_int_mode rather than
17696         a machine_mode.
17697         (default_valid_pointer_mode): Likewise.
17698         (default_addr_space_valid_pointer_mode): Likewise.
17699         * tree-ssa-address.c (addr_for_mem_ref): Use scalar_int_mode for
17700         local variables.
17701         * tree-ssa-loop-ivopts.c (get_shiftadd_cost): Take a scalar_int_mode
17702         rather than a machine_mode.
17703         * tree-switch-conversion.c (array_value_type): Use scalar_int_mode
17704         for local variables.
17705         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
17706         * var-tracking.c (use_narrower_mode): Take a scalar_int_mode rather
17707         than a machine_mode.
17708
17709 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17710             Alan Hayward  <alan.hayward@arm.com>
17711             David Sherwood  <david.sherwood@arm.com>
17712
17713         * dojump.c (do_jump_by_parts_greater_rtx): Change the type of
17714         the mode argument to scalar_int_mode.
17715         (do_jump_by_parts_zero_rtx): Likewise.
17716         (do_jump_by_parts_equality_rtx): Likewise.
17717         (do_jump_by_parts_greater): Take a mode argument.
17718         (do_jump_by_parts_equality): Likewise.
17719         (do_jump_1): Update calls accordingly.
17720
17721 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17722             Alan Hayward  <alan.hayward@arm.com>
17723             David Sherwood  <david.sherwood@arm.com>
17724
17725         * is-a.h (safe_dyn_cast): New function.
17726         * rtl.h (rtx_jump_table_data::get_data_mode): New function.
17727         (jump_table_for_label): Likewise.
17728         * final.c (final_addr_vec_align): Take an rtx_jump_table_data *
17729         instead of an rtx_insn *.
17730         (shorten_branches): Use dyn_cast instead of LABEL_P and
17731         JUMP_TABLE_DATA_P.  Use jump_table_for_label and
17732         rtx_jump_table_data::get_data_mode.
17733         (final_scan_insn): Likewise.
17734
17735 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17736             Alan Hayward  <alan.hayward@arm.com>
17737             David Sherwood  <david.sherwood@arm.com>
17738
17739         * combine.c (try_combine): Use is_a <scalar_int_mode> when
17740         trying to combine a full-register integer set with a subreg
17741         integer set.
17742
17743 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17744             Alan Hayward  <alan.hayward@arm.com>
17745             David Sherwood  <david.sherwood@arm.com>
17746
17747         * expr.c (expand_expr_addr_expr): Add a new_tmode local variable
17748         that is always either address_mode or pointer_mode.
17749
17750 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17751             Alan Hayward  <alan.hayward@arm.com>
17752             David Sherwood  <david.sherwood@arm.com>
17753
17754         * expr.c (expand_expr_real_2): Use word_mode instead of innermode
17755         when the two are known to be equal.
17756
17757 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17758             Alan Hayward  <alan.hayward@arm.com>
17759             David Sherwood  <david.sherwood@arm.com>
17760
17761         * simplify-rtx.c (simplify_const_unary_operation): Use
17762         is_a <scalar_int_mode> instead of checking for a nonzero
17763         precision.  Forcibly convert op_mode to a scalar_int_mode
17764         in that case.  More clearly differentiate the operand and
17765         result modes and use the former when deciding what the value
17766         of a count-bits operation should be.  Use is_int_mode instead
17767         of checking for a MODE_INT.  Remove redundant check for whether
17768         this mode has a zero precision.
17769
17770 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17771             Alan Hayward  <alan.hayward@arm.com>
17772             David Sherwood  <david.sherwood@arm.com>
17773
17774         * optabs.c (widen_leading): Change the type of the mode argument
17775         to scalar_int_mode.  Use opt_scalar_int_mode for the mode iterator.
17776         (widen_bswap): Likewise.
17777         (expand_parity): Likewise.
17778         (expand_ctz): Change the type of the mode argument to scalar_int_mode.
17779         (expand_ffs): Likewise.
17780         (epand_unop): Check for scalar integer modes before calling the
17781         above routines.
17782
17783 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17784             Alan Hayward  <alan.hayward@arm.com>
17785             David Sherwood  <david.sherwood@arm.com>
17786
17787         * expr.c (const_scalar_mask_from_tree): Add a mode argument.
17788         Expand commentary.
17789         (expand_expr_real_1): Update call accordingly.
17790
17791 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17792             Alan Hayward  <alan.hayward@arm.com>
17793             David Sherwood  <david.sherwood@arm.com>
17794
17795         * expmed.c (store_bit_field_using_insv): Add op0_mode and
17796         value_mode arguments.  Use scalar_int_mode internally.
17797         (store_bit_field_1): Rename the new integer mode from imode
17798         to op0_mode and use it instead of GET_MODE (op0).  Update calls
17799         to store_split_bit_field, store_bit_field_using_insv and
17800         store_fixed_bit_field.
17801         (store_fixed_bit_field): Add op0_mode and value_mode arguments.
17802         Use scalar_int_mode internally.  Use a bit count rather than a mode
17803         when calculating the largest bit size for get_best_mode.
17804         Update calls to store_split_bit_field and store_fixed_bit_field_1.
17805         (store_fixed_bit_field_1): Add mode and value_mode arguments.
17806         Remove assertion that OP0 has a scalar integer mode.
17807         (store_split_bit_field): Add op0_mode and value_mode arguments.
17808         Update calls to extract_fixed_bit_field.
17809         (extract_bit_field_using_extv): Add an op0_mode argument.
17810         Use scalar_int_mode internally.
17811         (extract_bit_field_1): Rename the new integer mode from imode to
17812         op0_mode and use it instead of GET_MODE (op0).  Update calls to
17813         extract_split_bit_field, extract_bit_field_using_extv and
17814         extract_fixed_bit_field.
17815         (extract_fixed_bit_field): Add an op0_mode argument.  Update calls
17816         to extract_split_bit_field and extract_fixed_bit_field_1.
17817         (extract_fixed_bit_field_1): Add a mode argument.  Remove assertion
17818         that OP0 has a scalar integer mode.  Use as_a <scalar_int_mode>
17819         on the target mode.
17820         (extract_split_bit_field): Add an op0_mode argument.  Update call
17821         to extract_fixed_bit_field.
17822
17823 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17824             Alan Hayward  <alan.hayward@arm.com>
17825             David Sherwood  <david.sherwood@arm.com>
17826
17827         * cse.c (cse_insn): Use opt_scalar_int_mode for the mode iterator.
17828         * explow.c (hard_function_value): Likewise.
17829         * expmed.c (extract_fixed_bit_field_1): Likewise.  Move the
17830         convert_to_mode call outside the loop.
17831         * expr.c (alignment_for_piecewise_move): Use opt_scalar_int_mode
17832         for the mode iterator.  Require the mode specified by max_pieces
17833         to exist.
17834         (emit_block_move_via_movmem): Use opt_scalar_int_mode for the
17835         mode iterator.
17836         (copy_blkmode_to_reg): Likewise.
17837         (set_storage_via_setmem): Likewise.
17838         * optabs.c (prepare_cmp_insn): Likewise.
17839         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
17840         * stor-layout.c (finish_bitfield_representative): Likewise.
17841
17842 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17843             Alan Hayward  <alan.hayward@arm.com>
17844             David Sherwood  <david.sherwood@arm.com>
17845
17846         * rtl.h (subreg_unpromoted_mode, subreg_promoted_mode): New functions.
17847         * expr.c (convert_move): Use them.
17848         (convert_modes): Likewise.
17849         (store_expr_with_bounds): Likewise.
17850
17851 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17852             Alan Hayward  <alan.hayward@arm.com>
17853             David Sherwood  <david.sherwood@arm.com>
17854
17855         * rtl.h (rtl_hooks::reg_nonzero_bits): Add a scalar_int_mode
17856         parameter for the mode of "x".  Remove the "known_x", "known_mode"
17857         and "known_ret" arguments.  Change the type of the mode argument
17858         to scalar_int_mode.
17859         (rtl_hooks:reg_num_sign_bit_copies): Likewise.
17860         * combine.c (reg_nonzero_bits_for_combine): Update accordingly.
17861         (reg_num_sign_bit_copies_for_combine): Likewise.
17862         * rtlanal.c (nonzero_bits1): Likewise.
17863         (num_sign_bit_copies1): Likewise.
17864         * rtlhooks-def.h (reg_nonzero_bits_general): Likewise.
17865         (reg_num_sign_bit_copies_general): Likewise.
17866         * rtlhooks.c (reg_num_sign_bit_copies_general): Likewise.
17867         (reg_nonzero_bits_general): Likewise.
17868
17869 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17870             Alan Hayward  <alan.hayward@arm.com>
17871             David Sherwood  <david.sherwood@arm.com>
17872
17873         * rtlanal.c (num_sign_bit_copies): Handle VOIDmode here rather
17874         than in subroutines.  Return 1 for non-integer modes.
17875         (cached_num_sign_bit_copies): Change the type of the mode parameter
17876         to scalar_int_mode.
17877         (num_sign_bit_copies1): Likewise.  Remove early exit for other mode
17878         classes.  Handle CONST_INT_P first and then check whether X also
17879         has a scalar integer mode.  Check the same thing for inner registers
17880         of a SUBREG and for values that are being extended or truncated.
17881
17882 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17883             Alan Hayward  <alan.hayward@arm.com>
17884             David Sherwood  <david.sherwood@arm.com>
17885
17886         * rtlanal.c (nonzero_bits): Handle VOIDmode here rather than
17887         in subroutines.  Return the mode mask for non-integer modes.
17888         (cached_nonzero_bits): Change the type of the mode parameter
17889         to scalar_int_mode.
17890         (nonzero_bits1): Likewise.  Remove early exit for other mode
17891         classes.  Handle CONST_INT_P first and then check whether X
17892         also has a scalar integer mode.
17893
17894 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17895             Alan Hayward  <alan.hayward@arm.com>
17896             David Sherwood  <david.sherwood@arm.com>
17897
17898         * expr.c (widest_int_mode_for_size): Make the comment match the code.
17899         Return a scalar_int_mode and assert that the size is greater than
17900         one byte.
17901         (by_pieces_ninsns): Update accordingly and remove VOIDmode handling.
17902         (op_by_pieces_d::op_by_pieces_d): Likewise.
17903         (op_by_pieces_d::run): Likewise.
17904         (can_store_by_pieces): Likewise.
17905
17906 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17907             Alan Hayward  <alan.hayward@arm.com>
17908             David Sherwood  <david.sherwood@arm.com>
17909
17910         * combine.c (extract_left_shift): Add a mode argument and update
17911         recursive calls.
17912         (make_compound_operation_int): Change the type of the mode parameter
17913         to scalar_int_mode and update the call to extract_left_shift.
17914
17915 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17916             Alan Hayward  <alan.hayward@arm.com>
17917             David Sherwood  <david.sherwood@arm.com>
17918
17919         * combine.c (simplify_and_const_int): Change the type of the mode
17920         parameter to scalar_int_mode.
17921         (simplify_and_const_int_1): Likewise.  Update recursive call.
17922
17923 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17924             Alan Hayward  <alan.hayward@arm.com>
17925             David Sherwood  <david.sherwood@arm.com>
17926
17927         * combine.c (simplify_compare_const): Check that the mode is a
17928         scalar_int_mode (rather than VOIDmode) before testing its
17929         precision.
17930         (simplify_comparison): Move COMPARISON_P handling out of the
17931         loop and restrict the latter part of the loop to scalar_int_modes.
17932         Check is_a <scalar_int_mode> before calling HWI_COMPUTABLE_MODE_P
17933         and when considering SUBREG_REGs.  Use is_int_mode instead of
17934         checking GET_MODE_CLASS against MODE_INT.
17935
17936 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17937             Alan Hayward  <alan.hayward@arm.com>
17938             David Sherwood  <david.sherwood@arm.com>
17939
17940         * combine.c (try_widen_shift_mode): Move check for equal modes to...
17941         (simplify_shift_const_1): ...here.  Use scalar_int_mode for
17942         shift_unit_mode and for modes involved in scalar shifts.
17943
17944 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17945             Alan Hayward  <alan.hayward@arm.com>
17946             David Sherwood  <david.sherwood@arm.com>
17947
17948         * combine.c (force_int_to_mode): New function, split out from...
17949         (force_to_mode): ...here.  Keep xmode up-to-date and use it
17950         instead of GET_MODE (x).
17951
17952 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17953             Alan Hayward  <alan.hayward@arm.com>
17954             David Sherwood  <david.sherwood@arm.com>
17955
17956         * optabs-query.h (extraction_insn::struct_mode): Change type to
17957         opt_scalar_int_mode and update comment.
17958         (extraction_insn::field_mode): Change type to scalar_int_mode.
17959         (extraction_insn::pos_mode): Likewise.
17960         * combine.c (make_extraction): Update accordingly.
17961         * optabs-query.c (get_traditional_extraction_insn): Likewise.
17962         (get_optab_extraction_insn): Likewise.
17963         * recog.c (simplify_while_replacing): Likewise.
17964         * expmed.c (narrow_bit_field_mem): Change the type of the mode
17965         parameter to opt_scalar_int_mode.
17966
17967 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17968             Alan Hayward  <alan.hayward@arm.com>
17969             David Sherwood  <david.sherwood@arm.com>
17970
17971         * machmode.h (bit_field_mode_iterator::next_mode): Take a pointer
17972         to a scalar_int_mode instead of a machine_mode.
17973         (bit_field_mode_iterator::m_mode): Change type to opt_scalar_int_mode.
17974         (get_best_mode): Return a boolean and use a pointer argument to store
17975         the selected mode.  Replace the limit mode parameter with a bit limit.
17976         * expmed.c (adjust_bit_field_mem_for_reg): Use scalar_int_mode
17977         for the values returned by bit_field_mode_iterator::next_mode.
17978         (store_bit_field): Update call to get_best_mode.
17979         (store_fixed_bit_field): Likewise.
17980         (extract_fixed_bit_field): Likewise.
17981         * expr.c (optimize_bitfield_assignment_op): Likewise.
17982         * fold-const.c (optimize_bit_field_compare): Likewise.
17983         (fold_truth_andor_1): Likewise.
17984         * stor-layout.c (bit_field_mode_iterator::next_mode): As above.
17985         Update for new type of m_mode.
17986         (get_best_mode): As above.
17987
17988 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17989             Alan Hayward  <alan.hayward@arm.com>
17990             David Sherwood  <david.sherwood@arm.com>
17991
17992         * expmed.c (strict_volatile_bitfield_p): Change the type of fieldmode
17993         to scalar_int_mode.  Remove check for SCALAR_INT_MODE_P.
17994         (store_bit_field): Check is_a <scalar_int_mode> before calling
17995         strict_volatile_bitfield_p.
17996         (extract_bit_field): Likewise.
17997
17998 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17999             Alan Hayward  <alan.hayward@arm.com>
18000             David Sherwood  <david.sherwood@arm.com>
18001
18002         * target.def (cstore_mode): Return a scalar_int_mode.
18003         * doc/tm.texi: Regenerate.
18004         * config/sparc/sparc.c (sparc_cstore_mode): Return a scalar_int_mode.
18005         * targhooks.h (default_cstore_mode): Likewise.
18006         * targhooks.c (default_cstore_mode): Likewise, using a forced
18007         conversion.
18008         * expmed.c (emit_cstore): Expect the target of the cstore to be
18009         a scalar_int_mode.
18010
18011 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18012             Alan Hayward  <alan.hayward@arm.com>
18013             David Sherwood  <david.sherwood@arm.com>
18014
18015         * cfgloop.h (rtx_iv): Change type of extend_mode and mode to
18016         scalar_int_mode.
18017         (niter_desc): Likewise mode.
18018         (iv_analyze): Add a mode parameter.
18019         (biv_p): Likewise.
18020         (iv_analyze_expr): Pass the mode paraeter before the rtx it describes
18021         and change its type to scalar_int_mode.
18022         * loop-iv.c: Update commentary at head of file.
18023         (iv_constant): Pass the mode paraeter before the rtx it describes
18024         and change its type to scalar_int_mode.  Remove VOIDmode handling.
18025         (iv_subreg): Change the type of the mode parameter to scalar_int_mode.
18026         (iv_extend): Likewise.
18027         (shorten_into_mode): Likewise.
18028         (iv_add): Use scalar_int_mode.
18029         (iv_mult): Likewise.
18030         (iv_shift): Likewise.
18031         (canonicalize_iv_subregs): Likewise.
18032         (get_biv_step_1): Pass the outer_mode parameter before the rtx
18033         it describes and change its mode to scalar_int_mode.   Also change
18034         the type of the returned inner_mode to scalar_int_mode.
18035         (get_biv_step): Likewise, turning outer_mode from a pointer
18036         into a direct parameter.  Update call to get_biv_step_1.
18037         (iv_analyze_biv): Add an outer_mode parameter.  Update calls to
18038         iv_constant and get_biv_step.
18039         (iv_analyze_expr): Pass the mode parameter before the rtx it describes
18040         and change its type to scalar_int_mode.  Don't initialise iv->mode
18041         to VOIDmode and remove later checks for its still being VOIDmode.
18042         Update calls to iv_analyze_op and iv_analyze_expr.  Check
18043         is_a <scalar_int_mode> when changing the mode under consideration.
18044         (iv_analyze_def): Ignore registers that don't have a scalar_int_mode.
18045         Update call to iv_analyze_expr.
18046         (iv_analyze_op): Add a mode parameter.  Reject subregs whose
18047         inner register is not also a scalar_int_mode.  Update call to
18048         iv_analyze_biv.
18049         (iv_analyze): Add a mode parameter.  Update call to iv_analyze_op.
18050         (biv_p): Add a mode parameter.  Update call to iv_analyze_biv.
18051         (iv_number_of_iterations): Use is_a <scalar_int_mode> instead of
18052         separate mode class checks.  Update calls to iv_analyze.  Remove
18053         fix-up of VOIDmodes after iv_analyze_biv.
18054         * loop-unroll.c (analyze_iv_to_split_insn): Reject registers that
18055         don't have a scalar_int_mode.  Update call to biv_p.
18056
18057 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18058             Alan Hayward  <alan.hayward@arm.com>
18059             David Sherwood  <david.sherwood@arm.com>
18060
18061         * cfgexpand.c (convert_debug_memory_address): Use
18062         as_a <scalar_int_mode>.
18063         * combine.c (expand_compound_operation): Likewise.
18064         (make_extraction): Likewise.
18065         (change_zero_ext): Likewise.
18066         (simplify_comparison): Likewise.
18067         * cse.c (cse_insn): Likewise.
18068         * dwarf2out.c (minmax_loc_descriptor): Likewise.
18069         (mem_loc_descriptor): Likewise.
18070         (loc_descriptor): Likewise.
18071         * expmed.c (init_expmed_one_mode): Likewise.
18072         (synth_mult): Likewise.
18073         (emit_store_flag_1): Likewise.
18074         (expand_divmod): Likewise.  Use HWI_COMPUTABLE_MODE_P instead
18075         of a comparison with size.
18076         * expr.c (expand_assignment): Use as_a <scalar_int_mode>.
18077         (reduce_to_bit_field_precision): Likewise.
18078         * function.c (expand_function_end): Likewise.
18079         * internal-fn.c (expand_arith_overflow_result_store): Likewise.
18080         * loop-doloop.c (doloop_modify): Likewise.
18081         * optabs.c (expand_binop): Likewise.
18082         (expand_unop): Likewise.
18083         (expand_copysign_absneg): Likewise.
18084         (prepare_cmp_insn): Likewise.
18085         (maybe_legitimize_operand): Likewise.
18086         * recog.c (const_scalar_int_operand): Likewise.
18087         * rtlanal.c (get_address_mode): Likewise.
18088         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
18089         (simplify_cond_clz_ctz): Likewise.
18090         * tree-nested.c (get_nl_goto_field): Likewise.
18091         * tree.c (build_vector_type_for_mode): Likewise.
18092         * var-tracking.c (use_narrower_mode): Likewise.
18093
18094 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18095             Alan Hayward  <alan.hayward@arm.com>
18096             David Sherwood  <david.sherwood@arm.com>
18097
18098         * tree.h (SCALAR_INT_TYPE_MODE): New macro.
18099         * builtins.c (expand_builtin_signbit): Use it.
18100         * cfgexpand.c (expand_debug_expr): Likewise.
18101         * dojump.c (do_jump): Likewise.
18102         (do_compare_and_jump): Likewise.
18103         * dwarf2cfi.c (expand_builtin_init_dwarf_reg_sizes): Likewise.
18104         * expmed.c (make_tree): Likewise.
18105         * expr.c (expand_expr_real_2): Likewise.
18106         (expand_expr_real_1): Likewise.
18107         (try_casesi): Likewise.
18108         * fold-const-call.c (fold_const_call_ss): Likewise.
18109         * fold-const.c (unextend): Likewise.
18110         (extract_muldiv_1): Likewise.
18111         (fold_single_bit_test): Likewise.
18112         (native_encode_int): Likewise.
18113         (native_encode_string): Likewise.
18114         (native_interpret_int): Likewise.
18115         * gimple-fold.c (gimple_fold_builtin_memset): Likewise.
18116         * internal-fn.c (expand_addsub_overflow): Likewise.
18117         (expand_neg_overflow): Likewise.
18118         (expand_mul_overflow): Likewise.
18119         (expand_arith_overflow): Likewise.
18120         * match.pd: Likewise.
18121         * stor-layout.c (layout_type): Likewise.
18122         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
18123         * tree-ssa-math-opts.c (convert_mult_to_widen): Likewise.
18124         * tree-ssanames.c (get_range_info): Likewise.
18125         * tree-switch-conversion.c (array_value_type) Likewise.
18126         * tree-vect-patterns.c (vect_recog_rotate_pattern): Likewise.
18127         (vect_recog_divmod_pattern): Likewise.
18128         (vect_recog_mixed_size_cond_pattern): Likewise.
18129         * tree-vrp.c (extract_range_basic): Likewise.
18130         (simplify_float_conversion_using_ranges): Likewise.
18131         * tree.c (int_fits_type_p): Likewise.
18132         * ubsan.c (instrument_bool_enum_load): Likewise.
18133         * varasm.c (mergeable_string_section): Likewise.
18134         (narrowing_initializer_constant_valid_p): Likewise.
18135         (output_constant): Likewise.
18136
18137 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18138             Alan Hayward  <alan.hayward@arm.com>
18139             David Sherwood  <david.sherwood@arm.com>
18140
18141         * machmode.h (NARROWEST_INT_MODE): New macro.
18142         * expr.c (alignment_for_piecewise_move): Use it instead of
18143         GET_CLASS_NARROWEST_MODE (MODE_INT).
18144         (push_block): Likewise.
18145         * stor-layout.c (bit_field_mode_iterator::bit_field_mode_iterator):
18146         Likewise.
18147         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
18148
18149 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18150             Alan Hayward  <alan.hayward@arm.com>
18151             David Sherwood  <david.sherwood@arm.com>
18152
18153         * postreload.c (move2add_valid_value_p): Change the type of the
18154         mode parameter to scalar_int_mode.
18155         (move2add_use_add2_insn): Add a mode parameter and use it instead
18156         of GET_MODE (reg).
18157         (move2add_use_add3_insn): Likewise.
18158         (reload_cse_move2add): Update accordingly.
18159
18160 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18161             Alan Hayward  <alan.hayward@arm.com>
18162             David Sherwood  <david.sherwood@arm.com>
18163
18164         * expr.c (expand_expr_real_2): Use scalar_int_mode for the
18165         double-word mode.
18166         * lower-subreg.c (resolve_shift_zext): Use is_a <scalar_int_mode>.
18167         * optabs.c (expand_unop): Likewise.
18168
18169 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18170             Alan Hayward  <alan.hayward@arm.com>
18171             David Sherwood  <david.sherwood@arm.com>
18172
18173         * dwarf2out.c (typed_binop): Change mode parameter to scalar_int_mode.
18174         (clz_loc_descriptor): Likewise.  Remove SCALAR_INT_MODE_P check.
18175         (popcount_loc_descriptor): Likewise.
18176         (bswap_loc_descriptor): Likewise.
18177         (rotate_loc_descriptor): Likewise.
18178         (mem_loc_descriptor): Add is_a <scalar_int_mode> checks before
18179         calling the functions above.
18180
18181 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18182             Alan Hayward  <alan.hayward@arm.com>
18183             David Sherwood  <david.sherwood@arm.com>
18184
18185         * combine.c (sign_extend_short_imm): Add is_a <scalar_int_mode>
18186         checks.
18187         (try_combine): Likewise.
18188         (simplify_if_then_else): Likewise.
18189         * cse.c (cse_insn): Likewise.
18190         * dwarf2out.c (mem_loc_descriptor): Likewise.
18191         * emit-rtl.c (gen_lowpart_common): Likewise.
18192         * simplify-rtx.c (simplify_truncation): Likewise.
18193         (simplify_binary_operation_1): Likewise.
18194         (simplify_const_relational_operation): Likewise.
18195         (simplify_ternary_operation): Likewise.
18196         * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise.
18197
18198 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18199             Alan Hayward  <alan.hayward@arm.com>
18200             David Sherwood  <david.sherwood@arm.com>
18201
18202         * cse.c (cse_insn): Add is_a <scalar_int_mode> checks.
18203         * reload.c (push_reload): Likewise.
18204         (find_reloads): Likewise.
18205
18206 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18207             Alan Hayward  <alan.hayward@arm.com>
18208             David Sherwood  <david.sherwood@arm.com>
18209
18210         * combine.c (find_split_point): Add is_a <scalar_int_mode> checks.
18211         (make_compound_operation_int): Likewise.
18212         (change_zero_ext): Likewise.
18213         * expr.c (convert_move): Likewise.
18214         (convert_modes): Likewise.
18215         * fwprop.c (forward_propagate_subreg): Likewise.
18216         * loop-iv.c (get_biv_step_1): Likewise.
18217         * optabs.c (widen_operand): Likewise.
18218         * postreload.c (move2add_valid_value_p): Likewise.
18219         * recog.c (simplify_while_replacing): Likewise.
18220         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
18221         (simplify_binary_operation_1): Likewise.  Remove redundant
18222         mode equality check.
18223
18224 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18225             Alan Hayward  <alan.hayward@arm.com>
18226             David Sherwood  <david.sherwood@arm.com>
18227
18228         * combine.c (combine_simplify_rtx): Add checks for
18229         is_a <scalar_int_mode>.
18230         (simplify_if_then_else): Likewise.
18231         (make_field_assignment): Likewise.
18232         (simplify_comparison): Likewise.
18233         * ifcvt.c (noce_try_bitop): Likewise.
18234         * loop-invariant.c (canonicalize_address_mult): Likewise.
18235         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
18236
18237 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18238             Alan Hayward  <alan.hayward@arm.com>
18239             David Sherwood  <david.sherwood@arm.com>
18240
18241         * gimple-fold.c (gimple_fold_builtin_memory_op): Use
18242         is_a <scalar_int_mode> instead of != BLKmode.
18243
18244 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18245             Alan Hayward  <alan.hayward@arm.com>
18246             David Sherwood  <david.sherwood@arm.com>
18247
18248         * cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>
18249         instead of != VOIDmode.
18250         * combine.c (if_then_else_cond): Likewise.
18251         (change_zero_ext): Likewise.
18252         * dwarf2out.c (mem_loc_descriptor): Likewise.
18253         (loc_descriptor): Likewise.
18254         * rtlanal.c (canonicalize_condition): Likewise.
18255         * simplify-rtx.c (simplify_relational_operation_1): Likewise.
18256
18257 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18258             Alan Hayward  <alan.hayward@arm.com>
18259             David Sherwood  <david.sherwood@arm.com>
18260
18261         * simplify-rtx.c (simplify_binary_operation_1): Use
18262         is_a <scalar_int_mode> instead of !VECTOR_MODE_P.
18263
18264 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18265             Alan Hayward  <alan.hayward@arm.com>
18266             David Sherwood  <david.sherwood@arm.com>
18267
18268         * wide-int.h (int_traits<unsigned char>) New class.
18269         (int_traits<unsigned short>) Likewise.
18270         * cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>.
18271         Use GET_MODE_UNIT_PRECISION and remove redundant test for
18272         SCALAR_INT_MODE_P.
18273         * combine.c (set_nonzero_bits_and_sign_copies): Use
18274         is_a <scalar_int_mode>.
18275         (find_split_point): Likewise.
18276         (combine_simplify_rtx): Likewise.
18277         (simplify_logical): Likewise.
18278         (expand_compound_operation): Likewise.
18279         (expand_field_assignment): Likewise.
18280         (make_compound_operation): Likewise.
18281         (extended_count): Likewise.
18282         (change_zero_ext): Likewise.
18283         (simplify_comparison): Likewise.
18284         * dwarf2out.c (scompare_loc_descriptor): Likewise.
18285         (ucompare_loc_descriptor): Likewise.
18286         (minmax_loc_descriptor): Likewise.
18287         (mem_loc_descriptor): Likewise.
18288         (loc_descriptor): Likewise.
18289         * expmed.c (init_expmed_one_mode): Likewise.
18290         * lra-constraints.c (lra_constraint_offset): Likewise.
18291         * optabs.c (prepare_libcall_arg): Likewise.
18292         * postreload.c (move2add_note_store): Likewise.
18293         * reload.c (operands_match_p): Likewise.
18294         * rtl.h (load_extend_op): Likewise.
18295         * rtlhooks.c (gen_lowpart_general): Likewise.
18296         * simplify-rtx.c (simplify_truncation): Likewise.
18297         (simplify_unary_operation_1): Likewise.
18298         (simplify_binary_operation_1): Likewise.
18299         (simplify_const_binary_operation): Likewise.
18300         (simplify_const_relational_operation): Likewise.
18301         (simplify_subreg): Likewise.
18302         * stor-layout.c (bitwise_mode_for_mode): Likewise.
18303         * var-tracking.c (adjust_mems): Likewise.
18304         (prepare_call_arguments): Likewise.
18305
18306 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18307             Alan Hayward  <alan.hayward@arm.com>
18308             David Sherwood  <david.sherwood@arm.com>
18309
18310         * machmode.h (is_int_mode): New fuction.
18311         * combine.c (find_split_point): Use it.
18312         (combine_simplify_rtx): Likewise.
18313         (simplify_if_then_else): Likewise.
18314         (simplify_set): Likewise.
18315         (simplify_shift_const_1): Likewise.
18316         (simplify_comparison): Likewise.
18317         * config/aarch64/aarch64.c (aarch64_rtx_costs): Likewise.
18318         * cse.c (notreg_cost): Likewise.
18319         (cse_insn): Likewise.
18320         * cselib.c (cselib_lookup_1): Likewise.
18321         * dojump.c (do_jump_1): Likewise.
18322         (do_compare_rtx_and_jump): Likewise.
18323         * dse.c (get_call_args): Likewise.
18324         * dwarf2out.c (rtl_for_decl_init): Likewise.
18325         (native_encode_initializer): Likewise.
18326         * expmed.c (emit_store_flag_1): Likewise.
18327         (emit_store_flag): Likewise.
18328         * expr.c (convert_modes): Likewise.
18329         (store_field): Likewise.
18330         (expand_expr_real_1): Likewise.
18331         * fold-const.c (fold_read_from_constant_string): Likewise.
18332         * gimple-ssa-sprintf.c (get_format_string): Likewise.
18333         * optabs-libfuncs.c (gen_int_libfunc): Likewise.
18334         * optabs.c (expand_binop): Likewise.
18335         (expand_unop): Likewise.
18336         (expand_abs_nojump): Likewise.
18337         (expand_one_cmpl_abs_nojump): Likewise.
18338         * simplify-rtx.c (mode_signbit_p): Likewise.
18339         (val_signbit_p): Likewise.
18340         (val_signbit_known_set_p): Likewise.
18341         (val_signbit_known_clear_p): Likewise.
18342         (simplify_relational_operation_1): Likewise.
18343         * tree.c (vector_type_mode): Likewise.
18344
18345 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18346             Alan Hayward  <alan.hayward@arm.com>
18347             David Sherwood  <david.sherwood@arm.com>
18348
18349         * machmode.h (smallest_mode_for_size): Fix formatting.
18350         (smallest_int_mode_for_size): New function.
18351         * cfgexpand.c (expand_debug_expr): Use smallest_int_mode_for_size
18352         instead of smallest_mode_for_size.
18353         * combine.c (make_extraction): Likewise.
18354         * config/arc/arc.c (arc_expand_movmem): Likewise.
18355         * config/arm/arm.c (arm_expand_divmod_libfunc): Likewise.
18356         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
18357         * config/s390/s390.c (s390_expand_insv): Likewise.
18358         * config/sparc/sparc.c (assign_int_registers): Likewise.
18359         * config/spu/spu.c (spu_function_value): Likewise.
18360         (spu_function_arg): Likewise.
18361         * coverage.c (get_gcov_type): Likewise.
18362         (get_gcov_unsigned_t): Likewise.
18363         * dse.c (find_shift_sequence): Likewise.
18364         * expmed.c (store_bit_field_1): Likewise.
18365         * expr.c (convert_move): Likewise.
18366         (store_field): Likewise.
18367         * internal-fn.c (expand_arith_overflow): Likewise.
18368         * optabs-query.c (get_best_extraction_insn): Likewise.
18369         * optabs.c (expand_twoval_binop_libfunc): Likewise.
18370         * stor-layout.c (layout_type): Likewise.
18371         (initialize_sizetypes): Likewise.
18372         * targhooks.c (default_get_mask_mode): Likewise.
18373         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Likewise.
18374
18375 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18376             Alan Hayward  <alan.hayward@arm.com>
18377             David Sherwood  <david.sherwood@arm.com>
18378
18379         * machmode.h (opt_mode::else_blk): New function.
18380         (int_mode_for_mode): Declare.
18381         * stor-layout.c (int_mode_for_mode): Return an opt_scalar_int_mode.
18382         * builtins.c (expand_builtin_signbit): Adjust for new int_mode_for_mode
18383         return type.
18384         * cfgexpand.c (expand_debug_expr): Likewise.
18385         * combine.c (gen_lowpart_or_truncate): Likewise.
18386         (gen_lowpart_for_combine): Likewise.
18387         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Likewise.
18388         * config/avr/avr.c (avr_to_int_mode): Likewise.
18389         (avr_out_plus_1): Likewise.
18390         (avr_out_plus): Likewise.
18391         (avr_out_round): Likewise.
18392         * config/i386/i386.c (ix86_split_to_parts): Likewise.
18393         * config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
18394         (s390_expand_vcond): Likewise.
18395         * config/spu/spu.c (spu_split_immediate): Likewise.
18396         (spu_expand_mov): Likewise.
18397         * dse.c (get_stored_val): Likewise.
18398         * expmed.c (store_bit_field_1): Likewise.
18399         (convert_extracted_bit_field): Use int_mode_for_mode instead of
18400         int_mode_for_size.
18401         (extract_bit_field_1): Adjust for new int_mode_for_mode return type.
18402         (extract_low_bits): Likewise.
18403         * expr.c (emit_group_load_1): Likewise.  Separate out the BLKmode
18404         handling rather than repeating the check.
18405         (emit_group_store): Likewise.
18406         (emit_move_via_integer): Adjust for new int_mode_for_mode return type.
18407         * optabs.c (expand_absneg_bit): Likewise.
18408         (expand_copysign_absneg): Likewise.
18409         (expand_copysign_bit): Likewise.
18410         * tree-if-conv.c (ifcvt_can_use_mask_load_store): Likewise.
18411         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
18412         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
18413         * var-tracking.c (prepare_call_arguments):  Likewise.
18414         * config/powerpcspe/powerpcspe.c (rs6000_do_expand_vec_perm): Use
18415         int_mode_for_mode instead of mode_for_size.
18416         * config/rs6000/rs6000.c (rs6000_do_expand_vec_perm): Likewise.
18417
18418 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18419             Alan Hayward  <alan.hayward@arm.com>
18420             David Sherwood  <david.sherwood@arm.com>
18421
18422         * machmode.h (int_mode_for_size): New function.
18423         * builtins.c (set_builtin_user_assembler_name): Use int_mode_for_size
18424         instead of mode_for_size.
18425         * calls.c (save_fixed_argument_area): Likewise.  Make use of BLKmode
18426         explicit.
18427         * combine.c (expand_field_assignment): Use int_mode_for_size
18428         instead of mode_for_size.
18429         (make_extraction): Likewise.
18430         (simplify_shift_const_1): Likewise.
18431         (simplify_comparison): Likewise.
18432         * dojump.c (do_jump): Likewise.
18433         * dwarf2out.c (mem_loc_descriptor): Likewise.
18434         * emit-rtl.c (init_derived_machine_modes): Likewise.
18435         * expmed.c (flip_storage_order): Likewise.
18436         (convert_extracted_bit_field): Likewise.
18437         * expr.c (copy_blkmode_from_reg): Likewise.
18438         * graphite-isl-ast-to-gimple.c (max_mode_int_precision): Likewise.
18439         * internal-fn.c (expand_mul_overflow): Likewise.
18440         * lower-subreg.c (simple_move): Likewise.
18441         * optabs-libfuncs.c (init_optabs): Likewise.
18442         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
18443         * tree.c (vector_type_mode): Likewise.
18444         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
18445         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Likewise.
18446         * tree-vect-generic.c (expand_vector_parallel): Likewise.
18447         * tree-vect-stmts.c (vectorizable_load): Likewise.
18448         (vectorizable_store): Likewise.
18449
18450 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18451             Alan Hayward  <alan.hayward@arm.com>
18452             David Sherwood  <david.sherwood@arm.com>
18453
18454         * coretypes.h (pod_mode): New type.
18455         (scalar_int_mode_pod): New typedef.
18456         * machmode.h (pod_mode): New class.
18457         (int_n_data_t::m): Change type to scalar_int_mode_pod.
18458         * genmodes.c (emit_mode_int_n): Update accordingly.
18459         * lower-subreg.h (target_lower_subreg): Change type to
18460         scalar_int_mode_pod.
18461         * gdbhooks.py (build_pretty_printer): Handle pod_mode and
18462         scalar_int_mode_pod.
18463
18464 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18465             Alan Hayward  <alan.hayward@arm.com>
18466             David Sherwood  <david.sherwood@arm.com>
18467
18468         * config/powerpcspe/powerpcspe.h (rs6000_pmode): Change type from
18469         machine_mode to scalar_int_mode.
18470         * config/powerpcspe/powerpcspe.c (rs6000_pmode): Likewise.
18471         (rs6000_option_override_internal): Remove cast to int.
18472         * config/rs6000/rs6000.h (rs6000_pmode): Change type from
18473         machine_mode to scalar_int_mode.
18474         * config/rs6000/rs6000.c (rs6000_pmode): Likewise.
18475         (rs6000_option_override_internal): Remove cast to int.
18476         * config/s390/s390.h (Pmode): Remove cast to machine_mode.
18477         * config/epiphany/epiphany.h (RTX_OK_FOR_OFFSET_P): Add cast
18478         to machine_mode.
18479         * config/s390/s390.c (s390_expand_builtin): Likewise.
18480         * coretypes.h (scalar_int_mode): New type.
18481         (opt_scalar_int_mode): New typedef.
18482         * machmode.h (scalar_int_mode): New class.
18483         (scalar_int_mode::includes_p): New function.
18484         (byte_mode): Change type to scalar_int_mode.
18485         (word_mode): Likewise.
18486         (ptr_mode): Likewise.
18487         * emit-rtl.c (byte_mode): Likewise.
18488         (word_mode): Likewise.
18489         (ptr_mode): Likewise.
18490         (init_derived_machine_modes): Update accordingly.
18491         * genmodes.c (get_mode_class): Return scalar_int_mode for MODE_INT
18492         and MODE_PARTIAL_INT.
18493         * gdbhooks.py (build_pretty_printer): Handle scalar_int_mode and
18494         opt_scalar_int_mode.
18495
18496 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18497             Alan Hayward  <alan.hayward@arm.com>
18498             David Sherwood  <david.sherwood@arm.com>
18499
18500         * target.def (libgcc_floating_mode_supported_p): Take a
18501         scalar_float_mode.
18502         * doc/tm.texi: Regenerate.
18503         * targhooks.h (default_libgcc_floating_mode_supported_p): Take a
18504         scalar_float_mode.
18505         * targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.
18506         * config/aarch64/aarch64.c (aarch64_libgcc_floating_mode_supported_p):
18507         Likewise.
18508
18509 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18510             Alan Hayward  <alan.hayward@arm.com>
18511             David Sherwood  <david.sherwood@arm.com>
18512
18513         * target.def (default_floatn_mode): Return an opt_scalar_float_mode.
18514         * doc/tm.texi: Regenerate.
18515         * config/arm/arm.c (arm_floatn_mode): Return an opt_scalar_float_mode.
18516         * config/powerpcspe/powerpcspe.c (rs6000_floatn_mode): Likewise.
18517         * config/rs6000/rs6000.c (rs6000_floatn_mode): Likewise.
18518         * targhooks.h (default_floatn_mode): Likewise.
18519         * targhooks.c (default_floatn_mode): Likewise.
18520         * tree.c (build_common_tree_nodes): Update accordingly.
18521
18522 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18523             Alan Hayward  <alan.hayward@arm.com>
18524             David Sherwood  <david.sherwood@arm.com>
18525
18526         * machmode.h (mode_iterator::start): Provide overload for opt_modes.
18527         (mode_iterator::iterate_p): Likewise.
18528         (mode_iterator::get_wider): Likewise.
18529         * expr.c (init_expr_target): Use opt_scalar_float_mode.
18530
18531 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18532             Alan Hayward  <alan.hayward@arm.com>
18533             David Sherwood  <david.sherwood@arm.com>
18534
18535         * coretypes.h (opt_scalar_float_mode): New typedef.
18536         * machmode.h (float_mode_for_size): New function.
18537         * emit-rtl.c (double_mode): Delete.
18538         (init_emit_once): Use float_mode_for_size.
18539         * stor-layout.c (layout_type): Likewise.
18540         * gdbhooks.py (build_pretty_printer): Handle opt_scalar_float_mode.
18541
18542 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18543             Alan Hayward  <alan.hayward@arm.com>
18544             David Sherwood  <david.sherwood@arm.com>
18545
18546         * output.h (assemble_real): Take a scalar_float_mode.
18547         * config/arm/arm.c (arm_assemble_integer): Update accordingly.
18548         * config/arm/arm.md (consttable_4): Likewise.
18549         (consttable_8): Likewise.
18550         (consttable_16): Likewise.
18551         * config/mips/mips.md (consttable_float): Likewise.
18552         * config/s390/s390.c (s390_output_pool_entry): Likewise.
18553         * varasm.c (assemble_real): Take a scalar_float_mode.
18554         (output_constant_pool_2): Update accordingly.
18555         (output_constant): Likewise.
18556
18557 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18558             Alan Hayward  <alan.hayward@arm.com>
18559             David Sherwood  <david.sherwood@arm.com>
18560
18561         * tree.h (SCALAR_FLOAT_TYPE_MODE): New macro.
18562         * builtins.c (expand_builtin_signbit): Use it instead of TYPE_MODE.
18563         * fold-const.c (fold_convert_const_real_from_fixed): Likewise.
18564         (native_encode_real): Likewise.
18565         (native_interpret_real): Likewise.
18566         * hsa-brig.c (emit_immediate_scalar_to_buffer): Likewise.
18567         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
18568
18569 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18570             Alan Hayward  <alan.hayward@arm.com>
18571             David Sherwood  <david.sherwood@arm.com>
18572
18573         * optabs-libfuncs.c (gen_trunc_conv_libfunc): Use is_a
18574         <scalar_float_mode>.  Simplify.
18575         (gen_extend_conv_libfunc): Likewise.
18576
18577 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18578             Alan Hayward  <alan.hayward@arm.com>
18579             David Sherwood  <david.sherwood@arm.com>
18580
18581         * coretypes.h (scalar_float_mode): New type.
18582         * machmode.h (mode_traits::from_int): Use machine_mode if
18583         USE_ENUM_MODES is defined.
18584         (is_a): New function.
18585         (as_a): Likewise.
18586         (dyn_cast): Likewise.
18587         (scalar_float_mode): New class.
18588         (scalar_float_mode::includes_p): New function.
18589         (is_float_mode): Likewise.
18590         * gdbhooks.py (MachineModePrinter): New class.
18591         (build_pretty_printer): Use it for scalar_float_mode.
18592         * real.h (FLOAT_MODE_FORMAT): Use as_a <scalar_float_mode>.
18593         (format_helper::format_helper): Turn into a template.
18594         * genmodes.c (get_mode_class): New function.
18595         (emit_insn_modes_h): Give modes the class returned by get_mode_class,
18596         or machine_mode if none.
18597         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Use
18598         as_a <scalar_float_mode>.
18599         * dwarf2out.c (mem_loc_descriptor): Likewise.
18600         (insert_float): Likewise.
18601         (add_const_value_attribute): Likewise.
18602         * simplify-rtx.c (simplify_immed_subreg): Likewise.
18603         * optabs.c (expand_absneg_bit): Take a scalar_float_mode.
18604         (expand_unop): Update accordingly.
18605         (expand_abs_nojump): Likewise.
18606         (expand_copysign_absneg): Take a scalar_float_mode.
18607         (expand_copysign_bit): Likewise.
18608         (expand_copysign): Update accordingly.
18609
18610 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18611             Alan Hayward  <alan.hayward@arm.com>
18612             David Sherwood  <david.sherwood@arm.com>
18613
18614         * coretypes.h (opt_mode): New class.
18615         * machmode.h (opt_mode): Likewise.
18616         (opt_mode::else_void): New function.
18617         (opt_mode::require): Likewise.
18618         (opt_mode::exists): Likewise.
18619         (GET_MODE_WIDER_MODE): Turn into a function and return an opt_mode.
18620         (GET_MODE_2XWIDER_MODE): Likewise.
18621         (mode_iterator::get_wider): Update accordingly.
18622         (mode_iterator::get_2xwider): Likewise.
18623         (mode_iterator::get_known_wider): Likewise, turning into a template.
18624         * combine.c (make_extraction): Update use of GET_MODE_WIDER_MODE,
18625         forcing a wider mode to exist.
18626         * config/cr16/cr16.h (LONG_REG_P): Likewise.
18627         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
18628         * config/c6x/c6x.c (c6x_rtx_costs): Update use of
18629         GET_MODE_2XWIDER_MODE, forcing a wider mode to exist.
18630         * lower-subreg.c (init_lower_subreg): Likewise.
18631         * optabs-libfuncs.c (init_sync_libfuncs_1): Likewise, but not
18632         on the final iteration.
18633         * config/i386/i386.c (ix86_expand_set_or_movmem): Check whether
18634         a wider mode exists before asking for a move pattern.
18635         (get_mode_wider_vector): Update use of GET_MODE_WIDER_MODE,
18636         forcing a wider mode to exist.
18637         (expand_vselect_vconcat): Update use of GET_MODE_2XWIDER_MODE,
18638         returning false if no such mode exists.
18639         * config/ia64/ia64.c (expand_vselect_vconcat): Likewise.
18640         * config/mips/mips.c (mips_expand_vselect_vconcat): Likewise.
18641         * expmed.c (init_expmed_one_mode): Update use of GET_MODE_WIDER_MODE.
18642         Avoid checking for a MODE_INT if we already know the mode is not a
18643         SCALAR_INT_MODE_P.
18644         (extract_high_half): Update use of GET_MODE_WIDER_MODE,
18645         forcing a wider mode to exist.
18646         (expmed_mult_highpart_optab): Likewise.
18647         (expmed_mult_highpart): Likewise.
18648         * expr.c (expand_expr_real_2): Update use of GET_MODE_WIDER_MODE,
18649         using else_void.
18650         * lto-streamer-in.c (lto_input_mode_table): Likewise.
18651         * optabs-query.c (find_widening_optab_handler_and_mode): Likewise.
18652         * stor-layout.c (bit_field_mode_iterator::next_mode): Likewise.
18653         * internal-fn.c (expand_mul_overflow): Update use of
18654         GET_MODE_2XWIDER_MODE.
18655         * omp-low.c (omp_clause_aligned_alignment): Likewise.
18656         * tree-ssa-math-opts.c (convert_mult_to_widen): Update use of
18657         GET_MODE_WIDER_MODE.
18658         (convert_plusminus_to_widen): Likewise.
18659         * tree-switch-conversion.c (array_value_type): Likewise.
18660         * var-tracking.c (emit_note_insn_var_location): Likewise.
18661         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
18662         Return false inside rather than outside the loop if no wider mode
18663         exists
18664         * optabs.c (expand_binop): Update use of GET_MODE_WIDER_MODE
18665         and GET_MODE_2XWIDER_MODE
18666         (can_compare_p): Use else_void.
18667         * gdbhooks.py (OptMachineModePrinter): New class.
18668         (build_pretty_printer): Use it for opt_mode.
18669
18670 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18671             Alan Hayward  <alan.hayward@arm.com>
18672             David Sherwood  <david.sherwood@arm.com>
18673
18674         * tree-switch-conversion.c (array_value_type): Only read TYPE_MODE
18675         once.  Use get_narrowest_mode instead of GET_CLASS_NARROWEST_MODE.
18676
18677 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18678             Alan Hayward  <alan.hayward@arm.com>
18679             David Sherwood  <david.sherwood@arm.com>
18680
18681         * machmode.h (mode_traits): New structure.
18682         (get_narrowest_mode): New function.
18683         (mode_iterator::start): Likewise.
18684         (mode_iterator::iterate_p): Likewise.
18685         (mode_iterator::get_wider): Likewise.
18686         (mode_iterator::get_known_wider): Likewise.
18687         (mode_iterator::get_2xwider): Likewise.
18688         (FOR_EACH_MODE_IN_CLASS): New mode iterator.
18689         (FOR_EACH_MODE): Likewise.
18690         (FOR_EACH_MODE_FROM): Likewise.
18691         (FOR_EACH_MODE_UNTIL): Likewise.
18692         (FOR_EACH_WIDER_MODE): Likewise.
18693         (FOR_EACH_2XWIDER_MODE): Likewise.
18694         * builtins.c (expand_builtin_strlen): Use new mode iterators.
18695         * combine.c (simplify_comparison): Likewise
18696         * config/i386/i386.c (type_natural_mode): Likewise.
18697         * cse.c (cse_insn): Likewise.
18698         * dse.c (find_shift_sequence): Likewise.
18699         * emit-rtl.c (init_derived_machine_modes): Likewise.
18700         (init_emit_once): Likewise.
18701         * explow.c (hard_function_value): Likewise.
18702         * expmed.c (extract_fixed_bit_field_1): Likewise.
18703         (extract_bit_field_1): Likewise.
18704         (expand_divmod): Likewise.
18705         (emit_store_flag_1): Likewise.
18706         * expr.c (init_expr_target): Likewise.
18707         (convert_move): Likewise.
18708         (alignment_for_piecewise_move): Likewise.
18709         (widest_int_mode_for_size): Likewise.
18710         (emit_block_move_via_movmem): Likewise.
18711         (copy_blkmode_to_reg): Likewise.
18712         (set_storage_via_setmem): Likewise.
18713         (compress_float_constant): Likewise.
18714         * omp-low.c (omp_clause_aligned_alignment): Likewise.
18715         * optabs-query.c (get_best_extraction_insn): Likewise.
18716         * optabs.c (expand_binop): Likewise.
18717         (expand_twoval_unop): Likewise.
18718         (expand_twoval_binop): Likewise.
18719         (widen_leading): Likewise.
18720         (widen_bswap): Likewise.
18721         (expand_parity): Likewise.
18722         (expand_unop): Likewise.
18723         (prepare_cmp_insn): Likewise.
18724         (prepare_float_lib_cmp): Likewise.
18725         (expand_float): Likewise.
18726         (expand_fix): Likewise.
18727         (expand_sfix_optab): Likewise.
18728         * postreload.c (move2add_use_add2_insn): Likewise.
18729         * reg-stack.c (reg_to_stack): Likewise.
18730         * reginfo.c (choose_hard_reg_mode): Likewise.
18731         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
18732         * stor-layout.c (mode_for_size): Likewise.
18733         (smallest_mode_for_size): Likewise.
18734         (mode_for_vector): Likewise.
18735         (finish_bitfield_representative): Likewise.
18736         * tree-ssa-math-opts.c (target_supports_divmod_p): Likewise.
18737         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
18738         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
18739         * var-tracking.c (prepare_call_arguments): Likewise.
18740
18741 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18742             Alan Hayward  <alan.hayward@arm.com>
18743             David Sherwood  <david.sherwood@arm.com>
18744
18745         * genconditions.c (write_header): Add a "#define USE_ENUM_MODES".
18746         * genmodes.c (emit_insn_modes_h): Define FOOmode to E_FOOmode if
18747         USE_ENUM_MODES is defined and to ((void) 0, E_FOOmode) otherwise.
18748         * machmode.h (mode_size): Move earlier in file.
18749         (mode_precision): Likewise.
18750         (mode_inner): Likewise.
18751         (mode_nunits): Likewise.
18752         (mode_unit_size): Likewise.
18753         (unit_unit_precision): Likewise.
18754         (mode_wider): Likewise.
18755         (mode_2xwider): Likewise.
18756         (machine_mode): New class.
18757         (mode_to_bytes): New function.
18758         (mode_to_bits): Likewise.
18759         (mode_to_precision): Likewise.
18760         (mode_to_inner): Likewise.
18761         (mode_to_unit_size): Likewise.
18762         (mode_to_unit_precision): Likewise.
18763         (mode_to_nunits): Likewise.
18764         (GET_MODE_SIZE): Use mode_to_bytes.
18765         (GET_MODE_BITSIZE): Use mode_to_bits.
18766         (GET_MODE_PRECISION): Use mode_to_precision.
18767         (GET_MODE_INNER): Use mode_to_inner.
18768         (GET_MODE_UNIT_SIZE): Use mode_to_unit_size.
18769         (GET_MODE_UNIT_PRECISION): Use mode_to_unit_precision.
18770         (GET_MODE_NUNITS): Use mode_to_nunits.
18771         * system.h (ALWAYS_INLINE): New macro.
18772         * config/powerpcspe/powerpcspe-c.c
18773         (altivec_resolve_overloaded_builtin): Use machine_mode instead of
18774         int for arg1_mode and arg2_mode.
18775
18776 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18777             Alan Hayward  <alan.hayward@arm.com>
18778             David Sherwood  <david.sherwood@arm.com>
18779
18780         * config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type):
18781         Prefix mode names with E_ in case statements.
18782         * config/aarch64/aarch64-elf.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
18783         * config/aarch64/aarch64.c (aarch64_split_simd_combine): Likewise.
18784         (aarch64_split_simd_move): Likewise.
18785         (aarch64_gen_storewb_pair): Likewise.
18786         (aarch64_gen_loadwb_pair): Likewise.
18787         (aarch64_gen_store_pair): Likewise.
18788         (aarch64_gen_load_pair): Likewise.
18789         (aarch64_get_condition_code_1): Likewise.
18790         (aarch64_constant_pool_reload_icode): Likewise.
18791         (get_rsqrte_type): Likewise.
18792         (get_rsqrts_type): Likewise.
18793         (get_recpe_type): Likewise.
18794         (get_recps_type): Likewise.
18795         (aarch64_gimplify_va_arg_expr): Likewise.
18796         (aarch64_simd_container_mode): Likewise.
18797         (aarch64_emit_load_exclusive): Likewise.
18798         (aarch64_emit_store_exclusive): Likewise.
18799         (aarch64_expand_compare_and_swap): Likewise.
18800         (aarch64_gen_atomic_cas): Likewise.
18801         (aarch64_emit_bic): Likewise.
18802         (aarch64_emit_atomic_swap): Likewise.
18803         (aarch64_emit_atomic_load_op): Likewise.
18804         (aarch64_evpc_trn): Likewise.
18805         (aarch64_evpc_uzp): Likewise.
18806         (aarch64_evpc_zip): Likewise.
18807         (aarch64_evpc_ext): Likewise.
18808         (aarch64_evpc_rev): Likewise.
18809         (aarch64_evpc_dup): Likewise.
18810         (aarch64_gen_ccmp_first): Likewise.
18811         (aarch64_gen_ccmp_next): Likewise.
18812         * config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
18813         (alpha_emit_xfloating_libcall): Likewise.
18814         (emit_insxl): Likewise.
18815         (alpha_arg_type): Likewise.
18816         * config/arc/arc.c (arc_vector_mode_supported_p): Likewise.
18817         (arc_preferred_simd_mode): Likewise.
18818         (arc_secondary_reload): Likewise.
18819         (get_arc_condition_code): Likewise.
18820         (arc_print_operand): Likewise.
18821         (arc_legitimate_constant_p): Likewise.
18822         * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
18823         * config/arc/arc.md (casesi_load): Likewise.
18824         (casesi_compact_jump): Likewise.
18825         * config/arc/predicates.md (proper_comparison_operator): Likewise.
18826         (cc_use_register): Likewise.
18827         * config/arm/aout.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
18828         * config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise.
18829         (arm_init_iwmmxt_builtins): Likewise.
18830         * config/arm/arm.c (thumb1_size_rtx_costs): Likewise.
18831         (neon_expand_vector_init): Likewise.
18832         (arm_attr_length_move_neon): Likewise.
18833         (maybe_get_arm_condition_code): Likewise.
18834         (arm_emit_vector_const): Likewise.
18835         (arm_preferred_simd_mode): Likewise.
18836         (arm_output_iwmmxt_tinsr): Likewise.
18837         (thumb1_output_casesi): Likewise.
18838         (thumb2_output_casesi): Likewise.
18839         (arm_emit_load_exclusive): Likewise.
18840         (arm_emit_store_exclusive): Likewise.
18841         (arm_expand_compare_and_swap): Likewise.
18842         (arm_evpc_neon_vuzp): Likewise.
18843         (arm_evpc_neon_vzip): Likewise.
18844         (arm_evpc_neon_vrev): Likewise.
18845         (arm_evpc_neon_vtrn): Likewise.
18846         (arm_evpc_neon_vext): Likewise.
18847         (arm_validize_comparison): Likewise.
18848         * config/arm/neon.md (neon_vc<cmp_op><mode>): Likewise.
18849         * config/avr/avr-c.c (avr_resolve_overloaded_builtin): Likewise.
18850         * config/avr/avr.c (avr_rtx_costs_1): Likewise.
18851         * config/c6x/c6x.c (c6x_vector_mode_supported_p): Likewise.
18852         (c6x_preferred_simd_mode): Likewise.
18853         * config/epiphany/epiphany.c (get_epiphany_condition_code): Likewise.
18854         (epiphany_rtx_costs): Likewise.
18855         * config/epiphany/predicates.md (proper_comparison_operator):
18856         Likewise.
18857         * config/frv/frv.c (condexec_memory_operand): Likewise.
18858         (frv_emit_move): Likewise.
18859         (output_move_single): Likewise.
18860         (output_condmove_single): Likewise.
18861         (frv_hard_regno_mode_ok): Likewise.
18862         (frv_matching_accg_mode): Likewise.
18863         * config/h8300/h8300.c (split_adds_subs): Likewise.
18864         (h8300_rtx_costs): Likewise.
18865         (h8300_print_operand): Likewise.
18866         (compute_mov_length): Likewise.
18867         (output_logical_op): Likewise.
18868         (compute_logical_op_length): Likewise.
18869         (compute_logical_op_cc): Likewise.
18870         (h8300_shift_needs_scratch_p): Likewise.
18871         (output_a_shift): Likewise.
18872         (compute_a_shift_length): Likewise.
18873         (compute_a_shift_cc): Likewise.
18874         (expand_a_rotate): Likewise.
18875         (output_a_rotate): Likewise.
18876         * config/i386/i386.c (classify_argument): Likewise.
18877         (function_arg_advance_32): Likewise.
18878         (function_arg_32): Likewise.
18879         (function_arg_64): Likewise.
18880         (function_value_64): Likewise.
18881         (ix86_gimplify_va_arg): Likewise.
18882         (ix86_legitimate_constant_p): Likewise.
18883         (put_condition_code): Likewise.
18884         (split_double_mode): Likewise.
18885         (ix86_avx256_split_vector_move_misalign): Likewise.
18886         (ix86_expand_vector_logical_operator): Likewise.
18887         (ix86_split_idivmod): Likewise.
18888         (ix86_expand_adjust_ufix_to_sfix_si): Likewise.
18889         (ix86_build_const_vector): Likewise.
18890         (ix86_build_signbit_mask): Likewise.
18891         (ix86_match_ccmode): Likewise.
18892         (ix86_cc_modes_compatible): Likewise.
18893         (ix86_expand_branch): Likewise.
18894         (ix86_expand_sse_cmp): Likewise.
18895         (ix86_expand_sse_movcc): Likewise.
18896         (ix86_expand_int_sse_cmp): Likewise.
18897         (ix86_expand_vec_perm_vpermi2): Likewise.
18898         (ix86_expand_vec_perm): Likewise.
18899         (ix86_expand_sse_unpack): Likewise.
18900         (ix86_expand_int_addcc): Likewise.
18901         (ix86_split_to_parts): Likewise.
18902         (ix86_vectorize_builtin_gather): Likewise.
18903         (ix86_vectorize_builtin_scatter): Likewise.
18904         (avx_vpermilp_parallel): Likewise.
18905         (inline_memory_move_cost): Likewise.
18906         (ix86_tieable_integer_mode_p): Likewise.
18907         (x86_maybe_negate_const_int): Likewise.
18908         (ix86_expand_vector_init_duplicate): Likewise.
18909         (ix86_expand_vector_init_one_nonzero): Likewise.
18910         (ix86_expand_vector_init_one_var): Likewise.
18911         (ix86_expand_vector_init_concat): Likewise.
18912         (ix86_expand_vector_init_interleave): Likewise.
18913         (ix86_expand_vector_init_general): Likewise.
18914         (ix86_expand_vector_set): Likewise.
18915         (ix86_expand_vector_extract): Likewise.
18916         (emit_reduc_half): Likewise.
18917         (ix86_emit_i387_round): Likewise.
18918         (ix86_mangle_type): Likewise.
18919         (ix86_expand_round_sse4): Likewise.
18920         (expand_vec_perm_blend): Likewise.
18921         (canonicalize_vector_int_perm): Likewise.
18922         (ix86_expand_vec_one_operand_perm_avx512): Likewise.
18923         (expand_vec_perm_1): Likewise.
18924         (expand_vec_perm_interleave3): Likewise.
18925         (expand_vec_perm_even_odd_pack): Likewise.
18926         (expand_vec_perm_even_odd_1): Likewise.
18927         (expand_vec_perm_broadcast_1): Likewise.
18928         (ix86_vectorize_vec_perm_const_ok): Likewise.
18929         (ix86_expand_vecop_qihi): Likewise.
18930         (ix86_expand_mul_widen_hilo): Likewise.
18931         (ix86_expand_sse2_abs): Likewise.
18932         (ix86_expand_pextr): Likewise.
18933         (ix86_expand_pinsr): Likewise.
18934         (ix86_preferred_simd_mode): Likewise.
18935         (ix86_simd_clone_compute_vecsize_and_simdlen): Likewise.
18936         * config/i386/sse.md (*andnot<mode>3): Likewise.
18937         (<mask_codefor><code><mode>3<mask_name>): Likewise.
18938         (*<code><mode>3): Likewise.
18939         * config/ia64/ia64.c (ia64_expand_vecint_compare): Likewise.
18940         (ia64_expand_atomic_op): Likewise.
18941         (ia64_arg_type): Likewise.
18942         (ia64_mode_to_int): Likewise.
18943         (ia64_scalar_mode_supported_p): Likewise.
18944         (ia64_vector_mode_supported_p): Likewise.
18945         (expand_vec_perm_broadcast): Likewise.
18946         * config/iq2000/iq2000.c (iq2000_move_1word): Likewise.
18947         (iq2000_function_arg_advance): Likewise.
18948         (iq2000_function_arg): Likewise.
18949         * config/m32c/m32c.c (m32c_preferred_reload_class): Likewise.
18950         * config/m68k/m68k.c (output_dbcc_and_branch): Likewise.
18951         (m68k_libcall_value): Likewise.
18952         (m68k_function_value): Likewise.
18953         (sched_attr_op_type): Likewise.
18954         * config/mcore/mcore.c (mcore_output_move): Likewise.
18955         * config/microblaze/microblaze.c (microblaze_function_arg_advance):
18956         Likewise.
18957         (microblaze_function_arg): Likewise.
18958         * config/mips/mips.c (mips16_build_call_stub): Likewise.
18959         (mips_print_operand): Likewise.
18960         (mips_mode_ok_for_mov_fmt_p): Likewise.
18961         (mips_vector_mode_supported_p): Likewise.
18962         (mips_preferred_simd_mode): Likewise.
18963         (mips_expand_vpc_loongson_even_odd): Likewise.
18964         (mips_expand_vec_unpack): Likewise.
18965         (mips_expand_vi_broadcast): Likewise.
18966         (mips_expand_vector_init): Likewise.
18967         (mips_expand_vec_reduc): Likewise.
18968         (mips_expand_msa_cmp): Likewise.
18969         * config/mips/mips.md (casesi_internal_mips16_<mode>): Likewise.
18970         * config/mn10300/mn10300.c (mn10300_print_operand): Likewise.
18971         (cc_flags_for_mode): Likewise.
18972         * config/msp430/msp430.c (msp430_print_operand): Likewise.
18973         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Likewise.
18974         (nds32_output_casesi_pc_relative): Likewise.
18975         * config/nds32/nds32.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
18976         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Likewise.
18977         (nvptx_gen_unpack): Likewise.
18978         (nvptx_gen_pack): Likewise.
18979         (nvptx_gen_shuffle): Likewise.
18980         (nvptx_gen_wcast): Likewise.
18981         (nvptx_preferred_simd_mode): Likewise.
18982         * config/pa/pa.c (pa_secondary_reload): Likewise.
18983         * config/pa/predicates.md (base14_operand): Likewise.
18984         * config/powerpcspe/powerpcspe-c.c
18985         (altivec_resolve_overloaded_builtin): Likewise.
18986         * config/powerpcspe/powerpcspe.c (rs6000_setup_reg_addr_masks):
18987         Likewise.
18988         (rs6000_preferred_simd_mode): Likewise.
18989         (output_vec_const_move): Likewise.
18990         (rs6000_expand_vector_extract): Likewise.
18991         (rs6000_split_vec_extract_var): Likewise.
18992         (reg_offset_addressing_ok_p): Likewise.
18993         (rs6000_legitimate_offset_address_p): Likewise.
18994         (rs6000_legitimize_address): Likewise.
18995         (rs6000_emit_set_const): Likewise.
18996         (rs6000_const_vec): Likewise.
18997         (rs6000_emit_move): Likewise.
18998         (spe_build_register_parallel): Likewise.
18999         (rs6000_darwin64_record_arg_recurse): Likewise.
19000         (swap_selector_for_mode): Likewise.
19001         (spe_init_builtins): Likewise.
19002         (paired_init_builtins): Likewise.
19003         (altivec_init_builtins): Likewise.
19004         (do_load_for_compare): Likewise.
19005         (rs6000_generate_compare): Likewise.
19006         (rs6000_expand_float128_convert): Likewise.
19007         (emit_load_locked): Likewise.
19008         (emit_store_conditional): Likewise.
19009         (rs6000_output_function_epilogue): Likewise.
19010         (rs6000_handle_altivec_attribute): Likewise.
19011         (rs6000_function_value): Likewise.
19012         (emit_fusion_gpr_load): Likewise.
19013         (emit_fusion_p9_load): Likewise.
19014         (emit_fusion_p9_store): Likewise.
19015         * config/powerpcspe/predicates.md (easy_fp_constant): Likewise.
19016         (fusion_gpr_mem_load): Likewise.
19017         (fusion_addis_mem_combo_load): Likewise.
19018         (fusion_addis_mem_combo_store): Likewise.
19019         * config/rs6000/predicates.md (easy_fp_constant): Likewise.
19020         (fusion_gpr_mem_load): Likewise.
19021         (fusion_addis_mem_combo_load): Likewise.
19022         (fusion_addis_mem_combo_store): Likewise.
19023         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
19024         Likewise.
19025         * config/rs6000/rs6000-string.c (do_load_for_compare): Likewise.
19026         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
19027         (rs6000_preferred_simd_mode): Likewise.
19028         (output_vec_const_move): Likewise.
19029         (rs6000_expand_vector_extract): Likewise.
19030         (rs6000_split_vec_extract_var): Likewise.
19031         (reg_offset_addressing_ok_p): Likewise.
19032         (rs6000_legitimate_offset_address_p): Likewise.
19033         (rs6000_legitimize_address): Likewise.
19034         (rs6000_emit_set_const): Likewise.
19035         (rs6000_const_vec): Likewise.
19036         (rs6000_emit_move): Likewise.
19037         (rs6000_darwin64_record_arg_recurse): Likewise.
19038         (swap_selector_for_mode): Likewise.
19039         (paired_init_builtins): Likewise.
19040         (altivec_init_builtins): Likewise.
19041         (rs6000_expand_float128_convert): Likewise.
19042         (emit_load_locked): Likewise.
19043         (emit_store_conditional): Likewise.
19044         (rs6000_output_function_epilogue): Likewise.
19045         (rs6000_handle_altivec_attribute): Likewise.
19046         (rs6000_function_value): Likewise.
19047         (emit_fusion_gpr_load): Likewise.
19048         (emit_fusion_p9_load): Likewise.
19049         (emit_fusion_p9_store): Likewise.
19050         * config/rx/rx.c (rx_gen_move_template): Likewise.
19051         (flags_from_mode): Likewise.
19052         * config/s390/predicates.md (s390_alc_comparison): Likewise.
19053         (s390_slb_comparison): Likewise.
19054         * config/s390/s390.c (s390_handle_vectorbool_attribute): Likewise.
19055         (s390_vector_mode_supported_p): Likewise.
19056         (s390_cc_modes_compatible): Likewise.
19057         (s390_match_ccmode_set): Likewise.
19058         (s390_canonicalize_comparison): Likewise.
19059         (s390_emit_compare_and_swap): Likewise.
19060         (s390_branch_condition_mask): Likewise.
19061         (s390_rtx_costs): Likewise.
19062         (s390_secondary_reload): Likewise.
19063         (__SECONDARY_RELOAD_CASE): Likewise.
19064         (s390_expand_cs): Likewise.
19065         (s390_preferred_simd_mode): Likewise.
19066         * config/s390/vx-builtins.md (vec_packsu_u<mode>): Likewise.
19067         * config/sh/sh.c (sh_print_operand): Likewise.
19068         (dump_table): Likewise.
19069         (sh_secondary_reload): Likewise.
19070         * config/sh/sh.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
19071         * config/sh/sh.md (casesi_worker_1): Likewise.
19072         (casesi_worker_2): Likewise.
19073         * config/sparc/predicates.md (icc_comparison_operator): Likewise.
19074         (fcc_comparison_operator): Likewise.
19075         * config/sparc/sparc.c (sparc_expand_move): Likewise.
19076         (emit_soft_tfmode_cvt): Likewise.
19077         (sparc_preferred_simd_mode): Likewise.
19078         (output_cbranch): Likewise.
19079         (sparc_print_operand): Likewise.
19080         (sparc_expand_vec_perm_bmask): Likewise.
19081         (vector_init_bshuffle): Likewise.
19082         * config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
19083         (spu_vector_mode_supported_p): Likewise.
19084         (spu_expand_insv): Likewise.
19085         (spu_emit_branch_or_set): Likewise.
19086         (spu_handle_vector_attribute): Likewise.
19087         (spu_builtin_splats): Likewise.
19088         (spu_builtin_extract): Likewise.
19089         (spu_builtin_promote): Likewise.
19090         (spu_expand_sign_extend): Likewise.
19091         * config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
19092         (tilegx_simd_int): Likewise.
19093         * config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p): Likewise.
19094         (tilepro_simd_int): Likewise.
19095         * config/v850/v850.c (const_double_split): Likewise.
19096         (v850_print_operand): Likewise.
19097         (ep_memory_offset): Likewise.
19098         * config/vax/vax.c (vax_rtx_costs): Likewise.
19099         (vax_output_int_move): Likewise.
19100         (vax_output_int_add): Likewise.
19101         (vax_output_int_subtract): Likewise.
19102         * config/visium/predicates.md (visium_branch_operator): Likewise.
19103         * config/visium/visium.c (rtx_ok_for_offset_p): Likewise.
19104         (visium_print_operand_address): Likewise.
19105         * config/visium/visium.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
19106         * config/xtensa/xtensa.c (xtensa_mem_offset): Likewise.
19107         (xtensa_expand_conditional_branch): Likewise.
19108         (xtensa_copy_incoming_a7): Likewise.
19109         (xtensa_output_literal): Likewise.
19110         * dfp.c (decimal_real_maxval): Likewise.
19111         * targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.
19112
19113 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
19114             Alan Hayward  <alan.hayward@arm.com>
19115             David Sherwood  <david.sherwood@arm.com>
19116
19117         * genmodes.c (mode_size_inline): Add an E_ prefix to mode names.
19118         (mode_nunits_inline): Likewise.
19119         (mode_inner_inline): Likewise.
19120         (mode_unit_size_inline): Likewise.
19121         (mode_unit_precision_inline): Likewise.
19122         (emit_insn_modes_h): Likewise.  Also emit a #define of the
19123         unprefixed name.
19124         (emit_mode_wider): Add an E_ prefix to mode names.
19125         (emit_mode_complex): Likewise.
19126         (emit_mode_inner): Likewise.
19127         (emit_mode_adjustments): Likewise.
19128         (emit_mode_int_n): Likewise.
19129         * config/aarch64/aarch64-builtins.c (v8qi_UP, v4hi_UP, v4hf_UP)
19130         (v2si_UP, v2sf_UP, v1df_UP, di_UP, df_UP, v16qi_UP, v8hi_UP, v8hf_UP)
19131         (v4si_UP, v4sf_UP, v2di_UP, v2df_UP, ti_UP, oi_UP, ci_UP, xi_UP)
19132         (si_UP, sf_UP, hi_UP, hf_UP, qi_UP): Likewise.
19133         (CRC32_BUILTIN, ENTRY): Likewise.
19134         * config/aarch64/aarch64.c (aarch64_push_regs): Likewise.
19135         (aarch64_pop_regs): Likewise.
19136         (aarch64_process_components): Likewise.
19137         * config/alpha/alpha.c (alpha_emit_conditional_move): Likewise.
19138         * config/arm/arm-builtins.c (v8qi_UP, v4hi_UP, v4hf_UP, v2si_UP)
19139         (v2sf_UP, di_UP, v16qi_UP, v8hi_UP, v8hf_UP, v4si_UP, v4sf_UP)
19140         (v2di_UP, ti_UP, ei_UP, oi_UP, hf_UP, si_UP, void_UP): Likewise.
19141         * config/arm/arm.c (arm_init_libfuncs): Likewise.
19142         * config/i386/i386-builtin-types.awk (ix86_builtin_type_vect_mode):
19143         Likewise.
19144         * config/i386/i386-builtin.def (pcmpestr): Likewise.
19145         (pcmpistr): Likewise.
19146         * config/microblaze/microblaze.c (double_memory_operand): Likewise.
19147         * config/mmix/mmix.c (mmix_output_condition): Likewise.
19148         * config/powerpcspe/powerpcspe.c (rs6000_init_hard_regno_mode_ok):
19149         Likewise.
19150         * config/rl78/rl78.c (mduc_regs): Likewise.
19151         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
19152         (htm_expand_builtin): Likewise.
19153         * config/sh/sh.h (REGISTER_NATURAL_MODE): Likewise.
19154         * config/sparc/sparc.c (emit_save_or_restore_regs): Likewise.
19155         * config/xtensa/xtensa.c (print_operand): Likewise.
19156         * expmed.h (NUM_MODE_PARTIAL_INT): Likewise.
19157         (NUM_MODE_VECTOR_INT): Likewise.
19158         * genoutput.c (null_operand): Likewise.
19159         (output_operand_data): Likewise.
19160         * genrecog.c (print_parameter_value): Likewise.
19161         * lra.c (debug_operand_data): Likewise.
19162
19163 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
19164
19165         * dwarf2out.c (scompare_loc_descriptor_wide)
19166         (scompare_loc_descriptor_narrow): New functions, split out from...
19167         (scompare_loc_descriptor): ...here.
19168         * expmed.c (emit_store_flag_int): New function, split out from...
19169         (emit_store_flag): ...here.
19170
19171 2017-08-30  Richard Biener  <rguenther@suse.de>
19172
19173         * dwarf2out.c (dwarf2out_finish): Remove setting AT_pubnames.
19174         (dwarf2out_early_finish): Move setting of AT_pubnames from
19175         early debug output to early finish.
19176
19177 2017-08-30  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
19178
19179         * gcc/config/msp430/msp430.h: Pass -mcode/data-region to the linker
19180         and -mdata-region to the assembler.
19181
19182 2017-08-30  Richard Biener  <rguenther@suse.de>
19183
19184         * dwarf2out.c (add_dwarf_attr): Check we don't add duplicate
19185         attributes.
19186         (gen_subprogram_die): Add DW_AT_object_pointer only early.
19187         (dwarf2out_early_global_decl): Only generate a DIE for the
19188         abstract origin if it doesn't already exist or is a declaration DIE.
19189         (resolve_addr): Do not add the linkage name twice when
19190         generating a stub DIE for the DW_TAG_GNU_call_site target.
19191
19192 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
19193
19194         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
19195         Use machine_mode rather than int for arg1_mode.
19196
19197 2017-08-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
19198
19199         PR target/82015
19200         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Insure
19201         that the second argument of the built-in functions to unpack
19202         128-bit scalar types to 64-bit values is 0 or 1.  Change to use a
19203         switch statement instead a lot of if statements.
19204         * config/rs6000/rs6000.md (unpack<mode>, FMOVE128_VSX iterator):
19205         Allow 64-bit values to be in Altivec registers as well as
19206         traditional floating point registers.
19207         (pack<mode>, FMOVE128_VSX iterator): Likewise.
19208
19209 2017-08-29  Alexander Monakov  <amonakov@ispras.ru>
19210
19211         * ira-costs.c (record_address_regs): Handle both operands of PLUS for
19212         MAX_REGS_PER_ADDRESS == 1.
19213
19214 2017-08-29  Uros Bizjak  <ubizjak@gmail.com>
19215
19216         * config/i386/i386.opt (flag_fentry): Do not init to -1.
19217         * config/i386/i386.c (ix86_option_override_internal): Simplify
19218         setting of opts->x_flag_entry.
19219
19220 2017-08-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19221             Jakub Jelinek  <jakub@redhat.com>
19222             Richard Biener  <rguenther@suse.de>
19223
19224         PR tree-optimization/81503
19225         * gimple-ssa-strength-reduction.c (replace_mult_candidate): Ensure
19226         folded constant fits in the target type; reorder tests for clarity.
19227
19228 2017-08-29  Martin Liska  <mliska@suse.cz>
19229
19230         * passes.def: Include pass_lower_switch.
19231         * stmt.c (dump_case_nodes): Remove and move to
19232         tree-switch-conversion.
19233         (case_values_threshold): Likewise.
19234         (expand_switch_as_decision_tree_p): Likewise.
19235         (emit_case_decision_tree): Likewise.
19236         (expand_case): Likewise.
19237         (balance_case_nodes): Likewise.
19238         (node_has_low_bound): Likewise.
19239         (node_has_high_bound): Likewise.
19240         (node_is_bounded): Likewise.
19241         (emit_case_nodes): Likewise.
19242         (struct simple_case_node): New struct.
19243         (add_case_node): Remove.
19244         (emit_case_dispatch_table): Use vector instead of case_list.
19245         (reset_out_edges_aux): Remove.
19246         (compute_cases_per_edge): Likewise.
19247         (expand_case): Build list of simple_case_node.
19248         (expand_sjlj_dispatch_table): Use it.
19249         * tree-switch-conversion.c (struct case_node): Moved from
19250         stmt.c and adjusted.
19251         (emit_case_nodes): Likewise.
19252         (node_has_low_bound): Likewise.
19253         (node_has_high_bound): Likewise.
19254         (node_is_bounded): Likewise.
19255         (case_values_threshold): Likewise.
19256         (reset_out_edges_aux): Likewise.
19257         (compute_cases_per_edge): Likewise.
19258         (add_case_node): Likewise.
19259         (dump_case_nodes): Likewise.
19260         (balance_case_nodes): Likewise.
19261         (expand_switch_as_decision_tree_p): Likewise.
19262         (emit_jump): Likewise.
19263         (emit_case_decision_tree): Likewise.
19264         (try_switch_expansion): Likewise.
19265         (do_jump_if_equal): Likewise.
19266         (emit_cmp_and_jump_insns): Likewise.
19267         (fix_phi_operands_for_edge): New function.
19268         (record_phi_operand_mapping): Likewise.
19269         (class pass_lower_switch): New pass.
19270         (pass_lower_switch::execute): New function.
19271         (make_pass_lower_switch): Likewise.
19272         (conditional_probability):
19273         * timevar.def: Add TV_TREE_SWITCH_LOWERING.
19274         * tree-pass.h: Add make_pass_lower_switch.
19275
19276 2017-08-29  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
19277
19278         PR target/80993
19279         * gcc/config/msp430/msp430.c (msp430_attr): Mark interrupt
19280         handlers as used.
19281
19282 2017-08-29  Richard Biener  <rguenther@suse.de>
19283
19284         * dwarf2out.c (add_dwarf_attr): When checking is enabled verify
19285         we do not add a DW_AT_inline attribute twice.
19286         (gen_subprogram_die): Remove code setting DW_AT_inline on
19287         DECL_ABSTRACT_P nodes.
19288
19289 2017-08-29  Richard Sandiford  <richard.sandiford@linaro.org>
19290
19291         * gimplify.c (gimplify_call_expr): Copy the nothrow flag to
19292         calls to internal functions.
19293         (gimplify_modify_expr): Likewise.
19294         * tree-call-cdce.c (use_internal_fn): Likewise.
19295         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
19296         (convert_to_divmod): Set the nothrow flag.
19297         * tree-if-conv.c (predicate_mem_writes):  Likewise.
19298         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
19299         (vectorizable_call): Likewise.
19300         (vectorizable_store): Likewise.
19301         (vectorizable_load): Likewise.
19302         * tree-vect-patterns.c (vect_recog_pow_pattern): Likewise.
19303         (vect_recog_mask_conversion_pattern): Likewise.
19304
19305 2017-08-29  Martin Liska  <mliska@suse.cz>
19306
19307         PR other/39851
19308         * gcc.c (driver_handle_option): Add new argument.
19309         * opts-common.c (handle_option): Pass
19310         target_option_override_hook.
19311         * opts-global.c (lang_handle_option): Add new option.
19312         (set_default_handlers):  Add new argument.
19313         (decode_options): Likewise.
19314         * opts.c (target_handle_option): Likewise.
19315         (common_handle_option): Call target_option_override_hook.
19316         * opts.h (struct cl_option_handler_func): Add hook for
19317         target option override.
19318         (struct cl_option_handlers): Likewise.
19319         (set_default_handlers): Add new argument.
19320         (decode_options): Likewise.
19321         (common_handle_option): Likewise.
19322         (target_handle_option): Likewise.
19323         * toplev.c (toplev::main): Pass targetm.target_option.override
19324         hook.
19325
19326 2017-08-29  Richard Biener  <rguenther@suse.de>
19327         Dominik Infuehr <dominik.infuehr@theobroma-systems.com>
19328
19329         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Properly confine
19330         life to the active subtree.
19331
19332 2017-08-28  Jeff Law  <law@redhat.com>
19333
19334         * tree-ssa-dom.c (edge_info::record_simple_equiv): Call
19335         derive_equivalences.
19336         (derive_equivalences_from_bit_ior, record_temporary_equivalences):
19337         Code moved into....
19338         (edge_info::derive_equivalences): New private member function
19339
19340         * tree-ssa-dom.c (class edge_info): Changed from a struct
19341         to a class.  Add ctor/dtor, methods and data members.
19342         (edge_info::edge_info): Renamed from allocate_edge_info.
19343         Initialize additional members.
19344         (edge_info::~edge_info): New.
19345         (free_dom_edge_info): Delete the edge info.
19346         (record_edge_info): Use new class & associated member functions.
19347         Tighten forms for testing for edge equivalences.
19348         (record_temporary_equivalences): Iterate over the simple
19349         equivalences rather than assuming there's only one per edge.
19350         (cprop_into_successor_phis): Iterate over the simple
19351         equivalences rather than assuming there's only one per edge.
19352         (optimize_stmt): Use operand_equal_p rather than pointer
19353         equality for mini-DSE code.
19354
19355 2017-08-28  Nathan Sidwell  <nathan@acm.org>
19356
19357         * gcc.c (execute): Fold SIGPIPE handling into switch
19358         statement.  Adjust internal error message.
19359
19360 2017-08-28  Richard Biener  <rguenther@suse.de>
19361
19362         PR debug/81993
19363         * dwarf2out.c (gen_remaining_tmpl_value_param_die_attributes):
19364         Do nothing for removed DIEs.
19365
19366 2017-08-28  Richard Biener  <rguenther@suse.de>
19367
19368         PR tree-optimization/81977
19369         * tree-ssa-sccvn.c (vn_reference_lookup_3): Fix look through
19370         memcpy.
19371
19372 2017-08-28  Alexander Monakov  <amonakov@ispras.ru>
19373
19374         PR target/80640
19375         * doc/md.texi (mem_thread_fence): Remove mention of mode.  Rewrite.
19376         * optabs.c (expand_mem_thread_fence): Emit a compiler barrier when
19377         using targetm.gen_mem_thread_fence.
19378
19379 2017-08-27  Uros Bizjak  <ubizjak@gmail.com>
19380
19381         PR target/81995
19382         * config/i386/i386.md (*<btsc><mode>): Change operand 2
19383         predicate to register_operand.  Reorder operands.
19384         (*btr<mode>): Ditto.
19385         (*<btsc><mode>_mask): Change operand 3 predicate to register_operand.
19386         (*btr<mode>_mask): Ditto.
19387
19388 2017-08-25  Steven Munroe  <munroesj@gcc.gnu.org>
19389
19390         * config.gcc (powerpc*-*-*): Add xmmintrin.h and mm_malloc.h.
19391         * config/rs6000/xmmintrin.h: New file.
19392         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include xmmintrin.h.
19393
19394 2017-08-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19395
19396         PR target/81504
19397         * config/rs6000/rs6000-p8swap.c (find_alignment_op): Add reference
19398         parameter and_insn and return it.
19399         (recombine_lvx_pattern): Insert a copy to ensure availability of
19400         the base register of the copied masking operation at the point of
19401         the instruction replacement.
19402         (recombine_stvx_pattern): Likewise.
19403
19404 2017-08-25  Michael Meissner  <meissner@linux.vnet.ibm.com>
19405
19406         * config/rs6000/rs6000.opt (-mpower9-dform-scalar): Delete
19407         undocumented switches.
19408         (-mpower9-dform-vector): Likewise.
19409         (-mpower9-dform): Likewise.
19410         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
19411         comments to delete references to -mpower9-dform* switches.
19412         * config/rs6000/predicates.md (vsx_quad_dform_memory_operand):
19413         Delete reference to -mpower9-dform* switches, test for
19414         -mpower9-vector instead.
19415         * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Likewise.
19416         (OTHER_P9_VECTOR_MASKS): Likewise.
19417         (POWERPC_MASKS): Likewise.
19418         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Change
19419         tests against -mpower9-dform* to -mpower9-vector.  Delete code
19420         that checked for -mpower9-dform* consistancy with other options.
19421         Add test for -mpower9-misc to enable other power9 switches.
19422         (rs6000_init_hard_regno_mode_ok): Likewise.
19423         (rs6000_option_override_internal): Likewise.
19424         (rs6000_emit_prologue): Likewise.
19425         (rs6000_emit_epilogue): Likewise.
19426         (rs6000_opt_masks): Delete -mpower9-dform-{scalar,vector}.
19427         (rs6000_disable_incompatiable_switches): Delete -mpower9-dform.
19428         (emit_fusion_p9_load): Change tests for -mpower9-dform-scalar
19429         -mpower9-vector.
19430         (emit_fusion_p9_store): Likewise.
19431         * config/rs6000/rs6000.h (TARGET_P9_DFORM_SCALAR): Delete
19432         resetting these macros if the assembler does not support ISA 3.0
19433         instructions.
19434         (TARGET_P9_DFORM_VECTOR): Likewise.
19435         * config/rs6000/rs6000.md (peepholes to optimize altivec memory):
19436         Change to use -mpower9-vector instead of -mpower9-dform-scalar.
19437
19438 2017-08-25  Alan Modra  <amodra@gmail.com>
19439
19440         PR rtl-optimization/81747
19441         * cse.c (cse_extended_basic_block): Don't attempt to record
19442         equivalences for degenerate conditional branches that branch
19443         to their fall-through.
19444
19445 2017-08-24  Martin Sebor  <msebor@redhat.com>
19446
19447         PR middle-end/81908
19448         * gimple-fold.c (size_must_be_zero_p): New function.
19449         (gimple_fold_builtin_memory_op): Call it.
19450
19451 2017-08-24  Steven Munroe  <munroesj@gcc.gnu.org>
19452
19453         * config/rs6000/mm_malloc.h: New file.
19454
19455 2017-08-24  Bin Cheng  <bin.cheng@arm.com>
19456
19457         PR tree-optimization/81913
19458         * tree-ssa-loop-niter.c (number_of_iterations_cond): Skip niter
19459         analysis when either IVs in condition can wrap.
19460
19461 2017-08-24  Uros Bizjak  <ubizjak@gmail.com>
19462
19463         * dwarf2out.c (MAX_ARTIFICIAL_LABEL_BYTES): Increase to 40.
19464         * dwarf2cfi.c (MAX_ARTIFICIAL_LABEL_BYTES): Remove.
19465
19466 2017-08-24  Richard Biener  <rguenther@suse.de>
19467
19468         PR target/81921
19469         * targhooks.c (default_target_can_inline_p): Properly
19470         use target_option_default_node when no DECL_FUNCTION_SPECIFIC_TARGET
19471         is present and always compare.
19472         * config/i386/i386.c (ix86_valid_target_attribute_tree): Do not
19473         infer -mfpmath=sse from TARGET_SSE_P.
19474         (ix86_can_inline_p): Properly use target_option_default_node when
19475         no DECL_FUNCTION_SPECIFIC_TARGET is present and always compare.
19476
19477 2017-08-24  Richard Biener  <rguenther@suse.de>
19478
19479         PR debug/81936
19480         * dwarf2out.c (output_die): Handle flag_generate_offload like
19481         flag_generate_lto.
19482         (output_comp_unit): Likewise.
19483         (gen_array_type_die): Likewise.
19484         (dwarf2out_early_finish): Likewise.
19485         (note_variable_value_in_expr): Likewise.
19486         (dwarf2out_finish): Likewise.  Adjust assert.
19487         * cgraphunit.c (symbol_table::compile): Move setting of
19488         flag_generate_offload earlier ...
19489         (symbol_table::finalize_compilation_unit): ... here, before
19490         early debug finalization.
19491
19492 2017-08-24  Richard Biener  <rguenther@suse.de>
19493
19494         * config/i386/i386.c: Include symbol-summary.h, ipa-prop.h
19495         and ipa-fnsummary.h.
19496         (ix86_can_inline_p): When ix86_fpmath flags do not match
19497         check whether the callee uses FP math at all.
19498
19499 2017-08-24  Aldy Hernandez  <aldyh@redhat.com>
19500
19501         PR middle-end/81931
19502         * tree-ssanames.c (get_nonzero_bits): Use element_precision
19503         instead of TYPE_PRECISION.
19504
19505 2017-08-24  Richard Sandiford  <richard.sandiford@linaro.org>
19506             Alan Hayward  <alan.hayward@arm.com>
19507             David Sherwood  <david.sherwood@arm.com>
19508
19509         * combine.c (make_extraction): Use subreg_offset_from_lsb.
19510
19511 2017-08-23  Daniel Santos  <daniel.santos@pobox.com>
19512
19513         * config/i386/i386.h (ix86_frame::stack_realign_allocate_offset):
19514         Remove field.
19515         (ix86_frame::stack_realign_allocate): New field.
19516         (struct machine_frame_state): Modify comments.
19517         (machine_frame_state::sp_realigned_fp_end): New field.
19518         * config/i386/i386.c (ix86_compute_frame_layout): Rework stack frame
19519         layout calculation.
19520         (sp_valid_at): Add assertion to assure no attempt to access invalid
19521         offset of a realigned stack.
19522         (fp_valid_at): Likewise.
19523         (choose_baseaddr): Modify comments.
19524         (ix86_emit_outlined_ms2sysv_save): Adjust to changes in
19525         ix86_expand_prologue.
19526         (ix86_expand_prologue): Modify stack realignment and allocation.
19527         (ix86_expand_epilogue): Modify comments.
19528         * doc/sourcebuild.texi: Add documentation for target selectors avx2,
19529         avx2_runtime, avx512f, and avx512f_runtime.
19530
19531 2017-08-23  Uros Bizjak  <ubizjak@gmail.com>
19532
19533         * config/i386/i386.opt: Remove unneeded Init(0) initializations.
19534         (mstackrealign): Do not init to -1.
19535         * config/i386/i386.c (ix86_option_override_internal):
19536         Check opts_set, not opts when setting default value of
19537         opts->x_ix86_force_align_arg_pointer.
19538
19539 2017-08-23  Richard Biener  <rguenther@suse.de>
19540
19541         * function.c (fndecl_name): Use verbosity 1 (no arguments) for
19542         lang_hooks.decl_printable_name.
19543         * print-rtl-function.c (print_rtx_function): Likewise.
19544         * tree-pretty-print.c (dump_function_header): Likewise.
19545
19546 2017-08-23  Richard Biener  <rguenther@suse.de>
19547
19548         PR lto/81940
19549         * dwarf2out.c (dwarf2out_abstract_function): Handle LTO with
19550         -g0 at compile-time.
19551
19552 2017-08-23  Tamar Christina  <tamar.christina@arm.com>
19553
19554         PR middle-end/19706
19555         * doc/sourcebuild.texi (Other hardware attributes):
19556         Document xorsign.
19557
19558 2017-08-23  Tamar Christina  <tamar.christina@arm.com>
19559
19560         PR middle-end/19706
19561         * tree-ssa-math-opts.c (convert_expand_mult_copysign):
19562         Fix single-use check.
19563
19564 2017-08-23  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19565
19566         * gcc.c (execute): Only test for SIGKILL and SIGQUIT if available.
19567
19568 2017-08-22  Daniel Santos  <daniel.santos@pobox.com>
19569
19570         * doc/install.texi: Modify to add more details on running selected
19571         tests.
19572
19573 2017-08-22  Daniel Santos  <daniel.santos@pobox.com>
19574
19575         * config/i386/i386.c (ix86_option_override_internal): Error when -mx32
19576         is combined with -mabi=ms.
19577         (ix86_function_type_abi): Limit errors for mixing -mx32 with attribute
19578         ms_abi.
19579
19580 2017-08-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19581
19582         PR tree-optimization/81488
19583         * gimple-ssa-strength-reduction (struct slsr_cand_d): Add visited
19584         and cached_basis fields.
19585         (MAX_SPREAD): New constant.
19586         (alloc_cand_and_find_basis): Initialize new fields.
19587         (clear_visited): New function.
19588         (create_phi_basis_1): Rename from create_phi_basis, set visited
19589         and cached_basis fields.
19590         (create_phi_basis): New wrapper function.
19591         (phi_add_costs_1): Rename from phi_add_costs, add spread
19592         parameter, set visited field, short-circuit when limits reached.
19593         (phi_add_costs): New wrapper function.
19594         (record_phi_increments_1): Rename from record_phi_increments, set
19595         visited field.
19596         (record_phi_increments): New wrapper function.
19597         (phi_incr_cost_1): Rename from phi_incr_cost, set visited field.
19598         (phi_incr_cost): New wrapper function.
19599         (all_phi_incrs_profitable_1): Rename from
19600         all_phi_incrs_profitable, set visited field.
19601         (all_phi_incrs_profitable): New wrapper function.
19602
19603 2017-08-22  Richard Sandiford  <richard.sandiford@linaro.org>
19604             Alan Hayward  <alan.hayward@arm.com>
19605             David Sherwood  <david.sherwood@arm.com>
19606
19607         * rtl.h (paradoxical_subreg_p): Define inline, and add a version
19608         that takes the outer and inner modes.
19609         * doc/rtl.texi: Use paradoxical_subreg_p instead of a GET_MODE_SIZE
19610         comparison as the canonical test for a paradoxical subreg.
19611         * combine.c (simplify_set): Use paradoxical_subreg_p.
19612         (make_extraction): Likewise.
19613         (force_to_mode): Likewise.
19614         (rtx_equal_for_field_assignment_p): Likewise.
19615         (gen_lowpart_for_combine): Likewise.
19616         (simplify_comparison): Likewise.
19617         * cse.c (equiv_constant): Likewise.
19618         * expmed.c (store_bit_field_1): Likewise.
19619         * final.c (alter_subreg): Likewise.
19620         * fwprop.c (propagate_rtx): Likewise.
19621         (forward_propagate_subreg): Likewise.
19622         * ira-conflicts.c (ira_build_conflicts): Likewise.
19623         * lower-subreg.c (simplify_gen_subreg_concatn): Likewise.
19624         * lra-constraints.c (curr_insn_transform): Likewise.
19625         (split_reg): Likewise.
19626         * lra-eliminations.c (move_plus_up): Likewise.
19627         (lra_eliminate_regs_1): Likewise.
19628         * recog.c (general_operand): Likewise.
19629         * ree.c (combine_reaching_defs): Likewise.
19630         * reload.c (push_reload): Likewise.
19631         (find_reloads): Likewise.
19632         * reload1.c (elimination_effects): Likewise.
19633         (compute_reload_subreg_offset): Likewise.
19634         (choose_reload_regs): Likewise.
19635         * rtlanal.c (subreg_lsb_1): Likewise.
19636         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
19637         (simplify_subreg): Likewise.
19638         * var-tracking.c (track_loc_p): Likewise.
19639         * emit-rtl.c (byte_lowpart_offset): Likewise.
19640         (paradoxical_subreg_p): Delete out-of-line definition.
19641
19642 2017-08-22  Jeff Law  <law@redhat.com>
19643
19644         PR tree-optimization/81741
19645         PR tree-optimization/71947
19646         * tree-ssa-dom.c: Include tree-inline.h.
19647         (record_temporary_equivalences): Only record SSA_NAME = SSA_NAME
19648         equivalences if one is more expensive to compute than the other.
19649         * tree-ssa-scopedtables.h (class const_or_copies): Make
19650         record_const_or_copy_raw method private.
19651         (class avail_exprs_stack): New method simplify_binary_operation.
19652         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr): Call
19653         avail_exprs_stack::simplify_binary_operation as needed.
19654         (avail_exprs_stack::simplify_binary_operation): New function.
19655
19656 2017-08-22  Sebastian Huber  <sebastian.huber@embedded-brains.de>
19657
19658         * config.gcc (powerpc-*-rtems*): Add rs6000/linux64.opt.
19659         * config/rs6000/rtems.h (ASM_PREFERRED_EH_DATA_FORMAT): New define.
19660         (DOT_SYMBOLS): Likewise.
19661         (MINIMAL_TOC_SECTION_ASM_OP): Likewise.
19662         (RELOCATABLE_NEEDS_FIXUP): Likewise.
19663         (RS6000_ABI_NAME): Likewise.
19664         (TARGET_CMODEL): Likewise.
19665         (TOC_SECTION_ASM_OP): Likewise.
19666         (SET_CMODEL): New macro.
19667         (SUBSUBTARGET_OVERRIDE_OPTIONS): Evaluate cmodel options.
19668
19669 2017-08-22  Richard Biener  <rguenther@suse.de>
19670
19671         * tree-inline.c (remap_type_1): Change asserts on TYPE_SIZE[_UNIT]
19672         to allow for free-lang-data replacements similar to verify_type_variant.
19673
19674 2017-08-22  Richard Sandiford  <richard.sandiford@linaro.org>
19675             Alan Hayward  <alan.hayward@arm.com>
19676             David Sherwood  <david.sherwood@arm.com>
19677
19678         * config/aarch64/aarch64.md (casesi): Use DImode rather than
19679         VOIDmode for the LABEL_REF.
19680
19681 2017-08-22  Richard Biener  <rguenther@suse.de>
19682
19683         * tree-cfg.c (gimple_split_edge): Avoid reallocating target PHI nodes.
19684
19685 2017-08-22  Richard Biener  <rguenther@suse.de>
19686
19687         * common.opt (feliminate-dwarf2-dups): Ignore.
19688         * doc/invoke.texi (feliminate-dwarf2-dups): Remove documentation.
19689         * dwarf2out.c (push_new_compile_unit, pop_compile_unit,
19690         same_die_p_wrap, compute_section_prefix,
19691         is_symbol_die, assign_symbol_names, break_out_includes): Remove.
19692         (comdat_symbol_id, comdat_symbol_number): Likewise.
19693         (cu_hash_table_entry, cu_hash_table_entry_hasher, cu_hash_type):
19694         Likewise.
19695         (check_duplicate_cu, record_comdat_symbol_number): Likewise.
19696         (output_die): Mark unreachable path unreachable.
19697         (dwarf2out_start_source_file): Do not create DW_TAG_GNU_BINCL.
19698         (dwarf2out_end_source_file): Do not create DW_TAG_GNU_EINCL.
19699         (dwarf2out_init): Remove code handling flag_eliminate_dwarf2_dups.
19700         (dwarf2out_early_finish): Likewise.
19701
19702 2017-08-22  Aldy Hernandez  <aldyh@redhat.com>
19703
19704         * wide-int.h (hwi_with_prec::hwi_with_prec): Sign extend.
19705
19706 2017-08-22  Georg-Johann Lay  <avr@gjlay.de>
19707
19708         PR target/81910
19709         * config/avr/avr.c (avr_handle_addr_attribute): Early return if
19710         not VAR_P. Filter attribute warnings with OPT_Wattributes.
19711         (avr_attribute_table) <io, io_low, address>: Initialize
19712         .decl_required with true.
19713
19714 2017-08-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
19715
19716         * config/rs6000/rs6000-cpus.def (-mvsx-scalar-float): Delete
19717         undocumented debugging options.
19718         (-mvsx-scalar-double): Likewise.
19719         (-mallow-df-permute): Likewise.
19720         (-mvectorize-builtins): Likewise.
19721         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
19722         (rs6000_builtin_vectorized_function): Likewise.
19723         (rs6000_builtin_md_vectorized_function): Likewise.
19724         (rs6000_opt_vars): Likewise.
19725
19726 2017-08-21  Uros Bizjak  <ubizjak@gmail.com>
19727
19728         PR target/46091
19729         * config/i386/i386.md (*btsq_imm): Rename from *btsq.
19730         (*btrq_imm): Rename from *btrq.
19731         (*btcq_imm): Rename from *btcq.
19732         (btsc): New code attribute.
19733         (*<btsc><mode>): New insn pattern.
19734         (*btr<mode>): Ditto.
19735         (*<btsc><mode>_mask): New insn_and_split pattern.
19736         (*btr<mode>_mask): Ditto.
19737
19738 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
19739             Alan Hayward  <alan.hayward@arm.com>
19740             David Sherwood  <david.sherwood@arm.com>
19741
19742         * function.c (pad_below): Simplify padding calculation.
19743
19744 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
19745             Alan Hayward  <alan.hayward@arm.com>
19746             David Sherwood  <david.sherwood@arm.com>
19747
19748         * target.def (function_prologue): Remove frame size argument.
19749         (function_epilogue): Likewise.
19750         * doc/tm.texi: Regenerate.
19751         * final.c (final_start_function): Update call to function_prologue.
19752         (final_end_function): Update call to function_epilogue.
19753         (default_function_pro_epilogue): Remove frame size argument.
19754         * output.h (default_function_pro_epilogue): Likewise.
19755         * config/arm/arm.c (arm_output_function_epilogue): Likewise.
19756         (arm_output_function_prologue): Likewise.
19757         * config/frv/frv.c (frv_function_prologue): Likewise.
19758         (frv_function_epilogue): Likewise.
19759         * config/i386/i386.c (ix86_output_function_epilogue): Likewise.
19760         * config/ia64/ia64.c (ia64_output_function_prologue): Likewise.
19761         (ia64_output_function_epilogue): Likewise.
19762         * config/m32r/m32r.c (m32r_output_function_prologue): Likewise.
19763         (m32r_output_function_epilogue): Likewise.
19764         * config/microblaze/microblaze.c (microblaze_function_prologue)
19765         (microblaze_function_epilogue): Likewise.
19766         * config/mips/mips.c (mips_output_function_prologue): Likewise.
19767         (mips_output_function_epilogue): Likewise.
19768         * config/mmix/mmix.c (mmix_target_asm_function_prologue): Likewise.
19769         (mmix_target_asm_function_epilogue): Likewise.
19770         * config/msp430/msp430.c (msp430_start_function): Likewise.
19771         * config/nds32/nds32.c (nds32_asm_function_prologue): Likewise.
19772         (nds32_asm_function_epilogue): Likewise.
19773         * config/nios2/nios2.c (nios2_asm_function_prologue): Likewise.
19774         * config/pa/pa.c (pa_output_function_prologue): Likewise.
19775         (pa_output_function_epilogue): Likewise.
19776         * config/powerpcspe/powerpcspe.c (rs6000_output_function_prologue)
19777         (rs6000_output_function_epilogue): Likewise.
19778         * config/rl78/rl78.c (rl78_start_function): Likewise.
19779         * config/rs6000/rs6000.c (rs6000_output_function_prologue): Likewise.
19780         (rs6000_output_function_epilogue): Likewise.
19781         * config/rx/rx.c (rx_output_function_prologue): Likewise.
19782         * config/sh/sh.c (sh_output_function_epilogue): Likewise.
19783         * config/sparc/sparc.c (sparc_asm_function_prologue): Likewise.
19784         (sparc_asm_function_epilogue): Likewise.
19785
19786 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
19787
19788         * tree.h (type_has_mode_precision_p): New function.
19789         * convert.c (convert_to_integer_1): Use it.
19790         * expr.c (expand_expr_real_2): Likewise.
19791         (expand_expr_real_1): Likewise.
19792         * fold-const.c (fold_single_bit_test_into_sign_test): Likewise.
19793         * match.pd: Likewise.
19794         * tree-ssa-forwprop.c (simplify_rotate): Likewise.
19795         * tree-ssa-math-opts.c (convert_mult_to_fma): Likewise.
19796         * tree-tailcall.c (process_assignment): Likewise.
19797         * tree-vect-loop.c (vectorizable_reduction): Likewise.
19798         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern)
19799         (vect_recog_mult_pattern, vect_recog_divmod_pattern): Likewise.
19800         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
19801         (vectorizable_assignment): Likewise.
19802         (vectorizable_shift): Likewise.
19803         (vectorizable_operation): Likewise.
19804         * tree-vrp.c (register_edge_assert_for_2): Likewise.
19805
19806 2017-08-21  Wilco Dijkstra  <wdijkstr@arm.com>
19807
19808         * match.pd: Add pow (C, x) simplification.
19809
19810 2017-08-21  Richard Biener  <rguenther@suse.de>
19811
19812         PR tree-optimization/81900
19813         * tree-ssa-pre.c (compute_antic_aux): Properly compute changed
19814         for blocks with abnormal predecessors.
19815         (compute_antic): Do not set visited flag prematurely.
19816
19817 2017-08-21  Georg-Johann Lay  <avr@gjlay.de>
19818
19819         PR target/79883
19820         * config/avr/avr.c (avr_set_current_function): Typo in diagnostic.
19821
19822 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
19823
19824         * stor-layout.h (vector_type_mode): Move to...
19825         * tree.h (vector_type_mode): ...here.
19826         * stor-layout.c (vector_type_mode): Move to...
19827         * tree.c (vector_type_mode): ...here.  Include rtl.h and regs.h.
19828
19829 2017-08-21  Richard Biener  <rguenther@suse.de>
19830
19831         * debug.h (struct gcc_debug_hooks): Add die_ref_for_decl and
19832         register_external_die hooks.
19833         (debug_false_tree_charstarstar_uhwistar): Declare.
19834         (debug_nothing_tree_charstar_uhwi): Likewise.
19835         * debug.c (do_nothing_debug_hooks): Adjust.
19836         (debug_false_tree_charstarstar_uhwistar): New do nothing.
19837         (debug_nothing_tree_charstar_uhwi): Likewise.
19838         * dbxout.c (dbx_debug_hooks): Adjust.
19839         (xcoff_debug_hooks): Likewise.
19840         * sdbout.c (sdb_debug_hooks): Likewise.
19841         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
19842         * dwarf2out.c (macinfo_label_base): New global.
19843         (dwarf2out_register_external_die): New function for the
19844         register_external_die hook.
19845         (dwarf2out_die_ref_for_decl): Likewise for die_ref_for_decl.
19846         (dwarf2_debug_hooks): Use them.
19847         (dwarf2_lineno_debug_hooks): Adjust.
19848         (struct die_struct): Add with_offset flag.
19849         (DEBUG_LTO_DWO_INFO_SECTION, DEBUG_LTO_INFO_SECTION,
19850         DEBUG_LTO_DWO_ABBREV_SECTION, DEBUG_LTO_ABBREV_SECTION,
19851         DEBUG_LTO_DWO_MACINFO_SECTION, DEBUG_LTO_MACINFO_SECTION,
19852         DEBUG_LTO_DWO_MACRO_SECTION, DEBUG_LTO_MACRO_SECTION,
19853         DEBUG_LTO_LINE_SECTION, DEBUG_LTO_DWO_STR_OFFSETS_SECTION,
19854         DEBUG_LTO_STR_DWO_SECTION, DEBUG_STR_LTO_SECTION): New macros
19855         defining section names for the early LTO debug variants.
19856         (reset_indirect_string): New helper.
19857         (add_AT_external_die_ref): Helper for dwarf2out_register_external_die.
19858         (print_dw_val): Add support for offsetted symbol references.
19859         (get_ultimate_context): Split out from is_cxx.
19860         (is_cxx): Use get_ultimate_context.
19861         (is_fortran): Add decl overload.
19862         (compute_comp_unit_symbol): Split out worker from
19863         compute_section_prefix.
19864         (compute_section_prefix): Call compute_comp_unit_symbol and
19865         set comdat_type_p here.
19866         (output_die): Skip DIE symbol output for the LTO added one.
19867         Handle DIE symbol references with offset.
19868         (output_comp_unit): Guard section name mangling properly.
19869         For LTO debug sections emit a symbol at the section beginning
19870         which we use to refer to its DIEs.
19871         (add_abstract_origin_attribute): For DIEs registered via
19872         dwarf2out_register_external_die directly refer to the early
19873         DIE rather than indirectly through the shadow one we created.
19874         Remove obsolete call to dwarf2out_abstract_function for
19875         non-function/block origins.
19876         (gen_array_type_die): When generating early LTO debug do
19877         not emit DW_AT_string_length.
19878         (gen_formal_parameter_die): Do not re-create DIEs for PARM_DECLs
19879         late when in LTO.  As suggested place a gcc_unreachable for
19880         the DECL_ABSTRACT_P case.
19881         (gen_subprogram_die): Avoid another specification DIE
19882         for early built declarations/definitions for the late LTO case.
19883         (gen_variable_die): Add type references for late duplicated VLA dies
19884         when in late LTO.
19885         (gen_inlined_subroutine_die): Do not call dwarf2out_abstract_function,
19886         we have the abstract instance already.
19887         (process_scope_var): Adjust decl DIE contexts in LTO which
19888         first puts them in limbo.
19889         (gen_decl_die): Do not generate type DIEs late apart from
19890         types for VLAs or for decls we do not yet have a DIE.  Do not
19891         call dwarf2out_abstract_function late.
19892         (dwarf2out_early_global_decl): Make sure to create DIEs
19893         for abstract instances of a decl first.
19894         (dwarf2out_late_global_decl): Adjust comment.
19895         (output_macinfo_op): With multiple macro sections use
19896         macinfo_label_base to distinguish labels.
19897         (output_macinfo): Likewise.  Update macinfo_label_base.
19898         Pass in the line info label.
19899         (note_variable_value_in_expr): When generating LTO resolve
19900         all variable values here by generating DIEs as needed.
19901         (init_sections_and_labels): Add early LTO debug flag parameter
19902         and generate different sections and names if set.  Add generation
19903         counter for the labels so we can have multiple of them.
19904         (reset_dies): Helper to allow DIEs to be output multiple times.
19905         (dwarf2out_finish): When outputting DIEs to the fat part of an
19906         LTO object first reset DIEs.
19907         (dwarf2out_early_finish): Output early DIEs when generating LTO.
19908         (modified_type_die): Check for decl_ultimate_origin being self
19909         before recursing.
19910         (gen_type_die_with_usage): Likewise.
19911         (gen_typedef_die): Allow decl_ultimate_origin being self.
19912         (set_decl_abstract_flags): Remove.
19913         (set_block_abstract_flags): Likewise.
19914         (dwarf2out_abstract_function): Treat the early generated DIEs
19915         as the abstract copy and only add DW_AT_inline and
19916         DW_AT_artificial here and call set_decl_origin_self.
19917         If the DIE has an abstract origin don't do anything.
19918         * tree.c (free_lang_data): Build a dummy TRANSLATION_UNIT_DECL
19919         if we have none yet (Go fails to build one, PR78628).
19920         (variably_modified_type_p): Prevent endless recursion for Ada
19921         cyclic pointer types.
19922         * lto-streamer-in.c: Include debug.h.
19923         (dref_queue): New global.
19924         (lto_read_tree_1): Stream in DIE references.
19925         (lto_input_tree): Register DIE references.
19926         (input_function): Stream DECL_DEBUG_ARGS.
19927         * lto-streamer-out.c: Include debug.h.
19928         (lto_write_tree_1): Output DIE references.
19929         (DFS::DFS_write_tree_body): Follow DECL_ABSTRACT_ORIGIN.
19930         Force a TRANSLATION_UNIT_DECL DECL_CONTEXT for file-scope decls.
19931         (output_function): Stream DECL_DEBUG_ARGS.
19932         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
19933         Stream DECL_ABSTRACT_ORIGIN.
19934         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
19935         (write_ts_decl_minimal_tree_pointers): Force a TRANSLATION_UNIT_DECL
19936         DECL_CONTEXT for file-scope decls.
19937         * lto-streamer.h (struct dref_entry): Declare.
19938         (dref_queue): Likewise.
19939         * cfgexpand.c (pass_expand::execute): Do not call the
19940         outlining_inline_function hook here.
19941         * lto-wrapper.c (debug_obj): New global.
19942         (tool_cleanup): Unlink it if required.
19943         (debug_objcopy): New function.
19944         (run_gcc): Handle early debug sections in the IL files by
19945         extracting them to separate files, partially linkin them and
19946         feeding the result back as result to the linker.
19947         * config/darwin.h (DEBUG_LTO_INFO_SECTION, DEBUG_LTO_ABBREV_SECTION,
19948         DEBUG_LTO_MACINFO_SECTION, DEBUG_LTO_LINE_SECTION,
19949         DEBUG_STR_LTO_SECTION, DEBUG_LTO_MACRO_SECTION): Put early debug
19950         sections into a separate segment.
19951         * config/darwin.c (darwin_asm_named_section): Handle __GNU_DWARF_LTO
19952         segments.
19953         (darwin_asm_dwarf_section): Likewise.
19954         (darwin_asm_output_dwarf_offset): Likewise.
19955         * config/i386/i386.c (make_resolver_func): Set DECL_IGNORED_P.
19956
19957 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
19958             Alan Hayward  <alan.hayward@arm.com>
19959             David Sherwood  <david.sherwood@arm.com>
19960
19961         * read-md.h (md_reader::record_potential_iterator_use): Replace
19962         pointer argument with an rtx and an index.
19963         * read-rtl.c (iterator_group::apply_iterator): Likewise.
19964         (apply_mode_iterator): Likewise.
19965         (apply_code_iterator): Likewise.
19966         (apply_int_iterator): Likewise.
19967         (apply_subst_iterator): Likewise.
19968         (record_iterator_use): Likewise.
19969         (record_attribute_use): Likewise.
19970         (md_reader::record_potential_iterator_use): Likewise.  Update calls
19971         to record_iterator_use and apply_iterator.
19972         (iterator_use): Replace ptr with x and index.
19973         (attribute_use): Likewise.
19974         (apply_attribute_uses): Update calls to apply_iterator.
19975         (apply_iterators): Likewise.  Update initialization of iterator_use.
19976         (rtx_reader::read_rtx_code): Update calls to record_iterator_use
19977         and record_potential_iterator_use.
19978         (rtx_reader::read_rtx_operand): Likewise.
19979
19980 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
19981             Alan Hayward  <alan.hayward@arm.com>
19982             David Sherwood  <david.sherwood@arm.com>
19983
19984         * varasm.c (const_rtx_hash_1): Don't hash in the mode of a
19985         CONST_WIDE_INT.
19986
19987 2017-08-21  Richard Biener  <rguenther@suse.de>
19988
19989         PR middle-end/81884
19990         * tree-ssa-alias.c (stmt_kills_ref_p): Handle array accesses
19991         at struct end conservatively when comparing common bases.
19992
19993 2017-08-21  Richard Biener  <rguenther@suse.de>
19994
19995         * tree-ssa-loop-im.c (struct lim_aux_data): Add ref index member.
19996         (mem_ref_in_stmt): Remove.
19997         (determine_max_movement): Use ref index to get at the reference.
19998         (invariantness_dom_walker::before_dom_children): Deal with
19999         lim data already initialized.
20000         (gather_mem_refs_stmt): Initialize lim data and record ref index.
20001
20002 2017-08-19  Uros Bizjak  <ubizjak@gmail.com>
20003
20004         * config/i386/i386.h (OPTION_MASK_ISA_ROUND): Remove.
20005         (TARGET_ISA_ROUND): Ditto.
20006         (TARGET_ROUND): Ditto.
20007         * config/i386/i386.c: Substitute TARGET_ROUND with TARGET_SSE4_1.
20008         * config/i386/i386.md: Ditto.
20009         * config/i386/sse.md: Ditto.
20010         * config/i386/i386-builtin.def: Substitute OPTION_MASK_ISA_ROUND
20011         with OPTION_MASK_ISA_SSE4_1.
20012
20013 2017-08-19  Uros Bizjak  <ubizjak@gmail.com>
20014
20015         PR target/81894
20016         * doc/extend.texi (x86 Built-in Functions): Correct the name of
20017         __builtin_ia32_lzcnt_u16.
20018
20019 2017-08-18  Peter Bergner  <bergner@vnet.ibm.com>
20020
20021         PR target/80210
20022         * config/rs6000/rs6000.c (rs6000_activate_target_options): New function.
20023         (rs6000_set_current_function): Rewrite function to use it.
20024
20025 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
20026
20027         PR c/53037
20028         * print-tree.c (print_node): Support DECL_WARN_IF_NOT_ALIGN
20029         and TYPE_WARN_IF_NOT_ALIGN.
20030         * stor-layout.c (do_type_align): Merge DECL_WARN_IF_NOT_ALIGN.
20031         (handle_warn_if_not_align): New.
20032         (place_union_field): Call handle_warn_if_not_align.
20033         (place_field): Call handle_warn_if_not_align.
20034         Copy TYPE_WARN_IF_NOT_ALIGN.
20035         (finish_builtin_struct): Copy TYPE_WARN_IF_NOT_ALIGN.
20036         (layout_type): Likewise.
20037         * tree-core.h (tree_type_common): Add warn_if_not_align.  Set
20038         spare to 18.
20039         (tree_decl_common): Add warn_if_not_align.
20040         * tree.c (build_range_type_1): Copy TYPE_WARN_IF_NOT_ALIGN.
20041         * tree.h (TYPE_WARN_IF_NOT_ALIGN): New.
20042         (SET_TYPE_WARN_IF_NOT_ALIGN): Likewise.
20043         (DECL_WARN_IF_NOT_ALIGN): Likewise.
20044         (SET_DECL_WARN_IF_NOT_ALIGN): Likewise.
20045         * doc/extend.texi: Document warn_if_not_aligned attribute.
20046         * doc/invoke.texi: Document -Wif-not-aligned and -Wpacked-not-aligned.
20047
20048 2017-08-17  Martin Liska  <mliska@suse.cz>
20049
20050         PR bootstrap/81864
20051         * tree-loop-distribution.c (ddrs_table): Change type to pointer type.
20052         (get_data_dependence): Use it as pointer type.
20053         (distribute_loop): Likewise.
20054
20055 2017-08-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20056
20057         * config/rs6000/altivec.md (UNSPEC_VMRGOW_DIRECT): New constant.
20058         (p8_vmrgew_v4sf_direct): Generalize to p8_vmrgew_<mode>_direct.
20059         (p8_vmrgow_<mode>_direct): New define_insn.
20060         * config/rs6000/rs6000.c (altivec_expand_vec_perm_const): Properly
20061         handle endianness for vmrgew and vmrgow permute patterns.
20062
20063 2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>
20064
20065         * config/rs6000/altivec.md (VParity): Remove TARGET_VSX_TIMODE.
20066         * config/rs6000/rs6000-cpus.def: Remove comment.
20067         (ISA_2_7_MASKS_SERVER): Delete OPTION_MASK_VSX_TIMODE;
20068         (POWERPC_MASKS): Likewise.
20069         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Remove unneeded
20070         use of TARGET_VSX_TIMODE.
20071         (rs6000_setup_reg_addr_masks): Change TARGET_VSX_TIMODE to TARGET_VSX.
20072         (rs6000_init_hard_regno_mode_ok): Remove unneeded uses of
20073         TARGET_VSX_TIMODE.  Change use of TARGET_VSX_TIMODE to TARGET_VSX.
20074         (rs6000_option_override_internal): Remove dead code.
20075         (rs6000_legitimize_address): Change TARGET_VSX_TIMODE to TARGET_VSX.
20076         (rs6000_legitimize_reload_address): Likewise.
20077         (rs6000_legitimate_address_p): Likewise.
20078         (rs6000_opt_masks): Delete "vsx-timode".
20079         (rs6000_disable_incompatible_switches): Remove mention of -mvsx-timode
20080         from function comment.
20081         * config/rs6000/rs6000.h (MASK_VSX_TIMODE): Delete.
20082         * config/rs6000/rs6000.md (FMOVE128_GPR): Remove TARGET_VSX_TIMODE.
20083         (V16QI, V8HI, V4SI, V4SF, V2DI, V2DF, V1TI): Remove useless empty
20084         condition.
20085         * config/rs6000/rs6000.opt (mvsx-timode): Replace with stub.
20086         * config/rs6000/vector.md (VEC_IP): Remove TARGET_VSX_TIMODE.
20087         * config/rs6000/vsx.md (VSX_LE_128): Likewise.
20088         (VSX_TI): Likewise.
20089         (VSX_M): Likewise.
20090         (define_peephole2): Likewise.
20091
20092 2017-08-17  Martin Sebor  <msebor@redhat.com>
20093
20094         PR c/81859
20095         * pretty-print.c (pp_format): Use strnlen in %.*s to avoid reading
20096         past the end of an array.
20097         (test_pp_format): Add test cases.
20098
20099 2017-08-17  Richard Sandiford  <richard.sandiford@linaro.org>
20100
20101         * internal-fn.def (CLRSB, CLZ, CTZ, FFS, PARITY, POPCOUNT): Add
20102         missing ECF_NOTHROW flags.
20103
20104 2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>
20105
20106         PR target/72804
20107         * config/rs6000/vsx.md (*vsx_le_permute_<mode>): Add support for
20108         operands residing in integer registers.
20109         (*vsx_le_perm_load_<mode>): Likewise.
20110         (*vsx_le_perm_store_<mode>): Likewise.
20111         (define_peephole2): Add peepholes to optimize the above.
20112
20113 2017-08-17  Marek Polacek  <polacek@redhat.com>
20114
20115         PR middle-end/81814
20116         * fold-const.c (operand_equal_for_comparison_p): Remove code that used
20117         to mimic what shorten_compare did.  Change the return type to bool.
20118         (fold_cond_expr_with_comparison): Update call to
20119         operand_equal_for_comparison_p.
20120         (fold_ternary_loc): Likewise.
20121
20122 2017-08-17  Jackson Woodruff  <jackson.woodruff@arm.com>
20123
20124         * aarch64-simd.md (mov<mode>): No longer force zero immediate into
20125         register.
20126         (*aarch64_simd_mov<mode>): Add new case for stp using zero immediate.
20127
20128 2017-08-17  Richard Biener  <rguenther@suse.de>
20129
20130         * tree-ssa-structalias.c (solve_graph): When propagating
20131         to successors update the graphs succ edges and avoid duplicate work.
20132
20133 2017-08-17  Maxim Ostapenko  <m.ostapenko@samsung.com>
20134
20135         PR target/81861
20136         * config/i386/i386.c (ix86_option_override_internal): Save target
20137         specific options after ix86_stack_protector_guard_reg was changed.
20138
20139 2017-08-17  Richard Biener  <rguenther@suse.de>
20140
20141         PR tree-optimization/81827
20142         * tree-ssa-structalias.c (struct variable_info): Add is_reg_var flag.
20143         (new_var_info): Initialize it conservatively.
20144         (get_call_vi): Mark register vars.
20145         (new_scalar_tmp_constraint_exp): Likewise.
20146         (handle_rhs_call): Likewise.
20147         (handle_const_call): Likewise.
20148         (create_function_info_for): Likewise.
20149         (solve_constraints): Sort varinfos to separate register from
20150         non-register vars to pack points-to solution bitmaps during
20151         iteration.
20152
20153 2017-08-17  Marek Polacek  <polacek@redhat.com>
20154
20155         * gimplify.c (gimplify_adjust_omp_clauses): Compare with 0 instead of 1.
20156
20157 2017-08-17  Richard Biener  <rguenther@suse.de>
20158
20159         * tree-vrp.c (vrp_int_const_binop): Do not set *overflow_p
20160         to true when overflow is undefined and we saturated the result.
20161
20162 2017-08-17  Alan Modra  <amodra@gmail.com>
20163
20164         PR target/80938
20165         * config/rs6000/rs6000.c (rs6000_savres_strategy): Revert 2017-08-09.
20166         Don't use store multiple if only one reg needs saving.
20167         (interesting_frame_related_regno): New function.
20168         (rs6000_frame_related): Don't emit frame info for regs that
20169         don't need saving.
20170         (rs6000_emit_epilogue): Likewise.
20171
20172 2017-08-16  Nathan Sidwell  <nathan@acm.org>
20173
20174         * tree-core.h (tree_type_non_common): Rename binfo to lang_1.
20175         * tree.h (TYPE_BINFO): Use type_non_common.maxval.
20176         (TYPE_LANG_SLOT_1): Use type_non_common.lang_1, for any type.
20177         * tree.c (free_lang_data_in_type): Use else-if chain.  Always
20178         clear TYPE_LANG_1.  Remove obsolete member-function stripping.
20179         (find_decls_types_r): Comment about TYPE_MAX_VALUES_RAW.
20180         (verify_type): Adjust for TYPE_BINFO move.
20181         * lto-streamer-out.c (DFS::DFS_write_tree_body): No need to
20182         process TYPE_BINFO directly.
20183         (hash_tree): Likewise.
20184         * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
20185         Likewise.
20186         * tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
20187         Likewise.
20188
20189 2017-08-16  David Malcolm  <dmalcolm@redhat.com>
20190
20191         * diagnostic-show-locus.c (colorizer::m_caret): Remove unused field.
20192
20193 2017-08-16  Uros Bizjak  <ubizjak@gmail.com>
20194
20195         PR target/46091
20196         * config/i386/i386.md (*anddi_1_btr): Change predicates of
20197         operand 0 and operand 1 to nomimmediate_operand. Add "m" constraint.
20198         Add ix86_binary_operator_ok to insn constraint.
20199         (*iordi_1_bts): Ditto.
20200         (*xordi_1_btc): Ditto.
20201         (*btsq): Change predicate of operand 0 to nonimmediate_operand.
20202         Update corresponding peephole2 pattern.
20203         (*btrq): Ditto.
20204         (*btcq): Ditto.
20205
20206 2017-08-16  Bin Cheng  <bin.cheng@arm.com>
20207
20208         PR tree-optimization/81832
20209         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Don't
20210         copy loop header which has IFN_LOOP_DIST_ALIAS call.
20211
20212 2017-08-16  Marek Polacek  <polacek@redhat.com>
20213
20214         PR middle/81695
20215         * fold-const.c (fold_indirect_ref_1): Restore original behavior
20216         regarding size_zero_node.
20217
20218 2017-08-16  Martin Liska  <mliska@suse.cz>
20219
20220         PR target/81753
20221         * config.gcc: Respect previously set extra_objs in case
20222         of darwin target.
20223
20224 2017-08-16  Richard Sandiford  <richard.sandiford@linaro.org>
20225
20226         PR tree-optimization/81835
20227         * tree-vect-loop.c (vect_is_simple_reduction): Simply checks for
20228         the phi SSA_NAME.  Check that the condition in a COND_EXPR does
20229         not depend on the phi.
20230
20231 2017-08-16  Alan Modra  <amodra@gmail.com>
20232
20233         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Delete
20234         dead code.
20235
20236 2017-08-16  Alan Modra  <amodra@gmail.com>
20237
20238         * config/rs6000/rs6000.c (rs6000_reg_live_or_pic_offset_p): Merge..
20239         (save_reg_p): ..into this.  Update all callers.
20240         (first_reg_to_save): Simplify.
20241
20242 2017-08-16  Alan Modra  <amodra@gmail.com>
20243
20244         * config/rs6000/rs6000.c (rs6000_savres_strategy): Don't restore
20245         fixed regs.
20246
20247 2017-08-15  Joseph Myers  <joseph@codesourcery.com>
20248
20249         PR target/78460
20250         PR target/67712
20251         * config/sh/sh-mem.cc (sh_expand_cmpnstr): Only unroll for
20252         constant count if that count is less than 32.
20253
20254 2017-08-15  Nathan Sidwell  <nathan@acm.org>
20255
20256         * gcc.c (execute): Emit friendlier message if inferior is killed
20257         by an external cause.
20258
20259 2017-08-15  Richard Biener  <rguenther@suse.de>
20260
20261         PR tree-optimization/81790
20262         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Handle both
20263         CONSTRUCTORs from simplifying and VN.
20264
20265 2017-08-14  Martin Sebor  <msebor@redhat.com>
20266
20267         * builtin-attrs.def: Add comments.
20268
20269 2017-08-14  Martin Sebor  <msebor@redhat.com>
20270
20271         PR c/81117
20272         * doc/extend.texi (attribute nonstring): Document new attribute.
20273
20274 2017-08-14  Martin Sebor  <msebor@redhat.com>
20275
20276         PR c/81117
20277         * tree-diagnostic.c (default_tree_printer): Handle %G.
20278         * gimple-pretty-print.h (percent_G_format): Declare new function.
20279         * gimple-pretty-print.c (percent_G_format): Define.
20280         * tree-pretty-print.c (percent_K_format): Add argument.
20281
20282 2017-08-14  Martin Sebor  <msebor@redhat.com>
20283
20284         PR translation/79998
20285         * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call):
20286         Remove a stray space.
20287
20288 2017-08-14  Uros Bizjak  <ubizjak@gmail.com>
20289
20290         PR target/46091
20291         * config/i386/i386.md (*anddi_1_btr): New insn_and_split pattern.
20292         (*iordi_1_bts): Ditto.
20293         (*xordi_1_btc): Ditto.
20294
20295 2017-08-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20296
20297         PR target/79845
20298         * config/rs6000/linux64.h (INVALID_64BIT): Use quoted strings.
20299         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
20300         Likewise.
20301         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Use
20302         quoted strings, and make more translator-friendly.
20303         (darwin_rs6000_override_options): Likewise.
20304         (rs6000_option_override_internal): Likewise.
20305         (rs6000_return_in_memory): Fix overlong line.
20306         (init_cmulative_args): Use quoted strings, and make more
20307         translator-friendly.
20308         (rs6000_pass_by_reference): Fix overlong line.
20309         (def_builtin): Use quoted strings.
20310         (altivec_expand_predicate_builtin): Use quoted strings, and make
20311         more translator-friendly.
20312         (htm_expand_builtin): Use quoted strings.
20313         (cpu_expand_builtin): Use quoted strings, and make more
20314         translator-friendly.
20315         (altivec_expand_builtin): Likewise.
20316         (paired_expand_predicate_builtin): Likewise.
20317         (rs6000_invalid_builtin): Likewise.
20318         (builtin_function_type): Use quoted strings.
20319         (rs6000_expand_split_stack_prologue): Use quoted strings, and make
20320         more translator-friendly.
20321         (rs6000_trampoline_init): Likewise.
20322         (rs6000_handle_altivec_attribute): Likewise.
20323         (rs6000_inner_target_options): Use quoted strings.
20324         (rs6000_disable_incompatible_switches): Likewise.
20325         * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Use quoted
20326         strings, and make more translator-friendly.
20327         (SUBSUBTARGET_OVERRIDE_OPTIONS): Use quoted strings.
20328
20329 2017-08-14  Bin Cheng  <bin.cheng@arm.com>
20330
20331         PR tree-optimization/81799
20332         * tree-loop-distribution.c (version_loop_by_alias_check): Force
20333         cond_expr to simple gimple operand.
20334
20335 2017-08-14  Wilco Dijkstra  <wdijkstr@arm.com>
20336
20337         PR middle-end/46932
20338         * doc/sourcebuild.texi (autoincdec): Add autoincdec description.
20339
20340 2017-08-14  Georg-Johann Lay  <avr@gjlay.de>
20341
20342         PR target/81754
20343         PR target/81268
20344         * config/avr/avr.opt (mgas-isr-prologues): New Var avr_gasisr_prologues.
20345         * config/avr/avr.md (gasisr, *gasisr): Use it instead of
20346         TARGET_GASISR_PROLOGUES.
20347         * config/avr/avr.c (avr_option_override): Same.
20348         (avr_pass_pre_proep::execute): Same.
20349
20350 2017-08-13  H.J. Lu  <hongjiu.lu@intel.com>
20351
20352         PR target/81820
20353         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Replace
20354         frame pointer with stack pointer - UNITS_PER_WORD in debug insns.
20355
20356 2017-08-13  Uros Bizjak  <ubizjak@gmail.com>
20357
20358         * config/i386/i386.md (*load_tp_<mode>): Redefine as
20359         define_insn_and_split.  Split to a memory load from 0 in
20360         DEFAULT_TLS_SEG_REG address space.  Merge with *load_tp_x32
20361         using PTR mode iterator.
20362         (*load_tp_x32_zext"): Redefine as define_insn_and_split.
20363         Split to a memory load from 0 in DEFAULT_TLS_SEG_REG address space.
20364         (*add_tp_<mode>): Redefine as define_insn_and_split.
20365         Split to an add with a memory load from 0 in DEFAULT_TLS_SEG_REG
20366         address space.  Merge with *add_tp_x32 using PTR mode iterator.
20367         (*add_tp_x32_zext"): Redefine as define_insn_and_split.
20368         Split to an add with a  memory load from 0 in
20369         DEFAULT_TLS_SEG_REG address space.
20370
20371 2017-08-12  Andrew Pinski  <apinski@cavium.com>
20372
20373         * config/aarch64/aarch64-option-extensions.def (rdma):
20374         Fix feature string to what Linux prints out in /proc/cpuinfo.
20375
20376 2017-08-12  Pierre-Marie de Rodat  <derodat@adacore.com>
20377
20378         PR ada/79542
20379         * dwarf2out.c (modified_type_die): For C typedef types that have
20380         an ultimate origin, process the ultimate origin instead of the
20381         input type.
20382         (gen_typedef_die): Assert that input DECLs have no ultimate
20383         origin.
20384         (gen_type_die_with_usage): For typedef variants that have an
20385         ultimate origin, just call gen_decl_die on the original DECL.
20386         (process_scope_var): Avoid creating DIEs for local typedefs and
20387         concrete static variables.
20388
20389 2017-08-12  Alan Modra  <amodra@gmail.com>
20390
20391         PR target/81170
20392         PR target/81295
20393         * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to
20394         match gnu-user.h startfile.
20395         (ENDFILE_LINUX_SPEC): Similarly.
20396
20397 2017-08-11  Thomas Schwinge  <thomas@codesourcery.com>
20398
20399         PR lto/81430
20400         * config/nvptx/nvptx.c (nvptx_override_options_after_change):
20401         Remove function.
20402         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Remove definition.
20403
20404 2017-08-11  Tamar Christina  <tamar.christina@arm.com>
20405         * config/aarch64/aarch64.md (mov<mode>): Change.
20406         (*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
20407         aarch64_reg_or_fp_float into aarch64_reg_or_fp_zero.
20408         * config/aarch64/predicates.md (aarch64_reg_or_fp_float): Removed.
20409
20410 2017-08-11  Eric Botcazou  <ebotcazou@adacore.com>
20411
20412         * tree-sra.c (build_access_from_expr_1): Use more precise diagnostics
20413         for storage order barriers.
20414
20415 2017-08-11  Martin Liska  <mliska@suse.cz>
20416
20417         PR tree-opt/79987
20418         * tree-chkp.c (chkp_get_bounds_for_decl_addr): Do not instrument
20419         variables of void type.
20420
20421 2017-08-11  Martin Liska  <mliska@suse.cz>
20422
20423         * asan.c (asan_protect_global): Replace ASM_OUTPUT_DEF with
20424         TARGET_SUPPORTS_ALIASES.
20425         * cgraph.c (cgraph_node::create_same_body_alias): Likewise.
20426         * ipa-visibility.c (can_replace_by_local_alias): Likewise.
20427         (optimize_weakref): Likewise.
20428         * symtab.c (symtab_node::noninterposable_alias): Likewise.
20429         * varpool.c (varpool_node::create_extra_name_alias): Likewise.
20430         * defaults.h: Introduce TARGET_SUPPORTS_ALIASES.
20431
20432 2017-08-11  Martin Liska  <mliska@suse.cz>
20433
20434         PR ipa/81213
20435         * config/i386/i386.c (make_resolver_func): Do complete
20436         refactoring of the function.
20437
20438 2017-08-10  Uros Bizjak  <ubizjak@gmail.com>
20439
20440         PR target/81708
20441         * config/i386/i386.opt (mstack-protector-guard-symbol=): New option
20442         * config/i386/i386.c (ix86_stack_protect_guard): Use
20443         ix86_stack_protect_guard_symbol_str to generate varible declaration.
20444         * doc/invoke.texi (x86 Options): Document
20445         -mstack-protector-guard-symbol= option.
20446
20447 2017-08-10  Uros Bizjak  <ubizjak@gmail.com>
20448
20449         * config/i386/i386-protos.h (ix86_split_stack_guard): New prototype.
20450         * config/i386/i386.c (ix86_split_stack_guard): New function.
20451         (ix86_xpand_split_stack_prologue): Call ix86_split_stack_guard.
20452         (ix86_legitimate_address_p) <case UNSPEC_STACK_CHECK>: Remove.
20453         (i386_asm_output_addr_const_extra) <case UNSPEC_STACK_CHECK>: Ditto.
20454         (optput_pic_addr_const): Remove UNSPEC_STACK_CHECK handling.
20455         * config/i386/i386.md (unspec): Remove UNSPEC_STACK_CHECK.
20456         (split_stack_space_check): Call ix86_split_stack_guard.
20457
20458 2017-08-10  Martin Sebor  <msebor@redhat.com>
20459
20460         * print-tree.c (print_node): Print location using the established
20461         format %s:%i%i.
20462         Replace spaces with colons.
20463         (debug_raw, debug): Ditto.
20464
20465 2017-08-10  Martin Sebor  <msebor@redhat.com>
20466
20467         PR c++/81586
20468         * pretty-print.c (pp_format): Correct the handling of %s precision.
20469
20470 2017-08-10  H.J. Lu  <hongjiu.lu@intel.com>
20471
20472         PR target/81736
20473         * config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
20474         to ...
20475         (ix86_finalize_stack_frame_flags): This.  Also clear
20476         frame_pointer_needed if -fno-omit-frame-pointer is used without
20477         stack access.
20478         (ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
20479         with ix86_finalize_stack_frame_flags.
20480         (ix86_expand_epilogue): Likewise.
20481         (ix86_expand_split_stack_prologue): Likewise.
20482         * doc/invoke.texi: Add a note for -fno-omit-frame-pointer.
20483
20484 2017-08-10  Martin Liska  <mliska@suse.cz>
20485
20486         PR c++/81355
20487         * c-attribs.c (handle_target_attribute):
20488         Report warning for an empty string argument of target attribute.
20489
20490 2017-08-09  Jakub Jelinek  <jakub@redhat.com>
20491
20492         PR c/81687
20493         * omp-low.c (omp_copy_decl): Don't remap FORCED_LABEL or DECL_NONLOCAL
20494         LABEL_DECLs.
20495         * tree-cfg.c (move_stmt_op): Don't adjust DECL_CONTEXT of FORCED_LABEL
20496         or DECL_NONLOCAL labels.
20497         (move_stmt_r) <case GIMPLE_LABEL>: Adjust DECL_CONTEXT of FORCED_LABEL
20498         or DECL_NONLOCAL labels here.
20499
20500 2017-08-09  Will Schmidt  <will_schmidt@vnet.ibm.com>
20501
20502         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add blurb
20503         to indicate when early gimple folding has been disabled.
20504         (rs6000_gimple_fold_builtin): Add debug content.
20505         (rs6000_invalid_builtin): Fix whitespace.
20506         (rs6000_expand_builtin): Fix whitespace.
20507         * config/rs6000/rs6000.opt: Add option for -mfold-gimple.
20508
20509 2017-08-09  Segher Boessenkool  <segher@kernel.crashing.org>
20510
20511         PR target/80938
20512         * config/rs6000/rs6000.c (rs6000_savres_strategy): Don't use
20513         SAVE_MULTIPLE if not all the registers that saves, should be saved.
20514
20515 2017-08-09  Jim Wilson  <jim.wilson@linaro.org>
20516
20517         * config/aarch64/aarch64-cores.def (falkor): Use falkor pipeline.
20518         (qdf24xx): Likewise.
20519         * config/aarch64/aarch64.md: Include falkor.md.
20520         * config/aarch64/falkor.md: New.
20521
20522 2017-08-09  Marek Polacek  <polacek@redhat.com>
20523
20524         PR c/81233
20525         * diagnostic-core.h (emit_diagnostic_valist): Add declaration.
20526         * diagnostic.c (emit_diagnostic): Add a comment.
20527         (emit_diagnostic_valist): New function.
20528
20529 2017-08-09  Marek Polacek  <polacek@redhat.com>
20530
20531         PR c/81417
20532         * input.c (make_location): New overload.
20533         * input.h (make_location): Declare.
20534
20535 2017-08-08  Alan Modra  <amodra@gmail.com>
20536             H.J. Lu  <hongjiu.lu@intel.com>
20537
20538         PR driver/81523
20539         * gcc.c (NO_PIE_SPEC): Delete.
20540         (PIE_SPEC): Define as !no-pie/pie.  Move static|shared|r
20541         exclusion..
20542         (LINK_PIE_SPEC): ..to here.
20543         (LINK_COMMAND_SPEC): Support -no-pie.
20544         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct
20545         chain of crtbegin*.o selection, update for PIE_SPEC changes and
20546         format.
20547         (GNU_USER_TARGET_ENDFILE_SPEC): Similarly.
20548         * config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly.
20549         (ENDFILE_CRTEND_SPEC): Similarly.
20550
20551 2017-08-08  Uros Bizjak  <ubizjak@gmail.com>
20552
20553         PR target/81708
20554         * config/i386/i386.opt (mstack-protector-guard-reg=): New option
20555         (mstack-protector-guard-offset=): Ditto.
20556         * config/i386/i386.c (ix86_option_override): Handle
20557         -mstack-protector-guard-reg= and -mstack-protector-guard-offset=
20558         options.
20559         (ix86_stack_protect_guard): Use ix86_stack_protect_guard_reg and
20560         ix86_stack_protect_guard_offset variables.
20561         (TARGET_STACK_PROTECT_GUARD): Always define.
20562         * doc/invoke.texi (x86 Options): Document -mstack-protector-guard-reg=
20563         and -mstack-protector-guard-offset= options.
20564
20565 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
20566
20567         * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): Handle
20568         boundary case for the last candidate.
20569
20570 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
20571
20572         * doc/invoke.texi: Document -ftree-loop-distribution for O3.
20573         * opts.c (default_options_table): Add OPT_ftree_loop_distribution.
20574
20575 2017-08-08  Tamar Christina  <tamar.christina@arm.com>
20576
20577         PR middle-end/19706
20578         * config/aarch64/aarch64.md (xorsign<mode>3): New optabs.
20579         * config/aarch64/aarch64-builtins.c
20580         (aarch64_builtin_vectorized_function): Added CASE_CFN_XORSIGN.
20581         * config/aarch64/aarch64-simd-builtins.def: Added xorsign BINOP.
20582         * config/aarch64/aarch64-simd.md: Added xorsign<mode>3
20583
20584 2017-08-08  Tamar Christina  <tamar.christina@arm.com>
20585             Andrew Pinski <pinskia@gmail.com>
20586
20587         PR middle-end/19706
20588         * internal-fn.def (XORSIGN): New.
20589         * optabs.def (xorsign_optab): New.
20590         * tree-ssa-math-opts.c (is_copysign_call_with_1): New.
20591         (convert_expand_mult_copysign): New.
20592         (pass_optimize_widening_mul::execute): Call
20593         convert_expand_mult_copysign.
20594
20595 2017-08-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20596
20597         PR tree-optimization/81354
20598         * gimple-ssa-strength-reduction.c (create_add_on_incoming_edge):
20599         Insert on edges rather than explicitly creating landing pads.
20600         (analyze_candidates_and_replace): Commit edge inserts.
20601
20602 2017-08-08  Richard Biener  <rguenther@suse.de>
20603
20604         PR middle-end/81719
20605         * tree-ssa-loop-niter.c: Include tree-dfa.h.
20606         (expand_simple_operations): Also look through ADDR_EXPRs with
20607         MEM_REF bases treating them as POINTER_PLUS_EXPR.
20608
20609 2017-08-08  Richard Biener  <rguenther@suse.de>
20610
20611         PR tree-optimization/81723
20612         * tree-vect-slp.c (struct bst_traits): New hash traits.
20613         (bst_fail): New global.
20614         (vect_build_slp_tree_2): New worker, split out from ...
20615         (vect_build_slp_tree): ... this now wrapping it with using
20616         bst_fail set to cache SLP tree build fails.  Properly handle
20617         max_tree_size.
20618         (vect_analyze_slp_instance): Allocate and free bst_fail.
20619
20620 2017-08-08  Martin Liska  <mliska@suse.cz>
20621
20622         PR tree-opt/81696
20623         * ipa-icf-gimple.c (func_checker::compare_cst_or_decl): Consider
20624         LABEL_DECLs that can be from a different function.
20625
20626 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
20627
20628         PR tree-optimization/81744
20629         * tree-predcom.c (prepare_finalizers_chain): Deep copy expr of
20630         loop's number of iterations.
20631
20632 2017-08-08  Martin Liska  <mliska@suse.cz>
20633
20634         * asan.c: Include header files.
20635         * attribs.c (build_decl_attribute_variant): New function moved
20636         from tree.[ch].
20637         (build_type_attribute_qual_variant): Likewise.
20638         (cmp_attrib_identifiers): Likewise.
20639         (simple_cst_list_equal): Likewise.
20640         (omp_declare_simd_clauses_equal): Likewise.
20641         (attribute_value_equal): Likewise.
20642         (comp_type_attributes): Likewise.
20643         (build_type_attribute_variant): Likewise.
20644         (lookup_ident_attribute): Likewise.
20645         (remove_attribute): Likewise.
20646         (merge_attributes): Likewise.
20647         (merge_type_attributes): Likewise.
20648         (merge_decl_attributes): Likewise.
20649         (merge_dllimport_decl_attributes): Likewise.
20650         (handle_dll_attribute): Likewise.
20651         (attribute_list_equal): Likewise.
20652         (attribute_list_contained): Likewise.
20653         * attribs.h (lookup_attribute): New function moved from tree.[ch].
20654         (lookup_attribute_by_prefix): Likewise.
20655         * bb-reorder.c: Include header files.
20656         * builtins.c: Likewise.
20657         * calls.c: Likewise.
20658         * cfgexpand.c: Likewise.
20659         * cgraph.c: Likewise.
20660         * cgraphunit.c: Likewise.
20661         * convert.c: Likewise.
20662         * dwarf2out.c: Likewise.
20663         * final.c: Likewise.
20664         * fold-const.c: Likewise.
20665         * function.c: Likewise.
20666         * gimple-expr.c: Likewise.
20667         * gimple-fold.c: Likewise.
20668         * gimple-pretty-print.c: Likewise.
20669         * gimple.c: Likewise.
20670         * gimplify.c: Likewise.
20671         * hsa-common.c: Likewise.
20672         * hsa-gen.c: Likewise.
20673         * internal-fn.c: Likewise.
20674         * ipa-chkp.c: Likewise.
20675         * ipa-cp.c: Likewise.
20676         * ipa-devirt.c: Likewise.
20677         * ipa-fnsummary.c: Likewise.
20678         * ipa-inline.c: Likewise.
20679         * ipa-visibility.c: Likewise.
20680         * ipa.c: Likewise.
20681         * lto-cgraph.c: Likewise.
20682         * omp-expand.c: Likewise.
20683         * omp-general.c: Likewise.
20684         * omp-low.c: Likewise.
20685         * omp-offload.c: Likewise.
20686         * omp-simd-clone.c: Likewise.
20687         * opts-global.c: Likewise.
20688         * passes.c: Likewise.
20689         * predict.c: Likewise.
20690         * sancov.c: Likewise.
20691         * sanopt.c: Likewise.
20692         * symtab.c: Likewise.
20693         * toplev.c: Likewise.
20694         * trans-mem.c: Likewise.
20695         * tree-chkp.c: Likewise.
20696         * tree-eh.c: Likewise.
20697         * tree-into-ssa.c: Likewise.
20698         * tree-object-size.c: Likewise.
20699         * tree-parloops.c: Likewise.
20700         * tree-profile.c: Likewise.
20701         * tree-ssa-ccp.c: Likewise.
20702         * tree-ssa-live.c: Likewise.
20703         * tree-ssa-loop.c: Likewise.
20704         * tree-ssa-sccvn.c: Likewise.
20705         * tree-ssa-structalias.c: Likewise.
20706         * tree-ssa.c: Likewise.
20707         * tree-streamer-in.c: Likewise.
20708         * tree-vectorizer.c: Likewise.
20709         * tree-vrp.c: Likewise.
20710         * tsan.c: Likewise.
20711         * ubsan.c: Likewise.
20712         * varasm.c: Likewise.
20713         * varpool.c: Likewise.
20714         * tree.c: Remove functions moved to attribs.[ch].
20715         * tree.h: Likewise.
20716         * config/aarch64/aarch64.c: Add attrs.h header file.
20717         * config/alpha/alpha.c: Likewise.
20718         * config/arc/arc.c: Likewise.
20719         * config/arm/arm.c: Likewise.
20720         * config/avr/avr.c: Likewise.
20721         * config/bfin/bfin.c: Likewise.
20722         * config/c6x/c6x.c: Likewise.
20723         * config/cr16/cr16.c: Likewise.
20724         * config/cris/cris.c: Likewise.
20725         * config/darwin.c: Likewise.
20726         * config/epiphany/epiphany.c: Likewise.
20727         * config/fr30/fr30.c: Likewise.
20728         * config/frv/frv.c: Likewise.
20729         * config/ft32/ft32.c: Likewise.
20730         * config/h8300/h8300.c: Likewise.
20731         * config/i386/winnt.c: Likewise.
20732         * config/ia64/ia64.c: Likewise.
20733         * config/iq2000/iq2000.c: Likewise.
20734         * config/lm32/lm32.c: Likewise.
20735         * config/m32c/m32c.c: Likewise.
20736         * config/m32r/m32r.c: Likewise.
20737         * config/m68k/m68k.c: Likewise.
20738         * config/mcore/mcore.c: Likewise.
20739         * config/microblaze/microblaze.c: Likewise.
20740         * config/mips/mips.c: Likewise.
20741         * config/mmix/mmix.c: Likewise.
20742         * config/mn10300/mn10300.c: Likewise.
20743         * config/moxie/moxie.c: Likewise.
20744         * config/msp430/msp430.c: Likewise.
20745         * config/nds32/nds32-isr.c: Likewise.
20746         * config/nds32/nds32.c: Likewise.
20747         * config/nios2/nios2.c: Likewise.
20748         * config/nvptx/nvptx.c: Likewise.
20749         * config/pa/pa.c: Likewise.
20750         * config/pdp11/pdp11.c: Likewise.
20751         * config/powerpcspe/powerpcspe.c: Likewise.
20752         * config/riscv/riscv.c: Likewise.
20753         * config/rl78/rl78.c: Likewise.
20754         * config/rx/rx.c: Likewise.
20755         * config/s390/s390.c: Likewise.
20756         * config/sh/sh.c: Likewise.
20757         * config/sol2.c: Likewise.
20758         * config/sparc/sparc.c: Likewise.
20759         * config/spu/spu.c: Likewise.
20760         * config/stormy16/stormy16.c: Likewise.
20761         * config/tilegx/tilegx.c: Likewise.
20762         * config/tilepro/tilepro.c: Likewise.
20763         * config/v850/v850.c: Likewise.
20764         * config/vax/vax.c: Likewise.
20765         * config/visium/visium.c: Likewise.
20766         * config/xtensa/xtensa.c: Likewise.
20767
20768 2017-08-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
20769
20770         PR target/81593
20771         * config/rs6000/vsx.md (vsx_concat_<mode>, VSX_D): Cleanup
20772         constraints since the -mupper-regs-* switches have been
20773         eliminated.
20774         (vsx_concat_<mode>_1): New combiner insns to recognize inserting
20775         into a vector from a double word element that was extracted from
20776         another vector, and eliminate extra XXPERMDI instructions.
20777         (vsx_concat_<mode>_2): Likewise.
20778         (vsx_concat_<mode>_3): Likewise.
20779         (vsx_set_<mode>, VSX_D): Rewrite vector set in terms of vector
20780         concat to allow optimizing inserts from previous extracts.
20781
20782 2017-08-07  Uros Bizjak  <ubizjak@gmail.com>
20783
20784         * config/i386/i386.c (ix86_stack_protect_guard): Generate
20785         memory reference to a SSP offset in TLS address space.
20786         (ix86_print_operand) <case '@'>: Remove.
20787         (ix86_print_operand_punct_valid_p): Remove '@' code.
20788         * config/i386/i386.md (unspec): Remove UNSPEC_SP_TLS_SET and
20789         UNSPEC_SP_TLS_TEST.
20790         (stack_tls_protect_set_<mode>): Remove.
20791         (stack_protect_set): Do not call gen_stack_tls_protect_set_<mode>.
20792         (stack_tls_protect_test_<mode>): Remove.
20793         (stack_protect_test): Do not call gen_stack_tls_protect_test_<mode>.
20794
20795 2017-08-07  Olivier Hainque  <hainque@adacore.com>
20796
20797         PR target/81755
20798         * config/vxworksae.h (VXWORKS_HAVE_TLS): Define.
20799
20800 2017-08-07  Douglas Rupp  <rupp@adacore.com>
20801
20802         * Makefile.in (install-mkheaders): Fix typo, where the multi_dir
20803         variable was referenced as multidir in command.
20804
20805 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
20806
20807         PR c/69389
20808         * gimplify.c (goa_stabilize_expr): Handle BIT_INSERT_EXPR and
20809         BIT_FIELD_REF.
20810
20811 2017-08-07  Martin Liska  <mliska@suse.cz>
20812
20813         * config/m32c/m32c.c: Add include of stringpool.h and attribs.h.
20814         * config/rl78/rl78.c: Add include of attribs.h.
20815         * config/sh/sh.c: Likewise.
20816         * config/v850/v850.c: Likewise.
20817
20818 2017-08-07  Tom de Vries  <tom@codesourcery.com>
20819
20820         PR middle-end/78266
20821         * omp-expand.c (expand_oacc_for): Ensure diff_type is large enough.
20822
20823 2017-08-07  Martin Liska  <mliska@suse.cz>
20824
20825         * config/mips/mips.c: Include attribs.h.
20826
20827 2017-08-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
20828
20829         PR fortran/68829
20830         * doc/invoke.texi: Document change in behvaior for -Ofast for
20831         Fortran.
20832
20833 2017-08-07  Wilco Dijkstra  <wdijkstr@arm.com>
20834
20835         * config/aarch64/aarch64.c (aarch64_pushwb_single_reg):
20836         Use gen_frame_mem.
20837         (aarch64_pop_regs): Likewise.
20838         (aarch64_gen_load_pair): Likewise.
20839         (aarch64_save_callee_saves): Likewise.
20840         (aarch64_restore_callee_saves): Likewise.
20841
20842 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
20843
20844         * config/i386/i386.c: Revert the last change.
20845
20846 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
20847
20848         PR target/81736
20849         * config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
20850         to ...
20851         (ix86_finalize_stack_frame_flags): This.  Also clear
20852         frame_pointer_needed if -fno-omit-frame-pointer is used without
20853         stack access.
20854         (ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
20855         with ix86_finalize_stack_frame_flags.
20856         (ix86_expand_epilogue): Likewise.
20857         (ix86_expand_split_stack_prologue): Likewise.
20858
20859 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
20860
20861         PR target/81743
20862         * config/i386/i386.c (get_builtin_code_for_version): Set priority
20863         to P_AES for Westmere.
20864
20865 2017-08-07  Jonathan Yong  <10walls@gmail.com>
20866
20867         * config/i386/mingw.opt (fset-stack-executable): Removed.
20868         * config/i386/cygming.opt (fset-stack-executable): Moved
20869         from mingw.opt.
20870         * config/i386/cygwin.h: Define CHECK_EXECUTE_STACK_ENABLED.
20871
20872 2017-08-07  Segher Boessenkool  <segher@kernel.crashing.org>
20873
20874         * print-rtl.c (print_exp): Print NOT as "~" instead of as "!".
20875
20876 2017-08-07  Marek Polacek  <polacek@redhat.com>
20877
20878         PR middle-end/81737
20879         * fold-const.c (fold_indirect_ref_1): Check type_domain.
20880
20881 2017-08-07  Martin Liska  <mliska@suse.cz>
20882
20883         * attribs.h (canonicalize_attr_name): New function.
20884         (cmp_attribs): Move from c-format.c and adjusted.
20885         (is_attribute_p): Moved from tree.h.
20886         * tree-inline.c: Add new includes.
20887         * tree.c (cmp_attrib_identifiers): Use cmp_attribs.
20888         (private_is_attribute_p): Remove.
20889         (private_lookup_attribute): Likewise.
20890         (private_lookup_attribute_by_prefix): Simplify.
20891         (remove_attribute): Use is_attribute_p.
20892         * tree.h: Remove removed declarations.
20893
20894 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
20895
20896         PR middle-end/81698
20897         * stmt.c (emit_case_dispatch_table): Add DEFAULT_EDGE argument,
20898         instead of computing it in the function.  Formatting fix.
20899         (expand_case): Don't rely on default_edge being the first edge,
20900         clear it if removing it, pass default_edge to
20901         emit_case_dispatch_table.
20902         (expand_sjlj_dispatch_table): Pass NULL as DEFAULT_EDGE, formatting
20903         fix.
20904
20905 2017-08-06  Uros Bizjak  <ubizjak@gmail.com>
20906
20907         * config/alpha/alpha.c (alpha_reorg): If trap is the last active
20908         insn in the function, emit NOP after the insn.
20909
20910 2017-08-06  Tom de Vries  <tom@codesourcery.com>
20911
20912         * omp-expand.c (expand_oacc_for): Add missing edge probability for tile
20913         and element loops.
20914
20915 2017-08-06  Tom de Vries  <tom@codesourcery.com>
20916
20917         * omp-expand.c (expand_oacc_for): Add missing edge probability for chunk
20918         loop.
20919
20920 2017-08-04  Yury Gribov  <tetra2005@gmail.com>
20921
20922         PR tree-optimization/57371
20923         * match.pd: New pattern.
20924
20925 2017-08-04  Marek Polacek  <polacek@redhat.com>
20926
20927         PR middle-end/81695
20928         * fold-const.c (fold_indirect_ref_1): For ((int *)&a + 4 -> a[1],
20929         perform the computation in offset_int.
20930
20931 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
20932
20933         PR tree-optimization/81136
20934         * tree-vectorizer.h: Include tree-hash-traits.h.
20935         (vec_base_alignments): New typedef.
20936         (vec_info): Add a base_alignments field.
20937         (vect_record_base_alignments): Declare.
20938         * tree-data-ref.h (data_reference): Add an is_conditional_in_stmt
20939         field.
20940         (DR_IS_CONDITIONAL_IN_STMT): New macro.
20941         (create_data_ref): Add an is_conditional_in_stmt argument.
20942         * tree-data-ref.c (create_data_ref): Likewise.  Use it to initialize
20943         the is_conditional_in_stmt field.
20944         (data_ref_loc): Add an is_conditional_in_stmt field.
20945         (get_references_in_stmt): Set the is_conditional_in_stmt field.
20946         (find_data_references_in_stmt): Update call to create_data_ref.
20947         (graphite_find_data_references_in_stmt): Likewise.
20948         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Likewise.
20949         * tree-vect-data-refs.c (vect_analyze_data_refs): Likewise.
20950         (vect_record_base_alignment): New function.
20951         (vect_record_base_alignments): Likewise.
20952         (vect_compute_data_ref_alignment): Adjust base_addr and aligned_to
20953         for nested statements even if we fail to compute a misalignment.
20954         Use pooled base alignments for unconditional references.
20955         (vect_find_same_alignment_drs): Compare base addresses instead
20956         of base objects.
20957         (vect_analyze_data_refs_alignment): Call vect_record_base_alignments.
20958         * tree-vect-slp.c (vect_slp_analyze_bb_1): Likewise.
20959
20960 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
20961
20962         * tree-vectorizer.h (vec_info): Add a constructor and destructor.
20963         Add an explicit name for the enum.  Use auto_vec for slp_instances
20964         and grouped_stores.
20965         (_loop_vec_info): Add a constructor and destructor.  Use auto_vec
20966         for all vectors.
20967         (_bb_vec_info): Add a constructor and destructor.
20968         (vinfo_for_stmt): Return NULL for uids of -1 as well.
20969         (destroy_loop_vec_info): Delete.
20970         (vect_destroy_datarefs): Likewise.
20971         * tree-vectorizer.c (vect_destroy_datarefs): Delete.
20972         (vec_info::vec_info): New function.
20973         (vec_info::~vec_info): Likewise.
20974         (vectorize_loops): Use delete instead of destroy_loop_vec_info.
20975         * tree-parloops.c (gather_scalar_reductions): Use delete instead of
20976         destroy_loop_vec_info.
20977         * tree-vect-loop.c (new_loop_vec_info): Replace with...
20978         (_loop_vec_info::_loop_vec_info): ...this.
20979         (destroy_loop_vec_info): Replace with...
20980         (_loop_vec_info::~_loop_vec_info): ...this.  Unconditionally delete
20981         the stmt_vec_infos.  Leave handling of vec_info information to its
20982         destructor.  Remove explicit vector releases.
20983         (vect_analyze_loop_form): Use new instead of new_loop_vec_info.
20984         (vect_analyze_loop): Use delete instead of destroy_loop_vec_info.
20985         * tree-vect-slp.c (new_bb_vec_info): Replace with...
20986         (_bb_vec_info::_bb_vec_info): ...this.  Don't reserve space in
20987         BB_VINFO_GROUPED_STORES or BB_VINFO_SLP_INSTANCES.
20988         (destroy_bb_vec_info): Replace with...
20989         (_bb_vec_info::~_bb_vec_info): ...this.  Leave handling of vec_info
20990         information to its destructor.
20991         (vect_slp_analyze_bb_1): Use new and delete instead of
20992         new_bb_vec_info and destroy_bb_vec_info.
20993         (vect_slp_bb): Replace 2 calls to destroy_bb_vec_info with a
20994         single delete.
20995
20996 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
20997
20998         * tree-data-ref.h (subscript): Add access_fn field.
20999         (data_dependence_relation): Add could_be_independent_p.
21000         (SUB_ACCESS_FN, DDR_COULD_BE_INDEPENDENT_P): New macros.
21001         (same_access_functions): Move to tree-data-ref.c.
21002         * tree-data-ref.c (ref_contains_union_access_p): New function.
21003         (access_fn_component_p): Likewise.
21004         (access_fn_components_comparable_p): Likewise.
21005         (dr_analyze_indices): Add a reference to access_fn_component_p.
21006         (dump_data_dependence_relation): Use SUB_ACCESS_FN instead of
21007         DR_ACCESS_FN.
21008         (constant_access_functions): Likewise.
21009         (add_other_self_distances): Likewise.
21010         (same_access_functions): Likewise.  (Moved from tree-data-ref.h.)
21011         (initialize_data_dependence_relation): Use XCNEW and remove
21012         explicit zeroing of DDR_REVERSED_P.  Look for a subsequence
21013         of access functions that have the same type.  Allow the
21014         subsequence to end with different bases in some circumstances.
21015         Record the chosen access functions in SUB_ACCESS_FN.
21016         (build_classic_dist_vector_1): Replace ddr_a and ddr_b with
21017         a_index and b_index.  Use SUB_ACCESS_FN instead of DR_ACCESS_FN.
21018         (subscript_dependence_tester_1): Likewise dra and drb.
21019         (build_classic_dist_vector): Update calls accordingly.
21020         (subscript_dependence_tester): Likewise.
21021         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Check
21022         DDR_COULD_BE_INDEPENDENT_P.
21023         * tree-vectorizer.h (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Test
21024         comp_alias_ddrs instead of may_alias_ddrs.
21025         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
21026         New function.
21027         (vect_analyze_data_ref_dependence): Use it if
21028         DDR_COULD_BE_INDEPENDENT_P, but fall back to using the recorded
21029         distance vectors if that fails.
21030         (dependence_distance_ge_vf): New function.
21031         (vect_prune_runtime_alias_test_list): Use it.  Don't clear
21032         LOOP_VINFO_MAY_ALIAS_DDRS.
21033
21034 2017-08-04  Richard Biener  <rguenther@suse.de>
21035
21036         PR middle-end/81705
21037         * fold-const.c (fold_binary_loc): Properly restrict
21038         minus_var0 && minus_var1 case when associating undefined overflow
21039         entities.
21040
21041 2017-08-04  Tom de Vries  <tom@codesourcery.com>
21042
21043         * omp-simd-clone.c (simd_clone_adjust): Add missing edge probability.
21044
21045 2017-08-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21046
21047         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
21048         Don't start diagnostic messages with a capital letter.
21049         * config/rs6000/rs6000.c (rs6000_option_override_internal):
21050         Likewise.
21051         (rs6000_invalid_builtin): Likewise.
21052         (rs6000_trampoline_init): Likewise.
21053
21054 2017-08-03  Jakub Jelinek  <jakub@redhat.com>
21055
21056         PR target/81621
21057         * bb-reorder.c (pass_partition_blocks::execute): Return TODO_df_finish
21058         after setting changeable df flags.
21059
21060 2017-08-03  Richard Biener  <rguenther@suse.de>
21061
21062         * tree-ssa-reassoc.c (should_break_up_subtract): Also break
21063         up if the use is in USE - X.
21064
21065 2017-08-03  Alexander Monakov  <amonakov@ispras.ru>
21066
21067         * toplev.c (dumpfile.h): New include.
21068         (internal_error_reentered): New static function.  Use it...
21069         (internal_error_function): ...here to handle reentered internal_error.
21070
21071 2017-08-03  Richard Biener  <rguenther@suse.de>
21072
21073         PR middle-end/81148
21074         * fold-const.c (split_tree): Add minus_var and minus_con
21075         arguments, remove unused loc arg.  Never generate NEGATE_EXPRs
21076         here but always use minus_*.
21077         (associate_trees): Assert we never associate with MINUS_EXPR
21078         and NULL first operand.  Do not recurse for PLUS_EXPR operands
21079         when associating as MINUS_EXPR either.
21080         (fold_binary_loc): Track minus_var and minus_con.
21081
21082 2017-08-03  Tom de Vries  <tom@codesourcery.com>
21083
21084         PR lto/81430
21085         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers): If
21086         ACCEL_COMPILER, apply finish_options on
21087         DECL_FUNCTION_SPECIFIC_OPTIMIZATION.
21088
21089 2017-08-03  Tom de Vries  <tom@codesourcery.com>
21090
21091         PR target/81662
21092         * config/nvptx/nvptx.c (nvptx_option_override): Emit sorry if
21093         function_entry_patch_area_size > 0.
21094
21095 2017-08-03  Jakub Jelinek  <jakub@redhat.com>
21096
21097         PR driver/81650
21098         * calls.c (alloc_max_size): Use HOST_WIDE_INT_UC (10??)
21099         instead of 10??LU, perform unit multiplication in wide_int,
21100         don't change alloc_object_size_limit if the limit is larger
21101         than SSIZE_MAX.
21102
21103         PR tree-optimization/81655
21104         PR tree-optimization/81588
21105         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Handle also
21106         the case when ranges[i].low and high are 1 for unsigned type with
21107         precision 1.
21108
21109         PR middle-end/81052
21110         * omp-low.c (diagnose_sb_0): Handle flag_openmp_simd like flag_openmp.
21111         (pass_diagnose_omp_blocks::gate): Enable also for flag_openmp_simd.
21112
21113 2017-08-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21114
21115         * tree-vrp.h: Add include guard.
21116
21117 2017-08-02  Uros Bizjak  <ubizjak@gmail.com>
21118
21119         PR target/81644
21120         * config/i386/i386.md (unspecv): Add UNSPECV_UD2.
21121         (ud2): New insn pattern.
21122         * config/i386/i386.c (ix86_expand_epilogue):
21123         For naked functions, generate ud2 instead of trap insn.
21124
21125 2017-08-02  Marek Polacek  <polacek@redhat.com>
21126
21127         PR other/81667
21128         * alloc-pool.h (base_pool_allocator): Initialize m_elt_size.
21129
21130 2017-08-02  Tom de Vries  <tom@codesourcery.com>
21131             Cesar Philippidis  <cesar@codesourcery.com>
21132
21133         * config/nvptx/nvptx.c (nvptx_lockless_update, nvptx_lockfull_update):
21134         Add missing edge probabilities.
21135
21136 2017-08-02  Tamar Christina  <tamar.christina@arm.com>
21137
21138         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
21139         Correct endianness.
21140
21141 2017-08-02  Jakub Jelinek  <jakub@redhat.com>
21142
21143         PR middle-end/79499
21144         * function.c (thread_prologue_and_epilogue_insns): Determine blocks
21145         for find_many_sub_basic_blocks bitmap by looking up BLOCK_FOR_INSN
21146         of first NONDEBUG_INSN_P in each of the split_prologue_seq and
21147         prologue_seq sequences - if any.
21148
21149 2017-08-02  Richard Biener  <rguenther@suse.de>
21150
21151         * tree-vect-stmts.c (vectorizable_store): Perform vector extracts
21152         via vectors if supported, integer extracts via punning if supported
21153         or otherwise vector extracts.
21154
21155 2017-08-02  Richard Biener  <rguenther@suse.de>
21156
21157         * tree-ssa-pre.c (bitmap_insert_into_set_1): Remove and inline
21158         into ...
21159         (bitmap_insert_into_set): ... this.
21160
21161 2017-08-02  Richard Biener  <rguenther@suse.de>
21162
21163         PR tree-optimization/81633
21164         Revert
21165         2015-08-17  Alan Hayward  <alan.hayward@arm.com>
21166
21167         PR tree-optimization/71752
21168         * tree-vect-slp.c (vect_get_slp_defs): Handle null operands.
21169
21170 2017-08-01  Daniel Santos  <daniel.santos@pobox.com>
21171
21172         * config/i386/i386.h (ix86_frame::outlined_save_offset): Remove field.
21173         (machine_function::call_ms2sysv_pad_out): Remove field.
21174         * config/i386/i386.c (xlogue_layout::get_stack_space_used): Modify.
21175         (ix86_compute_frame_layout): Likewise.
21176
21177 2017-08-01  H.J. Lu  <hongjiu.lu@intel.com>
21178
21179         PR target/81654
21180         * config/i386/i386.c (ix86_set_func_type): Disallow naked
21181         attribute with interrupt attribute.
21182
21183 2017-08-01  Andrew Pinski  <apinski@cavium.com>
21184
21185         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Check
21186         BIT_INSERT_EXPR's operand 1
21187         to see if the types precision matches.
21188
21189 2017-08-01  Martin Liska  <mliska@suse.cz>
21190
21191         PR middle-end/70140
21192         * builtins.c (expand_builtin_memcpy_args): Remove.
21193         (expand_builtin_memcpy): Call newly added function
21194         expand_builtin_memory_copy_args.
21195         (expand_builtin_memcpy_with_bounds): Likewise.
21196         (expand_builtin_mempcpy): Remove last argument.
21197         (expand_builtin_mempcpy_with_bounds): Likewise.
21198         (expand_builtin_memory_copy_args): New function created from
21199         expand_builtin_mempcpy_args with small modifications.
21200         (expand_builtin_mempcpy_args): Remove.
21201         (expand_builtin_stpcpy): Remove unused argument.
21202         (expand_builtin): Likewise.
21203         (expand_builtin_with_bounds): Likewise.
21204
21205 2017-08-01  Martin Liska  <mliska@suse.cz>
21206
21207         Revert r250771
21208         Make mempcpy more optimal (PR middle-end/70140).
21209
21210 2017-08-01  Jakub Jelinek  <jakub@redhat.com>
21211
21212         PR target/81622
21213         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
21214         __builtin_vec_cmpne verify both arguments are compatible vectors
21215         before looking at TYPE_MODE on the element type.  For __builtin_vec_ld
21216         verify arg1_type is a pointer or array type.  For __builtin_vec_st,
21217         move computation of aligned to after checking the argument types.
21218         Formatting fixes.
21219
21220         PR target/80846
21221         * config/rs6000/vsx.md (vextract_fp_from_shorth,
21222         vextract_fp_from_shortl): Add element mode after mode in gen_vec_init*
21223         calls.
21224
21225 2017-08-01  Jerome Lambourg  <lambourg@adacore.com>
21226             Doug Rupp  <rupp@adacore.com>
21227             Olivier Hainque  <hainque@adacore.com>
21228
21229         * config.gcc (arm-wrs-vxworks*): Rework to handle arm-wrs-vxworks7 as
21230         well as arm-wrs-vxworks. Update target_cpu_name from arm6 (arch v3) to
21231         arm8 (arch v4).
21232         * config/arm/vxworks.h (MAYBE_TARGET_BPABI_CPP_BUILTINS): New, helper
21233         for TARGET_OS_CPP_BUILTIN.
21234         (TARGET_OS_CPP_BUILTIN): Invoke MAYBE_TARGET_BPABI_CPP_BUILTINS(),
21235         refine CPU definitions for arm_arch5 and add those for arm_arch6 and
21236         arm_arch7.
21237         (MAYBE_ASM_ABI_SPEC): New, helper for SUBTARGET_EXTRA_ASM_SPEC,
21238         passing required abi options to the assembler for EABI configurations.
21239         (EXTRA_CC1_SPEC): New macro, to help prevent the implicit production
21240         of .text.hot and .text.unlikely sections for kernel modules when
21241         using ARM style exceptions.
21242         (CC1_SPEC): Remove obsolete attempt at mimicking Diab toolchain
21243         options. Add EXTRA_CC1_SPEC.
21244         (VXWORKS_ENDIAN_SPEC): Adjust comment and remove handling of Diab
21245         toolchain options.
21246         (DWARF2_UNWIND_INFO): Redefine to handle the pre/post VxWorks 7
21247         transition.
21248         (ARM_TARGET2_DWARF_FORMAT): Define.
21249         * config/arm/t-vxworks: Adjust multilib control to removal of the
21250         Diab command line options.
21251
21252 2017-08-01  Martin Liska  <mliska@suse.cz>
21253
21254         PR gcov-profile/81561
21255         * gcov.c (unblock): Make unblocking safe as we need to preserve
21256         index correspondence of blocks and block_lists.
21257
21258 2017-08-01  Richard Biener  <rguenther@suse.de>
21259
21260         PR tree-optimization/81181
21261         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
21262         (compute_antic): ... end of iteration here.
21263
21264 2017-08-01  James Greenhalgh  <james.greenhalgh@arm.com>
21265
21266         * common.opt (ftree-vectorize): No longer set flag_tree_vectorize.
21267         (ftree-loop-vectorize): Set as EnabledBy ftree-vectorize.
21268         (ftree-slp-vectorize): Likewise.
21269         * omp-expand (expand_omp_simd): Remove flag_tree_vectorize, as it
21270         can no longer be set independent of flag_tree_loop_vectorize.
21271         * omp-general.c (emp_max_vf): Likewise.
21272         * opts.c (enable_fdo_optimizations): Remove references to
21273         flag_tree_vectorize, these are now implicit.
21274         (common_handle_option): Remove handling for OPT_ftree_vectorize,
21275         and leave it for the options machinery.
21276
21277 2017-08-01  Martin Liska  <mliska@suse.cz>
21278
21279         PR middle-end/70140
21280         * builtins.c (expand_builtin_memcpy_args): Remove.
21281         (expand_builtin_memcpy): Call newly added function
21282         expand_builtin_memory_copy_args.
21283         (expand_builtin_memcpy_with_bounds): Likewise.
21284         (expand_builtin_mempcpy): Remove last argument.
21285         (expand_builtin_mempcpy_with_bounds): Likewise.
21286         (expand_builtin_memory_copy_args): New function created from
21287         expand_builtin_mempcpy_args with small modifications.
21288         (expand_builtin_mempcpy_args): Remove.
21289         (expand_builtin_stpcpy): Remove unused argument.
21290         (expand_builtin): Likewise.
21291         (expand_builtin_with_bounds): Likewise.
21292
21293 2017-08-01  Uros Bizjak  <ubizjak@gmail.com>
21294
21295         PR target/81641
21296         * config/i386/i386.c (ix86_print_operand_address_as): For -masm=intel
21297         print "ds:" only for immediates in generic address space.
21298
21299 2017-08-01  Uros Bizjak  <ubizjak@gmail.com>
21300
21301         PR target/81639
21302         * config/i386/i386.c (ix86_funciton_naked): New prototype.
21303         (ix86_function_ok_for_sibcall): Return false for naked functions.
21304
21305 2017-08-01  Richard Biener  <rguenther@suse.de>
21306
21307         * tree-ssa-pre.c (print_pre_expr): Handle NULL expr.
21308         (compute_antic): Seed worklist with exit block predecessors.
21309         * cfganal.c (dfs_find_deadend): For a cycle return the source
21310         of the edge closing it.
21311
21312 2017-08-01  Tamar Christina  <tamar.christina@arm.com>
21313
21314         * config/aarch64/aarch64.c
21315         (aarch64_can_const_movi_rtx_p): Move 0 check.
21316
21317 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
21318
21319         * tree.h (POINTER_TYPE_OVERFLOW_UNDEFINED): Delete.
21320         * fold-const.c (fold_comparison, fold_binary_loc): Delete use of
21321         above macro.
21322         * match.pd: Ditto in address comparison pattern.
21323
21324 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
21325
21326         PR tree-optimization/81627
21327         * tree-predcom.c (prepare_finalizers): Always rewrite into loop
21328         closed ssa form for store-store chain.
21329
21330 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
21331
21332         PR tree-optimization/81620
21333         * tree-predcom.c (add_ref_to_chain): Don't set has_max_use_after
21334         for store-store chain.
21335
21336 2017-08-01  Jakub Jelinek  <jakub@redhat.com>
21337
21338         PR tree-optimization/81588
21339         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If
21340         ranges[i].in_p, invert comparison code ccode.  For >/>=,
21341         swap rhs1 and rhs2 and comparison code unconditionally,
21342         for </<= don't do that.  Don't swap rhs1/rhs2 again if
21343         ranges[i].in_p, instead invert comparison code ccode if
21344         opcode or oe->rank is BIT_IOR_EXPR.
21345
21346         PR target/80846
21347         * optabs.def (vec_extract_optab, vec_init_optab): Change from
21348         a direct optab to conversion optab.
21349         * optabs.c (expand_vector_broadcast): Use convert_optab_handler
21350         with GET_MODE_INNER as last argument instead of optab_handler.
21351         * expmed.c (extract_bit_field_1): Likewise.  Use vector from
21352         vector extraction if possible and optab is available.
21353         * expr.c (store_constructor): Use convert_optab_handler instead
21354         of optab_handler.  Use vector initialization from smaller
21355         vectors if possible and optab is available.
21356         * tree-vect-stmts.c (vectorizable_load): Likewise.
21357         * doc/md.texi (vec_extract, vec_init): Document that the optabs
21358         now have two modes.
21359         * config/i386/i386.c (ix86_expand_vector_init): Handle expansion
21360         of vec_init from half-sized vectors with the same element mode.
21361         * config/i386/sse.md (ssehalfvecmode): Add V4TI case.
21362         (ssehalfvecmodelower, ssescalarmodelower): New mode attributes.
21363         (reduc_plus_scal_v8df, reduc_plus_scal_v4df, reduc_plus_scal_v2df,
21364         reduc_plus_scal_v16sf, reduc_plus_scal_v8sf, reduc_plus_scal_v4sf,
21365         reduc_<code>_scal_<mode>, reduc_umin_scal_v8hi): Add element mode
21366         after mode in gen_vec_extract* calls.
21367         (vec_extract<mode>): Renamed to ...
21368         (vec_extract<mode><ssescalarmodelower>): ... this.
21369         (vec_extract<mode><ssehalfvecmodelower>): New expander.
21370         (rotl<mode>3, rotr<mode>3, <shift_insn><mode>3, ashrv2di3): Add
21371         element mode after mode in gen_vec_init* calls.
21372         (VEC_INIT_HALF_MODE): New mode iterator.
21373         (vec_init<mode>): Renamed to ...
21374         (vec_init<mode><ssescalarmodelower>): ... this.
21375         (vec_init<mode><ssehalfvecmodelower>): New expander.
21376         * config/i386/mmx.md (vec_extractv2sf): Renamed to ...
21377         (vec_extractv2sfsf): ... this.
21378         (vec_initv2sf): Renamed to ...
21379         (vec_initv2sfsf): ... this.
21380         (vec_extractv2si): Renamed to ...
21381         (vec_extractv2sisi): ... this.
21382         (vec_initv2si): Renamed to ...
21383         (vec_initv2sisi): ... this.
21384         (vec_extractv4hi): Renamed to ...
21385         (vec_extractv4hihi): ... this.
21386         (vec_initv4hi): Renamed to ...
21387         (vec_initv4hihi): ... this.
21388         (vec_extractv8qi): Renamed to ...
21389         (vec_extractv8qiqi): ... this.
21390         (vec_initv8qi): Renamed to ...
21391         (vec_initv8qiqi): ... this.
21392         * config/rs6000/vector.md (VEC_base_l): New mode attribute.
21393         (vec_init<mode>): Renamed to ...
21394         (vec_init<mode><VEC_base_l>): ... this.
21395         (vec_extract<mode>): Renamed to ...
21396         (vec_extract<mode><VEC_base_l>): ... this.
21397         * config/rs6000/paired.md (vec_initv2sf): Renamed to ...
21398         (vec_initv2sfsf): ... this.
21399         * config/rs6000/altivec.md (splitter, altivec_copysign_v4sf3,
21400         vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi,
21401         vec_unpacku_lo_v8hi, mulv16qi3, altivec_vreve<mode>2): Add
21402         element mode after mode in gen_vec_init* calls.
21403         * config/aarch64/aarch64-simd.md (vec_init<mode>): Renamed to ...
21404         (vec_init<mode><Vel>): ... this.
21405         (vec_extract<mode>): Renamed to ...
21406         (vec_extract<mode><Vel>): ... this.
21407         * config/aarch64/iterators.md (Vel): New mode attribute.
21408         * config/s390/s390.c (s390_expand_vec_strlen, s390_expand_vec_movstr):
21409         Add element mode after mode in gen_vec_extract* calls.
21410         * config/s390/vector.md (non_vec_l): New mode attribute.
21411         (vec_extract<mode>): Renamed to ...
21412         (vec_extract<mode><non_vec_l>): ... this.
21413         (vec_init<mode>): Renamed to ...
21414         (vec_init<mode><non_vec_l>): ... this.
21415         * config/s390/s390-builtins.def (s390_vlgvb, s390_vlgvh, s390_vlgvf,
21416         s390_vlgvf_flt, s390_vlgvg, s390_vlgvg_dbl): Add element mode after
21417         vec_extract mode.
21418         * config/arm/iterators.md (V_elem_l): New mode attribute.
21419         * config/arm/neon.md (vec_extract<mode>): Renamed to ...
21420         (vec_extract<mode><V_elem_l>): ... this.
21421         (vec_extractv2di): Renamed to ...
21422         (vec_extractv2didi): ... this.
21423         (vec_init<mode>): Renamed to ...
21424         (vec_init<mode><V_elem_l>): ... this.
21425         (reduc_plus_scal_<mode>, reduc_plus_scal_v2di, reduc_smin_scal_<mode>,
21426         reduc_smax_scal_<mode>, reduc_umin_scal_<mode>,
21427         reduc_umax_scal_<mode>, neon_vget_lane<mode>, neon_vget_laneu<mode>):
21428         Add element mode after gen_vec_extract* calls.
21429         * config/mips/mips-msa.md (vec_init<mode>): Renamed to ...
21430         (vec_init<mode><unitmode>): ... this.
21431         (vec_extract<mode>): Renamed to ...
21432         (vec_extract<mode><unitmode>): ... this.
21433         * config/mips/loongson.md (vec_init<mode>): Renamed to ...
21434         (vec_init<mode><unitmode>): ... this.
21435         * config/mips/mips-ps-3d.md (vec_initv2sf): Renamed to ...
21436         (vec_initv2sfsf): ... this.
21437         (vec_extractv2sf): Renamed to ...
21438         (vec_extractv2sfsf): ... this.
21439         (reduc_plus_scal_v2sf, reduc_smin_scal_v2sf, reduc_smax_scal_v2sf):
21440         Add element mode after gen_vec_extract* calls.
21441         * config/mips/mips.md (unitmode): New mode iterator.
21442         * config/spu/spu.c (spu_expand_prologue, spu_allocate_stack,
21443         spu_builtin_extract): Add element mode after gen_vec_extract* calls.
21444         * config/spu/spu.md (inner_l): New mode attribute.
21445         (vec_init<mode>): Renamed to ...
21446         (vec_init<mode><inner_l>): ... this.
21447         (vec_extract<mode>): Renamed to ...
21448         (vec_extract<mode><inner_l>): ... this.
21449         * config/sparc/sparc.md (veltmode): New mode iterator.
21450         (vec_init<VMALL:mode>): Renamed to ...
21451         (vec_init<VMALL:mode><VMALL:veltmode>): ... this.
21452         * config/ia64/vect.md (vec_initv2si): Renamed to ...
21453         (vec_initv2sisi): ... this.
21454         (vec_initv2sf): Renamed to ...
21455         (vec_initv2sfsf): ... this.
21456         (vec_extractv2sf): Renamed to ...
21457         (vec_extractv2sfsf): ... this.
21458         * config/powerpcspe/vector.md (VEC_base_l): New mode attribute.
21459         (vec_init<mode>): Renamed to ...
21460         (vec_init<mode><VEC_base_l>): ... this.
21461         (vec_extract<mode>): Renamed to ...
21462         (vec_extract<mode><VEC_base_l>): ... this.
21463         * config/powerpcspe/paired.md (vec_initv2sf): Renamed to ...
21464         (vec_initv2sfsf): ... this.
21465         * config/powerpcspe/altivec.md (splitter, altivec_copysign_v4sf3,
21466         vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi,
21467         vec_unpacku_lo_v8hi, mulv16qi3): Add element mode after mode in
21468         gen_vec_init* calls.
21469
21470 2017-08-01  Richard Biener  <rguenther@suse.de>
21471
21472         PR tree-optimization/81297
21473         * tree-vrp.c (get_single_symbol): Remove assert, instead drop
21474         TREE_OVERFLOW from INTEGER_CSTs.
21475
21476 2017-07-31  Segher Boessenkool  <segher@kernel.crashing.org>
21477
21478         * config/rs6000/rs6000.c (enum rs6000_reg_type): Delete trailing comma.
21479
21480 2017-07-31  Carl Love  <cel@us.ibm.com>
21481
21482         * config/rs6000/rs6000-c: Add support for built-in functions
21483         vector signed char vec_xl_be (signed long long, signed char *);
21484         vector unsigned char vec_xl_be (signed long long, unsigned char *);
21485         vector signed int vec_xl_be (signed long long, signed int *);
21486         vector unsigned int vec_xl_be (signed long long, unsigned int *);
21487         vector signed long long vec_xl_be (signed long long, signed long long *);
21488         vector unsigned long long vec_xl_be (signed long long, unsigned long long *);
21489         vector signed short vec_xl_be (signed long long, signed short *);
21490         vector unsigned short vec_xl_be (signed long long, unsigned short *);
21491         vector double vec_xl_be (signed long long, double *);
21492         vector float vec_xl_be (signed long long, float *);
21493         * config/rs6000/altivec.h (vec_xl_be): Add #define.
21494         * config/rs6000/rs6000-builtin.def (XL_BE_V16QI, XL_BE_V8HI, XL_BE_V4SI)
21495         XL_BE_V2DI, XL_BE_V4SF, XL_BE_V2DF, XL_BE): Add definitions
21496         for the builtins.
21497         * config/rs6000/rs6000.c (altivec_expand_xl_be_builtin): Add function.
21498         (altivec_expand_builtin): Add switch statement to call
21499         altivec_expand_xl_be for each builtin.
21500         (altivec_init_builtins): Add def_builtin for _builtin_vsx_le_be_v8hi,
21501         __builtin_vsx_le_be_v4si, __builtin_vsx_le_be_v2di,
21502         __builtin_vsx_le_be_v4sf, __builtin_vsx_le_be_v2df,
21503         __builtin_vsx_le_be_v16qi.
21504         * doc/extend.texi: Update the built-in documentation file for the
21505         new built-in functions.
21506
21507 2017-07-31  Uros Bizjak  <ubizjak@gmail.com>
21508
21509         PR target/25967
21510         * config/i386/i386.c (ix86_allocate_stack_slots_for_args):
21511         New function.
21512         (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
21513
21514 2017-07-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
21515
21516         * config.gcc: Add z14.
21517         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
21518         CPU model numbers for z13s and z14.
21519         * config/s390/s390-c.c (s390_resolve_overloaded_builtin): Replace
21520         arch12 with z14.
21521         * config/s390/s390-opts.h (enum processor_type): Rename
21522         PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
21523         * config/s390/s390.c (processor_table): Add field for CPU name to
21524         be passed to Binutils.
21525         (s390_asm_output_machine_for_arch): Use the new field in
21526         processor_table for Binutils.
21527         (s390_expand_builtin): Replace arch12 with z14.
21528         (s390_issue_rate): Rename PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
21529         (s390_get_sched_attrmask): Likewise.
21530         (s390_get_unit_mask): Likewise.
21531         * config/s390/s390.opt: Add z14 to processor_type enum.
21532
21533 2017-07-31  Martin Jambor  <mjambor@suse.cz>
21534
21535         PR hsa/81477
21536         * ipa-fnsummary.c (ipa_fn_summary_generate): Set versionable
21537         regardless of optimization level.
21538
21539 2017-07-31  Jan Hubicka <hubicka@ucw.cz>
21540             Martin Liska  <mliska@suse.cz>
21541
21542         * predict.def: Remove old comment and adjust probability.
21543         * gimplify.c (should_warn_for_implicit_fallthrough): Ignore
21544         PREDICT statements.
21545
21546 2017-07-31  Uros Bizjak  <ubizjak@gmail.com>
21547
21548         PR target/25967
21549         * config/i386/i386.c (ix86_function_naked): New function.
21550         (ix86_can_use_return_insn_p): Return false for naked functions.
21551         (ix86_expand_prologue): Skip prologue for naked functions.
21552         (ix86_expand_epilogue): Skip epilogue for naked functions
21553         and emit trap instruction.
21554         (ix86_warn_func_return): New function.
21555         (ix86_attribute_table): Add "naked" attribute specification.
21556         (TARGET_WARN_FUNC_RETURN): Define.
21557         * doc/extend.texi (x86 Function Attributes) <naked>: Document it.
21558
21559 2017-07-31  Martin Liska  <mliska@suse.cz>
21560
21561         * gimple-pretty-print.c (dump_gimple_label): Never dump BB info.
21562         (dump_gimple_bb_header): Always dump BB info.
21563         (pp_cfg_jump): Do not append info about BB when dumping a jump.
21564
21565 2017-07-31  Martin Liska  <mliska@suse.cz>
21566
21567         PR sanitize/81530
21568         * convert.c (convert_to_integer_1): Guard condition with flag_sanitize_p
21569         also with current_function_decl non-null equality.
21570
21571 2017-07-31  Jakub Jelinek  <jakub@redhat.com>
21572
21573         PR sanitizer/81604
21574         * ubsan.c (ubsan_type_descriptor): For UBSAN_PRINT_ARRAY don't
21575         change type to the element type, instead add eltype variable and
21576         use it where we are interested in the element type.
21577
21578         PR tree-optimization/81603
21579         * ipa-polymorphic-call.c
21580         (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Perform
21581         offset arithmetic in offset_int, bail out if the resulting bit offset
21582         doesn't fit into shwi.
21583
21584 2017-07-31  Martin Liska  <mliska@suse.cz>
21585
21586         * gimplify.c (mostly_copy_tree_r): Remove Java specific hunk.
21587         (gimplify_save_expr): Fix comment.
21588
21589 2017-07-30  H.J. Lu  <hongjiu.lu@intel.com>
21590
21591         PR target/79793
21592         * config/i386/i386.c (ix86_function_arg): Update arguments for
21593         exception handler.
21594         (ix86_compute_frame_layout): Set the initial stack offset to
21595         INCOMING_FRAME_SP_OFFSET.  Update red-zone offset with
21596         INCOMING_FRAME_SP_OFFSET.
21597         (ix86_expand_epilogue): Don't pop the 'ERROR_CODE' off the
21598         stack before exception handler returns.
21599         * config/i386/i386.h (INCOMING_FRAME_SP_OFFSET): Add the
21600         the 'ERROR_CODE' for exception handler.
21601
21602 2017-07-30  Uros Bizjak  <ubizjak@gmail.com>
21603
21604         * config/i386/i386.h (ASM_PRINTF_EXTENSIONS): New macro.
21605         (ASM_OUTPUT_REG_PUSH): Rewrite with new operand modifiers.
21606         (ASM_OUTPUT_REG_POP): Ditto.
21607         * config/i386/i386.c (ix86_asm_output_function_label): Use fputs
21608         instead of asm_fprintf to output pure string.
21609
21610 2017-07-29  Jakub Jelinek  <jakub@redhat.com>
21611
21612         * debug.h (struct gcc_debug_hooks): Add IMPLICIT argument
21613         to imported_module_or_decl hook.
21614         (debug_nothing_tree_tree_tree_bool): Remove.
21615         (debug_nothing_tree_tree_tree_bool_bool): New declaration.
21616         * debug.c (do_nothing_debug_hooks): Use
21617         debug_nothing_tree_tree_tree_bool_bool instead of
21618         debug_nothing_tree_tree_tree_bool.
21619         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
21620         * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
21621         * sdbout.c (sdb_debug_hooks): Likewise.
21622         * dwarf2out.c (dwarf2_lineno_debug_hooks): Likewise.
21623         (gen_namespace_die): Add DW_AT_export_symbols attribute if
21624         langhook wants it.
21625         (dwarf2out_imported_module_or_decl): Add IMPLICIT argument,
21626         if true, -gdwarf-5 and decl will have DW_AT_export_symbols
21627         attribute, don't add anything.
21628
21629 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21630
21631         * fold-const.c (fold_build1_stat_loc): Remove _stat from name.
21632         (fold_build2_stat_loc): Likewise.
21633         (fold_build3_stat_loc): Likewise.
21634         * fold-const.h (fold_build1, fold_build2, fold_build3): Adjust.
21635         (fold_build1_loc): Remove macro.
21636         (fold_build2_loc): Likewise.
21637         (fold_build3_loc): Likewise.
21638
21639 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21640
21641         * gimple.c (gimple_build_debug_bind_stat): Remove _stat from name.
21642         (gimple_build_debug_bind_source_stat): Likewise.
21643         * gimple.h (gimple_build_debug_bind): Remove macro.
21644         (gimple_build_debug_bind_source): Likewise.
21645
21646 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21647
21648         * bitmap.c (bitmap_alloc): Adjust.
21649         (bitmap_gc_alloc): Likewise.
21650         * bitmap.h (bitmap_initialize_stat): Remove _stat from name.
21651
21652 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21653
21654         * bitmap.c (bitmap_obstack_alloc_stat): Rename to bitmap_alloc.
21655         (bitmap_gc_alloc_stat): Rename to bitmap_gc_alloc.
21656         * bitmap.h (bitmap_obstack_alloc_stat): Adjust prototype.
21657         (bitmap_gc_alloc_stat): Likewise.
21658         (BITMAP_ALLOC, BITMAP_GGC_ALLOC): Adjust.
21659
21660 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21661
21662         * rtl.c (shallow_copy_rtx_stat): Remove _stat from name.
21663         * rtl.h (shallow_copy_rtx): Remove macro.
21664
21665 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21666
21667         * emit-rtl.c (gen_raw_REG): Adjust.
21668         * gengenrtl.c (gendef): Likewise.
21669         * rtl.c (rtx_alloc_stat): Remove _stat from name.
21670         * rtl.h (rtx_alloc): Remove macro.
21671
21672 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21673
21674         * tree.c (build_tree_list_vec_stat): Remove _stat from name.
21675         (build_tree_list_stat): Likewise.
21676         * tree.h (build_tree_list): Remove macro.
21677         (build_tree_list_vec): Likewise.
21678
21679 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21680
21681         * tree.c (make_vector_stat): Remove _stat from name.
21682         (build_vector_stat): Likewise.
21683         * tree.h (make_vector_stat): Remove macro.
21684         (build_vector_stat): Likewise.
21685
21686 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21687
21688         * tree.h (build_var_debug_value): Remove prototype.
21689
21690 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21691
21692         * tree.c (tree_cons_stat): Remove _stat from name.
21693         * tree.h (tree_cons): Remove macro.
21694
21695 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21696
21697         * tree.c (build_vl_exp_stat): Remove _stat from name.
21698         * tree.h (build_vl_exp): Remove macro.
21699
21700 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21701
21702         * tree.c (build_decl_stat): Remove _stat from name.
21703         * tree.h (build_decl): Remove macro.
21704
21705 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21706
21707         * gimple.c (gimple_build_with_ops_stat): Adjust.
21708         (gimple_alloc_stat): Remove _stat from name.
21709         * gimple.h (gimple_alloc): Remove macro.
21710
21711 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21712
21713         * tree.c (make_tree_vec_stat): Remove _stat from name.
21714         (grow_tree_vec_stat): Likewise.
21715         * tree.h (make_tree_vec_stat): Adjust prototype.
21716         (grow_tree_vec_stat): Likewise.
21717         (make_tree_vec): Remove macro.
21718         (grow_tree_vec): Likewise.
21719
21720 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21721
21722         * fold-const.c (fold_build1_stat_loc): Adjust.
21723         (fold_build2_stat_loc): Likewise.
21724         (fold_build3_stat_loc): Likewise.
21725         * tree.c (build0_stat): Remove _stat from name.
21726         (build1_stat): Likewise.
21727         (build2_stat): Likewise.
21728         (build3_stat): Likewise.
21729         (build4_stat): Likewise.
21730         (build5_stat): Likewise.
21731         * tree.h (build1_loc): Remove macro, and rename _stat function
21732         to this.
21733         (build2_loc): Likewise.
21734         (build3_loc): Likewise.
21735         (build4_loc): Likewise.
21736         (build5_loc): Likewise.
21737
21738 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21739
21740         * tree.c (make_int_cst_stat): Remove _stat from name.
21741         * tree.h (make_int_cst_stat): Adjust prototype.
21742         (make_int_cst): Remove macro.
21743
21744 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21745
21746         * tree.c (make_tre_binfo_stat): Remove _stat from name.
21747         * tree.h (make_tree_binfo_stat): Adjust prototype.
21748         (make_tree_binfo): Remove.
21749
21750 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21751
21752         * tree.c (copy_node_stat): Rename to copy_node.
21753         (build_distinct_type_copy): Adjust.
21754         * tree.h (copy_node_stat): Adjust prototype.
21755         (copy_node): Remove macro.
21756
21757 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21758
21759         * tree.c (make_node_stat): rename to make_node.
21760         (build_tree_list_stat): Adjust.
21761         (build0_stat): Likewise.
21762         (build2_stat): Likewise.
21763         (build3_stat): Likewise.
21764         (build4_stat): Likewise.
21765         (build5_stat): Likewise.
21766         (build_decl_stat): Likewise.
21767         * tree.h (make_node_stat): Adjust prototype.
21768         (make_node): remove macro.
21769
21770 2017-07-28  Peter Bergner  <bergner@vnet.ibm.com>
21771
21772         * config/rs6000/ppc-auxv.h (PPC_FEATURE2_DARN): New define.
21773         (PPC_FEATURE2_SCV): Likewise.
21774         * config/rs6000/rs6000.c (cpu_supports_info): Use them.
21775
21776 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
21777
21778         * config/aarch64/aarch64.c
21779         (aarch64_internal_mov_immediate): Add new special pattern.
21780         * config/aarch64/aarch64.md (*movdi_aarch64):
21781         Add reg/32bit const mov case.
21782
21783 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
21784             Richard Sandiford <richard.sandiford@linaro.org>
21785
21786         * config/aarch64/aarch64.md (mov<mode>): Generalize.
21787         (*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
21788         Add integer and movi cases.
21789         (movi-split-hf-df-sf split, fp16): New.
21790         (enabled): Added TARGET_FP_F16INST.
21791         * config/aarch64/iterators.md (GPF_HF): New.
21792         * config/aarch64/predicates.md (aarch64_reg_or_fp_float): New.
21793
21794 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
21795
21796         * config/aarch64/aarch64.c
21797         (aarch64_simd_container_mode): Add prototype.
21798         (aarch64_expand_mov_immediate): Add HI support.
21799         (aarch64_reinterpret_float_as_int, aarch64_float_const_rtx_p: New.
21800         (aarch64_can_const_movi_rtx_p): New.
21801         (aarch64_preferred_reload_class):
21802         Remove restrictions of using FP registers for certain SIMD operations.
21803         (aarch64_rtx_costs): Added new cost for CONST_DOUBLE moves.
21804         (aarch64_valid_floating_const): Add integer move validation.
21805         (aarch64_simd_imm_scalar_p): Remove.
21806         (aarch64_output_scalar_simd_mov_immediate): Generalize function.
21807         (aarch64_legitimate_constant_p): Expand list of supported cases.
21808         * config/aarch64/aarch64-protos.h
21809         (aarch64_float_const_rtx_p, aarch64_can_const_movi_rtx_p): New.
21810         (aarch64_reinterpret_float_as_int): New.
21811         (aarch64_simd_imm_scalar_p): Remove.
21812         * config/aarch64/constraints.md (Uvi): New.
21813         (Dd): Split into Ds and new Dd.
21814         * config/aarch64/aarch64.md (*movsi_aarch64):
21815         Add SIMD mov case.
21816         (*movdi_aarch64): Add SIMD mov case.
21817
21818 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
21819
21820         * tree-predcom.c: (struct chain): Handle store-store chain in which
21821         stores for elimination only store loop invariant values.
21822         (execute_pred_commoning_chain): Ditto.
21823         (prepare_initializers_chain_store_elim): Ditto.
21824         (prepare_finalizers): Ditto.
21825         (is_inv_store_elimination_chain): New function.
21826         (initialize_root_vars_store_elim_1): New function.
21827
21828 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
21829
21830         * tree-predcom.c: Revise general description of the pass.
21831         (enum chain_type): New enum type for store elimination.
21832         (struct chain): New field supporting store elimination.
21833         (struct component): Ditto.
21834         (dump_chain): Dump store-stores chain.
21835         (release_chain): Release resources.
21836         (split_data_refs_to_components): Compute and create component
21837         contains only stores for elimination.
21838         (get_chain_last_ref_at): New function.
21839         (make_invariant_chain): Initialization.
21840         (make_rooted_chain): Specify chain type in parameter and record it.
21841         (add_looparound_copies): Skip for store-stores chain.
21842         (determine_roots_comp): Compute type of chain and pass it to
21843         make_rooted_chain.
21844         (initialize_root_vars_store_elim_2): New function.
21845         (finalize_eliminated_stores): New function.
21846         (remove_stmt): Handle store for elimination.
21847         (execute_pred_commoning_chain): Execute predictive commoning on
21848         store-store chains.
21849         (determine_unroll_factor): Skip unroll for store-stores chain.
21850         (prepare_initializers_chain_store_elim): New function.
21851         (prepare_initializers_chain): Hanlde store-store chain.
21852         (prepare_finalizers_chain, prepare_finalizers): New function.
21853         (tree_predictive_commoning_loop): Return integer value indicating
21854         if loop is unrolled or lcssa form is corrupted.
21855         (tree_predictive_commoning): Rewrite for lcssa form if necessary.
21856
21857 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
21858
21859         * tree-predcom.c (initialize_root): Delete.
21860         (execute_pred_commoning_chain): Initialize root vars and replace
21861         reference of non-combined chain directly, rather than call above
21862         function.
21863
21864 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
21865
21866         * tree-predcom.c (ref_at_iteration): Add parameter NITERS.  Compute
21867         memory reference to DR at (NITERS + ITERS)-th iteration of loop.
21868
21869 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
21870
21871         * tree-predcom.c (struct chain): New field init_seq.
21872         (release_chain): Release init_seq.
21873         (prepare_initializers_chain): Record intialization stmts in above
21874         field.
21875         (insert_init_seqs): New function.
21876         (tree_predictive_commoning_loop): Call insert_init_seqs.
21877
21878 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
21879
21880         * tree-predcom.c (determine_roots_comp): Skip trivial components.
21881
21882 2017-07-28  Richard Biener  <rguenther@suse.de>
21883
21884         * match.pd: Remove superfluous :c.
21885         * genmatch.c (simplify::id): Add member.
21886         (lower_commutative, lower_opt_convert, lower_cond, lower_for):
21887         Copy id.
21888         (current_id): New global.
21889         (dt_node::parent): Move from ...
21890         (dt_operand::parent): ... here.  Add for_id member.
21891         (is_a_helper <dt_operand *>::test): DT_TRUE is also a dt_operand.
21892         (decision_tree::find_node): Relax order requirement when
21893         merging DT_TRUE nodes to ones inbetween the current simplify
21894         and the one we try to merge with.  Add diagnostic whenever
21895         we need to enforce pattern order by not merging.
21896         (decision_tree::insert): Set current_id.
21897         (decision_tree::print_node): Dump parent node and for_id.
21898         (parser::last_id): Add member.
21899         (parser::push_simplify): Assign unique id.
21900         (parser::parser): Initialize last_id.
21901
21902 2017-07-28  Martin Liska  <mliska@suse.cz>
21903
21904         PR sanitizer/81340
21905         * sanopt.c (sanitize_rewrite_addressable_params): Set VALUE_EXPR after
21906         gimple_build_debug_bind.
21907
21908 2017-07-28  Richard Biener  <rguenther@suse.de>
21909
21910         PR tree-optimization/81502
21911         * match.pd: Add pattern combining BIT_INSERT_EXPR with
21912         BIT_FIELD_REF.
21913         * tree-cfg.c (verify_expr): Verify types of BIT_FIELD_REF
21914         size/pos operands.
21915         (verify_gimple_assign_ternary): Likewise for BIT_INSERT_EXPR pos.
21916         * gimple-fold.c (maybe_canonicalize_mem_ref_addr): Use bitsizetype
21917         for BIT_FIELD_REF args.
21918         * fold-const.c (make_bit_field_ref): Likewise.
21919         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
21920
21921 2017-07-28  Jakub Jelinek  <jakub@redhat.com>
21922
21923         PR sanitizer/80998
21924         * sanopt.c (pass_sanopt::execute): Handle IFN_UBSAN_PTR.
21925         * tree-ssa-alias.c (call_may_clobber_ref_p_1): Likewise.
21926         * flag-types.h (enum sanitize_code): Add SANITIZER_POINTER_OVERFLOW.
21927         Or it into SANITIZER_UNDEFINED.
21928         * ubsan.c: Include gimple-fold.h and varasm.h.
21929         (ubsan_expand_ptr_ifn): New function.
21930         (instrument_pointer_overflow): New function.
21931         (maybe_instrument_pointer_overflow): New function.
21932         (instrument_object_size): Formatting fix.
21933         (pass_ubsan::execute): Call instrument_pointer_overflow
21934         and maybe_instrument_pointer_overflow.
21935         * internal-fn.c (expand_UBSAN_PTR): New function.
21936         * ubsan.h (ubsan_expand_ptr_ifn): Declare.
21937         * sanitizer.def (__ubsan_handle_pointer_overflow,
21938         __ubsan_handle_pointer_overflow_abort): New builtins.
21939         * tree-ssa-tail-merge.c (merge_stmts_p): Handle IFN_UBSAN_PTR.
21940         * internal-fn.def (UBSAN_PTR): New internal function.
21941         * opts.c (sanitizer_opts): Add pointer-overflow.
21942         * lto-streamer-in.c (input_function): Handle IFN_UBSAN_PTR.
21943         * fold-const.c (build_range_check): Compute pointer range check in
21944         integral type if pointer arithmetics would be needed.  Formatting
21945         fixes.
21946
21947 2017-07-28  Martin Liska  <mliska@suse.cz>
21948
21949         PR sanitizer/81460
21950         * sanopt.c (sanitize_rewrite_addressable_params): Do not rewrite
21951         parameters that are of a variable-length.
21952
21953 2017-07-28  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21954
21955         * config.gcc (powerpc-*-rtems*): Remove rs6000/eabi.h.  Add
21956         rs6000/biarch64.h.
21957         * config/rs6000/rtems.h (ASM_DECLARE_FUNCTION_SIZE): New macro.
21958         (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise.
21959         (CRT_CALL_STATIC_FUNCTION): Likewise.
21960         (ASM_DEFAULT_SPEC): New define.
21961         (ASM_SPEC32): Likewise.
21962         (ASM_SPEC64): Likewise.
21963         (ASM_SPEC_COMMON): Likewise.
21964         (ASM_SPEC): Likewise.
21965         (INVALID_64BIT): Likewise.
21966         (LINK_OS_DEFAULT_SPEC): Likewise.
21967         (LINK_OS_SPEC32): Likewise.
21968         (LINK_OS_SPEC64): Likewise.
21969         (POWERPC_LINUX): Likewise.
21970         (PTRDIFF_TYPE): Likewise.
21971         (RESTORE_FP_PREFIX): Likewise.
21972         (RESTORE_FP_SUFFIX): Likewise.
21973         (SAVE_FP_PREFIX): Likewise.
21974         (SAVE_FP_SUFFIX): Likewise.
21975         (SIZE_TYPE): Likewise.
21976         (SUBSUBTARGET_OVERRIDE_OPTIONS): Likewise.
21977         (TARGET_64BIT): Likewise.
21978         (TARGET_64BIT): Likewise.
21979         (TARGET_AIX): Likewise.
21980         (WCHAR_TYPE_SIZE): Likewise.
21981         (WCHAR_TYPE): Undefine.
21982         (TARGET_OS_CPP_BUILTINS): Add 64-bit PowerPC defines.
21983         (CPP_OS_DEFAULT_SPEC): Use previous CPP_OS_RTEMS_SPEC.
21984         (CPP_OS_RTEMS_SPEC): Delete.
21985         (SUBSUBTARGET_EXTRA_SPECS): Remove cpp_os_rtems.  Add
21986         asm_spec_common, asm_spec32, asm_spec64, link_os_spec32, and
21987         link_os_spec64.
21988         * config/rs6000/t-rtems: Add mcpu=e6500/m64 multilibs.
21989
21990 2017-07-28  Jakub Jelinek  <jakub@redhat.com>
21991
21992         PR tree-optimization/81578
21993         * tree-parloops.c (build_new_reduction): Bail out if
21994         reduction_code isn't one of the standard OpenMP reductions.
21995         Move the details printing after that decision.
21996
21997 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
21998
21999         * config/rs6000/predicates.md (volatile_mem_operand): Remove code
22000         related to reload_in_progress.
22001         (splat_input_operand): Likewise.
22002         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_rtx):
22003         Delete prototype.
22004         * config/rs6000/rs6000.c (machine_function): Remove sdmode_stack_slot
22005         field.
22006         (TARGET_EXPAND_TO_RTL_HOOK): Delete.
22007         (TARGET_INSTANTIATE_DECLS): Likewise.
22008         (legitimate_indexed_address_p): Delete reload_in_progress code.
22009         (rs6000_debug_legitimate_address_p): Likewise.
22010         (rs6000_eliminate_indexed_memrefs): Likewise.
22011         (rs6000_emit_le_vsx_store): Likewise.
22012         (rs6000_emit_move_si_sf_subreg): Likewise.
22013         (rs6000_emit_move): Likewise.
22014         (register_to_reg_type): Likewise.
22015         (rs6000_pre_atomic_barrier): Likewise.
22016         (rs6000_machopic_legitimize_pic_address): Likewise.
22017         (rs6000_allocate_stack_temp): Likewise.
22018         (rs6000_address_for_fpconvert): Likewise.
22019         (rs6000_address_for_altivec): Likewise.
22020         (rs6000_secondary_memory_needed_rtx): Delete function.
22021         (rs6000_check_sdmode): Likewise.
22022         (rs6000_alloc_sdmode_stack_slot): Likewise.
22023         (rs6000_instantiate_decls): Likewise.
22024         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED_RTX): Delete.
22025         * config/rs6000/rs6000.md (splitter for *movsi_got_internal):
22026         Delete reload_in_progress.
22027         (*vec_reload_and_plus_<mptrsize>): Likewise.
22028         * config/rs6000/vsx.md (vsx_mul_v2di): Likewise.
22029         (vsx_div_v2di): Likewise.
22030         (vsx_udiv_v2di): Likewise.
22031
22032 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
22033
22034         * config/rs6000/rs6000.opt (mlra): Replace with stub.
22035         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete OPTION_MASK_LRA.
22036         * config/rs6000/rs6000.c (TARGET_LRA_P): Delete.
22037         (rs6000_debug_reg_global): Delete print of LRA status.
22038         (rs6000_option_override_internal): Delete dead LRA related code.
22039         (rs6000_lra_p): Delete function.
22040         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mlra.
22041
22042 2017-07-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
22043
22044         * config.gcc (riscv*-*-elf*): Add (riscv*-*-rtems*).
22045         * config/riscv/rtems.h: New file.
22046
22047 2017-07-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22048             Sudakshina Das  <sudi.das@arm.com>
22049
22050         * config/aarch64/aarch64.md
22051         (define_split for and<mode>3nr_compare): Move
22052         non aarch64_logical_operand to a register.
22053         (define_split for and_<SHIFT:optab><mode>3nr_compare0): Move non
22054         register immediate operand to a register.
22055         * config/aarch64/predicates.md (aarch64_mov_imm_operand): New.
22056
22057 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
22058
22059         PR middle-end/81564
22060         * tree-cfg.c (group_case_labels_stmt): Handle already deleted blocks.
22061
22062 2017-07-27  Richard Biener  <rguenther@suse.de>
22063
22064         PR tree-optimization/81573
22065         PR tree-optimization/81494
22066         * tree-vect-loop.c (vect_create_epilog_for_reduction): Handle
22067         multi defuse cycle case.
22068
22069 2017-07-27  Richard Biener  <rguenther@suse.de>
22070
22071         PR tree-optimization/81571
22072         * tree-vect-slp.c (vect_build_slp_tree): Properly verify reduction
22073         PHIs.
22074
22075 2017-07-27  Eric Botcazou  <ebotcazou@adacore.com>
22076
22077         * config/sparc/sparc.c (sparc_option_override): Set MASK_FSMULD flag
22078         earlier and only if MASK_FPU is set.  Adjust formatting.
22079
22080 2017-07-27  Martin Liska  <mliska@suse.cz>
22081
22082         * opt-functions.awk: Add validation of value of Init.
22083         * optc-gen.awk: Pass new argument.
22084
22085 2017-07-27  Martin Liska  <mliska@suse.cz>
22086
22087         * auto-profile.c (autofdo_source_profile::update_inlined_ind_target):
22088         Fix wrong condition.
22089
22090 2017-07-27  Martin Liska  <mliska@suse.cz>
22091
22092         * auto-profile.c (afdo_annotate_cfg): Assign zero counts to
22093         BBs and edges seen by autoFDO.
22094
22095 2017-07-27  Richard Biener  <rguenther@suse.de>
22096
22097         PR tree-optimization/81502
22098         * tree-ssa.c (non_rewritable_lvalue_p): Handle BIT_INSERT_EXPR
22099         with incompatible but same sized type.
22100         (execute_update_addresses_taken): Likewise.
22101
22102 2017-07-27  James Greenhalgh  <james.greenhalgh@arm.com>
22103
22104         * tree-ssa-loop-ch.c (pass_ch::process_loop_p): Guard on
22105         flag_tree_loop_vectorize rather than flag_tree_vectorize.
22106
22107 2017-07-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22108
22109         PR target/81534
22110         * config/s390/s390.md ("*atomic_compare_and_swap<mode>_1")
22111         ("*atomic_compare_and_swapdi_2", "*atomic_compare_and_swapsi_3"):
22112         Change s_operand to memory_operand.
22113
22114 2017-07-27  Richard Sandiford  <richard.sandiford@linaro.org>
22115
22116         * config/rs6000/rs6000-protos.h (rs6000_emit_le_vsx_permute): Declare.
22117         * config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Replace with...
22118         (rs6000_emit_le_vsx_permute): ...this.  Take the destination as input.
22119         Emit instructions rather than returning an expression.  Handle TFmode
22120         and KFmode by casting to TImode.
22121         (rs6000_emit_le_vsx_load): Update to use rs6000_emit_le_vsx_permute.
22122         (rs6000_emit_le_vsx_store): Likewise.
22123         * config/rs6000/vsx.md (VSX_TI): New iterator.
22124         (*vsx_le_permute_<mode>): Use it instead of VSX_LE_128.
22125         (*vsx_le_undo_permute_<mode>): Likewise.
22126         (*vsx_le_perm_load_<mode>): Use rs6000_emit_le_vsx_permute to
22127         emit the split sequence.
22128         (*vsx_le_perm_store_<mode>): Likewise.
22129
22130 2017-07-27  Jakub Jelinek  <jakub@redhat.com>
22131
22132         PR tree-optimization/81555
22133         PR tree-optimization/81556
22134         * tree-ssa-reassoc.c (rewrite_expr_tree): Add NEXT_CHANGED argument,
22135         if true, force CHANGED for the recursive invocation.
22136         (reassociate_bb): Remember original length of ops array, pass
22137         len != orig_len as NEXT_CHANGED in rewrite_expr_tree call.
22138
22139         * attribs.c (decl_attributes): Imply noinline, noclone and no_icf
22140         attributes for noipa attribute.  For naked attribute use
22141         lookup_attribute first before lookup_attribute_spec.
22142         * final.c (rest_of_handle_final): Disable IPA RA for functions with
22143         noipa attribute.
22144         * ipa-visibility.c (non_local_p): Fix comment typos.  Return true
22145         for functions with noipa attribute.
22146         (cgraph_externally_visible_p): Return true for functions with noipa
22147         attribute.
22148         * cgraph.c (cgraph_node::get_availability): Return AVAIL_INTERPOSABLE
22149         for functions with noipa attribute.
22150         * doc/extend.texi: Document noipa function attribute.
22151         * tree-ssa-structalias.c (refered_from_nonlocal_fn): Set *nonlocal_p
22152         also for functions with noipa attribute.
22153         (ipa_pta_execute): Set nonlocal_p also for nodes with noipa attribute.
22154
22155 2017-07-26  Andrew Pinski  <apinski@cavium.com>
22156
22157         * config/aarch64/aarch64.c (thunderx_vector_cost): Decrease cost of
22158         vec_unalign_load_cost and vec_unalign_store_cost.
22159
22160 2017-07-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
22161
22162         * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Delete
22163         -mvsx-small-integer option.
22164         (ISA_3_0_MASKS_IEEE): Likewise.
22165         (OTHER_VSX_VECTOR_MASKS): Likewise.
22166         (POWERPC_MASKS): Likewise.
22167         * config/rs6000/rs6000.opt (-mvsx-small-integer): Likewise.
22168         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Simplify
22169         code, only testing for DImode being allowed in non-VSX floating
22170         point registers.
22171         (rs6000_init_hard_regno_mode_ok): Change TARGET_VSX_SMALL_INTEGER
22172         to TARGET_P8_VECTOR test.  Remove redundant VSX test inside of
22173         another VSX test.
22174         (rs6000_option_override_internal): Delete -mvsx-small-integer.
22175         (rs6000_expand_vector_set): Change TARGET_VSX_SMALL_INTEGER to
22176         TARGET_P8_VECTOR test.
22177         (rs6000_secondary_reload_simple_move): Likewise.
22178         (rs6000_preferred_reload_class): Delete TARGET_VSX_SMALL_INTEGER,
22179         since TARGET_P9_VECTOR was already tested.
22180         (rs6000_opt_masks): Remove -mvsx-small-integer.
22181         * config/rs6000/vsx.md (vsx_extract_<mode>): Delete
22182         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
22183         used.
22184         (vsx_extract_<mode>_p9): Delete TARGET_VSX_SMALL_INTEGER, since a
22185         test for TARGET_VEXTRACTUB was used, and that uses
22186         TARGET_P9_VECTOR.
22187         (p9 extract splitter): Likewise.
22188         (vsx_extract_<mode>_di_p9): Likewise.
22189         (vsx_extract_<mode>_store_p9): Likewise.
22190         (vsx_extract_si): Delete TARGET_VSX_SMALL_INTEGER, since a test
22191         for TARGET_P9_VECTOR was used.  Delete code that is now dead with
22192         the elimination of TARGET_VSX_SMALL_INTEGER.
22193         (vsx_extract_<mode>_p8): Likewise.
22194         (vsx_ext_<VSX_EXTRACT_I:VS_scalar>_fl_<FL_CONV:mode>): Likewise.
22195         (vsx_ext_<VSX_EXTRACT_I:VS_scalar>_ufl_<FL_CONV:mode>): Likewise.
22196         (vsx_set_<mode>_p9): Likewise.
22197         (vsx_set_v4sf_p9): Likewise.
22198         (vsx_set_v4sf_p9_zero): Likewise.
22199         (vsx_insert_extract_v4sf_p9): Likewise.
22200         (vsx_insert_extract_v4sf_p9_2): Likewise.
22201         * config/rs6000/rs6000.md (sign extend splitter): Change
22202         TARGET_VSX_SMALL_INTEGER to TARGET_P8_VECTOR test.
22203         (floatsi<mode>2_lfiwax_mem): Likewise.
22204         (floatunssi<mode>2_lfiwzx_mem): Likewise.
22205         (float<QHI:mode><FP_ISA3:mode>2): Delete TARGET_VSX_SMALL_INTEGER,
22206         since a test for TARGET_P9_VECTOR was used.
22207         (float<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
22208         (floatuns<QHI:mode><FP_ISA3:mode>2): Likewise.
22209         (floatuns<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
22210         (fix_trunc<mode>si2): Change TARGET_VSX_SMALL_INTEGER to
22211         TARGET_P8_VECTOR test.
22212         (fix_trunc<mode>si2_stfiwx): Likewise.
22213         (fix_trunc<mode>si2_internal): Likewise.
22214         (fix_trunc<SFDF:mode><QHI:mode>2): Delete
22215         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
22216         used.
22217         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
22218         (fixuns_trunc<mode>si2): Change TARGET_VSX_SMALL_INTEGER to
22219         TARGET_P8_VECTOR test.
22220         (fixuns_trunc<mode>si2_stfiwx): Likewise.
22221         (fixuns_trunc<SFDF:mode><QHI:mode>2): Delete
22222         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
22223         used.
22224         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
22225         (fctiw<u>z_<mode>_smallint): Delete TARGET_VSX_SMALL_INTEGER,
22226         since a test for TARGET_P9_VECTOR was used.
22227         (splitter for loading small constants): Likewise.
22228
22229 2017-07-26  Andrew Pinski  <apinski@cavium.com>
22230
22231         * config/aarch64/aarch64.c (thunderx_vector_cost): Fix
22232         vec_fp_stmt_cost.
22233
22234 2017-07-26  H.J. Lu  <hongjiu.lu@intel.com>
22235
22236         PR target/81563
22237         * config/i386/i386.c (sp_valid_at): Properly check CFA offset.
22238         (fp_valid_at): Likewise.
22239
22240 2017-07-26  James Greenhalgh  <james.greenhalgh@arm.com>
22241
22242         * config/aarch64/aarch64.c (cortexa57_addrcost_table): Remove.
22243         (qdf24xx_addrcost_table): Likewise.
22244         (cortexa57_tunings): Update to use generic_branch_cost.
22245         (cortexa72_tunings): Likewise.
22246         (cortexa73_tunings): Likewise.
22247         (qdf24xx_tunings): Likewise.
22248
22249 2017-07-26  James Greenhalgh  <james.greenhalgh@arm.com>
22250
22251         * config/aarch64/aarch64.c (cortexa57_branch_cost): Remove.
22252         (thunderx2t99_branch_cost): Likewise.
22253         (cortexa35_tunings): Update to use generic_branch_cost.
22254         (cortexa53_tunings): Likewise.
22255         (cortexa57_tunings): Likewise.
22256         (cortexa72_tunings): Likewise.
22257         (cortexa73_tunings): Likewise.
22258         (thunderx2t99_tunings): Likewise.
22259
22260 2017-07-26  Sebastian Huber  <sebastian.huber@embedded-brains.de>
22261
22262         * config/sparc/sparc.c (dump_target_flag_bits): Dump MASK_FSMULD.
22263         (sparc_option_override): Honour MASK_FSMULD.
22264         * config/sparc/sparc.h (MASK_FEATURES): Add MASK_FSMULD.
22265         * config/sparc/sparc.md (muldf3_extend): Use TARGET_FSMULD.
22266         * config/sparc/sparc.opt (mfsmuld): New option.
22267         * doc/invoke.texi (mfsmuld): Document option.
22268
22269 2017-07-26  Marek Polacek  <polacek@redhat.com>
22270
22271         PR middle-end/70992
22272         * tree.c (build2_stat): Don't set TREE_CONSTANT on divisions by zero.
22273
22274 2017-07-26  Richard Biener  <rguenther@suse.de>
22275
22276         * gimple-match-head.c (do_valueize): Return OP if valueize
22277         returns NULL_TREE.
22278         (get_def): New helper to get at the def stmt of a SSA name
22279         if valueize allows.
22280         * genmatch.c (dt_node::gen_kids_1): Use get_def instead of
22281         do_valueize to get at the def stmt.
22282         (dt_operand::gen_gimple_expr): Simplify do_valueize calls.
22283
22284 2017-07-26  Wilco Dijkstra  <wdijkstr@arm.com>
22285
22286         PR middle-end/46932
22287         * auto-inc-dec.c (parse_add_or_inc): Block autoinc on sfp.
22288
22289 2017-07-26  Martin Liska  <mliska@suse.cz>
22290
22291         PR sanitize/81186
22292         * function.c (expand_function_start): Make expansion of
22293         nonlocal_goto_save_area after parm_birth_insn.
22294
22295 2017-07-26  Sebastian Huber  <sebastian.huber@embedded-brains.de>
22296
22297         * config/sparc/sparc.c (sparc_option_override): Remove MASK_FPU
22298         from all CPU target flags enable members.
22299
22300 2017-07-26  Richard Biener  <rguenther@suse.de>
22301
22302         * genmatch.c (dt_simplify::gen): Make iterator vars const.
22303         (decision_tree::gen): Make 'type' const.
22304         (write_predicate): Likewise.
22305
22306 2017-07-24  Michael Meissner  <meissner@linux.vnet.ibm.com>
22307
22308         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok):
22309         Eliminate TARGET_UPPER_REGS_{DF,DI,SF} usage.
22310         (rs6000_option_override_internal): Likewise.
22311         (rs6000_expand_vector_set): Likewise.
22312         * config/rs6000/rs6000.h (TARGET_UPPER_REGS_DF): Delete.
22313         (TARGET_UPPER_REGS_SF): Likewise.
22314         (TARGET_UPPER_REGS_DI): Likewise.
22315         (TARGET_VEXTRACTUB): Eliminate TARGET_UPPER_REGS_{DF,DI,SF}.
22316         (TARGET_DIRECT_MOVE_64BIT): Likewise.
22317         * config/rs6000/rs6000.md (ALTIVEC_DFORM): Likewise.
22318         (float<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
22319         (Splitters for DI constants in Altivec registers): Likewise.
22320         * config/rs6000/vsx.md (vsx_set_<mode>_p9): Likewise.
22321         (vsx_set_v4sf_p9): Likewise.
22322         (vsx_set_v4sf_p9_zero): Likewise.
22323         (vsx_insert_extract_v4sf_p9): Likewise.
22324         (vsx_insert_extract_v4sf_p9_2): Likewise.
22325
22326 2017-07-25  Carl Love  <cel@us.ibm.com>
22327
22328         * doc/extend.texi: Update the built-in documentation file for the
22329         existing built-in functions
22330         vector signed char vec_cnttz (vector signed char);
22331         vector unsigned char vec_cnttz (vector unsigned char);
22332         vector signed short vec_cnttz (vector signed short);
22333         vector unsigned short vec_cnttz (vector unsigned short);
22334         vector signed int vec_cnttz (vector signed int);
22335         vector unsigned int vec_cnttz (vector unsigned int);
22336         vector signed long long vec_cnttz (vector signed long long);
22337         vector unsigned long long vec_cnttz (vector unsigned long long);
22338
22339 2017-07-25  Andrew Pinski  <apinski@cavium.com>
22340
22341         * tree-ssa-uninit.c (warn_uninitialized_vars): Don't warn about memory
22342         accesses where the use is for the first operand of a BIT_INSERT.
22343
22344 2017-07-25  Jim Wilson  <jim.wilson@linaro.org>
22345
22346         PR bootstrap/81521
22347         * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
22348         for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
22349
22350 2017-07-25  Jim Wilson  <jim.wilson@linaro.org>
22351
22352         * config/i386/gstabs.h: Delete.
22353         * config/i386/openbsd.h, config/i386/t-openbsd: Likewise.
22354
22355 2017-07-25  Uros Bizjak  <ubizjak@gmail.com>
22356
22357         * config/i386/i386.c (ix86_decompose_address): Do not check for
22358         register RTX when looking at index_reg or base_reg.
22359         * config/i386/i386.h (INCOMING_RETURN_ADDR_RTX): Use stack_pointer_rtx.
22360
22361 2017-07-25  Eric Botcazou  <ebotcazou@adacore.com>
22362
22363         * gimple.c (gimple_assign_set_rhs_with_ops): Do not ask gsi_replace
22364         to update EH info here.
22365
22366 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
22367
22368         * match.pd ((X * CST1) * CST2): Simplify to X * (CST1 * CST2).
22369
22370 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
22371
22372         * match.pd ((X * CST) * Y): Reassociate to (X * Y) * CST.
22373
22374 2017-07-25  Torsten Duwe  <duwe@suse.de>
22375
22376         * common.opt: Introduce -fpatchable-function-entry
22377         command line option, and its variables function_entry_patch_area_size
22378         and function_entry_patch_area_start.
22379         * opts.c (common_handle_option): Add -fpatchable_function_entry_ case,
22380         including a two-value parser.
22381         * target.def (print_patchable_function_entry): New target hook.
22382         * targhooks.h (default_print_patchable_function_entry): New function.
22383         * targhooks.c (default_print_patchable_function_entry): Likewise.
22384         * toplev.c (process_options): Switch off IPA-RA if
22385         patchable function entries are being generated.
22386         * varasm.c (assemble_start_function): Look at the
22387         patchable-function-entry command line switch and current
22388         function attributes and maybe generate NOP instructions by
22389         calling the print_patchable_function_entry hook.
22390         * doc/extend.texi: Document patchable_function_entry attribute.
22391         * doc/invoke.texi: Document -fpatchable_function_entry
22392         command line option.
22393         * doc/tm.texi.in (TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY):
22394         New target hook.
22395         * doc/tm.texi: Re-generate.
22396
22397 2017-07-25  Jakub Jelinek  <jakub@redhat.com>
22398
22399         PR target/81532
22400         * config/i386/constraints.md (Yd, Ye): Use ALL_SSE_REGS for
22401         TARGET_AVX512DQ rather than TARGET_AVX512BW.
22402
22403 2017-07-25  Tamar Christina  <tamar.christina@arm.com>
22404
22405         * config/arm/parsecpu.awk (all_cores): Remove duplicates.
22406
22407 2017-07-25  Richard Biener  <rguenther@suse.de>
22408
22409         PR tree-optimization/81455
22410         * tree-ssa-loop-unswitch.c (find_loop_guard): Make sure to
22411         not walk in cycles when looking for guards.
22412
22413 2017-07-25  Richard Biener  <rguenther@suse.de>
22414
22415         PR tree-optimization/81529
22416         * tree-vect-stmts.c (process_use): Disregard live induction PHIs
22417         when optimizing backedge uses.
22418
22419 2017-07-25  David Edelsohn  <dje.gcc@gmail.com>
22420
22421         * dwarf2asm.c (dw2_asm_output_nstring): Encode double quote
22422         character for AIX.
22423         * dwarf2out.c (output_macinfo): Copy debug_line_section_label
22424         to dl_section_ref.  On AIX, append an expression to subtract
22425         the size of the section length to dl_section_ref.
22426
22427 2017-07-25  Segher Boessenkool  <segher@kernel.crashing.org>
22428
22429         * configure.ac: If any of the config.* scripts fail, exit 1.
22430         * configure: Regenerate.
22431
22432 2017-07-25  Richard Biener  <rguenther@suse.de>
22433
22434         PR middle-end/81546
22435         * tree-ssa-operands.c (verify_imm_links): Remove cap on number
22436         of immediate uses, be more verbose on errors.
22437
22438 2017-07-25  Richard Biener  <rguenther@suse.de>
22439
22440         PR tree-optimization/81510
22441         * tree-vect-loop.c (vect_is_simple_reduction): When the
22442         reduction stmt is not inside the loop bail out.
22443
22444 2017-07-25  Richard Biener  <rguenther@suse.de>
22445
22446         PR tree-optimization/81303
22447         * tree-vect-loop-manip.c (vect_loop_versioning): Build
22448         profitability check against LOOP_VINFO_NITERSM1.
22449
22450 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
22451
22452         * domwalk.c (cmp_bb_postorder): Simplify.
22453         (sort_bbs_postorder): New function.  Use it...
22454         (dom_walker::walk): ...here to optimize common cases.
22455
22456 2017-07-25  Martin Liska  <mliska@suse.cz>
22457
22458         PR ipa/81520
22459         * ipa-visibility.c (function_and_variable_visibility): Make the
22460         redirection just on target that supports aliasing.
22461         Fix GNU coding style.
22462
22463 2017-07-25  Sebastian Huber  <sebastian.huber@embedded-brains.de>
22464
22465         PR libgcc/61152
22466         * config/aarch64/rtems.h: Add GCC Runtime Library Exception.
22467         Format changes.
22468         * config/arm/rtems.h: Likewise.
22469         * config/bfin/rtems.h: Likewise.
22470         * config/i386/rtemself.h: Likewise.
22471         * config/lm32/rtems.h: Likewise.
22472         * config/m32c/rtems.h: Likewise.
22473         * config/m68k/rtemself.h: Likewise.
22474         * config/microblaze/rtems.h: Likewise.
22475         * config/mips/rtems.h: Likewise.
22476         * config/moxie/rtems.h: Likewise.
22477         * config/nios2/rtems.h: Likewise.
22478         * config/powerpcspe/rtems.h: Likewise.
22479         * config/rs6000/rtems.h: Likewise.
22480         * config/rtems.h: Likewise.
22481         * config/sh/rtems.h: Likewise.
22482         * config/sh/rtemself.h: Likewise.
22483         * config/sparc/rtemself.h: Likewise.
22484
22485 2017-07-25  Georg-Johann Lay  <avr@gjlay.de>
22486
22487         PR 81487
22488         * hsa-brig.c (brig_init): Use xasprintf instead of asprintf.
22489         * gimple-pretty-print.c (dump_profile, dump_probability): Same.
22490         * tree-ssa-structalias.c (alias_get_name): Same.
22491
22492 2017-07-25  Bin Cheng  <bin.cheng@arm.com>
22493
22494         PR target/81414
22495         * config/aarch64/cortex-a57-fma-steering.c (analyze): Skip fmul/fmac
22496         instructions if no du chain is found.
22497
22498 2017-07-25  Georg-Johann Lay  <avr@gjlay.de>
22499
22500         * config/avr/avr-log.c (avr_log_vadump) ['T']: Print NULL-TREE.
22501
22502 2017-07-25  Richard Biener  <rguenther@suse.de>
22503
22504         PR middle-end/81505
22505         * fold-const.c (fold_negate_const): TREE_OVERFLOW should be
22506         sticky.
22507
22508 2017-07-24  Michael Meissner  <meissner@linux.vnet.ibm.com>
22509
22510         * config/rs6000/rs6000-cpus.def (ISA_2_6_MASKS_SERVER): Delete
22511         upper-regs options.
22512         (ISA_2_7_MASKS_SERVER): Likewise.
22513         (ISA_3_0_MASKS_IEEE): Likewise.
22514         (OTHER_P8_VECTOR_MASKS): Likewise.
22515         (OTHER_VSX_VECTOR_MASKS): Likewise.
22516         (POWERPC_MASKS): Likewise.
22517         (power7 cpu): Use ISA_2_6_MASKS_SERVER instead of using a
22518         duplicate list of options.
22519         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove
22520         explicit -mupper-regs options.
22521         * config/rs6000/rs6000.opt (-mvsx-scalar-memory): Delete
22522         -mupper-regs* options.  Delete -mvsx-scalar-memory, which was an
22523         alias for -mupper-regs-df.
22524         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
22525         (rs6000_init_hard_regno_mode_ok): Likewise.
22526         (rs6000_option_override_internal): Likewise.
22527         (rs6000_opt_masks): Likewise.
22528         * config/rs6000/rs6000.h (TARGET_UPPER_REGS_DF): Define upper regs
22529         options in terms of whether -mvsx or -mpower8-vector was used.
22530         (TARGET_UPPER_REGS_DI): Likewise.
22531         (TARGET_UPPER_REGS_SF): Likewise.
22532         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete the
22533         -mupper-regs-* options.
22534
22535 2017-07-24  Segher Boessenkool  <segher@kernel.crashing.org>
22536
22537         * passes.c (emergency_dump_function): Print some empty lines and a
22538         header before the RTL dump.
22539
22540 2017-07-24  Segher Boessenkool  <segher@kernel.crashing.org>
22541
22542         * cfgrtl.c (rtl_dump_bb): Don't call NEXT_INSN on NULL.
22543
22544 2017-07-24  Wilco Dijkstra  <wdijkstr@arm.com>
22545
22546         PR target/79041
22547         * config/aarch64/aarch64.c (aarch64_classify_symbol):
22548         Avoid SYMBOL_SMALL_ABSOLUTE for literals with pc-relative literals.
22549
22550 2017-07-24  Carl Love  <cel@us.ibm.com>
22551
22552         * config/rs6000/rs6000-c.c: Add support for built-in functions
22553         vector float vec_extract_fp32_from_shorth (vector unsigned short);
22554         vector float vec_extract_fp32_from_shortl (vector unsigned short);
22555         * config/rs6000/altivec.h (vec_extract_fp_from_shorth,
22556         vec_extract_fp_from_shortl): Add defines for the two builtins.
22557         * config/rs6000/rs6000-builtin.def (VEXTRACT_FP_FROM_SHORTH,
22558         VEXTRACT_FP_FROM_SHORTL): Add BU_P9V_OVERLOAD_1 and BU_P9V_VSX_1
22559         new builtins.
22560         * config/rs6000/vsx.md vsx_xvcvhpsp): Add define_insn.
22561         (vextract_fp_from_shorth, vextract_fp_from_shortl): Add define_expands.
22562         * doc/extend.texi: Update the built-in documentation file for the
22563         new built-in function.
22564
22565 2017-07-24  Jakub Jelinek  <jakub@redhat.com>
22566
22567         PR bootstrap/81521
22568         * tree.def: Remove TYPE_METHODS documentation, adjust TYPE_FIELDS
22569         documentation.
22570         * doc/generic.texi: Likewise.
22571         * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
22572         for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
22573
22574 2017-07-24  Jackson Woodruff  <jackson.woodruff@arm.com>
22575
22576         * config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): New.
22577         (aarch64_mls_elt_merge<mode>): Likewise.
22578
22579 2017-07-23  Krister Walfridsson  <krister.walfridsson@gmail.com>
22580
22581         * config.gcc (*-*-netbsd*): Remove check for NetBSD versions not
22582         having __cxa_atexit.
22583
22584 2017-07-23  Michael Collison  <michael.collison@arm.com>
22585
22586         * config/arm/arm.c (arm_option_override): Deprecate
22587         use of -mstructure-size-boundary.
22588         * config/arm/arm.opt: Deprecate -mstructure-size-boundary.
22589         * doc/invoke.texi: Deprecate -mstructure-size-boundary.
22590
22591 2017-07-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22592
22593         PR target/80695
22594         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
22595         Reduce cost estimate for direct moves.
22596
22597 2017-07-23  Uros Bizjak  <ubizjak@gmail.com>
22598
22599         PR target/80569
22600         * config/i386/i386.c (ix86_option_override_internal): Disable
22601         BMI, BMI2 and TBM instructions for -m16.
22602
22603 2017-07-21  Carl Love  <cel@us.ibm.com>
22604
22605         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
22606         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
22607         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
22608         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
22609         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
22610         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
22611         VMULOSW): New enum "unspec" values.
22612         (altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
22613         altivec_vmulosw): New patterns.
22614         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
22615         VMULOSW): Add definitions.
22616
22617 2017-07-21  Jim Wilson  <jim.wilson@linaro.org>
22618
22619         * config/aarch64/aarch64-cores.def (falkor): Add AARCH64_FL_RDMA.
22620         (qdf24xx): Likewise.
22621         * config/aarch64/aarch64-options-extensions.def (rdma); New.
22622         * config/aarch64/aarch64.h (AARCH64_FL_RDMA): New.
22623         (AARCH64_FL_V8_1): Renumber.
22624         (AARCH64_FL_FOR_ARCH8_1): Add AARCH64_FL_RDMA.
22625         (AARCH64_ISA_RDMA): Use AARCH64_FL_RDMA.
22626         * config/aarch64/arm_neon.h: Use +rdma instead of arch=armv8.1-a.
22627         * doc/invoke.texi (AArch64 Options): Mention +rmda in -march docs.  Add
22628         rdma to feature modifiers list.
22629
22630 2017-07-21  Yury Gribov  <tetra2005@gmail.com>
22631
22632         PR middle-end/56727
22633         * ipa-visibility (function_and_variable_visibility): Convert
22634         recursive PLT call to direct call if appropriate.
22635
22636 2017-07-21  Andrew Pinski  <apinski@cavium.com>
22637
22638         * tree-ssa-sccvn.c (vn_nary_op_eq): Check BIT_INSERT_EXPR's
22639         operand 1 to see if the types precision matches.
22640         * fold-const.c (operand_equal_p): Likewise.
22641
22642 2017-07-21  Richard Biener  <rguenther@suse.de>
22643
22644         PR tree-optimization/81303
22645         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Pass
22646         in datarefs vector.  Allow NULL dr0 for no peeling cost estimate.
22647         (vect_peeling_hash_get_lowest_cost): Adjust.
22648         (vect_enhance_data_refs_alignment): Likewise.  Use
22649         vect_get_peeling_costs_all_drs to compute the penalty for no
22650         peeling to match up costs.
22651
22652 2017-07-21  Richard Biener  <rguenther@suse.de>
22653
22654         PR tree-optimization/81500
22655         * tree-vect-loop.c (vect_is_simple_reduction): Properly fail if
22656         we didn't identify a reduction path.
22657
22658 2017-07-21  Tom de Vries  <tom@codesourcery.com>
22659             Cesar Philippidis  <cesar@codesourcery.com>
22660
22661         PR gcov-profile/81442
22662         * config/nvptx/nvptx.c (nvptx_goacc_reduction_init): Add missing edge
22663         probabilities.
22664
22665 2017-07-21  Tom de Vries  <tom@codesourcery.com>
22666
22667         PR lto/81430
22668         * config/nvptx/nvptx.c (nvptx_override_options_after_change): New
22669         function.
22670         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define to
22671         nvptx_override_options_after_change.
22672
22673 2017-07-21  Ulrich Drepper  <drepper@redhat.com>
22674
22675         * dwarf2out.c (output_file_names): Avoid double testing for
22676         dwarf_version >= 5.
22677
22678 2017-07-21  Georg-Johann Lay  <avr@gjlay.de>
22679
22680         * doc/invoke.texi (AVR Built-in Functions): Re-layout section.
22681
22682 2016-07-21  Jan Hubicka  <hubicka@ucw.cz>
22683
22684         * cfgcleanup.c (flow_find_cross_jump): Do not crossjump across
22685         hot/cold regions.
22686         (try_crossjump_to_edge): Do not punt on partitioned functions.
22687
22688 2016-07-21  Jan Hubicka  <hubicka@ucw.cz>
22689
22690         * bb-reorder.c (find_rarely_executed_basic_blocks_and_crossing_edges):
22691         Put all BBs reachable only via paths crossing cold region to cold
22692         region.
22693         * cfgrtl.c (find_bbs_reachable_by_hot_paths): New function.
22694
22695 2016-07-21  Richard Biener  <rguenther@suse.de>
22696
22697         PR tree-optimization/81303
22698         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Take
22699         into account prologue and epilogue iterations when raising
22700         min_profitable_iters to sth at least covering one vector iteration.
22701
22702 2017-07-21  Tamar Christina  <tamar.christina@arm.com>
22703
22704         * config/arm/arm.c (arm_test_cpu_arch_dat):
22705         Check for overlap.
22706
22707 2017-07-20  Nathan Sidwell  <nathan@acm.org>
22708
22709         Remove TYPE_METHODS.
22710         * tree.h (TYPE_METHODS): Delete.
22711         * dwarf2out.c (gen_member_die): Member fns are on TYPE_FIELDS.
22712         * dbxout.c (dbxout_type_fields): Ignore FUNCTION_DECLs.
22713         (dbxout_type_methods): Scan TYPE_FIELDS.
22714         (dbxout_type): Don't check TYPE_METHODS here.
22715         * function.c (use_register_for_decl): Always ignore register for
22716         class types when not optimizing.
22717         * ipa-devirt.c (odr_types_equivalent_p): Delete TYPE_METHODS scan.
22718         * tree.c (free_lang_data_in_type): Stitch out member functions and
22719         templates from TYPE_FIELDS.
22720         (build_distinct_type_copy, verify_type_variant,
22721         verify_type): Member fns are on TYPE_FIELDS.
22722         * tree-dump.c (dequeue_and_dump): No TYPE_METHODS.
22723         * tree-pretty-print.c (dump_generic_node): Likewise.
22724
22725 2017-07-20  Jakub Jelinek  <jakub@redhat.com>
22726
22727         PR target/80846
22728         * config/i386/i386.c (ix86_expand_vector_init_general): Handle
22729         V2TImode and V4TImode.
22730         (ix86_expand_vector_extract): Likewise.
22731         * config/i386/sse.md (VMOVE): Enable V4TImode even for just
22732         TARGET_AVX512F, instead of only for TARGET_AVX512BW.
22733         (ssescalarmode): Handle V4TImode and V2TImode.
22734         (VEC_EXTRACT_MODE): Add V4TImode and V2TImode.
22735         (*vec_extractv2ti, *vec_extractv4ti): New insns.
22736         (VEXTRACTI128_MODE): New mode iterator.
22737         (splitter for *vec_extractv?ti first element): New.
22738         (VEC_INIT_MODE): New mode iterator.
22739         (vec_init<mode>): Consolidate 3 expanders into one using
22740         VEC_INIT_MODE mode iterator.
22741
22742 2017-07-20  Alexander Monakov  <amonakov@ispras.ru>
22743
22744         * lra-assigns.c (pseudo_compare_func): Fix comparison step based on
22745         non_spilled_static_chain_regno_p.
22746
22747 2017-07-20  Alexander Monakov  <amonakov@ispras.ru>
22748
22749         * gimple-ssa-store-merging.c (sort_by_bitpos): Return 0 on equal bitpos.
22750
22751 2017-07-20  Jan Hubicka  <hubicka@ucw.cz>
22752
22753         * bb-reorder.c (connect_traces): Allow copying of blocks within
22754         single partition.
22755
22756 2017-07-20  Richard Biener  <rguenther@suse.de>
22757
22758         * gimple.h (gimple_phi_result): Add gphi * overload.
22759         (gimple_phi_result_ptr): Likewise.
22760         (gimple_phi_arg): Likewise.  Adjust index assert to only
22761         allow actual argument accesses rather than all slots available
22762         by capacity.
22763         (gimple_phi_arg_def): Add gphi * overload.
22764         * tree-phinodes.c (make_phi_node): Initialize only actual
22765         arguments.
22766         (resize_phi_node): Clear memory not covered by old node,
22767         do not initialize excess argument slots.
22768         (reserve_phi_args_for_new_edge): Initialize new argument slot
22769         completely.
22770
22771 2017-07-20  Bin Cheng  <bin.cheng@arm.com>
22772
22773         PR tree-optimization/81388
22774         Revert r238585:
22775         2016-07-21  Bin Cheng  <bin.cheng@arm.com>
22776
22777         * tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Clean up
22778         by removing computation of may_be_zero.
22779
22780 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
22781             Tom de Vries  <tom@codesourcery.com>
22782
22783         PR middle-end/81030
22784         * cfgbuild.c (find_many_sub_basic_blocks): Update REG_BR_PROB note
22785         when gimple level profile disagrees with what RTL expander did.
22786
22787 2017-07-20  Richard Biener  <rguenther@suse.de>
22788
22789         PR tree-optimization/61171
22790         * tree-vectorizer.h (slp_instance): Add reduc_phis member.
22791         (vect_analyze_stmt): Add slp instance parameter.
22792         (vectorizable_reduction): Likewise.
22793         * tree-vect-loop.c (vect_analyze_loop_operations): Adjust.
22794         (vect_is_simple_reduction): Deal with chains not detected
22795         as SLP reduction chain, specifically not properly associated
22796         chains containing a mix of plus/minus.
22797         (get_reduction_op): Remove.
22798         (get_initial_defs_for_reduction): Simplify, pass in whether
22799         this is a reduction chain, pass in the SLP node for the PHIs.
22800         (vect_create_epilog_for_reduction): Get the SLP instance as
22801         arg and adjust.
22802         (vectorizable_reduction): Get the SLP instance as arg.
22803         During analysis remember the SLP node with the PHIs in the
22804         instance.  Simplify getting at the vectorized reduction PHIs.
22805         * tree-vect-slp.c (vect_slp_analyze_node_operations): Pass
22806         through SLP instance.
22807         (vect_slp_analyze_operations): Likewise.
22808         * tree-vect-stms.c (vect_analyze_stmt): Likewise.
22809         (vect_transform_stmt): Likewise.
22810
22811 2017-07-20  Tom de Vries  <tom@codesourcery.com>
22812
22813         PR tree-optimization/81489
22814         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Move
22815         read of phi arg location to before loop that modifies phi.
22816
22817 2017-07-20  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
22818
22819         * match.pd (((m1 >/</>=/<= m2) * d -> (m1 >/</>=/<= m2) ? d : 0):
22820         New pattern.
22821
22822 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
22823
22824         PR middle-end/81331
22825         * except.c (execute): Fix ordering issue.
22826
22827 2018-07-19  Segher Boessenkool  <segher@kernel.crashing.org>
22828
22829         PR rtl-optimization/81423
22830         * combine.c (make_compound_operation_int): Don't try to optimize
22831         the AND of a SUBREG of an LSHIFTRT if that SUBREG is paradoxical.
22832
22833 2017-07-19  Segher Boessenkool  <segher@kernel.crashing.org>
22834
22835         PR rtl-optimization/81423
22836         * simplify-rtx.c (simplify_truncation): Handle truncating an IOR
22837         with a constant that is -1 in the truncated to mode.
22838
22839 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
22840
22841         * predict.c (propagate_unlikely_bbs_forward): Break out from ...
22842         (determine_unlikely_bbs): ... here.
22843         * predict.h (propagate_unlikely_bbs_forward): Declare.
22844         * cfgexpand.c (pass_expand::execute): Use it.
22845         * bb-reorder.c (sanitize_hot_paths): Do not consider known to be
22846         unlikely edges.
22847         (find_rarely_executed_basic_blocks_and_crossing_edges): Use
22848         propagate_unlikely_bbs_forward.
22849
22850 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
22851
22852         PR middle-end/81331
22853         * except.c (maybe_add_nop_after_section_switch): New function.
22854         (execute): Use it.
22855
22856 2017-07-19  Tom de Vries  <tom@codesourcery.com>
22857
22858         * gimple.h (gimple_phi_set_arg): Make assert more strict.
22859
22860 2017-07-19  Tom de Vries  <tom@codesourcery.com>
22861
22862         * gimple.h (gimple_phi_arg): Make assert more strict.
22863
22864 2017-07-19  Steven Munroe  <munroesj@gcc.gnu.org>
22865
22866         * config.gcc (powerpc*-*-*): Add mmintrin.h.
22867         * config/rs6000/mmintrin.h: New file.
22868         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include mmintrin.h.
22869
22870 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
22871
22872         PR tree-optimization/81346
22873         * match.pd: Optimize (X - 1U) <= INT_MAX-1U into (int) X > 0.
22874
22875 2017-07-19  Tom de Vries  <tom@codesourcery.com>
22876
22877         * config/nvptx/nvptx.md (VECIM): Add V2DI.
22878
22879 2017-07-19  Tom de Vries  <tom@codesourcery.com>
22880
22881         * config/nvptx/nvptx-modes.def: Add V2DImode.
22882         * config/nvptx/nvptx-protos.h (nvptx_data_alignment): Declare.
22883         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2DImode.
22884         (nvptx_output_mov_insn): Handle lack of mov.b128.
22885         (nvptx_print_operand): Handle 'H' and 'L' codes.
22886         (nvptx_vector_mode_supported): Allow V2DImode.
22887         (nvptx_preferred_simd_mode): New function.
22888         (nvptx_data_alignment): New function.
22889         (TARGET_VECTORIZE_PREFERRED_SIMD_MODE): Redefine to
22890         nvptx_preferred_simd_mode.
22891         * config/nvptx/nvptx.h (STACK_BOUNDARY, BIGGEST_ALIGNMENT): Change from
22892         64 to 128 bits.
22893         (DATA_ALIGNMENT): Define.  Set to nvptx_data_alignment.
22894
22895 2017-07-19  Tom de Vries  <tom@codesourcery.com>
22896
22897         * config/nvptx/nvptx-modes.def: New file.  Add V2SImode.
22898         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2SImode.
22899         (nvptx_vector_mode_supported): New function.  Allow V2SImode.
22900         (TARGET_VECTOR_MODE_SUPPORTED_P): Redefine to nvptx_vector_mode_supported.
22901         * config/nvptx/nvptx.md (VECIM): New mode iterator. Add V2SI.
22902         (mov<VECIM>_insn): New define_insn.
22903         (define_expand "mov<VECIM>): New define_expand.
22904
22905 2017-07-19  Tom de Vries  <tom@codesourcery.com>
22906
22907         * config/nvptx/nvptx.c (nvptx_print_operand): Handle v2 vector mode.
22908
22909 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
22910
22911         PR tree-optimization/81346
22912         * fold-const.h (fold_div_compare, range_check_type): Declare.
22913         * fold-const.c (range_check_type): New function.
22914         (build_range_check): Use range_check_type.
22915         (fold_div_compare): No longer static, rewritten into
22916         a match.pd helper function.
22917         (fold_comparison): Don't call fold_div_compare here.
22918         * match.pd (X / C1 op C2): New optimization using fold_div_compare
22919         as helper function.
22920
22921 2017-07-19  Nathan Sidwell  <nathan@acm.org>
22922
22923         * tree.h (TYPE_MINVAL, TYPE_MAXVAL): Rename to ...
22924         (TYPE_MIN_VALUE_RAW, TYPE_MAX_VALUE_RAW): ... these.
22925         * tree.c (find_decls_types_r, verify_type): Use
22926         TYPE_{MIN,MAX}_VALUE_RAW.
22927         * lto-streamer-out.c (DFS::DFS_write_tree_body): Likewise.
22928         (hash_tree): Likewise.
22929         * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
22930         Likewise.
22931         * tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
22932         Likewise.
22933
22934 2017-07-18  Tom de Vries  <tom@codesourcery.com>
22935
22936         PR middle-end/81464
22937         * omp-expand.c (expand_omp_for_static_chunk): Handle
22938         equal-argument loop exit phi.
22939
22940 2017-07-18  Uros Bizjak  <ubizjak@gmail.com>
22941
22942         PR target/81471
22943         * config/i386/i386.md (rorx_immediate_operand): New mode attribute.
22944         (*bmi2_rorx<mode>3_1): Use rorx_immediate_operand as
22945         operand 2 predicate.
22946         (*bmi2_rorxsi3_1_zext): Use const_0_to_31_operand as
22947         operand 2 predicate.
22948         (ror,rol -> rorx splitters): Use const_int_operand as
22949         operand 2 predicate.
22950
22951 2017-06-18  Richard Biener  <rguenther@suse.de>
22952
22953         PR tree-optimization/81410
22954         * tree-vect-stmts.c (vectorizable_load): Properly adjust for
22955         the gap in the ! slp_perm SLP case after each group.
22956
22957 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
22958
22959         PR middle-end/81463
22960         * cfgloopmanip.c (scale_loop_profile): Watch out for zero frequency
22961         again.
22962
22963 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
22964
22965         PR middle-end/81462
22966         * predict.c (set_even_probabilities): Cleanup; do not affect
22967         probabilities that are already known.
22968         (combine_predictions_for_bb): Call even when count is set.
22969
22970 2017-07-18  Nathan Sidwell  <nathan@acm.org>
22971
22972         * tree-parloops.c (try_transform_to_exit_first_loop_alt): Use
22973         TYPE_MAX_VALUE.
22974
22975 2017-07-18  Bin Cheng  <bin.cheng@arm.com>
22976
22977         PR target/81408
22978         * tree-ssa-loop-niter.c (number_of_iterations_exit): Dump missed
22979         optimization for loop niter analysis.
22980
22981 2017-07-18  Georg-Johann Lay  <avr@gjlay.de>
22982
22983         PR target/81473
22984         * config/avr/avr.c (avr_optimize_casesi): Don't use
22985         INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX.
22986
22987 2017-07-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
22988
22989         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Remove
22990         body_cost_vec from _vect_peel_extended_info.
22991         (vect_peeling_hash_get_lowest_cost): Do not set body_cost_vec.
22992         (vect_peeling_hash_choose_best_peeling): Remove body_cost_vec and
22993         npeel.
22994
22995 2017-07-18  Bin Cheng  <bin.cheng@arm.com>
22996
22997         * config/arm/arm.c (emit_unlikely_jump): Remove unused var.
22998
22999 2017-07-18  Richard Biener  <rguenther@suse.de>
23000
23001         PR tree-optimization/80620
23002         PR tree-optimization/81403
23003         * tree-ssa-pre.c (phi_translate_1): Clear range and points-to
23004         info when re-using a VN table entry.
23005
23006 2017-07-18  Richard Biener  <rguenther@suse.de>
23007
23008         PR tree-optimization/81418
23009         * tree-vect-loop.c (vectorizable_reduction): Properly compute
23010         vectype_in.  Verify that with lane-reducing reduction operations
23011         we have a single def-use cycle.
23012
23013 2017-07-17  Carl Love  <cel@us.ibm.com>
23014
23015         Revert commit r249424   2017-06-20  Carl Love  <cel@us.ibm.com>
23016
23017         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
23018         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
23019         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
23020         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
23021         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
23022         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
23023         VMULOSW): New enum "unspec" values.
23024         (vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
23025         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
23026         altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
23027         altivec_vmulosw): New patterns.
23028         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
23029         VMULOSW): Add definitions.
23030
23031 2017-07-17  Uros Bizjak  <ubizjak@gmail.com>
23032
23033         * config/alpha/alpha.c: Include predict.h.
23034
23035 2017-07-17  Yury Gribov  <tetra2005@gmail.com>
23036
23037         * tree-vrp.c (compare_assert_loc): Fix comparison function
23038         to return predictable results.
23039
23040 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
23041
23042         * config/arc/arc.md (adddi3): Remove support for mexpand-adddi
23043         option.
23044         (subdi3): Likewise.
23045         * config/arc/arc.opt (mexpand-adddi): Deprecate it.
23046         * doc/invoke.texi (mexpand-adddi): Update text.
23047
23048 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
23049
23050         * config/arc/arc.md (clzsi2): Expand to an arc_clzsi2 instruction
23051         that also clobbers the CC register. The old expand code is moved
23052         to ...
23053         (*arc_clzsi2): ... here.
23054         (ctzsi2): Expand to an arc_ctzsi2 instruction that also clobbers
23055         the CC register. The old expand code is moved to ...
23056         (arc_ctzsi2): ... here.
23057
23058 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
23059
23060         * config/arc/arc.opt (mindexed-loads): Use initial value
23061         TARGET_INDEXED_LOADS_DEFAULT.
23062         (mauto-modify-reg): Use initial value
23063         TARGET_AUTO_MODIFY_REG_DEFAULT.
23064         * config/arc/elf.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
23065         (TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
23066         * config/arc/linux.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
23067         (TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
23068
23069 2017-07-17  Martin Liska  <mliska@suse.cz>
23070
23071         PR sanitizer/81302
23072         * opts.c (finish_options): Do not allow -fgnu-tm
23073         w/ -fsanitize={kernel-,}address.  Say sorry.
23074
23075 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
23076
23077         PR target/81369
23078         * tree-loop-distribution.c (classify_partition): Only assert on
23079         numer of iterations.
23080         (merge_dep_scc_partitions): Delete prameter.  Update function call.
23081         (distribute_loop): Remove code handling loop with unknown niters.
23082         (pass_loop_distribution::execute): Skip loop with unknown niters.
23083
23084 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
23085
23086         PR target/81369
23087         * tree-loop-distribution.c (merge_dep_scc_partitions): Sink call to
23088         function sort_partitions_by_post_order.
23089
23090 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
23091
23092         PR tree-optimization/81374
23093         * tree-loop-distribution.c (pass_loop_distribution::execute): Record
23094         the max index of basic blocks, rather than number of basic blocks.
23095
23096 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
23097
23098         * config/arc/arc-protos.h (arc_legitimate_pc_offset_p): Remove
23099         proto.
23100         (arc_legitimate_pic_operand_p): Likewise.
23101         * config/arc/arc.c (arc_legitimate_pic_operand_p): Remove
23102         function.
23103         (arc_needs_pcl_p): Likewise.
23104         (arc_legitimate_pc_offset_p): Likewise.
23105         (arc_legitimate_pic_addr_p): Remove LABEL_REF case, as this
23106         function is also used in constrains.md.
23107         (arc_legitimate_constant_p): Use arc_legitimate_pic_addr_p to
23108         validate pic constants. Handle CONST_INT, CONST_DOUBLE, MINUS and
23109         PLUS.  Only return true/false in known cases, otherwise assert.
23110         (arc_legitimate_address_p): Remove arc_legitimate_pic_addr_p as it
23111         is already called in arc_legitimate_constant_p.
23112         * config/arc/arc.h (CONSTANT_ADDRESS_P): Consider also LABEL for
23113         pic addresses.
23114         (LEGITIMATE_PIC_OPERAND_P): Use
23115         arc_raw_symbolic_reference_mentioned_p function.
23116         * config/arc/constraints.md (Cpc): Use arc_legitimate_pic_addr_p
23117         function.
23118         (Cal): Likewise.
23119         (C32): Likewise.
23120
23121 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
23122         Andrew Burgess  <andrew.burgess@embecosm.com>
23123
23124         * config/arc/arc-protos.h (arc_compute_function_type): Change prototype.
23125         (arc_return_address_register): New function.
23126         * config/arc/arc.c (arc_handle_fndecl_attribute): New function.
23127         (arc_handle_fndecl_attribute): Add naked attribute.
23128         (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
23129         (TARGET_WARN_FUNC_RETURN): Likewise.
23130         (arc_allocate_stack_slots_for_args): New function.
23131         (arc_warn_func_return): Likewise.
23132         (machine_function): Change type fn_type.
23133         (arc_compute_function_type): Consider new naked function type,
23134         change function return type.
23135         (arc_must_save_register): Adapt to handle new
23136         arc_compute_function_type's return type.
23137         (arc_expand_prologue): Likewise.
23138         (arc_expand_epilogue): Likewise.
23139         (arc_return_address_regs): Delete.
23140         (arc_return_address_register): New function.
23141         (arc_epilogue_uses): Use above function.
23142         * config/arc/arc.h (arc_return_address_regs): Delete prototype.
23143         (arc_function_type): Change encoding, add naked type.
23144         (ARC_INTERRUPT_P): Change to handle the new encoding.
23145         (ARC_FAST_INTERRUPT_P): Likewise.
23146         (ARC_NORMAL_P): Define.
23147         (ARC_NAKED_P): Likewise.
23148         (arc_compute_function_type): Delete prototype.
23149         * config/arc/arc.md (in_ret_delay_slot): Use
23150         arc_return_address_register function.
23151         (simple_return): Likewise.
23152         (p_return_i): Likewise.
23153
23154 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
23155
23156         PR tree-optimization/81428
23157         * match.pd (X / X -> one): Don't optimize _Fract divisions, as 1
23158         can't be built for those types.
23159
23160 2017-07-17  Georg-Johann Lay  <avr@gjlay.de>
23161
23162         Remove stuff dead since r239246.
23163
23164         * config/avr/avr-arch.h (avr_inform_devices): Remove dead proto.
23165         * config/avr/avr-devices.c (mcu_name, comparator, avr_mcus_str)
23166         (avr_inform_devices): Remove dead stuff.
23167
23168 2017-07-17  Tamar Christina  <tamar.christina@arm.com>
23169
23170         * config/arm/arm_neon.h: Fix softp typo.
23171
23172 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
23173
23174         PR tree-optimization/81365
23175         * tree-ssa-phiprop.c (propagate_with_phi): When considering hoisting
23176         aggregate moves onto bb predecessor edges, make sure there are no
23177         loads that could alias the lhs in between the start of bb and the
23178         loads from *phi.
23179
23180 2017-07-17  Georg-Johann Lay  <avr@gjlay.de>
23181
23182         PR 80929
23183         * config/avr/avr.c (avr_mul_highpart_cost): New static function.
23184         (avr_rtx_costs_1) [TRUNCATE]: Use it to compute mul_highpart cost.
23185         [LSHIFTRT, outer_code = TRUNCATE]: Same.
23186
23187 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
23188
23189         PR tree-optimization/81396
23190         * tree-ssa-math-opts.c (struct symbolic_number): Add n_ops field.
23191         (init_symbolic_number): Initialize it to 1.
23192         (perform_symbolic_merge): Add n_ops from both operands into the new
23193         n_ops.
23194         (find_bswap_or_nop): Don't consider n->n == cmpnop computations
23195         without base_addr as useless if they need more than one operation.
23196         (bswap_replace): Handle !bswap case for NULL base_addr.
23197
23198 2017-07-17  Tom de Vries  <tom@codesourcery.com>
23199
23200         PR target/81069
23201         * config/nvptx/nvptx.c (nvptx_single): Insert diverging branch as late
23202         as possible.
23203
23204 2017-07-17  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23205
23206         * config/sparc/rtemself.h (TARGET_OS_CPP_BUILTINS): Add
23207         conditional builtin define __FIX_LEON3FT_B2BST.
23208
23209 2017-07-17  Daniel Cederman  <cederman@gaisler.com>
23210
23211         * config/sparc/t-rtems: Add mfix-gr712rc multilibs. Replace
23212         MULTILIB_EXCEPTIONS with MULTILIB_REQUIRED. Match -mfix-gr712rc
23213         with -mfix-ut700.
23214
23215 2017-07-16  Eric Botcazou  <ebotcazou@adacore.com>
23216
23217         PR rtl-optimization/81424
23218         * optabs.c (prepare_cmp_insn): Use copy_to_reg instead of force_reg
23219         to remove potential trapping from operands if -fnon-call-exceptions.
23220
23221 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
23222
23223         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Use
23224         profile_proability for scalling.
23225         * scale_profile_for_vect_loop.c (scale_profile_for_vect_loop): Likewise.
23226
23227 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
23228
23229         * cgraph.c (cgraph_edge::redirect_call_stmt_to_caller): Cleanup.
23230
23231 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
23232
23233         * cfgloopmanip.c (scale_loop_profile): Avoid use of REG_BR_PROB_BASE
23234         fixpoint arithmetics.
23235
23236 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
23237
23238         * tree-ssa-loop-unswitch.c (hoist_guard): Avoid use of REG_BR_PROB_BASE
23239         fixpoint arithmetics.
23240
23241 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
23242
23243         * asan.c (create_cond_insert_point): Avoid use of REG_BR_PROB_BASE
23244         fixpoint arithmetics.
23245
23246 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
23247
23248         * profile-count.h (profile_probability::from_reg_br_prob_note,
23249         profile_probability::to_reg_br_prob_note): New functions.
23250         * doc/rtl.texi (REG_BR_PROB_NOTE): Update documentation.
23251         * reg-notes.h (REG_BR_PROB, REG_BR_PRED): Update docs.
23252         * predict.c (probability_reliable_p): Update.
23253         (edge_probability_reliable_p): Update.
23254         (br_prob_note_reliable_p): Update.
23255         (invert_br_probabilities): Update.
23256         (add_reg_br_prob_note): New function.
23257         (combine_predictions_for_insn): Update.
23258         * asan.c (asan_clear_shadow): Update.
23259         * cfgbuild.c (compute_outgoing_frequencies): Update.
23260         * cfgrtl.c (force_nonfallthru_and_redirect): Update.
23261         (update_br_prob_note): Update.
23262         (rtl_verify_edges): Update.
23263         (purge_dead_edges): Update.
23264         (fixup_reorder_chain): Update.
23265         * emit-rtl.c (try_split): Update.
23266         * ifcvt.c (cond_exec_process_insns): Update.
23267         (cond_exec_process_if_block): Update.
23268         (dead_or_predicable): Update.
23269         * internal-fn.c (expand_addsub_overflow): Update.
23270         (expand_neg_overflow): Update.
23271         (expand_mul_overflow): Update.
23272         * loop-doloop.c (doloop_modify): Update.
23273         * loop-unroll.c (compare_and_jump_seq): Update.
23274         * optabs.c (emit_cmp_and_jump_insn_1): Update.
23275         * predict.h: Update.
23276         * reorg.c (mostly_true_jump): Update.
23277         * rtl.h: Update.
23278         * config/aarch64/aarch64.c (aarch64_emit_unlikely_jump): Update.
23279         * config/alpha/alpha.c (emit_unlikely_jump): Update.
23280         * config/arc/arc.c: (emit_unlikely_jump): Update.
23281         * config/arm/arm.c: (emit_unlikely_jump): Update.
23282         * config/bfin/bfin.c (cbranch_predicted_taken_p): Update.
23283         * config/frv/frv.c (frv_print_operand_jump_hint): Update.
23284         * config/i386/i386.c (ix86_expand_split_stack_prologue): Update.
23285         (ix86_print_operand): Update.
23286         (ix86_split_fp_branch): Update.
23287         (predict_jump): Update.
23288         * config/ia64/ia64.c (ia64_print_operand): Update.
23289         * config/mmix/mmix.c (mmix_print_operand): Update.
23290         * config/powerpcspe/powerpcspe.c (output_cbranch): Update.
23291         (rs6000_expand_split_stack_prologue): Update.
23292         * config/rs6000/rs6000.c: Update.
23293         * config/s390/s390.c (s390_expand_vec_strlen): Update.
23294         (s390_expand_vec_movstr): Update.
23295         (s390_expand_cs_tdsi): Update.
23296         (s390_expand_split_stack_prologue): Update.
23297         * config/sh/sh.c (sh_print_operand): Update.
23298         (expand_cbranchsi4): Update.
23299         (expand_cbranchdi4): Update.
23300         * config/sparc/sparc.c (output_v9branch): Update.
23301         * config/spu/spu.c (get_branch_target): Update.
23302         (ea_load_store_inline): Update.
23303         * config/tilegx/tilegx.c (cbranch_predicted_p): Update.
23304         * config/tilepro/tilepro.c: Update.
23305
23306 2017-07-16  Eric Botcazou  <ebotcazou@adacore.com>
23307
23308         * gimplify.c (mostly_copy_tree_r): Revert latest change.
23309         (gimplify_save_expr): Likewise.
23310
23311 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
23312
23313         * ipa-visibility.c (function_and_variable_visibility): Fix pasto.
23314
23315 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
23316
23317         * ipa-fnsummary.c (pass_data_ipa_fn_summary): Use
23318         TV_IPA_FNSUMMARY.
23319         * timevar.def (TV_IPA_FNSUMMARY): Define.
23320
23321 2017-07-16  Daniel Cederman  <cederman@gaisler.com>
23322
23323         * config/sparc/sparc.md (divdf3_fix): Add NOP to prevent back
23324         to back store errata sensitive sequence from being generated.
23325         (sqrtdf2_fix): Likewise.
23326
23327 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
23328
23329         * tree-ssa-threadupdate.c (compute_path_counts,
23330         update_joiner_offpath_counts): Use profile_probability.
23331
23332 2017-07-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
23333
23334         Revert:
23335         2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
23336
23337         * config/arm/arm-c.c (arm_cpu_builtins): Define
23338         __ARM_FEATURE_NUMERIC_MAXMIN solely based on TARGET_VFP5.
23339
23340 2017-07-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23341
23342         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
23343         array entries to represent __ieee128 versions of the
23344         scalar_test_data_class, scalar_test_neg, scalar_extract_exp,
23345         scalar_extract_sig, and scalar_insert_exp built-in functions.
23346         (altivec_resolve_overloaded_builtin): Add special case handling
23347         for the __builtin_scalar_insert_exp function, as represented by
23348         the P9V_BUILTIN_VEC_VSIEDP constant.
23349         * config/rs6000/rs6000-builtin.def (VSEEQP): Add scalar extract
23350         exponent support for __ieee128 argument.
23351         (VSESQP): Add scalar extract signature support for __ieee128
23352         argument.
23353         (VSTDCNQP): Add scalar test negative support for __ieee128
23354         argument.
23355         (VSIEQP): Add scalar insert exponent support for __int128 argument
23356         with __ieee128 result.
23357         (VSIEQPF): Add scalar insert exponent support for __ieee128
23358         argument with __ieee128 result.
23359         (VSTDCQP): Add scalar test data class support for __ieee128
23360         argument.
23361         (VSTDCNQP): Add overload support for scalar test negative with
23362         __ieee128 argument.
23363         (VSTDCQP): Add overload support for scalar test data class
23364         __ieee128 argument.
23365         * config/rs6000/vsx.md (UNSPEC_VSX_SXSIG) Replace
23366         UNSPEC_VSX_SXSIGDP.
23367         (UNSPEC_VSX_SIEXPQP): New constant.
23368         (xsxexpqp): New insn for VSX scalar extract exponent quad
23369         precision.
23370         (xsxsigqp): New insn for VSX scalar extract significand quad
23371         precision.
23372         (xsiexpqpf): New insn for VSX scalar insert exponent quad
23373         precision with floating point argument.
23374         (xststdcqp): New expand for VSX scalar test data class quad
23375         precision.
23376         (xststdcnegqp): New expand for VSX scalar test negative quad
23377         precision.
23378         (xststdcqp): New insn to match expansions for VSX scalar test data
23379         class quad precision and VSX scalar test negative quad precision.
23380         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Add
23381         special case operand checking to enforce that second operand of
23382         VSX scalar test data class with quad precision argument is a 7-bit
23383         unsigned literal.
23384         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
23385         prototypes and descriptions of __ieee128 versions of
23386         scalar_extract_exp, scalar_extract_sig, scalar_insert_exp,
23387         scalar_test_data_class, and scalar_test_neg built-in functions.
23388
23389 2016-07-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23390
23391         PR tree-optimization/81162
23392         * gimple-ssa-strength-reduction.c (replace_mult_candidate): Don't
23393         replace a negate with an add.
23394
23395 2017-07-14  James Greenhalgh  <james.greenhalgh@arm.com>
23396
23397         * doc/invoke.texi (arm/-mcpu): Document +crypto.
23398
23399 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
23400
23401         * config/arm/arm-c.c (arm_cpu_builtins): Define
23402         __ARM_FEATURE_NUMERIC_MAXMIN solely based on TARGET_VFP5.
23403
23404 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
23405
23406         * config/arm/arm-cpus.in (cortex-r52): Add new entry.
23407         (armv8-r): Set ARM Cortex-R52 as default CPU.
23408         * config/arm/arm-tables.opt: Regenerate.
23409         * config/arm/arm-tune.md: Regenerate.
23410         * config/arm/driver-arm.c (arm_cpu_table): Add entry for ARM
23411         Cortex-R52.
23412         * doc/invoke.texi: Mention -mtune=cortex-r52 and availability of fp.dp
23413         extension for -mcpu=cortex-r52.
23414
23415 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
23416
23417         * config/arm/arm-isa.h (isa_bit_FP_ARMv8): Delete enumerator.
23418         (ISA_FP_ARMv8): Define as ISA_FPv5 and ISA_FP_D32.
23419         * config/arm/arm-cpus.in (armv8-r): Define fp.sp as enabling FPv5.
23420         (fp-armv8): Define it as FP_ARMv8 only.
23421         config/arm/arm.h (TARGET_FPU_ARMV8): Delete.
23422         (TARGET_VFP_FP16INST): Define using TARGET_VFP5 rather than
23423         TARGET_FPU_ARMV8.
23424         config/arm/arm.c (arm_rtx_costs_internal): Replace checks against
23425         TARGET_FPU_ARMV8 by checks against TARGET_VFP5.
23426         * config/arm/arm-builtins.c (arm_builtin_vectorized_function): Define
23427         first ARM_CHECK_BUILTIN_MODE definition using TARGET_VFP5 rather
23428         than TARGET_FPU_ARMV8.
23429         * config/arm/arm-c.c (arm_cpu_builtins): Likewise for
23430         __ARM_FEATURE_NUMERIC_MAXMIN macro definition.
23431         * config/arm/arm.md (cmov<mode>): Condition on TARGET_VFP5 rather than
23432         TARGET_FPU_ARMV8.
23433         * config/arm/neon.md (neon_vrint): Likewise.
23434         (neon_vcvt): Likewise.
23435         (neon_<fmaxmin_op><mode>): Likewise.
23436         (<fmaxmin><mode>3): Likewise.
23437         * config/arm/vfp.md (l<vrint_pattern><su_optab><mode>si2): Likewise.
23438         * config/arm/predicates.md (arm_cond_move_operator): Check against
23439         TARGET_VFP5 rather than TARGET_FPU_ARMV8 and fix spacing.
23440
23441 2017-07-14  Jackson Woodruff  <jackson.woodruff@arm.com>
23442
23443         * config/aarch64/aarch64.c (aarch64_print_operand): Move comments
23444         to top of function.
23445
23446 2017-07-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23447
23448         * gimple-ssa-store-merging.c (clear_bit_region): Replace reference to
23449         loop in comment with memset.
23450
23451 2017-07-14  Martin Liska  <mliska@suse.cz>
23452
23453         * cfgexpand.c (expand_gimple_basic_block): Remove dead comment.
23454         * dwarf2out.c (is_java): Remove the function.
23455         (output_pubname): Remove usage of the function.
23456         (lower_bound_default): Remove usage of DW_LANG_Java.
23457         (gen_compile_unit_die): Likewise.
23458         * gcc.c: Remove compiler defaults for .java and .zip files.
23459         * gimple-expr.c (remove_suffix): Change as there's no longer
23460         extension than 4-letter one.
23461         * gimplify.c (mostly_copy_tree_r): Remove Java-special part.
23462         (gimplify_save_expr): Likewise.
23463         * ipa-utils.h (polymorphic_type_binfo_p): Remove the comment
23464         as it's possible even for other languages than Java.
23465         * langhooks.h (struct lang_hooks): Remove Java from a comment.
23466         * lto-opts.c (lto_write_options): Remove reference to Java.
23467         * opts.c (strip_off_ending): Update file extension handling.
23468         * tree-cfg.c (verify_gimple_call): Remove comment with Java.
23469         * tree-eh.c (lower_resx): Likewise.
23470         * tree.c (free_lang_data_in_type): Remove dead code.
23471         (find_decls_types_r): Likewise.
23472         (build_common_builtin_nodes): Remove Java from a comment.
23473         (verify_type): Remove dead code.
23474         * varasm.c (assemble_external): Remove Java from a comment.
23475
23476 2017-07-14  Martin Liska  <mliska@suse.cz>
23477
23478         * opts.c (finish_options): Add quotes.
23479         (common_handle_option): Likewise.
23480
23481 2017-07-14  Martin Liska  <mliska@suse.cz>
23482
23483         * dbxout.c (get_lang_number): Do not handle GNU Pascal.
23484         * dbxout.h (extern void dbxout_stab_value_internal_label_diff):
23485         Remove N_SO_PASCAL.
23486         * dwarf2out.c (lower_bound_default): Do not handle
23487         DW_LANG_Pascal83.
23488         (gen_compile_unit_die): Likewise.
23489         * gcc.c: Remove default extension binding for GNU Pascal.
23490         * stmt.c: Remove Pascal language from a comment.
23491         * xcoffout.c: Likewise.
23492
23493 2017-07-13  David Malcolm  <dmalcolm@redhat.com>
23494
23495         PR c/81405
23496         * diagnostic-show-locus.c (fixit_cmp): New function.
23497         (layout::layout): Sort m_fixit_hints.
23498         (column_range::column_range): Assert that the values are valid.
23499         (struct char_span): New struct.
23500         (correction::overwrite): New method.
23501         (struct source_line): New struct.
23502         (line_corrections::add_hint): Add assertions.  Reimplement memcpy
23503         calls in terms of classes source_line and char_span, and
23504         correction::overwrite.
23505         (selftest::test_overlapped_fixit_printing_2): New function.
23506         (selftest::diagnostic_show_locus_c_tests): Call it.
23507
23508 2017-07-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
23509
23510         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Return
23511         early if there is no lhs.
23512
23513 2017-07-13  Martin Liska  <mliska@suse.cz>
23514
23515         * dwarf2out.c (gen_pointer_type_die): Remove dead code.
23516         (gen_reference_type_die): Likewise.
23517         * stor-layout.c: Remove Pascal-related comment.
23518
23519 2017-07-13  Martin Liska  <mliska@suse.cz>
23520
23521         * opts.c (finish_options): Add quotes to error messages.
23522         (parse_sanitizer_options): Likewise.
23523
23524 2017-07-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
23525
23526         * doc/invoke.texi (armv8-r): Document +fp.sp ARMv8-R extension.
23527
23528 2017-07-13  Richard Earnshaw  <rearnsha@arm.com>
23529
23530         * config/arm/vxworks.h (TARGET_ENDIAN_DEFAULT): Define.
23531
23532 2017-07-13  Maxim Ostapenko  <m.ostapenko@samsung.com>
23533
23534         * asan.c (asan_emit_allocas_unpoison): Use ptr_mode for arguments
23535         during expansion.
23536         * builtins.c (expand_asan_emit_allocas_unpoison): Likewise.
23537
23538 2017-07-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
23539
23540         PR target/81193
23541         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If GLIBC
23542         provides the hardware capability bits, define the macro
23543         __BUILTIN_CPU_SUPPORTS__.
23544         * config/rs6000/rs6000.c (cpu_expand_builtin): Generate a warning
23545         if GLIBC does not provide the hardware capability bits.  Add a
23546         gcc_unreachable call if the built-in cpu function is neither
23547         __builtin_cpu_is nor __builtin_cpu_supports.
23548         (rs6000_get_function_versions_dispatcher): Change the warning
23549         that an old GLIBC is used which does not export the capability
23550         bits to be an error.
23551         * doc/extend.texi (target_clones attribute): Document the
23552         restriction that GLIBC 2.23 or newer is needed on the PowerPC.
23553         (PowerPC built-in functions): Document that GLIBC 2.23 or newer is
23554         needed by __builtin_cpu_is and __builtin_cpu_supports.  Document
23555         the macros defined by GCC if the newer GLIBC is available.
23556
23557 2017-07-12  Jeff Law  <law@redhat.com>
23558
23559         * config/riscv/riscv.c: Remove unnecessary includes.  Reorder
23560         remaining includes slightly.
23561         * config/riscv/riscv-builtins.c: Include profile-count.h.
23562
23563 2017-07-12  Georg-Johann Lay  <avr@gjlay.de>
23564
23565         PR target/79883
23566         * config/avr/avr.c (avr_set_current_function): In diagnostic
23567         messages: Quote keywords and (parts of) identifiers.
23568         [WITH_AVRLIBC]: Warn for functions named "ISR", "SIGNAL" or
23569         "INTERUPT".
23570
23571 2017-07-12  Carl Love  <cel@us.ibm.com>
23572
23573         * config/rs6000/rs6000-c.c: Add support for built-in functions
23574         vector bool char vec_revb (vector bool char);
23575         vector bool short vec_revb (vector short char);
23576         vector bool int vec_revb (vector bool int);
23577         vector bool long long vec_revb (vector bool long long);
23578         * doc/extend.texi: Update the built-in documentation file for the
23579         new built-in functions.
23580
23581 2017-07-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23582
23583         * config/s390/s390.md: Remove movcc splitter.
23584
23585 2017-07-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23586
23587         * config/s390/s390.c (s390_rtx_costs): Return proper costs for
23588         load/store on condition.
23589
23590 2017-07-12  Georg-Johann Lay  <avr@gjlay.de>
23591
23592         PR target/81407
23593         * config/avr/avr.c (avr_encode_section_info)
23594         [progmem && !TREE_READONLY]: Error if progmem object needs
23595         constructing.
23596
23597 2017-07-11  Michael Collison  <michael.collison@arm.com>
23598
23599         * config/aarch64/aarch64-simd.md (aarch64_sub<mode>_compare0):
23600         New pattern.
23601
23602 2017-07-11  Carl Love  <cel@us.ibm.com>
23603
23604         * config/rs6000/rs6000-c.c: Add support for builtins
23605         vector unsigned int vec_parity_lsbb (vector signed int);
23606         vector unsigned int vec_parity_lsbb (vector unsigned int);
23607         vector unsigned __int128 vec_parity_lsbb (vector signed __int128);
23608         vector unsigned __int128 vec_parity_lsbb (vector unsigned __int128);
23609         vector unsigned long long vec_parity_lsbb (vector signed long long);
23610         vector unsigned long long vec_parity_lsbb (vector unsigned long long);
23611         * config/rs6000/rs6000-builtin.def (VPARITY_LSBB): Add BU_P9V_OVERLOAD1.
23612         * config/rs6000/altivec.h (vec_parity_lsbb): Add define.
23613         * doc/extend.texi: Update the built-in documentation file for the
23614         new built-in functions.
23615
23616 2017-07-11  David Malcolm  <dmalcolm@redhat.com>
23617
23618         * diagnostic-show-locus.c: Include "gcc-rich-location.h".
23619         (layout::m_primary_loc): New field.
23620         (layout::layout): Initialize new field.  Move location filtering
23621         logic from here to...
23622         (layout::maybe_add_location_range): ...this new method.  Add
23623         support for filtering to just the lines already specified by other
23624         locations.
23625         (layout::will_show_line_p): New method.
23626         (gcc_rich_location::add_location_if_nearby): New method.
23627         (selftest::test_add_location_if_nearby): New test function.
23628         (selftest::diagnostic_show_locus_c_tests): Call it.
23629         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
23630         New method.
23631
23632 2017-07-11  Tom de Vries  <tom@codesourcery.com>
23633
23634         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG): New macro.
23635         (bb_first_real_insn): New function.
23636         (nvptx_single): Add extra initialization of broadcasted condition
23637         variables.
23638
23639 2017-07-11  Nathan Sidwell  <nathan@acm.org>
23640
23641         * dwarf2out.c (gen_member_die): Remove useless check for anon ctors.
23642
23643 2017-07-11  Georg-Johann Lay  <avr@gjlay.de>
23644
23645         * doc/extend.texi (AVR Function Attributes): Remove weblink to
23646         Binutils doc as TEXI will mess them up.
23647         * doc/invoke.texi (AVR Options): Same here.
23648
23649 2017-07-11  Daniel Cederman  <cederman@gaisler.com>
23650
23651         * config/sparc/sparc.opt (mfix-ut700): New option.
23652         (mfix-gr712rc): Likewise.
23653         (sparc_fix_b2bst): New variable.
23654         * doc/invoke.texi (SPARC options): Document them.
23655         (ARM options): Fix warnings.
23656         * config/sparc/sparc.c (sparc_do_work_around_errata): Insert NOP
23657         instructions to prevent sequences that can trigger the store-store
23658         errata for certain LEON3FT processors.
23659         (pass_work_around_errata::gate): Also test sparc_fix_b2bst.
23660         (sparc_option_override): Set sparc_fix_b2bst appropriately.
23661         * config/sparc/sparc.md (fix_b2bst): New attribute.
23662         (in_branch_delay): Prevent stores in delay slot if fix_b2bst.
23663
23664 2017-07-10  Uros Bizjak  <ubizjak@gmail.com>
23665
23666         PR target/81375
23667         * config/i386/i386.md (divsf3): Add TARGET_SSE to TARGET_SSE_MATH.
23668         (rcpps): Ditto.
23669         (*rsqrtsf2_sse): Ditto.
23670         (rsqrtsf2): Ditto.
23671         (div<mode>3): Macroize insn from divdf3 and divsf3
23672         using MODEF mode iterator.
23673
23674 2017-07-10  Martin Sebor  <msebor@redhat.com>
23675
23676         PR tree-optimization/80397
23677         * gimple-ssa-sprintf.c (format_integer): Use INTEGRAL_TYPE_P()
23678         instead of testing for equality to INTEGER_TYPE.
23679
23680 2017-07-10  Vineet Gupta <vgupta@synopsys.com>
23681
23682         * config.gcc: Remove uclibc from arc target spec.
23683
23684 2017-07-10  Claudiu Zissulescu  <claziss@synopsys.com>
23685
23686         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Define.
23687
23688 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
23689
23690         PR lto/80838
23691         * lto-wrapper.c (remove_option): New function.
23692         (merge_and_complain): Merge PIC/PIE options more realistically.
23693
23694 2017-07-10  Georg-Johann Lay  <avr@gjlay.de>
23695
23696         Better ISR prologues by supporting GASes __gcc_isr pseudo insn.
23697
23698         PR target/20296
23699         PR target/81268
23700         * configure.ac [target=avr]: Add GAS check for -mgcc-isr.
23701         (HAVE_AS_AVR_MGCCISR_OPTION):  If so, AC_DEFINE it.
23702         * config.in: Regenerate.
23703         * configure: Regenerate.
23704         * doc/extend.texi (AVR Function Attributes) <no_gccisr>: Document it.
23705         * doc/invoke.texi (AVR Options) <-mgas-isr-prologues>: Document it.
23706         * config/avr/avr.opt (-mgas-isr-prologues): New option and...
23707         (TARGET_GASISR_PROLOGUES): ...target mask.
23708         * common/config/avr/avr-common.c
23709         (avr_option_optimization_table) [OPT_LEVELS_1_PLUS_NOT_DEBUG]:
23710         Set -mgas-isr-prologues.
23711         * config/avr/avr-passes.def (avr_pass_pre_proep): Add
23712         INSERT_PASS_BEFORE for it.
23713         * config/avr/avr-protos.h (make_avr_pass_pre_proep): New proto.
23714         * config/avr/avr.c (avr_option_override)
23715         [!HAVE_AS_AVR_MGCCISR_OPTION]: Unset TARGET_GASISR_PROLOGUES.
23716         (avr_no_gccisr_function_p, avr_hregs_split_reg): New static functions.
23717         (avr_attribute_table) <no_gccisr>: Add new function attribute.
23718         (avr_set_current_function) <is_no_gccisr>: Init machine field.
23719         (avr_pass_data_pre_proep, avr_pass_pre_proep): New pass data
23720         and rtl_opt_pass.
23721         (make_avr_pass_pre_proep): New function.
23722         (emit_push_sfr) <treg>: Add argument to function and use it
23723         instead of TMP_REG.
23724         (avr_expand_prologue) [machine->gasisr.maybe]: Emit gasisr insn
23725         and set machine->gasisr.yes.
23726         (avr_expand_epilogue) [machine->gasisr.yes]: Similar.
23727         (avr_asm_function_end_prologue) [machine->gasisr.yes]: Add
23728         __gcc_isr.n_pushed to .L__stack_usage.
23729         (TARGET_ASM_FINAL_POSTSCAN_INSN): Define to...
23730         (avr_asm_final_postscan_insn): ...this new static function.
23731         * config/avr/avr.h (machine_function)
23732         <is_no_gccisr, use_L__stack_usage>: New fields.
23733         <gasisr, gasisr.yes, gasisr.maybe, gasisr.regno>: New fields.
23734         * config/avr/avr.md (UNSPECV_GASISR): Add unspecv enum.
23735         (GASISR_Prologue, GASISR_Epilogue, GASISR_Done): New define_constants.
23736         (gasisr, *gasisr): New expander and insn.
23737         * config/avr/gen-avr-mmcu-specs.c (print_mcu)
23738         [HAVE_AS_AVR_MGCCISR_OPTION]: Print asm_gccisr spec.
23739         * config/avr/specs.h (ASM_SPEC) <asm_gccisr>: Add sub spec.
23740
23741 2017-07-10  Richard Earnshaw  <rearnsha@arm.com>
23742
23743         * config/arm/parsecpu.awk (gen_comm_data): Do not escape single quotes
23744         in quoted strings.
23745
23746 2017-07-10  Georg-Johann Lay  <avr@gjlay.de>
23747
23748         Move jump-tables out of .text again.
23749
23750         PR target/81075
23751         * config/avr/avr.c (ASM_OUTPUT_ADDR_VEC_ELT): Remove function.
23752         (ASM_OUTPUT_ADDR_VEC): New function.
23753         (avr_adjust_insn_length) [JUMP_TABLE_DATA_P]: Return 0.
23754         (avr_final_prescan_insn) [avr_log.insn_addresses]: Dump
23755         INSN_ADDRESSes as asm comment.
23756         * config/avr/avr.h (JUMP_TABLES_IN_TEXT_SECTION): Adjust comment.
23757         (ASM_OUTPUT_ADDR_VEC_ELT): Remove define.
23758         (ASM_OUTPUT_ADDR_VEC): Define to avr_output_addr_vec.
23759         * config/avr/avr.md (*tablejump): Adjust comment.
23760         * config/avr/elf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove.
23761         * config/avr/avr-log.c (avr_log_set_avr_log) <insn_addresses>:
23762         New detail.
23763         * config/avr/avr-protos.h (avr_output_addr_vec_elt): Remove proto.
23764         (avr_output_addr_vec): New proto.
23765         (avr_log_t) <insn_addresses>: New field.
23766
23767 2017-07-09  H.J. Lu  <hongjiu.lu@intel.com>
23768
23769         PR target/81313
23770         * config/i386/i386.c (ix86_function_arg_advance): Set
23771         outgoing_args_on_stack to true if there are outgoing arguments
23772         on stack.
23773         (ix86_function_arg): Likewise.
23774         (ix86_get_drap_rtx): Use DRAP only if there are outgoing
23775         arguments on stack and ACCUMULATE_OUTGOING_ARGS is false.
23776         * config/i386/i386.h (machine_function): Add
23777         outgoing_args_on_stack.
23778
23779 2017-07-09  Krister Walfridsson  <krister.walfridsson@gmail.com>
23780
23781         * config.gcc (*-*-netbsd*): Remove check for NetBSD versions not
23782         supporting pthreds.
23783         * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always enable pthreads.
23784
23785 2017-07-08  Richard Sandiford  <richard.sandiford@linaro.org>
23786
23787         * Makefile.in (HOOKS_H, RTL_BASE_H, FUNCTION_H, EXPR_H, REGS_H)
23788         (REAL_H): Remove $(MACHMODE_H).
23789         (FIXED_VALUE_H, TREE_CORE_H, CFGLOOP_H): Remove $(MACHMODE_H) and
23790         double-int.h.
23791         (CORETYPES_H): Add signop.h, wide-int.h, wide-int-print.h,
23792         $(MACHMODE_H) and double-int.h.
23793         (build/min-insn-modes.o): Depend on $(CORETYPES_H) rather than
23794         $(MACHMODE_H).
23795         (gengtype-state.o, gengtype.o, build/gengtype.o): Don't depend on
23796         double-int.h.
23797
23798 2017-07-07  Andrew Pinski  <apinski@cavium.com>
23799
23800         * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Check
23801         prev_set and curr_set for AARCH64_FUSE_ALU_BRANCH.
23802
23803 2017-07-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
23804
23805         * config/rs6000/rs6000.c (rs6000_get_function_versions_dispatcher):
23806         Add warning if GCC was not configured to link against a GLIBC that
23807         exports the hardware capability bits.
23808         (make_resolver_func): Make resolver function private and not a
23809         COMDAT function.  Create the name with clone_function_name instead
23810         of make_unique_name.
23811
23812         PR target/81348
23813         * config/rs6000/rs6000.md (HI sign_extend splitter): Use the
23814         correct operand in doing the split.
23815
23816 2017-07-07 Carl Love  <cel@us.ibm.com>
23817
23818         * config/rs6000/rs6000-c: Add support for built-in function
23819         vector unsigned short vec_pack_to_short_fp32 (vector float,
23820                                                       vector float).
23821         * config/rs6000/rs6000-builtin.def (CONVERT_4F32_8I16): Add
23822         BU_P9V_AV_2 and BU_P9V_OVERLOAD_2 definitions.
23823         * config/rs6000/altivec.h (vec_pack_to_short_fp32): Add define.
23824         * config/rs6000/altivec.md(UNSPEC_CONVERT_4F32_8I16): Add UNSPEC.
23825         (convert_4f32_8i16): Add define_expand.
23826         * doc/extend.texi: Update the built-in documentation file for the
23827         new built-in function.
23828
23829 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
23830
23831         * config/sparc/m8.md: New file.
23832         * config/sparc/sparc.md: Include m8.md.
23833
23834 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
23835
23836         * config/sparc/sparc.opt: New option -mvis4b.
23837         * config/sparc/sparc.c (dump_target_flag_bits): Handle MASK_VIS4B.
23838         (sparc_option_override): Handle VIS4B.
23839         (enum sparc_builtins): Define
23840         SPARC_BUILTIN_DICTUNPACK{8,16,32},
23841         SPARC_BUILTIN_FPCMP{LE,GT,EQ,NE}{8,16,32}SHL,
23842         SPARC_BUILTIN_FPCMPU{LE,GT}{8,16,32}SHL,
23843         SPARC_BUILTIN_FPCMPDE{8,16,32}SHL and
23844         SPARC_BUILTIN_FPCMPUR{8,16,32}SHL.
23845         (check_constant_argument): New function.
23846         (sparc_vis_init_builtins): Define builtins
23847         __builtin_vis_dictunpack{8,16,32},
23848         __builtin_vis_fpcmp{le,gt,eq,ne}{8,16,32}shl,
23849         __builtin_vis_fpcmpu{le,gt}{8,16,32}shl,
23850         __builtin_vis_fpcmpde{8,16,32}shl and
23851         __builtin_vis_fpcmpur{8,16,32}shl.
23852         (sparc_expand_builtin): Check that the constant operands to
23853         __builtin_vis_fpcmp*shl and _builtin_vis_dictunpack* are indeed
23854         constant and in range.
23855         * config/sparc/sparc-c.c (sparc_target_macros): Handle
23856         TARGET_VIS4B.
23857         * config/sparc/sparc.h (SPARC_IMM2_P): Define.
23858         (SPARC_IMM5_P): Likewise.
23859         * config/sparc/sparc.md (cpu_feature): Add new feagure "vis4b".
23860         (enabled): Handle vis4b.
23861         (UNSPEC_DICTUNPACK): New unspec.
23862         (UNSPEC_FPCMPSHL): Likewise.
23863         (UNSPEC_FPUCMPSHL): Likewise.
23864         (UNSPEC_FPCMPDESHL): Likewise.
23865         (UNSPEC_FPCMPURSHL): Likewise.
23866         (cpu_feature): New CPU feature `vis4b'.
23867         (dictunpack{8,16,32}): New insns.
23868         (FPCSMODE): New mode iterator.
23869         (fpcscond): New code iterator.
23870         (fpcsucond): Likewise.
23871         (fpcmp{le,gt,eq,ne}{8,16,32}{si,di}shl): New insns.
23872         (fpcmpu{le,gt}{8,16,32}{si,di}shl): Likewise.
23873         (fpcmpde{8,16,32}{si,di}shl): Likewise.
23874         (fpcmpur{8,16,32}{si,di}shl): Likewise.
23875         * config/sparc/constraints.md: Define constraints `q' for unsigned
23876         2-bit integer constants and `t' for unsigned 5-bit integer
23877         constants.
23878         * config/sparc/predicates.md (imm5_operand_dictunpack8): New
23879         predicate.
23880         (imm5_operand_dictunpack16): Likewise.
23881         (imm5_operand_dictunpack32): Likewise.
23882         (imm2_operand): Likewise.
23883         * doc/invoke.texi (SPARC Options): Document -mvis4b.
23884         * doc/extend.texi (SPARC VIS Built-in Functions): Document the
23885         ditunpack* and fpcmp*shl builtins.
23886
23887 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
23888
23889         * config.gcc: Handle m8 in --with-{cpu,tune} options.
23890         * config.in: Add HAVE_AS_SPARC6 define.
23891         * config/sparc/driver-sparc.c (cpu_names): Add entry for the SPARC
23892         M8.
23893         * config/sparc/sol2.h (CPP_CPU64_DEFAULT_SPEC): Define for
23894         TARGET_CPU_m8.
23895         (ASM_CPU32_DEFAUILT_SPEC): Likewise.
23896         (CPP_CPU_SPEC): Handle m8.
23897         (ASM_CPU_SPEC): Likewise.
23898         * config/sparc/sparc-opts.h (enum processor_type): Add
23899         PROCESSOR_M8.
23900         * config/sparc/sparc.c (m8_costs): New struct.
23901         (sparc_option_override): Handle TARGET_CPU_m8.
23902         (sparc32_initialize_trampoline): Likewise.
23903         (sparc64_initialize_trampoline): Likewise.
23904         (sparc_issue_rate): Likewise.
23905         (sparc_register_move_cost): Likewise.
23906         * config/sparc/sparc.h (TARGET_CPU_m8): Define.
23907         (CPP_CPU64_DEFAULT_SPEC): Define for M8.
23908         (ASM_CPU64_DEFAULT_SPEC): Likewise.
23909         (CPP_CPU_SPEC): Handle M8.
23910         (ASM_CPU_SPEC): Likewise.
23911         (AS_M8_FLAG): Define.
23912         * config/sparc/sparc.md: Add m8 to the cpu attribute.
23913         * config/sparc/sparc.opt: New option -mcpu=m8 for sparc targets.
23914         * configure.ac (HAVE_AS_SPARC6): Check for assembler support for
23915         M8 instructions.
23916         * configure: Regenerate.
23917         * doc/invoke.texi (SPARC Options): Document -mcpu=m8 and
23918         -mtune=m8.
23919
23920 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
23921
23922         * config/sparc/niagara7.md: Rework the DFA scheduler to use insn
23923         subtypes.
23924         * config/sparc/sparc.md: Remove the `v3pipe' insn attribute.
23925         ("*movdi_insn_sp32"): Do not set v3pipe.
23926         ("*movsi_insn"): Likewise.
23927         ("*movdi_insn_sp64"): Likewise.
23928         ("*movsf_insn"): Likewise.
23929         ("*movdf_insn_sp32"): Likewise.
23930         ("*movdf_insn_sp64"): Likewise.
23931         ("*zero_extendsidi2_insn_sp64"): Likewise.
23932         ("*sign_extendsidi2_insn"): Likewise.
23933         ("*mov<VM32:mode>_insn"): Likewise.
23934         ("*mov<VM64:mode>_insn_sp64"): Likewise.
23935         ("*mov<VM64:mode>_insn_sp32"): Likewise.
23936         ("<plusminus_insn><VADDSUB:mode>3"): Likewise.
23937         ("<vlop:code><VL:mode>3"): Likewise.
23938         ("*not_<vlop:code><VL:mode>3"): Likewise.
23939         ("*nand<VL:mode>_vis"): Likewise.
23940         ("*<vlnotop:code>_not1<VL:mode>_vis"): Likewise.
23941         ("*<vlnotop:code>_not2<VL:mode>_vis"): Likewise.
23942         ("one_cmpl<VL:mode>2"): Likewise.
23943         ("faligndata<VM64:mode>_vis"): Likewise.
23944         ("alignaddrsi_vis"): Likewise.
23945         ("alignaddrdi_vis"): Likweise.
23946         ("alignaddrlsi_vis"): Likewise.
23947         ("alignaddrldi_vis"): Likewise.
23948         ("fcmp<gcond:code><GCM:gcm_name><P:mode>_vis"): Likewise.
23949         ("bmaskdi_vis"): Likewise.
23950         ("bmasksi_vis"): Likewise.
23951         ("bshuffle<VM64:mode>_vis"): Likewise.
23952         ("cmask8<P:mode>_vis"): Likewise.
23953         ("cmask16<P:mode>_vis"): Likewise.
23954         ("cmask32<P:mode>_vis"): Likewise.
23955         ("pdistn<P:mode>_vis"): Likewise.
23956         ("<vis3_addsub_ss_patname><VASS:mode>3"): Likewise.
23957
23958 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
23959
23960         * config/sparc/sparc.md ("subtype"): New insn attribute.
23961         ("*wrgsr_sp64"): Set insn subtype.
23962         ("*rdgsr_sp64"): Likewise.
23963         ("alignaddrsi_vis"): Likewise.
23964         ("alignaddrdi_vis"): Likewise.
23965         ("alignaddrlsi_vis"): Likewise.
23966         ("alignaddrldi_vis"): Likewise.
23967         ("<plusminus_insn><VADDSUB:mode>3"): Likewise.
23968         ("fexpand_vis"): Likewise.
23969         ("fpmerge_vis"): Likewise.
23970         ("faligndata<VM64:mode>_vis"): Likewise.
23971         ("bshuffle<VM64:mode>_vis"): Likewise.
23972         ("cmask8<P:mode>_vis"): Likewise.
23973         ("cmask16<P:mode>_vis"): Likewise.
23974         ("cmask32<P:mode>_vis"): Likewise.
23975         ("fchksm16_vis"): Likewise.
23976         ("v<vis3_shift_patname><GCM:mode>3"): Likewise.
23977         ("fmean16_vis"): Likewise.
23978         ("fp<plusminus_insn>64_vis"): Likewise.
23979         ("<plusminus_insn>v8qi3"): Likewise.
23980         ("<vis3_addsub_ss_patname><VASS:mode>3"): Likewise.
23981         ("<vis4_minmax_patname><VMMAX:mode>3"): Likewise.
23982         ("<vis4_uminmax_patname><VMMAX:mode>3"): Likewise.
23983         ("<vis3_addsub_ss_patname>v8qi3"): Likewise.
23984         ("<vis4_addsub_us_patname><VAUS:mode>3"): Likewise.
23985         ("*movqi_insn"): Likewise.
23986         ("*movhi_insn"): Likewise.
23987         ("*movsi_insn"): Likewise.
23988         ("movsi_pic_gotdata_op"): Likewise.
23989         ("*movdi_insn_sp32"): Likewise.
23990         ("*movdi_insn_sp64"): Likewise.
23991         ("movdi_pic_gotdata_op"): Likewise.
23992         ("*movsf_insn"): Likewise.
23993         ("*movdf_insn_sp32"): Likewise.
23994         ("*movdf_insn_sp64"): Likewise.
23995         ("*zero_extendhisi2_insn"): Likewise.
23996         ("*zero_extendqihi2_insn"): Likewise.
23997         ("*zero_extendqisi2_insn"): Likewise.
23998         ("*zero_extendqidi2_insn"): Likewise.
23999         ("*zero_extendhidi2_insn"): Likewise.
24000         ("*zero_extendsidi2_insn_sp64"): Likewise.
24001         ("ldfsr"): Likewise.
24002         ("prefetch_64"): Likewise.
24003         ("prefetch_32"): Likewise.
24004         ("tie_ld32"): Likewise.
24005         ("tie_ld64"): Likewise.
24006         ("*tldo_ldub_sp32"): Likewise.
24007         ("*tldo_ldub1_sp32"): Likewise.
24008         ("*tldo_ldub2_sp32"): Likewise.
24009         ("*tldo_ldub_sp64"): Likewise.
24010         ("*tldo_ldub1_sp64"): Likewise.
24011         ("*tldo_ldub2_sp64"): Likewise.
24012         ("*tldo_ldub3_sp64"): Likewise.
24013         ("*tldo_lduh_sp32"): Likewise.
24014         ("*tldo_lduh1_sp32"): Likewise.
24015         ("*tldo_lduh_sp64"): Likewise.
24016         ("*tldo_lduh1_sp64"): Likewise.
24017         ("*tldo_lduh2_sp64"): Likewise.
24018         ("*tldo_lduw_sp32"): Likewise.
24019         ("*tldo_lduw_sp64"): Likewise.
24020         ("*tldo_lduw1_sp64"): Likewise.
24021         ("*tldo_ldx_sp64"): Likewise.
24022         ("*mov<VM32:mode>_insn"): Likewise.
24023         ("*mov<VM64:mode>_insn_sp64"): Likewise.
24024         ("*mov<VM64:mode>_insn_sp32"): Likewise.
24025
24026 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
24027
24028         * config/sparc/sparc.md ("type"): New insn type viscmp.
24029         ("fcmp<gcond:code><GCM:gcm_name><P:mode>_vis"): Set insn type to
24030         viscmp.
24031         ("fpcmp<gcond:code>8<P:mode>_vis"): Likewise.
24032         ("fucmp<gcond:code>8<P:mode>_vis"): Likewise.
24033         ("fpcmpu<gcond:code><GCM:gcm_name><P:mode>_vis"): Likewise.
24034         * config/sparc/niagara7.md ("n7_vis_logical_v3pipe"): Handle
24035         viscmp.
24036         ("n7_vis_logical_11cycle"): Likewise.
24037         * config/sparc/niagara4.md ("n4_vis_logical"): Likewise.
24038         * config/sparc/niagara2.md ("niag3_vis": Likewise.
24039         * config/sparc/niagara.md ("niag_vis"): Likewise.
24040         * config/sparc/ultra3.md ("us3_fga"): Likewise.
24041         * config/sparc/ultra1_2.md ("us1_fga_double"): Likewise.
24042
24043 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
24044
24045         * config/sparc/sparc.md: New instruction type `bmask'.
24046         (bmaskdi_vis): Use the `bmask' type.
24047         (bmasksi_vis): Likewise.
24048         * config/sparc/ultra3.md (us3_array): Likewise.
24049         * config/sparc/niagara7.md (n7_array): Likewise.
24050         * config/sparc/niagara4.md (n4_array): Likewise.
24051         * config/sparc/niagara2.md (niag2_vis): Likewise.
24052         (niag3_vis): Likewise.
24053         * config/sparc/niagara.md (niag_vis): Likewise.
24054
24055 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
24056
24057         * ipa-comdats.c: Remove optimize check from gate.
24058         * ipa-fnsummary.c (ipa_fn_summary_generate): do not generate summary
24059         for functions not optimized.
24060         (ipa_fn_summary_read): Skip optimize check.
24061         (ipa_fn_summary_write): Likewise.
24062         * ipa-inline-analysis.c (do_estimate_growth_1): Check that caller
24063         is optimized.
24064         * ipa-inline.c (can_inline_edge_p): Not optimized functions are
24065         uninlinable.
24066         (can_inline_edge_p): Check flag_pcc_struct_return for match.
24067         (check_callers): Give up on caller which is not optimized.
24068         (inline_small_functions): Likewise.
24069         (ipa_inline): Do not give up when not optimizing.
24070         * ipa-visbility.c (function_and_variable_visibility): Do not optimize
24071         away unoptimizes cdtors.
24072         (whole_program_function_and_variable_visibility): Do
24073         ipa_discover_readonly_nonaddressable_vars in LTO mode.
24074         * ipa.c (process_references): Do not check optimize.
24075         (symbol_table::remove_unreachable_nodes): Update optimize check.
24076         (set_writeonly_bit): Update optimize check.
24077         (pass_ipa_cdtor_merge::gate): Do not check optimize.
24078         (pass_ipa_single_use::gate): Remove.
24079
24080 2017-07-06  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24081
24082         * config/rs6000/rs6000.c (union_defs, union_uses, insn_is_load_p,
24083         insn_is_store_p, insn_is_swap_p, const_load_sequence_p, v2df_reduction_p,
24084         rtx_is_swappable_p, insn_is_swappable_p, chain_contains_only_swaps,
24085         mark_swaps_for_removal, swap_const_vector_halves, adjust_subreg_index,
24086         permute_load, permute_store, adjust_extract, adjust_splat,
24087         adjust_xxpermdi, adjust_concat, adjust_vperm, handle_special_swappables,
24088         replace_swap_with_copy, dump_swap_insn_table,
24089         alignment_with_canonical_addr, alignment_mask, find_alignment_op,
24090         recombine_lvx_pattern, recombine_stvx_pattern,
24091         recombine_lvx_stvx_patterns, rs6000_analyze_swaps,
24092         make_pass_analyze_swaps): Move all code related to p8 swap optimizations
24093         to file rs6000-p8swap.c.
24094         * config/rs6000/rs6000-p8swap.c: New file.
24095         * config/rs6000/t-rs6000: Add rule to build rs6000-p8swap.o.
24096         * config.gcc: Add rs6000-p8swap.o to extra_objs for powerpc*-*-*
24097         and rs6000*-*-* targets.
24098
24099 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
24100
24101         * Makefile.in (selftest): Remove dependency on s-selftest-c++.
24102
24103 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
24104
24105         * lto-wrapper.c (merge_and_complain): Do not merge
24106         fexceptions, fnon_call_exceptions, ftrapv, ffp_contract_, fmath_errno,
24107         fsigned_zeros, ftrapping_math, fwrapv.
24108         (append_compiler_options): Do not track these options.
24109         (append_linker_options): Likewie
24110
24111 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
24112
24113         * cgraphunit.c (cgraph_node::finalize_function): When
24114         !flag_toplevel_reorde set no_reorder flag.
24115         (varpool_node::finalize_decl): Likewise.
24116         (symbol_table::compile): Drop no toplevel reorder path.
24117
24118 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
24119
24120         * bb-reorder.c (better_edge_p): Do not build traces across abnormal/eh
24121         edges; zero probability is not better than uninitialized.
24122
24123 2017-07-06  Maxim Ostapenko  <m.ostapenko@samsung.com>
24124
24125         * asan.h (asan_sanitize_allocas_p): Declare.
24126         * asan.c (asan_sanitize_allocas_p): New function.
24127         (handle_builtin_stack_restore): Bail out if !asan_sanitize_allocas_p.
24128         (handle_builtin_alloca): Likewise.
24129         * cfgexpand.c (expand_used_vars): Do not add allocas unpoisoning stuff
24130         if !asan_sanitize_allocas_p.
24131         * params.def (asan-instrument-allocas): Add new option.
24132         * params.h (ASAN_PROTECT_ALLOCAS): Define.
24133         * opts.c (common_handle_option): Disable allocas sanitization for
24134         KASan by default.
24135
24136 2017-07-06  Maxim Ostapenko  <m.ostapenko@samsung.com>
24137
24138         * asan.c: Include gimple-fold.h.
24139         (get_last_alloca_addr): New function.
24140         (handle_builtin_stackrestore): Likewise.
24141         (handle_builtin_alloca): Likewise.
24142         (asan_emit_allocas_unpoison): Likewise.
24143         (get_mem_refs_of_builtin_call): Add new parameter, remove const
24144         quallifier from first paramerer. Handle BUILT_IN_ALLOCA,
24145         BUILT_IN_ALLOCA_WITH_ALIGN and BUILT_IN_STACK_RESTORE builtins.
24146         (instrument_builtin_call): Pass gimple iterator to
24147         get_mem_refs_of_builtin_call.
24148         (last_alloca_addr): New global.
24149         * asan.h (asan_emit_allocas_unpoison): Declare.
24150         * builtins.c (expand_asan_emit_allocas_unpoison): New function.
24151         (expand_builtin): Handle BUILT_IN_ASAN_ALLOCAS_UNPOISON.
24152         * cfgexpand.c (expand_used_vars): Call asan_emit_allocas_unpoison
24153         if function calls alloca.
24154         * gimple-fold.c (replace_call_with_value): Remove static keyword.
24155         * gimple-fold.h (replace_call_with_value): Declare.
24156         * internal-fn.c: Include asan.h.
24157         * sanitizer.def (BUILT_IN_ASAN_ALLOCA_POISON,
24158         BUILT_IN_ASAN_ALLOCAS_UNPOISON): New builtins.
24159
24160 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
24161
24162         * Makefile.in (SELFTEST_FLAGS): Drop "-x c", moving it to...
24163         (C_SELFTEST_FLAGS): New.
24164         (CPP_SELFTEST_FLAGS): New.
24165         (SELFTEST_DEPS): New, from deps of s-selftest.
24166         (C_SELFTEST_DEPS): New, from deps of s-selftest.
24167         (CPP_SELFTEST_DEPS): New.
24168         (selftest): Add dependency on s-selftest-c++.
24169         (s-selftest): Rename to...
24170         (s-selftest-c): ...this, moving deps to SELFTEST_DEPS
24171         and C_SELFTEST_DEPS, and using C_SELFTEST_FLAGS rather
24172         than SELFTEST_FLAGS.
24173         (selftest-gdb): Rename to...
24174         (selftest-c-gdb): ...this, using C_SELFTEST_DEPS and
24175         C_SELFTEST_FLAGS.
24176         (selftest-gdb): Reintroduce as an alias for selftest-c-gdb.
24177         (selftest-valgrind): Rename to...
24178         (selftest-c-valgrind): ...this, using C_SELFTEST_DEPS and
24179         C_SELFTEST_FLAGS.
24180         (selftest-valgrind): Reintroduce as an alias for
24181         selftest-c-valgrind.
24182         (s-selftest-c++): New.
24183         (selftest-c++-gdb): New.
24184         (selftest-c++-valgrind): New.
24185
24186 2017-07-06  Olivier Hainque  <hainque@adacore.com>
24187
24188         * gcc.c (process_command): When deciding if undefined variables
24189         should be ignored when processing specs, accept "gcc -v" as well.
24190
24191 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
24192
24193         * auto-profile.c (afdo_set_bb_count, afdo_propagate_edge,
24194         afdo_annotate_cfg): Set counts/probabilities as determined by afdo.
24195
24196 2017-07-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
24197
24198         * config/arm/arm-cpus.in (armv8-r): Add new entry.
24199         * config/arm/arm-isa.h (ISA_ARMv8r): Define macro.
24200         * config/arm/arm-tables.opt: Regenerate.
24201         * config/arm/arm.h (enum base_architecture): Add BASE_ARCH_8R
24202         enumerator.
24203         * doc/invoke.texi: Mention -march=armv8-r and its extensions.
24204
24205 2017-07-06  Carl Love  <cel@us.ibm.com>
24206
24207         * ChangeLog: Clean up from mid air collision
24208
24209 2017-07-06  Carl Love  <cel@us.ibm.com>
24210
24211         * config/rs6000/rs6000-c.c: Add support for built-in functions
24212         vector signed int vec_subc (vector signed int, vector signed int);
24213         vector signed __int128 vec_subc (vector signed __int128,
24214                                          vector signed __int128);
24215         vector unsigned __int128 vec_subc (vector unsigned __int128,
24216                                            vector unsigned __int128);
24217         vector signed int vec_sube (vector signed int, vector signed int,
24218                                     vector signed int);
24219         vector unsigned int vec_sube (vector unsigned int,
24220                                       vector unsigned int,
24221                                       vector unsigned int);
24222         vector signed __int128 vec_sube (vector signed __int128,
24223                                          vector signed __int128,
24224                                          vector signed__int128);
24225         vector unsigned __int128 vec_sube (vector unsigned __int128,
24226                                            vector unsigned __int128,
24227                                            vector unsigned __int128);
24228         vector signed int vec_subec (vector signed int, vector signed int,
24229                                      vector signed int);
24230         vector unsigned int vec_subec (vector unsigned int,
24231                                        vector unsigned int,
24232                                        vector unsigned int);
24233         vector signed __int128 vec_subec (vector signed __int128,
24234                                           vector signed __int128,
24235                                           vector signed__int128);
24236         vector unsigned __int128 vec_subec (vector unsigned __int128,
24237                                             vector unsigned __int128,
24238                                             vector unsigned __int128);
24239         * config/rs6000/rs6000.c (ALTIVEC_BUILTIN_VEC_SUBE,
24240         ALTIVEC_BUILTIN_VEC_SUBEC): Add ef_builtins.
24241         * config/rs6000/rs6000-builtin.def (SUBE, SUBEC): Add
24242         BU_ALTIVEC_OVERLOAD_X definitions.
24243         * config/rs6000/altivec.h (vec_sube, vec_subec): Add builtin defines.
24244         * doc/extend.texi: Update the built-in documentation file for the new
24245         built-in functions.
24246
24247 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
24248
24249         PR c++/79300
24250         * diagnostic-show-locus.c (layout::layout): Use start and finish
24251         spelling location for the start and finish of each range.
24252         * genmatch.c (linemap_client_expand_location_to_spelling_point):
24253         Add unused aspect param.
24254         * input.c (expand_location_1): Add "aspect" param, and use it
24255         to access the correct part of the location.
24256         (expand_location): Pass LOCATION_ASPECT_CARET to new param of
24257         expand_location_1.
24258         (expand_location_to_spelling_point): Likewise.
24259         (linemap_client_expand_location_to_spelling_point): Add "aspect"
24260         param, and pass it to expand_location_1.
24261
24262 2017-07-06  Sebastian Peryt  <sebastian.peryt@intel.com>
24263
24264         * config/i386/avx512fintrin.h (_mm_mask_getexp_round_ss,
24265         _mm_maskz_getexp_round_ss, _mm_mask_getexp_round_sd,
24266         _mm_maskz_getexp_round_sd, _mm_mask_getmant_round_sd,
24267         _mm_maskz_getmant_round_sd, _mm_mask_getmant_round_ss,
24268         _mm_maskz_getmant_round_ss, _mm_mask_getexp_ss, _mm_maskz_getexp_ss,
24269         _mm_mask_getexp_sd, _mm_maskz_getexp_sd, _mm_mask_getmant_sd,
24270         _mm_maskz_getmant_sd, _mm_mask_getmant_ss,
24271         _mm_maskz_getmant_ss): New intrinsics.
24272         (__builtin_ia32_getexpss128_mask): Changed to ...
24273         __builtin_ia32_getexpss128_round ... this.
24274         (__builtin_ia32_getexpsd128_mask): Changed to ...
24275         __builtin_ia32_getexpsd128_round ... this.
24276         * config/i386/i386-builtin-types.def
24277         ((V2DF, V2DF, V2DF, INT, V2DF, UQI, INT),
24278         (V4SF, V4SF, V4SF, INT, V4SF, UQI, INT)): New function type aliases.
24279         * config/i386/i386-builtin.def (__builtin_ia32_getexpsd_mask_round,
24280         __builtin_ia32_getexpss_mask_round,     __builtin_ia32_getmantsd_mask_round,
24281         __builtin_ia32_getmantss_mask_round): New builtins.
24282         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_INT_V2DF_UQI_INT,
24283         V4SF_FTYPE_V4SF_V4SF_INT_V4SF_UQI_INT): Handle new types.
24284         (CODE_FOR_avx512f_vgetmantv2df_mask_round,
24285         CODE_FOR_avx512f_vgetmantv4sf_mask_round): New cases.
24286         * config/i386/sse.md
24287         (avx512f_sgetexp<mode><round_saeonly_name>): Changed to ...
24288         avx512f_sgetexp<mode><mask_scalar_name>
24289         <round_saeonly_scalar_name> ... this.
24290         (vgetexp<ssescalarmodesuffix>\t{<round_saeonly_op3>%2, %1, %0|
24291         %0, %1, %2<round_saeonly_op3>}): Changed to ...
24292         vgetexp<ssescalarmodesuffix>
24293         \t{<round_saeonly_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
24294         %0<mask_scalar_operand3>, %1, %2<round_saeonly_scalar_mask_op3>} ... this.
24295         (avx512f_vgetmant<mode><round_saeonly_name>): Changed to ...
24296         avx512f_vgetmant<mode><mask_scalar_name>
24297         <round_saeonly_scalar_name> ... this.
24298         (vgetmant<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
24299         %0, %1, %2<round_saeonly_op4>, %3}): Changed to ...
24300         vgetmant<ssescalarmodesuffix>
24301         \t{%3, <round_saeonly_scalar_mask_op4>%2, %1, %0<mask_scalar_operand4>|
24302         %0<mask_scalar_operand4>, %1, %2
24303         <round_saeonly_scalar_mask_op4>, %3} ... this.
24304         * config/i386/subst.md (mask_scalar_operand4,
24305         round_saeonly_scalar_mask_operand4,     round_saeonly_scalar_mask_op4,
24306         round_saeonly_scalar_nimm_predicate): New subst attributes.
24307
24308 2017-07-06  Julia Koval  <julia.koval@intel.com>
24309
24310         * config/i386/i386.c (ix86_erase_embedded_rounding):
24311         Remove code for old rounding pattern.
24312
24313 2017-07-06  Richard Earnshaw  <rearnsha@arm.com>
24314
24315         * config/arm/t-arm (GTM_H): Add arm-cpu.h.
24316
24317 2017-07-06  Christophe Lyon  <christophe.lyon@linaro.org>
24318
24319         * doc/sourcebuild.texi (Test Directives, Variants of
24320         dg-require-support): Add documentation for dg-require-stack-check.
24321
24322 2017-07-05  Sebastian Peryt  <sebastian.peryt@intel.com>
24323
24324         * config/i386/subst.md (mask_scalar, round_scalar,
24325         round_saeonly_scalar): New meta-templates.
24326         (mask_scalar_name, mask_scalar_operand3, round_scalar_name,
24327         round_scalar_mask_operand3, round_scalar_mask_op3,
24328         round_scalar_constraint, round_scalar_prefix, round_saeonly_scalar_name,
24329         round_saeonly_scalar_mask_operand3, round_saeonly_scalar_mask_op3,
24330         round_saeonly_scalar_constraint,
24331         round_saeonly_scalar_prefix): New subst attribute.
24332         * config/i386/sse.md
24333         (<sse>_vm<plusminus_insn><mode>3<mask_name><round_name>): Renamed to ...
24334         <sse>_vm<plusminus_insn><mode>3<mask_scalar_name>
24335         <round_scalar_name> ... this.
24336         (<sse>_vm<multdiv_mnemonic><mode>3<mask_name><round_name>): Renamed to ...
24337         <sse>_vm<multdiv_mnemonic><mode>3<mask_scalar_name>
24338         <round_scalar_name> ... this.
24339         (<sse>_vm<code><mode>3<mask_name><round_saeonly_name>): Renamed to ...
24340         <sse>_vm<code><mode>3<mask_scalar_name>
24341         <round_saeonly_scalar_name> ... this.
24342         (v<plusminus_mnemonic><ssescalarmodesuffix>
24343         \t{<round_mask_op3>%2, %1, %0<mask_operand3>|
24344         %0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}): Changed to ...
24345         v<plusminus_mnemonic><ssescalarmodesuffix>
24346         \t{<round_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
24347         %0<mask_scalar_operand3>, %1, %<iptr>2<round_scalar_mask_op3>} ... this.
24348         (v<multdiv_mnemonic><ssescalarmodesuffix>
24349         \t{<round_mask_op3>%2, %1, %0<mask_operand3>|
24350         %0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}): Changed to ...
24351         v<multdiv_mnemonic><ssescalarmodesuffix>
24352         \t{<round_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
24353         %0<mask_scalar_operand3>, %1, %<iptr>2<round_scalar_mask_op3>} ... this.
24354         (v<maxmin_float><ssescalarmodesuffix>
24355         \t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|
24356         %0<mask_operand3>, %1, %<iptr>2<round_saeonly_mask_op3>}): Changed to ...
24357         v<maxmin_float><ssescalarmodesuffix>
24358         \t{<round_saeonly_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
24359         %0<mask_scalar_operand3>, %1, %<iptr>2
24360         <round_saeonly_scalar_mask_op3>} ... this.
24361
24362 2017-07-05  Richard Earnshaw  <rearnsha@arm.com>
24363
24364         * config/arm/arm.c (arm_fixed_condition_code_regs): New function.
24365         (TARGET_FIXED_CONDITION_CODE_REGS): Redefine.
24366
24367 2017-07-05  Richard Sandiford  <richard.sandiford@linaro.org>
24368             Alan Hayward  <alan.hayward@arm.com>
24369             David Sherwood  <david.sherwood@arm.com>
24370
24371         * combine.c (simplify_if_then_else): Remove "enum" before
24372         "machine_mode".
24373         * compare-elim.c (can_eliminate_compare): Likewise.
24374         * config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type):
24375         Likewise.
24376         (aarch64_lookup_simd_builtin_type): Likewise.
24377         (aarch64_simd_builtin_type): Likewise.
24378         (aarch64_init_simd_builtin_types): Likewise.
24379         (aarch64_simd_expand_args): Likewise.
24380         * config/aarch64/aarch64-protos.h (aarch64_simd_attr_length_rglist):
24381         Likewise.
24382         (aarch64_reverse_mask): Likewise.
24383         (aarch64_simd_emit_reg_reg_move): Likewise.
24384         (aarch64_gen_adjusted_ldpstp): Likewise.
24385         (aarch64_ccmp_mode_to_code): Likewise.
24386         (aarch64_operands_ok_for_ldpstp): Likewise.
24387         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
24388         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
24389         Likewise.
24390         (aarch64_min_divisions_for_recip_mul): Likewise.
24391         (aarch64_reassociation_width): Likewise.
24392         (aarch64_get_condition_code_1): Likewise.
24393         (aarch64_simd_emit_reg_reg_move): Likewise.
24394         (aarch64_simd_attr_length_rglist): Likewise.
24395         (aarch64_reverse_mask): Likewise.
24396         (aarch64_operands_ok_for_ldpstp): Likewise.
24397         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
24398         (aarch64_gen_adjusted_ldpstp): Likewise.
24399         * config/aarch64/cortex-a57-fma-steering.c (fma_node::rename):
24400         Likewise.
24401         * config/arc/arc.c (legitimate_offset_address_p): Likewise.
24402         * config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise.
24403         (arm_lookup_simd_builtin_type): Likewise.
24404         (arm_simd_builtin_type): Likewise.
24405         (arm_init_simd_builtin_types): Likewise.
24406         (arm_expand_builtin_args): Likewise.
24407         * config/arm/arm-protos.h (arm_expand_builtin): Likewise.
24408         * config/ft32/ft32.c (ft32_libcall_value): Likewise.
24409         (ft32_setup_incoming_varargs): Likewise.
24410         (ft32_function_arg): Likewise.
24411         (ft32_function_arg_advance): Likewise.
24412         (ft32_pass_by_reference): Likewise.
24413         (ft32_arg_partial_bytes): Likewise.
24414         (ft32_valid_pointer_mode): Likewise.
24415         (ft32_addr_space_pointer_mode): Likewise.
24416         (ft32_addr_space_legitimate_address_p): Likewise.
24417         * config/i386/i386-protos.h (ix86_operands_ok_for_move_multiple):
24418         Likewise.
24419         * config/i386/i386.c (ix86_setup_incoming_vararg_bounds): Likewise.
24420         (ix86_emit_outlined_ms2sysv_restore): Likewise.
24421         (iamcu_alignment): Likewise.
24422         (canonicalize_vector_int_perm): Likewise.
24423         (ix86_noce_conversion_profitable_p): Likewise.
24424         (ix86_mpx_bound_mode): Likewise.
24425         (ix86_operands_ok_for_move_multiple): Likewise.
24426         * config/microblaze/microblaze-protos.h
24427         (microblaze_expand_conditional_branch_reg): Likewise.
24428         * config/microblaze/microblaze.c
24429         (microblaze_expand_conditional_branch_reg): Likewise.
24430         * config/powerpcspe/powerpcspe.c (rs6000_init_hard_regno_mode_ok):
24431         Likewise.
24432         (rs6000_reassociation_width): Likewise.
24433         (rs6000_invalid_binary_op): Likewise.
24434         (fusion_p9_p): Likewise.
24435         (emit_fusion_p9_load): Likewise.
24436         (emit_fusion_p9_store): Likewise.
24437         * config/riscv/riscv-protos.h (riscv_regno_mode_ok_for_base_p):
24438         Likewise.
24439         (riscv_hard_regno_mode_ok_p): Likewise.
24440         (riscv_address_insns): Likewise.
24441         (riscv_split_symbol): Likewise.
24442         (riscv_legitimize_move): Likewise.
24443         (riscv_function_value): Likewise.
24444         (riscv_hard_regno_nregs): Likewise.
24445         (riscv_expand_builtin): Likewise.
24446         * config/riscv/riscv.c (riscv_build_integer_1): Likewise.
24447         (riscv_build_integer): Likewise.
24448         (riscv_split_integer): Likewise.
24449         (riscv_legitimate_constant_p): Likewise.
24450         (riscv_cannot_force_const_mem): Likewise.
24451         (riscv_regno_mode_ok_for_base_p): Likewise.
24452         (riscv_valid_base_register_p): Likewise.
24453         (riscv_valid_offset_p): Likewise.
24454         (riscv_valid_lo_sum_p): Likewise.
24455         (riscv_classify_address): Likewise.
24456         (riscv_legitimate_address_p): Likewise.
24457         (riscv_address_insns): Likewise.
24458         (riscv_load_store_insns): Likewise.
24459         (riscv_force_binary): Likewise.
24460         (riscv_split_symbol): Likewise.
24461         (riscv_force_address): Likewise.
24462         (riscv_legitimize_address): Likewise.
24463         (riscv_move_integer): Likewise.
24464         (riscv_legitimize_const_move): Likewise.
24465         (riscv_legitimize_move): Likewise.
24466         (riscv_address_cost): Likewise.
24467         (riscv_subword): Likewise.
24468         (riscv_output_move): Likewise.
24469         (riscv_canonicalize_int_order_test): Likewise.
24470         (riscv_emit_int_order_test): Likewise.
24471         (riscv_function_arg_boundary): Likewise.
24472         (riscv_pass_mode_in_fpr_p): Likewise.
24473         (riscv_pass_fpr_single): Likewise.
24474         (riscv_pass_fpr_pair): Likewise.
24475         (riscv_get_arg_info): Likewise.
24476         (riscv_function_arg): Likewise.
24477         (riscv_function_arg_advance): Likewise.
24478         (riscv_arg_partial_bytes): Likewise.
24479         (riscv_function_value): Likewise.
24480         (riscv_pass_by_reference): Likewise.
24481         (riscv_setup_incoming_varargs): Likewise.
24482         (riscv_print_operand): Likewise.
24483         (riscv_elf_select_rtx_section): Likewise.
24484         (riscv_save_restore_reg): Likewise.
24485         (riscv_for_each_saved_reg): Likewise.
24486         (riscv_register_move_cost): Likewise.
24487         (riscv_hard_regno_mode_ok_p): Likewise.
24488         (riscv_hard_regno_nregs): Likewise.
24489         (riscv_class_max_nregs): Likewise.
24490         (riscv_memory_move_cost): Likewise.
24491         * config/rl78/rl78-protos.h (rl78_split_movsi): Likewise.
24492         * config/rl78/rl78.c (rl78_split_movsi): Likewise.
24493         (rl78_addr_space_address_mode): Likewise.
24494         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
24495         Likewise.
24496         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
24497         (rs6000_reassociation_width): Likewise.
24498         (rs6000_invalid_binary_op): Likewise.
24499         (fusion_p9_p): Likewise.
24500         (emit_fusion_p9_load): Likewise.
24501         (emit_fusion_p9_store): Likewise.
24502         * config/visium/visium-protos.h (prepare_move_operands): Likewise.
24503         (ok_for_simple_move_operands): Likewise.
24504         (ok_for_simple_move_strict_operands): Likewise.
24505         (ok_for_simple_arith_logic_operands): Likewise.
24506         (visium_legitimize_reload_address): Likewise.
24507         (visium_select_cc_mode): Likewise.
24508         (output_cbranch): Likewise.
24509         (visium_split_double_move): Likewise.
24510         (visium_expand_copysign): Likewise.
24511         (visium_expand_int_cstore): Likewise.
24512         (visium_expand_fp_cstore): Likewise.
24513         * config/visium/visium.c (visium_pass_by_reference): Likewise.
24514         (visium_function_arg): Likewise.
24515         (visium_function_arg_advance): Likewise.
24516         (visium_libcall_value): Likewise.
24517         (visium_setup_incoming_varargs): Likewise.
24518         (visium_legitimate_constant_p): Likewise.
24519         (visium_legitimate_address_p): Likewise.
24520         (visium_legitimize_address): Likewise.
24521         (visium_secondary_reload): Likewise.
24522         (visium_register_move_cost): Likewise.
24523         (visium_memory_move_cost): Likewise.
24524         (prepare_move_operands): Likewise.
24525         (ok_for_simple_move_operands): Likewise.
24526         (ok_for_simple_move_strict_operands): Likewise.
24527         (ok_for_simple_arith_logic_operands): Likewise.
24528         (visium_function_value_1): Likewise.
24529         (rtx_ok_for_offset_p): Likewise.
24530         (visium_legitimize_reload_address): Likewise.
24531         (visium_split_double_move): Likewise.
24532         (visium_expand_copysign): Likewise.
24533         (visium_expand_int_cstore): Likewise.
24534         (visium_expand_fp_cstore): Likewise.
24535         (visium_split_cstore): Likewise.
24536         (visium_select_cc_mode): Likewise.
24537         (visium_split_cbranch): Likewise.
24538         (output_cbranch): Likewise.
24539         (visium_print_operand_address): Likewise.
24540         * expmed.c (flip_storage_order): Likewise.
24541         * expmed.h (emit_cstore): Likewise.
24542         (flip_storage_order): Likewise.
24543         * genrecog.c (validate_pattern): Likewise.
24544         * hsa-gen.c (gen_hsa_addr): Likewise.
24545         * internal-fn.c (expand_arith_overflow): Likewise.
24546         * ira-color.c (allocno_copy_cost_saving): Likewise.
24547         * lra-assigns.c (find_hard_regno_for_1): Likewise.
24548         * lra-constraints.c (prohibited_class_reg_set_mode_p): Likewise.
24549         (process_invariant_for_inheritance): Likewise.
24550         * lra-eliminations.c (move_plus_up): Likewise.
24551         * omp-low.c (lower_oacc_reductions): Likewise.
24552         * simplify-rtx.c (simplify_subreg): Likewise.
24553         * target.def (TARGET_SETUP_INCOMING_VARARG_BOUNDS): Likewise.
24554         (TARGET_CHKP_BOUND_MODE): Likewise..
24555         * targhooks.c (default_chkp_bound_mode): Likewise.
24556         (default_setup_incoming_vararg_bounds): Likewise.
24557         * targhooks.h (default_chkp_bound_mode): Likewise.
24558         (default_setup_incoming_vararg_bounds): Likewise.
24559         * tree-ssa-math-opts.c (divmod_candidate_p): Likewise.
24560         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
24561         (have_whole_vector_shift): Likewise.
24562         * tree-vect-stmts.c (vectorizable_load): Likewise.
24563         * doc/tm.texi: Regenerate.
24564
24565 2017-07-05  Georg-Johann Lay  <avr@gjlay.de>
24566
24567         Graceful degrade if Binutils PR21472 is not available.
24568
24569         PR target/81072
24570         * configure.ac [target=avr]: WARN instead of ERROR if avrxmega3
24571         .rodata in flash test fails.
24572         (HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH): Define it if test passes.
24573         * confgure: Regenerate.
24574         * config.in: Regenerate.
24575         * config/avr/avr.c (avr_asm_named_section)
24576         [HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH]: Only trigger
24577         __do_copy_data for stuff in .rodata if flash_pm_offset = 0.
24578         (avr_asm_init_sections): Same.
24579
24580 2017-07-05  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
24581
24582         * config/arm/neon.md (fma<VCVTF:mode>4): Remove %?.
24583         (fma<VH:mode>4_intrinsic): Likewise.
24584         (*fmsub<VCVTF:mode>4): Likewise.
24585         (*fmsub<VH:mode>4_intrinsic): Likewise.
24586
24587 2017-07-05  Georg-Johann Lay  <avr@gjlay.de>
24588
24589         PR target/81305
24590         * config/avr/avr.c (avr_out_movhi_mr_r_xmega) [CONSTANT_ADDRESS_P]:
24591         Don't depend on "optimize > 0".
24592         (out_movhi_r_mr, out_movqi_mr_r): Same.
24593         (out_movhi_mr_r, out_movqi_r_mr): Same.
24594         (avr_address_cost) [CONSTANT_ADDRESS_P]: Don't depend cost for
24595         io_address_operand on "optimize > 0".
24596
24597 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
24598
24599         * tree-loop-distribution.c: Add general explanantion on the pass.
24600         (generate_loops_for_partition): Mark distributed loop.
24601         (pg_add_dependence_edges): New parameter.  Handle alias data
24602         dependence specially and record it in the parameter if asked.
24603         (struct pg_vdata, pg_edata, pg_edge_callback_data): New structs.
24604         (init_partition_graph_vertices, add_partition_graph_edge): New.
24605         (pg_skip_alias_edge, free_partition_graph_edata_cb): New.
24606         (free_partition_graph_vdata, build_partition_graph): New.
24607         (sort_partitions_by_post_order, merge_dep_scc_partitions): New.
24608         (pg_collect_alias_ddrs, break_alias_scc_partitions): New.
24609         (data_ref_segment_size, latch_dominated_by_data_ref): New.
24610         (compute_alias_check_pairs, version_loop_by_alias_check): New.
24611         (version_for_distribution_p, finalize_partitions): New.
24612         (distribute_loop): Handle alias data dependence specially.  Factor
24613         out loop fusion code as functions and call these functions.
24614
24615 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
24616
24617         * tree-loop-distribution.c (classify_partition): New parameter and
24618         better handle reduction statement.
24619         (rdg_build_partitions): Revise comment.
24620         (distribute_loop): Compute statements in all partitions and pass it
24621         to classify_partition.
24622
24623 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
24624
24625         * tree-loop-distribution.c (enum partition_type): New.
24626         (struct partition): New field type.
24627         (partition_merge_into): Add parameter.  Update partition type.
24628         (data_dep_in_cycle_p, update_type_for_merge): New functions.
24629         (build_rdg_partition_for_vertex): Compute partition type.
24630         (rdg_build_partitions): Dump partition type.
24631         (distribute_loop): Update calls to partition_merge_into.
24632
24633 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
24634
24635         * tree-loop-distribution.c (struct ddr_hasher): New.
24636         (ddr_hasher::hash, ::equal, get_data_dependence): New function.
24637         (ddrs_table): New.
24638         (classify_partition): Call get_data_dependence.
24639         (pg_add_dependence_edges): Ditto.
24640         (distribute_loop): Release data dependence hash table.
24641
24642 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
24643
24644         * tree-loop-distribution.c (ref_base_address): Delete.
24645         (similar_memory_accesses): Rename ...
24646         (share_memory_accesses): ... to this.  Check if partitions access
24647         the same memory reference.
24648         (distribute_loop): Call share_memory_accesses.
24649
24650 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
24651
24652         * tree-loop-distribution.c (struct partition): New field recording
24653         its data reference.
24654         (partition_alloc, partition_free): Init and release data refs.
24655         (partition_merge_into): Merge data refs.
24656         (build_rdg_partition_for_vertex): Collect data refs for partition.
24657         (pg_add_dependence_edges): Change parameters from vector to bitmap.
24658         Update uses.
24659         (distribute_loop): Remve data refs from vertice data of partition
24660         graph.
24661
24662 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
24663
24664         * tree-loop-distribution.c (params.h): Include header file.
24665         (MAX_DATAREFS_NUM, DR_INDEX): New macro.
24666         (datarefs_vec): New global var.
24667         (create_rdg_vertices): Use datarefs_vec directly.
24668         (free_rdg): Don't free data references.
24669         (build_rdg): Update use.  Don't free data references.
24670         (distribute_loop): Compute global variable for data references.
24671         Bail out if there are too many data references.
24672
24673 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
24674
24675         * tree-loop-distribution.c (loop_nest): New global var.
24676         (build_rdg): Use loop directly, rather than loop nest.
24677         (pg_add_dependence_edges): Remove loop nest parameter.  Use global
24678         variable directly.
24679         (distribute_loop): Compute global variable loop nest.  Update use.
24680
24681 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
24682
24683         * tree-loop-distribution.c (enum fuse_type, fuse_message): New.
24684         (partition_merge_into): New parameter.  Dump reason for fusion.
24685         (distribute_loop): Update use of partition_merge_into.
24686
24687 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
24688
24689         * tree-loop-distribution.c (bb_top_order_index): New.
24690         (bb_top_order_index_size, bb_top_order_cmp): New.
24691         (stmts_from_loop): Use topological order.
24692         (pass_loop_distribution::execute): Compute and release topological
24693         order for basic blocks.
24694
24695 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
24696
24697         * tree-loop-distribution.c (pass_loop_distribution::execute): Skip
24698         if no loops.
24699
24700 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
24701
24702         * cfgloop.h (struct loop): Add comment.  New field orig_loop_num.
24703         * cfgloopmanip.c (lv_adjust_loop_entry_edge): Comment change.
24704         * internal-fn.c (expand_LOOP_DIST_ALIAS): New function.
24705         * internal-fn.def (LOOP_DIST_ALIAS): New.
24706         * tree-vectorizer.c (fold_loop_vectorized_call): Rename to ...
24707         (fold_loop_internal_call): ... this.
24708         (vect_loop_dist_alias_call): New function.
24709         (set_uid_loop_bbs): Call fold_loop_internal_call.
24710         (vectorize_loops): Fold IFN_LOOP_VECTORIZED and IFN_LOOP_DIST_ALIAS
24711         internal calls.
24712
24713 2017-07-04  Uros Bizjak  <ubizjak@gmail.com>
24714
24715         PR target/81300
24716         * config/i386/i386.md (setcc + movzbl/and to xor + setcc peepholes):
24717         Require dead FLAGS_REG at the beginning of a peephole.
24718
24719 2017-07-04  Uros Bizjak  <ubizjak@gmail.com>
24720
24721         PR target/81294
24722         * config/i386/adxintrin.h (_subborrow_u32): Swap _X and _Y
24723         arguments in the call to __builtin_ia32_sbb_u32.
24724         (_subborrow_u64): Swap _X and _Y arguments in the call to
24725         __builtin_ia32_sbb_u64.
24726
24727 2017-07-04  Jakub Jelinek  <jakub@redhat.com>
24728
24729         PR debug/81278
24730         * tree-vrp.c (compare_assert_loc): Turn into a function template
24731         with stable template parameter.  Only test if a->e is NULL,
24732         !a->e == !b->e has been verified already.  Use e == NULL or
24733         e != NULL instead of e or ! e tests.  If stable is true, don't use
24734         iterative_hash_expr, on the other side allow a or b or both NULL
24735         and sort the NULLs last.
24736         (process_assert_insertions): Sort using compare_assert_loc<false>
24737         instead of compare_assert_loc, later sort using
24738         compare_assert_loc<true> before calling process_assert_insertions_for
24739         in a loop.  Use break instead of continue once seen NULL pointer.
24740
24741 2017-07-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
24742
24743         * config/arm/driver-arm.c (arm_cpu_table): Add entry for ARM
24744         Cortex-R7 and Cortex-R8 processors.
24745
24746 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
24747
24748         * ipa-utils.c (ipa_merge_profiles): Fix merging when dst is
24749         uninitialized while src is not.
24750
24751 2017-07-04  Richard Earnshaw  <rearnsha@arm.com>
24752
24753         * common/config/arm/arm-common.c: Adjust include path for
24754         arm-cpu-cdata.h
24755         * config/arm/t-arm (TM_H): Adjust path for arm-cpu.h.
24756         (arm-cpu.h): Create in build directory.  Adjust dependency rules.
24757         (arm-cpu-data.h): Likewise.
24758         (arm-cpu-cdata.h): Likewise.
24759         * config/arm/arm-cpu.h: Delete.
24760         * config/arm/arm-cpu-cdata.h: Delete.
24761         * config/arm/arm-cpu-data.h: Delete.
24762
24763 2017-07-04  James Greenhalgh  <james.greenhalgh@arm.com>
24764
24765         * config/arm/arm-cpus.in (cortex-a55): New.
24766         (cortex-a75): Likewise.
24767         (cortex-a75.cortex-a55): Likewise.
24768         * config/arm/driver-arm.c (arm_cpu_table): Add cortex-a55 and
24769         cortex-a75.
24770         * doc/invoke.texi (-mcpu): Document cortex-a55 and cortex-a75.
24771         * config/arm/arm-cpu-cdata.h: Regenerate.
24772         * config/arm/arm-cpu-data.h: Regenerate.
24773         * config/arm/arm-cpu.h: Regenerate.
24774         * config/arm/arm-tables.opt: Regenerate.
24775         * config/arm/arm-tune.md: Regenerate.
24776
24777 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
24778
24779         * haifa-sched.c (sched_create_recovery_edges): Update profile.
24780
24781 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
24782
24783         * bb-reorder.c (better_edge_p): Fix handling of uninitialized
24784         probability.
24785
24786 2017-07-04  Richard Sandiford  <richard.sandiford@linaro.org>
24787
24788         PR tree-optimization/81292
24789         * tree-ssa-strlen.c (handle_builtin_strlen): When setting
24790         full_string_p, also call adjust_related_strinfos if the adjustment
24791         is simple, otherwise invalidate related strinfos.
24792
24793 2017-07-04  Martin Liska  <mliska@suse.cz>
24794
24795         PR sanitizer/81040
24796         * sanopt.c (sanitize_rewrite_addressable_params): Mark the
24797         newly created variable as DECL_IGNORED_P.
24798
24799 2017-07-04  Martin Liska  <mliska@suse.cz>
24800
24801         PR ipa/81293
24802         * ipa-inline.c (inline_small_functions):
24803         Use xstrdup_for_dump.
24804
24805 2017-07-04  Tom de Vries  <tom@codesourcery.com>
24806
24807         * graph.c (draw_cfg_edges): Save and restore EDGE_DFS_BACK.
24808
24809 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
24810
24811         PR target/81033
24812         * config/darwin.c (darwin_function_switched_text_sections):
24813         Fix spaces.
24814
24815 2017-07-03  Jan Hubicka  <hubicka@ucw.cz>
24816
24817         * tree-vect-loop-manip.c (vect_do_peeling): Fix scaling up.
24818
24819 2017-07-03  Richard Earnshaw  <rearnsha@arm.com>
24820
24821         * doc/invoke.texi (ARM Options): Add -mbe8 and -mbe32 to option summary.
24822
24823 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
24824
24825         * tree-vect-loop.c (vect_analyze_loop_2): Treat min_scalar_loop_bound,
24826         min_profitable_iters, and th as inclusive lower bounds.
24827         Fix LOOP_VINFO_PEELING_FOR_GAPS condition.
24828         (vect_estimate_min_profitable_iters): Return inclusive lower bounds
24829         for min_profitable_iters and min_profitable_estimate.
24830         (vect_transform_loop): Treat th as an inclusive lower bound.
24831         * tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
24832
24833 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
24834
24835         PR target/81033
24836         * config/darwin.c (darwin_function_switched_text_sections):
24837         Replace DECL_NAME with DECL_ASSEMBLER_NAME, split assemble_name_raw
24838         in two pieces, and suppress the use of buf.
24839
24840 2017-07-03  Nathan Sidwell  <nathan@acm.org>
24841
24842         * hash-table.h (hash_table_mod1): Fix indentation.
24843
24844 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
24845
24846         PR middle-end/81290
24847         * predict.c (force_edge_cold): Be more careful about propagation
24848         backward.
24849         * profile-count.h (profile_probability::guessed,
24850         profile_probability::fdo, profile_count::guessed, profile_count::fdo):
24851         New.
24852         * tree-ssa-threadupdate.c (recompute_probabilities): Result is guessed.
24853
24854 2017-07-03  James Greenhalgh  <james.greenhalgh@arm.com>
24855
24856         * doc/invoke.texi (rcpc architecture extension): Document it.
24857
24858 2017-07-03  Richard Biener  <rguenther@suse.de>
24859
24860         PR tree-optimization/60510
24861         * tree-vect-loop.c (vect_create_epilog_for_reduction): Pass in
24862         the scalar reduction PHI and use it.
24863         (vectorizable_reduction): Properly guard the single_defuse_cycle
24864         path for non-SLP reduction chains where we cannot use it.
24865         Rework reduc_def/index and vector type deduction.  Rework
24866         vector operand gathering during reduction op code-gen.
24867         * tree-vect-slp.c (vect_analyze_slp): For failed SLP reduction
24868         chains dissolve the chain and leave it to non-SLP reduction
24869         handling.
24870
24871 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
24872
24873         * tree-data-ref.h (dr_alignment): Declare.
24874         * tree-data-ref.c (dr_alignment): New function.
24875         * tree-vectorizer.h (dataref_aux): Remove base_element_aligned.
24876         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
24877         set it.
24878         * tree-vect-stmts.c (vectorizable_store): Use dr_alignment.
24879
24880 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
24881
24882         * tree-data-ref.h (innermost_loop_behavior): Add base_alignment
24883         and base_misalignment fields.
24884         (DR_BASE_ALIGNMENT, DR_BASE_MISALIGNMENT): New macros.
24885         * tree-data-ref.c: Include builtins.h.
24886         (dr_analyze_innermost): Set up the new innmost_loop_behavior fields.
24887         * tree-vectorizer.h (STMT_VINFO_DR_BASE_ALIGNMENT): New macro.
24888         (STMT_VINFO_DR_BASE_MISALIGNMENT): Likewise.
24889         * tree-vect-data-refs.c: Include tree-cfg.h.
24890         (vect_compute_data_ref_alignment): Use the new innermost_loop_behavior
24891         fields instead of calculating an alignment here.
24892         (vect_analyze_data_refs): Use dr_analyze_innermost.  Dump the new
24893         innermost_loop_behavior fields.
24894
24895 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
24896
24897         * tree-data-ref.h (innermost_loop_behavior): Add a step_alignment
24898         field.
24899         (DR_STEP_ALIGNMENT): New macro.
24900         * tree-vectorizer.h (STMT_VINFO_DR_STEP_ALIGNMENT): Likewise.
24901         * tree-data-ref.c (dr_analyze_innermost): Initalize step_alignment.
24902         (create_data_ref): Print it.
24903         * tree-vect-stmts.c (vectorizable_load): Use the step alignment
24904         to tell whether the step preserves vector (mis)alignment.
24905         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
24906         Move the check for an integer step and generalise to all INTEGER_CST.
24907         (vect_analyze_data_refs): Set DR_STEP_ALIGNMENT when setting DR_STEP.
24908         Print the outer step alignment.
24909
24910 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
24911
24912         * tree-data-ref.h (innermost_loop_behavior): Replace aligned_to
24913         with offset_alignment.
24914         (DR_ALIGNED_TO): Delete.
24915         (DR_OFFSET_ALIGNMENT): New macro.
24916         * tree-vectorizer.h (STMT_VINFO_DR_ALIGNED_TO): Delete.
24917         (STMT_VINFO_DR_OFFSET_ALIGNMENT): New macro.
24918         * tree-data-ref.c (dr_analyze_innermost): Update after above changes.
24919         (create_data_ref): Likewise.
24920         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
24921         (vect_analyze_data_refs): Likewise.
24922         * tree-if-conv.c (if_convertible_loop_p_1): Use memset before
24923         creating dummy innermost behavior.
24924
24925 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
24926
24927         * tree-data-ref.h (dr_analyze_innermost): Replace the dr argument
24928         with a "innermost_loop_behavior *" and refeence tree.
24929         * tree-data-ref.c (dr_analyze_innermost): Likewise.
24930         (create_data_ref): Update call accordingly.
24931         * tree-predcom.c (find_looparound_phi): Likewise.
24932
24933 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
24934
24935         * tree-vectorizer.h (_stmt_vec_info): Replace individual dr_*
24936         fields with dr_wrt_vec_loop.
24937         (STMT_VINFO_DR_BASE_ADDRESS, STMT_VINFO_DR_INIT, STMT_VINFO_DR_OFFSET)
24938         (STMT_VINFO_DR_STEP, STMT_VINFO_DR_ALIGNED_TO): Update accordingly.
24939         (STMT_VINFO_DR_WRT_VEC_LOOP): New macro.
24940         (vect_dr_behavior): New function.
24941         (vect_create_addr_base_for_vector_ref): Remove loop parameter.
24942         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
24943         vect_dr_behavior.  Use a step_preserves_misalignment_p boolean to
24944         track whether the step preserves the misalignment.
24945         (vect_create_addr_base_for_vector_ref): Remove loop parameter.
24946         Use vect_dr_behavior.
24947         (vect_setup_realignment): Update call accordingly.
24948         (vect_create_data_ref_ptr): Likewise.  Use vect_dr_behavior.
24949         * tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Update
24950         call to vect_create_addr_base_for_vector_ref.
24951         (vect_create_cond_for_align_checks): Likewise.
24952         * tree-vect-patterns.c (vect_recog_bool_pattern): Copy
24953         STMT_VINFO_DR_WRT_VEC_LOOP as a block.
24954         (vect_recog_mask_conversion_pattern): Likewise.
24955         * tree-vect-stmts.c (compare_step_with_zero): Use vect_dr_behavior.
24956         (new_stmt_vec_info): Remove redundant zeroing.
24957
24958 2017-07-03  Richard Earnshaw  <rearnsha@arm.com>
24959
24960         * common/config/arm/arm-common.c (arm_be8_option): New function.
24961         * config/arm/arm-isa.h (isa_feature): Add new feature bit isa_bit_be8.
24962         (ISA_ARMv6): Add isa_bit_be8.
24963         * config/arm/arm.h (arm_be8_option): Add prototype.
24964         (BE8_SPEC_FUNCTION): New define.
24965         (EXTRA_SPEC_FUNCTIONS): Add BE8_SPEC_FUNCTION.
24966         * config/arm/arm.opt (mbig-endian): Mark as Negative of mlittle-endian.
24967         (mlittle-endian): Similarly.
24968         (mbe8, mbe32): New options.
24969         * config/arm/bpabi.h (BE8_LINK_SPEC): Call arm_be8_option.
24970         * doc/invoke.texi (ARM Options): Document -mbe8 and -mbe32.
24971
24972 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
24973
24974         * tree-cfg.c (gimple_find_sub_bbs): Fix profile updating.
24975
24976 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
24977
24978         * tree-cfgcleanup.c (want_merge_blocks_p): New function.
24979         (cleanup_tree_cfg_bb): Use it.
24980         * profile-count.h (profile_count::of_for_merging, profile_count::merge):
24981         New functions.
24982         * tree-cfg.c (gimple_merge_blocks): Use profile_count::merge.
24983
24984 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
24985
24986         PR bootstrap/81285
24987         * loop-doloop.c (add_test): Update profile.
24988
24989 2017-07-03  Martin Liska  <mliska@suse.cz>
24990
24991         PR sanitize/81040
24992         * sanopt.c (rewrite_usage_of_param): New function.
24993         (sanitize_rewrite_addressable_params): Likewise.
24994         (pass_sanopt::execute): Call rewrite_usage_of_param.
24995
24996 2017-07-03  Richard Biener  <rguenther@suse.de>
24997
24998         * tree-vect-loop.c (vect_create_epilog_for_reduction): Revert
24999         back to using VIEW_CONVERT_EXPR.
25000
25001 2017-07-03  Martin Liska  <mliska@suse.cz>
25002
25003         PR other/78366
25004         * doc/extend.texi: Document when a resolver function is
25005         generated for target_clones.
25006
25007 2017-07-03  Martin Liska  <mliska@suse.cz>
25008
25009         * asan.c (asan_emit_stack_protection): Unpoison just red zones
25010         and shadow memory of auto variables which are subject of
25011         use-after-scope sanitization.
25012         (asan_expand_mark_ifn): Add do set only when is_poison.
25013
25014 2016-07-03  Richard Biener  <rguenther@suse.de>
25015
25016         * tree-vect-loop.c (vect_analyze_loop_operations): Also analyze
25017         reduction PHIs.
25018         (vect_force_simple_reduction): Record reduction def -> phi mapping.
25019         (vectorizable_reduction): Perform reduction PHI creation when
25020         visiting a reduction PHI and adjust and simplify code generation
25021         phase of the reduction op.  Cache dts, use fold_binary, not fold_build2.
25022         (vect_transform_loop): Visit reduction PHIs.
25023         * tree-vect-slp.c (vect_get_and_check_slp_defs): Record reduction
25024         defs into the SLP tree.
25025         (vect_build_slp_tree): Reduction defs terminate the recursion.
25026         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Allow lookup
25027         of reduction defs.
25028         (vect_get_vec_defs_for_stmt_copy): Export.
25029         (vect_get_vec_defs): Likewise.
25030         * tree-vectorizer.h (struct _stmt_vec_info): Amend reduc_def
25031         purpose.
25032         (vect_get_vec_defs_for_stmt_copy): Declare.
25033         (vect_get_vec_defs): Likewise.
25034
25035 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
25036
25037         * tree-data-ref.c (dr_analyze_innermost): Replace the "nest"
25038         parameter with a "loop" parameter and use it instead of the
25039         loop containing DR_STMT.  Don't check simple_iv when doing
25040         BB analysis.  Describe the two analysis modes in the comment.
25041
25042 2017-07-03  Tom de Vries  <tom@codesourcery.com>
25043
25044         PR tree-optimization/69468
25045         * tree-ssa-tail-merge.c (ignore_edge_flags): New constant.
25046         (find_same_succ_bb): Handle ignore_edge_flags.
25047
25048 2017-07-03  Tom de Vries  <tom@codesourcery.com>
25049
25050         PR tree-optimization/81192
25051         * tree-ssa-tail-merge.c (same_succ_hash): Use bb->loop_father->num in
25052         hash.
25053         (same_succ::equal): Don't find bbs to be equal if bb->loop_father
25054         differs.
25055         (find_same_succ_bb): Remove obsolete test on bb->loop_father->latch.
25056
25057 2017-07-03  Tom de Vries  <tom@codesourcery.com>
25058
25059         PR tree-optimization/81192
25060         * tree-ssa-tail-merge.c (same_succ_flush_bb): Handle
25061         BB_SAME_SUCC (bb) == NULL.
25062
25063 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
25064
25065         * cfgrtl.c (rtl_verify_edges): Enable checking of profile_probability
25066         consistency.
25067
25068 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
25069
25070         * dumpfile.c: Include profile-count.h
25071         * tree-cfg.c (gimple_duplicate_sese_tail): Drop UNUSED attributes;
25072         update profile.
25073         (insert_cond_bb): Update profile.
25074         * tree-cfg.h (insert_cond_bb): Update prototype.
25075         * tree-chkp-opt.c (chkp_optimize_string_function_calls): Update.
25076         * tree-dump.c: Do not include tree-cfg.
25077
25078 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
25079
25080         * bb-reorder.c (fix_up_crossing_landing_pad): Update profile.
25081
25082 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
25083
25084         * expect.c (dw2_build_landing_pads): Update profile of the landing pad
25085         bb.
25086
25087 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
25088
25089         * tree-complex.c (expand_complex_div_wide): update profile.
25090
25091 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
25092             Alan Hayward  <alan.hayward@arm.com>
25093             David Sherwood  <david.sherwood@arm.com>
25094
25095         * Makefile.in (MACHMODE_H): Remove insn-modes.h
25096         (CORETYPES_H): New define.
25097         (MOSTLYCLEANFILES): Add insn-modes-inline.h.
25098         (insn-modes-inline.h, s-modes-inline-h): New rules.
25099         (generated_files): Add insn-modes-inline.h.
25100         (RTL_BASE_H, TREE_CORE_H): Use CORETYPES_H instead of coretypes.h.
25101         (build/gensupport.o, build/ggc-none.o, build/print-rtl.o): Likewise.
25102         (build/read-md.o, build/read-rtl.o, build/rtl.o): Likewise.
25103         (build/vec.o, build/hash-table.o, build/inchash.o): Likewise.
25104         (build/gencondmd.o, build/genattr.o, build/genattr-common.o): Likewise.
25105         (build/genattrtab.o, build/genautomata.o, build/gencheck.o): Likewise.
25106         (build/gencodes.o, build/genconditions.o): Likewise.
25107         (build/genconfig.o, build/genconstants.o, build/genemit.o): Likewise.
25108         (build/genenums.o, build/genextract.o, build/genflags.o): Likewise.
25109         (build/gentarget-def.o, build/genmddeps.o, build/genopinit.o)
25110         (build/genoutput.o, build/genpeep.o, build/genpreds.o): Likewise.
25111         (build/genrecog.o, build/genmddump.o, build/genmatch.o): Likewise.
25112         (build/gencfn-macros.o, build/gcov-iov.o): Likewise.
25113         * coretypes.h: Include everything up to real.h for generators.
25114         Include insn-modes.h first.  Include wide-int-print.h after
25115         wide-int.h.  Include insn-modes-inline.h and then machmode.h.
25116         * machmode.h: Don't include insn-modes.h here.
25117         * function-tests.c: Remove includes of signop.h, machmode.h,
25118         double-int.h and wide-int.h.
25119         * rtl.h: Likewise.
25120         * gcc-rich-location.c: Remove includes of machmode.h, double-int.h
25121         and wide-int.h.
25122         * optc-save-gen.awk: Likewise.
25123         * gencheck.c (BITS_PER_UNIT): Delete dummy definition.
25124         * godump.c: Remove include of wide-int-print.h.
25125         * pretty-print.h: Likewise.
25126         * wide-int-print.cc: Likewise.
25127         * wide-int.cc: Likewise.
25128         * hash-map-tests.c: Remove include of signop.h.
25129         * hash-set-tests.c: Likewise.
25130         * rtl-tests.c: Likewise.
25131         * mkconfig.sh: Remove include of machmode.h.
25132         * genmodes.c (emit_insn_modes_h): Split emission of inline functions
25133         into...
25134         (emit_insn_modes_inline_h): ...this new function.  Emit the code
25135         into an insn-modes-inline.h header file, adding appropriate
25136         include guards and end comments.
25137         (emit_insn_modes_c_header): Remove include of machmode.h.
25138         (emit_min_insn_modes_c_header): Include coretypes.h rather than
25139         machmode.h.
25140         (main): Handle -i flag and call emit_insn_modes_inline_h when
25141         it is passed.
25142
25143 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
25144
25145         * tree-ssa-strlen.c (strinfo): Rename the length field to
25146         nonzero_chars.  Add a full_string_p field.
25147         (compare_nonzero_chars, zero_length_string_p): New functions.
25148         (get_addr_stridx): Add an offset_out parameter.
25149         Use compare_nonzero_chars.
25150         (get_stridx): Update accordingly.  Use compare_nonzero_chars.
25151         (new_strinfo): Update after above changes to strinfo.
25152         (set_endptr_and_length): Set full_string_p.
25153         (get_string_length): Update after above changes to strinfo.
25154         (unshare_strinfo): Update call to new_strinfo.
25155         (maybe_invalidate): Likewise.
25156         (get_stridx_plus_constant): Change off to unsigned HOST_WIDE_INT.
25157         Use compare_nonzero_chars and zero_string_p.  Treat nonzero_chars
25158         as a uhwi instead of an shwi.  Update after above changes to
25159         strinfo and new_strinfo.
25160         (zero_length_string): Assert that chainsi contains full strings.
25161         Use zero_length_string_p.  Update call to new_strinfo.
25162         (adjust_related_strinfos): Update after above changes to strinfo.
25163         Copy full_string_p from origsi.
25164         (adjust_last_stmt): Use zero_length_string_p.
25165         (handle_builtin_strlen): Update after above changes to strinfo and
25166         new_strinfo.  Install the lhs as the string length if the previous
25167         entry didn't describe a full string.
25168         (handle_builtin_strchr): Update after above changes to strinfo
25169         and new_strinfo.
25170         (handle_builtin_strcpy): Likewise.
25171         (handle_builtin_strcat): Likewise.
25172         (handle_builtin_malloc): Likewise.
25173         (handle_pointer_plus): Likewise.
25174         (handle_builtin_memcpy): Likewise.  Track nonzero characters
25175         that aren't necessarily followed by a nul terminator.
25176         (handle_char_store): Likewise.
25177
25178 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
25179
25180         PR tree-optimization/80769
25181         * tree-ssa-strlen.c (strinfo): Document that "stmt" is also used
25182         for malloc and calloc.  Document the new invariant that all related
25183         strinfos have delayed lengths or none do.
25184         (verify_related_strinfos): Move earlier in file.
25185         (set_endptr_and_length): New function, split out from...
25186         (get_string_length): ...here.  Also set the lengths of related
25187         strinfos.
25188         (zero_length_string): Assert that chainsi has known (rather than
25189         delayed) lengths.
25190         (adjust_related_strinfos): Likewise.
25191
25192 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
25193
25194         PR tree-optimization/81136
25195         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Only
25196         assert that two references with the same misalignment have the same
25197         compile-time misalignment if those compile-time misalignments
25198         are known.
25199
25200 2017-07-01  Andi Kleen  <ak@linux.intel.com>
25201
25202         * print-tree.c (print_node): Print all attributes.
25203
25204 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
25205
25206         * cfg.c (scale_bbs_frequencies): New function.
25207         * cfg.h (scale_bbs_frequencies): Declare it.
25208         * cfgloopanal.c (single_likely_exit): Cleanup.
25209         * cfgloopmanip.c (scale_loop_frequencies): Take profile_probability
25210         as parameter.
25211         (scale_loop_profile): Likewise.
25212         (loop_version): Likewise.
25213         (create_empty_loop_on_edge): Update.
25214         * cfgloopmanip.h (scale_loop_frequencies, scale_loop_profile,
25215         scale_loop_frequencies, scale_loop_profile, loopify,
25216         loop_version): Update prototypes.
25217         * modulo-sched.c (sms_schedule): Update.
25218         * predict.c (unlikely_executed_edge_p): Also check probability.
25219         (probably_never_executed_edge_p): Fix typo.
25220         * tree-if-conv.c (version_loop_for_if_conversion): Update.
25221         * tree-parloops.c (gen_parallel_loop): Update.
25222         * tree-ssa-loop-ivcanon.c (try_peel_loop): Update.
25223         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
25224         * tree-ssa-loop-split.c (split_loop): Update.
25225         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
25226         * tree-vect-loop-manip.c (vect_do_peeling): Update.
25227         (vect_loop_versioning): Update.
25228         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
25229
25230 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
25231
25232         * trans-mem.c (split_bb_make_tm_edge): Update profile.
25233
25234 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
25235
25236         * tree-if-conv.c (combine_blocks): Use make_single_succ_edge
25237         to keep profile consistent.
25238
25239 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
25240
25241         * cfgrtl.c (rtl_flow_call_edges_add): Update profile.
25242         * tree-cfg.c (gimple_flow_call_edges_add): Likewise.
25243         * profile-count.h (max_safe_multiplier): Make unsigned.
25244         (profile_count::guessed_zero): New.
25245
25246 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
25247
25248         * bb-reorder.c (fix_up_crossing_landing_pad,
25249         fix_crossing_conditional_branches): Use make_single_succ_edge
25250         to keep profile consistent.
25251
25252 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
25253
25254         * tree-vect-loop.c (optimize_mask_stores): Use make_single_succ_edge
25255         to update profile.
25256
25257 2017-07-01  Jakub Jelinek  <jakub@redhat.com>
25258
25259         PR sanitizer/81262
25260         * bb-reorder.c (fix_up_fall_thru_edges): Move variable declarations to
25261         the right scopes, make sure cond_jump isn't preserved between multiple
25262         iterations.  Search for fallthru edge whenever there are 3+ edges and
25263         use find_fallthru_edge for it.
25264
25265 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
25266
25267         Patch by Alexander Monakov <amonakov@ispras.ru>
25268         * sel-sched-ir.c (compute_succs_info): Handle uninitialized
25269         probabilities consistently.
25270
25271 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
25272
25273         * pa.c (pa_expand_compare_and_swap_loop): Update call of
25274         emit_cmp_and_jump_insns.
25275
25276 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
25277
25278         PR ipa/81261
25279         * tree-inline.c (expand_call_inline): Combine profile statuses.
25280
25281 2017-06-30  Andrew Pinski  <apinski@cavium.com>
25282
25283         * tree-if-conv.c (predicate_scalar_phi): Update new_stmt if
25284         fold_stmt returned true.
25285
25286 2017-06-30  Nathan Sidwell  <nathan@acm.org>
25287
25288         * ggc.h (empty_string): Delete.
25289         * cfgexpand.c (expand_asm_stmt): Use plain "".
25290         * optabs.c (expand_asm_memory_barrier): Likewise.
25291         * stringpool.c (empty_string): Delete.
25292         (digit_vector, digit_string): Delete.
25293         (ggc_alloc_string): Use plain "", don't optimize single digit
25294         strings.  Use ggc_alloc_atomic.
25295
25296 2017-06-30  Richard Earnshaw  <rearnsha@arm.com>
25297
25298         * rtlanal.c (insn_rtx_cost): If a parallel contains exactly one
25299         comparison set and one other set, use the cost of the non-comparison
25300         set.
25301
25302 2017-06-30  Nathan Sidwell  <nathan@acm.org>
25303
25304         * ggc.h: Replace all 'static inline' with plain 'inline'.  Fix
25305         some formatting.
25306
25307 2017-06-30  Peter Bergner  <bergner@vnet.ibm.com>
25308
25309         * tree-cfg.c (group_case_labels_stmt): Merge scanning and compressing
25310         loops.  Remove now unneeded calls to gimple_switch_set_label() that
25311         just set removed labels to NULL_TREE.
25312
25313 2017-06-30  Aldy Hernandez  <aldyh@redhat.com>
25314
25315         * tree-ssanames.c (set_range_info_raw): Abstract from ...
25316         (set_range_info): ...here.  Only call set_range_info_raw if domain
25317         is useful.
25318         (set_nonzero_bits): Call set_range_info_raw.
25319         * tree-ssanames.h (set_range_info_raw): New.
25320
25321 2017-06-30  Jakub Jelinek  <jakub@redhat.com>
25322
25323         PR target/81225
25324         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): For V8FI,
25325         V16FI and VI8F_256 iterators, use <store_mask_predicate> instead
25326         of nonimmediate_operand and <store_mask_constraint> instead of m
25327         for the input operand.  For V8FI iterator, always split if input
25328         is a MEM.  For V16FI and V8SF_256 iterators, don't test if both
25329         operands are MEM if <mask_applied>.  For VI4F_256 iterator, use
25330         <store_mask_predicate> instead of register_operand and
25331         <store_mask_constraint> instead of v for the input operand.  Make
25332         sure both operands aren't MEMs for if not <mask_applied>.
25333
25334 2017-06-30  Sylvestre Ledru  <sylvestre@debian.org>
25335
25336         * lto-wrapper.c (copy_file) Close both file descriptors before
25337         exiting normally.
25338
25339 2017-06-30  Martin Liska  <mliska@suse.cz>
25340
25341         PR ipa/81214
25342         * multiple_target.c (create_dispatcher_calls): Make ifunc
25343         also for function that don't have calls or are not referenced.
25344
25345 2017-06-30  Richard Biener  <rguenther@suse.de>
25346
25347         * tree-vect-slp.c (vect_slp_analyze_node_operations): Only
25348         analyze the first scalar stmt.  Move vector type computation
25349         for the BB case here from ...
25350         * tree-vect-stmts.c (vect_analyze_stmt): ... here.  Guard
25351         live operation processing in the SLP case properly.
25352
25353 2017-06-30  Richard Biener  <rguenther@suse.de>
25354
25355         * graph.c (draw_cfg_node_succ_edges): Fix broken dot syntax.
25356
25357 2017-06-30  Martin Liska  <mliska@suse.cz>
25358
25359         PR sanitizer/81021
25360         * tree-eh.c (lower_resx): Call BUILT_IN_ASAN_HANDLE_NO_RETURN
25361         before BUILT_IN_UNWIND_RESUME when ASAN is used.
25362
25363 2017-06-30  Yvan Roux  <yvan.roux@linaro.org>
25364
25365         * doc/invoke.texi (AArch64): Add missing options and remove redundant
25366         ones.
25367
25368 2017-06-30  Richard Biener  <rguenther@suse.de>
25369
25370         PR tree-optimization/81249
25371         * tree-vect-loop.c (vect_create_epilog_for_reduction): Convert
25372         condition reduction result to original scalar type.
25373
25374 2017-06-30  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25375
25376         * profile-count.h (enum profile_quality): Fix typos and whitespace
25377         issues.
25378
25379 2017-06-30  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25380
25381         * config/s390/s390.c (s390_expand_setmem): Adjust to the new data
25382         type for branch probabilities.
25383
25384 2017-06-29  Julian Brown  <julian@codesourcery.com>
25385             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
25386
25387         * config/aarch64/aarch64-fusion-pairs.def: Add ALU_BRANCH entry.
25388         * config/aarch64/aarch64.c (AARCH64_FUSE_ALU_BRANCH): New fusion type.
25389         (thunderx2t99_tunings): Set AARCH64_FUSE_ALU_BRANCH flag.
25390         (aarch_macro_fusion_pair_p): Add support for AARCH64_FUSE_ALU_BRANCH.
25391
25392 2017-06-29  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
25393
25394         * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Push the
25395         check for CC usage into AARCH64_FUSE_CMP_BRANCH.
25396         * config/i386/i386.c (ix86_macro_fusion_pair_p): Push the check for
25397         CC usage from generic code to here.
25398         * sched-deps.c (sched_macro_fuse_insns): Move the condition for
25399         CC usage into the target macros.
25400
25401 2017-06-29  Maya Rashish  <coypu@sdf.org>
25402
25403         * config/netbsd.h (NETBSD_LIB_SPEC): Add -lc when creating shared
25404         objects.
25405
25406 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
25407
25408         * arm/arm-builtins.c: Include profile-count.h
25409         * except.c (sjlj_emit_function_enter): Use
25410         profile_probability::unlikely.
25411
25412 2017-06-29  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25413
25414         * config/rs6000/rs6000.c (toc_relative_expr_p): Make tocrel_base
25415         and tocrel_offset be pointer args rather than implicitly using
25416         static versions.
25417         (legitimate_constant_pool_address_p, rs6000_emit_move,
25418         const_load_sequence_p, adjust_vperm): Add local tocrel_base and
25419         tocrel_offset and use in toc_relative_expr_p call.
25420         (print_operand, print_operand_address): Use static tocrel_base_oac
25421         and tocrel_offset_oac.
25422         (rs6000_output_addr_const_extra): Use static tocrel_base_oac and
25423         tocrel_offset_oac.
25424
25425 2017-06-29  Maya Rashish  <coypu@sdf.org>
25426
25427         * config/vax/builtins.md (ffssi2_internal): Correct constraint.
25428
25429 2017-06-29  Eric Botcazou  <ebotcazou@adacore.com>
25430
25431         * expr.c (expand_expr) <normal_inner_ref>: When testing for unaligned
25432         objects, take into account only the alignment of 'op0' and 'mode1' if
25433         'op0' is a MEM.
25434
25435 2017-06-29  Steve Ellcey  <sellcey@cavium.com>
25436
25437         * ccmp.c (ccmp_tree_comparison_p): New function.
25438         (ccmp_candidate_p): Update to use above function.
25439         (get_compare_parts): New function.
25440         (expand_ccmp_next): Update to use new functions.
25441         (expand_ccmp_expr_1): Take tree arg instead of gimple, update to use
25442         new functions.
25443         (expand_ccmp_expr): Pass tree instead of gimple to expand_ccmp_expr_1,
25444         take mode as argument.
25445         * ccmp.h (expand_ccmp_expr): Add mode as argument.
25446         * expr.c (expand_expr_real_1): Pass mode as argument.
25447
25448 2017-06-29  Segher Boessenkool  <segher@kernel.crashing.org>
25449
25450         * combine.c (combine_instructions): Print insns to dump_file, together
25451         with their costs.
25452
25453 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
25454
25455         * asan.c (asan_emit_stack_protection): Update.
25456         (create_cond_insert_point): Update.
25457         * auto-profile.c (afdo_propagate_circuit): Update.
25458         * basic-block.h (struct edge_def): Turn probability to
25459         profile_probability.
25460         (EDGE_FREQUENCY): Update.
25461         * bb-reorder.c (find_traces_1_round): Update.
25462         (better_edge_p): Update.
25463         (sanitize_hot_paths): Update.
25464         * cfg.c (unchecked_make_edge): Initialize probability to uninitialized.
25465         (make_single_succ_edge): Update.
25466         (check_bb_profile): Update.
25467         (dump_edge_info): Update.
25468         (update_bb_profile_for_threading): Update.
25469         * cfganal.c (connect_infinite_loops_to_exit): Initialize new edge
25470         probabilitycount to 0.
25471         * cfgbuild.c (compute_outgoing_frequencies): Update.
25472         * cfgcleanup.c (try_forward_edges): Update.
25473         (outgoing_edges_match): Update.
25474         (try_crossjump_to_edge): Update.
25475         * cfgexpand.c (expand_gimple_cond): Update make_single_succ_edge.
25476         (expand_gimple_tailcall): Update.
25477         (construct_init_block): Use make_single_succ_edge.
25478         (construct_exit_block): Use make_single_succ_edge.
25479         * cfghooks.c (verify_flow_info): Update.
25480         (redirect_edge_succ_nodup): Update.
25481         (split_edge): Update.
25482         (account_profile_record): Update.
25483         * cfgloopanal.c (single_likely_exit): Update.
25484         * cfgloopmanip.c (scale_loop_profile): Update.
25485         (set_zero_probability): Remove.
25486         (duplicate_loop_to_header_edge): Update.
25487         * cfgloopmanip.h (loop_version): Update prototype.
25488         * cfgrtl.c (try_redirect_by_replacing_jump): Update.
25489         (force_nonfallthru_and_redirect): Update.
25490         (update_br_prob_note): Update.
25491         (rtl_verify_edges): Update.
25492         (purge_dead_edges): Update.
25493         (rtl_lv_add_condition_to_bb): Update.
25494         * cgraph.c: (cgraph_edge::redirect_call_stmt_to_calle): Update.
25495         * cgraphunit.c (init_lowered_empty_function): Update.
25496         (cgraph_node::expand_thunk): Update.
25497         * cilk-common.c: Include profile-count.h
25498         * dojump.c (inv): Remove.
25499         (jumpifnot): Update.
25500         (jumpifnot_1): Update.
25501         (do_jump_1): Update.
25502         (do_jump): Update.
25503         (do_jump_by_parts_greater_rtx): Update.
25504         (do_compare_rtx_and_jump): Update.
25505         * dojump.h (jumpifnot, jumpifnot_1, jumpif_1, jumpif, do_jump,
25506         do_jump_1. do_compare_rtx_and_jump): Update prototype.
25507         * dwarf2cfi.c: Include profile-count.h
25508         * except.c (dw2_build_landing_pads): Use make_single_succ_edge.
25509         (sjlj_emit_dispatch_table): Likewise.
25510         * explow.c: Include profile-count.h
25511         * expmed.c (emit_store_flag_force): Update.
25512         (do_cmp_and_jump): Update.
25513         * expr.c (compare_by_pieces_d::generate): Update.
25514         (compare_by_pieces_d::finish_mode): Update.
25515         (emit_block_move_via_loop): Update.
25516         (store_expr_with_bounds): Update.
25517         (store_constructor): Update.
25518         (expand_expr_real_2): Update.
25519         (expand_expr_real_1): Update.
25520         * expr.h (try_casesi, try_tablejump): Update prototypes.
25521         * gimple-pretty-print.c (dump_probability): Update.
25522         (dump_profile): New.
25523         (dump_gimple_label): Update.
25524         (dump_gimple_bb_header): Update.
25525         * graph.c (draw_cfg_node_succ_edges): Update.
25526         * hsa-gen.c (convert_switch_statements): Update.
25527         * ifcvt.c (cheap_bb_rtx_cost_p): Update.
25528         (find_if_case_1): Update.
25529         (find_if_case_2): Update.
25530         * internal-fn.c (expand_arith_overflow_result_store): Update.
25531         (expand_addsub_overflow): Update.
25532         (expand_neg_overflow): Update.
25533         (expand_mul_overflow): Update.
25534         (expand_vector_ubsan_overflow): Update.
25535         * ipa-cp.c (good_cloning_opportunity_p): Update.
25536         * ipa-split.c (split_function): Use make_single_succ_edge.
25537         * ipa-utils.c (ipa_merge_profiles): Update.
25538         * loop-doloop.c (add_test): Update.
25539         (doloop_modify): Update.
25540         * loop-unroll.c (compare_and_jump_seq): Update.
25541         (unroll_loop_runtime_iterations): Update.
25542         * lra-constraints.c (lra_inheritance): Update.
25543         * lto-streamer-in.c (input_cfg): Update.
25544         * lto-streamer-out.c (output_cfg): Update.
25545         * mcf.c (adjust_cfg_counts): Update.
25546         * modulo-sched.c (sms_schedule): Update.
25547         * omp-expand.c (expand_omp_for_init_counts): Update.
25548         (extract_omp_for_update_vars): Update.
25549         (expand_omp_ordered_sink): Update.
25550         (expand_omp_for_ordered_loops): Update.
25551         (expand_omp_for_generic): Update.
25552         (expand_omp_for_static_nochunk): Update.
25553         (expand_omp_for_static_chunk): Update.
25554         (expand_cilk_for): Update.
25555         (expand_omp_simd): Update.
25556         (expand_omp_taskloop_for_outer): Update.
25557         (expand_omp_taskloop_for_inner): Update.
25558         * omp-simd-clone.c (simd_clone_adjust): Update.
25559         * optabs.c (expand_doubleword_shift): Update.
25560         (expand_abs): Update.
25561         (emit_cmp_and_jump_insn_1): Update.
25562         (expand_compare_and_swap_loop): Update.
25563         * optabs.h (emit_cmp_and_jump_insns): Update prototype.
25564         * predict.c (predictable_edge_p): Update.
25565         (edge_probability_reliable_p): Update.
25566         (set_even_probabilities): Update.
25567         (combine_predictions_for_insn): Update.
25568         (combine_predictions_for_bb): Update.
25569         (propagate_freq): Update.
25570         (estimate_bb_frequencies): Update.
25571         (force_edge_cold): Update.
25572         * profile-count.c (profile_count::dump): Add missing space into dump.
25573         (profile_count::debug): Add newline.
25574         (profile_count::differs_from_p): Explicitly convert to unsigned.
25575         (profile_count::stream_in): Update.
25576         (profile_probability::dump): New member function.
25577         (profile_probability::debug): New member function.
25578         (profile_probability::differs_from_p): New member function.
25579         (profile_probability::differs_lot_from_p): New member function.
25580         (profile_probability::stream_in): New member function.
25581         (profile_probability::stream_out): New member function.
25582         * profile-count.h (profile_count_quality): Rename to ...
25583         (profile_quality): ... this one.
25584         (profile_probability): New.
25585         (profile_count): Update.
25586         * profile.c (compute_branch_probabilities): Update.
25587         * recog.c (peep2_attempt): Update.
25588         * sched-ebb.c (schedule_ebbs): Update.
25589         * sched-rgn.c (find_single_block_region): Update.
25590         (compute_dom_prob_ps): Update.
25591         (schedule_region): Update.
25592         * sel-sched-ir.c (compute_succs_info): Update.
25593         * stmt.c (struct case_node): Update.
25594         (do_jump_if_equal): Update.
25595         (get_outgoing_edge_probs): Update.
25596         (conditional_probability): Update.
25597         (emit_case_dispatch_table): Update.
25598         (expand_case): Update.
25599         (expand_sjlj_dispatch_table): Update.
25600         (emit_case_nodes): Update.
25601         * targhooks.c: Update.
25602         * tracer.c (better_p): Update.
25603         (find_best_successor): Update.
25604         * trans-mem.c (expand_transaction): Update.
25605         * tree-call-cdce.c: Update.
25606         * tree-cfg.c (gimple_split_edge): Upate.
25607         (move_sese_region_to_fn): Upate.
25608         * tree-cfgcleanup.c (cleanup_control_expr_graph): Upate.
25609         * tree-eh.c (lower_resx): Upate.
25610         (cleanup_empty_eh_move_lp): Upate.
25611         * tree-if-conv.c (version_loop_for_if_conversion): Update.
25612         * tree-inline.c (copy_edges_for_bb): Update.
25613         (copy_cfg_body): Update.
25614         * tree-parloops.c (gen_parallel_loop): Update.
25615         * tree-profile.c (gimple_gen_ic_func_profiler): Update.
25616         (gimple_gen_time_profiler): Update.
25617         * tree-ssa-dce.c (remove_dead_stmt): Update.
25618         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
25619         * tree-ssa-loop-im.c (execute_sm_if_changed): Update.
25620         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update.
25621         (unloop_loops): Update.
25622         (try_peel_loop): Update.
25623         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
25624         * tree-ssa-loop-split.c (connect_loops): Update.
25625         (split_loop): Update.
25626         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
25627         (hoist_guard): Update.
25628         * tree-ssa-phionlycprop.c (propagate_rhs_into_lhs): Update.
25629         * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Update.
25630         (value_replacement): Update.
25631         * tree-ssa-reassoc.c (branch_fixup): Update.
25632         * tree-ssa-tail-merge.c (replace_block_by): Update.
25633         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Update.
25634         (create_edge_and_update_destination_phis): Update.
25635         (compute_path_counts): Update.
25636         (recompute_probabilities): Update.
25637         (update_joiner_offpath_counts): Update.
25638         (freqs_to_counts_path): Update.
25639         (duplicate_thread_path): Update.
25640         * tree-switch-conversion.c (hoist_edge_and_branch_if_true): Update.
25641         (struct switch_conv_info): Update.
25642         (gen_inbound_check): Update.
25643         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
25644         (vect_do_peeling): Update.
25645         (vect_loop_versioning): Update.
25646         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
25647         (optimize_mask_stores): Update.
25648         * ubsan.c (ubsan_expand_null_ifn): Update.
25649         * value-prof.c (gimple_divmod_fixed_value): Update.
25650         (gimple_divmod_fixed_value_transform): Update.
25651         (gimple_mod_pow2): Update.
25652         (gimple_mod_pow2_value_transform): Update.
25653         (gimple_mod_subtract): Update.
25654         (gimple_mod_subtract_transform): Update.
25655         (gimple_ic): Update.
25656         (gimple_stringop_fixed_value): Update.
25657         (gimple_stringops_transform): Update.
25658         * value-prof.h: Update.
25659
25660 2017-06-29  Carl Love  <cel@us.ibm.com>
25661
25662         * config/rs6000/rs6000-c.c: Add support for built-in functions
25663         vector signed int vec_signed (vector float);
25664         vector signed long long vec_signed (vector double);
25665         vector signed int vec_signed2 (vector double, vector double);
25666         vector signed int vec_signede (vector double);
25667         vector signed int vec_signedo (vector double);
25668         * config/rs6000/rs6000.c (rs6000_generate_vsigned2_code): Add
25669         instruction generator.
25670         * config/rs6000/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
25671         UNSPEC_VSX_VSIGNED2): Add UNSPECS.
25672         (vsx_xvcvspsxws, vsx_xvcvdpuxds_scale, vsx_xvcvspuxws, vsigned2_v2df):
25673         Add define_insn.
25674         (vsignedo_v2df, vsignede_v2df, vunsigned2_v2df, vunsignedo_v2df,
25675         vunsignede_v2df): Add define_expands.
25676         * config/rs6000/rs6000-builtin.def (VEC_SIGNED, VEC_UNSIGNED,
25677         VEC_SIGNED2, VEC_UNSIGNED2, VEC_SIGNEDE, VEC_UNSIGNEDE, VEC_SIGNEDO,
25678         VEC_UNSIGNEDO): Add definitions.
25679         * config/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
25680         UNSPEC_VSX_VSIGNED2): Add UNSPECs.
25681         (vsx_xvcvspsxws, vsx_xvcvspuxws): Add define_insn.
25682         (vsigned2_v2df, vsigendo_v2df, vsignede_v2df,
25683         vunsigned2_v2df, vunsignedo_v2df, vunsignede_v2df): Add define_expands.
25684         * config/rs6000/altivec.h (vec_signed, vec_signed2,
25685         vec_signede and vec_signedo, vec_unsigned, vec_unsigned2,
25686         vec_unsignede, vec_unsignedo): Add builtin defines.
25687         * config/rs6000-protos.h (rs6000_generate_vsigned2_code): Add extern
25688         declaration.
25689         * doc/extend.texi: Update the built-in documentation file for the
25690         new built-in functions.
25691
25692 2017-06-29  Richard Biener  <rguenther@suse.de>
25693
25694         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Do not add
25695         reduction chains to LOOP_VINFO_REDUCTIONS.
25696         * tree-vect-slp.c (vect_analyze_slp): Continue looking for
25697         SLP reductions after processing reduction chains.
25698
25699 2017-06-29  Nathan Sidwell  <nathan@acm.org>
25700
25701         * builtins.c (fold_builtin_FUNCTION): Use
25702         lang_hooks.decl_printable_name.
25703
25704 2017-06-29  Peter Bergner  <bergner@vnet.ibm.com>
25705
25706         PR middle-end/81194
25707         * cfgexpand.c (expand_gimple_stmt_1): Handle switch statements
25708         with only one label.
25709         * stmt.c (expand_case): Assert NCASES is greater than one.
25710
25711 2017-06-29  Richard Biener  <rguenther@suse.de>
25712
25713         * tree-cfg.c (group_case_labels_stmt): Return whether we changed
25714         anything.
25715         (group_case_labels): Likewise.
25716         (find_taken_edge): Push sanity checking on val to workers...
25717         (find_taken_edge_cond_expr): ... here
25718         (find_taken_edge_switch_expr): ... and here, handle cases
25719         with just a default label.
25720         * tree-cfg.h (group_case_labels_stmt): Adjust prototype.
25721         (group_case_labels): Likewise.
25722         * tree-cfgcleanup.c (execute_cleanup_cfg_post_optimizing): When
25723         group_case_labels does anything cleanup the CFG again.
25724
25725 2017-06-29  Bin Cheng  <bin.cheng@arm.com>
25726
25727         PR tree-optimization/81196
25728         * tree-ssa-loop-niter.c (number_of_iterations_cond): Handle loop
25729         exit condition comparing two IVs.
25730
25731 2017-06-29  Richard Earnshaw  <rearnsha@arm.com>
25732
25733         * config/arm/parsecpu.awk (gen_comm_data): Add initializer for
25734         profile to the dummy entry at the end of the list of architectures.
25735         * config/arm/arm-cpu-cdata.h: Regenerated.
25736
25737 2017-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25738             Michael Collison <michael.collison@arm.com>
25739
25740         PR target/70119
25741         * config/aarch64/aarch64.md (*aarch64_<optab>_reg_<mode>3_mask1):
25742         New pattern.
25743         (*aarch64_reg_<mode>3_neg_mask2): New pattern.
25744         (*aarch64_reg_<mode>3_minus_mask): New pattern.
25745         (*aarch64_<optab>_reg_di3_mask2): New pattern.
25746         * config/aarch64/aarch64.c (aarch64_rtx_costs): Account for cost
25747         of shift when the shift amount is masked with constant equal to
25748         the size of the mode.
25749         * config/aarch64/predicates.md (subreg_lowpart_operator): New
25750         predicate.
25751
25752 2017-06-29  Martin Liska  <mliska@suse.cz>
25753
25754         * config/i386/i386.opt: Change range from [1,5] to [0,5].
25755
25756 2017-06-29  Yury Gribov  <tetra2005@gmail.com>
25757
25758         PR bootstrap/80565
25759         * ipa-cp.c (allocate_and_init_ipcp_value): Add initialization
25760         code.
25761         * ipa-inline.h
25762         (edge_growth_cache_entry::edge_growth_cache_entry): New
25763         function.
25764         (reset_edge_growth_cache): Update to use constructor.
25765
25766 2017-06-28  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
25767
25768         * config/aarch64/aarch64.h (AARCH64_EXPAND_ALIGNMENT): New.
25769         (DATA_ALIGNMENT): Update to use AARCH64_EXPAND_ALIGNMENT.
25770         (LOCAL_ALIGNMENT): Update to use AARCH64_EXPAND_ALIGNMENT.
25771
25772 2017-06-28  Sebastian Peryt  <sebastian.peryt@intel.com>
25773
25774         * config/i386/avx512vlintrin.h (_mm256_permutexvar_epi64)
25775         (_mm256_permutexvar_epi32, _mm256_permutex_epi64): New intrinsics.
25776
25777 2017-06-28  Szabolcs Nagy  <szabolcs.nagy@arm.com>
25778
25779         * config.gcc (*-linux-musl*): Add t-musl tmake_file.
25780         (*-linux-uclibc*): Add t-uclibc tmake_file.
25781         * config/t-musl: New.
25782         * config/t-uclibc: New.
25783
25784 2017-06-28  Richard Earnshaw  <rearnsha@arm.com>
25785
25786         * config/arm/parsecpu.awk (profile): Parse new keyword in an arch
25787         context.
25788         (gen_comm_data): Emit architectural setting of arch_prof.
25789         * config/arm/arm-cpus.in (armv6-m, armv6s-m, armv7-a, armv7ve): Set the
25790         profile.
25791         (armv7-r, armv7-m, armv7e-m, armv8-a, armv8.1-a, armv8.2-a): Likewise.
25792         (armv8-m.base, armv8-m.main): Likewise.
25793         * arm-protos.h (arm_build_target): Add profile field.
25794         (arch_option): Likewise.
25795         * config/arm/arm.c (arm_configure_build_target): Copy the profile to
25796         the active target.
25797         * config/arm/arm.h (TARGET_ARM_ARCH_PROFILE): Use
25798         arm_active_target.profile.
25799
25800 2017-06-28  Richard Biener  <rguenther@suse.de>
25801
25802         PR middle-end/81227
25803         * fold-const.c (negate_expr_p): Use TYPE_UNSIGNED, not
25804         TYPE_OVERFLOW_WRAPS.
25805         * match.pd (negate_expr_p): Likewise.
25806         * tree-ssa-reassoc.c (optimize_range_tests_diff): Use
25807         fold_build2, not fold_binary.
25808
25809 2017-06-28  Wilco Dijkstra  <wdijkstr@arm.com>
25810
25811         * config/aarch64/aarch64 (aarch64_expand_mov_immediate):
25812         Convert memory address to Pmode.
25813         (aarch64_print_operand): Assert MEM operands are always Pmode.
25814
25815 2017-06-28  Wilco Dijkstra  <wdijkstr@arm.com>
25816
25817         PR target/79665
25818         * config/arm/aarch-common.c (arm_no_early_alu_shift_dep):
25819         Remove redundant if.
25820         (aarch_forward_to_shift_is_not_shifted_reg): Remove.
25821         * config/arm/aarch-common-protos.h
25822         (aarch_forward_to_shift_is_not_shifted_re): Remove.
25823         * config/arm/cortex-a53.md: Use arm_no_early_alu_shift_dep in bypass.
25824
25825 2017-06-28  Michael Meissner  <meissner@linux.vnet.ibm.com>
25826
25827         PR ipa/81238
25828         * multiple_target.c (create_dispatcher_calls): Set the default
25829         clone to be static, not public.
25830
25831 2017-06-28  Richard Biener  <rguenther@suse.de>
25832
25833         * tree-vect-loop.c (vectorizable_reduction): Move special
25834         cond reduction IV var creation ...
25835         (vect_create_epilog_for_reduction): ... here.  Remove induction_index
25836         parameter.  Use STMT_VINFO_VECTYPE.
25837         * tree-vect-slp.c (vect_get_constant_vectors): Properly reset
25838         constant_p.
25839
25840 2017-06-28  Martin Liska  <mliska@suse.cz>
25841
25842         PR ipa/81128
25843         * ipa-visibility.c (non_local_p): Handle visibility.
25844
25845 2017-06-28  Martin Liska  <mliska@suse.cz>
25846
25847         PR driver/79659
25848         * common.opt: Add IntegerRange to various options.
25849         * opt-functions.awk (integer_range_info): New function.
25850         * optc-gen.awk: Add integer_range_info to cl_options struct.
25851         * opts-common.c (decode_cmdline_option): Handle
25852         CL_ERR_INT_RANGE_ARG.
25853         (cmdline_handle_error): Likewise.
25854         * opts.c (print_filtered_help): Show valid interval in
25855         when --help is provided.
25856         * opts.h (struct cl_option): Add range_min and range_max fields.
25857         * config/i386/i386.opt: Add IntegerRange for -mbranch-cost.
25858
25859 2017-06-28  Marc Glisse  <marc.glisse@inria.fr>
25860
25861         * match.pd ((X & ~Y) | (~X & Y)): Generalize to + and ^.
25862         (x * C EQ/NE y * C): New transformation.
25863
25864 2017-06-28  Christophe Lyon  <christophe.lyon@linaro.org>
25865
25866         * genmultilib (combination_space): Accept '+' in option names.
25867
25868 2017-06-28  Martin Liska  <mliska@suse.cz>
25869
25870         PR sanitizer/81224
25871         * asan.c (instrument_derefs): Bail out inner references
25872         that are hard register variables.
25873
25874 2017-06-28  Jakub Jelinek  <jakub@redhat.com>
25875
25876         PR target/81175
25877         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Use def_builtin
25878         rather than def_builtin_pure for __builtin_ia32_gatherpf*.
25879
25880 2017-06-28  Richard Biener  <rguenther@suse.de>
25881
25882         * tree-vectorizer.h (vect_get_vec_defs): Remove.
25883         (vect_get_slp_defs): Adjust.
25884         * tree-vect-loop.c (get_initial_defs_for_reduction): Split
25885         out from ...
25886         * tree-vect-slp.c (vect_get_constant_vectors): ... here and
25887         simplify.
25888         * tree-vect-loop.c (vect_create_epilog_for_reduction): Use
25889         get_initial_defs_for_reduction instead of vect_get_vec_defs.
25890         (vectorizable_reduction): Adjust.
25891         * tree-vect-slp.c (vect_get_constant_vectors): Remove reduction
25892         handling.
25893         (vect_get_slp_defs): Likewise.
25894         * tree-vect-stmts.c (vect_get_vec_defs): Make static and adjust.
25895         (vectorizable_bswap): Adjust.
25896         (vectorizable_call): Likewise.
25897         (vectorizable_conversion): Likewise.
25898         (vectorizable_assignment): Likewise.
25899         (vectorizable_shift): Likewise.
25900         (vectorizable_operation): Likewise.
25901         (vectorizable_store): Likewise.
25902         (vectorizable_condition): Likewise.
25903         (vectorizable_comparison): Likewise.
25904
25905 2017-06-28  Michael Collison  <michael.collison@arm.com>
25906
25907         PR target/68535
25908         * config/arm/arm.c (gen_ldm_seq): Remove last unnecessary
25909         set of base_reg
25910         (arm_gen_movmemqi): Removed unused variable 'i'.
25911         Convert 'for' loop into 'while' loop.
25912         (arm_expand_prologue): Remove last unnecessary set of insn.
25913         (thumb_pop): Remove unused variable 'pushed_words'.
25914         (thumb_exit): Remove last unnecessary set of regs_to_pop.
25915
25916 2017-06-28  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25917
25918         * config/s390/predicates.md: Use s390_rel_address_ok_p.
25919         * config/s390/s390-protos.h: Add prototype of
25920         s390_rel_address_ok_p.
25921         * config/s390/s390.c (s390_got_symbol): New function.
25922         (s390_rel_address_ok_p): New function.
25923         (legitimize_pic_address): Use s390_rel_address_ok_p.
25924         (s390_load_got): Use s390_got_symbol.
25925         (s390_option_override): Issue error if
25926         -mno-pic-data-is-text-relative is used without -fpic/-fPIC.
25927         * config/s390/s390.h (TARGET_DEFAULT_PIC_DATA_IS_TEXT_RELATIVE):
25928         New macro.
25929         * config/s390/s390.opt: New option mpic-data-is-text-relative.
25930
25931 2017-06-27  Andrew Pinski  <apinski@cavium.com>
25932
25933         * match.pd (X >/>=/</<= 0 ? 1.0 : -1.0): New patterns.
25934         (X * copysign (1.0, X)): New pattern.
25935         (X * copysign (1.0, -X)): New pattern.
25936         (copysign (-1.0, CST)): New pattern.
25937
25938 2017-06-27  Joseph Myers  <joseph@codesourcery.com>
25939
25940         * genmultilib (combination_space): Remove variable.
25941         Validate reuse rules against regular expression for any sequence
25942         of multilib options in any order.
25943
25944 2017-06-27  Michael Collison  <michael.collison@arm.com>
25945
25946         * config/aarch64/aarch64-simd.md (aarch64_combine<mode>): Directly
25947         call aarch64_split_simd_combine.
25948         * (aarch64_combine_internal<mode>): Delete pattern.
25949         * config/aarch64/aarch64.c (aarch64_split_simd_combine):
25950         Allow register and subreg operands.
25951
25952 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
25953
25954         * config/i386/vxworks.h (ASM_SPEC): Remove definition. No target
25955         specific need, just fallback on defaults.
25956         (ASM_OUTPUT_ALIGNED_BSS): Add #undef before #define.
25957
25958 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
25959             Olivier Hainque  <hainque@adacore.com>
25960
25961         * config/i386/vxworks.h (DBX_REGISTER_NUMBER): Pick distinct
25962         map for 64bits.
25963         (TARGET_OS_CPP_BUILTINS): builtin_define CPU to X86_64 for 64bit
25964         targets. Pick a default if no particular attempt applied.
25965         (STACK_CHECK_PROTECT): Double for 64bit targets, which have
25966         larger contexts.
25967
25968 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
25969
25970         * config.gcc (i*86-wrs-vxworks7): Handle new acceptable triplet.
25971         (x86_64-wrs-vxworks7): Likewise.
25972
25973 2017-06-27  Marek Polacek  <polacek@redhat.com>
25974
25975         PR sanitizer/81223
25976         * ubsan.c (instrument_null): Check get_base_address's result for null.
25977
25978 2017-06-27  Marc Glisse  <marc.glisse@inria.fr>
25979
25980         * match.pd ((A+-B)+(C-A), (A+B)-(A-C)): New transformations.
25981
25982 2017-06-27  Marc Glisse  <marc.glisse@inria.fr>
25983
25984         * builtin-types.def (BT_FENV_T_PTR, BT_CONST_FENV_T_PTR,
25985         BT_FEXCEPT_T_PTR, BT_CONST_FEXCEPT_T_PTR): New primitive types.
25986         (BT_FN_INT_FENV_T_PTR, BT_FN_INT_CONST_FENV_T_PTR,
25987         BT_FN_INT_FEXCEPT_T_PTR_INT, BT_FN_INT_CONST_FEXCEPT_T_PTR_INT):
25988         New function types.
25989         * builtins.def (BUILT_IN_FECLEAREXCEPT, BUILT_IN_FEGETENV,
25990         BUILT_IN_FEGETEXCEPTFLAG, BUILT_IN_FEGETROUND,
25991         BUILT_IN_FEHOLDEXCEPT, BUILT_IN_FERAISEEXCEPT,
25992         BUILT_IN_FESETENV, BUILT_IN_FESETEXCEPTFLAG,
25993         BUILT_IN_FESETROUND, BUILT_IN_FETESTEXCEPT,
25994         BUILT_IN_FEUPDATEENV): New builtins.
25995         * tree-core.h (TI_FENV_T_PTR_TYPE, TI_CONST_FENV_T_PTR_TYPE,
25996         TI_FEXCEPT_T_PTR_TYPE, TI_CONST_FEXCEPT_T_PTR_TYPE): New entries.
25997         * tree.h (fenv_t_ptr_type_node, const_fenv_t_ptr_type_node,
25998         fexcept_t_ptr_type_node, const_fexcept_t_ptr_type_node): New
25999         macros.
26000         (builtin_structptr_types): Adjust size.
26001         * tree.c (builtin_structptr_types): Add four entries.
26002
26003 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
26004             Olivier Hainque  <hainque@adacore.com>
26005
26006         * config/vxworks.h (VXWORKS_LIB_SPEC): Incorporate ...
26007         (TLS_SYM): New local macro, forcing reference to __tls__ on
26008         link command lines for VxWorks 7 RTPs, triggering initialization
26009         of tlsLib.
26010         (VXWORKS_HAVE_TLS): New macro. State whether the target VxWorks
26011         OS features TLS support, true for RTPs on VxWorks 7.
26012         * config/vxworks.c (vxworks_override_options): Setup emutls
26013         accordingly.
26014
26015 2017-06-27  Jakub Jelinek  <jakub@redhat.com>
26016
26017         * predict.c (test_prediction_value_range): Use -1U instead of -1
26018         to avoid narrowing conversion warning.
26019         * dumpfile.c (dump_options): Wrap all value into dump_flags_t cast
26020         to avoid narrowing conversion warning.
26021         * opt-functions.awk (var_ref): Return (unsigned short) -1 instead of
26022         -1.
26023         * optc-gen.awk (END): Expect (unsigned short) -1 instead of -1.
26024
26025 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
26026
26027         * config/vxworks.h (VXWORKS_LIBS_RTP): Alternative definition for
26028         64bit configurations.
26029         (PTR_DIFF_TYPE): Alternative definition for TARGET_LP64.
26030         (SIZE_TYPE): Likewise.
26031         * config/vxworks.c (vxworks_emutls_var_fields): Use
26032         long_unsigned_type_node instead of unsigned_type_node as the offset
26033         field type, which is "pointer" mode in emutls.c.
26034
26035 2017-06-27  Jakub Jelinek  <jakub@redhat.com>
26036
26037         PR sanitizer/81209
26038         * ubsan.c (ubsan_encode_value): Initialize DECL_CONTEXT on var.
26039
26040         PR middle-end/81207
26041         * gimple-fold.c (replace_call_with_call_and_fold): Handle
26042         gimple_vuse copying separately from gimple_vdef copying.
26043
26044 2017-06-27  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
26045
26046         * value-prof.c (free_hist): Remove call to memset and the enclosing if
26047         condition.
26048
26049 2017-06-26  Jerome Lambourg  <lambourg@adacore.com>
26050             Olivier Hainque  <hainque@adacore.com>
26051
26052         * config.gcc (*-*-vxworks*): Add TARGET_VXWORKS7=1 to tm_defines
26053         for all vxworks7 targets.
26054         * config/vxworks.h (TARGET_VXWORKS7): If not defined, define to 0.
26055         (VXWORKS_ADDITIONAL_CPP_SPEC): Alternative definition for VXWORKS7.
26056         (VXWORKS_LIBS_RTP, VXWORKS_LIBS_RTP_DIR): New macros, allowing
26057         variations for VX6/VX7 and 32/64bits later on in ...
26058         (VXWORKS_LIB_SPEC): Leverage new macros.
26059         (VXWORKS_OS_CPP_BUILTINS): Define _VSB_CONFIG_FILE for VXWORKS7,
26060         as well as _ALLOW_KEYWORD_MACROS when "inline" is not a keyword.
26061
26062 2017-06-26  Jerome Lambourg  <lambourg@adacore.com>
26063
26064         * config/vxworks.h (VXWORKS_OS_CPP_BUILTINS): builtin_define
26065         _VX_TOOL_FAMILY and _VX_TOOL to gnu.
26066
26067 2017-06-26  Carl Love  <cel@us.ibm.com>
26068
26069         * config/rs6000/rs6000-c.c: Add support for built-in functions
26070         vector bool char vec_reve (vector bool char);
26071         vector signed char vec_reve (vector signed char);
26072         vector unsigned char vec_reve (vector unsigned char);
26073         vector bool int vec_reve (vector bool int);
26074         vector signed int vec_reve (vector signed int);
26075         vector unsigned int vec_reve (vector unsigned int);
26076         vector bool long long vec_reve (vector bool long long);
26077         vector signed long long vec_reve (vector signed long long);
26078         vector unsigned long long vec_reve (vector unsigned long long);
26079         vector bool short vec_reve (vector bool short);
26080         vector signed short vec_reve (vector signed short);
26081         vector double vec_reve (vector double);
26082         vector float vec_reve (vector float);
26083         * config/rs6000/rs6000-builtin.def (VREVE_V2DI, VREVE_V4SI,
26084         VREVE_V8HI, VREVE_V16QI, VREVE_V2DF, VREVE_V4SF, VREVE): New builtin.
26085         * config/rs6000/altivec.md (UNSPEC_VREVEV): New UNSPEC.
26086         (altivec_vreve): New pattern.
26087         * config/rs6000/altivec.h (vec_reve): New define.
26088         * doc/extend.texi (vec_rev): Update the built-in documentation file
26089         for the new built-in functions.
26090
26091 2016-06-26  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26092
26093         PR tree-optimization/71815
26094         * gimple-ssa-strength-reduction.c (uses_consumed_by_stmt): New
26095         function.
26096         (find_basis_for_candidate): Call uses_consumed_by_stmt rather than
26097         has_single_use.
26098         (slsr_process_phi): Likewise.
26099         (replace_uncond_cands_and_profitable_phis): Don't replace a
26100         multiply candidate with a stride of 1 (copy or cast).
26101         (phi_incr_cost): Call uses_consumed_by_stmt rather than
26102         has_single_use.
26103         (lowest_cost_path): Likewise.
26104         (total_savings): Likewise.
26105
26106 2017-06-26  Richard Biener  <rguenther@suse.de>
26107
26108         PR target/81175
26109         * config/i386/i386.c (ix86_init_mmx_sse_builtins):
26110         Use def_builtin_pure for all gather builtins.
26111
26112 2017-06-26  Richard Biener  <rguenther@suse.de>
26113
26114         PR tree-optimization/81203
26115         * tree-tailcall.c (find_tail_calls): Do not move stmts into
26116         non-dominating BBs.
26117
26118 2017-06-26  Marek Polacek  <polacek@redhat.com>
26119
26120         PR c/80116
26121         * doc/invoke.texi: Document -Wmultistatement-macros.
26122
26123 2017-06-26  Christophe Lyon  <christophe.lyon@linaro.org>
26124
26125         * doc/sourcebuild.texi (ARM-specific attributes): Document new
26126         arm_neon_ok_no_float_abi effective target.
26127
26128 2017-06-26  Richard Biener  <rguenther@suse.de>
26129
26130         PR tree-optimization/80928
26131         * cfghooks.c (duplicate_block): Do not copy BB_DUPLICATED flag.
26132         (copy_bbs): Set BB_DUPLICATED flag early.
26133         (execute_on_growing_pred): Do not execute for BB_DUPLICATED
26134         marked blocks.
26135         (execute_on_shrinking_pred): Likewise.
26136         * tree-ssa.c (ssa_redirect_edge): Do not look for PHI args in
26137         BB_DUPLICATED blocks.
26138         * tree-ssa-phionlycoprop.c (eliminate_degenerate_phis_1): Properly
26139         iterate over all PHIs considering removal of *gsi.
26140
26141 2017-06-23  Jim Wilson  <jim.wilson@linaro.org>
26142
26143         * doc/invoke.texi (AArch64 Options, -mtune): Re-add falkor and
26144         qdf24xx.
26145
26146 2017-06-23  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26147
26148         * config/rs6000/rs6000-string.c: (expand_block_clear,
26149         do_load_for_compare, select_block_compare_mode,
26150         compute_current_alignment, expand_block_compare,
26151         expand_strncmp_align_check, expand_strn_compare,
26152         expand_block_move, rs6000_output_load_multiple)
26153         Move functions related to string/block move/compare
26154         to a separate file.
26155         * config/rs6000/rs6000.c: Move above functions to rs6000-string.c.
26156         * config/rs6000/rs6000-protos.h (rs6000_emit_dot_insn): Add prototype
26157         for this function which is now used in two files.
26158         * config/rs6000/t-rs6000: Add rule to compile rs6000-string.o.
26159         * config.gcc: Add rs6000-string.o to extra_objs for
26160         targets powerpc*-*-* and rs6000*-*-*.
26161
26162 2017-06-23  Michael Meissner  <meissner@linux.vnet.ibm.com>
26163
26164         PR target/80510
26165         * config/rs6000/rs6000.md (ALTIVEC_DFORM): Do not allow DImode in
26166         32-bit, since indexed is not valid for DImode.
26167         (mov<mode>_hardfloat32): Reorder ISA 2.07 load/stores before ISA
26168         3.0 d-form load/stores to be the same as mov<mode>_hardfloat64.
26169         (define_peephole2 for Altivec d-form load): Add 32-bit support.
26170         (define_peephole2 for Altivec d-form store): Likewise.
26171
26172         PR ipa/81185
26173         * multiple_target.c (create_dispatcher_calls): Only create the
26174         dispatcher call if the function is the default clone of a
26175         versioned function.
26176
26177 2017-06-23  Segher Boessenkool  <segher@kernel.crashing.org>
26178
26179         PR middle-end/80902
26180         * builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
26181         a call, force the call to not be a tail call.
26182
26183 2017-06-23  Jeff Law  <law@redhat.com>
26184
26185         * doc/contrib.texi: Add entry for Steven Pemberton's work on
26186         enquire.
26187
26188 2017-06-23  Will Schmidt  <will_schmidt@vnet.ibm.com>
26189
26190         * config/rs6000/rs6000.c: Add include of ssa-propagate.h for
26191         update_call_from_tree().  (rs6000_gimple_fold_builtin): Add
26192         handling for early expansion of vector shifts (sl,sr,sra,rl).
26193         (builtin_function_type): Add vector shift right instructions
26194         to the unsigned argument list.
26195
26196 2017-06-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
26197
26198         rtl-optimizatoin/79286
26199         * ira.c (update_equiv_regs): Revert to using may_trap_or_fault_p again.
26200         * rtlanal.c (rtx_addr_can_trap_p_1): SYMBOL_REF_FUNCTION_P can never
26201         trap.  PIC register plus a const unspec without offset can never trap.
26202
26203 2017-06-23  Marc Glisse  <marc.glisse@inria.fr>
26204
26205         * tree.h (builtin_structptr_type): New type.
26206         (builtin_structptr_types): Declare new array.
26207         * tree.c (builtin_structptr_types): New array.
26208         (free_lang_data, build_common_tree_nodes): Use it.
26209
26210 2017-06-23  Jonathan Wakely  <jwakely@redhat.com>
26211
26212         PR c++/81187
26213         * doc/invoke.texi (-Wnoexcept-type): Fix name of option, from
26214         -Wnoexcept.
26215
26216 2017-06-22  Matt Turner  <mattst88@gmail.com>
26217
26218         * config/i386/driver-i386.c (host_detect_local_cpu): Add Kaby
26219         Lake models to skylake case.  Assume skylake for unknown
26220         models with clflushopt.
26221
26222 2017-06-22  Jeff Law  <law@redhat.com>
26223
26224         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Handle
26225         frame sizes that do not satisfy aarch64_uimm12_shift.
26226
26227 2017-06-22  Jan Hubicka <hubicka@ucw.cz>
26228
26229         * profile-count.h (apply_probability,
26230         apply_scale, probability_in): Fix checks for zero.
26231
26232 2017-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26233
26234         * incpath.c (add_sysroot_to_chain): Allow for $SYSROOT prefix.
26235         * doc/cppdiropts.texi (-I @var{dir}): Document it.
26236
26237 2016-06-22  Richard Biener  <rguenther@suse.de>
26238
26239         * tree-vect-loop.c (vect_model_reduction_cost): Handle
26240         COND_REDUCTION and INTEGER_INDUC_COND_REDUCTION without
26241         REDUC_MAX_EXPR support.
26242         (vectorizable_reduction): Likewise.
26243         (vect_create_epilog_for_reduction): Likewise.
26244
26245 2017-06-22  James Greenhalgh  <james.greenhalgh@arm.com>
26246
26247         * match.pd (A / (1 << B) -> A >> B): New.
26248         * generic-match-head.c: Include optabs-tree.h.
26249         * gimple-match-head.c: Likewise.
26250         * optabs-tree.h (target_supports_op_p): New.
26251         * optabs-tree.c (target_supports_op_p): New.
26252
26253 2017-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26254
26255         * configure.ac (gcc_cv_ld_static_dynamic): Also check stderr for
26256         $gcc_cv_ld --help output.
26257         (gcc_cv_ld_demangle): Likewise.
26258         (gcc_cv_ld_eh_frame_hdr): Likewise.
26259         (gcc_cv_ld_pie): Likewise.
26260         (gcc_cv_ld_as_needed): Likewise.  Prefer native forms unless $gnu_ld.
26261         (gcc_cv_ld_buildid): Likewise.
26262         (gcc_cv_ld_sysroot): Likewise.
26263         (ld_bndplt_support): Likewise.
26264         (ld_pushpopstate_support): Likewise.
26265         * configure: Regenerate.
26266         * config/sol2.h [!USE_GLD] (SYSROOT_SPEC): Define.
26267
26268 2017-06-21  Jakub Jelinek  <jakub@redhat.com>
26269
26270         PR target/81151
26271         * config/i386/sse.md (round<mode>2): Renumber match_dup and
26272         operands indexes to avoid gap between operands and match_dups.
26273
26274 2017-06-21  Andrew Pinski  <apinski@cavium.com>
26275
26276         * config/aarch64/aarch64-cost-tables.h (thunderx_extra_costs):
26277         Increment Arith_shift and Arith_shift_reg by 1.
26278         * config/aarch64/aarch64-tuning-flags.def (cheap_shift_extend):
26279         New tuning flag.
26280         * config/aarch64/aarch64.c (thunderx_tunings): Enable
26281         AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND.
26282         (aarch64_strip_extend): Add new argument and test for it.
26283         (aarch64_cheap_mult_shift_p): New function.
26284         (aarch64_rtx_mult_cost): Call aarch64_cheap_mult_shift_p and don't
26285         add a cost if it is true.
26286         Update calls to aarch64_strip_extend.
26287         (aarch64_rtx_costs): Update calls to aarch64_strip_extend.
26288
26289 2017-06-21  Andrew Pinski  <apinski@cavium.com>
26290
26291         * config/aarch64/aarch64-cores.def (thunderxt88p1): Use thunderxt88
26292         tunings.
26293         (thunderxt88): Likewise.
26294         * config/aarch64/aarch64.c (thunderxt88_prefetch_tune): New variable.
26295         (thunderx_prefetch_tune): New variable.
26296         (thunderx2t99_prefetch_tune): Update for the correct values.
26297         (thunderxt88_tunings): New variable.
26298         (thunderx_tunings): Use thunderx_prefetch_tune instead of
26299         generic_prefetch_tune.
26300         (thunderx2t99_tunings): Use AUTOPREFETCHER_WEAK.
26301
26302 2017-06-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26303
26304         * config/aarch64/atomics.md (aarch64_compare_and_swap<mode>_lse,
26305         SHORT): Relax operand 3 to aarch64_reg_or_zero and constraint to Z.
26306         (aarch64_compare_and_swap<mode>_lse, GPI): Likewise.
26307         (aarch64_atomic_cas<mode>, SHORT): Likewise for operand 2.
26308         (aarch64_atomic_cas<mode>, GPI): Likewise.
26309
26310 2017-06-21  Martin Liska  <mliska@suse.cz>
26311
26312         * gimplify.c (gimplify_label_expr): Insert GIMPLE_PREDICT
26313         statements on cold and hot labels.
26314         * predict.c (tree_estimate_probability_bb): Remove the
26315         prediction from this place.
26316
26317 2017-06-21  Martin Liska  <mliska@suse.cz>
26318
26319         PR tree-optimization/79489
26320         * gimplify.c (maybe_add_early_return_predict_stmt): New
26321         function.
26322         (gimplify_return_expr): Call the function.
26323         * predict.c (tree_estimate_probability_bb): Remove handling
26324         of early return.
26325         * predict.def: Update comment about early return predictor.
26326         * gimple-predict.h (is_gimple_predict): New function.
26327         * predict.def: Change default value of early return to 66.
26328         * tree-tailcall.c (find_tail_calls): Skip GIMPLE_PREDICT
26329         statements.
26330         * passes.def: Put pass_strip_predict_hints to the beginning of
26331         IPA passes.
26332
26333 2017-06-21  Pierre-Marie de Rodat  <derodat@adacore.com>
26334
26335         * dwarf2out.c (gen_decl_die): Remove the guard to skip file-scope
26336         FUNCTION_DECL declarations.
26337         (dwarf2out_early_global_decl): Remove the guard to skip FUNCTION_DECL
26338         declarations.
26339         (dwaf2out_decl): Likewise.
26340         * godump.c (go_early_global_decl): Skip call to the real debug hook
26341         for FUNCTION_DECL declarations.
26342         * passes.c (rest_of_decl_compilation): Skip call to the
26343         early_global_decl debug hook for FUNCTION_DECL declarations, unless
26344         -fdump-go-spec is passed.
26345
26346 2017-06-21  Marc Glisse  <marc.glisse@inria.fr>
26347
26348         * config/i386/i386.c (struct builtin_isa): New field pure_p.
26349         Reorder for compactness.
26350         (def_builtin, def_builtin2, ix86_add_new_builtins): Handle pure_p.
26351         (def_builtin_pure, def_builtin_pure2): New functions.
26352         (ix86_init_mmx_sse_builtins) [__builtin_ia32_stmxcsr]: Mark as pure.
26353
26354 2017-06-21  Marc Glisse  <marc.glisse@inria.fr>
26355
26356         * match.pd (nop_convert): New predicate.
26357         ((A +- CST1) +- CST2): Allow some NOP conversions.
26358
26359 2017-06-21  Jakub Jelinek  <jakub@redhat.com>
26360
26361         PR c++/81130
26362         * gimplify.c (omp_add_variable): Don't force GOVD_SEEN for types
26363         with ctors/dtors if GOVD_SHARED is set.
26364
26365 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
26366
26367         * config/aarch64/aarch64.md (movti_aarch64):
26368         Emit mov rather than orr.
26369         (movtf_aarch64): Likewise.
26370         * config/aarch64/aarch64-simd.md (aarch64_simd_mov):
26371         Emit mov rather than orr.
26372
26373 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
26374
26375         * config/aarch64/aarch64-simd.md (aarch64_simd_dup):
26376         Swap alternatives, make integer dup more expensive.
26377
26378 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
26379
26380         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
26381         Return true for non-tls symbols.
26382
26383 2017-06-21  James Greenhalgh  <james.greenhalgh@arm.com>
26384
26385         * config/aarch64/aarch64-cores.def (cortex-a55): New.
26386         (cortex-a75): Likewise.
26387         (cortex-a75.cortex-a55): Likewise.
26388         * config/aarch64/aarch64-tune.md: Regenerate.
26389         * doc/invoke.texi (-mtune): Document new values for -mtune.
26390
26391 2017-06-21  Tom de Vries  <tom@codesourcery.com>
26392
26393         * doc/sourcebuild.texi (Add Options, Features for dg-add-options): Add
26394         stack_size feature.
26395         (Effective-Target Keywords, Other attributes): Suggest using
26396         dg-add-options stack_size feature to get stack limit in stack_size
26397         effective target documentation.
26398
26399 2017-06-21  Julian Brown  <julian@codesourcery.com>
26400             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
26401
26402         * config/aarch64/aarch64-simd.md (aarch64_crypto_pmulldi)
26403         (aarch64_crypto_pmullv2di): Change type attribute to crypto_pmull.
26404         * config/aarch64/thunderx2t99.md (thunderx2t99_pmull): New
26405         reservation.
26406         * config/arm/cortex-a53.md (cortex_a53_advsimd_type): Add crypto_pmull to
26407         attribute type list for neon_multiply.
26408         * config/arm/cortex-a57.md (cortex_a57_neon_type): Add crypto_pmull to
26409         attribute type list for neon_multiply.
26410         * config/arm/crypto.md (crypto_vmullp64): Change type to crypto_pmull.
26411         * config/arm/exynos-m1.md (exynos_m1_neon_type): Add crypto_pmull to
26412         attribute type list for neon_multiply.
26413         * config/arm/types.md (crypto_pmull): Add.
26414         * config/arm/xgene1.md (xgene1_neon_pmull): Add crypto_pmull to
26415         attribute type list.
26416
26417 2017-06-20  Andreas Tobler  <andreast@gcc.gnu.org>
26418
26419         * config.gcc (armv6*-*-freebsd*): Change the target_cpu_cname to
26420         arm1176jzf-s.
26421
26422 2017-06-20  Jakub Jelinek  <jakub@redhat.com>
26423
26424         * ira-costs.c (find_costs_and_classes): Initialize cost_classes later
26425         to make sure not to dereference a NULL cost_classes_ptr pointer.
26426
26427 2017-06-20  Carl Love  <cel@us.ibm.com>
26428
26429         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
26430         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
26431         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
26432         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
26433         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
26434         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
26435         VMULOSW): New enum "unspec" values.
26436         (vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
26437         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
26438         altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
26439         altivec_vmulosw): New patterns.
26440         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
26441         VMULOSW): Add definitions.
26442
26443 2017-06-20  Julia Koval  <julia.koval@intel.com>
26444
26445         * config/i386/i386.c: Fix rounding expand for new pattern.
26446         * config/i386/subst.md: Fix pattern (parallel -> unspec).
26447
26448 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
26449
26450         * config/aarch64/aarch64-option-extensions.def (rcpc): New.
26451         * config/aarch64/aarch64.h (AARCH64_FL_RCPC): New.
26452
26453 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
26454
26455         * config/aarch64/aarch64-option-extensions.def (fp16): Fix expected
26456         feature string.
26457
26458 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
26459
26460         * config/aarch64/aarch64-cores.def: Rearrange to sort by
26461         architecture, then by implementer ID.
26462         * config/aarch64/aarch64-tune.md: Regenerate.
26463
26464 2017-06-20  Richard Biener  <rguenther@suse.de>
26465
26466         PR middle-end/81097
26467         * fold-const.c (split_tree): Fold to type before negating.
26468
26469 2017-06-20  David Malcolm  <dmalcolm@redhat.com>
26470
26471         * diagnostic-show-locus.c
26472         (selftest::test_fixit_deletion_affecting_newline): New function.
26473         (selftest::diagnostic_show_locus_c_tests): Call it.
26474
26475 2017-06-20  Andreas Schwab  <schwab@suse.de>
26476
26477         PR target/80970
26478         * config/m68k/m68k.md (bsetdreg, bchgdreg, bclrdreg): Use "=d"
26479         instead of "+d".
26480
26481 2017-06-20  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
26482
26483         * config/arm/arm-c.c (arm_cpu_builtins): New block to define
26484         __ARM_FEATURE_COPROC according to support.
26485
26486 2017-06-20  Jakub Jelinek  <jakub@redhat.com>
26487
26488         * tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
26489         Rewritten to avoid overflow for > 32-bit pointers.
26490
26491         PR sanitizer/81125
26492         * ubsan.h (ubsan_encode_value): Workaround buggy clang++ parser
26493         by removing enum keyword.
26494         (ubsan_type_descriptor): Likewise.  Formatting fix.
26495
26496         PR target/81121
26497         * config/i386/i386.md (TARGET_USE_VECTOR_CONVERTS float si->{sf,df}
26498         splitter): Require TARGET_SSE2 in the condition.
26499
26500 2017-06-20  Michael Meissner  <meissner@linux.vnet.ibm.com>
26501
26502         PR target/79799
26503         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Add support
26504         for doing vector set of SFmode on ISA 3.0.
26505         * config/rs6000/vsx.md (vsx_set_v4sf_p9): Likewise.
26506         (vsx_set_v4sf_p9_zero): Special case setting 0.0f to a V4SF
26507         element.
26508         (vsx_insert_extract_v4sf_p9): Add an optimization for inserting a
26509         SFmode value into a V4SF variable that was extracted from another
26510         V4SF variable without converting the element to double precision
26511         and back to single precision vector format.
26512         (vsx_insert_extract_v4sf_p9_2): Likewise.
26513
26514 2017-06-19  Jakub Jelinek  <jakub@redhat.com>
26515
26516         * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Multiply
26517         in UWHI to avoid undefined overflow.
26518
26519         PR sanitizer/81125
26520         * ubsan.h (enum ubsan_encode_value_phase): New.
26521         (ubsan_encode_value): Change second argument to
26522         enum ubsan_encode_value_phase with default value of
26523         UBSAN_ENCODE_VALUE_GENERIC.
26524         * ubsan.c (ubsan_encode_value): Change second argument to
26525         enum ubsan_encode_value_phase PHASE from bool IN_EXPAND_P,
26526         adjust uses, for UBSAN_ENCODE_VALUE_GENERIC use just
26527         create_tmp_var_raw instead of create_tmp_var and use a
26528         TARGET_EXPR.
26529         (ubsan_expand_bounds_ifn, ubsan_build_overflow_builtin,
26530         instrument_bool_enum_load, ubsan_instrument_float_cast): Adjust
26531         ubsan_encode_value callers.
26532
26533         PR sanitizer/81111
26534         * ubsan.c (ubsan_encode_value): If current_function_decl is NULL,
26535         use create_tmp_var_raw instead of create_tmp_var, mark it addressable
26536         just by setting TREE_ADDRESSABLE on the result and use a TARGET_EXPR.
26537
26538 2017-06-19  Richard Biener  <rguenther@suse.de>
26539
26540         PR middle-end/81118
26541         * tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Clear niter
26542         estimates if we changed anything.
26543
26544 2017-06-19  Richard Biener  <rguenther@suse.de>
26545
26546         PR tree-optimization/80887
26547         * tree-ssa-sccvn.c (mprts_hook_cnt): New global.
26548         (vn_lookup_simplify_result): Allow only mprts_hook_cnt succesful
26549         simplified lookups, then reset mprts_hook.
26550         (vn_nary_build_or_lookup_1): Set mprts_hook_cnt to 9 before
26551         simplifying.
26552         (try_to_simplify): Likewise.
26553
26554 2017-06-19  Martin Liska  <mliska@suse.cz>
26555
26556         PR sanitizer/80879
26557         * gimplify.c (gimplify_switch_expr):
26558         Initialize live_switch_vars for SWITCH_BODY == STATEMENT_LIST.
26559
26560 2017-06-19  Martin Liska  <mliska@suse.cz>
26561
26562         * doc/install.texi: Document that PGO runs in 4 stages.
26563
26564 2017-06-19  Martin Liska  <mliska@suse.cz>
26565
26566         PR ipa/80732
26567         * attribs.c (make_dispatcher_decl): Do not append '.ifunc'
26568         to dispatcher function name.
26569         * multiple_target.c (replace_function_decl): New function.
26570         (create_dispatcher_calls): Redirect both edges and references.
26571
26572 2017-06-19  Jan Hubicka <hubicka@ucw.cz>
26573
26574         * profile-count.c (profile_count::dump): Dump quality.
26575         (profile_count::differs_from_p): Update for unsigned val.
26576         * profile-count.h (profile_count_quality): New enum.
26577         (profile_count): Turn m_val to 62bit unsigned, add quality tracking.
26578
26579 2017-06-19  Richard Biener  <rguenther@suse.de>
26580
26581         * tree-ssa-loop-niter.h (estimate_numbers_of_iterations): Take
26582         struct function as arg.
26583         (estimate_numbers_of_iterations): Export overload with loop arg.
26584         (free_numbers_of_iterations_estimates_loop): Use an overload of
26585         free_numbers_of_iterations_estimates instead.
26586         * tree-cfg.c (remove_bb): Adjust.
26587         * tree-cfgcleanup.c (remove_forwarder_block_with_phi): Likewise.
26588         * tree-parloops.c (gen_parallel_loop): Likewise.
26589         * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables):
26590         Likewise.
26591         (tree_unroll_loops_completely): Likewise.
26592         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop):
26593         Use an overload instead and export.
26594         (estimated_loop_iterations): Adjust.
26595         (max_loop_iterations): Likewise.
26596         (likely_max_loop_iterations): Likewise.
26597         (estimate_numbers_of_iterations): Take struct function as arg
26598         and adjust.
26599         (loop_exits_before_overflow): Adjust.
26600         (free_numbers_of_iterations_estimates_loop): Use an overload.
26601         * tree-vect-loop.c (vect_analyze_loop_form): Adjust.
26602         * tree-vectorizer.c (vect_free_loop_info_assumptions): Likewise.
26603
26604 2017-06-19  Richard Biener  <rguenther@suse.de>
26605
26606         PR ipa/81112
26607         * ipa-prop.c (find_constructor_constant_at_offset): Handle
26608         RANGE_EXPR conservatively.
26609
26610 2017-06-16  Carl Love  <cel@us.ibm.com>
26611
26612         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
26613         definitions for vec_float, vec_float2, vec_floato,
26614         vec_floate built-ins.
26615         * config/rs6000/vsx.md (define_c_enum "unspec"): Add RTL code
26616         for instructions vsx_xvcvsxws vsx_xvcvuxwsp, float2, floato and
26617         floate.
26618         * config/rs6000/rs6000-builtin.def (FLOAT2_V2DI, FLOATE_V2DF,
26619         FLOATE_2DI, FLOATO_V2DF, FLOATEE_V2DI, XVCVSXWSP_V4SF,
26620         UNS_FLOATO_V2DI, UNS_FLOATE_V2DI): Add definitions.
26621         * config/altivec.md (define_insn "p8_vmrgew_<mode>",
26622         define_mode_attr VF_sxddp): Add V4SF type to p8_vmrgew.
26623         * config/rs6000/altivec.h (vec_float, vec_float2, vec_floate,
26624         vec_floato): Add builtin defines.
26625         * doc/extend.texi (vec_float, vec_float2, vec_floate, vec_floato):
26626         Update the built-in documentation file for the new built-in
26627         functions.
26628
26629 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26630
26631         * config/arm/arm.opt (marm): Mark as the negative of of -mthumb.
26632         (mthumb): Mark as the negative of -marm.
26633
26634 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26635
26636         * doc/invoke.texi (ARM Options, -mcpu): Document supported
26637         extension options.
26638         (ARM Options, -mtune): Document that this accepts the same
26639         extension options as -mcpu.
26640         (ARM Options, -mfpu): Document addition of -mfpu=auto.
26641
26642 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26643
26644         * doc/invoke.texi (ARM Options, -march=): Document new syntax and
26645         permitted extensions.
26646
26647 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26648
26649         * config/arm/arm-cpus.in (armv7): Add extension +nofp.
26650         (armv7-r): Add aliases vfpv3xd and vfpv3-d16.
26651         (armv8-m.main): Add option +nodsp.
26652         * config/arm/arm-cpu-cdata.h: Regenerated.
26653
26654 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26655
26656         * config/arm/t-fuchsia: New file.
26657         * config.gcc (arm*-*-fuchsia*): Use it.
26658
26659 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26660
26661         * config/arm/t-symbian: Rewrite for new option infrastructure.
26662
26663 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26664
26665         * config/arm/t-phoenix (MULTILIB_REUSE): Clear variable.
26666         (MULTILIB_REQUIRED): Likewise.
26667
26668 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26669
26670         * config/arm/t-linux-eabi (MULTILIB_EXCEPTIONS): Set to empty.
26671         (MULTILIB_RESUE): Likewise.
26672         (MULTILIB_MATCHES): Likewise.
26673         (MULTLIB_REQUIRED): Likewise.
26674
26675 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26676
26677         * config/arm/t-rtems: Rewrite for new option framework.
26678
26679 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26680
26681         * config/arm/t-aprofile (v7_a_nosimd_variants, v7_a_simd_variants)
26682         (v7ve_nosimd_variatns, v7ve_vfpv3_simd_variants)
26683         (v7ve_vfpv4_simd_variants, v8_a_nosimd_variants, v8_a_simd_variants)
26684         (v8_1_a_simd_variants, v8_2_a_simd_variants): Move to ...
26685         * config/arm/t-multilib: ... here.
26686         (MULTILIB_OPTIONS): Add armv7 and armv7+fp architectures.
26687         (MULTILIB_MATCHES): Use armv7 libraries for armv7-r.  Also use for
26688         armv7-a and armv8*-a when A-profile libraries have not been built.
26689         * config/arm/t-rmprofile: Rewrite.
26690
26691 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26692
26693         * genmultilib (multilib_reuse): Allow an explicit period to be escaped
26694         with a backslash.  Remove the backslash after substituting unescaped
26695         periods.
26696         * doc/fragments.texi (MULTILIB_REUSE): Document it.
26697
26698 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26699
26700         * config.gcc: (arm*-*-*): When building a-profile libraries, force
26701         the driver to pass through the default setting of -mfloat-abi.
26702         * common/config/arm/arm-common.c (arm_target_thumb_only): Return -marm
26703         rather than NULL.
26704         * config/arm/t-multilib (MULTILIB_REUSE): Initialize to empty.
26705         (all_feat_combs): New rule.
26706         (MULTILIB_OPTIONS): Use explicit ARM and Thumb directories.  Rework
26707         default libraries.
26708         * config/arm/t-aprofile: Rewrite.
26709
26710 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26711
26712         * config/arm/arm.h (FPUTYPE_AUTO): Define.
26713         * config/arm/arm.c (arm_option_override): Use FPUTYPE_AUTO if the
26714         fpu is not specified by the user/command-line.
26715         * config/arm/bpabi.h (FPUTYPE_DEFAULT): Delete.
26716         * config/arm/netbsd-elf.h (FPUTYPE_DEFAULT): Delete.
26717         * config/arm/linux-elf.h (FPUTYPE_DEFAULT): Delete.
26718         * config/arm/vxworks.h (FPUTYPE_DEFAULT): Delete.
26719         * common/config/arm/arm-common.c (arm_canon_arch_option): Use
26720         FPUTYPE_AUTO insted of FPUTYPE_DEFAULT.
26721
26722 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26723
26724         * config/arm/elf.h (MULTILIB_DEFAULTS): Delete.
26725         * config/arm/t-arm-elf: Rewritten.
26726
26727 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26728
26729         * config/arm/arm.h (TARGET_HARD_FLOAT): Also check that we
26730         have some floating-point instructions.
26731         (TARGET_SOFT_FLOAT): Define as inverse of TARGET_HARD_FLOAT.
26732         (TARGET_MAYBE_HARD_FLOAT): New macro.
26733         * config/arm/arm-builtins.c (arm_init_builtins): Use
26734         TARGET_MAYBE_HARD_FLOAT.
26735         * config/arm/arm.c (arm_option_override): Use TARGET_HARD_FLOAT_ABI.
26736
26737 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26738
26739         * common/config/arm/arm-common.c: Define INCLUDE_LIST.
26740         (configargs.h): Include it.
26741         (arm_print_hint_for_fpu_option): New function.
26742         (arm_parse_fpu_option): New function.
26743         (candidate_extension): New class.
26744         (arm_canon_for_multilib): New function.
26745         * config/arm/arm.h (CANON_ARCH_SPEC_FUNCTION): New macro.
26746         (EXTRA_SPEC_FUNCTIONS): Add CANON_ARCH_SPEC_FUNCTION.
26747         (ARCH_CANONICAL_SPECS): New macro.
26748         (DRIVER_SELF_SPECS): Add ARCH_CANONICAL_SPECS.
26749
26750 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26751
26752         * config.gcc (arm*-*-*): Ensure both target_cpu_cname and with_cpu
26753         are set after handling multilib fragments.  Set target_cpu_default2
26754         from with_cpu.
26755
26756 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26757
26758         * config.gcc (arm*-*-fucshia*): Set target_cpu_cname to the real
26759         cpu name.
26760         (arm*-*-*): Set target_cpu_default2 to a quoted string.
26761         * config/arm/parsecpu.awk (check_cpu): Validate any extension
26762         options.
26763         (check_arch): Likewise.
26764         * config/arm/arm.c (arm_configure_build_target): Handle
26765         TARGET_CPU_DEFAULT being a string constant.  Scan any feature
26766         options in the default.
26767
26768 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26769
26770         * config/arm/arm-protos.h (cpu_arch_extension): Add field to record
26771         when an option is an alias of another.
26772         * config/arm/parsecpu.awk (optalias): New parser token.
26773         (gen_comm_data): Mark non-alias options as such.  Emit entries
26774         for extension aliases.
26775         * config/arm/arm-cpus.in (armv5e): Make vfpv2 an alias.
26776         (armv5te, armv5tej, armv6, armv6j, armv6k, armv6z): Likewise.
26777         (armv6kz, armv6zk, armv6t2): Likewise.
26778         (armv7): Make vfpv3-d16 an alias.
26779         (armv7-a): Make vfpv3-d16, neon and neon-vfpv3 aliases.  Sort in
26780         canonical order.
26781         (armv7ve): Make vfpv4-d16, neon-vfpv3 and neon-vfpv4 aliases.
26782         Sort in canonical order.
26783         (armv8-a): Sort in canonical order.
26784         (armv8.1-a, armv8.2-a):  Likewise.
26785         (generic-armv7-a): Make neon and neon-vfpv3 aliases.  Sort in
26786         canonical order.
26787         (cortex-a9): Sort in canonical order.
26788         * config/arm/arm.c (selftests.h): Include it.
26789         (arm_test_cpu_arch_data): New function.
26790         (arm_run_self_tests): New function.
26791         (TARGET_RUN_TARGET_SELFTESTS): Redefine.
26792         (targetm): Move declaration to the end of the file.
26793         * arm-cpu-cdata.h: Regenerated.
26794
26795 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26796
26797         * config/arm/arm.h (TARGET_MODE_SPECS): Add additional parameter to
26798         call to target_mode_check describing the type of option passed.
26799         * common/config/arm/arm-common.c (arm_arch_core_flag): Delete.
26800         (arm_target_thumb_only): Use arm_parse_arch_option_name or
26801         arm_parse_cpu_option_name to match parameters against list of
26802         available targets.
26803         * config/arm/parsecpu.awk (gen_comm_data): Don't generate
26804         arm_arch_core_flags data structure.
26805         * config/arm/arm-cpu_cdata.h: Regenerated.
26806
26807 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26808
26809         * common/config/arm/arm-common.c (arm_initialize_isa): Moved here from
26810         config/arm/arm.c.
26811         (arm_print_hint_for_cpu_option): Likewise.
26812         (arm_print_hint_for_arch_option): Likewise.
26813         (arm_parse_cpu_option_name): Likewise.
26814         (arm_parse_arch_option_name): Likewise.
26815         * config/arm/arm.c (arm_identify_fpu_from_isa): Use the computed number
26816         of entries in the all_fpus list.
26817         * config/arm/arm-protos.h (all_architectures, all_cores): Declare.
26818         (arm_parse_cpu_option_name): Declare.
26819         (arm_parse_arch_option_name): Declare.
26820         (arm_parse_option_features): Declare.
26821         (arm_intialize_isa): Declare.
26822         * config/arm/parsecpu.awk (gen_data): Move CPU and architecture
26823         data tables to ...
26824         (gen_comm_data): ... here.  Make definitions non-static.
26825         * config/arm/arm-cpu-data.h: Regenerated.
26826         * config/arm/arm-cpu-cdata.h: Regenerated.
26827
26828 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26829
26830         * config/arm/arm-protos.h (arm_build_target): Remove arch_core.
26831         (cpu_arch_extension): New structure.
26832         (cpu_arch_option, arch_option, cpu_option): New structures.
26833         * config/arm/parsecpu.awk (gen_headers): Build an enumeration of
26834         architecture types.
26835         (gen_data): Generate new format data tables.
26836         * config/arm/arm.c (cpu_tune): New structure.
26837         (cpu_option, processors): Delete.
26838         (arm_print_hint_for_core_or_arch): Delete.  Replace with ...
26839         (arm_print_hint_for_cpu_option): ... this and ...
26840         (arm_print_hint_for_arch_option): ... this.
26841         (arm_parse_arch_cpu_name): Delete.  Replace with ...
26842         (arm_parse_cpu_option_name): ... this and ...
26843         (arm_parse_arch_option_name): ... this.
26844         (arm_unrecognized_feature): Change type of target parameter to
26845         cpu_arch_option.
26846         (arm_parse_arch_cpu_features): Delete.  Replace with ...
26847         (arm_parse_option_features): ... this.
26848         (arm_configure_build_target): Rework to use new configuration data
26849         tables.
26850         (arm_print_tune_info): Rework for new configuration data tables.
26851         * config/arm/arm-cpu-data.h: Regenerated.
26852         * config/arm/arm-cpu.h: Regenerated.
26853
26854 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26855
26856         * Makefile.in (OBJS): Move sbitmap.o from here ...
26857         (OBJS-libcommon): ... to here.
26858
26859 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26860
26861         * config/arm/arm-isa.h (ISA_ALL_FPU_INTERNAL): Renamed from ISA_ALL_FPU.
26862         (ISA_ALL_CRYPTO): New macro.
26863         (ISA_ALL_SIMD): New macro
26864         (ISA_ALL_FP): New macro.
26865         * config/arm/arm.c (fpu_bitlist): Update initializer.
26866         * config/arm/arm-cpus.in: Use new ISA_ALL macros to disable crypto,
26867         simd or fp.
26868         (arm9e): Add fpu.  Add option for nofp
26869         (arm946e-s, arm966e-s, arm968e-s, arm10e, arm1020e, arm1022e): Likewise.
26870         (arm926ej-s, arm1026ej-s): Likewise.
26871         (generic-armv7-a): Add fpu.  Add options for simd, vfpv3, vfpv3-d16,
26872         vfpv3-fp16, vfpv3-d16-fp16, vfpv4, vfpv4-d16, neon, neon-vfp3,
26873         neon-fp16, neon-vfpv4, nofp and nosimd.
26874         (cortex-a5, cortex-a7): Add fpu.  Add options for nosimd and nofp.
26875         (cortex-a8): Add fpu.  Add option for nofp.
26876         (cortex-a9): Add fpu.  Add options for nosimd and nofp.
26877         (cortex-a12, cortex-a15, cortex-a17): Add fpu.  Add option for nofp.
26878         (cortex-r4f): Add fpu.
26879         (cortex-r5): Add fpu.  Add options for nofp.dp and nofp.
26880         (cortex-r7): Use idiv option from architecture.  Add fpu.  Add option
26881         for nofp.
26882         (cortex-r8): Likewise.
26883         (cortex-m4): Add fpu.  Add option for nofp.
26884         (cortex-a15.cortex-a7): Add fpu.  Add option for nofp.
26885         (cortex-a17.cortex-a7): Likewise.
26886         (cortex-a32): Add fpu.  Add options for crypto and nofp.
26887         (cortex-a35, cortex-a53): Likewise.
26888         (cortex-a57): Add fpu.  Add option for crypto.
26889         (cortex-a72, cortex-a73): Likewise.
26890         (exynos-m1): Likewise.
26891         (cortex-a57.cortex-a53, cortex-a72.cortex-a53): Likewise.
26892         (cortex-a73.cortex-a35, cortex-a73.cortex-a53): Likewise.
26893         (cortex-m33): Add fpu.  Add option for nofp.
26894         * config/arm/arm-cpu-cdata.h: Regenerated
26895         * config/arm/arm-cpu-data.h: Regenerated.
26896
26897 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26898
26899         * arm-cpus.in (armv5e): Add options fp, vfpv2 and nofp.
26900         (armv5te, armv5tej): Likewise.
26901         (armv6, armv6j, armv6k, armv6z, armv6kz, armv6zk, armv6t2): Likewise.
26902         (armv7): Add options fp and vfpv3-d16.
26903         (armv7-a): Add options fp, simd, vfpv3, vfpv3-d16, vfpv3-d16-fp16,
26904         vfpv3-fp16, vfpv4, vfpv4-d16, neon, neon-vfpv3, neon-fp16, neon-vfpv4,
26905         nofp and nosimd.
26906         (armv7ve): Likewise.
26907         (armv7-r): Add options fp, fp.sp, idiv, nofp and noidiv.
26908         (armv7e-m): Add options fp, fpv5, fp.dp and nofp.
26909         (armv8-a): Add nocrypto option.
26910         (armv8.1-a, armv8.2-a): Likewise.
26911         (armv8-m.main): add options fp, fp.dp and nofp.
26912
26913 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26914
26915         * config/arm/arm-cpus.in (armv8-a): Add options crc, simd crypto and
26916         nofp.
26917         (armv8-a+crc): Delete.
26918         (armv8.1-a): Add options simd, crypto and nofp.
26919         (armv8.2-a): Add options fp16, simd, crypto and nofp.
26920         (armv8.2-a+fp16): Delete.
26921         (armv8-m.main): Add option dsp.
26922         (armv8-m.main+dsp): Delete.
26923         (cortex-a8): Add fpu.  Add nofp option.
26924         (cortex-a9): Add fpu.  Add nofp and nosimd options.
26925         * config/arm/parsecpu.awk (gen_data): Generate option tables and
26926         link to main cpu and architecture data structures.
26927         (gen_comm_data): Only put isa attributes from the main architecture
26928         in common tables.
26929         (option): New statement for architecture and CPU entries.
26930         * arm.c (struct cpu_option): New structure.
26931         (struct processors): Add entry for options.
26932         (arm_unrecognized_feature): New function.
26933         (arm_parse_arch_cpu_name): Ignore any characters after the first
26934         '+' character.
26935         (arm_parse_arch_cpu_feature): New function.
26936         (arm_configure_build_target): Separate out any CPU and architecture
26937         features and parse separately.  Don't error out if -mfpu=auto is
26938         used with only an architecture string.
26939         (arm_print_asm_arch_directives): New function.
26940         (arm_file_start): Call it.
26941         * config/arm/arm-cpu-cdata.h: Regenerated.
26942         * config/arm/arm-cpu-data.h: Likewise.
26943         * config/arm/arm-tables.opt: Likewise.
26944
26945 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26946
26947         * config/arm/elf.h (ASM_SPEC): Only pass -mfpu through to the
26948         assembler when it is not -mfpu=auto.
26949
26950 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26951
26952         * config/arm/arm.h (BIG_LITTLE_SPEC): Delete macro.
26953         (ASM_REWRITE_SPEC_FUNCTIONS): New macro.
26954         (BIG_LITTLE_CPU_SPEC_FUNCTIONS): Delete macro.
26955         (ASM_CPU_SPEC): Rewrite.
26956         (MCPU_MTUNE_NATIVE_FUNCTIONS): New macro.
26957         (EXTRA_SPEC_FUNCTIONS): Move outside of ifdef.  Use
26958         MCPU_MTUNE_NATIVE_FUNCTIONS and ASM_REWRITE_SPEC_FUNCTIONS.  Remove
26959         reference to BIG_LITTLE_CPU_SPEC_FUNCTIONS.
26960         * common/config/arm/arm-common.c (arm_rewrite_selected_cpu): Ensure
26961         copied string is NUL-terminated.  Also strip any characters prefixed
26962         by '+'.
26963         (arm_rewrite_selected_arch): New function.
26964         (arm_rewrite_march): New function.
26965
26966 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
26967
26968         * config/arm/arm.opt (x_arm_arch_string): New TargetSave option.
26969         (x_arm_cpu_string, x_arm_tune_string): Likewise.
26970         (march, mcpu, mtune): Convert to string-based options.
26971         * config/arm/arm.c (arm_print_hint_for_core_or_arch): New function.
26972         (arm_parse_arch_cpu_name): New function.
26973         (arm_configure_build_target): Use arm_parse_arch_cpu_name to
26974         identify selected architecture or CPU.
26975         (arm_option_save): New function.
26976         (TARGET_OPTION_SAVE): Redefine.
26977         (arm_option_restore): Restore string options.
26978         (arm_option_print): Print string options.
26979
26980 2017-06-16  Martin Sebor  <msebor@redhat.com>
26981
26982         PR tree-optimization/80933
26983         PR tree-optimization/80934
26984         * builtins.c (fold_builtin_3): Do not handle bcmp here.
26985         * gimple-fold.c (gimple_fold_builtin_bcmp): New function.
26986         (gimple_fold_builtin_bcopy, gimple_fold_builtin_bzero): Likewise.
26987         (gimple_fold_builtin): Call them.
26988
26989 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
26990
26991         * gimple-ssa-isolate-paths.c (isolate_path): Set edge leading to path
26992         as unlikely; update profile.
26993
26994 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
26995
26996         * predict.c (force_edge_cold): Handle declaring edges impossible
26997         more aggresively.
26998
26999 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
27000
27001         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update
27002         profile.
27003         (try_unroll_loop_completely): Fix reporting.
27004
27005 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
27006
27007         * tree-ssa-tail-merge.c (replace_block_by): Fix profile updating.
27008
27009 2017-06-16  James Greenhalgh  <james.greenhalgh@arm.com>
27010
27011         PR target/71778
27012         * config/arm/arm-builtins.c (arm_expand_builtin_args): Return TARGET
27013         if given a non-constant argument for an intrinsic which requires a
27014         constant.
27015
27016 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
27017
27018         * profile.c (compare_freqs): New function.
27019         (branch_prob): Sort edge list.
27020         (find_spanning_tree): Assume that the list is priority sorted.
27021
27022 2017-06-16  Richard Biener  <rguenther@suse.de>
27023
27024         PR tree-optimization/81090
27025         * passes.def (pass_record_bounds): Remove.
27026         * tree-pass.h (make_pass_record_bounds): Likewise.
27027         * tree-ssa-loop.c (pass_data_record_bounds, pass_record_bounds,
27028         make_pass_record_bounds): Likewise.
27029         * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables): Do
27030         not free niter estimates at the beginning but at the end.
27031         * tree-scalar-evolution.c (scev_finalize): Free niter estimates.
27032
27033 2017-06-16  Richard Biener  <rguenther@suse.de>
27034
27035         * tree-switch-conversion.c (emit_case_bit_tests): Adjust
27036         initializer to workaround ICE in host GCC 4.8.
27037
27038 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
27039
27040         * ipa-inline-transform.c (update_noncloned_frequencies): Update also
27041         counts.
27042         (clone_inlined_nodes): Update.
27043
27044 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
27045
27046         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune): Update
27047         prefetch settings, and enable prefetching by default at -O3.
27048
27049 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
27050
27051         * config/aarch64/aarch64.c (aarch64_override_options_internal):
27052         Set flag_prefetch_loop_arrays according to tuning data.
27053
27054 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
27055
27056         * config/aarch64/aarch64-protos.h (struct cpu_prefetch_tune):
27057         New tune structure.
27058         (struct tune_params): Use cpu_prefetch_tune instead of cache_line_size.
27059         [Unrelated to main purpose of the patch] Place the pointer field last
27060         to enable type checking errors when tune structure are wrongly merged.
27061         * config/aarch64/aarch64.c (generic_prefetch_tune,)
27062         (exynosm1_prefetch_tune, qdf24xx_prefetch_tune,)
27063         (thunderx2t99_prefetch_tune): New tune constants.
27064         (tune_params *_tunings): Update all tunings (no functional change).
27065         (aarch64_override_options_internal): Set PARAM_SIMULTANEOUS_PREFETCHES,
27066         PARAM_L1_CACHE_SIZE, PARAM_L1_CACHE_LINE_SIZE, and PARAM_L2_CACHE_SIZE
27067         from tunings structures.
27068
27069 2017-06-16  Jakub Jelinek  <jakub@redhat.com>
27070
27071         PR sanitizer/81094
27072         * ubsan.c (instrument_null): Add T argument, use it instead
27073         of computing it based on IS_LHS.
27074         (instrument_object_size): Likewise.
27075         (pass_ubsan::execute): Adjust instrument_null and
27076         instrument_object_size callers to pass gimple_get_lhs or
27077         gimple_assign_rhs1 result to it.  Use instrument_null instead of
27078         calling get_base_address and instrument_mem_ref.  Handle
27079         aggregate call arguments for object-size sanitization.
27080
27081 2017-06-16  Yury Gribov  <tetra2005@gmail.com>
27082
27083         PR tree-optimization/81089
27084         * tree-vrp.c (is_masked_range_test): Validate operands of
27085         subexpression.
27086
27087 2017-06-15  Martin Sebor  <msebor@redhat.com>
27088
27089         PR c++/80560
27090         * dumpfile.c (dump_register): Avoid calling memset to initialize
27091         a class with a default ctor.
27092         * gcc.c (struct compiler): Remove const qualification.
27093         * genattrtab.c (gen_insn_reserv): Replace memset with initialization.
27094         * hash-table.h: Ditto.
27095         * ipa-cp.c (allocate_and_init_ipcp_value): Replace memset with
27096           assignment.
27097         * ipa-prop.c (ipa_free_edge_args_substructures): Ditto.
27098         * omp-low.c (lower_omp_ordered_clauses): Replace memset with
27099         default ctor.
27100         * params.h (struct param_info): Make struct members non-const.
27101         * tree-switch-conversion.c (emit_case_bit_tests): Replace memset
27102         with default initialization.
27103         * vec.h (vec_copy_construct, vec_default_construct): New helper
27104         functions.
27105         (vec<T>::copy, vec<T>::splice, vec<T>::reserve): Replace memcpy
27106         with vec_copy_construct.
27107         (vect<T>::quick_grow_cleared): Replace memset with default ctor.
27108         (vect<T>::vec_safe_grow_cleared, vec_safe_grow_cleared): Same.
27109         * doc/invoke.texi (-Wclass-memaccess): Document.
27110
27111 2017-06-15  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
27112
27113         * emit-rtl.h (is_leaf): Update comment about local
27114         register allocator.
27115
27116 2017-06-15  Jozef Lawrynowicz   <jozef.l@somniumtech.com>
27117
27118         PR target/78818
27119         * config/msp430/msp430.c (msp430_data_attr): Check that it's possible
27120         for a variable to have a section before checking if the section has a
27121         name.
27122         Set section to.persistent if persistent attribute is set.
27123         Warn if .persistent attribute is used on an automatic variable.
27124
27125 2017-06-15  Eric Botcazou  <ebotcazou@adacore.com>
27126
27127         PR rtl-optimization/80474
27128         * reorg.c (update_block): Do not ignore instructions in a delay slot.
27129
27130 2017-06-15  Segher Boessenkool  <segher@kernel.crashing.org>
27131
27132         * config/rs6000/rs6000.md (add<mode>3): Use reg_or_subregno instead
27133         of REGNO.
27134
27135 2017-06-14  Maciej W. Rozycki  <macro@imgtec.com>
27136
27137         * config/mips/mips.md (MIPS16_T_REGNUM): Remove constant.
27138         (casesi): Emit bounds checking as RTL.
27139         (casesi_internal_mips16_<mode>): Remove bounds checking.
27140
27141 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
27142
27143         * config/xtensa/xtensa.c (xtensa_option_override): Append
27144         MASK_CONST16 to target_flags in the absence of TARGET_L32R.
27145         (hwloop_optimize, hwloop_fail, hwloop_pattern_reg,
27146          xtensa_doloop_hooks): Define unconditionally.
27147         (xtensa_reorg_loops): Only call reorg_loops in the presence of
27148         TARGET_LOOPS.
27149         * config/xtensa/xtensa.h (TARGET_L32R): New definition.
27150         (TARGET_DEFAULT): Remove XCHAL_HAVE_L32R condition and account
27151         for it in xtensa_option_override.
27152         (HARD_FRAME_POINTER_IS_FRAME_POINTER,
27153          HARD_FRAME_POINTER_IS_ARG_POINTER): New definitions.
27154
27155 2017-06-14  Boris Kolpackov  <boris@codesynthesis.com>
27156
27157         * doc/cppopts.texi: Document '-' special value to -MF.
27158
27159 2017-06-14  Wilco Dijkstra  <wdijkstr@arm.com>
27160
27161         * config/arm/cortex-a53.md (cortex_a53_fpalu) Adjust latency.
27162         (cortex_a53_fconst): Likewise.
27163         (cortex_a53_fpmul): Likewise.
27164         (cortex_a53_f_load_64): Likewise.
27165         (cortex_a53_f_load_many): Likewise.
27166         (cortex_a53_advsimd_alu): Likewise.
27167         (cortex_a53_advsimd_alu_q): Likewise.
27168         (cortex_a53_advsimd_mul): Likewise.
27169         (cortex_a53_advsimd_mul_q): Likewise.
27170         (fpmac bypass): Add new bypass for fpmac-fpmac case.
27171         Add missing fmul, r2f_cvt and fconst cases.
27172
27173 2017-06-14  Richard Biener  <rguenther@suse.de>
27174
27175         PR middle-end/81088
27176         * fold-const.c (split_tree): Drop TREE_OVERFLOW flag from
27177         literal constants.
27178         (fold_binary_loc): When associating do not treat pre-existing
27179         TREE_OVERFLOW on literal constants as a reason to allow
27180         TREE_OVERFLOW on associated literal constants.
27181
27182 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
27183
27184         * config/sparc/sparc.h (MASK_ISA): Add MASK_LEON and MASK_LEON3.
27185         (MASK_FEATURES): New macro.
27186         * config/sparc/sparc.c (sparc_option_override): Remove the special
27187         handling of -mfpu and generalize it to all MASK_FEATURES switches.
27188
27189 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
27190
27191         * simplify-rtx.c (simplify_binary_operation_1) <UDIV>: Do not simplify
27192         a division of 0 if non-call exceptions are enabled.
27193
27194 2017-06-14  Andrew Pinski  <apinski@cavium.com>
27195             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
27196
27197         PR target/71663
27198         * config/aarch64/aarch64.c (aarch64_expand_vector_init):
27199         Improve vector initialization code gen for only variable case.
27200
27201 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
27202
27203         * config/sparc/driver-sparc.c (cpu_names): Add SPARC-T5 entry.
27204
27205 2017-06-14  Richard Biener  <rguenther@suse.de>
27206
27207         PR tree-optimization/81083
27208         * tree-ssa-sccvn.c (vn_reference_lookup_3): Do not use abnormals
27209         as values.
27210
27211 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
27212
27213         * config/rs6000/rs6000.c: Update all comments that mentioned SPE.
27214         (rs6000_expand_builtin): Remove RS6000_BTC_EVSEL.
27215         * config/rs6000/rs6000.h (RS6000_BTC_EVSEL): Delete.
27216         * config/rs6000/vxworks.h (VXCPU_FOR_8548): Delete.  Adjust former use.
27217         * config/rs6000/vxworksae.h (VXCPU_FOR_8548): Delete.
27218         * config/rs6000/vxworksmils.h (VXCPU_FOR_8548): Delete.
27219
27220 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
27221
27222         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete VECTOR_SPE.
27223         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete VECTOR_SPE.
27224
27225 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
27226
27227         * config/rs6000/rs6000.h (FIXED_SCRATCH): Delete.
27228
27229 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
27230
27231         * config/rs6000/t-rtems: Don't handle SPE.
27232
27233 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
27234
27235         * config/rs6000/t-linux: Don't handle SPE.
27236
27237 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
27238
27239         * config/rs6000/eabispe.h: Delete file.
27240
27241 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
27242
27243         * config/rs6000/t-spe: Delete file.
27244
27245 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
27246
27247         * config/rs6000/rs6000.c (SPE_CONST_OFFSET_OK): Delete.
27248         (rs6000_legitimate_offset_address_p): Return false for anything in
27249         V2SImode or V2SFmode.
27250
27251 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
27252
27253         * config/rs6000/rs6000-modes.def: Remove all 8-byte vector modes
27254         except V2SF and V2SI.  Rearrange the vector modes, and add comments.
27255         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove V8QImode
27256         and V4HImode.
27257         (reg_offset_addressing_ok_p): Remove V4HImode and V1DImode.
27258         (rs6000_legitimate_offset_address_p): Ditto.
27259         (rs6000_emit_move): Ditto.
27260         (rs6000_init_builtins): Remove V4HI_type_node.
27261
27262 2017-06-13  Martin Liska  <mliska@suse.cz>
27263
27264         PR sanitize/78204
27265         * asan.c (asan_sanitize_stack_p): Use sanitize_flags_p.
27266         (gate_asan): Likewise.
27267         * asan.h (asan_no_sanitize_address_p): Remove the function.
27268         (sanitize_flags_p): New function.
27269         * builtins.def: Fix coding style.
27270         * common.opt: Use renamed enum value.
27271         * convert.c (convert_to_integer_1): Use sanitize_flags_p.
27272         * doc/extend.texi: Document no_sanitize attribute.
27273         * flag-types.h (enum sanitize_code): Rename SANITIZE_NONDEFAULT
27274         to SANITIZE_UNDEFINED_NONDEFAULT.
27275         * gcc.c (sanitize_spec_function): Use the renamed enum value.
27276         * gimple-fold.c (optimize_atomic_compare_exchange_p):
27277         Use sanitize_flags_p.
27278         * gimplify.c (gimplify_function_tree): Likewise.
27279         * ipa-inline.c (sanitize_attrs_match_for_inline_p): Likewise.
27280         * opts.c (parse_no_sanitize_attribute): New function.
27281         (common_handle_option): Use renamed enum value.
27282         * opts.h (parse_no_sanitize_attribute): Declare.
27283         * tree.c (sanitize_flags_p): New function.
27284         * tree.h: Declared here.
27285         * tsan.c: Use sanitize_flags_p.
27286         * ubsan.c (ubsan_expand_null_ifn): Likewise.
27287         (instrument_mem_ref): Likewise.
27288         (instrument_bool_enum_load): Likewise.
27289         (do_ubsan_in_current_function): Remove the function.
27290         (pass_ubsan::execute): Use sanitize_flags_p.
27291         * ubsan.h: Remove do_ubsan_in_current_function
27292         * tree-cfg.c (print_no_sanitize_attr_value): New function.
27293         (dump_function_to_file): Use it here.
27294
27295 2017-06-13  Martin Jambor  <mjambor@suse.cz>
27296
27297         PR tree-optimization/80803
27298         PR tree-optimization/81063
27299         * tree-sra.c (subtree_mark_written_and_enqueue): Move up in the file.
27300         (propagate_subaccesses_across_link): Enqueue subtree whenever
27301         necessary instead of relying on the caller.
27302
27303 2017-06-13  Martin Jambor  <mjambor@suse.cz>
27304
27305         * tree-sra.c (add_access_to_work_queue): Only enqueue accesses
27306         that have a first_link.
27307         (sort_and_splice_var_accesses): Do not check first_link before
27308         enquing.
27309         (subtree_mark_written_and_enqueue): Likewise.
27310         (propagate_all_subaccesses): Likewise and do not stop at first
27311         parent with a first_link.
27312
27313 2017-06-13  Martin Jambor  <mjambor@suse.cz>
27314
27315         * tree-sra.c (dump_access_tree_1): Fix accidental dumping to stderr
27316         instead of f.
27317
27318 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
27319
27320         * match.pd: New pattern.
27321
27322 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
27323
27324         * tree-vrp.c (is_masked_range_test): New function.
27325         (register_edge_assert_for): Determine ranges for
27326         some bit tests.
27327
27328 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
27329
27330         PR tree-optimization/67328
27331         * fold-const.c (maskable_range_p): New function.
27332         (build_range_check): Generate bittests if possible.
27333
27334 2017-06-13  Martin Liska  <mliska@suse.cz>
27335
27336         * gimple-pretty-print.c (dump_probability): Add new argument.
27337         (dump_edge_probability): Dump both probability and count.
27338         (dump_gimple_label): Likewise.
27339         (dump_gimple_bb_header): Likewise.
27340
27341 2017-06-13  Georg-Johann Lay  <avr@gjlay.de>
27342
27343         PR target/81072
27344         * config/avr/avr-devices.c: Fix indentation.
27345         * config/avr/gen-avr-mmcu-specs.c: Dito.
27346
27347 2017-06-13  Richard Biener  <rguenther@suse.de>
27348
27349         * tree-vect-loop.c (vect_model_reduction_cost): Do not fail,
27350         instead get vector type from stmt_info.
27351         (vectorizable_reduction): Adjust.  Remove dead code.
27352
27353 2017-06-13  Richard Biener  <rguenther@suse.de>
27354
27355         PR middle-end/81065
27356         * fold-const.c (extract_muldiv_1): Remove bogus distribution
27357         case of C * (x * C2 + C3).
27358         (fold_addr_of_array_ref_difference): Properly fold index difference.
27359
27360 2017-06-12  David S. Miller  <davem@davemloft.net>
27361
27362         PR target/80968
27363         * config/sparc/sparc.md (return expander): Emit frame blockage if
27364         function uses alloca.
27365
27366 2017-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
27367
27368         * combine.c (make_field_assignment): Check len rather than the mode
27369         precision when calling force_to_mode.
27370
27371 2017-06-12  Georg-Johann Lay  <avr@gjlay.de>
27372
27373         Support multilibs and devices that see flash in RAM address range.
27374
27375         PR target/81072
27376         * config/avr/avr-arch.h (avr_arch_id) <ARCH_AVRXMEGA3>: New enum.
27377         (avr_mcu_t) <flash_pm_offset>: New field.
27378         (avr_device_specific_features) <AVR_ISA_RCALL>: New enum.
27379         * config/avr/avr.h (AVR_SHORT_CALLS): New define.
27380         (AVR_HAVE_JMP_CALL): Don't set if AVR_SHORT_CALLS.
27381         (AVR_TINY_PM_OFFSET): Remove macro.
27382         * config/avr/avr.opt (-mshort-calls): New option.
27383         * config/avr/gen-avr-mmcu-specs.c (print_mcu)
27384         [*self_spec]: Add / remove -mshort-calls depending on AVR_ISA_RCALL.
27385         * config/avr/avr-c.c (avr_cpu_cpp_builtins)
27386         <__AVR_SHORT_CALLS__>: Built-in define if AVR_SHORT_CALLS.
27387         <__AVR_HAVE_JMP_CALL__>: Use AVR_HAVE_JMP_CALL as condition
27388         instead of avr_arch->have_jmp_call.
27389         <__AVR_PM_BASE_ADDRESS__>: Built-in define if avr_arch->flash_pm_offset.
27390         [AVR_TINY] <__AVR_TINY_PM_BASE_ADDRESS__>: Use
27391         avr_arch->flash_pm_offset to define.
27392         * config/avr/avr-devices.c (avr_arch_types): Add initializers for
27393         new field flash_pm_offset.  Add entry for avrxmega3.
27394         (avr_texinfo): Add entry for avrxmega3.
27395         * config/avr/avr-mcus.def: Add entries for: avrxmega3,
27396         attiny212, attiny214,
27397         attiny412, attiny414, attiny416, attiny417,
27398         attiny814, attiny816, attiny817,
27399         attiny1614, attiny1616, attiny1617,
27400         attiny3214, attiny3216, attiny3217.
27401         * config/avr/avr.c (avr_assemble_integer)[AVR_TINY]: Use
27402         avr_arch->flash_pm_offset instead of AVR_TINY_PM_OFFSET.
27403         (avr_print_operand_address) [AVR_TINY]: Same.
27404         (avr_asm_init_sections) <readonly_data_section>: Only patch
27405         callback if avr_arch->flash_pm_offset = 0.
27406         (avr_asm_named_section) <avr_need_copy_data_p>: Skip setting it
27407         for rodata if avr_arch->flash_pm_offset != 0.
27408         (avr_encode_section_info) [AVR_TINY]: Adjust comment.
27409         * config/avr/genmultilib.awk (dir_rcall, opt_rcall): New vars.
27410         (opts) [AVR_ISA_RCALL]: Append opt_rcall.
27411         (m_options): Append opt_rcall.
27412         (m_dirnames): Append dir_rcall.
27413         * config/avr/t-multilib: Regenerate.
27414
27415         * configure.ac [target=avr]: Check whether avrxmega3 default
27416         linker description file works as needed.
27417         * configure: Regenerate.
27418         * doc/avr-mmcu.texi: Regenerate.
27419         * doc/invoke.texi (AVR Options) <-mshort-calls>: Document it.
27420         <__AVR_ARCH__>: Document avrxmega3 and 103.
27421         <__AVR_HAVE_JMP_CALL__>: Adjust documentation.
27422         <__AVR_SHORT_CALLS__>: Document it.
27423         <__AVR_PM_BASE_ADDRESS__>: Document it.
27424         * doc/extend.texi (AVR Options) <-mshort-calls>: Document it.
27425         (AVR Variable Attributes) <progmem>: Document this is
27426         not needed for avrxmega3.
27427         (AVR Named Address Spaces) <__flash>: Dito.
27428
27429 2017-06-12  Jan Hubicka  <hubicka@ucw.cz>
27430
27431         * cgraph.c (cgraph_node::dump): Complain about profile insanities.
27432
27433 2017-06-12  Doug Rupp  <rupp@adacore.com>
27434
27435         * config.gcc (*-*-vxworks*): Set use_gcc_stdint to "provide".
27436         Append vxworks-stdint.h to the tm_file list.
27437         * config/vxworks-stdint.h: New file.
27438
27439 2017-06-12  Martin Liska  <mliska@suse.cz>
27440
27441         PR tree-optimization/81041
27442         * tree-profile.c (gimple_gen_ic_func_profiler):
27443         Create an extra BB in profile-generate
27444         (gimple_gen_time_profiler): Likewise.
27445
27446 2017-06-12  Jakub Jelinek  <jakub@redhat.com>
27447
27448         PR tree-optimization/81003
27449         * tree-ssa-reassoc.c (force_into_ssa_name): New function.
27450         (update_range_test): Use it instead of force_gimple_operand_gsi.
27451
27452 2017-06-12  Richard Biener  <rguenther@suse.de>
27453
27454         PR tree-optimization/81053
27455         * tree-vect-loop.c (vect_is_simple_reduction): Handle PHI
27456         with backedge value not defined in loop.  Simplify def stmt
27457         compute.
27458
27459 2017-06-11  Tom de Vries  <tom@codesourcery.com>
27460
27461         PR target/79939
27462         * config/nvptx/nvptx.c (nvptx_cannot_force_const_mem): New function.
27463         Return true.
27464         (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to
27465         nvptx_cannot_force_const_mem.
27466
27467 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
27468
27469         * opts.c (finish_options): Move test for flag_split_stack after
27470         it has been initialized.
27471
27472 2017-06-11  Jason Merrill  <jason@redhat.com>
27473
27474         * tree.h (id_equal): New.
27475         * dwarf2out.c, hsa-gen.c, ipa-devirt.c, omp-expand.c,
27476         omp-simd-clone.c, read-rtl-function.c, tree-chkp.c, tree.c: Use it
27477         instead of strcmp of IDENTIFIER_POINTER.
27478
27479 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
27480
27481         * ipa-inline-transform.c: Include function.h, cfg.h and basic-block.h
27482         (mark_all_inlined_calls_cdtor): Fix formating.
27483         (inline_transform): Rescale profile before inlining.
27484
27485 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
27486
27487         * cgraph.h (cgraph_edge::clone): Update prototype.
27488         * cgraphclones.c (cgraph_edge::clone): Update profile scaling.
27489         (cgraph_node::create_clone): Update.
27490         (cgraph_node::create_version_clone): Update.
27491         * tree-inline.c (copy_bb): Update.
27492         (expand_call_inline): Update.
27493
27494 2017-06-10  Segher Boessenkool  <segher@kernel.crashing.org>
27495
27496         * config/rs6000/rs6000.c (emit_vrsave_prologue): New function,
27497         factored out from ...
27498         (rs6000_emit_prologue): ... here.
27499
27500 2017-06-10  Segher Boessenkool  <segher@kernel.crashing.org>
27501
27502         * config/rs6000/rs6000.c (emit_split_stack_prologue): New function,
27503         factored out from ...
27504         (rs6000_emit_prologue): ... here.
27505
27506 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
27507
27508         * predict.c (drop_profile): Also drop individual bb/edge and cgraph
27509         edge counts.
27510         (handle_missing_profiles): Fix computation of tp_first_run.
27511         (counts_to_freqs): Do not touch freqs when count is 0.
27512
27513 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
27514
27515         * cgraphbuild.c (cgraph_edge::rebuild_references): Do not touch
27516         profile.
27517
27518 2017-06-10  Tom de Vries  <tom@codesourcery.com>
27519
27520         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
27521         attributes): Document signal effective target.
27522
27523 2017-06-10  Tom de Vries  <tom@codesourcery.com>
27524
27525         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
27526         Document effective target stack_size.
27527
27528 2017-06-09  David Malcolm  <dmalcolm@redhat.com>
27529
27530         * diagnostic.c (diagnostic_report_diagnostic): Only add fixits
27531         to the edit_context if they can be auto-applied.
27532
27533 2017-06-9  Ian Lance Taylor  <iant@golang.org>
27534
27535         * opts.c (finish_options): If -fsplit-stack, disable implicit
27536         -forder-blocks-and-partition.
27537         * doc/invoke.texi (Optimize Options): Document that when using
27538         -fsplit-stack -forder-blocks-and-partition is not implicitly
27539         enabled.
27540
27541 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
27542
27543         * builtin-attrs.def (ATTR_NORETURN_NOTHROW_LEAF_COLD_LIST,
27544         ATTR_CONST_NORETURN_NOTHROW_LEAF_COLD_LIST,
27545         ATTR_TMPURE_NORETURN_NOTHROW_LEAF_COLD_LIST): New.
27546         * builtins.def (abort, trap, unreachable): Declare cold.
27547         * calls.c (flags_from_decl_or_type): Lookup ECF_COLD.
27548         * tree-core.h (ECF_COLD): New.
27549         * tree.c (set_call_expr_flags): Handle ECF_COLD.
27550         (build_common_builtin_nodes): Mark unreachable and abort as cold.
27551
27552 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
27553
27554         * predict.c (unlikely_executed_stmt_p): Cleanup.
27555
27556 2017-06-09  Richard Biener  <rguenther@suse.de>
27557
27558         * tree-ssa-loop-im.c (execute_sm): Do not force multi-threaded
27559         model if the ref is always written to.
27560
27561 2017-06-09  Tamar Christina  <tamar.christina@arm.com>
27562
27563         * config/aarch64/aarch64.md (lrint<GPF:mode><GPI:mode>2): New.
27564
27565 2017-06-09  Tamar Christina  <tamar.christina@arm.com>
27566
27567         * config/arm/arm.c (arm_rtx_costs_internal): Make sdiv more expensive
27568         than udiv.
27569
27570 2017-06-09  Tom de Vries  <tom@codesourcery.com>
27571
27572         PR target/80855
27573         * config/nvptx/nvptx.md (define_expand "mov<QHSDISDFM>"): Error out with
27574         "target cannot support label values" when encountering LABEL_REF.
27575
27576 2017-06-09  Martin Liska  <mliska@suse.cz>
27577
27578         * tree-profile.c (gimple_gen_ic_profiler): Update comment.
27579         (gimple_gen_ic_func_profiler): Emit direct comparison
27580         of __gcov_indirect_call_callee with NULL.
27581         (gimple_gen_time_profiler): Change probability from
27582         PROB_VERY_UNLIKELY to PROB_UNLIKELY.
27583
27584 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
27585
27586         * profile.c (edge_gcov_counts): Turn to pointer.
27587         (compute_branch_probabilities, compute_branch_probabilities): Update.
27588         (branch_prob): Do not clear edge_gcov_count.
27589         * profile.h (edge_gcov_counts): Turn to pointer.
27590         (edge_gcov_count): Update.
27591
27592 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
27593
27594         * gimple.h (gimple_check_failed): Mark cold.
27595
27596 2017-06-09  Richard Biener  <rguenther@suse.de>
27597
27598         PR tree-optimization/66623
27599         * tree-vect-loop.c (vect_is_simple_reduction): Cleanup,
27600         refactor check_reduction into two parts, properly computing
27601         whether we have to check reduction validity for outer loop
27602         vectorization.
27603
27604 2017-06-09  Richard Biener  <rguenther@suse.de>
27605
27606         PR tree-optimization/79483
27607         * graphite-scop-detection.c (order): New global.
27608         (get_order): Compute bb to order mapping that satisfies code
27609         generation constraints.
27610         (cmp_pbbs): New helper.
27611         (build_scops): Start domwalk at entry block, sort generated
27612         pbbs.
27613
27614 2017-06-09  Richard Biener  <rguenther@suse.de>
27615
27616         PR middle-end/81007
27617         * ipa-polymorphic-call.c
27618         (ipa_polymorphic_call_context::restrict_to_inner_class):
27619         Skip FIELD_DECLs with error_mark_node type.
27620         * passes.def (all_lowering_passes): Run pass_build_cgraph_edges
27621         last again.
27622
27623 2017-06-09  Martin Liska  <mliska@suse.cz>
27624
27625         * predict.c (struct branch_predictor): New struct.
27626         (test_prediction_value_range): New test.
27627         (predict_c_tests): New function.
27628         * selftest-run-tests.c (selftest::run_tests): Run the function.
27629         * selftest.h: Declare new tests.
27630
27631 2017-06-09  Segher Boessenkool  <segher@kernel.crashing.org>
27632
27633         PR target/80966
27634         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
27635         gen_add3_insn did not fail.
27636         * config/rs6000/rs6000.md (add<mode>3): If asked to add a constant to
27637         r0, construct that number in a temporary reg and add that reg to r0.
27638         If asked to put the result in r0 as well, fail.
27639
27640 2017-06-08  Will Schmidt  <will_schmidt@vnet.ibm.com>
27641
27642         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
27643         for early expansion of vec_eqv.
27644
27645 2017-06-08  Jakub Jelinek  <jakub@redhat.com>
27646
27647         PR middle-end/81005
27648         * ubsan.c (instrument_null): Avoid pointless code temporary.
27649         (pass_ubsan::execute): Instrument aggregate arguments of calls.
27650
27651 2017-06-08  Uros Bizjak  <ubizjak@gmail.com>
27652
27653         PR target/81015
27654         Revert:
27655         2016-12-14  Uros Bizjak  <ubizjak@gmail.com>
27656
27657         PR target/59874
27658         * config/i386/i386.md (*ctzhi2): New insn_and_split pattern.
27659         (*clzhi2): Ditto.
27660
27661 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
27662
27663         * predict.c (unlikely_executed_edge_p): Move ahead.
27664         (probably_never_executed_edge_p): Use it.
27665
27666 2017-06-08  Alexander Ivchenko  <alexander.ivchenko@intel.com>
27667
27668         PR middle-end/79988
27669         * tree-chkp.c (chkp_gimple_call_builtin_p): Remove
27670         gimple_call_builtin_p call.
27671
27672 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
27673
27674         * system.h (fancy_abort): Annotate by ATTRIBUTE_COLD.
27675         * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1,
27676         rtl_check_failed_type2, rtl_check_failed_code1,
27677         rtl_check_failed_code2, rtl_check_failed_code_mode,
27678         rtl_check_failed_block_symbol, cwi_check_failed_bounds,
27679         rtvec_check_failed_bounds, rtl_check_failed_flag,
27680         _fatal_insn_not_found, _fatal_insn): Likewise.
27681         * tree.h (tree_contains_struct_check_failed,
27682         tree_check_failed, tree_not_check_failed,
27683         tree_class_check_failed, tree_range_check_failed,
27684         tree_not_class_check_failed, tree_int_cst_elt_check_failed,
27685         tree_vec_elt_check_failed, phi_node_elt_check_failed,
27686         tree_operand_check_failed, omp_clause_check_failed,
27687         omp_clause_operand_check_failed, omp_clause_range_check_failed):
27688         Likewise.
27689
27690 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
27691
27692         * cgraph.c (cgraph_edge::maybe_hot_p): Do not check
27693         flag_branch_probabilities.
27694         * ipa-inline.c (edge_badness): Likewise.
27695         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
27696         * postreload-gcse.c (eliminate_partially_redundant_load): Likewise.
27697         * predict.c (maybe_hot_frequency_p): Likewise.
27698         (probably_never_executed): Likewise.
27699         * sched-ebb.c (schedule_ebbs): Likewise.
27700         * sched-rgn.c (find_single_block_region): Likewise.
27701         * tracer.c (tail_duplicate): Likewise.
27702
27703 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
27704
27705         * opts.c (finish_options): x_flag_reorder_blocks_and_partition no
27706         longer requires x_flag_profile_use.
27707
27708 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
27709
27710         * cfgrtl.c (cfg_layout_initialize): Check crtl->has_bb_partition
27711         instead of flag_reorder_blocks_and_partition.
27712         * dbxout.c (dbxout_function_end): Likewise.
27713         * dwarf2out.c (gen_subprogram_die): Likewise.
27714         * haifa-sched.c (sched_create_recovery_edges): Likewise.
27715         * hw-doloop.c (reorg_loops): Likewise.
27716         * varasm.c (assemble_start_function,
27717         assemble_end_function): Likewise.
27718         (decide_function_section): Do not check for
27719         flag_reorder_blocks_and_partition.
27720
27721 2017-06-08  Alexander Ivchenko  <alexander.ivchenko@intel.com>
27722
27723         * tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
27724         New function.
27725         (chkp_get_hard_register_fake_addr_expr): Ditto.
27726         (chkp_build_addr_expr): Add check for hard reg case.
27727         (chkp_parse_array_and_component_ref): Ditto.
27728         (chkp_find_bounds_1): Ditto.
27729         (chkp_process_stmt): Don't generate bounds store for
27730         hard reg case.
27731
27732 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
27733
27734         * predict.c (maybe_hot_bb_p): Do not check profile status.
27735         (maybe_hot_edge_p): Likewise.
27736         (probably_never_executed): Check for zero counts even if profile
27737         is not read.
27738         (unlikely_executed_edge_p): New function.
27739         (unlikely_executed_stmt_p): New function.
27740         (unlikely_executed_bb_p): New function.
27741         (set_even_probabilities): Use unlikely predicates.
27742         (combine_predictions_for_bb): Likewise.
27743         (predict_paths_for_bb): Likewise.
27744         (predict_paths_leading_to_edge): Likewise.
27745         (determine_unlikely_bbs): New function.
27746         (estimate_bb_frequencies): Use it.
27747         (compute_function_frequency): Use zero counts even if profile is
27748         not read.
27749         * profile-count.h: Fix typo.
27750
27751 2017-08-08  Julia Koval  <julia.koval@intel.com>
27752
27753         * config/i386/avx512bwintrin.h (_mm512_mask_cvtepi16_storeu_epi8,
27754         _mm512_mask_cvtsepi16_storeu_epi8,
27755         _mm512_mask_cvtusepi16_storeu_epi8): New intrinsics.
27756         * config/i386/avx512vlbwintrin.h (_mm256_mask_cvtepi16_storeu_epi8,
27757         _mm_mask_cvtsepi16_storeu_epi8, _mm256_mask_cvtsepi16_storeu_epi8,
27758         _mm_mask_cvtusepi16_storeu_epi8, _mm256_mask_cvtusepi16_storeu_epi8,
27759         _mm_mask_cvtepi16_storeu_epi8): New intrinsics.
27760         * config/i386/i386-builtin-types.def (PV8Q, V8QI): New pointer type.
27761         (VOID_FTYPE_PV32QI_V32HI_USI, VOID_FTYPE_PV8QI_V8HI_UQI,
27762         VOID_FTYPE_PV16QI_V16HI_UHI): New function types.
27763         * config/i386/i386-builtin.def (__builtin_ia32_pmovwb128mem_mask,
27764         __builtin_ia32_pmovwb256mem_mask, __builtin_ia32_pmovswb128mem_mask,
27765         __builtin_ia32_pmovswb256mem_mask, __builtin_ia32_pmovuswb128mem_mask,
27766         __builtin_ia32_pmovuswb256mem_mask,
27767         __builtin_ia32_pmovuswb512mem_mask, __builtin_ia32_pmovswb512mem_mask)
27768         __builtin_ia32_pmovwb512mem_mask): New builtins.
27769
27770 2017-08-08  Julia Koval  <julia.koval@intel.com>
27771
27772         PR target/73350,80862
27773         * config/i386/subst.md (round): Fix round pattern.
27774         * config/i386/i386.c (ix86_erase_embedded_rounding):
27775         Fix erasing rounding for the fixed pattern.
27776
27777 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
27778
27779         * cfgbuild.c (find_many_sub_basic_blocks): Fix thinko.
27780
27781 2017-06-08  Martin Liska  <mliska@suse.cz>
27782
27783         PR gcov-profile/80911
27784         * gcov.c (block_info::block_info): New constructor.
27785
27786 2017-06-07  Carl Love  <cel@us.ibm.com>
27787
27788         * config/rs6000/rs6000-c: The return type of the following
27789         built-in functions was implemented as int not long long.  Fix sign
27790         of return value for the unsigned version of vec_mulo and vec_mule.
27791         vector unsigned long long vec_bperm (vector unsigned long long,
27792                                              vector unsigned char)
27793         vector signed long long vec_mule (vector signed int,
27794                                           vector signed int)
27795         vector unsigned long long vec_mule (vector unsigned int,
27796                                             vector unsigned int)
27797         vector signed long long vec_mulo (vector signed int,
27798                                           vector signed int)
27799         vector unsigned long long vec_mulo (vector unsigned int,
27800                                             vector unsigned int)
27801         * doc/extend.texi: Fix the documentation for the built-in
27802         functions.
27803
27804 2017-06-07  Carl Love  <cel@us.ibm.com>
27805
27806         PR target/80982
27807         * config/rs6000/altivec.md (double<mode>2): Fix the implementation of
27808         for BE.
27809
27810 2017-06-07  Carl Love  <cel@us.ibm.com>
27811
27812         * config/rs6000/altivec.md: Fix argument swizzle in vec_doublel
27813         support, Generate       doublehv for signed int/float for BE case only.
27814
27815 2017-06-07  Alexander Monakov  <amonakov@ispras.ru>
27816
27817         * doc/invoke.texi (mcx16): Rewrite.
27818
27819 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
27820
27821         * config/rs6000/predicates.md (rs6000_nonimmediate_operand): Delete.
27822         * config/rs6000/rs6000.md (*movsi_internal1, movsi_from_sf,
27823         *mov<mode>_softfloat, and an anonymous splitter): Use
27824         nonimmediate_operand instead of rs6000_nonimmediate_operand.
27825
27826 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
27827
27828         * config/rs6000/darwin.h (REGISTER_NAMES): Delete the SPE_ACC and
27829         SPEFSCR registers.
27830         * config/rs6000/rs6000.c (rs6000_reg_names, alt_reg_names): Ditto.
27831         (enum rs6000_reg_type): Delete SPE_ACC_TYPE and SPEFSCR_REG_TYPE.
27832         (rs6000_debug_reg_global): Adjust.
27833         (rs6000_init_hard_regno_mode_ok): Adjust.
27834         (rs6000_dbx_register_number): Adjust.
27835         * config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Change to 115.
27836         (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
27837         Remove SPE_ACC and SPEFSCR.
27838         (REG_ALLOC_ORDER): Ditto.
27839         (FRAME_POINTER_REGNUM): Change to 111.
27840         (enum reg_class): Remove the SPE_ACC and SPEFSCR registers.
27841         (REG_CLASS_NAMES): Ditto.
27842         (REG_CLASS_CONTENTS): Delete the SPE_ACC and SPEFSCR registers.
27843         (REGISTER_NAMES): Ditto.
27844         (ADDITIONAL_REG_NAMES): Ditto.
27845         (rs6000_reg_names): Ditto.
27846         * config/rs6000/rs6000.md: Renumber some register number
27847         define_constants.
27848
27849 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
27850
27851         * config/rs6000/darwin.h (REGISTER_NAMES): Delete the SPE high
27852         registers.
27853         * config/rs6000/rs6000.c (rs6000_reg_names, alt_reg_names): Ditto.
27854         * config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Change from 149
27855         to 117.
27856         (DWARF_REG_TO_UNWIND_COLUMN): Do not define.
27857         (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
27858         Delete the SPE high registers.
27859         (REG_ALLOC_ORDER): Ditto.
27860         (enum reg_class): Remove SPE_HIGH_REGS.
27861         (REG_CLASS_NAMES): Ditto.
27862         (REG_CLASS_CONTENTS): Delete the SPE high registers.
27863         (REGISTER_NAMES): Ditto.
27864         (rs6000_reg_names): Ditto.
27865         * doc/tm.texi.in: Remove SPE as example.
27866         * doc/tm.texi: Regenerate.
27867
27868 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
27869
27870         * config/rs6000/8540.md (ppc8540_brinc): Delete.
27871         * config/rs6000/e500mc.md (e500mc_brinc): Delete.
27872         * config/rs6000/e500mc64.md (e500mc64_brinc): Delete.
27873         * config/rs6000/rs6000.md (type): Remove "brinc".
27874
27875 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
27876
27877         * config.gcc (powerpc*-*-*): Don't add spe.h to extra_headers.
27878         (powerpc*-linux*spe*): Use ${cpu_type} instead of rs6000.
27879         * config/rs6000/linuxspe.h: Delete file.
27880         * config/rs6000/rs6000.md: Don't include spe.md.
27881         * config/rs6000/spe.h: Delete file.
27882         * config/rs6000/spe.md: Delete file.
27883         * config/rs6000/t-rs6000: Remove spe.md.
27884
27885 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
27886
27887         * config/rs6000/predicates.md (reg_or_mem_operand): Reformat.
27888         (reg_or_none500mem_operand): Delete.
27889         * config/rs6000/rs6000.md (extendsfdf2): Use reg_or_mem_operand
27890         instead of reg_or_none500mem_operand.
27891
27892 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
27893
27894         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
27895         handling of SPE flags.
27896         * config/rs6000/rs6000.opt (-mspe, -mspe=no, -mspe=yes): Delete.
27897
27898 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
27899
27900         * config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
27901         SPE ABI handling.
27902         * config/rs6000/paired.md (paired_negv2sf2): Rename to negv2sf2.
27903         (paired_absv2sf2, paired_addv2sf3, paired_subv2sf3, paired_mulv2sf3,
27904         paired_divv2sf3): Similar.
27905         * config/rs6000/predicates.md: Replace TARGET_SPE, TARGET_SPE_ABI,
27906         SPE_VECTOR_MODE and SPE_HIGH_REGNO_P by 0; simplify.
27907         * config/rs6000/rs6000-builtin.def: Delete RS6000_BUILTIN_E and
27908         RS6000_BUILTIN_S.
27909         Delete BU_SPE_1, BU_SPE_2, BU_SPE_3, BU_SPE_E, BU_SPE_P, and BU_SPE_X.
27910         Rename the paired_* instruction patterns.
27911         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Do not
27912         define __SPE__.
27913         * config/rs6000/rs6000-protos.h (invalid_e500_subreg): Delete.
27914         * config/rs6000/rs6000.c: Delete RS6000_BUILTIN_E and RS6000_BUILTIN_S.
27915         (struct rs6000_stack): Delete fields spe_gp_save_offset, spe_gp_size,
27916         spe_padding_size, and spe_64bit_regs_used.  Replace TARGET_SPE and
27917         TARGET_SPE_ABI with 0, simplify.  Replace SPE_VECTOR_MODE with
27918         PAIRED_VECTOR_MODE.
27919         (struct machine_function): Delete field spe_insn_chain_scanned_p.
27920         (spe_func_has_64bit_regs_p): Delete.
27921         (spe_expand_predicate_builtin): Delete.
27922         (spe_expand_evsel_builtin): Delete.
27923         (TARGET_DWARF_REGISTER_SPAN): Do not define.
27924         (TARGET_MEMBER_TYPE_FORCES_BLK): Do not define.
27925         (invalid_e500_subreg): Delete.
27926         (rs6000_legitimize_address): Always force_reg op2 as well, for
27927         paired single memory accesses.
27928         (rs6000_member_type_forces_blk): Delete.
27929         (rs6000_spe_function_arg): Delete.
27930         (rs6000_expand_unop_builtin): Delete SPE handling.
27931         (rs6000_expand_binop_builtin): Ditto.
27932         (spe_expand_stv_builtin): Delete.
27933         (bdesc_2arg_spe): Delete.
27934         (spe_expand_builtin): Delete.
27935         (spe_expand_predicate_builtin): Delete.
27936         (spe_expand_evsel_builtin): Delete.
27937         (rs6000_invalid_builtin): Remove RS6000_BTM_SPE handling.
27938         (spe_init_builtins): Delete.
27939         (spe_func_has_64bit_regs_p): Delete.
27940         (savres_routine_name): Delete "info" parameter.  Adjust callers.
27941         (rs6000_emit_stack_reset): Ditto.
27942         (rs6000_dwarf_register_span): Delete.
27943         * config/rs6000/rs6000.h (TARGET_SPE_ABI, TARGET_SPE,
27944         UNITS_PER_SPE_WORD, SPE_HIGH_REGNO_P, SPE_SIMD_REGNO_P,
27945         SPE_VECTOR_MODE, RS6000_BTM_SPE, RS6000_BUILTIN_E, RS6000_BUILTIN_S):
27946         Delete.
27947         * config/rs6000/rs6000.md (FIRST_SPE_HIGH_REGNO, LAST_SPE_HIGH_REGNO):
27948         Delete.
27949         * config/rs6000/rs6000.opt (-mabi=spe, -mabi=no-spe): Delete.
27950         * config/rs6000/spe.md: Delete every pattern that uses TARGET_SPE.
27951         * config/rs6000/vector.md (absv2sf2, negv2sf2, addv2sf3, subv2sf3,
27952         mulv2sf3, divv2sf3): Delete expanders.
27953
27954 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
27955
27956         config/rs6000/rs6000.md (UNSPEC_MV_CR_GT): Delete.
27957
27958 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
27959
27960         * config/rs6000/rs6000-protos.h (output_e500_flip_gt_bit): Delete.
27961         * config/rs6000/rs6000.c: Ditto.
27962
27963 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
27964
27965         * config/rs6000/predicated.md (rs6000_cbranch_operator): Delete.
27966         * config/rs6000/rs6000.md: Replace rs6000_cbranch_operator by
27967         comparison_operator.
27968
27969 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
27970
27971         * config/rs6000/rs6000.c: Remove everything related to -mfloat-gprs.
27972         * config/rs6000/rs6000.opt: Ditto.
27973         * config/rs6000/t-rtems: Ditto.
27974
27975 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
27976
27977         * config/rs6000/predicates.md: Replace TARGET_E500_DOUBLE and
27978         TARGET_E500_SINGLE by 0, simplify.
27979         * config/rs6000/rs6000.c: Ditto.
27980         (rs6000_option_override_internal): Delete CHECK_E500_OPTIONS.
27981         (spe_build_register_parallel): Delete.
27982         * config/rs6000/rs6000.h: Delete TARGET_E500_SINGLE,
27983         TARGET_E500_DOUBLE, and CHECK_E500_OPTIONS.
27984         * config/rs6000/rs6000.md: Replace TARGET_E500_DOUBLE,
27985         TARGET_E500_SINGLE, and <E500_CONVERT> by 0, simplify.
27986         (E500_CONVERT): Delete.
27987         * config/rs6000/spe.md: Remove many patterns and all define_constants.
27988
27989 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
27990
27991         * config/rs6000/darwin.md: Replace TARGET_FPRS by 1 and simplify.
27992         * config/rs6000/dfp.md: Ditto.
27993         (negdd2, *negdd2_fpr): Merge.
27994         (absdd2, *absdd2_fpr): Merge.
27995         (negtd2, *negtd2_fpr): Merge.
27996         (abstd2, *abstd2_fpr): Merge.
27997         * config/rs6000/e500.h: Delete file.
27998         * config/rs6000/predicates.md (rs6000_cbranch_operator): Replace
27999         TARGET_FPRS by 1 and simplify.
28000         * config/rs6000/rs6000-c.c: Ditto.
28001         * config/rs6000/rs6000.c: Ditto.  Also replace TARGET_SF_SPE and
28002         TARGET_DF_SPE by 0.
28003         * config/rs6000/rs6000.h: Ditto.  Delete TARGET_SF_SPE and
28004         TARGET_DF_SPE.
28005         * config/rs6000/rs6000.md: Ditto.
28006         (floatdidf2, *floatdidf2_fpr): Merge.
28007         (move_from_CR_gt_bit): Delete.
28008         * config/rs6000/spe.md: Replace TARGET_FPRS by 1 and simplify.
28009         (E500_CR_IOR_COMPARE): Delete.
28010         (All patterns that require !TARGET_FPRS): Delete.
28011         * config/rs6000/vsx.md: Replace TARGET_FPRS by 1 and simplify.
28012
28013 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
28014
28015         * passes.def (pass_iv_canon): Move before pass_loop_distribution.
28016
28017 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
28018
28019         * graphds.c (add_edge): Intitialize edge's attached data.
28020         (foll_in_subgraph, dfs_fst_edge, dfs_next_edge): New function
28021         pointer parameter.  Call pointed function on each edge during
28022         graph traversing.  Skip traversing the edge when the function
28023         returns true.
28024         (graphds_dfs, graphds_scc): Ditto.
28025         (for_each_edge): New parameter.  Pass the new parameter to callback
28026         function.
28027         * graphds.h (skip_edge_callback): New function pointer type.
28028         (graphds_dfs, graphds_scc): New function pointer parameter.
28029         (graphds_edge_callback, for_each_edge): New parameter.
28030
28031 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
28032
28033         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test): Factor
28034         out code checking if runtime alias check is possible to below ...
28035         Call the new function.
28036         * tree-data-ref.c (runtime_alias_check_p): ... to new function.
28037         * tree-data-ref.h (runtime_alias_check_p): New decalaration.
28038
28039 2017-06-07  Marek Polacek  <polacek@redhat.com>
28040
28041         PR sanitizer/80932
28042         * fold-const.c (extract_muldiv_1) <case MINUS_EXPR>: Add
28043         TYPE_OVERFLOW_WRAPS check.
28044
28045 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
28046
28047         * tree-vect-loop-manip.c (vect_do_peeling): Don't skip vector loop
28048         if versioning is required.
28049         * tree-vect-loop.c (vect_analyze_loop_2): Merge niter check for loop
28050         peeling with the check for versioning.
28051
28052 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
28053
28054         * tree-vectorizer.h (vect_build_loop_niters): New parameter.
28055         * tree-vect-loop-manip.c (vect_build_loop_niters): New parameter.
28056         Set true to new parameter if new ssa variable is defined.
28057         (vect_gen_vector_loop_niters): Refactor.  Set range information
28058         for the new vector loop bound variable.
28059         (vect_do_peeling): Ditto.
28060
28061 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
28062
28063         * tree-affine.c (ssa.h): Include header file.
28064         (tree_to_aff_combination): Handle (T1)(X - CST) when inner type
28065         has wrapping overflow behavior.
28066
28067 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
28068
28069         * tree-affine.c (tree_to_aff_combination): Handle (T1)(X + X).
28070
28071 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
28072
28073         (aff_combination_expand): Move (T1)(X *+- CST) simplification to ...
28074         (tree_to_aff_combination): ... here.
28075
28076 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
28077
28078         * tree-ssa-loop-ivopts.c (ivopts_estimate_reg_pressure): New
28079         reg_pressure model function.
28080         (ivopts_global_cost_for_size): Delete.
28081         (determine_set_costs, iv_ca_recount_cost): Call new model function
28082         ivopts_estimate_reg_pressure.
28083
28084 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
28085
28086         * config/aarch64/aarch64.c (aarch64_rtx_costs): Make sdiv more
28087         expensive than udiv.  Remove floating point cases from mod.
28088
28089 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
28090
28091         * config/arm/aarch-cost-tables.h (cortexa53_extra_cost):
28092         Increase idiv cost.
28093
28094 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
28095
28096         * config/aarch64/aarch64.md
28097         (copysignsf3): Fix mask generation.
28098
28099 2017-06-07  Jakub Jelinek  <jakub@redhat.com>
28100
28101         * dumpfile.h (enum tree_dump_index): Rename TDI_generic to
28102         TDI_gimple.
28103         (class dump_manager): Add register_dumps method.
28104         * dumpfile.c: Include langhooks.h.
28105         (dump_files): Use 0 instead of 3/4/5 for TDI_{original,gimple,nested}.
28106         (FIRST_AUTO_NUMBERED_DUMP): Decrease to 1.
28107         (FIRST_ME_AUTO_NUMBERED_DUMP): Define.
28108         (dump_manager::dump_register): Start with 512 entries instead of 32.
28109         (dump_manager::register_dumps): New method.
28110         * toplev.c (general_init): Instead of invoking register_dumps
28111         langhook, invoke register_dumps method on the dump manager.
28112         * gimplify.c (gimplify_function_tree): Use TDI_gimple instead of
28113         TDI_generic.
28114
28115 2017-06-07  Richard Sandiford  <richard.sandiford@linaro.org>
28116
28117         * doc/md.texi: Clarify the restrictions on a define_insn condition.
28118         Say that # requires an associated define_split to exist, and that
28119         the define_split must be suitable for use after register allocation.
28120
28121 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
28122
28123         * cfgbuild.c (find_bb_boundaries): Initialize profile of split blocks.
28124         (compute_outgoing_frequencies): Also initialize zero counts.
28125         (find_many_sub_basic_blocks): Do not produce uninitialized profile
28126         around loops; preserve more of profile when nothing changes.
28127
28128 2017-06-06  Jim Wilson  <jim.wilson@linaro.org>
28129
28130         * config/aarch64/aarch64-cost-tables.h (qdf24xx_extra_costs): Move to
28131         here.
28132         * config/arm/aarch-cost-tables.h (qdf24xx_extra_costs): From here.
28133         * config/arm/arm-cpu-cdata.h: Regenerate.
28134         * config/arm/arm-cpu-data.h, config/arm/arm-cpu.h: Likewise.
28135         * config/arm/arm-tables.opt, config/arm/arm-tune.md: Likewise.
28136         * config/arm/arm-cpus.in: Delete falkor and qdf24xx entries.
28137         * config/arm/arm.c (arm_qdf24xx_tune): Delete.
28138         * config/arm/bpabi.h (BE8_LINK_SPEC): Delete falkor and qdf24xx
28139         support.
28140         * config/arm/t-aprofile (MULTILIB_MATCHES): Delete falkor and qdf24xx
28141         support.
28142         * config/arm/t-rmprofile: Likewise.
28143         * doc/invoke.texi (ARM Options): Drop falkor and qdf24xx support.
28144
28145 2017-06-06  David S. Miller  <davem@davemloft.net>
28146
28147         PR target/80968
28148         * config/sparc/sparc.c (sparc_expand_prologue): Emit frame
28149         blockage if function uses alloca.
28150
28151 2017-06-06  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
28152
28153         * tree-ssa-loop-prefetch.c (struct mem_ref_group, struct mem_ref):
28154         New "uid" fields to hold pretty-print IDs of group and ref.
28155         Memory references are now identified as <group_id>:<ref_id>
28156         instead of using [random] addresses.
28157         (dump_mem_details): Simplify, no functional change.
28158         (dump_mem_ref): Simplify and make output more concise.
28159         Replace couple of fprintf's throughout code with calls to dump_mem_ref.
28160         (find_or_create_group): Initialize group uid.
28161         (record_ref): Initialize ref uid.  Improve debug output.
28162         (prune_group_by_reuse, should_issue_prefetch_p,)
28163         (should_issue_prefetch_p, schedule_prefetches, issue_prefetch_ref,)
28164         (mark_nontemporal_store, determine_loop_nest_reuse):
28165         Improve debug output.
28166
28167 2017-06-06  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
28168
28169         * dbgcnt.def (prefetch): New debug counter.
28170         * tree-ssa-loop-prefetch.c (dbgcnt.h): New include.
28171         (schedule_prefetches): Stop issueing prefetches if debug counter
28172         tripped.
28173
28174 2017-06-06  Tom de Vries  <tom@codesourcery.com>
28175
28176         * doc/sourcebuild.texi (Testsuites, C Language Testsuites,
28177         gcc.c-torture/compile): Remove mention of NO_LABEL_VALUES in fixme.
28178
28179 2017-06-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28180
28181         * config/aarch64/atomics.md (atomic_compare_and_swap<mode> expander):
28182         Use aarch64_reg_or_zero predicate for operand 4.
28183         (aarch64_compare_and_swap<mode> define_insn_and_split):
28184         Use aarch64_reg_or_zero predicate for operand 3.  Add 'Z' constraint.
28185         (aarch64_store_exclusive<mode>): Likewise for operand 2.
28186
28187 2017-06-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
28188
28189         * config/arm/arm.c (arm_compute_save_reg_mask): Rename into ...
28190         (arm_compute_save_core_reg_mask): This.
28191         (thumb1_compute_save_reg_mask): Rename into ...
28192         (thumb1_compute_save_core_reg_mask): This.
28193         (arm_compute_save_reg0_reg12_mask): Adapt comment.
28194         (arm_compute_frame_layout): Likewise.
28195
28196 2017-06-06  Richard Biener  <rguenther@suse.de>
28197
28198         PR tree-optimization/80974
28199         * tree-ssa-sccvn.c (set_ssa_val_to): Do not change but only
28200         keep or clear leaders SSA info.
28201
28202 2017-06-06  Tom de Vries  <tom@codesourcery.com>
28203
28204         * config/nvptx/nvptx.c (split_mode_p): New function.
28205         (nvptx_declare_function_name, nvptx_print_operand): Use split_mode_p.
28206
28207 2017-06-06  Tom de Vries  <tom@codesourcery.com>
28208
28209         * config/nvptx/nvptx.c (nvptx_print_operand): Use maybe_split_mode.
28210
28211 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
28212
28213         PR bootstrap/80978
28214         * tree-cfg.c (execute_fixup_cfg): Fix condition on when to rescale
28215         profile.
28216
28217 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
28218
28219         * shrink-wrap.c (handle_simple_exit): Update profile.
28220         (try_shrink_wrapping): Upate profile.
28221
28222 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
28223
28224         * predict.c (tree_estimate_probability_bb): Add LOCAL_ONLY.
28225         (tree_guess_outgoing_edge_probabilities): New.
28226         * predict.h (tree_guess_outgoing_edge_probabilities): Declare.
28227         * tree-cfg.c (gimple_find_sub_bbs): Propagate profile.
28228
28229 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
28230
28231         * ipa-split.c (split_function): Initialize return bb profile.
28232
28233 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
28234
28235         * profile.c (compute_branch_probabilities): Also initialize
28236         EXIT_BLOCK profile.
28237
28238 2017-06-06  Richard Biener  <rguenther@suse.de>
28239
28240         PR tree-optimization/80928
28241         * tree-vect-loop.c (vect_update_vf_for_slp): Amend dumps.
28242         (vect_analyze_loop_operations): Properly guard analysis for
28243         pure SLP case.
28244         (vect_transform_loop): Likewise.
28245         (vect_analyze_loop_2): Also reset SLP type on PHIs.
28246         (vect_model_induction_cost): Do not cost for pure SLP.
28247         (vectorizable_induction): Pass in SLP node, implement SLP vectorization
28248         of induction in inner loop vectorization.
28249         * tree-vect-slp.c (vect_create_new_slp_node): Handle PHIs.
28250         (vect_get_and_check_slp_defs): Handle vect_induction_def.
28251         (vect_build_slp_tree): Likewise.  Handle PHIs as terminating the
28252         recursion.
28253         (vect_analyze_slp_cost_1): Cost induction.
28254         (vect_detect_hybrid_slp_stmts): Handle PHIs.
28255         (vect_get_slp_vect_defs): Likewise.
28256         * tree-vect-stmts.c (vect_analyze_stmt): Handle induction.
28257         (vect_transform_stmt): Handle SLP reductions.
28258         * tree-vectorizer.h (vectorizable_induction): Adjust.
28259
28260 2017-06-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
28261
28262         * config/rs6000/rs6000.c (make_resolver_func): Update
28263         init_lowered_empty_function call.
28264
28265 2017-06-05  Bernd Edlinger  <bernd.edlinger@hotmail.de>
28266
28267         * doc/invoke.texi: Document the -fprofile-abs-path option.
28268         * common.opt (fprofile-abs-path): New option.
28269         * gcov-io.h (gcov_write_filename): Declare.
28270         * gcov-io.c (gcov_write_filename): New function.
28271         * coverage.c (coverage_begin_function): Use gcov_write_filename.
28272         * profile.c (output_location): Likewise.
28273
28274 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
28275
28276         * shring-wrap.c: Revert accidental commit.
28277
28278 2017-06-05  Volker Reichelt  <v.reichelt@netcologne.de>
28279
28280         * doc/invoke.texi (-Wduplicated-branches): Add to warning list.
28281
28282 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
28283
28284         * cfgexpand.c (expand_gimple_tailcall): Initialize profile of
28285         new edge.
28286         * ipa-inline.c (want_inline_self_recursive_call_p): Watch for missing
28287         profile in callgraph edge.
28288         * profile-count.h (apply_probability): If THIS is 0, then result is 0
28289         (apply_scale): Likewise.
28290         * tree-inline.c (copy_bb, copy_edges_for_bb, copy_cfg_body):
28291         Also scale profile when inlining function with zero profile.
28292         (initialize_cfun): Update exit block profile even when it is zero.
28293         * tree-ssa-threadupdate.c (clear_counts_path): Handle correctly case
28294         when profile is read.
28295
28296 2017-06-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
28297
28298         * config/rs6000/rs6000.c (toplevel): Include attribs.h.
28299         (CLONE_*): New constants to define the processors we can generate
28300         code for with the target_clone attribute.
28301         (rs6000_clone_map): New array to identify which clone processors
28302         the current program is running on.
28303         (TARGET_COMPARE_VERSION_PRIORITY): Define to enable the
28304         target_clone attribute.
28305         (TARGET_GENERATE_VERSION_DISPATCHER_BODY): Likewise.
28306         (TARGET_GET_FUNCTION_VERSIONS_DISPATCHER): Likewise.
28307         (TARGET_OPTION_FUNCTION_VERSIONS): Likewise.
28308         (cpu_expand_builtin): Add support for target_clone attribute.
28309         (rs6000_valid_attribute_p): Allow "default" attribute.
28310         (get_decl_name): New debug function to simplify printing the
28311         current function name in debugging statements.
28312         (rs6000_clone_priority): New functions to support the target_clone
28313         attribute, and be able to generate code to switch between ISA 2.05
28314         through ISA 3.0 (power6 through power9).
28315         (rs6000_compare_version_priority): Likewise.
28316         (rs6000_get_function_versions_dispatcher): Likewise.
28317         (make_resolver_func): Likewise.
28318         (add_condition_to_bb): Likewise.
28319         (dispatch_function_versions): Likewise.
28320         (rs6000_generate_version_dispatcher_body): Likewise.
28321         (rs6000_can_inline_p): Call get_decl_name for debugging usage.
28322         (fusion_gpr_load_p): Fix a spacing issue.
28323         * doc/extend.texi (Common Function Attributes): Document that the
28324         PowerPC supports the target_clone attribute.
28325
28326 2017-06-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>
28327
28328         * config/arm/arm.h: explain F symbol found in description of ARM
28329         register allocation in its legend.
28330
28331 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
28332
28333         * config/mips/frame-header-opt.c: Include profile-count.h.
28334         * config/riscv/riscv.c: Include profile-count.h
28335
28336 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
28337
28338         * tree-ssa-loop-im.c (execute_sm_if_changed): Add FLAG_BBS parameter;
28339         update profile.
28340         (sm_set_flag_if_changed): Add bbs field.
28341         (execute_sm_if_changed_flag_set): Pass BBS.
28342         (execute_sm): Update.
28343
28344 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28345
28346         * config/aarch64/aarch64-simd.md (aarch64_store_lane0<mode>):
28347         New pattern.
28348
28349 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28350
28351         * config/aarch64/aarch64.md (sub<mode>3_compare1_imm): New define_insn.
28352         (peephole2): New peephole2 to emit the above.
28353         * config/aarch64/predicates.md (aarch64_sub_immediate): New predicate.
28354
28355 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28356
28357         * config/aarch64/aarch64.c (define_peephole2 above
28358         *sub_<shift>_<mode>): New peephole.
28359
28360 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
28361
28362         * config/i386/i386.c (make_resolver_func): Update.
28363         * Makefile.in: Add profile-count.h and profile-count.o
28364         * auto-profile.c (afdo_indirect_call): Update to new API.
28365         (afdo_set_bb_count): Update.
28366         (afdo_propagate_edge): Update.
28367         (afdo_propagate_circuit): Update.
28368         (afdo_calculate_branch_prob): Update.
28369         (afdo_annotate_cfg): Update.
28370         * basic-block.h: Include profile-count.h
28371         (struct edge_def): Turn count to profile_count.
28372         (struct basic_block_def): Likewie.
28373         (REG_BR_PROB_BASE): Move to profile-count.h
28374         (RDIV): Move to profile-count.h
28375         * bb-reorder.c (max_entry_count): Turn to profile_count.
28376         (find_traces): Update.
28377         (rotate_loop):Update.
28378         (connect_traces):Update.
28379         (sanitize_hot_paths):Update.
28380         * bt-load.c (migrate_btr_defs): Update.
28381         * cfg.c (RDIV): Remove.
28382         (init_flow): Use alloc_block.
28383         (alloc_block): Uninitialize count.
28384         (unchecked_make_edge): Uninitialize count.
28385         (check_bb_profile): Update.
28386         (dump_edge_info): Update.
28387         (dump_bb_info): Update.
28388         (update_bb_profile_for_threading): Update.
28389         (scale_bbs_frequencies_int): Update.
28390         (scale_bbs_frequencies_gcov_type): Update.
28391         (scale_bbs_frequencies_profile_count): New.
28392         * cfg.h (update_bb_profile_for_threading): Update.
28393         (scale_bbs_frequencies_profile_count): Declare.
28394         * cfgbuild.c (compute_outgoing_frequencies): Update.
28395         (find_many_sub_basic_blocks): Update.
28396         * cfgcleanup.c (try_forward_edges): Update.
28397         (try_crossjump_to_edge): Update.
28398         * cfgexpand.c (expand_gimple_tailcall): Update.
28399         (construct_exit_block): Update.
28400         * cfghooks.c (verify_flow_info): Update.
28401         (dump_bb_for_graph): Update.
28402         (split_edge): Update.
28403         (make_forwarder_block): Update.
28404         (duplicate_block): Update.
28405         (account_profile_record): Update.
28406         * cfgloop.c (find_subloop_latch_edge_by_profile): Update.
28407         (get_estimated_loop_iterations): Update.
28408         * cfgloopanal.c (expected_loop_iterations_unbounded): Update.
28409         (single_likely_exit): Update.
28410         * cfgloopmanip.c (scale_loop_profile): Update.
28411         (loopify): Update.
28412         (set_zero_probability): Update.
28413         (lv_adjust_loop_entry_edge): Update.
28414         * cfgrtl.c (force_nonfallthru_and_redirect): Update.
28415         (purge_dead_edges): Update.
28416         (rtl_account_profile_record): Update.
28417         * cgraph.c (cgraph_node::create): Uninitialize count.
28418         (symbol_table::create_edge): Uninitialize count.
28419         (cgraph_update_edges_for_call_stmt_node): Update.
28420         (cgraph_edge::dump_edge_flags): Update.
28421         (cgraph_node::dump): Update.
28422         (cgraph_edge::maybe_hot_p): Update.
28423         * cgraph.h: Include profile-count.h
28424         (create_clone), create_edge, create_indirect_edge): Update.
28425         (cgraph_node): Turn count to profile_count.
28426         (cgraph_edge0: Likewise.
28427         (make_speculative, clone): Update.
28428         (create_edge): Update.
28429         (init_lowered_empty_function): Update.
28430         * cgraphclones.c (cgraph_edge::clone): Update.
28431         (duplicate_thunk_for_node): Update.
28432         (cgraph_node::create_clone): Update.
28433         * cgraphunit.c (cgraph_node::analyze): Update.
28434         (cgraph_node::expand_thunk): Update.
28435         * final.c (dump_basic_block_info): Update.
28436         * gimple-streamer-in.c (input_bb): Update.
28437         * gimple-streamer-out.c (output_bb): Update.
28438         * graphite.c (print_global_statistics): Update.
28439         (print_graphite_scop_statistics): Update.
28440         * hsa-brig.c: Include basic-block.h.
28441         * hsa-dump.c: Include basic-block.h.
28442         * hsa-gen.c (T sum_slice): Update.
28443         (convert_switch_statements):Update.
28444         * hsa-regalloc.c: Include basic-block.h.
28445         * ipa-chkp.c (chkp_produce_thunks): Update.
28446         * ipa-cp.c (struct caller_statistics): Update.
28447         (init_caller_stats): Update.
28448         (gather_caller_stats): Update.
28449         (ipcp_cloning_candidate_p): Update.
28450         (good_cloning_opportunity_p): Update.
28451         (get_info_about_necessary_edges): Update.
28452         (dump_profile_updates): Update.
28453         (update_profiling_info): Update.
28454         (update_specialized_profile): Update.
28455         (perhaps_add_new_callers): Update.
28456         (decide_about_value): Update.
28457         (ipa_cp_c_finalize): Update.
28458         * ipa-devirt.c (struct odr_type_warn_count): Update.
28459         (struct decl_warn_count): Update.
28460         (struct final_warning_record): Update.
28461         (possible_polymorphic_call_targets): Update.
28462         (ipa_devirt): Update.
28463         * ipa-fnsummary.c (redirect_to_unreachable): Update.
28464         * ipa-icf.c (sem_function::merge): Update.
28465         * ipa-inline-analysis.c (do_estimate_edge_time): Update.
28466         * ipa-inline.c (compute_uninlined_call_time): Update.
28467         (compute_inlined_call_time): Update.
28468         (want_inline_small_function_p): Update.
28469         (want_inline_self_recursive_call_p): Update.
28470         (edge_badness): Update.
28471         (lookup_recursive_calls): Update.
28472         (recursive_inlining): Update.
28473         (inline_small_functions): Update.
28474         (dump_overall_stats): Update.
28475         (dump_inline_stats): Update.
28476         * ipa-profile.c (ipa_profile_generate_summary): Update.
28477         (ipa_propagate_frequency): Update.
28478         (ipa_profile): Update.
28479         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
28480         * ipa-utils.c (ipa_merge_profiles): Update.
28481         * loop-doloop.c (doloop_modify): Update.
28482         * loop-unroll.c (report_unroll): Update.
28483         (unroll_loop_runtime_iterations): Update.
28484         * lto-cgraph.c (lto_output_edge): Update.
28485         (lto_output_node): Update.
28486         (input_node): Update.
28487         (input_edge): Update.
28488         (merge_profile_summaries): Update.
28489         * lto-streamer-in.c (input_cfg): Update.
28490         * lto-streamer-out.c (output_cfg): Update.
28491         * mcf.c (create_fixup_graph): Update.
28492         (adjust_cfg_counts): Update.
28493         (sum_edge_counts): Update.
28494         * modulo-sched.c (sms_schedule): Update.
28495         * postreload-gcse.c (eliminate_partially_redundant_load): Update.
28496         * predict.c (maybe_hot_count_p): Update.
28497         (probably_never_executed): Update.
28498         (dump_prediction): Update.
28499         (combine_predictions_for_bb): Update.
28500         (propagate_freq): Update.
28501         (handle_missing_profiles): Update.
28502         (counts_to_freqs): Update.
28503         (rebuild_frequencies): Update.
28504         (force_edge_cold): Update.
28505         * predict.h: Include profile-count.h
28506         (maybe_hot_count_p, counts_to_freqs): UPdate.
28507         * print-rtl-function.c: Do not include cfg.h
28508         * print-rtl.c: Include basic-block.h
28509         * profile-count.c: New file.
28510         * profile-count.h: New file.
28511         * profile.c (is_edge_inconsistent): Update.
28512         (correct_negative_edge_counts): Update.
28513         (is_inconsistent): Update.
28514         (set_bb_counts): Update.
28515         (read_profile_edge_counts): Update.
28516         (compute_frequency_overlap): Update.
28517         (compute_branch_probabilities): Update; Initialize and deinitialize
28518         gcov_count tables.
28519         (branch_prob): Update.
28520         * profile.h (bb_gcov_counts, edge_gcov_counts): New.
28521         (edge_gcov_count): New.
28522         (bb_gcov_count): New.
28523         * shrink-wrap.c (try_shrink_wrapping): Update.
28524         * tracer.c (better_p): Update.
28525         * trans-mem.c (expand_transaction): Update.
28526         (ipa_tm_insert_irr_call): Update.
28527         (ipa_tm_insert_gettmclone_call): Update.
28528         * tree-call-cdce.c: Update.
28529         * tree-cfg.c (gimple_duplicate_sese_region): Update.
28530         (gimple_duplicate_sese_tail): Update.
28531         (gimple_account_profile_record): Update.
28532         (execute_fixup_cfg): Update.
28533         * tree-inline.c (copy_bb): Update.
28534         (copy_edges_for_bb): Update.
28535         (initialize_cfun): Update.
28536         (freqs_to_counts): Update.
28537         (copy_cfg_body): Update.
28538         (expand_call_inline): Update.
28539         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
28540         * tree-ssa-loop-ivcanon.c (unloop_loops): Update.
28541         (try_unroll_loop_completely): Update.
28542         (try_peel_loop): Update.
28543         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
28544         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop): Update.
28545         * tree-ssa-loop-split.c (connect_loops): Update.
28546         * tree-ssa-loop-unswitch.c (hoist_guard): Update.
28547         * tree-ssa-reassoc.c (branch_fixup): Update.
28548         * tree-ssa-tail-merge.c (replace_block_by): Update.
28549         * tree-ssa-threadupdate.c (create_block_for_threading): Update.
28550         (compute_path_counts): Update.
28551         (update_profile): Update.
28552         (recompute_probabilities): Update.
28553         (update_joiner_offpath_counts): Update.
28554         (estimated_freqs_path): Update.
28555         (freqs_to_counts_path): Update.
28556         (clear_counts_path): Update.
28557         (ssa_fix_duplicate_block_edges): Update.
28558         (duplicate_thread_path): Update.
28559         * tree-switch-conversion.c (case_bit_test_cmp): Update.
28560         (struct switch_conv_info): Update.
28561         * tree-tailcall.c (decrease_profile): Update.
28562         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
28563         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
28564         * value-prof.c (check_counter): Update.
28565         (gimple_divmod_fixed_value): Update.
28566         (gimple_mod_pow2): Update.
28567         (gimple_mod_subtract): Update.
28568         (gimple_ic_transform): Update.
28569         (gimple_stringop_fixed_value): Update.
28570         * value-prof.h (gimple_ic): Update.
28571
28572 2017-06-02  Carl Love  <cel@us.ibm.com>
28573
28574         * config/rs6000/rs6000-c: Add support for built-in functions
28575         vector double vec_doublee (vector signed int);
28576         vector double vec_doublee (vector unsigned int);
28577         vector double vec_doublee (vector float);
28578         vector double vec_doubleh (vector signed int);
28579         vector double vec_doubleh (vector unsigned int);
28580         vector double vec_doubleh (vector float);
28581         vector double vec_doublel (vector signed int);
28582         vector double vec_doublel (vector unsigned int);
28583         vector double vec_doublel (vector float);
28584         vector double vec_doubleo (vector signed int);
28585         vector double vec_doubleo (vector unsigned int);
28586         vector double vec_doubleo (vector float);.
28587         * config/rs6000/rs6000-builtin.def: Add definitions for DOUBLEE,
28588         DOUBLEO, DOUBLEH, DOUBLEL, UNS_DOUBLEO, UNS_DOUBLEE, UNS_DOUBLEH,
28589         UNS_DOUBLEL.
28590         * config/rs6000/altivec.md: Add code generator for doublee<mode>2,
28591         unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2, doubleh<mode>2,
28592         unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2, add mode attribute
28593         VS_sxwsp.
28594         * config/rs6000/altivec.h: Add define for vec_doublee, vec_doubleo,
28595         vec_doublel, vec_doubleh.
28596         * doc/extend.texi: Update the built-in documentation file for the
28597         new built-in functions.
28598
28599 2017-06-02  David Malcolm  <dmalcolm@redhat.com>
28600
28601         PR jit/80954
28602         * ipa-inline-analysis.c (free_growth_caches): Set
28603         edge_removal_hook_holder to NULL after removing it.
28604
28605 2017-06-02  Sudakshina Das  <sudi.das@arm.com>
28606
28607         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Return CC_SWP for
28608         comparision with zero.
28609
28610 2017-06-02  Will Schmidt  <will_schmidt@vnet.ibm.com>
28611         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
28612         for early expansion of vec_min and vec_max builtins.
28613         (builtin_function_type): Add min/max unsigned variants to those
28614         identified as having unsigned arguments.
28615
28616 2017-06-02  Olivier Hainque  <hainque@adacore.com>
28617
28618         * config/vx-common.h (DWARF_UNWIND_INFO): Switch #define to 1.
28619
28620 2017-06-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28621
28622         * config/aarch64/aarch64-simd.md (*aarch64_simd_vec_copy_lane<mode>):
28623         Use VALL_F16 iterator rather than VALL.
28624
28625 2017-06-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28626
28627         * config/aarch64/aarch64.c (aarch64_split_compare_and_swap):
28628         Emit CBNZ inside loop when doing a strong exchange and comparing
28629         against zero.  Generate the CC flags after the loop.
28630
28631 2017-06-02  David Edelsohn  <dje.gcc@gmail.com>
28632
28633         * dwarf2out.c (DWARF_INITIAL_LENGTH_SIZE_STR): New.
28634         (dl_section_ref): New.
28635         (dwarf2out_finish): Copy debug_line_section_label to dl_section_ref.
28636         On AIX, append an expression to subtract the size of the
28637         section length to dl_section_ref.
28638
28639 2017-06-02  Will Schmidt  <will_schmidt@vnet.ibm.com>
28640
28641         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
28642         for early expansion of vector absolute builtins.
28643
28644 2017-06-02  Richard Biener  <rguenther@suse.de>
28645
28646         * tree-vect-slp.c (vect_detect_hybrid_slp_2): Match up
28647         what we consider a relevant use stmt with vect_detect_hybrid_slp_stmts.
28648
28649 2017-06-02  Richard Biener  <rguenther@suse.de>
28650
28651         PR tree-optimization/80948
28652         * tree-tailcall.c (find_tail_calls): Track stmts to move in
28653         stmt order as well.
28654
28655 2017-06-02  Richard Biener  <rguenther@suse.de>
28656
28657         * tree-vect-loop.c (vect_analyze_loop_operations): Not relevant
28658         PHIs are ok.
28659         * tree-vect-stmts.c (process_use): Do not mark backedge defs
28660         for inductions as relevant.
28661
28662 2017-06-02  Richard Biener  <rguenther@suse.de>
28663
28664         * tree-vect-loop.c (get_initial_def_for_induction): Inline into ...
28665         (vectorizable_induction): ... this.  Remove dead code.
28666
28667 2017-06-02  Eric Botcazou  <ebotcazou@adacore.com>
28668
28669         * builtins. (expand_builtin_alloca): Remove second parameter and
28670         infer its value from the first parameter instead.
28671         (expand_builtin) <BUILT_IN_ALLOCA>: Adjust call to above.
28672
28673 2017-06-02  Jakub Jelinek  <jakub@redhat.com>
28674
28675         PR rtl-optimization/80903
28676         * loop-doloop.c (add_test): Unshare sequence.
28677
28678 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
28679
28680         * doc/invoke.texi: Document the -Wsizeof-pointer-div warning.
28681
28682 2017-06-01  Bernd Edlinger  <bernd.edlinger@hotmail.de>
28683
28684         * config/i386/i386.c (x86_64_ms_sysv_extra_clobbered_registers): Make
28685         static.
28686         (xlogue_layout::get_stack_space_used, xlogue_layout::s_instances,
28687         xlogue_layout::get_instance, logue_layout::xlogue_layout,
28688         sp_valid_at, fp_valid_at, choose_basereg): Formatting.
28689         (xlogue_layout::get_stub_rtx): Make static.
28690         (xlogue_layout::get_stub_name): Avoid const-cast, make static.
28691         (xlogue_layout::compute_stub_managed_regs): Rename to...
28692         (xlogue_layout::count_stub_managed_regs): ...this.
28693         (xlogue_layout::is_stub_managed_reg): New function.
28694         (xlogue_layout::m_stub_names): Rename to...
28695         (xlogue_layout::s_stub_names): ...this, make static.
28696         (xlogue_layout::STUB_INDEX_OFFSET, xlogue_layout::MIN_REGS,
28697         xlogue_layout::MAX_REGS, xlogue_layout::MAX_EXTRA_REGS,
28698         xlogue_layout::VARIANT_COUNT, xlogue_layout::STUB_NAME_MAX_LEN,
28699         xlogue_layout::s_stub_names): Instantiate statics.
28700         (stub_managed_regs): Remove.
28701         (ix86_save_reg): Use xlogue_layout::compute_stub_managed_regs.
28702         (disable_call_ms2sysv_xlogues): Rename to...
28703         (warn_once_call_ms2sysv_xlogues): ...this, and warn only once.
28704         (ix86_initial_elimination_offset, ix86_expand_call): Fix call_ms2sysv
28705         warning logic.
28706         (ix86_static_chain): Make sure that ix86_static_chain_on_stack can't
28707         change after reload_completed.
28708         (ix86_can_use_return_insn_p): Use the ix86_frame data structure
28709         directly.
28710         (ix86_expand_prologue): Likewise.
28711         (ix86_expand_epilogue): Likewise.
28712         (ix86_expand_split_stack_prologue): Likewise.
28713         (ix86_compute_frame_layout): Remove frame parameter ...
28714         (TARGET_COMPUTE_FRAME_LAYOUT): ... and export it as a target hook.
28715         (ix86_finalize_stack_realign_flags): Call ix86_compute_frame_layout
28716         only if necessary.
28717         (ix86_init_machine_status): Don't set use_fast_prologue_epilogue_nregs.
28718         (ix86_frame): Move from here ...
28719         * config/i386/i386.h (ix86_frame): ... to here.
28720         (machine_function): Remove use_fast_prologue_epilogue_nregs, cache the
28721         complete ix86_frame data structure instead.  Remove some_ld_name.
28722
28723 2017-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
28724
28725         * dwarf2out.c (dwarf2out_late_global_decl): Add locations for
28726         symbols that hold a DECL_VALUE_EXPR.
28727
28728 2017-06-01  Martin Jambor  <mjambor@suse.cz>
28729
28730         PR tree-optimization/80898
28731         * tree-sra.c (process_subtree_disqualification): Removed.
28732         (disqualify_candidate): Do not acll
28733         process_subtree_disqualification.
28734         (subtree_mark_written_and_enqueue): New function.
28735         (propagate_all_subaccesses): Set grp_write of LHS subtree if the
28736         RHS has been disqualified and re-queue LHS if necessary.  Apart
28737         from that, ignore disqualified RHS.
28738
28739 2017-06-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
28740
28741         * config/s390/s390.c (s390_emit_epilogue): Disable early return
28742         address fetch for z10 or later.
28743
28744 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
28745
28746         * config/arc/arc.md (tst_movb): Add guard when splitting.
28747
28748 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
28749
28750         * config/arc/arc.c (arc_can_eliminate): Test against
28751         arc_frame_pointer_needed.
28752
28753 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
28754
28755         * config/arc/arc.c (arc_expand_prologue): Emit a special barrier
28756         to prevent store reordering.
28757         * config/arc/arc.md (UNSPEC_ARC_STKTIE): Define.
28758         (type): Add block type.
28759         (stack_tie): Define special instruction to be used in
28760         expand_prologue.
28761
28762 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
28763
28764         * config/arc/arc.md (commutative_binary_comparison): Remove 'I'
28765         constraint. It is not valid for the pattern.
28766         (noncommutative_binary_comparison): Likewise.
28767
28768 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
28769
28770         * config/arc/simdext.md (movv2hi_insn): Change predicate to avoid
28771         scaled addresses.
28772
28773 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
28774
28775         * config/arc/arc.c (arc_conditional_register_usage): Allow r30 to
28776         be used by the reg-alloc.
28777
28778 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
28779
28780         * config/arc/arc.md (mulsi3): Avoid use of hard registers before
28781         reg-alloc when having mul64 or mul32x16 instructions.
28782         (mulsidi3): Likewise.
28783         (umulsidi3): Likewise.
28784         (mulsi32x16): New pattern.
28785         (mulsi64): Likewise.
28786         (mulsidi64): Likewise.
28787         (umulsidi64): Likewise.
28788         (MUL32x16_REG): Define.
28789         (mul64_600): Use MUL32x16_REG.
28790         (mac64_600): Likewise.
28791         (umul64_600): Likewise.
28792         (umac64_600): Likewise.
28793
28794 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
28795
28796         * config/arc/arc.md (mulsi3_700): Make it commutative.
28797
28798 2017-06-01  Jose E. Marchesi  <jose.marchesi@oracle.com>
28799
28800         * config/sparc/sparc.md (*zero_extendsidi2_insn_sp64): Set insn
28801         type for movstouw.
28802         (*sign_extendsidi2_insn): Likewise for movstosw.
28803
28804 2017-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
28805
28806         * dwarf2out.c (get_discr_value): Call the get_debug_type hook on
28807         the type of the input discriminant value.  Convert the
28808         discriminant value of signedness vary.
28809
28810 2017-06-01  Volker Reichelt  <v.reichelt@netcologne.de>
28811
28812         * doc/invoke.texi (-Wcatch-value): Document new shortcut.
28813         Add to -Wall section.
28814
28815 2017-06-01  Richard Biener  <rguenther@suse.de>
28816
28817         PR middle-end/66313
28818         * fold-const.c (fold_plusminus_mult_expr): If the factored
28819         factor may be zero use a wrapping type for the inner operation.
28820         * tree-tailcall.c (independent_of_stmt_p): Pass in to_move bitmap
28821         and handle moved defs.
28822         (process_assignment): Properly guard the unary op case.  Return a
28823         tri-state indicating that moving the stmt before the call may allow
28824         to continue.  Pass through to_move.
28825         (find_tail_calls): Handle moving unrelated defs before
28826         the call.
28827
28828 2017-05-31  Segher Boessenkool  <segher@kernel.crashing.org>
28829
28830         PR target/80618
28831         * config/rs6000/vector.md (*vector_uneq<mode>): Write the nor in the
28832         splitter result in the canonical way.
28833
28834 2017-05-31  Uros Bizjak  <ubizjak@gmail.com>
28835
28836         * config/i386/i386.md (*zero_extendsidi2): Enable alternative (?r, *Yj)
28837         also for 32bit target.  Update insn attributes.
28838         (zero-extendsidi2 splitter): Allow all registers for operand 1.
28839
28840 2017-05-31  Sebastian Peryt  <sebastian.peryt@intel.com>
28841
28842         * config/i386/avx512fintrin.h (_mm_mask_max_sd)
28843         (_mm_maskz_max_sd, _mm_mask_max_ss, _mm_maskz_max_ss)
28844         (_mm_mask_min_sd, _mm_maskz_min_sd, _mm_mask_min_ss)
28845         (_mm_maskz_min_ss): New intrinsics.
28846
28847 2017-05-31  Martin Liska  <mliska@suse.cz>
28848
28849         * tree-vect-loop.c (vect_create_epilog_for_reduction):
28850         Change comment style to one we normally use.
28851         (vectorizable_reduction): Likewise.
28852         (vectorizable_induction): Likewise.
28853         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
28854         (vectorizable_call): Likewise.
28855         (vectorizable_simd_clone_call): Likewise.
28856         (vectorizable_conversion): Likewise.
28857         (vectorizable_assignment): Likewise.
28858         (vectorizable_shift): Likewise.
28859         (vectorizable_operation): Likewise.
28860         (vectorizable_store): Likewise.
28861         (vectorizable_load): Likewise.
28862         * tree-vectorizer.h: Likewise.
28863
28864 2017-05-31  Alexander Monakov  <amonakov@ispras.ru>
28865
28866         * passes.c (emergency_dump_function): New.
28867         * tree-pass.h (emergency_dump_function): Declare.
28868         * plugin.c (plugins_internal_error_function): Remove.
28869         * plugin.h (plugins_internal_error_function): Remove declaration.
28870         * toplev.c (internal_error_function): New static function.  Use it...
28871         (general_init): ...here.
28872
28873 2017-05-31  Graham Markall  <graham.markall@embecosm.com>
28874
28875         * config/arc/arc.c (arc_print_operand): Handle constant operands.
28876         (arc_rtx_costs): Add costs for new patterns.
28877         * config/arc/arc.md: Additional *add_n and *sub_n patterns.
28878         * config/arc/predicates.md: Add _1_2_3_operand predicate.
28879
28880 2017-05-31  Richard Sandiford  <richard.sandiford@linaro.org>
28881
28882         * tree-ssa-strlen.c (get_next_strinfo): New function.
28883         (get_stridx_plus_constant): Use it.
28884         (zero_length_string): Likewise.
28885         (adjust_related_strinfos): Likewise.
28886         (adjust_last_stmt): Likewise.
28887
28888 2017-05-31  Richard Biener  <rguenther@suse.de>
28889
28890         PR target/80880
28891         * config/i386/i386.c (ix86_expand_builtin): Remove assert
28892         for arg being an SSA name when expanding IX86_BUILTIN_BNDRET.
28893
28894 2017-05-31  Richard Sandiford  <richard.sandiford@linaro.org>
28895
28896         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Remove
28897         loop_vinfo argument and use of dependence distance vectors.
28898         Check instead whether the two references differ only in their
28899         initial value and assume that they have the same alignment if the
28900         difference is a multiple of the vector alignment.
28901         (vect_analyze_data_refs_alignment): Update call accordingly.
28902
28903 2017-05-31  Martin Liska  <mliska@suse.cz>
28904
28905         PR target/79155
28906         * config/i386/cpuid.h: Fix typo in a comment in cpuid.h.
28907
28908 2017-05-31  Bin Cheng  <bin.cheng@arm.com>
28909
28910         * tree-vect-loop-manip.c (create_intersect_range_checks_index)
28911         (create_intersect_range_checks): Move from ...
28912         * tree-data-ref.c (create_intersect_range_checks_index)
28913         (create_intersect_range_checks): ... to here.
28914         (create_runtime_alias_checks): New function factored from ...
28915         * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): ...
28916         here.  Call above function.
28917         * tree-data-ref.h (create_runtime_alias_checks): New function.
28918
28919 2017-05-31  Bin Cheng  <bin.cheng@arm.com>
28920
28921         * tree-data-ref.c (prune_runtime_alias_test_list): Relax minimal
28922         segment length for dr_b and compute it in wide_int.
28923
28924 2017-05-31  Richard Biener  <rguenther@suse.de>
28925
28926         PR tree-optimization/80906
28927         * graphite-isl-ast-to-gimple.c (copy_loop_close_phi_nodes): Get
28928         and pass through iv_map.
28929         (copy_bb_and_scalar_dependences): Adjust.
28930         (translate_pending_phi_nodes): Likewise.
28931         (copy_loop_close_phi_args): Handle code-generating IVs instead
28932         of ICEing.
28933
28934 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
28935
28936         * diagnostic-color.c (color_dict): Add "type-diff".
28937         (parse_gcc_colors): Update comment.
28938         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
28939         -fdiagnostics-show-template-tree and -fno-elide-type.
28940         (GCC_COLORS): Add type-diff to example.
28941         (type-diff=): New.
28942         (-fdiagnostics-show-template-tree): New.
28943         (-fno-elide-type): New.
28944         * pretty-print.c (pp_format): Pass quote and formatters[argno] to
28945         the pp_format_decoder callback.  Call any m_format_postprocessor's
28946         "handle" method.
28947         (pretty_printer::pretty_printer): Initialize
28948         m_format_postprocessor.
28949         (pretty_printer::~pretty_printer): Delete any
28950         m_format_postprocessor.
28951         * pretty-print.h (printer_fn): Add bool and const char ** parameters.
28952         (class format_postprocessor): New class.
28953         (struct pretty_printer::format_decoder): Document the new parameters.
28954         (struct pretty_printer::m_format_postprocessor): New field.
28955         * tree-diagnostic.c (default_tree_printer): Update for new
28956         bool and const char ** params.
28957         * tree-diagnostic.h (default_tree_printer): Likewise.
28958
28959 2017-05-30  Segher Boessenkool  <segher@kernel.crashing.org>
28960
28961         * config/rs6000/predicates.md (cc_reg_not_micro_cr0_operand): Delete.
28962         (lwa_operand): Delete rs6000_gen_cell_microcode test.
28963         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
28964         rs6000_gen_cell_microcode code.
28965         (rs6000_final_prescan_insn): Delete.
28966         (rs6000_opt_vars): Delete the "gen-cell-microcode" and
28967         "warn-cell-microcode" entries.
28968         * config/rs6000/rs6000.h (FINAL_PRESCAN_INSN): Delete.
28969         * config/rs6000/rs6000.md: Delete rs6000_gen_cell_microcode tests
28970         throughout.  Change cc_reg_not_micro_cr0_operand to
28971         cc_reg_not_cr0_operand throughout.
28972         (*extendhi<mode>2_noload): Delete.
28973         * config/rs6000/rs6000.opt (mgen-cell-microcode): Replace by stub.
28974         (mwarn-cell-microcode): Delete.
28975         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete
28976         -mgen-cell-microcode and -mwarn-cell-microcode.
28977
28978 2017-05-30  Uros Bizjak  <ubizjak@gmail.com>
28979
28980         PR target/80833
28981         * config/i386/constraints.md (Yd): New constraint.
28982         (Ye): Ditto.
28983         * config/i386/i386.md (*movti_internal): Add (?r, Ye)
28984         and (?Yd, r) alternatives.  Update insn attributes.
28985         * config/i386/i386.md (*movti_internal): Add (?r, *Ye)
28986         and (?*Yd, r) alternatives.  Update insn attributes.
28987         (double-mode inter-unit splitters): Add new GR<->XMM splitters.
28988
28989 2017-05-30  Pierre-Marie de Rodat  <derodat@adacore.com>
28990
28991         * gimplify.c (gimplify_modify_expr): Don't create a
28992         DECL_DEBUG_EXPR link if *FROM_P does not belong to the current
28993         function.
28994
28995 2017-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
28996
28997         * config/arm/arm-builtins.c (arm_expand_builtin): Remove const.
28998
28999 2017-05-30  Richard Biener  <rguenther@suse.de>
29000
29001         * tree-vectorizer.h (struct _stmt_vec_info): Add reduc_type
29002         and reduc_def fields.
29003         (STMT_VINFO_REDUC_TYPE): New define.
29004         (STMT_VINFO_REDUC_DEF): Likewise.
29005         (vect_force_simple_reduction): Adjust prototype.
29006         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Adjust.
29007         (vect_is_simple_reduction): Remove check_reduction argument.
29008         (vect_force_simple_reduction): Adjust and set
29009         STMT_VINFO_REDUC_TYPE and STMT_VINFO_REDUC_DEF.
29010         (vectorizable_reduction): Do not re-do reduction analysis
29011         but use STMT_VINFO_REDUC_TYPE and STMT_VINFO_REDUC_DEF.
29012         * tree-parloops.c (gather_scalar_reductions): Adjust.
29013
29014 2017-05-30  Richard Biener  <rguenther@suse.de>
29015
29016         PR middle-end/80901
29017         * cfgexpand.c (expand_gimple_cond): Match up loop fixup with
29018         split_edge code.
29019
29020 2017-05-24  Robin Dapp  <rdapp@linux.vnet.ibm.com>
29021
29022         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs):
29023         Introduce unknown_misalignment parameter and remove vf.
29024         (vect_peeling_hash_get_lowest_cost):
29025         Pass unknown_misalignment parameter.
29026         (vect_enhance_data_refs_alignment):
29027         Fix unsupportable data ref treatment.
29028
29029 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
29030
29031         * tree-vect-data-refs.c (vect_get_data_access_cost):
29032         Workaround for SLP handling.
29033         (vect_enhance_data_refs_alignment):
29034         Compute costs for doing no peeling at all, compare to the best
29035         peeling costs so far and avoid peeling if cheaper.
29036
29037 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
29038
29039         * tree-vect-data-refs.c (vect_peeling_hash_choose_best_peeling):
29040         Return peeling info and set costs to zero for unlimited cost
29041         model.
29042         (vect_enhance_data_refs_alignment): Also inspect all datarefs
29043         with unknown misalignment. Compute and costs for unknown
29044         misalignment, compare them to the costs for known misalignment
29045         and choose the cheapest for peeling.
29046
29047 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
29048
29049         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Rename.
29050         (vect_get_peeling_costs_all_drs): Create function.
29051         (vect_peeling_hash_get_lowest_cost):
29052         Use vect_get_peeling_costs_all_drs.
29053         (vect_peeling_supportable): Create function.
29054         (vect_enhance_data_refs_alignment): Use vect_peeling_supportable.
29055
29056 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
29057
29058         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Create
29059         DR_HAS_NEGATIVE_STEP.
29060         (vect_update_misalignment_for_peel): Define DR_MISALIGNMENT.
29061         (vect_enhance_data_refs_alignment): Use.
29062         (vect_duplicate_ssa_name_ptr_info): Use.
29063         * tree-vectorizer.h (dr_misalignment): Use.
29064         (known_alignment_for_access_p): Use.
29065
29066 2017-05-30  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
29067
29068         PR target/78838
29069         * config/msp430/msp430.c (gen_prefix): Return NULL when section name is
29070         .lowtext.
29071         (has_section_name): New function.
29072
29073 2017-05-30  Martin Liska  <mliska@suse.cz>
29074
29075         PR other/80909
29076         * auto-profile.c (get_function_decl_from_block): Fix
29077         parenthesis.
29078
29079 2017-05-30  Richard Biener  <rguenther@suse.de>
29080
29081         PR middle-end/80876
29082         * cfgexpand.c (expand_gimple_cond): Fixup preserving loops again.
29083
29084 2017-05-30  Martin Liska  <mliska@suse.cz>
29085
29086         * dumpfile.c: Use newly added macro DUMP_FILE_INFO.
29087         * dumpfile.h (struct dump_file_info): Remove ctors.
29088
29089 2017-05-30  Martin Liska  <mliska@suse.cz>
29090
29091         * predict.def: Fix GNU coding style.
29092
29093 2017-05-29  Max Filippov  <jcmvbkbc@gmail.com>
29094
29095         * config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
29096         Mark 'to' argument with ATTRIBUTE_UNUSED.
29097
29098 2017-05-29  Max Filippov  <jcmvbkbc@gmail.com>
29099
29100         * config/xtensa/xtensa.c (xtensa_emit_call): Use
29101         HOST_WIDE_INT_PRINT_HEX instead of 0x%lx format string.
29102         (print_operand): Use HOST_WIDE_INT_PRINT_DEC instead of %ld
29103         format string.
29104
29105 2017-05-29  Eric Botcazou  <ebotcazou@adacore.com>
29106
29107         * doc/install.texi (Options specification): Restore entry of
29108         --enable-sjlj-exceptions.
29109
29110 2017-05-27  Michael Eager  <eager@eagercon.com>
29111
29112         Revert:
29113         2016-01-21  Ajit Agarwal  <ajitkum@xilinx.com>
29114
29115         See https://gcc.gnu.org/ml/gcc/2017-05/msg00221.html.
29116
29117         * config/microblaze/microblaze.h
29118         (FIXED_REGISTERS): Update in macro.
29119         (CALL_USED_REGISTERS): Update in macro.
29120
29121 2017-05-27  François-Xavier Coudett  <fxcoudert@gcc.gnu.org>
29122
29123         * doc/install.texi: Add links to macOS binary distributions.
29124
29125 2017-05-27  Jakub Jelinek  <jakub@redhat.com>
29126
29127         PR bootstrap/80887
29128         Revert:
29129         2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
29130
29131         * match.pd ((A +- CST1) +- CST2): Allow some conversions.
29132
29133 2017-05-26  Martin Liska  <mliska@suse.cz>
29134
29135         * dumpfile.h (enum dump_kind): Renumber TDF_* flags to be contiguous.
29136
29137 2017-05-26  Martin Liska  <mliska@suse.cz>
29138
29139         * cfg.c (check_bb_profile): Do not use TDF_COMMENT and print
29140         always leading ';; '.
29141         (dump_bb_info): Likewise.
29142         (brief_dump_cfg): Likewise.
29143         * cfgrtl.c (print_rtl_with_bb): Do not use TDF_COMMENT.
29144         * dumpfile.c: Remove usage of TDF_VERBOSE.
29145         * dumpfile.h (enum dump_kind): Likewise.
29146         (dump_gimple_bb_header): Do not use TDF_COMMENT.
29147         * print-tree.c (debug_verbose): Remove.
29148         * tree-cfg.c (gimple_dump_cfg): Do not use TDF_COMMENT.
29149         (dump_function_to_file): Remove dumps guarded with TDF_VERBOSE.
29150         * tree-diagnostic.c (default_tree_printer): Replace
29151         TDF_DIAGNOSTIC with TDF_SLIM.
29152
29153 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
29154
29155         * tree-vect-loop-manip.c (create_intersect_range_checks_index): Pass
29156         in parameter loop, rather than loop_vinfo.
29157         (create_intersect_range_checks): Ditto.
29158         (vect_create_cond_for_alias_checks): Update call to above functions.
29159
29160 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
29161
29162         PR tree-optimization/80815
29163         * tree-data-ref.c (prune_runtime_alias_test_list): Simplify condition
29164         for merging runtime alias checks.  Handle negative DR_STEPs.
29165
29166 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
29167
29168         * tree-vect-data-refs.c (Operator==, comp_dr_with_seg_len_pair):
29169         Move from ...
29170         * tree-data-ref.c (Operator==, comp_dr_with_seg_len_pair): To here.
29171         * tree-vect-data-refs.c (vect_prune_runtime_alias_test_list): Factor
29172         out code pruning runtime alias checks.
29173         * tree-data-ref.c (prune_runtime_alias_test_list): New function
29174         factored out from above.
29175         * tree-vectorizer.h (struct dr_with_seg_len, dr_with_seg_len_pair_t):
29176         Move from ...
29177         * tree-data-ref.h (struct dr_with_seg_len, dr_with_seg_len_pair_t):
29178         ... to here.
29179         (prune_runtime_alias_test_list): New decalaration.
29180
29181 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
29182
29183         * tree-vect-data-refs.c (compare_tree): Rename and move ...
29184         * tree-data-ref.c (data_ref_compare_tree): ... to here.
29185         * tree-data-ref.h (data_ref_compare_tree): New decalaration.
29186         * tree-vect-data-refs.c (dr_group_sort_cmp): Update uses.
29187         (operator==, comp_dr_with_seg_len_pair): Ditto.
29188         (vect_prune_runtime_alias_test_list): Ditto.
29189
29190 2017-05-26  Martin Liska  <mliska@suse.cz>
29191
29192         PR ipa/80663
29193         * params.def: Bound partial-inlining-entry-probability param.
29194
29195 2017-05-26  Marek Polacek  <polacek@redhat.com>
29196
29197         PR sanitizer/80875
29198         * fold-const.c (fold_binary_loc) <case MULT_EXPR>: Check if OP1
29199         can be negated.
29200
29201 2017-05-26  Richard Biener  <rguenther@suse.de>
29202
29203         PR tree-optimization/80842
29204         * tree-ssa-ccp.c (set_lattice_value): Always meet with the old
29205         value.
29206
29207 2017-05-26  Richard Biener  <rguenther@suse.de>
29208
29209         PR tree-optimization/80844
29210         * tree-vectorizer.c (adjust_simduid_builtins): Propagate results.
29211
29212 2017-05-25  Sebastian Peryt  <sebastian.peryt@intel.com>
29213
29214         * doc/md.texi (Machine Constraints): Update x86 family
29215         machine constraints section to match 'config/i386/constraints.md'.
29216
29217 2017-05-25  Volker Reichelt  <v.reichelt@netcologne.de>
29218
29219         * doc/invoke.texi (-Wcatch-value=): Document new warning option.
29220
29221 2017-05-25  Nathan Sidwell  <nathan@acm.org>
29222
29223         * doc/invoke.texi (--enable-languages): Update documentation.
29224
29225 2017-05-25  Martin Liska  <mliska@suse.cz>
29226
29227         * dumpfile.c: Add TDF_FOLDING.
29228         * dumpfile.h (enum dump_kind): Likewise.
29229         * genmatch.c (dt_simplify::gen_1): Use it.
29230
29231 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
29232
29233         * match.pd (view_convert (convert@0 @1)): Handle zero-extension.
29234
29235 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
29236
29237         * match.pd ((A +- CST1) +- CST2): Allow some conversions.
29238         * tree.c (drop_tree_overflow): Handle COMPLEX_CST and VECTOR_CST.
29239
29240 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
29241
29242         * fold-const.c (fold_binary_loc) [(A & C) == D]: Remove transformation.
29243         * match.pd (X == C): Rewrite it here.
29244         (with_possible_nonzero_bits, with_possible_nonzero_bits2,
29245         with_certain_nonzero_bits2): New predicates.
29246         * tree-ssanames.c (get_nonzero_bits): Handle INTEGER_CST.
29247
29248 2017-05-24  Nathan Sidwell  <nathan@acm.org>
29249
29250         * lto-streamer-in.c (lto_input_data_block): Adjust T const cast to
29251         avoid warning.
29252
29253         * auto-profile.c (afdo_propagate): Adjust T const cast to avoid
29254         warning.
29255
29256 2017-05-24  Segher Boessenkool  <segher@kernel.crashing.org>
29257
29258         * config/powerpcspe: New port.  Files are copied from the rs6000
29259         port, with "rs6000" in filenames replaced by "powerpcspe".
29260
29261 2017-05-24  Wilco Dijkstra  <wdijkstr@arm.com>
29262
29263         PR rtl-optimization/80754
29264         * lra-remat.c (do_remat): Add overlap checks for dst_regno.
29265
29266 2017-05-24  Sheldon Lobo  <smlobo@sheldon.us.oracle.com>
29267
29268         * config/sparc/sparc.md (length): Return the correct value for -mflat
29269         sibcalls to match output_sibcall.
29270
29271 2017-05-24  Segher Boessenkool  <segher@kernel.crashing.org>
29272
29273         PR bootstrap/80860
29274         PR bootstrap/80843
29275         * config/rs6000/rs6000.c (struct machine_function): Add new field
29276         n_components.
29277         (rs6000_get_separate_components): Init that field, use it.
29278         (rs6000_components_for_bb): Use the field.
29279
29280 2017-05-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>
29281
29282         * config/arm/arm.c (arm_expand_prologue): Fix typo in comment.
29283
29284 2017-05-24  Peter Bergner  <bergner@vnet.ibm.com>
29285
29286         PR middle-end/80823
29287         * tree-cfg.c (group_case_labels_stmt): Delete increment of "i";
29288
29289 2017-05-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29290
29291         PR target/80725
29292         * config/s390/s390.c (s390_check_qrst_address): Check incoming
29293         address against address_operand predicate.
29294         * config/s390/s390.md ("*indirect_jump"): Swap alternatives.
29295
29296 2017-05-24  Eric Botcazou  <ebotcazou@adacore.com>
29297
29298         * var-tracking.c (track_expr_p): Do not return 0 for tracked record
29299         parameters passed indirectly.
29300
29301 2017-05-23  Uros Bizjak  <ubizjak@gmail.com>
29302
29303         * config/i386/i386.md (*movdi_internal): Remove SSE4
29304         alternative 18 (?r, *v).  Update insn attributes.
29305         (*movsi_internal): Remove SSE4 alternative 13 (?r, *v).
29306         Update insn attributes.
29307         (*zero_extendsidi2): Remove SSE4 alternative (?r, *x).
29308         Update insn attributes.
29309         * config/i386/sse.md (vec_extract<ssevecmodelower>_0): Remove SSE4
29310         alternative 1 (r, v). Remove isa attribute.
29311         * config/i386/i386.c (dimode_scalar_chain::make_vector_copies):
29312         Always move value through stack for !TARGET_INTER_UNIT_MOVES_TO_VEC
29313         and !TARGET_INTER_UNIT_MOVES_TO_VEC targets.
29314
29315 2017-05-23  Tom de Vries  <tom@codesourcery.com>
29316
29317         * doc/sourcebuild.texi (Directives, Verify compiler message): Document
29318         dg-line directive.
29319
29320 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
29321
29322         * cgraphunit.c (symbol_table::process_new_functions): Update.
29323         * ipa-fnsummary.c (pass_data_inline_parameters): Remove.
29324         (inline_generate_summary): Rename to ...
29325         (ipa_fn_summary_generate): ... this one.
29326         (inline_read_summary): Rename to ...
29327         (ipa_fn_summary_read): ... this one.
29328         (inline_write_summary): Rename to ...
29329         (ipa_fn_summary_write): ... this one.
29330         (inline_free_summary): Rename to ...
29331         (ipa_free_fn_summary): ... this one.
29332         (pass_data_local_fn_summary, pass_local_fn_summary,
29333         make_pass_local_fn_summary, pass_data_ipa_free_fn_summary,
29334         pass_ipa_free_fn_summary, make_pass_ipa_free_fn_summary,
29335         pass_data_ipa_fn_summary, pass_ipa_fn_summary,
29336         make_pass_ipa_fn_summary): New.
29337         * ipa-fnsummary.h (inline_generate_summary, inline_read_summary,
29338         inline_write_summary, inline_free_summary): Remove.
29339         (ipa_free_fn_summary) : New.
29340         * ipa-inline.c (ipa_inline): Update.
29341         (pass_ipa_inline): Do not generate summaries.
29342         * ipa.c (pass_data_ipa_free_fn_summary, pass_ipa_free_fn_summary):
29343         Remove.
29344         * passes.def: Replace pass_inline_parameters by pass_local_fn_summary
29345         and add pass_ipa_fn_summary.
29346         * tree-pass.h (make_pass_ipa_fn_summary, make_pass_local_fn_summary):
29347         New.
29348         (make_pass_inline_parameters): Remove.
29349
29350 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
29351
29352         * omp-low.c (struct omp_context): Remove "default_kind" member.
29353         Adjust all users.
29354
29355         * omp-offload.c (execute_oacc_device_lower): Remove the
29356         parallelism dimensions function attributes for unparallelized
29357         OpenACC kernels constructs.
29358
29359 2017-05-23  Martin Liska  <mliska@suse.cz>
29360
29361         * cgraph.c (cgraph_node::get_create): Use symtab_node::dump_{asm_,}name
29362         functions.
29363         (cgraph_edge::make_speculative): Likewise.
29364         (cgraph_edge::resolve_speculation): Likewise.
29365         (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
29366         (cgraph_node::dump): Likewise.
29367         * cgraph.h: Likewise.
29368         * cgraphunit.c (analyze_functions): Likewise.
29369         (symbol_table::compile): Likewise.
29370         * ipa-cp.c (print_all_lattices): Likewise.
29371         (determine_versionability): Likewise.
29372         (initialize_node_lattices): Likewise.
29373         (ipcp_verify_propagated_values): Likewise.
29374         (estimate_local_effects): Likewise.
29375         (update_profiling_info): Likewise.
29376         (create_specialized_node): Likewise.
29377         (perhaps_add_new_callers): Likewise.
29378         (decide_about_value): Likewise.
29379         (decide_whether_version_node): Likewise.
29380         (identify_dead_nodes): Likewise.
29381         (ipcp_store_bits_results): Likewise.
29382         * ipa-devirt.c (dump_targets): Likewise.
29383         (ipa_devirt): Likewise.
29384         * ipa-icf.c (sem_item::dump): Likewise.
29385         (sem_function::equals): Likewise.
29386         (sem_variable::equals): Likewise.
29387         (sem_item_optimizer::read_section): Likewise.
29388         (sem_item_optimizer::execute): Likewise.
29389         (congruence_class::dump): Likewise.
29390         * ipa-inline-analysis.c (dump_ipa_call_summary): Likewise.
29391         (dump_inline_summary): Likewise.
29392         (estimate_node_size_and_time): Likewise.
29393         (inline_analyze_function): Likewise.
29394         * ipa-inline-transform.c (inline_call): Likewise.
29395         * ipa-inline.c (report_inline_failed_reason): Likewise.
29396         (want_early_inline_function_p): Likewise.
29397         (edge_badness): Likewise.
29398         (update_edge_key): Likewise.
29399         (inline_small_functions): Likewise.
29400         * ipa-profile.c (ipa_profile): Likewise.
29401         * ipa-prop.c (ipa_print_node_jump_functions): Likewise.
29402         (ipa_make_edge_direct_to_target): Likewise.
29403         (remove_described_reference): Likewise.
29404         (ipa_impossible_devirt_target): Likewise.
29405         (propagate_controlled_uses): Likewise.
29406         (ipa_print_node_params): Likewise.
29407         (ipcp_transform_function): Likewise.
29408         * ipa-pure-const.c (pure_const_read_summary): Likewise.
29409         (propagate_pure_const): Likewise.
29410         * ipa-reference.c (generate_summary): Likewise.
29411         (read_write_all_from_decl): Likewise.
29412         (propagate): Likewise.
29413         (ipa_reference_read_optimization_summary): Likewise.
29414         * ipa-utils.c (ipa_merge_profiles): Likewise.
29415         * ipa.c (walk_polymorphic_call_targets): Likewise.
29416         (symbol_table::remove_unreachable_nodes): Likewise.
29417         (ipa_single_use): Likewise.
29418         * passes.c (execute_todo): Likewise.
29419         * predict.c (drop_profile): Likewise.
29420         * symtab.c (symtab_node::get_dump_name): New function.
29421         (symtab_node::dump_name): Likewise.
29422         (symtab_node::dump_asm_name): Likewise.
29423         (symtab_node::dump_references): Likewise.
29424         (symtab_node::dump_referring): Likewise.
29425         (symtab_node::dump_base): Likewise.
29426         (symtab_node::debug_symtab): Likewise.
29427         * tree-sra.c (convert_callers_for_node): Likewise.
29428         * tree-ssa-structalias.c (ipa_pta_execute): Likewise.
29429         * value-prof.c (init_node_map): Likewise.
29430
29431 2017-05-23  Martin Liska  <mliska@suse.cz>
29432
29433         * cgraph.h: Move symtab_node::dump_table to symbol_table::dump
29434         and symtab_node::debug_symtab to symbol_table::debug.
29435         * cgraphunit.c (analyze_functions): Use the renamed function.
29436         (symbol_table::compile): Likewise.
29437         * ipa-cp.c (ipcp_verify_propagated_values): Likewise.
29438         * ipa-icf.c (sem_item_optimizer::execute): Likewise.
29439         * passes.c (execute_todo): Likewise.
29440         * symtab.c (symbol_table::dump): New function.
29441         * tree-ssa-structalias.c (ipa_pta_execute): Use the renamed function.
29442
29443 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
29444
29445         * ipa-fnsummary.c (estimate_node_size_and_time): Do not sanity check
29446         that nonconst implies exec.
29447
29448 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
29449
29450         * ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list,
29451         inline_edge_removal_hook, inline_edge_duplication_hook): Remove.
29452         (inline_edge_summary_vec): Turn into ...
29453         (ipa_call_summaries): ... this one.
29454         (redirect_to_unreachable, edge_set_predicate,
29455         evaluate_properties_for_edge, inline_summary_alloc,
29456         reset_ipa_call_summary, reset_inline_summary,
29457         inline_summary_t::duplicate): Update.
29458         (inline_edge_duplication_hook): Turn to ...
29459         (ipa_call_summary_t::duplicate): ... this one.
29460         (inline_edge_removal_hook): Turn to ...
29461         (ipa_call_summary_t::remove): ... this one.
29462         (dump_inline_edge_summary): Turn to ...
29463         (dump_ipa_call_summary): ... this one.
29464         (estimate_function_body_sizes): Update.
29465         (inline_update_callee_summaries): Update.
29466         (remap_edge_change_prob): Update.
29467         (remap_edge_summaries): Update.
29468         (inline_merge_summary): Update.
29469         (do_estimate_edge_time): Update.
29470         (inline_generate_summary): Update.
29471         (inline_read_section): Update.
29472         (inline_read_summary): Update.
29473         (inline_free_summary): Update.
29474         * ipa-inline.c (can_inline_edge_p): Update.
29475         (compute_inlined_call_time): Update.
29476         (want_inline_small_function_p): Update.
29477         (edge_badness): Update.
29478         (early_inliner): Update.
29479         * ipa-inline.h (inline_edge_summary): Turn to ...
29480         (ipa_call_summary): ... this one.
29481         (ipa_call_summary_t): New class.
29482         (inline_edge_summary_t, inline_edge_summary_vec): Remove.
29483         (ipa_call_summaries): New.
29484         (inline_edge_summary): Remove.
29485         (estimate_edge_growth): Update.
29486         * ipa-profile.c (ipa_propagate_frequency_1): Update.
29487         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
29488         * ipa-split.c (execute_split_functions): Update.
29489         * ipa.c (symbol_table::remove_unreachable_nodes): Update.
29490
29491 2017-05-23  Tom de Vries  <tom@codesourcery.com>
29492
29493         * doc/sourcebuild.texi (Effective-Target Keywords, Other hardware
29494         attributes): Document rdrand effective target.
29495
29496 2017-05-23  Tom de Vries  <tom@codesourcery.com>
29497
29498         * doc/sourcebuild.texi (Effective-Target Keywords, Other hardware
29499         attributes): Sort alphabetically.
29500
29501 2017-05-23  Georg-Johann Lay  <avr@gjlay.de>
29502
29503         * config/avr/genmultilib.awk: Use gsub instead of gensub.
29504
29505 2017-05-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
29506
29507         PR target/80718
29508         * config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Split
29509         V2DF/V2DI splat into two separate patterns, one that handles
29510         registers, and the other that only handles memory.  Drop support
29511         for splatting from a GPR on ISA 2.07 and then splitting the
29512         splat into direct move and splat.
29513         (vsx_splat_<mode>_reg): Likewise.
29514         (vsx_splat_<mode>_mem): Likewise.
29515
29516 2017-05-22  Segher Boessenkool  <segher@kernel.crashing.org>
29517
29518         * cfgcleanup.c (bb_is_just_return): Allow CLOBBERs.
29519
29520 2017-05-22  Jakub Jelinek  <jakub@redhat.com>
29521
29522         PR middle-end/80809
29523         * omp-low.c (finish_taskreg_remap): New function.
29524         (finish_taskreg_scan): If unit size of ctx->record_type
29525         is non-constant, unshare the size expression and replace
29526         decls in it with possible outer var refs.
29527
29528         PR middle-end/80809
29529         * gimplify.c (omp_add_variable): For GOVD_DEBUG_PRIVATE use
29530         GOVD_SHARED rather than GOVD_PRIVATE with it.
29531         (gimplify_adjust_omp_clauses_1, gimplify_adjust_omp_clauses): Expect
29532         GOVD_SHARED rather than GOVD_PRIVATE with GOVD_DEBUG_PRIVATE.
29533
29534         PR middle-end/80853
29535         * omp-low.c (lower_reduction_clauses): Pass OMP_CLAUSE_PRIVATE
29536         as last argument to build_outer_var_ref for pointer bases of array
29537         section reductions.
29538
29539 2017-05-19  Martin Sebor  <msebor@redhat.com>
29540
29541         * print-tree.c (print_node): Print DECL_READ_P flag.
29542
29543 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
29544
29545         * Makefile.in: Add ipa-fnsummary.o and ipa-fnsummary.h
29546         * auto-profile.c: Replace ipa-inline.h by ipa-fnsummary.h
29547         * cgraph.c: Likewise.
29548         * cgraphunit.c: Likewise.
29549         * gengtype.c: Likewise.
29550         * ipa-cp.c: Likewise.
29551         * ipa-devirt.c: Likewise.
29552         * ipa-icf.c: Likewise.
29553         * ipa-predicate.c: Likewise.
29554         * ipa-profile.c: Likewise.
29555         * ipa-prop.c: Likewise.
29556         * ipa-split.c: Likewise.
29557         * ipa.c: Likewise.
29558         * ipa-inline-analysis.c (inline_summaries, ipa_call_summaries,
29559         edge_predicate_pool, dump_inline_hints,
29560         inline_summary::account_size_time, redirect_to_unreachable,
29561         edge_set_predicate, set_hint_predicate,
29562         evaluate_conditions_for_known_args, evaluate_properties_for_edge,
29563         inline_summary_alloc, ipa_call_summary::reset, inline_summary::reset,
29564         inline_summary_t::remove, remap_hint_predicate_after_duplication,
29565         inline_summary_t::duplicate, ipa_call_summary_t::duplicate,
29566         ipa_call_summary_t::remove, initialize_growth_caches,
29567         free_growth_caches, dump_ipa_call_summary, dump_inline_summary,
29568         debug_inline_summary, dump_inline_summaries, initialize_inline_failed,
29569         mark_modified, unmodified_parm_1, unmodified_parm,
29570         unmodified_parm_or_parm_agg_item, eliminated_by_inlining_prob,
29571         set_cond_stmt_execution_predicate, set_switch_stmt_execution_predicate,
29572         compute_bb_predicates, will_be_nonconstant_expr_predicate,
29573         will_be_nonconstant_predicate, record_modified_bb_info,
29574         get_minimal_bb, record_modified, param_change_prob,
29575         phi_result_unknown_predicate, predicate_for_phi_result,
29576         array_index_predicate, clobber_only_eh_bb_p, fp_expression_p,
29577         estimate_function_body_sizes, compute_inline_parameters,
29578         compute_inline_parameters_for_curren, pass_data_inline_parameters,
29579         estimate_node_size_and_time, estimate_ipcp_clone_size_and_time,
29580         inline_update_callee_summaries, remap_edge_change_prob,
29581         remap_edge_summaries, remap_hint_predicate, inline_merge_summary,
29582         inline_update_overall_summary, inline_indirect_intraprocedural_analysis,
29583         inline_analyze_function, inline_summary_t::insert,
29584         inline_generate_summary, read_ipa_call_summary, inline_read_section,
29585         inline_read_summary, write_ipa_call_summary, inline_write_summary,
29586         inline_free_summary): Move to ipa-fnsummary.h
29587         (predicate_t): Remove.
29588         * ipa-fnsummary.c: New file.
29589         * ipa-inline.h:  Do not include sreal.h and ipa-predicate.h
29590         (enum inline_hints_vals, inline_hints, agg_position_info,
29591         INLINE_SIZE_SCALE, size_time_entry, inline_summary, inline_summary_t,
29592         inline_summaries, ipa_call_summary, ipa_call_summary_t,
29593         ipa_call_summaries, debug_inline_summary, dump_inline_summaries,
29594         dump_inline_summary, dump_inline_hints, inline_generate_summary,
29595         inline_read_summary, inline_write_summary, inline_free_summary,
29596         inline_analyze_function, initialize_inline_failed,
29597         inline_merge_summary, inline_update_overall_summary,
29598         compute_inline_parameters): Move to ipa-fnsummary.h
29599         * ipa-fnsummary.h: New file.
29600         * ipa-inline-transform.h: Include ipa-inline.h.
29601         * ipa-inline.c: LIkewise.
29602
29603 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
29604
29605         * ipa-inline.c (edge_badness): Use inlined_time instead of
29606         inline_summaries->get.
29607
29608 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
29609
29610         * ipa-inline.c (edge_badness): Use estimate_size_after_inlining.
29611
29612 2017-05-22  Nathan Sidwell  <nathan@acm.org>
29613
29614         * doc/invoke.texi (fdump-translation-unit): Delete documentation.
29615         (fdump-lang): Document 'raw' option.
29616         * dumpfile.h (TDI_tu): Delete.
29617         * dumpfile.c (dump_files): Remove translation-unit.
29618         (FIRST_AUTO_NUMBERED_DUMP): Decrement.
29619
29620 2017-05-22  Georg-Johann Lay  <avr@gjlay.de>
29621
29622         * config/avr/t-avr (AWK) [t-multilib]: Remove "-v FORMAT=Makefile"
29623         command option from $(AWK) call.
29624         * config/avr/genmultilib.awk: Simplify and rewrite so that it
29625         generates MULTILIB_REQUIRED instead of MULTILIB_EXCEPTIONS.
29626         [FORMAT]: Remove handling of variable.
29627         * config/avr/t-multilib: Regenerate.
29628
29629 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
29630
29631         * ipa-inline-analysis.c (inline_summary::reset): Do not reset
29632         self_time.
29633         (dump_inline_summary): Do not print self_time.
29634         (estimate_function_body_sizes): Do not set self_time.
29635         (compute_inline_parameters): Likewise.
29636         (inline_read_section, inline_write_summary): Do not stream self_time.
29637         * ipa-inline.h (inline_summary): Drop self_time.
29638
29639 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
29640
29641         * ipa-inline-analysis.c (account_size_time): Rename to ...
29642         (inline_summary::account_size_time): ... this one.
29643         (reset_ipa_call_summary): Turn to ...
29644         (ipa_call_summary::reset): ... this one.
29645         (reset_inline_summary): Turn to ...
29646         (inline_summary::reset): ... this one.
29647         (inline_summary_t::remove): Update.
29648         (inline_summary_t::duplicate): Update.
29649         (ipa_call_summary_t::remove): Update.
29650         (dump_inline_summary): Update.
29651         (estimate_function_body_sizes): Update.
29652         (compute_inline_parameters): Update.
29653         (estimate_node_size_and_time): Update.
29654         (inline_merge_summary): Update.
29655         (inline_update_overall_summary): Update.
29656         (inline_read_section): Update.
29657         (inline_write_summary): Update.
29658         * ipa-inline.h (inline_summary): Rename entry to size_time_table;
29659         add account_size_time and reset member functions.
29660         (ipa_call_summary): Add reset function.
29661         * ipa-predicate.h (predicate::operator &): Constify.
29662
29663 2017-05-22  Richard Biener  <rguenther@suse.de>
29664
29665         * df-scan.c (df_insn_refs_verify): Speedup when not verifying.
29666
29667 2017-05-19  Jason Merrill  <jason@redhat.com>
29668
29669         * tree.c (make_tree_vec_stat, grow_tree_vec_stat): Use size_t.
29670
29671 2017-05-19  Marek Polacek  <polacek@redhat.com>
29672
29673         PR sanitizer/80800
29674         * fold-const.c (extract_muldiv_1) <case TRUNC_DIV_EXPR>: Add
29675         TYPE_OVERFLOW_WRAPS checks.
29676
29677 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
29678
29679         * tree-core.h (enum omp_clause_default_kind): Add
29680         "OMP_CLAUSE_DEFAULT_PRESENT".
29681         * tree-pretty-print.c (dump_omp_clause): Handle it.
29682         * gimplify.c (enum gimplify_omp_var_data): Add
29683         "GOVD_MAP_FORCE_PRESENT".
29684         (gimplify_adjust_omp_clauses_1): Map it to
29685         "GOMP_MAP_FORCE_PRESENT".
29686         (oacc_default_clause): Handle "OMP_CLAUSE_DEFAULT_PRESENT".
29687
29688         * gimplify.c (oacc_default_clause): Clarify.
29689
29690 2017-05-19  Nathan Sidwell  <nathan@acm.org>
29691
29692         LANG_HOOK_REGISTER_DUMPS
29693         * toplev.c (general_init): Call register dump lang hook.
29694         * doc/invoke.texi: Document -fdump-lang option family.
29695         * dumpfile.c (dump_files): Remove class dump here.
29696         (FIRST_AUTO_NUMBERED_DUMP): Adjust.
29697         * dumpfile.h (tree_dump_index): Remove TDI_class.
29698         * langhooks-def.h (lhd_register_dumps): Declare.
29699         (LANG_HOOKS_REGISTER_DUMPS): Define.
29700         (LANG_HOOKS_INITIALIZER): Add it.
29701         * langhooks.c (lhd_register_dumps): Define.
29702         * langhooks.h (struct lang_hooks): Add register_dumps.
29703
29704 2017-05-19  Nathan Sidwell  <nathan@acm.org>
29705
29706         * context.h (context::set_passes): New.
29707         * context.c (context::context): Do not create pass manager.
29708         * toplev.c (general_init): Create pass manager here.
29709
29710 2017-05-19  Segher Boessenkool  <segher@kernel.crashing.org>
29711
29712         * config/rs6000/rs6000.md (splitter to load of -1 and mask): Don't
29713         use this splitter if two add or or instructions would also work for
29714         the constant we want to generate.
29715
29716 2017-05-19  Richard Biener  <rguenther@suse.de>
29717
29718         PR build/80821
29719         * genmatch.c (dt_node::gen_kids_1): Add missing scope around
29720         predicate evaluation.
29721
29722 2017-05-19  Jan Hubicka  <hubicka@ucw.cz>
29723
29724         * ipa-inline.h (ipa_call_summary): Turn sizes into signed;
29725         add ctor.
29726         * ipa-inline.c (want_inline_small_function_p): Do not cast to
29727         unsigned.
29728
29729 2017-05-19  Jan Hubicka  <hubicka@ucw.cz>
29730
29731         * ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list,
29732         inline_edge_removal_hook, inline_edge_duplication_hook): Remove.
29733         (inline_edge_summary_vec): Turn into ...
29734         (ipa_call_summaries): ... this one.
29735         (redirect_to_unreachable, edge_set_predicate,
29736         evaluate_properties_for_edge, inline_summary_alloc,
29737         reset_ipa_call_summary, reset_inline_summary,
29738         inline_summary_t::duplicate): Update.
29739         (inline_edge_duplication_hook): Turn to ...
29740         (ipa_call_summary_t::duplicate): ... this one.
29741         (inline_edge_removal_hook): Turn to ...
29742         (ipa_call_summary_t::remove): ... this one.
29743         (dump_inline_edge_summary): Turn to ...
29744         (dump_ipa_call_summary): ... this one.
29745         (estimate_function_body_sizes): Update.
29746         (inline_update_callee_summaries): Update.
29747         (remap_edge_change_prob): Update.
29748         (remap_edge_summaries): Update.
29749         (inline_merge_summary): Update.
29750         (do_estimate_edge_time): Update.
29751         (inline_generate_summary): Update.
29752         (inline_read_section): Update.
29753         (inline_read_summary): Update.
29754         (inline_free_summary): Update.
29755         * ipa-inline.c (can_inline_edge_p): Update.
29756         (compute_inlined_call_time): Update.
29757         (want_inline_small_function_p): Update.
29758         (edge_badness): Update.
29759         (early_inliner): Update.
29760         * ipa-inline.h (inline_edge_summary): Turn to ...
29761         (ipa_call_summary): ... this one.
29762         (ipa_call_summary_t): New class.
29763         (inline_edge_summary_t, inline_edge_summary_vec): Remove.
29764         (ipa_call_summaries): New.
29765         (inline_edge_summary): Remove.
29766         (estimate_edge_growth): Update.
29767         * ipa-profile.c (ipa_propagate_frequency_1): Update.
29768         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
29769         * ipa-split.c (execute_split_functions): Update.
29770         * ipa.c (symbol_table::remove_unreachable_nodes): Update.
29771
29772 2017-05-19  Richard Biener  <rguenther@suse.de>
29773
29774         PR middle-end/80764
29775         * cfgexpand.c (expand_gimple_cond): Fix loop fixup.
29776
29777 2017-05-18  Segher Boessenkool  <segher@kernel.crashing.org>
29778
29779         * config/rs6000/rs6000.c (struct machine_function): Add field
29780         fpr_is_wrapped_separately.
29781         (rs6000_get_separate_components): Use 64 components.  Handle the
29782         new FPR components.
29783         (rs6000_components_for_bb): Handle the FPR components.
29784         (rs6000_emit_prologue_components): Handle the FPR components.
29785         (rs6000_emit_epilogue_components): Handle the FPR components.
29786         (rs6000_set_handled_components): Handle the FPR components.
29787         (rs6000_emit_prologue): Don't output prologue code for those FPRs
29788         that are already separately shrink-wrapped.
29789         (rs6000_emit_epilogue): Don't output epilogue code for those FPRs
29790         that are already separately shrink-wrapped.
29791
29792 2017-05-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
29793
29794         PR target/80510
29795         * config/rs6000/predicates.md (simple_offsettable_mem_operand):
29796         New predicate.
29797
29798         * config/rs6000/rs6000.md (ALTIVEC_DFORM): New iterator.
29799         (define_peephole2 for Altivec d-form load): Add peepholes to catch
29800         cases where the register allocator uses a move and an offsettable
29801         memory operation to/from a FPR register on ISA 2.06/2.07.
29802         (define_peephole2 for Altivec d-form store): Likewise.
29803
29804 2017-05-18  Uros Bizjak  <ubizjak@gmail.com>
29805
29806         PR target/80799
29807         * config/i386/mmx.md (*mov<mode>_internal): Enable
29808         alternatives 11, 12, 13 and 14 also for 32bit targets.
29809         Remove alternatives 15, 16, 17 and 18.
29810         * config/i386/sse.md (vec_concatv2di): Change
29811         alternative (!x, *y) to (x, ?!*Yn).
29812
29813 2017-05-18  Paolo Carlini  <paolo.carlini@oracle.com>
29814
29815         * dumpfile.h (enum dump_kind): Remove stray comma.
29816
29817 2017-05-18  Jan Hubicka  <hubicka@ucw.cz>
29818
29819         * Makefile.in: Add ipa-predicate.o and ipa-predicate.h
29820         * ipa-inline-analysis.c (NUM_CONDITIONS): turn into
29821         predicate::num_conditions
29822         (IS_NOT_CONSTANT): turn into predicate::is_not_constant.
29823         (CHANGED): turn into predicate::changed.
29824         (agg_position_info): Move to ipa-predicate.h
29825         (add_condition, predicate::add_clause, predicate::operator &=,
29826         predicate::or_with, predicate::evaluate, predicate::probability,
29827         dump_condition, dump_clause, predicate::dump,
29828         predicate::remap_after_duplication, predicate::remap_after_inlining,
29829         predicate::stream_in, predicate::stream_out): Move to ipa-predicate.c
29830         (evaluate_conditions_for_known_args): Update.
29831         (set_cond_stmt_execution_predicate): Update.
29832         * ipa-inline.h: Include ipa-predicate.h
29833         (condition, inline_param_summary, conditions, agg_position_info,
29834         predicate): Move to ipa-predicate.h
29835         * ipa-predicate.c: New file.
29836         * ipa-predicate.h: New file.
29837
29838 2017-05-18  Wilco Dijkstra  <wdijkstr@arm.com>
29839
29840         * final.c (leaf_function_p): Check we are not in a sequence.
29841
29842 2017-05-18  Martin Liska  <mliska@suse.cz>
29843
29844         * cfgrtl.c (rtl_verify_edges): Remove usage of TDF_RTL.
29845         * dumpfile.c (dump_register): Use new enum dump_kind.
29846         (get_dump_file_name): Likewise.
29847         (dump_enable_all): Likewise.
29848         (dump_switch_p_1): Likewise.
29849         (enable_rtl_dump_file): Remove usage of TDF_RTL.
29850         * dumpfile.h (enum dump_kind): New enum type.
29851         (struct dump_file_info): Create constructor and
29852         format fields and comments.
29853         * passes.c (pass_manager::register_one_dump_file):
29854         Use num dump_kind.
29855         * statistics.c (statistics_early_init): Likewise.
29856         * tree-ssa-loop-prefetch.c (dump_mem_details): Replace
29857         TDF_TREE with TDF_SLIM.
29858         (gather_memory_references_ref): Likewise.
29859
29860 2017-05-18  Martin Liska  <mliska@suse.cz>
29861
29862         * vec.h (struct vnull): Use it.
29863
29864 2017-05-18  Jan Hubicka  <hubicka@ucw.cz>
29865
29866         * ipa-inline-analysis.c (predicate_conditions): Move to ipa-inline.h
29867         (true_predicate, false_predicate, true_predicate_p,
29868         false_predicate_p): Remove.
29869         (single_cond_predicate, not_inlined_predicate): Turn to member function
29870         in ipa-inline.h
29871         (add_condition): Update.
29872         (add_clause): Turn to...
29873         (predicate::add_clause): ... this one; update; allow passing NULL
29874         as parameter.
29875         (and_predicates): Turn to ...
29876         (predicate::operator &=): ... this one.
29877         (predicates_equal_p): Move to predicate::operator == in ipa-inline.h
29878         (or_predicates): Turn to ...
29879         (predicate::or_with): ... this one.
29880         (evaluate_predicate): Turn to ...
29881         (predicate::evaluate): ... this one.
29882         (predicate_probability): Turn to ...
29883         (predicate::probability): ... this one.
29884         (dump_condition): Update.
29885         (dump_predicate): Turn to ...
29886         (predicate::dump): ... this one.
29887         (account_size_time): Update.
29888         (edge_set_predicate): Update.
29889         (set_hint_predicate): UPdate.
29890         (evaluate_conditions_for_known_args): Update.
29891         (evaluate_properties_for_edge): Update.
29892         (remap_predicate_after_duplication): Turn to...
29893         (predicate::remap_after_duplication): ... this one.
29894         (remap_hint_predicate_after_duplication): Update.
29895         (inline_summary_t::duplicate): UPdate.
29896         (dump_inline_edge_summary): Update.
29897         (dump_inline_summary): Update.
29898         (set_cond_stmt_execution_predicate): Update.
29899         (set_switch_stmt_execution_predicate): Update.
29900         (compute_bb_predicates): Update.
29901         (will_be_nonconstant_expr_predicate): Update.
29902         (will_be_nonconstant_predicate): Update.
29903         (phi_result_unknown_predicate): Update.
29904         (predicate_for_phi_result): Update.
29905         (array_index_predicate): Update.
29906         (estimate_function_body_sizes): Update.
29907         (estimate_node_size_and_time): Update.
29908         (estimate_ipcp_clone_size_and_time): Update.
29909         (remap_predicate): Rename to ...
29910         (predicate::remap_after_inlining): ... this one.
29911         (remap_hint_predicate): Update.
29912         (inline_merge_summary): Update.
29913         (inline_update_overall_summary): Update.
29914         (estimate_size_after_inlining): Update.
29915         (read_predicate): Rename to ...
29916         (predicate::stream_in): ... this one.
29917         (read_inline_edge_summary): Update.
29918         (write_predicate): Rename to ...
29919         (predicate::stream_out): ... this one.
29920         (write_inline_edge_summary): Update.
29921         * ipa-inline.h (MAX_CLAUSES): Turn to predicate::max_clauses.
29922         (clause_t): Turn to uint32_t
29923         (predicate): Turn to class; implement constructor and operators
29924         ==, !=, &
29925         (size_time_entry): Update.
29926         (inline_summary): Update.
29927         (inline_edge_summary): Update.
29928
29929 2017-05-18  Marc Glisse  <marc.glisse@inria.fr>
29930
29931         * fold-const.c (fold_binary_loc): Move transformation...
29932         * match.pd (C - X CMP X): ... here.
29933
29934 2017-05-18  Sheldon Lobo  <sheldon.lobo@oracle.com>
29935
29936         * config/sparc/sparc.c (sparc_option_override): Set function
29937         alignment for -mcpu=niagara7 to 64 to match the I$ line.
29938         * config/sparc/sparc.h (BRANCH_COST): Set the SPARC M7 branch
29939         latency to 1.
29940         * config/sparc/sparc.h (BRANCH_COST): Set the SPARC T4 branch
29941         latency to 2.
29942         * config/sparc/sol2.h: Fix a ASM_CPU32_DEFAULT_SPEC typo.
29943
29944 2017-05-18  Marek Polacek  <polacek@redhat.com>
29945
29946         PR sanitizer/80797
29947         * ubsan.c (instrument_null): Unwrap ADDR_EXPRs.
29948         (pass_ubsan::execute): Call gimple_assign_single_p instead of
29949         gimple_assign_load_p.
29950
29951 2017-05-17  Segher Boessenkool  <segher@kernel.crashing.org>
29952
29953         PR middle-end/80692
29954         * real.c (do_compare): Give decimal_do_compare preference over
29955         comparing just the signs.
29956
29957 2017-05-17  Uros Bizjak  <ubizjak@gmail.com>
29958
29959         * doc/md.texi (Canonicalization of Instructions): Describe the
29960         canonical form of instructions that inherently set a condition
29961         code register.
29962
29963 2017-05-17  Peter Bergner  <bergner@vnet.ibm.com>
29964
29965         PR middle-end/80775
29966         * tree-cfg.c: Move deletion of unreachable case statements to after
29967         the merging of consecutive case labels.
29968
29969 2017-05-17  Thomas Preud'homme  <thomas.preudhomme@arm.com>
29970
29971         * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Refer
29972         readers to __gnu_cmse_nonsecure_call libcall for saving, clearing and
29973         restoring of callee-saved registers.
29974
29975 2017-05-17  Eric Botcazou  <ebotcazou@adacore.com>
29976
29977         * compare-elim.c (equivalent_reg_at_start): Adjust outdated comment.
29978         * config/visium/visium.c (single_set_and_flags): Likewise.
29979         * config/visium/visium.md (Substitutions): Likewise.
29980
29981 2017-05-17  Martin Liska  <mliska@suse.cz>
29982
29983         * cfg.c: Introduce dump_flags_t type and
29984         use it instead of int type.
29985         * cfg.h: Likewise.
29986         * cfghooks.c: Likewise.
29987         * cfghooks.h (struct cfg_hooks): Likewise.
29988         * cfgrtl.c: Likewise.
29989         * cfgrtl.h: Likewise.
29990         * cgraph.c (cgraph_node::get_body): Likewise.
29991         * coretypes.h: Likewise.
29992         * domwalk.c: Likewise.
29993         * domwalk.h: Likewise.
29994         * dumpfile.c (struct dump_option_value_info): Likewise.
29995         (dump_enable_all): Likewise.
29996         (dump_switch_p_1): Likewise.
29997         (opt_info_switch_p): Likewise.
29998         * dumpfile.h (enum tree_dump_index): Likewise.
29999         (struct dump_file_info): Likewise.
30000         * genemit.c: Likewise.
30001         * generic-match-head.c: Likewise.
30002         * gengtype.c (open_base_files): Likewise.
30003         * gimple-pretty-print.c: Likewise.
30004         * gimple-pretty-print.h: Likewise.
30005         * graph.c (print_graph_cfg): Likewise.
30006         * graphite-scop-detection.c (dot_all_sese): Likewise.
30007         * ipa-devirt.c (build_type_inheritance_graph): Likewise.
30008         * loop-unroll.c (report_unroll): Likewise.
30009         * passes.c (pass_manager::register_one_dump_file): Likewise.
30010         * print-tree.c: Likewise.
30011         * statistics.c: Likewise.
30012         * tree-cfg.c: Likewise.
30013         * tree-cfg.h: Likewise.
30014         * tree-dfa.c: Likewise.
30015         * tree-dfa.h: Likewise.
30016         * tree-dump.c (dump_function): Likewise.
30017         * tree-dump.h (struct dump_info): Likewise.
30018         * tree-pretty-print.c: Likewise.
30019         * tree-pretty-print.h: Likewise.
30020         * tree-ssa-live.c: Likewise.
30021         * tree-ssa-live.h: Likewise.
30022         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Likewise.
30023         * tree-vect-loop.c: Likewise.
30024         * tree-vect-slp.c: Likewise.
30025
30026 2017-05-16  James Greenhalgh  <james.greenhalgh@arm.com>
30027             Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30028
30029         PR tree-optimization/80457
30030         * tree-vect-stmts.c (vect_model_simple_cost): Model the cost
30031         of all arguments to a statement as scalar_to_vec operations.
30032         (vectorizable_call): Adjust call to vect_model_simple_cost for
30033         new parameter.
30034         (vectorizable_conversion): Likewise.
30035         (vectorizable_assignment): Likewise.
30036         (vectorizable_shift): Likewise.
30037         (vectorizable_operation): Likewise.
30038         (vectorizable_comparison): Likewise.
30039         (vect_is_simple_cond): Record the def types for operands.
30040         (vectorizable_condition): Likewise, call vect_model_simple_cost.
30041         * tree-vectorizer.h (vect_model_simple_cost): Add new parameter
30042         for statement argument count.
30043
30044 2017-05-16  Carl Love  <cel@us.ibm.com>
30045
30046         * config/rs6000/rs6000-c: Add support for built-in functions
30047         vector unsigned long long vec_bperm (vector unsigned long long,
30048                                              vector unsigned char)
30049         vector signed long long vec_mule (vector signed int,
30050                                           vector signed int)
30051         vector unsigned long long vec_mule (vector unsigned int,
30052                                             vector unsigned int)
30053         vector signed long long vec_mulo (vector signed int,
30054                                           vector signed int)
30055         vector unsigned long long vec_mulo (vector unsigned int,
30056                                             vector unsigned int)
30057         vector signed char vec_sldw (vector signed char,
30058                                      vector signed char,
30059                                      const int)
30060         vector unsigned char vec_sldw (vector unsigned char,
30061                                        vector unsigned char,
30062                                        const int)
30063         vector signed short vec_sldw (vector signed short,
30064                                       vector signed short,
30065                                       const int)
30066         vector unsigned short vec_sldw (vector unsigned short,
30067                                         vector unsigned short,
30068                                         const int)
30069         vector signed int vec_sldw (vector signed int,
30070                                     vector signed int,
30071                                     const int)
30072         vector unsigned int vec_sldw (vector unsigned int,
30073                                       vector unsigned int,
30074                                       const int)
30075         vector signed long long vec_sldw (vector signed long long,
30076                                           vector signed long long,
30077                                           const int)
30078         vector unsigned long long vec_sldw (vector unsigned long long,
30079                                             vector unsigned long long,
30080                                             const int)
30081         * config/rs6000/rs6000-c: Add support for built-in functions
30082         * config/rs6000/rs6000-builtin.def: Add definition for SLDW.
30083         * config/rs6000/altivec.h: Add defintion for vec_sldw.
30084         * doc/extend.texi: Update the built-in documentation for the
30085         new built-in functions.
30086
30087 2017-05-16  Marek Polacek  <polacek@redhat.com>
30088
30089         PR sanitizer/80536
30090         PR sanitizer/80386
30091         * tree.c (save_expr): Don't fold the expression.
30092
30093 2017-05-16  Uros Bizjak  <ubizjak@gmail.com>
30094
30095         * config/i386/i386.md (*movsi_internal): Split (?rm,*y) alternative
30096         to (?r,*Yn) and (?m,*y) alternatives, and (?*y,rm) to (?*Ym,r)
30097         and (?*y,m).  Update insn attributes.
30098
30099 2017-05-16  Martin Liska  <mliska@suse.cz>
30100
30101         * cgraph.c (cgraph_edge::resolve_speculation): Add default value for
30102         flags argument of print_gimple_stmt, print_gimple_expr,
30103         print_generic_stmt and print_generic_expr.
30104         * cgraphclones.c (symbol_table::materialize_all_clones): Likewise.
30105         * coretypes.h: Likewise.
30106         * except.c (dump_eh_tree): Likewise.
30107         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
30108         * gimple-pretty-print.h: Likewise.
30109         * gimple-ssa-backprop.c (dump_usage_prefix): Likewise.
30110         (backprop::push_to_worklist): Likewise.
30111         (backprop::pop_from_worklist): Likewise.
30112         (backprop::process_use): Likewise.
30113         (backprop::intersect_uses): Likewise.
30114         (note_replacement): Likewise.
30115         * gimple-ssa-store-merging.c
30116         (pass_store_merging::terminate_all_aliasing_chains): Likewise.
30117         (imm_store_chain_info::coalesce_immediate_stores): Likewise.
30118         (pass_store_merging::execute): Likewise.
30119         * gimple-ssa-strength-reduction.c (dump_candidate): Likewise.
30120         (ssa_base_cand_dump_callback): Likewise.
30121         (dump_incr_vec): Likewise.
30122         (replace_refs): Likewise.
30123         (replace_mult_candidate): Likewise.
30124         (create_add_on_incoming_edge): Likewise.
30125         (create_phi_basis): Likewise.
30126         (insert_initializers): Likewise.
30127         (all_phi_incrs_profitable): Likewise.
30128         (introduce_cast_before_cand): Likewise.
30129         (replace_one_candidate): Likewise.
30130         * gimplify.c (gimplify_expr): Likewise.
30131         * graphite-isl-ast-to-gimple.c (is_valid_rename): Likewise.
30132         (set_rename): Likewise.
30133         (rename_uses): Likewise.
30134         (copy_loop_phi_nodes): Likewise.
30135         (add_close_phis_to_merge_points): Likewise.
30136         (copy_loop_close_phi_args): Likewise.
30137         (copy_cond_phi_args): Likewise.
30138         (graphite_copy_stmts_from_block): Likewise.
30139         (translate_pending_phi_nodes): Likewise.
30140         * graphite-poly.c (print_pdr): Likewise.
30141         (dump_gbb_cases): Likewise.
30142         (dump_gbb_conditions): Likewise.
30143         (print_scop_params): Likewise.
30144         * graphite-scop-detection.c (build_cross_bb_scalars_def): Likewise.
30145         (build_cross_bb_scalars_use): Likewise.
30146         (gather_bbs::before_dom_children): Likewise.
30147         * hsa-dump.c (dump_hsa_immed): Likewise.
30148         * ipa-cp.c (print_ipcp_constant_value): Likewise.
30149         (get_replacement_map): Likewise.
30150         * ipa-inline-analysis.c (dump_condition): Likewise.
30151         (estimate_function_body_sizes): Likewise.
30152         * ipa-polymorphic-call.c (check_stmt_for_type_change): Likewise.
30153         (ipa_polymorphic_call_context::get_dynamic_type): Likewise.
30154         * ipa-prop.c (ipa_dump_param): Likewise.
30155         (ipa_print_node_jump_functions_for_edge): Likewise.
30156         (ipa_modify_call_arguments): Likewise.
30157         (ipa_modify_expr): Likewise.
30158         (ipa_dump_param_adjustments): Likewise.
30159         (ipa_dump_agg_replacement_values): Likewise.
30160         (ipcp_modif_dom_walker::before_dom_children): Likewise.
30161         * ipa-pure-const.c (check_stmt): Likewise.
30162         (pass_nothrow::execute): Likewise.
30163         * ipa-split.c (execute_split_functions): Likewise.
30164         * omp-offload.c (dump_oacc_loop_part): Likewise.
30165         (dump_oacc_loop): Likewise.
30166         * trans-mem.c (tm_log_emit): Likewise.
30167         (tm_memopt_accumulate_memops): Likewise.
30168         (dump_tm_memopt_set): Likewise.
30169         (dump_tm_memopt_transform): Likewise.
30170         * tree-cfg.c (gimple_verify_flow_info): Likewise.
30171         (print_loop): Likewise.
30172         * tree-chkp-opt.c (chkp_print_addr): Likewise.
30173         (chkp_gather_checks_info): Likewise.
30174         (chkp_get_check_result): Likewise.
30175         (chkp_remove_check_if_pass): Likewise.
30176         (chkp_use_outer_bounds_if_possible): Likewise.
30177         (chkp_reduce_bounds_lifetime): Likewise.
30178         * tree-chkp.c (chkp_register_addr_bounds): Likewise.
30179         (chkp_mark_completed_bounds): Likewise.
30180         (chkp_register_incomplete_bounds): Likewise.
30181         (chkp_mark_invalid_bounds): Likewise.
30182         (chkp_maybe_copy_and_register_bounds): Likewise.
30183         (chkp_build_returned_bound): Likewise.
30184         (chkp_get_bound_for_parm): Likewise.
30185         (chkp_build_bndldx): Likewise.
30186         (chkp_get_bounds_by_definition): Likewise.
30187         (chkp_generate_extern_var_bounds): Likewise.
30188         (chkp_get_bounds_for_decl_addr): Likewise.
30189         * tree-chrec.c (chrec_apply): Likewise.
30190         * tree-data-ref.c (dump_data_reference): Likewise.
30191         (dump_subscript): Likewise.
30192         (dump_data_dependence_relation): Likewise.
30193         (analyze_overlapping_iterations): Likewise.
30194         * tree-inline.c (expand_call_inline): Likewise.
30195         (tree_function_versioning): Likewise.
30196         * tree-into-ssa.c (dump_defs_stack): Likewise.
30197         (dump_currdefs): Likewise.
30198         (dump_names_replaced_by): Likewise.
30199         (dump_update_ssa): Likewise.
30200         (update_ssa): Likewise.
30201         * tree-object-size.c (pass_object_sizes::execute): Likewise.
30202         * tree-parloops.c (build_new_reduction): Likewise.
30203         (try_create_reduction_list): Likewise.
30204         (ref_conflicts_with_region): Likewise.
30205         (oacc_entry_exit_ok_1): Likewise.
30206         (oacc_entry_exit_single_gang): Likewise.
30207         * tree-pretty-print.h: Likewise.
30208         * tree-scalar-evolution.c (set_scalar_evolution): Likewise.
30209         (get_scalar_evolution): Likewise.
30210         (add_to_evolution): Likewise.
30211         (get_loop_exit_condition): Likewise.
30212         (analyze_evolution_in_loop): Likewise.
30213         (analyze_initial_condition): Likewise.
30214         (analyze_scalar_evolution): Likewise.
30215         (instantiate_scev): Likewise.
30216         (number_of_latch_executions): Likewise.
30217         (gather_chrec_stats): Likewise.
30218         (final_value_replacement_loop): Likewise.
30219         (scev_const_prop): Likewise.
30220         * tree-sra.c (dump_access): Likewise.
30221         (disqualify_candidate): Likewise.
30222         (create_access): Likewise.
30223         (reject): Likewise.
30224         (maybe_add_sra_candidate): Likewise.
30225         (create_access_replacement): Likewise.
30226         (analyze_access_subtree): Likewise.
30227         (analyze_all_variable_accesses): Likewise.
30228         (sra_modify_assign): Likewise.
30229         (initialize_constant_pool_replacements): Likewise.
30230         (find_param_candidates): Likewise.
30231         (decide_one_param_reduction): Likewise.
30232         (replace_removed_params_ssa_names): Likewise.
30233         * tree-ssa-ccp.c (ccp_fold_stmt): Likewise.
30234         * tree-ssa-copy.c (dump_copy_of): Likewise.
30235         (copy_prop_visit_cond_stmt): Likewise.
30236         * tree-ssa-dce.c (mark_operand_necessary): Likewise.
30237         * tree-ssa-dom.c (pass_dominator::execute): Likewise.
30238         (record_equivalences_from_stmt): Likewise.
30239         * tree-ssa-dse.c (compute_trims): Likewise.
30240         (delete_dead_call): Likewise.
30241         (delete_dead_assignment): Likewise.
30242         * tree-ssa-forwprop.c (forward_propagate_into_gimple_cond): Likewise.
30243         (forward_propagate_into_cond): Likewise.
30244         (pass_forwprop::execute): Likewise.
30245         * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
30246         * tree-ssa-loop-im.c (invariantness_dom_walker::before_dom_children):
30247         Likewise.
30248         (move_computations_worker): Likewise.
30249         (execute_sm): Likewise.
30250         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Likewise.
30251         (remove_exits_and_undefined_stmts): Likewise.
30252         (remove_redundant_iv_tests): Likewise.
30253         * tree-ssa-loop-ivopts.c (dump_use): Likewise.
30254         (adjust_iv_update_pos): Likewise.
30255         * tree-ssa-math-opts.c (bswap_replace): Likewise.
30256         * tree-ssa-phiopt.c (factor_out_conditional_conversion): Likewise.
30257         (value_replacement): Likewise.
30258         * tree-ssa-phiprop.c (phiprop_insert_phi): Likewise.
30259         * tree-ssa-pre.c (print_pre_expr): Likewise.
30260         (get_representative_for): Likewise.
30261         (create_expression_by_pieces): Likewise.
30262         (insert_into_preds_of_block): Likewise.
30263         (eliminate_insert): Likewise.
30264         (eliminate_dom_walker::before_dom_children): Likewise.
30265         (eliminate): Likewise.
30266         (remove_dead_inserted_code): Likewise.
30267         * tree-ssa-propagate.c (substitute_and_fold): Likewise.
30268         * tree-ssa-reassoc.c (get_rank): Likewise.
30269         (eliminate_duplicate_pair): Likewise.
30270         (eliminate_plus_minus_pair): Likewise.
30271         (eliminate_not_pairs): Likewise.
30272         (undistribute_ops_list): Likewise.
30273         (eliminate_redundant_comparison): Likewise.
30274         (update_range_test): Likewise.
30275         (optimize_range_tests_var_bound): Likewise.
30276         (optimize_vec_cond_expr): Likewise.
30277         (rewrite_expr_tree): Likewise.
30278         (rewrite_expr_tree_parallel): Likewise.
30279         (linearize_expr): Likewise.
30280         (break_up_subtract): Likewise.
30281         (linearize_expr_tree): Likewise.
30282         (attempt_builtin_powi): Likewise.
30283         (attempt_builtin_copysign): Likewise.
30284         (transform_stmt_to_copy): Likewise.
30285         (transform_stmt_to_multiply): Likewise.
30286         (dump_ops_vector): Likewise.
30287         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Likewise.
30288         (print_scc): Likewise.
30289         (set_ssa_val_to): Likewise.
30290         (visit_reference_op_store): Likewise.
30291         (visit_use): Likewise.
30292         (sccvn_dom_walker::before_dom_children): Likewise.
30293         (run_scc_vn): Likewise.
30294         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
30295         Likewise.
30296         (expr_hash_elt::print): Likewise.
30297         (const_and_copies::pop_to_marker): Likewise.
30298         (const_and_copies::record_const_or_copy_raw): Likewise.
30299         * tree-ssa-structalias.c (compute_dependence_clique): Likewise.
30300         * tree-ssa-uninit.c (collect_phi_def_edges): Likewise.
30301         (dump_predicates): Likewise.
30302         (find_uninit_use): Likewise.
30303         (warn_uninitialized_phi): Likewise.
30304         (pass_late_warn_uninitialized::execute): Likewise.
30305         * tree-ssa.c (verify_vssa): Likewise.
30306         (verify_ssa): Likewise.
30307         (maybe_optimize_var): Likewise.
30308         * tree-vrp.c (dump_value_range): Likewise.
30309         (dump_all_value_ranges): Likewise.
30310         (dump_asserts_for): Likewise.
30311         (register_edge_assert_for_2): Likewise.
30312         (vrp_visit_cond_stmt): Likewise.
30313         (vrp_visit_switch_stmt): Likewise.
30314         (vrp_visit_stmt): Likewise.
30315         (vrp_visit_phi_node): Likewise.
30316         (simplify_cond_using_ranges_1): Likewise.
30317         (fold_predicate_in): Likewise.
30318         (evrp_dom_walker::before_dom_children): Likewise.
30319         (evrp_dom_walker::push_value_range): Likewise.
30320         (evrp_dom_walker::pop_value_range): Likewise.
30321         (execute_early_vrp): Likewise.
30322
30323 2017-05-16  Richard Biener  <rguenther@suse.de>
30324
30325         * dwarf2out.c (loc_list_from_tree_1): Do not create
30326         DW_OP_GNU_variable_value for DECL_IGNORED_P decls.
30327
30328 2017-05-16  Richard Biener  <rguenther@suse.de>
30329
30330         * dwarf2out.c (resolve_variable_value_in_expr): Lookup DIE
30331         just generated.
30332         (note_variable_value_in_expr): If we resolved the decl ref
30333         do not push to the stack.
30334
30335 2017-05-16  Matthew Wahab  <matthew.wahab@arm.com>
30336
30337         * config/arm/arm_neon.h (vadd_f16): Use standard arithmetic
30338         operations in fast-math mode.
30339         (vaddq_f16): Likewise.
30340         (vmul_f16): Likewise.
30341         (vmulq_f16): Likewise.
30342         (vsub_f16): Likewise.
30343         (vsubq_f16): Likewise.
30344         * config/arm/neon.md (add<mode>3): New.
30345         (sub<mode>3): New.
30346         (fma:<VH:mode>3): New.  Also remove outdated comment.
30347         (mul<mode>3): New.
30348
30349 2017-05-16  Martin Liska  <mliska@suse.cz>
30350
30351         PR ipa/79849.
30352         PR ipa/79850.
30353         * ipa-devirt.c (warn_types_mismatch): Fix typo.
30354         (odr_types_equivalent_p): Likewise.
30355
30356 2017-05-15  Sylvestre Ledru  <sylvestre@debian.org>
30357
30358         * plugin.c (try_init_one_plugin): Fix ressource leaks (CID 726637).
30359
30360 2017-05-15  Uros Bizjak  <ubizjak@gmail.com>
30361
30362         PR target/80425
30363         * config/i386.i386.md (*zero_extendsidi2): Do not penalize
30364         non-interunit SSE move alternatives with '?'.
30365         (zero-extendsidi peephole2): New peephole to skip intermediate
30366         general register in SSE zero-extend sequence.
30367
30368 2017-05-15  Jeff Law  <law@redhat.com>
30369
30370         * reorg.c (relax_delay_slots): Create a new variable to hold
30371         the temporary target rather than clobbering TARGET_LABEL.
30372
30373         * config/tilegx/tilegx.c (tilegx_expand_unaligned_load): Add
30374         missing argument to extract_bit_field call.
30375         * config/tilepro/tilepro.c (tilepro_expand_unaligned_load): Likewise.
30376
30377 2017-05-15  Martin Liska  <mliska@suse.cz>
30378
30379         PR driver/31468
30380         * gcc.c (process_command): Do not allow empty argument of -o option.
30381
30382 2017-05-15  Renlin Li  <renlin.li@arm.com>
30383
30384         * config/aarch64/aarch64-protos.h (aarch64_expand_call): Declare.
30385         * config/aarch64/aarch64.c (aarch64_expand_call): Define.
30386         * config/aarch64/constraints.md (Usf): Add long call check.
30387         * config/aarch64/aarch64.md (call): Use aarch64_expand_call.
30388         (call_value): Likewise.
30389         (sibcall): Likewise.
30390         (sibcall_value): Likewise.
30391         (call_insn): New.
30392         (call_value_insn): New.
30393         (sibcall_insn): Update rtx pattern.
30394         (sibcall_value_insn): Likewise.
30395         (call_internal): Remove.
30396         (call_value_internal): Likewise.
30397         (sibcall_internal): Likewise.
30398         (sibcall_value_internal): Likewise.
30399         (call_reg): Likewise.
30400         (call_symbol): Likewise.
30401         (call_value_reg): Likewise.
30402         (call_value_symbol): Likewise.
30403
30404 2017-05-14  Krister Walfridsson  <krister.walfridsson@gmail.com>
30405
30406         PR target/80600
30407         * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always add -lgcc.
30408
30409 2017-05-14  Uros Bizjak  <ubizjak@gmail.com>
30410
30411         * config/i386.i386.c (ix86_cc_modes_compatible): CCNOmode is
30412         compatible with CCGOCmode and with CCZmode.
30413
30414 2017-05-14  Martin Sebor  <msebor@redhat.com>
30415
30416         PR middle-end/77671
30417         * gimple-fold.c (gimple_fold_builtin_sprintf): Make extern.
30418         (gimple_fold_builtin_snprintf): Same.
30419         * gimple-fold.h (gimple_fold_builtin_sprintf): Declare.
30420         (gimple_fold_builtin_snprintf): Same.
30421         * gimple-ssa-sprintf.c (get_format_string): Correct the detection
30422         of character types.
30423         (is_call_safe): New function.
30424         (try_substitute_return_value): Call it.
30425         (try_simplify_call): New function.
30426         (pass_sprintf_length::handle_gimple_call): Call it.
30427
30428 2017-05-14  Martin Sebor  <msebor@redhat.com>
30429
30430         PR middle-end/80669
30431         * builtins.c (expand_builtin_stpncpy): Simplify.
30432
30433 2017-05-14  Daniel Santos  <daniel.santos@pobox.com>
30434
30435         * config/i386/i386.opt: Add option -mcall-ms2sysv-xlogues.
30436         * config/i386/i386.h
30437         (x86_64_ms_sysv_extra_clobbered_registers): Change type to unsigned.
30438         (NUM_X86_64_MS_CLOBBERED_REGS): New macro.
30439         (struct machine_function): Add new members call_ms2sysv,
30440         call_ms2sysv_pad_in, call_ms2sysv_pad_out and call_ms2sysv_extra_regs.
30441         (struct machine_frame_state): New fields sp_realigned and
30442         sp_realigned_offset.
30443         * config/i386/i386.c
30444         (enum xlogue_stub): New enum.
30445         (enum xlogue_stub_sets): New enum.
30446         (class xlogue_layout): New class.
30447         (struct ix86_frame): New fields stack_realign_allocate_offset,
30448         stack_realign_offset and outlined_save_offset.  Modify comments to
30449         detail stack layout when using out-of-line stubs.
30450         (ix86_target_string): Add -mcall-ms2sysv-xlogues option.
30451         (ix86_option_override_internal): Add sorry() for TARGET_SEH and
30452         -mcall-ms2sysv-xlogues.
30453         (stub_managed_regs): New static variable.
30454         (ix86_save_reg): Add new parameter ignore_outlined to optionally omit
30455         registers managed by out-of-line stub.
30456         (disable_call_ms2sysv_xlogues): New function.
30457         (ix86_compute_frame_layout): Modify re-alignment calculations, disable
30458         m->call_ms2sysv when appropriate and compute frame layout for
30459         out-of-line stubs.
30460         (sp_valid_at, fp_valid_at): New inline functions.
30461         (choose_basereg): New function.
30462         (choose_baseaddr): Add align parameter, use choose_basereg and modify
30463         all callers.
30464         (ix86_emit_save_reg_using_mov, ix86_emit_restore_sse_regs_using_mov):
30465         Use align parameter of choose_baseaddr to generated aligned SSE movs
30466         when possible.
30467         (pro_epilogue_adjust_stack): Modify to track
30468         machine_frame_state::sp_realigned.
30469         (ix86_nsaved_regs): Modify to accommodate changes to ix86_save_reg.
30470         (ix86_nsaved_sseregs): Likewise.
30471         (ix86_emit_save_regs): Likewise.
30472         (ix86_emit_save_regs_using_mov): Likewise.
30473         (ix86_emit_save_sse_regs_using_mov): Likewise.
30474         (get_scratch_register_on_entry): Likewise.
30475         (gen_frame_set): New function.
30476         (gen_frame_load): Likewise.
30477         (gen_frame_store): Likewise.
30478         (emit_outlined_ms2sysv_save): Likewise.
30479         (emit_outlined_ms2sysv_restore): Likewise.
30480         (ix86_expand_prologue): Modify stack re-alignment code and call
30481         emit_outlined_ms2sysv_save when appropriate.
30482         (ix86_emit_leave): Clear machine_frame_state::sp_realigned.  Add
30483         parameter rtx_insn *insn, which allows the function to be used to only
30484         generate the notes.
30485         (ix86_expand_epilogue): Modify validity checks of frame and stack
30486         pointers, and call emit_outlined_ms2sysv_restore when appropriate.
30487         (ix86_expand_call): Modify to enable m->call_ms2sysv when appropriate.
30488         * config/i386/predicates.md
30489         (save_multiple): New predicate.
30490         (restore_multiple): Likewise.
30491         * config/i386/sse.md
30492         (save_multiple<mode>): New pattern.
30493         (save_multiple_realign<mode>): Likewise.
30494         (restore_multiple<mode>): Likewise.
30495         (restore_multiple_and_return<mode>): Likewise.
30496         (restore_multiple_leave_return<mode>): Likewise.
30497         * Makefile.in: Export HOSTCXX and HOSTCXXFLAGS to site.exp
30498
30499 2017-05-14  Julia Koval  <julia.koval@intel.com>
30500
30501         * config/i386/i386-builtin-types.def (VOID_FTYPE_INT_INT64): New type.
30502         * config/i386/i386-builtin.def (__builtin_ia32_xgetbv)
30503         (__builtin_ia32_xsetbv): New builtins.
30504         * config/i386/i386.c (ix86_expand_special_args_builtin):
30505         Process new types.
30506         (ix86_expand_builtin): Special expand for new intrinsics.
30507         * config/i386/i386.md (UNSPECV_XGETBV, UNSPECV_XSETBV): New.
30508         (xsetbv, xsetbv_rex64, xgetbv, xgetbv_rex64): New insn patterns.
30509         * config/i386/xsaveintrin.h (_xsetbv, _getbv): New intrinsics.
30510
30511 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
30512
30513         * cfganal.c (inverted_post_order_compute): Change argument type
30514         to vec *.
30515         * cfganal.h (inverted_post_order_compute): Adjust prototype.
30516         * df-core.c (rest_of_handle_df_initialize): Adjust.
30517         (rest_of_handle_df_finish): Likewise.
30518         (df_analyze_1): Likewise.
30519         (df_analyze): Likewise.
30520         (loop_inverted_post_order_compute): Change argument to be a vec *.
30521         (df_analyze_loop): Adjust.
30522         (df_get_n_blocks): Likewise.
30523         (df_get_postorder): Likewise.
30524         * df.h (struct df_d): Change field to be a vec.
30525         * lcm.c (compute_laterin): Adjust.
30526         (compute_available): Likewise.
30527         * lra-lives.c (lra_create_live_ranges_1): Likewise.
30528         * tree-ssa-dce.c (remove_dead_stmt): Likewise.
30529         * tree-ssa-pre.c (compute_antic): Likewise.
30530
30531 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
30532
30533         * cfganal.c (connect_infinite_loops_to_exit): Adjust.
30534         (depth_first_search::depth_first_search): Change structure init
30535         function to this constructor.
30536         (depth_first_search::add_bb): Rename function to this member.
30537         (depth_first_search::execute): Likewise.
30538         (flow_dfs_compute_reverse_finish): Adjust.
30539
30540 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
30541
30542         * ddg.c (find_nodes_on_paths): Use auto_sbitmap.
30543         (longest_simple_path): Likewise.
30544         * shrink-wrap.c (spread_components): Likewise.
30545         (disqualify_problematic_components): Likewise.
30546         (emit_common_heads_for_components): Likewise.
30547         (emit_common_tails_for_components): Likewise.
30548         (insert_prologue_epilogue_for_components): Likewise.
30549
30550 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
30551
30552         * tree-ssa-dse.c (dse_dom_walker): Make m_live_byes a
30553         auto_sbitmap.
30554
30555 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
30556
30557         * df-core.c (df_set_blocks): Start using auto_bitmap.
30558         (df_compact_blocks): Likewise.
30559         * df-problems.c (df_rd_confluence_n): Likewise.
30560         * df-scan.c (df_insn_rescan_all): Likewise.
30561         (df_process_deferred_rescans): Likewise.
30562         (df_update_entry_block_defs): Likewise.
30563         (df_update_exit_block_uses): Likewise.
30564         (df_entry_block_bitmap_verify): Likewise.
30565         (df_exit_block_bitmap_verify): Likewise.
30566         (df_scan_verify): Likewise.
30567         * lra-constraints.c (lra_constraints): Likewise.
30568         (undo_optional_reloads): Likewise.
30569         (lra_undo_inheritance): Likewise.
30570         * lra-remat.c (calculate_gen_cands): Likewise.
30571         (do_remat): Likewise.
30572         * lra-spills.c (assign_spill_hard_regs): Likewise.
30573         (spill_pseudos): Likewise.
30574         * tree-ssa-pre.c (bitmap_set_and): Likewise.
30575         (bitmap_set_subtract_values): Likewise.
30576
30577 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
30578
30579         * haifa-sched.c (estimate_shadow_tick): Replace manual bitmap
30580         management with auto_bitmap.
30581         (fix_inter_tick): Likewise.
30582         (fix_recovery_deps): Likewise.
30583         * ira.c (add_store_equivs): Likewise.
30584         (find_moveable_pseudos): Likewise.
30585         (split_live_ranges_for_shrink_wrap): Likewise.
30586         * print-rtl.c (rtx_reuse_manager::rtx_reuse_manager): Likewise.
30587         (rtx_reuse_manager::seen_def_p): Likewise.
30588         (rtx_reuse_manager::set_seen_def): Likewise.
30589         * print-rtl.h (class rtx_reuse_manager): Likewise.
30590
30591 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
30592
30593         * bt-load.c (combine_btr_defs): Use auto_bitmap to manage bitmap
30594         lifetime.
30595         (migrate_btr_def): Likewise.
30596         * cfgloop.c (get_loop_body_in_bfs_order): Likewise.
30597         * df-core.c (loop_post_order_compute): Likewise.
30598         (loop_inverted_post_order_compute): Likewise.
30599         * hsa-common.h: Likewise.
30600         * hsa-gen.c (hsa_bb::~hsa_bb): Likewise.
30601         * init-regs.c (initialize_uninitialized_regs): Likewise.
30602         * ipa-inline.c (resolve_noninline_speculation): Likewise.
30603         (inline_small_functions): Likewise.
30604         * ipa-reference.c (ipa_reference_write_optimization_summary): Likewise.
30605         * ira.c (combine_and_move_insns): Likewise.
30606         (build_insn_chain): Likewise.
30607         * loop-invariant.c (find_invariants): Likewise.
30608         * lower-subreg.c (propagate_pseudo_copies): Likewise.
30609         * predict.c (tree_predict_by_opcode): Likewise.
30610         (predict_paths_leading_to): Likewise.
30611         (predict_paths_leading_to_edge): Likewise.
30612         (estimate_loops_at_level): Likewise.
30613         (estimate_loops): Likewise.
30614         * shrink-wrap.c (try_shrink_wrapping): Likewise.
30615         (spread_components): Likewise.
30616         * tree-cfg.c (remove_edge_and_dominated_blocks): Likewise.
30617         * tree-loop-distribution.c (rdg_build_partitions): Likewise.
30618         * tree-predcom.c (tree_predictive_commoning_loop): Likewise.
30619         * tree-ssa-coalesce.c (coalesce_ssa_name): Likewise.
30620         * tree-ssa-phionlycprop.c (pass_phi_only_cprop::execute): Likewise.
30621         * tree-ssa-pre.c (remove_dead_inserted_code): Likewise.
30622         * tree-ssa-sink.c (nearest_common_dominator_of_uses): Likewise.
30623         * tree-ssa-threadupdate.c (compute_path_counts): Likewise.
30624         (mark_threaded_blocks): Likewise.
30625         (thread_through_all_blocks): Likewise.
30626         * tree-ssa.c (verify_ssa): Likewise.
30627         (execute_update_addresses_taken): Likewise.
30628         * tree-ssanames.c (verify_ssaname_freelists): Likewise.
30629
30630 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
30631
30632         * cfganal.c (mark_dfs_back_edges): Replace manual stack with
30633         auto_vec.
30634         (post_order_compute): Likewise.
30635         (inverted_post_order_compute): Likewise.
30636         (pre_and_rev_post_order_compute_fn): Likewise.
30637
30638 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
30639
30640         * genrecog.c (int_set::int_set): Explicitly construct our
30641         auto_vec base class.
30642         * vec.h (auto_vec::auto_vec): New constructor.
30643
30644 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
30645
30646         * bitmap.h (class auto_bitmap): New constructor taking
30647         bitmap_obstack * argument.
30648
30649 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
30650
30651         * bitmap.h (class auto_bitmap): Change type of m_bits to
30652         bitmap_head, and adjust ctor / dtor and member operators.
30653
30654 2017-05-13  Uros Bizjak  <ubizjak@gmail.com>
30655
30656         * compare-elim.c (equivalent_reg_at_start): Return NULL_RTX
30657         when returned register mode doesn't match original mode.
30658
30659 2017-05-12  Jeff Law  <law@redhat.com>
30660             Jakub Jelinek  <jakub@redhat.com>
30661
30662         * config/mn10300/mn10300.c (mn10300_match_ccmode): Fix where
30663         we look for cc setter after the compare-elim changes.
30664         * config/mn10300/mn10300.md (addsi3_flags): Fix order of patterns
30665         within the vector to match what compare-elim now expects.
30666         (subsi3_flags, andsi3_flags, iorsi3_flags): Likewise.
30667         (xorsi3_flags, one_cmplsi2_flags): Likewise.
30668
30669         * config/rx/rx.c (rx_match_ccmode): Fix where we look cc setter
30670         after the compare-elim changes.
30671         * config/rx/rx.md (abssi2_flags): Fix order of patterns within
30672         the vector to match what compare-elim now expects.
30673         (addsi3_flags, adc_flags, addsi3_flags peepholes): Likewise.
30674         (andsi3_flags, negsi2_flags, one_cmplsi2_flags): Likewise.
30675         (iorsi3_flags, rotlsi3_flags, rotrsi3_flags): Likewise.
30676         (ashrsi3_flags, lshrsi3_flags, ashlsi3_flags): Likewise.
30677         (ssaddsi3, subsi3_flags, sbb_flags, xorsi3_flags): Likewise.
30678
30679         * config/visium/visium.c (single_set_and_flags): Fix where
30680         we look for cc setter after the compare-elim changes.
30681         * config/visium/visium.md (flags_subst_logic): Fix order of patterns
30682         with the vector to match what compare-elim now expects.
30683         (flags_subst_arith, add<mode>3_insn_set_carry): Likewise.
30684         (add<mode>3_insn_set_overflow, addsi3_insn_set_carry): Likewise.
30685         (addsi3_insn_set_overflow, sub<mode>3_insn_set_carry): Likewise.
30686         (sub<mode>3_insn_set_overflow, subsi3_insn_set_carry): Likewise.
30687         (subsi3_insn_set_overflow, negsi2_insn_set_carry): Likewise.
30688         (neg<mode>2_insn_set_overflow): Likewise.
30689
30690 2017-05-12  Jim Wilson  <jim.wilson@linaro.org>
30691
30692         PR middle-end/79794
30693         * expmed.c (extract_bit_field_1): Add alt_rtl argument.  Before
30694         maybe_expand_insn call, set ops[0].target.  If still set after call,
30695         set alt_rtl.  Add extra arg to recursive calls.
30696         (extract_bit_field): Add alt_rtl argument.  Pass to
30697         extract_bit_field.
30698         * expmed.h (extract_bit_field): Fix prototype.
30699         * expr.c (emit_group_load_1, copy_blkmode_from_reg)
30700         (copy_blkmode_to_reg, read_complex_part, store_field): Pass extra NULL
30701         to extract_bit_field_calls.
30702         (expand_expr_real_1): Pass alt_rtl to expand_expr_real instead of 0.
30703         Pass alt_rtl to extract_bit_field calls.
30704         * calls.c (store_unaligned_arguments_into_psuedos)
30705         load_register_parameters): Pass extra NULL to extract_bit_field calls.
30706         * optabs.c (maybe_legitimize_operand): Clear op->target when call
30707         gen_reg_rtx.
30708         * optabs.h (struct expand_operand): Add target bitfield.
30709
30710 2017-05-12  Uros Bizjak  <ubizjak@gmail.com>
30711
30712         * compare-elim.c (try_eliminate_compare): Canonicalize
30713         operation with embedded compare to
30714         [(set (reg:CCM) (compare:CCM (operation) (immediate)))
30715          (set (reg) (operation)].
30716
30717         * config/i386/i386.c (TARGET_FLAGS_REGNUM): New define.
30718
30719 2017-05-12  Uros Bizjak  <ubizjak@gmail.com>
30720
30721         PR target/80723
30722         * config/i386/i386.c (ix86_rtx_cost) [case PLUS]: Ignore the
30723         cost of adding a carry flag for ADC instruction.
30724         [case MINUS]: Ignore the cost of subtracting a carry flag
30725         for SBB instruction.
30726
30727 2017-05-12  Steven Munroe  <munroesj@gcc.gnu.org>
30728
30729         * config.gcc (powerpc*-*-*): Add bmi2intrin.h, bmiintrin.h,
30730         and x86intrin.h
30731         * config/rs6000/bmiintrin.h: New file.
30732         * config/rs6000/bmi2intrin.h: New file.
30733         * config/rs6000/x86intrin.h: New file.
30734
30735 2017-05-12  Jeff Law  <law@redhat.com>
30736
30737         * tree-vrp.c (vrp_dom_walker::before_dom_children): Push unwinding
30738         markers.
30739
30740 2017-05-12  Peter Bergner  <bergner@vnet.ibm.com>
30741
30742         PR middle-end/80707
30743         * tree-cfg.c: Remove cfg edges of unreachable case statements.
30744
30745 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
30746
30747         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
30748         early expansion of vector divide builtins.
30749         (builtin_function_type): Add VSX_BUILTIN_UDIV_V2DI to the list of
30750         builtins identified as having unsigned arguments.
30751
30752 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
30753
30754         * config/rs6000/rs6000.c (gimple-fold.h): New #include.
30755         (rs6000_gimple_fold_builtin): Add handling for early GIMPLE
30756         expansion of vector logical operations (and, andc, or, xor,
30757         nor, orc, nand).
30758
30759 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
30760
30761         * gimple-fold.c (create_tmp_reg_or_ssa_name): Remove static declaration.
30762         * gimple-fold.h (create_tmp_reg_or_ssa_name): New prototype.
30763
30764 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
30765
30766         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
30767         early GIMPLE expansion of vector multiplies.
30768
30769 2017-05-12  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
30770
30771         * config/arm/arm.md (movsi): Add TARGET_32BIT in addition to the
30772         TARGET_HAVE_MOVT conditional.
30773         (movt splitter): Likewise.
30774
30775 2017-05-12  Richard Biener  <rguenther@suse.de>
30776
30777         * tree-ssa-sccvn.h (has_VN_INFO): Declare.
30778         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
30779         Fold all stmts not inplace.
30780
30781 2017-05-12  Richard Biener  <rguenther@suse.de>
30782
30783         PR tree-optimization/80713
30784         * tree-ssa-pre.c (remove_dead_inserted_code): Clear
30785         inserted_exprs bit for not removed stmts.
30786
30787 2017-05-12  Thomas Schwinge  <thomas@codesourcery.com>
30788
30789         PR middle-end/69921
30790         * tree-parloops.c (create_parallel_loop): Set "oacc kernels
30791         parallelized" attribute for parallelized OpenACC kernels.
30792         * omp-offload.c (execute_oacc_device_lower): Use it.
30793
30794         * omp-expand.c (expand_omp_target) <GF_OMP_TARGET_KIND_OACC_KERNELS>:
30795         Set "oacc kernels" attribute.
30796         * omp-general.c (oacc_set_fn_attrib): Remove is_kernel formal
30797         parameter.  Adjust all users.
30798         (oacc_fn_attrib_kernels_p): Remove function.
30799         * omp-offload.c (execute_oacc_device_lower): Look for "oacc
30800         kernels" attribute instead of calling oacc_fn_attrib_kernels_p.
30801         * tree-ssa-loop.c (gate_oacc_kernels): Likewise.
30802         * tree-parloops.c (create_parallel_loop): If oacc_kernels_p,
30803         assert "oacc kernels" attribute is set.
30804
30805 2017-05-11  Carl Love  <cel@us.ibm.com>
30806
30807         * config/rs6000/rs6000-c: Add support for built-in functions
30808         vector unsigned char vec_popcnt (vector signed char)
30809         vector unsigned char vec_popcnt (vector unsigned char)
30810         vector unsigned short vec_popcnt (vector signed short)
30811         vector unsigned short vec_popcnt (vector unsigned short)
30812         vector unsigned int vec_popcnt (vector signed int)
30813         vector unsigned int vec_popcnt (vector unsigned int)
30814         vector unsigned long long vec_popcnt (vector signed long long)
30815         vector unsigned long long vec_popcnt (vector unsigned long long)
30816         vector signed long long vec_slo (vector signed long long,
30817                                          vector signed char)
30818         vector signed long long vec_slo (vector signed long long,
30819                                          vector unsigned char)
30820         vector unsigned long long vec_slo (vector unsigned long long,
30821                                            vector signed char)
30822         vector unsigned long long vec_slo (vector unsigned long long,
30823                                            vector unsigned char)
30824         * config/rs6000/rs6000-builtin.def: Add definitions for VPOPCNTUB,
30825         VPOPCNTUH, VPOPCNTUW, and VPOPCNTUD overloads.
30826         * config/rs6000/altivec.h: Add define for vec_popcnt, vec_popcntb,
30827         vec_popcnth, vec_popcntw and vec_popcntd built-in functions.
30828         * doc/extend.texi: Update the built-in documentation file for the
30829         new built-in functions.
30830
30831 2017-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
30832
30833         * attribs.h (sorted_attr_string): Move machine independent
30834         functions for target clone support from the i386 port to common
30835         code.  Rename ix86_function_versions to common_function_versions.
30836         Rename make_name to make_unique_name.
30837         (common_function_versions): Likewise.
30838         (make_unique_name): Likewise.
30839         (make_dispatcher_decl): Likewise.
30840         (is_function_default_version): Likewise.
30841         * attribs.c (attr_strcmp): Likewise.
30842         (sorted_attr_string): Likewise.
30843         (common_function_versions): Likewise.
30844         (make_unique_name): Likewise.
30845         (make_dispatcher_decl): Likewise.
30846         (is_function_default_version): Likewise.
30847         * config/i386/i386.c (attr_strcmp): Likewise.
30848         (sorted_attr_string): Likewise.
30849         (ix86_function_versions): Likewise.
30850         (make_name): Likewise.
30851         (make_dispatcher_decl): Likewise.
30852         (is_function_default_version): Likewise.
30853         (TARGET_OPTION_FUNCTION_VERSIONS): Update target function hook.
30854
30855 2017-05-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30856
30857         PR target/80695
30858         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
30859         Account for direct move costs for vec_construct of integer
30860         vectors.
30861
30862 2017-05-11  Uros Bizjak  <ubizjak@gmail.com>
30863
30864         PR target/80706
30865         * config/i386/sync.md (UNSPEC_LDX_ATOMIC): New unspec.
30866         (UNSPEC_STX_ATOMIC): Ditto.
30867         (loaddi_via_sse): New insn.
30868         (storedi_via_sse): Ditto.
30869         (atomic_loaddi_fpu): Emit loaddi_via_sse and storedi_via_sse.
30870         Update corresponding peephole2 patterns.
30871         (atomic_storedi_fpu): Ditto.
30872
30873 2017-05-11  Julia Koval  <julia.koval@intel.com>
30874
30875         * config/i386/avx512fintrin.h (_mm_mask_rsqrt14_sd)
30876         (_mm_maskz_rsqrt14_sd, _mm_mask_rsqrt14_ss, _mm_maskz_rsqrt14_ss):
30877         New intrinsics.
30878         * config/i386/i386-builtin.def (__builtin_ia32_rsqrt14sd_mask)
30879         (__builtin_ia32_rsqrt14ss_mask): New builtins.
30880         * config/i386/sse.md (rsqrt14_<mode>_mask): New pattern.
30881
30882 2017-05-11  Nathan Sidwell  <nathan@acm.org>
30883
30884         * graphite-poly.c: Include dumpfile.h.
30885
30886         * dumpfle.h (dump_function): Declare here ...
30887         * tree-dump.h (dump_function): ... not here.
30888         * dumpfile.c: #include tree-cfg.h.
30889         (dump_function): Move here from ...
30890         * tree-dump.c (dump_function): ... here.
30891         * gimplify.c: #include splay-tree.h, not tree-dump.h.
30892         * graphite-poly.c: Don't include tree-dump.h.
30893         * cgraphclones.c: Include dumpfile.h not tree-dump.h.
30894         * print-tree.c: Likewise.
30895         * stor-layout.c: Likewise.
30896         * tree-nested.c: Likewise.
30897
30898         * dumpfile.c (dump_start): Use TDF_FLAGS.
30899         (dump_enable_all): Fix TDF_KIND check thinko.
30900
30901 2017-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
30902
30903         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
30904         array entries to represent two legal parameterizations of the
30905         overloaded __builtin_cmpb function, as represented by the
30906         P6_OV_BUILTIN_CMPB constant.
30907         (altivec_resolve_overloaded_builtin): Add special case handling
30908         for the __builtin_cmpb function, as represented by the
30909         P6_OV_BUILTIN_CMPB constant.
30910         * config/rs6000/rs6000-builtin.def (BU_P6_2): New macro.
30911         (BU_P6_64BIT_2): New macro.
30912         (BU_P6_OVERLOAD_2): New macro
30913         (CMPB_32): Add 32-bit compare-bytes support for 32-bit only targets.
30914         (CMPB): Add 64-bit compare-bytes support for 32-bit and 64-bit targets.
30915         (CMPB): Add overload support to represent both 32-bit and 64-bit
30916         compare-bytes function.
30917         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
30918         support for TARGET_CMPB.
30919         * config/rs6000/rs6000.h: Add support for RS6000_BTM_CMPB.
30920         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
30921         documentation of the __builtin_cmpb overloaded built-in function.
30922
30923 2017-05-11  Richard Biener  <rguenther@suse.de>
30924
30925         PR tree-optimization/80705
30926         * tree-vect-data-refs.c (vect_analyze_data_refs): DECL_NONALIASED
30927         bases are not vectorizable.
30928
30929 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
30930
30931         * tree-ssa-loop-ivopts.c (determine_set_costs): Skip non-interger
30932         when counting register pressure.
30933
30934 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
30935
30936         * tree-ssa-loop-ivopts.c (compare_cost_pair): New.
30937         (iv_ca_more_deps): Renamed to ...
30938         (iv_ca_compare_deps): ... this.
30939         (iv_ca_extend): Extend iv_ca if NEW_CP is cheaper than OLD_CP.
30940
30941 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
30942
30943         * tree-ssa-loop-ivopts.c (find_interesting_uses): Move inv vars dump
30944         to ...
30945         (determine_group_iv_costs): ... here.
30946         (find_inv_vars_cb): Record inv var if it's not recorded before.
30947
30948 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
30949
30950         * tree-ssa-loop-ivopts.c (allow_ip_end_pos_p): Refine comments.
30951         (get_shiftadd_cost): Ditto.
30952
30953 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
30954
30955         * tree-ssa-address.c: Include header file.
30956         (move_hint_to_base): Return TRUE if BASE_HINT is moved to memory
30957         address.
30958         (add_to_parts): Refactor.
30959         (addr_to_parts): New parameter.  Update use of move_hint_to_base.
30960         (create_mem_ref): Update use of addr_to_parts.  Re-associate addr
30961         in new order.
30962
30963 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
30964
30965         PR tree-optimization/53090
30966         * tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New enum value
30967         COMP_IV_EXPR_2.
30968         (extract_cond_operands): Detect condition with IV on both sides
30969         and return COMP_IV_EXPR_2.
30970         (find_interesting_uses_cond): Add iv_use for both IVs in condition.
30971         (rewrite_use_compare): Simplify by removing call to function
30972         extract_cond_operands.
30973
30974 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
30975
30976         * tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New.
30977         (extract_cond_operands): Detect condition comparing against non-
30978         invariant bound and return appropriate enum value.
30979         (find_interesting_uses_cond): Update use of extract_cond_operands.
30980         Handle its return value accordingly.
30981         (determine_group_iv_cost_cond, rewrite_use_compare): Ditto.
30982
30983 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
30984
30985         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Re-associate
30986         nonlinear iv_use computation in loop invariant sensitive way.
30987
30988 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
30989
30990         * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): New.
30991         (find_iv_candidates): Call relate_compare_use_with_all_cands.
30992
30993 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
30994
30995         * tree-ssa-loop-ivopts.c (struct iv_cand): New field inv_exprs.
30996         (dump_cand): Support iv_cand.inv_exprs.
30997         (add_candidate_1): Record invariant exprs in iv_cand.inv_exprs
30998         for candidates.
30999         (iv_ca_set_no_cp, iv_ca_set_cp, free_loop_data): Support
31000         iv_cand.inv_exprs.
31001
31002 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
31003
31004         * tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Move
31005         from ...
31006         * tree-ssa-address.c (multiplier_allowed_in_address_p): ... to here
31007         as local function.  Include necessary header files.
31008         * tree-ssa-loop-ivopts.h (multiplier_allowed_in_address_p): Delete.
31009
31010 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
31011
31012         * tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify.
31013
31014 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
31015
31016         * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Handle more
31017         operators: TRUNC_DIV_EXPR, BIT_AND_EXPR, BIT_IOR_EXPR, LSHIFT_EXPR,
31018         RSHIFT_EXPR and BIT_NOT_EXPR.
31019
31020 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
31021
31022         * tree-ssa-loop-ivopts.c (get_loop_invariant_expr): Simplify.
31023         (adjust_setup_cost): New parameter supporting round up adjustment.
31024         (struct address_cost_data): Delete.
31025         (force_expr_to_var_cost): Don't bound cost with spill_cost.
31026         (split_address_cost, ptr_difference_cost): Delete.
31027         (difference_cost, compare_aff_trees, record_inv_expr): Delete.
31028         (struct ainc_cost_data): New struct.
31029         (get_address_cost_ainc): New function.
31030         (get_address_cost, get_computation_cost): Reimplement.
31031         (determine_group_iv_cost_address): Record inv_expr for all uses of
31032         a group.
31033         (determine_group_iv_cost_cond): Call get_loop_invariant_expr.
31034         (iv_ca_has_deps): Reimplemented to ...
31035         (iv_ca_more_deps): ... this.  Check if NEW_CP introduces more deps
31036         than OLD_CP.
31037         (iv_ca_extend): Call iv_ca_more_deps.
31038
31039 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
31040
31041         * tree-ssa-address.c (struct mem_address): Move to header file.
31042         (valid_mem_ref_p, move_fixed_address_to_symbol): Make it global.
31043         * tree-ssa-address.h (struct mem_address): Move from C file.
31044         (valid_mem_ref_p, move_fixed_address_to_symbol): Declare.
31045
31046 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
31047
31048         * tree-affine.h (aff_combination_type): New interface.
31049         (aff_combination_zero_p): Remove static.
31050         (aff_combination_const_p): New interface.
31051         (aff_combination_singleton_var_p): New interfaces.
31052
31053 2017-05-11  Richard Biener  <rguenther@suse.de>
31054
31055         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
31056         Skip unreachable blocks and destinations.
31057         (eliminate): Move stmt removal and fixup ...
31058         (fini_eliminate): ... here.  Skip inserted exprs.
31059         (pass_pre::execute): Move fini_pre after fini_eliminate.
31060         * tree-ssa-tailmerge.c: Include tree-cfgcleanup.h.
31061         (tail_merge_optimize): Run cleanup_tree_cfg if requested by
31062         PRE to get rid of dead code that has invalid SSA form and
31063         split critical edges again.
31064
31065 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
31066
31067         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
31068
31069 2017-05-11  Richard Biener  <rguenther@suse.de>
31070
31071         * passes.c (execute_function_todo): Verify loops if they are
31072         said to be up-to-date.
31073         * cfgexpand.c (pass_expand::execute): Discard loops for -dx.
31074         * trans-mem.c (pass_tm_edges::execute): Mark loops for fixup.
31075
31076 2017-05-10  John David Anglin  <danglin@gcc.gnu.org>
31077
31078         PR target/80090
31079         * config/pa/pa.c (pa_assemble_integer): When outputting a SYMBOL_REF,
31080         handle calling assemble_external ourself.
31081
31082         PR target/79027
31083         * config/pa/pa.c (pa_cannot_change_mode_class): Reject changes to/from
31084         modes with zero size.  Enhance comment.
31085
31086 2017-05-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31087
31088         * config/rs6000/rs6000.c (altivec_init_builtins): Define POWER8
31089         built-ins for vec_xl and vec_xst with short and char pointer
31090         arguments.
31091
31092 2017-05-10  Sebastian Peryt  <sebastian.peryt@intel.com>
31093
31094         * config/i386/avx512fintrin.h (_mm_mask_max_round_sd)
31095         (_mm_maskz_max_round_sd, _mm_mask_max_round_ss)
31096         (_mm_maskz_max_round_ss, _mm_mask_min_round_sd)
31097         (_mm_maskz_min_round_sd, _mm_mask_min_round_ss)
31098         (_mm_maskz_min_round_ss): New intrinsics.
31099         * config/i386/i386-builtin-types.def (V2DF, V2DF, V2DF, V2DF, UQI, INT)
31100         (V4SF, V4SF, V4SF, V4SF, UQI, INT): New function type aliases.
31101         * config/i386/i386-builtin.def (__builtin_ia32_maxsd_mask_round)
31102         (__builtin_ia32_maxss_mask_round, __builtin_ia32_minsd_mask_round)
31103         (__builtin_ia32_minss_mask_round): New builtins.
31104         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
31105         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
31106         * config/i386/sse.md (<sse>_vm<code><mode>3<round_saeonly_name>):
31107         Rename to ...
31108         (<sse>_vm<code><mode>3<mask_name><round_saeonly_name>): ... this.
31109         (v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_op3>%2, %1, %0|%0, %1, %<iptr>2<round_saeonly_op3>}):
31110         Change to ...
31111         (v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_saeonly_mask_op3>}):
31112         ... this.
31113
31114 2017-05-10  Sebastian Peryt  <sebastian.peryt@intel.com>
31115
31116         * config/i386/avx512fintrin.h (_mm_mask_mul_round_sd)
31117         (_mm_maskz_mul_round_sd, _mm_mask_mul_round_ss)
31118         (_mm_maskz_mul_round_ss, _mm_mask_div_round_sd)
31119         (_mm_maskz_div_round_sd, _mm_mask_div_round_ss)
31120         (_mm_maskz_div_round_ss, _mm_mask_mul_sd, _mm_maskz_mul_sd)
31121         (_mm_mask_mul_ss, _mm_maskz_mul_ss, _mm_mask_div_sd)
31122         (_mm_maskz_div_sd, _mm_mask_div_ss, _mm_maskz_div_ss): New intrinsics.
31123         * config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
31124         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
31125         * config/i386/i386-builtin.def (__builtin_ia32_divsd_mask_round)
31126         (__builtin_ia32_divss_mask_round, __builtin_ia32_mulsd_mask_round)
31127         (__builtin_ia32_mulss_mask_round): New builtins.
31128         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
31129         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
31130         * config/i386/sse.md (<sse>_vm<multdiv_mnemonic><mode>3<round_name>):
31131         Rename to ...
31132         (<sse>_vm<multdiv_mnemonic><mode>3<mask_name><round_name>): ... this.
31133         (v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
31134         Change to ...
31135         (v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
31136         ... this.
31137
31138 2017-05-10  Julia Koval  <julia.koval@intel.com>
31139
31140         * config/i386/avxintrin.h (_mm256_set_m128, _mm256_set_m128d)
31141         (_mm256_set_m128i, _mm256_setr_m128, _mm256_setr_m128d)
31142         (_mm256_setr_m128i): New intrinsics.
31143
31144 2017-05-10  Julia Koval  <julia.koval@intel.com>
31145
31146         * config/i386/avx512fintrin.h (_mm_mask_rcp14_sd)
31147         (_mm_maskz_rcp14_sd, _mm_mask_rcp14_ss)
31148         (_mm_maskz_rcp14_ss): New intrinsics.
31149         * config/i386/i386-builtin.def (__builtin_ia32_rcp14sd_mask)
31150         (__builtin_ia32_rcp14ss_mask): New builtins.
31151         * config/i386/sse.md (srcp14<mode>_mask): New pattern.
31152
31153 2017-05-10  Peter Bergner  <bergner@vnet.ibm.com>
31154
31155         PR tree-optimization/51513
31156         * tree-cfg.c (gimple_seq_unreachable_p): New function.
31157         (assert_unreachable_fallthru_edge_p): Use it.
31158         (group_case_labels_stmt): Likewise.
31159         * tree-cfg.h: Prototype it.
31160         * stmt.c: Include cfghooks.h and tree-cfg.h.
31161         (emit_case_dispatch_table) <gap_label>: New local variable.
31162         Use it to fill dispatch table gaps.
31163         Test for default_label before updating probabilities.
31164         (expand_case) <default_label>: Remove unneeded initialization.
31165         Test for unreachable default case statement and remove its edge.
31166         Set default_label accordingly.
31167         * tree-ssa-ccp.c (optimize_unreachable): Update comment.
31168
31169 2017-05-10  Carl Love  <cel@us.ibm.com>
31170
31171         * config/rs6000/rs6000-c: Add support for built-in functions
31172         vector signed char      vec_neg (vector signed char)
31173         vector signed short int vec_neg (vector short int)
31174         vector signed int       vec_neg (vector signed int)
31175         vector signed long long vec_neg (vector signed long long)
31176         vector float            vec_neg (vector float)
31177         vector double           vec_neg (vector double)
31178         * config/rs6000/rs6000-builtin.def: Add definitions for NEG function
31179         overload.
31180         * config/rs6000/altivec.h: Add define for vec_neg
31181         * doc/extend.texi: Update the built-in documentation for the
31182         new built-in functions.
31183
31184 2017-05-10  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
31185
31186         PR tree-optimization/77644
31187         * match.pd (sqrt(x) cmp sqrt(y) -> x cmp y): New pattern.
31188
31189 2017-05-10  Nathan Sidwell  <nathan@acm.org>
31190
31191         * dumpfile.h (TDI_lang_all): New.
31192         (TDF_KIND): New. Renumber others
31193         (TDF_LANG, TDF_TREE, TDF_RTL, TDF_IPA): Enumerate value, rather
31194         than bits.
31195         * dumpfile.c (dump_files): Mark language dumps as TDF_LANG.  add
31196         lang-all.
31197         (get_dump_file_name): Adjust suffix generation.
31198         (dump_enable_all): Use TDF_KIND.
31199         * doc/invoke.texi (-fdump-lang-all): Document.
31200
31201         * dumpfile.h: Tabify.
31202
31203 2017-05-10  Wilco Dijkstra  <wdijkstr@arm.com>
31204
31205         PR target/80671
31206         * config/aarch64/cortex-a57-fma-steering.c (merge_forest):
31207         Move member access before delete.
31208
31209 2017-05-10  Alexandre Oliva  <aoliva@redhat.com>
31210
31211         * tree-inline.c (expand_call_inline): Split block at stmt
31212         before the call.
31213
31214 2017-05-09  Michael Meissner  <meissner@linux.vnet.ibm.com>
31215
31216         PR target/68163
31217         * config/rs6000/rs6000.md (f32_lr): Delete mode attributes that
31218         are now unused after splitting mov{sf,sd}_hardfloat.
31219         (f32_lr2): Likewise.
31220         (f32_lm): Likewise.
31221         (f32_lm2): Likewise.
31222         (f32_li): Likewise.
31223         (f32_li2): Likewise.
31224         (f32_lv): Likewise.
31225         (f32_sr): Likewise.
31226         (f32_sr2): Likewise.
31227         (f32_sm): Likewise.
31228         (f32_sm2): Likewise.
31229         (f32_si): Likewise.
31230         (f32_si2): Likewise.
31231         (f32_sv): Likewise.
31232         (f32_dm): Likewise.
31233         (f32_vsx): Likewise.
31234         (f32_av): Likewise.
31235         (mov<mode>_hardfloat): Split into separate movsf and movsd pieces.
31236         For movsf, order stores so the VSX stores occur before the GPR
31237         store which encourages the register allocator to use a traditional
31238         FPR instead of a GPR.  For movsd, order the stores so that the GPR
31239         store comes before the VSX stores to allow the power6 to work.
31240         This is due to the power6 not having a 32-bit integer store
31241         instruction from a FPR.
31242         (movsf_hardfloat): Likewise.
31243         (movsd_hardfloat): Likewise.
31244
31245 2017-05-09  Martin Sebor  <msebor@redhat.com>
31246
31247         PR translation/80280
31248         * config/sol2-c.c (cmn_err_flag_specs): Initialize new data member
31249         added in r247778.
31250
31251         PR translation/80280
31252         * config/i386/msformat-c.c (ms_printf_flag_specs): Initialize new
31253         data member added in r247778.
31254         (ms_scanf_flag_specs, ms_strftime_flag_specs): Same.
31255
31256 2017-05-09  Nathan Sidwell  <nathan@acm.org>
31257
31258         * tree.h (tree_fits_shwi_p, tree_fits_uhwi_p): Unconditionally pure.
31259
31260         * ipa-devirt.c (default_hash_traits<type_pair>): Skip struct-scope
31261         typedefs.
31262
31263 2017-05-09  Marek Polacek  <polacek@redhat.com>
31264
31265         * doc/invoke.texi: Fix typo.
31266
31267 2017-05-09  Richard Biener  <rguenther@suse.de>
31268
31269         * tree-vrp.c (vrp_val_is_max): Adjust comment.
31270         (vrp_val_is_min): Likewise.
31271         (set_value_range_to_value): Likewise.
31272         (set_value_range_to_nonnegative): Likewise.
31273         (gimple_assign_nonzero_p): Likewise.
31274         (gimple_stmt_nonzero_p): Likewise.
31275         (vrp_int_const_binop): Likewise.  Remove unreachable case.
31276         (adjust_range_with_scev): Adjust comments.
31277         (compare_range_with_value): Likewise.
31278         (extract_range_from_phi_node): Likewise.
31279         (test_for_singularity): Likewise.
31280
31281 2017-05-09  Richard Biener  <rguenther@suse.de>
31282
31283         * tree-vrp.c (get_single_symbol): Add assert that we don't
31284         get overflowed constants as invariant part.
31285         (compare_values_warnv): Add comment before the TREE_NO_WARNING
31286         checks.  Use wi::cmp instead of recursing for integer constants.
31287         (compare_values): Just ignore whether we assumed undefined
31288         overflow instead of failing the compare.
31289         (extract_range_for_var_from_comparison_expr): Add comment before the
31290         TREE_NO_WARNING sets.
31291         (test_for_singularity): Likewise.
31292         (extract_range_from_comparison): Do not disable optimization
31293         when we assumed undefined overflow.
31294         (extract_range_basic): Remove init of unused var.
31295
31296 2017-05-09  Richard Biener  <rguenther@suse.de>
31297
31298         * tree-vrp.c (vrp_int_const_binop): Use wide-ints and simplify.
31299         (extract_range_from_multiplicative_op_1): Adjust.
31300         (extract_range_from_binary_expr_1): Use int_const_binop.
31301
31302 2017-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
31303
31304         PR target/80101
31305         * config/rs6000/power6.md: Replace store_data_bypass_p calls with
31306         rs6000_store_data_bypass_p in seven define_bypass directives and
31307         in several comments.
31308         * config/rs6000/rs6000-protos.h: Add prototype for
31309         rs6000_store_data_bypass_p function.
31310         * config/rs6000/rs6000.c (rs6000_store_data_bypass_p): New
31311         function implements slightly different (rs6000-specific) semantics
31312         than store_data_bypass_p, returning false rather than aborting
31313         with assertion error when arguments do not satisfy the
31314         requirements of store data bypass.
31315         (rs6000_adjust_cost): Replace six calls of store_data_bypass_p with
31316         rs6000_store_data_bypass_p.
31317
31318 2017-05-08  Max Filippov  <jcmvbkbc@gmail.com>
31319
31320         * config/xtensa/xtensa-protos.h
31321         (xtensa_initial_elimination_offset): New declaration.
31322         * config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
31323         New function. Move its body from the INITIAL_ELIMINATION_OFFSET
31324         macro definition, add case for FRAME_POINTER_REGNUM when
31325         FRAME_GROWS_DOWNWARD.
31326         * config/xtensa/xtensa.h (FRAME_GROWS_DOWNWARD): New macro definition.
31327         (INITIAL_ELIMINATION_OFFSET): Replace body with call to
31328         xtensa_initial_elimination_offset.
31329
31330 2017-05-08  Nathan Sidwell  <nathan@acm.org>
31331
31332         * doc/invoke.texi: Alphabetize -fdump options.
31333
31334 2017-05-08  Martin Sebor  <msebor@redhat.com>
31335
31336         PR translation/80280
31337         * config/sol2-c.c (solaris_pragma_align): Correct quoting.
31338
31339 2017-05-08  Bernd Edlinger  <bernd.edlinger@hotmail.de>
31340
31341         * target.def (compute_frame_layout): New optional target hook.
31342         * doc/tm.texi.in (TARGET_COMPUTE_FRAME_LAYOUT): Add hook.
31343         * doc/tm.texi (TARGET_COMPUTE_FRAME_LAYOUT): Add documentation.
31344         * lra-eliminations.c (update_reg_eliminate): Call compute_frame_layout
31345         target hook.
31346         * reload1.c (verify_initial_elim_offsets): Likewise.
31347         * config/arm/arm.c (TARGET_COMPUTE_FRAME_LAYOUT): Define.
31348         (use_simple_return_p): Call arm_compute_frame_layout if needed.
31349         (arm_get_frame_offsets): Split up into this ...
31350         (arm_compute_frame_layout): ... and this function.
31351
31352 2017-05-08  Richard Sandiford  <richard.sandiford@arm.com>
31353
31354         * config/aarch64/constraints.md (Usa): New constraint.
31355         * config/aarch64/aarch64.md (*movsi_aarch64, *movdi_aarch64): Use it.
31356
31357 2017-05-08  Thomas Preud'homme  <thomas.preudhomme@arm.com>
31358
31359         * config.gcc (arm*-*-*): Set TM_MULTILIB_CONFIG from
31360         with_multilib_list after it has been checked.
31361
31362 2017-05-08  Richard Biener  <rguenther@suse.de>
31363
31364         * tree-ssa-pre.c (bitmap_set_and): Avoid bitmap copy.
31365         (bitmap_set_subtract_values): Likewise.
31366
31367 2017-05-08  Richard Biener  <rguenther@suse.de>
31368
31369         * tree-vrp.c (gimple_assign_nonzero_warnv_p): Rename to ...
31370         (gimple_assign_nonzero): ... this and remove strict_overflow_p
31371         argument.
31372         (gimple_stmt_nonzero_warnv_p): Rename to ...
31373         (gimple_stmt_nonzero_p): ... this and remove strict_overflow_p
31374         argument.
31375         (vrp_stmt_computes_nonzero): Remove strict_overflow_p argument.
31376         (extract_range_basic): Adjust, do not disable propagation on
31377         strict overflow sensitive simplification.
31378         (vrp_visit_cond_stmt): Likewise.
31379
31380 2017-05-05  Jan Hubicka  <hubicka@ucw.cz>
31381
31382         * ipa-inline-analysis.c (estimate_function_body_sizes): Recompute
31383         body size unconditionally.
31384
31385 2017-05-07  Jeff Law  <law@redhat.com>
31386
31387         Revert:
31388         2017-05-06  Jeff Law  <law@redhat.com>
31389         PR tree-optimization/78496
31390         * tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
31391         code.
31392
31393         PR tree-optimization/78496
31394         * tree-vrp.c (simplify_assert_expr_using_ranges): New function.
31395         (simplify_stmt_using_ranges): Call it.
31396         (vrp_dom_walker::before_dom_children): Extract equivalences
31397         from an ASSERT_EXPR with an equality comparison against a
31398         constant.
31399
31400 2017-05-06  Jeff Law  <law@redhat.com>
31401
31402         PR tree-optimization/78496
31403         * tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
31404         code.
31405
31406         PR tree-optimization/78496
31407         * tree-vrp.c (simplify_assert_expr_using_ranges): New function.
31408         (simplify_stmt_using_ranges): Call it.
31409         (vrp_dom_walker::before_dom_children): Extract equivalences
31410         from an ASSERT_EXPR with an equality comparison against a
31411         constant.
31412
31413 2017-05-06  Richard Sandiford  <richard.sandiford@linaro.org>
31414
31415         * lra-constraints.c (lra_copy_reg_equiv): New function.
31416         (split_reg): Use it to copy equivalence information from the
31417         original register to the spill register.
31418
31419 2017-05-06  Richard Sandiford  <richard.sandiford@linaro.org>
31420
31421         PR rtl-optimization/75964
31422         * simplify-rtx.c (simplify_const_relational_operation): Remove
31423         invalid handling of comparisons of integer ABS.
31424
31425 2017-05-06  Uros Bizjak  <ubizjak@gmail.com>
31426
31427         * config/i386/i386.c (ext_80387_constant_init): Do not explicitly
31428         initialize to zero.
31429         (init_regs): Remove declaration.
31430         (function_arg_advance_32): Initialize error_p as boolean variable.
31431
31432 2017-05-05  Nathan Sidwell  <nathan@acm.org>
31433
31434         * store-motion.c (remove_reachable_equiv_notes): Reformat long
31435         lines.  Use for (;;).
31436
31437 2017-05-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31438
31439         * config/rs6000/rs6000.c (rs6000_vect_nonmem): New static var.
31440         (rs6000_init_cost): Initialize rs6000_vect_nonmem.
31441         (rs6000_add_stmt_cost): Update rs6000_vect_nonmem.
31442         (rs6000_finish_cost): Avoid vectorizing simple copy loops with
31443         VF=2 that require versioning.
31444
31445 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
31446
31447         * diagnostic.h (CARET_LINE_MARGIN): Convert from macro to const
31448         int.
31449
31450 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
31451
31452         * diagnostic.h (diagnostic_override_option_index): Convert from
31453         macro to inline function.
31454
31455 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
31456
31457         * diagnostic.c (last_module_changed_p): New function.
31458         (set_last_module): New function.
31459         (diagnostic_report_current_module): Convert macro usage to
31460         the above functions.
31461         * diagnostic.h (diagnostic_context::last_module): Strengthen
31462         from const line_map * to const line_map_ordinary *.
31463         (diagnostic_last_module_changed): Delete macro.
31464         (diagnostic_set_last_module): Delete macro.
31465
31466 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
31467
31468         * diagnostic.c (diagnostic_impl): Replace report_diagnostic
31469         with diagnostic_report_diagnostic.
31470         (diagnostic_n_impl_richloc): Likewise.
31471         * diagnostic.h (report_diagnostic): Delete macro.
31472         * rtl-error.c (diagnostic_for_asm): Replace report_diagnostic
31473         with diagnostic_report_diagnostic.
31474         * substring-locations.c (format_warning_va): Likewise.
31475
31476 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
31477
31478         * diagnostic.c (diagnostic_report_diagnostic): Eliminate
31479         save/restor of format_spec.  Move option-printing code to...
31480         (print_option_information): ...this new function, and
31481         reimplement by simply printing to the pretty_printer,
31482         rather than appending to the format string.
31483
31484 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
31485
31486         * diagnostic.c (diagnostic_report_diagnostic): Split out pragma
31487         handling logic into...
31488         (update_effective_level_from_pragmas): ...this new function.
31489
31490 2017-05-04  Andrew Waterman  <andrew@sifive.com>
31491
31492         * config/riscv/riscv.opt (mstrict-align): New option.
31493         * config/riscv/riscv.h (STRICT_ALIGNMENT): Use it.  Update comment.
31494         (SLOW_UNALIGNED_ACCESS): Define.
31495         (riscv_slow_unaligned_access): Declare.
31496         * config/riscv/riscv.c (riscv_tune_info): Add slow_unaligned_access
31497         field.
31498         (riscv_slow_unaligned_access): New variable.
31499         (rocket_tune_info): Set slow_unaligned_access to true.
31500         (optimize_size_tune_info): Set slow_unaligned_access to false.
31501         (riscv_cpu_info_table): Add entry for optimize_size_tune_info.
31502         (riscv_valid_lo_sum_p): Use TARGET_STRICT_ALIGN.
31503         (riscv_option_override): Set riscv_slow_unaligned_access.
31504         * doc/invoke.texi: Add -mstrict-align to RISC-V.
31505
31506 2017-05-04  Kito Cheng  <kito.cheng@gmail.com>
31507
31508         * config/riscv/riscv.md: Unify indentation.
31509
31510 2017-05-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
31511
31512         PR target/79038
31513         PR target/79202
31514         PR target/79203
31515         * config/rs6000/rs6000.md (u code attribute): Add FIX and
31516         UNSIGNED_FIX.
31517         (extendsi<mode>2): Add support for doing sign extension via
31518         VUPKHSW and XXPERMDI if the value is in Altivec registers and we
31519         don't have ISA 3.0 instructions.
31520         (extendsi<mode>2 splitter): Likewise.
31521         (fix_trunc<mode>si2): If we are at ISA 2.07 (VSX small integer),
31522         generate the normal insns since SImode can now go in vector
31523         registers.  Disallow the special UNSPECs needed for previous
31524         machines to hide SImode being used.  Add new insns
31525         fctiw{,w}_<mode>_smallint if SImode can go in vector registers.
31526         (fix_trunc<mode>si2_stfiwx): Likewise.
31527         (fix_trunc<mode>si2_internal): Likewise.
31528         (fixuns_trunc<mode>si2): Likewise.
31529         (fixuns_trunc<mode>si2_stfiwx): Likewise.
31530         (fctiw<u>z_<mode>_smallint): Likewise.
31531         (fctiw<u>z_<mode>_mem): New combiner pattern to prevent conversion
31532         of floating point to 32-bit integer from doing a direct move to
31533         the GPR registers to do a store.
31534         (fctiwz_<mode>): Break long line.
31535
31536 2017-05-05  Bin Cheng  <bin.cheng@arm.com>
31537
31538         * Makefile.in (GTFILES): Add tree-ssa-loop-ivopts.c.
31539         * tree-ssa-loop-ivopts.c (compute_max_addr_offset): Delete.
31540         (addr_list, addr_offset_valid_p): New.
31541         (split_address_groups): Check offset validity with above function.
31542         (gt-tree-ssa-loop-ivopts.h): Include header file.
31543
31544 2017-05-05  Nathan Sidwell  <nathan@acm.org>
31545
31546         * config.gcc (arm*-*-*): Add missing 'fi'.
31547
31548 2017-05-05  Steve Ellcey  <sellcey@cavium.com>
31549
31550         * doc/invoke.texi (-fopt-info): Explicitly say order of options
31551         included in -fopt-info does not matter.
31552         * doc/optinfo.texi (-fopt-info): Fix description of default
31553         behavour. Explicitly say order of options included in -fopt-info
31554         does not matter.
31555
31556 2017-05-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>
31557
31558         * config.gcc: Allow combinations of aprofile and rmprofile values for
31559         --with-multilib-list.
31560         * config/arm/t-multilib: New file.
31561         * config/arm/t-aprofile: Remove initialization of MULTILIB_*
31562         variables.  Remove setting of ISA and floating-point ABI in
31563         MULTILIB_OPTIONS and MULTILIB_DIRNAMES.  Set architecture and FPU in
31564         MULTI_ARCH_OPTS_A and MULTI_ARCH_DIRS_A rather than MULTILIB_OPTIONS
31565         and MULTILIB_DIRNAMES respectively.  Add comment to introduce all
31566         matches.  Add architecture matches for marvel-pj4 and generic-armv7-a
31567         CPU options.
31568         * config/arm/t-rmprofile: Likewise except for the matches changes.
31569         * doc/install.texi (--with-multilib-list): Document the combination of
31570         aprofile and rmprofile values and warn about pitfalls in doing that.
31571
31572 2017-05-05  Wilco Dijkstra  <wdijkstr@arm.com>
31573
31574         * config/aarch64/aarch64.md (movsi_aarch64): Remove '*' from r=w.
31575         (movdi_aarch64): Likewise.
31576
31577 2017-05-05  Jakub Jelinek  <jakub@redhat.com>
31578
31579         PR tree-optimization/80632
31580         * tree-switch-conversion.c (struct switch_conv_info): Add target_vop
31581         field.
31582         (build_arrays): Initialize it for virtual phis.
31583         (fix_phi_nodes): Use it for virtual phis.
31584
31585         PR tree-optimization/80558
31586         * tree-vrp.c (extract_range_from_binary_expr_1): Optimize
31587         [x, y] op z into [x op, y op z] for op & or | if conditions
31588         are met.
31589
31590 2017-05-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
31591             Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
31592
31593         PR target/71607
31594         * config/arm/arm.md (use_literal_pool): Remove.
31595         (64-bit immediate split): No longer takes cost into consideration
31596         if arm_disable_literal_pool is enabled.
31597         * config/arm/arm.c (arm_tls_referenced_p): Add diagnostic if TLS is
31598         used when arm_disable_literal_pool is enabled.
31599         (arm_max_const_double_inline_cost): Remove use of
31600         arm_disable_literal_pool.
31601         (push_minipool_fix): Add assert.
31602         (arm_reorg): Add return if arm_disable_literal_pool is enabled.
31603         * config/arm/vfp.md (no_literal_pool_df_immediate): New.
31604         (no_literal_pool_sf_immediate): New.
31605
31606 2017-05-05  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
31607
31608         PR tree-optimization/80613
31609         * tree-ssa-dce.c (propagate_necessity): Remove cases for
31610         BUILT_IN_STRDUP and BUILT_IN_STRNDUP.
31611
31612 2017-05-05  Richard Biener  <rguenther@suse.de>
31613
31614         * tree-ssa-pre.c (get_or_alloc_expr_for): Simplify.
31615
31616 2017-05-05  Georg-Johann Lay  <avr@gjlay.de>
31617
31618         * config/avr/avr.md [flag_strict_overflow]: Remove any occurence
31619         of this flag from insn conditions due to removal from r247495.
31620
31621 2017-05-05  Wilco Dijkstra  <wdijkstr@arm.com>
31622
31623         * config/arm/aarch-common.c (arm_early_load_addr_dep_ptr):
31624         New function.
31625         (arm_early_store_addr_dep_ptr): Likewise.
31626         * config/arm/aarch-common-protos.h
31627         (arm_early_load_addr_dep_ptr): Add prototype.
31628         (arm_early_store_addr_dep_ptr): Likewise.
31629         * config/arm/cortex-a53.md: Add new bypasses.
31630
31631 2017-05-05  Jakub Jelinek  <jakub@redhat.com>
31632
31633         * tree.c (next_type_uid): Change type to unsigned.
31634         (type_hash_canon): Decrement back next_type_uid if
31635         freeing a type node with the highest TYPE_UID.  For INTEGER_TYPEs
31636         also ggc_free TYPE_MIN_VALUE, TYPE_MAX_VALUE and TYPE_CACHED_VALUES
31637         if possible.
31638
31639 2017-05-04  Martin Sebor  <msebor@redhat.com>
31640
31641         * builtins.c: Fix a trivial typo in a comment.
31642
31643         PR middle-end/79234
31644         * builtins.c (check_sizes): Adjust to handle reading past the end.
31645         Avoid printing excessive upper bound of ranges.  Use %E to print
31646         tree nodes instead of converting them to %wu.
31647         (expand_builtin_memchr): New function.
31648         (compute_dest_size): Rename...
31649         (compute_objsize): ...to this.
31650         (expand_builtin_memcpy): Adjust.
31651         (expand_builtin_mempcpy): Adjust.
31652         (expand_builtin_strcat): Adjust.
31653         (expand_builtin_strcpy): Adjust.
31654         (check_strncat_sizes): Adjust.
31655         (expand_builtin_strncat): Adjust.
31656         (expand_builtin_strncpy): Adjust and simplify.
31657         (expand_builtin_memset): Adjust.
31658         (expand_builtin_bzero): Adjust.
31659         (expand_builtin_memcmp): Adjust.
31660         (expand_builtin): Handle memcmp.
31661         (maybe_emit_chk_warning): Check strncat just once.
31662
31663 2017-05-04  Martin Sebor  <msebor@redhat.com>
31664
31665         PR preprocessor/79214
31666         PR middle-end/79222
31667         PR middle-end/79223
31668         * builtins.c (check_sizes): Add inlining context and issue
31669         warnings even when -Wno-system-headers is set.
31670         (check_strncat_sizes): Same.
31671         (expand_builtin_strncat): Same.
31672         (expand_builtin_memmove): New function.
31673         (expand_builtin_stpncpy): Same.
31674         (expand_builtin): Handle memmove and stpncpy.
31675
31676 2017-05-04  Bin Cheng  <bin.cheng@arm.com>
31677
31678         * tree-ssa-loop-ivopts.c (struct cost_pair): Remove field inv_expr
31679         which is not used any more.
31680
31681 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
31682
31683         * config/aarch64/aarch64.c (generic_tunings): Update prefetch model.
31684
31685 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
31686
31687         * config/aarch64/aarch64.c (cortexa35_tunings): Set jump alignment to 4.
31688         (cortexa53_tunings): Likewise.
31689         (cortexa57_tunings): Likewise.
31690         (cortexa72_tunings): Likewise.
31691         (cortexa73_tunings): Likewise.
31692
31693 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
31694
31695         * config/aarch64/aarch64.c (generic_tunings): Set jump alignment to 4.
31696         Set loop alignment to 8.
31697
31698 2017-05-04  Martin Sebor  <msebor@redhat.com>
31699
31700         PR translation/80280
31701         * builtins.c (expand_builtin_object_size): Add missing quoting to
31702         %D and like directives.
31703         * hsa-gen.c (hsa_type_for_scalar_tree_type): Same.
31704         (hsa_type_for_tree_type): Same.
31705         (verify_function_arguments): Same.
31706         * symtab.c (symbol_table::change_decl_assembler_name): Same.
31707         * varasm.c (get_section): Same.
31708         (mark_weak): Same.
31709
31710 2017-05-04  Martin Sebor  <msebor@redhat.com>
31711
31712         PR translation/80280
31713         * config/i386/i386.c (ix86_function_versions): Quote a %D directive.
31714
31715 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
31716
31717         * config/aarch64/aarch64.c (generic_addrcost_table):
31718         Change HI/TI mode setting.
31719
31720 2017-05-04  Martin Jambor  <mjambor@suse.cz>
31721
31722         PR tree-optimization/80622
31723         * tree-sra.c (comes_initialized_p): New function.
31724         (build_accesses_from_assign): Only set write lazily when
31725         comes_initialized_p is false.
31726         (analyze_access_subtree): Use comes_initialized_p.
31727         (propagate_subaccesses_across_link): Assert !comes_initialized_p
31728         instead of testing for PARM_DECL.
31729
31730 2017-05-04  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
31731
31732         * config/aarch64/aarch64.md (prefetch); Adjust predicate and
31733         constraint on operand 0 to allow more general addressing modes.
31734         Adjust output template.
31735         * config/aarch64/aarch64.c (aarch64_address_valid_for_prefetch_p):
31736         New function.
31737         * config/aarch64/aarch64-protos.h
31738         (aarch64_address_valid_for_prefetch_p): Declare prototype.
31739         * config/aarch64/constraints.md (Dp): New address constraint.
31740         * config/aarch64/predicates.md (aarch64_prefetch_operand): New
31741         predicate.
31742
31743 2017-05-04  Jan Hubicka  <hubicka@ucw.cz>
31744
31745         * ipa-cp.c (perform_estimation_of_a_value): Drop base_time parameter;
31746         update use of estimate_ipcp_clone_size_and_time.
31747         (estimate_local_effects): Update use of
31748         estimate_ipcp_clone_size_and_time and perform_estimation_of_a_value.
31749         * ipa-inline.h (estimate_ipcp_clone_size_and_time): Update prototype.
31750         * ipa-inline-analysis.c (estimate_ipcp_clone_size_and_time):
31751         Return nonspecialized time.
31752
31753 2017-05-04  Richard Biener  <rguenther@suse.de>
31754
31755         * tree-ssa-alias.c (get_continuation_for_phi): Improve looking
31756         for the last VUSE which def dominates the PHI.  Directly call
31757         maybe_skip_until.
31758         (get_continuation_for_phi_1): Remove.
31759
31760 2017-05-04  Richard Sandiford  <richard.sandiford@linaro.org>
31761
31762         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): Add commentary
31763         to explain the use of truncating division.  Cap the number of
31764         iterations to the maximum given by nb_iterations_upper_bound,
31765         if defined.
31766
31767 2017-05-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
31768
31769         * configure.ac (--enable-mingw-wildcard): Add new configurable feature.
31770         * configure: Regenerate.
31771         * config.in: Regenerate.
31772         * config/i386/driver-mingw32.c: new file.
31773         * config/i386/x-mingw32: Add rule to build driver-mingw32.o.
31774         * config.host: Link driver-mingw32.o on MinGW host.
31775         * doc/install.texi: Document new --enable-mingw-wildcard configure
31776         option.
31777
31778 2017-05-04  Marek Polacek  <polacek@redhat.com>
31779
31780         PR tree-optimization/80612
31781         * calls.c (get_size_range): Check for INTEGRAL_TYPE_P.
31782
31783 2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
31784             Andre Simoes Dias Vieira  <andre.simoesdiasvieira@arm.com>
31785
31786         * config/arm/arm.md (movsi): Change TARGET_32BIT to TARGET_HAVE_MOVT.
31787         (movt splitter): Likewise.
31788         * config/arm/arm.c (arm_option_check_internal): Change arm_arch_thumb2
31789         to TARGET_HAVE_MOVT, and merge with -mslow-flash-data check.
31790         (const_ok_for_arm): Change else to else if (TARGET_THUMB2) and add else
31791         block for Thumb-1 with MOVT.
31792         (thumb2_legitimate_address_p): Move code block ...
31793         (can_avoid_literal_pool_for_label_p): ... into this new function.
31794         (thumb1_legitimate_address_p): Add check for TARGET_HAVE_MOVT and
31795         literal pool.
31796         (thumb_legitimate_constant_p): Add conditional on TARGET_HAVE_MOVT
31797         * doc/invoke.texi (-mpure-code): Change "ARMv7-M targets" for
31798         "M-profile targets with the MOVT instruction".
31799
31800 2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
31801
31802         * config/arm/arm-builtins.c (arm_init_builtins): Rename
31803         __builtin_arm_ldfscr to __builtin_arm_get_fpscr, and rename
31804         __builtin_arm_stfscr to __builtin_arm_set_fpscr.
31805
31806 2017-05-04  Martin Liska  <mliska@suse.cz>
31807
31808         * tree-vrp.c (simplify_cond_using_ranges_2): Remove unused
31809         variable cond_code.
31810
31811 2017-05-04  Richard Biener  <rguenther@suse.de>
31812
31813         * tree.c (array_at_struct_end_p): Handle arrays at struct
31814         end with flexarrays more conservatively.  Refactor and treat
31815         arrays of arrays or aggregates more strict.  Fix
31816         VIEW_CONVERT_EXPR handling.  Remove allow_compref argument.
31817         * tree.c (array_at_struct_end_p): Adjust prototype.
31818         * emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust.
31819         * gimple-fold.c (get_range_strlen): Likewise.
31820         * tree-chkp.c (chkp_may_narrow_to_field): Likewise.
31821
31822 2017-05-04  Richard Biener  <rguenther@suse.de>
31823
31824         PR tree-optimization/31130
31825         * tree-vrp.c (needs_overflow_infinity): Remove as always returning
31826         false.
31827         (supports_overflow_infinity): Likewise.
31828         (is_negative_overflow_infinity): Likewise.
31829         (is_positive_overflow_infinity): Likewise.
31830         (is_overflow_infinity): Likewise.
31831         (stmt_overflow_infinity): Likewise.
31832         (overflow_infinity_range_p): Likewise.
31833         (usable_range_p): Remove as always returning true.
31834         (make_overflow_infinity): Remove.
31835         (negative_overflow_infinity): Likewise.
31836         (positive_overflow_infinity): Likewise.
31837         (avoid_overflow_infinity): Likewise.
31838         (set_value_range): Adjust accordingly.
31839         (set_value_range_to_nonnegative): Likewise, remove now unused
31840         overflow_infinity arg.
31841         (vrp_operand_equal_p): Adjust.
31842         (update_value_range): Likewise.
31843         (range_int_cst_singleton_p): Likewise.
31844         (operand_less_p): Likewise.
31845         (compare_values_warnv): Likewise.
31846         (extract_range_for_var_from_comparison_expr): Likewise.
31847         (vrp_int_const_binop): Likewise.
31848         (zero_nonzero_bits_from_vr): Likewise.
31849         (extract_range_from_multiplicative_op_1): Likewise.
31850         (extract_range_from_binary_expr_1): Likewise.
31851         (extract_range_from_unary_expr): Likewise.
31852         (extract_range_from_comparison): Likewise.
31853         (extract_range_basic): Likewise.
31854         (adjust_range_with_scev): Likewise.
31855         (compare_ranges): Likewise.
31856         (compare_range_with_value): Likewise.
31857         (dump_value_range): Likewise.
31858         (test_for_singularity): Likewise, remove strict_overflow_p parameter
31859         never used.
31860         (simplify_cond_using_ranges): Adjust.
31861
31862 2017-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
31863
31864         * brig-builtins.def: Added a builtin for class_f64.
31865         * builtin-types.def: Added a builtin type needed by class_f64.
31866
31867 2017-05-03  Jason Merrill  <jason@redhat.com>
31868
31869         * timevar.def: Add TV_CONSTEXPR.
31870
31871 2017-05-03  David Malcolm  <dmalcolm@redhat.com>
31872
31873         * common.opt (fdiagnostics-parseable-fixits): Fix typo.
31874
31875 2017-05-03  Martin Jambor  <mjambor@suse.cz>
31876
31877         * ipa-prop.c (ipa_update_after_lto_read): Removed.
31878         * ipa-prop.h (ipa_update_after_lto_read): Remove declaration.
31879         * ipa-cp.c (ipcp_propagate_stage): Do not call
31880         ipa_update_after_lto_read.
31881         * ipa-inline.c (ipa_inline): Likewise.
31882
31883 2017-05-03  Martin Jambor  <mjambor@suse.cz>
31884
31885         * ipa-prop.h (ipa_edge_args): Make a class.  Mark with for_user GTY
31886         tag.  Added a default constructor and a destructor.
31887         (ipa_edge_args_sum_t): New class;
31888         (ipa_edge_args_sum): Declare.
31889         (ipa_edge_args_vector): Remove declaration.
31890         (IPA_EDGE_REF): Use ipa_edge_args_sum.
31891         (ipa_free_edge_args_substructures): Remove declaration.
31892         (ipa_check_create_edge_args): Use ipa_edge_args_sum.
31893         (ipa_edge_args_info_available_for_edge_p): Likewise.
31894         * ipa-prop.c (ipa_edge_args_vector): Removed.
31895         (edge_removal_hook_holder): Likewise.
31896         (edge_duplication_hook_holder): Likewise.
31897         (ipa_edge_args_sum): New variable.
31898         (ipa_propagate_indirect_call_infos): Test ipa_edge_args_sum instead of
31899         ipa_edge_args_vector.
31900         (ipa_free_edge_args_substructures): Likewise.
31901         (ipa_free_all_edge_args): Free ipa_edge_args_sum instead of
31902         ipa_edge_args_vector.
31903         (ipa_edge_removal_hook): Turned into method
31904         ipa_edge_args_sum_t::remove.
31905         (ipa_edge_duplication_hook): Turned into method
31906         ipa_edge_args_sum_t::duplicate.
31907         (ipa_register_cgraph_hooks): Create ipa_edge_args_sum instead of
31908         registering edge hooks.
31909         (ipa_unregister_cgraph_hooks): Do not unregister edge hooks.
31910         * ipa-inline-analysis.c (estimate_function_body_sizes): Test
31911         ipa_edge_args_sum instead of ipa_edge_args_vector.
31912         * ipa-profile.c (ipa_profile): Likewise.
31913
31914 2017-05-03  Martin Jambor  <mjambor@suse.cz>
31915
31916         * symbol-summary.h (function_summary): New method exists.
31917         (function_summary::symtab_removal): Deallocate through release.
31918         (call_summary): New class.
31919         (gt_ggc_mx): New overload.
31920         (gt_pch_nx): Likewise.
31921         (gt_pch_nx): Likewise.
31922
31923 2017-05-03  Jeff Law  <law@redhat.com>
31924
31925         PR tree-optimization/78496
31926         * tree-vrp.c (simplify_cond_using_ranges_1): Renamed
31927         from simplify_cond_using_ranges.  Split off code to walk
31928         backwards through casts into ...
31929         (simplify_cond_using_ranges_2): New function.
31930         (simplify_stmt_using_ranges): Call simplify_cond_using_ranges_1.
31931         (execute_vrp): After identifying jump threads, call
31932         simplify_cond_using_ranges_2.
31933
31934 2017-05-03  Jan Hubicka  <hubicka@ucw.cz>
31935
31936         PR bootstrap/80609
31937         * ipa-inline.h (inline_summary): Add ctor.
31938         (create_ggc): Do not use ggc_cleared_alloc.
31939
31940 2017-05-03  Jeff Downs  <heydowns@somuchpressure.net>
31941             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
31942
31943         * gcc.c (handle_braces): Support escaping in switch matching
31944         text.
31945         * doc/invoke.texi (Spec Files): Document it.
31946         Remove superfluous @code markup in items.
31947
31948 2017-05-03  David Malcolm  <dmalcolm@redhat.com>
31949
31950         * diagnostic-show-locus.c (struct column_range): New struct.
31951         (get_affected_columns): New function.
31952         (get_printed_columns): New function.
31953         (struct correction): New struct.
31954         (correction::ensure_capacity): New function.
31955         (correction::ensure_terminated): New function.
31956         (struct line_corrections): New struct.
31957         (line_corrections::~line_corrections): New dtor.
31958         (line_corrections::add_hint): New function.
31959         (layout::print_trailing_fixits): Reimplement in terms of the new
31960         classes.
31961         (selftest::test_overlapped_fixit_printing): New function.
31962         (selftest::diagnostic_show_locus_c_tests): Call it.
31963
31964 2017-05-03  Nathan Sidwell  <nathan@acm.org>
31965
31966         Canonicalize canonical type hashing
31967         * tree.h (type_hash_canon_hash): Declare.
31968         * tree.c (type_hash_list, attribute_hash_list): Move into
31969         type_hash_canon_hash.
31970         (build_type_attribute_qual_variant): Break out hash code calc into
31971         type_hash_canon_hash.
31972         (type_hash_canon_hash): New.  Generic type hash computation.
31973         (build_range_type_1, build_array_type_1, build_function_type,
31974         build_method_type_directly, build_offset_type, build_complex_type,
31975         make_vector_type): Call it.
31976
31977 2017-05-03  Richard Biener  <rguenther@suse.de>
31978
31979         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
31980         When all DRs have unknown misaligned do not always peel
31981         when there is a store but apply the same costing model as if
31982         there were only loads.
31983
31984 2017-05-03  Richard Biener  <rguenther@suse.de>
31985
31986         Revert
31987         PR tree-optimization/80492
31988         * tree-ssa-alias.c (decl_refs_may_alias_p): Handle
31989         compare_base_decls returning dont-know properly.
31990
31991 2017-05-03  Thomas Preud'homme  <thomas.preudhomme@arm.com>
31992
31993         * config/arm/iterators.md (CCSI): New mode iterator.
31994         (arch): New mode attribute.
31995         * config/arm/sync.md (atomic_compare_and_swap<mode>_1): Rename into ...
31996         (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1): This and ...
31997         (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): This.  Use CCSI
31998         code iterator for success result mode.
31999         * config/arm/arm.c (arm_expand_compare_and_swap): Adapt code to use
32000         the corresponding new insn generators.
32001
32002 2017-05-03  Bin Cheng  <bin.cheng@arm.com>
32003
32004         Revert r247509
32005         2017-05-02  Bin Cheng  <bin.cheng@arm.com>
32006         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
32007
32008 2017-05-03  Richard Sandiford  <richard.sandiford@linaro.org>
32009
32010         * tree-data-ref.h (SUB_CONFLICTS_IN_A): Wrap SUB argument in brackets.
32011         (SUB_CONFLICTS_IN_B, SUB_LAST_CONFLICT, SUB_DISTANCE): Likewise.
32012         (DDR_A): Wrap DDR argument in brackets.
32013         (DDR_B, DDR_AFFINE_P, DDR_ARE_DEPENDENT, DDR_SUBSCRIPTS): Likewise.
32014         (DDR_LOOP_NEST, DDR_INNER_LOOP, DDR_SELF_REFERENCE): Likewise.
32015         (DDR_REVERSED_P): Likewise.
32016
32017 2017-05-03  Jakub Jelinek  <jakub@redhat.com>
32018
32019         PR tree-optimization/79472
32020         * tree-switch-conversion.c (struct switch_conv_info): Add
32021         contiguous_range and default_case_nonstandard fields.
32022         (collect_switch_conv_info): Compute contiguous_range and
32023         default_case_nonstandard fields, don't clear final_bb if
32024         contiguous_range and only the default case doesn't have the required
32025         structure.
32026         (check_all_empty_except_final): Set default_case_nonstandard instead
32027         of failing if contiguous_range and the default case doesn't have empty
32028         block.
32029         (check_final_bb): Add SWTCH argument, don't fail if contiguous_range
32030         and only the default case doesn't have the required constants.  Skip
32031         virtual phis.
32032         (gather_default_values): Skip virtual phis.  Allow non-NULL CASE_LOW
32033         if default_case_nonstandard.
32034         (build_constructors): Build constant 1 just once.  Assert that default
32035         values aren't inserted in between cases if contiguous_range.  Skip
32036         virtual phis.
32037         (build_arrays): Skip virtual phis.
32038         (prune_bbs): Add DEFAULT_BB argument, don't remove that bb.
32039         (fix_phi_nodes): Don't add e2f phi arg if default_case_nonstandard.
32040         Handle virtual phis.
32041         (gen_inbound_check): Handle default_case_nonstandard case.
32042         (process_switch): Adjust check_final_bb caller.  Call
32043         gather_default_values with the first non-default case instead of
32044         default case if default_case_nonstandard.
32045
32046 2017-05-02  Nathan Sidwell  <nathan@acm.org>
32047
32048         * ggc-page.c (move_ptes_to_front): Replace unsigned >0 with i--
32049         check.  Fix formatting.
32050
32051 2017-05-02  Jan Hubicka  <hubicka@ucw.cz>
32052
32053         * ipa-inline-analysis.c (estimate_node_size_and_time): Allow roundoff
32054         errors when comparing specialized and unspecialized times.
32055
32056 2017-05-02  David Malcolm  <dmalcolm@redhat.com>
32057
32058         * diagnostic-show-locus.c
32059         (layout::should_print_annotation_line_p): Make private.
32060         (layout::print_annotation_line): Make private.
32061         (layout::annotation_line_showed_range_p): Make private.
32062         (layout::show_ruler): Make private.
32063         (layout::print_source_line): Make private.  Pass in line and
32064         line_width, rather than calling location_get_source_line.  Drop
32065         returned value.
32066         (layout::print_leading_fixits): New method.
32067         (layout::print_any_fixits): Rename to...
32068         (layout::print_trailing_fixits): ...this, and make private.
32069         Don't print newline fixits.
32070         (diagnostic_show_locus): Move logic for printing one row into...
32071         (layout::print_line): ...this new function.  Move the
32072         location_get_source_line call and error-handling from
32073         print_source_line to here.  Call print_leading_fixits, and rename
32074         print_any_fixits to print_trailing_fixits.
32075         (selftest::test_fixit_insert_containing_newline): Update now that
32076         newlines are partially supported.
32077         (selftest::test_fixit_insert_containing_newline_2): New test.
32078         (selftest::test_fixit_replace_containing_newline): Update comments.
32079         (selftest::diagnostic_show_locus_c_tests): Call the new test.
32080         * edit-context.c (class added_line): New class.
32081         (class edited_line): Describe newline handling in comment.
32082         (edited_line::actually_edited_p): New method.
32083         (edited_line::print_content): Delete redundant decl.
32084         (edited_line::m_predecessors): New field.
32085         (edited_file::print_content): Call edited_line::print_content.
32086         (edited_file::print_diff): Update to support newlines.
32087         (edited_file::print_diff_hunk): Likewise.
32088         (edited_file::print_run_of_changed_lines): New function.
32089         (edited_file::print_diff_line): Convert to...
32090         (print_diff_line): ...this.
32091         (edited_file::get_effective_line_count): New function.
32092         (edited_line::edited_line): Initialize new field m_predecessors.
32093         (edited_line::~edited_line): Clean up m_predecessors.
32094         (edited_line::apply_fixit): Handle newlines.
32095         (edited_line::get_effective_line_count): New function.
32096         (edited_line::print_content): New function.
32097         (edited_line::print_diff_lines): New function.
32098         (selftest::test_applying_fixits_insert_containing_newline): New
32099         test.
32100         (selftest::test_applying_fixits_replace_containing_newline): New
32101         test.
32102         (selftest::insert_line): New function.
32103         (selftest::test_applying_fixits_multiple_lines): Add example of
32104         inserting a line.
32105         (selftest::edit_context_c_tests): Call the new tests.
32106
32107 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
32108
32109         * tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Delete
32110         parameter cand.  Update dump information.
32111         (get_computation_cost): Update uses.
32112
32113 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
32114
32115         * tree-ssa-loop-ivopts.c (get_computation_aff_1): New.
32116         (get_computation_aff): Reorder parameters.  Use get_computation_aff_1.
32117         (get_computation_at, rewrite_use_address): Update use of
32118         get_computation_aff.
32119
32120 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
32121
32122         * tree-ssa-loop-ivopts.c (get_computation_at): Reorder parameters.
32123         (get_computation): Delete.
32124         (get_computation_cost): Implement like get_computation_cost_at.
32125         Use get_computation_at.
32126         (get_computation_cost_at): Delete.
32127         (rewrite_use_nonlinear_expr): Use get_computation_at.
32128         (rewrite_use_compare, remove_unused_ivs): Ditto.
32129
32130 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
32131
32132         * tree-ssa-loop-ivopts.c (rewrite_use_address): Simple refactor.
32133
32134 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
32135
32136         * tree-ssa-loop-ivopts.c (struct iv_ca): Rename n_regs to n_invs.
32137         (ivopts_global_cost_for_size): Rename parameter and update uses.
32138         (iv_ca_recount_cost): Update uses.
32139         (iv_ca_set_remove_invs, iv_ca_set_no_cp): Record invariants and
32140         candidates seperately in n_invs and n_cands.
32141         (iv_ca_set_add_invs, iv_ca_set_cp, iv_ca_new): Ditto.
32142
32143 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
32144
32145         * tree-ssa-loop-ivopts.c (struct walk_tree_data): New.
32146         (find_inv_vars_cb): New.
32147         (find_depends): Renamed to ...
32148         (find_inv_vars): ... this.
32149         (add_candidate_1, force_var_cost): Call find_inv_vars.
32150         (split_address_cost, determine_group_iv_cost_cond): Ditto.
32151
32152 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
32153
32154         * tree-ssa-loop-ivopts.c (struct cost_pair): Rename depends_on to
32155         inv_vars.  Add inv_exprs.
32156         (struct iv_cand): Rename depends_on to inv_vars.
32157         (struct ivopts_data): Rename max_inv_id/n_invariant_uses to
32158         max_inv_var_id/n_inv_var_uses.  Move max_inv_expr_id around.
32159         Refactor field used_inv_exprs from has_map to array n_inv_expr_uses.
32160         (dump_cand): Dump inv_vars.
32161         (tree_ssa_iv_optimize_init): Support inv_vars and inv_exprs.
32162         (record_invariant, find_depends, add_candidate_1): Ditto.
32163         (set_group_iv_cost, force_var_cost): Ditto.
32164         (split_address_cost, ptr_difference_cost, difference_cost): Ditto.
32165         (get_computation_cost_at, get_computation_cost): Ditto.
32166         (determine_group_iv_cost_generic): Ditto.
32167         (determine_group_iv_cost_address): Ditto.
32168         (determine_group_iv_cost_cond, autoinc_possible_for_pair): Ditto.
32169         (determine_group_iv_costs): Ditto.
32170         (iv_ca_recount_cost): Update call to ivopts_global_cost_for_size.
32171         (iv_ca_set_remove_invariants): Renamed to ...
32172         (iv_ca_set_remove_invs): ... this.  Support inv_vars and inv_exprs.
32173         (iv_ca_set_no_cp): Use iv_ca_set_remove_invs.
32174         (iv_ca_set_add_invariants):  Renamed to ...
32175         (iv_ca_set_add_invs): ... this.  Support inv_vars and inv_exprs.
32176         (iv_ca_set_cp): Use iv_ca_set_add_invs.
32177         (iv_ca_has_deps): Support inv_vars and inv_exprs.
32178         (iv_ca_new, iv_ca_free, iv_ca_dump, free_loop_data): Ditto.
32179         (create_new_ivs): Remove useless dump.
32180
32181 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
32182
32183         * tree-ssa-loop-ivopts.c (get_computation_cost_at): Remove pseudo
32184         iv_cand code.
32185         (determine_group_iv_cost_cond, determine_iv_cost): Ditto.
32186         (iv_ca_set_no_cp, create_new_iv): Ditto.
32187
32188 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
32189
32190         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
32191
32192 2017-05-02  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
32193
32194         * tree.h (EXPR_CILK_SPAWN): Use macro TREE_CHECK2 instead of
32195         function tree_check2.
32196
32197 2017-05-02  Martin Liska  <mliska@suse.cz>
32198
32199         * doc/gcov.texi: Add missing preposition.
32200         * gcov.c (function_info::function_info): Properly fill up
32201         all member variables.
32202
32203 2017-05-02  Tamar Christina  <tamar.christina@arm.com>
32204
32205         * expr.c (expand_expr_real_2): Re-cost if previous costs are the same.
32206
32207 2017-05-02  Tamar Christina  <tamar.christina@arm.com>
32208
32209         * simplify-rtx.c (simplify_binary_operation_1): Add LSHIFTRT case.
32210
32211 2017-05-02  Martin Liska  <mliska@suse.cz>
32212
32213         PR lto/77954.
32214         * lto-streamer-in.c (lto_read_tree_1): Remove
32215         LTO_STREAMER_DEBUG.
32216         * lto-streamer.c (struct tree_hash_entry): Likewise.
32217         (struct tree_entry_hasher): Likewise.
32218         (tree_entry_hasher::hash): Likewise.
32219         (tree_entry_hasher::equal): Likewise.
32220         (lto_streamer_init): Likewise.
32221         (lto_orig_address_map): Likewise.
32222         (lto_orig_address_get): Likewise.
32223         (lto_orig_address_remove): Likewise.
32224         * lto-streamer.h: Likewise.
32225         * tree-streamer-in.c (streamer_alloc_tree): Likewise.
32226         * tree-streamer-out.c (streamer_write_tree_header): Likewise.
32227
32228 2017-05-02  Sebastian Peryt  <sebastian.peryt@intel.com>
32229
32230         * config/i386/avx512fintrin.h (_mm_mask_add_round_sd)
32231         (_mm_maskz_add_round_sd, _mm_mask_add_round_ss)
32232         (mm_maskz_add_round_ss, _mm_mask_sub_round_sd)
32233         (mm_maskz_sub_round_sd, _mm_mask_sub_round_ss)
32234         (mm_maskz_sub_round_ss, _mm_mask_add_sd)
32235         (mm_maskz_add_sd, _mm_mask_add_ss, _mm_maskz_add_ss)
32236         (mm_mask_sub_sd, _mm_maskz_sub_sd, _mm_mask_sub_ss)
32237         (mm_maskz_sub_ss): New intrinsics.
32238         * config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
32239         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
32240         * config/i386/i386-builtin.def (__builtin_ia32_addsd_mask_round)
32241         (__builtin_ia32_addss_mask_round, __builtin_ia32_subsd_mask_round)
32242         (__builtin_ia32_subss_mask_round): New builtins.
32243         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
32244         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
32245         * config/i386/sse.md (<sse>_vm<plusminus_insn><mode>3<round_name>):
32246         Renamed to ...
32247         (<sse>_vm<plusminus_insn><mode>3<mask_name><round_name>): ... this.
32248         (v<plusminus_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
32249         Changed to ...
32250         (v<plusminus_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
32251         ... this.
32252
32253 2017-05-02  Martin Jambor  <mjambor@suse.cz>
32254
32255         PR tree-optimization/78687
32256         * tree-sra.c (access): New field parent.
32257         (process_subtree_disqualification): New function.
32258         (disqualify_candidate): Call it.
32259         (build_accesses_from_assign): Reset write flag if creating an
32260         assighnment link.
32261         (build_access_subtree): Fill in parent field and also prpagate
32262         down grp_write flag.
32263         (create_artificial_child_access): New parameter set_grp_write, set
32264         grp_write to its value.
32265         (propagate_subaccesses_across_link): Also propagate grp_write flag
32266         values.
32267         (propagate_all_subaccesses): Push the closest parent back to work
32268         queue if add_access_to_work_queue returned true.
32269
32270 2017-05-02  Richard Biener  <rguenther@suse.de>
32271
32272         * common.opt (fstrict-overflow): Alias negative to fwrapv.
32273         * doc/invoke.texi (fstrict-overflow): Remove all traces of
32274         -fstrict-overflow documentation.
32275         * tree.h (TYPE_OVERFLOW_UNDEFINED): Do not test flag_strict_overflow.
32276         (POINTER_TYPE_OVERFLOW_UNDEFINED): Test !flag_wrapv instead of
32277         flag_strict_overflow.
32278         * ipa-inline.c (can_inline_edge_p): Do not test flag_strict_overflow.
32279         * lto-opts.c (lto_write_options): Do not stream it.
32280         * lto-wrapper.c (merge_and_complain): Do not handle it.
32281         * opts.c (default_options_table): Do not set -fstrict-overflow.
32282         (finish_options): Likewise do not clear it when sanitizing.
32283         * simplify-rtx.c (simplify_const_relational_operation): Do not
32284         test flag_strict_overflow.
32285
32286 2017-05-02  Uros Bizjak  <ubizjak@gmail.com>
32287
32288         * config/alpha/alpha.md (*add<mode>3_ieee): Merge to add<mode>3
32289         using enabled attribute.
32290         (*sub<mode>3_ieee): Merge to sub<mode>3 using enabled attribute.
32291         (*mul<mode>3_ieee): Merge to mul<mode>3 using enabled attribute.
32292         (*div<mode>3_ieee): Merge to div<mode>3 using enabled attribute.
32293         (*sqrt<mode>2_ieee): Merge to sqrt<mode>2 using enabled attribute.
32294         (*fix_truncdfdi_ieee): Merge to *fix_truncdfdi2 using enabled attribute.
32295         (*fix_truncsfdi_ieee): Merge to *fix_truncsfdi2 using enabled attribute.
32296         (*floatdisf_ieee): Merge to floatdisf2 using enabled attribute.
32297         (*floatdidf_ieee): Merge to floatdidf2 using enabled attribute.
32298         (*truncdfsf2_ieee): Merge to truncdfsf2 using enabled attribute.
32299         (*cmpdf_ieee): Merge to *cmpdf_internal using enabled attribute.
32300
32301 2017-05-02  Uros Bizjak  <ubizjak@gmail.com>
32302
32303         * config/i386/i386.c (ix86_code_end): Use {FIRST,LAST}_INT_REG.
32304
32305 2017-05-02  Richard Biener  <rguenther@suse.de>
32306
32307         PR tree-optimization/80591
32308         Revert
32309         2017-04-10  Richard Biener  <rguenther@suse.de>
32310
32311         * tree-ssa-structalias.c (find_func_aliases): Properly handle
32312         asm inputs.
32313
32314 2017-05-02  Richard Biener  <rguenther@suse.de>
32315
32316         PR tree-optimization/80549
32317         * tree-cfgcleanup.c (mfb_keep_latches): New helper.
32318         (cleanup_tree_cfg_noloop): Create forwarders to known loop
32319         headers if they do not have a preheader.
32320
32321 2017-05-02  Martin Liska  <mliska@suse.cz>
32322
32323         PR other/80589
32324         * common.opt: Fix typo.
32325         * doc/invoke.texi: Likewise.
32326
32327 2017-05-01  Jan Beulich  <jbeulich@suse.com>
32328
32329         * config/i386/sse.md (xop_vpermil2<mode>3): Do not allow operand
32330         swapping, add (x,x,m,x,n) alternative.
32331
32332 2017-05-01  Nathan Sidwell  <nathan@acm.org>
32333
32334         * calls.c (combine_pending_stack_adjustment_and_call): Remove
32335         unnecessary unadjusted_alignment check.
32336
32337 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
32338
32339         PR c++/80038
32340         * cilk_common.c (expand_builtin_cilk_detach): Move pedigree
32341         operations here.
32342         * gimplify.c (gimplify_cilk_detach): New function.
32343         (gimplify_call_expr, gimplify_modify_expr): Call it as needed.
32344         * tree-core.h: Document EXPR_CILK_SPAWN.
32345         * tree.h (EXPR_CILK_SPAWN): Define.
32346
32347 2017-05-01  David Malcolm  <dmalcolm@redhat.com>
32348
32349         * diagnostic-show-locus.c (layout::get_expanded_location): Rewrite
32350         to use new fixit_hint representation, using the "replace" logic.
32351         (get_line_span_for_fixit_hint): Likewise.
32352         (layout::print_any_fixits): Likewise.
32353         (selftest::test_one_liner_many_fixits): Rename to...
32354         (selftest::test_one_liner_many_fixits_1): ...this, and update
32355         comment and expected output to reflect that the multiple fix-it
32356         hints are now consolidated into one insertion.
32357         (selftest::test_one_liner_many_fixits_2): New test.
32358         (selftest::test_diagnostic_show_locus_one_liner): Update for
32359         above.
32360         (selftest::test_fixit_consolidation): Update for fix-it API
32361         change.
32362         * diagnostic.c (print_parseable_fixits): Likewise.
32363         * edit-context.c (edited_line::m_line_events): Convert from
32364         auto_vec <line_event *> to auto_vec <line_event>.
32365         (class line_event): Convert from abstract base class to a concrete
32366         class, taking over the role of replace_event.
32367         (class insert_event): Delete.
32368         (class replace_event): Rename to class line_event.  Convert to
32369         half-open range.
32370         (edit_context::add_fixits): Reimplement.
32371         (edit_context::apply_insert): Delete.
32372         (edit_context::apply_replace): Rename to...
32373         (edit_context::apply_fixit): ...this.  Convert to half-open range.
32374         (edited_file::apply_insert): Delete.
32375         (edited_file::apply_replace): Rename to...
32376         (edited_file::apply_fixit): ...this.
32377         (edited_line::~edited_line): Drop deletion of events.
32378         (edited_line::apply_insert): Delete.
32379         (edited_line::apply_replace): Rename to...
32380         (edited_line::apply_fixit): ...this.  Convert to half-open range.
32381         Update for change to type of m_line_events.
32382         * edit-context.h (edit_context::apply_insert): Delete.
32383         (edit_context::apply_replace): Rename to...
32384         (edit_context::apply_fixit): ...this.
32385
32386 2017-05-01  Martin Sebor  <msebor@redhat.com>
32387
32388         * gimple-ssa-sprintf.c (format_integer): Set knownrange when it's
32389         known.
32390
32391 2017-05-01  Uros Bizjak  <ubizjak@gmail.com>
32392
32393         PR target/68491
32394         * config/i386/cpuid.h (__get_cpuid): Always return 0 when
32395         __get_cpuid_max returns 0.
32396         (__get_cpuid_count): Ditto.
32397
32398 2017-05-01  Eric Botcazou  <ebotcazou@adacore.com>
32399
32400         * tree.c (substitute_in_expr) <tcc_vl_exp>: Also inline a call if the
32401         replacement expression is another instance of one of its arguments.
32402
32403 2017-05-01  Jakub Jelinek  <jakub@redhat.com>
32404
32405         PR target/79430
32406         * rtlanal.c (reg_set_p): If reg is a stack_pointer_rtx, also
32407         check for stack push/pop autoinc.
32408         * config/i386/i386.c (ix86_agi_dependent): Return false
32409         if the only reason why modified_in_p returned true is that
32410         addr is SP based and set_insn is a push or pop.
32411
32412 2017-04-29  Jan Hubicka  <hubicka@ucw.cz>
32413
32414         * ipa-inline.c (compute_inlined_call_time): Remove now unnecesary
32415         overflow check.
32416
32417 2017-04-29  Jan Hubicka  <hubicka@ucw.cz>
32418
32419         PR ipa/79224
32420         * ipa-inline-analysis.c (dump_predicate): Add optional parameter NL.
32421         (account_size_time): Use two predicates - exec_pred and
32422         nonconst_pred_ptr.
32423         (evaluate_conditions_for_known_args): Compute both clause and
32424         nonspec_clause.
32425         (evaluate_properties_for_edge): Evaulate both clause and nonspec_clause.
32426         (inline_summary_t::duplicate): Update.
32427         (estimate_function_body_sizes): Caluculate exec and nonconst predicates
32428         separately.
32429         (compute_inline_parameters): Likewise.
32430         (estimate_edge_size_and_time): Update caluclation of time.
32431         (estimate_node_size_and_time): Compute both time and nonspecialized
32432         time.
32433         (estimate_ipcp_clone_size_and_time): Update.
32434         (inline_merge_summary): Update.
32435         (do_estimate_edge_time): Update.
32436         (do_estimate_edge_size): Update.
32437         (do_estimate_edge_hints): Update.
32438         (inline_read_section, inline_write_summary): Stream both new predicates.
32439         * ipa-inline.c (compute_uninlined_call_time): Take uninlined_call_time
32440         as argument.
32441         (compute_inlined_call_time): Cleanup.
32442         (big_speedup_p): Update.
32443         (edge_badness): Update.
32444         * ipa-inline.h (INLINE_TIME_SCALE): Remove.
32445         (size_time_entry): Replace predicate by exec_predicate and
32446         nonconst_predicate.
32447         (edge_growth_cache_entry): Cache both time nad nonspecialized time.
32448         (estimate_edge_time): Return also nonspec_time.
32449         (reset_edge_growth_cache): Update.
32450
32451 2017-04-29  Jakub Jelinek  <jakub@redhat.com>
32452
32453         PR rtl-optimization/80491
32454         * ifcvt.c (noce_process_if_block): When looking for x setter
32455         with missing else_bb, don't check only the insn right before
32456         cond_earliest, but look for the last insn that x is modified in
32457         within the same bb.
32458
32459         PR rtl-optimization/80491
32460         * alias.c (memory_modified_in_insn_p): Return true for CALL_INSNs.
32461
32462 2017-04-29  Marc Glisse  <marc.glisse@inria.fr>
32463
32464         PR tree-optimization/80487
32465         * tree-ssa-alias.c (stmt_kills_ref_p): Handle stpncpy and strncpy.
32466
32467 2017-04-29  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
32468
32469         PR tree-optimization/79697
32470         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Check if callee
32471         is BUILT_IN_STRDUP, BUILT_IN_STRNDUP, BUILT_IN_REALLOC.
32472         (propagate_necessity): Check if def_callee is BUILT_IN_STRDUP or
32473         BUILT_IN_STRNDUP.
32474         * gimple-fold.c (gimple_fold_builtin_realloc): New function.
32475         (gimple_fold_builtin): Call gimple_fold_builtin_realloc.
32476
32477 2017-04-28  Martin Sebor  <msebor@redhat.com>
32478
32479         PR tree-optimization/80523
32480         * gimple-ssa-sprintf.c (target_to_host_charmap): New global variable.
32481         (init_target_to_host_charmap, target_to_host, target_strtol10): New
32482         functions.
32483         (maybe_warn, format_directive, parse_directive): Use new functions.
32484         (pass_sprintf_length::execute): Call init_target_to_host_charmap.
32485
32486 2017-04-28  Marc Glisse  <marc.glisse@inria.fr>
32487
32488         * match.pd (X+Z OP Y+Z, X-Z OP Y-Z, Z-X OP Z-Y): New transformations.
32489
32490 2017-04-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
32491
32492         * configure.ac (SYSTEM_HEADER_DIR, BUILD_SYSTEM_HEADER_DIR,
32493         target_header_dir): Set correctly.
32494         * configure: Regenerated.
32495         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
32496         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
32497         instead of SYSTEM_HEADER_DIR.
32498
32499 2017-04-28  Jan Hubicka  <hubicka@ucw.cz>
32500
32501         * ipa-cp.c (perform_estimation_of_a_value): Turn time to sreal.
32502         (estimate_local_effects): Likewise.
32503         * ipa-inline.c (compute_inlined_call_time, want_inline_small_function_p,
32504         edge_badness, inline_small_functions, dump_overall_stats): LIkewise.
32505         * ipa-inline.h (edge_growth_cache_entry, estimate_time_after_inlining,
32506         estimate_ipcp_clone_size_and_time, do_estimate_edge_time,
32507         do_estimate_edge_time, estimate_edge_time): Likewise.
32508         * ipa-inline-analysis.c (estimate_node_size_and_time,
32509         estimate_ipcp_clone_size_and_time, do_estimate_edge_time): Likewise.
32510         (estimate_time_after_inlining): Remove.
32511
32512 2017-04-28  Martin Liska  <mliska@suse.cz>
32513
32514         * doc/gcov.texi: Enhance documentation of gcov.
32515
32516 2017-04-28  Martin Liska  <mliska@suse.cz>
32517
32518         * doc/gcov.texi: Sort options in alphabetic order.
32519         * doc/gcov-dump.texi: Likewise.
32520         * doc/gcov-tool.texi: Likewise.
32521         * gcov.c (print_usage): Likewise.
32522         * gcov-dump.c (print_usage): Likewise.
32523         * gcov-tool.c (print_merge_usage_message): Likewise.
32524         (print_rewrite_usage_message): Likewise.
32525         (print_overlap_usage_message): Likewise.
32526
32527 2017-04-28  Martin Liska  <mliska@suse.cz>
32528
32529         PR gcov-profile/53915
32530         * gcov.c (format_gcov): Print 'NAN %' when top > bottom.
32531
32532 2017-04-28  Martin Liska  <mliska@suse.cz>
32533
32534         PR gcov-profile/79891
32535         * gcov.c (add_line_counts): Assign BBs to lines just if the BB
32536         is marked by compiler as living on a line.
32537         (get_cycles_count): Remove usage of the union.
32538         (output_intermediate_file): Likewise.
32539         (find_source): Fix GNU coding style.
32540         (accumulate_line_counts): Remove old non-all block mode.
32541         (output_lines): Remove usage of the union.
32542         * profile.c (output_location): Include all BBs, even if
32543         belonging to a same line (and file) as a previous BB.
32544
32545 2017-04-28  Martin Liska  <mliska@suse.cz>
32546
32547         * gcov.c (process_args): Handle new argument 'w'.
32548         (read_graph_file): Assign ID to BBs.
32549         (output_branch_count): Display BB # if verbose flag is set.
32550         (output_lines): Likewise for arcs.
32551         (print_usage): Add '--verbose' option help.
32552         * doc/gcov.texi: Document --verbose (-w) option.
32553
32554 2017-04-28  Martin Liska  <mliska@suse.cz>
32555
32556         * gcov.c (struct block_location_info): New struct.
32557         (process_file): Fill up the new structure.
32558         (read_graph_file): Replace usage of encoding by the newly added
32559         struct.
32560         (add_line_counts): Likewise.
32561         (accumulate_line_counts): Remove usage of the union.
32562         (function_info::function_info): New function.
32563         (function_info::~function_info): Likewise.
32564         (process_file): Call delete instead of release_function.
32565         (release_function): Release the function.
32566         (release_structures): Call delete instead of release_function.
32567         (solve_flow_graph): Replace usage of num_blocks.
32568         (find_exception_blocks): Likewise.
32569         (output_lines): Fix GNU coding style.
32570
32571 2017-04-28  Martin Liska  <mliska@suse.cz>
32572
32573         PR driver/56469
32574         * coverage.c (coverage_remove_note_file): New function.
32575         * coverage.h: Declare the function.
32576         * toplev.c (finalize): Clean if an error has been seen.
32577
32578 2017-04-28  Martin Liska  <mliska@suse.cz>
32579
32580         PR gcov-profile/80031
32581         * gcov-dump.c (tag_blocks): Just print number of basic blocks.
32582         * gcov-io.h (GCOV_TAG_BLOCKS_NUM): Remove unused macro.
32583         * gcov.c (read_graph_file): Read just number of blocks.
32584         * profile.c (branch_prob): Do not stream 0 flags per a basic
32585         block.
32586
32587 2017-04-28  Martin Liska  <mliska@suse.cz>
32588
32589         * gcov-dump.c (tag_*): Add new argument to declarations.
32590         (dump_gcov_file): Likewise.
32591         (tag_blocks): Add and use new argument depth.
32592         (tag_arcs): Likewise.
32593         (tag_lines): Likewise.
32594         (tag_counters): Likewise.
32595         (tag_summary): Likewise.
32596         (dump_working_sets): Use depth to do a proper indentation.
32597
32598 2017-04-28  Jakub Jelinek  <jakub@redhat.com>
32599
32600         PR bootstrap/80531
32601         * cgraph.h (symtab_node::debug_symtab): No longer inline.
32602         * symtab.c (symtab_node::debug_symtab): Move definition here.
32603
32604 2017-04-28  Richard Biener  <rguenther@suse.de>
32605
32606         * lto-streamer.h (LTO_major_version): Bump to 7.
32607
32608 2017-04-28  Richard Biener  <rguenther@suse.de>
32609
32610         * tree-vrp.c (assert_info): New struct.
32611         (add_assert_info): New helper.
32612         (register_edge_assert_for_2): Refactor to add asserts to a vector
32613         of assert_info.
32614         (register_edge_assert_for_1): Likewise.
32615         (register_edge_assert_for): Likewise.
32616         (finish_register_edge_assert_for): New helper actually registering
32617         asserts where live on edge.
32618         (find_conditional_asserts): Adjust.
32619         (find_switch_asserts): Likewise.
32620         (evrp_dom_walker::try_find_new_range): Generalize.
32621         (evrp_dom_walker::before_dom_children): Use register_edge_assert_for.
32622
32623 2017-04-27  Marek Polacek  <polacek@redhat.com>
32624
32625         PR sanitizer/80349
32626         * fold-const.c (fold_binary_loc) <case EQ_EXPR, NE_EXPR>: Convert
32627         arg10 and arg11 to itype.
32628
32629 2017-04-27  Jonathan Wakely  <jwakely@redhat.com>
32630
32631         * doc/extend.texi (Object Size Checking): Improve grammar.
32632
32633 2017-04-27  Richard Earnshaw  <rearnsha@arm.com>
32634
32635         PR target/80530
32636         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Ensure
32637         that the logic for permitting reciprocal estimates matches that
32638         in use_rsqrt_p.
32639
32640 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
32641
32642         PR c++/80534
32643         * tree.c (type_cache_hasher::equal): Only compare
32644         TYPE_TYPELESS_STORAGE flag on non-aggregate element types.
32645         (build_array_type_1): Only hash TYPE_TYPELESS_STORAGE flag on
32646         non-aggregate element types.
32647         * tree.h (TYPE_TYPELESS_STORAGE): Fix comment typo, add more details
32648         about the flag on ARRAY_TYPEs in the comment, formatting fix.
32649
32650 2017-04-27  Richard Biener  <rguenther@suse.de>
32651
32652         PR middle-end/80533
32653         * emit-rtl.c (set_mem_attributes_minus_bitpos): When
32654         stripping ARRAY_REFs from MEM_EXPR make sure we're not
32655         keeping a reference to a trailing array.
32656
32657 2017-04-27  Richard Biener  <rguenther@suse.de>
32658
32659         PR middle-end/80539
32660         * tree-chrec.c (chrec_fold_plus_poly_poly): Deal with not
32661         being in loop-closed SSA form conservatively.
32662         (chrec_fold_multiply_poly_poly): Likewise.
32663
32664 2017-04-27  Tamar Christina  <tamar.christina@arm.com>
32665
32666         PR middle-end/79665
32667         * expr.c (expand_expr_real_2): Move TRUNC_MOD_EXPR, FLOOR_MOD_EXPR,
32668         CEIL_MOD_EXPR, ROUND_MOD_EXPR cases.
32669
32670 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
32671
32672         PR target/77728
32673         * config/aarch64/aarch64.c (struct aarch64_fn_arg_alignment): Remove.
32674         (aarch64_function_arg_alignment): Return unsigned int again, but still
32675         ignore TYPE_FIELDS chain decls other than FIELD_DECLs.
32676         (aarch64_layout_arg): Adjust aarch64_function_arg_alignment caller.
32677         Don't emit -Wpsabi note.
32678         (aarch64_function_arg_boundary): Likewise.
32679         (aarch64_gimplify_va_arg_expr): Adjust aarch64_function_arg_alignment
32680         caller.
32681
32682 2017-04-26  Nathan Sidwell  <nathan@acm.org>
32683
32684         * tree.h (crc32_unsigned_n): Declare.
32685         (crc32_unsigned, crc32_unsigned): Make inline.
32686         * tree.c (crc32_unsigned_bits): Replace with ...
32687         (crc32_unsigned_n): ... this.
32688         (crc32_unsigned, crc32_byte): Remove.
32689         (crc32_string): Remove unnecessary braces.
32690
32691 2017-04-25  Jan Hubicka  <hubicka@ucw.cz>
32692
32693         * ipa-cp.c (estimate_local_effects): Convert sreal to int.
32694         * ipa-inline-analysis.c (MAX_TIME): Remove.
32695         (account_size_time): Use sreal for time.
32696         (dump_inline_summary): Update.
32697         (estimate_function_body_sizes): Update.
32698         (estimate_edge_size_and_time): Update.
32699         (estimate_calls_size_and_time): Update.
32700         (estimate_node_size_and_time): Update.
32701         (inline_merge_summary): Update.
32702         (inline_update_overall_summary): Update.
32703         (estimate_time_after_inlining): Update.
32704         (inline_read_section): Update.
32705         (inline_write_summary): Update.
32706         * ipa-inline.c (compute_uninlined_call_time): Update.
32707         (compute_inlined_call_time): Update.
32708         (recursive_inlining): Update.
32709         (inline_small_functions): Update.
32710         (dump_overall_stats): Update.
32711         * ipa-inline.h: Include sreal.h.
32712         (size_time_entry): Turn time to sreal.
32713         (inline_summary): Turn self_time nad time to sreal.
32714
32715 2017-04-25  Jan Hubicka  <hubicka@ucw.cz>
32716
32717         * sreal.c: Include backend.h, tree.h, gimple.h, cgraph.h and
32718         data-streamer.h
32719         (sreal::stream_out, sreal::stream_in): New.
32720         * sreal.h (sreal::stream_out, sreal::stream_in): Declare.
32721
32722 2017-04-25  Jakub Jelinek  <jakub@redhat.com>
32723
32724         * Makefile.in (s-options): Invoke opt-gather.awk with LC_ALL=C in the
32725         environment.
32726
32727 2017-04-25  Uros Bizjak  <ubizjak@gmail.com>
32728
32729         PR target/70799
32730         * config/i386/i386.c (dimode_scalar_to_vector_candidate_p):
32731         Handle ASHIFTRT.
32732         (dimode_scalar_chain::compute_convert_gain): Ditto.
32733         (dimode_scalar_chain::make_vector_copies): Ditto.
32734         (dimode_scalar_chain::convert_reg): Ditto.
32735         (dimode_scalar_chain::convert_insn): Ditto.
32736         * config/i386/sse.md (VI24_AVX512BW_1): Remove mode iterator.
32737         (VI248_AVX512BW_1): New mode iterator.
32738         (<mask_codefor>ashr<mode>3<mask_name>): Merge insn pattern with
32739         <mask_codefor>ashrv2di3<mask_name> insn using VI248_AVX512BW_1
32740         mode iterator.
32741
32742 2017-04-25  Martin Sebor  <msebor@redhat.com>
32743
32744         PR tree-optimization/80497
32745         * gimple-ssa-sprintf.c (get_int_range): Avoid assuming all integer
32746         constants are representable in HOST_WIDE_INT.
32747         (parse_directive): Ditto.
32748
32749 2017-04-25  Martin Sebor  <msebor@redhat.com>
32750
32751         PR bootstrap/80486
32752         * dominance.c (dom_info::m_n_basic_blocks): Change type to unsigned.
32753         (new_zero_array): Adjust signature.
32754         (dom_info::dom_init): Used unsigned rather that size_t.
32755         (dom_info::dom_info): Same.
32756
32757 2017-04-25  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
32758             Jakub Jelinek  <jakub@redhat.com>
32759
32760         PR target/77728
32761         * config/arm/arm.c: Include gimple.h.
32762         (aapcs_layout_arg): Emit -Wpsabi note if arm_needs_doubleword_align
32763         returns negative, increment ncrn only if it returned positive.
32764         (arm_needs_doubleword_align): Return int instead of bool,
32765         ignore DECL_ALIGN of non-FIELD_DECL TYPE_FIELDS chain
32766         members, but if there is any such non-FIELD_DECL
32767         > PARM_BOUNDARY aligned decl, return -1 instead of false.
32768         (arm_function_arg): Emit -Wpsabi note if arm_needs_doubleword_align
32769         returns negative, increment nregs only if it returned positive.
32770         (arm_setup_incoming_varargs): Likewise.
32771         (arm_function_arg_boundary): Emit -Wpsabi note if
32772         arm_needs_doubleword_align returns negative, return
32773         DOUBLEWORD_ALIGNMENT only if it returned positive.
32774
32775 2017-04-25  Marek Polacek  <polacek@redhat.com>
32776
32777         PR sanitizer/80349
32778         * fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
32779         first argument to type.
32780
32781 2017-04-25  Bill Seurer  <seurer@linux.vnet.ibm.com>
32782
32783         PR target/80482
32784         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Change
32785         type checks to test for compatibility instead of equality.
32786
32787 2017-04-25  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
32788             Jakub Jelinek  <jakub@redhat.com>
32789
32790         PR target/77728
32791         * config/aarch64/aarch64.c (struct aarch64_fn_arg_alignment): New
32792         type.
32793         (aarch64_function_arg_alignment): Return aarch64_fn_arg_alignment
32794         struct.  Ignore DECL_ALIGN of decls other than FIELD_DECL for
32795         the alignment computation, but return their maximum in warn_alignment.
32796         (aarch64_layout_arg): Adjust aarch64_function_arg_alignment caller.
32797         Emit a -Wpsabi note if warn_alignment is 16 bytes, but alignment
32798         is smaller.
32799         (aarch64_function_arg_boundary): Likewise.  Simplify using MIN/MAX.
32800         (aarch64_gimplify_va_arg_expr): Adjust aarch64_function_arg_alignment
32801         caller.
32802
32803 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
32804
32805         * config/arc/simdext.md (dmpyh): Fix typo.
32806
32807 2017-04-25  Richard Biener  <rguenther@suse.de>
32808
32809         PR tree-optimization/80492
32810         * alias.c (compare_base_decls): Handle registers with asm
32811         specification conservatively.
32812         * tree-ssa-alias.c (decl_refs_may_alias_p): Handle
32813         compare_base_decls returning dont-know properly.
32814
32815 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
32816
32817         * config/arc/arc.c (LEGITIMATE_OFFSET_ADDRESS_P): Delete macro.
32818         (legitimate_offset_address_p): New function.
32819         (arc_legitimate_address_p): Use above function.
32820
32821 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
32822
32823         * config/arc/arc.c (arc_output_mi_thunk): Emit PIC calls.
32824
32825 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
32826
32827         * config/arc/arc.c (arc_conditional_register_usage): Use ACCL,
32828         ACCH registers whenever they are available.
32829
32830 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
32831
32832         * config/arc/arc.c (arc_conditional_register_usage): Make D0, D1
32833         double regs fix when not used.
32834
32835 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
32836
32837         * config/arc/arc.h (REGNO_OK_FOR_BASE_P): Consider also extension
32838         core registers.
32839         (REG_OK_FOR_INDEX_P_NONSTRICT): Likewise.
32840         (REG_OK_FOR_BASE_P_NONSTRICT): Likewise.
32841
32842 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
32843
32844         * config/arc/arc.c (arc_output_addsi): Check for h-register class
32845         when emitting short ADD instructions.
32846
32847 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
32848
32849         * config/arc/arc.md (cmpsi_cc_insn_mixed): Use 'h' register
32850         constraint.
32851         (cmpsi_cc_c_insn): Likewise.
32852         (cbranchsi4_scratch): Compute proper instruction length using
32853         compact_hreg_operand.
32854         * config/arc/predicates.md (compact_hreg_operand): New predicate.
32855
32856 2017-04-25  Richard Biener  <rguenther@suse.de>
32857
32858         PR middle-end/80509
32859         * passes.c (pass_manager::pass_manager): Initialize
32860         m_name_to_pass_map.
32861
32862 2017-04-25  Richard Biener  <rguenther@suse.de>
32863
32864         PR tree-optimization/79201
32865         * tree-ssa-sink.c (statement_sink_location): Handle calls.
32866
32867 2017-04-25  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32868
32869         PR target/80464
32870         * config/s390/vector.md: Split MEM->GPR vector moves for
32871         non-s_operand addresses.
32872
32873 2017-04-25  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32874
32875         PR target/79895
32876         * config/s390/predicates.md (reload_const_wide_int_operand): New
32877         predicate.
32878         * config/s390/s390.md ("movti"): Remove d/P alternative.
32879         ("movti_bigconst"): New pattern definition.
32880
32881 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
32882
32883         PR target/80080
32884         * s390-protos.h (s390_expand_cs_hqi): Removed.
32885         (s390_expand_cs, s390_expand_atomic_exchange_tdsi): New prototypes.
32886         * config/s390/s390.c (s390_emit_compare_and_swap): Handle all integer
32887         modes as well as CCZ1mode and CCZmode.
32888         (s390_expand_atomic_exchange_tdsi, s390_expand_atomic): Adapt to new
32889         signature of s390_emit_compare_and_swap.
32890         (s390_expand_cs_hqi): Likewise, make static.
32891         (s390_expand_cs_tdsi): Generate an explicit compare before trying
32892         compare-and-swap, in some cases.
32893         (s390_expand_cs): Wrapper function.
32894         (s390_expand_atomic_exchange_tdsi): New backend specific expander for
32895         atomic_exchange.
32896         (s390_match_ccmode_set): Allow CCZmode <-> CCZ1 mode.
32897         * config/s390/s390.md ("atomic_compare_and_swap<mode>"): Merge the
32898         patterns for small and large integers.  Forbid symref memory operands.
32899         Move expander to s390.c.  Require cc register.
32900         ("atomic_compare_and_swap<DGPR:mode><CCZZ1:mode>_internal")
32901         ("*atomic_compare_and_swap<TDI:mode><CCZZ1:mode>_1")
32902         ("*atomic_compare_and_swapdi<CCZZ1:mode>_2")
32903         ("*atomic_compare_and_swapsi<CCZZ1:mode>_3"): Use s_operand to forbid
32904         symref memory operands.  Remove CC mode and call s390_match_ccmode
32905         instead.
32906         ("atomic_exchange<mode>"): Allow and implement all integer modes.
32907
32908 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
32909
32910         * config/s390/s390.md (define_peephole2): New peephole to help
32911         combining the load-and-test pattern with volatile memory.
32912
32913 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
32914
32915         * config/s390/s390.md ("cstorecc4"): Use load-on-condition and deal
32916         with CCZmode for TARGET_Z196.
32917
32918 2017-04-25  Jakub Jelinek  <jakub@redhat.com>
32919
32920         PR rtl-optimization/80501
32921         * combine.c (make_compound_operation_int): Set subreg_code to SET
32922         even for AND with mask of the sign bit of mode.
32923
32924         PR rtl-optimization/80500
32925         * loop-unroll.c (combine_var_copies_in_loop_exit): Call copy_rtx on
32926         sum's initial value.
32927
32928 2017-04-25  Julian Brown  <julian@codesourcery.com>
32929             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
32930
32931         * config/aarch64/thunderx2t99.md (thunderx2t99_crc): New Reservation.
32932
32933 2017-04-25  Marc Glisse  <marc.glisse@inria.fr>
32934
32935         * fold-const.c (tree_single_nonzero_warnv_p): Handle SSA_NAME.
32936
32937 2017-04-25  Julian Brown  <julian@codesourcery.com>
32938             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
32939
32940         * config/aarch64/thunderx2t99.md (thunderx2t99_aes): New Reservation.
32941         (thunderx2t99_sha): New Reservation.
32942
32943 2017-04-25  Julian Brown  <julian@codesourcery.com>
32944             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
32945
32946         * config/aarch64/aarch64-simd.md (aarch64_simd_vec_set<mode>): Fix
32947         type for 1-element load.
32948
32949 2017-04-24  Marc Glisse  <marc.glisse@inria.fr>
32950
32951         * match.pd (X/[ex]C CMP Y/[ex]C): New transformation.
32952
32953 2017-04-24  Martin Jambor  <mjambor@suse.cz>
32954
32955         PR tree-optimization/80293
32956         * tree-sra.c (scalarizable_type_p): New parameter const_decl, make
32957         char arrays not totally scalarizable if it is false.
32958         (analyze_all_variable_accesses): Pass correct value in the new
32959         parameter.  Add a statistics counter.
32960
32961 2017-04-24  Jan Hubicka  <hubicka@ucw.cz>
32962
32963         PR middle-end/79931
32964         * ipa-devirt.c (dump_possible_polymorphic_call_targets): Fix ICE.
32965
32966 2017-04-24  Richard Biener  <rguenther@suse.de>
32967
32968         PR tree-optimization/80494
32969         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Bail
32970         out for complex types.
32971
32972 2017-04-24  Richard Biener  <rguenther@suse.de>
32973
32974         * tree-ssa-sccvn.h (run_scc_vn): Adjust prototype.
32975         * tree-ssa-sccvn.c (print_scc): Print SCC size.
32976         (extract_and_process_scc_for_name): Never fail but drop SCC to varying.
32977         (DFS): Adjust and never fail.
32978         (sccvn_dom_walker::fail): Remove.
32979         (sccvn_dom_walker::before_dom_children): Adjust.
32980         (run_scc_vn): Likewise and never fail.
32981         * tree-ssa-pre.c (pass_pre::execute): Adjust.
32982         (pass_fre::execute): Likewise.
32983
32984 2017-04-24  Richard Biener  <rguenther@suse.de>
32985
32986         PR tree-optimization/79725
32987         * tree-ssa-sink.c (statement_sink_location): Return whether
32988         failure reason was zero uses.  Move that check later.
32989         (sink_code_in_bb): Deal with zero uses by removing the stmt
32990         if possible.
32991
32992 2017-04-24  Richard Biener  <rguenther@suse.de>
32993
32994         PR c++/2972
32995         * tree-ssa-uninit.c (warn_uninitialized_vars): Handle some
32996         pointer-based references.
32997
32998 2017-04-24  Richard Biener  <rguenther@suse.de>
32999
33000         PR bootstrap/79814
33001         * pass_manager.h (pass_manager::operator new): Remove.
33002         (pass_manager::operator delete): Likewise.
33003         * passes.c (pass_manager::operator new): Remove.
33004         (pass_manager::operator delete): Likewise.
33005         (pass_manager::pass_manager): Zero individual pass members.
33006
33007 2017-04-23  Uros Bizjak  <ubizjak@gmail.com>
33008
33009         PR target/70799
33010         * config/i386/i386.c (dimode_scalar_to_vector_candidate_p)
33011         <case ASHIFT, case LSHIFTRT>: Also consider variable shifts.
33012         Check "XEXP (src, 1)" operand here.
33013         <case PLUS, case MINUS, case IOR, case XOR, case AND>:
33014         Check "XEXP (src, 1)" operand here.
33015         (dimode_scalar_chain::make_vector_copies): Detect count register
33016         of a shift instruction.  Zero extend count register from QImode
33017         to DImode to satisfy vector shift pattern count operand predicate.
33018         Substitute vector shift count operand with a DImode copy.
33019         (dimode_scalar_chain::convert_reg): Ditto, zero-extend from
33020         vector register.
33021
33022 2017-04-21  Uros Bizjak  <ubizjak@gmail.com>
33023
33024         * config/i386/i386.md (*extzvqi_mem_rex64): Move above *extzv<mode>.
33025         Remove UNSPEC_NOREX_MEM tag.  Update corresponding peephole2 pattern.
33026         (*insvqi_1_mem_rex64): Move above insv<mode>_1.  Remove
33027         UNSPEC_NOREX_MEM tag.  Update corresponding peephole2 pattern.
33028         (UNSPEC_NOREX_MEM): Remove definition.
33029
33030 2017-04-21  Richard Biener  <rguenther@suse.de>
33031
33032         PR tree-optimization/79547
33033         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
33034         Handle strlen, strcmp, strncmp, strcasecmp, strncasecmp, memcmp,
33035         bcmp, strspn, strcspn, __builtin_object_size and __builtin_constant_p
33036         without any constraints.
33037
33038 2017-04-21  Richard Biener  <rguenther@suse.de>
33039
33040         PR tree-optimization/78847
33041         * fold-const.c (split_tree): Handle POINTER_PLUS_EXPR.
33042
33043 2017-04-21  Richard Biener  <rguenther@suse.de>
33044
33045         * tree.h (build_qualified_type): Annotate with CXX_MEM_STAT_INFO.
33046         (build_distinct_type_copy): Likewise.
33047         (build_variant_type_copy): Likewise.
33048         * tree.c (build_qualified_type): Pass down mem-stat info.
33049         (build_distinct_type_copy): Likewise.
33050         (build_variant_type_copy): Likewise.
33051
33052 2017-04-21  Richard Biener  <rguenther@suse.de>
33053
33054         PR tree-optimization/80237
33055         * tree-ssa-pre.c (find_leader_in_sets): Add third set argument,
33056         defaulted to NULL.
33057         (phi_translate_1): Also allow a leader in AVAIL_OUT of pred
33058         for a simplified result.
33059
33060 2016-04-21  Richard Biener  <rguenther@suse.de>
33061
33062         * tree-ssa-loop-ivcanon.c (constant_after_peeling): Do not require
33063         sth as strict as a simple_iv but a chrec without symbols and an
33064         operand defined in the loop we are peeling (and not some subloop).
33065         (propagate_constants_for_unrolling): Propagate all constants.
33066
33067 2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
33068
33069         PR target/79804
33070         * config/i386/i386.c (print_reg): Remove assert for disalowed
33071         regno values, call output_operand_lossage instead.
33072
33073 2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
33074
33075         PR target/78090
33076         * config/i386/constraints.md (Yc): New register constraint.
33077         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
33078         Use Yc constraint for alternative 2 of operand 0.  Remove
33079         preferred_for_speed attribute.
33080
33081 2017-04-20  Alexander Monakov  <amonakov@ispras.ru>
33082
33083         * omp-low.c (lower_lastprivate_clauses): Correct handling of linear and
33084         lastprivate clauses in SIMT case.
33085
33086 2017-04-20  Volker Reichelt  <v.reichelt@netcologne.de>
33087
33088         * doc/invoke.texi (-Wextra-semi): Document new warning option.
33089
33090 2017-04-20  Richard Biener  <rguenther@suse.de>
33091
33092         PR tree-optimization/57796
33093         * tree-vect-stmts.c (vect_model_store_cost): Cost scatters
33094         as N scalar stores.
33095         (vect_model_load_cost): Cost gathers as N scalar loads.
33096
33097 2017-04-20  Richard Biener  <rguenther@suse.de>
33098
33099         * ggc-page.c (ggc_allocated_p): Rename to ...
33100         (safe_lookup_page_table_entry): ... this and return the lookup
33101         result.
33102         (gt_ggc_m_S): Use safe_lookup_page_table_entry.
33103
33104 2017-04-20  Richard Biener  <rguenther@suse.de>
33105
33106         PR tree-optimization/80453
33107         * tree-ssa-sccvn.h (struct vn_phi_s): Add cclhs and ccrhs members.
33108         * tree-ssa-sccvn.c (cond_stmts_equal_p): Use recorded lhs and rhs
33109         from the conditions.
33110         (vn_phi_eq): Pass them down.
33111         (vn_phi_lookup): Record them.
33112         (vn_phi_insert): Likewise.
33113
33114 2017-04-20  Matthew Fortune  <matthew.fortune@imgtec.com>
33115
33116         * config/mips/mips.c (mips_expand_vec_perm_const): Re-fix
33117         uninitialized variable warning to avoid buffer overrun.
33118
33119 2017-04-20  Alexander Monakov  <amonakov@ispras.ru>
33120
33121         PR other/71250
33122         * doc/invoke.texi (-Wmissing-field-initializers): Mention that warning
33123         is suppressed for '{ 0 }' in C.
33124
33125 2017-04-20  Jakub Jelinek  <jakub@redhat.com>
33126
33127         * BASE-VER: Set to 8.0.0.
33128
33129 2017-04-20  Thomas Preud'homme  <thomas.preudhomme@arm.com>
33130
33131         * config/arm/arm.c (arm_elf_asm_cdtor): Create non-default
33132         priority .init_array and .fini_array section with SECTION_NOTYPE
33133         flag.
33134
33135 2017-04-20  Jakub Jelinek  <jakub@redhat.com>
33136
33137         PR middle-end/80423
33138         * tree.h (build_array_type): Add typeless_storage default argument.
33139         * tree.c (type_cache_hasher::equal): Also compare
33140         TYPE_TYPELESS_STORAGE flag for ARRAY_TYPEs.
33141         (build_array_type): Add typeless_storage argument, set
33142         TYPE_TYPELESS_STORAGE to it, if shared also hash it, and pass to
33143         recursive call.
33144         (build_nonshared_array_type): Adjust build_array_type_1 caller.
33145         (build_array_type): Likewise.  Add typeless_storage argument.
33146
33147 2017-04-19  Eric Botcazou  <ebotcazou@adacore.com>
33148             Jakub Jelinek  <jakub@redhat.com>
33149
33150         PR tree-optimization/80426
33151         * tree-vrp.c (extract_range_from_binary_expr_1): For an additive
33152         operation on symbolic operands, also compute the overflow for the
33153         invariant part when the operation degenerates into a negation.
33154
33155 2017-04-19  Jakub Jelinek  <jakub@redhat.com>
33156
33157         PR debug/80461
33158         * dwarf2out.c (modified_type_die, gen_type_die_with_usage):
33159         Check for t with zero TYPE_QUALS_NO_ADDR_SPACE.
33160
33161         PR debug/80436
33162         * tree-ssa-loop-manip.c (find_uses_to_rename_def): Ignore debug uses.
33163
33164 2017-04-19  Georg-Johann Lay  <avr@gjlay.de>
33165
33166         PR target/80462
33167         * config/avr/avr.c (tree.h): Include it.
33168         (cgraph.h): Include it.
33169         (avr_encode_section_info): Don't warn for uninitialized progmem
33170         variable if it's just an alias.
33171
33172 2017-04-19  Richard Biener  <rguenther@suse.de>
33173
33174         PR ipa/65972
33175         * auto-profile.c (afdo_vpt_for_early_inline): Update SSA
33176         when needed by AutoPGO.
33177
33178 2017-04-19  Paulo J. Matos  <paulo@matos-sorge.com>
33179
33180         PR lto/50345
33181         * doc/lto.texi: Remove an extra 'that'.
33182
33183 2017-04-19  Segher Boessenkool  <segher@kernel.crashing.org>
33184
33185         PR rtl-optimization/80429
33186         * ira.c (split_live_ranges_for_shrink_wrap): Don't split regs that
33187         are only used in debug insns.
33188
33189 2017-04-19  Eric Botcazou  <ebotcazou@adacore.com>
33190             Vladimir Makarov  <vmakarov@redhat.com>
33191
33192         * config/sparc/predicates.md (input_operand): Add comment.  Return
33193         true for any memory operand when LRA is in progress.
33194         * config/sparc/sparc.c (sparc_expand_move): Minor formatting fix.
33195
33196 2017-04-18  Jeff Law  <law@redhat.com>
33197
33198         PR target/74563
33199         * mips.md ({return,simple_return}_internal): Do not overwrite
33200         operands[0].
33201
33202 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
33203
33204         PR tree-optimization/80443
33205         * tree-vrp.c (intersect_ranges): For signed 1-bit precision type,
33206         instead of adding 1, subtract -1 and similarly instead of subtracting
33207         1 add -1.
33208
33209 2017-04-18  Richard Sandiford  <richard.sandiford@arm.com>
33210
33211         PR rtl-optimization/80357
33212         * haifa-sched.c (tmp_bitmap): New variable.
33213         (model_recompute): Handle duplicate use records.
33214         (alloc_global_sched_pressure_data): Initialize tmp_bitmap.
33215         (free_global_sched_pressure_data): Free it.
33216
33217 2017-04-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
33218
33219         Revert:
33220         2017-02-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
33221         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
33222         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
33223         instead of SYSTEM_HEADER_DIR.
33224
33225 2017-04-18  Jeff Law  <law@redhat.com>
33226
33227         PR middle-end/80422
33228         * cfgcleanup.c (try_crossjump_to_edge): Verify SRC1 and SRC2 have
33229         predecessors after walking up the insn chain.
33230
33231 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
33232
33233         PR debug/80263
33234         * dwarf2out.c (modified_type_die): Try harder not to emit internal
33235         sizetype type into debug info.
33236
33237 2017-04-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
33238
33239         PR target/80099
33240         * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Eliminate
33241         unneeded test for TARGET_UPPER_REGS_SF.
33242         * config/rs6000/vsx.md (vsx_extract_v4sf_var): Likewise.
33243
33244 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
33245
33246         PR sanitizer/80444
33247         * sancov.c (sancov_pass): Use gsi_start_nondebug_after_labels_bb
33248         instead of gsi_after_labels.
33249
33250 2017-04-18  Jeff Law  <law@redhat.com>
33251
33252         * regcprop.c (maybe_mode_change): Avoid creating copies of the
33253         stack pointer.
33254
33255         Revert:
33256         2017-04-13  Jeff Law  <law@redhat.com>
33257         * config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
33258         in operands[1] if it is a MEM and TARGET_MIPS16 is active.
33259
33260 2017-04-18  Georg-Johann Lay  <avr@gjlay.de>
33261
33262         PR target/79453
33263         * config/avr/avr.c (intl.h): Include it.
33264         (avr_pgm_check_var_decl) [reason]: Wrap diagnostic snippets into _().
33265
33266 2017-04-18  Martin Liska  <mliska@suse.cz>
33267
33268         PR gcov-profile/78783
33269         * gcov-tool.c (gcov_output_files): Validate that destination
33270         file is either removed by the tool or by a user.
33271
33272 2017-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
33273             Guy Benyei  <guybe@mellanox.com>
33274
33275         * config/arc/arc.c (arc_reorg): Move loop_end_id into a more local
33276         block, and do not negate it, the stored id is already negative.
33277
33278 2017-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
33279
33280         * config/arc/arc.md (doloop_begin_i): Use @pcl assembler syntax.
33281
33282 2017-04-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
33283
33284         PR target/80098
33285         * config/rs6000/rs6000-cpus.def (OTHER_P9_VECTOR_MASKS): Define
33286         masks of options that should be turned off if the VSX vector
33287         options are turned off.
33288         (OTHER_P8_VECTOR_MASKS): Likewise.
33289         (OTHER_VSX_VECTOR_MASKS): Likewise.
33290         * config/rs6000/rs6000.c (rs6000_option_override_internal): Call
33291         rs6000_disable_incompatible_switches to validate no type switches
33292         like -mvsx.
33293         (rs6000_incompatible_switch): New function to disallow turning on
33294         other vector options if -mno-vsx, -mno-power8-vector, or
33295         -mno-power9-vector are specified.
33296
33297 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
33298
33299         * config/arc/arc.h (CRT_CALL_STATIC_FUNCTION): Use long calls.
33300
33301 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
33302
33303         * config/arc/arc-protos.h (arc_decl_pretend_args): Remove.
33304         * config/arc/arc.c (arc_decl_pretend_args): Likewise.
33305         * config/arc/arc.h (CFA_FRAME_BASE_OFFSET): Likewise.
33306         (ARG_POINTER_CFA_OFFSET): Likewise.
33307
33308 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
33309
33310         * config/arc/arc.c (arc_mode_dependent_address_p): Relax
33311         conditions to take advantage of various optimizations.
33312
33313 2017-04-13  Jeff Law  <law@redhat.com>
33314
33315         * config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
33316         in operands[1] if it is a MEM and TARGET_MIPS16 is active.
33317         (zero_extendsidi2_dext): Likewise.
33318
33319 2017-04-13  Jakub Jelinek  <jakub@redhat.com>
33320
33321         PR sanitizer/80403
33322         * fold-const.c (fold_ternary_loc): Revert
33323         use op0 instead of fold_convert_loc (loc, type, arg0) part of
33324         2017-04-12 change.
33325
33326 2017-04-13  Vladimir Makarov  <vmakarov@redhat.com>
33327
33328         PR rtl-optimization/80343
33329         * lra-remat.c (update_scratch_ops): Assign original hard reg to
33330         new scratch pseudo.
33331
33332 2017-04-13  Denis Khalikov <d.khalikov@partner.samsung.com>
33333
33334         PR sanitizer/80414
33335         * ubsan.c (ubsan_expand_bounds_ifn): Pass original index
33336         to ubsan_encode_value.
33337
33338 2017-04-13  Jeff Law  <law@redhat.com>
33339
33340         * reload1.c (eliminate_regs_1): Call gen_rtx_raw_SUBREG for SUBREGs
33341         appearing in DEBUG_INSNs.
33342
33343 2017-04-13  Martin Liska  <mliska@suse.cz>
33344
33345         PR gcov-profile/80413
33346         * gcov-io.c (gcov_write_string): Copy to buffer just when
33347         allocated size is greater than zero.
33348
33349 2017-04-13  Jakub Jelinek  <jakub@redhat.com>
33350
33351         PR debug/80321
33352         * dwarf2out.c (decls_for_scope): Ignore declarations of
33353         current_function_decl in BLOCK_NONLOCALIZED_VARS.
33354
33355 2017-04-12  Jan Hubicka  <hubicka@ucw.cz>
33356
33357         PR lto/69953
33358         * ipa-visibility.c (non_local_p): Fix typos.
33359         (localize_node): When localizing symbol in same comdat group,
33360         dissolve the group only when we know external symbols are going
33361         to be privatized.
33362         (function_and_variable_visibility): Do not localize DECL_EXTERNAL.
33363
33364 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
33365
33366         PR tree-optimization/79390
33367         * optabs.c (emit_conditional_move): If the preferred op2/op3 operand
33368         order does not result in usable sequence, retry with reversed operand
33369         order.
33370
33371         PR sanitizer/80403
33372         PR sanitizer/80404
33373         PR sanitizer/80405
33374         * fold-const.c (fold_ternary_loc): Use op1 instead of arg1 as argument
33375         to fold_build2_loc.  Convert TREE_OPERAND (tem, 0) to type.  Use
33376         op0 instead of fold_convert_loc (loc, type, arg0).
33377
33378 2017-04-12  Jeff Law  <law@redhat.com>
33379
33380         * genattrtab.c (write_eligible_delay): Verify DELAY_INSN still
33381         has a delay slot in the generated code.
33382
33383         * config/cris/cris.md (cris_preferred_reload_class): Return
33384         GENNONACR_REGS rather than GENERAL_REGS.
33385
33386 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
33387
33388         PR c/80163
33389         * expr.c <CASE_CONVERT>: For EXPAND_INITIALIZER determine SIGN_EXTEND
33390         vs. ZERO_EXTEND based on signedness of treeop0's type rather than
33391         signedness of the result type.
33392
33393 2017-04-12  Richard Biener  <rguenther@suse.de>
33394             Jeff Law  <law@redhat.com>
33395
33396         PR tree-optimization/80359
33397         * tree-ssa-dse.c (maybe_trim_partially_dead_store): Do not
33398         trim stores to TARGET_MEM_REFs.
33399
33400 2017-04-12  Richard Biener  <rguenther@suse.de>
33401
33402         PR tree-optimization/79390
33403         * gimple-ssa-split-paths.c (is_feasible_trace): Restrict
33404         threading case even more.
33405
33406 2017-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
33407
33408         PR target/80382
33409         * config/rs6000/sync.md (atomic_load<mode>, atomic_store<mode): Test
33410         for quad_address_p for TImode, instead of just not indexed_address.
33411
33412 2017-04-12  Richard Biener  <rguenther@suse.de>
33413             Bernd Edlinger  <bernd.edlinger@hotmail.de>
33414
33415         PR middle-end/79671
33416         * alias.c (component_uses_parent_alias_set_from): Handle
33417         TYPE_TYPELESS_STORAGE.
33418         (get_alias_set): Likewise.
33419         * tree-core.h (tree_type_common): Add typeless_storage flag.
33420         * tree.h (TYPE_TYPELESS_STORAGE): New macro.
33421         * stor-layout.c (place_union_field): Set TYPE_TYPELESS_STORAGE
33422         for types containing members with TYPE_TYPELESS_STORAGE.
33423         (place_field): Likewise.
33424         (layout_type): Likewise for ARRAY_TYPE.
33425         * lto-streamer-out.c (hash_tree): Hash TYPE_TYPELESS_STORAGE.
33426         * tree-streamer-in.c (unpack_ts_type_common_value_fields): Stream
33427         TYPE_TYPELESS_STORAGE.
33428         * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
33429
33430 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
33431
33432         PR sanitizer/80349
33433         * fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
33434         first argument to type.
33435
33436 2017-04-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
33437
33438         PR target/80376
33439         PR target/80315
33440         * config/rs6000/rs6000.c (rs6000_expand_unop_builtin): Return
33441         CONST0_RTX (mode) rather than const0_rtx where appropriate.
33442         (rs6000_expand_binop_builtin): Likewise.
33443         (rs6000_expand_ternop_builtin): Likewise; also add missing
33444         vsx_xxpermdi_* variants; also fix typo (arg1 => arg2) for
33445         vshasigma built-ins.
33446         * doc/extend.texi: Document that vec_xxpermdi's third argument
33447         must be a constant.
33448
33449 2017-04-11  Uros Bizjak  <ubizjak@gmail.com>
33450
33451         * config/i386/i386.c (dimode_scalar_chain::compute_convert_gain):
33452         Use shift_const cost parameter when calculating gain of STV shifts.
33453
33454 2017-04-11  Vladimir Makarov  <vmakarov@redhat.com>
33455
33456         PR rtl-optimization/70478
33457         * lra-constraints.c (process_alt_operands): Check memory for
33458         disfavoring memory insn operand.
33459
33460 2017-04-11  Jakub Jelinek  <jakub@redhat.com>
33461
33462         PR middle-end/80100
33463         * simplify-rtx.c (simplify_binary_operation_1) <case IOR>: Perform
33464         left shift in unsigned HOST_WIDE_INT type.
33465
33466         PR rtl-optimization/80385
33467         * simplify-rtx.c (simplify_unary_operation_1): Don't transform
33468         (not (neg X)) into (plus X -1) for complex or non-integral modes.
33469
33470         PR libgomp/80394
33471         * omp-low.c (scan_omp_task): Don't optimize away empty tasks
33472         if they have any depend clauses.
33473
33474 2017-04-11  Martin Liska  <mliska@suse.cz>
33475
33476         PR ipa/80212
33477         * cgraph.c (cgraph_node::dump): Dump calls_comdat_local.
33478         * ipa-split.c (split_function): Create a local comdat symbol
33479         if caller is in a comdat group.
33480
33481 2017-04-11  Martin Liska  <mliska@suse.cz>
33482
33483         PR ipa/80212
33484         * ipa-cp.c (determine_versionability): Handle calls_comdat_local
33485         flags.
33486
33487 2017-04-11  Martin Sebor  <msebor@redhat.com>
33488
33489         PR middle-end/80364
33490         * gimple-ssa-sprintf.c (get_int_range): Remove second argument and
33491         always use the int type.  Use INTEGRAL_TYPE_P() rather than testing
33492         for INTEGER_TYPE.
33493         (directive::set_width, directive::set_precision, format_character):
33494         Adjust.
33495         (parse_directive): Use INTEGRAL_TYPE_P() rather than testing for
33496         INTEGER_TYPE.
33497
33498 2017-04-11  Richard Earnshaw  <rearnsha@arm.com>
33499
33500         PR target/80389
33501         * config/arm/arm.c (arm_configure_build_target): When -mcpu and -arch
33502         conflict, set target->arch_name instead of target->cpu_name.
33503
33504 2017-04-11  Richard Biener  <rguenther@suse.de>
33505
33506         PR tree-optimization/80374
33507         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Use
33508         build_zero_cst, remove fold_convertible_p check again.
33509
33510 2017-04-11  Martin Liska  <mliska@suse.cz>
33511
33512         PR sanitizer/70878
33513         * ubsan.c (instrument_object_size): Do not instrument register
33514         variables.
33515
33516 2017-04-11  Jakub Jelinek  <jakub@redhat.com>
33517
33518         PR target/80381
33519         * config/i386/i386-builtin-types.def
33520         (V16HI_FTYPE_V16HI_INT_V16HI_UHI_COUNT,
33521         V16HI_FTYPE_V16HI_V8HI_V16HI_UHI_COUNT,
33522         V16SI_FTYPE_V16SI_INT_V16SI_UHI_COUNT,
33523         V16SI_FTYPE_V16SI_V4SI_V16SI_UHI_COUNT,
33524         V2DI_FTYPE_V2DI_INT_V2DI_UQI_COUNT,
33525         V2DI_FTYPE_V2DI_V2DI_V2DI_UQI_COUNT,
33526         V32HI_FTYPE_V32HI_INT_V32HI_USI_COUNT,
33527         V32HI_FTYPE_V32HI_V8HI_V32HI_USI_COUNT,
33528         V4DI_FTYPE_V4DI_INT_V4DI_UQI_COUNT,
33529         V4DI_FTYPE_V4DI_V2DI_V4DI_UQI_COUNT,
33530         V4SI_FTYPE_V4SI_INT_V4SI_UQI_COUNT,
33531         V4SI_FTYPE_V4SI_V4SI_V4SI_UQI_COUNT,
33532         V8DI_FTYPE_V8DI_INT_V8DI_UQI_COUNT,
33533         V8DI_FTYPE_V8DI_V2DI_V8DI_UQI_COUNT,
33534         V8HI_FTYPE_V8HI_INT_V8HI_UQI_COUNT,
33535         V8HI_FTYPE_V8HI_V8HI_V8HI_UQI_COUNT,
33536         V8SI_FTYPE_V8SI_INT_V8SI_UQI_COUNT,
33537         V8SI_FTYPE_V8SI_V4SI_V8SI_UQI_COUNT): New function type aliases.
33538         * config/i386/i386-builtin.def (__builtin_ia32_pslld512_mask,
33539         __builtin_ia32_pslldi512_mask, __builtin_ia32_psllq512_mask,
33540         __builtin_ia32_psllqi512_mask, __builtin_ia32_psrad512_mask,
33541         __builtin_ia32_psradi512_mask, __builtin_ia32_psraq512_mask,
33542         __builtin_ia32_psraqi512_mask, __builtin_ia32_psrld512_mask,
33543         __builtin_ia32_psrldi512_mask, __builtin_ia32_psrlq512_mask,
33544         __builtin_ia32_psrlqi512_mask, __builtin_ia32_psllwi128_mask,
33545         __builtin_ia32_pslldi128_mask, __builtin_ia32_psllqi128_mask,
33546         __builtin_ia32_psllw128_mask, __builtin_ia32_pslld128_mask,
33547         __builtin_ia32_psllq128_mask, __builtin_ia32_psllwi256_mask,
33548         __builtin_ia32_psllw256_mask, __builtin_ia32_pslldi256_mask,
33549         __builtin_ia32_pslld256_mask, __builtin_ia32_psllqi256_mask,
33550         __builtin_ia32_psllq256_mask, __builtin_ia32_psradi128_mask,
33551         __builtin_ia32_psrad128_mask, __builtin_ia32_psradi256_mask,
33552         __builtin_ia32_psrad256_mask, __builtin_ia32_psraqi128_mask,
33553         __builtin_ia32_psraq128_mask, __builtin_ia32_psraqi256_mask,
33554         __builtin_ia32_psraq256_mask, __builtin_ia32_psrldi128_mask,
33555         __builtin_ia32_psrld128_mask, __builtin_ia32_psrldi256_mask,
33556         __builtin_ia32_psrld256_mask, __builtin_ia32_psrlqi128_mask,
33557         __builtin_ia32_psrlq128_mask, __builtin_ia32_psrlqi256_mask,
33558         __builtin_ia32_psrlq256_mask, __builtin_ia32_psrawi256_mask,
33559         __builtin_ia32_psraw256_mask, __builtin_ia32_psrawi128_mask,
33560         __builtin_ia32_psraw128_mask, __builtin_ia32_psrlwi256_mask,
33561         __builtin_ia32_psrlw256_mask, __builtin_ia32_psrlwi128_mask,
33562         __builtin_ia32_psrlw128_mask, __builtin_ia32_psllwi512_mask,
33563         __builtin_ia32_psllw512_mask, __builtin_ia32_psrawi512_mask,
33564         __builtin_ia32_psraw512_mask, __builtin_ia32_psrlwi512_mask,
33565         __builtin_ia32_psrlw512_mask): Use _COUNT suffixed function type
33566         aliases.
33567         * config/i386/i386.c (ix86_expand_args_builtin): Rename last_arg_count
33568         flag to second_arg_count, handle 4 argument function type _COUNT
33569         aliases, handle second_arg_count on second argument rather than last.
33570
33571 2017-04-10  Jeff Law  <law@redhat.com>
33572
33573         PR tree-optimization/80374
33574         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Do not try to
33575         record anything if we can not convert integer_zero_node to the
33576         desired type.
33577
33578 2017-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
33579
33580         PR target/80108
33581         * config/rs6000/rs6000.c (rs6000_option_override_internal):
33582         Enhance special handling given to the TARGET_P9_MINMAX option in
33583         relation to certain other options.
33584
33585 2017-04-10  Bin Cheng  <bin.cheng@arm.com>
33586
33587         PR tree-optimization/80153
33588         * tree-ssa-loop-ivopts.c (add_iv_candidate_for_use): Check and
33589         remove POINTER_PLUS_EXPR's base part directly, rather than through
33590         aff_tree.
33591
33592 2017-04-10  Richard Biener  <rguenther@suse.de>
33593             Bin Cheng  <bin.cheng@arm.com>
33594
33595         PR tree-optimization/80153
33596         * tree-affine.c (aff_combination_to_tree): Get base pointer from
33597         the first element of pointer type aff_tree.  Build result expr in
33598         aff_tree's type.
33599         (add_elt_to_tree): Convert to type unconditionally.  Remove other
33600         fold_convert calls.
33601         * tree-ssa-loop-ivopts.c (alloc_iv): Pass in consistent types.
33602         (rewrite_use_nonlinear_expr): Check invariant using iv information.
33603
33604 2017-04-10  Richard Biener  <rguenther@suse.de>
33605
33606         * tree-ssa-structalias.c (find_func_aliases): Properly handle
33607         asm inputs.
33608
33609 2017-04-10  Vladimir Makarov  <vmakarov@redhat.com>
33610
33611         PR rtl-optimization/70478
33612         * lra-constraints.c (curr_small_class_check): New.
33613         (update_and_check_small_class_inputs): New.
33614         (process_alt_operands): Update curr_small_class_check.  Disfavor
33615         alternative insn memory operands.  Check available regs for small
33616         class operands.
33617
33618 2017-03-31  Matthew Fortune  <matthew.fortune@imgtec.com>
33619
33620         PR target/80057
33621         * config/mips/mips.opt (-mvirt): Update description.
33622         * doc/invoke.texi (-mvirt): Likewise.
33623
33624 2017-04-10  Richard Biener  <rguenther@suse.de>
33625
33626         PR middle-end/80362
33627         * fold-const.c (fold_binary_loc): Look at unstripped ops when
33628         looking for NEGATE_EXPR in -A / -B to A / B folding.
33629
33630 2017-04-10  Martin Liska  <mliska@suse.cz>
33631
33632         PR gcov-profile/80224
33633         * gcov.c (print_usage): Fix usage string.
33634         (get_gcov_intermediate_filename): Remove.
33635         (output_gcov_file): Use both for normal and intermediate format.
33636         (generate_results): Do not initialize special file for
33637         intermediate format.
33638
33639 2017-04-10  Richard Biener  <rguenther@suse.de>
33640
33641         PR tree-optimization/80304
33642         * tree-ssa-loop-im.c (ref_indep_loop_p_1): Also recurse
33643         for safelen.
33644
33645 2017-04-10  Nathan Sidwell  <nathan@acm.org>
33646
33647         PR target/79905
33648         * config/rs6000/rs6000.c (rs6000_vector_type): New.
33649         (rs6000_init_builtins): Use it.
33650
33651 2016-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
33652
33653         * config/arm/arm.md (<mrc>): Add mode to SET source.
33654         (<mrrc>): Likewise.
33655
33656 2017-04-10  Richard Biener  <rguenther@suse.de>
33657
33658         PR middle-end/80344
33659         * gimplify.c (is_gimple_mem_rhs_or_call): Allow CLOBBERs.
33660
33661 2017-04-10  Jakub Jelinek  <jakub@redhat.com>
33662
33663         PR target/80324
33664         * config/i386/avx512fintrin.h (_mm512_reduce_add_epi32,
33665         _mm512_reduce_mul_epi32, _mm512_reduce_and_epi32,
33666         _mm512_reduce_or_epi32, _mm512_mask_reduce_add_epi32,
33667         _mm512_mask_reduce_mul_epi32, _mm512_mask_reduce_and_epi32,
33668         _mm512_mask_reduce_or_epi32, _mm512_reduce_min_epi32,
33669         _mm512_reduce_max_epi32, _mm512_reduce_min_epu32,
33670         _mm512_reduce_max_epu32, _mm512_mask_reduce_min_epi32,
33671         _mm512_mask_reduce_max_epi32, _mm512_mask_reduce_min_epu32,
33672         _mm512_mask_reduce_max_epu32, _mm512_reduce_add_ps,
33673         _mm512_reduce_mul_ps, _mm512_mask_reduce_add_ps,
33674         _mm512_mask_reduce_mul_ps, _mm512_reduce_min_ps, _mm512_reduce_max_ps,
33675         _mm512_mask_reduce_min_ps, _mm512_mask_reduce_max_ps,
33676         _mm512_reduce_add_epi64, _mm512_reduce_mul_epi64,
33677         _mm512_reduce_and_epi64, _mm512_reduce_or_epi64,
33678         _mm512_mask_reduce_add_epi64, _mm512_mask_reduce_mul_epi64,
33679         _mm512_mask_reduce_and_epi64, _mm512_mask_reduce_or_epi64,
33680         _mm512_reduce_min_epi64, _mm512_reduce_max_epi64,
33681         _mm512_mask_reduce_min_epi64, _mm512_mask_reduce_max_epi64,
33682         _mm512_reduce_min_epu64, _mm512_reduce_max_epu64,
33683         _mm512_mask_reduce_min_epu64, _mm512_mask_reduce_max_epu64,
33684         _mm512_reduce_add_pd, _mm512_reduce_mul_pd, _mm512_mask_reduce_add_pd,
33685         _mm512_mask_reduce_mul_pd, _mm512_reduce_min_pd, _mm512_reduce_max_pd,
33686         _mm512_mask_reduce_min_pd, _mm512_mask_reduce_max_pd): New intrinsics.
33687
33688 2017-04-08  Vladimir Makarov  <vmakarov@redhat.com>
33689
33690         PR rtl-optimization/70478
33691         * lra-constraints.c: Reverse the last patch.
33692
33693 2017-04-08  Andreas Tobler  <andreast@gcc.gnu.org>
33694
33695         * config/aarch64/aarch64-freebsd.h: Define MCOUNT_NAME.
33696         Add comment for WCHAR_T.
33697
33698 2017-04-08  Martin Liska  <mliska@suse.cz>
33699
33700         Revert:
33701         2017-04-07  Martin Liska  <mliska@suse.cz>
33702
33703         PR ipa/80212
33704         * ipa-split.c (split_function): Add function part to a same comdat
33705         group.
33706
33707 2017-04-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
33708
33709         PR target/80358
33710         * config/rs6000/rs6000.c (expand_block_compare): Fix boundary check.
33711
33712 2017-04-07  Pat Haugen  <pthaugen@us.ibm.com>
33713
33714         * rs6000/rs6000.c (vec_load_pendulum): Rename...
33715         (vec_pairing): ...to this.
33716         (power9_sched_reorder2): Rewrite code for pairing vector/vecload insns.
33717         (rs6000_sched_init): Adjust for name change.
33718         (struct rs6000_sched_context): Likewise.
33719         (rs6000_init_sched_context): Likewise.
33720         (rs6000_set_sched_context): Likewise.
33721
33722 2017-04-07  Jakub Jelinek  <jakub@redhat.com>
33723
33724         PR target/80322
33725         PR target/80323
33726         PR target/80325
33727         PR target/80326
33728         * config/i386/avxintrin.h (_mm256_cvtsd_f64, _mm256_cvtss_f32): New
33729         intrinsics.
33730         * config/i386/avx512fintrin.h (_mm512_int2mask, _mm512_mask2int,
33731         _mm512_abs_ps, _mm512_mask_abs_ps, _mm512_abs_pd, _mm512_mask_abs_pd,
33732         _mm512_cvtsd_f64, _mm512_cvtss_f32): Likewise.
33733
33734 2017-04-07  Andreas Tobler  <andreast@gcc.gnu.org>
33735
33736         * config/aarch64/aarch64-freebsd.h: Define WCHAR_TYPE.
33737
33738 2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>
33739
33740         PR rtl-optimization/70703
33741         * ira-color.c (update_conflict_hard_regno_costs): Use
33742         int64_t instead of HOST_WIDE_INT.
33743
33744 2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>
33745
33746         PR rtl-optimization/70478
33747         * lra-constraints.c (process_alt_operands): Disfavor alternative
33748         insn memory operands.
33749
33750 2017-04-07  Jeff Law  <law@redhat.com>
33751
33752         * config/iq2000/iq2000.c (final_prescan_insn): Do not separate a
33753         CALL and NOTE_INSN_CALL_ARG_LOCATION.
33754
33755 2017-04-07  Martin Liska  <mliska@suse.cz>
33756
33757         PR target/79889
33758         * config/aarch64/aarch64.c (aarch64_process_target_attr):
33759         Show error message instead of an ICE.
33760
33761 2017-04-07  Martin Liska  <mliska@suse.cz>
33762
33763         PR ipa/80212
33764         * ipa-split.c (split_function): Add function part to a same comdat
33765         group.
33766
33767 2017-04-07  Richard Biener  <rguenther@suse.de>
33768
33769         PR middle-end/80341
33770         * tree.c (get_unwidened): Also handle ! for_type case for
33771         INTEGER_CSTs.
33772         * convert.c (do_narrow): Split out from ...
33773         (convert_to_integer_1): ... here.  Do not pass final truncation
33774         type to get_unwidened for TRUNC_DIV_EXPR.
33775
33776 2017-04-07  Richard Biener  <rguenther@suse.de>
33777
33778         * tree-affine.c (wide_int_ext_for_comb): Take type rather
33779         than aff_tree.
33780         (aff_combination_const): Adjust.
33781         (aff_combination_scale): Likewise.
33782         (aff_combination_add_elt): Likewise.
33783         (aff_combination_add_cst): Likewise.
33784         (aff_combination_convert): Likewise.
33785         (add_elt_to_tree): Likewise.  Remove unused argument.
33786         (aff_combination_to_tree): Adjust calls to add_elt_to_tree.
33787
33788 2017-04-07  Sebastian Huber  <sebastian.huber@embedded-brains.de>
33789
33790         * config/arm/arm.h (ARM_DEFAULT_SHORT_ENUMS): Provide default
33791         definition.
33792         * config/arm/arm.c (arm_default_short_enums): Use
33793         ARM_DEFAULT_SHORT_ENUMS.
33794         * config/arm/rtems.h (ARM_DEFAULT_SHORT_ENUMS): Define.
33795
33796 2017-04-06  Jakub Jelinek  <jakub@redhat.com>
33797
33798         PR debug/80234
33799         * dwarf2out.c (gen_member_die): Handle C++17 inline static data
33800         members with redundant out-of-class redeclaration.
33801
33802 2017-04-06  Uros Bizjak  <ubizjak@gmail.com>
33803
33804         PR target/80286
33805         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): New pattern.
33806         * config/i386/i386.md (*zero_extendsidi2):
33807         Add (?*x,*x) and (?*v,*v) alternatives.
33808
33809 2017-04-06  Uros Bizjak  <ubizjak@gmail.com>
33810
33811         PR target/79733
33812         * config/i386/i386.c (ix86_expand_builtin)
33813         <case IX86_BUILTIN_K{,OR}TEST{C,Z}{8,16,32,64}>: Determine insn operand
33814         mode from insn data. Convert operands to insn operand mode.
33815         Copy operands that don't satisfy insn predicate to a register.
33816
33817 2017-04-06  Sam Thursfield  <sam.thursfield@codethink.co.uk>
33818
33819         * config/rs6000/x-aix: Increase memory limit for genautomata on AIX.
33820         Update comments.
33821
33822 2017-04-06  Richard Biener  <rguenther@suse.de>
33823
33824         PR tree-optimization/80334
33825         * tree-ssa-loop-ivopts.c (rewrite_use_address): Properly
33826         preserve alignment of accesses.
33827
33828 2017-04-06  Richard Biener  <rguenther@suse.de>
33829
33830         PR tree-optimization/80262
33831         * tree-sra.c (build_ref_for_offset): Preserve address-space
33832         information.
33833         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address):
33834         Drop useless address-space information on MEM_REF offsets.
33835
33836 2017-04-05  Andreas Schwab  <schwab@linux-m68k.org>
33837
33838         * builtins.def (BUILT_IN_UPDATE_SETJMP_BUF): Fix type.
33839
33840 2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>
33841
33842         PR rtl-optimization/70703
33843         * ira-color.c (update_conflict_hard_regno_costs): Use
33844         HOST_WIDE_INT instead of long.
33845
33846 2017-04-05  Uros Bizjak  <ubizjak@gmail.com>
33847
33848         PR target/80298
33849         * config/i386/mmintrin.h: Add -msse target option when __SSE__ is
33850         not defined for x86_64 target.  Add -mmmx target option when __SSE2__
33851         is not defined.
33852         * config/i386/mm3dnow.h: Add -msse target when __SSE__ is not defined
33853         for x86_64 target.  Handle -m3dnowa option.
33854
33855 2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>
33856
33857         PR rtl-optimization/70703
33858         * ira-color.c (update_costs_from_allocno): Use the smallest mode.
33859         (update_conflict_hard_regno_costs): Use long instead of unsigned
33860         arithmetic for cost calculation.
33861
33862 2017-04-05  Jakub Jelinek  <jakub@redhat.com>
33863             Bernd Edlinger  <bernd.edlinger@hotmail.de>
33864
33865         PR sanitizer/80308
33866         * asan.c (asan_store_shadow_bytes): Fix location of last_chunk_value
33867         for big endian.
33868
33869 2017-04-05  Eric Botcazou  <ebotcazou@adacore.com>
33870
33871         PR target/78002
33872         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Replace
33873         ptr_mode with Pmode throughout.
33874         * config/aarch64/aarch64.md (probe_stack_range_<PTR:mode): Rename
33875         into probe_stack_range and use DImode.
33876
33877 2017-04-05  Dominik Vogt  <vogt@linux.vnet.ibm.com>
33878
33879         PR target/79890
33880         * config/s390/s390.c (s390_register_info_gprtofpr): Return if
33881         call_eh_return is true.
33882
33883 2017-04-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
33884
33885         * config/s390/s390-c.c (s390_resolve_overloaded_builtin):
33886         Initialize last_match_fntype_index.
33887
33888 2017-04-05  Jakub Jelinek  <jakub@redhat.com>
33889
33890         PR target/80310
33891         * tree-nvr.c: Include internal-fn.h.
33892         (pass_return_slot::execute): Ignore internal calls without
33893         direct optab.
33894
33895 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
33896             Richard Biener  <rguenther@suse.de>
33897
33898         PR c++/80297
33899         * genmatch.c (capture::gen_transform): For GENERIC unshare_expr
33900         captures used multiple times, except for the last use.
33901         * generic-match-head.c: Include gimplify.h.
33902
33903 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
33904
33905         PR tree-optimization/79390
33906         * target.h (struct noce_if_info): Declare.
33907         * targhooks.h (default_noce_conversion_profitable_p): Declare.
33908         * target.def (noce_conversion_profitable_p): New target hook.
33909         * ifcvt.h (struct noce_if_info): New type, moved from ...
33910         * ifcvt.c (struct noce_if_info): ... here.
33911         (noce_conversion_profitable_p): Renamed to ...
33912         (default_noce_conversion_profitable_p): ... this.  No longer
33913         static nor inline.
33914         (noce_try_store_flag_constants, noce_try_addcc,
33915         noce_try_store_flag_mask, noce_try_cmove, noce_try_cmove_arith,
33916         noce_convert_multiple_sets): Use targetm.noce_conversion_profitable_p
33917         instead of noce_conversion_profitable_p.
33918         * config/i386/i386.c: Include ifcvt.h.
33919         (ix86_option_override_internal): Don't override
33920         PARAM_MAX_RTL_IF_CONVERSION_INSNS default.
33921         (ix86_noce_conversion_profitable_p): New function.
33922         (TARGET_NOCE_CONVERSION_PROFITABLE_P): Redefine.
33923         * config/i386/x86-tune.def (X86_TUNE_ONE_IF_CONV_INSN): Adjust comment.
33924         * doc/tm.texi.in (TARGET_NOCE_CONVERSION_PROFITABLE_P): Add.
33925         * doc/tm.texi: Regenerated.
33926
33927 2017-04-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
33928
33929         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Grammar
33930         correction.
33931
33932 2017-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
33933
33934         PR target/80307
33935         * config/arm/arm.c (thumb1_rtx_costs): Give a cost of 32
33936         instructions for small multiply cores.
33937
33938 2017-04-04  Jeff Law  <law@redhat.com>
33939
33940         * config/mips/mips.c (mips_multi_add): Zero initialize the newly
33941         added member.
33942         (mips_expand_vec_perm_const): Initialize elements in orig_perm
33943         that are not set by the loop over the elements.
33944
33945 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
33946
33947         PR target/80286
33948         * config/i386/i386.c (ix86_expand_args_builtin): If op has scalar
33949         int mode, convert_modes it to mode as unsigned, otherwise use
33950         lowpart_subreg to mode rather than SImode.
33951         * config/i386/sse.md (<mask_codefor>ashr<mode>3<mask_name>,
33952         ashr<mode>3, ashr<mode>3<mask_name>, <shift_insn><mode>3<mask_name>):
33953         Use DImode instead of SImode for the shift count operand.
33954         * config/i386/mmx.md (mmx_ashr<mode>3, mmx_<shift_insn><mode>3):
33955         Likewise.
33956
33957 2017-04-04  Richard Biener  <rguenther@suse.de>
33958
33959         PR middle-end/80281
33960         * match.pd (A + (-B) -> A - B): Make sure to preserve unsigned
33961         arithmetic done for the negate or the plus.  Simplify.
33962         (A - (-B) -> A + B): Likewise.
33963         * fold-const.c (split_tree): Make sure to not negate pointers.
33964
33965 2017-04-04  Segher Boessenkool  <segher@kernel.crashing.org>
33966
33967         PR rtl-optimization/60818
33968         * simplify-rtx.c (simplify_binary_operation_1): Do not replace
33969         a compare of comparisons with the thing compared if this results
33970         in a different machine mode.
33971
33972 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
33973
33974         * alias.c (base_alias_check): Fix typo in comment.
33975         * cgraph.h (class ipa_polymorphic_call_context): Likewise.
33976         * cgraphunit.c (symbol_table::compile): Likewise.
33977         * collect2.c (maybe_run_lto_and_relink): Likewise.
33978         * config/arm/arm.c (arm_thumb1_mi_thunk): Likewise.
33979         * config/avr/avr-arch.h (avr_arch_info_t): Likewise.
33980         * config/avr/avr.c (avr_map_op_t): Likewise.
33981         * config/cr16/cr16.h (DATA_ALIGNMENT): Likewise.
33982         * config/epiphany/epiphany.c (TARGET_ARG_PARTIAL_BYTES): Likewise.
33983         * config/epiphany/epiphany.md (movcc): Likewise.
33984         * config/i386/i386.c (legitimize_pe_coff_extern_decl): Likewise.
33985         * config/m68k/m68k.c (struct _sched_ib, m68k_sched_variable_issue):
33986         Likewise.
33987         * config/mips/mips.c (mips_save_restore_reg): Likewise.
33988         * config/rx/rx.c (rx_is_restricted_memory_address): Likewise.
33989         * config/s390/s390.c (Z10_EARLYLOAD_DISTANCE): Likewise.
33990         * config/sh/sh.c (sh_rtx_costs): Likewise.
33991         * fold-const.c (fold_truth_andor): Likewise.
33992         * genautomata.c (collapse_flag): Likewise.
33993         * gengtype.h (struct type::u::s): Likewise.
33994         * gensupport.c (has_subst_attribute, add_mnemonic_string): Likewise.
33995         * input.c (FORMAT_AMOUNT): Likewise.
33996         * ipa-cp.c (class ipcp_lattice, agg_replacements_to_vector)
33997         (known_aggs_to_agg_replacement_list): Likewise.
33998         * ipa-inline-analysis.c: Likewise.
33999         * ipa-inline.h (estimate_edge_time, estimate_edge_hints): Likewise.
34000         * ipa-polymorphic-call.c
34001         (ipa_polymorphic_call_context::restrict_to_inner_class): Likewise.
34002         * loop-unroll.c (analyze_insn_to_expand_var): Likewise.
34003         * lra.c (lra_optional_reload_pseudos, lra_subreg_reload_pseudos):
34004         Likewise.
34005         * modulo-sched.c (apply_reg_moves): Likewise.
34006         * omp-expand.c (build_omp_regions_1): Likewise.
34007         * trans-mem.c (struct tm_wrapper_hasher): Likewise.
34008         * tree-ssa-loop-ivopts.c (may_eliminate_iv): Likewise.
34009         * tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Likewise.
34010         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
34011         * value-prof.c: Likewise.
34012         * var-tracking.c (val_reset): Likewise.
34013
34014 2017-04-03  Richard Biener  <rguenther@suse.de>
34015
34016         PR tree-optimization/80275
34017         * fold-const.c (split_address_to_core_and_offset): Handle
34018         POINTER_PLUS_EXPR.
34019
34020 2017-04-03  Eric Botcazou  <ebotcazou@adacore.com>
34021
34022         * tree-nested.c (get_descriptor_type): Make sure that the alignment of
34023         descriptors is at least equal to that of functions.
34024
34025 2017-04-02  Uros Bizjak  <ubizjak@gmail.com>
34026
34027         * config/i386/sse.md (movdi_to_sse): Add missing DONE.
34028
34029 2017-04-02  Uros Bizjak  <ubizjak@gmail.com>
34030
34031         PR target/80250
34032         * config/i386/sse.md (mov<IMOD4:mode>): Remove insn pattern.
34033         (mov<IMOD4:mode>): New expander.
34034         (*mov<IMOD4:mode>_internal): New insn and split pattern.
34035
34036 2017-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
34037
34038         PR rtl-optimization/79405
34039         * fwprop.c (propagations_left): New variable.
34040         (forward_propagate_into): Decrement it.
34041         (fwprop_init): Initialize it.
34042         (fw_prop): If the variable has reached zero, stop propagating.
34043         (fwprop_addr): Ditto.
34044
34045 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
34046
34047         PR debug/79255
34048         * dwarf2out.c (decls_for_scope): If BLOCK_NONLOCALIZED_VAR is
34049         a FUNCTION_DECL, pass it as decl instead of origin to
34050         process_scope_var.
34051
34052 2017-03-31  Alexander Monakov  <amonakov@ispras.ru>
34053
34054         * config/nvptx/nvptx.c (nvptx_output_softstack_switch): Correct format
34055         string.
34056
34057 2017-03-31  Pat Haugen  <pthaugen@us.ibm.com>
34058
34059         PR target/80107
34060         * config/rs6000/rs6000.md (extendhi<mode>2): Add test for
34061         TARGET_VSX_SMALL_INTEGER.
34062
34063 2017-03-31  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
34064
34065         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
34066         reference to the OpenPOWER 64-Bit ELF V2 ABI Specification.
34067
34068 2017-03-31  Matthew Fortune  <matthew.fortune@imgtec.com>
34069
34070         * config/mips/mips-msa.md (msa_vec_extract_<msafmt_f>): Update
34071         extraction from odd-numbered MSA register.
34072
34073 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
34074
34075         PR middle-end/80173
34076         * expmed.c (store_bit_field_1): Don't attempt to create
34077         a word subreg out of hard registers wider than word if they
34078         have HARD_REGNO_NREGS of 1 for their mode.
34079
34080         PR middle-end/80163
34081         * varasm.c (initializer_constant_valid_p_1): Disallow sign-extending
34082         conversions to integer types wider than word and pointer.
34083
34084         PR debug/80025
34085         * cselib.h (rtx_equal_for_cselib_1): Add depth argument.
34086         (rtx_equal_for_cselib_p): Pass 0 to it.
34087         * cselib.c (cselib_hasher::equal): Likewise.
34088         (rtx_equal_for_cselib_1): Add depth argument.  If depth
34089         is 128, don't look up VALUE locs and punt.  Increment
34090         depth in recursive calls when walking VALUE locs.
34091
34092 2017-03-31  Bernd Edlinger  <bernd.edlinger@hotmail.de>
34093
34094         * gcov.c (md5sum_to_hex): Fix output of MD5 hex bytes.
34095         (make_gcov_file_name): Use the canonical path name for generating
34096         the MD5 value.
34097         (read_line): Fix handling of files with ascii null bytes.
34098
34099 2017-03-30  Matthew Fortune  <matthew.fortune@imgtec.com>
34100
34101         * config/mips/mips.c (mips_expand_vector_init): Create a const_vector
34102         to initialise a vector register instead
34103         of using a const_int.
34104
34105 2017-03-30  Jakub Jelinek  <jakub@redhat.com>
34106
34107         PR translation/80189
34108         * gimplify.c (omp_default_clause): Use %qs instead of %s in
34109         diagnostic messages.
34110
34111 2017-03-30  Peter Bergner  <bergner@vnet.ibm.com>
34112
34113         PR target/80246
34114         * config/rs6000/dfp.md (dfp_dxex_<mode>): Update mode of operand 0.
34115         (dfp_diex_<mode>): Update mode of operand 1.
34116         * doc/extend.texi (dxex, dxexq): Document change to return type.
34117         (diex, diexq): Document change to argument type.
34118
34119 2017-03-30  Martin Jambor  <mjambor@suse.cz>
34120
34121         PR ipa/77333
34122         * cgraph.h (cgraph_build_function_type_skip_args): Declare.
34123         * cgraph.c (redirect_call_stmt_to_callee): Set gimple fntype so that
34124         it reflects the signature changes performed at the callee side.
34125         * cgraphclones.c (build_function_type_skip_args): Make public, renamed
34126         to cgraph_build_function_type_skip_args.
34127         (build_function_decl_skip_args): Adjust call to the above function.
34128
34129 2017-03-30  Jakub Jelinek  <jakub@redhat.com>
34130
34131         PR target/80206
34132         * config/i386/sse.md
34133         (<extract_type>_vextract<shuffletype><extract_suf>_mask): Use
34134         register as dest whenever it is a MEM not rtx_equal_p to the
34135         corresponding dup operand, and when forcing into reg move the
34136         reg into the memory afterwards.
34137         (<extract_type_2>_vextract<shuffletype><extract_suf_2>_mask):
34138         Likewise.  Use <ssehalfvecmode> instead of <ssequartermode>
34139         for the force_reg mode.
34140         (avx512vl_vextractf128<mode>): Use register as dest either
34141         always when a MEM, or when it is a MEM not rtx_equal_p to the
34142         corresponding dup operand, or even not when it is a CONST_VECTOR
34143         depending on the mode and lo vs. hi.
34144         (avx512dq_vextract<shuffletype>64x2_1_maskm): Remove extraneous
34145         parens.
34146         (avx512f_vextract<shuffletype>32x4_1_maskm): Likewise.
34147         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name>):
34148         Likewise.  Require that operands[2] is even.
34149         (<mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name>):
34150         Remove extraneous parens.  Require that operands[2] is a multiple
34151         of 4.
34152         (vec_extract_lo_<mode><mask_name>): Don't bother testing if
34153         operands[0] is a MEM if <mask_applied>, the predicates/constraints
34154         disallow memory then.
34155
34156 2017-03-30  Richard Biener  <rguenther@suse.de>
34157
34158         PR tree-optimization/77498
34159         * tree-ssa-pre.c (phi_translate_1): Do not allow simplifications
34160         to non-constants over backedges.
34161
34162 2017-03-29  Segher Boessenkool  <segher@kernel.crashing.org>
34163
34164         PR rtl-optimization/80233
34165         * combine.c (combine_instructions): Only take NONDEBUG_INSN_P insns
34166         as last_combined_insn.  Do not test for BARRIER_P separately.
34167
34168 2017-03-29  Andreas Schwab  <schwab@suse.de>
34169
34170         PR ada/80146
34171         * calls.c (prepare_call_address): Convert funexp to Pmode before
34172         copying to temp reg.
34173
34174 2017-03-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
34175
34176         PR tree-optimization/80158
34177         * gimple-ssa-strength-reduction.c (replace_mult_candidate):
34178         Handle possible future case of more than one alternate
34179         interpretation.
34180         (replace_rhs_if_not_dup): Likewise.
34181         (replace_one_candidate): Likewise.
34182
34183 2017-03-28  Vladimir Makarov  <vmakarov@redhat.com>
34184
34185         PR rtl-optimization/80193
34186         * ira.c (ira): Do not check allocation for LRA.
34187
34188 2017-03-28  Alexander Monakov  <amonakov@ispras.ru>
34189
34190         * config/nvptx/nvptx-protos.h (nvptx_output_simt_enter): Declare.
34191         (nvptx_output_simt_exit): Declare.
34192         * config/nvptx/nvptx.c (nvptx_init_unisimt_predicate): Use
34193         cfun->machine->unisimt_location.  Handle NULL unisimt_predicate.
34194         (init_softstack_frame): Move initialization of crtl->is_leaf to...
34195         (nvptx_declare_function_name): ...here.  Emit declaration of local
34196         memory space buffer for omp_simt_enter insn.
34197         (nvptx_output_unisimt_switch): New.
34198         (nvptx_output_softstack_switch): New.
34199         (nvptx_output_simt_enter): New.
34200         (nvptx_output_simt_exit): New.
34201         * config/nvptx/nvptx.h (struct machine_function): New fields
34202         has_simtreg, unisimt_location, simt_stack_size, simt_stack_align.
34203         * config/nvptx/nvptx.md (UNSPECV_SIMT_ENTER): New unspec.
34204         (UNSPECV_SIMT_EXIT): Ditto.
34205         (omp_simt_enter_insn): New insn.
34206         (omp_simt_enter): New expansion.
34207         (omp_simt_exit): New insn.
34208         * config/nvptx/nvptx.opt (msoft-stack-reserve-local): New option.
34209
34210         * internal-fn.c (expand_GOMP_SIMT_ENTER): New.
34211         (expand_GOMP_SIMT_ENTER_ALLOC): New.
34212         (expand_GOMP_SIMT_EXIT): New.
34213         * internal-fn.def (GOMP_SIMT_ENTER): New internal function.
34214         (GOMP_SIMT_ENTER_ALLOC): Ditto.
34215         (GOMP_SIMT_EXIT): Ditto.
34216         * target-insns.def (omp_simt_enter): New insn.
34217         (omp_simt_exit): Ditto.
34218         * omp-low.c (struct omplow_simd_context): New fields simt_eargs,
34219         simt_dlist.
34220         (lower_rec_simd_input_clauses): Implement SIMT privatization.
34221         (lower_rec_input_clauses): Likewise.
34222         (lower_lastprivate_clauses): Handle SIMT privatization.
34223
34224         * omp-offload.c: Include langhooks.h, tree-nested.h, stor-layout.h.
34225         (ompdevlow_adjust_simt_enter): New.
34226         (find_simtpriv_var_op): New.
34227         (execute_omp_device_lower): Handle IFN_GOMP_SIMT_ENTER,
34228         IFN_GOMP_SIMT_ENTER_ALLOC, IFN_GOMP_SIMT_EXIT.
34229
34230         * tree-inline.h (struct copy_body_data): New field dst_simt_vars.
34231         * tree-inline.c (expand_call_inline): Handle SIMT privatization.
34232         (copy_decl_for_dup_finish): Ditto.
34233
34234         * tree-ssa.c (execute_update_addresses_taken): Handle GOMP_SIMT_ENTER.
34235
34236 2017-03-28  Uros Bizjak  <ubizjak@gmail.com>
34237
34238         PR target/53383
34239         * config/i386/i386.c (ix86_option_override_internal): Always
34240         allow -mpreferred-stack-boundary=3 for 64-bit targets.
34241
34242 2017-03-28  Bin Cheng  <bin.cheng@arm.com>
34243
34244         * tree-vect-loop.c (optimize_mask_stores): Add bb to the right loop.
34245
34246 2017-03-28  Bin Cheng  <bin.cheng@arm.com>
34247
34248         * tree-vect-loop-manip.c (slpeel_add_loop_guard): New param and
34249         mark new edge's irreducible flag accordign to it.
34250         (vect_do_peeling): Check loop preheader edge's irreducible flag
34251         and pass it to function slpeel_add_loop_guard.
34252
34253 2017-03-28  Richard Sandiford  <richard.sandiford@arm.com>
34254
34255         PR tree-optimization/80218
34256         * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
34257         Update block frequencies and counts.
34258
34259 2017-03-28  Richard Biener  <rguenther@suse.de>
34260
34261         PR tree-optimization/78644
34262         * tree-ssa-ccp.c (evaluate_stmt): When we may not use the value
34263         of a simplification result we may not use it at all.
34264
34265 2017-03-28  Richard Biener  <rguenther@suse.de>
34266
34267         PR ipa/80205
34268         * tree-inline.c (copy_phis_for_bb): Do not create PHI node
34269         without arguments, generate default definition of a SSA name.
34270
34271 2017-03-28  Richard Biener  <rguenther@suse.de>
34272
34273         PR middle-end/80222
34274         * gimple-fold.c (gimple_fold_indirect_ref): Do not touch
34275         TYPE_REF_CAN_ALIAS_ALL references.
34276         * fold-const.c (fold_indirect_ref_1): Likewise.
34277
34278 2017-03-28  Martin Liska  <mliska@suse.cz>
34279
34280         PR ipa/80104
34281         * cgraphunit.c (cgraph_node::expand_thunk): Mark argument of a
34282         thunk call as DECL_GIMPLE_REG_P when vector or complex type.
34283
34284 2017-03-28  Claudiu Zissulescu  <claziss@synopsys.com>
34285             Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
34286
34287         * config/arc/arc.h (CPP_SPEC): Add subtarget_cpp_spec.
34288         (EXTRA_SPECS): Define.
34289         (SUBTARGET_EXTRA_SPECS): Likewise.
34290         (SUBTARGET_CPP_SPEC): Likewise.
34291         * config/arc/elf.h (EXTRA_SPECS): Renamed to
34292         SUBTARGET_EXTRA_SPECS.
34293         * config/arc/linux.h (SUBTARGET_CPP_SPEC): Define.
34294
34295 2017-03-28  Claudiu Zissulescu  <claziss@synopsys.com>
34296
34297         * config/arc/simdext.md (vst64_insn): Update pattern.
34298         (vld32wh_insn): Likewise.
34299         (vld32wl_insn): Likewise.
34300         (vld64_insn): Likewise.
34301         (vld32_insn): Likewise.
34302
34303 2017-03-28  Marek Polacek  <polacek@redhat.com>
34304
34305         PR sanitizer/80067
34306         * fold-const.c (fold_comparison): Use protected_set_expr_location
34307         instead of SET_EXPR_LOCATION.
34308
34309 2017-03-28  Markus Trippelsdorf  <markus@trippelsdorf.de>
34310
34311         * tree.c (add_expr): Avoid name lookup warning.
34312
34313 2017-03-27  Jeff Law  <law@redhat.com>
34314
34315         PR tree-optimization/80216
34316         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Fix typo in
34317         function name.  Limit recursion depth.
34318         (record_temporary_equivalences): Corresponding changes.
34319
34320 2017-03-27  Jonathan Wakely  <jwakely@redhat.com>
34321
34322         * doc/invoke.texi (-Wno-narrowing): Reorder so default behavior is
34323         covered first.
34324
34325 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
34326
34327         PR target/80102
34328         * reg-notes.def (REG_CFA_NOTE): Define.  Use it for CFA related
34329         notes.
34330         * cfgcleanup.c (reg_note_cfa_p): New array.
34331         (insns_have_identical_cfa_notes): New function.
34332         (old_insns_match_p): Don't cross-jump in between /f
34333         and non-/f instructions.  If both i1 and i2 are frame related,
34334         verify all CFA notes, their order and content.
34335
34336 2017-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
34337
34338         PR target/78543
34339         * config/rs6000/rs6000.md (bswaphi2_extenddi): Combine bswap
34340         HImode and SImode with zero extend to DImode to one insn.
34341         (bswap<mode>2_extenddi): Likewise.
34342         (bswapsi2_extenddi): Likewise.
34343         (bswaphi2_extendsi): Likewise.
34344         (bswaphi2): Combine bswap HImode and SImode into one insn.
34345         Separate memory insns from swapping register.
34346         (bswapsi2): Likewise.
34347         (bswap<mode>2): Likewise.
34348         (bswaphi2_internal): Delete, no longer used.
34349         (bswapsi2_internal): Likewise.
34350         (bswap<mode>2_load): Split bswap HImode/SImode into separate load,
34351         store, and gpr<-gpr swap insns.
34352         (bswap<mode>2_store): Likewise.
34353         (bswaphi2_reg): Register only splitter, combine with the splitter.
34354         (bswaphi2 splitter): Likewise.
34355         (bswapsi2_reg): Likewise.
34356         (bswapsi2 splitter): Likewise.
34357         (bswapdi2): If we have the LDBRX and STDBRX instructions, split
34358         the insns into load, store, and register/register insns.
34359         (bswapdi2_ldbrx): Likewise.
34360         (bswapdi2_load): Likewise.
34361         (bswapdi2_store): Likewise.
34362         (bswapdi2_reg): Likewise.
34363
34364 2017-03-27  Gunther Nikl  <gnikl@users.sourceforge.net>
34365
34366         * system.h (HAVE_DESIGNATED_INITIALIZERS): Fix non C++ case.
34367         (HAVE_DESIGNATED_UNION_INITIALIZERS): Likewise.
34368
34369 2017-03-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
34370
34371         PR target/80103
34372         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Edit and
34373         add comments.
34374         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
34375         special handling for target option conflicts between dform
34376         options (-mpower9-dform, -mpower9-dform-vector,
34377         -mpower9-dform-scalar) and -mno-direct-move.
34378
34379 2017-03-27  Richard Biener  <rguenther@suse.de>
34380
34381         PR tree-optimization/80181
34382         * tree-ssa-ccp.c (likely_value): UNDEFINED ^ X is UNDEFINED.
34383
34384 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
34385
34386         * config/arc/predicates.md (move_double_src_operand): Replace the
34387         call to move_double_src_operand with a call to address_operand.
34388
34389 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
34390
34391         * config/arc/elf.h (ARGET_ARC_TP_REGNO_DEFAULT): Define.
34392         * config/arc/linux.h (ARGET_ARC_TP_REGNO_DEFAULT): Likewise.
34393         * config/arc/arc.opt (mtp-regno): Use ARGET_ARC_TP_REGNO_DEFAULT.
34394
34395 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
34396
34397         * config/arc/predicates.md (long_immediate_loadstore_operand):
34398         Consider scaled addresses cases.
34399
34400 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
34401
34402         * config/arc/arc.c (arc_epilogue_uses): BLINK should be also
34403         restored when in interrupt.
34404         * config/arc/arc.md (simple_return): ARCv2 rtie instruction
34405         doesn't have delay slot.
34406
34407 2017-03-27  Richard Biener  <rguenther@suse.de>
34408
34409         PR ipa/79776
34410         * tree-ssa-structalias.c (associate_varinfo_to_alias): Skip
34411         inlined thunk clones.
34412
34413 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
34414
34415         PR sanitizer/80168
34416         * asan.c (instrument_derefs): Copy over last operand from
34417         original COMPONENT_REF to the new COMPONENT_REF with
34418         DECL_BIT_FIELD_REPRESENTATIVE.
34419         * ubsan.c (instrument_object_size): Likewise.
34420
34421 2017-03-27  Richard Biener  <rguenther@suse.de>
34422
34423         PR tree-optimization/80170
34424         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Make
34425         sure DR/SCEV didnt fold in constants we do not see when looking
34426         at the reference base alignment.
34427
34428 2017-03-27  Richard Biener  <rguenther@suse.de>
34429
34430         PR middle-end/80171
34431         * gimple-fold.c (fold_ctor_reference): Properly guard against
34432         NULL return value from canonicalize_constructor_val.
34433
34434 2017-03-25  Uros Bizjak  <ubizjak@gmail.com>
34435
34436         PR target/80180
34437         * config/i386/i386.c (ix86_expand_builtin)
34438         <IX86_BUILTIN_RDSEED{16,32,64}_STEP>: Do not expand arg0 between
34439         flags reg setting and flags reg using instructions.
34440         <IX86_BUILTIN_RDRAND{16,32,64}_STEP>: Ditto.  Use non-flags reg
34441         clobbering instructions to zero extend op2.
34442
34443 2017-03-25  Gerald Pfeifer  <gerald@pfeifer.com>
34444
34445         * doc/install.texi (Configuration) <--with-aix-soname>:
34446         Update link to AIX ld.
34447
34448 2017-03-25  Bernd Schmidt  <bschmidt@redhat.com>
34449
34450         PR rtl-optimization/80160
34451         PR rtl-optimization/80159
34452         * lra-assigns.c (must_not_spill_p): Tighten new test to also take
34453         reg_alternate_class into account.
34454
34455 2017-03-24  Vladimir Makarov  <vmakarov@redhat.com>
34456
34457         PR target/80148
34458         * lra-assigns.c (assign_by_spills): Add spilled non-reload pseudos
34459         to consider in curr_insn_transform.
34460
34461 2017-03-24  Jakub Jelinek  <jakub@redhat.com>
34462
34463         * genrecog.c (validate_pattern): Add VEC_SELECT validation.
34464         * genmodes.c (emit_min_insn_modes_c): Call emit_mode_nunits
34465         and emit_mode_inner.
34466
34467 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34468
34469         * config/s390/s390-builtins.def: Add VXE builtins.  Add a flags
34470         argument to the overloaded builtin variants.  Use the new flag to
34471         deprecate certain builtin variants.
34472         * config/s390/s390-builtin-types.def: Add new builtin types.
34473         * config/s390/s390-builtins.h: Support new flags field for
34474         overloaded builtins.
34475         * config/s390/s390-c.c (OB_DEF_VAR): New flags field.
34476         (s390_macro_to_expand): Enable vector float data type.
34477         (s390_cpu_cpp_builtins_internal): Indicate support of the new
34478         builtins by incrementing the __VEC__ version number.
34479         (s390_expand_overloaded_builtin): Support expansion of vec_xl and
34480         vec_xst.
34481         (s390_resolve_overloaded_builtin): Emit error messages depending
34482         on the builtin flags.
34483         * config/s390/s390.c (s390_expand_builtin): Support additional
34484         flags argument.  Change error message to match the messages
34485         emitted in s390-c.c.
34486         * config/s390/s390.md: New UNSPEC_* constants.
34487         (op_type): Add new instruction types.
34488         * config/s390/vecintrin.h: Add new builtins and test data class
34489         constants.
34490         * config/s390/vx-builtins.md (V_HW_32_64): Add V4SF.
34491         (V_HW_4, VEC_HW, VECF_HW): New mode iterators.
34492         (VEC_INEXACT, VEC_NOINEXACT): New constants.
34493         ("vec_splats<mode>", "vec_insert<mode>", "vec_promote<mode>")
34494         ("vec_insert_and_zero<mode>", "vec_mergeh<mode>")
34495         ("vec_mergel<mode>"): V_HW -> VEC_HW.
34496
34497         ("vlrlrv16qi", "vstrlrv16qi", "vbpermv16qi", "vec_msumv2di")
34498         ("vmslg", "*vftci<mode>_cconly", "vftci<mode>_intcconly")
34499         ("*vftci<mode>", "vftci<mode>_intcc", "vec_double_s64")
34500         ("vec_double_u64", "vfmin<mode>", "vfmax<mode>"): New definition.
34501
34502         ("and_av2df3", "and_cv2df3", "vec_andc_av2df3")
34503         ("vec_andc_cv2df3", "xor_av2df3", "xor_cv2df3", "vec_nor_av2df3")
34504         ("vec_nor_cv2df3", "ior_av2df3", "ior_cv2df3", "vec_nabs")
34505         ("*vftcidb", "*vftcidb_cconly", "vftcidb"): Remove definition.
34506
34507         ("vec_all_<fpcmpcc:code>v2df", "vec_any_<fpcmpcc:code>v2df")
34508         ("vec_scatter_elementv4si_DI", "vec_cmp<fpcmp:code>v2df")
34509         ("vec_di_to_df_s64", "vec_di_to_df_u64", "vec_df_to_di_u64")
34510         ("vfidb", "*vldeb", "*vledb", "*vec_cmp<insn_cmp>v2df_cconly")
34511         ("vec_cmpeqv2df_cc", "vec_cmpeqv2df_cc", "vec_cmphv2df_cc")
34512         ("vec_cmphev2df_cc", "*vec_cmpeqv2df_cc")
34513         ("*vec_cmphv2df_cc", "*vec_cmphev2df_cc"): Enable new modes as ...
34514
34515         ("vec_all_<fpcmpcc:code><mode>", "vec_any_<fpcmpcc:code><mode>")
34516         ("vec_scatter_element<V_HW_4:mode>_DI")
34517         ("vec_cmp<fpcmp:code><mode>", "vcdgb", "vcdlgb", "vclgdb")
34518         ("vec_fpint<mode>", "vflls")
34519         ("vflrd", "*vec_cmp<insn_cmp><mode>_cconly", "vec_cmpeq<mode>_cc")
34520         ("vec_cmpeq<mode>_cc", "vec_cmph<mode>_cc", "vec_cmphe<mode>_cc")
34521         ("*vec_cmpeq<mode>_cc", "*vec_cmph<mode>_cc")
34522         ("*vec_cmphe<mode>_cc"): ... these.
34523
34524         ("vec_ctd_s64", "vec_ctsl", "vec_ctul", "vec_st2f"): Use rounding
34525         mode constant instead of magic value.
34526
34527 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34528
34529         * config/s390/s390.c (s390_expand_vec_compare): Support other
34530         vector floating point modes than just V2DF.
34531         (s390_expand_vcond): Likewise.
34532         (s390_hard_regno_mode_ok): Allow SFmode values in VRs.
34533         (s390_cannot_change_mode_class): Prevent mode changes between TF
34534         and V1TF in vector registers.
34535         * config/s390/s390.md (DF, SF): New mode attributes.
34536         ("*cmp<mode>_ccs", "add<mode>3", "sub<mode>3", "mul<mode>3")
34537         ("fma<mode>4", "fms<mode>4", "div<mode>3", "*neg<mode>2"): Add
34538         SFmode support for VRs.
34539         * config/s390/vector.md (V_HW, V_HW2, VT_HW, ti*, nonvec): Add new
34540         vector fp modes.
34541         (VFT, VF_HW): New mode iterators.
34542         (vw, sdx): New mode attributes.
34543         ("addv2df3", "subv2df3", "mulv2df3", "divv2df3", "sqrtv2df2")
34544         ("fmav2df4","fmsv2df4", "negv2df2", "absv2df2", "*negabsv2df2")
34545         ("smaxv2df3", "sminv2df3", "*vec_cmp<VFCMP_HW_OP:code>v2df_nocc")
34546         ("vec_cmpuneqv2df", "vec_cmpltgtv2df", "vec_orderedv2df")
34547         ("vec_unorderedv2df"): Adjust the v2df only patterns to support
34548         also the new vector floating point modes.  Renaming to ...
34549
34550         ("add<mode>3", "sub<mode>3", "mul<mode>3", "div<mode>3")
34551         ("sqrt<mode>2", "fma<mode>4", "fms<mode>4", "neg<mode>2")
34552         ("abs<mode>2", "negabs<mode>2", "smax<mode>3")
34553         ("smin<mode>3", "*vec_cmp<VFCMP_HW_OP:code><mode>_nocc")
34554         ("vec_cmpuneq<mode>", "vec_cmpltgt<mode>", "vec_ordered<mode>")
34555         ("vec_unordered<mode>"): ... these.
34556
34557         ("neg_fma<mode>4", "neg_fms<mode>4", "*smax<mode>3_vxe")
34558         ("*smin<mode>3_vxe", "*sminv2df3_vx", "*vec_extendv4sf")
34559         ("*vec_extendv2df"): New insn definitions.
34560
34561 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34562
34563         * config/s390/s390.md ("*adddi3_sign", "*subdi3_sign", "mulditi3")
34564         ("mulditi3_2", "*muldi3_sign"): New patterns.
34565         ("muldi3", "*muldi3", "mulsi3", "*mulsi3"): Add an expander and
34566         rename the pattern definition.
34567
34568 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34569
34570         * config/s390/s390.md ("indirect_jump"): Turn insn definition into
34571         expander.
34572         ("*indirect_jump", "*indirect2_jump"): New pattern definitions.
34573
34574 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34575
34576         * config/s390/s390.c (s390_expand_vec_init): Use vllezl
34577         instruction if possible.
34578         * config/s390/vector.md (vec_halfnumelts): New mode
34579         attribute.
34580         ("*vec_vllezlf<mode>"): New pattern.
34581
34582 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34583
34584         * config/s390/vector.md ("popcountv16qi2", "popcountv8hi2")
34585         ("popcountv4si2", "popcountv2di2"): Rename to ...
34586         ("popcount<mode>2", "popcountv8hi2_vx", "popcountv4si2_vx")
34587         ("popcountv2di2_vx"): ... these and add !TARGET_VXE to the
34588         condition.
34589         ("popcount<mode>2_vxe"): New pattern.
34590
34591 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34592
34593         * common/config/s390/s390-common.c (processor_flags_table): Add
34594         arch12.
34595         * config.gcc: Add arch12.
34596         * config/s390/driver-native.c (s390_host_detect_local_cpu):
34597         Default to arch12 for unknown CPU model numbers.
34598         * config/s390/s390-builtins.def: Add B_VXE builtin flag.
34599         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Adjust
34600         PROCESSOR_max sanity check.
34601         * config/s390/s390-opts.h (enum processor_type): Add
34602         PROCESSOR_ARCH12.
34603         * config/s390/s390.c (processor_table): Add arch12.
34604         (s390_expand_builtin): Add check for B_VXE flag.
34605         (s390_issue_rate): Add PROCESSOR_ARCH12.
34606         (s390_get_sched_attrmask): Likewise.
34607         (s390_get_unit_mask): Likewise.
34608         (s390_sched_score): Enable z13 scheduling for arch12.
34609         (s390_sched_reorder): Likewise.
34610         (s390_sched_variable_issue): Likewise.
34611         * config/s390/s390.h (enum processor_flags): Add PF_ARCH12 and
34612         PF_VXE.
34613         (s390_tune_attr): Use z13 scheduling also for arch12.
34614         (TARGET_CPU_ARCH12, TARGET_CPU_ARCH12_P, TARGET_CPU_VXE)
34615         (TARGET_CPU_VXE_P, TARGET_ARCH12, TARGET_ARCH12_P, TARGET_VXE)
34616         (TARGET_VXE_P): New macros.
34617         * config/s390/s390.md: Add arch12 to cpu attribute.  Add arch12
34618         and vxe to cpu_facility.  Add arch12 and vxe to enabled attribute.
34619         * config/s390/s390.opt: Add arch12 as processor_type.
34620
34621 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34622
34623         * config/s390/s390.md
34624         ("fixuns_truncdddi2", "fixuns_trunctddi2")
34625         ("fixuns_trunc<BFP:mode><GPR:mode>2"): Merge into ...
34626         ("fixuns_trunc<FP:mode><GPR:mode>2"): New expander.
34627
34628         ("fixuns_trunc<BFP:mode><GPR:mode>2", "fixuns_trunc<mode>si2"):
34629         Rename expanders to ...
34630
34631         ("fixuns_trunc<BFP:mode><GPR:mode>2_emu")
34632         ("fixuns_truncdddi2_emu"): ... these.
34633
34634         ("fixuns_trunc<mode>si2_emu"): New expander.
34635
34636         ("*fixuns_truncdfdi2_z13"): Rename to ...
34637         ("*fixuns_truncdfdi2_vx"): ... this.
34638
34639 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34640
34641         * config/s390/2964.md: Remove the single element vector compare
34642         instructions which are no longer used.
34643         * config/s390/s390.c (s390_select_ccmode): Remove handling of
34644         vector CCmodes.
34645         (s390_canonicalize_comparison): Remove handling of DFmode
34646         compares.
34647         (s390_expand_vec_compare_scalar): Remove function.
34648         (s390_emit_compare): Don't call s390_expand_vec_compare_scalar.
34649         * config/s390/s390.md ("*vec_cmp<insn_cmp>df_cconly"): Remove
34650         pattern.
34651         ("*cmp<mode>_ccs"): Add wfcdb instruction.
34652
34653 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34654
34655         * config/s390/s390.md ("mov<mode>_64dfp" DD_DF): Use vleig for loading a
34656         FP zero.
34657         ("*mov<mode>_64" DD_DF): Remove the vector instructions. These
34658         will anyway by matched by mov<mode>_64dfp.
34659
34660 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34661
34662         * config/s390/s390.md ("mov<mode>" SD_SF): Change vleg/vsteg to
34663         vlef/vstef.  Add missing operand to vleif.
34664
34665 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34666
34667         * config/s390/s390.c (s390_expand_vec_init): Enable vector load
34668         pair for all vector types with 64 bit elements.
34669         * config/s390/vx-builtins.md (V_HW_64): Move mode iterator to ...
34670         * config/s390/vector.md (V_HW_64): ... here.
34671         (V_128_NOSINGLE): New mode iterator.
34672         ("vec_init<V_HW:mode>"): Use V_128 as mode iterator.
34673         ("*vec_splat<mode>"): Use V_128_NOSINGLE mode iterator.
34674         ("*vec_tf_to_v1tf", "*vec_ti_to_v1ti"): New pattern definitions.
34675         ("*vec_load_pairv2di"): Change to ...
34676         ("*vec_load_pair<mode>"): ... this one.
34677
34678 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34679
34680         * config/s390/constraints.md: Add comments.
34681         (jKK): Reject element sizes > 8 bytes.
34682         * config/s390/s390.c (s390_split_ok_p): Enable splitting also for
34683         s_operands.
34684         * config/s390/s390.md: Add the s_operand checks formerly in
34685         s390_split_ok_p to various splitters where they are still
34686         required.
34687         * config/s390/vector.md ("mov<mode>" V_128): Add GPR alternatives
34688         for 128 bit vectors.  Plus two splitters.
34689
34690 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34691
34692         * config/s390/s390.md: Rename the cpu facilty vec to vx throughout
34693         the file.
34694
34695 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34696
34697         PR target/79893
34698         * config/s390/s390-c.c (s390_adjust_builtin_arglist): Issue an
34699         error if the boundary argument is not constant.
34700
34701 2017-03-24  Jakub Jelinek  <jakub@redhat.com>
34702
34703         PR rtl-optimization/80112
34704         * loop-doloop.c (doloop_condition_get): Don't check condition
34705         if cmp isn't SET with IF_THEN_ELSE src.
34706
34707 2017-03-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
34708
34709         PR tree-optimization/80158
34710         * gimple-ssa-strength-reduction.c (replace_mult_candidate): When
34711         replacing a candidate statement, also replace it for the
34712         candidate's alternate interpretation.
34713         (replace_rhs_if_not_dup): Likewise.
34714         (replace_one_candidate): Likewise.
34715
34716 2017-03-24  Richard Biener  <rguenther@suse.de>
34717
34718         PR tree-optimization/80167
34719         * graphite-isl-ast-to-gimple.c
34720         (translate_isl_ast_to_gimple::is_valid_rename): Handle default-defs
34721         properly.
34722         (translate_isl_ast_to_gimple::get_rename): Likewise.
34723
34724 2017-03-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>
34725
34726         * config/rs6000/rs6000.c (rs6000_option_override_internal): Change
34727         handling of certain combinations of target options, including the
34728         combinations -mpower8-vector vs. -mno-vsx, -mpower9-vector vs.
34729         -mno-power8-vector, and -mpower9_dform vs. -mno-power9-vector.
34730
34731 2017-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
34732
34733         PR target/71436
34734         * config/arm/arm.md (*load_multiple): Add reload_completed to
34735         matching condition.
34736
34737 2017-03-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
34738             Richard Biener  <rguenth@suse.de>
34739
34740         PR tree-optimization/79908
34741         PR tree-optimization/80136
34742         * tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
34743         been cast away, gimplify_and_add suffices.
34744
34745 2017-03-23  Markus Trippelsdorf  <markus@trippelsdorf.de>
34746
34747         * tree-vrp.c (identify_jump_threads): Delete avail_exprs.
34748
34749 2017-03-23  Richard Biener  <rguenther@suse.de>
34750
34751         PR tree-optimization/80032
34752         * gimplify.c (gimple_push_cleanup): Forced unconditional
34753         cleanups still have to go to the conditional_cleanups
34754         sequence.
34755
34756 2017-03-22  Jakub Jelinek  <jakub@redhat.com>
34757
34758         PR tree-optimization/80072
34759         * tree-ssa-reassoc.c (struct operand_entry): Change id field type
34760         to unsigned int.
34761         (next_operand_entry_id): Change type to unsigned int.
34762         (sort_by_operand_rank): Make sure to return the right return value
34763         even if unsigned fields are bigger than INT_MAX.
34764         (struct oecount): Change cnt and id type to unsigned int.
34765         (oecount_hasher::equal): Formatting fix.
34766         (oecount_cmp): Make sure to return the right return value
34767         even if unsigned fields are bigger than INT_MAX.
34768         (undistribute_ops_list): Change next_oecount_id type to unsigned int.
34769
34770         PR c++/80129
34771         * gimplify.c (gimplify_modify_expr_rhs) <case COND_EXPR>: Clear
34772         TREE_READONLY on result if writing it more than once.
34773
34774         PR sanitizer/80110
34775         * doc/invoke.texi (-fsanitize=thread): Document that with
34776         -fnon-call-exceptions atomics are not able to throw
34777         exceptions.
34778
34779         PR sanitizer/80110
34780         * tsan.c: Include tree-eh.h.
34781         (instrument_builtin_call): Call maybe_clean_eh_stmt or
34782         maybe_clean_or_replace_eh_stmt where needed.
34783         (instrument_memory_accesses): Add cfg_changed argument.
34784         Call gimple_purge_dead_eh_edges on each block and set *cfg_changed
34785         if it returned true.
34786         (tsan_pass): Adjust caller.  Return TODO_cleanup_cfg if cfg_changed.
34787
34788         PR rtl-optimization/63191
34789         * config/i386/i386.c (ix86_delegitimize_address): Turn into small
34790         wrapper function, moved the whole old content into ...
34791         (ix86_delegitimize_address_1): ... this.  New inline function.
34792         (ix86_find_base_term): Use ix86_delegitimize_address_1 with
34793         true as last argument instead of ix86_delegitimize_address.
34794
34795 2017-03-22  Wilco Dijkstra  <wdijkstr@arm.com>
34796
34797         * config/aarch64/aarch64.c (generic_branch_cost): Copy
34798         cortexa57_branch_cost.
34799
34800 2017-03-22  Wilco Dijkstra  <wdijkstr@arm.com>
34801
34802         * config/aarch64/aarch64.c (generic_tunings): Add AES fusion.
34803
34804 2017-03-21  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
34805
34806         PR target/80123
34807         * doc/md.texi (Constraints): Document wA constraint.
34808         * config/rs6000/constraints.md (wA): New.
34809         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Add wA reg_class.
34810         (rs6000_init_hard_regno_mode_ok): Init wA constraint.
34811         * config/rs6000/rs6000.h (RS6000_CONSTRAINT_wA): New.
34812         * config/rs6000/vsx.md (vsx_splat_<mode>): Use wA constraint.
34813
34814 2017-03-22  Cesar Philippidis  <cesar@codesourcery.com>
34815
34816         PR c++/80029
34817         * gimplify.c (is_oacc_declared): New function.
34818         (oacc_default_clause): Use it to set default flags for acc declared
34819         variables inside parallel regions.
34820         (gimplify_scan_omp_clauses): Strip firstprivate pointers for acc
34821         declared variables.
34822         (gimplify_oacc_declare): Gimplify the declare clauses.  Add the
34823         declare attribute to any decl as necessary.
34824
34825 2017-03-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
34826
34827         PR target/80082
34828         * config/arm/arm-isa.h (isa_bit_lpae): New feature bit.
34829         (ISA_ARMv7ve): Add isa_bit_lpae to the definition.
34830         * config/arm/arm-protos.h (arm_arch7ve): Rename into ...
34831         (arm_arch_lpae): This.
34832         * config/arm/arm.c (arm_arch7ve): Rename into ...
34833         (arm_arch_lpae): This.  Define it in term of isa_bit_lpae.
34834         * config/arm/arm.h (TARGET_HAVE_LPAE): Redefine in term of
34835         arm_arch_lpae.
34836
34837 2017-03-22  Martin Liska  <mliska@suse.cz>
34838
34839         PR target/79906
34840         * config/rs6000/rs6000.c (rs6000_inner_target_options): Show
34841         error message instead of an ICE.
34842
34843 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
34844
34845         * doc/extend.texi (6.11 Additional Floating Types): Revise.
34846
34847 2017-03-21  Kelvin Nilsen  <kelvin@gcc.gnu.org>
34848
34849         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Add
34850         comments.
34851         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
34852         comments.
34853
34854 2017-03-21  Martin Sebor  <msebor@redhat.com>
34855
34856         * doc/extend.texi: Use "cannot" instead of "can't."
34857         * doc/hostconfig.texi: Same.
34858         * doc/install.texi: Same.
34859         * doc/invoke.texi: Same.
34860         * doc/loop.texi: Same.
34861         * doc/md.texi: Same.
34862         * doc/objc.texi: Same.
34863         * doc/rtl.texi: Same.
34864         * doc/tm.texi: Same.
34865         * doc/tm.texi.in: Same.
34866         * doc/trouble.texi: Same.
34867
34868 2017-03-21  Alexandre Oliva  <aoliva@redhat.com>
34869
34870         PR debug/63238
34871         * dwarf2out.c (struct checksum_attributes): Add at_alignment.
34872         (collect_checksum_attributes): Set it.
34873         (die_checksum_ordered): Use it.
34874
34875 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
34876
34877         PR tree-optimization/79908
34878         * tree-stdarg.c (expand_ifn_va_arg_1): Revert the following
34879         change: For a VA_ARG whose LHS has been cast away, use
34880         force_gimple_operand to construct the side effects.
34881
34882 2017-03-21  David Malcolm  <dmalcolm@redhat.com>
34883
34884         PR translation/80001
34885         * omp-offload.c (oacc_loop_fixed_partitions): Make diagnostics
34886         more amenable to translation.
34887         (oacc_loop_auto_partitions): Likewise.
34888
34889 2017-03-21  Marek Polacek  <polacek@redhat.com>
34890             Martin Sebor  <msebor@redhat.com>
34891
34892         PR tree-optimization/80109
34893         * gimple-ssa-warn-alloca.c (alloca_call_type): Only call get_range_info
34894         on INTEGRAL_TYPE_P.
34895
34896 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
34897             Segher Boessenkool  <segher@kernel.crashing.org>
34898
34899         PR target/80125
34900         * combine.c (can_combine_p): Revert the 2017-03-20 change, only
34901         check reg_used_between_p between insn and one of succ or succ2
34902         depending on if succ is artificial insn not inserted into insn
34903         stream.
34904
34905 2017-03-21  Martin Liska  <mliska@suse.cz>
34906
34907         PR gcov-profile/80081
34908         * Makefile.in: Add gcov-dump and fix installation of gcov-tool.
34909         * doc/gcc.texi: Include gcov-dump stuff.
34910         * doc/gcov-dump.texi: New file.
34911
34912 2017-03-21  Toma Tabacu  <toma.tabacu@imgtec.com>
34913
34914         PR rtl-optimization/79150
34915         * config/mips/mips.c (mips_block_move_loop): Emit a NOP after the
34916         conditional jump, if the jump is the last insn of the loop.
34917
34918 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
34919             Richard Biener  <rguenth@suse.de>
34920
34921         PR tree-optimization/79908
34922         * tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
34923         been cast away, use force_gimple_operand to construct the side
34924         effects.
34925
34926 2017-03-21  Martin Liska  <mliska@suse.cz>
34927
34928         PR libfortran/79956
34929         * simplify-rtx.c (simplify_immed_subreg): Initialize a variable
34930         to NULL.
34931
34932 2017-03-21  Brad Spengler <spender@grsecurity.net>
34933
34934         PR plugins/80094
34935         * plugin.c (htab_hash_plugin): New function.
34936         (add_new_plugin): Use it and adjust.
34937         (parse_plugin_arg_opt): Adjust.
34938         (init_one_plugin): Likewise.
34939
34940 2017-03-21  Richard Biener  <rguenther@suse.de>
34941
34942         PR tree-optimization/80032
34943         * gimplify.c (gimple_push_cleanup): Add force_uncond parameter,
34944         if set force the cleanup to happen unconditionally.
34945         (gimplify_target_expr): Push inserted clobbers with force_uncond
34946         to avoid them being removed by control-dependent DCE.
34947
34948 2017-03-21  Richard Biener  <rguenther@suse.de>
34949
34950         PR tree-optimization/80122
34951         * tree-inline.c (copy_bb): Do not expans va-arg packs or
34952         va_arg_pack_len when the inlined call stmt requires pack
34953         expansion itself.
34954         * tree-inline.h (struct copy_body_data): Make call_stmt a gcall *.
34955
34956 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
34957
34958         PR sanitizer/78158
34959         * tsan.c (instrument_builtin_call): If the memory model argument
34960         is not a constant, assume it is valid.
34961
34962         PR c/67338
34963         * fold-const.c (round_up_loc): Negate divisor in unsigned type to
34964         avoid UB.
34965
34966 2017-03-20  Segher Boessenkool  <segher@kernel.crashing.org>
34967
34968         PR rtl-optimization/79910
34969         * combine.c (can_combine_p): Do not allow combining an I0 or I1
34970         if its dest is used by an insn before I2 (other than the combined
34971         insns themselves, which are properly handled already).
34972
34973 2017-03-20  Segher Boessenkool  <segher@kernel.crashing.org>
34974
34975         Revert:
34976         2017-03-17  Bernd Schmidt  <bschmidt@redhat.com>
34977
34978         * combine.c (record_used_regs): New static function.
34979         (try_combine): Handle situations where there is an additional
34980         instruction between I2 and I3 which needs to have a LOG_LINK
34981         updated.
34982
34983         Revert:
34984         2017-03-17  Jim Wilson  <jim.wilson@linaro.org>
34985
34986         * combine.c (try_combine): Delete redundant i1 test.  Call
34987         prev_nonnote_nondebug_insn instead of prev_nonnote_insn.
34988
34989 2017-03-20  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
34990
34991         PR target/80083
34992         * config/rs6000/rs6000.md (*movsi_internal1): Fix constraints for
34993         alternatives 13/14.
34994
34995 2017-03-20  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
34996
34997         PR tree-optimization/80054
34998         * gimple-ssa-strength-reduction.c (all_phi_incrs_profitable): Fail
34999         the optimization if a PHI or any of its arguments is not dominated
35000         by the candidate's basis.  Use gphi* rather than gimple* as
35001         appropriate.
35002         (replace_profitable_candidates): Clean up a gimple* variable that
35003         should be a gphi* variable.
35004
35005 2017-03-20  Martin Sebor  <msebor@redhat.com>
35006
35007         PR c++/52477
35008         * doc/extend.texi (attribute constructor): Document present limitation.
35009
35010 2017-03-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
35011
35012         PR target/79963
35013         * config/rs6000/altivec.h (vec_all_ne): Under __cplusplus__ and
35014         __POWER9_VECTOR__ #ifdef control, change template definition to
35015         use Power9-specific built-in function.
35016         (vec_any_eq): Likewise.
35017         * config/rs6000/vector.md (vector_ae_v2di_p): Change the flag used
35018         to control outcomes from this test.
35019         (vector_ae_<mode>p): For VEC_F modes, likewise.
35020
35021 2017-03-20  Ian Lance Taylor  <iant@google.com>
35022
35023         * config/i386/i386.c (ix86_function_regparm): Save an extra
35024         register for -fsplit-stack with DECL_STATIC_CHAIN.
35025
35026 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com>
35027
35028         PR target/79912
35029         * config/riscv/riscv.c (riscv_preferred_reload_class): Remove.
35030         (TARGET_PREFERRED_RELOAD_CLASS): Likewise.
35031
35032 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com>
35033
35034         * config/riscv/riscv.c (riscv_print_operand): Use "fence
35035         iorw,ow".
35036         * config/riscv/sync.mc (mem_thread_fence_1): Use "fence
35037         iorw,iorw".
35038
35039 2017-03-20  Marek Polacek  <polacek@redhat.com>
35040
35041         PR sanitizer/80063
35042         * asan.c (DEF_SANITIZER_BUILTIN): Use do { } while (0).
35043
35044 2017-03-20  Richard Biener  <rguenther@suse.de>
35045
35046         PR tree-optimization/80113
35047         * graphite-isl-ast-to-gimple.c (copy_loop_phi_nodes): Do not
35048         allocate extra SSA name for PHI def.
35049         (add_close_phis_to_outer_loops): Likewise.
35050         (add_close_phis_to_merge_points): Likewise.
35051         (copy_loop_close_phi_args): Likewise.
35052         (copy_cond_phi_nodes): Likewise.
35053
35054 2017-03-20  Martin Liska  <mliska@suse.cz>
35055
35056         PR middle-end/79753
35057         * tree-chkp.c (chkp_build_returned_bound): Do not build
35058         returned bounds for a LHS that's not a BOUNDED_P type.
35059
35060 2017-03-20  Martin Liska  <mliska@suse.cz>
35061
35062         PR target/79769
35063         PR target/79770
35064         * tree-chkp.c (chkp_find_bounds_1): Handle REAL_CST,
35065         COMPLEX_CST and VECTOR_CST.
35066
35067 2017-03-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
35068
35069         PR target/78857
35070         * config/s390/s390.md ("cmp<mode>_ccs_0"): Add a clobber of the
35071         target operand.  A new splitter adds the clobber statement in case
35072         the target operand is dead anyway.
35073
35074 2017-03-19  Gerald Pfeifer  <gerald@pfeifer.com>
35075
35076         * doc/install.texi (Specific) <sparc-*-linux*>: No longer refer
35077         to age-old versions of binutils and glibc.
35078
35079 2017-03-18  Segher Boessenkool  <segher@kernel.crashing.org>
35080
35081         * doc/contrib.texi (Contributors): Remove duplicate entry for myself.
35082
35083 2017-03-18  Gerald Pfeifer  <gerald@pfeifer.com>
35084
35085         * doc/contrib.texi (Contributors): Add Segher Boessenkool.
35086
35087 2017-03-18  Gerald Pfeifer  <gerald@pfeifer.com>
35088
35089         * doc/install.texi (Specific) <arm-*-eabi>: Remove old
35090         requirement for binutils 2.13.
35091
35092 2017-03-17  Jim Wilson  <jim.wilson@linaro.org>
35093
35094         * combine.c (try_combine): Delete redundant i1 test.  Call
35095         prev_nonnote_nondebug_insn instead of prev_nonnote_insn.
35096
35097 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com
35098
35099         * doc/install.texi (Specific) <riscv32-*-elf>: Add riscv32-*-elf,
35100         riscv32-*-linux, riscv64-*-elf, riscv64-*-linux to the table of
35101         contents.
35102         <riscv64-*-elf>: Re-arrange section
35103         <riscv32-*-elf>: Add a note about requiring binutils 2.28.
35104         <riscv32-*-linux>: Likewise.
35105         <riscv64-*-elf>: Likewise
35106         <riscv64-*-linux>: Likewise.
35107
35108 2017-03-17  Richard Earnshaw  <rearnsha@arm.com>
35109
35110         PR target/80052
35111         * aarch64.opt(verbose-cost-dump): Fix typo.
35112
35113 2017-03-17  Pat Haugen  <pthaugen@us.ibm.com>
35114
35115         PR target/79951
35116         * config/rs6000/rs6000.md (copysign<mode>3_fcpsgn): Test
35117         for VECTOR_UNIT_VSX_P (<MODE>mode) too.
35118
35119 2017-03-17  Bernd Schmidt  <bschmidt@redhat.com>
35120
35121         * reload.c (find_reloads): When reloading a nonoffsettable address,
35122         use RELOAD_OTHER for it and its address reloads.
35123
35124         PR rtl-optimization/79910
35125         * combine.c (record_used_regs): New static function.
35126         (try_combine): Handle situations where there is an additional
35127         instruction between I2 and I3 which needs to have a LOG_LINK
35128         updated.
35129
35130 2017-03-17  Jeff Law  <law@redhat.com>
35131
35132         PR tree-optimization/71437
35133         * tree-vrp.c (simplify_stmt_for_jump_threading): Lookup the
35134         conditional in the hash table first.
35135         (vrp_dom_walker::before_dom_children): Extract condition from
35136         ASSERT_EXPR.  Record condition, its inverion and any implied
35137         conditions as well.
35138
35139 2017-03-17  Marek Polacek  <polacek@redhat.com>
35140             Markus Trippelsdorf  <markus@trippelsdorf.de>
35141
35142         PR tree-optimization/80079
35143         * gimple-ssa-store-merging.c (class pass_store_merging): Initialize
35144         m_stores_head.
35145
35146 2017-03-17  Richard Biener  <rguenther@suse.de>
35147
35148         PR middle-end/80075
35149         * tree-eh.c (stmt_could_throw_1_p): Only handle gimple assigns.
35150         Properly verify the LHS before the RHS possibly claims to be
35151         handled.
35152         (stmt_could_throw_p): Hande gimple conds fully here.  Clobbers
35153         do not throw.
35154
35155 2017-03-17  Martin Jambor  <mjambor@suse.cz>
35156
35157         * doc/invoke.texi (Option Options): Include -fipa-vrp in the list.
35158         (List of -O2 options): Likewise.
35159         (-fipa-bit-cp): Replace "ipa" with "interprocedural."
35160         (-fipa-vrp) New.
35161
35162 2017-03-17  Tom de Vries  <tom@codesourcery.com>
35163
35164         * gcov-dump.c (print_usage): Print bug_report_url.
35165
35166 2017-03-17  Richard Biener  <rguenther@suse.de>
35167
35168         PR middle-end/80050
35169         * genmatch.c (parser::next): Remove pointless check for CPP_EOF.
35170         (parser::peek): Likewise.
35171
35172 2017-03-17  Richard Biener  <rguenther@suse.de>
35173
35174         PR tree-optimization/80048
35175         * sese.c (free_sese_info): Properly release rename_map and
35176         copied_bb_map elements.
35177
35178 2017-03-16  Alexandre Oliva  <aoliva@redhat.com>
35179
35180         * gimple-ssa-store-merging.c (struct imm_store_chain_info):
35181         Add linked-list forward and backlinks.  Insert on
35182         construction, remove on destruction.
35183         (class pass_store_merging): Add m_stores_head field.
35184         (pass_store_merging::terminate_and_process_all_chains):
35185         Iterate over m_stores_head list.
35186         (pass_store_merging::terminate_all_aliasing_chains):
35187         Likewise.
35188         (pass_store_merging::execute): Check for debug stmts first.
35189         Push new chains onto the m_stores_head stack.
35190
35191 2017-03-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
35192
35193         PR target/71294
35194         * config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Allow a
35195         SPLAT operation on ISA 2.07 64-bit systems that have direct move,
35196         but no MTVSRDD support, by doing MTVSRD and XXPERMDI.
35197
35198 2017-03-16  Jeff Law  <law@redhat.com>
35199
35200         PR tree-optimization/71437
35201         * tree-ssa-dom.c (dom_opt_dom_walker): Remove thread_across_edge
35202         member function.  Implementation moved into after_dom_children
35203         member function and into the threader's thread_outgoing_edges
35204         function.
35205         (dom_opt_dom_walker::after_dom_children): Simplify by moving
35206         some code into new thread_outgoing_edges.
35207         * tree-ssa-threadedge.c (thread_across_edge): Make static and simplify
35208         definition.  Simplify marker handling (do it here).   Assume we always
35209         have the available expression and the const/copies tables.
35210         (thread_outgoing_edges): New function extracted from tree-ssa-dom.c
35211         and tree-vrp.c
35212         * tree-ssa-threadedge.h (thread_outgoing_edges): Declare.
35213         * tree-vrp.c (equiv_stack): No longer file scoped.
35214         (vrp_dom_walker): New class.
35215         (vrp_dom_walker::before_dom_children): New member function.
35216         (vrp_dom_walker::after_dom_children): Likewise.
35217         (identify_jump_threads):  Setup domwalker.  Use it rather than
35218         walking edges in a random order by hand.  Simplify setup/finalization.
35219         (finalize_jump_threads): Remove.
35220         (vrp_finalize): Do not call identify_jump_threads here.
35221         (execute_vrp): Do it here instead and call thread_through_all_blocks
35222         here too.
35223
35224         PR tree-optimization/71437
35225         * tree-ssa-dom.c (pfn_simplify): Add basic_block argument.  All
35226         callers changed.
35227         (simplify_stmt_for_jump_threading): Add basic_block argument.  All
35228         callers changed.
35229         (lhs_of_dominating_assert): Moved from here into tree-vrp.c.
35230         (dom_opt_dom_walker::thread_across_edge): Remove
35231         handle_dominating_asserts argument.  All callers changed.
35232         (record_temporary_equivalences_from_stmts_at_dest): Corresponding
35233         changes.  Remove calls to lhs_of_dominating_assert.  Other
35234         uses of handle_dominating_asserts turn into unconditional code
35235         (simplify_control_stmt_condition_1): Likewise.
35236         (simplify_control_stmt_condition): Likewise.
35237         (thread_through_normal_block, thread_across_edge): Likewise.
35238         * tree-ssa-threadedge.h (thread_across_edge): Corresponding changes.
35239         * tree-vrp.c (lhs_of_dominating_assert): Move here.  Return original
35240         object if it is not an SSA_NAME.
35241         (simplify_stmt_for_jump_threading): Call lhs_of_dominating_assert
35242         before calling into the VRP specific simplifiers.
35243         (identify_jump_threads): Remove handle_dominating_asserts
35244         argument.
35245
35246 2017-03-16  Jakub Jelinek  <jakub@redhat.com>
35247
35248         PR fortran/79886
35249         * tree-diagnostic.c (default_tree_printer): No longer static.
35250         * tree-diagnostic.h (default_tree_printer): New prototype.
35251
35252 2017-03-16  Tamar Christina  <tamar.christina@arm.com>
35253
35254         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>)
35255         Change ins into fmov.
35256
35257 2017-03-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
35258
35259         * config/aarch64/iterators.md (h_con): Return "x" for V4HF and V8HF.
35260         * config/aarch64/aarch64-simd.md (*aarch64_fma4_elt_from_dup<mode>):
35261         Use h_con constraint for operand 1.
35262         (*aarch64_fnma4_elt_from_dup<mode>): Likewise.
35263         (*aarch64_mulx_elt_from_dup<mode>): Likewise for operand 2.
35264
35265 2017-03-15  Jeff Law  <law@redhat.com>
35266
35267         PR tree-optimization/71437
35268         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): New function.
35269         (record_temporary_equivalences): Use it.
35270
35271         PR tree-optimization/71437
35272         * tree-ssa-dom.c (struct cond_equivalence): Moved from here into
35273         tree-ssa-scopedtables.
35274         (lookup_avail_expr, build_and_record_new_cond): Likewise.
35275         (record_conditions, record_cond, vuse_eq): Likewise.
35276         (record_edge_info): Adjust to API tweak of record_conditions.
35277         (simplify_stmt_for_jump_threading): Similarly for lookup_avail_expr.
35278         (record_temporary_equivalences, optimize_stmt): Likewise.
35279         (eliminate_redundant_computations): Likewise.
35280         (record_equivalences_from_stmt): Likewise.
35281         * tree-ssa-scopedtables.c: Include options.h and params.h.
35282         (vuse_eq): New function, moved from tree-ssa-dom.c
35283         (build_and_record_new_cond): Likewise.
35284         (record_conditions): Likewise.  Accept vector of conditions rather
35285         than edge_equivalence structure for first argument.
35286         for the first argument.
35287         (avail_exprs_stack::lookup_avail_expr): New member function, moved
35288         from tree-ssa-dom.c.
35289         (avail_exprs_stack::record_cond): Likewise.
35290         * tree-ssa-scopedtables.h (struct cond_equivalence): Moved here
35291         from tree-ssa-dom.c.
35292         (avail_exprs_stack): Add new member functions lookup_avail_expr
35293         and record_cond.
35294         (record_conditions): Declare.
35295
35296 2017-03-15  Vladimir Makarov  <vmakarov@redhat.com>
35297
35298         PR target/80017
35299         * lra-constraints.c (process_alt_operands): Increase reject for
35300         reloading an input/output operand.
35301
35302 2017-03-15  Michael Meissner  <meissner@linux.vnet.ibm.com>
35303
35304         PR target/79038
35305         * config/rs6000/rs6000.md (float<QHI:mode><IEEE128:mode>2): Define
35306         insns to convert from signed/unsigned char/short to IEEE 128-bit
35307         floating point.
35308         (floatuns<QHI:mode><IEEE128:mode>2): Likewise.
35309
35310 2017-03-15  Uros Bizjak  <ubizjak@gmail.com>
35311
35312         PR target/80019
35313         * config/i386/i386.c (ix86_vector_duplicate_value): Create
35314         subreg of inner mode for values already in registers.
35315
35316 2017-03-15  Bernd Schmidt  <bschmidt@redhat.com>
35317
35318         * config/c6x/c6x.c (hwloop_optimize): Handle case where the old
35319         iteration reg is used after the loop.
35320
35321 2017-03-14  Martin Sebor  <msebor@redhat.com>
35322
35323         PR tree-optimization/79800
35324         * gimple-ssa-sprintf.c (format_floating: Add argument.  Handle
35325         precision in negative-positive range.
35326         (format_floating): Call non-const overload with adjusted precision.
35327
35328 2017-03-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
35329
35330         PR target/79947
35331         * config/rs6000/rs6000.h (TARGET_FRSQRTES): Add check for
35332         -mpowerpc-gfxopt.
35333
35334 2017-03-14  Martin Sebor  <msebor@redhat.com>
35335
35336         PR middle-end/80020
35337         * builtin-attrs.def (ATTR_ALLOC_SIZE_2_NOTHROW_LIST): New macro.
35338         * builtins.def (aligned_alloc): Use it.
35339
35340         PR c/79936
35341         * Makefile.in (GTFILES): Add calls.c.
35342         * calls.c: Include "gt-calls.h".
35343
35344 2017-03-14  Bernd Schmidt  <bschmidt@redhat.com>
35345
35346         PR rtl-optimization/79728
35347         * regs.h (struct target_regs): New field
35348         x_contains_allocatable_regs_of_mode.
35349         (contains_allocatable_regs_of_mode): New macro.
35350         * reginfo.c (init_reg_sets_1): Initialize it, and change
35351         contains_reg_of_mode so it includes global regs as well.
35352         * reload.c (push_reload): Use contains_allocatable_regs_of_mode
35353         rather than contains_regs_of_mode.
35354
35355 2017-03-14  Martin Liska  <mliska@suse.cz>
35356
35357         * doc/invoke.texi: Document options that can't be combined with
35358         -fcheck-pointer-bounds.
35359
35360 2017-03-14  Martin Liska  <mliska@suse.cz>
35361
35362         PR middle-end/79831
35363         * doc/invoke.texi (-Wchkp): Document the option.
35364
35365 2017-03-14  Martin Liska  <mliska@suse.cz>
35366
35367         * Makefile.in: Install gcov-dump.
35368
35369 2017-03-14  Martin Liska  <mliska@suse.cz>
35370
35371         * multiple_target.c (expand_target_clones): Bail out for
35372         an invalid attribute.
35373
35374 2017-03-14  Richard Biener  <rguenther@suse.de>
35375
35376         * alias.c (struct alias_set_entry): Pack properly.
35377         * cfgloop.h (struct loop): Likewise.
35378         * cse.c (struct set): Likewise.
35379         * ipa-utils.c (struct searchc_env): Likewise.
35380         * loop-invariant.c (struct invariant): Likewise.
35381         * lra-remat.c (struct cand): Likewise.
35382         * recog.c (struct change_t): Likewise.
35383         * rtl.h (struct address_info): Likewise.
35384         * symbol-summary.h (function_summary): Likewise.
35385         * tree-loop-distribution.c (struct partition): Likewise.
35386         * tree-object-size.c (struct object_size_info): Likewise.
35387         * tree-ssa-loop-ivopts.c (struct cost_pair): Likewise.
35388         * tree-ssa-threadupdate.c (struct ssa_local_info_t): Likewise.
35389         * tree-vect-data-refs.c (struct _vect_peel_info): Likewise.
35390         * tree-vect-slp.c (struct _slp_oprnd_info): Likewise.
35391         * tree-vect-stmts.c (struct simd_call_arg_info): Likewise.
35392         * tree-vectorizer.h (struct _loop_vec_info): Likewise.
35393         (struct _stmt_vec_info): Likewise.
35394
35395 2017-03-14  Martin Liska  <mliska@suse.cz>
35396
35397         PR target/79892
35398         * multiple_target.c (create_dispatcher_calls): Check that
35399         a target can create a function dispatcher.
35400
35401 2017-03-14  Martin Liska  <mliska@suse.cz>
35402
35403         PR lto/66295
35404         * multiple_target.c (expand_target_clones): Drop local.local
35405         flag for default implementation.
35406
35407 2017-03-14  Richard Biener  <rguenther@suse.de>
35408
35409         PR tree-optimization/80030
35410         * tree-vect-stmts.c (vectorizable_store): Plug memleak.
35411
35412 2017-03-13  Kito Cheng  <kito.cheng@gmail.com>
35413
35414         * config/riscv/riscv.c (riscv_emit_float_compare>: Use
35415         gcc_fallthrough() instead of __attribute__((fallthrough));
35416
35417 2017-03-13  Gerald Pfeifer  <gerald@pfeifer.com>
35418
35419         * doc/gcc.texi: Remove "up" link to (DIR).
35420         * doc/gccint.texi: Ditto.
35421
35422 2017-03-13  Gerald Pfeifer  <gerald@pfeifer.com>
35423
35424         * doc/install.texi (Specific) <avr>: Remove reference to
35425         binutils 2.13.
35426
35427 2017-03-13  Jeff Law  <law@redhat.com>
35428
35429         * config/riscv/riscv.c (riscv_emit_float_compare): Use fallthru
35430         attribute rather than comments.
35431
35432         * config/pdp11/pdp11.md (movmemhi): Adjust operand numbers to
35433         match_scratch operand is highest.
35434
35435 2017-03-13  Martin Liska  <mliska@suse.cz>
35436
35437         PR middle-end/78339
35438         * ipa-pure-const.c (warn_function_noreturn): If the declarations
35439         is a CHKP clone, use original declaration.
35440
35441 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
35442
35443         * config/arc/arc.c (arc_init): Use multiplier whenever we have it.
35444         (arc_conditional_register_usage): Use a different allocation order
35445         when optimizing for size.
35446         * common/config/arc/arc-common.c (arc_option_optimization_table):
35447         Section anchors default on when optimizing for size.
35448
35449 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
35450
35451         * config/arc/arc.md (*tst_bitfield_tst): Fix pattern.
35452
35453 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
35454
35455         * config/arc/arc.c (arc_output_addsi): Emit code density adds.
35456         * config/arc/arc.md (cpu_facility): Add cd variant.
35457         (*movqi_insn): Add code density variant.
35458         (*movhi_insn): Likewise.
35459         (*movqi_insn): Likewise.
35460         (*addsi3_mixed): Likewise.
35461         (subsi3_insn): Likewise.
35462
35463 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
35464
35465         * config/arc/arc.md (movsi_cond_exec): Update constraint.
35466
35467 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
35468
35469         * config/arc/arc.c (arc_legitimize_pic_address): Handle PIC
35470         expressions with MINUS and UNARY ops.
35471
35472 2017-03-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
35473
35474         PR target/79911
35475         * config/arm/neon.md (vec_sel_widen_ssum_lo<VQI:mode><VW:mode>3):
35476         Rename to...
35477         (vec_sel_widen_ssum_lo<mode><V_half>3): ... This. Avoid mismatch
35478         between vec_select and vector argument.
35479         (vec_sel_widen_ssum_hi<VQI:mode><VW:mode>3): Rename to...
35480         (vec_sel_widen_ssum_hi<mode><V_half>3): ... This. Likewise.
35481         (vec_sel_widen_usum_lo<VQI:mode><VW:mode>3): Rename to...
35482         (vec_sel_widen_usum_lo<mode><V_half>3): ... This.
35483         (vec_sel_widen_usum_hi<VQI:mode><VW:mode>3): Rename to...
35484         (vec_sel_widen_usum_hi<mode><V_half>3): ... This.
35485
35486 2017-03-13  Richard Biener  <rguenther@suse.de>
35487
35488         PR other/79991
35489         * params.def (vect-max-peeling-for-alignment): Fix typo.
35490
35491 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
35492
35493         * doc/install.texi (Specific) <mips-*-*>: Remove description of
35494         issue that only occurred with binutils below 2.18.
35495
35496 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
35497
35498         * doc/install.texi (Specific) <cris-axis-elf>: No longer
35499         refer to binutils 2.11/2.12 minimum.
35500
35501 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
35502
35503         * doc/install.texi (Specific) <powerpc-*-*>: Remove link to
35504         ftp.kernel.org and simplify binutils requirement.
35505
35506 2017-03-11  Gerald Pfeifer  <gerald@pfeifer.com>
35507
35508         * doc/invoke.texi (Warning Options): Fix spelling of link-time
35509         optimization.
35510         (Optimize Options): Ditto.  Also remove redundancy.
35511
35512 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
35513
35514         PR translation/79848
35515         * ipa-devirt.c (warn_types_mismatch): Simplify uses of "%<%s%>" to
35516         "%qs".
35517         * ipa-pure-const.c (suggest_attribute): Likewise.  Convert _
35518         to G_ to avoid double translation.
35519
35520 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
35521
35522         PR translation/79923
35523         * auto-profile.c (get_combined_location): Convert leading
35524         character of diagnostics to lower case and remove trailing period.
35525         (read_profile): Likewise for various diagnostics.
35526         * config/arm/arm.c (arm_option_override): Remove trailing period
35527         from various diagnostics.
35528         * config/msp430/msp430.c (msp430_expand_delay_cycles): Likewise.
35529         (msp430_expand_delay_cycles): Likewise.
35530
35531 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
35532
35533         PR target/79925
35534         * config/aarch64/aarch64.c (aarch64_validate_mcpu): Quote the
35535         full command-line argument, rather than just "str".
35536         (aarch64_validate_march): Likewise.
35537         (aarch64_validate_mtune): Likewise.
35538
35539 2017-03-10  Bernd Schmidt  <bschmidt@redhat.com>
35540
35541         PR rtl-optimization/78911
35542         * lra-assigns.c (must_not_spill_p): New function.
35543         (spill_for): Use it.
35544
35545 2017-03-10  Jakub Jelinek  <jakub@redhat.com>
35546
35547         PR tree-optimization/79981
35548         * tree-vrp.c (extract_range_basic): Handle IMAGPART_EXPR of
35549         ATOMIC_COMPARE_EXCHANGE ifn result.
35550         (stmt_interesting_for_vrp, vrp_visit_stmt): Handle
35551         IFN_ATOMIC_COMPARE_EXCHANGE.
35552
35553 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
35554
35555         PR driver/79875
35556         * opts.c (parse_sanitizer_options): Add missing question mark to
35557         "did you mean" message.
35558
35559 2017-03-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
35560
35561         * config/rs6000/rs6000-builtin.def (VMULEUB_UNS): Remove orphaned
35562         built-in.
35563         (VMULEUH_UNS): Likewise.
35564         (VMULOUB_UNS): Likewise.
35565         (VMULOUH_UNS): Likewise.
35566         * config/rs6000/rs6000.c (builtin_function_type): Remove
35567         references to ALTIVEC_BUILTIN_VMUL[EO]U[BH]_UNS.
35568
35569 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
35570
35571         PR bootstrap/79952
35572         * read-rtl-function.c (function_reader::read_rtx_operand): Update
35573         x with result of extra_parsing_for_operand_code_0.
35574         (function_reader::extra_parsing_for_operand_code_0): Convert
35575         return type from void to rtx, returning x.  When reading
35576         SYMBOL_REF with SYMBOL_FLAG_HAS_BLOCK_INFO, reallocate x to the
35577         larger size containing struct block_symbol.
35578
35579 2017-03-10  Segher Boessenkool  <segher@kernel.crashing.org>
35580
35581         * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
35582         -mfloat128-hardware without -m64.
35583
35584 2017-03-10  Will Schmidt <will_schmidt@vnet.ibm.com>
35585
35586         PR target/79941
35587         * config/rs6000/rs6000.c (builtin_function_type): Add VMUL*U[HB]
35588         entries to the case statement that marks unsigned arguments to
35589         overloaded functions.
35590
35591 2017-03-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
35592
35593         * config/rs6000/rs6000.c (rs6000_option_override_internal): Fix
35594         two typographic errors in the handling of TARGET_UPPER_REGS_DI.
35595
35596 2017-03-10  Pat Haugen  <pthaugen@us.ibm.com>
35597
35598         PR target/79907
35599         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Test
35600         TARGET_UPPER_REGS_DI when setting 'wi' constraint regclass.
35601
35602 2017-03-10  Martin Liska  <mliska@suse.cz>
35603
35604         PR target/65705
35605         PR target/69804
35606         * toplev.c (process_options): Enable MPX with LSAN and UBSAN.
35607         * tree-chkp.c (chkp_walk_pointer_assignments): Verify that
35608         FIELD != NULL.
35609
35610 2017-03-10  Olivier Hainque  <hainque@adacore.com>
35611
35612         * tree-switch-conversion (array_value_type): Start by resetting
35613         candidate type to it's main variant.
35614
35615 2017-03-10  Jakub Jelinek  <jakub@redhat.com>
35616
35617         PR rtl-optimization/79909
35618         * combine.c (try_combine): Use simplify_replace_rtx on individual
35619         CALL_INSN_FUNCTION_USAGE elements instead of replace_rtx on copy_rtx
35620         of the whole CALL_INSN_FUNCTION_USAGE.
35621
35622         PR tree-optimization/79972
35623         * gimple-ssa-warn-alloca.c (alloca_call_type): Only call
35624         get_range_info on SSA_NAMEs.  Formatting fixes.
35625
35626 2017-03-10  Richard Biener  <rguenther@suse.de>
35627             Jakub Jelinek  <jakub@redhat.com>
35628
35629         PR tree-optimization/77975
35630         * tree-ssa-loop-niter.c (get_base_for): Allow phi argument from latch
35631         edge to be constant.
35632         (get_val_for): For constant x return it.  Formatting fix.
35633         (loop_niter_by_eval): Avoid pointless looping if the next iteration
35634         would use the same bases as the current one.
35635
35636 2017-03-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
35637
35638         * config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Use rotate
35639         instead of vec_select for V1TImode.
35640         * conifg/rs6000/vsx.md (VSX_LE): Remove mode iterator that is no
35641         longer needed.
35642         (VSX_LE_128): Add V1TI to this mode iterator.
35643         (*vsx_le_perm_load_<mode>): Change to use VSX_D mode iterator.
35644         (*vsx_le_perm_store_<mode>): Likewise.
35645         (pre-reload splitter for VSX stores): Likewise.
35646         (post-reload splitter for VSX stores): Likewise.
35647         (*vsx_xxpermdi2_le_<mode>): Likewise.
35648         (*vsx_lxvd2x2_le_<mode>): Likewise.
35649         (*vsx_stxvd2x2_le_<mode>): Likewise.
35650
35651 2017-03-09  Michael Eager  <eager@eagercon.com>
35652
35653         Correct failures with --enable-checking=yes,rtl.
35654
35655         * config/microblaze/microblaze.c (microblaze_expand_shift):
35656         Replace GET_CODE test with CONST_INT_P and INTVAL test with
35657         test for const0_rtx.
35658         * config/microblaze/microblaze.md (ashlsi3_byone, ashrsi3_byone,
35659         lshrsi3_byone): Replace INTVAL with test for const1_rtx.
35660
35661 2017-03-09  Richard Biener  <rguenther@suse.de>
35662
35663         PR tree-optimization/79977
35664         * graphite-scop-detection.c (scop_detection::merge_sese):
35665         Handle the case of extra exits to blocks dominating the entry.
35666
35667 2017-03-09  Toma Tabacu  <toma.tabacu@imgtec.com>
35668
35669         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
35670         Document rdynamic.
35671
35672 2017-03-09  Vladimir Makarov  <vmakarov@redhat.com>
35673
35674         PR rtl-optimization/79949
35675         * lra-constraints.c (process_alt_operands): Check memory when
35676         trying to predict a cycle.  Print about the overall increase.
35677
35678 2017-03-09  Richard Biener  <rguenther@suse.de>
35679
35680         PR middle-end/79971
35681         * gimple-expr.c (useless_type_conversion_p): Preserve
35682         TYPE_SATURATING for fixed-point types.
35683
35684 2017-03-09  Richard Biener  <rguenther@suse.de>
35685
35686         PR ipa/79970
35687         * ipa-prop.c (ipa_modify_formal_parameters): Avoid changing
35688         alignment of BLKmode params.
35689
35690 2017-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
35691
35692         PR target/79913
35693         * config/aarch64/iterators.md (VALL_F16_NO_V2Q): New mode iterator.
35694         (VALL_NO_V2Q): Likewise.
35695         (VDQF_DF): Delete.
35696         * config/aarch64/aarch64-simd.md
35697         (aarch64_dup_lane_<vswap_width_name><mode>): Use VALL_F16_NO_V2Q
35698         iterator.
35699         (*aarch64_simd_vec_copy_lane_<vswap_width_name><mode>): Use
35700         VALL_NO_V2Q mode iterator.
35701         (*aarch64_vgetfmulx<mode>): Use VDQF iterator.
35702
35703 2017-03-09  Martin Liska  <mliska@suse.cz>
35704
35705         PR tree-optimization/79631
35706         * tree-chkp-opt.c (chkp_is_constant_addr): Call
35707         tree_int_cst_sign_bit just for INTEGER constants.
35708
35709 2017-03-09  Martin Liska  <mliska@suse.cz>
35710
35711         PR target/65705
35712         PR target/69804
35713         * toplev.c (process_options): Disable -fcheck-pointer-bounds with
35714         sanitizers.
35715
35716 2017-03-09  Marek Polacek  <polacek@redhat.com>
35717
35718         PR c++/79672
35719         * tree.c (inchash::add_expr): Handle TREE_VEC.
35720
35721 2017-03-09  Martin Liska  <mliska@suse.cz>
35722
35723         PR ipa/79764
35724         (chkp_narrow_size_and_offset): New function.
35725         (chkp_parse_array_and_component_ref): Support BIT_FIELD_REF.
35726         (void chkp_parse_bit_field_ref): New function.
35727         (chkp_make_addressed_object_bounds): Add case for BIT_FIELD_REF.
35728         (chkp_process_stmt): Use chkp_parse_bit_field_ref.
35729
35730 2017-03-09  Martin Liska  <mliska@suse.cz>
35731
35732         PR ipa/79761
35733         * tree-chkp.c (chkp_get_bound_for_parm): Get bounds for a param.
35734         (chkp_find_bounds_1): Remove gcc_unreachable.
35735
35736 2017-03-09  Jakub Jelinek  <jakub@redhat.com>
35737
35738         PR sanitizer/79944
35739         * asan.c (get_mem_refs_of_builtin_call): For BUILT_IN_ATOMIC* and
35740         BUILT_IN_SYNC*, determine the access type from the size suffix and
35741         always build a MEM_REF with that type.  Handle forgotten
35742         BUILT_IN_SYNC_FETCH_AND_NAND_16 and BUILT_IN_SYNC_NAND_AND_FETCH_16.
35743
35744         PR target/79932
35745         * config/i386/avx512vlintrin.h (_mm256_cmpge_epi32_mask,
35746         _mm256_cmpge_epi64_mask, _mm256_cmpge_epu32_mask,
35747         _mm256_cmpge_epu64_mask, _mm256_cmple_epi32_mask,
35748         _mm256_cmple_epi64_mask, _mm256_cmple_epu32_mask,
35749         _mm256_cmple_epu64_mask, _mm256_cmplt_epi32_mask,
35750         _mm256_cmplt_epi64_mask, _mm256_cmplt_epu32_mask,
35751         _mm256_cmplt_epu64_mask, _mm256_cmpneq_epi32_mask,
35752         _mm256_cmpneq_epi64_mask, _mm256_cmpneq_epu32_mask,
35753         _mm256_cmpneq_epu64_mask, _mm256_mask_cmpge_epi32_mask,
35754         _mm256_mask_cmpge_epi64_mask, _mm256_mask_cmpge_epu32_mask,
35755         _mm256_mask_cmpge_epu64_mask, _mm256_mask_cmple_epi32_mask,
35756         _mm256_mask_cmple_epi64_mask, _mm256_mask_cmple_epu32_mask,
35757         _mm256_mask_cmple_epu64_mask, _mm256_mask_cmplt_epi32_mask,
35758         _mm256_mask_cmplt_epi64_mask, _mm256_mask_cmplt_epu32_mask,
35759         _mm256_mask_cmplt_epu64_mask, _mm256_mask_cmpneq_epi32_mask,
35760         _mm256_mask_cmpneq_epi64_mask, _mm256_mask_cmpneq_epu32_mask,
35761         _mm256_mask_cmpneq_epu64_mask, _mm_cmpge_epi32_mask,
35762         _mm_cmpge_epi64_mask, _mm_cmpge_epu32_mask, _mm_cmpge_epu64_mask,
35763         _mm_cmple_epi32_mask, _mm_cmple_epi64_mask, _mm_cmple_epu32_mask,
35764         _mm_cmple_epu64_mask, _mm_cmplt_epi32_mask, _mm_cmplt_epi64_mask,
35765         _mm_cmplt_epu32_mask, _mm_cmplt_epu64_mask, _mm_cmpneq_epi32_mask,
35766         _mm_cmpneq_epi64_mask, _mm_cmpneq_epu32_mask, _mm_cmpneq_epu64_mask,
35767         _mm_mask_cmpge_epi32_mask, _mm_mask_cmpge_epi64_mask,
35768         _mm_mask_cmpge_epu32_mask, _mm_mask_cmpge_epu64_mask,
35769         _mm_mask_cmple_epi32_mask, _mm_mask_cmple_epi64_mask,
35770         _mm_mask_cmple_epu32_mask, _mm_mask_cmple_epu64_mask,
35771         _mm_mask_cmplt_epi32_mask, _mm_mask_cmplt_epi64_mask,
35772         _mm_mask_cmplt_epu32_mask, _mm_mask_cmplt_epu64_mask,
35773         _mm_mask_cmpneq_epi32_mask, _mm_mask_cmpneq_epi64_mask,
35774         _mm_mask_cmpneq_epu32_mask, _mm_mask_cmpneq_epu64_mask): Move
35775         definitions outside of __OPTIMIZE__ guarded section.
35776
35777         PR target/79932
35778         * config/i386/avx512bwintrin.h (_mm512_packs_epi32,
35779         _mm512_maskz_packs_epi32, _mm512_mask_packs_epi32,
35780         _mm512_packus_epi32, _mm512_maskz_packus_epi32,
35781         _mm512_mask_packus_epi32): Move definitions outside of __OPTIMIZE__
35782         guarded section.
35783
35784 2017-03-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
35785
35786         * config/s390/vx-builtins.md ("vfee<mode>", "vfeez<mode>")
35787         ("vfenez<mode>"): Add missing constraints.
35788
35789 2017-03-08  Martin Sebor  <msebor@redhat.com>
35790
35791         PR target/79928
35792         * config/nds32/nds32.c (nds32_option_override):
35793         Fix misspelled diagnostic.
35794
35795 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
35796
35797         PR c/79940
35798         * gimplify.c (gimplify_omp_for): Replace index var in outer
35799         taskloop statement with an artificial variable and add
35800         OMP_CLAUSE_PRIVATE clause for it.
35801
35802 2017-03-08  Richard Biener  <rguenther@suse.de>
35803
35804         PR tree-optimization/79955
35805         * tree-ssa-uninit.c (warn_uninitialized_vars): Do not warn
35806         for accesses that are completely outside of the variable.
35807
35808 2017-03-08  Andrew Haley  <aph@redhat.com>
35809
35810         PR tree-optimization/79943
35811         * tree-ssa-loop-split.c (compute_new_first_bound): When
35812         calculating the new upper bound, (END-BEG) should be added, not
35813         subtracted.
35814
35815 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
35816
35817         * config/avr/avr.md (setmemhi): Make sure match_dup
35818         operand number comes before match_scratch.
35819
35820 2017-03-08  Richard Biener  <rguenther@suse.de>
35821
35822         PR tree-optimization/79920
35823         * tree-vect-slp.c (vect_create_mask_and_perm): Remove and inline
35824         with ncopies == 1 to ...
35825         (vect_transform_slp_perm_load): ... here.  Properly compute
35826         all element loads by iterating VF times over the group.  Do
35827         not handle ncopies (computed in a broken way) in
35828         vect_create_mask_and_perm.
35829
35830 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
35831
35832         PR sanitizer/79904
35833         * internal-fn.c (expand_vector_ubsan_overflow): If arg0 or arg1
35834         is a uniform vector, use uniform_vector_p return value instead of
35835         building ARRAY_REF on folded VIEW_CONVERT_EXPR to array type.
35836
35837 2017-03-07  Marek Polacek  <polacek@redhat.com>
35838
35839         PR middle-end/79809
35840         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Use HOST_WIDE_INT.
35841         (alloca_call_type): Likewise.
35842
35843 2017-03-07  Martin Liska  <mliska@suse.cz>
35844
35845         * gcov.c (process_args): Put comment to correct location.
35846
35847 2017-03-07  Martin Liska  <mliska@suse.cz>
35848
35849         PR middle-end/68270
35850         * tree-chkp.c (chkp_may_narrow_to_field): Add new argument ref.
35851         Use array_at_struct_end_p instead of DECL_CHAIN (field).
35852         (chkp_narrow_bounds_for_field): Likewise.
35853         (chkp_parse_array_and_component_ref): Pass one more argument to
35854         call.
35855
35856 2017-03-07  Richard Biener  <rguenther@suse.de>
35857
35858         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve
35859         preheaders.
35860
35861 2017-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
35862
35863         * config/i386/i386.c (ix86_local_alignment): Align most aggregates
35864         of 16 bytes and more to 16 bytes, not those of 16 bits and more.
35865
35866 2017-03-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
35867
35868         PR c/79855
35869         * params.def (PARAM_STORE_MERGING_ALLOW_UNALIGNED): Add full stop
35870         to end of description.
35871         (PARAM_MAX_STORES_TO_MERGE): Likewise.
35872
35873 2017-03-07  Jakub Jelinek  <jakub@redhat.com>
35874
35875         PR rtl-optimization/79901
35876         * config/i386/sse.md (*avx512bw_<code><mode>3<mask_name>): Renamed to
35877         ...
35878         (*avx512f_<code><mode>3<mask_name>): ... this.
35879         (<code><mode>3 with maxmin code iterator): Use VI8_AVX2_AVX512F
35880         iterator instead of VI8_AVX2_AVX512BW.
35881
35882         PR rtl-optimization/79901
35883         * expr.c (expand_expr_real_2): For vector MIN/MAX, if there is no
35884         min/max expander, expand it using expand_vec_cond_expr.
35885
35886         PR sanitizer/79897
35887         * ubsan.c (ubsan_encode_value): Call mark_addressable on the
35888         temporary.
35889
35890 2017-03-06  Jakub Jelinek  <jakub@redhat.com>
35891
35892         PR c++/79821
35893         * dwarf2out.h (dw_vec_const): Change array type from unsigned char *
35894         to void * for PCH reasons.
35895         * dwarf2out.c (output_loc_operands, output_die): Cast
35896         v.val_vec.array to unsigned char *.
35897
35898 2017-03-06  John David Anglin  <danglin@gcc.gnu.org>
35899
35900         PR target/77850
35901         * config/pa/pa-64.h (PAD_VARARGS_DOWN): Don't pad down complex and
35902         vector types.
35903
35904 2017-03-06  Vladimir Makarov  <vmakarov@redhat.com>
35905
35906         PR rtl-optimization/79571
35907         * lra-constraints.c (process_alt_operands): Calculate static
35908         reject and subtract it from overall when only addresses will be
35909         reloaded.
35910
35911 2017-03-06  Julia Koval  <julia.koval@intel.com>
35912
35913         PR target/79793
35914         * config/i386/i386.c (ix86_minimum_incoming_stack_boundary): Set
35915         incoming stack boundary to 128 for 64-bit targets.
35916
35917 2017-03-06  Richard Biener  <rguenther@suse.de>
35918
35919         PR tree-optimization/79894
35920         * tree-vectorizer.c (vectorize_loops): Set loop_vectorized_call
35921         to NULL after folding it.
35922
35923 2017-03-06  Richard Biener  <rguenther@suse.de>
35924
35925         PR tree-optimization/79824
35926         * tree-vect-stmts.c (get_group_load_store_type): Fix alignment
35927         check disabling peeling for gaps.
35928
35929 2017-03-06  Toma Tabacu  <toma.tabacu@imgtec.com>
35930
35931         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
35932         attributes): Document gettimeofday.
35933
35934 2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>
35935
35936         * config/s390/s390.c (s390_option_override_internal): Set
35937         PARAM_MIN_VECT_LOOP_BOUND
35938
35939 2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>
35940
35941         * config/s390/s390.c (s390_asm_output_function_label): Use nopr %r0.
35942         * config/s390/s390.md: Likewise.
35943
35944 2017-03-06  Jakub Jelinek  <jakub@redhat.com>
35945
35946         PR target/79812
35947         * config/i386/sse.md (VI8F_256_512): Remove mode iterator.
35948         (<avx2_avx512>_perm<mode>): Rename to ...
35949         (avx2_perm<mode>): ... this.  Use VI8F_256 iterator instead
35950         of VI8F_256_512.
35951         (<avx512>_perm<mode>_mask): Rename to ...
35952         (avx512vl_perm<mode>_mask): ... this.  Use VI8F_256 iterator instead
35953         of VI8F_256_512.
35954         (<avx2_avx512>_perm<mode>_1<mask_name>): Rename to ...
35955         (avx2_perm<mode>_1<mask_name): ... this.  Use VI8F_256 iterator
35956         instead of VI8F_256_512.
35957         (avx512f_perm<mode>): New define_expand.
35958         (avx512f_perm<mode>_mask): Likewise.
35959         (avx512f_perm<mode>_1<mask_name>): New define_insn.
35960         (<avx512>_vec_dup<mode>_1): Fix up vec_select mode.
35961
35962 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
35963
35964         * config/mips/mips-msa.md (msa_fmax_a_<msafmt>, msa_fmin_a_<msafmt>,
35965         msa_max_a_<msafmt>, msa_min_a_<msafmt>): Introduce mode interator for
35966         if_then_else.
35967         (smin<mode>3, smax<mode>3): Change operand print code from 'B' to 'E'.
35968
35969 2017-03-06  Martin Liska  <mliska@suse.cz>
35970
35971         PR sanitize/79783
35972         * asan.c (asan_expand_poison_ifn): Do not expand ASAN_POISON
35973         when having a SSA NAME w/o VAR_DECL assigned to it.
35974
35975 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
35976
35977         * config/mips/mips-msa.md (msa_dotp_<su>_d, msa_dpadd_<su>_d,
35978         msa_dpsub_<su>_d): Fix MODE for vec_select.
35979
35980 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
35981
35982         * config/mips/mips.c (mips_gen_const_int_vector): Change type of last
35983         argument.
35984         * config/mips/mips-protos.h (mips_gen_const_int_vector): Likewise.
35985
35986 2017-03-06  Richard Biener  <rguenther@suse.de>
35987
35988         * lto-streamer.c (lto_check_version): Use %qs in diagnostics.
35989         * plugin.c (register_plugin_info): Likewise.
35990         * tree-chkp.c (chkp_make_static_const_bounds): Likewise.
35991
35992 2017-03-05  Jakub Jelinek  <jakub@redhat.com>
35993
35994         * config/i386/sse.md (sse_storehps, sse_storelps,
35995         avx_<castmode><avxsizesuffix>_<castmode>,
35996         avx512f_<castmode><avxsizesuffix>_<castmode>,
35997         avx512f_<castmode><avxsizesuffix>_256<castmode>): Require
35998         in condition that at least one operand is not a MEM.
35999
36000 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
36001
36002         PR middle-end/79805
36003         * internal-fn.def (ATOMIC_BIT_TEST_AND_SET, ATOMIC_BIT_TEST_AND_RESET,
36004         ATOMIC_BIT_TEST_AND_COMPLEMENT, ATOMIC_COMPARE_EXCHANGE): Remove
36005         ECF_NOTHROW.
36006         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Set
36007         gimple_call_nothrow_p flag based on whether original builtin can throw.
36008         If it can, emit following stmts on the fallthrough edge.
36009         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Similarly, except
36010         don't create new bb if inserting just debug stmts on the edge, try to
36011         insert them on the fallthru bb or just reset debug stmts.
36012
36013 2017-03-03  Segher Boesssenkool  <segher@kernel.crashing.org>
36014
36015         PR target/43763
36016         * config/rs6000/rs6000.c (rs6000_final_prescan_insn): Save and
36017         restore recog_data (including the operand rtxes inside it) around
36018         the call to get_insn_template.
36019
36020 2017-03-03  Martin Sebor  <msebor@redhat.com>
36021
36022         PR tree-optimization/79699
36023         * context.c (context::~context): Free MPFR caches to avoid
36024         a memory leak on program exit.
36025
36026 2017-03-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
36027
36028         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
36029         Use wide_int::ulow () instead of .elt (0).
36030
36031 2017-03-03  Uros Bizjak  <ubizjak@gmail.com>
36032
36033         * config/i386/i386.md (*pushtf): Change *roF constraint to *roC.
36034         (*pushxf): Limit oF constraint to 32bit targets and add oC
36035         constraint for 64bit targets.
36036         (pushxf splitter): Use PUSH_ROUNDING to calculate stack adjustment.
36037         (*pushdf): Change rmF constraint to rmC.
36038
36039 2017-03-03  Martin Liska  <mliska@suse.cz>
36040
36041         * tree-ssa-loop-prefetch.c (pass_loop_prefetch::execute):
36042         Remove unused variable.
36043
36044 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
36045
36046         PR target/79807
36047         * config/i386/i386.c (ix86_expand_multi_arg_builtin): If target
36048         is a memory operand, increase num_memory.
36049         (ix86_expand_args_builtin): Likewise.
36050
36051 2017-03-03  Jan Hubicka  <jh@suse.cz>
36052
36053         PR lto/79760
36054         * ipa-devirt.c (maybe_record_node): Properly handle
36055         __cxa_pure_virtual visibility.
36056
36057 2017-03-03  Martin Liska  <mliska@suse.cz>
36058
36059         PR tree-optimization/79803
36060         * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Remove
36061         assert.
36062         (pass_loop_prefetch::execute): Disabled optimization if an
36063         assumption about L1 cache size is not met.
36064
36065 2017-03-03  Martin Liska  <mliska@suse.cz>
36066
36067         PR rtl-optimization/79574
36068         * gcse.c (struct gcse_expr): Use HOST_WIDE_INT instead of int.
36069         (hash_scan_set): Likewise.
36070         (dump_hash_table): Likewise.
36071         (hoist_code): Likewise.
36072
36073 2017-03-03  Richard Biener  <rguenther@suse.de>
36074
36075         * fixed-value.c (fixed_from_string): Restore use of elt (1)
36076         in place of uhigh ().
36077         (fixed_convert_from_real): Likewise.
36078
36079 2017-03-03  Uros Bizjak  <ubizjak@gmail.com>
36080
36081         PR target/79514
36082         * config/i386/i386.md (*pushxf_rounded): Use Pmode instead of DImode.
36083
36084 2017-03-03  Richard Biener  <rguenther@suse.de>
36085
36086         PR middle-end/79818
36087         * match.pd ( X +- C1 CMP C2 -> X CMP C2 -+ C1): Add missing
36088         TYPE_OVERFLOW_UNDEFINED check.
36089
36090 2017-03-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
36091
36092         * config/rs6000/vector.md (vector_ne_<mode>_p): Correct operand
36093         numbers.
36094         (vector_ae_<mode>_p): Likewise.
36095         (vector_nez_<mode>_p): Likewise.
36096         (vector_ne_v2di_p): Likewise.
36097         (vector_ae_v2di_p): Likewise.
36098         (vector_ne_<mode>_p): Likewise.
36099         * config/rs6000/vsx.md (vsx_tsqrt<mode>2_fg): Correct operand
36100         numbers.
36101         (vsx_tsqrt<mode>2_fe): Likewise.
36102
36103 2017-03-02  Uros Bizjak  <ubizjak@gmail.com>
36104
36105         PR target/79514
36106         * config/i386/i386.md (*pushxf_rounded): New insn_and_split pattern.
36107
36108 2017-03-02  Jakub Jelinek  <jakub@redhat.com>
36109
36110         PR rtl-optimization/79780
36111         * cprop.c (one_cprop_pass): When second and further conditional trap
36112         in a single basic block is turned into an unconditional trap, turn it
36113         into a deleted note to avoid RTL verification failures.
36114
36115 2017-03-02  Richard Biener  <rguenther@suse.de>
36116
36117         * fold-const.c (const_binop): Use ulow () instead of elt (0).
36118
36119 2017-03-02  Richard Biener  <rguenther@suse.de>
36120
36121         PR tree-optimization/79345
36122         PR c++/42000
36123         * tree-ssa-alias.c (walk_aliased_vdefs_1): Take a limit
36124         param and abort the walk, returning -1 if it is hit.
36125         (walk_aliased_vdefs): Take a limit param and pass it on.
36126         * tree-ssa-alias.h (walk_aliased_vdefs): Add a limit param,
36127         defaulting to 0 and return a signed int.
36128         * tree-ssa-uninit.c (struct check_defs_data): New struct.
36129         (check_defs): New helper.
36130         (warn_uninitialized_vars): Use walk_aliased_vdefs to warn
36131         about uninitialized memory.
36132         * fixed-value.c (fixed_from_string): Use ulow/uhigh to avoid
36133         bogus uninitialized warning.
36134         (fixed_convert_from_real): Likewise.
36135
36136 2017-03-02  Bin Cheng  <bin.cheng@arm.com>
36137
36138         PR tree-optimization/66768
36139         * tree-ssa-loop-ivopts.c (find_interesting_uses_address): Skip addr
36140         iv_use if base object can't be determined.
36141
36142 2017-03-02  Jakub Jelinek  <jakub@redhat.com>
36143
36144         PR tree-optimization/79345
36145         * gensupport.h (struct pattern_stats): Add min_scratch_opno field.
36146         * gensupport.c (get_pattern_stats_1) <case MATCH_SCRATCH>: Update it.
36147         (get_pattern_stats): Initialize it.
36148         * genemit.c (gen_expand): Verify match_scratch numbers come after
36149         match_operand/match_dup numbers.
36150         * config/i386/i386.md (<s>mul<mode>3_highpart): Swap match_dup and
36151         match_scratch numbers.
36152         * config/i386/sse.md (avx2_gathersi<mode>, avx2_gatherdi<mode>):
36153         Likewise.
36154         * config/s390/s390.md (trunctdsd2): Likewise.
36155
36156 2017-03-02  Richard Biener  <rguenther@suse.de>
36157
36158         * wide-int.h (wide_int_storage::operator=): Implement in terms
36159         of wi::copy.
36160
36161 2017-03-02  Richard Biener  <rguenther@suse.de>
36162
36163         PR tree-optimization/79777
36164         * tree-ssa-pre.c (eliminate_insert): Give up if we simplify
36165         the to insert expression to sth existing.
36166
36167 2017-03-01  Martin Sebor  <msebor@redhat.com>
36168
36169         PR middle-end/79692
36170         * gimple-ssa-sprintf.c
36171         (directive::known_width_and_precision): New function.
36172         (format_integer): Use it.
36173         (get_mpfr_format_length): Consider the full range of precision
36174         when computing %g output with the # flag.  Set the likely byte
36175         count to 3 rather than 1 when precision is indeterminate.
36176         (format_floating): Correct the lower bound of precision.
36177
36178 2017-03-01  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
36179
36180         * doc/invoke.texi: Document default code model for 64-bit Linux.
36181
36182 2017-03-01  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
36183
36184         PR target/79752
36185         * config/rs6000/rs6000.md (peephole2 for udiv/umod): Should emit
36186         udiv rather than div since input pattern is unsigned.
36187
36188 2017-03-01  Uros Bizjak  <ubizjak@gmail.com>
36189
36190         * config/i386/i386.c (print_reg): Warn for values of
36191         unsupported size in integer register.
36192
36193 2017-03-01  Michael Meissner  <meissner@linux.vnet.ibm.com>
36194
36195         PR target/79439
36196         * config/rs6000/predicates.md (current_file_function_operand): Do
36197         not allow self calls to be local if the function is replaceable.
36198
36199 2017-03-01  Kelvin Nilsen  <kelvin@gcc.gnu.org>
36200
36201         PR target/79395
36202         * config/rs6000/altivec.h (vec_ctz and others): Change the
36203         preprocessor macro that controls conditional compilation from
36204         _ARCH_PWR9 to __POWER9_VECTOR__.
36205         (vec_all_ne): Change parameterization of __altivec_scalar_pred
36206         macro expansion under preprocessor #ifdef __POWER9_VECTOR__
36207         control (instead of _ARCH_PWR9 control) so that template
36208         definition uses power9-specific function.
36209         (vec_any_eq): Likewise.
36210         (vec_all_ne): Change macro definition to use a power9-specific
36211         expansion under #ifdef __POWER9_VECTOR__ control (instead of
36212         _ARCH_PWR9 control).
36213         (vec_any_eq) Likewise.
36214         * config/rs6000/rs6000-builtin.def (CMPNEF): Remove BU_P9V_AV_2
36215         expansion for CMPNEF to remove support for xvcmpnesp instruction.
36216         (CMPNED): Remove BU_P9V_AV2 expansion for CMPNED to remove
36217         support for xvcmpnedp instruction.
36218         (VCMPNEB_P): Replace BU_P9V_AV_P macro expansion with BU_P9V_AV_2
36219         macro expansion so that Power9 implementation of vec_all_ne does
36220         not use the AltiVec predicate framework.
36221         (VCMPNEH_P): Likewise.
36222         (VCMPNEW_P): Likewise.
36223         (VCMPNED_P): Likewise.
36224         (VCMPNEFP_P): Likewise.
36225         (VCMPNEDP_P): Likewise.
36226         (VCMPAEB_P): Add BU_P9V_AV_2 macro expansion to change
36227         implementation of vec_any_eq to not use AltiVec predicate
36228         framework.
36229         (VCMPAEH_P): Likewise.
36230         (VCMPAEW_P): Likewise.
36231         (VCMPAED_P): Likewise.
36232         (VCMPAEFP_P): Likewise.
36233         (VCMPAEDP_P): Likewise.
36234         (VCMPNE_P): Replace BU_P9V_OVERLOAD_P macro expansion with
36235         BU_P9V_OVERLOAD_2 so that Power9 implementation of vec_all_ne does
36236         not use the AltiVec predicate framework.
36237         (VCMPAE_P): Add BU_P9V_OVERLOAD_2 macro to change implementation
36238         of vec_any_eq to not use AltiVec predicate framework.
36239         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Add
36240         support for predefined __POWER9_VECTOR__ macro to indicate that
36241         Power9 instruction selection is enabled.
36242         (altivec_overloaded_builtins): Remove extraneous
36243         ALTIVEC_BUILTIN_VEC_CMPNE entry for overloaded
36244         function argument types RS6000_BTI_bool_V16QI and
36245         RS6000_BTI_bool_V16QI.  Remove erroneous ALTIVEC_BUILTIN_VEC_CMPNE
36246         entry for overloaded function argument types RS6000_BTI_bool_V4SI
36247         andRS6000_BTI_bool_V4SI, mapping to P9V_BUILTIN_CMPNEB.  Remove
36248         two entries mapping to P9V_BUITIN_CMPNED and one entry mapping to
36249         P9V_BUILTIN_CMPNEF to force use of instructions not specific to
36250         Power9 for implementations of vec_cmpne.  Change the signature for
36251         all definitions of the overloaded P9V_BUILTIN_VEC_CMPNE_P function
36252         (representing vec_all_ne) to remove the previously described first
36253         argument of type RS6000_BTI_INTSI, as this was an artifact of
36254         reliance on the AltiVec predicate framework, which is no longer
36255         used in the implementation of these functions.  Add
36256         P9V_BUILTIN_VEC_VCMPAE_P entries (representing the vec_anyeq
36257         function) to match all of the P9V_BUILTIN_VEC_VCMNE_P entries
36258         since, unlike the AltiVec predicate framework implementation, we
36259         do not share function descriptors between vec_alle and vec_anyeq.
36260         (altivec_resolve_overloaded_builtin): Add SFmode and DFmode to the
36261         set of modes that receive special treatment even when
36262         TARGET_P9_VECTOR is true.  The special treatment emits code that
36263         does not depend on Power9 instructions.
36264         * config/rs6000/vector.md (vector_ne_<mode>_p): Change this
36265         define_expand to not rely on AltiVec predicate framework.
36266         (vector_ae_<mode>p): New define_expand to represent vec_any_eq
36267         function.
36268         (vector_ne_v2di_p): Change this define_expand to not rely on
36269         AltiVec predicate framework.
36270         (vector_ae_v2di_p): New define_expand to represent vec_any_eq
36271         function.
36272         (vector_ne_<mode>_p): Change this define_expand to not rely on
36273         AltiVec predicate framework.
36274         (vector_ae_<mode>p): New define_expand to represent vec_any_eq
36275         function.
36276         * config/rs6000/vsx.md (*vsx_ne_<mode>_p): For modes VSX_EXTRACT_I
36277         (V16QI, V8HI, V4SI), correct a typo in the code emitted for this
36278         define_insn pattern.
36279         (*vsx_ne_<mode>_p): For modes VSX_F (V4SF and V2DF), remove this
36280         define_insn pattern because the xvcmpne<VSs>. instruction is not
36281         supported.
36282         (vcmpne<VSs>): Remove this define_insn because xvcmpne<VSs>
36283         instruction is not supported.
36284
36285 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
36286
36287         * config/nvptx/nvptx.c: Include intl.h.
36288
36289 2017-03-01  Martin Jambor  <mjambor@suse.cz>
36290
36291         PR lto/78140
36292         * ipa-prop.h (ipa_bits): Removed field known.
36293         (ipa_jump_func): Removed field vr_known.  Changed fields bits and m_vr
36294         to pointers.  Adjusted their comments to warn about their sharing.
36295         (ipcp_transformation_summary): Change bits to a vector of pointers.
36296         (ipa_check_create_edge_args): Moved to ipa-prop.c, declare.
36297         (ipa_get_ipa_bits_for_value): Declare.
36298         * tree-vrp.h (value_range): Mark as GTY((for_user)).
36299         * ipa-prop.c (ipa_bit_ggc_hash_traits): New.
36300         (ipa_bits_hash_table): Likewise.
36301         (ipa_vr_ggc_hash_traits): Likewise.
36302         (ipa_vr_hash_table): Likewise.
36303         (ipa_print_node_jump_functions_for_edge): Adjust for bits and m_vr
36304         being pointers and vr_known being removed.
36305         (ipa_set_jf_unknown): Likewise.
36306         (ipa_get_ipa_bits_for_value): New function.
36307         (ipa_set_jfunc_bits): Likewise.
36308         (ipa_get_value_range): New overloaded functions.
36309         (ipa_set_jfunc_vr): Likewise.
36310         (ipa_compute_jump_functions_for_edge): Use the above functions to
36311         construct bits and vr parts of jump functions.
36312         (ipa_check_create_edge_args): Move here from ipa-prop.h, also allocate
36313         ipa_bits_hash_table and ipa_vr_hash_table if they do not already
36314         exist.
36315         (ipcp_grow_transformations_if_necessary): Also allocate
36316         ipa_bits_hash_table and ipa_vr_hash_table if they do not already
36317         exist.
36318         (ipa_node_params_t::duplicate): Do not copy bits, just pointers to
36319         them.  Fix too long lines.
36320         (ipa_write_jump_function): Adjust for bits and m_vr being pointers and
36321         vr_known being removed.
36322         (ipa_read_jump_function): Use new setter functions to construct bits
36323         and vr parts of jump functions or set them to NULL.
36324         (write_ipcp_transformation_info): Adjust for bits being pointers.
36325         (read_ipcp_transformation_info): Likewise.
36326         (ipcp_update_bits): Likewise.  Fix excessively long lines a trailing
36327         space.
36328         Include gt-ipa-prop.h.
36329         * ipa-cp.c (propagate_bits_across_jump_function): Adjust for bits
36330         being pointers.
36331         (ipcp_store_bits_results): Likewise.
36332         (propagate_vr_across_jump_function): Adjust for m_vr being a pointer.
36333         Do not write to existing jump functions but use a temporary instead.
36334
36335 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
36336
36337         PR c++/79681
36338         * fold-const.c (make_bit_field_ref): If orig_inner is COMPONENT_REF,
36339         attempt to use its first operand as BIT_FIELD_REF base.
36340
36341 2017-03-01  Richard Biener  <rguenther@suse.de>
36342
36343         PR middle-end/79721
36344         * tree-chrec.c (chrec_evaluate): Perform computation of Newtons
36345         interpolating formula in wrapping arithmetic.
36346         (chrec_apply): Convert chrec_evaluate return value to wanted type.
36347
36348 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
36349
36350         PR tree-optimization/79734
36351         * tree-vect-generic.c (expand_vector_condition): Optimize
36352         AVX512 vector boolean VEC_COND_EXPRs into bitwise operations.
36353         Handle VEC_COND_EXPR where comparison has different inner width from
36354         type's inner width.
36355
36356 2017-02-28  Sandra Loosemore  <sandra@codesourcery.com>
36357
36358         * doc/invoke.texi (ARC Options): Copy-edit to fix punctuation,
36359         markup, and similar issues.  Remove @opindex entries for things
36360         that aren't options.  Add missing -mmpy-option entries.
36361
36362 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
36363
36364         PR tree-optimization/79737
36365         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): If bitlen is
36366         a multiple of BITS_PER_UNIT and !BYTES_BIG_ENDIAN, clear
36367         tmpbuf[byte_size - 1].  Call natice_encode_expr with byte_size - 1
36368         instead of byte_size.  Formatting fix.
36369         (shift_bytes_in_array_right): Formatting fix.
36370
36371 2017-02-28  Eric Botcazou  <ebotcazou@adacore.com>
36372
36373         PR target/79749
36374         * config/sparc/sparc.c (sparc_frame_pointer_required): Add missing
36375         condition on optimize for the leaf function test.
36376
36377 2017-02-28  Martin Liska  <mliska@suse.cz>
36378
36379         PR lto/79625
36380         * read-rtl-function.c (function_reader::handle_unknown_directive):
36381         Bail out when one uses -flto.
36382
36383 2017-02-28  Martin Liska  <mliska@suse.cz>
36384
36385         * common.opt: Replace space with tabular for options of <number>
36386         type.
36387         * config/i386/i386.opt: Show <number> value for
36388         -mlarge-data-threshold.
36389         * opts.c (print_filtered_help): Do not display number in hexadecimal
36390         format.
36391
36392 2017-02-28  Martin Liska  <mliska@suse.cz>
36393
36394         * common.opt: Fix --help=option -Q for options which are of
36395         an enum type.
36396
36397 2017-02-28  Uros Bizjak  <ubizjak@gmail.com>
36398
36399         * config/i386/i386.c (print_reg): Error out for values
36400         of 8-bit size in invalid integer register.
36401
36402 2017-02-28  Martin Sebor  <msebor@redhat.com>
36403
36404         PR tree-optimization/79691
36405         * passes.def (pass_all_optimizations_g): Enable pass_sprintf_length.
36406
36407 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
36408
36409         PR target/79729
36410         * config/i386/i386.c (ix86_print_operand) <case 'R'>: Replace
36411         gcc_unreachable with output_operand_lossage.
36412
36413 2017-02-28  Richard Biener  <rguenther@suse.de>
36414
36415         PR tree-optimization/79740
36416         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Allow redundant
36417         inserts.
36418         (visit_nary_op): Insert the nary into the hashtable if we
36419         pattern-matched sth.
36420         * tree-ssa-pre.c (eliminate_insert): Robustify.
36421
36422 2017-02-28  Richard Biener  <rguenther@suse.de>
36423
36424         PR middle-end/79731
36425         * fold-const.c (decode_field_reference): Reject out-of-bound
36426         accesses.
36427
36428 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
36429
36430         * config/i386/i386.c: Include intl.h.
36431         (ix86_option_override_internal): Use cond ? G_("...") : G_("...")
36432         instead of just cond ? "..." : "...".
36433         * config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Likewise.
36434         * coverage.c (read_counts_file): Likewise.
36435         * omp-offload.c: Include intl.h.
36436         (oacc_loop_fixed_partitions): Use cond ? G_("...") : G_("...") instead
36437         of just cond ? "..." : "...".
36438         * gcov.c (read_count_file): Use cond ? N_("...") : N_("...") instead
36439         of just cond ? "..." : "...".
36440
36441 2017-02-28  Richard Earnshaw  <rearnsha@arm.com>
36442
36443         PR target/79742
36444         * config/arm/parsecpu.awk (gen_data): Set tuning target to 'tune for'
36445         entry, if present.
36446         * config/arm/arm-cpus.in (cortex-m0plus.small-multiply): Correct
36447         'tune for' CPU name.
36448         * config/arm/arm-cpu-data.h: Regenerated.
36449
36450 2017-02-28  Richard Biener  <rguenther@suse.de>
36451
36452         PR tree-optimization/79732
36453         * tree-inline.c (expand_call_inline): Do not shadow var.
36454
36455 2017-02-28  Richard Biener  <rguenther@suse.de>
36456
36457         PR tree-optimization/79723
36458         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Preserve
36459         address-space properly.
36460
36461 2017-02-28  Thomas Schwinge  <thomas@codesourcery.com>
36462
36463         * doc/optinfo.texi (Optimization groups): Fix option used for
36464         OPTGROUP_ALL.
36465         * doc/invoke.texi (-fopt-info): Document "omp".
36466         * dumpfile.h: Sort OPTGROUP_OMP before OPTGROUP_VEC.
36467         (OPTGROUP_ALL): Add OPTGROUP_OMP.
36468         * hsa-gen.c (pass_data_gen_hsail): Use OPTGROUP_OMP.
36469         * ipa-hsa.c (pass_data_ipa_hsa): Likewise.
36470         * omp-simd-clone.c (pass_data_omp_simd_clone): Likewise.
36471
36472         * dumpfile.h (OPTGROUP_OPENMP): Rename to OPTGROUP_OMP.  Adjust
36473         all users.
36474         * dumpfile.c (optgroup_options): Instead of "openmp", associate
36475         OPTGROUP_OMP with "omp".
36476
36477 2017-02-27  Pat Haugen  <pthaugen@us.ibm.com>
36478
36479         PR target/79544
36480         * config/rs6000/rs6000-c.c (struct altivec_builtin_types): Use VSRAD
36481         for arithmetic shift of unsigned V2DI.
36482
36483 2017-02-27  Claudiu Zissulescu  <claziss@synopsys.com>
36484
36485         * config.gcc (arc*-): Clean up, use arc/big.h, arc/elf.h, and
36486         arc/linux.h headers.
36487         * config/arc/arc.h (TARGET_OS_CPP_BUILTINS): Remove.
36488         (LINK_SPEC): Likewise.
36489         (ARC_TLS_EXTRA_START_SPEC): Likewise.
36490         (EXTRA_SPECS): Likewise.
36491         (STARTFILE_SPEC): Likewise.
36492         (ENDFILE_SPEC): Likewise.
36493         (LIB_SPEC): Likewise.
36494         (TARGET_SDATA_DEFAULT): Likewise.
36495         (TARGET_MMEDIUM_CALLS_DEFAULT): Likewise.
36496         (MULTILIB_DEFAULTS): Likewise.
36497         (DWARF2_UNWIND_INFO): Likewise.
36498         * config/arc/big.h: New file.
36499         * config/arc/elf.h: Likewise.
36500         * config/arc/linux.h: Likewise.
36501         * config/arc/t-uClibc: Remove.
36502
36503 2017-02-27  Bin Cheng  <bin.cheng@arm.com>
36504
36505         PR tree-optimization/77536
36506         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): New function.
36507         (tree_transform_and_unroll_loop): Use above function to compute the
36508         estimated niter of unrolled loop and use it when scaling profile.
36509         Also use count info rather than frequency if it's non-zero.
36510         * tree-ssa-loop-manip.h niter_for_unrolled_loop(): New declaration.
36511         * tree-vect-loop.c (scale_profile_for_vect_loop): New function.
36512         (vect_transform_loop): Call above function.
36513
36514 2017-02-27  Richard Biener  <rguenther@suse.de>
36515
36516         PR tree-optimization/45397
36517         * tree-ssa-pre.c (eliminate_insert): Handle BIT_AND_EXPR.
36518         * tree-ssa-sccvn.c (valueized_wider_op): New helper.
36519         (visit_nary_op): Add pattern matching for CSEing sign-changed
36520         or truncated operations with wider ones.
36521
36522 2017-02-27  Richard Biener  <rguenther@suse.de>
36523
36524         PR tree-optimization/79690
36525         * tree-vect-stmts.c (vectorizable_store): Use vector type
36526         built from the DR with address-space.
36527
36528 2017-02-26  Gerald Pfeifer  <gerald@pfeifer.com>
36529
36530         * doc/invoke.texi (Optimize Options): Refine the description
36531         of asan-use-after-return.
36532
36533 2017-02-25  Alan Modra  <amodra@gmail.com>
36534
36535         PR rtl-optimization/79584
36536         * lra-constraints.c (base_to_reg): Reload ad->base, the entire
36537         base, not ad->base_term, the reg within base.  Remove assertion
36538         that ad->base == ad->base_term.  Replace gen_int_mode using
36539         bogus mode with const0_rtx.
36540
36541 2017-02-25  Jakub Jelinek  <jakub@redhat.com>
36542
36543         PR middle-end/79396
36544         * tree-eh.c (operation_could_trap_p, stmt_could_throw_1_p): Handle
36545         FMA_EXPR like tcc_binary or tcc_unary.
36546
36547         * tree-ssa-loop-niter.c (number_of_iterations_exit): Simplify warning.
36548
36549         PR debug/77589
36550         * dwarf2out.c (struct dw_loc_list_struct): Add noted_variable_value
36551         bitfield.
36552         (size_of_loc_descr): Handle DW_OP_GNU_variable_value.
36553         (output_loc_operands): Handle DW_OP_call_ref and
36554         DW_OP_GNU_variable_value.
36555         (struct variable_value_struct): New type.
36556         (struct variable_value_hasher): Likewise.
36557         (variable_value_hash): New variable.
36558         (string_types): Remove.
36559         (copy_loc_descr): New function.
36560         (add_loc_descr_to_each): Clarify comment.  Use copy_loc_descr.
36561         (prepend_loc_descr_to_each): New function.
36562         (add_loc_list): Fix comment typo.  Use prepend_loc_descr_to_each
36563         instead of add_loc_descr_to_each if the first argument is single
36564         location list and the second has multiple.
36565         (resolve_args_picking_1): Handle DW_OP_GNU_variable_value.
36566         (loc_list_from_tree_1): For early_dwarf, emit DW_OP_GNU_variable_value
36567         when looking for variable value which doesn't have other location info.
36568         (loc_list_from_tree): Formatting fix.
36569         (gen_array_type_die): Simplify DW_AT_string_length handling.
36570         (adjust_string_types): Remove.
36571         (gen_subprogram_die): Don't call adjust_string_types nor test/set
36572         string_types.  Call resolve_variable_values.
36573         (prune_unused_types_walk_loc_descr): Handle DW_OP_GNU_variable_value.
36574         (resolve_addr_in_expr): Likewise.  Add A argument.
36575         (copy_deref_exprloc): Remove deref argument.  Adjust for the
36576         original expression being DW_OP_GNU_variable_value with optionally
36577         DW_OP_stack_value after it instead of DW_OP_call4 with DW_OP_deref
36578         optionally after it.
36579         (optimize_string_length): Rework for DW_OP_GNU_variable_value.
36580         (resolve_addr): Adjust optimize_string_length and resolve_addr_in_expr
36581         callers.  Set remove_AT_byte_size if removing DW_AT_string_length.
36582         (variable_value_hasher::hash, variable_value_hasher::equal): New
36583         methods.
36584         (resolve_variable_value_in_expr, resolve_variable_value,
36585         resolve_variable_values, note_variable_value_in_expr,
36586         note_variable_value): New functions.
36587         (dwarf2out_early_finish): Call note_variable_value on all toplevel
36588         DIEs.
36589
36590 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
36591
36592         PR c/79677
36593         * opts.h (handle_generated_option): Add GENERATED_P argument.
36594         * opts-common.c (handle_option): Adjust function comment.
36595         (handle_generated_option): Add GENERATED_P argument, pass it to
36596         handle_option.
36597         (control_warning_option): Pass false to handle_generated_option
36598         GENERATED_P.
36599         * opts.c (maybe_default_option): Pass true to handle_generated_option
36600         GENERATED_P.
36601         * optc-gen.awk: Likewise.
36602
36603 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
36604
36605         * config/sh/sh.md (tstsi_t): If operands[0] is a SUBREG instead of
36606         a REG, look at the REG it is a SUBREG of.
36607         (splitter for cmpeqsi_t): Ditto.
36608
36609 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
36610
36611         * config/pa/pa.c (pa_combine_instructions): Do not share RTL.  Make
36612         the special USEs with the pattern of the insn, not the insn itself.
36613
36614 2017-02-24  Matthew Fortune  <matthew.fortune@imgtec.com>
36615
36616         PR target/79473
36617         * doc/invoke.texi: Document -mload-store-pairs.
36618
36619 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
36620             Sandra Loosemore  <sandra@codesourcery.com>
36621
36622         * config/nios2/nios2.c (nios2_simple_const_p): Returns false if the
36623         argument isn't a CONST_INT.
36624         (nios2_alternate_compare_const): Assert op is a CONST_INT.
36625         (nios2_valid_compare_const_p): Assert op is a CONST_INT.
36626         (nios2_validate_compare): Bypass alternate compare logic if *op2
36627         is not a CONST_INT.
36628         (ldstwm_operation_p): Return false if first_base is not a REG or
36629         if first_offset is not a CONST_INT.
36630
36631 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
36632
36633         * config/cris/cris.md: Use correct operand in a define_peephole2.
36634
36635 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
36636
36637         * config/c6x/c6x.c (predicate_insn): Do not incorrectly share RTL.
36638
36639 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
36640
36641         * config/arc/arc.c (arc_ccfsm_advance): Only take the PATTERN of
36642         this_insn if it is an INSN or JUMP_INSN.
36643         (force_offsettable): Look at base, not at addr.
36644         * config/arc/predicates.md (brcc_nolimm_operator): Don't call INTVAL
36645         on things that aren't necessarily CONST_INTs.
36646
36647 2017-02-24  Uros Bizjak  <ubizjak@gmail.com>
36648
36649         * doc/invoke.texi (x86 Options, -mfpmath=sse): Mention that
36650         -mfpmath=sse is the default also for x86-32 targets with SSE2
36651         instruction set when @option{-ffast-math} is enabled
36652
36653 2017-02-24  Jeff Law  <law@redhat.com>
36654
36655         PR rtl-optimizatoin/79286
36656         * ira.c (update_equiv_regs): Drop may_trap_p exception to
36657         dominance test.
36658
36659 2017-02-24  Richard Biener  <rguenther@suse.de>
36660
36661         PR tree-optimization/79389
36662         * gimple-ssa-split-paths.c (is_feasible_trace): Properly skip
36663         debug insns.
36664
36665 2017-02-24  Aldy Hernandez  <aldyh@redhat.com>
36666
36667         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update
36668         function comment to reflect reality.
36669         (loop_exits_before_overflow): Fix typo in function description.
36670
36671 2017-02-24  Richard Biener  <rguenther@suse.de>
36672
36673         PR tree-optimization/79389
36674         * gimple-ssa-split-paths.c (is_feasible_trace): Verify more
36675         properly that a threading opportunity exists.  Detect conditional
36676         copy/constant propagation opportunities.
36677
36678 2017-02-23  Eric Botcazou  <ebotcazou@adacore.com>
36679
36680         * config/visium/visium.md (type): Add trap.
36681         (b): New mode attribute.
36682         (*btst): Rename into...
36683         (*btst<mode>): ...this and adjust.
36684         (*cbranchsi4_btst_insn): Rename into...
36685         (*cbranch<mode>4_btst_insn): ...this and adjust.
36686         (trap): New define_insn.
36687
36688 2017-02-23  Jakub Jelinek  <jakub@redhat.com>
36689
36690         PR tree-optimization/79389
36691         * ifcvt.c (struct noce_if_info): Add rev_cond field.
36692         (noce_reversed_cond_code): New function.
36693         (noce_emit_store_flag): Use rev_cond if non-NULL instead of
36694         reversed_comparison_code.  Formatting fix.
36695         (noce_try_store_flag): Test rev_cond != NULL in addition to
36696         reversed_comparison_code.
36697         (noce_try_store_flag_constants): Likewise.
36698         (noce_try_store_flag_mask): Likewise.
36699         (noce_try_addcc): Use rev_cond if non-NULL instead of
36700         reversed_comparison_code.
36701         (noce_try_cmove_arith): Likewise.  Formatting fixes.
36702         (noce_try_minmax, noce_try_abs): Clear rev_cond.
36703         (noce_find_if_block): Initialize rev_cond.
36704         (find_cond_trap): Call noce_get_condition with then_bb == trap_bb
36705         instead of false as last argument never attempt to reverse it
36706         afterwards.
36707
36708 2017-02-23  Bin Cheng  <bin.cheng@arm.com>
36709
36710         PR tree-optimization/79663
36711         * tree-predcom.c (combine_chains): Process refs in reverse order
36712         only for ZERO length chains, and add explaining comment.
36713
36714 2017-02-23  Jeff Law  <law@redhat.com>
36715
36716         PR tree-optimization/79578
36717         * tree-ssa-dse.c (clear_bytes_written_by): Use OEP_ADDRESS_OF
36718         in call to operand_equal_p.
36719
36720 2017-01-23  Dominique d'Humieres  <dominiq@lps.ens.fr>
36721
36722         PR target/71017
36723         * config/i386/cpuid.h: Fix another undefined behavior.
36724
36725 2017-02-23  Richard Biener  <rguenther@suse.de>
36726
36727         PR tree-optimization/79683
36728         * tree-vect-stmts.c (vect_analyze_stmt): Do not overwrite
36729         vector types for data-refs.
36730
36731 2017-02-23  Martin Liska  <mliska@suse.cz>
36732
36733         * params.def (PARAM_MIN_NONDEBUG_INSN_UID): Change default to 0.
36734
36735 2017-02-23  Jakub Jelinek  <jakub@redhat.com>
36736
36737         PR middle-end/79665
36738         * internal-fn.c (get_range_pos_neg): Moved to ...
36739         * tree.c (get_range_pos_neg): ... here.  No longer static.
36740         * tree.h (get_range_pos_neg): New prototype.
36741         * expr.c (expand_expr_real_2) <case TRUNC_DIV_EXPR>: If both arguments
36742         are known to be in between 0 and signed maximum inclusive, try to
36743         expand both unsigned and signed divmod and use the cheaper one from
36744         those.
36745
36746 2017-02-22  Jeff Law  <law@redhat.com>
36747
36748         PR tree-optimization/79578
36749         * tree-ssa-dse.c (clear_bytes_written_by): Use operand_equal_p
36750         to compare base operands.
36751
36752 2017-02-22  Segher Boessenkool  <segher@kernel.crashing.org>
36753
36754         PR target/79211
36755         * config/rs6000/rs6000.md (*fsel<SFDF:mode><SFDF2:mode>4): Use
36756         gpc_reg_operand instead of fpr_reg_operand.
36757
36758 2017-02-22  Sameera Deshpande  <sameera.deshpande@imgtec.com>
36759
36760         * config/mips/mips.c (mips_return_in_memory): Force FP
36761         vector types to be returned in memory for o32 ABI.
36762
36763 2017-02-22  Jakub Jelinek  <jakub@redhat.com>
36764
36765         * dwarf2out.c (gen_variable_die): For -gdwarf-5, use DW_TAG_variable
36766         instead of DW_TAG_member for static data member declarations and don't
36767         set no_linkage_name for static inline data members.
36768         (gen_member_die): For -gdwarf-5 don't change DW_TAG_variable
36769         to DW_TAG_member.
36770
36771 2017-02-22  Martin Liska  <mliska@suse.cz>
36772
36773         * doc/invoke.texi: Replace inequality signs with square brackets
36774         for -Wnormalized.
36775
36776 2017-02-22  Matthew Fortune  <matthew.fortune@imgtec.com>
36777
36778         PR target/78660
36779         * lra-constraints.c (simplify_operand_subreg): Handle
36780         WORD_REGISTER_OPERATIONS targets.
36781
36782 2017-02-22  Jakub Jelinek  <jakub@redhat.com>
36783
36784         PR target/70465
36785         * reg-stack.c (emit_swap_insn): Treat (float_extend:?F (mem:?F))
36786         and (const_double:?F) like (mem:?F) for the purpose of fxch %st(1)
36787         elimination by swapping fld*.
36788
36789 2017-02-22  Richard Biener  <rguenther@suse.de>
36790
36791         PR tree-optimization/79673
36792         * tree-ssa-pre.c (compute_avail): Use wide_int_to_tree to
36793         convert the [TARGET_]MEM_REF offset INTEGER_CST, scrapping off
36794         irrelevant address-space qualifiers and avoiding a
36795         ADDR_SPACE_CONVERT_EXPR from fold_convert.
36796
36797 2017-02-22  Richard Biener  <rguenther@suse.de>
36798
36799         PR tree-optimization/79666
36800         * tree-vrp.c (extract_range_from_binary_expr_1): Make sure
36801         to not symbolically negate if that may introduce undefined
36802         overflow.
36803
36804 2017-02-22  Martin Liska  <mliska@suse.cz>
36805
36806         PR lto/79587
36807         * data-streamer-in.c (streamer_read_gcov_count): Remove assert.
36808         * data-streamer-out.c (streamer_write_gcov_count_stream):
36809         Likewise.
36810         * value-prof.c (stream_out_histogram_value): Make assert more
36811         precise based on type of counter.
36812
36813 2017-02-21  Uros Bizjak  <ubizjak@gmail.com>
36814
36815         PR target/79593
36816         * config/i386/i386.md (standard_x87sse_constant_load splitter):
36817         Use nonimmediate_operand instead of memory_operand for operand 1.
36818         (float-extend standard_x87sse_constant_load splitter): Ditto.
36819
36820 2017-02-21  Jeff Law  <law@redhat.com>
36821
36822         PR tree-optimization/79621
36823         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Ignore
36824         blocks with edges to themselves.
36825
36826 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
36827
36828         PR target/79633
36829         * tree-chkp-opt.c (chkp_optimize_string_function_calls): Use
36830         is_gimple_call instead of comparing gimple_code with GIMPLE_CALL.
36831         Use gimple_call_builtin_p.
36832
36833         PR target/79570
36834         * sel-sched.c (moveup_expr_cached): Don't call sel_bb_head
36835         on temporarily removed DEBUG_INSNs.
36836
36837         PR tree-optimization/79649
36838         * tree-loop-distribution.c (classify_partition): Give up on
36839         non-generic address space loads/stores.
36840
36841 2017-02-21  Aldy Hernandez  <aldyh@redhat.com>
36842
36843         * doc/loop.texi (Loop manipulation): Remove nonexistent
36844         tree_ssa_loop_version from the documentation.
36845         * cfgloopmanip.c (loop_version): Document CONDITION_BB argument.
36846
36847 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
36848
36849         PR target/79494
36850         * config/i386/i386.c (ix86_expand_split_stack_prologue): Call
36851         make_reg_eh_region_note_nothrow_nononlocal on call_insn.
36852         * config/rs6000/rs6000.c: Include except.h.
36853         (rs6000_expand_split_stack_prologue): Call
36854         make_reg_eh_region_note_nothrow_nononlocal on the call insn.
36855
36856 2017-02-21  Martin Jambor  <mjambor@suse.cz>
36857
36858         PR lto/79579
36859         * ipa-prop.c (ipa_prop_write_jump_functions): Bail out if no edges
36860         have been analyzed.
36861
36862 2017-02-21  Martin Jambor  <mjambor@suse.cz>
36863
36864         * common.opt (-fipa-cp-alignment): Mark as ignored and preserved
36865         for backward compatibility only.
36866         * doc/invoke.texi (Option Summary): Remove all references to
36867         -fipa-cp-alignment.
36868
36869 2017-02-21  Matthew Fortune  <matthew.fortune@imgtec.com>
36870
36871         PR target/78660
36872         Revert:
36873         2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
36874
36875         * lra-constraints.c (curr_insn_transform): Handle
36876         WORD_REGISTER_OPERATIONS requirements when reloading SUBREGs.
36877
36878 2017-02-21  Martin Liska  <mliska@suse.cz>
36879
36880         * config/i386/i386.opt: Replace -masm-dialect with -masm.
36881
36882 2017-02-21  Thomas Schwinge  <thomas@codesourcery.com>
36883
36884         PR translation/79638
36885         * config/nvptx/nvptx.c (ENTRY_TEMPLATE): Single out "%ntid.y".
36886
36887 2017-02-21  Eric Botcazou  <ebotcazou@adacore.com>
36888
36889         PR ada/67205
36890         * config/arm/arm.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define.
36891         (arm_function_ok_for_sibcall): Return false for an indirect call by
36892         descriptor if all the argument registers are used.
36893         (arm_relayout_function): Use FUNCTION_ALIGNMENT macro to adjust the
36894         alignment of the function.
36895
36896 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
36897
36898         PR tree-optimization/61441
36899         * simplify-rtx.c (simplify_const_unary_operation): For
36900         -fsignaling-nans and sNaN operand, return NULL_RTX rather than
36901         the sNaN unmodified.
36902
36903 2017-02-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
36904
36905         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
36906         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
36907         instead of SYSTEM_HEADER_DIR.
36908
36909 2017-02-20  Gerald Pfeifer  <gerald@pfeifer.com>
36910             Martin LiÅ¡ka  <mliska@suse.cz>
36911
36912         * doc/invoke.texi (use-after-scope-direct-emission-threshold):
36913         Fix typos and grammar, use active voice, and clarify.
36914
36915 2017-02-20  Marek Polacek  <polacek@redhat.com>
36916
36917         PR middle-end/79537
36918         * gimplify.c (gimplify_expr): Handle unused *&&L;.
36919
36920         PR sanitizer/79558
36921         * ubsan.c (ubsan_type_descriptor): Check if TYPE_MAX_VALUE is null.
36922
36923 2017-02-20  Jakub Jelinek  <jakub@redhat.com>
36924
36925         PR target/79568
36926         * config/i386/i386.c (ix86_expand_builtin): Handle
36927         OPTION_MASK_ISA_AVX512VL and OPTION_MASK_ISA_64BIT in
36928         ix86_builtins_isa[fcode].isa as a requirement of those
36929         flags and any other flag in the bitmask.
36930         (ix86_init_mmx_sse_builtins): Use 0 instead of
36931         ~OPTION_MASK_ISA_64BIT as mask.
36932         * config/i386/i386-builtin.def (__builtin_ia32_rdtsc,
36933         __builtin_ia32_rdtscp, __builtin_ia32_pause, __builtin_ia32_bsrsi,
36934         __builtin_ia32_rdpmc, __builtin_ia32_rolqi, __builtin_ia32_rolhi,
36935         __builtin_ia32_rorqi, __builtin_ia32_rorhi): Likewise.
36936
36937 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
36938
36939         PR target/78012
36940         * lra-constraints.c (split_reg): Check requested split mode
36941         is supported by the register.
36942
36943 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
36944
36945         * lra-constraints.c (simplify_operand_subreg): Remove early
36946         return false.
36947
36948 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
36949
36950         PR target/78660
36951         * lra-constraints.c (curr_insn_transform): Tighten condition
36952         for converting SUBREG reloads from OP_OUT to OP_INOUT.
36953
36954 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
36955
36956         PR target/78660
36957         * lra-constraints.c (curr_insn_transform): Handle
36958         WORD_REGISTER_OPERATIONS requirements when reloading SUBREGs.
36959
36960 2017-02-19  Uros Bizjak  <ubizjak@gmail.com>
36961
36962         Revert:
36963         2016-05-30  Uros Bizjak  <ubizjak@gmail.com>
36964
36965         * config/i386/sync.md (mfence_nosse): Use "lock orl $0, -4(%esp)".
36966
36967 2017-02-19  Jonathan Wakely  <jwakely@redhat.com>
36968
36969         PR c++/69523
36970         * doc/invoke.texi (C++ Dialect Options) [-Wliteral-suffix]: Update
36971         description.
36972
36973 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
36974
36975         * gimple-pretty-print.c (dump_ternary_rhs): Adjust gimple dump format
36976         for FMA_EXPR.
36977
36978 2017-02-18  Jakub Jelinek  <jakub@redhat.com>
36979
36980         * final.c (last_columnnum, override_columnnum): New variables.
36981         (final_start_function): Set last_columnnum, pass it to begin_prologue
36982         hook and pass 0 to dwarf2out_begin_prologue.
36983         (final_scan_insn): Update override_columnnum.  Pass last_columnnum
36984         to source_line debug hook.
36985         (notice_source_line): Compute last_columnnum and for debug_column_info
36986         return true on column changes.
36987         * debug.h (struct gcc_debug_hooks): Add column argument to
36988         source_line and begin_prologue hooks.
36989         (debug_nothing_int_charstar_int_bool): Remove prototype.
36990         (debug_nothing_int_int_charstar,
36991         debug_nothing_int_int_charstar_int_bool): New prototypes.
36992         (dwarf2out_begin_prologue): Add column argument.
36993         * debug.c (do_nothing_debug_hooks): Adjust source_line and
36994         begin_prologue hooks.
36995         (debug_nothing_int_charstar_int_bool): Remove.
36996         (debug_nothing_int_int_charstar,
36997         debug_nothing_int_int_charstar_int_bool): New functions.
36998         * dwarf2out.c (dwarf2out_begin_prologue): Add column argument, pass it
36999         through to dwarf2out_source_line.
37000         (dwarf2_lineno_debug_hooks): Adjust begin_prologue hook.
37001         (dwarf2out_source_line): Add column argument, emit it if requested.
37002         * sdbout.c (sdbout_source_line, sdbout_begin_prologue): Add column
37003         arguments.
37004         * xcoffout.h (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
37005         * xcoffout.c (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
37006         * vmsdbgout.c (vmsdbgout_begin_prologue): Add column argument, pass it
37007         through to dwarf2out_begin_prologue.
37008         (vmsdbgout_source_line): Add column argument, pass it through to
37009         dwarf2out_source_line.
37010         * dbxout.c (dbxout_begin_prologue): Add column argument, adjust
37011         dbxout_source_line caller.
37012         (dbxout_source_line): Add column argument.
37013
37014         * common.opt (gno-column-info, gcolumn-info): New options.
37015         * dwarf2out.c (dwarf2_lineno_debug_hooks): Formatting fix.
37016         (check_die): Also test for multiple DW_AT_decl_column attributes.
37017         (add_src_coords_attributes, dwarf2out_imported_module_or_decl_1): Add
37018         DW_AT_decl_column if requested.
37019         (gen_subprogram_die): Compare and/or add also DW_AT_decl_column
37020         if requested.
37021         (gen_variable_die): Likewise.
37022         (add_call_src_coords_attributes): Add DW_AT_call_column if requested.
37023         * doc/invoke.texi (-gcolumn-info, -gno-column-info): Document.
37024
37025         PR target/79569
37026         * config/i386/i386.opt (m3dnowa): Replace Undocumented with Report.
37027         * common/config/i386/i386-common.c (OPTION_MASK_ISA_3DNOW_A_SET): Define.
37028         (ix86_handle_option): Handle OPT_m3dnowa.
37029         * doc/invoke.texi (-m3dnowa): Document.
37030         * doc/extend.texi (__builtin_ia32_pmulhuw, __builtin_ia32_pf2iw): Use
37031         -m3dnowa instead of -m3dnow -march=athlon.
37032
37033         PR target/79559
37034         * config/i386/i386.c (ix86_print_operand): Use output_operand_lossage
37035         instead of gcc_assert for K, r and R code checks.  Formatting fixes.
37036
37037 2017-02-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
37038
37039         PR target/79261
37040         * config/rs6000/rs6000.c (rs6000_expand_ternop_builtin): Add
37041         support for CODE_FOR_vsx_xxpermdi_v2d[fi]_be.
37042         * config/rs6000/rs6000.md (reload_gpr_from_vsx<mode>): Call
37043         generator for vsx_xxpermdi_<mode>_be.
37044         * config/rs6000/vsx.md (vsx_xxpermdi_<mode>): Remove logic to
37045         force big-endian semantics.
37046         (vsx_xxpermdi_<mode>_be): New define_expand with same
37047         implementation as previous version of vsx_xxpermdi_<mode>.
37048
37049 2017-02-17  Jakub Jelinek  <jakub@redhat.com>
37050
37051         PR tree-optimization/79327
37052         * gimple-ssa-sprintf.c (format_integer): Remove likely_adjust
37053         variable, its initialization and use.
37054
37055 2017-02-17  Julia Koval  <julia.koval@intel.com>
37056
37057         * common/config/i386/i386-common.c (OPTION_MASK_ISA_RDPID_SET): New.
37058         (OPTION_MASK_ISA_PKU_UNSET): New.
37059         (ix86_handle_option): Handle -mrdpid.
37060         * config/i386/cpuid.h (bit_RDPID): New.
37061         * config/i386/driver-i386.c (host_detect_local_cpu):
37062         Detect RDPID feature.
37063         * config/i386/i386-builtin.def (__builtin_ia32_rdpid): New.
37064         * config/i386/i386-c.c (ix86_target_macros_internal):
37065         Handle RDPID flag.
37066         * config/i386/i386.c (ix86_target_string): Add -mrdpid to isa2_opts.
37067         (ix86_valid_target_attribute_inner_p): Add "rdpid".
37068         (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
37069         * config/i386/i386.h (TARGET_RDPID, TARGET_RDPID_P): New.
37070         * config/i386/i386.md (define_insn "rdpid"): New.
37071         * config/i386/i386.opt Add -mrdpid.
37072         * config/i386/immintrin.h (_rdpid_u32): New.
37073
37074 2017-02-17  Vladimir Makarov  <vmakarov@redhat.com>
37075
37076         PR rtl-optimization/79541
37077         * lra-constraints.c (curr_insn_transform): Remove wrong asm insn
37078         instead of transforming it into USE.
37079
37080 2017-02-17  Segher Boessenkool  <segher@kernel.crashing.org>
37081
37082         * config/rs6000/rs6000.md (extendsfdf2): Remove default arguments.
37083         If HONOR_SNANS (SFmode) force the input to a register.
37084         (*extendsfdf2_fpr): Add !HONOR_SNANS (SFmode) condition.
37085         (*extendsfdf2_snan): New pattern, used when using SNaNs; it generates
37086         an frsp or similar insn.
37087
37088 2017-02-17  Martin Liska  <mliska@suse.cz>
37089
37090         PR rtl-optimization/79577
37091         * params.def (selsched-max-sched-times): Increase minimum to 1.
37092
37093 2017-02-17  Martin Liska  <mliska@suse.cz>
37094
37095         PR rtl-optimization/79574
37096         * gcse.c (want_to_gcse_p): Prevent integer overflow.
37097
37098 2017-02-17  Martin Liska  <mliska@suse.cz>
37099
37100         PR tree-optimization/79529
37101         * tree-ssa-loop-unswitch.c (is_maybe_undefined): Use
37102         ssa_defined_default_def_p to handle cases which are implicitly
37103         defined.
37104         * tree-ssa.c (ssa_defined_default_def_p): New function.
37105         (ssa_undefined_value_p): Use ssa_defined_default_def_p to handle cases
37106         which are implicitly defined.
37107         * tree-ssa.h (ssa_defined_default_def_p): Declare.
37108
37109 2017-02-17  Richard Biener  <rguenther@suse.de>
37110
37111         PR middle-end/79576
37112         * params.def (max-ssa-name-query-depth): Limit to 10.
37113
37114 2017-02-17  Richard Biener  <rguenther@suse.de>
37115
37116         PR tree-optimization/79552
37117         * tree-ssa-structalias.c (visit_loadstore): Properly verify
37118         default defs.
37119
37120 2017-02-17  Richard Biener  <rguenther@suse.de>
37121
37122         PR bootstrap/79567
37123         * genmatch.c (output_line_directive): Handle DIR_SEPARATOR_2.
37124
37125 2017-02-17  Marek Polacek  <polacek@redhat.com>
37126
37127         PR middle-end/79536
37128         * fold-const.c (fold_negate_expr_1): Renamed from fold_negate_expr.
37129         (fold_negate_expr): New wrapper.
37130
37131 2017-02-16  Sandra Loosemore  <sandra@codesourcery.com>
37132
37133         * doc/invoke.texi (C++ Dialect Options) [-Wno-non-template-friend]: 
37134         Correct terminology and de-emphasize pre-standard behavior.
37135
37136 2017-02-16  Alan Modra  <amodra@gmail.com>
37137
37138         PR rtl-optimization/79286
37139         * ira.c (def_dominates_uses): New function.
37140         (update_equiv_regs): Don't create an equivalence for insns that
37141         may trap where the register def does not dominate the use.
37142
37143 2017-02-16  Vladimir Makarov  <vmakarov@redhat.com>
37144
37145         PR rtl-optimization/78127
37146         * lra.c (lra): Call lra_eliminate before finish the loop after
37147         lra_constraint.
37148
37149 2017-02-16  Richard Biener  <rguenther@suse.de>
37150
37151         * graphite.h: Do not include isl/isl_val_gmp.h, instead include
37152         isl/isl_val.h.
37153         * graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): Remove.
37154         (gcc_expression_from_isl_expr_int): Use generic isl_val interface.
37155         * graphite-sese-to-poly.c: Do not include isl/isl_val_gmp.h.
37156         (isl_val_int_from_wi): New function.
37157         (extract_affine_gmp): Rename to ...
37158         (extract_affine_wi): ... this, take a widest_int.
37159         (extract_affine_int): Just wrap extract_affine_wi.
37160         (add_param_constraints): Use isl_val_int_from_wi.
37161         (add_loop_constraints): Likewise, and extract_affine_wi.
37162
37163 2017-02-15  Jeff Law  <law@redhat.com>
37164
37165         PR middle-end/79521
37166         * ira-costs.c (scan_one_insn): Check have_regs_of_mode before calling
37167         ira_init_register_move_cost_if_necessary.
37168
37169 2017-02-15  Martin Sebor  <msebor@redhat.com>
37170
37171         PR middle-end/32003
37172         * doc/invoke.texi (-fdump-final-insns): Replace option accidentally
37173         removed in a prior commit.
37174
37175 2017-02-15  Bin Cheng  <bin.cheng@arm.com>
37176
37177         PR tree-optimization/79347
37178         * tree-vect-loop-manip.c (vect_do_peeling): Maintain profile
37179         counters during peeling.
37180
37181 2017-02-15  Thomas Schwinge  <thomas@codesourcery.com>
37182
37183         * Makefile.in (site.exp): Remove "set ISLVER".
37184
37185 2017-02-15  Jakub Jelinek  <jakub@redhat.com>
37186
37187         PR target/79487
37188         * real.c (real_from_integer): Call real_convert even for decimal.
37189
37190 2017-02-15  Dominik Vogt  <vogt@linux.vnet.ibm.com>
37191
37192         PR target/79421
37193         * config/s390/s390.c: define TARGET_CUSTOM_FUNCTION_DESCRIPTORS.
37194
37195 2017-02-14  Andrew Pinski  <apinski@cavium.com>
37196
37197         * config/aarch64/aarch64-cores.def (thunderx2t99): Move to under 'C"
37198         cores and change the partno/implementer to be correct.
37199         (thunderx2t99p1): New core which replaces thunderx2t99 and still has
37200         the 'B" as the implementer.
37201         * config/aarch64/aarch64-tune.md: Regenerate.
37202
37203 2017-02-14  Carl Love  <cel@us.ibm.com>
37204
37205         * config/rs6000/rs6000.c: Add case statement entry to make the
37206         xvcvuxdsp built-in argument unsigned.
37207         * config/rs6000/vsx.md: Fix the source and return operand types so they
37208         match the instruction definitions from the ISA document.  Fix typo
37209         in the instruction generation for the (define_insn "vsx_xvcvuxdsp"
37210         statement.
37211
37212 2017-02-14  Vladimir Makarov  <vmakarov@redhat.com>
37213
37214         PR target/79282
37215         * lra-int.h (struct lra_operand_data, struct lra_insn_reg): Add
37216         member early_clobber_alts.
37217         * lra-lives.c (reg_early_clobber_p): New.
37218         (process_bb_lives): Use it.
37219         * lra.c (new_insn_reg): New arg early_clobber_alts.  Use it.
37220         (debug_operand_data): Initialize early_clobber_alts.
37221         (setup_operand_alternative): Set up early_clobber_alts.
37222         (collect_non_operand_hard_regs): Ditto.  Pass early clobber
37223         alternatives to new_insn_reg.
37224         (add_regs_to_insn_regno_info): Add arg early_clobber_alts.  Use
37225         it.
37226         (lra_update_insn_regno_info): Pass the new arg.
37227
37228 2017-02-14  Jakub Jelinek  <jakub@redhat.com>
37229
37230         PR middle-end/79505
37231         * omp-offload.c (free_oacc_loop): Release loop->ifns vector.
37232         (new_oacc_loop_raw): Don't clear already cleared fields.
37233
37234         PR target/79481
37235         * config/i386/avx512pfintrin.h (_mm512_prefetch_i32gather_pd,
37236         _mm512_prefetch_i32gather_ps, _mm512_prefetch_i64gather_pd,
37237         _mm512_prefetch_i64gather_ps): New inline functions and macros.
37238
37239 2017-02-14  Uros Bizjak  <ubizjak@gmail.com>
37240
37241         PR target/79495
37242         * config/i386/i386.md (*movxf_internal): Add (o,rC) alternative.
37243
37244 2017-02-14  H.J. Lu  <hongjiu.lu@intel.com>
37245
37246         PR target/79498
37247         * config/i386/i386.c (timode_scalar_chain::convert_insn): Insert
37248         the extra instruction to the right place to store 128-bit constant
37249         when needed.
37250
37251 2017-02-14  Martin Sebor  <msebor@redhat.com>
37252
37253         PR middle-end/79448
37254         * gimple-ssa-sprintf.c (format_directive): Avoid issuing INT_MAX
37255           warning for strings of unknown length.
37256
37257 2017-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
37258
37259         * config.gcc (supported_defaults) [powerpc*-*-*]: Update.
37260
37261 2017-02-14  Jeff Law  <law@redhat.com>
37262
37263         PR target/79404
37264         * ira-costs.c (scan_one_insn): Initialize register move costs
37265         for pseudos seen in USE/CLOBBER insns.
37266
37267         PR tree-optimization/79095
37268         * tree-vrp.c (extract_range_from_binary_expr_1): For EXACT_DIV_EXPR,
37269         if the numerator has the range ~[0,0] make the resultant range ~[0,0].
37270         (extract_range_from_binary_expr): For MINUS_EXPR with no derived range,
37271         if the operands are known to be not equal, then the resulting range
37272         is ~[0,0].
37273         (intersect_ranges): If the new range is ~[0,0] and the old range is
37274         wide, then prefer ~[0,0].
37275         * tree-vrp.c (overflow_comparison_p_1): New function.
37276         (overflow_comparison_p): New function.
37277         * tree-vrp.c (register_edge_assert_for_2): Register additional asserts
37278         if NAME is used in an overflow test.
37279         (vrp_evaluate_conditional_warnv_with_ops): If the ops represent an
37280         overflow check that can be expressed as an equality test, then adjust
37281         ops to be that equality test.
37282
37283 2017-02-14  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
37284
37285         * config/s390/s390-builtin-types.def: Remove flags argument.
37286         * config/s390/s390.c (s390_init_builtins): Likewise.
37287
37288 2017-02-14  Martin Liska  <mliska@suse.cz>
37289
37290         * tree-ssa-loop-unswitch.c (hoist_guard): Release get_loop_body
37291         vector.  Fix trailing white spaces.
37292
37293 2017-02-14  James Greenhalgh  <james.greenhalgh@arm.com>
37294
37295         * config/aarch64/aarch64.c (aarch64_simd_container_mode): Handle
37296         HFmode.
37297
37298 2017-02-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
37299
37300         PR rtl-optimization/68664
37301         * config/arm/arm.c (arm_sched_can_speculate_insn):
37302         New function.  Declare prototype.
37303         (TARGET_SCHED_CAN_SPECULATE_INSN): Define.
37304
37305 2017-02-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
37306
37307         PR rtl-optimization/68664
37308         * config/aarch64/aarch64.c (aarch64_sched_can_speculate_insn):
37309         New function.
37310         (TARGET_SCHED_CAN_SPECULATE_INSN): Define.
37311
37312 2017-02-14  Amit Pawar  <amit.pawar@amd.com>
37313
37314         * config/i386/i386.c (znver1_cost): Fix the alignment for function and
37315         max skip bytes for function, loop and jump.
37316
37317 2017-02-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
37318
37319         * gimple-pretty-print.c (dump_unary_rhs): Adjust dump format for
37320         ABS_EXPR for gimple dump.
37321
37322 2017-02-14  Jakub Jelinek  <jakub@redhat.com>
37323
37324         PR target/79462
37325         * config/sh/sh.c (expand_cbranchdi4): Don't clear operands[4].
37326
37327         PR tree-optimization/79408
37328         * tree-vrp.c (simplify_div_or_mod_using_ranges): Handle also the
37329         case when on TRUNC_MOD_EXPR op0 is INTEGER_CST.
37330         (simplify_stmt_using_ranges): Call simplify_div_or_mod_using_ranges
37331         also if rhs1 is INTEGER_CST.
37332
37333 2017-02-14  Richard Biener  <rguenther@suse.de>
37334
37335         PR middle-end/79432
37336         * tree-into-ssa.c (insert_phi_nodes): When the function can
37337         have abnormal edges rewrite SSA names with broken use-def
37338         dominance out of SSA and register them for PHI insertion.
37339
37340 2017-02-13  Martin Sebor  <msebor@redhat.com>
37341
37342         PR middle-end/79496
37343         * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call): Avoid
37344         clearing info.nowrite flag when snprintf size argument is a range.
37345
37346 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
37347
37348         * cprop.c (cprop_jump): Add missing space in string literal.
37349         * tree-ssa-structalias.c (rewrite_constraints): Likewise.
37350         (get_constraint_for_component_ref): Likewise.
37351         * df-core.c (df_worklist_dataflow_doublequeue): Likewise.
37352         * tree-outof-ssa.c (insert_partition_copy_on_edge): Likewise.
37353         * lra-constraints.c (process_alt_operands): Likewise.
37354         * ipa-inline.c (inline_small_functions): Likewise.
37355         * tree-ssa-sccvn.c (visit_reference_op_store): Likewise.
37356         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
37357         * trans-mem.c (diagnose_tm_1_op): Likewise.
37358         * omp-grid.c (grid_find_single_omp_among_assignments): Likewise.
37359         (grid_parallel_clauses_gridifiable): Likewise.
37360
37361         * config/nvptx/mkoffload.c (process): Add space in between
37362         , and %d.
37363
37364         * config/i386/i386.h (REG_CLASS_NAMES): Add , in between
37365         "MOD4_SSE_REGS" and "ALL_REGS".
37366
37367         * spellcheck.c (test_data): Add , in between "foo" and "food".
37368
37369 2017-02-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
37370
37371         PR target/79449
37372         * config/rs6000/rs6000.c (expand_block_compare): Make sure runtime
37373         boundary crossing check and subsequent code generation agree.
37374
37375 2017-02-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
37376
37377         * config/aarch64/aarch64.c (has_memory_op): Delete.
37378         (aarch64_madd_needs_nop): Use contains_mem_rtx_p instead of
37379         has_memory_op.
37380
37381 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
37382
37383         PR rtl-optimization/79388
37384         PR rtl-optimization/79450
37385         * combine.c (distribute_notes): When removing TEM_INSN for which
37386         corresponding dest has last value recorded, invalidate that last
37387         value.
37388
37389 2017-02-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
37390
37391         * config/arm/arm.c (arm_print_tune_info): Use ASM_COMMENT_START instead
37392         of explicit '@'.  Add missing assembly comment marker on branch costs
37393         printout.
37394
37395 2017-02-13  Nathan Sidwell  <nathan@acm.org>
37396
37397         * gengtype-lex.l (<in_struct>): Add '/'.
37398
37399 2017-02-13  Martin Liska  <mliska@suse.cz>
37400
37401         PR c/79471
37402         * calls.c (expand_call): Replace XALLOCAVEC with XCNEWVEC.
37403
37404 2017-02-13  Richard Biener  <rguenther@suse.de>
37405
37406         * configure.ac (HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS):
37407         Remove.
37408         * configure: Re-generate.
37409         * config.in: Likewise.
37410         * graphite-dependences.c: Simplify as if
37411         HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS was defined.
37412         * graphite-isl-ast-to-gimple.c: Likewise.
37413         * graphite-optimize-isl.c: Likewise.
37414         * graphite-poly.c: Likewise.
37415         * graphite-sese-to-poly.c: Likewise.
37416         * graphite.h: Likewise.
37417         * toplev.c: Include isl/version.h and use isl_version () for
37418         printing the ISL version.
37419         * doc/install.texi: Update ISL requirement.
37420
37421 2017-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
37422
37423         * doc/standards.texi (Standards): Update reference to
37424         Objective-C 2.0.
37425
37426 2017-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
37427
37428         * doc/extend.texi (Named Address Spaces): sourceware.org now
37429         defaults to https.
37430         * doc/install.texi (Binaries): Ditto.
37431         (Specific): Ditto.
37432
37433 2017-02-11  Sandra Loosemore  <sandra@codesourcery.com>
37434
37435         * doc/cpp.texi: Replace "stringify"/"stringification" with C
37436         standard terminology "stringize"/"stringizing" throughout.
37437         * doc/cppinternals.texi: Likewise.
37438
37439 2017-02-11  Sandra Loosemore  <sandra@codesourcery.com>
37440
37441         * doc/extend.texi: Fix some spelling mistakes and typos.
37442         * doc/invoke.texi: Likewise.
37443
37444 2017-02-11  Jan Hubicka  <hubicka@ucw.cz>
37445
37446         PR ipa/79224
37447         * params.def (inline-min-speedup) Change from 10 to 8.
37448
37449 2017-02-11  Jakub Jelinek  <jakub@redhat.com>
37450
37451         * doc/invoke.texi (fopenmp): Bump OpenMP version from 4.0 to
37452         4.5.
37453
37454 2017-02-11  Jan Hubicka  <hubicka@ucw.cz>
37455
37456         PR ipa/79224
37457         * ipa-inline-analysis.c (get_minimal_bb): New function.
37458         (record_modified): Use it.
37459         (remap_edge_change_prob): Handle also ancestor functions.
37460
37461 2017-02-11  Gerald Pfeifer  <gerald@pfeifer.com>
37462
37463         * doc/contrib.texi (Contributors): Remove broken link into
37464         the Mauve CVS repository.
37465
37466 2017-02-11  Jakub Jelinek  <jakub@redhat.com>
37467
37468         PR middle-end/79454
37469         * internal-fn.c (expand_vector_ubsan_overflow): Use piece-wise
37470         result computation whenever lhs doesn't have vector mode, not
37471         just when it has BLKmode.
37472
37473 2017-02-10  Gerald Pfeifer  <gerald@pfeifer.com>
37474
37475         * doc/makefile.texi (profiledbootstrap): Refer to the
37476         installation instructions only in textual form.
37477
37478 2017-02-10  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
37479
37480         PR target/79295
37481         * config/rs6000/altivec.md (bcd<bcd_add_sub>): Fix constraints.
37482
37483 2017-02-10  Gerald Pfeifer  <gerald@pfeifer.com>
37484
37485         * doc/install.texi (Specific): Use https for blackfin.uclinux.org.
37486         (Specific): Update mingw-w64 reference.
37487         (Binaries): Ditto.
37488         (Specific): Remove broken link to Renesas RX processor.
37489
37490 2017-02-10  Richard Biener  <rguenther@suse.de>
37491
37492         * toplev.c (process_options): Do not mention obsolete graphite
37493         options when printing sorry message about missing graphite support.
37494         Mention -floop-nest-optimize.
37495
37496 2017-02-10  Christophe Lyon  <christophe.lyon@linaro.org>
37497
37498         * config/aarch64/arm_neon.h (vtst_p8): Rewrite without asm.
37499         (vtst_p16): Likewise.
37500         (vtstq_p8): Likewise.
37501         (vtstq_p16): Likewise.
37502         (vtst_p64): New.
37503         (vtstq_p64): Likewise.
37504         * config/arm/arm_neon.h (vgetq_lane_p64): New.
37505         (vset_lane_p64): New.
37506         (vsetq_lane_p64): New.
37507
37508 2017-02-10  Jakub Jelinek  <jakub@redhat.com>
37509
37510         PR tree-optimization/79411
37511         * tree-ssa-reassoc.c (is_reassociable_op): Return false if
37512         stmt operands are SSA_NAMEs used in abnormal phis.
37513         (can_reassociate_p): Return false if op is SSA_NAME used in abnormal
37514         phis.
37515
37516 2017-02-09  Jan Hubicka  <hubicka@ucw.cz>
37517
37518         PR ipa/70795
37519         * cgraphunit.c (cgraph_node::add_new_function): Set externally_visible
37520         flag if needed.
37521
37522 2017-02-09  Jan Hubicka  <hubicka@ucw.cz>
37523
37524         * tree-ssa-loop-unswitch.c (hoist_guard): Update profile.
37525
37526 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
37527
37528         * omp-offload.c (oacc_loop_auto_partitions): Use || instead of |
37529         to avoid warning.
37530
37531         PR c/79413
37532         * gimplify.h (is_gimple_sizepos): Only test for INTEGER_CST constants,
37533         not arbitrary TREE_CONSTANT.
37534
37535         PR c/79431
37536         * gimplify.c (gimplify_adjust_omp_clauses): Ignore
37537         "omp declare target link" attribute unless is_global_var.
37538         * omp-offload.c (find_link_var_op): Likewise.
37539
37540 2017-02-09  Nathan Sidwell  <nathan@codesourcery.com>
37541             Chung-Lin Tang  <cltang@codesourcery.com>
37542
37543         * gimplify.c (gimplify_scan_omp_clauses): No special handling for
37544         OMP_CLAUSE_TILE.
37545         (gimplify_adjust_omp_clauses): Don't delete TILE.
37546         (gimplify_omp_for): Deal with TILE.
37547         * internal-fn.c (expand_GOACC_TILE): New function.
37548         * internal-fn.def (GOACC_DIM_POS): Comment may be overly conservative.
37549         (GOACC_TILE): New.
37550         * omp-expand.c (struct oacc_collapse): Add tile and outer fields.
37551         (expand_oacc_collapse_init): Add LOC paramter.  Initialize tile
37552         element fields.
37553         (expand_oacc_collapse_vars): Add INNER parm, adjust for tiling,
37554         avoid DIV for outermost collapse var.
37555         (expand_oacc_for): Insert tile element loop as needed.  Adjust.
37556         Remove out of date comments, fix whitespace.
37557         * omp-general.c (omp_extract_for_data): Deal with tiling.
37558         * omp-general.h (enum oacc_loop_flags): Add OLF_TILE flag,
37559         adjust OLF_DIM_BASE value.
37560         (struct omp_for_data): Add tiling field.
37561         * omp-low.c (scan_sharing_clauses): Allow OMP_CLAUSE_TILE.
37562         (lower_oacc_head_mark): Add OLF_TILE as appropriate.  Ensure 2 levels
37563         for auto loops.  Remove default auto determining, moved to
37564         oacc_loop_fixed_partitions.
37565         * omp-offload.c (struct oacc_loop): Change 'ifns' to vector of call
37566         stmts, add e_mask field.
37567         (oacc_dim_call): New function, abstracted out from oacc_thread_numbers.
37568         (oacc_thread_numbers): Use oacc_dim_call.
37569         (oacc_xform_tile): New.
37570         (new_oacc_loop_raw): Initialize e_mask, adjust for ifns vector.
37571         (finish_oacc_loop): Adjust for ifns vector.
37572         (oacc_loop_discover_walk): Append loop abstraction sites to list,
37573         add case for GOACC_TILE fns.
37574         (oacc_loop_xform_loop): Delete.
37575         (oacc_loop_process): Iterate over call list directly, and add
37576         handling for GOACC_TILE fns.
37577         (oacc_loop_fixed_partitions): Determine default auto, deal with TILE,
37578         dump partitioning.
37579         (oacc_loop_auto_partitions): Add outer_assign parm. Assign all but
37580         vector partitioning to outer loops.  Assign 2 partitions to loops
37581         when available. Add TILE handling.
37582         (oacc_loop_partition): Adjust oacc_loop_auto_partitions call.
37583         (execite_oacc_device_lower): Process GOACC_TILE fns,
37584         ignore unknown specs.
37585         * tree-nested.c (convert_nonlocal_omp_clauses): Allow OMP_CLAUSE_TILE.
37586         * tree.c (omp_clause_num_ops): Adjust TILE ops.
37587         * tree.h (OMP_CLAUSE_TILE_ITERVAR, OMP_CLAUSE_TILE_COUNT): New.
37588
37589 2017-02-09  Gerald Pfeifer  <gerald@pfeifer.com>
37590
37591         * configure.ac (ACX_BUGURL): Update.
37592         * configure: Regenerate.
37593
37594 2017-02-09  Richard Biener  <rguenther@suse.de>
37595
37596         PR tree-optimization/69823
37597         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
37598         Properly enumerate all BBs in the region.  Use auto_vec/auto_bitmap.
37599
37600 2017-02-09  Andrew Burgess  <andrew.burgess@embecosm.com>
37601
37602         * config/arc/arc-c.def: Add __NPS400__ definition.
37603         * config/arc/arc.h (CPP_SPEC): Don't define __NPS400__ here.
37604         (TARGET_NPS400): Define.
37605
37606 2017-02-09  Andrew Burgess  <andrew.burgess@embecosm.com>
37607
37608         * config/arc/arc-arch.h (arc_arch_t): Move unchanged to earlier in
37609         file.
37610         (arc_cpu_t): Change base_architecture field, arch, to a arc_arc_t
37611         pointer, arch_info.
37612         (arc_cpu_types): Fill the arch_info field with a pointer into the
37613         arc_arch_types table.
37614         (arc_selected_cpu): Declare.
37615         * config/arc/arc.c (arc_selected_cpu): Make global.
37616         (arc_selected_arch): Delete.
37617         (arc_base_cpu): Delete.
37618         (arc_override_options): Remove references to deleted variables,
37619         update access to arch information.
37620         (ARC_OPT): Update access to arch information.
37621         (ARC_OPTX): Likewise.
37622         * config/arc/arc.h (arc_base_cpu): Remove declaration.
37623         (TARGET_ARC600): Update access to arch information.
37624         (TARGET_ARC601): Likewise.
37625         (TARGET_ARC700): Likewise.
37626         (TARGET_EM): Likewise.
37627         (TARGET_HS): Likewise.
37628         * config/arc/driver-arc.c (arc_cpu_to_as): Update access to arch
37629         information.
37630
37631 2017-02-08  Pat Haugen  <pthaugen@us.ibm.com>
37632
37633         PR target/78604
37634         * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Invert
37635         condition/operands for integer GE/LE/GEU/LEU operations.
37636
37637 2017-02-08  Segher Boessenkool  <segher@kernel.crashing.org>
37638
37639         PR translation/79397
37640         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Fix spelling
37641         of AltiVec.
37642
37643 2017-02-08  Martin Jambor  <mjambor@suse.cz>
37644
37645         PR ipa/79375
37646         * ipa-prop.c (ipa_alloc_node_params): Make static, return bool
37647         whether allocation happened.
37648         (ipa_initialize_node_params): Do not call ipa_alloc_node_params if
37649         nothing was allocated.
37650
37651 2017-02-08  Jakub Jelinek  <jakub@redhat.com>
37652
37653         PR tree-optimization/79408
37654         * tree-vrp.c (simplify_div_or_mod_using_ranges): If op1 is not
37655         constant, but SSA_NAME with a known integer range, use the minimum
37656         of that range instead of op1 to determine if modulo can be replaced
37657         with its first operand.
37658
37659 2016-02-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
37660
37661         * config/riscv/riscv.c (riscv_build_integer_1): Avoid use of INT16_MAX.
37662
37663 2017-02-08  Richard Biener  <rguenther@suse.de>
37664
37665         PR tree-optimization/71824
37666         * graphite-scop-detection.c (scop_detection::build_scop_breadth):
37667         Check all loops contained in the merged region.
37668
37669 2017-02-07  Andrew Pinski  <apinski@cavium.com>
37670
37671         * config/aarch64/aarch64.md (popcount<mode>2): New pattern.
37672
37673 2017-02-07  Andrew Pinski  <apinski@cavium.com>
37674
37675         * config/aarch64/aarch64-cores.def (thunderx): Disable LSE.
37676         (thunderxt88): Likewise.
37677         (thunderxt81): Disable LSE and change v8.1 to v8.
37678         (thunderxt83): Likewise.
37679
37680 2017-02-07  Jakub Jelinek  <jakub@redhat.com>
37681             Richard Biener  <rguenther@suse.de>
37682
37683         PR middle-end/79399
37684         * ira-int.h (struct target_ira_int): Change x_max_struct_costs_size
37685         type from int to size_t.
37686         * ira-costs.c (struct_costs_size): Change type from int to size_t.
37687
37688 2017-02-07  Jakub Jelinek  <jakub@redhat.com>
37689
37690         PR rtl-optimization/79386
37691         * cprop.c (bypass_conditional_jumps): Initialize
37692         bypass_last_basic_block already before splitting bbs after
37693         unconditional traps...
37694         (bypass_conditional_jumps): ... rather than here.
37695
37696         PR target/79299
37697         * config/i386/sse.md (xtg_mode, gatherq_mode): New mode attrs.
37698         (*avx512f_gathersi<mode>, *avx512f_gathersi<mode>_2,
37699         *avx512f_gatherdi<mode>, *avx512f_gatherdi<mode>_2): Use them,
37700         fix -masm=intel patterns.
37701
37702 2017-02-07  Richard Biener  <rguenther@suse.de>
37703
37704         PR tree-optimization/79256
37705         PR middle-end/79278
37706         * builtins.c (get_object_alignment_2): Use min_align_of_type
37707         to extract alignment for MEM_REFs to honor BIGGEST_FIELD_ALIGNMENT
37708         and ADJUST_FIELD_ALIGN.
37709
37710         * doc/tm.texi.in (ADJUST_FIELD_ALIGN): Adjust to take additional
37711         type parameter.
37712         * doc/tm.texi: Regenerate.
37713         * stor-layout.c (layout_decl): Adjust.
37714         (update_alignment_for_field): Likewise.
37715         (place_field): Likewise.
37716         (min_align_of_type): Likewise.
37717         * config/arc/arc.h (ADJUST_FIELD_ALIGN): Adjust.
37718         * config/epiphany/epiphany.h (ADJUST_FIELD_ALIGN): Likewise.
37719         * config/epiphany/epiphany.c (epiphany_adjust_field_align): Likewise.
37720         * config/frv/frv.h (ADJUST_FIELD_ALIGN): Likewise.
37721         * config/frv/frv.c (frv_adjust_field_align): Likewise.
37722         * config/i386/i386.h (ADJUST_FIELD_ALIGN): Likewise.
37723         * config/i386/i386.c (x86_field_alignment): Likewise.
37724         * config/rs6000/aix.h (ADJUST_FIELD_ALIGN): Likewise.
37725         * config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Likewise.
37726         * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
37727         * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
37728         * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Likewise.
37729         * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p):
37730          Likewise.
37731
37732         Revert
37733         2017-01-30  Richard Biener  <rguenther@suse.de>
37734
37735         PR tree-optimization/79256
37736         * targhooks.c (default_builtin_vector_alignment_reachable): Honor
37737         BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus
37738         alignment on TYPE.
37739
37740 2017-02-07  Toma Tabacu  <toma.tabacu@imgtec.com>
37741
37742         * config/mips/mips.c (mips_expand_builtin_insn): Convert the QImode
37743         argument of the pshufh, psllh, psllw, psrah, psraw, psrlh, psrlw
37744         builtins to SImode and emit a zero-extend, if necessary.
37745
37746 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
37747
37748         * docs/invoke.texi (RISC-V Options): Alphabetize.
37749
37750 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
37751
37752         * doc/invoke.texi (RISC-V Options): Use two spaces to separate
37753         options.
37754
37755 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
37756
37757         * config/riscv/riscv.c: New file.
37758         * common/config/riscv/riscv-common.c: Likewise.
37759         * config.gcc: Likewise.
37760         * config/riscv/constraints.md: Likewise.
37761         * config/riscv/elf.h: Likewise.
37762         * config/riscv/generic.md: Likewise.
37763         * config/riscv/linux.h: Likewise.
37764         * config/riscv/multilib-generator: Likewise.
37765         * config/riscv/peephole.md: Likewise.
37766         * config/riscv/pic.md: Likewise.
37767         * config/riscv/predicates.md: Likewise.
37768         * config/riscv/riscv-builtins.c: Likewise.
37769         * config/riscv/riscv-c.c: Likewise.
37770         * config/riscv/riscv-ftypes.def: Likewise.
37771         * config/riscv/riscv-modes.def: Likewise.
37772         * config/riscv/riscv-opts.h: Likewise.
37773         * config/riscv/riscv-protos.h: Likewise.
37774         * config/riscv/riscv.h: Likewise.
37775         * config/riscv/riscv.md: Likewise.
37776         * config/riscv/riscv.opt: Likewise.
37777         * config/riscv/sync.md: Likewise.
37778         * config/riscv/t-elf-multilib: Likewise.
37779         * config/riscv/t-linux: Likewise.
37780         * config/riscv/t-linux-multilib: Likewise.
37781         * config/riscv/t-riscv: Likewise.
37782         * configure.ac: Likewise.
37783         * doc/contrib.texi: Add Kito Cheng, Palmer Dabbelt, and Andrew
37784         Waterman as RISC-V maintainers.
37785         * doc/install.texi: Add RISC-V entries.
37786         * doc/invoke.texi: Add RISC-V options section.
37787         * doc/md.texi: Add RISC-V constraints section.
37788         * configure: Regenerated.
37789
37790 2017-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
37791
37792         PR target/66144
37793         * config/rs6000/vector.md (vcond<mode><mode>): Allow the true and
37794         false values to be constant vectors with all 0 or all 1 bits set.
37795         (vcondu<mode><mode>): Likewise.
37796         * config/rs6000/predicates.md (vector_int_reg_or_same_bit): New
37797         predicate.
37798         (fpmask_comparison_operator): Update comment.
37799         (vecint_comparison_operator): New predicate.
37800         * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Optimize
37801         vector conditionals when the true and false values are constant
37802         vectors with all 0 bits or all 1 bits set.
37803
37804 2017-02-06  Martin Sebor  <msebor@redhat.com>
37805
37806         PR  tree-optimization/79376
37807         * gimple-fold.c (get_range_strlen): Set the minimum length to zero.
37808
37809 2017-02-06  Uros Bizjak  <ubizjak@gmail.com>
37810
37811         * config/i386/sse.md (vector modes -> vec_extract* splitter): Use
37812         explicit subreg RTX with operand 1.  Use VECTOR_MODE_P predicate
37813         to simplify split condition.
37814
37815 2017-02-06  Jakub Jelinek  <jakub@redhat.com>
37816
37817         * omp-expand.c (oxpand_omp_atomic_fetch_op,
37818         expand_omp_atomic_pipeline): Return false if can_atomic_load_p is
37819         false.
37820
37821 2017-02-06  Segher Boessenkool  <segher@kernel.crashing.org>
37822
37823         PR rtl-optimization/68664
37824         * target.def (can_speculate_insn): New hook.
37825         * doc/tm.texi.in (TARGET_SCHED_CAN_SPECULATE_INSN): New hook.
37826         * doc/tm.texi: Regenerate.
37827         * sched-rgn.c (can_schedule_ready_p): Use the new hook.
37828         * config/rs6000/rs6000.c (TARGET_SCHED_CAN_SPECULATE_INSN): New macro.
37829         (rs6000_sched_can_speculate_insn): New function.
37830
37831 2017-02-06  Jakub Jelinek  <jakub@redhat.com>
37832
37833         PR tree-optimization/79284
37834         * tree-vectorizer.h (VECT_SCALAR_BOOLEAN_TYPE_P): Define.
37835         * tree-vect-stmts.c (vect_get_vec_def_for_operand,
37836         vectorizable_mask_load_store, vectorizable_operation,
37837         vect_is_simple_cond, get_same_sized_vectype): Use it instead
37838         of comparing TREE_CODE of a type against BOOLEAN_TYPE.
37839         * tree-vect-patterns.c (check_bool_pattern, search_type_for_mask_1,
37840         vect_recog_bool_pattern, vect_recog_mask_conversion_pattern): Likewise.
37841         * tree-vect-slp.c (vect_get_constant_vectors): Likewise.
37842         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
37843         Remove redundant gimple_code (stmt) == GIMPLE_ASSIGN test after
37844         is_gimple_assign (stmt).  Replace another such test with
37845         is_gimple_assign (stmt).
37846
37847 2017-02-06  Georg-Johann Lay  <avr@gjlay.de>
37848
37849         PR target/78883
37850         * config/avr/avr.c (rtl-iter.h): Include it.
37851         (TARGET_LEGITIMATE_COMBINED_INSN): New hook define...
37852         (avr_legitimate_combined_insn): ...and implementation.
37853
37854 2017-02-06  Dominik Vogt  <vogt@linux.vnet.ibm.com>
37855
37856         * config/s390/predicates.md ("larl_operand"): Use macros from hwint.h.
37857         * config/s390/s390.c (s390_const_operand_ok)
37858         (s390_canonicalize_comparison, s390_extract_part)
37859         (s390_single_part, s390_contiguous_bitmask_nowrap_p)
37860         (s390_contiguous_bitmask_p, s390_rtx_costs)
37861         (legitimize_pic_address): Likewise.
37862         * config/s390/s390.md ("clzdi2", "clztidi2"): Likewise.
37863         * config/s390/vx-builtins.md ("vec_genbytemaskv16qi")
37864         ("vec_permi<mode>", "vfae<mode>", "*vfaes<mode>", "vstrc<mode>")
37865         ("*vstrcs<mode>"): Use UINTVAL() to set unsigned HOST_WIDE_INT.
37866         * config/s390/vector.md ("vec_vfenes<mode>"): Likewise.
37867
37868 2017-02-06  Georg-Johann Lay  <avr@gjlay.de>
37869
37870         * config/avr/avr.md (*addhi3_zero_extend): Add alternative where
37871         REGNO($0) == REGNO($1).
37872
37873 2017-02-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
37874
37875         * config/s390/linux.h(SIZE_TYPE): Add comment.
37876
37877 2017-02-06  Julian Brown  <julian@codesourcery.com>
37878             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
37879             Virendra Pathak  <virendra.pathak@broadcom.com>
37880
37881         * config/aarch64/aarch64-cores.def: Change the scheduler
37882         to Thunderx2t99.
37883         * config/aarch64/aarch64.md: Include thunderx2t99.md.
37884         * config/aarch64/thunderx2t99.md: New file.
37885
37886 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
37887
37888         * doc/standards.texi (Go Language): Update link to language
37889         standard.
37890
37891 2017-02-05  Jan Hubicka  <hubicka@ucw.cz>
37892
37893         * tree-eh.c (lower_resx): Sanitize profile.
37894         (cleanup_empty_eh_move_lp): Likewise.
37895
37896 2017-02-05  Jan Hubicka  <hubicka@ucw.cz>
37897
37898         PR tree-ssa/79347
37899         * cfgloopmanip.c (lv_adjust_loop_entry_edge, loop_version): Add
37900         ELSE_PROB.
37901         * cfgloopmanip.h (loop_version): Update prototype.
37902         * modulo-sched.c (sms_schedule): Update call of loop_version.
37903         * tree-if-conv.c(version_loop_for_if_conversion): Likewise.
37904         * tree-parloops.c (gen_parallel_loop): Likewise.
37905         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Likewise.
37906         * tree-ssa-loop-split.c (split_loop): Likewise.
37907         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Likewise.
37908         * tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
37909
37910 2017-02-05  Martin Liska  <mliska@suse.cz>
37911
37912         PR bootstrap/78985
37913         * config/s390/s390.c (s390_gimplify_va_arg): Initialize local
37914         variable to NULL.
37915         (print_operand_address): Initialize a struct to zero.
37916
37917 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
37918
37919         * doc/contrib.texi (Contributors): Refer to Hans Boehm's
37920         garbage collector only in textual form.
37921
37922 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
37923
37924         * doc/extend.texi (x86 specific memory model extensions for
37925         transactional memory): Simplify a phrase.
37926
37927 2017-02-05  Eric Botcazou  <ebotcazou@adacore.com>
37928
37929         PR target/79353
37930         * config/sparc/sync.md (atomic_loaddi_1): Replace 'U' constraint with
37931         'r', 'm' constraint with 'T' and !TARGET_ARCH64 with TARGET_ARCH32.
37932         (atomic_storedi_1): Likewise.
37933
37934 2017-02-04  Jakub Jelinek  <jakub@redhat.com>
37935
37936         PR tree-optimization/79338
37937         * tree-parloops.c (gather_scalar_reductions): Don't call
37938         vect_analyze_loop_form for loop->inner before destroying loop's
37939         loop_vinfo.
37940
37941 2017-02-03  Martin Sebor  <msebor@redhat.com>
37942
37943         PR tree-optimization/79327
37944         * gimple-ssa-sprintf.c (tree_digits): Avoid adding the base prefix
37945         when precision has resulted in leading zeros.
37946         (format_integer): Adjust the likely counter to assume an unknown
37947         argument that may be zero is non-zero.
37948
37949 2017-02-03  Jason Merrill  <jason@redhat.com>
37950
37951         PR c++/78689
37952         * tree-inline.c (copy_tree_body_r) [COND_EXPR]: Revert change to
37953         avoid copying non-taken branch.
37954
37955 2017-02-03  Jakub Jelinek  <jakub@redhat.com>
37956
37957         PR tree-optimization/79340
37958         * tree-vect-loop.c (vectorizable_reduction): Release
37959         vec_defs elements after safe_splicing them into other vectors.
37960         Formatting fixes.
37961
37962         PR tree-optimization/79327
37963         * gimple-ssa-sprintf.c (adjust_range_for_overflow): If returning
37964         true, always set *argmin and *argmax to TYPE_{MIN,MAX}_VALUE of
37965         dirtype.
37966         (format_integer): Use wide_int_to_tree instead of build_int_cst
37967         + to_?hwi.  If argmin is NULL, just set argmin and argmax to
37968         TYPE_{MIN,MAX}_VALUE of argtype.  Simplify and fix computation
37969         of shortest and longest sequence.
37970
37971 2017-02-03  Uros Bizjak  <ubizjak@gmail.com>
37972
37973         * config/i386/i386.c (dimode_scalar_chain::convert_reg):
37974         Use pextrd for TARGET_SSE4_1 when creating scalar copy.
37975
37976 2017-02-03  Walter Lee  <walt@tilera.com>
37977
37978         PR target/78862
37979         * config/tilegx/tilegx.md (tilegx_expand_prologue): Add blockage
37980         after initial stackframe link reg save.
37981         * config/tilepro/tilepro.md (tilepro_expand_prologue): Likewise.
37982
37983 2017-02-03  Jakub Jelinek  <jakub@redhat.com>
37984
37985         PR target/79354
37986         * config/rs6000/rs6000.md (movsi_from_sf): Use wb constraint instead of
37987         wu for stxssp alternative.
37988
37989 2017-02-03  Martin Sebor  <msebor@redhat.com>
37990
37991         PR tree-optimization/79352
37992         * gimple-fold.c (get_range_strlen): Add argument.
37993         (get_range_strlen): Change return type to bool.
37994         (get_maxval_strlen): Pass in a dummy argument.
37995         * gimple-fold.h (get_range_strlen): Change return type to bool.
37996         * gimple-ssa-sprintf.c (get_string_length): Set unlikely counter.
37997         * tree.h (array_at_struct_end_p): Add argument.
37998         * tree.c (array_at_struct_end_p): Handle it.
37999
38000 2017-02-03  Martin Liska  <mliska@suse.cz>
38001
38002         PR lto/66295
38003         * multiple_target.c (create_dispatcher_calls): Redirect edge
38004         from a caller of a dispatcher.
38005         (expand_target_clones): Make the clones local.
38006         (ipa_target_clone): Do both target clones and resolvers.
38007         (ipa_dispatcher_calls): Remove the pass.
38008         (pass_dispatcher_calls::gate): Likewise.
38009         (make_pass_dispatcher_calls): Likewise.
38010         * passes.def (pass_target_clone): Put as very first IPA early
38011         pass.
38012
38013 2017-02-03  Martin Liska  <mliska@suse.cz>
38014
38015         * symtab.c (symtab_node::binds_to_current_def_p): Bail out
38016         in case of a function with ifunc attribute.
38017
38018 2017-02-03  Martin Liska  <mliska@suse.cz>
38019
38020         * cgraph.c (cgraph_node::dump): Dump function version info.
38021         * symtab.c (symtab_node::dump_base): Add missing new line.
38022
38023 2017-02-02  Jan Hubicka  <hubicka@ucw.cz>
38024
38025         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): New function.
38026         (ifcombine_ifandif): Use it.
38027
38028 2017-02-03  Martin Liska  <mliska@suse.cz>
38029
38030         * doc/invoke.texi: Document default value for
38031         use-after-scope-direct-emission-threshold.
38032
38033 2017-02-03  Martin Liska  <mliska@suse.cz>
38034
38035         PR tree-optimization/79339
38036         * gimple-ssa-sprintf.c (format_floating_max): Call mpfr_clear.
38037         (format_floating): Likewise.
38038
38039 2017-02-03  Martin Liska  <mliska@suse.cz>
38040
38041         PR ipa/79337
38042         * ipa-prop.c (ipa_node_params_t::insert): Remove current
38043         implementation.
38044         (ipa_node_params_t::remove): Likewise.
38045         * ipa-prop.h (ipa_node_params::ipa_node_params): Make default
38046         initialization from removed ipa_node_params_t::insert.
38047         (ipa_node_params::~ipa_node_params): Move from removed
38048         ipa_node_params_t::release.
38049         * symbol-summary.h (symbol_summary::m_released): New member.
38050         Do not release a summary twice.  Do not allow to call finalizer
38051         for types of a summary that live in GGC memory.
38052
38053 2017-02-02  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
38054
38055         * config/aarch64/aarch64.c (thunderx2t99_tunings): Enable AES and
38056         cmp_branch fusion.
38057
38058 2017-02-02  Martin Sebor  <msebor@redhat.com>
38059
38060         PR middle-end/79275
38061         * gimple-ssa-sprintf.c (get_string_length): Set lower bound to zero.
38062         (format_string): Tighten up the range of output for non-constant
38063         strings and correct the expected range for wide non-constant strings.
38064
38065 2017-02-02  Martin Sebor  <msebor@redhat.com>
38066
38067         * doc/invoke.texi (-maccumulate-args): Fix bad grammar.
38068
38069         PR middle-end/32003
38070         * doc/invoke.texi (-fdump-tree-): Remove pass-specific options from
38071         index.
38072         (-fdump-tree-@var): Add to index and document how to come up
38073         with pass-specific option and dump file names.
38074         (-fdump-passes): Clarify where to look for output.
38075
38076 2017-02-02  Jan Hubicka  <hubicka@ucw.cz>
38077
38078         PR middle-end/77445
38079         * tree-ssa-threadbackward.c (profitable_jump_thread_path): Dump
38080         statistics of the analyzed path; allow threading for speed when
38081         any of BBs along the path are optimized for speed.
38082
38083 2017-02-02  Eric Botcazou  <ebotcazou@adacore.com>
38084
38085         PR middle-end/78468
38086         * emit-rtl.c (init_emit): Add ??? comment for problematic alignment
38087         settings of the virtual registers.
38088
38089         Revert again
38090         2016-08-23  Dominik Vogt  <vogt@linux.vnet.ibm.com>
38091
38092         * explow.c (get_dynamic_stack_size): Take known alignment of stack
38093         pointer + STACK_DYNAMIC_OFFSET into account when calculating the size
38094         needed.
38095
38096 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
38097
38098         * config/s390/vx-builtins.md ("vec_ceil", "vec_floor")
38099         ("vec_trunc", "vec_roundc", "vec_round"): Remove expanders.
38100
38101 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
38102
38103         * config/s390/s390.md: Add missing comments with the expanded
38104         mnemonics.
38105         * config/s390/vector.md: Likewise.
38106         * config/s390/vx-builtins.md: Likewise.
38107
38108 2017-02-02  Jakub Jelinek  <jakub@redhat.com>
38109
38110         PR target/79197
38111         * config/rs6000/rs6000.md (*fixuns_trunc<mode>di2_fctiduz): Rename to ...
38112         (fixuns_trunc<mode>di2): ... this, remove previous expander.  Put all
38113         conditions on a single line.
38114
38115 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
38116
38117         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename
38118         __S390_VX__ to __VX__.
38119
38120 2017-02-01  Andrew Pinski  <apinski@cavium.com>
38121
38122         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost): Pass
38123         stmt_info to record_stmt_cost.
38124         (vect_get_known_peeling_cost): Pass stmt_info if known to
38125         record_stmt_cost.
38126         * config/aarch64/aarch64-protos.h (cpu_vector_cost): Split
38127         cpu_vector_cost field into
38128         scalar_int_stmt_cost and scalar_fp_stmt_cost.  Split vec_stmt_cost
38129         field into vec_int_stmt_cost and vec_fp_stmt_cost.
38130         * config/aarch64/aarch64.c (generic_vector_cost): Update for the
38131         splitting of scalar_stmt_cost and vec_stmt_cost.
38132         (thunderx_vector_cost): Likewise.
38133         (cortexa57_vector_cost): LIkewise.
38134         (exynosm1_vector_cost): Likewise.
38135         (xgene1_vector_cost): Likewise.
38136         (thunderx2t99_vector_cost): Improve after the splitting of the two
38137         fields.
38138         (aarch64_builtin_vectorization_cost): Update for the splitting of
38139         scalar_stmt_cost and vec_stmt_cost.
38140
38141 2017-02-01  Torvald Riegel  <triegel@redhat.com>
38142             Richard Henderson  <rth@redhat.com>
38143
38144         * builtins.c (fold_builtin_atomic_always_lock_free): Make "lock-free"
38145         conditional on existance of a fast atomic load.
38146         * optabs-query.c (can_atomic_load_p): New function.
38147         * optabs-query.h (can_atomic_load_p): Declare it.
38148         * optabs.c (expand_atomic_exchange): Always delegate to libatomic if
38149         no fast atomic load is available for the particular size of access.
38150         (expand_atomic_compare_and_swap): Likewise.
38151         (expand_atomic_load): Likewise.
38152         (expand_atomic_store): Likewise.
38153         (expand_atomic_fetch_op): Likewise.
38154         * testsuite/lib/target-supports.exp
38155         (check_effective_target_sync_int_128): Remove x86 because it provides
38156         no fast atomic load.
38157         (check_effective_target_sync_int_128_runtime): Likewise.
38158
38159 2017-02-01  Richard Biener  <rguenther@suse.de>
38160
38161         * graphite.c: Include tree-vectorizer.h for find_loop_location.
38162         (graphite_transform_loops): Provide opt-info for optimized nests.
38163         * tree-parloop.c (parallelize_loops): Provide opt-info for
38164         parallelized loops.
38165
38166 2017-02-01  Richard Biener  <rguenther@suse.de>
38167
38168         PR middle-end/79315
38169         * tree-cfg.c (move_stmt_op): Never set TREE_BLOCK when it
38170         was not set before.
38171
38172 2017-02-01  Richard Biener  <rguenther@suse.de>
38173
38174         PR tree-optimization/71824
38175         * graphite-scop-detection.c (scop_detection::build_scop_breadth):
38176         Verify the loops are valid in the merged SESE region.
38177         (scop_detection::can_represent_loop_1): Check analyzing the
38178         evolution of the number of iterations in the region succeeds.
38179
38180 2017-01-31  Ian Lance Taylor  <iant@golang.org>
38181
38182         * config/i386/i386.c (ix86_expand_split_stack_prologue): Add
38183         REG_ARGS_SIZE note to 32-bit push insns and call insn.
38184
38185 2017-01-31  David Malcolm  <dmalcolm@redhat.com>
38186
38187         PR preprocessor/79210
38188         * input.c (get_substring_ranges_for_loc): Replace line_width
38189         assertion with error-handling.
38190
38191 2017-01-31  Richard Biener  <rguenther@suse.de>
38192
38193         PR tree-optimization/77318
38194         * graphite-sese-to-poly.c (extract_affine): Fix assert.
38195         (create_pw_aff_from_tree): Take loop parameter.
38196         (add_condition_to_pbb): Pass loop of the condition to
38197         create_pw_aff_from_tree.
38198
38199 2017-01-31  Jakub Jelinek  <jakub@redhat.com>
38200
38201         * config/s390/s390.c (s390_asan_shadow_offset): New function.
38202         (TARGET_ASAN_SHADOW_OFFSET): Redefine.
38203
38204 2017-01-31  Michael Meissner  <meissner@linux.vnet.ibm.com>
38205
38206         PR target/78597
38207         PR target/79038
38208         * config/rs6000/rs6000-protos.h (convert_float128_to_int): Delete,
38209         no longer used.
38210         (convert_int_to_float128): Likewise.
38211         * config/rs6000/rs6000.c (convert_float128_to_int): Likewise.
38212         (convert_int_to_float128): Likewise.
38213         * config/rs6000/rs6000.md (UNSPEC_IEEE128_MOVE): Likewise.
38214         (UNSPEC_IEEE128_CONVERT): Likewise.
38215         (floatsi<mode>2, FLOAT128 iterator): Bypass calling
38216         rs6000_expand_float128_convert if we have IEEE 128-bit hardware.
38217         Use local variables for IBM extended format.
38218         (fix_trunc<mode>si2, FLOAT128 iterator): Likewise.
38219         (fix_trunc<mode>si2_fprs): Likewise.
38220         (fixuns_trunc<IEEE128:mode><SDI:mode>2): Likewise.
38221         (floatuns<IEEE128:mode>2, IEEE128 iterator): Likewise.
38222         (fix<uns>_<mode>si2_hw): Rework the IEEE 128-bt hardware support
38223         to know that we can now have integers of all sizes in vector
38224         registers.
38225         (fix<uns>_<mode>di2_hw): Likewise.
38226         (float<uns>_<mode>si2_hw): Likewise.
38227         (fix_<mode>si2_hw): Likewise.
38228         (fixuns_<mode>si2_hw): Likewise.
38229         (float<uns>_<mode>di2_hw): Likewise.
38230         (float_<mode>di2_hw): Likewise.
38231         (float_<mode>si2_hw): Likewise.
38232         (floatuns_<mode>di2_hw): Likewise.
38233         (floatuns_<mode>si2_hw): Likewise.
38234         (xscvqp<su>wz_<mode>): Delete, no longer used.
38235         (xscvqp<su>dz_<mode>): Likewise.
38236         (xscv<su>dqp_<mode>): Likewise.
38237         (ieee128_mfvsrd_64bit): Likewise.
38238         (ieee128_mfvsrd_32bit): Likewise.
38239         (ieee128_mfvsrwz): Likewise.
38240         (ieee128_mtvsrw): Likewise.
38241         (ieee128_mtvsrd_64bit): Likewise.
38242         (ieee128_mtvsrd_32bit): Likewise.
38243
38244 2017-01-31  Martin Liska  <mliska@suse.cz>
38245
38246         PR ipa/79285
38247         * ipa-prop.c (ipa_free_all_node_params): Call release method
38248         instead of ~sumbol_summary to not to trigger double times
38249         dtor of hash_map.
38250
38251 2017-01-31  Aldy Hernandez  <aldyh@redhat.com>
38252
38253         PR tree-optimization/71691
38254         * bitmap.h (class auto_bitmap): New.
38255         * tree-ssa-loop-unswitch.c (tree_may_unswitch_on): Call
38256         is_maybe_undefined instead of ssa_undefined_value_p.
38257
38258 2017-01-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
38259
38260         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename
38261         __S390_ARCH_LEVEL__ to __ARCH__.
38262
38263 2017-01-31  Jakub Jelinek  <jakub@redhat.com>
38264
38265         PR tree-optimization/79267
38266         * value-prof.c (gimple_ic): Only drop lhs for noreturn calls
38267         if should_remove_lhs_p is true.
38268
38269 2017-01-30  Alexandre Oliva  <aoliva@redhat.com>
38270
38271         PR debug/63238
38272         * dwarf2out.c (clone_as_declaration): Drop DW_AT_alignment.
38273         (add_alignment_attribute): New.
38274         (base_type_die): Add alignment attribute.
38275         (subrange_type_die): Likewise.
38276         (modified_type_die): Likewise.
38277         (gen_array_type_die): Likewise.
38278         (gen_descr_array_type_die: Likewise.
38279         (gen_enumeration_type_die): Likewise.
38280         (gen_subprogram_die): Likewise.
38281         (gen_variable_die): Likewise.
38282         (gen_field_die): Likewise.
38283         (gen_ptr_to_mbr_type_die): Likewise.
38284         (gen_struct_or_union_type_die): Likewise.
38285         (gen_subroutine_type_die): Likewise.
38286         (gen_typedef_die): Likewise.
38287         (base_type_cmp): Compare alignment attribute.
38288
38289 2017-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
38290
38291         PR target/79170
38292         * config/rs6000/altivec.md (*setb_internal): Rename to setb_signed.
38293         (setb_unsigned) New pattern for setb with CCUNS.
38294         * config/rs6000/rs6000.c (expand_block_compare): Use a different
38295         subfc./subfe sequence to avoid overflow problems.  Generate a
38296         shorter sequence with cmpld/setb for power9.
38297         * config/rs6000/rs6000.md (subf<mode>3_carry_dot2): Add a new pattern
38298         for generating subfc. instruction.
38299         (cmpstrsi): Add TARGET_POPCNTD predicate as the generate sequence
38300         now uses this instruction.
38301
38302 2017-01-30  Ian Lance Taylor  <iant@google.com>
38303
38304         PR debug/79289
38305         * dwarf2out.c (gen_type_die_with_usage): When picking a variant
38306         for FUNCTION_TYPE/METHOD_TYPE, use the first matching one.
38307
38308 2017-01-30  Martin Sebor  <msebor@redhat.com>
38309
38310         * gimple-ssa-sprintf.c (fmtresult::adjust_for_width_or_precision):
38311         Move constant to the right of a relational operator.
38312         (get_mpfr_format_length, format_character, format_string): Ditto.
38313         (should_warn_p, maybe_warn): Same.
38314
38315         * doc/invoke.texi (-Wformat-truncation=1): Fix typo.
38316
38317 2017-01-30  Maxim Ostapenko  <m.ostapenko@samsung.com>
38318
38319         PR lto/79061
38320         * asan.c (get_translation_unit_decl): Remove function.
38321         (asan_add_global): Force has_dynamic_init to zero in LTO mode.
38322
38323 2017-01-30  Martin Liska  <mliska@suse.cz>
38324
38325         PR gcov-profile/79259
38326         * opts.c (common_handle_option): Enable flag_ipa_bit_cp w/
38327         -fprofile-generate.
38328
38329 2017-01-30  Martin Liska  <mliska@suse.cz>
38330
38331         PR bootstrap/78985
38332         * config/aarch64/cortex-a57-fma-steering.c (func_fma_steering::analyze):
38333         Initialize variables with NULL value.
38334
38335 2017-01-30  Richard Earnshaw  <rearnsh@arm.com>
38336
38337         PR target/79260
38338         * config.gcc (arm*-*-*): Add arm/arm-flags.h and arm/arm-isa.h to
38339         tm_p_file.
38340         * arm/arm-protos.h: Don't directly include arm-flags.h and arm-isa.h.
38341
38342 2017-01-30  Richard Biener  <rguenther@suse.de>
38343
38344         PR tree-optimization/79276
38345         * tree-vrp.c (process_assert_insertions): Properly adjust common
38346         when removing a duplicate.
38347
38348 2017-01-30  Richard Biener  <rguenther@suse.de>
38349
38350         PR tree-optimization/79256
38351         * targhooks.c (default_builtin_vector_alignment_reachable): Honor
38352         BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus
38353         alignment on TYPE.
38354         * tree.c (build_aligned_type): Set TYPE_USER_ALIGN.
38355
38356 2017-01-30  Dominik Vogt  <vogt@linux.vnet.ibm.com>
38357
38358         PR target/79240
38359         * config/s390/s390.md ("*r<noxa>sbg_<mode>_srl_bitmask")
38360         ("*r<noxa>sbg_<mode>_sll_bitmask")
38361         ("*extzv_<mode>_srl<clobbercc_or_nocc>")
38362         ("*extzv_<mode>_sll<clobbercc_or_nocc>"):
38363         Use contiguous_bitmask_nowrap_operand.
38364
38365 2017-01-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
38366
38367         PR target/79268
38368         * config/rs6000/altivec.h (vec_xl): Revise #define.
38369         (vec_xst): Likewise.
38370
38371 2017-01-27  Uros Bizjak  <ubizjak@gmail.com>
38372
38373         * config/i386/i386.c (print_reg): Use REGNO instead of true_regnum.
38374
38375 2017-01-27  Bernd Schmidt  <bschmidt@redhat.com>
38376
38377         PR rtl-optimization/79194
38378         * cprop.c (one_cprop_pass): Move deletion of code after unconditional
38379         traps before call to bypass_conditional_jumps.
38380
38381 2017-01-27  Vladimir Makarov  <vmakarov@redhat.com>
38382
38383         PR tree-optimization/71374
38384         * lra-constraints.c (check_conflict_input_operands): New.
38385         (match_reload): Use it.
38386
38387 2017-01-27  Vladimir Makarov  <vmakarov@redhat.com>
38388
38389         PR target/79131
38390         * lra-assigns.c (find_hard_regno_for_1): Take endianess for into
38391         account to calculate conflict_set.
38392
38393 2017-01-27  Bin Cheng  <bin.cheng@arm.com>
38394
38395         PR rtl-optimization/78559
38396         * combine.c (try_combine): Discard REG_EQUAL and REG_EQUIV for
38397         other_insn in combine.
38398
38399 2017-01-27  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
38400
38401         * builtin-types.def: Use unsigned_char_type_node for BT_UINT8.  Use
38402         uint16_type_node for BT_UINT16.
38403
38404 2017-01-27  David Malcolm  <dmalcolm@redhat.com>
38405
38406         * doc/sourcebuild.texi (Testsuites): Add "GIMPLE Tests" and
38407         "RTL Tests" to menu.
38408         (GIMPLE Tests): New node.
38409         (RTL Tests): New node.
38410
38411 2017-01-27  Richard Biener  <rguenther@suse.de>
38412
38413         PR tree-optimization/79245
38414         * tree-loop-distribution.c (distribute_loop): Apply cost
38415         modeling also to detected patterns.
38416
38417 2017-01-27  Richard Biener  <rguenther@suse.de>
38418
38419         PR tree-optimization/71433
38420         * tree-vrp.c (register_new_assert_for): Revert earlier changes.
38421         (compare_assert_loc): New function.
38422         (process_assert_insertions): Sort and optimize assert locations
38423         to remove duplicates and push down identical assertions on
38424         edges to their destination block.
38425
38426 2017-01-27  Richard Biener  <rguenther@suse.de>
38427
38428         PR tree-optimization/79244
38429         * tree-vrp.c (remove_range_assertions): Forcefully propagate
38430         out SSA names even if abnormal.
38431
38432 2017-01-27  Jakub Jelinek  <jakub@redhat.com>
38433
38434         * realmpfr.h: Poison MPFR_RND{N,Z,U,D}.
38435         * gimple-ssa-sprintf.c (format_floating_max): Use GMP_RNDN
38436         instead of MPFR_RNDN.
38437
38438 2017-01-27  Richard Earnshaw  <rearnsha@arm.com>
38439
38440         PR target/79239
38441         * arm.c (arm_option_override): Don't call build_target_option_node
38442         until after doing all option overrides.
38443         (arm_valid_target_attribute_tree): Likewise.
38444
38445 2017-01-27  Martin Liska  <mliska@suse.cz>
38446
38447         * doc/invoke.texi (-fprofile-arcs): Document profiling support
38448         for {cd}tors and C++ {cd}tors.
38449
38450 2017-01-27  Dominik Vogt  <vogt@linux.vnet.ibm.com>
38451
38452         * config/s390/s390.md ("*setmem_long_and")
38453         ("*setmem_long_and_31z"): Use zero_extend instead of and.
38454
38455 2017-01-26  Martin Sebor  <msebor@redhat.com>
38456
38457         * gimple-ssa-sprintf.c (format_floating): Simplify the computation
38458         of precision.
38459
38460 2017-01-26  Martin Sebor  <msebor@redhat.com>
38461
38462         * gimple-ssa-sprintf.c (format_floating): Test HAVE_XFmode and
38463         HAVE_DFmode before using XFmode or DFmode.
38464         (parse_directive): Avoid using the z length modifier to avoid
38465         the ISO C++98 does not support the â€˜z’ gnu_printf length modifier.
38466
38467         PR middle-end/78703
38468         * gimple-ssa-sprintf.c (adjust_for_width_or_precision): Change
38469         to accept adjustment as an array.
38470         (get_int_range): New function.
38471         (struct directive): Make width and prec arrays.
38472         (directive::set_width, directive::set_precision): Call get_int_range.
38473         (format_integer, format_floating): Handle width and precision ranges.
38474         (format_string, parse_directive): Same.
38475
38476 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
38477
38478         PR debug/79129
38479         * dwarf2out.c (generate_skeleton_bottom_up): For children with
38480         comdat_type_p set, just clone them, but keep the children in the
38481         original DIE.
38482
38483         PR debug/78835
38484         * dwarf2out.c (prune_unused_types): Mark all functions with DIEs
38485         which have direct callers with -fvar-tracking-assignments enabled
38486         in the current TU.
38487         (resolve_addr): Avoid adding skeleton DIEs for DW_AT_call_origin
38488         inside of type units.
38489
38490 2017-01-26  Martin Sebor  <msebor@redhat.com>
38491
38492         PR middle-end/78703
38493         * gimple-ssa-sprintf.c (struct result_range): Add likely and
38494         unlikely counters.
38495         (struct format_result): Replace number_chars, number_chars_min,
38496         and number_chars_max with a single member of struct result_range.
38497         Remove bounded.
38498         (format_result::operator+=): Adjust.
38499         (struct fmtresult): Remove bounded.  Handle likely and unlikely
38500         counters.
38501         (fmtresult::adjust_for_width_or_precision): New function.
38502         (fmtresult:type_max_digits): New function.
38503         (bytes_remaining): Handle likely and unlikely counters.
38504         (min_bytes_remaining): Remove.
38505         (format_percent): Simplify.
38506         (format_integer, format_floating): Set likely and unlikely counters.
38507         (get_string_length, format_character, format_string): Same.
38508         (format_plain, should_warn_p): New function.
38509         (maybe_warn): Call should_warn_p.  Update diagnostic messages
38510         and handle those for all directives, including plain strings.
38511         (format_directive): Handle likely and unlikely counters.
38512         Remove unnecessary quoting from diagnostics.  Add an informational
38513         note.
38514         (add_bytes): Remove.
38515         (pass_sprintf_length::compute_format_length): Simplify.
38516         (try_substitute_return_value): Handle likely and unlikely counters.
38517
38518 2017-01-26  Carl Love  <cel@us.ibm.com>
38519
38520         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Remove
38521         bogus entries for the P8V_BUILTIN_VEC_VGBBD built-ins
38522
38523 2017-01-26  Vladimir Makarov  <vmakarov@redhat.com>
38524
38525         PR target/79131
38526         * lra-assigns.c (setup_live_pseudos_and_spill_after_risky): Take
38527         endianess for subregs into account.
38528         * lra-constraints.c (lra_constraints): Do risky transformations
38529         always on the first iteration.
38530         * lra-lives.c (check_pseudos_live_through_calls): Add arg
38531         last_call_used_reg_set.
38532         (process_bb_lives): Define and use last_call_used_reg_set.
38533         * lra.c (lra): Always continue after lra_constraints on the first
38534         iteration.
38535
38536 2017-01-26  Kirill Yukhin  <kirill.yukhin@gmail.com>
38537
38538         * gcc.target/i386/avx512bw-kshiftlq-2.c: Use unsigned long long
38539         constant.
38540         * gcc.target/i386/avx512bw-kshiftrq-2.c: Ditto.
38541
38542 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
38543
38544         * config/i386/avx512fintrin.h (_ktest_mask16_u8,
38545         _ktestz_mask16_u8, _ktestc_mask16_u8, _kadd_mask16): Move to ...
38546         * config/i386/avx512dqintrin.h (_ktest_mask16_u8,
38547         _ktestz_mask16_u8, _ktestc_mask16_u8, _kadd_mask16): ... here.
38548         * config/i386/i386-builtin.def (__builtin_ia32_ktestchi,
38549         __builtin_ia32_ktestzhi, __builtin_ia32_kaddhi): Use
38550         OPTION_MASK_ISA_AVX512DQ instead of OPTION_MASK_ISA_AVX512F.
38551         * config/i386/sse.md (SWI1248_AVX512BWDQ2): New mode iterator.
38552         (kadd<mode>, ktest<mode>): Use it instead of SWI1248_AVX512BWDQ.
38553
38554 2017-01-26  Marek Polacek  <polacek@redhat.com>
38555
38556         PR c/79199
38557         * fold-const.c (operand_equal_p) [COND_EXPR]: Use OP_SAME_WITH_NULL
38558         for the third operand.
38559
38560 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
38561
38562         PR middle-end/79236
38563         * omp-low.c (struct omp_context): Add simt_stmt field.
38564         (scan_omp_for): Return omp_context *.
38565         (scan_omp_simd): Set simt_stmt on the non-_simt_ SIMD
38566         context to the _simt_ SIMD stmt.
38567         (lower_omp_for): For combined SIMD with sibling _simt_
38568         SIMD, make sure to use the same decls in _looptemp_
38569         clauses as in the sibling.
38570
38571 2017-01-26  David Sherwood  <david.sherwood@arm.com>
38572
38573         PR middle-end/79212
38574         * gimplify.c (omp_notice_variable): Add GOVD_SEEN flag to variables in
38575         all contexts.
38576
38577 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
38578
38579         PR target/70465
38580         * reg-stack.c (emit_swap_insn): Instead of fld a; fld b; fxchg %st(1);
38581         emit fld b; fld a; if possible.
38582
38583         * brig-builtins.def: Update copyright years.
38584         * config/arm/arm_acle_builtins.def: Update copyright years.
38585
38586 2017-01-25  Michael Meissner  <meissner@linux.vnet.ibm.com>
38587
38588         PR target/79179
38589         * config/rs6000/vsx.md (vsx_extract_<mode>_store): Use wY
38590         constraint instead of o for the stxsd instruction.
38591
38592 2017-01-25  Carl Love  <cel@us.ibm.com>
38593
38594         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Fix order
38595         of entries for ALTIVEC_BUILTIN_VEC_PACKS and P8V_BUILTIN_VEC_VGBBD.
38596
38597 2017-01-25  Jonathan Wakely  <jwakely@redhat.com>
38598
38599         * doc/invoke.texi (C++ Dialect Options): Fix typo.
38600
38601 2017-01-25  Richard Biener  <rguenther@suse.de>
38602
38603         PR tree-optimization/69264
38604         * target.def (vector_alignment_reachable): Improve documentation.
38605         * doc/tm.texi: Regenerate.
38606         * targhooks.c (default_builtin_vector_alignment_reachable): Simplify
38607         and add a comment.
38608         * tree-vect-data-refs.c (vect_supportable_dr_alignment): Revert
38609         earlier changes with respect to TYPE_USER_ALIGN.
38610         (vector_alignment_reachable_p): Likewise.  Improve dumping.
38611
38612 2016-01-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
38613
38614         PR target/79145
38615         * config/arm/arm.md (xordi3): Force constant operand into a register
38616         for TARGET_IWMMXT.
38617
38618 2016-01-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
38619
38620         * doc/invoke.texi (-fstore-merging): Correct default optimization
38621         levels at which it is enabled.
38622         (-O): Move -fstore-merging from list to...
38623         (-O2): ... Here.
38624
38625 2017-01-25  Richard Biener  <rguenther@suse.de>
38626
38627         PR debug/78363
38628         * omp-expand.c: Include debug.h.
38629         (expand_omp_taskreg): Make sure to generate early debug before
38630         outlining anything from a function.
38631         (expand_omp_target): Likewise.
38632         (grid_expand_target_grid_body): Likewise.
38633
38634 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
38635
38636         PR lto/79061
38637         * asan.c (get_translation_unit_decl): New function.
38638         (asan_add_global): Extract modules file name from globals
38639         TRANSLATION_UNIT_DECL name.
38640
38641 2017-01-24  Eric Botcazou  <ebotcazou@adacore.com>
38642
38643         PR target/77439
38644         * config/arm/arm.c (arm_function_ok_for_sibcall): Add back restriction
38645         for long calls with APCS frame and VFP.
38646
38647 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
38648
38649         * cfg.c (original_copy_tables_initialized_p): New function.
38650         * cfg.h (original_copy_tables_initialized_p): New decl.
38651         * cfgrtl.c (relink_block_chain): Guard the call to
38652         free_original_copy_tables with a call to
38653         original_copy_tables_initialized_p.
38654         * cgraph.h (symtab_node::native_rtl_p): New decl.
38655         * cgraphunit.c (symtab_node::native_rtl_p): New function.
38656         (symtab_node::needed_p): Don't assert for early assembly output
38657         for __RTL functions.
38658         (cgraph_node::finalize_function): Set "force_output" for __RTL
38659         functions.
38660         (cgraph_node::analyze): Bail out early for __RTL functions.
38661         (analyze_functions): Update assertion to support __RTL functions.
38662         (cgraph_node::expand): Bail out early for __RTL functions.
38663         * final.c (rest_of_clean_state): Don't call delete_tree_ssa for
38664         __RTL functions.
38665         * function.h (struct function): Update comment for field
38666         "pass_startwith".
38667         * gimple-expr.c: Include "tree-pass.h".
38668         (gimple_has_body_p): Return false for __RTL functions.
38669         * Makefile.in (OBJS): Add run-rtl-passes.o.
38670         * pass_manager.h (gcc::pass_manager::get_rest_of_compilation): New
38671         accessor.
38672         (gcc::pass_manager::get_clean_slate): New accessor.
38673         * passes.c: Include "insn-addr.h".
38674         (should_skip_pass_p): Add logging.  Update logic for running
38675         "expand" to be compatible with both __GIMPLE and __RTL.  Guard
38676         property-provider override so it is only done for gimple passes.
38677         Don't skip dfinit.
38678         (skip_pass): New function.
38679         (execute_one_pass): Call skip_pass when skipping passes.
38680         * read-md.c (md_reader::read_char): Support filtering
38681         the input to a subset of line numbers.
38682         (md_reader::md_reader): Initialize fields
38683         m_first_line and m_last_line.
38684         (md_reader::read_file_fragment): New function.
38685         * read-md.h (md_reader::read_file_fragment): New decl.
38686         (md_reader::m_first_line): New field.
38687         (md_reader::m_last_line): New field.
38688         * read-rtl-function.c (function_reader::create_function): Only
38689         create cfun if it doesn't already exist.  Set PROP_rtl on cfun's
38690         curr_properties.  Set DECL_INITIAL to a dummy block.
38691         (read_rtl_function_body_from_file_range): New function.
38692         * read-rtl-function.h (read_rtl_function_body_from_file_range):
38693         New decl.
38694         * run-rtl-passes.c: New file.
38695         * run-rtl-passes.h: New file.
38696
38697 2017-01-24  Jeff Law  <law@redhat.com>
38698
38699         * config/microblaze/microblaze.h (ASM_FORMAT_PRIVATE_NAME): Increase
38700         buffer size.
38701
38702 2017-01-24  Bin Cheng  <bin.cheng@arm.com>
38703
38704         PR tree-optimization/79159
38705         * tree-ssa-loop-niter.c (get_cst_init_from_scev): New function.
38706         (record_nonwrapping_iv): Improve boundary using above function if no
38707         value range information.
38708
38709 2017-01-24  Pekka Jääskeläinen  <pekka@parmance.com>
38710             Martin Jambor  <mjambor@suse.cz>
38711
38712         * brig-builtins.def: New file.
38713         * builtins.def (DEF_HSAIL_BUILTIN): New macro.
38714         (DEF_HSAIL_ATOMIC_BUILTIN): Likewise.
38715         (DEF_HSAIL_SAT_BUILTIN): Likewise.
38716         (DEF_HSAIL_INTR_BUILTIN): Likewise.
38717         (DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN): Likewise.
38718         * builtin-types.def (BT_INT8): New.
38719         (BT_INT16): Likewise.
38720         (BT_UINT8): Likewise.
38721         (BT_UINT16): Likewise.
38722         (BT_FN_ULONG): Likewise.
38723         (BT_FN_UINT_INT): Likewise.
38724         (BT_FN_UINT_ULONG): Likewise.
38725         (BT_FN_UINT_LONG): Likewise.
38726         (BT_FN_UINT_PTR): Likewise.
38727         (BT_FN_ULONG_PTR): Likewise.
38728         (BT_FN_INT8_FLOAT): Likewise.
38729         (BT_FN_INT16_FLOAT): Likewise.
38730         (BT_FN_UINT32_FLOAT): Likewise.
38731         (BT_FN_UINT16_FLOAT): Likewise.
38732         (BT_FN_UINT8_FLOAT): Likewise.
38733         (BT_FN_UINT64_FLOAT): Likewise.
38734         (BT_FN_UINT16_UINT32): Likewise.
38735         (BT_FN_UINT32_UINT16): Likewise.
38736         (BT_FN_UINT16_UINT16_UINT16): Likewise.
38737         (BT_FN_INT_PTR_INT): Likewise.
38738         (BT_FN_UINT_PTR_UINT): Likewise.
38739         (BT_FN_LONG_PTR_LONG): Likewise.
38740         (BT_FN_ULONG_PTR_ULONG): Likewise.
38741         (BT_FN_VOID_UINT64_UINT64): Likewise.
38742         (BT_FN_UINT8_UINT8_UINT8): Likewise.
38743         (BT_FN_INT8_INT8_INT8): Likewise.
38744         (BT_FN_INT16_INT16_INT16): Likewise.
38745         (BT_FN_INT_INT_INT): Likewise.
38746         (BT_FN_UINT_FLOAT_UINT): Likewise.
38747         (BT_FN_FLOAT_UINT_UINT): Likewise.
38748         (BT_FN_ULONG_UINT_UINT): Likewise.
38749         (BT_FN_ULONG_UINT_PTR): Likewise.
38750         (BT_FN_ULONG_ULONG_ULONG): Likewise.
38751         (BT_FN_UINT_UINT_UINT): Likewise.
38752         (BT_FN_VOID_UINT_PTR): Likewise.
38753         (BT_FN_UINT_UINT_PTR: Likewise.
38754         (BT_FN_UINT32_UINT64_PTR): Likewise.
38755         (BT_FN_INT_INT_UINT_UINT): Likewise.
38756         (BT_FN_UINT_UINT_UINT_UINT): Likewise.
38757         (BT_FN_UINT_UINT_UINT_PTR): Likewise.
38758         (BT_FN_UINT_ULONG_ULONG_UINT): Likewise.
38759         (BT_FN_ULONG_ULONG_ULONG_ULONG): Likewise.
38760         (BT_FN_LONG_LONG_UINT_UINT): Likewise.
38761         (BT_FN_ULONG_ULONG_UINT_UINT): Likewise.
38762         (BT_FN_VOID_UINT32_UINT64_PTR): Likewise.
38763         (BT_FN_VOID_UINT32_UINT32_PTR): Likewise.
38764         (BT_FN_UINT_UINT_UINT_UINT_UINT): Likewise.
38765         (BT_FN_UINT_FLOAT_FLOAT_FLOAT_FLOAT): Likewise.
38766         (BT_FN_ULONG_ULONG_ULONG_UINT_UINT): Likewise.
38767         * doc/frontends.texi: List BRIG FE.
38768         * doc/install.texi (Testing): Add BRIG tesring requirements.
38769         * doc/invoke.texi (Overall Options): Mention BRIG.
38770         * doc/standards.texi (Standards): Doucment BRIG HSA version.
38771
38772 2017-01-24  Richard Biener  <rguenther@suse.de>
38773
38774         PR translation/79208
38775         * ipa-devirt.c (odr_types_equivalent_p): Fix typo in diagnostic.
38776
38777 2017-01-24  Martin Jambor  <mjambor@suse.cz>
38778
38779         PR bootstrap/79198
38780         * ipa-prop.c (ipa_free_all_node_params): Call summary destructor.
38781         * ipa-prop.c (ipa_node_params_t::insert): Initialize fields known_csts
38782         and known_contexts.
38783
38784 2017-01-24  Aldy Hernandez  <aldyh@redhat.com>
38785
38786         PR middle-end/79123
38787         * gimple-ssa-warn-alloca.c (alloca_call_type): Make sure
38788         casts from signed to unsigned really don't have a range.
38789
38790 2017-01-24  Markus Trippelsdorf  <markus@trippelsdorf.de>
38791
38792         * gimple-ssa-sprintf.c (format_floating): Change MPFR_RNDx to
38793         GMP_RNDx for compatiblity.
38794
38795 2017-01-24  Martin Liska  <mliska@suse.cz>
38796
38797         PR bootstrap/79132
38798         * tree-ssa-reassoc.c (rewrite_expr_tree_parallel): Insert assert
38799         that would prevent us to call alloca with -1 as argument.
38800
38801 2017-01-24  Jakub Jelinek  <jakub@redhat.com>
38802
38803         * dwarf2out.c (output_compilation_unit_header, output_file_names):
38804         Avoid -Wformat-security warning.
38805
38806 2017-01-23  Andrew Pinski  <apinski@cavium.com>
38807
38808         * config/aarch64/aarch64.c (thunderx2t99_addrcost_table): Improve
38809         cost table.
38810
38811 2017-01-23  Martin Sebor  <msebor@redhat.com>
38812
38813         PR middle-end/78703
38814         * gimple-ssa-sprintf.c (warn_level): New global.
38815         (format_integer): Use it here and throughout the rest of the file.
38816         Use the same switch to compute sign as base.
38817         (maybe_warn): New function.
38818         (format_directive): Factor out warnings into maybe_warn.
38819         Add debugging output.  Use warn_level.
38820         (add_bytes): Use warn_level.
38821         (pass_sprintf_length::compute_format_length): Add debugging output.
38822         (try_substitute_return_value): Same.
38823         (pass_sprintf_length::handle_gimple_call): Set and use warn_level.
38824
38825         PR middle-end/78703
38826         * gimple-ssa-sprintf.c (struct format_result): Remove constant member.
38827         (struct fmtresult, format_integer, format_floating): Adjust.
38828         (fmtresult::fmtresult): Set max correctly in two argument ctor.
38829         (get_string_length, format_string,format_directive): Same.
38830         (pass_sprintf_length::compute_format_length): Same.
38831         (try_substitute_return_value): Simplify slightly.
38832
38833         PR middle-end/78703
38834         * gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust formatting.
38835         (fmtresult::operator+=): Outlined.
38836         (struct fmtresult): Add ctors.
38837         (struct conversion_spec): Rename...
38838         (struct directive): ...to this.  Add and remove data members.
38839         (directive::set_width, directive::set_precision): New functions.
38840         (format_percent): Use fmtresult ctor.
38841         (get_width_and_precision): Remove.
38842         (format_integer): Make naming changes.  Avoid computing width and
38843         precision.
38844         (format_floating): Same.  Adjust indentation.
38845         (format_character, format_none): New functions.
38846         (format_string): Moved character handling to format_character.
38847         (format_directive): Remove arguments, change return type.
38848         (parse_directive): New function.
38849         (pass_sprintf_length::compute_format_length): Move directive
38850         parsing to parse_directive.
38851
38852 2017-01-23  Jakub Jelinek  <jakub@redhat.com>
38853
38854         * tree.h (assign_assembler_name_if_neeeded): Rename to ...
38855         (assign_assembler_name_if_needed): ... this.
38856         * tree.c (assign_assembler_name_if_neeeded): Rename to ...
38857         (assign_assembler_name_if_needed): ... this.
38858         (free_lang_data_in_cgraph): Adjust callers.
38859         * cgraphunit.c (cgraph_node::analyze): Likewise.
38860         * omp-expand.c (expand_omp_taskreg, expand_omp_target):
38861         Likewise.
38862
38863 2017-01-23  Richard Biener  <rguenther@suse.de>
38864
38865         PR tree-optimization/79088
38866         PR tree-optimization/79188
38867         * tree-ssa-threadupdate.c (mark_threaded_blocks): Move code
38868         resetting loop bounds after last path deletion.  Reset loop
38869         bounds of the target loop, make code match the comments.
38870         * tree-ssa-threadbackwards.c (pass_early_thread_jumps::execute):
38871         Make sure loops need no fixups.
38872
38873 2017-01-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>
38874
38875         * config/rs6000/rs6000-builtin.def (VSIEDPF): Add scalar insert
38876         exponent support with double type for first argument.
38877         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Changed
38878         type returned by __builtin_vec_extract_sig,
38879         __builtin_vec_extract_sig_sp, and __builtin_vec_extract_sig_dp
38880         functions from "vector int" to "vector unsigned int" or from
38881         "vector long long int" to "vector unsigned long long int".
38882         Changed type returned by __builtin_vec_extract_exp,
38883         __builtin_vec_extract_exp_sp, and __builtin_vec_extract_exp_dp
38884         functions from "vector int" to "vector unsigned int" or from
38885         "vector long long int" to "vector unsigned long long int".
38886         Changed return type of __builtin_vec_test_data_class,
38887         __builtin_vec_test_data_class_sp, and
38888         __builtin_vec_test_data_class_dp from "vector int" to
38889         "vector bool int" or from "vector long long int" to "vector bool
38890         long long int" and changed second argument type from "unsigned
38891         int" to "int".  Added new overloaded function forms "vector float
38892         __builtin_vec_insert_exp (vector float, vector unsigned int)" and
38893         "vector float __builtin_vec_insert_exp_sp (vector float, vector
38894         unsigned int)" and "vector double __builtin_vec_insert_exp (vector
38895         double, vector unsigned long long int)" and "vector double
38896         __builtin_vec_insert_exp_dp (vector double, vector unsigned long
38897         long int)".  Changed return type of
38898         __builtin_scalar_test_data_class and
38899         __builtin_scalar_test_data_class_sp and
38900         __builtin_scalar_test_data_class_dp from "unsigned int" to "bool
38901         int" and changed second argument from "unsigned int" to "int".
38902         Changed type returned by __builtin_scalar_test_neg,
38903         __builtin_scalar_test_neg_sp, and __builtin_scalar_test_neg_dp
38904         from "int" to "bool int".  Added new overloaded function form
38905         "double __builtin_scalar_insert_exp (double, unsigned long long int)".
38906         * config/rs6000/vsx.md (xsiexpdpf): New insn for scalar insert
38907         exponent double-precision with floating point first argument.
38908         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
38909         documentation of scalar_test_data_class, scalar_test_neg,
38910         scalar_extract_sig, scalar_extract_exp, scalar_insert_exp,
38911         vector_extract_exp, vec_extract_sig, vec_insert_exp, and
38912         vec_test_data_class built-in functions to reflect refinements in
38913         their type signatures.
38914
38915 2017-01-23  Andreas Tobler  <andreast@gcc.gnu.org>
38916
38917         * config/aarch64/aarch64.c (aarch64_elf_asm_constructor): Increase
38918         size of buf.
38919         (aarch64_elf_asm_destructor): Likewise.
38920
38921 2017-01-23  Bernd Schmidt  <bschmidt@redhat.com>
38922
38923         PR rtl-optimization/78634
38924         * config/i386/i386.c (ix86_max_noce_ifcvt_seq_cost): New function.
38925         (TARGET_MAX_NOCE_IFCVT_SEQ_COST): Define.
38926         * ifcvt.c (noce_try_cmove): Add missing cost check.
38927
38928         PR rtl-optimization/71724
38929         * combine.c (if_then_else_cond): Look for situations where it is
38930         beneficial to undo the work of one of the recursive calls.
38931
38932 2017-01-23  Bin Cheng  <bin.cheng@arm.com>
38933
38934         PR tree-optimization/70754
38935         * tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE.
38936         (reassociate_to_the_same_stmt): New parameter INSERT_BEFORE.  Insert
38937         combined stmt before it if not NULL.
38938         (combine_chains): Process refs reversely and compute dominance point
38939         for root ref.
38940
38941 2017-01-23  Martin Liska  <mliska@suse.cz>
38942
38943         PR tree-optimization/79196
38944         * tree-ssa-strlen.c (fold_strstr_to_memcmp): Rename to ...
38945         (fold_strstr_to_strncmp): ... this.  Fold the pattern to strncmp
38946         instead of memcmp.
38947         (strlen_optimize_stmt): Call the renamed function.
38948
38949 2017-01-23  Michael Matz  <matz@suse.de>
38950
38951         PR tree-optimization/78384
38952         * tree-ssa-loop-split.c (patch_loop_exit): Use correct edge.
38953
38954 2017-01-23  Richard Biener  <rguenther@suse.de>
38955
38956         PR tree-optimization/79186
38957         * tree-vrp.c (register_new_assert_for): Make sure we've seen
38958         both incoming edges before moving an assert.
38959
38960 2017-01-23  Martin Jambor  <mjambor@suse.cz>
38961
38962         * ipa-prop.c (load_from_param_1): Removed.
38963         (load_from_unmodified_param): Bits from load_from_param_1 put back
38964         here.
38965         (load_from_param): Removed.
38966         (compute_complex_assign_jump_func): Removed stmt2 and just replaced it
38967         with stmt.  Reverted back to use of load_from_unmodified_param.
38968
38969 2017-01-23  Martin Jambor  <mjambor@suse.cz>
38970
38971         PR ipa/79108
38972         * ipa-prop.h (ipa_param_descriptor): Anotate with with GTY(()).
38973         (ipa_node_params): Annotate with GTY((for_user)).  Make descriptors
38974         field a pointer to garbage collected vector, mark lattices and
38975         ipcp_orig_node with GTY((skip)).
38976         (ipa_get_param_count): Adjust to descriptors being a pointer.
38977         (ipa_get_param): Likewise.
38978         (ipa_get_type): Likewise.
38979         (ipa_get_param_move_cost): Likewise.
38980         (ipa_set_param_used): Likewise.
38981         (ipa_get_controlled_uses): Likewise.
38982         (ipa_set_controlled_uses): Likewise.
38983         (ipa_is_param_used): Likewise.
38984         (ipa_node_params_t): Move into garbage collector.  New methods insert
38985         and remove.
38986         (ipa_node_params_sum): Annotate wth GTY(()).
38987         (ipa_check_create_node_params): Adjust to ipa_node_params_sum being
38988         garbage collected.
38989         (ipa_load_from_parm_agg): Adjust declaration.
38990         * ipa-icf.c (param_used_p): Adjust to descriptors being a pointer.
38991         * ipa-profile.c (ipa_profile): Likewise.
38992         * ipa-prop.c (ipa_get_param_decl_index_1): Likewise.
38993         (ipa_populate_param_decls): Make descriptors parameter garbage
38994         collected.
38995         (ipa_dump_param): Adjust to descriptors being a pointer.
38996         (ipa_alloc_node_params): Likewise.
38997         (ipa_initialize_node_params): Likewise.
38998         (load_from_param_1): Make descriptors parameter garbage collected.
38999         (load_from_unmodified_param): Likewise.
39000         (load_from_param): Likewise.
39001         (ipa_load_from_parm_agg): Likewise.
39002         (ipa_node_params::~ipa_node_params): Removed.
39003         (ipa_free_all_node_params): Remove call to delete operator.
39004         (ipa_node_params_t::insert): New.
39005         (ipa_node_params_t::remove): Likewise.
39006         (ipa_node_params_t::duplicate): Adjust to descriptors being a pointer,
39007         copy known_csts and known_contexts vectors.
39008         (ipa_read_node_info): Adjust to descriptors being a pointer.
39009         (ipcp_modif_dom_walker): Make m_descriptors field garbage
39010         collected.
39011         (ipcp_transform_function): Make descriptors variable garbage
39012         collected.
39013
39014 2017-01-23  Andrew Senkevich  <andrew.senkevich@intel.com>
39015
39016         * config/i386/avx512bwintrin.h: Add k-mask test, kortest intrinsics.
39017         * config/i386/avx512dqintrin.h: Ditto.
39018         * config/i386/avx512fintrin.h: Ditto.
39019         * config/i386/i386.c: Handle new builtins.
39020         * config/i386/i386-builtin.def: Add new builtins.
39021         * config/i386/sse.md (ktest<mode>, kortest<mode>): New.
39022         (UNSPEC_KORTEST, UNSPEC_KTEST): New.
39023
39024 2017-01-23  Jakub Jelinek  <jakub@redhat.com>
39025             Martin Liska  <mliska@suse.cz>
39026
39027         * asan.h: Define ASAN_USE_AFTER_SCOPE_ATTRIBUTE.
39028         * asan.c (asan_expand_poison_ifn): Support stores and use
39029         appropriate ASAN report function.
39030         * internal-fn.c (expand_ASAN_POISON_USE): New function.
39031         * internal-fn.def (ASAN_POISON_USE): Declare.
39032         * tree-into-ssa.c (maybe_add_asan_poison_write): New function.
39033         (maybe_register_def): Create ASAN_POISON_USE when sanitizing.
39034         * tree-ssa-dce.c (eliminate_unnecessary_stmts): Remove
39035         ASAN_POISON calls w/o LHS.
39036         * tree-ssa.c (execute_update_addresses_taken): Create clobber
39037         for ASAN_MARK (UNPOISON, &x, ...) in order to prevent usage of a LHS
39038         from ASAN_MARK (POISON, &x, ...) coming to a PHI node.
39039         * gimplify.c (asan_poison_variables): Add attribute
39040         use_after_scope_memory to variables that really needs to live
39041         in memory.
39042         * tree-ssa.c (is_asan_mark_p): Do not rewrite into SSA when
39043         having the attribute.
39044
39045 2017-01-23  Martin Liska  <mliska@suse.cz>
39046
39047         * asan.c (create_asan_shadow_var): New function.
39048         (asan_expand_poison_ifn): Likewise.
39049         * asan.h (asan_expand_poison_ifn): New declaration.
39050         * internal-fn.c (expand_ASAN_POISON): Likewise.
39051         * internal-fn.def (ASAN_POISON): New builtin.
39052         * sanopt.c (pass_sanopt::execute): Expand
39053         asan_expand_poison_ifn.
39054         * tree-inline.c (copy_decl_for_dup_finish): Make function
39055         external.
39056         * tree-inline.h (copy_decl_for_dup_finish): Likewise.
39057         * tree-ssa.c (is_asan_mark_p): New function.
39058         (execute_update_addresses_taken): Rewrite local variables
39059         (identified just by use-after-scope as addressable) into SSA.
39060
39061 2017-01-22  Gerald Pfeifer  <gerald@pfeifer.com>
39062
39063         * doc/install.texi (Specific): opensource.apple.com uses https
39064         now. Remove trailing slash.
39065
39066 2017-01-22  Gerald Pfeifer  <gerald@pfeifer.com>
39067
39068         * README.Portability: Remove note on an Irix compatibility issue.
39069
39070 2017-01-22  Dimitry Andric <dim@FreeBSD.org>
39071
39072         * gcov.c (INCLUDE_ALGORITHM): Define.
39073         (INCLUDE_VECTOR): Define.
39074         No longer include <vector> and <algorithm> directly.
39075
39076 2017-01-21  Gerald Pfeifer  <gerald@pfeifer.com>
39077
39078         * doc/extend.texi (Thread-Local): Change www.akkadia.org reference
39079         to https.
39080         * doc/invoke.texi (Code Gen Options): Ditto.
39081
39082 2017-01-21  Jan Hubicka  <hubicka@ucw.cz>
39083
39084         PR lto/78407
39085         * cfg.c (update_bb_profile_for_threading): Fix updating of probablity.
39086
39087 2017-01-21  Bernd Schmidt  <bschmidt@redhat.com>
39088
39089         rtl-optimization/79125
39090         * cprop.c (local_cprop_pass): Handle cases where we make an
39091         unconditional trap.
39092
39093 2017-01-20  Segher Boessenkool  <segher@kernel.crashing.org>
39094
39095         PR target/61729
39096         PR target/77850
39097         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
39098         read from, for big endian.
39099
39100 2017-01-20  Jiong Wang  <jiong.wang@arm.com>
39101
39102         * config/aarch64/aarch64-builtins.c (aarch64_init_builtins): Register
39103         register pauth builtins for LP64 only.
39104
39105 2017-01-20  Marek Polacek  <polacek@redhat.com>
39106
39107         PR c/79152
39108         * gimplify.c (should_warn_for_implicit_fallthrough): Handle consecutive
39109         non-case labels.
39110
39111 2017-01-20  Alexander Monakov  <amonakov@ispras.ru>
39112
39113         * omp-expand.c (expand_omp_simd): Clear PROP_gimple_lomp_dev regardless
39114         of safelen status.
39115         * omp-offload.c (pass_omp_device_lower::gate): Use PROP_gimple_lomp_dev.
39116         * passes.c (dump_properties): Handle PROP_gimple_lomp_dev.
39117         * tree-inline.c (expand_call_inline): Propagate PROP_gimple_lomp_dev.
39118
39119 2017-01-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
39120
39121         PR target/71270
39122         * config/arm/arm.c (neon_valid_immediate): Reject vector constants
39123         in big-endian mode when they are not a single duplicated value.
39124
39125 2017-01-20  Richard Biener  <rguenther@suse.de>
39126
39127         * BASE-VER: Bump to 7.0.1.
39128
39129 2017-01-20  Alexander Monakov  <amonakov@ispras.ru>
39130
39131         * omp-low.c (omplow_simd_context): New struct.  Use it...
39132         (lower_rec_simd_input_clauses): ...here and...
39133         (lower_rec_input_clauses): ...here to hold common data.  Adjust all
39134         references to idx, lane, max_vf, is_simt.
39135
39136 2017-01-20  Graham Markall  <graham.markall@embecosm.com>
39137
39138         * config/arc/arc.h (LINK_SPEC): Use arclinux_nps emulation when
39139         mcpu=nps400.
39140
39141 2017-01-20  Martin Jambor  <mjambor@suse.cz>
39142
39143         * hsa.h: Renaed to hsa-common.h.  Adjusted a comment.
39144         * hsa.c: Renaed to hsa-common.c.  Change include of gt-hsa.h to
39145         gt-hsa-common.h.
39146         * Makefile.in (OBJS): Rename hsa.o to hsa-common.o.
39147         (GTFILES): Rename hsa.c to hsa-common.c.
39148         * hsa-brig.c: Change include of hsa.h to hsa-common.h.
39149         * hsa-dump.c: Likewise.
39150         * hsa-gen.c: Likewise.
39151         * hsa-regalloc.c: Likewise.
39152         * ipa-hsa.c: Likewise.
39153         * omp-expand.c: Likewise.
39154         * omp-low.c: Likewise.
39155         * toplev.c: Likewise.
39156
39157 2017-01-20  Marek Polacek  <polacek@redhat.com>
39158
39159         PR c/64279
39160         * doc/invoke.texi: Document -Wduplicated-branches.
39161         * fold-const.c (operand_equal_p): Handle MODIFY_EXPR, INIT_EXPR,
39162         COMPOUND_EXPR, PREDECREMENT_EXPR, PREINCREMENT_EXPR,
39163         POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, CLEANUP_POINT_EXPR, EXPR_STMT,
39164         STATEMENT_LIST, and RETURN_EXPR.  For non-pure non-const functions
39165         return 0 only when not OEP_LEXICOGRAPHIC.
39166         (fold_build_cleanup_point_expr): Use the expression
39167         location when building CLEANUP_POINT_EXPR.
39168         * tree-core.h (enum operand_equal_flag): Add OEP_LEXICOGRAPHIC.
39169         * tree.c (add_expr): Handle error_mark_node.
39170
39171 2017-01-20  Martin Liska  <mliska@suse.cz>
39172
39173         PR lto/69188
39174         * tree-profile.c (init_ic_make_global_vars): Do not call
39175         finalize_decl.
39176         (gimple_init_gcov_profiler): Likewise.
39177
39178 2017-01-20  Martin Liska  <mliska@suse.cz>
39179
39180         PR ipa/71190
39181         * cgraph.h (maybe_create_reference): Remove argument and
39182         update comment.
39183         * cgraphclones.c (cgraph_node::create_virtual_clone): Remove one
39184         argument.
39185         * ipa-cp.c (create_specialized_node): Likewise.
39186         * symtab.c (symtab_node::maybe_create_reference): Handle
39187         VAR_DECLs and ADDR_EXPRs and select ipa_ref_use type.
39188
39189 2017-01-20  Martin Liska  <mliska@suse.cz>
39190
39191         * read-rtl-function.c (function_reader::create_function): Use
39192         build_decl instread of build_decl_stat.
39193
39194 2017-01-20  Andrew Senkevich  <andrew.senkevich@intel.com>
39195
39196         * config/i386/avx512bwintrin.h: Add k-mask registers shift intrinsics.
39197         * config/i386/avx512dqintrin.h: Ditto.
39198         * config/i386/avx512fintrin.h: Ditto.
39199         * config/i386/i386-builtin-types.def: Add new types.
39200         * config/i386/i386.c: Handle new types.
39201         * config/i386/i386-builtin.def (__builtin_ia32_kshiftliqi)
39202         (__builtin_ia32_kshiftlihi, __builtin_ia32_kshiftlisi)
39203         (__builtin_ia32_kshiftlidi, __builtin_ia32_kshiftriqi)
39204         (__builtin_ia32_kshiftrihi, __builtin_ia32_kshiftrisi)
39205         (__builtin_ia32_kshiftridi): New.
39206         * config/i386/sse.md (k<code><mode>): Rename *k<code><mode>.
39207
39208 2017-01-19  Segher Boessenkool  <segher@kernel.crashing.org>
39209
39210         PR target/78875
39211         PR target/79140
39212         * config/rs6000/rs6000.c (TARGET_STACK_PROTECT_GUARD): Unconditionally
39213         define to rs6000_init_stack_protect_guard.
39214         (rs6000_init_stack_protect_guard): New function.
39215
39216 2017-01-19  Matthew Fortune  <matthew.fortune@imgtec.com>
39217             Yunqiang Su  <yunqiang.su@imgtec.com>
39218
39219         * config.gcc (supported_defaults): Add madd4.
39220         (with_madd4): Add validation.
39221         (all_defaults): Add madd4.
39222         * config/mips/mips.opt (mmadd4): New option.
39223         * config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
39224         mmadd4.
39225         (TARGET_CPU_CPP_BUILTINS): Add builtin_define for
39226         __mips_no_madd4.
39227         (ISA_HAS_UNFUSED_MADD4): Gate with mips_madd4.
39228         (ISA_HAS_FUSED_MADD4): Likewise.
39229         * doc/invoke.texi (-mmadd4): Document the new option.
39230         * doc/install.texi (--with-madd4): Document the new option.
39231
39232 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
39233
39234         * config/aarch64/aarch64-builtins.c (enum aarch64_builtins): New
39235         entries for AARCH64_PAUTH_BUILTIN_XPACLRI,
39236         AARCH64_PAUTH_BUILTIN_PACIA1716, AARCH64_PAUTH_BUILTIN_AUTIA1716.
39237         (aarch64_init_pauth_hint_builtins): New.
39238         (aarch64_init_builtins): Call aarch64_init_pauth_hint_builtins.
39239         (aarch64_expand_builtin): Expand new builtins.
39240
39241 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
39242
39243         * reg-notes.def (CFA_TOGGLE_RA_MANGLE): New reg-note.
39244         * combine-stack-adj.c (no_unhandled_cfa): Handle
39245         REG_CFA_TOGGLE_RA_MANGLE.
39246         * dwarf2cfi.c (dwarf2out_frame_debug): Handle REG_CFA_TOGGLE_RA_MANGLE.
39247         * config/aarch64/aarch64.c (aarch64_expand_prologue): Generates DWARF
39248         info for return address signing.
39249         (aarch64_expand_epilogue): Likewise.
39250
39251 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
39252
39253         * config/aarch64/aarch64-opts.h (aarch64_function_type): New enum.
39254         * config/aarch64/aarch64-protos.h
39255         (aarch64_return_address_signing_enabled): New declaration.
39256         * config/aarch64/aarch64.c (aarch64_return_address_signing_enabled):
39257         New function.
39258         (aarch64_expand_prologue): Sign return address before it's pushed onto
39259         stack.
39260         (aarch64_expand_epilogue): Authenticate return address fetched from
39261         stack.
39262         (aarch64_override_options): Sanity check for ILP32 and ISA level.
39263         (aarch64_attributes): New function attributes for "sign-return-address".
39264         * config/aarch64/aarch64.md (UNSPEC_AUTI1716, UNSPEC_AUTISP,
39265         UNSPEC_PACI1716, UNSPEC_PACISP, UNSPEC_XPACLRI): New unspecs.
39266         ("*do_return"): Generate combined instructions according to key index.
39267         ("<pauth_mnem_prefix>sp", "<pauth_mnem_prefix1716", "xpaclri"): New.
39268         * config/aarch64/iterators.md (PAUTH_LR_SP, PAUTH_17_16): New integer
39269         iterators.
39270         (pauth_mnem_prefix, pauth_hint_num_a): New integer attributes.
39271         * config/aarch64/aarch64.opt (msign-return-address=): New.
39272         * doc/extend.texi (AArch64 Function Attributes): Documents
39273         "sign-return-address=".
39274         * doc/invoke.texi (AArch64 Options): Documents "-msign-return-address=".
39275
39276 2017-01-19  Matthew Fortune  <matthew.fortune@imgtec.com>
39277
39278         * doc/invoke.texi: Add missing -mlxc1-sxc1 options to
39279         overall option summary.
39280
39281 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
39282
39283         * config/aarch64/aarch64-arches.def: New entry for "armv8.3-a".
39284         * config/aarch64/aarch64.h (AARCH64_FL_V8_3, AARCH64_FL_FOR_ARCH8_3,
39285         AARCH64_ISA_V8_3, TARGET_ARMV8_3): New.
39286         * doc/invoke.texi (AArch64 Options): Document "armv8.3-a".
39287
39288 2017-01-19  Michael Meissner  <meissner@linux.vnet.ibm.com>
39289
39290         * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Enable
39291         -mpower9-minmax by default for -mcpu=power9.
39292         (ISA_3_MASKS_IEEE): Require -mvsx-small-integer to enable IEEE
39293         128-bit floating point.
39294
39295 2017-01-20  Alan Modra  <amodra@gmail.com>
39296
39297         * config/rs6000/rs6000.md (cmpstrnsi, cmpstrsi): Fail if
39298         optimizing for size.
39299
39300 2017-01-20  Alan Modra  <amodra@gmail.com>
39301
39302         PR target/79144
39303         * config/rs6000/rs6000.c (expand_strn_compare): Get the asm name
39304         for strcmp and strncmp from corresponding builtin decl.
39305
39306 2017-01-19  Uros Bizjak  <ubizjak@gmail.com>
39307
39308         * config.gcc (x86_64-*-rtems*): Use i386/rtemself.h
39309         instead of i386/rtems-64.h.
39310         * config/i386/rtems-64.h: Remove.
39311
39312 2017-01-19  Uros Bizjak  <ubizjak@gmail.com>
39313
39314         PR target/78478
39315         Revert:
39316         2013-11-05  Uros Bizjak  <ubizjak@gmail.com>
39317
39318         * config/i386/rtemself.h (LONG_DOUBLE_TYPE_SIZE): New define.
39319
39320 2017-01-19  Tamar Christina  <tamar.christina@arm.com>
39321
39322         * config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup):
39323         Change int to HOST_WIDE_INT.
39324         * config/aarch64/aarch64-protos.h
39325         (aarch64_simd_gen_const_vector_dup): Likewise.
39326         * config/aarch64/aarch64-simd.md: Add copysign<mode>3.
39327
39328 2017-01-19  David Malcolm  <dmalcolm@redhat.com>
39329
39330         * langhooks-def.h (lhd_type_for_size): New decl.
39331         (LANG_HOOKS_TYPE_FOR_SIZE): Define as lhd_type_for_size.
39332         * langhooks.c (lhd_type_for_size): New function, taken from
39333         lto_type_for_size.
39334
39335 2017-01-19  Pat Haugen  <pthaugen@us.ibm.com>
39336
39337         * config/rs6000/power9.md (power9-alu): Remove 'cmp' type and add
39338         define_bypass for CR latency.
39339         (power9-cracked-alu): Update bypass latency and remove power9-branch.
39340         (power9-alu2): Add define_bypass for CR latency.
39341         (power9-cmp): New.
39342         (power9-mul): Update insn latency.
39343         (power9-mul-compare): Update insn latency, bypass latency and remove
39344         power9-branch.
39345
39346 2016-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
39347
39348         * config/aarch64/aarch64-protos.h (aarch64_nopcrelative_literal_loads):
39349         Delete.
39350         * config/aarch64/aarch64.md
39351         (aarch64_reload_movcp<GPF_TF:mode><P:mode>): Delete reference to
39352         aarch64_nopcrelative_literal_loads.
39353         (aarch64_reload_movcp<VALL:mode><P:mode>): Likewise.
39354
39355 2017-01-19  Chenghua Xu  <paul.hua.gm@gmail.com>
39356
39357         * config/mips/mips.h (ISA_HAS_FUSED_MADD4): Enable for
39358         TARGET_LOONGSON_3A.
39359         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_LOONGSON_3A.
39360
39361 2017-01-19  Doug Gilmore  <doug.gilmore@imgtec.com>
39362
39363         PR target/78176
39364         * config.gcc (supported_defaults): Add lxc1-sxc1.
39365         (with_lxc1_sxc1): Add validation.
39366         (all_defaults): Add lxc1-sxc1.
39367         * config/mips/mips.opt (mlxc1-sxc1): New option.
39368         * config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
39369         mlxc1-sxc1.
39370         (TARGET_CPU_CPP_BUILTINS): Add builtin_define for
39371         __mips_no_lxc1_sxc1.
39372         (ISA_HAS_LXC1_SXC1): Gate with mips_lxc1_sxc1.
39373         * doc/invoke.texi (-mlxc1-sxc1): Document the new option.
39374         * doc/install.texi (--with-lxc1-sxc1): Document the new option.
39375
39376 2017-01-19  Richard Biener  <rguenther@suse.de>
39377
39378         PR tree-optimization/72488
39379         * tree-ssa-sccvn.c (run_scc_vn): When we abort the VN make
39380         sure to restore SSA info.
39381         * tree-ssa.c (verify_ssa): Verify SSA info is not shared.
39382
39383 2017-01-19  Richard Earnshaw  <rearnsha@arm.com>
39384
39385         PR rtl-optimization/79121
39386         * expr.c (expand_expr_real_2, case LSHIFT_EXPR): Look at the signedness
39387         of the inner type when shifting an extended value.
39388
39389 2017-01-17  Jan Hubicka  <hubicka@ucw.cz>
39390
39391         PR lto/78407
39392         * symtab.c (symtab_node::equal_address_to): Fix comparing of
39393         interposable aliases.
39394
39395 2017-01-18  Peter Bergner  <bergner@vnet.ibm.com>
39396
39397         PR target/78516
39398         * config/rs6000/spe.md (mov_si<mode>_e500_subreg0): Fix constraints.
39399         Use the evmergelohi instruction.
39400         (mov_si<mode>_e500_subreg4_2_le): Likewise.
39401         (mov_sitf_e500_subreg8_2_be): Likewise.
39402         (mov_sitf_e500_subreg12_2_le): Likewise.
39403         (mov_si<mode>_e500_subreg0_2_le): Fix constraints.
39404         (mov_si<mode>_e500_subreg4_2_be): Likewise.
39405         (mov_sitf_e500_subreg8_2_le): Likewise.
39406         (mov_sitf_e500_subreg12_2_be): Likewise.
39407
39408 2017-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
39409
39410         * config/rs6000/altivec.md (altivec_vbpermq): Change "type"
39411         attribute from vecsimple to vecperm.
39412         (altivec_vbpermq2): Likewise.
39413
39414 2017-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
39415
39416         PR target/79040
39417         * config/rs6000/altivec.h: Fix typo of vec_cntlz to vec_cnttz.
39418
39419 2017-01-18  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
39420         * config/rs6000/rs6000-protos.h (expand_strn_compare): Add arg.
39421         * config/rs6000/rs6000.c (expand_strn_compare): Add ability to expand
39422         strcmp. Fix bug where comparison didn't stop with zero byte. Fix
39423         case where N arg is SIZE_MAX.
39424         * config/rs6000/rs6000.md (cmpstrnsi): Args to expand_strn_compare.
39425         (cmpstrsi): Add pattern.
39426
39427 2017-01-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
39428
39429         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
39430         __builtin_vec_revb builtins.
39431         * config/rs6000/rs6000-builtins.def (P9V_BUILTIN_XXBRQ_V16QI): Add
39432         built-in functions to support generation of the ISA 3.0 XXBR<x>
39433         vector byte reverse instructions.
39434         (P9V_BUILTIN_XXBRQ_V1TI): Likewise.
39435         (P9V_BUILTIN_XXBRD_V2DI): Likewise.
39436         (P9V_BUILTIN_XXBRD_V2DF): Likewise.
39437         (P9V_BUILTIN_XXBGW_V4SI): Likewise.
39438         (P9V_BUILTIN_XXBGW_V4SF): Likewise.
39439         (P9V_BUILTIN_XXBGH_V8HI): Likewise.
39440         (P9V_BUILTIN_VEC_REVB): Likewise.
39441         * config/rs6000/vsx.md (p9_xxbrq_v1ti): New insns/expanders to
39442         generate the ISA 3.0 XXBR<x> vector byte reverse instructions.
39443         (p9_xxbrq_v16qi): Likewise.
39444         (p9_xxbrd_<mode>, VSX_D iterator): Likewise.
39445         (p9_xxbrw_<mode>, VSX_W iterator): Likewise.
39446         (p9_xxbrh_v8hi): Likewise.
39447         * config/rs6000/altivec.h (vec_revb): Define if ISA 3.0.
39448         * doc/extend.texi (RS/6000 Altivec Built-ins): Document the
39449         vec_revb built-in functions.
39450
39451 2017-01-18  Uros Bizjak  <ubizjak@gmail.com>
39452
39453         PR rtl-optimization/78952
39454         * config/i386/i386.md (any_extract): New code iterator.
39455         (*insvqi_2): Use any_extract for source operand.
39456         (*insvqi_3): Use any_shiftrt for source operand.
39457
39458 2017-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
39459
39460         * config/aarch64/aarch64.c (aarch64_sched_adjust_priority)
39461         New function.
39462         (TARGET_SCHED_ADJUST_PRIORITY): Define target hook.
39463
39464 2017-01-18  Matthias Klose  <doko@ubuntu.com>
39465
39466         * doc/install.texi: Allow default for --with-target-bdw-gc-include.
39467
39468 2016-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
39469
39470         * config/rs6000/altivec.h (vec_bperm): Change #define.
39471         * config/rs6000/altivec.md (UNSPEC_VBPERMD): New enum constant.
39472         (altivec_vbpermq2): New define_insn.
39473         (altivec_vbpermd): Likewise.
39474         * config/rs6000/rs6000-builtin.def (VBPERMQ2): New monomorphic
39475         function interface.
39476         (VBPERMD): Likewise.
39477         (VBPERM): New polymorphic function interface.
39478         * config/rs6000/r6000-c.c (altivec_overloaded_builtins_table):
39479         Add entries for P9V_BUILTIN_VEC_VBPERM.
39480         * doc/extend.texi: Add interfaces for vec_bperm.
39481
39482 2017-01-18  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
39483
39484         * config/s390/s390-c.c (s390_expand_overloaded_builtin): Downcase
39485         first letter of error messages.
39486         (s390_resolve_overloaded_builtin): Likewise.
39487         * config/s390/s390.c (s390_expand_builtin): Likewise.
39488         (s390_invalid_arg_for_unprototyped_fn): Likewise.
39489         (s390_valid_target_attribute_inner_p): Likewise.
39490         * config/s390/s390.md ("tabort"): Likewise.
39491
39492 2017-01-18  Toma Tabacu  <toma.tabacu@imgtec.com>
39493
39494         * config/mips/mips.h (ISA_HAS_DIV3): Remove unused macro.
39495         (ISA_AVOID_DIV_HILO): New macro.
39496         (ISA_HAS_DIV): Use new ISA_AVOID_DIV_HILO macro.
39497         (ISA_HAS_DDIV): Likewise.
39498
39499 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
39500
39501         * doc/invoke.texi (fabi-version): Correct number of occurrences.
39502
39503 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
39504
39505         * doc/invoke.texi (fabi-version): Spelling fix.
39506
39507 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
39508
39509         PR c++/70182
39510         * doc/invoke.texi (fabi-version): Mention mangling fix for
39511         operator names.
39512
39513 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
39514
39515         PR c++/77489
39516         * doc/invoke.texi (fabi-version): Document discriminator mangling.
39517
39518 2017-01-17  Segher Boessenkool  <segher@kernel.crashing.org>
39519
39520         PR target/78875
39521         * config/rs6000/rs6000-opts.h (stack_protector_guard): New enum.
39522         * config/rs6000/rs6000.c (rs6000_option_override_internal): Handle
39523         the new options.
39524         * config/rs6000/rs6000.md (stack_protect_set): Handle the new more
39525         flexible settings.
39526         (stack_protect_test): Ditto.
39527         * config/rs6000/rs6000.opt (mstack-protector-guard=,
39528         mstack-protector-guard-reg=, mstack-protector-guard-offset=): New
39529         options.
39530         * doc/invoke.texi (Option Summary) [RS/6000 and PowerPC Options]:
39531         Add -mstack-protector-guard=, -mstack-protector-guard-reg=, and
39532         -mstack-protector-guard-offset=.
39533         (RS/6000 and PowerPC Options): Ditto.
39534
39535 2017-01-17  Uros Bizjak  <ubizjak@gmail.com>
39536
39537         * config/i386/i386.h (MASK_CLASS_P): New define.
39538         * config/i386/i386.c (inline_secondary_memory_needed): Ensure that
39539         there are no registers from different register sets also when
39540         mask registers are used.  Update function comment.
39541         * config/i386/i386.md (*movsi_internal): Split (*k/*krm) alternative
39542         to (*k/*r) and (*k/*km) alternatives.
39543
39544 2017-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
39545
39546         * config/aarch64/aarch64.md (eh_return): Remove pattern and splitter.
39547         * config/aarch64/aarch64.h (AARCH64_EH_STACKADJ_REGNUM): Remove.
39548         (EH_RETURN_HANDLER_RTX): New define.
39549         * config/aarch64/aarch64.c (aarch64_frame_pointer_required):
39550         Force frame pointer in EH return functions.
39551         (aarch64_expand_epilogue): Add barrier for eh_return.
39552         (aarch64_final_eh_return_addr): Remove.
39553         (aarch64_eh_return_handler_rtx): New function.
39554         * config/aarch64/aarch64-protos.h (aarch64_final_eh_return_addr):
39555         Remove.
39556         (aarch64_eh_return_handler_rtx): New prototype.
39557
39558 2017-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
39559
39560         * config/rs6000/altivec.h (vec_rlmi): New #define.
39561         (vec_vrlnm): Likewise.
39562         (vec_rlnm): Likewise.
39563         * config/rs6000/altivec.md (UNSPEC_VRLMI): New UNSPEC enum value.
39564         (UNSPEC_VRLNM): Likewise.
39565         (VIlong): New mode iterator.
39566         (altivec_vrl<VI_char>mi): New define_insn.
39567         (altivec_vrl<VI_char>nm): Likewise.
39568         * config/rs6000/rs6000-builtin.def (VRLWNM): New monomorphic
39569         function entry.
39570         (VRLDNM): Likewise.
39571         (RLNM): New polymorphic function entry.
39572         (VRLWMI): New monomorphic function entry.
39573         (VRLDMI): Likewise.
39574         (RLMI): New polymorphic function entry.
39575         * config/rs6000/r6000-c.c (altivec_overloaded_builtin_table): Add
39576         new entries for P9V_BUILTIN_VEC_RLMI and P9V_BUILTIN_VEC_RLNM.
39577         * doc/extend.texi: Add description of vec_rlmi, vec_rlnm, and
39578         vec_vrlnm.
39579
39580 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
39581
39582         PR debug/78839
39583         * dwarf2out.c (field_byte_offset): Restore the
39584         PCC_BITFIELD_TYPE_MATTERS behavior for INTEGER_CST DECL_FIELD_OFFSET
39585         and DECL_FIELD_BIT_OFFSET.  Use fold_build2 instead of build2 + fold.
39586         (analyze_variants_discr, gen_variant_part): Use fold_build2 instead
39587         of build2 + fold.
39588
39589 2017-01-17  Eric Botcazou  <ebotcazou@adacore.com>
39590
39591         PR ada/67205
39592         * config/aarch64/aarch64.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define
39593
39594 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
39595
39596         PR debug/71669
39597         * dwarf2out.c (add_data_member_location_attribute): For constant
39598         offset bitfield emit for -gdwarf-5 DW_AT_data_bit_offset attribute
39599         instead of DW_AT_data_member_location, DW_AT_bit_offset and
39600         DW_AT_byte_size attributes.
39601
39602 2017-01-17  Eric Botcazou  <ebotcazou@adacore.com>
39603
39604         * config/rs6000/rs6000.c (rs6000_emit_move): Also use a TOC reference
39605         after forcing to constant memory when the code model is medium.
39606
39607 2017-01-17  Julia Koval  <julia.koval@intel.com>
39608
39609         PR target/76731
39610         * config/i386/avx512fintrin.h
39611         (_mm512_i32gather_ps): Change __addr type to void const*.
39612         (_mm512_mask_i32gather_ps): Ditto.
39613         (_mm512_i32gather_pd): Ditto.
39614         (_mm512_mask_i32gather_pd): Ditto.
39615         (_mm512_i64gather_ps): Ditto.
39616         (_mm512_mask_i64gather_ps): Ditto.
39617         (_mm512_i64gather_pd): Ditto.
39618         (_mm512_mask_i64gather_pd): Ditto.
39619         (_mm512_i32gather_epi32): Ditto.
39620         (_mm512_mask_i32gather_epi32): Ditto.
39621         (_mm512_i32gather_epi64): Ditto.
39622         (_mm512_mask_i32gather_epi64): Ditto.
39623         (_mm512_i64gather_epi32): Ditto.
39624         (_mm512_mask_i64gather_epi32): Ditto.
39625         (_mm512_i64gather_epi64): Ditto.
39626         (_mm512_mask_i64gather_epi64): Ditto.
39627         (_mm512_i32scatter_ps): Change __addr type to void*.
39628         (_mm512_mask_i32scatter_ps): Ditto.
39629         (_mm512_i32scatter_pd): Ditto.
39630         (_mm512_mask_i32scatter_pd): Ditto.
39631         (_mm512_i64scatter_ps): Ditto.
39632         (_mm512_mask_i64scatter_ps): Ditto.
39633         (_mm512_i64scatter_pd): Ditto.
39634         (_mm512_mask_i64scatter_pd): Ditto.
39635         (_mm512_i32scatter_epi32): Ditto.
39636         (_mm512_mask_i32scatter_epi32): Ditto.
39637         (_mm512_i32scatter_epi64): Ditto.
39638         (_mm512_mask_i32scatter_epi64): Ditto.
39639         (_mm512_i64scatter_epi32): Ditto.
39640         (_mm512_mask_i64scatter_epi32): Ditto.
39641         (_mm512_i64scatter_epi64): Ditto.
39642         (_mm512_mask_i64scatter_epi64): Ditto.
39643         * config/i386/avx512pfintrin.h
39644         (_mm512_mask_prefetch_i32gather_pd): Change __addr type to void const*.
39645         (_mm512_mask_prefetch_i32gather_ps): Ditto.
39646         (_mm512_mask_prefetch_i64gather_pd): Ditto.
39647         (_mm512_mask_prefetch_i64gather_ps): Ditto.
39648         (_mm512_prefetch_i32scatter_pd): Change __addr type to void*.
39649         (_mm512_prefetch_i32scatter_ps): Ditto.
39650         (_mm512_mask_prefetch_i32scatter_pd): Ditto.
39651         (_mm512_mask_prefetch_i32scatter_ps): Ditto.
39652         (_mm512_prefetch_i64scatter_pd): Ditto.
39653         (_mm512_prefetch_i64scatter_ps): Ditto.
39654         (_mm512_mask_prefetch_i64scatter_pd): Ditto.
39655         (_mm512_mask_prefetch_i64scatter_ps): Ditto.
39656         * config/i386/avx512vlintrin.h
39657         (_mm256_mmask_i32gather_ps): Change __addr type to void const*.
39658         (_mm_mmask_i32gather_ps): Ditto.
39659         (_mm256_mmask_i32gather_pd): Ditto.
39660         (_mm_mmask_i32gather_pd): Ditto.
39661         (_mm256_mmask_i64gather_ps): Ditto.
39662         (_mm_mmask_i64gather_ps): Ditto.
39663         (_mm256_mmask_i64gather_pd): Ditto.
39664         (_mm_mmask_i64gather_pd): Ditto.
39665         (_mm256_mmask_i32gather_epi32): Ditto.
39666         (_mm_mmask_i32gather_epi32): Ditto.
39667         (_mm256_mmask_i32gather_epi64): Ditto.
39668         (_mm_mmask_i32gather_epi64): Ditto.
39669         (_mm256_mmask_i64gather_epi32): Ditto.
39670         (_mm_mmask_i64gather_epi32): Ditto.
39671         (_mm256_mmask_i64gather_epi64): Ditto.
39672         (_mm_mmask_i64gather_epi64): Ditto.
39673         (_mm256_i32scatter_ps): Change __addr type to void*.
39674         (_mm256_mask_i32scatter_ps): Ditto.
39675         (_mm_i32scatter_ps): Ditto.
39676         (_mm_mask_i32scatter_ps): Ditto.
39677         (_mm256_i32scatter_pd): Ditto.
39678         (_mm256_mask_i32scatter_pd): Ditto.
39679         (_mm_i32scatter_pd): Ditto.
39680         (_mm_mask_i32scatter_pd): Ditto.
39681         (_mm256_i64scatter_ps): Ditto.
39682         (_mm256_mask_i64scatter_ps): Ditto.
39683         (_mm_i64scatter_ps): Ditto.
39684         (_mm_mask_i64scatter_ps): Ditto.
39685         (_mm256_i64scatter_pd): Ditto.
39686         (_mm256_mask_i64scatter_pd): Ditto.
39687         (_mm_i64scatter_pd): Ditto.
39688         (_mm_mask_i64scatter_pd): Ditto.
39689         (_mm256_i32scatter_epi32): Ditto.
39690         (_mm256_mask_i32scatter_epi32): Ditto.
39691         (_mm_i32scatter_epi32): Ditto.
39692         (_mm_mask_i32scatter_epi32): Ditto.
39693         (_mm256_i32scatter_epi64): Ditto.
39694         (_mm256_mask_i32scatter_epi64): Ditto.
39695         (_mm_i32scatter_epi64): Ditto.
39696         (_mm_mask_i32scatter_epi64): Ditto.
39697         (_mm256_i64scatter_epi32): Ditto.
39698         (_mm256_mask_i64scatter_epi32): Ditto.
39699         (_mm_i64scatter_epi32): Ditto.
39700         (_mm_mask_i64scatter_epi32): Ditto.
39701         (_mm256_i64scatter_epi64): Ditto.
39702         (_mm256_mask_i64scatter_epi64): Ditto.
39703         (_mm_i64scatter_epi64): Ditto.
39704         (_mm_mask_i64scatter_epi64): Ditto.
39705         * config/i386/i386-builtin-types.def (V16SF_V16SF_PCFLOAT_V16SI_HI_INT)
39706         (V8DF_V8DF_PCDOUBLE_V8SI_QI_INT, V8SF_V8SF_PCFLOAT_V8DI_QI_INT)
39707         (V8DF_V8DF_PCDOUBLE_V8DI_QI_INT, V16SI_V16SI_PCINT_V16SI_HI_INT)
39708         (V8DI_V8DI_PCINT64_V8SI_QI_INT, V8SI_V8SI_PCINT_V8DI_QI_INT)
39709         (V8DI_V8DI_PCINT64_V8DI_QI_INT, V2DF_V2DF_PCDOUBLE_V4SI_QI_INT)
39710         (V4DF_V4DF_PCDOUBLE_V4SI_QI_INT, V2DF_V2DF_PCDOUBLE_V2DI_QI_INT)
39711         (V4DF_V4DF_PCDOUBLE_V4DI_QI_INT, V4SF_V4SF_PCFLOAT_V4SI_QI_INT)
39712         (V8SF_V8SF_PCFLOAT_V8SI_QI_INT, V4SF_V4SF_PCFLOAT_V2DI_QI_INT)
39713         (V4SF_V4SF_PCFLOAT_V4DI_QI_INT, V2DI_V2DI_PCINT64_V4SI_QI_INT)
39714         (V4DI_V4DI_PCINT64_V4SI_QI_INT, V2DI_V2DI_PCINT64_V2DI_QI_INT)
39715         (V4DI_V4DI_PCINT64_V4DI_QI_INT, V4SI_V4SI_PCINT_V4SI_QI_INT)
39716         (V8SI_V8SI_PCINT_V8SI_QI_INT, V4SI_V4SI_PCINT_V2DI_QI_INT)
39717         (V4SI_V4SI_PCINT_V4DI_QI_INT, VOID_PFLOAT_HI_V16SI_V16SF_INT)
39718         (VOID_PFLOAT_QI_V8SI_V8SF_INT, VOID_PFLOAT_QI_V4SI_V4SF_INT)
39719         (VOID_PDOUBLE_QI_V8SI_V8DF_INT, VOID_PDOUBLE_QI_V4SI_V4DF_INT)
39720         (VOID_PDOUBLE_QI_V4SI_V2DF_INT, VOID_PFLOAT_QI_V8DI_V8SF_INT)
39721         (VOID_PFLOAT_QI_V4DI_V4SF_INT, VOID_PFLOAT_QI_V2DI_V4SF_INT)
39722         (VOID_PDOUBLE_QI_V8DI_V8DF_INT, VOID_PDOUBLE_QI_V4DI_V4DF_INT)
39723         (VOID_PDOUBLE_QI_V2DI_V2DF_INT, VOID_PINT_HI_V16SI_V16SI_INT)
39724         (VOID_PINT_QI_V8SI_V8SI_INT, VOID_PINT_QI_V4SI_V4SI_INT)
39725         (VOID_PLONGLONG_QI_V8SI_V8DI_INT, VOID_PLONGLONG_QI_V4SI_V4DI_INT)
39726         (VOID_PLONGLONG_QI_V4SI_V2DI_INT, VOID_PINT_QI_V8DI_V8SI_INT)
39727         (VOID_PINT_QI_V4DI_V4SI_INT, VOID_PINT_QI_V2DI_V4SI_INT)
39728         (VOID_PLONGLONG_QI_V8DI_V8DI_INT, VOID_QI_V8SI_PCINT64_INT_INT)
39729         (VOID_PLONGLONG_QI_V4DI_V4DI_INT, VOID_PLONGLONG_QI_V2DI_V2DI_INT)
39730         (VOID_HI_V16SI_PCINT_INT_INT, VOID_QI_V8DI_PCINT64_INT_INT)
39731         (VOID_QI_V8DI_PCINT_INT_INT): Remove.
39732         (V16SF_V16SF_PCVOID_V16SI_HI_INT,  V8DF_V8DF_PCVOID_V8SI_QI_INT)
39733         (V8SF_V8SF_PCVOID_V8DI_QI_INT, V8DF_V8DF_PCVOID_V8DI_QI_INT)
39734         (V16SI_V16SI_PCVOID_V16SI_HI_INT, V8DI_V8DI_PCVOID_V8SI_QI_INT)
39735         (V8SI_V8SI_PCVOID_V8DI_QI_INT, V8DI_V8DI_PCVOID_V8DI_QI_INT)
39736         (VOID_PVOID_HI_V16SI_V16SF_INT, VOID_PVOID_QI_V8SI_V8DF_INT)
39737         (VOID_PVOID_QI_V8DI_V8SF_INT, VOID_PVOID_QI_V8DI_V8DF_INT)
39738         (VOID_PVOID_HI_V16SI_V16SI_INT, VOID_PVOID_QI_V8SI_V8DI_INT)
39739         (VOID_PVOID_QI_V8DI_V8SI_INT, VOID_PVOID_QI_V8DI_V8DI_INT)
39740         (V2DF_V2DF_PCVOID_V4SI_QI_INT, V4DF_V4DF_PCVOID_V4SI_QI_INT)
39741         (V2DF_V2DF_PCVOID_V2DI_QI_INT, V4DF_V4DF_PCVOID_V4DI_QI_INT
39742         (V4SF_V4SF_PCVOID_V4SI_QI_INT, V8SF_V8SF_PCVOID_V8SI_QI_INT)
39743         (V4SF_V4SF_PCVOID_V2DI_QI_INT, V4SF_V4SF_PCVOID_V4DI_QI_INT)
39744         (V2DI_V2DI_PCVOID_V4SI_QI_INT, V4DI_V4DI_PCVOID_V4SI_QI_INT)
39745         (V2DI_V2DI_PCVOID_V2DI_QI_INT, V4DI_V4DI_PCVOID_V4DI_QI_INT)
39746         (V4SI_V4SI_PCVOID_V4SI_QI_INT, V8SI_V8SI_PCVOID_V8SI_QI_INT)
39747         (V4SI_V4SI_PCVOID_V2DI_QI_INT, V4SI_V4SI_PCVOID_V4DI_QI_INT)
39748         (VOID_PVOID_QI_V8SI_V8SF_INT, VOID_PVOID_QI_V4SI_V4SF_INT)
39749         (VOID_PVOID_QI_V4SI_V4DF_INT, VOID_PVOID_QI_V4SI_V2DF_INT)
39750         (VOID_PVOID_QI_V4DI_V4SF_INT, VOID_PVOID_QI_V2DI_V4SF_INT)
39751         (VOID_PVOID_QI_V4DI_V4DF_INT, VOID_PVOID_QI_V2DI_V2DF_INT)
39752         (VOID_PVOID_QI_V8SI_V8SI_INT, VOID_PVOID_QI_V4SI_V4SI_INT)
39753         (VOID_PVOID_QI_V4SI_V4DI_INT, VOID_PVOID_QI_V4SI_V2DI_INT)
39754         (VOID_PVOID_QI_V4DI_V4SI_INT, VOID_PVOID_QI_V2DI_V4SI_INT)
39755         (VOID_PVOID_QI_V4DI_V4DI_INT, VOID_PVOID_QI_V2DI_V2DI_INT)
39756         (VOID_QI_V8SI_PCVOID_INT_INT, VOID_HI_V16SI_PCVOID_INT_INT)
39757         (VOID_QI_V8DI_PCVOID_INT_INT): Add.
39758         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Adjust builtin
39759         definitions accordingly.
39760
39761 2017-01-17  Kito Cheng  <kito.cheng@gmail.com>
39762             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
39763
39764         PR target/79079
39765         * internal-fn.c (expand_mul_overflow): Use convert_modes instead of
39766         gen_lowpart.
39767
39768 2017-01-17  Vladimir Makarov  <vmakarov@redhat.com>
39769
39770         PR target/79058
39771         * ira-conflicts.c (ira_build_conflicts): Update total conflict
39772         hard regs for inner regno.
39773
39774 2017-01-17  Martin Liska  <mliska@suse.cz>
39775
39776         PR ipa/71207
39777         * ipa-polymorphic-call.c (contains_type_p): Fix wrong
39778         assumption and add comment.
39779
39780 2017-01-17  Nathan Sidwell  <nathan@acm.org>
39781
39782         * ipa-visibility.c (localize_node): New function, broken out of ...
39783         (function_and_variable_visibility): ... here. Call it.
39784
39785 2017-01-17  Jan Hubicka  <hubicka@ucw.cz>
39786
39787         PR middle-end/77445
39788         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges):
39789         correctly set frequency of oudgoing edge.
39790         (duplicate_thread_path): Fix profile updating.
39791
39792 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
39793
39794         PR other/79046
39795         * configure.ac: Add GCC_BASE_VER.
39796         * Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
39797         version from BASE-VER file.
39798         (CFLAGS-gcc.o): Add -DBASEVER=$(BASEVER_s).
39799         (gcc.o): Depend on $(BASEVER).
39800         * common.opt (dumpfullversion): New option.
39801         * gcc.c (driver_handle_option): Handle OPT_dumpfullversion.
39802         * doc/invoke.texi: Document -dumpfullversion.
39803         * doc/install.texi: Document --with-gcc-major-version-only.
39804         * configure: Regenerated.
39805
39806 2017-01-17  Richard Biener  <rguenther@suse.de>
39807
39808         PR tree-optimization/71433
39809         * tree-vrp.c (register_new_assert_for): Merge same asserts
39810         on all incoming edges.
39811         (process_assert_insertions_for): Handle insertions at the
39812         beginning of BBs.
39813
39814 2017-01-17  Gerald Pfeifer  <gerald@pfeifer.com>
39815
39816         * config/i386/cygwin.h (LIBGCJ_SONAME): Remove.
39817         * config/i386/mingw32.h (LIBGCJ_SONAME): Remove.
39818
39819 2017-01-17  Kaz Kojima  <kkojima@gcc.gnu.org>
39820
39821         PR target/78633
39822         * config/sh/sh.md (cmpeqsi_t+1): Call copy_rtx to avoid invalid
39823         RTL sharing.
39824
39825 2017-01-17  Alan Modra  <amodra@gmail.com>
39826
39827         PR target/79066
39828         * config/rs6000/rs6000.md (elf_high, elf_low): Disable when pic.
39829         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Don't allow
39830         symbolic stack limit when pic.
39831
39832 2017-01-16  Martin Sebor  <msebor@redhat.com>
39833
39834         PR tree-optimization/78608
39835         * gimple-ssa-sprintf.c (tree_digits): Avoid negating TYPE_MIN.
39836
39837 2017-01-16  Jeff Law  <law@redhat.com>
39838
39839         Revert:
39840         2016-12-02  Tadek Kijkowski  <tkijkowski@gmail.com>
39841         * Makefile.in (PREPROCESSOR_DEFINES): Add a level of indirection
39842         for several include directories that may be relative to sysroot.
39843         * config/i386/x-mingw32 (gplus_includedir): Define.
39844         (gplus_tool_includedir, gplus_backward_include_dir): Likewise.
39845         (native_system_includedir): Likewise.
39846         * config/i386/mingw32.h (STANDARD_STARTFILE_PREFIX_1): Do not
39847         override if TARGET_SYSTEM_ROOT is defined.
39848         (NATIVE_SYSTEM_HEADER_DIR): Likewise.
39849
39850         PR tree-optimization/79090
39851         PR tree-optimization/33562
39852         PR tree-optimization/61912
39853         PR tree-optimization/77485
39854         * tree-ssa-dse.c (compute_trims): Accept STMT argument.  Dump STMT
39855         and computed trims into the dump file.
39856
39857 2017-01-17  Uros Bizjak  <ubizjak@gmail.com>
39858
39859         * config/i386/i386.h (LIMIT_RELOAD_CLASS): Remove.
39860
39861 2017-01-16  Jakub Jelinek  <jakub@redhat.com>
39862
39863         PR c/79089
39864         * gimplify.c (gimplify_init_constructor): If want_value and
39865         object == lhs, unshare lhs to avoid invalid tree sharing.  Formatting
39866         fix.
39867
39868         PR target/79080
39869         * loop-doloop.c (doloop_modify): Call unshare_all_rtl_in_chain on
39870         sequence.  Formatting fixes.
39871         (doloop_optimize): Formatting fixes.
39872
39873         PR driver/49726
39874         * gcc.c (debug_level_greater_than_spec_func): New function.
39875         (static_spec_functions): Add debug-level-gt spec function.
39876         (ASM_DEBUG_SPEC, cpp_options): Use %:debug-level-gt(0) instead of
39877         !g0.
39878         * config/darwin.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
39879         * config/darwin9.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
39880         * common.opt (g, gcoff, gdwarf, gdwarf-, ggdb, gno-pubnames,
39881         gpubnames, ggnu-pubnames, gno-record-gcc-switches,
39882         grecord-gcc-switches, gno-strict-dwarf, gstrict-dwarf, gstabs,
39883         gstabs+, gtoggle, gvms, gxcoff, gxcoff+): Add Driver flag.
39884
39885 2017-01-16  Uros Bizjak  <ubizjak@gmail.com>
39886
39887         * config/i386/i386.h (HARD_REGNO_CALLER_SAVE_MODE): Apply HImode and
39888         QImode fixups to general and mask registers only.
39889
39890 2017-01-16  Carl Love  <cel@us.ibm.com>
39891
39892         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Add support
39893         for built-in functions
39894         vector signed char vec_nabs (vector signed char)
39895         vector signed short vec_nabs (vector signed short)
39896         vector signed int vec_nabs (vector signed int)
39897         vector signed long long vec_nabs (vector signed long long)
39898         vector float vec_nabs (vector float)
39899         vector double vec_nabs (vector double)
39900         * config/rs6000/rs6000-builtin.def: Add definitions for NABS functions
39901         and NABS overload.
39902         * config/rs6000/altivec.md: New define_expand nabs<mode>2 types
39903         * config/rs6000/altivec.h: New define for vec_nabs built-in function.
39904         * doc/extend.texi: Update the documentation file for the new built-in
39905         functions.
39906
39907 2017-01-16  Martin Sebor  <msebor@redhat.com>
39908
39909         * gimple-ssa-sprintf.c (format_directive): Correct a typo in a warning
39910         message.
39911
39912 2017-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
39913
39914         * config/rs6000/rs6000.c (rtx_is_swappable_p): Change
39915         UNSPEC_VSX__XXSPLTD to require special splat handling.
39916
39917 2017-01-16  David Malcolm  <dmalcolm@redhat.com>
39918
39919         PR bootstrap/78616
39920         * system.h: Poison strndup.
39921
39922 2017-01-16  Alan Modra  <amodra@gmail.com>
39923
39924         PR target/79098
39925         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Don't
39926         use a switch.
39927
39928 2017-01-16  Georg-Johann Lay  <avr@gjlay.de>
39929
39930         * config/avr/avr.h (BRANCH_COST) [reload_completed]: Increase by 4.
39931
39932 2017-01-15  Uros Bizjak  <ubizjak@gmail.com>
39933
39934         * config/i386/i386.c (ix86_legitimate_combined_insn): Do not
39935         call recog here.  Assert that INSN_CODE (insn) is non-negative.
39936
39937 2017-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
39938
39939         PR target/72749
39940         * cfgrtl.c (rtl_split_edge): Also patch jump insns that jump to the
39941         fallthrough.
39942         * haifa-sched.c (dump_insn_stream): Don't crash if there is a label
39943         in the currently scheduled RTL fragment.
39944
39945 2017-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
39946
39947         PR rtl-optimization/78751
39948         * ifcvt.c (find_cond_trap): If we generated a non-existing insn,
39949         give up.
39950
39951 2017-01-14  Jeff Law  <law@redhat.com>
39952
39953         PR tree-optimization/79090
39954         * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject zero length and
39955         variable length stores.
39956         (compute_trims): Delete dead assignment to *trim_tail.
39957         (dse_dom_walker::dse_optimize_stmt): Optimize mem* calls with
39958         zero length.
39959
39960 2017-01-14  Bernd Schmidt  <bschmidt@redhat.com>
39961
39962         PR rtl-optimization/78626
39963         PR rtl-optimization/78727
39964         * cprop.c (one_cprop_pass): Collect unconditional traps in the middle
39965         of a block, and split such blocks after everything else is finished.
39966
39967 2017-01-14  Alan Modra  <amodra@gmail.com>
39968
39969         PR target/72749
39970         * combine.c (recog_for_combine_1): Set INSN_CODE before calling
39971         target legitimate_combined_insn.
39972         * config/rs6000/rs6000.c (TARGET_LEGITIMATE_COMBINED_INSN): Define.
39973         (rs6000_legitimate_combined_insn): New function.
39974         * config/rs6000/rs6000.md (UNSPEC_DOLOOP): Delete, and remove
39975         all uses.
39976         (ctr<mode>_internal3): Rename from *ctr<mode>_internal5.
39977         (ctr<mode>_internal4): Rename from *ctr<mode>_internal6.
39978         (ctr<mode>_internal1, ctr<mode>_internal2): Remove '*' from name.
39979
39980 2017-01-14  Gerald Pfeifer  <gerald@pfeifer.com>
39981
39982         * doc/frontends.texi (G++ and GCC): Remove references to Java.
39983
39984 2017-01-13  Jeff Law  <law@redhat.com>
39985
39986         PR tree-optimization/33562
39987         PR tree-optimization/61912
39988         PR tree-optimization/77485
39989         * tree-ssa-dse.c (delete_dead_call): Accept gsi rather than
39990         a statement.
39991         (delete_dead_assignment): Likewise.
39992         (dse_dom_walker::dse_optimize_stmt): Pass in the gsi rather than
39993         statement to delete_dead_call and delete_dead_assignment.
39994
39995 2017-01-13  David Malcolm  <dmalcolm@redhat.com>
39996
39997         PR c/78304
39998         * substring-locations.c (format_warning_va): Strengthen case 1 so
39999         that both endpoints of the substring must be within the format
40000         range for just the substring to be printed.
40001
40002 2017-01-13  Uros Bizjak  <ubizjak@gmail.com>
40003
40004         * config/i386/i386.opt (msgx): Use ix86_isa_flags2 variable.
40005         * config/i386/i386.c (ix86_target_string): Add missing options
40006         to isa_opts and reorder options by implied ISAs.  Rename isa_opts2 to
40007         isa2_opts, ix86_flag_opts to flag2_opts, ix86_target_other to
40008         flags_other and ix86_target_other to flags2_other.  Display unknown
40009         isa2 options.
40010         (ix86_valid_target_attribute_inner_p): Add missing options and
40011         reorder options by implied ISAs, as in ix86_target_string.
40012
40013 2017-01-13  Richard Sandiford  <richard.sandiford@arm.com>
40014
40015         * hash-table.h (hash_table::too_empty_p): New function.
40016         (hash_table::expand): Use it.
40017         (hash_table::traverse): Likewise.
40018         (hash_table::empty_slot): Use sizeof (value_type) instead of
40019         sizeof (PTR) to convert bytes to elements.  Shrink the table
40020         if the current size is excessive for the current number of
40021         elements.
40022
40023 2017-01-13  Richard Sandiford  <richard.sandiford@arm.com>
40024
40025         * ira-costs.c (record_reg_classes): Break from the inner loop
40026         early once alt_fail is known to be true.  Update outer loop
40027         handling accordingly.
40028
40029 2017-01-13  Jeff Law  <law@redhat.com>
40030
40031         * tree-ssa-dse.c (decrement_count): New function.
40032         (increment_start_addr, maybe_trim_memstar_call): Likewise.
40033         (dse_dom_walker::optimize_stmt): Call maybe_trim_memstar_call directly
40034         when we know the partially dead statement is a mem* function.
40035
40036         PR tree-optimization/61912
40037         PR tree-optimization/77485
40038         * tree-ssa-dse.c: Include expr.h.
40039         (maybe_trim_constructor_store): New function.
40040         (maybe_trim_partially_dead_store): Call maybe_trim_constructor_store.
40041
40042         PR tree-optimization/33562
40043         PR tree-optimization/61912
40044         PR tree-optimization/77485
40045         * doc/invoke.texi: Document new dse-max-object-size param.
40046         * params.def (PARM_DSE_MAX_OBJECT_SIZE): New PARAM.
40047         * tree-ssa-dse.c: Include params.h.
40048         (dse_store_status): New enum.
40049         (initialize_ao_ref_for_dse): New, partially extracted from
40050         dse_optimize_stmt.
40051         (valid_ao_ref_for_dse, normalize_ref): New.
40052         (setup_live_bytes_from_ref, compute_trims): Likewise.
40053         (clear_bytes_written_by, maybe_trim_complex_store): Likewise.
40054         (maybe_trim_partially_dead_store): Likewise.
40055         (maybe_trim_complex_store): Likewise.
40056         (dse_classify_store): Renamed from dse_possibly_dead_store_p.
40057         Track what bytes live from the original store.  Return tri-state
40058         for dead, partially dead or live.
40059         (dse_dom_walker): Add constructor, destructor and new private members.
40060         (delete_dead_call, delete_dead_assignment): New extracted from
40061         dse_optimize_stmt.
40062         (dse_optimize_stmt): Make a member of dse_dom_walker.
40063         Use initialize_ao_ref_for_dse.
40064
40065         PR tree-optimization/33562
40066         PR tree-optimization/61912
40067         PR tree-optimization/77485
40068         * sbitmap.h (bitmap_count_bits): Prototype.
40069         (bitmap_clear_range, bitmap_set_range): Likewise.
40070         * sbitmap.c (bitmap_clear_range): New function.
40071         (bitmap_set_range, sbitmap_popcount, bitmap_count_bits): Likewise.
40072
40073 2017-01-13  Martin Liska  <mliska@suse.cz>
40074
40075         PR ipa/79043
40076         * function.c (set_cfun): Add new argument force.
40077         * function.h (set_cfun): Likewise.
40078         * ipa-inline-transform.c (inline_call): Use the function when
40079         strict alising from is dropped for function we inline to.
40080
40081 2017-01-13  Richard Biener  <rguenther@suse.de>
40082
40083         * tree-pretty-print.c (dump_generic_node): Fix inverted condition
40084         for dumping GIMPLE INTEGER_CSTs.
40085
40086 2017-01-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
40087
40088         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define __STDC_VERSION__
40089         to 201112L since C++17.
40090
40091 2017-01-13  Maxim Ostapenko  <m.ostapenko@samsung.com>
40092
40093         PR sanitizer/78887
40094         * asan.c (asan_needs_odr_indicator_p): Don't emit ODR indicators
40095         if -fsanitize=kernel-address is present.
40096
40097 2017-01-13  Richard Biener  <rguenther@suse.de>
40098
40099         * tree-pretty-print.c (dump_generic_node): Dump INTEGER_CSTs
40100         as _Literal ( type ) number in case usual suffixes do not
40101         preserve all information.
40102
40103 2017-01-13  Richard Biener  <rguenther@suse.de>
40104
40105         PR tree-optimization/77283
40106         * gimple-ssa-split-paths.c: Include gimple-ssa.h, tree-phinodes.h
40107         and ssa-iterators.h.
40108         (is_feasible_trace): Implement a cost model based on joiner
40109         PHI node uses.
40110
40111 2017-01-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
40112
40113         PR target/79004
40114         * config/rs6000/rs6000.md (FP_ISA3): Do not optimize converting
40115         char or short to __float128/_Float128 directly.
40116
40117 2017-01-12  Martin Sebor  <msebor@redhat.com>
40118
40119         to -Wformat-overflow.
40120         * gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust.
40121         (min_bytes_remaining): Same.
40122         (get_string_length): Same.
40123         (format_string): Same.
40124         (format_directive): Same.
40125         (add_bytes): Same.
40126         (pass_sprintf_length::handle_gimple_call): Same.
40127
40128 2017-01-12  Jakub Jelinek  <jakub@redhat.com>
40129
40130         * gimple-ssa-sprintf.c (try_substitute_return_value): Remove
40131         info.nowrite calls with no lhs that can't throw.  Return bool
40132         whether gsi_remove has been called or not.
40133         (pass_sprintf_length::handle_gimple_call): Return bool whether
40134         try_substitute_return_value called gsi_remove.  Formatting fix.
40135         (pass_sprintf_length::execute): Don't use gsi_remove if
40136         handle_gimple_call returned true.
40137
40138         PR bootstrap/79069
40139         * cfgrtl.c (rtl_tidy_fallthru_edge): For any_uncondjump_p that can't
40140         be removed due to side-effects, don't remove following barrier nor
40141         turn the successor edge into fallthru edge.
40142
40143 2017-01-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
40144
40145         PR target/79044
40146         * config/rs6000/rs6000.c (insn_is_swappable_p): Mark
40147         element-reversing loads and stores as not swappable.
40148
40149 2017-01-12  Nathan Sidwell  <nathan@acm.org>
40150             Nicolai Stange  <nicstange@gmail.com>
40151
40152         * combine.c (try_combine): Don't ignore result of overlap checking
40153         loop.  Combine overlap & asm check into single loop.
40154
40155 2017-01-12  Richard Biener  <rguenther@suse.de>
40156
40157         * tree-pretty-print.c (dump_generic_node): Provide -gimple
40158         variant for MEM_REF.  Sanitize INTEGER_CST for -gimple.
40159
40160 2017-01-12  Richard Biener  <rguenther@suse.de>
40161
40162         * tree.c (initialize_tree_contains_struct): Make TS_OPTIMIZATION
40163         and TS_TARGET_OPTION directly derive from TS_BASE.
40164         * tree-core.h (tree_optimization_option): Derive from tree_base.
40165         (tree_target_option): Likewise.
40166
40167 2017-01-11  Uros Bizjak  <ubizjak@gmail.com>
40168
40169         * config/i386/i386.c (memory_address_length): Increase len
40170         only when rip_relative_addr_p returns false.
40171
40172 2017-01-11  Julia Koval  <julia.koval@intel.com>
40173
40174         * common/config/i386/i386-common.c (OPTION_MASK_ISA_SGX_UNSET): New.
40175         (OPTION_MASK_ISA_SGX_SET): New.
40176         (ix86_handle_option): Handle OPT_msgx.
40177         * config.gcc: Added sgxintrin.h.
40178         * config/i386/driver-i386.c (host_detect_local_cpu): Detect sgx.
40179         * config/i386/i386-c.c (ix86_target_macros_internal): Define __SGX__.
40180         * config/i386/i386.c (ix86_target_string): Add -msgx.
40181         (PTA_SGX): New.
40182         (ix86_option_override_internal): Handle new options.
40183         (ix86_valid_target_attribute_inner_p): Add sgx.
40184         * config/i386/i386.h (TARGET_SGX, TARGET_SGX_P): New.
40185         * config/i386/i386.opt: Add msgx.
40186         * config/i386/sgxintrin.h: New file.
40187         * config/i386/x86intrin.h: Add sgxintrin.h.
40188
40189 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
40190
40191         PR c++/71537
40192         * fold-const.c (maybe_nonzero_address): Return 1 for function
40193         local objects.
40194         (tree_single_nonzero_warnv_p): Don't handle function local objects
40195         here.
40196
40197         PR c++/72813
40198         * gcc.c (default_compilers): Don't add -o %g.s for -S -save-temps
40199         of c-header.
40200
40201 2017-01-11  David Malcolm  <dmalcolm@redhat.com>
40202
40203         PR driver/78877
40204         * opts.c: Include "spellcheck.h"
40205         (struct string_fragment): New struct.
40206         (struct edit_distance_traits<const string_fragment &>): New
40207         struct.
40208         (get_closest_sanitizer_option): New function.
40209         (parse_sanitizer_options): Offer suggestions for unrecognized arguments.
40210
40211 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
40212
40213         * dwarf2out.c (DWARF_COMPILE_UNIT_HEADER_SIZE): For DWARF5 decrease
40214         by 12.
40215         (DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE): Always
40216         DWARF_COMPILE_UNIT_HEADER_SIZE plus 12.
40217         (DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE): Define.
40218         (calc_base_type_die_sizes): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE
40219         for initial die_offset if dwarf_split_debug_info.
40220         (output_comp_unit): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE for
40221         initial next_die_offset if dwo_id is non-NULL.  Don't emit padding
40222         fields.
40223         (output_skeleton_debug_sections): Formatting fix.  Use
40224         DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE instead of
40225         DWARF_COMPILE_UNIT_HEADER_SIZE.  Don't emit padding.
40226
40227 2017-01-11  Wilco Dijkstra  <wdijkstr@arm.com>
40228
40229         * config/arm/cortex-a53.md: Add bypasses for
40230         cortex_a53_r2f_cvt.
40231         (cortex_a53_r2f): Only use for transfers.
40232         (cortex_a53_f2r): Likewise.
40233         (cortex_a53_r2f_cvt): Add reservation for conversions.
40234         (cortex_a53_f2r_cvt): Likewise.
40235
40236 2017-01-11  Tamar Christina  <tamar.christina@arm.com>
40237
40238         * config/arm/arm_neon.h: Add __artificial__ and gnu_inline
40239         to all inlined functions, change static to extern.
40240
40241 2017-01-11  Christophe Lyon  <christophe.lyon@linaro.org>
40242
40243         PR target/78253
40244         * config/arm/arm.c (legitimize_pic_address): Handle reference to
40245         weak symbol.
40246         (arm_assemble_integer): Likewise.
40247
40248 2017-01-11  Richard Earnshaw  <rearnsha@arm.com>
40249
40250         * config.gcc: Use new awk script to check CPU, FPU and architecture
40251         parameters for --with-... options.
40252         * config/arm/parsecpu.awk: New file
40253         * config/arm/arm-cpus.in: New file.
40254         * config/arm/arm-opts.h: Include arm-cpu.h instead of processing .def
40255         files.
40256         * config/arm/arm.c: Include arm-cpu-data.h instead of processing .def
40257         files.
40258         * config/arm/t-arm: Update dependency rules.
40259         * common/config/arm/arm-common.c: Include arm-cpu-cdata.h instead
40260         of processing .def files.
40261         * config/arm/genopt.sh: Deleted.
40262         * config/arm/gentune.sh: Deleted.
40263         * config/arm/arm-cores.def: Deleted.
40264         * config/arm/arm-arches.def: Deleted.
40265         * config/arm/arm-fpus.def: Deleted.
40266         * config/arm/arm-tune.md: Regenerated.
40267         * config/arm/arm-tables.opt: Regenerated.
40268         * config/arm/arm-cpu.h: New generated file.
40269         * config/arm/arm-cpu-data.h: New generated file.
40270         * config/arm/arm-cpu-cdata.h: New generated file.
40271
40272 2017-01-11  Maxim Ostapenko  <m.ostapenko@samsung.com>
40273
40274         PR lto/79042
40275         * lto-cgraph.c (lto_output_varpool_node): Pack dynamically_initialized
40276         bit.
40277         (input_varpool_node): Unpack dynamically_initialized bit.
40278
40279 2017-01-11  Eric Botcazou  <ebotcazou@adacore.com>
40280
40281         PR rtl-optimization/79032
40282         * lra-constraints.c (simplify_operand_subreg): In the MEM case, test
40283         the alignment of the adjusted memory reference against that of MODE,
40284         instead of the alignment of the original memory reference.
40285
40286 2017-01-11  Martin Jambor  <mjambor@suse.cz>
40287
40288         * hsa.c (hsa_callable_function_p): Revert addition of DECL_ARTIFICIAL
40289         test.
40290         * ipa-hsa.c (process_hsa_functions): Only duplicate non-artificial
40291         decorated functions.
40292
40293 2017-01-11  Richard Biener  <rguenther@suse.de>
40294
40295         * tree-vrp.c (evrp_dom_walker::before_dom_children): Also
40296         set range/nonnull info for PHI results.  Do not set it on
40297         stmts marked for removal.
40298
40299 2017-01-10  Eric Botcazou  <ebotcazou@adacore.com>
40300
40301         * expr.c (store_field): In the bitfield case, fetch the return value
40302         from the registers before applying a single big-endian adjustment.
40303         Always do a final load for a BLKmode value not larger than a word.
40304
40305 2017-01-10  David Malcolm  <dmalcolm@redhat.com>
40306
40307         PR c++/77949
40308         * input.c (selftest::test_accessing_ordinary_linemaps): Verify
40309         that we correctly handle column numbers greater than
40310         LINE_MAP_MAX_COLUMN_NUMBER.
40311
40312 2017-01-10  Martin Sebor  <msebor@redhat.com>
40313
40314         PR middle-end/78245
40315         * gimple-ssa-sprintf.c (get_destination_size): Call
40316         {init,fini}object_sizes.
40317         * tree-object-size.c (addr_object_size): Adjust.
40318         (pass_through_call): Adjust.
40319         (pass_object_sizes::execute): Adjust.
40320         * tree-object-size.h (fini_object_sizes): Declare.
40321
40322 2017-01-10  Martin Sebor  <msebor@redhat.com>
40323
40324         PR tree-optimization/78775
40325         * builtins.c (get_size_range): Move...
40326         * calls.c: ...to here.
40327         (alloc_max_size): Accept zero argument.
40328         (operand_signed_p): Remove.
40329         (maybe_warn_alloc_args_overflow): Call get_size_range.
40330         * calls.h (get_size_range): Declare.
40331
40332 2017-01-10  Joe Seymour  <joe.s@somniumtech.com>
40333
40334         * config/msp430/driver-msp430.c (msp430_mcu_data): Sync with data
40335         from TI's devices.csv file as of September 2016.
40336         * config/msp430/msp430.c (msp430_mcu_data): Likewise.
40337
40338 2017-01-10  Sandra Loosemore  <sandra@codesourcery.com>
40339
40340         * doc/extend.texi: Tweak formatting to fix overfull hbox warnings.
40341         * doc/invoke.texi: Likewise.
40342         * doc/md.texi: Likewise.
40343         * doc/objc.texi: Likewise.
40344
40345 2017-01-10  Joshua Conner  <joshconner@google.com>
40346
40347         * config/arm/fuchsia-elf.h: New file.
40348         * config/fuchsia.h: New file.
40349         * config.gcc (*-*-fuchsia*): Set native_system_header_dir.
40350         (aarch64*-*-fuchsia*, arm*-*-fuchsia*, x86_64-*-fuchsia*): Add to
40351         targets.
40352         * config.host: (aarch64*-*-fuchsia*, arm*-*-fuchsia*): Add to hosts.
40353
40354 2016-01-10  Richard Biener  <rguenther@suse.de>
40355
40356         PR tree-optimization/79034
40357         * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
40358         Propagate out degenerate PHIs in the joiner.
40359
40360 2017-01-10  Martin Liska  <mliska@suse.cz>
40361
40362         * ipa-icf.c (sort_sem_items_by_decl_uid): New function.
40363         (sort_congruence_classes_by_decl_uid): Likewise.
40364         (sort_congruence_class_groups_by_decl_uid): Likewise.
40365         (sem_item_optimizer::merge_classes): Sort class, groups in these
40366         classes and members in the groups by DECL_UID of declarations.
40367         This would make merge operations stable.
40368
40369 2017-01-10  Martin Liska  <mliska@suse.cz>
40370
40371         * ipa-icf.c (sem_item_optimizer::sem_item_optimizer): Remove
40372         usage of m_classes_vec.
40373         (sem_item_optimizer::~sem_item_optimizer):  Likewise.
40374         (sem_item_optimizer::get_group_by_hash): Likewise.
40375         (sem_item_optimizer::subdivide_classes_by_equality): Likewise.
40376         (sem_item_optimizer::subdivide_classes_by_sensitive_refs): Likewise.
40377         (sem_item_optimizer::verify_classes): Likewise.
40378         (sem_item_optimizer::process_cong_reduction): Likewise.
40379         (sem_item_optimizer::dump_cong_classes): Likewise.
40380         (sem_item_optimizer::merge_classes): Likewise.
40381         * ipa-icf.h (congruence_class_hash): Rename from
40382         congruence_class_group_hash.  Remove declaration of m_classes_vec.
40383
40384 2017-01-10  Andrew Senkevich  <andrew.senkevich@intel.com>
40385
40386         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VPOPCNTDQ_SET,
40387         OPTION_MASK_ISA_AVX512VPOPCNTDQ_UNSET): New.
40388         * config.gcc: Add avx512vpopcntdqintrin.h.
40389         * config/i386/avx512vpopcntdqintrin.h: New.
40390         * config/i386/cpuid.h (bit_AVX512VPOPCNTDQ): New.
40391         * config/i386/i386-builtin-types.def: Add new types.
40392         * config/i386/i386-builtin.def (__builtin_ia32_vpopcountd_v16si,
40393         __builtin_ia32_vpopcountd_v16si_mask, __builtin_ia32_vpopcountq_v8di,
40394         __builtin_ia32_vpopcountq_v8di_mask): New.
40395         * config/i386/i386-c.c (ix86_target_macros_internal): Define
40396         __AVX512VPOPCNTDQ__.
40397         * config/i386/i386.c (ix86_target_string): Add -mavx512vpopcntdq.
40398         (PTA_AVX512VPOPCNTDQ): Define.
40399         * config/i386/i386.h (TARGET_AVX512VPOPCNTDQ,
40400         TARGET_AVX512VPOPCNTDQ_P): Define.
40401         * config/i386/i386.opt: Add mavx512vpopcntdq.
40402         * config/i386/immintrin.h: Include avx512vpopcntdqintrin.h.
40403         * config/i386/sse.md (define_insn "vpopcount<mode><mask_name>"): New.
40404
40405 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
40406
40407         PR middle-end/77484
40408         * predict.def (PRED_CALL): Set to 67.
40409
40410 2017-01-09  Eric Botcazou  <ebotcazou@adacore.com>
40411
40412         * expr.c (store_field): In the bitfield case, if the value comes from
40413         a function call and is of an aggregate type returned in registers, do
40414         not modify the field mode; extract the value in all cases if the mode
40415         is BLKmode and the size is not larger than a word.
40416
40417 2017-01-09  Dominique d'Humieres  <dominiq@lps.ens.fr>
40418
40419         PR target/71017
40420         * config/i386/cpuid.h: Fix undefined behavior.
40421
40422 2017-01-04  Jeff Law  <law@redhat.com>
40423
40424         PR tree-optimization/79007
40425         PR tree-optimization/67955
40426         * tree-ssa-alias.c (same_addr_size_stores_p): Only need to be
40427         conservative for pt.null when flag_non_call_exceptions is on.
40428
40429 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
40430
40431         PR translation/79019
40432         PR translation/79020
40433         * params.def (PARAM_INLINE_MIN_SPEEDUP,
40434         PARAM_IPA_CP_SINGLE_CALL_PENALTY,
40435         PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD): Fix typos
40436         in descriptions.
40437         * config/avr/avr.opt (maccumulate-args): Likewise.
40438         * config/msp430/msp430.opt (mwarn-mcu): Likewise.
40439         * common.opt (freport-bug): Likewise.
40440         * cif-code.def (CIF_FINAL_ERROR): Likewise.
40441         * doc/invoke.texi (ipa-cp-single-call-penalty): Likewise.
40442         * config/s390/s390.c (s390_invalid_binary_op): Fix spelling in
40443         translatable string.
40444         * config/i386/i386.c (function_value_32): Likewise.
40445         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Likewise.
40446         * config/msp430/msp430.c (msp430_option_override, msp430_attr):
40447         Likewise.
40448         * config/msp430/driver-msp430.c (msp430_select_hwmult_lib): Likewise.
40449         * common/config/msp430/msp430-common.c (msp430_handle_option):
40450         Likewise.
40451         * symtab.c (symtab_node::verify_base): Likewise.
40452         * opts.c (set_debug_level): Likewise.
40453         * tree.c (verify_type_variant): Likewise.  Fix typo in comment.
40454         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add
40455         missing whitespace to translatable strings.
40456         * config/avr/avr.md (bswapsi2): Fix typo in comment.
40457         * config/sh/superh.h: Likewise.
40458         * config/i386/xopintrin.h: Likewise.
40459         * config/i386/znver1.md: Likewise.
40460         * config/rs6000/rs6000.c (struct rs6000_opt_mask): Likewise.
40461         * ipa-inline-analysis.c (compute_inline_parameters): Likewise.
40462         * double-int.h (struct double_int): Likewise.
40463         * double-int.c (div_and_round_double): Likewise.
40464         * wide-int.cc: Likewise.
40465         * tree-ssa.c (non_rewritable_mem_ref_base): Likewise.
40466         * tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise.
40467         * cfgcleanup.c (crossjumps_occured): Renamed to ...
40468         (crossjumps_occurred): ... this.
40469         (try_crossjump_bb, try_head_merge_bb, try_optimize_cfg, cleanup_cfg):
40470         Adjust all uses.
40471
40472         PR tree-optimization/78899
40473         * tree-if-conv.c (version_loop_for_if_conversion): Instead of
40474         returning bool return struct loop *, NULL for failure and the new
40475         loop on success.
40476         (versionable_outer_loop_p): Don't version outer loop if it has
40477         dont_vectorized bit set.
40478         (tree_if_conversion): When versioning outer loop, ensure
40479         tree_if_conversion is performed also on the inner loop of the
40480         non-vectorizable outer loop copy.
40481         * tree-vectorizer.c (set_uid_loop_bbs): Formatting fix.  Fold
40482         LOOP_VECTORIZED in inner loop of the scalar outer loop and
40483         prevent vectorization of it.
40484         (vectorize_loops): For outer + inner LOOP_VECTORIZED, ensure
40485         the outer loop vectorization of the non-scalar version is attempted
40486         before vectorization of the inner loop in scalar version.  If
40487         outer LOOP_VECTORIZED guarded loop is not vectorized, prevent
40488         vectorization of its inner loop.
40489         * tree-vect-loop-manip.c (rename_variables_in_bb): If outer_loop
40490         has 2 inner loops, rename also on edges from bb whose single pred
40491         is outer_loop->header.  Fix typo in function comment.
40492
40493 2017-01-09  Martin Sebor  <msebor@redhat.com>
40494
40495         PR bootstrap/79033
40496         * asan.c (asan_emit_stack_protection): Increase local buffer size
40497         to avoid snprintf truncation warning.
40498
40499 2017-01-09  Andrew Pinski  <apinski@cavium.com>
40500
40501         * config/aarch64/aarch64-cores.def: Add thunderx2t99.  Change vulcan
40502         to reference thunderx2t99 for the tuning structure
40503         * config/aarch64/aarch64-cost-tables.h (vulcan_extra_costs):
40504         Rename to ...
40505         (thunderx2t99_extra_costs): This.
40506         * config/aarch64/aarch64-tune.md: Regenerate.
40507         * config/aarch64/aarch64.c (vulcan_addrcost_table): Rename to ...
40508         (vulcan_addrcost_table): This.
40509         (vulcan_regmove_cost): Rename to ...
40510         (thunderx2t99_regmove_cost): This.
40511         (vulcan_vector_cost): Rename to ...
40512         (thunderx2t99_vector_cost): this.
40513         (vulcan_branch_cost): Rename to ...
40514         (thunderx2t99_branch_cost): This.
40515         (vulcan_tunings): Rename to ...
40516         (thunderx2t99_tunings): This and s/vulcan/thunderx2t99 .
40517         * doc/invoke.texi (AARCH64/mtune): Add thunderx2t99.
40518
40519 2017-01-09  Martin Jambor  <mjambor@suse.cz>
40520
40521         PR ipa/78365
40522         PR ipa/78599
40523         * ipa-prop.h (ipa_jump_func): Swap positions of vr_known and m_vr.
40524         * ipa-cp.c (ipa_vr_operation_and_type_effects): New function.
40525         (propagate_vr_accross_jump_function): Use the above function for all
40526         value range computations for pass-through jump functions and type
40527         converasion from explicit value range values.
40528         (ipcp_propagate_stage): Do not attempt to deduce types of formal
40529         parameters from TYPE_ARG_TYPES.
40530         * ipa-prop.c (ipa_write_jump_function): Remove trailing whitespace.
40531         (ipa_write_node_info): Stream type of the actual argument.
40532         (ipa_read_node_info): Likewise. Also remove trailing whitespace.
40533
40534 2017-01-09  Martin Liska  <mliska@suse.cz>
40535
40536         PR pch/78970
40537         * gcc.c (driver_handle_option): Handle OPT_E and set have_E.
40538         (lookup_compiler): Do not show error message with have_E.
40539
40540 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
40541
40542         PR tree-optimization/78938
40543         * tree-vect-stmts.c (vectorizable_condition): For non-masked COND_EXPR
40544         where comp_vectype is VECTOR_BOOLEAN_TYPE_P, use
40545         BIT_{NOT,XOR,AND,IOR}_EXPR on the comparison operands instead of
40546         {EQ,NE,GE,GT,LE,LT}_EXPR directly inside of VEC_COND_EXPR.  Formatting
40547         fixes.
40548
40549 2017-01-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
40550
40551         * tree-ssa-address.c (gen_addr_rtx): Don't handle index if it
40552         is const0_rtx.
40553
40554 2017-01-09  Richard Biener  <rguenther@suse.de>
40555
40556         PR tree-optimization/78997
40557         * tree-vect-slp.c (vect_mask_constant_operand_p): Handle SSA
40558         name condition properly.
40559
40560 2017-01-09  Richard Biener  <rguenther@suse.de>
40561
40562         PR debug/79000
40563         * dwarf2out.c (is_cxx): New overload with context.
40564         (is_naming_typedef_decl): Use it.
40565
40566 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
40567
40568         * invoke.texi (Option Summary): Correct spacing in option lists
40569         and add line breaks to fix over-long lines.
40570
40571 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
40572
40573         PR middle-end/17660
40574
40575         * extend.texi (Common Variable Attributes): Add xref to GCC
40576         Internals manual to explain mode attribute keywords.
40577
40578 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
40579
40580         PR other/16519
40581         * doc/invoke.texi (Option Summary): Move -pthread to Linker Options
40582         and Preprocessor Options.
40583         (Options for Linking): Document -pthread here....
40584         (RS/6000 and PowerPC Options): ...not here.
40585         (Solaris 2 Options): ...or here.
40586         * doc/cppopts.texi: Document -pthread.
40587
40588 2017-01-08  Martin Sebor  <msebor@redhat.com>
40589
40590         PR middle-end/77708
40591         * doc/invoke.texi (Warning Options): Document -Wformat-truncation.
40592         * gimple-ssa-sprintf.c (call_info::reval_used, call_info::warnopt):
40593         New member functions.
40594         (format_directive): Used them.
40595         (add_bytes): Same.
40596         (pass_sprintf_length::handle_gimple_call): Same.
40597         * graphite-sese-to-poly.c (tree_int_to_gmp): Increase buffer size
40598         to avoid truncation for any argument.
40599         (extract_affine_mul): Same.
40600         * tree.c (get_file_function_name): Same.
40601
40602 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
40603
40604         PR middle-end/77484
40605         * predict.def (PRED_INDIR_CALL): Set to 86.
40606
40607 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
40608
40609         PR preprocessor/54124
40610         * doc/cppopts.texi: Reformat -d subtable to list the full name
40611         of the options.  Add cross-reference to the docs for the general
40612         compiler -d options.
40613         * doc/invoke.texi (Developer Options): Add cross-reference to the
40614         preprocessor-specific -d option documentation.
40615
40616 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
40617
40618         PR preprocessor/13498
40619         * doc/cpp.texi (Search Path): Rewrite to remove obsolete and
40620         redudant material, and reflect new command-line options.
40621         (System Headers): Likewise.
40622
40623 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
40624
40625         * doc/cppdiropts.texi: Merge documentation of -I, -iquote,
40626         -isystem, and -idirafter.  Copy-edit.
40627         * doc/cppopts.texi: Copy-edit.  Remove contradiction about
40628         default for -ftrack-macro-expansion.  Delete obsolete and
40629         badly-formatted implementation details about -fdebug-cpp output.
40630         * doc/cppwarnopts.texi: Copy-edit.
40631
40632 2017-01-07  David Malcolm  <dmalcolm@redhat.com>
40633
40634         PR c++/72803
40635         * input.c (selftest::test_accessing_ordinary_linemaps): Verify
40636         that the transition from a max line width >= 1<<10 to narrower
40637         lines works correctly.
40638
40639 2017-01-07  Alexandre Oliva  <aoliva@redhat.com>
40640
40641         * doc/options.texi (PerFunction): New.
40642         * opt-functions.awk (switch_flags): Map both Optimization and
40643         PerFunction to CL_OPTIMIZATION.
40644         * opth-gen.awk: Test for PerFunction flag along with
40645         Optimization.
40646         * optc-save-gen.awk: Likewise.  Introduce var_opt_hash and set
40647         it only when the latter is present.  Skip those that don't in
40648         the hash function generator.
40649         * common.opt (fvar-tracking): Mark as PerFunction instead of
40650         Optimization.
40651         (fvar-tracking-assignments): Likewise.
40652         (fvar-tracking-assignments-toggle): Likewise.
40653         (fvar-tracking-uninit): Likewise.
40654
40655 2017-01-07  Jakub Jelinek  <jakub@redhat.com>
40656
40657         PR translation/79018
40658         * params.def (PARAM_MAX_STORES_TO_MERGE): Add missing space between
40659         the and store.
40660
40661 2017-01-06  Mikael Pettersson  <mikpelinux@gmail.com>
40662
40663         PR target/57583
40664         * config/m68k/m68k.opt (LONG_JUMP_TABLE_OFFSETS): New option.
40665         * config/m68k/linux.h (ASM_RETURN_CASE_JUMP): Handle
40666         TARGET_LONG_JUMP_TABLE_OFFSETS.
40667         * config/m68k/m68kelf.h (ASM_RETURN_CASE_JUMP): Likewise.
40668         * config/m68k/netbsd-elf.h (ASM_RETURN_CASE_JUMP): Likewise.
40669         * config/m68k/m68k.h (CASE_VECTOR_MODE): Likewise.
40670         (ASM_OUTPUT_ADDR_DIFF_ELF): Likewise.
40671         * config/m68k/m68k.md (tablejump expander): Likewise.
40672         (*tablejump_pcrel_hi): Renamed from unnamed insn, reject
40673         TARGET_LONG_JUMP_TABLE_OFFSETS.
40674         (*tablejump_pcrel_si): New insn, handle TARGET_LONG_JUMP_TABLE_OFFSETS.
40675         * doc/invoke.texi (M68K options): Add -mlong-jump-table-offsets.
40676
40677 2017-01-06  Edgar E. Iglesias <edgar.iglesias@xilinx.com>
40678             David Holsgrove <david.holsgrove@xilinx.com>
40679
40680         * common/config/microblaze/microblaze-common.c
40681         (TARGET_EXCEPT_UNWIND_INFO): Remove.
40682         * config/microblaze/microblaze-protos.h (microblaze_eh_return):
40683         New prototype.
40684         * config/microblaze/microblaze.c (microblaze_must_save_register)
40685         (microblaze_expand_epilogue, microblaze_return_addr): Handle
40686         calls_eh_return.
40687         (microblaze_eh_return): New function.
40688         * config/microblaze/microblaze.h (RETURN_ADDR_OFFSET)
40689         (EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM)
40690         (EH_RETURN_STACKADJ_RTX, ASM_PREFERRED_EH_DATA_FORMAT): New macros.
40691         * config/microblaze/microblaze.md (eh_return): New pattern.
40692
40693 2017-01-06  Jakub Jelinek  <jakub@redhat.com>
40694
40695         * system.h (GCC_DIAGNOSTIC_PUSH_IGNORED, GCC_DIAGNOSTIC_POP,
40696         GCC_DIAGNOSTIC_STRINGIFY): Define.
40697
40698         * read-rtl.c (rtx_reader::read_rtx_code): Avoid -Wsign-compare warning.
40699
40700 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
40701
40702         * config/arm/arm.md (<mcrr>): New.
40703         (<mrrc>): New.
40704         * config/arm/arm.c (arm_arch5te): New.
40705         (arm_option_override): Set arm_arch5te.
40706         (arm_coproc_builtin_available): Add support for mcrr, mcrr2, mrrc
40707         and mrrc2.
40708         * config/arm/arm-builtins.c (MCRR_QUALIFIERS): Define to...
40709         (arm_mcrr_qualifiers): ... this. New.
40710         (MRRC_QUALIFIERS): Define to...
40711         (arm_mrrc_qualifiers): ... this. New.
40712         * config/arm/arm_acle.h (__arm_mcrr, __arm_mcrr2, __arm_mrrc,
40713         __arm_mrrc2): New.
40714         * config/arm/arm_acle_builtins.def (mcrr, mcrr2, mrrc, mrrc2): New.
40715         * config/arm/iterators.md (MCRRI, mcrr, MCRR): New.
40716         (MRRCI, mrrc, MRRC): New.
40717         * config/arm/unspecs.md (VUNSPEC_MCRR, VUNSPEC_MCRR2, VUNSPEC_MRRC,
40718         VUNSPEC_MRRC2): New.
40719
40720 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
40721
40722         * config/arm/arm.md (<mcr>): New.
40723         (<mrc>): New.
40724         * config/arm/arm.c (arm_coproc_builtin_available): Add
40725         support for mcr, mrc, mcr2 and mrc2.
40726         * config/arm/arm-builtins.c (MCR_QUALIFIERS): Define to...
40727         (arm_mcr_qualifiers): ... this. New.
40728         (MRC_QUALIFIERS): Define to ...
40729         (arm_mrc_qualifiers): ... this. New.
40730         (MCR_QUALIFIERS): Define to ...
40731         (arm_mcr_qualifiers): ... this. New.
40732         * config/arm/arm_acle.h (__arm_mcr, __arm_mrc, __arm_mcr2,
40733         __arm_mrc2): New.
40734         * config/arm/arm_acle_builtins.def (mcr, mcr2, mrc, mrc2): New.
40735         * config/arm/iterators.md (MCRI, mcr, MCR, MRCI, mrc, MRC): New.
40736         * config/arm/unspecs.md (VUNSPEC_MCR, VUNSPEC_MCR2, VUNSPEC_MRC,
40737         VUNSPEC_MRC2): New.
40738
40739 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
40740
40741         * config/arm/arm.md (*ldc): New.
40742         (*stc): New.
40743         (<ldc>): New.
40744         (<stc>): New.
40745         * config/arm/arm.c (arm_coproc_builtin_available): Add
40746         support for ldc,ldcl,stc,stcl,ldc2,ldc2l,stc2 and stc2l.
40747         (arm_coproc_ldc_stc_legitimate_address): New.
40748         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
40749         'qualifier_const_pointer'.
40750         (LDC_QUALIFIERS): Define to...
40751         (arm_ldc_qualifiers): ... this. New.
40752         (STC_QUALIFIERS): Define to...
40753         (arm_stc_qualifiers): ... this. New.
40754         * config/arm/arm-protos.h
40755         (arm_coproc_ldc_stc_legitimate_address): New.
40756         * config/arm/arm_acle.h (__arm_ldc, __arm_ldcl, __arm_stc,
40757         __arm_stcl, __arm_ldc2, __arm_ldc2l, __arm_stc2, __arm_stc2l): New.
40758         * config/arm/arm_acle_builtins.def (ldc, ldc2, ldcl, ldc2l, stc,
40759         stc2, stcl, stc2l): New.
40760         * config/arm/constraints.md (Uz): New.
40761         * config/arm/iterators.md (LDCI, STCI, ldc, stc, LDC STC): New.
40762         * config/arm/unspecs.md (VUNSPEC_LDC, VUNSPEC_LDC2, VUNSPEC_LDCL,
40763         VUNSPEC_LDC2L, VUNSPEC_STC, VUNSPEC_STC2, VUNSPEC_STCL,
40764         VUNSPEC_STC2L): New.
40765
40766 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
40767
40768         * config/arm/arm.md (<cdp>): New.
40769         * config/arm/arm.c (neon_const_bounds): Rename this ...
40770         (arm_const_bounds): ... this.
40771         (arm_coproc_builtin_available): New.
40772         * config/arm/arm-builtins.c (SIMD_MAX_BUILTIN_ARGS): Increase.
40773         (arm_type_qualifiers): Add 'qualifier_unsigned_immediate'.
40774         (CDP_QUALIFIERS): Define to...
40775         (arm_cdp_qualifiers): ... this. New.
40776         (void_UP): Define.
40777         (arm_expand_builtin_args): Add case for 6 arguments.
40778         * config/arm/arm-protos.h (neon_const_bounds): Rename this ...
40779         (arm_const_bounds): ... this.
40780         (arm_coproc_builtin_available): New.
40781         * config/arm/arm_acle.h (__arm_cdp): New.
40782         (__arm_cdp2): New.
40783         * config/arm/arm_acle_builtins.def (cdp): New.
40784         (cdp2): New.
40785         * config/arm/iterators.md (CDPI,CDP,cdp): New.
40786         * config/arm/neon.md: Rename all 'neon_const_bounds' to
40787         'arm_const_bounds'.
40788         * config/arm/types.md (coproc): New.
40789         * config/arm/unspecs.md (VUNSPEC_CDP, VUNSPEC_CDP2): New.
40790         * doc/extend.texi (ACLE): Add a mention of Coprocessor intrinsics.
40791         * doc/sourcebuild.texi (arm_coproc1_ok, arm_coproc2_ok,
40792         arm_coproc3_ok, arm_coproc4_ok): Document new effective targets.
40793
40794 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
40795
40796         * config/arm/arm-builtins.c (arm_unsigned_binop_qualifiers): New.
40797         (UBINOP_QUALIFIERS): New.
40798         (si_UP): Define.
40799         (acle_builtin_data): New. Change comment.
40800         (arm_builtins): Remove ARM_BUILTIN_CRC32B, ARM_BUILTIN_CRC32H,
40801         ARM_BUILTIN_CRC32W, ARM_BUILTIN_CRC32CB, ARM_BUILTIN_CRC32CH,
40802         ARM_BUILTIN_CRC32CW. Add ARM_BUILTIN_ACLE_BASE and include
40803         arm_acle_builtins.def.
40804         (ARM_BUILTIN_ACLE_PATTERN_START): Define.
40805         (arm_init_acle_builtins): New.
40806         (CRC32_BUILTIN): Remove.
40807         (bdesc_2arg): Remove entries for crc32b, crc32h, crc32w,
40808         crc32cb, crc32ch and crc32cw.
40809         (arm_init_crc32_builtins): Remove.
40810         (arm_init_builtins): Use arm_init_acle_builtins rather
40811         than arm_init_crc32_builtins.
40812         (arm_expand_acle_builtin): New.
40813         (arm_expand_builtin): Use 'arm_expand_acle_builtin'.
40814         * config/arm/arm_acle_builtins.def: New.
40815
40816 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
40817
40818         * config/arm/arm-builtins.c (neon_builtin_datum): Rename to ..
40819         (arm_builtin_datum): ... this.
40820         (arm_init_neon_builtin): Rename to ...
40821         (arm_init_builtin): ... this. Add a new parameters PREFIX
40822         and USE_SIG_IN_NAME.
40823         (arm_init_neon_builtins): Replace 'arm_init_neon_builtin' with
40824         'arm_init_builtin'. Replace type 'neon_builtin_datum' with
40825         'arm_builtin_datum'.
40826         (arm_init_vfp_builtins): Likewise.
40827         (builtin_arg): Rename enum's replacing 'NEON_ARG' with
40828         'ARG_BUILTIN' and add a 'ARG_BUILTIN_NEON_MEMORY.
40829         (arm_expand_neon_args): Rename to ...
40830         (arm_expand_builtin_args): ... this. Rename builtin_arg
40831         enum values and differentiate between ARG_BUILTIN_MEMORY
40832         and ARG_BUILTIN_NEON_MEMORY.
40833         (arm_expand_neon_builtin_1): Rename to ...
40834         (arm_expand_builtin_1): ... this. Rename builtin_arg enum
40835         values, arm_expand_builtin_args and add bool parameter NEON.
40836         (arm_expand_neon_builtin): Use arm_expand_builtin_1.
40837         (arm_expand_vfp_builtin): Likewise.
40838         (NEON_MAX_BUILTIN_ARGS): Remove, it was unused.
40839
40840 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
40841
40842         PR middle-end/77484
40843         * predict.def (PRED_POLYMORPHIC_CALL): Set to 59.
40844         * predict.c (tree_estimate_probability_bb): Reverse direction of
40845         polymorphic call predictor.
40846
40847 2017-01-06  David Malcolm  <dmalcolm@redhat.com>
40848
40849         * passes.c (execute_one_pass): Split out pass-skipping logic into...
40850         (determine_pass_name_match): ...this new function and...
40851         (should_skip_pass_p): ...this new function.
40852
40853 2017-01-06  Nathan Sidwell  <nathan@acm.org>
40854
40855         * ipa-visibility.c (function_and_variable_visibility): Reformat
40856         comments and long lines.  Remove extrneous if.
40857         * symtab.c (symtab_node::make_decl_local): Fix code format.
40858         (symtab_node::set_section_for_node): Fix comment typo.
40859
40860 2017-01-06  Martin Liska  <mliska@suse.cz>
40861
40862         PR bootstrap/79003
40863         * lra-constraints.c: Rename invariant to lra_invariant.
40864         * predict.c (set_even_probabilities): Initialize e to NULL.
40865
40866 2017-01-05  Martin Sebor  <msebor@redhat.com>
40867
40868         PR tree-optimization/78910
40869         * gimple-ssa-sprintf.c (tree_digits): Add an argument.
40870         (format_integer): Correct off-by-one error in the handling
40871         of precision with negative numbers in signed conversions..
40872
40873 2017-01-05  Eric Botcazou  <ebotcazou@adacore.com>
40874
40875         * doc/invoke.texi (C Dialect Options): Adjust -fsso-struct entry.
40876
40877 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
40878
40879         PR tree-optimization/71016
40880         * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Pass cond_stmt to
40881         factor_out_conditional_conversion.  Formatting fix.
40882         (factor_out_conditional_conversion): Add cond_stmt argument.
40883         If arg1 is INTEGER_CST, punt if new_arg0 is not any operand of
40884         cond_stmt and if arg0_def_stmt is not the only stmt in its bb.
40885         Formatting fix.
40886
40887 2017-01-05  David Malcolm  <dmalcolm@redhat.com>
40888
40889         * Makefile.in (OBJS): Add read-md.o, read-rtl.o,
40890         read-rtl-function.o, and selftest-rtl.o.
40891         * config/aarch64/aarch64.c: Include selftest.h and selftest-rtl.h.
40892         (selftest::aarch64_test_loading_full_dump): New function.
40893         (selftest::aarch64_run_selftests): New function.
40894         (TARGET_RUN_TARGET_SELFTESTS): Wire it up to
40895         selftest::aarch64_run_selftests.
40896         * config/i386/i386.c
40897         (selftest::ix86_test_loading_dump_fragment_1): New function.
40898         (selftest::ix86_test_loading_call_insn): New function.
40899         (selftest::ix86_test_loading_full_dump): New function.
40900         (selftest::ix86_test_loading_unspec): New function.
40901         (selftest::ix86_run_selftests): Call the new functions.
40902         * emit-rtl.c (maybe_set_max_label_num): New function.
40903         * emit-rtl.h (maybe_set_max_label_num): New decl.
40904         * function.c (instantiate_decls): Guard call to
40905         instantiate_decls_1 with if (DECL_INITIAL (fndecl)).
40906         * function-tests.c (selftest::verify_three_block_rtl_cfg): Remove
40907         "static".
40908         * gensupport.c (gen_reader::gen_reader): Pass "false"
40909         for new "compact" param of rtx_reader.
40910         * print-rtl.c (rtx_writer::print_rtx_operand): Print "(nil)"
40911         rather than an empty string for NULL strings.
40912         * read-md.c: Potentially include config.h rather than bconfig.h.
40913         Wrap include of errors.h with #ifdef GENERATOR_FILE.
40914         (have_error): New global, copied from errors.c.
40915         (md_reader::read_name): Rename to...
40916         (md_reader::read_name_1): ...this, adding "out_loc" param,
40917         and converting "missing name or number" to returning false, rather
40918         than failing.
40919         (md_reader::read_name): Reimplement in terms of read_name_1.
40920         (md_reader::read_name_or_nil): New function.
40921         (md_reader::read_string): Handle "(nil)" by returning NULL.
40922         (md_reader::md_reader): Add new param "compact".
40923         (md_reader::read_md_files): Wrap with #ifdef GENERATOR_FILE.
40924         (md_reader::read_file): New method.
40925         * read-md.h (md_reader::md_reader): Add new param "compact".
40926         (md_reader::read_file): New method.
40927         (md_reader::is_compact): New accessor.
40928         (md_reader::read_name): Convert return type from void to file_location.
40929         (md_reader::read_name_or_nil): New decl.
40930         (md_reader::read_name_1): New decl.
40931         (md_reader::m_compact): New field.
40932         (noop_reader::noop_reader): Pass "false" for new "compact" param
40933         of rtx_reader.
40934         (rtx_reader::rtx_reader): Add new "compact" param.
40935         (rtx_reader::read_rtx_operand): Make virtual and convert return
40936         type from void to rtx.
40937         (rtx_reader::read_until): New decl.
40938         (rtx_reader::handle_any_trailing_information): New virtual function.
40939         (rtx_reader::postprocess): New virtual function.
40940         (rtx_reader::finalize_string): New virtual function.
40941         (rtx_reader::m_in_call_function_usage): New field.
40942         (rtx_reader::m_reuse_rtx_by_id): New field.
40943         * read-rtl-function.c: New file.
40944         * selftest-rtl.c (selftest::assert_rtx_ptr_eq_at): New function.
40945         * selftest-rtl.h (ASSERT_RTX_PTR_EQ): New macro.
40946         (selftest::verify_three_block_rtl_cfg): New decl.
40947         * read-rtl-function.h: New file.
40948         * read-rtl.c: Potentially include config.h rather than bconfig.h.
40949         For host, include function.h, memmodel.h, and emit-rtl.h.
40950         (one_time_initialization): New function.
40951         (struct compact_insn_name): New struct.
40952         (compact_insn_names): New array.
40953         (find_code): Handle insn codes in compact dumps.
40954         (apply_subst_iterator): Wrap with #ifdef GENERATOR_FILE.
40955         (bind_subst_iter_and_attr): Likewise.
40956         (add_condition_to_string): Likewise.
40957         (add_condition_to_rtx): Likewise.
40958         (apply_attribute_uses): Likewise.
40959         (add_current_iterators): Likewise.
40960         (apply_iterators): Likewise.
40961         (initialize_iterators): Guard usage of apply_subst_iterator with
40962         #ifdef GENERATOR_FILE.
40963         (read_conditions): Wrap with #ifdef GENERATOR_FILE.
40964         (md_reader::read_mapping): Likewise.
40965         (add_define_attr_for_define_subst): Likewise.
40966         (add_define_subst_attr): Likewise.
40967         (read_subst_mapping): Likewise.
40968         (check_code_iterator): Likewise.
40969         (rtx_reader::read_rtx): Likewise.  Move one-time initialization
40970         logic to...
40971         (one_time_initialization): New function.
40972         (rtx_reader::read_until): New method.
40973         (read_flags): New function.
40974         (parse_reg_note_name): New function.
40975         (rtx_reader::read_rtx_code): Initialize "iterator" to NULL.
40976         Handle reuse_rtx ids.
40977         Wrap iterator lookup within #ifdef GENERATOR_FILE.
40978         Add parsing support for RTL dumps, mirroring the special-cases in
40979         print_rtx, by calling read_flags, reading REG_NOTE names, INSN_UID
40980         values, and calling handle_any_trailing_information.
40981         (rtx_reader::read_rtx_operand): Convert return type from void
40982         to rtx, returning return_rtx.  Handle case 'e'.  Call
40983         finalize_string on XSTR and XTMPL fields.
40984         (rtx_reader::read_nested_rtx):  Handle dumps in which trailing
40985          "(nil)" values were omitted.  Call the postprocess vfunc on the
40986         return_rtx.
40987         (rtx_reader::rtx_reader): Add new "compact" param and pass to base
40988         class ctor.  Initialize m_in_call_function_usage.  Call
40989         one_time_initialization.
40990         * rtl-tests.c (selftest::test_uncond_jump): Call
40991         set_new_first_and_last_insn.
40992         * rtl.h (read_rtx): Wrap decl with #ifdef GENERATOR_FILE.
40993         * selftest-rtl.c: New file.
40994         * selftest-rtl.h (class selftest::rtl_dump_test): New class.
40995         (selftest::get_insn_by_uid): New decl.
40996         * selftest-run-tests.c (selftest::run_tests): Call
40997         read_rtl_function_c_tests.
40998         * selftest.h  (selftest::read_rtl_function_c_tests): New decl.
40999         * tree-dfa.c (ssa_default_def): Return NULL_TREE for rtl function
41000         dumps.
41001
41002 2017-01-05  Uros Bizjak  <ubizjak@gmail.com>
41003
41004         * config/i386/i386.md (*testqi_ext_3): No need to handle memory
41005         operands in a special way.  Assert that pos+len <= mode precision.
41006
41007 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
41008
41009         * common.opt (fvect-cost-model): Remove RejectNegative flag, use
41010         3 argument Alias with unlimited for the negative form.
41011         (fno-vect-cost-model): Removed.
41012
41013 2017-01-05  Martin Liska  <mliska@suse.cz>
41014
41015         * hsa-gen.c (gen_hsa_divmod): New function.
41016         (gen_hsa_insn_for_internal_fn_call): Use the function for IFN_DIVMOD.
41017
41018 2017-01-05  Martin Liska  <mliska@suse.cz>
41019
41020         PR pch/78970
41021         * gcc.c (lookup_compiler): Reject '-' filename for a precompiled
41022         header.
41023
41024 2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
41025
41026         * config/s390/s390.c (s390_expand_setmem): Unroll the loop for
41027         small constant length operands.
41028
41029 2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
41030
41031         * config/s390/s390.c (s390_expand_setmem): Avoid overlapping bytes
41032         between loop iterations.
41033
41034 2017-01-05  Martin Liska  <mliska@suse.cz>
41035
41036         PR sanitizer/78815
41037         * gimplify.c (gimplify_decl_expr): Compare to
41038         asan_poisoned_variables instread of checking flags.
41039         (gimplify_target_expr): Likewise.
41040         (gimplify_expr): Likewise.
41041         (gimplify_function_tree): Conditionally initialize
41042         asan_poisoned_variables.
41043
41044 2017-01-04  Jeff Law  <law@redhat.com>
41045
41046         PR tree-optimizatin/78812
41047         * rtl.h (contains_mem_rtx_p): Prototype.
41048         * ifcvt.c (containts_mem_rtx_p): Move from here to...
41049         * rtlanal.c (contains_mem_rtx_p): Here and remove static linkage.
41050         * gcse.c (prune_expressions): Use contains_mem_rtx_p to discover
41051         and prune MEMs that are not at the toplevel of a SET_SRC rtx.  Look
41052         through ZERO_EXTEND and SIGN_EXTEND when trying to avoid pruning MEMs.
41053
41054 2017-01-04  Alexandre Oliva  <aoliva@redhat.com>
41055
41056         * input.c (assert_char_at_range): Default-initialize actual_range.
41057
41058 2017-01-04  Alexandre Oliva  <aoliva@redhat.com>
41059
41060         * df-scan.c (df_ref_create_structure): Make regno unsigned,
41061         to match the caller.
41062
41063 2017-01-04  Alexandre Oliva  <aoliva@redhat.com>
41064
41065         * cfgexpand.c (expand_gimple_basic_block): Disregard debug
41066         insns after final jump in test to emit dummy move.
41067
41068 2017-01-04  Alexandre Oliva  <aoliva@redhat.com>
41069
41070         * gimple-iterator.h (gsi_one_nondebug_before_end_p): New.
41071         * tree-eh.c (cleanup_empty_eh): Skip more debug stmts.
41072
41073 2017-01-04  Alexandre Oliva  <aoliva@redhat.com>
41074
41075         * multiple_target.c (create_dispatcher_calls): Init e_next.
41076         * tree-ssa-loop-split.c (split_loop): Init border.
41077         * tree-vect-loop.c (vect_determine_vectorization_factor): Init
41078         scalar_type.
41079
41080 2017-01-04  Michael Meissner  <meissner@linux.vnet.ibm.com>
41081
41082         PR target/71977
41083         PR target/70568
41084         PR target/78823
41085         * config/rs6000/predicates.md (sf_subreg_operand): New predicate.
41086         (altivec_register_operand): Do not return true if the operand
41087         contains a SUBREG mixing SImode and SFmode.
41088         (vsx_register_operand): Likewise.
41089         (vsx_reg_sfsubreg_ok): New predicate.
41090         (vfloat_operand): Do not return true if the operand contains a
41091         SUBREG mixing SImode and SFmode.
41092         (vint_operand): Likewise.
41093         (vlogical_operand): Likewise.
41094         (gpc_reg_operand): Likewise.
41095         (int_reg_operand): Likewise.
41096         * config/rs6000/rs6000-protos.h (valid_sf_si_move): Add declaration.
41097         * config/rs6000/rs6000.c (valid_sf_si_move): New function to
41098         determine if a MOVSI or MOVSF operation contains SUBREGs that mix
41099         SImode and SFmode.
41100         (rs6000_emit_move_si_sf_subreg): New helper function.
41101         (rs6000_emit_move): Call rs6000_emit_move_si_sf_subreg to possbily
41102         fixup SUBREGs involving SImode and SFmode.
41103         * config/rs6000/vsx.md (SFBOOL_*): New constants that are operand
41104         numbers for the new peephole2 optimization.
41105         (peephole2 for SFmode unions): New peephole2 to optimize cases in
41106         the GLIBC math library that do AND/IOR/XOR operations on single
41107         precision floating point.
41108         * config/rs6000/rs6000.h (TARGET_NO_SF_SUBREG): New internal
41109         target macros to say whether we need to avoid SUBREGs mixing
41110         SImode and SFmode.
41111         (TARGET_ALLOW_SF_SUBREG): Likewise.
41112         * config/rs6000/rs6000.md (UNSPEC_SF_FROM_SI): New unspecs.
41113         (UNSPEC_SI_FROM_SF): Likewise.
41114         (iorxor): Change spacing.
41115         (and_ior_xor): New iterator for AND, IOR, and XOR.
41116         (movsi_from_sf): New insns for SImode/SFmode SUBREG support.
41117         (movdi_from_sf_zero_ext): Likewise.
41118         (mov<mode>_hardfloat, FMOVE32 iterator): Use register_operand
41119         instead of gpc_reg_operand.  Add SImode/SFmode SUBREG support.
41120         (movsf_from_si): New insn for SImode/SFmode SUBREG support.
41121         (fma<mode>4): Use gpc_reg_operand instead of register_operand.
41122         (fms<mode>4): Likewise.
41123         (fnma<mode>4): Likewise.
41124         (fnms<mode>4): Likewise.
41125         (nfma<mode>4): Likewise.
41126         (nfms<mode>4): Likewise.
41127
41128 2017-01-04  Marek Polacek  <polacek@redhat.com>
41129
41130         PR c++/64767
41131         * doc/invoke.texi: Document -Wpointer-compare.
41132
41133 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
41134
41135         * optc-gen.awk: Emit #error for -W*/-f*/-m* Enum without
41136         RejectNegative.
41137
41138         * dwarf2out.c (output_loc_list): Don't throw away 64K+ location
41139         descriptions for -gdwarf-5 and emit them as uleb128 instead of
41140         2-byte data.
41141
41142 2017-01-04  Kelvin Nilsen  <kelvin@gcc.gnu.org>
41143
41144         PR target/78056
41145         * doc/sourcebuild.texi (PowerPC-specific attributes): Add
41146         documentation of the powerpc_popcntb_ok attribute.
41147         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
41148         code to issue warning messages if a requested CPU configuration is
41149         not supported by the binary (assembler and loader) toolchain.
41150         (spe_init_builtins): Add two assertions to prevent ICE if attempt is
41151         made to define a built-in function that has been disabled.
41152         (paired_init_builtins): Add assertion to prevent ICE if attempt is
41153         made to define a built-in function that has been disabled.
41154         (altivec_init_builtins): Add comment explaining why definition
41155         of the DST built-in functions is not preceded by an assertion
41156         check.  Add assertions to prevent ICE if attempts are made to
41157         define an altivec predicate or an abs* built-in function that has
41158         been disabled.
41159         (htm_init_builtins): Add comment explaining why definition of the
41160         htm built-in functions is not preceded by an assertion check.
41161
41162 2017-01-04  Jeff Law  <law@redhat.com>
41163
41164         PR tree-optimizatin/67955
41165         * tree-ssa-alias.c (same_addr_size_stores_p): Check offsets first.
41166         Allow any SSA_VAR_P as the base objects.  Use integer_zerop.  Verify
41167         the points-to solution does not include pt_null.  Use DECL_PT_UID
41168         unconditionally.
41169
41170 2017-01-04  Uros Bizjak  <ubizjak@gmail.com>
41171
41172         * config/i386/i386.md (HI/SImode test with imm to QImode splitters):
41173         Use gen_int_mode instead of gen_lopwart for const_int operands.
41174
41175 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
41176
41177         PR tree-optimization/71563
41178         * match.pd: Simplify X << Y into X if Y is known to be 0 or
41179         out of range value - has low bits known to be zero.
41180
41181 2017-01-04  Alan Modra  <amodra@gmail.com>
41182
41183         * Makefile.in (aclocal_deps): Update and order as per aclocal.m4.
41184         * configure: Regenerate.
41185         * config.in: Regenerate.
41186
41187 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
41188
41189         PR bootstrap/77569
41190         * input.c (ebcdic_execution_charset::on_error): Don't use strstr for
41191         a substring of the message, but strcmp with the whole message.  Ifdef
41192         ENABLE_NLS, translate the message first using dgettext.
41193
41194 2017-01-03  Jeff Law  <law@redhat.com>
41195
41196         PR tree-optimizatin/78856
41197         * tree-ssa-threadupdate.c: Include tree-vectorizer.h.
41198         (mark_threaded_blocks): Remove code to truncate thread paths that
41199         cross multiple loop headers.  Instead invalidate the cached loop
41200         iteration information and handle case of a thread path walking
41201         into an irreducible region.
41202
41203 2017-01-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
41204
41205         PR target/78900
41206         * config/rs6000/rs6000.c (rs6000_split_signbit): Change some
41207         assertions.  Add support for doing the signbit if the IEEE 128-bit
41208         floating point value is in a GPR.
41209         * config/rs6000/rs6000.md (Fsignbit): Delete.
41210         (signbit<mode>2_dm): Delete using <Fsignbit> and just use "wa".
41211         Update the length attribute if the value is in a GPR.
41212         (signbit<mode>2_dm_<su>ext): Add combiner pattern to eliminate
41213         the sign or zero extension instruction, since the value is always 0/1.
41214         (signbit<mode>2_dm2): Delete using <Fsignbit>.
41215
41216         PR target/78953
41217         * config/rs6000/vsx.md (vsx_extract_<mode>_store_p9): If we are
41218         extracting SImode to a GPR register so that we can generate a
41219         store, limit the vector to be in a traditional Altivec register
41220         for the vextuwrx instruction.
41221
41222 2017-01-03  Ian Lance Taylor  <iant@google.com>
41223
41224         * godump.c (go_format_type): Treat ENUMERAL_TYPE like INTEGER_TYPE.
41225
41226 2017-01-03  Martin Sebor  <msebor@redhat.com>
41227
41228         PR tree-optimization/78696
41229         * gimple-ssa-sprintf.c (format_floating): Correct handling of
41230         precision.  Use MPFR for %f for greater fidelity.  Correct handling
41231         of %g.
41232         (pass_sprintf_length::compute_format_length): Set width and precision
41233         specified by asrerisk to void_node for vararg functions.
41234         (try_substitute_return_value): Adjust dump output.
41235
41236 2017-01-03  David Edelsohn  <dje.gcc@gmail.com>
41237
41238         * doc/invoke.texi (RS6000 options): LRA is enabled by default.
41239
41240 2017-01-03  Eric Botcazou  <ebotcazou@adacore.com>
41241
41242         * doc/invoke.texi (SPARC options): Document -mlra as the default.
41243         * config/sparc/sparc.c (sparc_option_override): Force LRA unless
41244         -mlra/-mno-lra was passed to the compiler.
41245
41246 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
41247
41248         PR rtl-optimization/65618
41249         * emit-rtl.c (try_split): Move initialization of "before" and
41250         "after" to just before the call to emit_insn_after_setloc.
41251
41252 2017-01-03  Gerald Pfeifer  <gerald@pfeifer.com>
41253
41254         * doc/md.texi (Standard Names): Remove reference to Java frontend.
41255
41256 2017-01-03  Pierre-Marie de Rodat  <derodat@adacore.com>
41257
41258         * dwarf2out.c (gen_enumeration_type_die): When
41259         -gno-strict-dwarf, add a DW_AT_encoding attribute.
41260
41261 2017-01-03  Jakub Jelinek  <jakub@redhat.com>
41262
41263         PR tree-optimization/78965
41264         * gimple-ssa-sprintf.c (pass_sprintf_length::compute_format_length):
41265         Change first argument from const call_info & to call_info &.  For %n
41266         set info.nowrite to false.
41267
41268         PR middle-end/78901
41269         * gimple-ssa-sprintf.c (try_substitute_return_value): Don't change
41270         possibly throwing calls.
41271
41272         * genmatch.c (dt_node::gen_kids_1): If generic_exprs include SSA_NAME
41273         and exprs_len || fns_len, emit the code for SSA_NAME next to the exprs
41274         and fns handling, rather than in a separate case SSA_NAME.
41275
41276 2017-01-02  Jeff Law  <law@redhat.com>
41277
41278         * config/darwin-driver.c (darwin_driver_init): Const-correctness
41279         fixes for first_period and second_period variables.
41280
41281 2017-01-02  Uros Bizjak  <ubizjak@gmail.com>
41282
41283         PR target/78967
41284         * config/i386/i386.md (UNSPEC_NOREX_MEM): New unspec.
41285         (*insvqi_1): New insn pattern.
41286         (*insvqi_1_mem_rex64): Ditto.
41287         (*insvqi_2): Ditto.
41288         (*insvqi_3): Rename from *insvqi.
41289
41290         (*extzvqi_mem_rex64): Add UNSPEC_NOREX_MEM tag.
41291
41292 2017-01-02  Gerald Pfeifer  <gerald@pfeifer.com>
41293
41294         * doc/cfg.texi (Edges): Remove reference to Java.
41295         (Maintaining the CFG): Ditto.
41296
41297 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
41298
41299         PR middle-end/77674
41300         * symtab.c (symtab_node::binds_to_current_def_p): Fix handling of
41301         transparent aliases.
41302
41303 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
41304
41305         PR middle-end/77484
41306         * predict.def (PRED_CALL): Update hitrate.
41307         (PRED_INDIR_CALL, PRED_POLYMORPHIC_CALL): New predictors.
41308         * predict.c (tree_estimate_probability_bb): Split CALL predictor
41309         into direct/indirect/polymorphic variants.
41310
41311 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
41312
41313         Update copyright years.
41314
41315         * gcc.c (process_command): Update copyright notice dates.
41316         * gcov-dump.c (print_version): Ditto.
41317         * gcov.c (print_version): Ditto.
41318         * gcov-tool.c (print_version): Ditto.
41319         * gengtype.c (create_file): Ditto.
41320         * doc/cpp.texi: Bump @copying's copyright year.
41321         * doc/cppinternals.texi: Ditto.
41322         * doc/gcc.texi: Ditto.
41323         * doc/gccint.texi: Ditto.
41324         * doc/gcov.texi: Ditto.
41325         * doc/install.texi: Ditto.
41326         * doc/invoke.texi: Ditto.
41327 \f
41328 Copyright (C) 2017 Free Software Foundation, Inc.
41329
41330 Copying and distribution of this file, with or without modification,
41331 are permitted in any medium without royalty provided the copyright
41332 notice and this notice are preserved.