2bb52cf1bda7c5da49420dc194ea708aec88dcd4
[platform/upstream/gcc.git] / gcc / ChangeLog
1 2017-10-20  Richard Biener  <rguenther@suse.de>
2
3         * graphite-isl-ast-to-gimple.c
4         (translate_isl_ast_to_gimple::graphite_copy_stmts_from_block):
5         Remove return value and simplify, dump copied stmt after lhs
6         adjustment.
7         (translate_isl_ast_to_gimple::translate_isl_ast_node_user):
8         Reduce dump verbosity.
9         (gsi_insert_earliest): Likewise.
10         (translate_isl_ast_to_gimple::copy_bb_and_scalar_dependences): Adjust.
11         * graphite.c (print_global_statistics): Adjust dumping.
12         (print_graphite_scop_statistics): Likewise.
13         (print_graphite_statistics): Do not dump loops here.
14         (graphite_transform_loops): But here.
15
16 2017-10-20  Nicolas Roche  <roche@adacore.com>
17
18         * configure.ac (ACX_PROG_GNAT): Append "libgnat" to the include dir.
19         * configure: Regenerate.
20
21 2017-10-20  Jakub Jelinek  <jakub@redhat.com>
22
23         PR target/82158
24         * tree-cfg.c (pass_warn_function_return::execute): In noreturn
25         functions when optimizing replace GIMPLE_RETURN stmts with
26         calls to __builtin_unreachable ().
27
28         PR sanitizer/82595
29         * config/gnu-user.h (LIBTSAN_EARLY_SPEC): Add libtsan_preinit.o
30         for -fsanitize=thread link of executables.
31         (LIBLSAN_EARLY_SPEC): Add liblsan_preinit.o for -fsanitize=leak
32         link of executables.
33
34         PR target/82370
35         * config/i386/sse.md (VI248_AVX2, VI248_AVX512BW, VI248_AVX512BW_2):
36         New mode iterators.
37         (<shift_insn><mode>3<mask_name>): Change the last of the 3
38         define_insns for logical vector shifts to use VI248_AVX512BW
39         iterator instead of VI48_AVX512, remove <mask_mode512bit_condition>
40         condition, useless isa and prefix attributes.  Change the first
41         2 of these define_insns to ...
42         (<mask_codefor><shift_insn><mode>3<mask_name>): ... this, new
43         define_insn for avx512vl.
44         (<shift_insn><mode>3): ... and this, new define_insn without
45         masking for non-avx512vl.
46
47         PR target/82370
48         * config/i386/sse.md (*andnot<mode>3,
49         <mask_codefor><code><mode>3<mask_name>, *<code><mode>3): Split
50         (=v,v,vm) alternative into (=x,x,xm) and (=v,v,vm), for 128-bit
51         and 256-bit vectors, the (=x,x,xm) alternative and when mask is
52         not applied use empty suffix even for TARGET_AVX512VL.
53         * config/i386/subst.md (mask_prefix3, mask_prefix4): When mask
54         is applied, supply evex,evex or evex,evex,evex instead of just
55         evex.
56
57 2017-10-20  Julia Koval  <julia.koval@intel.com>
58
59         * common/config/i386/i386-common.c (OPTION_MASK_ISA_GFNI_SET,
60         (OPTION_MASK_ISA_GFNI_UNSET): New.
61         (ix86_handle_option): Handle OPT_mgfni.
62         * config/i386/cpuid.h (bit_GFNI): New.
63         * config/i386/driver-i386.c (host_detect_local_cpu): Detect gfni.
64         * config/i386/i386-c.c (ix86_target_macros_internal): Define __GFNI__.
65         * config/i386/i386.c (ix86_target_string): Add -mgfni.
66         (ix86_valid_target_attribute_inner_p): Add OPT_mgfni.
67         * config/i386/i386.h (TARGET_GFNI, TARGET_GFNI_P): New.
68         * config/i386/i386.opt: Add mgfni.
69
70 2017-10-20  Orlando Arias  <oarias@knights.ucf.edu>
71
72         * config/msp430/msp430.c (msp430_option_override): Disable
73         -fdelete-null-pointer-checks.
74         * doc/invoke.text (-fdelete-null-pointer-checks): Document that.
75
76 2017-10-19  Jan Hubicka  <hubicka@ucw.cz>
77
78         * x86-tune-costs.h (generic_cost, core_cost): Correct costs
79         of x87 and SSE instructions.
80
81 2017-10-19  Jan Hubicka  <hubicka@ucw.cz>
82
83         * asan.c (create_cond_insert_point): Do not update edge count.
84         * auto-profile.c (afdo_propagate_edge): Update for edge count removal.
85         (afdo_propagate_circuit): Likewise.
86         (afdo_calculate_branch_prob): Likewise.
87         (afdo_annotate_cfg): Likewise.
88         * basic-block.h (struct edge_def): Remove count.
89         (edge_def::count): New accessor.
90         * bb-reorder.c (rotate_loop): Update.
91         (find_traces_1_round): Update.
92         (connect_traces): Update.
93         (sanitize_hot_paths): Update.
94         * cfg.c (unchecked_make_edge): Update.
95         (make_single_succ_edge): Update.
96         (check_bb_profile): Update.
97         (dump_edge_info): Update.
98         (update_bb_profile_for_threading): Update.
99         (scale_bbs_frequencies_int): Update.
100         (scale_bbs_frequencies_gcov_type): Update.
101         (scale_bbs_frequencies_profile_count): Update.
102         (scale_bbs_frequencies): Update.
103         * cfganal.c (connect_infinite_loops_to_exit): Update.
104         * cfgbuild.c (compute_outgoing_frequencies): Update.
105         (find_many_sub_basic_blocks): Update.
106         * cfgcleanup.c (try_forward_edges): Update.
107         (try_crossjump_to_edge): Update
108         * cfgexpand.c (expand_gimple_cond): Update
109         (expand_gimple_tailcall): Update
110         (construct_exit_block): Update
111         * cfghooks.c (verify_flow_info): Update
112         (redirect_edge_succ_nodup): Update
113         (split_edge): Update
114         (make_forwarder_block): Update
115         (duplicate_block): Update
116         (account_profile_record): Update
117         * cfgloop.c (find_subloop_latch_edge_by_profile): Update.
118         * cfgloopanal.c (expected_loop_iterations_unbounded): Update.
119         * cfgloopmanip.c (scale_loop_profile): Update.
120         (loopify): Update.
121         (lv_adjust_loop_entry_edge): Update.
122         * cfgrtl.c (try_redirect_by_replacing_jump): Update.
123         (force_nonfallthru_and_redirect): Update.
124         (purge_dead_edges): Update.
125         (rtl_flow_call_edges_add): Update.
126         * cgraphunit.c (init_lowered_empty_function): Update.
127         (cgraph_node::expand_thunk): Update.
128         * gimple-pretty-print.c (dump_probability): Update.
129         (dump_edge_probability): Update.
130         * gimple-ssa-isolate-paths.c (isolate_path): Update.
131         * haifa-sched.c (sched_create_recovery_edges): Update.
132         * hsa-gen.c (convert_switch_statements): Update.
133         * ifcvt.c (dead_or_predicable): Update.
134         * ipa-inline-transform.c (inline_transform): Update.
135         * ipa-split.c (split_function): Update.
136         * ipa-utils.c (ipa_merge_profiles): Update.
137         * loop-doloop.c (add_test): Update.
138         * loop-unroll.c (unroll_loop_runtime_iterations): Update.
139         * lto-streamer-in.c (input_cfg): Update.
140         (input_function): Update.
141         * lto-streamer-out.c (output_cfg): Update.
142         * modulo-sched.c (sms_schedule): Update.
143         * postreload-gcse.c (eliminate_partially_redundant_load): Update.
144         * predict.c (maybe_hot_edge_p): Update.
145         (unlikely_executed_edge_p): Update.
146         (probably_never_executed_edge_p): Update.
147         (dump_prediction): Update.
148         (drop_profile): Update.
149         (propagate_unlikely_bbs_forward): Update.
150         (determine_unlikely_bbs): Update.
151         (force_edge_cold): Update.
152         * profile.c (compute_branch_probabilities): Update.
153         * reg-stack.c (better_edge): Update.
154         * shrink-wrap.c (handle_simple_exit): Update.
155         * tracer.c (better_p): Update.
156         * trans-mem.c (expand_transaction): Update.
157         (split_bb_make_tm_edge): Update.
158         * tree-call-cdce.c: Update.
159         * tree-cfg.c (gimple_find_sub_bbs): Update.
160         (gimple_split_edge): Update.
161         (gimple_duplicate_sese_region): Update.
162         (gimple_duplicate_sese_tail): Update.
163         (gimple_flow_call_edges_add): Update.
164         (insert_cond_bb): Update.
165         (execute_fixup_cfg): Update.
166         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update.
167         * tree-complex.c (expand_complex_div_wide): Update.
168         * tree-eh.c (lower_resx): Update.
169         (unsplit_eh): Update.
170         (cleanup_empty_eh_move_lp): Update.
171         * tree-inline.c (copy_edges_for_bb): Update.
172         (freqs_to_counts): Update.
173         (copy_cfg_body): Update.
174         * tree-ssa-dce.c (remove_dead_stmt): Update.
175         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
176         * tree-ssa-loop-im.c (execute_sm_if_changed): Update.
177         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update.
178         (unloop_loops): Update.
179         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
180         * tree-ssa-loop-split.c (connect_loops): Update.
181         (split_loop): Update.
182         * tree-ssa-loop-unswitch.c (hoist_guard): Update.
183         * tree-ssa-phionlycprop.c (propagate_rhs_into_lhs): Update.
184         * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Update.
185         * tree-ssa-reassoc.c (branch_fixup): Update.
186         * tree-ssa-tail-merge.c (replace_block_by): Update.
187         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Update.
188         (compute_path_counts): Update.
189         (update_profile): Update.
190         (recompute_probabilities): Update.
191         (update_joiner_offpath_counts): Update.
192         (estimated_freqs_path): Update.
193         (freqs_to_counts_path): Update.
194         (clear_counts_path): Update.
195         (ssa_fix_duplicate_block_edges): Update.
196         (duplicate_thread_path): Update.
197         * tree-switch-conversion.c (hoist_edge_and_branch_if_true): Update.
198         (case_bit_test_cmp): Update.
199         (collect_switch_conv_info): Update.
200         (gen_inbound_check): Update.
201         (do_jump_if_equal): Update.
202         (emit_cmp_and_jump_insns): Update.
203         * tree-tailcall.c (decrease_profile): Update.
204         (eliminate_tail_call): Update.
205         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
206         (vect_do_peeling): Update.
207         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
208         * ubsan.c (ubsan_expand_null_ifn): Update.
209         (ubsan_expand_ptr_ifn): Update.
210         * value-prof.c (gimple_divmod_fixed_value): Update.
211         (gimple_mod_pow2): Update.
212         (gimple_mod_subtract): Update.
213         (gimple_ic): Update.
214         (gimple_stringop_fixed_value): Update.
215
216 2017-10-19  Uros Bizjak  <ubizjak@gmail.com>
217
218         PR target/82618
219         * config/i386/i386.md (sub to cmp): New peephole2 pattern.
220
221 2017-10-19  Alexander Monakov  <amonakov@ispras.ru>
222
223         PR rtl-optimization/82395
224         * ira-color.c (allocno_priority_compare_func): Fix comparison step
225         based on non_spilled_static_chain_regno_p.
226
227 2017-10-19  Uros Bizjak  <ubizjak@gmail.com>
228
229         * config/i386/i386.c (output_387_binary_op): Rewrite SSE part.
230         (ix86_emit_mode_set): Rewrite insn mnemonic construction.
231         (ix86_prepare_fp_compare_args): Redefine is_sse as bool.
232
233 2017-10-19  Martin Sebor  <msebor@redhat.com>
234
235         PR tree-optimization/82596
236         * tree.c (array_at_struct_end_p): Handle STRING_CST.
237
238 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
239
240         * asan.c (handle_builtin_alloca): Deal with all alloca variants.
241         (get_mem_refs_of_builtin_call): Likewise.
242         * builtins.c (expand_builtin_apply): Adjust call to
243         allocate_dynamic_stack_space.
244         (expand_builtin_alloca): For __builtin_alloca_with_align_and_max, pass
245         the third argument to allocate_dynamic_stack_space, otherwise -1.
246         (expand_builtin): Deal with all alloca variants.
247         (is_inexpensive_builtin): Likewise.
248         * builtins.def (BUILT_IN_ALLOCA_WITH_ALIGN_AND_MAX): New.
249         * calls.c (special_function_p): Deal with all alloca variants.
250         (initialize_argument_information): Adjust call to
251         allocate_dynamic_stack_space.
252         (expand_call): Likewise.
253         * cfgexpand.c (expand_call_stmt): Deal with all alloca variants.
254         * doc/extend.texi (Built-ins): Add __builtin_alloca_with_align_and_max
255         * explow.c (allocate_dynamic_stack_space): Add MAX_SIZE parameter and
256         use it for the stack usage computation.
257         * explow.h (allocate_dynamic_stack_space): Adjust prototype.
258         * function.c (gimplify_parameters): Call build_alloca_call_expr.
259         * gimple-ssa-warn-alloca.c (alloca_call_type): Simplify control flow.
260         Take into account 3rd argument of __builtin_alloca_with_align_and_max.
261         (in_loop_p): Remove first argument and useless check.
262         (pass_walloca::execute): Remove useless test and adjust call to above.
263         * gimple.c (gimple_build_call_from_tree): Deal with all alloc variants
264         * gimplify.c (gimplify_vla_decl): Call build_alloca_call_expr.
265         (gimplify_call_expr): Deal with all alloca variants.
266         * hsa-gen.c (gen_hsa_alloca): Likewise.
267         (gen_hsa_insns_for_call): Likewise.
268         * ipa-pure-const.c (special_builtin_state): Likewise.
269         * tree-chkp.c (chkp_build_returned_bound): Likewise.
270         * tree-object-size.c (alloc_object_size): Likewise.
271         * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Likewise.
272         (call_may_clobber_ref_p_1): Likewise.
273         * tree-ssa-ccp.c (evaluate_stmt): Likewise.
274         (ccp_fold_stmt): Likewise.
275         (optimize_stack_restore): Likewise.
276         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
277         (mark_all_reaching_defs_necessary_1): Likewise.
278         (propagate_necessity): Likewise.
279         (eliminate_unnecessary_stmts): Likewise.
280         * tree.c (build_common_builtin_nodes): Build
281         BUILT_IN_ALLOCA_WITH_ALIGN_AND_MAX.
282         (build_alloca_call_expr): New function.
283         * tree.h (ALLOCA_FUNCTION_CODE_P): New macro.
284         (CASE_BUILT_IN_ALLOCA): Likewise.
285         (build_alloca_call_expr): Declare.
286         * varasm.c (incorporeal_function_p): Deal with all alloca variants.
287
288 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
289
290         PR debug/82509
291         * dwarf2out.c (new_die_raw): New static inline function.
292         (new_die): Use it to create the DIE.
293         (add_AT_external_die_ref): Likewise.
294         (clone_die): Likewise.
295         (clone_as_declaration): Likewise.
296         (dwarf2out_vms_debug_main_pointer): Likewise.
297         (base_type_die): Likewise.  Remove early return for corner cases.
298         Do not call add_pubtype on the DIE here.
299         (is_base_type): Remove ERROR_MARK and return 0 for VOID_TYPE.
300         (modified_type_die): Adjust the lookup for reverse order DIEs.  Skip
301         typedefs for base types with DW_AT_endianity.  Make sure a DIE with
302         native order exists for base types, attach the DIE manually and call
303         add_pubtype on it.  Do not equate a reverse order DIE to the type.
304
305 2017-10-19  Richard Earnshaw  <rearnsha@arm.com>
306
307         * config/arm/arm.c (align_ok_ldrd_strd): New function.
308         (mem_ok_for_ldrd_strd): New parameter align.  Extract the alignment of
309         the mem into it.
310         (gen_operands_ldrd_strd): Validate the alignment of the accesses.
311
312 2017-10-19  Jakub Jelinek  <jakub@redhat.com>
313
314         * flag-types.h (enum sanitize_code): Add SANITIZE_BUILTIN.  Or
315         SANITIZE_BUILTIN into SANITIZE_UNDEFINED.
316         * sanitizer.def (BUILT_IN_UBSAN_HANDLE_INVALID_BUILTIN,
317         BUILT_IN_UBSAN_HANDLE_INVALID_BUILTIN_ABORT): New builtins.
318         * opts.c (sanitizer_opts): Add builtin.
319         * ubsan.c (instrument_builtin): New function.
320         (pass_ubsan::execute): Call it.
321         (pass_ubsan::gate): Enable even for SANITIZE_BUILTIN.
322         * doc/invoke.texi: Document -fsanitize=builtin.
323
324         * ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch
325         builtins, store max (log2 (align), 0) into uchar field instead of
326         align into uptr field.
327         (ubsan_expand_objsize_ifn): Use _v1 suffixed type mismatch builtins,
328         store uchar 0 field instead of uptr 0 field.
329         (instrument_nonnull_return): Use _v1 suffixed nonnull return builtin,
330         instead of passing one address of struct with 2 locations pass
331         two addresses of structs with 1 location each.
332         * sanitizer.def (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH,
333         BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_ABORT,
334         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN,
335         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_ABORT): Removed.
336         (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1,
337         BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1_ABORT,
338         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1,
339         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1_ABORT): New builtins.
340
341 2017-10-19  Martin Liska  <mliska@suse.cz>
342
343         PR driver/81829
344         * file-find.c (remove_prefix): Remove.
345         * file-find.h (remove_prefix): Likewise.
346         * gcc-ar.c: Remove smartness of lookup.
347
348 2017-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
349
350         * config/rs6000/rs6000.md (*call_indirect_aix<mode>,
351         *call_value_indirect_aix<mode>, *call_indirect_elfv2<mode>,
352         *call_value_indirect_elfv2<mode>): Add correct mode to the unspec.
353
354 2017-10-19  Jakub Jelinek  <jakub@redhat.com>
355
356         PR target/82580
357         * config/i386/i386.md (setcc + movzbl to xor + setcc): New peephole2.
358         (setcc + and to xor + setcc): New peephole2.
359
360 2017-10-19  Tom de Vries  <tom@codesourcery.com>
361
362         * doc/sourcebuild.texi (Test Directives, Variants of
363         dg-require-support): Add dg-require-stack-size.
364
365 2017-10-19  Martin Liska  <mliska@suse.cz>
366
367         PR sanitizer/82517
368         * gimplify.c (gimplify_decl_expr): Do not instrument variables
369         that have a large alignment.
370         (gimplify_target_expr): Likewise.
371
372 2017-10-18  Segher Boessenkool  <segher@kernel.crashing.org>
373
374         PR rtl-optimization/82602
375         * ira.c (rtx_moveable_p): Return false for volatile asm.
376
377 2017-10-18  Uros Bizjak  <ubizjak@gmail.com>
378
379         PR target/82580
380         * config/i386/i386-modes.def (CCGZ): New CC mode.
381         * config/i386/i386.md (sub<mode>3_carry_ccgz): New insn pattern.
382         * config/i386/predicates.md (ix86_comparison_operator):
383         Handle CCGZmode.
384         * config/i386/i386.c (ix86_expand_branch) <case E_TImode>:
385         Emulate LE, LEU, GT, GTU, LT, LTU, GE and GEU double-word comparisons
386         with double-word subtraction.
387         (put_condition_code): Handle CCGZmode.
388
389 2017-10-18  Aldy Hernandez  <aldyh@redhat.com>
390
391         * wide-int.cc (debug (const wide_int &)): New.
392         (debug (const wide_int *)): New.
393         (debug (const widest_int &)): New.
394         (debug (const widest_int *)): New.
395
396 2017-10-18  Vladimir Makarov  <vmakarov@redhat.com>
397
398         PR middle-end/82556
399         * lra-constraints.c (curr_insn_transform): Use non-input operand
400         instead of output one for matched reload.
401
402 2017-10-18  Bin Cheng  <bin.cheng@arm.com>
403
404         * tree-loop-distribution.c (INCLUDE_ALGORITHM): New header file.
405         (tree-ssa-loop-ivopts.h): New header file.
406         (struct builtin_info): New fields.
407         (classify_builtin_1): Compute and record base and offset parts for
408         memset builtin partition by calling strip_offset.
409         (offset_cmp, fuse_memset_builtins): New functions.
410         (finalize_partitions): Fuse adjacent memset partitions by calling
411         above function.
412         * tree-ssa-loop-ivopts.c (strip_offset): Delete static declaration.
413         Expose the interface.
414         * tree-ssa-loop-ivopts.h (strip_offset): New declaration.
415
416 2017-10-18  Bin Cheng  <bin.cheng@arm.com>
417
418         PR tree-optimization/82574
419         * tree-loop-distribution.c (find_single_drs): New parameter.  Check
420         that data reference must be executed exactly once per iteration
421         against the outermost loop in nest.
422         (classify_partition): Update call to above function.
423
424 2017-10-18  Richard Biener  <rguenther@suse.de>
425
426         PR tree-optimization/82591
427         * graphite.c (graphite_transform_loops): Move code gen message
428         printing ...
429         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
430         Here.  Handle scop_to_isl_ast failing.
431         (scop_to_isl_ast): Limit the number of ISL operations.
432
433 2017-10-18  Richard Biener  <rguenther@suse.de>
434
435         * graphite-isl-ast-to-gimple.c
436         (translate_isl_ast_to_gimple::set_rename): Simplify.
437         (translate_isl_ast_to_gimple::set_rename_for_each_def): Inline...
438         (graphite_copy_stmts_from_block): ... here.
439         (copy_bb_and_scalar_dependences): Simplify.
440         (add_parameters_to_ivs_params): Canonicalize.
441         (generate_entry_out_of_ssa_copies): Simplify.
442         * graphite-sese-to-poly.c (extract_affine_name): Simplify
443         by passing in ISL dimension.
444         (parameter_index_in_region_1): Rename to ...
445         (parameter_index_in_region): ... this.
446         (extract_affine): Adjust assert, pass down parameter index.
447         (add_param_constraints): Use range-info when available.
448         (build_scop_context): Adjust.
449         * sese.c (new_sese_info): Adjust.
450         (free_sese_info): Likewise.
451         * sese.h (bb_map_t, rename_map_t, phi_rename, init_back_edge_pair_t):
452         Remove unused typedefs.
453         (struct sese_info_t): Simplify rename_map, remove incomplete_phis.
454
455 2017-10-18  Martin Liska  <mliska@suse.cz>
456
457         * combine.c (simplify_compare_const): Add gcc_fallthrough.
458
459 2017-10-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
460
461         * config/s390/s390.c (s390_bb_fallthru_entry_likely): New function.
462         (s390_sched_init): Do not reset s390_sched_state if we entered the
463         current basic block via a fallthru edge and all others are unlikely.
464
465 2017-10-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
466
467         * config/s390/s390.c (NUM_SIDES): New variable.
468         (LONGRUNNING_THRESHOLD): New variable.
469         (LATENCY_FACTOR): New variable.
470         (s390_sched_score): Decrease score for long-running instructions on
471         wrong side.
472         (s390_sched_variable_issue): Perform bookkeeping for long-running
473         instructions.
474
475 2017-10-18  Richard Biener  <rguenther@suse.de>
476
477         * graphite-isl-ast-to-gimple.c (gcc_expression_from_isl_ast_expr_id):
478         Simplify with removal of the parameter rename map.
479         (set_rename): Likewise.
480         (should_copy_to_new_region): Likewise.
481         (graphite_copy_stmts_from_block): Likewise.
482         (copy_bb_and_scalar_dependences): Remove initialization of
483         unused copied_bb_map.
484         (copy_def): Remove.
485         (copy_internal_parameters): Likewise.
486         (graphite_regenerate_ast_isl): Do not call copy_internal_parameters.
487         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
488         Use INTEGRAL_TYPE_P.
489         (parameter_index_in_region_1): Rename to ...
490         (assign_parameter_index_in_region): ... this.  Assert we have
491         a parameter we handle.
492         (scan_tree_for_params): Adjust.
493         * sese.h (parameter_rename_map_t): Remove.
494         (struct sese_info_t): Remove unused parameter_rename_map and
495         copied_bb_map members.
496         * sese.c (new_sese_info): Adjust.
497         (free_sese_info): Likewise.
498
499 2017-10-18  Martin Liska  <mliska@suse.cz>
500
501         PR sanitizer/82545
502         * asan.c (asan_expand_poison_ifn): Do not put gimple stmt
503         on an abnormal edge.
504
505 2017-10-18  Sebastian Huber  <sebastian.huber@embedded-brains.de>
506
507         * doc/invoke.texi (ffunction-sections and fdata-sections):
508         Update.
509
510 2017-10-17  Eric Botcazou  <ebotcazou@adacore.com>
511
512         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Bail out only if
513         the use statement can throw internally.
514
515 2017-10-17  Eric Botcazou  <ebotcazou@adacore.com>
516
517         * config/visium/visium.c (visium_select_cc_mode): Return CCmode for
518         any RTX present on the RHS of a SET.
519         * compare-elim.c (try_eliminate_compare): Restore comment.
520
521 2017-10-17  Jakub Jelinek  <jakub@redhat.com>
522
523         * langhooks.h (struct lang_hooks): Document that tree_size langhook
524         may be also called on tcc_type nodes.
525         * langhooks.c (lhd_tree_size): Likewise.
526
527 2017-10-17  David Malcolm  <dmalcolm@redhat.com>
528
529         * gimple-ssa-sprintf.c (fmtwarn): Update for changed signature of
530         format_warning_at_substring.
531         (maybe_warn): Convert source_range * param to a location_t.  Pass
532         UNKNOWN_LOCATION rather than NULL to fmtwarn.
533         (format_directive): Remove code to extract source_ranges and
534         source_range * in favor of just a location_t.
535         (parse_directive): Pass UNKNOWN_LOCATION rather than NULL to
536         fmtwarn.
537         * substring-locations.c (format_warning_va): Convert
538         source_range * param to a location_t.
539         (format_warning_at_substring): Likewise.
540         * substring-locations.h (format_warning_va): Likewise.
541         (format_warning_at_substring): Likewise.
542
543 2017-10-17  Jan Hubicka  <hubicka@ucw.cz>
544
545         * target.h (enum vect_cost_for_stmt): Add vec_gather_load and
546         vec_scatter_store
547         * tree-vect-stmts.c (record_stmt_cost): Make difference between normal
548         and scatter/gather ops.
549
550         * aarch64/aarch64.c (aarch64_builtin_vectorization_cost): Add
551         vec_gather_load and vec_scatter_store.
552         * arm/arm.c (arm_builtin_vectorization_cost): Likewise.
553         * powerpcspe/powerpcspe.c (rs6000_builtin_vectorization_cost): Likewise.
554         * rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Likewise.
555         * s390/s390.c (s390_builtin_vectorization_cost): Likewise.
556         * spu/spu.c (spu_builtin_vectorization_cost): Likewise.
557         * i386/i386.c (x86_builtin_vectorization_cost): Likewise.
558
559 2017-10-17  Uros Bizjak  <ubizjak@gmail.com>
560
561         * reg-stack.c (compare_for_stack_reg): Add bool argument.
562         Detect FTST instruction and handle its register pops.  Only pop
563         second operand if can_pop_second_op is true.
564         (subst_stack_regs_pat) <case COMPARE>: Detect FCOMI instruction to
565         set can_pop_second_op to false in the compare_for_stack_reg call.
566
567         * config/i386/i386.md (*cmpi<FPCMP:unord><MODEF:mode>): Only call
568         output_fp_compare for stack register operands.
569         * config/i386/i386.c (output_fp_compare): Do not output SSE compare
570         instructions here.  Do not emit stack register pops here.  Assert
571         that FCOMPP pops next to top stack register.  Rewrite function.
572
573 2017-10-17  Nathan Sidwell  <nathan@acm.org>
574
575         PR middle-end/82577
576         * alias.c (compare_base_decls): Check HAS_DECL_ASSEMBLER_NAME_P,
577         use DECL_ASSEMBLER_NAME_RAW.
578
579         PR middle-end/82546
580         * tree.c (tree_code_size): Reformat.  Punt to lang hook for unknown
581         TYPE nodes.
582
583 2017-10-17  Qing Zhao <qing.zhao@oracle.com>
584             Wilco Dijkstra <wilco.dijkstra@arm.com>
585
586         * builtins.c (expand_builtin_update_setjmp_buf): Add a
587         converstion to Pmode from the buf_addr.
588
589 2017-10-17  Richard Biener  <rguenther@suse.de>
590
591         * graphite-dependences.c (scop_get_reads_and_writes): Change
592         output parameters to references.
593
594 2017-10-17  Jackson Woodruff  <jackson.woodruff@arm.com>
595
596         PR 71026/tree-optimization
597         * fold-const.c (distribute_real_division): Removed.
598         (fold_binary_loc): Remove calls to distribute_real_divison.
599
600 2017-10-17  Richard Biener  <rguenther@suse.de>
601
602         * graphite-scop-detection.c
603         (scop_detection::stmt_has_simple_data_refs_p): Always use
604         the full nest as region.
605         (try_generate_gimple_bb): Likewise.
606         * sese.c (scalar_evolution_in_region): Simplify now that
607         SCEV can handle instantiation in regions.
608         * tree-scalar-evolution.c (instantiate_scev_name): Also instantiate
609         in the non-loop part of a function if requested.
610
611 2017-10-17  Richard Biener  <rguenther@suse.de>
612
613         PR tree-optimization/82563
614         * graphite-isl-ast-to-gimple.c (generate_entry_out_of_ssa_copies):
615         New function.
616         (graphite_regenerate_ast_isl): Call it.
617         * graphite-scop-detection.c (build_scops): Remove entry edge split.
618
619 2017-10-17  Jakub Jelinek  <jakub@redhat.com>
620
621         PR tree-optimization/82549
622         * fold-const.c (optimize_bit_field_compare, fold_truth_andor_1):
623         Formatting fixes.  Instead of calling make_bit_field_ref with negative
624         bitpos return 0.
625
626 2017-10-17  Olga Makhotina  <olga.makhotina@intel.com>
627
628         * config/i386/avx512dqintrin.h (_mm_mask_reduce_sd,
629         _mm_maskz_reduce_sd, _mm_mask_reduce_ss,=20
630         _mm_maskz_reduce_ss): New.
631         * config/i386/i386-builtin.def (__builtin_ia32_reducesd_mask,
632         __builtin_ia32_reducess_mask): Ditto..
633         (__builtin_ia32_reducesd, __builtin_ia32_reducess): Remove.
634         * config/i386/sse.md (reduces<mode>): Renamed to ...
635         (reduces<mode><mask_scalar_name>): ... this.
636         (vreduce<ssescalarmodesuffix>\t{%3, %2, %1, %0|%0, %1, %2, %3}): Changed
637         to ...
638         (vreduce<ssescalarmodesuffix>\t{%3, %2, %1, %0<mask_scalar_operand4>|
639         %0<mask_scalar_operand4>, %1, %2, %3}): ... this.
640
641 2017-10-16  David Malcolm  <dmalcolm@redhat.com>
642
643         * Makefile.in (OBJS): Add unique-ptr-tests.o.
644         * selftest-run-tests.c (selftest::run_tests): Call
645         selftest::unique_ptr_tests_cc_tests.
646         * selftest.h (selftest::unique_ptr_tests_cc_tests): New decl.
647         * unique-ptr-tests.cc: New file.
648
649 2017-10-16  Vladimir Makarov  <vmakarov@redhat.com>
650
651         PR sanitizer/82353
652         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
653         locations.
654         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
655         (make_hard_regno_born, make_hard_regno_dead): Update
656         bb_killed_pseudos and bb_gen_pseudos for fixed regs.
657
658 2017-10-16  Jeff Law  <law@redhat.com>
659
660         * tree-ssa-dse.c (live_bytes_read): Fix thinko.
661
662 2017-10-16  Jan Hubicka  <hubicka@ucw.cz>
663
664         * x86-tune-costs.h (znver1_cost): Fix move cost tables.
665
666 2017-10-16  Olivier Hainque  <hainque@adacore.com>
667
668         * gcc/config.gcc (powerpc*-*-*spe*): Pick 8548 as the default
669         with_cpu if we were configured for an e500v2 target cpu name.
670
671 2017-10-16  Thomas Preud'homme  <thomas.preudhomme@arm.com>
672
673         * config/arm/arm-cpus.in (cortex-m33): Add nodsp option.
674         * doc/invoke.texi: Document +nodsp as a valid extension for
675         -mcpu=cortex-m33.
676
677 2017-10-16  Martin Liska  <mliska@suse.cz>
678
679         * sbitmap.c (bitmap_bit_in_range_p_checking): New function.
680         (test_set_range): Likewise.
681         (test_range_functions): Rename to ...
682         (test_bit_in_range): ... this.
683         (sbitmap_c_tests): Add new test.
684
685 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
686
687         * config/aarch64/arm_neon.h (vdot_u32, vdotq_u32, vdot_s32, vdotq_s32): New.
688         (vdot_lane_u32, vdot_laneq_u32, vdotq_lane_u32, vdotq_laneq_u32): New.
689         (vdot_lane_s32, vdot_laneq_s32, vdotq_lane_s32, vdotq_laneq_s32): New.
690
691 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
692
693         * config/aarch64/aarch64-builtins.c
694         (aarch64_types_quadopu_lane_qualifiers): New.
695         (TYPES_QUADOPU_LANE): New.
696         * config/aarch64/aarch64-simd.md (aarch64_<sur>dot<vsi2qi>): New.
697         (<sur>dot_prod<vsi2qi>, aarch64_<sur>dot_lane<vsi2qi>): New.
698         (aarch64_<sur>dot_laneq<vsi2qi>): New.
699         * config/aarch64/aarch64-simd-builtins.def (sdot, udot): New.
700         (sdot_lane, udot_lane, sdot_laneq, udot_laneq): New.
701         * config/aarch64/iterators.md (sur): Add UNSPEC_SDOT, UNSPEC_UDOT.
702         (Vdottype, DOTPROD): New.
703         (sur): Add SDOT and UDOT.
704
705 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
706
707         * config/aarch64/aarch64.h (AARCH64_FL_DOTPROD): New.
708         (AARCH64_ISA_DOTPROD, TARGET_DOTPROD): New.
709         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Add TARGET_DOTPROD.
710         * config/aarch64/aarch64-option-extensions.def (dotprod): New.
711         * config/aarch64/aarch64-cores.def (cortex-a55, cortex-a75): Enable TARGET_DOTPROD.
712         (cortex-a75.cortex-a55): Likewise.
713         * doc/invoke.texi (aarch64-feature-modifiers): Document dotprod.
714
715 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
716
717         * config/arm/arm-builtins.c (arm_unsigned_uternop_qualifiers): New.
718         (UTERNOP_QUALIFIERS, arm_umac_lane_qualifiers, UMAC_LANE_QUALIFIERS): New.
719         * config/arm/arm_neon_builtins.def (sdot, udot, sdot_lane, udot_lane): new.
720         * config/arm/iterators.md (DOTPROD, VSI2QI, vsi2qi): New.
721         (UNSPEC_DOT_S, UNSPEC_DOT_U, opsuffix): New.
722         * config/arm/neon.md (neon_<sup>dot<vsi2qi>): New.
723         (neon_<sup>dot_lane<vsi2qi>, <sup>dot_prod<vsi2qi>): New.
724         * config/arm/types.md (neon_dot, neon_dot_q): New.
725         * config/arm/unspecs.md (sup): Add UNSPEC_DOT_S, UNSPEC_DOT_U.
726
727 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
728
729         * config/arm/arm.h (TARGET_DOTPROD): New.
730         * config/arm/arm.c (arm_arch_dotprod): New.
731         (arm_option_reconfigure_globals): Add arm_arch_dotprod.
732         * config/arm/arm-c.c (__ARM_FEATURE_DOTPROD): New.
733         * config/arm/arm-cpus.in (armv8.2-a): Enabled +dotprod.
734         (feature dotprod, group dotprod, ALL_SIMD_INTERNAL): New.
735         (ALL_FPU_INTERNAL): Use ALL_SIMD_INTERNAL.
736         * config/arm/t-multilib (v8_2_a_simd_variants): Add dotprod.
737         * doc/invoke.texi (armv8.2-a): Document dotprod
738
739 2017-10-14  Jan Hubicka  <hubicka@ucw.cz>
740
741         * i386.c (ix86_vec_cost): New function.
742         (ix86_rtx_costs): Handle vector operations better.
743         * i386.h (struct processor_costs): Add sse_op, fmasd, fmass.
744         * x86-tune-costs.h: Add new costs to all tables.
745
746 2017-10-14  Jan Hubicka  <hubicka@ucw.cz>
747
748         * i386.c (ix86_rtx_costs): Make difference between x87 and SSE
749         operations.
750         * i386.h (struct processor_costs): Add addss, mulss, mulsd, divss,
751         divsd, sqrtss and sqrtsd
752         * x86-tune-costs.h: Add new entries to all costs.
753         (znver1_cost): Fix to match real instruction latencies.
754
755 2017-10-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
756             Michael Collison <michael.collison@arm.com>
757
758         * compare-elim.c: Include emit-rtl.h.
759         (can_merge_compare_into_arith): New function.
760         (try_validate_parallel): Likewise.
761         (try_merge_compare): Likewise.
762         (try_eliminate_compare): Call the above when no previous clobber
763         is available.
764         (execute_compare_elim_after_reload): Add DF_UD_CHAIN and DF_DU_CHAIN
765         dataflow problems.
766
767 2017-10-14  Jakub Jelinek  <jakub@redhat.com>
768
769         PR middle-end/62263
770         PR middle-end/82498
771         * tree-ssa-phiopt.c (value_replacement): Comment fix.  Handle
772         up to 2 preparation statements for ASSIGN in MIDDLE_BB.
773
774         PR middle-end/62263
775         PR middle-end/82498
776         * tree-ssa-forwprop.c (simplify_rotate): Allow def_arg1[N]
777         to be any operand_equal_p operands.  For & (B - 1) require
778         B to be power of 2.  Recognize
779         (X << (Y & (B - 1))) | (X >> ((-Y) & (B - 1))) and similar patterns.
780
781 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
782
783         PR bootstrap/82553
784         * optabs.c (expand_memory_blockage): Fix call of
785         targetm.have_memory_blockage.
786
787 2017-10-14  Jakub Jelinek  <jakub@redhat.com>
788
789         PR bootstrap/82548
790         * config.gcc (*-*-solaris2*, i[34567]86-*-cygwin*,
791         x86_64-*-cygwin*, i[34567]86-*-mingw* | x86_64-*-mingw*): Append
792         objects to extra_objs instead of overwriting it.
793
794 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
795
796         * config/i386/sync.md (FILD_ATOMIC/FIST_ATOMIC FP load peephole2):
797         Use any_fp_register_operand as operand[3] predicate.  Simplify
798         equality test for operands[2] and operands[4] memory location.
799         (LDX_ATOMIC/STX_ATOMIC FP load peephole2): Ditto.
800         (FILD_ATOMIC/FIST_ATOMIC FP load peephole2 with mem blockage): New.
801         (LDX_ATOMIC/LDX_ATOMIC FP load peephole2 with mem blockage): Ditto.
802         (FILD_ATOMIC/FIST_ATOMIC FP store peephole2): Use
803         any_fp_register_operand as operand[1] predicate.  Simplify
804         equality test for operands[0] and operands[3] memory location.
805         (LDX_ATOMIC/STX_ATOMIC FP store peephole2): Ditto.
806         (FILD_ATOMIC/FIST_ATOMIC FP store peephole2 with mem blockage): New.
807         (LDX_ATOMIC/LDX_ATOMIC FP storepeephole2 with mem blockage): Ditto.
808
809 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
810
811         * target-insns.def: Add memory_blockage.
812         * optabs.c (expand_memory_blockage): New function.
813         (expand_asm_memory_barrier): Rename ...
814         (expand_asm_memory_blockage): ... to this.
815         (expand_mem_thread_fence): Call expand_memory_blockage
816         instead of expand_asm_memory_barrier.
817         (expand_mem_singnal_fence): Ditto.
818         (expand_atomic_load): Ditto.
819         (expand_atomic_store): Ditto.
820         * doc/md.texi (Standard Pattern Names For Generation):
821         Document memory_blockage instruction pattern.
822
823 2017-10-13  Sebastian Perta  <sebastian.perta@renesas.com>
824
825         * config/rl78/rl78.c (rl78_emit_libcall): New function.
826         * config/rl78/rl78-protos.h (rl78_emit_libcall): New function.
827         * config/rl78/rl78.md: New define_expand "adddi3".
828
829 2017-10-13  Jan Hubicka  <hubicka@ucw.cz>
830
831         * cfghooks.c (verify_flow_info): Disable check that all probabilities
832         are set correctly.
833
834 2017-10-13  Jeff Law  <law@redhat.com>
835
836         * tree-ssa-reassoc.c (reassociate_bb): Clarify code slighly.
837
838 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
839
840         PR target/82274
841         * internal-fn.c (expand_mul_overflow): If both operands have
842         the same highpart of -1 or 0 and the topmost bit of lowpart
843         is different, overflow is if res <= 0 rather than res < 0.
844
845 2017-10-13  Pat Haugen  <pthaugen@us.ibm.com>
846
847         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Remove
848         TARGET_P9_VECTOR code for unaligned_load case.
849
850 2017-10-13  Jan Hubicka  <hubicka@ucw.cz>
851
852         * cfghooks.c (verify_flow_info): Check that edge probabilities are set.
853
854 2017-10-13  Nathan Sidwell  <nathan@acm.org>
855
856         * tree-core.h (tree_contains_struct): Make bool.
857         * tree.c (tree_contains_struct): Likewise.
858         * tree.h (MARK_TS_BASE): Remove do ... while (0) idiom.
859         (MARK_TS_TYPED, MARK_TS_COMMON, MARK_TS_TYPE_COMMON,
860         MARK_TS_TYPE_WITH_LANG_SPECIFIC, MARK_TS_DECL_MINIMAL,
861         MARK_TS_DECL_COMMON, MARK_TS_DECL_WRTL, MARK_TS_DECL_WITH_VIS,
862         MARK_TS_DECL_NON_COMMON): Likewise, use comma operator.
863
864 2017-10-13  Richard Biener  <rguenther@suse.de>
865
866         * graphite-isl-ast-to-gimple.c
867         (translate_isl_ast_to_gimple::get_rename_from_scev): Remove unused
868         parameters and dominance check.
869         (translate_isl_ast_to_gimple::graphite_copy_stmts_from_block): Adjust.
870         (translate_isl_ast_to_gimple::copy_bb_and_scalar_dependences): Likewise.
871         (translate_isl_ast_to_gimple::graphite_regenerate_ast_isl):
872         Do not update SSA form here or do intermediate IL verification.
873         * graphite.c: Include tree-ssa.h and tree-into-ssa.h.
874         (graphite_initialize): Remove check on the number of loops in
875         the function and inline into graphite_transform_loops.
876         (graphite_finalize): Inline into graphite_transform_loops.
877         (graphite_transform_loops): Perform SSA update and IL verification
878         here.
879         * params.def (PARAM_GRAPHITE_MIN_LOOPS_PER_FUNCTION): Remove.
880
881 2017-10-13  Richard Biener  <rguenther@suse.de>
882
883         * graphite-isl-ast-to-gimple.c (max_mode_int_precision,
884         graphite_expression_type_precision): Avoid global constructor
885         by moving ...
886         (translate_isl_ast_to_gimple::translate_isl_ast_to_gimple): Here.
887         (translate_isl_ast_to_gimple::graphite_expr_type): Add type member.
888         (translate_isl_ast_to_gimple::translate_isl_ast_node_for): Use it.
889         (translate_isl_ast_to_gimple::build_iv_mapping): Likewise.
890         (translate_isl_ast_to_gimple::graphite_create_new_guard): Likewise.
891         * graphite-sese-to-poly.c (build_original_schedule): Return nothing.
892
893 2017-10-13  H.J. Lu  <hongjiu.lu@intel.com>
894
895         PR target/82499
896         * config/i386/i386.h (ix86_red_zone_size): New.
897         * config/i386/i386.md (push peephole2s): Replace
898         "!ix86_using_red_zone ()" with "ix86_red_zone_size == 0".
899
900 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
901             Alan Hayward  <alan.hayward@arm.com>
902             David Sherwood  <david.sherwood@arm.com>
903
904         * combine.c (can_change_dest_mode): Reject changes in
905         REGMODE_NATURAL_SIZE.
906
907 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
908             Alan Hayward  <alan.hayward@arm.com>
909             David Sherwood  <david.sherwood@arm.com>
910
911         * cfgexpand.c (expand_debug_expr): Use GET_MODE_UNIT_BITSIZE.
912         (expand_debug_source_expr): Likewise.
913         * combine.c (combine_simplify_rtx): Likewise.
914         * cse.c (fold_rtx): Likewise.
915         * fwprop.c (canonicalize_address): Likewise.
916         * targhooks.c (default_shift_truncation_mask): Likewise.
917
918 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
919             Alan Hayward  <alan.hayward@arm.com>
920             David Sherwood  <david.sherwood@arm.com>
921
922         * optabs.c (add_equal_note): Use GET_MODE_UNIT_SIZE.
923         (widened_mode): Likewise.
924         (expand_unop): Likewise.
925         * ree.c (transform_ifelse): Likewise.
926         (merge_def_and_ext): Likewise.
927         (combine_reaching_defs): Likewise.
928         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
929
930 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
931             Alan Hayward  <alan.hayward@arm.com>
932             David Sherwood  <david.sherwood@arm.com>
933
934         * caller-save.c (replace_reg_with_saved_mem): Use byte_lowpart_offset.
935         * combine.c (gen_lowpart_for_combine): Likewise.
936         * dwarf2out.c (rtl_for_decl_location): Likewise.
937         * final.c (alter_subreg): Likewise.
938         * rtlhooks.c (gen_lowpart_general): Likewise.
939         (gen_lowpart_if_possible): Likewise.
940
941 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
942             Alan Hayward  <alan.hayward@arm.com>
943             David Sherwood  <david.sherwood@arm.com>
944
945         * calls.c (expand_call): Use subreg_lowpart_offset.
946         * cse.c (cse_insn): Likewise.
947         * regcprop.c (copy_value): Likewise.
948         (copyprop_hardreg_forward_1): Likewise.
949
950 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
951
952         PR target/82524
953         * config/i386/i386.md (addqi_ext_1, andqi_ext_1,
954         *andqi_ext_1_cc, *<code>qi_ext_1, *xorqi_ext_1_cc): Change
955         =Q constraints to +Q and into insn condition add check
956         that operands[0] and operands[1] are equal.
957         (*addqi_ext_2, *andqi_ext_2, *<code>qi_ext_2): Change
958         =Q constraints to +Q and into insn condition add check
959         that operands[0] is equal to either operands[1] or operands[2].
960
961         PR target/82498
962         * fold-const.c (fold_binary_loc) <bit_rotate>: Code cleanups,
963         instead of handling MINUS_EXPR twice (once for each argument),
964         canonicalize operand order and handle just once, use rtype where
965         possible.  Handle (A << B) | (A >> (-B & (Z - 1))).
966
967         PR target/82498
968         * config/i386/ia32intrin.h (__rold, __rord, __rolq, __rorq): Allow
969         any values of __C while still being pattern recognizable as a simple
970         rotate instruction.
971
972 2017-10-13  Richard Biener  <rguenther@suse.de>
973
974         PR tree-optimization/82451
975         Revert
976         2017-10-02  Richard Biener  <rguenther@suse.de>
977
978         PR tree-optimization/82355
979         * graphite-isl-ast-to-gimple.c (build_iv_mapping): Also build
980         a mapping for the enclosing loop but avoid generating one for
981         the loop tree root.
982         (copy_bb_and_scalar_dependences): Remove premature codegen
983         error on PHIs in blocks duplicated into multiple places.
984         * graphite-scop-detection.c
985         (scop_detection::stmt_has_simple_data_refs_p): For a loop not
986         in the region use it as loop and nest to analyze the DR in.
987         (try_generate_gimple_bb): Likewise.
988         * graphite-sese-to-poly.c (extract_affine_chrec): Adjust.
989         (add_loop_constraints): For blocks in a loop not in the region
990         create a dimension with a single iteration.
991         * sese.h (gbb_loop_at_index): Remove assert.
992
993         * cfgloop.c (loop_preheader_edge): For the loop tree root
994         return the single successor of the entry block.
995         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
996         Reset the SCEV hashtable and niters.
997         * graphite-scop-detection.c
998         (scop_detection::graphite_can_represent_scev): Add SCOP parameter,
999         assert that we only have POLYNOMIAL_CHREC that vary in loops
1000         contained in the region.
1001         (scop_detection::graphite_can_represent_expr): Adjust.
1002         (scop_detection::stmt_has_simple_data_refs_p): For loops
1003         not in the region set loop to NULL.  The nest is now the
1004         entry edge to the region.
1005         (try_generate_gimple_bb): Likewise.
1006         * sese.c (scalar_evolution_in_region): Adjust for
1007         instantiate_scev change.
1008         * tree-data-ref.h (graphite_find_data_references_in_stmt):
1009         Make nest parameter the edge into the region.
1010         (create_data_ref): Likewise.
1011         * tree-data-ref.c (dr_analyze_indices): Make nest parameter an
1012         entry edge into a region and adjust instantiate_scev calls.
1013         (create_data_ref): Likewise.
1014         (graphite_find_data_references_in_stmt): Likewise.
1015         (find_data_references_in_stmt): Pass the loop preheader edge
1016         from the nest argument.
1017         * tree-scalar-evolution.h (instantiate_scev): Make instantiate_below
1018         parameter the edge into the region.
1019         (instantiate_parameters): Use the loop preheader edge as entry.
1020         * tree-scalar-evolution.c (analyze_scalar_evolution): Handle
1021         NULL loop.
1022         (get_instantiated_value_entry): Make instantiate_below parameter
1023         the edge into the region.
1024         (instantiate_scev_name): Likewise.  Adjust dominance checks,
1025         when we cannot use loop-based instantiation instantiate by
1026         walking use-def chains.
1027         (instantiate_scev_poly): Adjust.
1028         (instantiate_scev_binary): Likewise.
1029         (instantiate_scev_convert): Likewise.
1030         (instantiate_scev_not): Likewise.
1031         (instantiate_array_ref): Remove.
1032         (instantiate_scev_3): Likewise.
1033         (instantiate_scev_2): Likewise.
1034         (instantiate_scev_1): Likewise.
1035         (instantiate_scev_r): Do not blindly handle N-operand trees.
1036         Do not instantiate array-refs.  Handle all constants and invariants.
1037         (instantiate_scev): Make instantiate_below parameter
1038         the edge into the region.
1039         (resolve_mixers): Use the loop preheader edge for the region
1040         parameter to instantiate_scev_r.
1041         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Adjust.
1042
1043 2017-10-13  Richard Biener  <rguenther@suse.de>
1044
1045         PR tree-optimization/82525
1046         * graphite-isl-ast-to-gimple.c
1047         (translate_isl_ast_to_gimple::widest_int_from_isl_expr_int): Split
1048         out from ...
1049         (translate_isl_ast_to_gimple::gcc_expression_from_isl_expr_int): Here.
1050         Fail code generation when we cannot represent the isl integer.
1051         (binary_op_to_tree): Elide modulo operations that are no-ops
1052         in the type we code generate.  Remove now superfluous code
1053         generation errors.
1054
1055 2017-10-13  Richard Biener  <rguenther@suse.de>
1056
1057         * graphite-scop-detection.c (loop_ivs_can_be_represented): Remove.
1058         (scop_detection::harmful_loop_in_region): Remove premature
1059         IV type restriction.
1060         (scop_detection::graphite_can_represent_scev): We can handle
1061         pointer IVs just fine.
1062
1063 2017-10-13  Alan Modra  <amodra@gmail.com>
1064
1065         * doc/extend.texi (Extended Asm <Clobbers>): Rename to
1066         "Clobbers and Scratch Registers".  Add paragraph on
1067         alternative to clobbers for scratch registers and OpenBLAS
1068         example.
1069
1070 2017-10-13  Alan Modra  <amodra@gmail.com>
1071
1072         * doc/extend.texi (Clobbers): Correct vax example.  Delete old
1073         example of a memory input for a string of known length.  Move
1074         commentary out of table.  Add a number of new examples
1075         covering array memory inputs.
1076
1077 2017-10-12  Martin Liska  <mliska@suse.cz>
1078
1079         PR tree-optimization/82493
1080         * sbitmap.c (bitmap_bit_in_range_p): Fix the implementation.
1081         (test_range_functions): New function.
1082         (sbitmap_c_tests): Likewise.
1083         * selftest-run-tests.c (selftest::run_tests): Run new tests.
1084         * selftest.h (sbitmap_c_tests): New function.
1085
1086         * tree-ssa-dse.c (live_bytes_read): Fix thinko.
1087
1088 2017-10-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
1089
1090         * config/rs6000/amo.h: Fix spacing issue.
1091
1092 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
1093
1094         PR target/82498
1095         * config/i386/i386.md (*ashl<mode>3_mask_1,
1096         *<shift_insn><mode>3_mask_1, *<rotate_insn><mode>3_mask_1,
1097         *<btsc><mode>_mask_1, *btr<mode>_mask_1): New define_insn_and_split
1098         patterns.
1099
1100 2017-10-12  Jan Hubicka  <hubicka@ucw.cz>
1101
1102         * profile-count.h (safe_scale_64bit): Fix GCC4.x path.
1103         (profile_probability): Set max_probability
1104         to (uint32_t) 1 << (n_bits - 2) and update accessors to avoid overlfows
1105         in temporaries.
1106         * profile-count.c (profile_probability::differs_from_p): Do not
1107         rely on max_probaiblity == 10000
1108
1109 2017-10-12  Jeff Law  <law@redhat.com>
1110
1111         * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject ao_refs with
1112         negative offsets.
1113
1114 2017-10-12  Martin Sebor  <msebor@redhat.com>
1115
1116         PR other/82301
1117         PR c/82435
1118         * cgraphunit.c (maybe_diag_incompatible_alias): New function.
1119         (handle_alias_pairs): Call it.
1120         * common.opt (-Wattribute-alias): New option.
1121         * doc/extend.texi (ifunc attribute): Discuss C++ specifics.
1122         * doc/invoke.texi (-Wattribute-alias): Document.
1123
1124 2017-10-12  Vladimir Makarov  <vmakarov@redhat.com>
1125
1126         Revert
1127         2017-10-11  Vladimir Makarov  <vmakarov@redhat.com>
1128         PR sanitizer/82353
1129         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
1130         locations.
1131         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
1132         (make_hard_regno_born, make_hard_regno_dead): Update
1133         bb_killed_pseudos and bb_gen_pseudos.
1134
1135 2017-10-12  Jan Hubicka  <hubicka@ucw.cz>
1136
1137         * config/i386/x86-tune-sched.c (ix86_adjust_cost): Fix Zen support.
1138
1139 2017-10-12  Uros Bizjak  <ubizjak@gmail.com>
1140
1141         * config/alpha/alpha.c (alpha_split_conditional_move):
1142         Use std::swap instead of manually swapping.
1143         (alpha_stdarg_optimize_hook): Ditto.
1144         (alpha_canonicalize_comparison): Ditto.
1145
1146 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
1147
1148         * tree-loop-distribution.c (struct builtin_info): New struct.
1149         (struct partition): Refactor fields into struct builtin_info.
1150         (partition_free): Free struct builtin_info.
1151         (build_size_arg_loc, build_addr_arg_loc): Delete.
1152         (generate_memset_builtin, generate_memcpy_builtin): Get memory range
1153         information from struct builtin_info.
1154         (find_single_drs): New function refactored from classify_partition.
1155         Also moved builtin validity checks to this function.
1156         (compute_access_range, alloc_builtin): New functions.
1157         (classify_builtin_st, classify_builtin_ldst): New functions.
1158         (classify_partition): Refactor code into functions find_single_drs,
1159         classify_builtin_st and classify_builtin_ldst.
1160         (distribute_loop): Don't do runtime alias check when distributing
1161         loop nest.
1162         (find_seed_stmts_for_distribution): New function.
1163         (pass_loop_distribution::execute): Refactor code finding seed
1164         stmts into above function.  Support distribution for the innermost
1165         two-level loop nest.  Adjust dump information.
1166
1167 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
1168
1169         * tree-loop-distribution.c: Adjust the general comment.
1170         (NUM_PARTITION_THRESHOLD): New macro.
1171         (ssa_name_has_uses_outside_loop_p): Support loop nest distribution.
1172         (classify_partition): Skip builtin pattern of loop nest's inner loop.
1173         (merge_dep_scc_partitions): New parameter ignore_alias_p and use it
1174         in call to build_partition_graph.
1175         (finalize_partitions): New parameter.  Make loop distribution more
1176         conservative by fusing more partitions.
1177         (distribute_loop): Don't do runtime alias check in case of loop nest
1178         distribution.
1179         (find_seed_stmts_for_distribution): New function.
1180         (prepare_perfect_loop_nest): New function.
1181         (pass_loop_distribution::execute): Refactor code finding seed stmts
1182         and loop nest into above functions.  Support loop nest distribution.
1183         Adjust dump information accordingly.
1184
1185 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
1186
1187         * tree-loop-distribution.c (break_alias_scc_partitions): Add comment
1188         and set PTYPE_SEQUENTIAL for merged partition.
1189
1190 2017-10-12  Richard Biener  <rguenther@suse.de>
1191
1192         PR tree-optimization/69728
1193         Revert
1194         2017-09-19  Richard Biener  <rguenther@suse.de>
1195
1196         PR tree-optimization/69728
1197         * graphite-sese-to-poly.c (schedule_error): New global.
1198         (add_loop_schedule): Handle empty domain by failing the
1199         schedule.
1200         (build_original_schedule): Handle schedule_error.
1201
1202         * graphite-sese-to-poly.c (add_loop_schedule): Handle empty
1203         domain by returning an unchanged schedule.
1204
1205 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
1206
1207         * genrecog.c (validate_pattern): For VEC_SELECT verify that
1208         CONST_INT selectors are 0 to GET_MODE_NUNITS (imode) - 1.
1209
1210 2017-10-12  Aldy Hernandez  <aldyh@redhat.com>
1211
1212         * Makefile.in (TAGS): Merge all the *.def files into one pattern.
1213         Handle params.def.
1214
1215 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
1216
1217         PR c++/82159
1218         * expr.c (store_field): Don't optimize away bitsize == 0 store
1219         from CALL_EXPR with addressable return type.
1220
1221 2017-10-11  Segher Boessenkool  <segher@kernel.crashing.org>
1222
1223         * config/rs6000/rs6000.h (TARGET_ISEL64): Delete.
1224         * config/rs6000/rs6000.md (sel): Delete mode attribute.
1225         (mov<mode>cc, isel_signed_<mode>, isel_unsigned_<mode>,
1226         *isel_reversed_signed_<mode>, *isel_reversed_unsigned_<mode>): Use
1227         TARGET_ISEL instead of TARGET_ISEL<sel>.
1228
1229 2017-10-11  David Edelsohn  <dje.gcc@gmail.com>
1230
1231         * config/rs6000/rs6000.c
1232         (rs6000_xcoff_asm_output_aligned_decl_common): Test for NULL decl.
1233
1234 2017-10-11  Segher Boessenkool  <segher@kernel.crashing.org>
1235
1236         * config/rs6000/predicates.md (zero_constant, all_ones_constant):
1237         Move up in file.
1238         (reg_or_cint_operand): Fix comment.
1239         (reg_or_zero_operand): New predicate.
1240         * config/rs6000/rs6000-protos.h (output_isel): Delete.
1241         * config/rs6000/rs6000.c (output_isel): Delete.
1242         * config/rs6000/rs6000.md (isel_signed_<mode>): Use reg_or_zero_operand
1243         instead of reg_or_cint_operand.  Output instruction directly (not via
1244         output_isel).
1245         (isel_unsigned_<mode>): Ditto.
1246         (*isel_reversed_signed_<mode>): Use reg_or_zero_operand instead of
1247         gpc_reg_operand.  Add an instruction alternative for this.  Output
1248         instruction directly.
1249         (*isel_reversed_unsigned_<mode>): Ditto.
1250
1251 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
1252
1253         * config/i386/i386.c (ix86_canonicalize_comparison): New function.
1254         (TARGET_CANONICALIZE_COMPARISON): Define.
1255
1256 2017-10-11  Qing Zhao  <qing.zhao@oracle.com>
1257
1258         PR target/81422
1259         * config/aarch64/aarch64.c (aarch64_load_symref_appropriately):
1260         Check whether the dest is REG before adding REG_EQUIV note.
1261
1262 2017-10-11  Vladimir Makarov  <vmakarov@redhat.com>
1263
1264         PR sanitizer/82353
1265         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
1266         locations.
1267         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
1268         (make_hard_regno_born, make_hard_regno_dead): Update
1269         bb_killed_pseudos and bb_gen_pseudos.
1270
1271 2017-10-11  Nathan Sidwell  <nathan@acm.org>
1272
1273         * incpath.h (enum incpath_kind): Name enum, prefix values.
1274         (add_path, add_cpp_dir_path, get_added_cpp_dirs): Use incpath_kind.
1275         * incpath.c (heads, tails): Use INC_MAX.
1276         (add_env_var_paths, add_standard_paths): Use incpath_kind.
1277         (merge_include_chains, split_quote_chain,
1278         register_include_chains): Update incpath_kind names.
1279         (add_cpp_dir_path, add_path, get_added_cpp_dirs): Use incpath_kind.
1280         * config/darwin-c.c (add_system_framework_path): Update incpath_kind
1281         names.
1282         (add_framework_path, darwin_register_objc_includes): Likewise.
1283         * config/vms/vms-c.c (vms_c_register_includes): Likewise.
1284
1285 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
1286
1287         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
1288         Do not use float_operator operator predicate.
1289         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
1290         * config/i386/predicates.md (float_operator): Remove predicate.
1291
1292 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
1293
1294         * config/i386/i386.md (*jcc<mode>_0_i387): Remove insn pattern.
1295         (*jccxf_i387): Ditto.
1296         (*jcc<mode>_i387): Ditto.
1297         (*jccu<mode>_i387): Ditto.
1298         (*jcc<X87MODEF:mode>_<SWI24:mode>_i387): Ditto.
1299         (*jcc_*_i387 splitters): Remove.
1300         * config/i386/i386-protos.h (ix86_split_fp_branch): Remove prototype.
1301         * config/i386/i386.c (ix86_split_fp_branch): Remove.
1302         * config/i386/predicates.md (ix86_swapped_fp_comparison_operator):
1303         Remove predicate.
1304
1305 2017-10-11  Jan Hubicka  <hubicka@ucw.cz>
1306
1307         * profile-count.h (slow_safe_scale_64bit): New function.
1308         (safe_scale_64bit): New inline.
1309         (profile_count::max_safe_multiplier): Remove; use safe_scale_64bit.
1310         * profile-count.c: Include wide-int.h
1311         (slow_safe_scale_64bit): New.
1312
1313 2017-10-11  Nathan Sidwell  <nathan@acm.org>
1314
1315         * tree.h (DECL_ASSEMBLER_NAME_SET_P): Don't check
1316         HAS_DECL_ASSEMBLER_NAME_P.
1317         * gimple-expr.c (gimple_decl_printable_name: Check
1318         HAS_DECL_ASSEMBLER_NAME_P too.
1319         * ipa-utils.h (type_in_anonymous_namespace_p): Check
1320         DECL_ASSEMBLER_NAME_SET_P of TYPE_NAME.
1321         (odr_type_p): No need to assert TYPE_NAME is a TYPE_DECL.
1322         * passes.c (rest_of_decl_compilation): Check
1323         HAS_DECL_ASSEMBLER_NAME_P too.
1324         * recog.c (verify_changes): Likewise.
1325         * tree-pretty-print.c (dump_decl_name): Likewise.
1326         * tree-ssa-structalias.c (alias_get_name): Likewise.  Reimplement.
1327
1328         * tree.h (DECL_ASSEMBLER_NAME_RAW): New.
1329         (SET_DECL_ASSEMBLER_NAME): Use it.
1330         (DECL_ASSEMBLER_NAME_SET_P): Likewise.
1331         (COPY_DECL_ASSEMBLER_NAME): Likewise.
1332         * tree.c (decl_assembler_name): Use DECL_ASSEMBLER_NAME_RAW.
1333
1334 2017-10-11  Jan Hubicka  <hubicka@ucw.cz>
1335
1336         * config.gcc (i386, x86_64): Add extra objects.
1337         * config/i386/i386-protos.h (ix86_rip_relative_addr_p): Declare.
1338         (ix86_min_insn_size): Declare.
1339         (ix86_issue_rate): Declare.
1340         (ix86_adjust_cost): Declare.
1341         (ia32_multipass_dfa_lookahead): Declare.
1342         (ix86_macro_fusion_p): Declare.
1343         (ix86_macro_fusion_pair_p): Declare.
1344         (ix86_bd_has_dispatch): Declare.
1345         (ix86_bd_do_dispatch): Declare.
1346         (ix86_core2i7_init_hooks): Declare.
1347         (ix86_atom_sched_reorder): Declare.
1348         * config/i386/i386.c Move all CPU cost tables to x86-tune-costs.h.
1349         (COSTS_N_BYTES): Move to x86-tune-costs.h.
1350         (DUMMY_STRINGOP_ALGS):Move to x86-tune-costs.h.
1351         (rip_relative_addr_p): Rename to ...
1352         (ix86_rip_relative_addr_p): ... this one; export.
1353         (memory_address_length): Update.
1354         (ix86_issue_rate): Move to x86-tune-sched.c.
1355         (ix86_flags_dependent): Move to x86-tune-sched.c.
1356         (ix86_agi_dependent): Move to x86-tune-sched.c.
1357         (exact_dependency_1): Move to x86-tune-sched.c.
1358         (exact_store_load_dependency): Move to x86-tune-sched.c.
1359         (ix86_adjust_cost): Move to x86-tune-sched.c.
1360         (ia32_multipass_dfa_lookahead): Move to x86-tune-sched.c.
1361         (ix86_macro_fusion_p): Move to x86-tune-sched.c.
1362         (ix86_macro_fusion_pair_p): Move to x86-tune-sched.c.
1363         (do_reorder_for_imul): Move to x86-tune-sched-atom.c.
1364         (swap_top_of_ready_list): Move to x86-tune-sched-atom.c.
1365         (ix86_sched_reorder): Move to x86-tune-sched-atom.c.
1366         (core2i7_first_cycle_multipass_init): Move to x86-tune-sched-core.c.
1367         (core2i7_dfa_post_advance_cycle): Move to x86-tune-sched-core.c.
1368         (min_insn_size): Rename to ...
1369         (ix86_min_insn_size): ... this one; export.
1370         (core2i7_first_cycle_multipass_begin): Move to x86-tune-sched-core.c.
1371         (core2i7_first_cycle_multipass_issue): Move to x86-tune-sched-core.c.
1372         (core2i7_first_cycle_multipass_backtrack): Move to
1373         x86-tune-sched-core.c.
1374         (core2i7_first_cycle_multipass_end): Move to x86-tune-sched-core.c.
1375         (core2i7_first_cycle_multipass_fini): Move to x86-tune-sched-core.c.
1376         (ix86_sched_init_global): Break up logic to ix86_core2i7_init_hooks.
1377         (ix86_avoid_jump_mispredicts): Update.
1378         (TARGET_SCHED_DISPATCH): Move to ix86-tune-sched-bd.c.
1379         (TARGET_SCHED_DISPATCH_DO): Move to ix86-tune-sched-bd.c.
1380         (TARGET_SCHED_REORDER): Move to ix86-tune-sched-bd.c.
1381         (DISPATCH_WINDOW_SIZE): Move to ix86-tune-sched-bd.c.
1382         (MAX_DISPATCH_WINDOWS): Move to ix86-tune-sched-bd.c.
1383         (MAX_INSN): Move to ix86-tune-sched-bd.c.
1384         (MAX_IMM): Move to ix86-tune-sched-bd.c.
1385         (MAX_IMM_SIZE): Move to ix86-tune-sched-bd.c.
1386         (MAX_IMM_32): Move to ix86-tune-sched-bd.c.
1387         (MAX_IMM_64): Move to ix86-tune-sched-bd.c.
1388         (MAX_LOAD): Move to ix86-tune-sched-bd.c.
1389         (MAX_STORE): Move to ix86-tune-sched-bd.c.
1390         (BIG): Move to ix86-tune-sched-bd.c.
1391         (enum dispatch_group): Move to ix86-tune-sched-bd.c.
1392         (enum insn_path): Move to ix86-tune-sched-bd.c.
1393         (get_mem_group): Move to ix86-tune-sched-bd.c.
1394         (is_cmp): Move to ix86-tune-sched-bd.c.
1395         (dispatch_violation): Move to ix86-tune-sched-bd.c.
1396         (is_branch): Move to ix86-tune-sched-bd.c.
1397         (is_prefetch): Move to ix86-tune-sched-bd.c.
1398         (init_window): Move to ix86-tune-sched-bd.c.
1399         (allocate_window): Move to ix86-tune-sched-bd.c.
1400         (init_dispatch_sched): Move to ix86-tune-sched-bd.c.
1401         (is_end_basic_block): Move to ix86-tune-sched-bd.c.
1402         (process_end_window): Move to ix86-tune-sched-bd.c.
1403         (allocate_next_window): Move to ix86-tune-sched-bd.c.
1404         (find_constant): Move to ix86-tune-sched-bd.c.
1405         (get_num_immediates): Move to ix86-tune-sched-bd.c.
1406         (has_immediate): Move to ix86-tune-sched-bd.c.
1407         (get_insn_path): Move to ix86-tune-sched-bd.c.
1408         (get_insn_group): Move to ix86-tune-sched-bd.c.
1409         (count_num_restricted): Move to ix86-tune-sched-bd.c.
1410         (fits_dispatch_window): Move to ix86-tune-sched-bd.c.
1411         (add_insn_window): Move to ix86-tune-sched-bd.c.
1412         (add_to_dispatch_window): Move to ix86-tune-sched-bd.c.
1413         (debug_dispatch_window_file): Move to ix86-tune-sched-bd.c.
1414         (debug_dispatch_window): Move to ix86-tune-sched-bd.c.
1415         (debug_insn_dispatch_info_file): Move to ix86-tune-sched-bd.c.
1416         (debug_ready_dispatch): Move to ix86-tune-sched-bd.c.
1417         (do_dispatch): Move to ix86-tune-sched-bd.c.
1418         (has_dispatch): Move to ix86-tune-sched-bd.c.
1419         * config/i386/t-i386: Add new object files.
1420         * config/i386/x86-tune-costs.h: New file.
1421         * config/i386/x86-tune-sched-atom.c: New file.
1422         * config/i386/x86-tune-sched-bd.c: New file.
1423         * config/i386/x86-tune-sched-core.c: New file.
1424         * config/i386/x86-tune-sched.c: New file.
1425
1426 2017-10-11  Liu Hao  <lh_mouse@126.com>
1427
1428         * pretty-print.c [_WIN32] (colorize_init): Remove.  Use
1429         the generic version below instead.
1430         (should_colorize): Recognize Windows consoles as terminals
1431         for MinGW targets.
1432         * pretty-print.c [__MINGW32__] (write_all): New function.
1433         [__MINGW32__] (find_esc_head): Likewise.
1434         [__MINGW32__] (find_esc_terminator): Likewise.
1435         [__MINGW32__] (eat_esc_sequence): Likewise.
1436         [__MINGW32__] (mingw_ansi_fputs): New function that handles
1437         ANSI escape codes.
1438         (pp_write_text_to_stream): Use mingw_ansi_fputs instead of fputs
1439         for MinGW targets.
1440
1441 2017-10-11  Richard Biener  <rguenther@suse.de>
1442
1443         * tree-ssa-loop-niter.c (infer_loop_bounds_from_pointer_arith):
1444         Properly call analyze_scalar_evolution with the loop of the stmt.
1445
1446 2017-10-11  Richard Biener  <rguenther@suse.de>
1447
1448         * tree.def (POLYNOMIAL_CHREC): Remove CHREC_VARIABLE tree operand.
1449         * tree-core.h (tree_base): Add chrec_var union member.
1450         * tree.h (CHREC_VAR): Remove.
1451         (CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): Adjust.
1452         * tree-chrec.h (build_polynomial_chrec): Adjust.
1453         * tree-chrec.c (reset_evolution_in_loop): Use build_polynomial_chrec.
1454         * tree-pretty-print.c (dump_generic_node): Use CHREC_VARIABLE.
1455
1456 2017-10-11  Marc Glisse  <marc.glisse@inria.fr>
1457
1458         * fold-const.c (fold_binary_loc) [X +- Y CMP X]: Move ...
1459         * match.pd: ... here.
1460         ((T) X == (T) Y): Relax condition.
1461
1462 2017-10-11  Bin Cheng  <bin.cheng@arm.com>
1463
1464         PR tree-optimization/82472
1465         * tree-loop-distribution.c (sort_partitions_by_post_order): Refine
1466         comment.
1467         (break_alias_scc_partitions): Update postorder number.
1468
1469 2017-10-11  Martin Liska  <mliska@suse.cz>
1470
1471         PR sanitizer/82490
1472         * opts.c (parse_no_sanitize_attribute): Do not use error_value
1473         variable.
1474         * opts.h (parse_no_sanitize_attribute): Remove last argument.
1475
1476 2017-10-11  Martin Liska  <mliska@suse.cz>
1477
1478         * print-rtl.c (print_insn): Move declaration of idbuf
1479         to same scope as name.
1480
1481 2017-10-11  Martin Liska  <mliska@suse.cz>
1482
1483         Revert r253637:
1484
1485         PR sanitizer/82484
1486         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
1487         volatile arguments.
1488
1489 2017-10-11  Martin Liska  <mliska@suse.cz>
1490
1491         PR sanitizer/82484
1492         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
1493         volatile arguments.
1494
1495 2017-10-11  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
1496
1497         * config.gcc (default_gnu_indirect_function): Default to yes for
1498         arm*-*-linux* with glibc.
1499
1500 2017-10-11  Richard Biener  <rguenther@suse.de>
1501
1502         * tree-scalar-evolution.c (get_scalar_evolution): Handle
1503         default-defs and types we do not want to analyze.
1504         (interpret_loop_phi): Replace unreachable code with an assert.
1505         (compute_scalar_evolution_in_loop): Remove and inline ...
1506         (analyze_scalar_evolution_1): ... here, replacing condition with
1507         what makes the intent clearer.  Remove handling of cases
1508         get_scalar_evolution now handles.
1509
1510 2017-10-10  Jim Wilson  <wilson@tuliptree.org>
1511
1512         PR rtl-optimization/81434
1513         * haifa-sched.c (prune_ready_list): Init min_cost_group to 0.  Update
1514         comment for main loop.  In sched_group_found if, also add checks for
1515         pass and min_cost_group.
1516
1517 2017-10-10  Segher Boessenkool  <segher@kernel.crashing.org>
1518
1519         * config/rs6000/rs6000.c (TARGET_INSN_COST): New.
1520         (rs6000_insn_cost): New function.
1521         * config/rs6000/rs6000.md (cost): New attribute.
1522
1523 2017-10-10  Jakub Jelinek  <jakub@redhat.com>
1524             H.J. Lu  <hongjiu.lu@intel.com>
1525
1526         PR target/79565
1527         PR target/82483
1528         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Add
1529         OPTION_MASK_ISA_MMX for __builtin_ia32_maskmovq,
1530         __builtin_ia32_vec_ext_v4hi and __builtin_ia32_vec_set_v4hi.
1531         (ix86_expand_builtin): Treat OPTION_MASK_ISA_MMX similarly
1532         to OPTION_MASK_ISA_AVX512VL - builtins that have both
1533         OPTION_MASK_ISA_MMX and some other bit set require both
1534         mmx and the ISAs without the mmx bit.
1535         * config/i386/i386-builtin.def (__builtin_ia32_cvtps2pi,
1536         __builtin_ia32_cvttps2pi, __builtin_ia32_cvtpi2ps,
1537         __builtin_ia32_pavgb, __builtin_ia32_pavgw, __builtin_ia32_pmulhuw,
1538         __builtin_ia32_pmaxub, __builtin_ia32_pmaxsw, __builtin_ia32_pminub,
1539         __builtin_ia32_pminsw, __builtin_ia32_psadbw, __builtin_ia32_pmovmskb,
1540         __builtin_ia32_pshufw, __builtin_ia32_cvtpd2pi,
1541         __builtin_ia32_cvttpd2pi, __builtin_ia32_cvtpi2pd,
1542         __builtin_ia32_pmuludq, __builtin_ia32_pabsb, __builtin_ia32_pabsw,
1543         __builtin_ia32_pabsd, __builtin_ia32_phaddw, __builtin_ia32_phaddd,
1544         __builtin_ia32_phaddsw, __builtin_ia32_phsubw, __builtin_ia32_phsubd,
1545         __builtin_ia32_phsubsw, __builtin_ia32_pmaddubsw,
1546         __builtin_ia32_pmulhrsw, __builtin_ia32_pshufb, __builtin_ia32_psignb,
1547         __builtin_ia32_psignw, __builtin_ia32_psignd, __builtin_ia32_movntq,
1548         __builtin_ia32_paddq, __builtin_ia32_psubq, __builtin_ia32_palignr):
1549         Add OPTION_MASK_ISA_MMX.
1550
1551 2017-10-10  Andreas Tobler  <andreast@gcc.gnu.org>
1552
1553         * config.gcc (armv7*-*-freebsd*): New target.
1554         (armv6*-*-freebsd*): Remove obsolete TARGET_FREEBSD_ARMv6 define.
1555
1556 2017-10-10  Jan Hubicka  <hubicka@ucw.cz>
1557
1558         * x86-tune.def (X86_TUNE_AVOID_FALSE_DEP_FOR_BMI,
1559         X86_TUNE_ADJUST_UNROLL, X86_TUNE_ONE_IF_CONV_INSN): Move to right
1560         spot in the file.
1561
1562 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
1563
1564         * wide-int.h (wide_int_ref_storage): Make host_dependent_precision
1565         a template parameter.
1566         (WIDE_INT_REF_FOR): Update accordingly.
1567         * tree.h (wi::int_traits <const_tree>): Delete.
1568         (wi::tree_to_widest_ref, wi::tree_to_offset_ref): New typedefs.
1569         (wi::to_widest, wi::to_offset): Use them.  Expand commentary.
1570         (wi::tree_to_wide_ref): New typedef.
1571         (wi::to_wide): New function.
1572         * calls.c (get_size_range): Use wi::to_wide when operating on
1573         trees as wide_ints.
1574         * cgraph.c (cgraph_node::create_thunk): Likewise.
1575         * config/i386/i386.c (ix86_data_alignment): Likewise.
1576         (ix86_local_alignment): Likewise.
1577         * dbxout.c (stabstr_O): Likewise.
1578         * dwarf2out.c (add_scalar_info, gen_enumeration_type_die): Likewise.
1579         * expr.c (const_vector_from_tree): Likewise.
1580         * fold-const-call.c (host_size_t_cst_p, fold_const_call_1): Likewise.
1581         * fold-const.c (may_negate_without_overflow_p, negate_expr_p)
1582         (fold_negate_expr_1, int_const_binop_1, const_binop)
1583         (fold_convert_const_int_from_real, optimize_bit_field_compare)
1584         (all_ones_mask_p, sign_bit_p, unextend, extract_muldiv_1)
1585         (fold_div_compare, fold_single_bit_test, fold_plusminus_mult_expr)
1586         (pointer_may_wrap_p, expr_not_equal_to, fold_binary_loc)
1587         (fold_ternary_loc, multiple_of_p, fold_negate_const, fold_abs_const)
1588         (fold_not_const, round_up_loc): Likewise.
1589         * gimple-fold.c (gimple_fold_indirect_ref): Likewise.
1590         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Likewise.
1591         (alloca_call_type): Likewise.
1592         * gimple.c (preprocess_case_label_vec_for_gimple): Likewise.
1593         * godump.c (go_output_typedef): Likewise.
1594         * graphite-sese-to-poly.c (tree_int_to_gmp): Likewise.
1595         * internal-fn.c (get_min_precision): Likewise.
1596         * ipa-cp.c (ipcp_store_vr_results): Likewise.
1597         * ipa-polymorphic-call.c
1598         (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Likewise.
1599         * ipa-prop.c (ipa_print_node_jump_functions_for_edge): Likewise.
1600         (ipa_modify_call_arguments): Likewise.
1601         * match.pd: Likewise.
1602         * omp-low.c (scan_omp_1_op, lower_omp_ordered_clauses): Likewise.
1603         * print-tree.c (print_node_brief, print_node): Likewise.
1604         * stmt.c (expand_case): Likewise.
1605         * stor-layout.c (layout_type): Likewise.
1606         * tree-affine.c (tree_to_aff_combination): Likewise.
1607         * tree-cfg.c (group_case_labels_stmt): Likewise.
1608         * tree-data-ref.c (dr_analyze_indices): Likewise.
1609         (prune_runtime_alias_test_list): Likewise.
1610         * tree-dump.c (dequeue_and_dump): Likewise.
1611         * tree-inline.c (remap_gimple_op_r, copy_tree_body_r): Likewise.
1612         * tree-predcom.c (is_inv_store_elimination_chain): Likewise.
1613         * tree-pretty-print.c (dump_generic_node): Likewise.
1614         * tree-scalar-evolution.c (iv_can_overflow_p): Likewise.
1615         (simple_iv_with_niters): Likewise.
1616         * tree-ssa-address.c (addr_for_mem_ref): Likewise.
1617         * tree-ssa-ccp.c (ccp_finalize, evaluate_stmt): Likewise.
1618         * tree-ssa-loop-ivopts.c (constant_multiple_of): Likewise.
1619         * tree-ssa-loop-niter.c (split_to_var_and_offset)
1620         (refine_value_range_using_guard, number_of_iterations_ne_max)
1621         (number_of_iterations_lt_to_ne, number_of_iterations_lt)
1622         (get_cst_init_from_scev, record_nonwrapping_iv)
1623         (scev_var_range_cant_overflow): Likewise.
1624         * tree-ssa-phiopt.c (minmax_replacement): Likewise.
1625         * tree-ssa-pre.c (compute_avail): Likewise.
1626         * tree-ssa-sccvn.c (vn_reference_fold_indirect): Likewise.
1627         (vn_reference_maybe_forwprop_address, valueized_wider_op): Likewise.
1628         * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Likewise.
1629         * tree-ssa-uninit.c (is_pred_expr_subset_of): Likewise.
1630         * tree-ssanames.c (set_nonzero_bits, get_nonzero_bits): Likewise.
1631         * tree-switch-conversion.c (collect_switch_conv_info, array_value_type)
1632         (dump_case_nodes, try_switch_expansion): Likewise.
1633         * tree-vect-loop-manip.c (vect_gen_vector_loop_niters): Likewise.
1634         (vect_do_peeling): Likewise.
1635         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
1636         * tree-vect-stmts.c (vectorizable_load): Likewise.
1637         * tree-vrp.c (compare_values_warnv, vrp_int_const_binop): Likewise.
1638         (zero_nonzero_bits_from_vr, ranges_from_anti_range): Likewise.
1639         (extract_range_from_binary_expr_1, adjust_range_with_scev): Likewise.
1640         (overflow_comparison_p_1, register_edge_assert_for_2): Likewise.
1641         (is_masked_range_test, find_switch_asserts, maybe_set_nonzero_bits)
1642         (vrp_evaluate_conditional_warnv_with_ops, intersect_ranges): Likewise.
1643         (range_fits_type_p, two_valued_val_range_p, vrp_finalize): Likewise.
1644         (evrp_dom_walker::before_dom_children): Likewise.
1645         * tree.c (cache_integer_cst, real_value_from_int_cst, integer_zerop)
1646         (integer_all_onesp, integer_pow2p, integer_nonzerop, tree_log2)
1647         (tree_floor_log2, tree_ctz, mem_ref_offset, tree_int_cst_sign_bit)
1648         (tree_int_cst_sgn, get_unwidened, int_fits_type_p): Likewise.
1649         (get_type_static_bounds, num_ending_zeros, drop_tree_overflow)
1650         (get_range_pos_neg): Likewise.
1651         * ubsan.c (ubsan_expand_ptr_ifn): Likewise.
1652         * config/darwin.c (darwin_mergeable_constant_section): Likewise.
1653         * config/aarch64/aarch64.c (aapcs_vfp_sub_candidate): Likewise.
1654         * config/arm/arm.c (aapcs_vfp_sub_candidate): Likewise.
1655         * config/avr/avr.c (avr_fold_builtin): Likewise.
1656         * config/bfin/bfin.c (bfin_local_alignment): Likewise.
1657         * config/msp430/msp430.c (msp430_attr): Likewise.
1658         * config/nds32/nds32.c (nds32_insert_attributes): Likewise.
1659         * config/powerpcspe/powerpcspe-c.c
1660         (altivec_resolve_overloaded_builtin): Likewise.
1661         * config/powerpcspe/powerpcspe.c (rs6000_aggregate_candidate)
1662         (rs6000_expand_ternop_builtin): Likewise.
1663         * config/rs6000/rs6000-c.c
1664         (altivec_resolve_overloaded_builtin): Likewise.
1665         * config/rs6000/rs6000.c (rs6000_aggregate_candidate): Likewise.
1666         (rs6000_expand_ternop_builtin): Likewise.
1667         * config/s390/s390.c (s390_handle_hotpatch_attribute): Likewise.
1668
1669 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
1670
1671         * tree-vect-loop-manip.c (rename_variables_in_bb): Rename PHI nodes
1672         when copying loop nest with only one inner loop.
1673
1674 2017-10-10  Richard Biener  <rguenther@suse.de>
1675
1676         * tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Avoid compacting
1677         blocks if SCEV is active.
1678         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Remove
1679         dead code.
1680         (analyze_scalar_evolution): Handle cached evolutions the obvious way.
1681         (scev_initialize): Assert we are not yet initialized.
1682
1683 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
1684
1685         * tree-loop-distribution.c (generate_loops_for_partition): Remove
1686         inner loop's exit stmt by making it always exit the loop, otherwise
1687         we would generate an infinite empty loop.
1688
1689 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
1690
1691         * tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg): Skip
1692         renaming variables in new preheader if it's deleted.
1693
1694 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
1695
1696         * tree-loop-distribution.c (struct partition): Remove unused field
1697         loops of the structure.
1698         (partition_alloc, partition_free): Ditto.
1699         (build_rdg_partition_for_vertex): Ditto.
1700
1701 2017-10-09  Jeff Law  <law@redhat.com>
1702
1703         * targhooks.c (default_stack_clash_protection_final_dynamic_probe): Fix
1704         return type to match prototype and documentation.
1705
1706 2010-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
1707
1708         * config/rs6000/rs6000.c (processor_costs): Move to ...
1709         * config/rs6000/rs6000.h: ... here.
1710         (rs6000_cost): Declare.
1711
1712 2017-10-09  Eric Botcazou  <ebotcazou@adacore.com>
1713
1714         * except.c (setjmp_fn): New global variable.
1715         (init_eh): Initialize it if DONT_USE_BUILTIN_SETJMP is defined.
1716         (sjlj_emit_function_enter): Call it instead of BUILTIN_SETJMP
1717         if DONT_USE_BUILTIN_SETJMP is defined.
1718
1719 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
1720
1721         * target.def (insn_cost): New hook.
1722         * doc/tm.texi.in (TARGET_INSN_COST): New hook.
1723         * doc/tm.texi: Regenerate.
1724         * rtlanal.c (insn_cost): Use the new hook.
1725
1726 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
1727
1728         * combine.c (combine_validate_cost): Compute the new insn_cost,
1729         not just pattern_cost.
1730         (try_combine): Adjust comment.
1731
1732 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
1733
1734         * cfgrtl.c (rtl_account_profile_record): Replace insn_rtx_cost with
1735         insn_cost.
1736         * combine.c (uid_insn_cost): Adjust comment.
1737         (combine_validate_cost): Adjust comment.  Use pattern_cost instead
1738         of insn_rtx_cost
1739         (combine_instructions): Use insn_cost instead of insn_rtx_cost.
1740         * dse.c (find_shift_sequence): Ditto.
1741         * ifcvt.c (cheap_bb_rtx_cost_p): Ditto.
1742         (bb_valid_for_noce_process_p): Use pattern_cost.
1743         * rtl.h (insn_rtx_cost): Delete.
1744         (pattern_cost): New prototype.
1745         (insn_cost): New prototype.
1746         * rtlanal.c (insn_rtx_cost): Rename to...
1747         (pattern_cost): ... this.
1748         (insn_cost): New.
1749
1750 2017-10-09  Uros Bizjak  <ubizjak@gmail.com>
1751
1752         * config/i386/i386.md (*jcc_2): Remove insn pattern.
1753         (*jcc<mode>_0_r_i387): Ditto.
1754         (*jccxf_r_i387): Ditto.
1755         (*jcc<mode>_r_i387): Ditto.
1756         (*jccu<mode>_r_i387): Ditto.
1757         (*jcc<X87MODEF:mode>_<SWI24:mode>_r_i387): Ditto.
1758         (*jcc): Rename from *jcc_1.
1759
1760 2017-10-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
1761
1762         * config/rs6000/rs6000-p8swap.c (rs6000_analyze_swaps): Process
1763         deferred rescans after the lvx/stvx recombination pre-pass.
1764
1765 2017-10-09  Michael Meissner  <meissner@linux.vnet.ibm.com>
1766
1767         * config/rs6000/amo.h: New include file to provide ISA 3.0 atomic
1768         memory operation instruction support.
1769         * config.gcc (powerpc*-*-*): Include amo.h as an extra header.
1770         (rs6000-ibm-aix[789]*): Likewise.
1771         * doc/extend.texi (PowerPC Atomic Memory Operation Functions):
1772         Document new functions.
1773
1774 2017-10-09  Richard Biener  <rguenther@suse.de>
1775
1776         PR tree-optimization/82397
1777         * tree-data-ref.c (data_ref_compare_tree): Make sure to return
1778         equality only for semantically equal trees.
1779
1780 2017-10-09  Richard Biener  <rguenther@suse.de>
1781
1782         PR tree-optimization/82449
1783         * sese.c (scev_analyzable_p): Check whether the SCEV is linear.
1784         * tree-chrec.h (evolution_function_is_constant_p): Adjust to
1785         allow constant addresses.
1786         * tree-chrec.c (scev_is_linear_expression): Constant evolutions
1787         are linear.
1788
1789 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1790
1791         * config/s390/s390-builtins.def (vec_nabs, vec_vfi): Fix builtin
1792         flags.
1793
1794 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1795
1796         PR target/82463
1797         * config/s390/vecintrin.h (vec_madd, vec_msub): Fix macro
1798         definitions.
1799
1800 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1801
1802         PR target/82465
1803         * config/s390/s390-builtins.def (vec_sqrt): Fix builtin flags.
1804
1805 2017-10-09  Jakub Jelinek  <jakub@redhat.com>
1806
1807         PR target/82464
1808         * config/s390/s390-builtins.def (s390_vec_xor_flt_a,
1809         s390_vec_xor_flt_b, s390_vec_xor_flt_c): New.
1810
1811 2017-10-09  Richard Sandiford  <richard.sandiford@linaro.org>
1812
1813         * wide-int.h (WI_BINARY_OPERATOR_RESULT): New macro.
1814         (WI_BINARY_PREDICATE_RESULT): Likewise.
1815         (wi::binary_traits::operator_result): New type.
1816         (wi::binary_traits::predicate_result): Likewise.
1817         (generic_wide_int::operator~, unary generic_wide_int::operator-)
1818         (generic_wide_int::operator==, generic_wide_int::operator!=)
1819         (generic_wide_int::operator&, generic_wide_int::and_not)
1820         (generic_wide_int::operator|, generic_wide_int::or_not)
1821         (generic_wide_int::operator^, generic_wide_int::operator+
1822         (binary generic_wide_int::operator-, generic_wide_int::operator*):
1823         Delete.
1824         (operator~, unary operator-, operator==, operator!=, operator&)
1825         (operator|, operator^, operator+, binary operator-, operator*): New
1826         functions.
1827         * expr.c (get_inner_reference): Use wi::bit_and_not.
1828         * fold-const.c (fold_binary_loc): Likewise.
1829         * ipa-prop.c (ipa_compute_jump_functions_for_edge): Likewise.
1830         * tree-ssa-ccp.c (get_value_from_alignment): Likewise.
1831         (bit_value_binop): Likewise.
1832         * tree-ssa-math-opts.c (find_bswap_or_nop_load): Likewise.
1833         * tree-vrp.c (zero_nonzero_bits_from_vr): Likewise.
1834         (extract_range_from_binary_expr_1): Likewise.
1835         (masked_increment): Likewise.
1836         (simplify_bit_ops_using_ranges): Likewise.
1837
1838 2017-10-09  Martin Jambor  <mjambor@suse.cz>
1839
1840         PR hsa/82416
1841         * hsa-common.h (hsa_op_with_type): New method extend_int_to_32bit.
1842         * hsa-gen.c (hsa_extend_inttype_to_32bit): New function.
1843         (hsa_type_for_scalar_tree_type): Use it.  Always force min32int for
1844         COMPLEX types.
1845         (hsa_fixup_mov_insn_type): New function.
1846         (hsa_op_with_type::get_in_type): Use it.
1847         (hsa_build_append_simple_mov): Likewise.  Allow sub-32bit
1848         immediates in an assert.
1849         (hsa_op_with_type::extend_int_to_32bit): New method.
1850         (gen_hsa_insns_for_bitfield): Fixup instruction and intermediary
1851         types.  Convert to dest type if necessary.
1852         (gen_hsa_insns_for_bitfield_load): Fixup load type if necessary.
1853         (reg_for_gimple_ssa): Pass false as min32int to
1854         hsa_type_for_scalar_tree_type.
1855         (gen_hsa_addr): Fixup type when creating addresable temporary.
1856         (gen_hsa_cmp_insn_from_gimple): Extend operands if necessary.
1857         (gen_hsa_unary_operation): Extend operands and convert to dest type if
1858         necessary.  Call hsa_fixup_mov_insn_type.
1859         (gen_hsa_binary_operation): Changed operand types to hsa_op_with_type,
1860         extend operands and convert to dest type if necessary.
1861         (gen_hsa_insns_for_operation_assignment): Extend operands and convert
1862         to dest type if necessary.
1863         (set_output_in_type): Call hsa_fixup_mov_insn_type.  Just ude dest
1864         if conversion nt necessary and size matches.
1865         (gen_hsa_insns_for_load): Call hsa_fixup_mov_insn_type, convert
1866         to dest type if necessary.
1867         (gen_hsa_insns_for_store): Call hsa_fixup_mov_insn_type.
1868         (gen_hsa_insns_for_switch_stmt): Likewise. Also extend operands if
1869         necessary.
1870         (gen_hsa_clrsb): Likewise.
1871         (gen_hsa_ffs): Likewise.
1872         (gen_hsa_divmod): Extend operands and convert to dest type if
1873         necessary.
1874         (gen_hsa_atomic_for_builtin): Change type of op to hsa_op_with_type.
1875
1876 2017-10-08  Segher Boessenkool  <segher@kernel.crashing.org>
1877
1878         * config/rs6000/rs6000.md (conditional branch): Clean up formatting.
1879         Remove empty default arguments.  Use a brace block as output
1880         statement.
1881         (conditional return): Ditto.
1882         (jump): Ditto.
1883         (indirect_jump): Ditto.  Use b%T0 instead of bctr/blr.
1884         (tablejump, tablejumpsi, tablejumpdi, *tablejump<mode>_internal1):
1885         Ditto.
1886         (group_ending_nop): Ditto.
1887         (doloop_end): Ditto.
1888         (ctr<mode>, ctr<mode>_internal1, ctr<mode>_internal2): Ditto.
1889         (splitters for those): Ditto.
1890
1891 2017-10-08  Segher Boessenkool  <segher@kernel.crashing.org>
1892
1893         * config/rs6000/rs6000-string.c (expand_strncmp_align_check): Invert
1894         a conditional jump (and the compare for it) so that pc_rtx is the
1895         last operand.
1896         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Adjust
1897         for the deleted and renamed ctr<mode>_internal[234] patterns.
1898         * config/rs6000/rs6000.md: Delete second conditional branch pattern.
1899         Delete second conditional return pattern.
1900         (ctr<mode>_internal2): Delete this second bdnz pattern.
1901         (ctr<mode>_internal3): Rename to ctr<mode>_internal2.
1902         (ctr<mode>_internal4): Delete this second bdz pattern.
1903
1904 2017-10-08  Eric Botcazou  <ebotcazou@adacore.com>
1905
1906         * tree-outof-ssa.h (ssaexpand): Add partitions_for_undefined_values.
1907         (always_initialized_rtx_for_ssa_name_p): New predicate.
1908         * tree-outof-ssa.c (remove_ssa_form): Initialize new field of SA.
1909         (finish_out_of_ssa): Free new field of SA.
1910         * tree-ssa-coalesce.h (get_undefined_value_partitions): Declare.
1911         * tree-ssa-coalesce.c: Include tree-ssa.h.
1912         (get_parm_default_def_partitions): Remove extern keyword.
1913         (get_undefined_value_partitions): New function.
1914         * expr.c (expand_expr_real_1) <expand_decl_rtl>: For a SSA_NAME, do
1915         not set SUBREG_PROMOTED_VAR_P on the sub-register if it may contain
1916         uninitialized bits.
1917         * loop-iv.c (iv_get_reaching_def): Disqualify all subregs.
1918
1919 2017-10-08  Eric Botcazou  <ebotcazou@adacore.com>
1920
1921         * builtins.def (BUILT_IN_SETJMP): Revert latest change.
1922
1923 2017-10-08  Jan Hubicka  <hubicka@ucw.cz>
1924
1925         * config/i386/i386.c (ix86_expand_set_or_movmem): Disable 512bit loops
1926         for targets that preffer 128bit.
1927
1928 2017-10-08  Jan Hubicka  <hubicka@ucw.cz>
1929
1930         * config/i386/i386.c (has_dispatch): Disable for Ryzen.
1931
1932 2017-10-08  Olivier Hainque  <hainque@adacore.com>
1933
1934         * config/arm/arm.c (arm_set_return_address): Use MEM_VOLATILE_P
1935         on the target mem instead of RTX_FRAME_RELATED_P on the insn to
1936         prevent DSE.
1937         (thumb_set_return_address): Likewise.
1938
1939 2017-10-08  Olivier Hainque  <hainque@adacore.com>
1940
1941         * common/config/arm/arm-common.c (arm_except_unwind_info):
1942         Handle DWARF2_UNWIND_INFO.
1943
1944 2017-10-07  Michael Collison <michael.collison@arm.com>
1945
1946         * config/aarch64/aarch64.md (*aarch64_reg_<optab>_minus<mode>3):
1947         New pattern.
1948
1949 2017-10-07  Eric Botcazou  <ebotcazou@adacore.com>
1950
1951         * builtins.def (BUILT_IN_SETJMP): Declare as library builtin instead
1952         of GCC builtin if DONT_USE_BUILTIN_SETJMP is defined.
1953         * except.c (sjlj_emit_function_enter): If DONT_USE_BUILTIN_SETJMP is
1954         defined, force the creation of a new block for a dispatch label.
1955
1956 2017-10-07  Jan Hubicka  <hubicka@ucw.cz>
1957
1958         * invoke.texi (Wsuggest-attribute=cold): Document.
1959         * common.opt (Wsuggest-attribute=cold): New
1960         * ipa-pure-const.c (warn_function_cold): New function.
1961         * predict.c (compute_function_frequency): Use it.
1962         * predict.h (warn_function_cold): Declare.
1963
1964 2017-10-06  Jan Hubicka  <hubicka@ucw.cz>
1965
1966         * tree-switch-conversion.c (do_jump_if_equal, emit_cmp_and_jump_insns):
1967         Update profile.
1968
1969 2017-10-06  Martin Liska  <mliska@suse.cz>
1970
1971         * sanopt.c (struct sanopt_tree_triplet_hash): Remove inline
1972         keyword for member functions.
1973         (struct sanopt_tree_couple): New struct.
1974         (struct sanopt_tree_couple_hash): New function.
1975         (struct sanopt_ctx): Add new hash_map.
1976         (has_dominating_ubsan_ptr_check): New function.
1977         (record_ubsan_ptr_check_stmt): Likewise.
1978         (maybe_optimize_ubsan_ptr_ifn): Likewise.
1979         (sanopt_optimize_walker): Handle IFN_UBSAN_PTR.
1980         (pass_sanopt::execute): Handle also SANITIZE_POINTER_OVERFLOW.
1981
1982 2017-10-06  Sudakshina Das  <sudi.das@arm.com>
1983
1984         PR target/82440
1985         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Only call
1986         aarch64_simd_valid_immediate on CONST_VECTORs.
1987         (aarch64_reg_or_bic_imm): Likewise.
1988
1989 2017-10-06  Wilco Dijkstra  <wdijkstr@arm.com>
1990
1991         PR rtl-optimization/82396
1992         * haifa-sched.c (ready_sort_real): Disable qsort checking.
1993
1994 2017-10-06  Sebastian Pop  <sebpop@gmail.com>
1995
1996         * graphite-dependences.c (scop_get_reads): Move code to...
1997         (scop_get_must_writes): Move code to...
1998         (scop_get_may_writes): Move code to...
1999         (scop_get_reads_and_writes): ... here.
2000         (scop_get_dependences): Call scop_get_reads_and_writes.
2001
2002 2017-10-06  Jakub Jelinek  <jakub@redhat.com>
2003
2004         PR tree-optimization/82434
2005         * fold-const.h (can_native_encode_type_p,
2006         can_native_encode_string_p): Remove.
2007         * fold-const.c (native_encode_int): Formatting fixes.  If ptr is NULL,
2008         don't encode anything, just return what would be otherwise returned.
2009         (native_encode_fixed, native_encode_complex, native_encode_vector):
2010         Likewise.
2011         (native_encode_string): Likewise.  Inline by hand
2012         can_native_encode_string_p.
2013         (can_native_encode_type_p): Remove.
2014         (can_native_encode_string_p): Remove.
2015         * tree-vect-stmts.c (vectorizable_store): Instead of testing just
2016         STRING_CSTs using can_native_encode_string_p, test all
2017         CONSTANT_CLASS_P values using native_encode_expr with NULL ptr.
2018         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Remove last
2019         argument from native_encode_expr.
2020         (rhs_valid_for_store_merging_p): Use native_encode_expr with NULL ptr.
2021         (pass_store_merging::execute): Don't unnecessarily look for 3 stmts,
2022         but just 2.
2023
2024 2017-10-06  Richard Biener  <rguenther@suse.de>
2025
2026         PR tree-optimization/82397
2027         * tree-vect-data-refs.c (dr_group_sort_cmp): Do not use
2028         operand_equal_p but rely on data_ref_compare_tree for detecting
2029         equalities.
2030         (vect_analyze_data_ref_accesses): Use data_ref_compare_tree
2031         to match up with dr_group_sort_cmp.
2032
2033 2017-10-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2034
2035         PR target/82322
2036         * config/s390/s390-builtins.def (s390_vfi): Define new overloaded
2037         builtin.
2038         * config/s390/s390-builtin-types.def: Regenerate.
2039
2040 2017-10-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2041
2042         PR target/82317
2043         * config/s390/s390-builtin-types.def: Regenerate.
2044         * config/s390/s390-builtins.def (s390_vfmaxdb_4, s390_vfmindb_4):
2045         Change flag from B_VXE to B_VX.
2046         (s390_vec_min_dbl): Remove B_VXE flag.
2047
2048 2017-10-06  Richard Biener  <rguenther@suse.de>
2049
2050         * graphite-isl-ast-to-gimple.c: Include ssa.h and tree-ssa.h.
2051         (translate_isl_ast_to_gimple::translate_pending_phi_nodes,
2052         translate_isl_ast_to_gimple::is_valid_rename,
2053         translate_isl_ast_to_gimple::get_rename,
2054         translate_isl_ast_to_gimple::get_def_bb_for_const,
2055         translate_isl_ast_to_gimple::get_new_name,
2056         translate_isl_ast_to_gimple::collect_all_ssa_names,
2057         translate_isl_ast_to_gimple::copy_loop_phi_args,
2058         translate_isl_ast_to_gimple::collect_all_ssa_names,
2059         translate_isl_ast_to_gimple::copy_loop_phi_args,
2060         translate_isl_ast_to_gimple::copy_loop_phi_nodes,
2061         translate_isl_ast_to_gimple::add_close_phis_to_merge_points,
2062         translate_isl_ast_to_gimple::add_close_phis_to_outer_loops,
2063         translate_isl_ast_to_gimple::copy_loop_close_phi_args,
2064         translate_isl_ast_to_gimple::copy_loop_close_phi_nodes,
2065         translate_isl_ast_to_gimple::copy_cond_phi_args,
2066         translate_isl_ast_to_gimple::copy_cond_phi_nodes,
2067         translate_isl_ast_to_gimple::edge_for_new_close_phis,
2068         translate_isl_ast_to_gimple::add_phi_arg_for_new_expr,
2069         translate_isl_ast_to_gimple::rename_uses,
2070         translate_isl_ast_to_gimple::rename_all_uses): Remove.
2071         (translate_isl_ast_to_gimple::get_rename_from_scev): Simplify.
2072         (set_rename_for_each_def): Likewise.
2073         (graphite_copy_stmts_from_block): Handle debug stmt resetting
2074         here.  Handle rewriting SCEV analyzable uses here.
2075         (copy_bb_and_scalar_dependences): Generate code for PHI
2076         copy-in/outs.
2077         (graphite_regenerate_ast_isl): Adjust.
2078         * graphite-scop-detection.c (trivially_empty_bb_p): Move to sese.[ch].
2079         (add_write, add_read): New functions.
2080         (build_cross_bb_scalars_def): Use it and simplify.
2081         (build_cross_bb_scalars_use): Likewise.
2082         (graphite_find_cross_bb_scalar_vars): Inline into...
2083         (try_generate_gimple_bb): ...here.  Add dependences for PHIs,
2084         simulating out-of-SSA.  Compute liveout and add dependencies.
2085         (build_scops): Force an empty entry block.
2086         * sese.h (sese_info_t::liveout, sese_info_t::debug_liveout): New
2087         members.
2088         (sese_build_liveouts): Declare.
2089         (sese_trivially_empty_bb_p): Likewise.
2090         * sese.c (sese_build_liveouts_bb): Properly handle PHIs,
2091         compute liveout and debug_liveout.
2092         (sese_bad_liveouts_use): Remove.
2093         (sese_reset_debug_liveouts_bb): Likewise.
2094         (sese_reset_debug_liveouts): Rewrite in terms of debug_liveout.
2095         (sese_build_liveouts): Build liveout and debug_liveout and store
2096         it in region.
2097         (new_sese_info): Adjust.
2098         (free_sese_info): Likewise.
2099         (sese_insert_phis_for_liveouts): Reset debug stmts from here,
2100         do not build liveout here.
2101         (move_sese_in_condition): Adjust region entry.
2102         (scev_analyzable_p): Match up with chrec_apply requirements.
2103         (sese_trivially_empty_bb_p): New.
2104         * tree-into-ssa.c (get_reaching_def): Properly support generating
2105         default-defs for incremental rewrite of anonymous names.
2106
2107 2017-10-06  Richard Biener  <rguenther@suse.de>
2108
2109         * graphite-sese-to-poly.c (extract_affine): For casts increasing
2110         precision do not perform modulo reduction.
2111
2112 2017-10-06  Richard Biener  <rguenther@suse.de>
2113
2114         PR tree-optimization/82436
2115         * tree-vect-slp.c (vect_supported_load_permutation_p): More
2116         conservatively choose the vectorization factor when checking
2117         whether we can perform the required load permutation.
2118         (vect_transform_slp_perm_load): Assert when we may not fail.
2119
2120 2017-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
2121
2122         * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Correct error
2123         message for incompatible -msdata=* and -mcall-* options.
2124
2125 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
2126
2127         * config/i386/i386.c (ia32_multipass_dfa_lookahead): Default to issue
2128         rate for post-reload scheduling.
2129
2130 2017-10-05  Tamar Christina  <tamar.christina@arm.com>
2131
2132         * doc/sourcebuild.texi (vect_sizes_16B_8B, vect_sizes_32B_16B): New.
2133
2134 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
2135
2136         * config/i386/i386.c (znver1_cost): Set branch_cost to 3 (instead of 2)
2137         to improve monte carlo in scimark.
2138
2139 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
2140
2141         * config/i386/i386.c (ix86_size_cost, i386_cost, i486_cost,
2142         pentium_cost, lakemont_cost, pentiumpro_cost, geode_cost, k6_cost,
2143         athlon_cost, k8_cost, amdfam10_cost, btver1_cost, btver2_cost,
2144         pentium4_cost, nocona_cost): Set reassociation width to 1.
2145         (bdver1_cost, bdver2_cost, bdver3_cost, bdver4_cost): Set reassociation
2146         width to 2 for fp operations and 1 otherwise.
2147         (znver1_cost): Set scalar reassoc width to 4 and vector to 3 and 6
2148         for int and fp.
2149         (atom_cost): Set reassociation width to 2.
2150         (slm_cost, generic_cost): Set fp reassociation width
2151         to 2 and 1 otherwise.
2152         (intel_cost): Set fp reassociation width to 4 and 1 otherwise.
2153         (core_cost): Set fp reassociation width to 4 and vector to 2.
2154         (ix86_reassociation_width): Rewrite using cost table; special case
2155         plus/minus on Zen; honor X86_TUNE_SSE_SPLIT_REGS
2156         and TARGET_AVX128_OPTIMAL.
2157         * config/i386/i386.h (processor_costs): Add
2158         reassoc_int, reassoc_fp, reassoc_vec_int, reassoc_vec_fp.
2159         (TARGET_VECTOR_PARALLEL_EXECUTION, TARGET_REASSOC_INT_TO_PARALLEL,
2160         TARGET_REASSOC_FP_TO_PARALLEL): Remove.
2161         * x86-tune.def (X86_TUNE_REASSOC_INT_TO_PARALLEL): Remove.
2162         (X86_TUNE_REASSOC_FP_TO_PARALLEL): Remove.
2163         (X86_TUNE_VECTOR_PARALLEL_EXECUTION):  Remove.
2164
2165 2017-10-05  Nathan Sidwell  <nathan@acm.org>
2166
2167         * doc/invoke.texi (Wparentheses): Document C++ MVP behaviour.
2168
2169 2017-10-05  Tamar Christina  <tamar.christina@arm.com>
2170
2171         * config/arm/arm.c (arm_test_fpu_data): New.
2172         (arm_run_selftests): Call arm_test_fpu_data.
2173
2174 2017-10-04  Nathan Sidwell  <nathan@acm.org>
2175
2176         * toplev.c (toplev::main): Remove excess parens on pretty_printer
2177         decl.
2178         * caller-save.c (insert_save): Remove excess parens on TO_SAVE parm.
2179
2180 2017-10-04  Sudakshina Das  <sudi.das@arm.com>
2181
2182         * config/aarch64/aarch64-protos.h (enum simd_immediate_check): New
2183         check type for aarch64_simd_valid_immediate.
2184         (aarch64_output_simd_mov_immediate): Update prototype.
2185         (aarch64_simd_valid_immediate): Update prototype.
2186         * config/aarch64/aarch64-simd.md (orr<mode>3): modified pattern to add
2187         support for ORR-immediate.
2188         (and<mode>3): modified pattern to add support for BIC-immediate.
2189         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Function
2190         now checks for valid immediate for BIC and ORR based on new enum
2191         argument.
2192         (aarch64_output_simd_mov_immediate): Function now used to output
2193         BIC/ORR imm as well based on new enum argument.
2194         * config/aarch64/constraints.md (Do): New vector immediate constraint.
2195         (Db) : Likewise.
2196         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): New predicate.
2197         (aarch64_reg_or_bic_imm): Likewise.
2198
2199 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2200
2201         * config/s390/vx-builtins.md ("vec_mergeh<mode>")
2202         ("vec_mergel<mode>"): Change mode iterator to V_128_NOSINGLE.
2203
2204 2017-10-04  Wilco Dijkstra  <wdijkstr@arm.com>
2205
2206         Revert r253399:
2207
2208         PR rtl-optimization/82396
2209         * haifa-sched.c (autopref_multipass_init): Simplify
2210         initialization.
2211         (autopref_rank_data): Simplify sort order.
2212         * sched-int.h (autopref_multipass_data_): Remove
2213         multi_mem_insn_p, min_offset and max_offset.
2214
2215 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2216
2217         * doc/sourcebuild.texi: Document vect_peeling_profitable.
2218
2219 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2220
2221         * doc/sourcebuild.texi: Document vect_intdouble_cvt and
2222         vect_doubleint_cvt.
2223
2224 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2225
2226         * doc/sourcebuild.texi: Document vect_long_mult.
2227
2228 2017-10-04  Richard Sandiford  <richard.sandiford@linaro.org>
2229
2230         PR tree-optimization/82413
2231         * fold-const.c (build_range_check): Use widest_int when comparing
2232         the maximum ETYPE value with HIGH.
2233
2234 2017-10-04  Wilco Dijkstra  <wdijkstr@arm.com>
2235
2236         PR rtl-optimization/82396
2237         * haifa-sched.c (autopref_multipass_init): Simplify
2238         initialization.
2239         (autopref_rank_data): Simplify sort order.
2240         * sched-int.h (autopref_multipass_data_): Remove
2241         multi_mem_insn_p, min_offset and max_offset.
2242
2243 2017-10-04  Jakub Jelinek  <jakub@redhat.com>
2244
2245         PR tree-optimization/82381
2246         * tree-ssa-reassoc.c (sort_by_operand_rank): Check for different
2247         oeN->rank first.  Return 1 or -1 if one op is SSA_NAME and the other
2248         is not.
2249
2250         PR tree-optimization/82374
2251         * omp-low.c (create_omp_child_function): Copy DECL_ATTRIBUTES,
2252         DECL_FUNCTION_SPECIFIC_OPTIMIZATION,
2253         DECL_FUNCTION_SPECIFIC_TARGET and DECL_FUNCTION_VERSIONED from
2254         current_function_decl to the new decl.
2255
2256 2017-10-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
2257
2258         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_2_HW): Define new
2259         helper macro for IEEE float128 hardware built-in functions.
2260         (SQRTF128_ODD): Add built-in functions with the round-to-odd
2261         semantics.
2262         (TRUNCF128_ODD): Likewise.
2263         (ADDF128_ODD): Likewise.
2264         (SUBF128_ODD): Likewise.
2265         (MULF128_ODD): Likewise.
2266         (DIVF128_ODD): Likewise.
2267         (FMAF128_ODD): Likewise.
2268         * config/rs6000/rs6000.md (UNSPEC_ROUND_TO_ODD): Rename to
2269         UNSPEC_TRUNC_ROUND_TO_ODD.
2270         (UNSPEC_TRUNC_ROUND_TO_ODD): Likewise.
2271         (UNSPEC_ADD_ROUND_TO_ODD): New unspec codes for the IEEE 128-bit
2272         floating point round to odd instructions.
2273         (UNSPEC_SUB_ROUND_TO_ODD): Likewise.
2274         (UNSPEC_MUL_ROUND_TO_ODD): Likewise.
2275         (UNSPEC_DIV_ROUND_TO_ODD): Likewise.
2276         (UNSPEC_FMA_ROUND_TO_ODD): Likewise.
2277         (UNSPEC_SQRT_ROUND_TO_ODD): Likewise.
2278         (trunc<mode>sf2_hw): Change the truncate with round to odd
2279         expansion to use UNSPEC_TRUNC_ROUND_TO_ODD.
2280         (add<mode>3_odd): Add insns for IEEE 128-bit floating point round
2281         to odd hardware instructions.
2282         (sub<mode>3_odd): Likewise.
2283         (mul<mode>3_odd): Likewise.
2284         (div<mode>3_odd): Likewise.
2285         (sqrt<mode>2_odd): Likewise.
2286         (fma<mode>4_odd): Likewise.
2287         (fms<mode>4_odd): Likewise.
2288         (nfma<mode>4_odd): Likewise.
2289         (nfms<mode>4_odd): Likewise.
2290         (trunc<mode>df2_odd): Change the truncate with round to odd
2291         expansion to use UNSPEC_TRUNC_ROUND_TO_ODD.  Add a generator
2292         function.
2293         * doc/extend.texi (PowerPC built-in functions): Update documentation
2294         for existing IEEE float128-bit built-in functions.  Add built-in
2295         functions that generate the IEEE 128-bit floating point round to
2296         odd instructions.
2297
2298 2017-10-03  Segher Boessenkool  <segher@kernel.crashing.org>
2299
2300         PR rtl-optimization/77729
2301         * simplify-rtx.c (simplify_binary_operation_1): Delete the (X&C1)|C2
2302         to (X&(C1&~C2))|C2 transformations.
2303
2304 2017-10-03  Martin Jambor  <mjambor@suse.cz>
2305
2306         PR tree-optimization/82363
2307         * tree-sra.c (propagate_subaccesses_across_link): In unrecoverable
2308         mismatch, mark lacc written regardless of racc.
2309
2310 2017-10-03  Jakub Jelinek  <jakub@redhat.com>
2311
2312         PR tree-optimization/82381
2313         * tree-ssa-reassoc.c (sort_by_operand_rank): Don't check
2314         stmt_to_insert nor wheather SSA_NAMEs are default defs.
2315         Return 1 or -1 if one of bba and bbb is NULL. If bb_rank is equal,
2316         fallthrough into reassoc_stmt_dominates_stmt_p.
2317
2318         PR target/82386
2319         * combine.c (combine_instructions): Don't combine in unreachable
2320         basic blocks.
2321
2322 2017-08-18  Peter Bergner  <bergner@vnet.ibm.com>
2323
2324         PR target/80210
2325         * config/rs6000/rs6000.c (rs6000_option_override_internal): Rewrite
2326         function to not use the have_cpu variable.  Do not set cpu_index,
2327         rs6000_cpu_index or rs6000_tune_index if we end up using TARGET_DEFAULT
2328         or the default cpu.
2329         (rs6000_valid_attribute_p): Remove duplicate initializations of
2330         old_optimize and func_optimize.
2331         (rs6000_pragma_target_parse): Call rs6000_activate_target_options ().
2332         (rs6000_activate_target_options): Make global.
2333         * config/rs6000/rs6000-protos.h (rs6000_activate_target_options): Add
2334         prototype.
2335
2336 2017-10-02  Jakub Jelinek  <jakub@redhat.com>
2337
2338         * tree-dfa.c (get_ref_base_and_extent): Set *pmax_size to -1
2339         if *poffset + *pmax_size overflows in HOST_WIDE_INT.
2340         Set *poffset to 0 and *psize and *pmax_size to -1 if
2341         *poffset + *psize overflows in HOST_WIDE_INT.
2342
2343         PR tree-optimization/82387
2344         PR tree-optimization/82388
2345         PR tree-optimization/82389
2346         * tree-ssa-dse.c (dse_classify_store): Test byte_tracking_enabled
2347         instead of live_bytes non-NULL.
2348
2349 2017-10-02  Georg-Johann Lay  <avr@gjlay.de>
2350
2351         PR target/41076
2352         * confg/avr/avr.md (*iorhi3.ashift8-ext.zerox): Add "r,r,0"
2353         alternative.
2354
2355 2017-10-02  Richard Biener  <rguenther@suse.de>
2356
2357         * graphite-isl-ast-to-gimple.c (set_codegen_error): With
2358         -fchecking and --param graphite-allow-codegen-errors=0 ICE.
2359         * params.def (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): New param.
2360
2361 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
2362
2363         * tree.h (wi::int_traits <const_tree>::decompose): Assert that the
2364         requested precision matches the type's.
2365         * calls.c (alloc_max_size): Calculate the new candidate size as
2366         a widest_int and use wi::to_widest when comparing it with the
2367         current candidate size.
2368         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Compare with
2369         zero rather than integer_zero_node.
2370         * match.pd: Check for a no-op conversion before using wi::add
2371         rather than after.  Use tree_to_uhwi when summing small shift
2372         counts into an unsigned int.
2373
2374 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
2375             Alan Hayward  <alan.hayward@arm.com>
2376             David Sherwood  <david.sherwood@arm.com>
2377
2378         PR target/71307
2379         * config/aarch64/aarch64.h (POINTER_AND_FP_REGS): New reg class.
2380         (REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update accordingly.
2381         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
2382         POINTER_AND_FP_REGS.
2383
2384 2017-10-02  Richard Biener  <rguenther@suse.de>
2385
2386         PR tree-optimization/82355
2387         * graphite-isl-ast-to-gimple.c (build_iv_mapping): Also build
2388         a mapping for the enclosing loop but avoid generating one for
2389         the loop tree root.
2390         (copy_bb_and_scalar_dependences): Remove premature codegen
2391         error on PHIs in blocks duplicated into multiple places.
2392         * graphite-scop-detection.c
2393         (scop_detection::stmt_has_simple_data_refs_p): For a loop not
2394         in the region use it as loop and nest to analyze the DR in.
2395         (try_generate_gimple_bb): Likewise.
2396         * graphite-sese-to-poly.c (extract_affine_chrec): Adjust.
2397         (add_loop_constraints): For blocks in a loop not in the region
2398         create a dimension with a single iteration.
2399         * sese.h (gbb_loop_at_index): Remove assert.
2400
2401 2017-10-01  Kevin Buettner  <kevinb@redhat.com>
2402
2403         * omp-expand.c (adjust_context_scope): New function.
2404         (expand_parallel_call): Call adjust_context_scope.
2405
2406 2017-10-01  Jeff Law  <law@redhat.com>
2407
2408         * tree-ssa-dom.c (optimize_stmt): Make this a method within the
2409         dom_opt_dom_walker class with direct access to private members.
2410         Add comments.  Call test_for_singularity.
2411         (dom_opt_dom_walker::before_dom_children): Corresponding changes.
2412         (dom_opt_dom_walker::after_dom_children): Do not lazily initialize
2413         m_dummy_cond anymore.
2414         (class dom_opt_dom_walker): Initialize m_dummy_cond member in the
2415         class ctor.
2416         (pass_dominator:execute): Build the dummy_cond here and pass it
2417         to the dom_opt_dom_walker ctor.
2418         (test_for_singularity): New function.
2419
2420 2017-09-30  Krister Walfridsson  <krister.walfridsson@gmail.com>
2421             Maya Rashish  <coypu@sdf.org>
2422
2423         * config.gcc (*-*-netbsd*): New variable nbsd_tm_file containing
2424         netbsd.h, netbsd-stdint.h, and netbsd-elf.h.
2425         (alpha*-*-netbsd*) Use nbsd_tm_file.
2426         (arm*-*-netbsdelf*) Likewise.
2427         (i[34567]86-*-netbsdelf*) Likewise.
2428         (x86_64-*-netbsd*) Likewise.
2429         (mips*-*-netbsd*) Likewise.
2430         (powerpc-*-netbsd*) Likewise.
2431         (sh*-*-netbsd*) Likewise.
2432         (sparc-*-netbsdelf*) Likewise.
2433         (sparc64-*-netbsd*) Likewise.
2434         (m68k*-*-netbsdelf*) Use nbsd_tm_file and add CHAR_FAST8/SHORT_FAST16
2435         to tm_defines.
2436         (vax-*-netbsdelf*) Likewise.
2437         * config/netbsd-stdint.h (INT_FAST8_TYPE): Check CHAR_FAST8.
2438         (UINT_FAST8_TYPE) Likewise.
2439         (INT_FAST16_TYPE) Check CHAR_FAST16.
2440         (UINT_FAST16_TYPE) Likewise.
2441
2442 2017-09-30  Jakub Jelinek  <jakub@redhat.com>
2443
2444         PR target/82361
2445         * config/i386/i386.md
2446         (TARGET_USE_8BIT_IDIV zext divmodsi4 splitter): New define_split.
2447         (divmodsi4_zext_1, divmodsi4_zext_2, *divmodsi4_zext_1,
2448         *divmodsi4_zext_2): New define_insn_and_split.
2449         (*divmodsi4_noext_zext_1, *divmodsi4_noext_zext_2): New define_insn.
2450         (TARGET_USE_8BIT_IDIV zext udivmodsi4 splitter): New define_split.
2451         (udivmodsi4_zext_1, udivmodsi4_zext_2, *udivmodsi4_zext_1,
2452         *udivmodsi4_zext_2, *udivmodsi4_pow2_zext_1, *udivmodsi4_pow2_zext_2):
2453         New define_insn_and_split.
2454         (*udivmodsi4_noext_zext_1, *udivmodsi4_noext_zext_2): New define_insn.
2455         * config/i386/i386.c (ix86_split_idivmod): Handle operands[0] or
2456         operands[1] having DImode when mode is SImode.
2457
2458         * config/i386/i386.c (ix86_split_idivmod): Use mode instead of
2459         always SImode for DIV and MOD in REG_EQUAL notes.
2460
2461 2017-09-29  Yury Gribov  <tetra2005@gmail.com>
2462
2463         PR middle-end/82319
2464         * match.pd: Fix handling of NaNs in pattern.
2465
2466 2017-09-29  Jeff Law  <law@redhat.com>
2467
2468         * sbitmap.c (bitmap_bit_in_range_p): New function.
2469         * sbitmap.h (bitmap_bit_in_range_p): Prototype.
2470         * tree-ssa-dse.c (live_bytes_read): New function.
2471         (dse_classify_store): Ignore reads of dead bytes.
2472
2473         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Fix
2474         typos and whitespace errors.
2475         * config/i386/predicates.md (address_no_seg_operand): Likewise.
2476         * config/s390/s390.c (s390_emit_prologue): Likewise.
2477
2478 2017-09-29  Vladimir Makarov  <vmakarov@redhat.com>
2479
2480         PR target/81481
2481         * ira-costs.c (scan_one_insn): Don't take into account PIC equiv
2482         with a symbol for LRA.
2483
2484 2017-09-29  Vladimir Makarov  <vmakarov@redhat.com>
2485
2486         PR rtl-optimization/82338
2487         * lra-constraints.c (inherit_in_ebb): Check usage_insns check.
2488
2489 2017-09-29  Alexander Monakov  <amonakov@ispras.ru>
2490
2491         * genmodes.c (calc_wider_mode): Suppress qsort macro.
2492         * system.h [CHECKING_P] (qsort): Redirect to qsort_chk.
2493         (qsort_chk): Declare.
2494         * vec.c [CHECKING_P] (qsort_chk_error): New static function.
2495         (qsort_chk): New function.
2496
2497 2017-09-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
2498
2499         PR tree-optimization/82337
2500         * gimple-ssa-strength-reduction.c (find_phi_def): Don't record a
2501         phi definition if the PHI result appears in an abnormal PHI.
2502         (find_basis_for_base_expr): Don't record a basis if the LHS of the
2503         basis appears in an abnormal PHI.
2504
2505 2017-09-29  Richard Biener  <rguenther@suse.de>
2506
2507         * graphite-isl-ast-to-gimple.c
2508         (translate_isl_ast_to_gimple::set_codegen_error): New function.
2509         (binary_op_to_tree): Use it.
2510         (get_rename_from_scev): Likewise.
2511         (copy_loop_phi_nodes): Likewise.
2512         (copy_bb_and_scalar_dependences): Likewise.
2513         (translate_pending_phi_nodes): Likewise.
2514
2515 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
2516
2517         PR target/82339
2518         * config/i386/i386.md (*movdi_internal peephole2): New -Os peephole
2519         for movabsq $(i32 << shift), r64.
2520
2521 2017-09-28  Uros Bizjak  <ubizjak@gmail.com>
2522
2523         * config/i386/i386.c (ix86_print_operand_address_as): Do not check
2524         index when encoding %esp as %rsp to avoid 0x67 prefix.
2525
2526 2017-09-28  Sergey Shalnov  <Sergey.Shalnov@intel.com>
2527
2528         * config/i386/i386.md (*movsf_internal, *movdf_internal):
2529         Return 256-bit AVX modes for TARGET_PREFER_AVX256.
2530
2531 2017-09-28  Thomas Preud'homme  <thomas.preudhomme@arm.com>
2532
2533         * config/arm/arm.c (arm_option_override): Forbid ARMv8-M Security
2534         Extensions with more than 16 double VFP registers.
2535         (cmse_nonsecure_entry_clear_before_return): Remove second entry of
2536         to_clear_mask and all code related to it.  Replace the remaining
2537         entry by a sbitmap and adapt code accordingly.
2538
2539 2017-09-28  Henry Linjamäki  <henry.linjamaki@parmance.com>
2540
2541         * brig-builtins.def: Change pure attributes to const.
2542
2543 2017-09-28  Joseph Myers  <joseph@codesourcery.com>
2544
2545         * config.gcc (default_gnu_indirect_function): Default to yes for
2546         sparc*-*-linux* with glibc.
2547
2548 2017-09-28  Joseph Myers  <joseph@codesourcery.com>
2549
2550         * config/aarch64/aarch64.c (aarch64_elf_asm_constructor)
2551         (aarch64_elf_asm_destructor): Pass SECTION_NOTYPE to get_section
2552         when creating .init_array and .fini_array sections with priority
2553         specified.
2554
2555 2017-09-27  Christophe Lyon  <christophe.lyon@linaro.org>
2556
2557         PR target/71727
2558         * config/aarch64/aarch64.c
2559         (aarch64_builtin_support_vector_misalignment): Always return false
2560         when misalignment is unknown.
2561
2562 2017-09-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2563
2564         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Revise
2565         this function to return false if the definition used by the swap
2566         instruction is artificial, or if the memory address from which the
2567         constant value is loaded is not represented by a base address held
2568         in a register or if the base address register is a frame or stack
2569         pointer.  Additionally, return false if the base address of the
2570         loaded constant is a SYMBOL_REF but is not considered to be a
2571         constant.
2572         (replace_swapped_load_constant): New function.
2573         (rs6000_analyze_swaps): Add a new pass to replace a swap of a
2574         loaded constant vector with a load of a swapped constant vector.
2575
2576 2017-09-27  Carl Love  <cel@us.ibm.com>
2577
2578         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
2579         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
2580         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
2581         fctiw instruction.
2582
2583 2017-09-27  Alexander Monakov  <amonakov@ispras.ru>
2584
2585         * haifa-sched.c (autopref_rank_for_schedule): Order 'irrelevant' insns
2586         first, always call autopref_rank_data otherwise.
2587
2588 2017-09-27  Richard Biener  <rguenther@suse.de>
2589
2590         * graphite-scop-detection.c (find_scop_parameters): Move
2591         loop bound handling ...
2592         (gather_bbs::before_dom_children): ... here, avoiding the need
2593         to build scop_info->loop_nest.
2594         (record_loop_in_sese): Remove.
2595         * sese.h (sese_info_t::loop_nest): Remove.
2596         * sese.c (new_sese_info): Do not allocate loop_nest.
2597         (free_sese_info): Do not free loop_nest.
2598
2599 2017-09-27  Jakub Jelinek  <jakub@redhat.com>
2600
2601         PR c++/82159
2602         * gimplify.c (gimplify_modify_expr): Don't optimize away zero sized
2603         lhs from calls if the lhs has addressable type.
2604
2605 2017-09-27  Richard Biener  <rguenther@suse.de>
2606
2607         * graphite.h (scop::max_alias_set): New member.
2608         * graphite-scop-detection.c: Remove references to non-existing
2609         --param in comments.
2610         (build_alias_sets): Record the maximum alias set used for drs.
2611         (build_scops): Support zero as unlimited for
2612         --param graphite-max-arrays-per-scop.
2613         * graphite-sese-to-poly.c (add_scalar_version_numbers): Remove
2614         and inline into ...
2615         (build_poly_sr_1): ... here.  Compute alias set based on the
2616         maximum alias set used for drs rather than
2617         PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP
2618
2619 2017-09-27  Richard Biener  <rguenther@suse.de>
2620
2621         * graphite-optimize-isl.c (get_schedule_for_node_st): Allow
2622         --param loop-block-tile-size=0 to disable tiling.
2623
2624 2017-09-27  Richard Biener  <rguenther@suse.de>
2625
2626         * doc/invoke.texi (graphite-max-bbs-per-function): Remove.
2627         (graphite-max-nb-scop-params): Document special value zero.
2628         * domwalk.h (dom_walker::STOP): New symbolical constant.
2629         (dom_walker::dom_walker): Add optional parameter for bb to
2630         RPO mapping.
2631         (dom_walker::~dom_walker): Declare.
2632         (dom_walker::before_dom_children): Document STOP return value.
2633         (dom_walker::m_user_bb_to_rpo): New member.
2634         (dom_walker::m_bb_to_rpo): Likewise.
2635         * domwalk.c (dom_walker::dom_walker): Compute bb to RPO
2636         mapping here if not provided by the user.
2637         (dom_walker::~dom_walker): Free bb to RPO mapping if not
2638         provided by the user.
2639         (dom_walker::STOP): Define.
2640         (dom_walker::walk): Do not compute bb to RPO mapping here.
2641         Support STOP return value from before_dom_children to stop
2642         walking.
2643         * graphite-optimize-isl.c (optimize_isl): If the schedule
2644         is the same still generate code if -fgraphite-identity
2645         or -floop-parallelize-all are given.
2646         * graphite-scop-detection.c: Include cfganal.h.
2647         (gather_bbs::gather_bbs): Get and pass through bb to RPO
2648         mapping.
2649         (gather_bbs::before_dom_children): Return STOP for BBs
2650         not in the region.
2651         (build_scops): Compute bb to RPO mapping and pass it to
2652         the domwalk.  Treat --param graphite-max-nb-scop-params=0
2653         as not limiting the number of params.
2654         * graphite.c (graphite_initialize): Remove limit on the
2655         number of basic-blocks in a function.
2656         * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Remove.
2657         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Adjust to documented
2658         default value of 10.
2659
2660 2017-09-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
2661
2662         * config/rs6000/vsx.md (peephole for optimizing move SF to GPR):
2663         Adjust code to eliminate needing to do the shift right 32-bits
2664         operation after XSCVDPSPN.
2665
2666 2017-09-26  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2667
2668         * match.pd ((X / Y) == 0 -> X < Y): New pattern.
2669         ((X / Y) != 0 -> X >= Y): Likewise.
2670
2671 2017-09-26  Carl Love  <cel@us.ibm.com>
2672
2673         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_XL_LEN_R,
2674         P9V_BUILTIN_VEC_XST_LEN_R): Add support for builtins
2675         vector unsigned char vec_xl_len_r (unsigned char *, size_t);
2676         void vec_xst_len_r (vector unsigned char, unsigned char *, size_t);
2677         * config/rs6000/altivec.h (vec_xl_len_r, vec_xst_len_r): Add defines.
2678         * config/rs6000/rs6000-builtin.def (XL_LEN_R, XST_LEN_R): Add
2679         definitions and overloading.
2680         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case
2681         statement for P9V_BUILTIN_XST_LEN_R.
2682         (altivec_init_builtins): Add def_builtin for P9V_BUILTIN_STXVLL.
2683         * config/rs6000/vsx.md (lxvll, stxvll, xl_len_r, xst_len_r): Add
2684         define_expand and define_insn for the instructions and builtins.
2685         * doc/extend.texi: Update the built-in documentation file for the new
2686         built-in functions.
2687         * config/rs6000/altivec.md (altivec_lvsl_reg, altivec_lvsr_reg): Add
2688         define_insn for the instructions
2689
2690 2017-09-26  Krister Walfridsson  <krister.walfridsson@gmail.com>
2691
2692         PR target/39570
2693         * gcc/config/netbsd-protos.h: New file.
2694         * gcc/config/netbsd.c: New file.
2695         * gcc/config/netbsd.h (SUBTARGET_INIT_BUILTINS): Define.
2696         * gcc/config/t-netbsd: New file.
2697         * gcc/config.gcc (tm_p_file): Add netbsd-protos.h.
2698         (tmake_file) Add t-netbsd.
2699         (extra_objs) Add netbsd.o.
2700
2701 2017-09-26  Janus Weil  <janus@gcc.gnu.org>
2702
2703         PR fortran/82143
2704         PR fortran/82324
2705         * doc/sourcebuild.texi: Document fortran_real_10 and fortran_real_16.
2706
2707 2017-09-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
2708
2709         * config/rs6000/rs6000.md (extendsi<mode>2): Add a splitter to do
2710         sign extension from a vector register to a GPR by doing a 32-bit
2711         direct move and then an EXTSW.
2712         (extendsi<mode>2 splitter): Likewise.
2713         (movsi_from_sf): Adjust code to eliminate doing a 32-bit shift
2714         right or vector extract after doing XSCVDPSPN.  Use
2715         zero_extendsidi2 instead of p8_mfvsrd_4_disf to move the value to
2716         the GPRs.
2717         (movdi_from_sf_zero_ext): Likewise.
2718         (reload_gpr_from_vsxsf): Likewise.
2719         (p8_mfvsrd_4_disf): Delete, no longer used.
2720         (movsi_from_df): Optimize converting a DFmode to a SFmode, and
2721         then needing to move the SFmode to a GPR to use the XSCVDPSP
2722         instruction instead of FRSP and XSCVDPSPN.
2723         * config/rs6000/vsx.md (vsx_xscvspdp_scalar2): Move insn so that
2724         it is adjacent to the other XSCVSPDP insns.
2725         (vsx_xscvdpsp_scalar): Use "ww" constraint instead of "f" to allow
2726         SFmode to be in traditional Altivec registers.
2727         (vsx_xscvdpspn): Eliminate useless alternative constraint.
2728         (vsx_xscvspdpn): Likewise.
2729         (vsx_xscvspdpn_scalar): Likewise.
2730
2731 2017-09-26  Martin Jambor  <mjambor@suse.cz>
2732
2733         * tree-sra.c (compare_access_positions): Put integral types first,
2734         stabilize sorting of integral types, remove conditions putting
2735         non-full-precision integers last.
2736         (sort_and_splice_var_accesses): Disable scalarization if a
2737         non-integert would be represented by a non-full-precision integer.
2738
2739 2017-09-26  Joseph Myers  <joseph@codesourcery.com>
2740
2741         * config/microblaze/linux.h (TARGET_ASM_FILE_END): Likewise.
2742         * config/pa/pa.h (NEED_INDICATE_EXEC_STACK): Likewise.
2743         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Likewise.
2744         * config/pa/pa.c (pa_hpux_file_end): Rename to pa_file_end.
2745         Define unconditionally, with [ASM_OUTPUT_EXTERNAL_REAL]
2746         conditionals inside the function instead of around it.  Call
2747         file_end_indicate_exec_stack if NEED_INDICATE_EXEC_STACK.
2748         (TARGET_ASM_FILE_END): Define unconditionally to pa_file_end.
2749
2750 2017-09-26  Richard Biener  <rguenther@suse.de>
2751
2752         * graphite-scop-detection.c (scop_detection::build_scop_depth): Rewrite,
2753         fold in ...
2754         (scop_detection::build_scop_breadth): ... this.  Removed.
2755         (scop_detection::loop_is_valid_in_scop): Fold into single caller.
2756         (scop_detection::harmful_stmt_in_bb): Likewise.
2757         (scop_detection::graphite_can_represent_stmt): Likewise.
2758         (scop_detection::loop_body_is_valid_scop): Likewise.  Remove recursion.
2759         (scop_detection::can_represent_loop): Remove recursion, fold in ...
2760         (scop_detection::can_represent_loop_1): ... this.  Removed.
2761         (scop_detection::harmful_loop_in_region): Simplify after inlining
2762         the above and remove more quadraticness.
2763         (build_scops): Adjust.
2764         * tree-data-ref.c (loop_nest_has_data_refs): Remove pointless
2765         quadraticness.
2766
2767 2017-09-26  Jakub Jelinek  <jakub@redhat.com>
2768
2769         PR target/82267
2770         * config/i386/i386.c (ix86_print_operand_address_as): Only test
2771         REGNO (base) == SP_REG if base is a REG.
2772
2773         PR middle-end/35691
2774         * tree-ssa-reassoc.c (update_range_test): Dump r->exp each time
2775         if it is different SSA_NAME.
2776         (optimize_range_tests_cmp_bitwise): New function.
2777         (optimize_range_tests): Call it.
2778
2779 2017-09-26  Richard Biener  <rguenther@suse.de>
2780
2781         PR tree-optimization/82321
2782         * graphite.c (canonicalize_loop_closed_ssa): Properly check
2783         for the def being inside the loop.
2784
2785 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2786
2787         * config/s390/vx-builtins.md ("vmslg"): Add missing operand in
2788         assembler output.
2789         * config/s390/s390-builtins.def: Fix constraint on op4.
2790
2791 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2792
2793         * config/s390/s390.c (s390_expand_vec_compare): Use the new mode
2794         independent expanders.
2795         * config/s390/vector.md ("vec_cmpuneq", "vec_cmpltgt")
2796         ("vec_ordered", "vec_unordered"): New expanders.
2797
2798 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2799
2800         * config/s390/s390.c (s390_preferred_simd_mode): Return V4SFmode
2801         for SFmode.
2802
2803 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2804
2805         * config/s390/vector.md ("vec_unpacks_low_v16qi"): Rename to
2806         vec_unpacks_lo_v16qi.
2807         ("vec_unpacku_low_v16qi"): Rename to vec_unpacku_lo_v16qi.
2808
2809 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2810
2811         * config/s390/vector.md ("vec_unpacks_lo_v4sf")
2812         ("vec_unpacks_hi_v4sf", "vec_unpacks_lo_v2df")
2813         ("vec_unpacks_hi_v2df", "vec_pack_trunc_v2df"): New expanders.
2814
2815 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2816
2817         * config/s390/predicates.md ("const_shift_by_byte_operand"): New
2818         predicate.
2819         * config/s390/vector.md ("*vec_srb<mode>"): Change modes to V_128
2820         and V16QI.
2821         ("*vec_slb<mode>"): New insn pattern.
2822         ("vec_shr_<mode>"): New expander.
2823         * config/s390/vx-builtins.md ("vec_slb<mode>"): Turn into expander
2824         and force the shift count operand to V16QImode.
2825         ("vec_srb<mode>"): Set shift count mode to V16QI.
2826
2827 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2828
2829         * config/s390/vector.md ("vec_widen_umult_lo_<mode>")
2830         ("vec_widen_umult_hi_<mode>", "vec_widen_smult_lo_<mode>")
2831         ("vec_widen_smult_hi_<mode>"): New expander definitions.
2832
2833 2017-09-26  Richard Earnshaw  <rearnsha@arm.com>
2834
2835         PR target/82175
2836         * config/arm/arm.h (DRIVER_SELF_SPECS): Separate sub-rules with commas.
2837
2838 2017-09-26  Richard Biener  <rguenther@suse.de>
2839
2840         PR tree-optimization/82320
2841         * tree-ssa-sccvn.c (set_ssa_val_to): Changing undef to undef
2842         isn't a change.
2843
2844 2017-09-25  Jeff Law  <law@redhat.com>
2845
2846         * config/rs6000/rs6000-protos.h (output_probe_stack_range): Update
2847         prototype for new argument.
2848         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack_1): New function,
2849         mostly extracted from rs6000_emit_allocate_stack.
2850         (rs6000_emit_probe_stack_range_stack_clash): New function.
2851         (rs6000_emit_allocate_stack): Call
2852         rs6000_emit_probe_stack_range_stack_clash as needed.
2853         (rs6000_emit_probe_stack_range): Add additional argument
2854         to call to gen_probe_stack_range{si,di}.
2855         (output_probe_stack_range): New.
2856         (output_probe_stack_range_1): Renamed from output_probe_stack_range.
2857         (output_probe_stack_range_stack_clash): New.
2858         (rs6000_emit_prologue): Emit notes into dump file as requested.
2859         * rs6000.md (allocate_stack): Handle -fstack-clash-protection.
2860         (probe_stack_range<P:mode>): Operand 0 is now early-clobbered.
2861         Add additional operand and pass it to output_probe_stack_range.
2862
2863 2017-09-25  Bin Cheng  <bin.cheng@arm.com>
2864
2865         PR tree-optimization/82163
2866         * tree-ssa-loop-manip.h (verify_loop_closed_ssa): New parameter.
2867         (checking_verify_loop_closed_ssa): New parameter.
2868         * tree-ssa-loop-manip.c (check_loop_closed_ssa_use): Delete.
2869         (check_loop_closed_ssa_stmt): Delete.
2870         (check_loop_closed_ssa_def, check_loop_closed_ssa_bb): New functions.
2871         (verify_loop_closed_ssa): Check loop closed ssa form for LOOP.
2872         (tree_transform_and_unroll_loop): Check loop closed ssa form only for
2873         changed loops.
2874
2875 2017-09-25  Pekka Jaaskelainen <pekka@parmance.com>
2876
2877         * brig-builtins.def: Treat HSAIL barrier builtins as
2878         setjmp/longjump style functions.
2879
2880 2017-09-25  Richard Sandiford  <richard.sandiford@linaro.org>
2881
2882         * target.def (constant_alignment): New hook.
2883         * defaults.h (CONSTANT_ALIGNMENT): Delete.
2884         * doc/tm.texi.in (CONSTANT_ALIGNMENT): Replace with...
2885         (TARGET_CONSTANT_ALIGNMENT): ...this new hook.
2886         * doc/tm.texi: Regenerate.
2887         * targhooks.h (default_constant_alignment): Declare.
2888         (constant_alignment_word_strings): Likewise.
2889         * targhooks.c (default_constant_alignment): New function.
2890         (constant_alignment_word_strings): Likewise.
2891         * builtins.c (get_object_alignment_2): Use targetm.constant_alignment
2892         instead of CONSTANT_ALIGNMENT.
2893         * varasm.c (align_variable, get_variable_align, build_constant_desc)
2894         (force_const_mem): Likewise.
2895         * config/aarch64/aarch64.h (CONSTANT_ALIGNMENT): Delete.
2896         * config/aarch64/aarch64.c (aarch64_constant_alignment): New function.
2897         (aarch64_classify_address): Call it instead of CONSTANT_ALIGNMENT.
2898         (TARGET_CONSTANT_ALIGNMENT): Redefine.
2899         * config/alpha/alpha.h (CONSTANT_ALIGNMENT): Delete commented-out
2900         definition.
2901         * config/arc/arc.h (CONSTANT_ALIGNMENT): Delete.
2902         * config/arc/arc.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2903         constant_alignment_word_strings.
2904         * config/arm/arm.h (CONSTANT_ALIGNMENT_FACTOR): Delete.
2905         (CONSTANT_ALIGNMENT): Likewise.
2906         * config/arm/arm.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2907         (arm_constant_alignment): New function.
2908         * config/bfin/bfin.h (CONSTANT_ALIGNMENT): Delete.
2909         * config/bfin/bfin.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2910         constant_alignment_word_strings.
2911         * config/cr16/cr16.h (CONSTANT_ALIGNMENT): Delete.
2912         * config/cr16/cr16.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2913         constant_alignment_word_strings.
2914         * config/cris/cris.h (CONSTANT_ALIGNMENT): Delete.
2915         * config/cris/cris.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2916         (cris_constant_alignment): New function.
2917         * config/epiphany/epiphany.h (CONSTANT_ALIGNMENT): Delete.
2918         * config/epiphany/epiphany.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2919         (epiphany_constant_alignment): New function.
2920         * config/fr30/fr30.h (CONSTANT_ALIGNMENT): Delete.
2921         * config/fr30/fr30.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2922         constant_alignment_word_strings.
2923         * config/frv/frv.h (CONSTANT_ALIGNMENT): Delete.
2924         * config/frv/frv.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2925         constant_alignment_word_strings.
2926         * config/ft32/ft32.h (CONSTANT_ALIGNMENT): Delete.
2927         * config/ft32/ft32.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2928         constant_alignment_word_strings.
2929         * config/i386/i386.h (CONSTANT_ALIGNMENT): Delete.
2930         * config/i386/i386-protos.h (ix86_constant_alignment): Delete.
2931         * config/i386/i386.c (ix86_constant_alignment): Make static.
2932         Use the same interface as the target hook.
2933         (TARGET_CONSTANT_ALIGNMENT): Redefine.
2934         * config/ia64/ia64.h (CONSTANT_ALIGNMENT): Delete.
2935         * config/ia64/ia64.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2936         constant_alignment_word_strings.
2937         * config/iq2000/iq2000.h (CONSTANT_ALIGNMENT): Delete.
2938         * config/iq2000/iq2000.c (iq2000_constant_alignment): New function.
2939         (TARGET_CONSTANT_ALIGNMENT): Redefine.
2940         * config/lm32/lm32.h (CONSTANT_ALIGNMENT): Delete.
2941         * config/lm32/lm32.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2942         constant_alignment_word_strings.
2943         * config/m32r/m32r.h (CONSTANT_ALIGNMENT): Delete.
2944         * config/m32r/m32r.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2945         constant_alignment_word_strings.
2946         * config/mcore/mcore.h (CONSTANT_ALIGNMENT): Delete.
2947         * config/mcore/mcore.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2948         constant_alignment_word_strings.
2949         * config/microblaze/microblaze.h (CONSTANT_ALIGNMENT): Delete.
2950         * config/microblaze/microblaze.c (microblaze_constant_alignment):
2951         New function.
2952         (TARGET_CONSTANT_ALIGNMENT): Redefine.
2953         * config/mips/mips.h (CONSTANT_ALIGNMENT): Delete.
2954         * config/mips/mips.c (mips_constant_alignment): New function.
2955         (TARGET_CONSTANT_ALIGNMENT): Redefine.
2956         * config/mmix/mmix.h (CONSTANT_ALIGNMENT): Delete.
2957         * config/mmix/mmix-protos.h (mmix_constant_alignment): Delete.
2958         * config/mmix/mmix.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2959         (mmix_constant_alignment): Make static.  Use the same interface
2960         as the target hook.
2961         * config/moxie/moxie.h (CONSTANT_ALIGNMENT): Delete.
2962         * config/moxie/moxie.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2963         constant_alignment_word_strings.
2964         * config/nios2/nios2.h (CONSTANT_ALIGNMENT): Delete.
2965         * config/nios2/nios2.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2966         constant_alignment_word_strings.
2967         * config/pa/pa.h (CONSTANT_ALIGNMENT): Delete.
2968         * config/pa/pa.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2969         constant_alignment_word_strings.
2970         * config/powerpcspe/powerpcspe.h (CONSTANT_ALIGNMENT): Delete.
2971         * config/powerpcspe/powerpcspe.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2972         (rs6000_constant_alignment): New function.
2973         * config/riscv/riscv.h (CONSTANT_ALIGNMENT): Delete.
2974         * config/riscv/riscv.c (riscv_constant_alignment): New function.
2975         (TARGET_CONSTANT_ALIGNMENT): Redefine.
2976         * config/rs6000/rs6000.h (CONSTANT_ALIGNMENT): Delete.
2977         * config/rs6000/rs6000.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2978         (rs6000_constant_alignment): New function.
2979         * config/s390/s390.h (CONSTANT_ALIGNMENT): Delete.
2980         * config/s390/s390.c (s390_constant_alignment): New function.
2981         (TARGET_CONSTANT_ALIGNMENT): Redefine.
2982         * config/sh/sh.h (CONSTANT_ALIGNMENT): Delete.
2983         * config/sh/sh.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2984         constant_alignment_word_strings.
2985         * config/sparc/sparc.h (CONSTANT_ALIGNMENT): Delete.
2986         * config/sparc/sparc.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2987         (sparc_constant_alignment): New function.
2988         * config/spu/spu.h (CONSTANT_ALIGNMENT): Delete.
2989         * config/spu/spu.c (spu_constant_alignment): New function.
2990         (TARGET_CONSTANT_ALIGNMENT): Redefine.
2991         * config/stormy16/stormy16.h (CONSTANT_ALIGNMENT): Delete.
2992         * config/stormy16/stormy16.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2993         constant_alignment_word_strings.
2994         * config/tilegx/tilegx.h (CONSTANT_ALIGNMENT): Delete.
2995         * config/tilegx/tilegx.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2996         constant_alignment_word_strings.
2997         * config/tilepro/tilepro.h (CONSTANT_ALIGNMENT): Delete.
2998         * config/tilepro/tilepro.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2999         constant_alignment_word_strings.
3000         * config/visium/visium.h (CONSTANT_ALIGNMENT): Delete.
3001         * config/visium/visium.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
3002         (visium_constant_alignment): New function.
3003         * config/xtensa/xtensa.h (CONSTANT_ALIGNMENT): Delete.
3004         * config/xtensa/xtensa.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
3005         (xtensa_constant_alignment): New function.
3006         * system.h (CONSTANT_ALIGNMENT): Poison.
3007
3008 2017-09-25  Will Schmidt  <will_schmidt@vnet.ibm.com>
3009
3010         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
3011         for early folding of vector stores (ALTIVEC_BUILTIN_ST_*).
3012         (rs6000_builtin_valid_without_lhs): New helper function.
3013         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
3014         Remove obsoleted code for handling ALTIVEC_BUILTIN_VEC_ST.
3015
3016 2017-09-25  Richard Sandiford  <richard.sandiford@linaro.org>
3017
3018         * target.h (vec_perm_indices): Use unsigned short rather than
3019         unsigned char.
3020         (auto_vec_perm_indices): Likewise.
3021         * config/aarch64/aarch64.c (aarch64_vectorize_vec_perm_const_ok):
3022         Use unsigned int rather than unsigned char.
3023         * config/arm/arm.c (arm_vectorize_vec_perm_const_ok): Likewise.
3024
3025 2017-09-25  Richard Biener  <rguenther@suse.de>
3026
3027         * cfgloop.h (sort_sibling_loops): Declare.
3028         * cfgloop.c (sort_sibling_loops_cmp): New helper.
3029         (sort_sibling_loops): New function sorting the sibling loop list
3030         in RPO order.
3031         * graphite.c (graphite_transform_loops): Sort sibling loops.
3032
3033 2017-09-25  Richard Sandiford  <richard.sandifird@linaro.org>
3034
3035         * target.def (vec_perm_const_ok): Change sel parameter to
3036         vec_perm_indices.
3037         * optabs-query.c (can_vec_perm_p): Update accordingly.
3038         * doc/tm.texi: Regenerate.
3039         * config/aarch64/aarch64.c (expand_vec_perm_d): Change perm to
3040         auto_vec_perm_indices and remove separate nelt field.
3041         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
3042         (aarch64_evpc_ext, aarch64_evpc_rev, aarch64_evpc_dup)
3043         (aarch64_evpc_tbl, aarch64_expand_vec_perm_const_1)
3044         (aarch64_expand_vec_perm_const): Update accordingly.
3045         (aarch64_vectorize_vec_perm_const_ok): Likewise.  Change sel
3046         to vec_perm_indices.
3047         * config/arm/arm.c (expand_vec_perm_d): Change perm to
3048         auto_vec_perm_indices and remove separate nelt field.
3049         (arm_evpc_neon_vuzp, arm_evpc_neon_vzip, arm_evpc_neon_vrev)
3050         (arm_evpc_neon_vtrn, arm_evpc_neon_vext, arm_evpc_neon_vtbl)
3051         (arm_expand_vec_perm_const_1, arm_expand_vec_perm_const): Update
3052         accordingly.
3053         (arm_vectorize_vec_perm_const_ok): Likewise.  Change sel
3054         to vec_perm_indices.
3055         * config/i386/i386.c (ix86_vectorize_vec_perm_const_ok): Change
3056         sel to vec_perm_indices.
3057         * config/ia64/ia64.c (ia64_vectorize_vec_perm_const_ok): Likewise.
3058         * config/mips/mips.c (mips_vectorize_vec_perm_const_ok): Likewise.
3059         * config/powerpcspe/powerpcspe.c (rs6000_vectorize_vec_perm_const_ok):
3060         Likewise.
3061         * config/rs6000/rs6000.c (rs6000_vectorize_vec_perm_const_ok):
3062         Likewise.
3063
3064 2017-09-25  Pierre-Marie de Rodat  <derodat@adacore.com>
3065
3066         PR debug/82155
3067         * dwarf2out.c (dwarf2out_early_global_decl): Call dwarf2out_decl
3068         on the FUNCTION_DECL function context if it has a DIE that is a
3069         declaration.
3070
3071 2017-09-25  Richard Biener  <rguenther@suse.de>
3072
3073         PR tree-optimization/82285
3074         * tree-vect-patterns.c (vect_recog_bool_pattern): Also handle
3075         enumeral types.
3076
3077 2017-09-25  Tom de Vries  <tom@codesourcery.com>
3078
3079         PR target/80035
3080         PR target/81069
3081         * config/nvptx/nvptx.c (nvptx_output_call_insn): Add exit after call to
3082         noreturn function.
3083
3084 2017-09-25  Richard Biener  <rguenther@suse.de>
3085
3086         * graphite-optimize-isl.c (optimize_isl): Fail and dump if
3087         ISL errors other than isl_error_quota happen.  Dump if the
3088         schedule is the same.
3089         * graphite-sese-to-poly.c (build_poly_scop): Fail on ISL
3090         errors instead of aborting inside ISL.
3091
3092 2017-09-25  Iain Sandoe  <iain@codesourcery.com>
3093
3094         PR target/80556
3095         * config/i386/darwin.h (REAL_LIB_SPEC): New; put libSystem ahead
3096         of libgcc_eh for m64.
3097         * config/i386/darwin64.h: Likewise.
3098
3099 2017-09-25  Richard Biener  <rguenther@suse.de>
3100
3101         PR middle-end/82144
3102         * dwarf2out.c (gen_enumeration_type_die): Do not add alignment
3103         attribute for incomplete types nor twice for complete ones.
3104
3105 2017-09-24  Uros Bizjak  <ubizjak@gmail.com>
3106
3107         PR target/82267
3108         * config/i386/i386.c (ix86_print_operand_address_as): Encode
3109         %esp as %rsp to avoid 0x67 prefix if there is no index or base
3110         register.
3111
3112 2017-09-23  Uros Bizjak  <ubizjak@gmail.com>
3113
3114         PR bootstrap/82306
3115         * config/i386/i386.opt (mprefer-avx256): Use
3116         ix86_target_flags variable.
3117         * config/i386/i386.c (ix86_target_string): Move
3118         -mprefer-avx256 to flag2_opts.
3119
3120 2017-09-22  Jakub Jelinek  <jakub@redhat.com>
3121
3122         PR middle-end/35691
3123         * match.pd: Simplify x == -1 & y == -1 into (x & y) == -1
3124         and x != -1 | y != -1 into (x & y) != -1.
3125
3126 2017-09-22  Steve Ellcey  <sellcey@cavium.com>
3127
3128         * config.gcc: Add new case statement to set
3129         default_gnu_indirect_function.  Remove it from x86_64-*-linux*,
3130         i[34567]86-*, powerpc*-*-linux*spe*, powerpc*-*-linux*, s390-*-linux*,
3131         s390x-*-linux* case statements.   Added aarch64 to the list of
3132         supported architectures.
3133
3134 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
3135
3136         PR tree-optimization/82289
3137         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Check
3138         STMT_VINFO_RELEVANT_P.
3139
3140 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
3141             Alan Hayward  <alan.hayward@arm.com>
3142             David Sherwood  <david.sherwood@arm.com>
3143
3144         * tree-vrp.c (extract_range_from_multiplicative_op_1): Assert
3145         for VR_RANGE only; don't allow VR_ANTI_RANGE.
3146         (extract_range_from_binary_expr_1): Don't call
3147         extract_range_from_multiplicative_op_1 if !range_int_cst_p.
3148
3149 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
3150             Alan Hayward  <alan.hayward@arm.com>
3151             David Sherwood  <david.sherwood@arm.com>
3152
3153         * target.def (preferred_vector_alignment): New hook.
3154         * doc/tm.texi.in (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): New
3155         hook.
3156         * doc/tm.texi: Regenerate.
3157         * targhooks.h (default_preferred_vector_alignment): Declare.
3158         * targhooks.c (default_preferred_vector_alignment): New function.
3159         * tree-vectorizer.h (dataref_aux): Add a target_alignment field.
3160         Expand commentary.
3161         (DR_TARGET_ALIGNMENT): New macro.
3162         (aligned_access_p): Update commentary.
3163         (vect_known_alignment_in_bytes): New function.
3164         * tree-vect-data-refs.c (vect_calculate_required_alignment): New
3165         function.
3166         (vect_compute_data_ref_alignment): Set DR_TARGET_ALIGNMENT.
3167         Calculate the misalignment based on the target alignment rather than
3168         the vector size.
3169         (vect_update_misalignment_for_peel): Use DR_TARGET_ALIGMENT
3170         rather than TYPE_ALIGN / BITS_PER_UNIT to update the misalignment.
3171         (vect_enhance_data_refs_alignment): Mask the byte misalignment with
3172         the target alignment, rather than masking the element misalignment
3173         with the number of elements in a vector.  Also use the target
3174         alignment when calculating the maximum number of peels.
3175         (vect_find_same_alignment_drs): Use vect_calculate_required_alignment
3176         instead of TYPE_ALIGN_UNIT.
3177         (vect_duplicate_ssa_name_ptr_info): Remove stmt_info parameter.
3178         Measure DR_MISALIGNMENT relative to DR_TARGET_ALIGNMENT.
3179         (vect_create_addr_base_for_vector_ref): Update call accordingly.
3180         (vect_create_data_ref_ptr): Likewise.
3181         (vect_setup_realignment): Realign by ANDing with
3182         -DR_TARGET_MISALIGNMENT.
3183         * tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Calculate
3184         the number of peels based on DR_TARGET_ALIGNMENT.
3185         * tree-vect-stmts.c (get_group_load_store_type): Compare the gap
3186         with the guaranteed alignment boundary when deciding whether
3187         overrun is OK.
3188         (vectorizable_mask_load_store): Interpret DR_MISALIGNMENT
3189         relative to DR_TARGET_ALIGNMENT instead of TYPE_ALIGN_UNIT.
3190         (ensure_base_align): Remove stmt_info parameter.  Get the
3191         target base alignment from DR_TARGET_ALIGNMENT.
3192         (vectorizable_store): Update call accordingly.   Interpret
3193         DR_MISALIGNMENT relative to DR_TARGET_ALIGNMENT instead of
3194         TYPE_ALIGN_UNIT.
3195         (vectorizable_load): Likewise.
3196
3197 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
3198             Alan Hayward  <alan.hayward@arm.com>
3199             David Sherwood  <david.sherwood@arm.com>
3200
3201         * tree-vectorizer.h (vect_get_scalar_dr_size): New function.
3202         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Use it.
3203         (vect_enhance_data_refs_alignment): Likewise.
3204
3205 2017-09-22  Richard Earnshaw  <richard.earnshaw@arm.com>
3206
3207         * config/arm/parsecpu.awk (fatal): Note that we've encountered an
3208         error.  Only quit immediately if parsing is complete.
3209         (BEGIN): Initialize fatal_err and parse_done.
3210         (begin fpu, end fpu): Check number of arguments.
3211         (begin arch, end arch): Likewise.
3212         (begin cpu, end cpu): Likewise.
3213         (cname, tune for, tune flags, architecture, fpu, option): Likewise.
3214         (optalias): Likewise.
3215
3216 2017-09-22  Richard Earnshaw  <richard.earnshaw@arm.com>
3217
3218         * config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.
3219         * config/arm/arm-isa.h: Delete.  Move definitions to ...
3220         * arm-cpus.in: ... here.  Use new feature and fgroup values.
3221         * config/arm/arm.c (arm_option_override): Use lower case for feature
3222         bit names.
3223         * config/arm/arm.h (TARGET_HARD_FLOAT): Likewise.
3224         (TARGET_VFP3, TARGET_VFP5, TARGET_FMA): Likewise.
3225         * config/arm/parsecpu.awk (END): Add new command 'isa'.
3226         (isa_pfx): Delete.
3227         (print_isa_bits_for): New function.
3228         (gen_isa): New function.
3229         (gen_comm_data): Use print_isa_bits_for.
3230         (define feature): New keyword.
3231         (define fgroup): New keyword.
3232         * config/arm/t-arm (TM_H): Remove.
3233         (GTM_H): Add arm-isa.h.
3234         (arm-isa.h): Add rule to generate file.
3235         * common/config/arm/arm-common.c: (arm_canon_arch_option): Use lower
3236         case for feature bit names.
3237
3238 2017-09-22  Richard Biener  <rguenther@suse.de>
3239
3240         * graphite-isl-ast-to-gimple.c (graphite_verify): Inline into
3241         single caller.
3242         (graphite_regenerate_ast_isl): Do not reset SCEV.  Move debug
3243         print of no dependency loops ...
3244         * graphite.c (graphite_transform_loops): ... here.
3245         (canonicalize_loop_closed_ssa_form): Work from inner to outer
3246         loops.
3247         (same_close_phi_node, remove_duplicate_close_phi,
3248         make_close_phi_nodes_unique, defined_in_loop_p): Fold into ...
3249         (canonicalize_loop_closed_ssa): ... here and simplify.
3250         * graphite-optimize-isl.c: Include tree-vectorizer.h.
3251         (optimize_isl): Use dump_printf_loc to tell when we stopped
3252         optimizing because of an ISL timeout.
3253
3254 2017-09-22  Richard Biener  <rguenther@suse.de>
3255
3256         PR tree-optimization/82291
3257         * tree-if-conv.c (predicate_mem_writes): Make sure to
3258         remove writes in blocks predicated with false.
3259
3260 2017-09-22  Richard Biener  <rguenther@suse.de>
3261
3262         * sese.c: Include cfganal.h.
3263         (if_region_set_false_region): Remove.
3264         (create_if_region_on_edge): Likewise.
3265         (move_sese_in_condition): Re-implement without destroying
3266         dominators.
3267
3268 2017-09-22  Richard Biener  <rguenther@suse.de>
3269
3270         * graphite-isl-ast-to-gimple.c (translate_pending_phi_nodes):
3271         Verify both BBs contain loop PHI nodes before dispatching to
3272         copy_loop_phi_args.
3273         (graphite_regenerate_ast_isl): Do not recompute dominators,
3274         do not verify three times.  Restructure for clarity.
3275         * graphite-scop-detection.c (same_close_phi_node,
3276         remove_duplicate_close_phi, make_close_phi_nodes_unique,
3277         defined_in_loop_p, canonicalize_loop_closed_ssa,
3278         canonicalize_loop_closed_ssa_form): Simplify, remove excess
3279         checking and SSA rewrite, move to ...
3280         * graphite.c: ... here.  Include ssa.h and tree-ssa-loop-manip.h.
3281         (graphite_initialize): Do not pass in ctx, do not reset the
3282         SCEV cache, compute only dominators.
3283         (graphite_transform_loops): Allocate ISL ctx after
3284         graphite_initialize.  Call canonicalize_loop_closed_ssa_form.
3285         Maintain post-dominators only around build_scops.
3286         * sese.c (if_region_set_false_region): Make static.  Free
3287         and recompute dominators.
3288         (move_sese_in_condition): Assert we don't get called with
3289         post-dominators computed.
3290         * sese.h (if_region_set_false_region): Remove.
3291
3292 2017-09-22  Sergey Shalnov  <sergey.shalnov@intel.com>
3293
3294         * config/i386/sse.md ("mov<mode>_internal"): Use <sseinsnmode>
3295         mode attribute for TARGET_AVX512VL.
3296
3297 2017-09-21  Sergey Shalnov  <sergey.shalnov@intel.com>
3298
3299         * config/i386/i386.opt (mprefer-avx256): New option.
3300         * config/i386/i386.c (ix86_target_string): Add -mprefer-avx256
3301         to flag_opts.
3302         (ix86_preferred_simd_mode): Return 256-bit AVX modes
3303         for TARGET_PREFER_AVX256.
3304         * doc/invoke.texi (x86 Options): Document -mprefer-avx256.
3305
3306 2017-09-21  Jeff Law  <law@redhat.com>
3307
3308         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash):
3309         Fix dump output if the only stack space is for pushed registers.
3310
3311 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
3312
3313         * config/spu/spu.c (spu_sched_adjust_cost): Update after renaming
3314         of insn_cost.
3315
3316 2017-09-21  Martin Sebor  <msebor@redhat.com>
3317
3318         PR c/81882
3319         * doc/extend.texi (attribute ifunc): Avoid relying on ill-formed
3320         code (in C++) or code that triggers warnings.
3321
3322 2017-09-21  Eric Botcazou  <ebotcazou@adacore.com>
3323
3324         * stor-layout.c (bit_from_pos): Do not distribute the conversion.
3325
3326 2017-09-21  Segher Boessenkool  <segher@kernel.crashing.org>
3327
3328         * haifa-sched.c: Rename insn_cost to insn_sched_cost.
3329         * sched-rgn.c: Ditto.
3330         * sel-sched-ir.c: Ditto.
3331
3332 2017-09-21  Alexander Monakov  <amonakov@ispras.ru>
3333
3334         * toplev.h (set_random_seed): Adjust return type.
3335         * toplev.c (init_local_tick): Move eager initialization of random_seed
3336         to get_random_seed.  Adjust comment.
3337         (init_random_seed): Inline to get_random_seed, delete.
3338         (get_random_seed): Initialize random_seed lazily.
3339         (set_random_seed): Do not return previous value.
3340         (print_switch_value): Do not call get_random_seed.
3341
3342 2017-09-21  Evgeny Kudryashov  <kudryashov@ispras.ru>
3343
3344         * cgraph.c (delete_function_version): New, broken out from...
3345         (cgraph_node::delete_function_version): ...here.  Rename to
3346         cgraph_node::delete_function_version_by_decl.  Update all uses.
3347         (cgraph_node::remove): Call delete_function_version.
3348
3349 2017-09-21  Jakub Jelinek  <jakub@redhat.com>
3350
3351         PR sanitizer/81715
3352         * tree-inline.c (expand_call_inline): Emit clobber stmts for
3353         VAR_DECLs to which addressable non-volatile parameters are mapped
3354         and for id->retvar after the return value assignment.  Clear
3355         id->retval and id->retbnd after inlining.
3356
3357 2017-09-21  Richard Biener  <rguenther@suse.de>
3358
3359         PR tree-optimization/82276
3360         PR tree-optimization/82244
3361         * tree-vrp.c (build_assert_expr_for): Set
3362         SSA_NAME_OCCURS_IN_ABNORMAL_PHI if the variable we assert on
3363         has it set.
3364         (remove_range_assertions): Revert earlier change.
3365
3366 2017-09-21  Wilco Dijkstra  <wdijkstr@arm.com>
3367
3368         PR target/71951
3369         * config/aarch64/aarch64.h (LIBGCC2_UNWIND_ATTRIBUTE): Define.
3370
3371 2017-09-21  Richard Biener  <rguenther@suse.de>
3372
3373         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
3374         Restore valid IL after code generation errors.
3375         * graphite.c (graphite_transform_loops): Diagnose code
3376         generation issues as MSG_MISSED_OPTIMIZATION and continue
3377         with processing SCOPs.
3378
3379 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
3380             Alan Hayward  <alan.hayward@arm.com>
3381             David Sherwood  <david.sherwood@arm.com>
3382
3383         * calls.c (compute_argument_addresses): Use simplify_gen_binary
3384         rather than choosing between plus_constant and gen_rtx_<CODE>.
3385         * expr.c (emit_push_insn): Likewise.
3386         (expand_expr_real_2): Likewise.
3387
3388 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
3389             Alan Hayward  <alan.hayward@arm.com>
3390             David Sherwood  <david.sherwood@arm.com>
3391
3392         * loop-unroll.c (split_iv): Call copy_rtx on the step.
3393
3394 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
3395             Alan Hayward  <alan.hayward@arm.com>
3396             David Sherwood  <david.sherwood@arm.com>
3397
3398         * tree.c (find_atomic_core_type): Check tree_fits_uhwi_p before
3399         calling tree_to_uhwi.
3400
3401 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
3402             Alan Hayward  <alan.hayward@arm.com>
3403             David Sherwood  <david.sherwood@arm.com>
3404
3405         * tree-ssa-ccp.c (get_value_for_expr): Use a positive test for
3406         INTEGER_CST rather than a negative test for ADDR_EXPR.
3407
3408 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
3409             Alan Hayward  <alan.hayward@arm.com>
3410             David Sherwood  <david.sherwood@arm.com>
3411
3412         * tree-vrp.c (extract_range_from_binary_expr_1): Check
3413         int_cst_rangeN before calling value_range_constant_singleton (&vrN).
3414
3415 2017-09-21  Richard Biener  <rguenther@suse.de>
3416
3417         PR tree-optimization/71351
3418         * graphite-isl-ast-to-gimple.c (translate_isl_ast_to_gimple::
3419         graphite_create_new_loop_guard): Remove, fold remaining parts
3420         into caller ...
3421         (translate_isl_ast_node_for): ... here and simplify.
3422
3423 2017-09-21  Jakub Jelinek  <jakub@redhat.com>
3424
3425         PR target/82260
3426         * config/i386/i386.md (*movqi_internal): Replace (=q,q) alternative
3427         with (=Q,Q), (=R,R) and (=r,r) alternatives, only enable the
3428         latter two for 64-bit, renumber alternatives, for -Os imov (=q,n)
3429         alternative always use QI mode, for -Os imov (=R,R) alternative
3430         always use SI mode, for imov (=Q,Q) or (=r,r) alternatives
3431         ignore -Os.
3432
3433 2017-09-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
3434             Jeff Law  <law@redhat.com>
3435
3436         * config/s390/s390.c (MIN_UNROLL_PROBES): Define.
3437         (allocate_stack_space): New function, partially extracted from
3438         s390_emit_prologue.
3439         (s390_emit_prologue): Track offset to most recent stack probe.
3440         Code to allocate space moved into allocate_stack_space.
3441         Dump actions when no stack is allocated.
3442         (s390_prologue_plus_offset): New function.
3443         (s390_emit_stack_probe): Likewise.
3444
3445 2017-09-20  Alexandre Oliva <aoliva@redhat.com>
3446
3447         * common.opt (Wa, Wl, Wp, g, gz=): Add
3448         RejectNegative.
3449         (gno-column-info): Remove.
3450         (gcolumn-info): Drop RejectNegative.
3451         (gno-): New prefix.
3452         (gno-record-gcc-switches): Remove.
3453         (grecord-gcc-switches): Drop RejectNegative.
3454         (gno-split-dwarf): Remove.
3455         (gsplit-dwarf): Drop RejectNegative.
3456         (gno-strict-dwarf): Remove.
3457         (gstrict-dwarf): Drop RejectNegative.
3458         * config/darwin.opt (gfull, gused): Add RejectNegative.
3459         * dwarf2out.c (gen_producer_string): Drop
3460         gno-record-gcc-switches handler.
3461         * optc-gen.awk: Add g to prefixes with negative forms.
3462         * opts-common.c (remapping_prefix_p): New.
3463         (find_opt): Check it.
3464         (generate_canonical_option): Test g prefix.
3465         (option_map): Add -gno- mapping.
3466         (add_misspelling_candidates): Check remapping_prefix_p.
3467
3468 2017-09-20  Jeff Law  <law@redhat.com>
3469
3470         * config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Fix
3471         thinko in stack clash protection support.
3472
3473         * explow.c (compute_stack_clash_protection_loop_data): Use
3474         CONST_INT_P instead of explicit test.  Verify object is a
3475         CONST_INT_P before looking at INTVAL.
3476         (anti_adjust_stack_and_probe_stack_clash): Use CONST_INT_P
3477         instead of explicit test.
3478
3479 2017-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
3480
3481         PR target/77687
3482         * config/rs6000/rs6000.md (stack_restore_tie): Store to a scratch
3483         address instead of to r1 and r11.
3484
3485 2017-09-20  Sebastian Peryt  <sebastian.peryt@intel.com>
3486
3487         * config.gcc: Support "knm".
3488         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "knm".
3489         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
3490         PROCESSOR_KNM.
3491         * config/i386/i386.c (m_KNM): Define.
3492         (processor_target_table): Add "knm".
3493         (PTA_KNM): Define.
3494         (ix86_option_override_internal): Add "knm".
3495         (ix86_issue_rate): Add PROCESSOR_KNM.
3496         (ix86_adjust_cost): Ditto.
3497         (ia32_multipass_dfa_lookahead): Ditto.
3498         (get_builtin_code_for_version): Handle PROCESSOR_KNM.
3499         (fold_builtin_cpu): Add M_INTEL_KNM.
3500         * config/i386/i386.h (processor_costs): Define TARGET_KNM.
3501         (processor_type): Add PROCESSOR_KNM.
3502         * config/i386/x86-tune.def: Add m_KNM.
3503         * doc/invoke.texi: Add knm as x86 -march=/-mtune= CPU type.
3504
3505 2017-09-20  Richard Biener  <rguenther@suse.de>
3506
3507         PR tree-optimization/80213
3508         * graphite-scop-detection.c (trivially_empty_bb_p): Labels
3509         are allowed in empty BBs as well.
3510         (canonicalize_loop_closed_ssa): Also look for other complex
3511         edges.
3512         (scop_detection::get_sese): Include the loop-closed PHI block
3513         in loop SESEs.
3514         (scop_detection::merge_sese): Remove code adding extra blocks.
3515         (scop_detection::region_has_one_loop): Adjust for get_sese changes.
3516         (build_scops): Assert the final returned scop is invalid.
3517
3518 2017-09-20  Richard Biener  <rguenther@suse.de>
3519
3520         PR tree-optimization/82264
3521         * tree-ssa-sccvn.c (vn_phi_eq): Use safe_dyn_cast to check
3522         for GIMPLE_CONDs.
3523         (vn_phi_lookup): Likewise.
3524         (vn_phi_insert): Likewise.
3525
3526 2017-09-20  Jakub Jelinek  <jakub@redhat.com>
3527
3528         * dwarf2out.c (tree_add_const_value_attribute): For INTEGER_CST
3529         that fits into uhwi or shwi, add DW_AT_const_value regardless
3530         of early_dwarf without going through RTL, using add_AT_unsigned
3531         or add_AT_int.
3532
3533         * dwarf2out.c (DEBUG_LTO_DWO_INFO_SECTION): Reorder defines.
3534         (DEBUG_LTO_ABBREV_SECTION): Likewise.
3535         (DEBUG_LTO_MACINFO_SECTION): Likewise.
3536         (DEBUG_MACRO_SECTION): Likewise.
3537         (DEBUG_LTO_MACRO_SECTION): Likewise.
3538         (DEBUG_STR_DWO_SECTION): Likewise.
3539         (DEBUG_LTO_STR_DWO_SECTION): Likewise.
3540         (DEBUG_LTO_LINE_SECTION): Drop .dwo suffix from the name.
3541         (DEBUG_LTO_DWO_LINE_SECTION): Define.
3542         (DEBUG_LTO_LINE_STR_SECTION): Define.
3543         (init_sections_and_labels): Initialize debug_line_str_section
3544         variable.  Initialize debug_loc_section for -gdwarf-5 to
3545         DEBUG_LOCLISTS_SECTION.  Formatting fixes.
3546
3547 2017-09-20  Richard Biener  <rguenther@suse.de>
3548
3549         * graphite-sese-to-poly.c (extract_affine): Properly handle
3550         POINTER_PLUS_EXPR, BIT_NOT_EXPR and conversion to signed.
3551
3552 2017-09-20  Richard Biener  <rguenther@suse.de>
3553
3554         PR tree-optimization/81373
3555         * graphite-scop-detection.c (build_cross_bb_scalars_def):
3556         Force SESE live-out defs to be handled even if they are
3557         scev_analyzable_p.
3558
3559 2017-09-19  Jeff Law  <law@redhat.com>
3560
3561         * combine-stack-adj.c (combine_stack_adjustments_for_block): Do
3562         nothing for stack adjustments with REG_STACK_CHECK.
3563         * sched-deps.c (parse_add_or_inc): Reject insns with
3564         REG_STACK_CHECK from dependency breaking.
3565         * config/i386/i386.c (pro_epilogue_adjust_stack): Return insn.
3566         (ix86_adjust_satck_and_probe_stack_clash): Add REG_STACK_NOTEs.
3567         * reg-notes.def (STACK_CHECK): New note.
3568
3569         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): New.
3570         (ix86_expand_prologue): Dump stack clash info as needed.
3571         Call ix86_adjust_stack_and_probe_stack_clash as needed.
3572
3573         * function.c (dump_stack_clash_frame_info): New function.
3574         * function.h (dump_stack_clash_frame_info): Prototype.
3575         (enum stack_clash_probes): New enum.
3576
3577         * config/alpha/alpha.c (alpha_expand_prologue): Also check
3578         flag_stack_clash_protection.
3579         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Likewise.
3580         (arm_expand_prologue, thumb1_expand_prologue): Likewise.
3581         (arm_frame_pointer_required): Likewise.
3582         * config/ia64/ia64.c (ia64_compute_frame_size): Likewise.
3583         (ia64_expand_prologue): Likewise.
3584         * config/mips/mips.c (mips_expand_prologue): Likewise.
3585         * config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Likewise.
3586         * config/sparc/sparc.c (sparc_expand_prologue): Likewise.
3587         (sparc_flat_expand_prologue): Likewise.
3588         * config/spu/spu.c (spu_expand_prologue): Likewise.
3589
3590         * explow.c: Include "params.h".
3591         (anti_adjust_stack_and_probe_stack_clash): New function.
3592         (get_stack_check_protect): Likewise.
3593         (compute_stack_clash_protection_loop_data): Likewise.
3594         (emit_stack_clash_protection_loop_start): Likewise.
3595         (emit_stack_clash_protection_loop_end): Likewise.
3596         (allocate_dynamic_stack_space): Use get_stack_check_protect.
3597         Use anti_adjust_stack_and_probe_stack_clash.
3598         * explow.h (compute_stack_clash_protection_loop_data): Prototype.
3599         (emit_stack_clash_protection_loop_start): Likewise.
3600         (emit_stack_clash_protection_loop_end): Likewise.
3601         * rtl.h (get_stack_check_protect): Prototype.
3602         * target.def (stack_clash_protection_final_dynamic_probe): New hook.
3603         * targhooks.c (default_stack_clash_protection_final_dynamic_probe): New.
3604         * targhooks.h (default_stack_clash_protection_final_dynamic_probe):
3605         Prototype.
3606         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE):
3607         Add @hook.
3608         * doc/tm.texi: Rebuilt.
3609         * config/aarch64/aarch64.c (aarch64_expand_prologue): Use
3610         get_stack_check_protect.
3611         * config/alpha/alpha.c (alpha_expand_prologue): Likewise.
3612         * config/arm/arm.c (arm_expand_prologue): Likewise.
3613         (arm_frame_pointer_required): Likewise.
3614         * config/i386/i386.c (ix86_expand_prologue): Likewise.
3615         * config/ia64/ia64.c (ia64_expand_prologue): Likewise.
3616         * config/mips/mips.c (mips_expand_prologue): Likewise.
3617         * config/powerpcspe/powerpcspe.c (rs6000_emit_prologue): Likewise.
3618         * config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise.
3619         * config/sparc/sparc.c (sparc_expand_prologue): Likewise.
3620         (sparc_flat_expand_prologue): Likewise.
3621
3622         * common.opt (-fstack-clash-protection): New option.
3623         * flag-types.h (enum stack_check_type): Note difference between
3624         -fstack-check= and -fstack-clash-protection.
3625         * params.def (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE): New PARAM.
3626         (PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Likewise.
3627         * toplev.c (process_options): Issue warnings/errors for cases
3628         not handled with -fstack-clash-protection.
3629         * doc/invoke.texi (-fstack-clash-protection): Document new option.
3630         (-fstack-check): Note additional problem with -fstack-check=generic.
3631         Note that -fstack-check is primarily for Ada and refer users
3632         to -fstack-clash-protection for stack-clash-protection.
3633         Document new params for stack clash protection.
3634
3635 2017-09-19  Uros Bizjak  <ubizjak@gmail.com>
3636
3637         * config/i386/i386.c (ix86_split_long_move): Do not handle
3638         address used for LEA in a special way.
3639
3640 2017-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
3641
3642         * simplify-rtx.c (simplify_binary_operation_1): Fix typo in comment.
3643
3644 2017-09-19  Martin Sebor  <msebor@redhat.com>
3645
3646         PR c/81854
3647         * cgraphunit.c (handle_alias_pairs): Reject aliases between functions
3648         of incompatible types.
3649
3650 2017-09-19  Will Schmidt  <will_schmidt@vnet.ibm.com>
3651
3652         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
3653         for early folding of vector loads (ALTIVEC_BUILTIN_LVX_*).
3654         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
3655         Remove obsoleted code for handling ALTIVEC_BUILTIN_VEC_LD.
3656
3657 2017-09-19  Richard Biener  <rguenther@suse.de>
3658
3659         PR tree-optimization/82244
3660         * tree-vrp.c (remove_range_assertions): Do not propagate
3661         a constant to abnormals but replace the assert with a copy.
3662
3663 2017-09-19  Alexander Monakov  <amonakov@ispras.ru>
3664
3665         PR rtl-optimization/57878
3666         PR rtl-optimization/68988
3667         * lra-assigns.c (reload_pseudo_compare_func): Remove fragmentation
3668         avoidance test involving non_reload_pseudos.  Move frequency test
3669         below the general fragmentation avoidance test.
3670
3671 2017-09-19  Richard Biener  <rguenther@suse.de>
3672
3673         PR tree-optimization/69728
3674         * graphite-sese-to-poly.c (schedule_error): New global.
3675         (add_loop_schedule): Handle empty domain by failing the
3676         schedule.
3677         (build_original_schedule): Handle schedule_error.
3678
3679 2017-09-19  Richard Biener  <rguenther@suse.de>
3680
3681         * graphite-scop-detection.c (scop_detection::can_represent_loop):
3682         Do not iterate to sibling loops but only to siblings of inner
3683         loops.
3684
3685 2017-09-18  Andreas Schwab  <schwab@linux-m68k.org>
3686
3687         PR target/81613
3688         * config/m68k/m68k.md (moveq feeding equality comparison): Check
3689         that the registers are different.
3690
3691 2017-09-18  Uros Bizjak  <ubizjak@gmail.com>
3692
3693         * config/i386/i386.c (fold_builtin_cpu): Add M_AMDFAM17H
3694         to processor_model and "amdfam17h" to arch_names_table.
3695         * doc/extend.texi (__builtin_cpu_is): Document amdfam17h CPU name.
3696
3697 2017-09-18  Jakub Jelinek  <jakub@redhat.com>
3698
3699         PR c/82234
3700         * doc/extend.texi: Add @findex entry for __builtin_shuffle.
3701
3702 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
3703             Alan Hayward  <alan.hayward@arm.com>
3704             David Sherwood  <david.sherwood@arm.com>
3705
3706         * tree-vectorizer.h (vect_slp_analyze_operations): Replace parameters
3707         with a vec_info *.
3708         * tree-vect-loop.c (vect_analyze_loop_operations): Update call
3709         accordingly.
3710         * tree-vect-slp.c (vect_slp_analyze_node_operations): Add vec_info *
3711         parameter.  Set SLP_TREE_NUMBER_OF_VEC_STMTS here rather than in
3712         vect_schedule_slp_instance.
3713         (vect_slp_analyze_operations): Replace parameters with a vec_info *.
3714         Update call to vect_slp_analyze_node_operations.  Simplify return
3715         value.
3716         (vect_slp_analyze_bb_1): Update call accordingly.
3717         (vect_schedule_slp_instance): Remove vectorization_factor parameter.
3718         Don't calculate SLP_TREE_NUMBER_OF_VEC_STMTS here.
3719         (vect_schedule_slp): Update call accordingly.
3720
3721 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
3722             Alan Hayward  <alan.hayward@arm.com>
3723             David Sherwood  <david.sherwood@arm.com>
3724
3725         * tree-vect-data-refs.c (vect_get_smallest_scalar_type): Cope
3726         with types that aren't in fact scalar.
3727
3728 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
3729
3730         * tree-vect-slp.c (vect_record_max_nunits): New function,
3731         split out from...
3732         (vect_build_slp_tree_1): ...here.
3733         (vect_build_slp_tree_2): Call it for phis too.
3734
3735 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
3736
3737         * tree-vect-stmts.c (vectorizable_mask_load_store): Pass mask_vectype
3738         to vect_get_vec_def_for_operand when getting the mask operand.
3739
3740 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
3741             Alan Hayward  <alan.hayward@arm.com>
3742             David Sherwood  <david.sherwood@arm.com>
3743
3744         * tree-vect-loop.c (vectorizable_live_operation): Fix type of
3745         bitstart.
3746
3747 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
3748             Alan Hayward  <alan.hayward@arm.com>
3749             David Sherwood  <david.sherwood@arm.com>
3750
3751         * tree-vect-loop.c (vectorizable_live_operation): Fix element size
3752         calculation for vector booleans.
3753
3754 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
3755             Alan Hayward  <alan.hayward@arm.com>
3756             David Sherwood  <david.sherwood@arm.com>
3757
3758         * tree-vect-stmts.c (can_vectorize_live_stmts): New function,
3759         split out from...
3760         (vect_transform_stmt): ...here.
3761         (vect_analyze_stmt): Use it instead of calling
3762         vectorizable_live_operation directly.
3763
3764 2017-09-18  Cesar Philippidis  <cesar@codesourcery.com>
3765
3766         * omp-offload.c (oacc_xform_loop): Enable SIMD vectorization on
3767         non-SIMT targets in acc vector loops.
3768
3769 2017-09-18  Claudiu Zissulescu  <claziss@synopsys.com>
3770
3771         * configure.ac: Add arc and check if assembler supports gdwarf2.
3772         * configure: Regenerate.
3773
3774 2017-09-18  Richard Biener  <rguenther@suse.de>
3775
3776         PR tree-optimization/82220
3777         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Exclude
3778         epilogue niters from the min_profitable_iters compute.
3779
3780 2017-09-18  Jakub Jelinek  <jakub@redhat.com>
3781
3782         PR target/82145
3783         * config/i386/i386.c (ix86_init_large_pic_reg): Revert 2017-09-01
3784         changes.  Turn CODE_LABEL into NOTE_INSN_DELETED_LABEL immediately.
3785         (ix86_init_pic_reg): Revert 2017-09-01 changes.
3786
3787 2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>
3788
3789         PR target/81361
3790         * dwarf2cfi.c (add_cfis_to_fde): Do not generate DW_CFA_set_loc after
3791         switching to a new text section.
3792
3793 2017-09-18  Richard Biener  <rguenther@suse.de>
3794
3795         * graphite-scop-detection.c (scop_detection::stmt_has_simple_data_ref):
3796         Simplify.
3797         (build_alias_set): Reject aliases with no access function.
3798
3799 2017-09-18  Richard Biener  <rguenther@suse.de>
3800
3801         PR tree-optimization/79622
3802         * graphite-scop-detection.c (build_cross_bb_scalars_def): Properly
3803         handle PHIs.
3804         (build_cross_bb_scalars_use): Likewise.
3805
3806 2017-09-18  Pierre-Marie de Rodat  <derodat@adacore.com>
3807
3808         * cgraph.h (cgraph_thunk_info): Fix a typo in a comment.
3809
3810 2017-09-18  Alan Modra  <amodra@gmail.com>
3811
3812         PR target/81996
3813         * gcc/config/rs6000/rs6000.c (rs6000_return_addr): Use
3814         stack_pointer_rtx for count 0.  Update comments.  Break up
3815         large rtl expression.
3816
3817 2017-09-17  Daniel Santos  <daniel.santos@pobox.com>
3818
3819         * config/i386/i386.c (xlogue_layout::STUB_NAME_MAX_LEN):
3820         Increase to 20 bytes.
3821         (xlogue_layout::s_stub_names): Add an additional size-2 diminsion.
3822         (xlogue_layout::get_stub_name): Modify to select the appropairate sse
3823         or avx version of the stub.
3824
3825 2017-09-17  H.J. Lu  <hongjiu.lu@intel.com>
3826
3827         PR target/82166
3828         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Properly
3829         compute the minimum stack alignment.  Also update preferred stack
3830         boundary for leaf functions.
3831
3832 2017-09-16  Richard Sandiford  <richard.sandiford@linaro.org>
3833
3834         PR tree-optimization/82228
3835         * tree-vect-loop.c (vectorizable_live_operation): Move initialization
3836         of ncopies.
3837
3838 2017-09-16  Chung-Ju Wu  <jasonwucj@gmail.com>
3839
3840         * common/config/nds32/nds32-common.c
3841         (nds32_option_optimization_table): Refine formatting.
3842         (nds32_option_optimization_table): Use -fsched-pressure and
3843         -fomit-frame-pointer for specific optimization level.
3844
3845 2017-09-16  Chung-Ju Wu  <jasonwucj@gmail.com>
3846
3847         * config/nds32/nds32.c: Refine formatting and comments.
3848         * config/nds32/nds32.h: Likewise.
3849         * config/nds32/nds32.md: Likewise.
3850         * config/nds32/nds32-cost.c: Likewise.
3851         * config/nds32/nds32-isr.c: Likewise.
3852         * config/nds32/nds32-md-auxiliary.c: Likewise.
3853         * config/nds32/nds32-multiple.md: Likewise.
3854         * config/nds32/nds32-predicates.c: Likewise.
3855
3856 2017-09-15  Andrew Sutton  <andrew.n.sutton@gmail.com>
3857             Jakub Jelinek  <jakub@redhat.com>
3858
3859         Add support for -std=c++2a.
3860         * doc/cpp.texi (__cplusplus): Document value for -std=c++2a
3861         or -std=gnu+2a.
3862         * doc/invoke.texi: Document -std=c++2a and -std=gnu++2a.
3863
3864 2017-09-15  Steve Ellcey  <sellcey@cavium.com>
3865
3866         PR target/82066
3867         * doc/extend.texi (Common Function Attributes): Add 
3868         references to ARM, AArch64, and S/390 specific attributes.
3869         (Function Specific Option Pragmas): Add AArch64 and S/390
3870         to list of back ends that support the target pragma.
3871
3872 2017-09-15  Nathan Sidwell  <nathan@acm.org>
3873
3874         * doc/standards.texi: Fix C++17 description.  Update URLs for
3875         C++11 & 14.
3876
3877 2017-09-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3878
3879         * common.opt (Wcast-align=strict): New warning option.
3880         * doc/invoke.texi: Document -Wcast-align=strict. 
3881
3882 2017-09-15  Pierre-Marie de Rodat  <derodat@adacore.com>
3883
3884         * cgraph.h (cgraph_thunk_info): Add comments.
3885         * cgraph.c (cgraph_node::create_thunk): Adjust comment, make
3886         assert for VIRTUAL_* arguments stricter.
3887
3888 2017-09-15  Jackson Woodruff  <jackson.woodruff@arm.com>
3889
3890         PR tree-optimization/71026
3891         * match.pd: Move RDIV patterns from fold-const.c
3892         * fold-const.c (distribute_real_division): Removed.
3893         (fold_binary_loc): Remove calls to distribute_real_divison.
3894
3895 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
3896
3897         * doc/invoke.texi: Document -std=c++17 and -std=gnu++17 and document
3898         c++1z and gnu++1z as deprecated.  Change other references to
3899         -std=c++1z to -std=c++17 and -std=gnu++1z to -std=gnu++17.
3900         Change -Wc++1z-compat to -Wc++17-compat.
3901         * doc/cpp.texi: Document -std=c++17 defines __cplusplus 201703L.
3902         * dwarf2out.c (highest_c_language): Handle C++17.
3903         (gen_compile_unit_die): Likewise.
3904
3905 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
3906
3907         PR rtl-optimization/82192
3908         * combine.c (make_extraction): Don't look through non-paradoxical
3909         SUBREGs or TRUNCATE if pos + len is or might be bigger than
3910         inner's mode.
3911
3912 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
3913             Alan Hayward  <alan.hayward@arm.com>
3914             David Sherwood  <david.sherwood@arm.com>
3915
3916         * target.def (function_arg_offset): New hook.
3917         * targhooks.h (default_function_arg_offset): Declare.
3918         * targhooks.c (default_function_arg_offset): New function.
3919         * function.c (locate_and_pad_parm): Use
3920         targetm.calls.function_arg_offset instead of FUNCTION_ARG_OFFSET.
3921         * doc/tm.texi.in (FUNCTION_ARG_OFFSET): Replace with...
3922         (TARGET_FUNCTION_ARG_OFFSET): ...this.
3923         * doc/tm.texi: Regenerate.
3924         * config/spu/spu.h (FUNCTION_ARG_OFFSET): Delete.
3925         * config/spu/spu.c (spu_function_arg_offset): New function.
3926         (TARGET_FUNCTION_ARG_OFFSET): Redefine.
3927         * system.h (FUNCTION_ARG_OFFSET): Poison.
3928
3929 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
3930             Alan Hayard  <alan.hayward@arm.com>
3931             David Sherwood  <david.sherwood@arm.com>
3932
3933         * target.def (truly_noop_truncation): New hook.
3934         (mode_rep_extended): Refer to TARGET_TRULY_NOOP_TRUNCATION rather
3935         than TRULY_NOOP_TRUNCATION.
3936         * hooks.h (hook_bool_uint_uint_true): Declare.
3937         * hooks.c (hook_bool_uint_uint_true): New function.
3938         * doc/tm.texi.in (TRULY_NOOP_TRUNCATION): Replace with...
3939         (TARGET_TRULY_NOOP_TRUNCATION): ...this.
3940         * doc/tm.texi: Regenerate.
3941         * combine.c (make_extraction): Refer to TARGET_TRULY_NOOP_TRUNCATION
3942         rather than TRULY_NOOP_TRUNCATION in comments.
3943         (simplify_comparison): Likewise.
3944         (record_truncated_value): Likewise.
3945         * expmed.c (extract_bit_field_1): Likewise.
3946         (extract_split_bit_field): Likewise.
3947         * convert.c (convert_to_integer_1): Use targetm.truly_noop_truncation
3948         instead of TRULY_NOOP_TRUNCATION.
3949         * function.c (assign_parm_setup_block): Likewise.
3950         * machmode.h (TRULY_NOOP_TRUNCATION_MODES_P): Likewise.
3951         * rtlhooks.c: Include target.h.
3952         * config/aarch64/aarch64.h (TRULY_NOOP_TRUNCATION): Delete.
3953         * config/alpha/alpha.h (TRULY_NOOP_TRUNCATION): Delete.
3954         * config/arc/arc.h (TRULY_NOOP_TRUNCATION): Delete.
3955         * config/arm/arm.h (TRULY_NOOP_TRUNCATION): Delete.
3956         * config/avr/avr.h (TRULY_NOOP_TRUNCATION): Delete.
3957         * config/bfin/bfin.h (TRULY_NOOP_TRUNCATION): Delete.
3958         * config/c6x/c6x.h (TRULY_NOOP_TRUNCATION): Delete.
3959         * config/cr16/cr16.h (TRULY_NOOP_TRUNCATION): Delete.
3960         * config/cris/cris.h (TRULY_NOOP_TRUNCATION): Delete.
3961         * config/epiphany/epiphany.h (TRULY_NOOP_TRUNCATION): Delete.
3962         * config/fr30/fr30.h (TRULY_NOOP_TRUNCATION): Delete.
3963         * config/frv/frv.h (TRULY_NOOP_TRUNCATION): Delete.
3964         * config/ft32/ft32.h (TRULY_NOOP_TRUNCATION): Delete.
3965         * config/h8300/h8300.h (TRULY_NOOP_TRUNCATION): Delete.
3966         * config/i386/i386.h (TRULY_NOOP_TRUNCATION): Delete.
3967         * config/ia64/ia64.h (TRULY_NOOP_TRUNCATION): Delete.
3968         * config/iq2000/iq2000.h (TRULY_NOOP_TRUNCATION): Delete.
3969         * config/lm32/lm32.h (TRULY_NOOP_TRUNCATION): Delete.
3970         * config/m32c/m32c.h (TRULY_NOOP_TRUNCATION): Delete.
3971         * config/m32r/m32r.h (TRULY_NOOP_TRUNCATION): Delete.
3972         * config/m68k/m68k.h (TRULY_NOOP_TRUNCATION): Delete.
3973         * config/mcore/mcore.h (TRULY_NOOP_TRUNCATION): Delete.
3974         * config/microblaze/microblaze.h (TRULY_NOOP_TRUNCATION): Delete.
3975         * config/mips/mips.h (TRULY_NOOP_TRUNCATION): Delete.
3976         * config/mips/mips.c (mips_truly_noop_truncation): New function.
3977         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
3978         * config/mips/mips.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
3979         rather than TRULY_NOOP_TRUNCATION in comments.
3980         * config/mmix/mmix.h (TRULY_NOOP_TRUNCATION): Delete.
3981         * config/mn10300/mn10300.h (TRULY_NOOP_TRUNCATION): Delete.
3982         * config/moxie/moxie.h (TRULY_NOOP_TRUNCATION): Delete.
3983         * config/msp430/msp430.h (TRULY_NOOP_TRUNCATION): Delete.
3984         * config/nds32/nds32.h (TRULY_NOOP_TRUNCATION): Delete.
3985         * config/nios2/nios2.h (TRULY_NOOP_TRUNCATION): Delete.
3986         * config/nvptx/nvptx.h (TRULY_NOOP_TRUNCATION): Delete.
3987         * config/pa/pa.h (TRULY_NOOP_TRUNCATION): Delete.
3988         * config/pdp11/pdp11.h (TRULY_NOOP_TRUNCATION): Delete.
3989         * config/powerpcspe/powerpcspe.h (TRULY_NOOP_TRUNCATION): Delete.
3990         * config/riscv/riscv.h (TRULY_NOOP_TRUNCATION): Delete.
3991         * config/riscv/riscv.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
3992         rather than TRULY_NOOP_TRUNCATION in comments.
3993         * config/rl78/rl78.h (TRULY_NOOP_TRUNCATION): Delete.
3994         * config/rs6000/rs6000.h (TRULY_NOOP_TRUNCATION): Delete.
3995         * config/rx/rx.h (TRULY_NOOP_TRUNCATION): Delete.
3996         * config/s390/s390.h (TRULY_NOOP_TRUNCATION): Delete.
3997         * config/sh/sh.h (MAYBE_BASE_REGISTER_RTX_P): Remove
3998         TRULY_NOOP_TRUNCATION condition.
3999         (MAYBE_INDEX_REGISTER_RTX_P): Likewise.
4000         (TRULY_NOOP_TRUNCATION): Delete.
4001         * config/sparc/sparc.h (TRULY_NOOP_TRUNCATION): Delete.
4002         * config/spu/spu.h (TRULY_NOOP_TRUNCATION): Delete.
4003         * config/spu/spu.c (spu_truly_noop_truncation): New function.
4004         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
4005         * config/stormy16/stormy16.h (TRULY_NOOP_TRUNCATION): Delete.
4006         * config/tilegx/tilegx.h (TRULY_NOOP_TRUNCATION): Delete.
4007         * config/tilegx/tilegx.c (tilegx_truly_noop_truncation): New fuction.
4008         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
4009         * config/tilegx/tilegx.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
4010         rather than TRULY_NOOP_TRUNCATION in comments.
4011         * config/tilepro/tilepro.h (TRULY_NOOP_TRUNCATION): Delete.
4012         * config/v850/v850.h (TRULY_NOOP_TRUNCATION): Delete.
4013         * config/vax/vax.h (TRULY_NOOP_TRUNCATION): Delete.
4014         * config/visium/visium.h (TRULY_NOOP_TRUNCATION): Delete.
4015         * config/xtensa/xtensa.h (TRULY_NOOP_TRUNCATION): Delete.
4016         * system.h (TRULY_NOOP_TRUNCATION): Poison.
4017
4018 2017-09-15  Christophe Lyon  <christophe.lyon@linaro.org>
4019
4020         PR target/67591
4021         * config/arm/arm.md (*cmp_and): Add enabled_for_depr_it attribute.
4022         (*cmp_ior): Likewise.
4023         (*ior_scc_scc): Add alternative for enabled_for_depr_it attribute.
4024         (*ior_scc_scc_cmp): Likewise.
4025         (*and_scc_scc): Likewise.
4026         (*and_scc_scc_cmp): Likewise.
4027
4028 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
4029             Alan Hayard  <alan.hayward@arm.com>
4030             David Sherwood  <david.sherwood@arm.com>
4031
4032         * target.def (can_change_mode_class): New hook.
4033         (mode_rep_extended): Refer to it instead of CANNOT_CHANGE_MODE_CLASS.
4034         (hard_regno_nregs): Likewise.
4035         * hooks.h (hook_bool_mode_mode_reg_class_t_true): Declare.
4036         * hooks.c (hook_bool_mode_mode_reg_class_t_true): New function.
4037         * doc/tm.texi.in (CANNOT_CHANGE_MODE_CLASS): Replace with...
4038         (TARGET_CAN_CHANGE_MODE_CLASS): ...this.
4039         (LOAD_EXTEND_OP): Update accordingly.
4040         * doc/tm.texi: Regenerate.
4041         * doc/rtl.texi: Refer to TARGET_CAN_CHANGE_MODE_CLASS instead of
4042         CANNOT_CHANGE_MODE_CLASS.
4043         * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): Replace with...
4044         (REG_CAN_CHANGE_MODE_P): ...this new macro.
4045         * combine.c (simplify_set): Update accordingly.
4046         * emit-rtl.c (validate_subreg): Likewise.
4047         * recog.c (general_operand): Likewise.
4048         * regcprop.c (mode_change_ok): Likewise.
4049         * reload1.c (choose_reload_regs): Likewise.
4050         (inherit_piecemeal_p): Likewise.
4051         * rtlanal.c (simplify_subreg_regno): Likewise.
4052         * postreload.c (reload_cse_simplify_set): Use REG_CAN_CHANGE_MODE_P
4053         instead of CANNOT_CHANGE_MODE_CLASS.
4054         (reload_cse_simplify_operands): Likewise.
4055         * reload.c (push_reload): Use targetm.can_change_mode_class
4056         instead of CANNOT_CHANGE_MODE_CLASS.
4057         (push_reload): Likewise.  Also use REG_CAN_CHANGE_MODE_P instead of
4058         REG_CANNOT_CHANGE_MODE_P.
4059         * config/alpha/alpha.h (CANNOT_CHANGE_MODE_CLASS): Delete.
4060         * config/alpha/alpha.c (alpha_can_change_mode_class): New function.
4061         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
4062         * config/arm/arm.h (CANNOT_CHANGE_MODE_CLASS): Delete.
4063         * config/arm/arm.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
4064         (arm_can_change_mode_class): New function.
4065         * config/arm/neon.md: Refer to TARGET_CAN_CHANGE_MODE_CLASS rather
4066         than CANNOT_CHANGE_MODE_CLASS in comments.
4067         * config/i386/i386.h (CANNOT_CHANGE_MODE_CLASS): Delete.
4068         * config/i386/i386-protos.h (ix86_cannot_change_mode_class): Delete.
4069         * config/i386/i386.c (ix86_cannot_change_mode_class): Replace with...
4070         (ix86_can_change_mode_class): ...this new function, inverting the
4071         sense of the return value.
4072         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
4073         * config/ia64/ia64.h (CANNOT_CHANGE_MODE_CLASS): Delete.
4074         * config/ia64/ia64.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
4075         (ia64_can_change_mode_class): New function.
4076         * config/m32c/m32c.h (CANNOT_CHANGE_MODE_CLASS): Delete.
4077         * config/m32c/m32c-protos.h (m32c_cannot_change_mode_class): Delete.
4078         * config/m32c/m32c.c (m32c_cannot_change_mode_class): Replace with...
4079         (m32c_can_change_mode_class): ...this new function, inverting the
4080         sense of the return value.
4081         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
4082         * config/mips/mips.h (CANNOT_CHANGE_MODE_CLASS): Delete.
4083         * config/mips/mips-protos.h (mips_cannot_change_mode_class): Delete.
4084         * config/mips/mips.c (mips_cannot_change_mode_class): Replace with...
4085         (mips_can_change_mode_class): ...this new function, inverting the
4086         sense of the return value.
4087         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
4088         * config/msp430/msp430.h (CANNOT_CHANGE_MODE_CLASS): Delete.
4089         * config/msp430/msp430.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
4090         (msp430_can_change_mode_class): New function.
4091         * config/nvptx/nvptx.h (CANNOT_CHANGE_MODE_CLASS): Delete.
4092         * config/nvptx/nvptx.c (nvptx_can_change_mode_class): New function.
4093         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
4094         * config/pa/pa32-regs.h (CANNOT_CHANGE_MODE_CLASS): Delete.
4095         * config/pa/pa64-regs.h (CANNOT_CHANGE_MODE_CLASS): Delete.
4096         * config/pa/pa-protos.h (pa_cannot_change_mode_class): Delete.
4097         * config/pa/pa.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
4098         (pa_cannot_change_mode_class): Replace with...
4099         (pa_can_change_mode_class): ...this new function, inverting the
4100         sense of the return value.
4101         (pa_modes_tieable_p): Refer to TARGET_CAN_CHANGE_MODE_CLASS rather
4102         than CANNOT_CHANGE_MODE_CLASS in comments.
4103         * config/pdp11/pdp11.h (CANNOT_CHANGE_MODE_CLASS): Delete.
4104         * config/pdp11/pdp11-protos.h (pdp11_cannot_change_mode_class): Delete.
4105         * config/pdp11/pdp11.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
4106         (pdp11_cannot_change_mode_class): Replace with...
4107         (pdp11_can_change_mode_class): ...this new function, inverting the
4108         sense of the return value.
4109         * config/powerpcspe/powerpcspe.h (CANNOT_CHANGE_MODE_CLASS): Delete.
4110         * config/powerpcspe/powerpcspe-protos.h
4111         (rs6000_cannot_change_mode_class_ptr): Delete.
4112         * config/powerpcspe/powerpcspe.c
4113         (rs6000_cannot_change_mode_class_ptr): Delete.
4114         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
4115         (rs6000_option_override_internal): Assign to
4116         targetm.can_change_mode_class instead of
4117         rs6000_cannot_change_mode_class_ptr.
4118         (rs6000_cannot_change_mode_class): Replace with...
4119         (rs6000_can_change_mode_class): ...this new function, inverting the
4120         sense of the return value.
4121         (rs6000_debug_cannot_change_mode_class): Replace with...
4122         (rs6000_debug_can_change_mode_class): ...this new function.
4123         * config/riscv/riscv.h (CANNOT_CHANGE_MODE_CLASS): Delete.
4124         * config/riscv/riscv.c (riscv_can_change_mode_class): New function.
4125         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
4126         * config/rs6000/rs6000.h (CANNOT_CHANGE_MODE_CLASS): Delete.
4127         * config/rs6000/rs6000-protos.h (rs6000_cannot_change_mode_class_ptr):
4128         Delete.
4129         * config/rs6000/rs6000.c (rs6000_cannot_change_mode_class_ptr): Delete.
4130         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
4131         (rs6000_option_override_internal): Assign to
4132         targetm.can_change_mode_class instead of
4133         rs6000_cannot_change_mode_class_ptr.
4134         (rs6000_cannot_change_mode_class): Replace with...
4135         (rs6000_can_change_mode_class): ...this new function, inverting the
4136         sense of the return value.
4137         (rs6000_debug_cannot_change_mode_class): Replace with...
4138         (rs6000_debug_can_change_mode_class): ...this new function.
4139         * config/s390/s390.h (CANNOT_CHANGE_MODE_CLASS): Delete.
4140         * config/s390/s390-protos.h (s390_cannot_change_mode_class): Delete.
4141         * config/s390/s390.c (s390_cannot_change_mode_class): Replace with...
4142         (s390_can_change_mode_class): ...this new function, inverting the
4143         sense of the return value.
4144         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
4145         * config/sh/sh.h (CANNOT_CHANGE_MODE_CLASS): Delete.
4146         * config/sh/sh-protos.h (sh_cannot_change_mode_class): Delete.
4147         * config/sh/sh.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
4148         (sh_cannot_change_mode_class): Replace with...
4149         (sh_can_change_mode_class): ...this new function, inverting the
4150         sense of the return value.
4151         * config/sparc/sparc.h (CANNOT_CHANGE_MODE_CLASS): Delete.
4152         * config/sparc/sparc.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
4153         (sparc_can_change_mode_class): New function.
4154         * config/spu/spu.h (CANNOT_CHANGE_MODE_CLASS): Delete.
4155         * config/spu/spu.c (spu_can_change_mode_class): New function.
4156         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
4157         * config/visium/visium.h (CANNOT_CHANGE_MODE_CLASS): Delete.
4158         * config/visium/visium.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
4159         (visium_can_change_mode_class): New function.
4160         * system.h (CANNOT_CHANGE_MODE_CLASS): Poison.
4161
4162 2017-09-15  Richard Biener  <rguenther@suse.de>
4163
4164         PR tree-optimization/82217
4165         * tree-ssa-sccvn.c (visit_phi): Properly handle all VN_TOP
4166         but not undefined case.
4167
4168 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
4169
4170         PR target/82145
4171         * postreload.c (reload_cse_simplify_operands): Skip
4172         NOTE_INSN_DELETED_LABEL similarly to skipping CODE_LABEL.
4173
4174 2017-09-15  Richard Biener  <rguenther@suse.de>
4175
4176         PR tree-optimization/68823
4177         * graphite-scop-detection.c (build_alias_set): If we have a
4178         possible dependence check whether we can handle them by just
4179         looking at the DRs DR_ACCESS_FNs.
4180         (build_scops): If build_alias_set fails, fail the SCOP.
4181
4182 2017-09-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
4183
4184         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_1_HW): New macros
4185         to support float128 built-in functions that require the ISA 3.0
4186         hardware.
4187         (BU_FLOAT128_3_HW): Likewise.
4188         (SQRTF128): Add support for the IEEE 128-bit square root and fma
4189         built-in functions.
4190         (FMAF128): Likewise.
4191         (FMAQ): Likewise.
4192         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
4193         support for built-in functions that need the ISA 3.0 IEEE 128-bit
4194         floating point instructions.
4195         (rs6000_invalid_builtin): Likewise.
4196         (rs6000_builtin_mask_names): Likewise.
4197         * config/rs6000/rs6000.h (MASK_FLOAT128_HW): Likewise.
4198         (RS6000_BTM_FLOAT128_HW): Likewise.
4199         (RS6000_BTM_COMMON): Likewise.
4200         * config/rs6000/rs6000.md (fma<mode>4_hw): Add a generator
4201         function.
4202         * doc/extend.texi (RS/6000 built-in functions): Document the
4203         IEEE 128-bit floating point square root and fused multiply-add
4204         built-in functions.
4205
4206 2017-09-14  Pat Haugen  <pthaugen@us.ibm.com>
4207
4208         * config/rs6000/rs6000.c (rs6000_set_up_by_prologue): Make sure the TOC
4209         reg (r2) isn't in the set of registers defined in the prologue.
4210
4211 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
4212             Alan Hayward  <alan.hayward@arm.com>
4213             David Sherwood  <david.sherwood@arm.com>
4214
4215         * tree-vectorizer.h (_loop_vec_info): Add max_vectorization_factor.
4216         (LOOP_VINFO_MAX_VECT_FACTOR): New macro.
4217         (LOOP_VINFO_ORIG_VECT_FACTOR): Replace with...
4218         (LOOP_VINFO_ORIG_MAX_VECT_FACTOR): ...this new macro.
4219         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Update
4220         accordingly.
4221         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
4222         max_vectorization_factor.
4223         (vect_analyze_loop_2): Set LOOP_VINFO_MAX_VECT_FACTOR.
4224
4225 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
4226             Alan Hayward  <alan.hayward@arm.com>
4227             David Sherwood  <david.sherwood@arm.com>
4228
4229         * tree-vectorizer.h (vect_min_worthwhile_factor): Delete.
4230         (vect_worthwhile_without_simd_p): Declare.
4231         * tree-vect-loop.c (vect_worthwhile_without_simd_p): New function.
4232         (vectorizable_reduction): Use it.
4233         * tree-vect-stmts.c (vectorizable_shift): Likewise.
4234         (vectorizable_operation): Likewise.
4235
4236 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
4237             Alan Hayward  <alan.hayward@arm.com>
4238             David Sherwood  <david.sherwood@arm.com>
4239
4240         * tree-vectorizer.h (vect_get_num_copies): New function.
4241         * tree-vect-data-refs.c (vect_get_data_access_cost): Use it.
4242         * tree-vect-loop.c (vectorizable_reduction): Likewise.
4243         (vectorizable_induction): Likewise.
4244         (vectorizable_live_operation): Likewise.
4245         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
4246         (vectorizable_bswap): Likewise.
4247         (vectorizable_call): Likewise.
4248         (vectorizable_conversion): Likewise.
4249         (vectorizable_assignment): Likewise.
4250         (vectorizable_shift): Likewise.
4251         (vectorizable_operation): Likewise.
4252         (vectorizable_store): Likewise.
4253         (vectorizable_load): Likewise.
4254         (vectorizable_condition): Likewise.
4255         (vectorizable_comparison): Likewise.
4256         (vect_analyze_stmt): Pass the slp node to vectorizable_live_operation.
4257
4258 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
4259             Alan Hayward  <alan.hayward@arm.com>
4260             David Sherwood  <david.sherwood@arm.com>
4261
4262         * tree-vect-loop.c (vectorizable_induction): Use gimple_build instead
4263         of vect_init_vector.
4264
4265 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
4266             Alan Hayward  <alan.hayward@arm.com>
4267             David Sherwood  <david.sherwood@arm.com>
4268
4269         * gimple-fold.h (gimple_build_vector_from_val): Declare, and provide
4270         an inline wrapper that provides a location.
4271         (gimple_build_vector): Likewise.
4272         * gimple-fold.c (gimple_build_vector_from_val): New function.
4273         (gimple_build_vector): Likewise.
4274         * tree-vect-loop.c (get_initial_def_for_reduction): Use the new
4275         functions to build the initial value.  Always return a gimple value.
4276         (get_initial_defs_for_reduction): Likewise.  Only compute
4277         neutral_vec once.
4278         (vect_create_epilog_for_reduction): Don't call force_gimple_operand or
4279         vect_init_vector on the results from get_initial_def(s)_for_reduction.
4280         (vectorizable_induction): Use gimple_build_vector rather than
4281         vect_init_vector.
4282
4283 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
4284             Alan Hayward  <alan.hayward@arm.com>
4285             David Sherwood  <david.sherwood@arm.com>
4286
4287         * target.h (vec_perm_indices): New typedef.
4288         (auto_vec_perm_indices): Likewise.
4289         * optabs-query.h: Include target.h
4290         (can_vec_perm_p): Take a vec_perm_indices *.
4291         * optabs-query.c (can_vec_perm_p): Likewise.
4292         (can_mult_highpart_p): Update accordingly.  Use auto_vec_perm_indices.
4293         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
4294         * tree-vect-generic.c (lower_vec_perm): Likewise.
4295         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
4296         (vect_grouped_load_supported): Likewise.
4297         (vect_shift_permute_load_chain): Likewise.
4298         (vect_permute_store_chain): Use auto_vec_perm_indices.
4299         (vect_permute_load_chain): Likewise.
4300         * fold-const.c (fold_vec_perm): Take vec_perm_indices.
4301         (fold_ternary_loc): Update accordingly.  Use auto_vec_perm_indices.
4302         Update uses of can_vec_perm_p.
4303         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Replace the
4304         mode with a number of elements.  Take a vec_perm_indices *.
4305         (vect_create_epilog_for_reduction): Update accordingly.
4306         Use auto_vec_perm_indices.
4307         (have_whole_vector_shift): Likewise.  Update call to can_vec_perm_p.
4308         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
4309         (vect_transform_slp_perm_load): Likewise.
4310         (vect_schedule_slp_instance): Use auto_vec_perm_indices.
4311         * tree-vectorizer.h (vect_gen_perm_mask_any): Take a vec_perm_indices.
4312         (vect_gen_perm_mask_checked): Likewise.
4313         * tree-vect-stmts.c (vect_gen_perm_mask_any): Take a vec_perm_indices.
4314         (vect_gen_perm_mask_checked): Likewise.
4315         (vectorizable_mask_load_store): Use auto_vec_perm_indices.
4316         (vectorizable_store): Likewise.
4317         (vectorizable_load): Likewise.
4318         (perm_mask_for_reverse): Likewise.  Update call to can_vec_perm_p.
4319         (vectorizable_bswap): Likewise.
4320
4321 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
4322             Alan Hayward  <alan.hayward@arm.com>
4323             David Sherwood  <david.sherwood@arm.com>
4324
4325         * tree.h (build_vector): Take a vec<tree> instead of a tree *.
4326         * tree.c (build_vector): Likewise.
4327         (build_vector_from_ctor): Update accordingly.
4328         (build_vector_from_val): Likewise.
4329         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
4330         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
4331         * tree-vect-generic.c (add_rshift): Likewise.
4332         (expand_vector_divmod): Likewise.
4333         (optimize_vector_constructor): Likewise.
4334         * tree-vect-slp.c (vect_get_constant_vectors): Likewise.
4335         (vect_transform_slp_perm_load): Likewise.
4336         (vect_schedule_slp_instance): Likewise.
4337         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
4338         (vectorizable_call): Likewise.
4339         (vect_gen_perm_mask_any): Likewise.  Add elements in order.
4340         * expmed.c (make_tree): Likewise.
4341         * fold-const.c (fold_negate_expr_1): Use auto_vec<tree> when building
4342         a vector passed to build_vector.
4343         (fold_convert_const): Likewise.
4344         (exact_inverse): Likewise.
4345         (fold_ternary_loc): Likewise.
4346         (fold_relational_const): Likewise.
4347         (const_binop): Likewise.  Use VECTOR_CST_ELT directly when operating
4348         on VECTOR_CSTs, rather than going through vec_cst_ctor_to_array.
4349         (const_unop): Likewise.  Store the reduction accumulator in a
4350         variable rather than an array.
4351         (vec_cst_ctor_to_array): Take the number of elements as a parameter.
4352         (fold_vec_perm): Update calls accordingly.  Use auto_vec<tree> for
4353         the new vector, rather than constructing it after the input arrays.
4354         (native_interpret_vector): Use auto_vec<tree> when building
4355         a vector passed to build_vector.  Add elements in order.
4356         * tree-vect-loop.c (get_initial_defs_for_reduction): Use
4357         auto_vec<tree> when building a vector passed to build_vector.
4358         (vect_create_epilog_for_reduction): Likewise.
4359         (vectorizable_induction): Likewise.
4360         (get_initial_def_for_reduction): Likewise.  Fix indentation of
4361         case statements.
4362         * config/sparc/sparc.c (sparc_handle_vis_mul8x16): Change n_elts
4363         to a vec<tree> *.
4364         (sparc_fold_builtin): Use auto_vec<tree> when building a vector
4365         passed to build_vector.
4366
4367 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
4368             Alan Hayward  <alan.hayward@arm.com>
4369             David Sherwood  <david.sherwood@arm.com>
4370
4371         * tree-core.h (tree_base::u): Add an "nelts" field.
4372         (tree_vector): Use VECTOR_CST_NELTS as the length.
4373         * tree.c (tree_size): Likewise.
4374         (make_vector): Initialize VECTOR_CST_NELTS.
4375         * tree.h (VECTOR_CST_NELTS): Use the u.nelts field.
4376         * cfgexpand.c (expand_debug_expr): Use VECTOR_CST_NELTS instead of
4377         TYPE_VECTOR_SUBPARTS.
4378         * expr.c (const_vector_mask_from_tree): Consistently use "units"
4379         as the number of units, setting it from VECTOR_CST_NELTS.
4380         (const_vector_from_tree): Likewise.
4381         * fold-const.c (negate_expr_p): Use VECTOR_CST_NELTS instead of
4382         TYPE_VECTOR_SUBPARTS for the number of elements in a VECTOR_CST.
4383         (fold_negate_expr_1): Likewise.
4384         (fold_convert_const): Likewise.
4385         (const_binop): Likewise.  Differentiate the number of output and
4386         input elements.
4387         (const_unop): Likewise.
4388         (fold_ternary_loc): Use VECTOR_CST_NELTS for the number of elements
4389         in a VECTOR_CST, asserting that it is the same as TYPE_VECTOR_SUBPARTS
4390         in cases that did the opposite.
4391
4392 2017-09-14  Richard Biener  <rguenther@suse.de>
4393
4394         * tree-ssa-sccvn.c (visit_phi): Merge undefined values similar
4395         to VN_TOP.
4396
4397 2017-09-14  Eric Botcazou  <ebotcazou@adacore.com>
4398
4399         * dwarf2out.c (dwarf2out_source_line): Remove superfluous test.
4400
4401 2017-09-14  Jakub Jelinek  <jakub@redhat.com>
4402
4403         PR target/81325
4404         * cfgbuild.c (find_bb_boundaries): Ignore debug insns in decisions
4405         if and where to split a bb, except for splitting before debug insn
4406         sequences followed by non-label real insn.  Delete debug insns
4407         in between basic blocks.
4408
4409         * combine.c (make_compound_operation_int): Formatting fixes.
4410
4411         * config/alpha/elf.h (LINK_EH_SPEC): Add -static-pie support.
4412         * config/alpha/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
4413         * config/netbsd.h (LINK_EH_SPEC): Likewise.
4414         * config/sol2.h (LINK_EH_SPEC): Likewise.
4415         * config/arm/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
4416         * config/s390/linux.h (LINK_SPEC): Likewise.
4417         * config/freebsd.h (LINK_EH_SPEC): Likewise.
4418         * config/openbsd.h (LINK_EH_SPEC): Likewise.
4419         * config/lm32/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
4420         * config/aarch64/aarch64-linux.h (LINUX_TARGET_LINK_SPEC): Likewise.
4421         * config/powerpcspe/sysv4.h (LINK_EH_SPEC): Likewise.
4422         * config/bfin/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
4423         * config/i386/gnu-user64.h (GNU_USER_TARGET_LINK_SPEC): Fix a typo.
4424         * config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Formatting fix.
4425
4426 2017-09-13  Jakub Jelinek  <jakub@redhat.com>
4427
4428         * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Add -static-pie
4429         support.
4430         (ENDFILE_LINUX_SPEC): Likewise.
4431         (LINK_EH_SPEC): Likewise.
4432         * config/rs6000/linux64.h (LINK_SHLIB_SPEC): Likewise.
4433         (LINK_OS_LINUX_SPEC32): Likewise.
4434         (LINK_OS_LINUX_SPEC64): Likewise.
4435         * config/rs6000/linux.h (LINK_SHLIB_SPEC): Likewise.
4436         (LINK_OS_LINUX_SPEC): Likewise.
4437
4438 2017-09-13  Martin Liska  <mliska@suse.cz>
4439
4440         PR middle-end/82154
4441         * stmt.c (expand_sjlj_dispatch_table): Use CASE_LOW when
4442         CASE_HIGH is NULL_TREE.
4443
4444 2017-09-13  Richard Sandiford  <richard.sandiford@linaro.org>
4445             Alan Hayward  <alan.hayward@arm.com>
4446             David Sherwood  <david.sherwood@arm.com>
4447
4448         * target.def (secondary_memory_needed): New hook.
4449         (secondary_reload): Refer to TARGET_SECONDARY_MEMORY_NEEDED
4450         instead of SECONDARY_MEMORY_NEEDED.
4451         (secondary_memory_needed_mode): Likewise.
4452         * hooks.h (hook_bool_mode_reg_class_t_reg_class_t_false): Declare.
4453         * hooks.c (hook_bool_mode_reg_class_t_reg_class_t_false): New function.
4454         * doc/tm.texi.in (SECONDARY_MEMORY_NEEDED): Replace with...
4455         (TARGET_SECONDARY_MEMORY_NEEDED): ...this.
4456         (SECONDARY_MEMORY_NEEDED_RTX): Update reference accordingly.
4457         * doc/tm.texi: Regenerate.
4458         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED): Delete.
4459         * config/alpha/alpha.c (alpha_secondary_memory_needed): New function.
4460         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4461         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED): Delete.
4462         * config/i386/i386-protos.h (ix86_secondary_memory_needed): Delete.
4463         * config/i386/i386.c (inline_secondary_memory_needed): Put the
4464         mode argument first and change the reg_class arguments to reg_class_t.
4465         (ix86_secondary_memory_needed): Likewise.  Remove the strict parameter.
4466         Make static.  Update the call to inline_secondary_memory_needed.
4467         (ix86_register_move_cost): Update the call to
4468         inline_secondary_memory_needed.
4469         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4470         * config/ia64/ia64.h (SECONDARY_MEMORY_NEEDED): Delete commented-out
4471         definition.
4472         * config/ia64/ia64.c (spill_xfmode_rfmode_operand): Refer to
4473         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
4474         in comment.
4475         * config/mips/mips.h (SECONDARY_MEMORY_NEEDED): Delete.
4476         * config/mips/mips-protos.h (mips_secondary_memory_needed): Delete.
4477         * config/mips/mips.c (mips_secondary_memory_needed): Make static
4478         and match hook interface.  Add comment from mips.h.
4479         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4480         * config/mmix/mmix.md (truncdfsf2): Refer to
4481         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
4482         in comment.
4483         * config/pa/pa-64.h (SECONDARY_MEMORY_NEEDED): Rename to...
4484         (PA_SECONDARY_MEMORY_NEEDED): ...this, and put the mode argument first.
4485         * config/pa/pa.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4486         (pa_secondary_memory_needed): New function.
4487         * config/pdp11/pdp11.h (SECONDARY_MEMORY_NEEDED): Delete.
4488         * config/pdp11/pdp11-protos.h (pdp11_secondary_memory_needed): Delete.
4489         * config/pdp11/pdp11.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4490         (pdp11_secondary_memory_needed): Make static and match hook interface.
4491         * config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED): Delete.
4492         * config/powerpcspe/powerpcspe-protos.h
4493         (rs6000_secondary_memory_needed_ptr): Delete.
4494         * config/powerpcspe/powerpcspe.c (rs6000_secondary_memory_needed_ptr):
4495         Delete.
4496         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4497         (rs6000_option_override_internal): Assign to
4498         targetm.secondary_memory_needed rather than
4499         rs6000_secondary_memory_needed_ptr.
4500         (rs6000_secondary_memory_needed): Match hook interface.
4501         (rs6000_debug_secondary_memory_needed): Likewise.
4502         * config/riscv/riscv.h (SECONDARY_MEMORY_NEEDED): Delete.
4503         * config/riscv/riscv.c (riscv_secondary_memory_needed): New function.
4504         (riscv_register_move_cost): Use it instead of SECONDARY_MEMORY_NEEDED.
4505         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4506         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED): Delete.
4507         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_ptr):
4508         Delete.
4509         * config/rs6000/rs6000.c (rs6000_secondary_memory_needed_ptr): Delete.
4510         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4511         (rs6000_option_override_internal): Assign to
4512         targetm.secondary_memory_needed rather than
4513         rs6000_secondary_memory_needed_ptr.
4514         (rs6000_secondary_memory_needed): Match hook interface.
4515         (rs6000_debug_secondary_memory_needed): Likewise.
4516         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED): Delete.
4517         * config/s390/s390.c (s390_secondary_memory_needed): New function.
4518         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4519         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED): Delete.
4520         * config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4521         (sparc_secondary_memory_needed): New function.
4522         * lra-constraints.c (check_and_process_move): Refer to
4523         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
4524         in comment.
4525         (curr_insn_transform): Likewise.
4526         (process_alt_operands): Use targetm.secondary_memory_needed
4527         instead of TARGET_SECONDARY_MEMORY_NEEDED.
4528         (check_secondary_memory_needed_p): Likewise.
4529         (choose_split_class): Likewise.
4530         * reload.c: Unconditionally include code that was previously
4531         conditional on SECONDARY_MEMORY_NEEDED.
4532         (push_secondary_reload): Use targetm.secondary_memory_needed
4533         instead of TARGET_SECONDARY_MEMORY_NEEDED.
4534         (push_reload): Likewise.
4535         * reload1.c: Unconditionally include code that was previously
4536         conditional on SECONDARY_MEMORY_NEEDED.
4537         (choose_reload_regs): Use targetm.secondary_memory_needed
4538         instead of TARGET_SECONDARY_MEMORY_NEEDED.
4539         (gen_reload): Likewise.
4540         * system.h (SECONDARY_MEMORY_NEEDED): Poison.
4541
4542 2017-09-13  Richard Sandiford  <richard.sandiford@linaro.org>
4543             Alan Hayward  <alan.hayward@arm.com>
4544             David Sherwood  <david.sherwood@arm.com>
4545
4546         * target.def (secondary_memory_needed_mode): New hook:
4547         * targhooks.c (default_secondary_memory_needed_mode): Declare.
4548         * targhooks.h (default_secondary_memory_needed_mode): New function.
4549         * doc/tm.texi.in (SECONDARY_MEMORY_NEEDED_MODE): Replace with...
4550         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): ...this.
4551         * doc/tm.texi: Regenerate.
4552         * lra-constraints.c (check_and_process_move): Use
4553         targetm.secondary_memory_needed_mode instead of
4554         TARGET_SECONDARY_MEMORY_NEEDED_MODE.
4555         (curr_insn_transform): Likewise.
4556         * reload.c (get_secondary_mem): Likewise.
4557         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
4558         * config/alpha/alpha.c (alpha_secondary_memory_needed_mode): New
4559         function.
4560         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
4561         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
4562         * config/i386/i386.c (ix86_secondary_memory_needed_mode): New function.
4563         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
4564         * config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED_MODE):
4565         Delete.
4566         * config/powerpcspe/powerpcspe-protos.h
4567         (rs6000_secondary_memory_needed_mode): Delete.
4568         * config/powerpcspe/powerpcspe.c
4569         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
4570         (rs6000_secondary_memory_needed_mode): Make static.
4571         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
4572         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_mode):
4573         Delete.
4574         * config/rs6000/rs6000.c (TARGET_SECONDARY_MEMORY_NEEDED_MODE):
4575         Redefine.
4576         (rs6000_secondary_memory_needed_mode): Make static.
4577         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
4578         * config/s390/s390.c (s390_secondary_memory_needed_mode): New function.
4579         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
4580         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
4581         * config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED_MODE):
4582         Redefine.
4583         (sparc_secondary_memory_needed_mode): New function.
4584         * system.h (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Poison.
4585
4586 2017-09-13  Jackson Woodruff  <jackson.woodruff@arm.com>
4587
4588         * config/aarch64/constraints.md (Umq): New constraint.
4589         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>):
4590         Change to use Umq.
4591         (mov<mode>): Update condition.
4592
4593 2017-09-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4594
4595         * gimple-ssa-store-merging.c (sort_by_bitpos): Compare store order
4596         when bitposition is the same.
4597
4598 2017-09-13  Richard Biener  <rguenther@suse.de>
4599
4600         * dwarf2out.c (output_die_symbol): Remove.
4601         (output_die): Do not output a DIEs symbol.
4602
4603 2017-09-13  Richard Biener  <rguenther@suse.de>
4604
4605         PR middle-end/82128
4606         * gimple-fold.c (gimple_fold_call): Update SSA name in-place to
4607         default-def to avoid breaking iterator update with the weird
4608         interaction with cgraph_update_edges_for_call_stmt_node.
4609
4610 2017-09-13  Richard Biener  <rguenther@suse.de>
4611
4612         * tree-cfg.c (verify_gimple_assign_binary): Add verification
4613         for WIDEN_SUM_EXPR, VEC_WIDEN_MULT_{HI,LO,EVEN,ODD}_EXPR,
4614         VEC_PACK_{TRUNC,SAT,FIX_TRUNC}_EXPR.
4615         (verify_gimple_assign_ternary): Add verification for DOT_PROD_EXPR.
4616
4617 2017-09-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
4618
4619         * config/aarch64/aarch64.c (aarch64_override_options_after_change_1):
4620         Disable pc relative literal load irrespective of
4621         TARGET_FIX_ERR_A53_84341 for default.
4622
4623 2017-09-12  Eric Botcazou  <ebotcazou@adacore.com>
4624
4625         * config/sparc/sparc.c (output_return): Output the source location of
4626         the insn in the delay slot, if any.
4627         (output_sibcall): Likewise.
4628
4629 2017-09-12  H.J. Lu  <hongjiu.lu@intel.com>
4630
4631         PR driver/81498
4632         * common.opt (-static-pie): New alias.
4633         (shared): Negate static-pie.
4634         (-no-pie): Update help text.
4635         (-pie): Likewise.
4636         (static-pie): New option.
4637         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Add
4638         -static-pie support.
4639         (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
4640         (LINK_EH_SPEC): Likewise.
4641         (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
4642         * config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Likewise.
4643         * config/i386/gnu-user64.h (GNU_USER_TARGET_LINK_SPEC): Likewise.
4644         * gcc.c (LINK_COMMAND_SPEC): Likewise.
4645         (init_gcc_specs): Likewise.
4646         (init_spec): Likewise.
4647         (display_help): Update help message for -pie.
4648         * doc/invoke.texi: Update -pie, -no-pie and -static.  Document
4649         -static-pie.
4650
4651 2017-09-12  Wilco Dijkstra  <wdijkstr@arm.com>
4652
4653         * config/aarch64/aarch64.md (movsi_aarch64): Remove all '*'.
4654         (movdi_aarch64): Likewise.
4655         (movti_aarch64): Likewise.
4656
4657 2017-09-12 Simon Wright <simon@pushface.org>
4658
4659         PR target/80204
4660         * config/darwin-driver.c (darwin_find_version_from_kernel): Eliminate
4661         calculation of the minor version, always output as 0.
4662
4663 2017-09-12  Jakub Jelinek  <jakub@redhat.com>
4664
4665         PR target/82112
4666         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
4667         ALTIVEC_BUILTIN_VEC_LD if arg1 has array type call default_conversion
4668         on it early, rather than manual conversion late.  For
4669         ALTIVEC_BUILTIN_VEC_ST if arg2 has array type call default_conversion
4670         instead of performing manual conversion.
4671
4672 2017-09-12  Carl Love  <cel@us.ibm.com>
4673
4674         * config/rs6000/altivec.md (vec_widen_umult_even_v4si,
4675         vec_widen_smult_even_v4si): Add define expands for vmuleuw, vmulesw,
4676         vmulouw, vmulosw.
4677         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
4678         VMULOSW): Add definitions.
4679         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
4680         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
4681         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
4682         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
4683         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
4684
4685 2017-09-12  James Greenhalgh  <james.greenhalgh@arm.com>
4686
4687         * config/aarch64/aarch64.md (movdi_aarch64): Set load/store
4688         types correctly.
4689         (movti_aarch64): Likewise.
4690         (movdf_aarch64): Likewise.
4691         (movtf_aarch64): Likewise.
4692         (load_pairdi): Likewise.
4693         (store_pairdi): Likewise.
4694         (load_pairdf): Likewise.
4695         (store_pairdf): Likewise.
4696         (loadwb_pair<GPI:mode>_<P:mode>): Likewise.
4697         (storewb_pair<GPI:mode>_<P:mode>): Likewise.
4698         (ldr_got_small_<mode>): Likewise.
4699         (ldr_got_small_28k_<mode>): Likewise.
4700         (ldr_got_tiny): Likewise.
4701         * config/aarch64/iterators.md (ldst_sz): New.
4702         (ldpstp_sz): Likewise.
4703         * config/aarch64/thunderx.md (thunderx_storepair): Split store_8
4704         to store_16.
4705         (thunderx_load): Split load_8 to load_16.
4706         * config/aarch64/thunderx2t99.md (thunderx2t99_loadpair): Split
4707         load_8 to load_16.
4708         (thunderx2t99_storepair_basic): Split store_8 to store_16.
4709         * config/arm/xgene1.md (xgene1_load_pair): Split load_8 to load_16.
4710         (xgene1_store_pair): Split store_8 to store_16.
4711         * config/aarch64/falkor.md (falkor_ld_3_ld): Split load_8 to load_16.
4712         (falkor_st_0_st_sd): Split store_8 to store_16.
4713
4714 2017-09-12  James Greenhalgh  <james.greenhalgh@arm.com>
4715
4716         * config/arm/types.md (type): Rename load1/2/3/4 to load_4/8/12/16
4717         and store1/2/3/4 to store_4/8/12/16.
4718         * config/aarch64/aarch64.md: Update for rename.
4719         * config/arm/arm.md: Likewise.: Likewise.
4720         * config/arm/arm.c: Likewise.
4721         * config/arm/thumb1.md: Likewise.
4722         * config/arm/thumb2.md: Likewise.
4723         * config/arm/vfp.md: Likewise.
4724         * config/arm/arm-generic.md: Likewise.
4725         * config/arm/arm1020e.md: Likewise.
4726         * config/arm/arm1026ejs.md: Likewise.
4727         * config/arm/arm1136jfs.md: Likewise.
4728         * config/arm/arm926ejs.md: Likewise.
4729         * config/arm/cortex-a15.md: Likewise.
4730         * config/arm/cortex-a17.md: Likewise.
4731         * config/arm/cortex-a5.md: Likewise.
4732         * config/arm/cortex-a53.md: Likewise.
4733         * config/arm/cortex-a57.md: Likewise.
4734         * config/arm/cortex-a7.md: Likewise.
4735         * config/arm/cortex-a8.md: Likewise.
4736         * config/arm/cortex-a9.md: Likewise.
4737         * config/arm/cortex-m4.md: Likewise.
4738         * config/arm/cortex-m7.md: Likewise.
4739         * config/arm/cortex-r4.md: Likewise.
4740         * config/arm/exynos-m1.md: Likewise.
4741         * config/arm/fa526.md: Likewise.
4742         * config/arm/fa606te.md: Likewise.
4743         * config/arm/fa626te.md: Likewise.
4744         * config/arm/fa726te.md: Likewise.
4745         * config/arm/fmp626.md: Likewise.
4746         * config/arm/iwmmxt.md: Likewise.
4747         * config/arm/ldmstm.md: Likewise.
4748         * config/arm/marvell-pj4.md: Likewise.
4749         * config/arm/xgene1.md: Likewise.
4750         * config/aarch64/thunderx.md: Likewise.
4751         * config/aarch64/thunderx2t99.md: Likewise.
4752         * config/aarch64/falkor.md: Likewise.
4753
4754 2017-09-12  Martin Liska  <mliska@suse.cz>
4755
4756         * attribs.c (private_lookup_attribute): New function.
4757         * attribs.h (private_lookup_attribute): Declared here.
4758         (lookup_attribute): Called from this place.
4759
4760 2017-09-12  Richard Biener  <rguenther@suse.de>
4761
4762         PR tree-optimization/82157
4763         * tree-ssa-pre.c (remove_dead_inserted_code): Do not remove
4764         stmts with side-effects.
4765
4766 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
4767             Alan Hayward  <alan.hayward@arm.com>
4768             David Sherwood <david.sherwood@arm.com>
4769
4770         * target.def (hard_regno_nregs): New hook.
4771         (class_max_nregs): Refer to it instead of HARD_REGNO_NREGS.
4772         * targhooks.h (default_hard_regno_nregs): Declare.
4773         * targhooks.c (default_hard_regno_nregs): New function.
4774         * doc/tm.texi.in (HARD_REGNO_NREGS): Replace with...
4775         (TARGET_HARD_REGNO_NREGS): ...this hook.
4776         (HARD_REGNO_NREGS_HAS_PADDING): Update accordingly.
4777         (CLASS_MAX_NREGS): Likewise.
4778         * doc/tm.texi: Regenerate.
4779         * reginfo.c (init_reg_modes_target): Use targetm.hard_regno_nregs
4780         instead of HARD_REGNO_NREGS.
4781         * rtl.h (REG_NREGS): Refer to TARGET_HARD_REGNO_NREGS rather than
4782         HARD_REGNO_NREGS in the comment.
4783         * config/aarch64/aarch64.h (HARD_REGNO_NREGS): Delete.
4784         * config/aarch64/aarch64-protos.h (aarch64_hard_regno_nregs): Delete.
4785         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs): Make static.
4786         Return an unsigned int.
4787         (TARGET_HARD_REGNO_NREGS): Redefine.
4788         * config/alpha/alpha.h (HARD_REGNO_NREGS): Delete.
4789         * config/arc/arc.h (HARD_REGNO_NREGS): Delete.
4790         * config/arc/arc.c (TARGET_HARD_REGNO_NREGS): Redefine.
4791         (arc_hard_regno_nregs): New function.
4792         * config/arm/arm.h (HARD_REGNO_NREGS): Delete.
4793         * config/arm/arm.c (TARGET_HARD_REGNO_NREGS): Redefine.
4794         (arm_hard_regno_nregs): New function.
4795         * config/avr/avr.h (HARD_REGNO_NREGS): Delete.
4796         * config/bfin/bfin.h (HARD_REGNO_NREGS): Delete.
4797         * config/bfin/bfin.c (bfin_hard_regno_nregs): New function.
4798         (TARGET_HARD_REGNO_NREGS): Redefine.
4799         * config/c6x/c6x.h (HARD_REGNO_NREGS): Delete.
4800         * config/cr16/cr16.h (LONG_REG_P): Use targetm.hard_regno_nregs.
4801         (HARD_REGNO_NREGS): Delete.
4802         * config/cr16/cr16.c (TARGET_HARD_REGNO_NREGS): Redefine.
4803         (cr16_hard_regno_nregs): New function.
4804         (cr16_memory_move_cost): Use it instead of HARD_REGNO_NREGS.
4805         * config/cris/cris.h (HARD_REGNO_NREGS): Delete.
4806         * config/cris/cris.c (TARGET_HARD_REGNO_NREGS): Redefine.
4807         (cris_hard_regno_nregs): New function.
4808         * config/epiphany/epiphany.h (HARD_REGNO_NREGS): Delete.
4809         * config/fr30/fr30.h (HARD_REGNO_NREGS): Delete.
4810         (CLASS_MAX_NREGS): Use targetm.hard_regno_nregs.
4811         * config/frv/frv.h (HARD_REGNO_NREGS): Delete.
4812         (CLASS_MAX_NREGS): Remove outdated copy of documentation.
4813         * config/frv/frv-protos.h (frv_hard_regno_nregs): Delete.
4814         * config/frv/frv.c (TARGET_HARD_REGNO_NREGS): Redefine.
4815         (frv_hard_regno_nregs): Make static.  Take and return an
4816         unsigned int.
4817         (frv_class_max_nregs): Remove outdated copy of documentation.
4818         * config/ft32/ft32.h (HARD_REGNO_NREGS): Delete.
4819         * config/h8300/h8300.h (HARD_REGNO_NREGS): Delete.
4820         * config/h8300/h8300-protos.h (h8300_hard_regno_nregs): Delete.
4821         * config/h8300/h8300.c (h8300_hard_regno_nregs): Delete.
4822         * config/i386/i386.h (HARD_REGNO_NREGS): Delete.
4823         * config/i386/i386.c (ix86_hard_regno_nregs): New function.
4824         (TARGET_HARD_REGNO_NREGS): Redefine.
4825         * config/ia64/ia64.h (HARD_REGNO_NREGS): Delete.
4826         (CLASS_MAX_NREGS): Update comment.
4827         * config/ia64/ia64.c (TARGET_HARD_REGNO_NREGS): Redefine.
4828         (ia64_hard_regno_nregs): New function.
4829         * config/iq2000/iq2000.h (HARD_REGNO_NREGS): Delete.
4830         * config/lm32/lm32.h (HARD_REGNO_NREGS): Delete.
4831         * config/m32c/m32c.h (HARD_REGNO_NREGS): Delete.
4832         * config/m32c/m32c-protos.h (m32c_hard_regno_nregs): Delete.
4833         * config/m32c/m32c.c (m32c_hard_regno_nregs_1): Take and return
4834         an unsigned int.
4835         (m32c_hard_regno_nregs): Likewise.  Make static.
4836         (TARGET_HARD_REGNO_NREGS): Redefine.
4837         * config/m32r/m32r.h (HARD_REGNO_NREGS): Delete.
4838         * config/m68k/m68k.h (HARD_REGNO_NREGS): Delete.
4839         * config/m68k/m68k.c (TARGET_HARD_REGNO_NREGS): Redefine.
4840         (m68k_hard_regno_nregs): New function.
4841         * config/mcore/mcore.h (HARD_REGNO_NREGS): Delete.
4842         * config/microblaze/microblaze.h (HARD_REGNO_NREGS): Delete.
4843         * config/mips/mips.h (HARD_REGNO_NREGS): Delete.
4844         * config/mips/mips-protos.h (mips_hard_regno_nregs): Delete.
4845         * config/mips/mips.c (mips_hard_regno_nregs): Make static.
4846         Take and return an unsigned int.
4847         (TARGET_HARD_REGNO_NREGS): Redefine.
4848         * config/mmix/mmix.h (HARD_REGNO_NREGS): Delete.
4849         (CLASS_MAX_NREGS): Use targetm.hard_regno_nregs.
4850         * config/mn10300/mn10300.h (HARD_REGNO_NREGS): Delete.
4851         * config/moxie/moxie.h (HARD_REGNO_NREGS): Delete.
4852         * config/msp430/msp430.h (HARD_REGNO_NREGS): Delete.
4853         * config/msp430/msp430-protos.h (msp430_hard_regno_nregs): Delete.
4854         * config/msp430/msp430.c (TARGET_HARD_REGNO_NREGS): Redefine.
4855         (msp430_hard_regno_nregs): Make static.  Take and return an
4856         unsigned int.
4857         * config/nds32/nds32.h (HARD_REGNO_NREGS): Delete.
4858         * config/nds32/nds32-protos.h (nds32_hard_regno_nregs): Delete.
4859         * config/nds32/nds32.c (nds32_hard_regno_nregs): Delete.
4860         (nds32_hard_regno_mode_ok): Use targetm.hard_regno_nregs.
4861         * config/nios2/nios2.h (HARD_REGNO_NREGS): Delete.
4862         * config/nvptx/nvptx.h (HARD_REGNO_NREGS): Delete.
4863         * config/nvptx/nvptx.c (nvptx_hard_regno_nregs): New function.
4864         (TARGET_HARD_REGNO_NREGS): Redefine.
4865         * config/pa/pa32-regs.h (HARD_REGNO_NREGS): Rename to...
4866         (PA_HARD_REGNO_NREGS): ...this.
4867         * config/pa/pa64-regs.h (HARD_REGNO_NREGS): Rename to...
4868         (PA_HARD_REGNO_NREGS): ...this.
4869         * config/pa/pa.c (TARGET_HARD_REGNO_NREGS): Redefine.
4870         (pa_hard_regno_nregs): New function.
4871         * config/pdp11/pdp11.h (HARD_REGNO_NREGS): Delete.
4872         * config/pdp11/pdp11.c (TARGET_HARD_REGNO_NREGS): Redefine.
4873         (pdp11_hard_regno_nregs): New function.
4874         * config/powerpcspe/powerpcspe.h (HARD_REGNO_NREGS): Delete.
4875         * config/powerpcspe/powerpcspe.c (TARGET_HARD_REGNO_NREGS): Redefine.
4876         (rs6000_hard_regno_nregs_hook): New function.
4877         * config/riscv/riscv.h (HARD_REGNO_NREGS): Delete.
4878         * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): Delete.
4879         * config/riscv/riscv.c (riscv_hard_regno_nregs): Make static.
4880         Take and return an unsigned int.  Move earlier in file.
4881         (TARGET_HARD_REGNO_NREGS): Redefine.
4882         * config/rl78/rl78.h (HARD_REGNO_NREGS): Delete.
4883         * config/rl78/rl78-protos.h (rl78_hard_regno_nregs): Delete.
4884         * config/rl78/rl78.c (TARGET_HARD_REGNO_NREGS): Reefine.
4885         (rl78_hard_regno_nregs): Make static.  Take and return an
4886         unsigned int.
4887         * config/rs6000/rs6000.h (HARD_REGNO_NREGS): Delete.
4888         * config/rs6000/rs6000.c (TARGET_HARD_REGNO_NREGS): Redefine.
4889         (rs6000_hard_regno_nregs_hook): New function.
4890         * config/rx/rx.h (HARD_REGNO_NREGS): Delete.
4891         * config/rx/rx.c (rx_hard_regno_nregs): New function.
4892         (TARGET_HARD_REGNO_NREGS): Redefine.
4893         * config/s390/s390.h (HARD_REGNO_NREGS): Delete.
4894         * config/s390/s390.c (REGNO_PAIR_OK): Use s390_hard_regno_nregs
4895         instead of HARD_REGNO_NREGS.
4896         (s390_hard_regno_nregs): New function.
4897         (s390_hard_regno_mode_ok): Add comment from s390.h.
4898         (TARGET_HARD_REGNO_NREGS): Redefine.
4899         * config/sh/sh.h (HARD_REGNO_NREGS): Delete.
4900         * config/sh/sh.c (TARGET_HARD_REGNO_NREGS): Redefine.
4901         (sh_hard_regno_nregs): New function.
4902         (sh_pass_in_reg_p): Use it.
4903         * config/sparc/sparc.h (HARD_REGNO_NREGS): Delete.
4904         * config/sparc/sparc.c (TARGET_HARD_REGNO_NREGS): Redefine.
4905         (sparc_hard_regno_nregs): New function.
4906         * config/spu/spu.h (HARD_REGNO_NREGS): Delete.
4907         * config/spu/spu.c (spu_hard_regno_nregs): New function.
4908         (spu_function_arg_advance): Use it, supplying a valid register number.
4909         (TARGET_HARD_REGNO_NREGS): Redefine.
4910         * config/stormy16/stormy16.h (HARD_REGNO_NREGS): Delete.
4911         * config/tilegx/tilegx.h (HARD_REGNO_NREGS): Delete.
4912         * config/tilepro/tilepro.h (HARD_REGNO_NREGS): Delete.
4913         * config/v850/v850.h (HARD_REGNO_NREGS): Delete.
4914         * config/vax/vax.h (HARD_REGNO_NREGS): Delete.
4915         * config/visium/visium.h (HARD_REGNO_NREGS): Delete.
4916         (CLASS_MAX_NREGS): Remove copy of old documentation.
4917         * config/visium/visium.c (TARGET_HARD_REGNO_NREGS): Redefine.
4918         (visium_hard_regno_nregs): New function.
4919         (visium_hard_regno_mode_ok): Use it instead of HARD_REGNO_NREGS.
4920         * config/xtensa/xtensa.h (HARD_REGNO_NREGS): Delete.
4921         * config/xtensa/xtensa.c (TARGET_HARD_REGNO_NREGS): Redefine.
4922         xtensa_hard_regno_nregs): New function.
4923         * system.h (HARD_REGNO_NREGS): Poison.
4924
4925 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
4926
4927         * config/arm/arm.h (THUMB_SECONDARY_INPUT_RELOAD_CLASS): Use
4928         hard_regno_nregs instead of HARD_REGNO_NREGS.
4929         (THUMB_SECONDARY_OUTPUT_RELOAD_CLASS): Likewise.
4930         * config/c6x/c6x.c (c6x_expand_prologue): Likewise.
4931         (c6x_expand_epilogue): Likewise.
4932         * config/frv/frv.c (frv_alloc_temp_reg): Likewise.
4933         (frv_read_iacc_argument): Likewise.
4934         * config/sh/sh.c: Include regs.h.
4935         (sh_print_operand): Use hard_regno_nregs instead of HARD_REGNO_NREGS.
4936         (regs_used): Likewise.
4937         (output_stack_adjust): Likewise.
4938         * config/xtensa/xtensa.c (xtensa_copy_incoming_a7): Likewise.
4939         * expmed.c: Include regs.h.
4940         (store_bit_field_1): Use hard_regno_nregs instead of HARD_REGNO_NREGS.
4941         * ree.c: Include regs.h.
4942         (combine_reaching_defs): Use hard_regno_nregs instead of
4943         HARD_REGNO_NREGS.
4944         (add_removable_extension): Likewise.
4945
4946 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
4947
4948         * regs.h (hard_regno_nregs): Turn into a function.
4949         (end_hard_regno): Update accordingly.
4950         * caller-save.c (setup_save_areas): Likewise.
4951         (save_call_clobbered_regs): Likewise.
4952         (replace_reg_with_saved_mem): Likewise.
4953         (insert_restore): Likewise.
4954         (insert_save): Likewise.
4955         * combine.c (can_change_dest_mode): Likewise.
4956         (move_deaths): Likewise.
4957         (distribute_notes): Likewise.
4958         * config/mips/mips.c (mips_hard_regno_call_part_clobbered): Likewise.
4959         * config/powerpcspe/powerpcspe.c (rs6000_cannot_change_mode_class)
4960         (rs6000_split_multireg_move): Likewise.
4961         (rs6000_register_move_cost): Likewise.
4962         (rs6000_memory_move_cost): Likewise.
4963         * config/rs6000/rs6000.c (rs6000_cannot_change_mode_class): Likewise.
4964         (rs6000_split_multireg_move): Likewise.
4965         (rs6000_register_move_cost): Likewise.
4966         (rs6000_memory_move_cost): Likewise.
4967         * cselib.c (cselib_reset_table): Likewise.
4968         (cselib_lookup_1): Likewise.
4969         * emit-rtl.c (set_mode_and_regno): Likewise.
4970         * function.c (aggregate_value_p): Likewise.
4971         * ira-color.c (setup_profitable_hard_regs): Likewise.
4972         (check_hard_reg_p): Likewise.
4973         (calculate_saved_nregs): Likewise.
4974         (assign_hard_reg): Likewise.
4975         (improve_allocation): Likewise.
4976         (calculate_spill_cost): Likewise.
4977         * ira-emit.c (modify_move_list): Likewise.
4978         * ira-int.h (ira_hard_reg_set_intersection_p): Likewise.
4979         (ira_hard_reg_in_set_p): Likewise.
4980         * ira.c (setup_reg_mode_hard_regset): Likewise.
4981         (clarify_prohibited_class_mode_regs): Likewise.
4982         (check_allocation): Likewise.
4983         * lra-assigns.c (find_hard_regno_for_1): Likewise.
4984         (lra_setup_reg_renumber): Likewise.
4985         (setup_try_hard_regno_pseudos): Likewise.
4986         (spill_for): Likewise.
4987         (assign_hard_regno): Likewise.
4988         (setup_live_pseudos_and_spill_after_risky_transforms): Likewise.
4989         * lra-constraints.c (in_class_p): Likewise.
4990         (lra_constraint_offset): Likewise.
4991         (simplify_operand_subreg): Likewise.
4992         (lra_constraints): Likewise.
4993         (split_reg): Likewise.
4994         (split_if_necessary): Likewise.
4995         (invariant_p): Likewise.
4996         (inherit_in_ebb): Likewise.
4997         * lra-lives.c (process_bb_lives): Likewise.
4998         * lra-remat.c (reg_overlap_for_remat_p): Likewise.
4999         (get_hard_regs): Likewise.
5000         (do_remat): Likewise.
5001         * lra-spills.c (assign_spill_hard_regs): Likewise.
5002         * mode-switching.c (create_pre_exit): Likewise.
5003         * postreload.c (reload_combine_recognize_pattern): Likewise.
5004         * recog.c (peep2_find_free_register): Likewise.
5005         * regcprop.c (kill_value_regno): Likewise.
5006         (set_value_regno): Likewise.
5007         (copy_value): Likewise.
5008         (maybe_mode_change): Likewise.
5009         (find_oldest_value_reg): Likewise.
5010         (copyprop_hardreg_forward_1): Likewise.
5011         * regrename.c (check_new_reg_p): Likewise.
5012         (regrename_do_replace): Likewise.
5013         * reload.c (push_reload): Likewise.
5014         (combine_reloads): Likewise.
5015         (find_dummy_reload): Likewise.
5016         (operands_match_p): Likewise.
5017         (find_reloads): Likewise.
5018         (find_equiv_reg): Likewise.
5019         (reload_adjust_reg_for_mode): Likewise.
5020         * reload1.c (count_pseudo): Likewise.
5021         (count_spilled_pseudo): Likewise.
5022         (find_reg): Likewise.
5023         (clear_reload_reg_in_use): Likewise.
5024         (free_for_value_p): Likewise.
5025         (allocate_reload_reg): Likewise.
5026         (choose_reload_regs): Likewise.
5027         (reload_adjust_reg_for_temp): Likewise.
5028         (emit_reload_insns): Likewise.
5029         (delete_output_reload): Likewise.
5030         * rtlanal.c (subreg_get_info): Likewise.
5031         * sched-deps.c (sched_analyze_reg): Likewise.
5032         * sel-sched.c (init_regs_for_mode): Likewise.
5033         (mark_unavailable_hard_regs): Likewise.
5034         (choose_best_reg_1): Likewise.
5035         (verify_target_availability): Likewise.
5036         * valtrack.c (dead_debug_insert_temp): Likewise.
5037         * var-tracking.c (track_loc_p): Likewise.
5038         (emit_note_insn_var_location): Likewise.
5039         * varasm.c (make_decl_rtl): Likewise.
5040         * reginfo.c (choose_hard_reg_mode): Likewise.
5041         (init_reg_modes_target): Refer directly to
5042         this_target_regs->x_hard_regno_nregs.
5043
5044 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
5045
5046         * ira-costs.c (record_operand_costs): Use in_hard_reg_set_p
5047         instead of hard_regno_nregs.
5048
5049 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
5050
5051         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Use
5052         end_hard_regno instead of hard_regno_nregs.
5053         * config/s390/s390.c (s390_reg_clobbered_rtx): Likewise.
5054         * config/sparc/sparc.h (ASM_DECLARE_REGISTER_GLOBAL): Likewise.
5055         * config/visium/visium.c (visium_hard_regno_mode_ok): Likewise.
5056         * ira-color.c (improve_allocation): Likewise.
5057         * lra-assigns.c (find_hard_regno_for_1): Likewise.
5058         * lra-lives.c (mark_regno_live): Likewise.
5059         (mark_regno_dead): Likewise.
5060         * lra-remat.c (operand_to_remat): Likewise.
5061         * lra.c (collect_non_operand_hard_regs): Likewise.
5062         * postreload.c (reload_combine_note_store): Likewise.
5063         (move2add_valid_value_p): Likewise.
5064         * reload.c (regno_clobbered_p): Likewise.
5065
5066 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
5067
5068         * config/frv/frv.c (FOR_EACH_REGNO): Use END_REGNO instead of
5069         hard_regno_nregs.
5070         * config/v850/v850.c (v850_reorg): Likewise.
5071         * reload.c (refers_to_regno_for_reload_p): Likewise.
5072         (find_equiv_reg): Likewise.
5073         * reload1.c (reload_reg_reaches_end_p): Likewise.
5074
5075 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
5076
5077         * caller-save.c (add_used_regs): Use REG_NREGS instead of
5078         hard_regno_nregs.
5079         * config/aarch64/aarch64.c (aarch64_split_combinev16qi): Likewise.
5080         * config/arm/arm.c (output_move_neon): Likewise.
5081         (arm_attr_length_move_neon): Likewise.
5082         (neon_split_vcombine): Likewise.
5083         * config/c6x/c6x.c (c6x_mark_reg_read): Likewise.
5084         (c6x_mark_reg_written): Likewise.
5085         (c6x_dwarf_register_span): Likewise.
5086         * config/i386/i386.c (ix86_save_reg): Likewise.
5087         * config/ia64/ia64.c (mark_reg_gr_used_mask): Likewise.
5088         (rws_access_reg): Likewise.
5089         * config/s390/s390.c (s390_call_saved_register_used): Likewise.
5090         * mode-switching.c (create_pre_exit): Likewise.
5091         * ree.c (combine_reaching_defs): Likewise.
5092         (add_removable_extension): Likewise.
5093         * regcprop.c (find_oldest_value_reg): Likewise.
5094         (copyprop_hardreg_forward_1): Likewise.
5095         * reload.c (reload_inner_reg_of_subreg): Likewise.
5096         (push_reload): Likewise.
5097         (combine_reloads): Likewise.
5098         (find_dummy_reload): Likewise.
5099         (reload_adjust_reg_for_mode): Likewise.
5100         * reload1.c (find_reload_regs): Likewise.
5101         (forget_old_reloads_1): Likewise.
5102         (reload_reg_free_for_value_p): Likewise.
5103         (reload_adjust_reg_for_temp): Likewise.
5104         (emit_reload_insns): Likewise.
5105         (delete_output_reload): Likewise.
5106         * sel-sched.c (choose_best_reg_1): Likewise.
5107         (choose_best_pseudo_reg): Likewise.
5108
5109 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
5110             Alan Hayward  <alan.hayward@arm.com>
5111             David Sherwood <david.sherwood@arm.com>
5112
5113         * defaults.h (SLOW_UNALIGNED_ACCESS): Delete.
5114         * target.def (slow_unaligned_access): New hook.
5115         * targhooks.h (default_slow_unaligned_access): Declare.
5116         * targhooks.c (default_slow_unaligned_access): New function.
5117         * doc/tm.texi.in (SLOW_UNALIGNED_ACCESS): Replace with...
5118         (TARGET_SLOW_UNALIGNED_ACCESS): ...this.
5119         * doc/tm.texi: Regenerate.
5120         * config/alpha/alpha.h (SLOW_UNALIGNED_ACCESS): Delete.
5121         * config/arm/arm.h (SLOW_UNALIGNED_ACCESS): Delete.
5122         * config/i386/i386.h (SLOW_UNALIGNED_ACCESS): Delete commented-out
5123         definition.
5124         * config/powerpcspe/powerpcspe.h (SLOW_UNALIGNED_ACCESS): Delete.
5125         * config/powerpcspe/powerpcspe.c (TARGET_SLOW_UNALIGNED_ACCESS):
5126         Redefine.
5127         (rs6000_slow_unaligned_access): New function.
5128         (rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS.
5129         (expand_block_compare): Likewise.
5130         (expand_strn_compare): Likewise.
5131         (rs6000_rtx_costs): Likewise.
5132         * config/riscv/riscv.h (SLOW_UNALIGNED_ACCESS): Delete.
5133         (riscv_slow_unaligned_access): Likewise.
5134         * config/riscv/riscv.c (riscv_slow_unaligned_access): Rename to...
5135         (riscv_slow_unaligned_access_p): ...this and make static.
5136         (riscv_option_override): Update accordingly.
5137         (riscv_slow_unaligned_access): New function.
5138         (TARGET_SLOW_UNALIGNED_ACCESS): Redefine.
5139         * config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Delete.
5140         * config/rs6000/rs6000.c (TARGET_SLOW_UNALIGNED_ACCESS): Redefine.
5141         (rs6000_slow_unaligned_access): New function.
5142         (rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS.
5143         (rs6000_rtx_costs): Likewise.
5144         * config/rs6000/rs6000-string.c (expand_block_compare)
5145         (expand_strn_compare): Use targetm.slow_unaligned_access instead
5146         of SLOW_UNALIGNED_ACCESS.
5147         * config/tilegx/tilegx.h (SLOW_UNALIGNED_ACCESS): Delete.
5148         * config/tilepro/tilepro.h (SLOW_UNALIGNED_ACCESS): Delete.
5149         * calls.c (expand_call): Use targetm.slow_unaligned_access instead
5150         of SLOW_UNALIGNED_ACCESS.
5151         * expmed.c (simple_mem_bitfield_p): Likewise.
5152         * expr.c (alignment_for_piecewise_move): Likewise.
5153         (emit_group_load_1): Likewise.
5154         (emit_group_store): Likewise.
5155         (copy_blkmode_from_reg): Likewise.
5156         (emit_push_insn): Likewise.
5157         (expand_assignment): Likewise.
5158         (store_field): Likewise.
5159         (expand_expr_real_1): Likewise.
5160         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
5161         * lra-constraints.c (simplify_operand_subreg): Likewise.
5162         * stor-layout.c (bit_field_mode_iterator::next_mode): Likewise.
5163         * gimple-ssa-store-merging.c: Likewise in block comment at start
5164         of file.
5165         * tree-ssa-strlen.c: Include target.h.
5166         (handle_builtin_memcmp): Use targetm.slow_unaligned_access instead
5167         of SLOW_UNALIGNED_ACCESS.
5168         * system.h (SLOW_UNALIGNED_ACCESS): Poison.
5169
5170 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
5171
5172         PR rtl-optimization/82185
5173         * expmed.c (emit_store_flag_int): Only test tem if it has been
5174         initialized.
5175
5176 2017-09-12  Richard Biener  <rguenther@suse.de>
5177
5178         PR middle-end/82149
5179         * match.pd ((FTYPE) N CMP CST): Fix typo.
5180
5181 2017-09-12  Simon Atanasyan  <simon.atanasyan@imgtec.com>
5182
5183         * config/mips/mips.c (mips_attribute_table): Add 'short_call'
5184         attribute.
5185         (mips_near_type_p): Add 'short_call' attribute as a synonym
5186         for 'near'.
5187         * doc/extend.texi (short_call): Document new function attribute.
5188
5189 2017-09-12  Jakub Jelinek  <jakub@redhat.com>
5190
5191         PR target/82112
5192         * c-common.c (sync_resolve_size): Instead of c_dialect_cxx ()
5193         assertion check that in the condition.
5194         (get_atomic_generic_size): Likewise.  Before testing if parameter
5195         has pointer type, if it has array type, call for C++
5196         default_conversion to perform array-to-pointer conversion.
5197
5198 2017-09-12  Richard Biener  <rguenther@suse.de>
5199
5200         * tree-vect-generic.c (expand_vector_operations_1): Do nothing
5201         for operations we cannot scalarize.
5202
5203 2017-09-12  Aldy Hernandez  <aldyh@redhat.com>
5204
5205         * tree-ssa-threadbackward.c (fsm_find_thread_path): Make GC
5206         vectors heap vectors.  Clean up comments.
5207         Make visited_bbs a reference.
5208         (profitable_jump_thread_path): Make GC
5209         vectors heap vectors.  Clean up comments.
5210         Misc cleanups.
5211         (convert_and_register_jump_thread_path): Make GC vectors heap
5212         vectors.
5213         (check_subpath_and_update_thread_path): Same.  Clean up comments.
5214         Make visited_bbs a reference.
5215         (handle_phi): Abstract common code to to
5216         register_jump_thread_path_if_profitable.
5217         Rename VAR_BB to DEF_BB.
5218         Update comments.
5219         Make GC vectors heap vectors.
5220         Make visited_bbs a reference.
5221         (handle_assignment): Same.
5222         (register_jump_thread_path_if_profitable): New.
5223         (fsm_find_control_statement_thread_paths): Rename VAR_BB to
5224         DEF_BB.
5225         Make GC vectors heap vectors.  Clean up comments.
5226         Make visited_bbs a reference.
5227         (find_jump_threads_backwards): Make visited_bbs live in the stack.
5228         * tree-ssa-threadupdate.c (delete_jump_thread_path): Fix typo in
5229         comment.
5230
5231 2017-09-11  Max Filippov  <jcmvbkbc@gmail.com>
5232
5233         PR target/82181
5234         * config/xtensa/xtensa.c (xtensa_mem_offset): Check that both
5235         words of E_DImode object are reachable by xtensa_uimm8x4 access.
5236
5237 2017-09-11  Vidya Praveen  <vidyapraveen@arm.com>
5238
5239         Revert r251800 and r251799.
5240
5241 2017-09-11  Martin Jambor  <mjambor@suse.cz>
5242
5243         PR hsa/82119
5244         * hsa-gen.c (gen_hsa_phi_from_gimple_phi): Process ADDR_EXPRs in
5245         arguments in advance.
5246         * hsa-regalloc.c (naive_process_phi): New parameter predecessors,
5247         use it to find predecessor edges.
5248         (naive_outof_ssa): Collect vector of predecessors.
5249
5250 2017-09-08  Jason Merrill  <jason@redhat.com>
5251
5252         PR c++/70029 - ICE with ref-qualifier and -flto
5253         * langhooks.h (struct lang_hooks_for_types): Add
5254         copy_lang_qualifiers.
5255         * attribs.c (build_type_attribute_qual_variant): Use it.
5256         * langhooks-def.h (LANG_HOOKS_COPY_LANG_QUALIFIERS): Default to
5257         NULL.
5258         (LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it.
5259         * tree.c (verify_type): Re-enable TYPE_CANONICAL main variant check.
5260
5261 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
5262
5263         PR target/81988
5264         * config/sparc/sparc.md (mulsi3): Rename into *mulsi3_sp32.
5265         (*mulsi3_sp64): New instruction.
5266         (mulsi3): New expander.
5267
5268 2017-09-08  Uros Bizjak  <ubizjak@gmail.com>
5269
5270         * config/alpha/alpha.c (alpha_print_operand) <case 'S'>: Remove.
5271
5272 2017-09-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5273
5274         * sancov.c: Include memmodel.h.
5275
5276 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
5277
5278         PR target/80897
5279         * config/sparc/sparc.c (sparc_emit_set_symbolic_const64): Deal with too
5280         large offsets.
5281
5282 2017-09-07  Carl Love  <cel@us.ibm.com>
5283
5284         * config/rs6000/vsx.md (define_insn "*stxvl"): Add missing argument to
5285         the sldi instruction.
5286
5287 2017-09-07  David Edelsohn  <dje.gcc@gmail.com>
5288
5289         * sancov.c: Include tm_p.h.
5290
5291 2017-09-07  Jakub Jelinek  <jakub@redhat.com>
5292
5293         PR target/81979
5294         * output.h (switch_to_other_text_partition): New declaration.
5295         * varasm.c (switch_to_other_text_partition): New function.
5296         * config/rs6000/rs6000.c (uses_TOC): Return 2 if
5297         NOTE_INSN_SWITCH_TEXT_SECTIONS is seen before finding load_toc_* insn.
5298         (rs6000_elf_declare_function_name): If uses_TOC returned 2, switch
5299         to the other text partition before emitting LCL label and switch back
5300         after emitting the word after it.
5301
5302 2017-09-07  Richard Biener  <rguenther@suse.de>
5303
5304         * passes.def (pass_split_crit_edges): Remove instance before PRE.
5305         * tree-ssa-pre.c (pass_pre::execute): Instead manually split
5306         critical edges here, after loop init.
5307         (pass_data_pre): Remove PROP_no_crit_edges flags.
5308         * tree-ssa-sccvn.c (vn_reference_lookup_3): Use vn_valueize
5309         for valueization of call args to avoid leaking VN_TOP.
5310         (visit_use): Assert we do not visit default defs.
5311         (init_scc_vn): Use build_decl for VN_TOP to make name nicer.
5312         Use error_mark_node to more easily detect leaking VN_TOP.
5313         All default-defs are varying, not VN_TOP.  Mark them visited.
5314         (run_scc_vn): Make code match comment.
5315
5316 2017-09-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
5317
5318         * config/rs6000/rs6000-cpus.def (OTHER_VSX_VECTOR_MASKS): Delete
5319         OPTION_MASK_FLOAT128_KEYWORD.
5320         (POWERPC_MASKS): Likewise.
5321         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Delete
5322         support for the -mfloat128-type option, and make -mfloat128
5323         default on PowerPC Linux systems.  Define or undefine
5324         __FLOAT128__ and  __FLOAT128_HARDWARE__ for the current options.
5325         Define __float128 to be __ieee128 if IEEE 128-bit support is
5326         enabled, or undefine it.
5327         (rs6000_cpu_cpp_builtins): Delete defining __FLOAT128__ here.
5328         Delete defining __FLOAT128_TYPE__.
5329         * config/rs6000/rs6000.opt (x_TARGET_FLOAT128_TYPE): Delete the
5330         -mfloat128-type option and make -mfloat128 default on PowerPC
5331         Linux systems.
5332         (TARGET_FLOAT128_TYPE): Likewise.
5333         (-mfloat128-type): Likewise.
5334         * config/rs6000/rs6000.c (rs6000_option_override_internal):
5335         Delete the -mfloat128-type option and make -mfloat128 default on
5336         PowerPC Linux systems.  Always use __ieee128 to be the keyword for
5337         the IEEE 128-bit type, and map __float128 to __ieee128 if IEEE
5338         128-bit floating point is enabled.  Change tests from using
5339         -mfloat128-type to -mfloat128.
5340         (rs6000_mangle_type): Use the correct mangling for the __float128
5341         type even if normal long double is restricted to 64-bits.
5342         (floatn_mode): Enable the _Float128 type by default on VSX Linux
5343         systems.
5344         * config/rs6000/rs6000.h (MASK_FLOAT128_TYPE): Delete.
5345         (MASK_FLOAT128_KEYWORD): Define new shortcut macro.
5346         (RS6000BTM_FLOAT128): Define in terms of -mfloat128, not
5347         -mfloat128-type.
5348         * doc/invoke.texi (RS/6000 and PowerPC Options): Update
5349         documentation for -mfloat128.
5350
5351 2017-09-06  Olivier Hainque  <hainque@adacore.com>
5352
5353         * config.gcc (powerpc-wrs-vxworksspe): Now match as vxworks*spe.
5354
5355 2017-09-06  Wish Wu  <wishwu007@gmail.com>
5356             Jakub Jelinek  <jakub@redhat.com>
5357
5358         * asan.c (initialize_sanitizer_builtins): Add
5359         BT_FN_VOID_UINT8_UINT8, BT_FN_VOID_UINT16_UINT16,
5360         BT_FN_VOID_UINT32_UINT32, BT_FN_VOID_UINT64_UINT64,
5361         BT_FN_VOID_FLOAT_FLOAT, BT_FN_VOID_DOUBLE_DOUBLE and
5362         BT_FN_VOID_UINT64_PTR variables.
5363         * builtin-types.def (BT_FN_VOID_UINT8_UINT8): New fn type.
5364         (BT_FN_VOID_UINT16_UINT16): Likewise.
5365         (BT_FN_VOID_UINT32_UINT32): Likewise.
5366         (BT_FN_VOID_FLOAT_FLOAT): Likewise.
5367         (BT_FN_VOID_DOUBLE_DOUBLE): Likewise.
5368         (BT_FN_VOID_UINT64_PTR): Likewise.
5369         * common.opt (flag_sanitize_coverage): New variable.
5370         (fsanitize-coverage=trace-pc): Remove.
5371         (fsanitize-coverage=): Add.
5372         * flag-types.h (enum sanitize_coverage_code): New enum.
5373         * fold-const.c (fold_range_test): Disable non-short-circuit
5374         optimization if flag_sanitize_coverage.
5375         (fold_truth_andor): Likewise.
5376         * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
5377         * opts.c (COVERAGE_SANITIZER_OPT): Define.
5378         (coverage_sanitizer_opts): New array.
5379         (get_closest_sanitizer_option): Add OPTS argument, handle also
5380         OPT_fsanitize_coverage_.
5381         (parse_sanitizer_options): Adjusted to also handle
5382         OPT_fsanitize_coverage_.
5383         (common_handle_option): Add OPT_fsanitize_coverage_.
5384         * sancov.c (instrument_comparison, instrument_switch): New function.
5385         (sancov_pass): Add trace-cmp support.
5386         * sanitizer.def (BUILT_IN_SANITIZER_COV_TRACE_CMP1,
5387         BUILT_IN_SANITIZER_COV_TRACE_CMP2, BUILT_IN_SANITIZER_COV_TRACE_CMP4,
5388         BUILT_IN_SANITIZER_COV_TRACE_CMP8,
5389         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP1,
5390         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP2,
5391         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP4,
5392         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP8,
5393         BUILT_IN_SANITIZER_COV_TRACE_CMPF, BUILT_IN_SANITIZER_COV_TRACE_CMPD,
5394         BUILT_IN_SANITIZER_COV_TRACE_SWITCH): New builtins.
5395         * doc/invoke.texi: Document -fsanitize-coverage=trace-cmp.
5396
5397 2017-09-06  Richard Earnshaw  <rearnsha@arm.com>
5398
5399         * config/arm/parsecpu.awk (fatal): Note that we've encountered an
5400         error.  Only quit immediately if parsing is complete.
5401         (BEGIN): Initialize fatal_err and parse_done.
5402         (begin fpu, end fpu): Check number of arguments.
5403         (begin arch, end arch): Likewise.
5404         (begin cpu, end cpu): Likewise.
5405         (cname, tune for, tune flags, architecture, fpu, option): Likewise.
5406         (optalias): Likewise.
5407
5408 2017-09-06  Richard Earnshaw  <rearnsha@arm.com>
5409
5410         * config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.
5411         * config/arm/arm-isa.h: Delete.  Move definitions to ...
5412         * arm-cpus.in: ... here.  Use new feature and fgroup values.
5413         * config/arm/arm.c (arm_option_override): Use lower case for feature
5414         bit names.
5415         * config/arm/arm.h (TARGET_HARD_FLOAT): Likewise.
5416         (TARGET_VFP3, TARGET_VFP5, TARGET_FMA): Likewise.
5417         * config/arm/parsecpu.awk (END): Add new command 'isa'.
5418         (isa_pfx): Delete.
5419         (print_isa_bits_for): New function.
5420         (gen_isa): New function.
5421         (gen_comm_data): Use print_isa_bits_for.
5422         (define feature): New keyword.
5423         (define fgroup): New keyword.
5424         * config/arm/t-arm (OPTIONS_H_EXTRA): Add arm-isa.h
5425         (arm-isa.h): Add rule to generate file.
5426         * common/config/arm/arm-common.c: (arm_canon_arch_option): Use lower
5427         case for feature bit names.
5428
5429 2017-09-06  Richard Biener  <rguenther@suse.de>
5430
5431         * tree-ssa-pre.c (NECESSARY): Remove.
5432         (create_expression_by_pieces): Do not touch pass-local flags.
5433         (insert_into_preds_of_block): Likewise.
5434         (do_pre_regular_insertion): Likewise.
5435         (eliminate_insert): Likewise.
5436         (eliminate_dom_walker::before_dom_children): Likewise.
5437         (fini_eliminate): Do not look at inserted_exprs.
5438         (mark_operand_necessary): Remove.
5439         (remove_dead_inserted_code): Replace with simple work-list
5440         algorithm based on inserted_exprs and SSA uses.
5441         (pass_pre::execute): Re-order fini_eliminate and
5442         remove_dead_inserted_code.
5443
5444 2017-09-06  Olivier Hainque  <hainque@adacore.com>
5445
5446         * config/powerpcspe/vxworks.h (VXCPU_FOR_8548): Correct definition
5447         for VxWorks 7.  Adjust surrounding comments.
5448
5449 2017-09-06  Richard Biener  <rguenther@suse.de>
5450
5451         * gimple-ssa-strength-reduction.c
5452         (find_candidates_dom_walker::before_dom_children): Also allow
5453         pointer types.
5454
5455 2017-09-06  Richard Biener  <rguenther@suse.de>
5456
5457         PR tree-optimization/82108
5458         * tree-vect-stmts.c (vectorizable_load): Fix pointer adjustment
5459         for gap in the non-permutation SLP case.
5460
5461 2017-09-06  Martin Jambor  <mjambor@suse.cz>
5462
5463         PR tree-optimization/82078
5464         * tree-sra.c (sort_and_splice_var_accesses): Move call to
5465         add_access_to_work_queue...
5466         (build_accesses_from_assign): ...here.
5467         (propagate_all_subaccesses): Make sure racc is the group
5468         representative, if there is one.
5469
5470 2017-09-06  Jakub Jelinek  <jakub@redhat.com>
5471
5472         PR middle-end/82095
5473         * varasm.c (categorize_decl_for_section): Use SECCAT_TBSS for TLS vars with
5474         NULL DECL_INITIAL.
5475
5476 2017-09-06  Richard Biener  <rguenther@suse.de>
5477
5478         * gimple-ssa-strength-reduction.c
5479         (find_candidates_dom_walker::before_doom_children): Use a
5480         type and not a mode check.
5481
5482 2017-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5483
5484         PR target/77308
5485         * config/arm/predicates.md (arm_general_adddi_operand): Create new
5486         non-vfp predicate.
5487         * config/arm/arm.md (*arm_adddi3, *arm_subdi3): Use new predicates.
5488
5489 2017-09-05  Jeff Law  <law@redhat.com>
5490
5491         PR tree-optimization/64910
5492         * tree-ssa-reassoc.c (reassociate_bb): Restrict last change to
5493         cases where we have 3 or more operands.
5494
5495 2017-09-05  Jakub Jelinek  <jakub@redhat.com>
5496
5497         PR middle-end/81768
5498         * omp-low.c (lower_omp_for): Recompute tree invariant if
5499         gimple_omp_for_initial/final is ADDR_EXPR.
5500
5501         PR middle-end/81768
5502         * omp-expand.c (expand_omp_simd): Force second operands of COND_EXPR
5503         into gimple val before gimplification fo the COND_EXPR.
5504
5505 2017-09-05  Aldy Hernandez  <aldyh@redhat.com>
5506
5507         * tree-ssa-threadupdate.c (duplicate_thread_path): Remove unused
5508         REGION_COPY argument.
5509         (thread_through_all_blocks): Remove unused argument to
5510         duplicate_thread_path.
5511
5512 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5513             Alan Hayward  <alan.hayward@arm.com>
5514             David Sherwood  <david.sherwood@arm.com>
5515
5516         * config/aarch64/aarch64-protos.h (aarch64_gen_adjusted_ldpstp):
5517         Take a scalar_mode rather than a machine_mode.
5518         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
5519         * config/aarch64/aarch64.c (aarch64_simd_container_mode): Likewise.
5520         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
5521         (aarch64_gen_adjusted_ldpstp): Likewise.
5522         (aarch64_expand_vector_init): Use scalar_mode instead of machine_mode.
5523
5524 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5525             Alan Hayward  <alan.hayward@arm.com>
5526             David Sherwood  <david.sherwood@arm.com>
5527
5528         * config/aarch64/aarch64-protos.h (aarch64_is_extend_from_extract):
5529         Take a scalar_int_mode instead of a machine_mode.
5530         (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
5531         (aarch64_output_scalar_simd_mov_immediate): Likewise.
5532         (aarch64_simd_scalar_immediate_valid_for_move): Likewise.
5533         (aarch64_simd_attr_length_rglist): Delete.
5534         * config/aarch64/aarch64.c (aarch64_is_extend_from_extract): Take
5535         a scalar_int_mode instead of a machine_mode.
5536         (aarch64_add_offset): Likewise.
5537         (aarch64_internal_mov_immediate): Likewise
5538         (aarch64_add_constant_internal): Likewise.
5539         (aarch64_add_constant): Likewise.
5540         (aarch64_movw_imm): Likewise.
5541         (aarch64_rtx_arith_op_extract_p): Likewise.
5542         (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
5543         (aarch64_simd_scalar_immediate_valid_for_move): Likewise.
5544         Remove assert that the mode isn't a vector.
5545         (aarch64_output_scalar_simd_mov_immediate): Likewise.
5546         (aarch64_expand_mov_immediate): Update calls after above changes.
5547         (aarch64_output_casesi): Use as_a <scalar_int_mode>.
5548         (aarch64_and_bitmask_imm): Check for scalar integer modes.
5549         (aarch64_move_imm): Likewise.
5550         (aarch64_can_const_movi_rtx_p): Likewise.
5551         (aarch64_strip_extend): Likewise.
5552         (aarch64_extr_rtx_p): Likewise.
5553         (aarch64_rtx_costs): Likewise, using wode_mode as the mode of
5554         a CONST_INT when the mode parameter is VOIDmode.
5555         (aarch64_float_const_rtx_p): Use scalar_int_mode for a temporary.
5556
5557 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5558
5559         * machmode.h (bitwise_mode_for_mode): Return opt_mode.
5560         * stor-layout.c (bitwise_mode_for_mode): Likewise.
5561         (bitwise_type_for_mode): Update accordingly.
5562
5563 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5564
5565         * stor-layout.h (mode_for_size_tree): Return an opt_mode.
5566         * stor-layout.c (mode_for_size_tree): Likewise.
5567         (mode_for_array): Update accordingly.
5568         (layout_decl): Likewise.
5569         (compute_record_mode): Likewise.  Only set the mode once.
5570
5571 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5572
5573         * target.def (get_mask_mode): Change return type to opt_mode.
5574         Expand commentary.
5575         * doc/tm.texi: Regenerate.
5576         * targhooks.h (default_get_mask_mode): Return an opt_mode.
5577         * targhooks.c (default_get_mask_mode): Likewise.
5578         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
5579         * optabs-query.c (can_vec_mask_load_store_p): Update use of
5580         targetm.get_mask_mode.
5581         * tree.c (build_truth_vector_type): Likewise.
5582
5583 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5584
5585         * machmode.h (mode_for_vector): Return an opt_mode.
5586         * stor-layout.c (mode_for_vector): Likewise.
5587         (mode_for_int_vector): Update accordingly.
5588         (layout_type): Likewise.
5589         * config/i386/i386.c (emit_memmov): Likewise.
5590         (ix86_expand_set_or_movmem): Likewise.
5591         (ix86_expand_vector_init): Likewise.
5592         (ix86_get_mask_mode): Likewise.
5593         * config/powerpcspe/powerpcspe.c (rs6000_expand_vec_perm_const_1):
5594         Likewise.
5595         * config/rs6000/rs6000.c (rs6000_expand_vec_perm_const_1): Likewise.
5596         * expmed.c (extract_bit_field_1): Likewise.
5597         * expr.c (expand_expr_real_2): Likewise.
5598         * optabs-query.c (can_vec_perm_p): Likewise.
5599         (can_vec_mask_load_store_p): Likewise.
5600         * optabs.c (expand_vec_perm): Likewise.
5601         * targhooks.c (default_get_mask_mode): Likewise.
5602         * tree-vect-stmts.c (vectorizable_store): Likewise.
5603         (vectorizable_load): Likewise.
5604         (get_vectype_for_scalar_type_and_size): Likewise.
5605
5606 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5607
5608         * machmode.h (mode_for_int_vector): New function.
5609         * stor-layout.c (mode_for_int_vector): Likewise.
5610         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Use it.
5611         * config/powerpcspe/powerpcspe.c (rs6000_do_expand_vec_perm): Likewise.
5612         * config/rs6000/rs6000.c (rs6000_do_expand_vec_perm): Likewise.
5613         * config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
5614         (s390_expand_vcond): Likewise.
5615
5616 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5617
5618         * machmode.h (opt_machine_mode): New type.
5619         (opt_mode<T>): Allow construction from anything that can be
5620         converted to a T.
5621         (is_a, as_a, dyn_cast): Add overloads for opt_mode.
5622         (mode_for_size): Return an opt_machine_mode.
5623         * stor-layout.c (mode_for_size): Likewise.
5624         (mode_for_size_tree): Update call accordingly.
5625         (bitwise_mode_for_mode): Likewise.
5626         (make_fract_type): Likewise.
5627         (make_accum_type): Likewise.
5628         * caller-save.c (replace_reg_with_saved_mem): Update call
5629         accordingly.
5630         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
5631         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
5632         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
5633         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
5634         * expmed.c (extract_bit_field_1): Likewise.
5635         * reload.c (get_secondary_mem): Likewise.
5636         * varasm.c (assemble_integer): Likewise.
5637         * lower-subreg.c (simplify_subreg_concatn): Likewise.  Move
5638         early-out.
5639
5640 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5641
5642         * machmode.h (decimal_float_mode_for_size): New function.
5643         * real.h (REAL_VALUE_TO_TARGET_LONG_DOUBLE): Use float_mode_for_size.
5644         (REAL_VALUE_TO_TARGET_DOUBLE): Likewise.
5645         (REAL_VALUE_TO_TARGET_SINGLE): Likewise.
5646         (REAL_VALUE_TO_TARGET_DECIMAL128): Use decimal_float_mode_for_size.
5647         (REAL_VALUE_TO_TARGET_DECIMAL64): Likewise.
5648         (REAL_VALUE_TO_TARGET_DECIMAL32): Likewise.
5649
5650 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5651
5652         * builtins.c (expand_builtin_powi): Use int_mode_for_size.
5653         (get_builtin_sync_mode): Likewise.
5654         (expand_ifn_atomic_compare_exchange): Likewise.
5655         (expand_builtin_atomic_clear): Likewise.
5656         (expand_builtin_atomic_test_and_set): Likewise.
5657         (fold_builtin_atomic_always_lock_free): Likewise.
5658         * calls.c (compute_argument_addresses): Likewise.
5659         (emit_library_call_value_1): Likewise.
5660         (store_one_arg): Likewise.
5661         * combine.c (combine_instructions): Likewise.
5662         * config/aarch64/aarch64.c (aarch64_function_value): Likewise.
5663         * config/arm/arm.c (arm_function_value): Likewise.
5664         (aapcs_allocate_return_reg): Likewise.
5665         * config/c6x/c6x.c (c6x_expand_movmem): Likewise.
5666         * config/i386/i386.c (construct_container): Likewise.
5667         (ix86_gimplify_va_arg): Likewise.
5668         (ix86_expand_sse_cmp): Likewise.
5669         (emit_memmov): Likewise.
5670         (emit_memset): Likewise.
5671         (expand_small_movmem_or_setmem): Likewise.
5672         (ix86_expand_pextr): Likewise.
5673         (ix86_expand_pinsr): Likewise.
5674         * config/lm32/lm32.c (lm32_block_move_inline): Likewise.
5675         * config/microblaze/microblaze.c (microblaze_block_move_straight):
5676         Likewise.
5677         * config/mips/mips.c (mips_function_value_1) Likewise.
5678         (mips_block_move_straight): Likewise.
5679         (mips_expand_ins_as_unaligned_store): Likewise.
5680         * config/powerpcspe/powerpcspe.c
5681         (rs6000_darwin64_record_arg_advance_flush): Likewise.
5682         (rs6000_darwin64_record_arg_flush): Likewise.
5683         * config/rs6000/rs6000.c
5684         (rs6000_darwin64_record_arg_advance_flush): Likewise.
5685         (rs6000_darwin64_record_arg_flush): Likewise.
5686         * config/sparc/sparc.c (sparc_function_arg_1): Likewise.
5687         (sparc_function_value_1): Likewise.
5688         * config/spu/spu.c (adjust_operand): Likewise.
5689         (spu_emit_branch_or_set): Likewise.
5690         (arith_immediate_p): Likewise.
5691         * emit-rtl.c (gen_lowpart_common): Likewise.
5692         * expr.c (expand_expr_real_1): Likewise.
5693         * function.c (assign_parm_setup_block): Likewise.
5694         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Likewise.
5695         * reload1.c (alter_reg): Likewise.
5696         * stor-layout.c (mode_for_vector): Likewise.
5697         (layout_type): Likewise.
5698
5699 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5700
5701         * config/spu/spu.c (exp2_immediate_p): Use int_mode_for_mode.
5702         (spu_convert_move): Likewise.
5703         * lower-subreg.c (resolve_simple_move): Likewise.
5704
5705 2017-09-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
5706
5707         PR target/81833
5708         * config/rs6000/altivec.md (altivec_vsum2sws): Convert from a
5709         define_insn to a define_expand.
5710         (altivec_vsum2sws_direct): New define_insn.
5711         (altivec_vsumsws): Convert from a define_insn to a define_expand.
5712
5713 2017-09-05  Wilco Dijkstra  <wdijkstr@arm.com>
5714
5715         * config/arm/arm.c (arm_option_params_internal): Improve setting of
5716         max_insns_skipped.
5717
5718 2017-09-05  H.J. Lu  <hongjiu.lu@intel.com>
5719
5720         PR target/59501
5721         PR target/81624
5722         PR target/81769
5723         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Don't
5724         realign stack if stack alignment needed is less than incoming
5725         stack boundary.
5726
5727 2017-09-05  Marek Polacek  <polacek@redhat.com>
5728
5729         PR sanitizer/82072
5730         * convert.c (convert_to_integer_1) <case NEGATE_EXPR>: Move the ubsan
5731         check earlier.
5732
5733 2017-09-05  Wilco Dijkstra  <wdijkstr@arm.com>
5734
5735         * explow.c (get_dynamic_stack_size): Improve dynamic alignment.
5736
5737 2017-09-05  Richard Biener  <rguenther@suse.de>
5738
5739         PR tree-optimization/82084
5740         * fold-const.c (can_native_encode_string_p): Handle wide characters.
5741
5742 2017-09-05  Richard Biener  <rguenther@suse.de>
5743
5744         PR tree-optimization/82102
5745         * tree-ssa-pre.c (fini_eliminate): Check if lhs is NULL.
5746
5747 2017-09-05  Martin Liska  <mliska@suse.cz>
5748
5749         PR tree-optimization/82032
5750         * tree-cfg.c (generate_range_test): New function.
5751         * tree-cfg.h (generate_range_test): Declared here.
5752         * tree-cfgcleanup.c (convert_single_case_switch): New function.
5753         (cleanup_control_expr_graph): Use it.
5754         * tree-switch-conversion.c (try_switch_expansion): Remove
5755         assert.
5756         (emit_case_nodes): Use generate_range_test.
5757
5758 2017-09-04  Uros Bizjak  <ubizjak@gmail.com>
5759
5760         PR target/82098
5761         * config/i386/i386.md (*<btsc><mode>_mask): Add
5762         TARGET_USE_BT to insn constraint.
5763         (*btr<mode>_mask): Ditto.
5764
5765 2017-09-04  Wilco Dijkstra  <wdijkstr@arm.com>
5766
5767         * config/arm/arm.c (arm_legitimate_index_p): Add comment.
5768         (thumb2_legitimate_index_p): Use correct range for DI/DF mode.
5769
5770 2017-09-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5771
5772         PR target/77308
5773         * config/arm/arm.md (*arm_adddi3, *arm_subdi3): Split early except for
5774         TARGET_NEON and TARGET_IWMMXT.
5775         (anddi3, iordi3, xordi3, one_cmpldi2): Split while expanding except for
5776         TARGET_NEON and TARGET_IWMMXT.
5777         (*one_cmpldi2_insn): Moved the body of one_cmpldi2 here.
5778
5779 2017-09-04  Uros Bizjak  <ubizjak@gmail.com>
5780
5781         * config/i386/i386-protos.h (ix86_tls_address_pattern_p) New prototype.
5782         (ix86_rewrite_tls_address): Ditto.
5783         * config/i386/i386.c (ix86_tls_address_pattern_p) New function.
5784         (ix86_rewrite_tls_address_1): Ditto.
5785         (ix86_rewrite_tls_address): Ditto.
5786         * config/i386/predicates.md (tls_address_pattern): New predicate.
5787         * config/i386/i386.md (TLS address splitter): New splitter.
5788
5789 2017-09-04  Richard Biener  <rguenther@suse.de>
5790
5791         PR tree-optimization/82084
5792         * fold-const.h (can_native_encode_string_p): Declare.
5793         * fold-const.c (can_native_encode_string_p): Factor out from ...
5794         (native_encode_string): ... here.
5795         * tree-vect-stmts.c (vectorizable_store): Call it to avoid
5796         vectorizing stores from constants we later cannot handle.
5797
5798 2017-09-04  Marek Polacek  <polacek@redhat.com>
5799
5800         PR c/81783
5801         * doc/invoke.texi: Update -Wtautological-compare documentation.
5802
5803 2017-09-04  Jeff Law  <law@redhat.com>
5804
5805         PR tree-optimization/64910
5806         * tree-ssa-reassoc.c (reassociate_bb): For bitwise binary ops,
5807         swap the first and last operand if the last is a constant.
5808
5809 2017-09-04  Marek Polacek  <polacek@redhat.com>
5810
5811         PR sanitizer/82072
5812         * convert.c (do_narrow): When sanitizing signed integer overflows,
5813         bail out for signed types.
5814         (convert_to_integer_1) <case NEGATE_EXPR>: Likewise.
5815
5816 2017-09-04  Richard Biener  <rguenther@suse.de>
5817
5818         PR tree-optimization/82060
5819         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
5820         Move devirtualization after stmt folding and before EH/AB/noreturn
5821         cleanup to get the stmt refs canonicalized.  Use a bool instead
5822         of gimple_modified_p since that doesn't work for NOPs.  Schedule
5823         NOPs generated by folding for removal.
5824
5825 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
5826             Alan Hayward  <alan.hayward@arm.com>
5827             David Sherwood  <david.sherwood@arm.com>
5828
5829         * coretypes.h (pad_direction): New enum.
5830         * defaults.h (DEFAULT_FUNCTION_ARG_PADDING): Delete.
5831         (FUNCTION_ARG_PADDING): Likewise.
5832         * target.def (function_arg_padding): New hook.
5833         * targhooks.h (default_function_arg_padding): Declare.
5834         * targhooks.c (default_function_arg_padding): New function.
5835         * doc/tm.texi.in (FUNCTION_ARG_PADDING): Replace with...
5836         (TARGET_FUNCTION_ARG_PADDING): ...this.
5837         * doc/tm.texi: Regenerate.
5838         * calls.c (store_unaligned_arguments_into_pseudos): Use pad_direction
5839         instead of direction.
5840         (compute_argument_addresses): Likewise.
5841         (load_register_parameters): Likewise.
5842         (emit_library_call_value_1): Likewise.
5843         (store_one_arg): Use targetm.calls.function_arg_padding instead
5844         of FUNCTION_ARG_PADDING.
5845         (must_pass_in_stack_var_size_or_pad): Likewise.
5846         * expr.c (emit_group_load_1): Use pad_direction instead of direction.
5847         (emit_group_store): Likewise.
5848         (emit_single_push_insn_1): Use targetm.calls.function_arg_padding
5849         instead of FUNCTION_ARG_PADDING.
5850         (emit_push_insn): Likewise, and propagate enum change throughout
5851         function.
5852         * function.h (direction): Delete.
5853         (locate_and_pad_arg_data::where_pad): Use pad_direction instead
5854         of direction.
5855         * function.c (assign_parm_find_stack_rtl): Likewise.
5856         (assign_parm_setup_block_p): Likewise.
5857         (assign_parm_setup_block): Likewise.
5858         (gimplify_parameters): Likewise.
5859         (locate_and_pad_parm): Use targetm.calls.function_arg_padding
5860         instead of FUNCTION_ARG_PADDING, and propagate enum change throughout
5861         function.
5862         * config/aarch64/aarch64.h (FUNCTION_ARG_PADDING): Delete.
5863         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
5864         * config/aarch64/aarch64-protos.h (aarch64_pad_arg_upward): Delete.
5865         * config/aarch64/aarch64.c (aarch64_pad_arg_upward): Replace with...
5866         (aarch64_function_arg_padding): ...this new function.
5867         (aarch64_gimplify_va_arg_expr): Use pad_direction instead of direction.
5868         (TARGET_FUNCTION_ARG_PADDING): Redefine.
5869         * config/arm/arm.h (FUNCTION_ARG_PADDING): Delete.
5870         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
5871         * config/arm/arm-protos.h (arm_pad_arg_upward): Delete.
5872         * config/arm/arm.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
5873         (arm_pad_arg_upward): Replace with...
5874         (arm_function_arg_padding): ...this new function.
5875         * config/c6x/c6x.h (BLOCK_REG_PADDING): Use pad_direction instead
5876         of direction.
5877         * config/ia64/hpux.h (FUNCTION_ARG_PADDING): Delete.
5878         * config/ia64/ia64-protos.h (ia64_hpux_function_arg_padding): Delete.
5879         * config/ia64/ia64.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
5880         (ia64_hpux_function_arg_padding): Replace with...
5881         (ia64_function_arg_padding): ...this new function.  Use pad_direction
5882         instead of direction.  Check for TARGET_HPUX.
5883         * config/iq2000/iq2000.h (FUNCTION_ARG_PADDING): Delete.
5884         * config/iq2000/iq2000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
5885         (iq2000_function_arg_padding): New function.
5886         * config/mips/mips-protos.h (mips_pad_arg_upward): Delete.
5887         * config/mips/mips.c (mips_pad_arg_upward): Replace with...
5888         (mips_function_arg_padding): ...this new function.
5889         (mips_pad_reg_upward): Update accordingly.
5890         (TARGET_FUNCTION_ARG_PADDING): Redefine.
5891         * config/mips/mips.h (PAD_VARARGS_DOWN): Use
5892         targetm.calls.function_arg_padding.
5893         (FUNCTION_ARG_PADDING): Delete.
5894         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
5895         * config/nios2/nios2.h (FUNCTION_ARG_PADDING): Delete.
5896         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
5897         * config/nios2/nios2-protos.h (nios2_function_arg_padding): Delete.
5898         (nios2_block_reg_padding): Return pad_direction instead of direction.
5899         * config/nios2/nios2.c (nios2_block_reg_padding): Return pad_direction
5900         instead of direction.
5901         (nios2_function_arg_padding): Likewise.  Make static.
5902         (TARGET_FUNCTION_ARG_PADDING): Redefine.
5903         * config/pa/pa.h (FUNCTION_ARG_PADDING): Delete.
5904         (BLOCK_REG_PADDING): Use targetm.calls.function_arg_padding.
5905         * config/pa/pa-protos.h (pa_function_arg_padding): Delete.
5906         * config/pa/pa.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
5907         (pa_function_arg_padding): Make static.  Return pad_direction instead
5908         of direction.
5909         * config/powerpcspe/powerpcspe.h (FUNCTION_ARG_PADDING): Delete.
5910         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
5911         * config/powerpcspe/aix.h (BLOCK_REG_PADDING): Use pad_direction
5912         instead of direction.  Use targetm.calls.function_arg_padding.
5913         * config/powerpcspe/darwin.h (BLOCK_REG_PADDING): Likewise.
5914         * config/powerpcspe/freebsd64.h (BLOCK_REG_PADDING): Likewise.
5915         * config/powerpcspe/linux64.h (BLOCK_REG_PADDING): Likewise.
5916         * config/powerpcspe/powerpcspe-protos.h (function_arg_padding): Delete.
5917         * config/powerpcspe/powerpcspe.c (TARGET_FUNCTION_ARG_PADDING):
5918         Redefine.
5919         (function_arg_padding): Rename to...
5920         (rs6000_function_arg_padding): ...this.  Make static.  Return
5921         pad_direction instead of direction.
5922         (rs6000_return_in_msb): Use rs6000_function_arg_padding.
5923         * config/rs6000/rs6000.h (FUNCTION_ARG_PADDING): Delete.
5924         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
5925         * config/rs6000/aix.h (BLOCK_REG_PADDING): Use pad_direction
5926         instead of direction.  Use targetm.calls.function_arg_padding.
5927         * config/rs6000/darwin.h (BLOCK_REG_PADDING): Likewise.
5928         * config/rs6000/freebsd64.h (BLOCK_REG_PADDING): Likewise.
5929         * config/rs6000/linux64.h (BLOCK_REG_PADDING): Likewise.
5930         * config/rs6000/rs6000-protos.h (function_arg_padding): Delete.
5931         * config/rs6000/rs6000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
5932         (function_arg_padding): Rename to...
5933         (rs6000_function_arg_padding): ...this.  Make static.  Return
5934         pad_direction instead of direction.
5935         (rs6000_return_in_msb): Use rs6000_function_arg_padding.
5936         * config/s390/s390.h (FUNCTION_ARG_PADDING): Delete.
5937         * config/s390/s390.c (s390_function_arg_padding): New function.
5938         (TARGET_FUNCTION_ARG_PADDING): Redefine.
5939         * config/sparc/sparc.h (FUNCTION_ARG_PADDING): Delete.
5940         * config/sparc/sparc-protos.h (function_arg_padding): Delete.
5941         * config/sparc/sparc.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
5942         (function_arg_padding): Rename to...
5943         (sparc_function_arg_padding): ...this.  Make static.  Return
5944         pad_direction instead of direction.
5945         * config/spu/spu.h (FUNCTION_ARG_PADDING): Delete.
5946         * config/spu/spu.c (spu_function_arg_padding): New function.
5947         (TARGET_FUNCTION_ARG_PADDING): Redefine.
5948         * system.h (FUNCTION_ARG_PADDING): Poison.
5949
5950 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
5951             Alan Hayward  <alan.hayward@arm.com>
5952             David Sherwood  <david.sherwood@arm.com>
5953
5954         * target.def (modes_tieable_p): New hook.
5955         * doc/tm.texi (MODES_TIEABLE_P): Replace with...
5956         (TARGET_MODES_TIEABLE_P): ...this.
5957         * doc/tm.texi.in: Regenerate.
5958         * hooks.h (hook_bool_mode_mode_true): Declare.
5959         * hooks.c (hook_bool_mode_mode_true): New function.
5960         * combine.c (subst): Use targetm.modes_tieable_p instead of
5961         MODES_TIEABLE_P.
5962         * dse.c (find_shift_sequence): Likewise.
5963         * expmed.c (extract_low_bits): Likewise.
5964         * lower-subreg.c: Include target.h.
5965         (find_decomposable_subregs): Use targetm.modes_tieable_p instead of
5966         MODES_TIEABLE_P.
5967         * rtlanal.c (rtx_cost): Likewise.
5968         * config/aarch64/aarch64.h (MODES_TIEABLE_P): Delete.
5969         * config/aarch64/aarch64-protos.h (aarch64_modes_tieable_p): Delete.
5970         * config/aarch64/aarch64.c (aarch64_modes_tieable_p): Make static.
5971         (TARGET_MODES_TIEABLE_P): Redefine.
5972         * config/alpha/alpha.h (MODES_TIEABLE_P): Delete.
5973         * config/alpha/alpha.c (alpha_modes_tieable_p): New function.
5974         (TARGET_MODES_TIEABLE_P): Redefine.
5975         * config/arc/arc.h (MODES_TIEABLE_P): Delete.
5976         * config/arc/arc.c (TARGET_MODES_TIEABLE_P): Redefine.
5977         (arc_modes_tieable_p): New function.
5978         * config/arm/arm.h (MODES_TIEABLE_P): Delete.
5979         * config/arm/arm-protos.h (arm_modes_tieable_p): Delete.
5980         * config/arm/arm.c (TARGET_MODES_TIEABLE_P): Redefine.
5981         (arm_modes_tieable_p): Make static.
5982         * config/avr/avr.h (MODES_TIEABLE_P): Delete.
5983         * config/bfin/bfin.h (MODES_TIEABLE_P): Delete.
5984         * config/bfin/bfin.c (bfin_modes_tieable_p): New function.
5985         (TARGET_MODES_TIEABLE_P): Redefine.
5986         * config/c6x/c6x.h (MODES_TIEABLE_P): Delete.
5987         * config/c6x/c6x.c (c6x_modes_tieable_p): New function.
5988         (TARGET_MODES_TIEABLE_P): Redefine.
5989         * config/cr16/cr16.h (MODES_TIEABLE_P): Delete.
5990         * config/cr16/cr16.c (TARGET_MODES_TIEABLE_P): Redefine.
5991         (cr16_modes_tieable_p): New function.
5992         * config/cris/cris.h (MODES_TIEABLE_P): Delete.
5993         * config/epiphany/epiphany.h (MODES_TIEABLE_P): Delete.
5994         * config/fr30/fr30.h (MODES_TIEABLE_P): Delete.
5995         (TRULY_NOOP_TRUNCATION): Update comment.
5996         * config/frv/frv.h (MODES_TIEABLE_P): Delete.
5997         (TRULY_NOOP_TRUNCATION): Update comment.
5998         * config/frv/frv.c (TARGET_MODES_TIEABLE_P): Redefine.
5999         (frv_modes_tieable_p): New function.
6000         * config/ft32/ft32.h (MODES_TIEABLE_P): Delete.
6001         * config/h8300/h8300.h (MODES_TIEABLE_P): Delete.
6002         * config/h8300/h8300.c (h8300_modes_tieable_p): New function.
6003         (TARGET_MODES_TIEABLE_P): Redefine.
6004         * config/i386/i386.h (MODES_TIEABLE_P): Delete.
6005         * config/i386/i386-protos.h (ix86_modes_tieable_p): Delete.
6006         * config/i386/i386.c (ix86_modes_tieable_p): Make static.
6007         (TARGET_MODES_TIEABLE_P): Redefine.
6008         * config/ia64/ia64.h (MODES_TIEABLE_P): Delete.
6009         * config/ia64/ia64.c (TARGET_MODES_TIEABLE_P): Redefine.
6010         (ia64_modes_tieable_p): New function.
6011         * config/iq2000/iq2000.h (MODES_TIEABLE_P): Delete.
6012         * config/iq2000/iq2000.c (TARGET_MODES_TIEABLE_P): Redefine.
6013         (iq2000_modes_tieable_p): New function.
6014         * config/lm32/lm32.h (MODES_TIEABLE_P): Delete.
6015         * config/lm32/lm32.c (TARGET_MODES_TIEABLE_P): Redefine.
6016         (lm32_modes_tieable_p): New function.
6017         * config/m32c/m32c.h (MODES_TIEABLE_P): Delete.
6018         * config/m32c/m32c-protos.h (m32c_modes_tieable_p): Delete.
6019         * config/m32c/m32c.c (m32c_modes_tieable_p): Make static.
6020         (TARGET_MODES_TIEABLE_P): Redefine.
6021         * config/m32r/m32r.h (MODES_TIEABLE_P): Delete.
6022         * config/m32r/m32r.c (TARGET_MODES_TIEABLE_P): Redefine.
6023         (m32r_modes_tieable_p): New function.
6024         * config/m68k/m68k.h (MODES_TIEABLE_P): Delete.
6025         * config/m68k/m68k.c (TARGET_MODES_TIEABLE_P): Redefine.
6026         (m68k_modes_tieable_p): New function.
6027         * config/mcore/mcore.h (MODES_TIEABLE_P): Delete.
6028         * config/mcore/mcore.c (TARGET_MODES_TIEABLE_P): Redefine.
6029         (mcore_modes_tieable_p): New function.
6030         * config/microblaze/microblaze.h (MODES_TIEABLE_P): Delete.
6031         * config/microblaze/microblaze.c (microblaze_modes_tieable_p): New
6032         function.
6033         (TARGET_MODES_TIEABLE_P): Redefine.
6034         * config/mips/mips.h (MODES_TIEABLE_P): Delete.
6035         * config/mips/mips-protos.h (mips_modes_tieable_p): Delete.
6036         * config/mips/mips.c (mips_modes_tieable_p): Make static.
6037         (TARGET_MODES_TIEABLE_P): Redefine.
6038         * config/mmix/mmix.h (MODES_TIEABLE_P): Delete.
6039         * config/mn10300/mn10300.h (MODES_TIEABLE_P): Delete.
6040         * config/mn10300/mn10300-protos.h (mn10300_modes_tieable): Delete.
6041         * config/mn10300/mn10300.c (mn10300_modes_tieable): Rename to...
6042         (mn10300_modes_tieable_p): ...this and make static.
6043         (TARGET_MODES_TIEABLE_P): Redefine.
6044         * config/moxie/moxie.h (MODES_TIEABLE_P): Delete.
6045         * config/msp430/msp430.h (MODES_TIEABLE_P): Delete.
6046         * config/msp430/msp430-protos.h (msp430_modes_tieable_p): Delete.
6047         * config/msp430/msp430.c (TARGET_MODES_TIEABLE_P): Redefine.
6048         (msp430_modes_tieable_p): Make static.
6049         * config/nds32/nds32.h (MODES_TIEABLE_P): Delete.
6050         * config/nds32/nds32.c (nds32_modes_tieable_p): New function.
6051         (TARGET_MODES_TIEABLE_P): Redefine.
6052         * config/nios2/nios2.h (MODES_TIEABLE_P): Delete.
6053         * config/nvptx/nvptx.h (MODES_TIEABLE_P): Delete.
6054         * config/nvptx/nvptx.c (nvptx_modes_tieable_p): New function.
6055         (TARGET_MODES_TIEABLE_P): Redefine.
6056         * config/pa/pa.h (MODES_TIEABLE_P): Delete.
6057         * config/pa/pa-protos.h (pa_modes_tieable_p): Delete.
6058         * config/pa/pa.c (pa_modes_tieable_p): Make static.
6059         (TARGET_MODES_TIEABLE_P): Redefine.
6060         * config/pdp11/pdp11.h (MODES_TIEABLE_P): Delete.
6061         * config/pdp11/pdp11.c (TARGET_MODES_TIEABLE_P): Redefine.
6062         (pdp11_modes_tieable_p): New function.
6063         * config/powerpcspe/powerpcspe.h (MODES_TIEABLE_P): Delete.
6064         * config/powerpcspe/powerpcspe.c (TARGET_MODES_TIEABLE_P): Redefine.
6065         (rs6000_modes_tieable_p): New function.
6066         (rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
6067         * config/powerpcspe/powerpcspe.md: Update comment.
6068         * config/riscv/riscv.h (MODES_TIEABLE_P): Delete.
6069         * config/riscv/riscv.c (riscv_modes_tieable_p): New function.
6070         (TARGET_MODES_TIEABLE_P): Redefine.
6071         * config/rl78/rl78.h (MODES_TIEABLE_P): Delete.
6072         * config/rl78/rl78.c (TARGET_MODES_TIEABLE_P): Redefine.
6073         (rl78_modes_tieable_p): New function.
6074         * config/rs6000/rs6000.h (MODES_TIEABLE_P): Delete.
6075         * config/rs6000/rs6000.c (TARGET_MODES_TIEABLE_P): Redefine.
6076         (rs6000_modes_tieable_p): New function.
6077         (rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
6078         * config/rs6000/rs6000.md: Update comment.
6079         * config/rx/rx.h (MODES_TIEABLE_P): Delete.
6080         * config/rx/rx.c (rx_modes_tieable_p): New function.
6081         (TARGET_MODES_TIEABLE_P): Redefine.
6082         * config/s390/s390.h (MODES_TIEABLE_P): Delete.
6083         * config/s390/s390.c (s390_modes_tieable_p): New function.
6084         (TARGET_MODES_TIEABLE_P): Redefine.
6085         * config/sh/sh.h (MODES_TIEABLE_P): Delete.
6086         * config/sh/sh.c (TARGET_MODES_TIEABLE_P): Redefine.
6087         (sh_modes_tieable_p): New function.
6088         * config/sparc/sparc.h (MODES_TIEABLE_P): Delete.
6089         * config/sparc/sparc-protos.h (sparc_modes_tieable_p): Delete.
6090         * config/sparc/sparc.c (TARGET_MODES_TIEABLE_P): Redefine.
6091         (sparc_modes_tieable_p): Make static.
6092         * config/spu/spu.h (MODES_TIEABLE_P): Delete.
6093         * config/spu/spu.c (spu_modes_tieable_p): New function.
6094         (TARGET_MODES_TIEABLE_P): Redefine.
6095         * config/stormy16/stormy16.h (MODES_TIEABLE_P): Delete.
6096         * config/stormy16/stormy16.c (xstormy16_modes_tieable_p): New function.
6097         (TARGET_MODES_TIEABLE_P): Redefine.
6098         * config/tilegx/tilegx.h (MODES_TIEABLE_P): Delete.
6099         * config/tilepro/tilepro.h (MODES_TIEABLE_P): Delete.
6100         * config/v850/v850.h (MODES_TIEABLE_P): Delete.
6101         * config/v850/v850.c (v850_modes_tieable_p): New function.
6102         (TARGET_MODES_TIEABLE_P): Redefine.
6103         * config/vax/vax.h (MODES_TIEABLE_P): Delete.
6104         * config/visium/visium.h (MODES_TIEABLE_P): Delete.
6105         * config/visium/visium.c (TARGET_MODES_TIEABLE_P): Redefine.
6106         (visium_modes_tieable_p): New function.
6107         * config/xtensa/xtensa.h (MODES_TIEABLE_P): Delete.
6108         * config/xtensa/xtensa.c (TARGET_MODES_TIEABLE_P): Redefine.
6109         (xtensa_modes_tieable_p): New function.
6110         * system.h (MODES_TIEABLE_P): Poison.
6111
6112 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
6113             Alan Hayward  <alan.hayward@arm.com>
6114             David Sherwood  <david.sherwood@arm.com>
6115
6116         * target.def (hard_regno_mode_ok): New hook.
6117         * doc/tm.texi (HARD_REGNO_MODE_OK): Replace with...
6118         (TARGET_HARD_REGNO_MODE_OK): ...this.
6119         * doc/tm.texi.in: Regenerate.
6120         * hooks.h (hook_bool_uint_mode_true): Declare.
6121         * hooks.c (hook_bool_uint_mode_true): New function.
6122         * doc/md.texi: Refer to targetm.hard_regno_mode_ok instead of
6123         HARD_REGNO_MODE_OK.
6124         * genpreds.c (write_insn_preds_c): Add an include of target.h.
6125         * alias.c (init_alias_target): Use targetm.hard_regno_mode_ok
6126         instead of HARD_REGNO_MODE_OK.
6127         * caller-save.c: Include target.h.
6128         (reg_save_code): Use targetm.hard_regno_mode_ok instead of
6129         HARD_REGNO_MODE_OK.
6130         * combine.c (can_combine_p): Likewise.
6131         (combinable_i3pat): Likewise.
6132         (can_change_dest_mode): Likewise.
6133         * expr.c (init_expr_target): Likewise.
6134         (convert_move): Likewise.
6135         (convert_modes): Likewise.
6136         * ira.c (setup_prohibited_class_mode_regs): Likewise.
6137         (setup_prohibited_mode_move_regs): Likewise.
6138         * ira.h (target_ira): Likewise.
6139         * lra-assigns.c (find_hard_regno_for_1): Likewise.
6140         * lra-constraints.c (process_alt_operands): Likewise.
6141         (split_reg): Likewise.
6142         * recog.c (peep2_find_free_register): Likewise.
6143         * ree.c (combine_reaching_defs): Likewise.
6144         * regcprop.c (maybe_mode_change): Likewise.
6145         * reginfo.c (init_reg_sets_1): Likewise.
6146         (choose_hard_reg_mode): Likewise.
6147         (simplifiable_subregs): Likewise.
6148         * regrename.c (check_new_reg_p): Likewise.
6149         * reload.c (find_valid_class): Likewise.
6150         (find_valid_class_1): Likewise.
6151         (reload_inner_reg_of_subreg): Likewise.
6152         (push_reload): Likewise.
6153         (combine_reloads): Likewise.
6154         (find_dummy_reload): Likewise.
6155         (find_reloads): Likewise.
6156         * reload1.c (find_reg): Likewise.
6157         (set_reload_reg): Likewise.
6158         (allocate_reload_reg): Likewise.
6159         (choose_reload_regs): Likewise.
6160         (reload_adjust_reg_for_temp): Likewise.
6161         * rtlanal.c (subreg_size_offset_from_lsb): Likewise.
6162         (simplify_subreg_regno): Likewise.
6163         * sel-sched.c (init_regs_for_mode): Likewise.
6164         * varasm.c (make_decl_rtl): Likewise.
6165         * config/aarch64/aarch64.h (HARD_REGNO_MODE_OK): Delete.
6166         (MODES_TIEABLE_P): Use targetm.hard_regno_mode_ok instead of
6167         HARD_REGNO_MODE_OK.
6168         * config/aarch64/aarch64-protos.h (aarch64_hard_regno_mode_ok): Delete.
6169         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Make static.
6170         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6171         * config/alpha/alpha.h (HARD_REGNO_MODE_OK): Delete.
6172         * config/alpha/alpha.c (alpha_hard_regno_mode_ok): New function.
6173         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6174         * config/arc/arc.h (arc_hard_regno_mode_ok): Delete.
6175         (arc_mode_class): Delete.
6176         (HARD_REGNO_MODE_OK): Delete.
6177         * config/arc/arc.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6178         (arc_hard_regno_mode_ok): Rename old array to...
6179         (arc_hard_regno_mode_ok_modes): ...this.
6180         (arc_conditional_register_usage): Update accordingly.
6181         (arc_mode_class): Make static.
6182         (arc_hard_regno_mode_ok): New function.
6183         * config/arm/arm.h (HARD_REGNO_MODE_OK): Delete.
6184         * config/arm/arm-protos.h (arm_hard_regno_mode_ok): Delete.
6185         * config/arm/arm.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6186         (arm_hard_regno_mode_ok): Make static.
6187         * config/arm/arm.md (movdi): Use targetm.hard_regno_mode_ok instead of
6188         HARD_REGNO_MODE_OK.
6189         * config/avr/avr-protos.h (avr_hard_regno_mode_ok): Delete.
6190         * config/avr/avr.h (HARD_REGNO_MODE_OK): Delete.
6191         * config/avr/avr.c (avr_hard_regno_mode_ok): Make static and
6192         return a bool.
6193         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6194         * config/bfin/bfin-protos.h (hard_regno_mode_ok): Delete.
6195         * config/bfin/bfin.h (HARD_REGNO_MODE_OK): Delete.
6196         * config/bfin/bfin.c (hard_regno_mode_ok): Rename to...
6197         (bfin_hard_regno_mode_ok): ...this.  Make static and return a bool.
6198         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6199         * config/bfin/predicates.md (valid_reg_operand): Use
6200         targetm.hard_regno_mode_ok instead of HARD_REGNO_MODE_OK.
6201         * config/c6x/c6x.h (HARD_REGNO_MODE_OK): Delete.
6202         * config/c6x/c6x.c (c6x_hard_regno_mode_ok): New function.
6203         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6204         * config/cr16/cr16.h (HARD_REGNO_MODE_OK): Delete.
6205         * config/cr16/cr16-protos.h (cr16_hard_regno_mode_ok): Delete.
6206         * config/cr16/cr16.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6207         (cr16_hard_regno_mode_ok): Make static and return a bool.
6208         * config/cris/cris.h (HARD_REGNO_MODE_OK): Delete.
6209         * config/cris/cris.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6210         (cris_hard_regno_mode_ok): New function.
6211         * config/epiphany/epiphany.h (epiphany_hard_regno_mode_ok): Delete.
6212         (epiphany_mode_class): Delete.
6213         (HARD_REGNO_MODE_OK): Delete.
6214         * config/epiphany/epiphany-protos.h (hard_regno_mode_ok): Delete.
6215         * config/epiphany/epiphany.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6216         (hard_regno_mode_ok): Rename to...
6217         (epiphany_hard_regno_mode_ok): ...this.  Make static and return a bool.
6218         * config/fr30/fr30.h (HARD_REGNO_MODE_OK): Delete.
6219         * config/fr30/fr30.md: Refer to targetm.hard_regno_mode_ok instead of
6220         HARD_REGNO_MODE_OK.
6221         * config/frv/frv.h (HARD_REGNO_MODE_OK): Delete.
6222         * config/frv/frv-protos.h (frv_hard_regno_mode_ok): Delete.
6223         * config/frv/frv.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6224         (frv_hard_regno_mode_ok): Make static and return a bool.
6225         * config/frv/frv.md: Refer to targetm.hard_regno_mode_ok instead of
6226         HARD_REGNO_MODE_OK.
6227         * config/ft32/ft32.h (HARD_REGNO_MODE_OK): Delete.
6228         * config/h8300/h8300.h (HARD_REGNO_MODE_OK): Delete.
6229         * config/h8300/h8300-protos.h (h8300_hard_regno_mode_ok): Delete.
6230         * config/h8300/h8300.c (h8300_hard_regno_mode_ok): Make static
6231         and return a bool.
6232         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6233         * config/i386/i386.h (HARD_REGNO_MODE_OK): Delete.
6234         * config/i386/i386-protos.h (ix86_hard_regno_mode_ok): Delete.
6235         * config/i386/i386.c (ix86_hard_regno_mode_ok): Make static and
6236         return a bool.
6237         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6238         * config/ia64/ia64.h (HARD_REGNO_MODE_OK): Delete.
6239         * config/ia64/ia64.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6240         (ia64_hard_regno_mode_ok): New function.
6241         * config/iq2000/iq2000.h (HARD_REGNO_MODE_OK): Delete.
6242         * config/iq2000/iq2000.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6243         (iq2000_hard_regno_mode_ok): New function.
6244         * config/lm32/lm32.h (HARD_REGNO_MODE_OK): Delete.
6245         * config/lm32/lm32.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6246         (lm32_hard_regno_mode_ok): New function.
6247         * config/m32c/m32c.h (HARD_REGNO_MODE_OK): Delete.
6248         * config/m32c/m32c-protos.h (m32c_hard_regno_ok): Delete.
6249         * config/m32c/m32c.c (class_can_hold_mode): Use m32c_hard_regno_mode_ok
6250         instead of HARD_REGNO_MODE_OK.
6251         (m32c_hard_regno_ok): Rename to...
6252         (m32c_hard_regno_mode_ok): ...this.  Make static and return a bool.
6253         (m32c_cannot_change_mode_class): Update accordingly.
6254         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6255         * config/m32r/m32r.h (m32r_hard_regno_mode_ok): Delete.
6256         (m32r_mode_class): Delete.
6257         (HARD_REGNO_MODE_OK): Delete.
6258         * config/m32r/m32r.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6259         (m32r_hard_regno_mode_ok): Rename to...
6260         (m32r_hard_regno_modes): ...this.
6261         (m32r_mode_class): Make static.
6262         (m32r_hard_regno_mode_ok): New function.
6263         * config/m68k/m68k.h (HARD_REGNO_MODE_OK): Delete.
6264         * config/m68k/m68k-protos.h (m68k_regno_mode_ok): Delete.
6265         * config/m68k/m68k.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6266         (m68k_hard_regno_mode_ok): Make static.
6267         * config/mcore/mcore.h (HARD_REGNO_MODE_OK): Delete.
6268         * config/mcore/mcore.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6269         (mcore_hard_regno_mode_ok): New function.
6270         * config/microblaze/microblaze.h (microblaze_hard_regno_mode_ok)
6271         (HARD_REGNO_MODE_OK): Delete.
6272         * config/microblaze/microblaze.c (microblaze_hard_regno_mode_ok):
6273         Rename to...
6274         (microblaze_hard_regno_mode_ok_p): ...this and make static.
6275         (microblaze_hard_regno_mode_ok): New function.
6276         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6277         * config/mips/mips.h (HARD_REGNO_MODE_OK): Delete.
6278         (mips_hard_regno_mode_ok): Delete.
6279         * config/mips/mips.c (mips_hard_regno_mode_ok): Rename to...
6280         (mips_hard_regno_mode_ok_p): ...this and make static.
6281         (mips_hard_regno_mode_ok_p): Rename to...
6282         (mips_hard_regno_mode_ok_uncached): ...this.
6283         (mips_hard_regno_mode_ok): New function.
6284         (mips_class_max_nregs): Use mips_hard_regno_mode_ok instead
6285         of HARD_REGNO_MODE_OK.
6286         (mips_option_override): Update after above name changes.
6287         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6288         * config/mmix/mmix.h (HARD_REGNO_MODE_OK): Delete.
6289         * config/mn10300/mn10300.h (HARD_REGNO_MODE_OK): Delete.
6290         * config/mn10300/mn10300-protos.h (mn10300_hard_regno_mode_ok): Delete.
6291         * config/mn10300/mn10300.c (mn10300_hard_regno_mode_ok): Make static.
6292         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6293         * config/moxie/moxie.h (HARD_REGNO_MODE_OK): Delete.
6294         * config/msp430/msp430.h (HARD_REGNO_MODE_OK): Delete.
6295         * config/msp430/msp430-protos.h (msp430_hard_regno_mode_ok): Delete.
6296         * config/msp430/msp430.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6297         (msp430_hard_regno_mode_ok): Make static and return a bool.
6298         * config/nds32/nds32.h (HARD_REGNO_MODE_OK): Delete.
6299         * config/nds32/nds32-protos.h (nds32_hard_regno_mode_ok): Delete.
6300         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Make static
6301         and return a bool.
6302         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6303         * config/nios2/nios2.h (HARD_REGNO_MODE_OK): Delete.
6304         * config/nvptx/nvptx.h (HARD_REGNO_MODE_OK): Delete.
6305         * config/pa/pa.h (MODES_TIEABLE_P): Update commentary.
6306         * config/pa/pa32-regs.h (HARD_REGNO_MODE_OK): Rename to...
6307         (PA_HARD_REGNO_MODE_OK): ...this
6308         * config/pa/pa64-regs.h (HARD_REGNO_MODE_OK): Rename to...
6309         (PA_HARD_REGNO_MODE_OK): ...this.
6310         * config/pa/pa.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6311         (pa_hard_regno_mode_ok): New function.
6312         * config/pdp11/pdp11.h (HARD_REGNO_MODE_OK): Delete.
6313         * config/pdp11/pdp11.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6314         (pdp11_hard_regno_mode_ok): New function.
6315         * config/powerpcspe/powerpcspe.h (HARD_REGNO_MODE_OK): Delete.
6316         * config/powerpcspe/powerpcspe-protos.h (rs6000_hard_regno_mode_ok_p):
6317         Delete.
6318         * config/powerpcspe/powerpcspe.c (rs6000_hard_regno_mode_ok_p):
6319         Make static.
6320         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6321         (rs6000_hard_regno_mode_ok): Rename to...
6322         (rs6000_hard_regno_mode_ok_uncached): ...this.
6323         (rs6000_init_hard_regno_mode_ok): Update accordingly.
6324         (rs6000_hard_regno_mode_ok): New function.
6325         * config/riscv/riscv.h (HARD_REGNO_MODE_OK): Delete.
6326         * config/riscv/riscv-protos.h (riscv_hard_regno_mode_ok_p): Delete.
6327         * config/riscv/riscv.c (riscv_hard_regno_mode_ok_p): Rename to...
6328         (riscv_hard_regno_mode_ok): ...this and make static.
6329         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6330         * config/rl78/rl78.h (HARD_REGNO_MODE_OK): Delete.
6331         * config/rl78/rl78-protos.h (rl78_hard_regno_mode_ok): Delete.
6332         * config/rl78/rl78.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6333         (rl78_hard_regno_mode_ok): Make static and return bool.
6334         * config/rs6000/rs6000.h (HARD_REGNO_MODE_OK): Delete.
6335         * config/rs6000/rs6000-protos.h (rs6000_hard_regno_mode_ok_p):
6336         Delete.
6337         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok_p): Make static.
6338         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6339         (rs6000_hard_regno_mode_ok): Rename to...
6340         (rs6000_hard_regno_mode_ok_uncached): ...this.
6341         (rs6000_init_hard_regno_mode_ok): Update accordingly.
6342         (rs6000_hard_regno_mode_ok): New function.
6343         * config/rx/rx.h (HARD_REGNO_MODE_OK): Delete.
6344         * config/rx/rx.c (rx_hard_regno_mode_ok): New function.
6345         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6346         * config/s390/s390.h (HARD_REGNO_MODE_OK): Delete.
6347         * config/s390/s390-protos.h (s390_hard_regno_mode_ok): Delete.
6348         * config/s390/s390.c (s390_hard_regno_mode_ok): Make static.
6349         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6350         * config/sh/sh.h (HARD_REGNO_MODE_OK): Delete.
6351         * config/sh/sh-protos.h (sh_hard_regno_mode_ok): Delete.
6352         * config/sh/sh.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6353         (sh_hard_regno_mode_ok): Make static.
6354         * config/sparc/constraints.md: Refer to targetm.hard_regno_mode_ok
6355         instead of HARD_REGNO_MODE_OK.
6356         * config/sparc/sparc.h (hard_regno_mode_classes): Delete.
6357         (sparc_mode_class): Delete.
6358         (HARD_REGNO_MODE_OK): Delete.
6359         * config/sparc/sparc.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6360         (hard_regno_mode_classes): Make static.
6361         (sparc_mode_class): Likewise.
6362         (sparc_hard_regno_mode_ok): New function.
6363         * config/spu/spu.h (HARD_REGNO_MODE_OK): Delete.
6364         * config/stormy16/stormy16.h (HARD_REGNO_MODE_OK): Delete.
6365         * config/stormy16/stormy16.c (xstormy16_hard_regno_mode_ok): New
6366         function.
6367         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6368         * config/tilegx/tilegx.h (HARD_REGNO_MODE_OK): Delete.
6369         * config/tilepro/tilepro.h (HARD_REGNO_MODE_OK): Delete.
6370         * config/v850/v850.h (HARD_REGNO_MODE_OK): Delete.
6371         * config/v850/v850.c (v850_hard_regno_mode_ok): New function.
6372         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6373         * config/vax/vax.h (HARD_REGNO_MODE_OK): Delete.
6374         * config/visium/visium.h (HARD_REGNO_MODE_OK): Delete.
6375         * config/visium/visium.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6376         (visium_hard_regno_mode_ok): New function.
6377         * config/visium/visium.md: Refer to targetm.hard_regno_mode_ok
6378         instead of HARD_REGNO_MODE_OK.
6379         * config/xtensa/xtensa.h (xtensa_hard_regno_mode_ok): Delete.
6380         (HARD_REGNO_MODE_OK): Delete.
6381         * config/xtensa/xtensa.c (xtensa_hard_regno_mode_ok): Rename to...
6382         (xtensa_hard_regno_mode_ok_p): ...this and make static.
6383         (xtensa_option_override): Update accordingly.
6384         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6385         (xtensa_hard_regno_mode_ok): New function.
6386         * system.h (HARD_REGNO_MODE_OK): Poison.
6387
6388 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
6389             Alan Hayward  <alan.hayward@arm.com>
6390             David Sherwood  <david.sherwood@arm.com>
6391
6392         * target.def (hard_regno_call_part_clobbered): New hook.
6393         * doc/tm.texi.in (HARD_REGNO_CALL_PART_CLOBBERED): Replace with...
6394         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): ...this hook.
6395         * doc/tm.texi: Regenerate.
6396         * hooks.h (hook_bool_uint_mode_false): Declare.
6397         * hooks.c (hook_bool_uint_mode_false): New function.
6398         * regs.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
6399         * cselib.c (cselib_process_insn): Use
6400         targetm.hard_regno_call_part_clobbered instead of
6401         HARD_REGNO_CALL_PART_CLOBBERED.
6402         * ira-conflicts.c (ira_build_conflicts): Likewise.
6403         * ira-costs.c (ira_tune_allocno_costs): Likewise.
6404         * lra-constraints.c (need_for_call_save_p): Likewise.
6405         * lra-lives.c: Include target.h.
6406         (check_pseudos_live_through_calls): Use
6407         targetm.hard_regno_call_part_clobbered instead of
6408         HARD_REGNO_CALL_PART_CLOBBERED.
6409         * regcprop.c: Include target.h.
6410         (copyprop_hardreg_forward_1): Use
6411         targetm.hard_regno_call_part_clobbered instead of
6412         HARD_REGNO_CALL_PART_CLOBBERED.
6413         * reginfo.c (choose_hard_reg_mode): Likewise.
6414         * regrename.c (check_new_reg_p): Likewise.
6415         * reload.c (find_equiv_reg): Likewise.
6416         * reload1.c (emit_reload_insns): Likewise.
6417         * sched-deps.c (deps_analyze_insn): Likewise.
6418         * sel-sched.c (init_regs_for_mode): Likewise.
6419         (mark_unavailable_hard_regs): Likewise.
6420         * targhooks.c (default_dwarf_frame_reg_mode): Likewise.
6421         * config/aarch64/aarch64.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
6422         * config/aarch64/aarch64.c (aarch64_hard_regno_call_part_clobbered):
6423         New function.
6424         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
6425         * config/avr/avr.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
6426         * config/avr/avr-protos.h (avr_hard_regno_call_part_clobbered):
6427         Delete.
6428         * config/avr/avr.c (avr_hard_regno_call_part_clobbered): Make static
6429         and return a bool.
6430         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
6431         * config/i386/i386.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
6432         * config/i386/i386.c (ix86_hard_regno_call_part_clobbered): New
6433         function.
6434         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
6435         * config/mips/mips.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
6436         * config/mips/mips.c (mips_hard_regno_call_part_clobbered): New
6437         function.
6438         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
6439         * config/powerpcspe/powerpcspe.h (HARD_REGNO_CALL_PART_CLOBBERED):
6440         Delete.
6441         * config/powerpcspe/powerpcspe.c
6442         (rs6000_hard_regno_call_part_clobbered): New function.
6443         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
6444         * config/rs6000/rs6000.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
6445         * config/rs6000/rs6000.c (rs6000_hard_regno_call_part_clobbered):
6446         New function.
6447         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
6448         * config/s390/s390.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
6449         * config/s390/s390.c (s390_hard_regno_call_part_clobbered): New
6450         function.
6451         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
6452         * config/sh/sh.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
6453         * system.h (HARD_REGNO_CALL_PART_CLOBBERED): Poison.
6454
6455 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
6456             Alan Hayward  <alan.hayward@arm.com>
6457             David Sherwood  <david.sherwood@arm.com>
6458
6459         * rtl.h (subreg_memory_offset): Declare.
6460         * emit-rtl.c (subreg_memory_offset): New function.
6461         * expmed.c (store_bit_field_1): Use it.
6462         * expr.c (undefined_operand_subword_p): Likewise.
6463         * simplify-rtx.c (simplify_subreg): Likewise.
6464
6465 2017-09-04  Alexander Monakov  <amonakov@ispras.ru>
6466
6467         PR rtl-optimization/57448
6468         PR target/67458
6469         PR target/81316
6470         * optabs.c (expand_atomic_load): Place compiler memory barriers if
6471         using atomic_load pattern.
6472         (expand_atomic_store): Likewise.
6473
6474 2017-09-04  Jakub Jelinek  <jakub@redhat.com>
6475
6476         PR sanitizer/81981
6477         * gimple-fold.c (gimple_fold_call): Optimize away useless UBSAN_PTR
6478         and UBSAN_BOUNDS internal calls.  Clean up IFN_UBSAN_OBJECT_SIZE
6479         handling.  Use replace_call_with_value with NULL instead of
6480         gsi_replace, unlink_stmt_vdef and release_defs.
6481
6482         * gdbhooks.py (OptMachineModePrinter.to_string): Use 8 spaces
6483         instead of tab.
6484
6485         * lra-remat.c (reg_overlap_for_remat_p): Fix a pasto.
6486
6487 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
6488
6489         PR bootstrap/82045
6490         * rtl.h (emit_library_call_value_1): Declare.
6491         (emit_library_call): Replace declaration with a series of overloads.
6492         Remove the parameter count argument.
6493         (emit_library_call_value): Likewise.
6494         * calls.c (emit_library_call_value_1): Make global.  Replace varargs
6495         with an "rtx_mode_t *".
6496         (emit_library_call_value): Delete.
6497         (emit_library_call): Likewise.
6498         * asan.c (asan_emit_stack_protection): Update calls accordingly.
6499         (asan_emit_allocas_unpoison): Likewise.
6500         * builtins.c (expand_builtin_powi): Likewise.
6501         (expand_asan_emit_allocas_unpoison): Likewise.
6502         * cfgexpand.c (expand_main_function): Likewise.
6503         * config/aarch64/aarch64.c (aarch64_trampoline_init): Likewise.
6504         * config/aarch64/aarch64.h (PROFILE_HOOK): Likewise.
6505         * config/alpha/alpha.c (alpha_trampoline_init): Likewise.
6506         * config/arm/arm.c (arm_trampoline_init): Likewise.
6507         (arm_call_tls_get_addr): Likewise.
6508         (arm_expand_divmod_libfunc): Likewise.
6509         * config/bfin/bfin.md (umulsi3_highpart): Likewise.
6510         (smulsi3_highpart): Likewise.
6511         * config/c6x/c6x.c (c6x_initialize_trampoline): Likewise.
6512         (c6x_expand_compare): Likewise.
6513         (c6x_expand_movmem): Likewise.
6514         * config/frv/frv.c (frv_trampoline_init): Likewise.
6515         * config/i386/i386.c (ix86_trampoline_init): Likewise.
6516         (ix86_expand_divmod_libfunc): Likewise.
6517         * config/ia64/ia64.c (ia64_expand_tls_address): Likewise.
6518         (ia64_expand_compare): Likewise.
6519         (ia64_profile_hook): Likewise.
6520         * config/ia64/ia64.md (save_stack_nonlocal): Likewise.
6521         (nonlocal_goto): Likewise.
6522         (restore_stack_nonlocal): Likewise.
6523         * config/m32r/m32r.c (block_move_call): Likewise.
6524         (m32r_trampoline_init): Likewise.
6525         * config/m68k/linux.h (FINALIZE_TRAMPOLINE): Likewise.
6526         * config/m68k/m68k.c (m68k_call_tls_get_addr): Likewise.
6527         (m68k_call_m68k_read_tp): Likewise.
6528         * config/microblaze/microblaze.c (microblaze_call_tls_get_addr)
6529         (microblaze_expand_divide): Likewise.
6530         * config/mips/mips.h (mips_args): Likewise.
6531         * config/mips/sdemtk.h (mips_sync_icache): Likewise.
6532         (MIPS_ICACHE_SYNC): Likewise.
6533         * config/nios2/nios2.c (nios2_emit_expensive_div): Likewise.
6534         (nios2_trampoline_init): Likewise.
6535         * config/pa/pa.c (hppa_tls_call): Likewise.
6536         (pa_trampoline_init): Likewise.
6537         * config/pa/pa.md (canonicalize_funcptr_for_compare): Likewise.
6538         * config/powerpcspe/powerpcspe.c (rs6000_legitimize_tls_address)
6539         (expand_strn_compare): Likewise.
6540         (rs6000_generate_compare): Likewise.
6541         (rs6000_expand_float128_convert): Likewise.
6542         (output_profile_hook): Likewise.
6543         (rs6000_trampoline_init): Likewise.
6544         * config/powerpcspe/powerpcspe.md (neg<mode>2): Likewise.
6545         * config/riscv/riscv.h (PROFILE_HOOK): Likewise.
6546         * config/rs6000/rs6000-string.c (expand_strn_compare): Likewise.
6547         * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise.
6548         (rs6000_generate_compare): Likewise.
6549         (rs6000_expand_float128_convert): Likewise.
6550         (output_profile_hook): Likewise.
6551         (rs6000_trampoline_init): Likewise.
6552         * config/rs6000/rs6000.md (neg<mode>2): Likewise.
6553         * config/sh/sh.c (sh_trampoline_init): Likewise.
6554         * config/sparc/sparc.c (emit_soft_tfmode_libcall): Likewise.
6555         (sparc_emit_float_lib_cmp): Likewise.
6556         (sparc32_initialize_trampoline): Likewise.
6557         (sparc64_initialize_trampoline): Likewise.
6558         (sparc_profile_hook): Likewise.
6559         * config/spu/spu.c (ea_load_store): Likewise.
6560         * config/spu/spu.md (floatunssidf2): Likewise.
6561         * config/tilegx/tilegx.c (tilegx_trampoline_init): Likewise.
6562         * config/tilepro/tilepro.c (tilepro_trampoline_init): Likewise.
6563         * config/visium/visium.c (expand_block_move_4): Likewise.
6564         (expand_block_move_2): Likewise.
6565         (expand_block_move_1): Likewise.
6566         (expand_block_set_4): Likewise.
6567         (expand_block_set_2): Likewise.
6568         (expand_block_set_1): Likewise.
6569         (visium_trampoline_init): Likewise.
6570         (visium_profile_hook): Likewise.
6571         * config/xtensa/xtensa.c (xtensa_expand_nonlocal_goto): Likewise.
6572         (xtensa_setup_frame_addresses): Likewise.
6573         (xtensa_trampoline_init): Likewise.
6574         * except.c (sjlj_emit_function_enter): Likewise.
6575         (sjlj_emit_function_exit): Likewise.
6576         * explow.c (allocate_dynamic_stack_space): Likewise.
6577         (probe_stack_range): Likewise.
6578         * expr.c (convert_mode_scalar): Likewise.
6579         * optabs.c (expand_binop): Likewise.
6580         (expand_twoval_binop_libfunc): Likewise.
6581         (expand_unop): Likewise.
6582         (prepare_cmp_insn): Likewise.
6583         (prepare_float_lib_cmp): Likewise.
6584         (expand_float): Likewise.
6585         (expand_fix): Likewise.
6586         (expand_fixed_convert): Likewise.
6587         (maybe_emit_sync_lock_test_and_set): Likewise.
6588         (expand_atomic_compare_and_swap): Likewise.
6589         (expand_mem_thread_fence): Likewise.
6590         (expand_atomic_fetch_op): Likewise.
6591
6592 2017-09-03  Gerald Pfeifer  <gerald@pfeifer.com>
6593
6594         * doc/generic.texi (OpenACC): Adjust URL.
6595         * doc/invoke.texi (C Dialect Options): Ditto.
6596
6597 2017-09-03  Uros Bizjak  <ubizjak@gmail.com>
6598
6599         * config/i386/i386.md (*bt<mode>): Use nonimmediate_operand
6600         predicate for operand 1.  Add (m,<S>) constraint.
6601         (*jcc_bt<mode>): Use nonimmediate_operand predicate for operand 1.
6602         Prevent memory operand 1 with register operand 2.
6603
6604 2017-09-01  Segher Boessenkool  <segher@kernel.crashing.org>
6605
6606         PR rtl-optimization/82024
6607         * combine.c (try_combine): If the combination result is a PARALLEL,
6608         and we only need to retain the SET in there that would be placed
6609         at I2, check that we can place that at I3 instead, before doing so.
6610
6611 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
6612
6613         PR target/81766
6614         * config/i386/i386.c (ix86_init_large_pic_reg): Return label
6615         instead of void.
6616         (ix86_init_pic_reg): Remember label from ix86_init_large_pic_reg,
6617         if non-NULL and preceded by NOTE_INSN_BASIC_BLOCK, swap the note
6618         and label.
6619
6620 2017-09-01  Joerg Sonnenberger  <joerg@bec.de>
6621             Jeff Law  <law@redhat.com>
6622
6623         * varasm.c (bss_initializer_p): Do not put constants into .bss
6624         (categorize_decl_for_section): Handle bss_initializer_p returning
6625         false when DECL_INITIAL is NULL.
6626
6627 2017-09-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
6628
6629         PR target/82012
6630         * config/s390/s390.c (s390_can_inline_p): New function.
6631
6632 2017-09-01  Jeff Law  <law@redhat.com>
6633
6634         PR tree-optimization/82052
6635         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
6636         Always initialize the returned slot after a hash table miss
6637         when INSERT is true.
6638
6639 2017-09-01  Alexander Monakov  <amonakov@ispras.ru>
6640
6641         * config/s390/s390.md (mem_signal_fence): Remove.
6642         * doc/md.texi (mem_signal_fence): Remove.
6643         * optabs.c (expand_mem_signal_fence): Remove uses of mem_signal_fence.
6644         Update comments.
6645         * target-insns.def (mem_signal_fence): Remove.
6646
6647 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
6648
6649         PR sanitizer/81902
6650         * doc/invoke.texi: Document -fsanitize=pointer-overflow.
6651
6652         PR sanitizer/81923
6653         * asan.c (create_odr_indicator): Strip name encoding from assembler
6654         name before appending it after __odr_asan_.
6655
6656 2017-09-01  Martin Liska  <mliska@suse.cz>
6657
6658         PR tree-optimization/82059
6659         * gimple-ssa-isolate-paths.c (isolate_path): Add profile and
6660         frequency only when an edge is redirected.
6661
6662 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
6663
6664         * config/arc/arc-c.c (__ARC_LPC_WIDTH__): Add builtin define.
6665         * config/arc/arc.c (ARC_MAX_LOOP_LENGTH): Define.
6666         (arc_conditional_register_usage): Remove ARC600 lp_count
6667         exception.
6668         (arc_file_start): Emit Tag_ARC_CPU_variation.
6669         (arc_can_use_doloop_p): New conditions to use ZOLs.
6670         (hwloop_fail): New function.
6671         (hwloop_optimize): Likewise.
6672         (hwloop_pattern_reg): Likewise.
6673         (arc_doloop_hooks): New struct, to be used with reorg_loops.
6674         (arc_reorg_loops): New function, calls reorg_loops.
6675         (arc_reorg): Call arc_reorg_loops.  Remove old ZOL handling.
6676         (arc600_corereg_hazard): Remove ZOL checking, case handled by
6677         hwloop_optimize.
6678         (arc_loop_hazard): Remove function, functionality moved into
6679         hwloop_optimize.
6680         (arc_hazard): Remove arc_loop_hazard call.
6681         (arc_adjust_insn_length): Remove ZOL handling, functionality moved
6682         into hwloop_optimize.
6683         (arc_label_align): Remove ZOL handling.
6684         * config/arc/arc.h (LOOP_ALIGN): Changed to 0.
6685         * config/arc/arc.md (doloop_begin): Remove pattern.
6686         (doloop_begin_i): Likewise.
6687         (doloop_end_i): Likewise.
6688         (doloop_fallback): Likewise.
6689         (doloop_fallback_m): Likewise.
6690         (doloop_end): Reimplement expand.
6691         (arc_lp): New pattern for LP instruction.
6692         (loop_end): New pattern.
6693         (loop_fail): Likewise.
6694         (decrement_and_branch_until_zero): Likewise.
6695         * config/arc/arc.opt (mlpc-width): New option.
6696         * doc/invoke.texi (mlpc-width): Document option.
6697
6698 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
6699
6700         * config/arc/arc.c (arc_ifcvt): Remove use of merge_blocks call.
6701         (arc_ccfsm_advance): Fix checking for delay slots.
6702         (arc_reorg): Add rtl dump after each call to arc_ifcvt.
6703
6704 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
6705
6706         * config/arc/arc.md (movqi_insn): Add stores to save constant long
6707         immediates.
6708         (movhi_insn): Update store instruction constraint which are saving
6709         6-bit short immediates.
6710         (movsi_insn): Consider also short scaled load operations.
6711         (zero_extendhisi2_i): Use Usd constraint instead of T.
6712         (extendhisi2_i): Add q constraint.
6713         (arc_clzsi2): Add type and length attributes.
6714         (arc_ctzsi2): Likewise.
6715         * config/arc/constraints.md (Usc): Update constraint, the
6716         assembler can parse two relocations for a single instruction.
6717
6718 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
6719
6720         * config/arc/arc.c (arc_use_anchors_for_symbol_p): New function.
6721         (TARGET_USE_ANCHORS_FOR_SYMBOL_P): Define.
6722
6723 2017-08-31  Olivier Hainque  <hainque@adacore.com>
6724
6725         * config.gcc (powerpc-wrs-vxworks|vxworksae|vxworksmils): Now
6726         match as powerpc-wrs-vxworks*.
6727
6728 2017-08-31  James Greenhalgh  <james.greenhalgh@arm.com>
6729
6730         * config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): Fix
6731         register constraint for by-element operand.
6732         (aarch64_mls_elt_merge<mode>): Likewise.
6733
6734 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
6735
6736         * config/arc/arc.c (arc_can_follow_jump): Check for short
6737         branches.
6738
6739 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
6740
6741         * config.gcc: Use g.opt for arc.
6742         * config/arc/arc.c (LEGITIMATE_SCALED_ADDRESS_P): Deleted,
6743         functionality moved to ...
6744         (legitimate_scaled_address_p): New function, ...here.
6745         (LEGITIMATE_SMALL_DATA_OFFSET_P): New define.
6746         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Use the above define.
6747         (legitimate_offset_address_p): Delete TARGET_NO_SDATA_SET
6748         condition.
6749         (arc_override_options): Handle G option.
6750         (arc_output_pic_addr_const): Correct function definition.
6751         (arc_legitimate_address_p): Use legitimate_scaled_address_p.
6752         (arc_decl_anon_ns_mem_p): Delete.
6753         (arc_in_small_data_p): Overhaul this function to take into
6754         consideration the value given via G option.
6755         (arc_rewrite_small_data_1): Renamed and corrected old
6756         arc_rewrite_small_data function.
6757         (arc_rewrite_small_data): New function.
6758         (small_data_pattern): Don't use pic_offset_table_rtx.
6759         * config/arc/arc.h (CC1_SPEC): Recognize G option.
6760         * config/arc/simdext.md (movmisalignv2hi): Use
6761         prepare_move_operands function.
6762         (mov*): Likewise.
6763         (movmisalign*): Likewise.
6764         * doc/invoke.texi (ARC options): Document -G option.
6765
6766 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
6767
6768         * config/arc/arc-protos.h (compact_sda_memory_operand): Update
6769         prototype.
6770         * config/arc/arc.c (arc_print_operand): Output scalled address for
6771         sdata whenever is possible.
6772         (arc_in_small_data_p): Allow sdata for 64bit datum when double
6773         load/stores are available.
6774         (compact_sda_memory_operand): Check for the alignment required by
6775         code density instructions.
6776         * config/arc/arc.md (movsi_insn): Use newly introduced Us0
6777         constraint.
6778         * config/arc/constraints.md (Usd): Update constraint.
6779         (Us0): New constraint.
6780         (Usc): Update constraint.
6781
6782 2017-08-31  Richard Biener  <rguenther@suse.de>
6783
6784         PR middle-end/82054
6785         * dwarf2out.c (dwarf2out_early_global_decl): Process each
6786         function only once.
6787
6788 2017-08-31  Tamar Christina  <tamar.christina@arm.com>
6789
6790         * config/aarch64/aarch64-builtins.c (aarch64_init_simd_builtins):
6791         Resize type_signature.
6792
6793 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
6794             Alan Hayward  <alan.hayward@arm.com>
6795             David Sherwood  <david.sherwood@arm.com>
6796
6797         * config/aarch64/aarch64.c (aarch64_base_register_rtx_p): Only allow
6798         subregs whose inner modes can be stored in GPRs.
6799         (aarch64_classify_index): Likewise.
6800
6801 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
6802             Alan Hayward  <alan.hayward@arm.com>
6803             David Sherwood  <david.sherwood@arm.com>
6804
6805         * config/aarch64/iterators.md (V_cmp_result): Rename to...
6806         (V_INT_EQUIV): ...this.
6807         (v_cmp_result): Rename to...
6808         (v_int_equiv): ...this.
6809         * config/aarch64/aarch64.md (xorsign<mode>3): Update accordingly.
6810         * config/aarch64/aarch64-simd.md (xorsign<mode>3): Likewise.
6811         (copysign<mode>3): Likewise.
6812         (aarch64_simd_bsl<mode>_internal): Likewise.
6813         (aarch64_simd_bsl<mode>): Likewise.
6814         (vec_cmp<mode><mode>): Likewise.
6815         (vcond<mode><mode>): Likewise.
6816         (vcond<v_cmp_mixed><mode>): Likewise.
6817         (vcondu<mode><v_cmp_mixed>): Likewise.
6818         (aarch64_cm<optab><mode>): Likewise.
6819         (aarch64_cmtst<mode>): Likewise.
6820         (aarch64_fac<optab><mode>): Likewise.
6821         (vec_perm_const<mode>): Likewise.
6822         (vcond_mask_<mode><v_cmp_result>): Rename to...
6823         (vcond_mask_<mode><v_int_equiv>): ...this.
6824         (vec_cmp<mode><v_cmp_result>): Rename to...
6825         (vec_cmp<mode><v_int_equiv>): ...this.
6826
6827 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
6828             Alan Hayward  <alan.hayward@arm.com>
6829             David Sherwood  <david.sherwood@arm.com>
6830
6831         * config/aarch64/aarch64-modes.def: Remove 32-, 48- and 64-byte
6832         vector modes.
6833         * config/aarch64/iterators.md (VRL2, VRL3, VRL4): Delete.
6834         * config/aarch64/aarch64.md (UNSPEC_LD2_DREG, UNSPEC_LD3_DREG)
6835         (UNSPEC_LD4_DREG): New unspecs.
6836         * config/aarch64/aarch64-simd.md (aarch64_ld2<mode>_dreg_le)
6837         (aarch64_ld2<mode>_dreg_be): Replace with...
6838         (aarch64_ld2<mode>_dreg): ...this pattern and use the new DREG
6839         unspec.
6840         (aarch64_ld3<mode>_dreg_le)
6841         (aarch64_ld3<mode>_dreg_be): Replace with...
6842         (aarch64_ld3<mode>_dreg): ...this pattern and use the new DREG
6843         unspec.
6844         (aarch64_ld4<mode>_dreg_le)
6845         (aarch64_ld4<mode>_dreg_be): Replace with...
6846         (aarch64_ld4<mode>_dreg): ...this pattern and use the new DREG
6847         unspec.
6848
6849 2017-08-30  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
6850
6851         PR tree-optimization/81987
6852         * gimple-ssa-strength-reduction.c (insert_initializers): Don't
6853         insert an initializer in a location not dominated by the stride
6854         definition.
6855
6856 2017-08-30  Eric Botcazou  <ebotcazou@adacore.com>
6857
6858         * tree-eh.c (lower_try_finally_switch): Set the location of the finally
6859         on the entire header of the finally block in the fallthru case.
6860
6861 2017-08-30  Eric Botcazou  <ebotcazou@adacore.com>
6862
6863         * varasm.c (decode_addr_const): Deal with INDIRECT_REF <INTEGER_CST>.
6864
6865 2017-08-30  Pat Haugen  <pthaugen@us.ibm.com>
6866
6867         * config/rs6000/rs6000.c (rs6000_emit_prologue_move_from_cr): Rename from
6868         rs6000_emit_move_from_cr and call renamed function.
6869         (rs6000_emit_prologue): Call renamed functions.
6870         * config/rs6000/rs6000.md (prologue_movesi_from_cr): Rename from
6871         movesi_from_cr, remove volatile CRs.
6872
6873 2017-08-30  Jon Beniston  <jon@beniston.com>
6874             Richard Biener  <rguenther@suse.de>
6875
6876         * tree-vect-patterns.c (vect_pattern_recog_1): Use VECTOR_TYPE_P instead
6877         of VECTOR_MODE_P check.
6878         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Allow single
6879         element vector types.
6880
6881 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6882
6883         * df.h (df_read_modify_subreg_p): Remove in favor of...
6884         * rtl.h (read_modify_subreg_p): ...this new function.  Take a
6885         const_rtx instead of an rtx.
6886         * cprop.c (local_cprop_find_used_regs): Update accordingly.
6887         * df-problems.c (df_word_lr_mark_ref): Likewise.
6888         * ira-lives.c (mark_pseudo_reg_live): Likewise.
6889         (mark_pseudo_reg_dead): Likewise.
6890         (mark_ref_dead): Likewise.
6891         * reginfo.c (init_subregs_of_mode): Likewise.
6892         * sched-deps.c (sched_analyze_1): Likewise.
6893         * df-scan.c (df_def_record_1): Likewise.
6894         (df_uses_record): Likewise.
6895         (df_read_modify_subreg_p): Remove in favor of...
6896         * rtlanal.c (read_modify_subreg_p): ...this new function.  Take a
6897         const_rtx instead of an rtx.
6898
6899 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6900             Alan Hayward  <alan.hayward@arm.com>
6901             David Sherwood  <david.sherwood@arm.com>
6902
6903         * rtl.h (partial_subreg_p): New function.
6904         * caller-save.c (save_call_clobbered_regs): Use it.
6905         * calls.c (expand_call): Likewise.
6906         * combine.c (combinable_i3pat): Likewise.
6907         (simplify_set): Likewise.
6908         (make_extraction): Likewise.
6909         (make_compound_operation_int): Likewise.
6910         (gen_lowpart_or_truncate): Likewise.
6911         (force_to_mode): Likewise.
6912         (make_field_assignment): Likewise.
6913         (reg_truncated_to_mode): Likewise.
6914         (record_truncated_value): Likewise.
6915         (move_deaths): Likewise.
6916         * cse.c (record_jump_cond): Likewise.
6917         (cse_insn): Likewise.
6918         * cselib.c (cselib_lookup_1): Likewise.
6919         * expmed.c (extract_bit_field_using_extv): Likewise.
6920         * function.c (assign_parm_setup_reg): Likewise.
6921         * ifcvt.c (noce_convert_multiple_sets): Likewise.
6922         * ira-build.c (create_insn_allocnos): Likewise.
6923         * lra-coalesce.c (merge_pseudos): Likewise.
6924         * lra-constraints.c (match_reload): Likewise.
6925         (simplify_operand_subreg): Likewise.
6926         (curr_insn_transform): Likewise.
6927         * lra-lives.c (process_bb_lives): Likewise.
6928         * lra.c (new_insn_reg): Likewise.
6929         (lra_substitute_pseudo): Likewise.
6930         * regcprop.c (mode_change_ok): Likewise.
6931         (maybe_mode_change): Likewise.
6932         (copyprop_hardreg_forward_1): Likewise.
6933         * reload.c (push_reload): Likewise.
6934         (find_reloads): Likewise.
6935         (find_reloads_subreg_address): Likewise.
6936         * reload1.c (alter_reg): Likewise.
6937         (eliminate_regs_1): Likewise.
6938         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
6939
6940 2017-08-30  David Edelsohn  <dje.gcc@gmail.com>
6941
6942         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Revert
6943         back to if statements, including unpack.
6944
6945 2017-08-30  Martin Liska  <mliska@suse.cz>
6946
6947         PR inline-asm/82001
6948         * ipa-icf-gimple.c (func_checker::compare_tree_list_operand):
6949         Rename to ...
6950         (func_checker::compare_asm_inputs_outputs): ... this function.
6951         (func_checker::compare_gimple_asm): Use the function to compare
6952         also ASM constrains.
6953         * ipa-icf-gimple.h: Rename the function.
6954
6955 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6956             Alan Hayward  <alan.hayward@arm.com>
6957             David Sherwood  <david.sherwood@arm.com>
6958
6959         * coretypes.h (complex_mode): New type.
6960         * gdbhooks.py (build_pretty_printer): Handle it.
6961         * machmode.h (complex_mode): New class.
6962         (complex_mode::includes_p): New function.
6963         (is_complex_int_mode): Likewise.
6964         (is_complex_float_mode): Likewise.
6965         * genmodes.c (get_mode_class): Handle complex mode classes.
6966         * function.c (expand_function_end): Use is_complex_int_mode.
6967
6968 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6969             Alan Hayward  <alan.hayward@arm.com>
6970             David Sherwood  <david.sherwood@arm.com>
6971
6972         * coretypes.h (scalar_mode_pod): New typedef.
6973         * gdbhooks.py (build_pretty_printer): Handle it.
6974         * machmode.h (gt_ggc_mx, gt_pch_nx): New functions.
6975         * fixed-value.h (fixed_value::mode): Change type to scalar_mode_pod.
6976         * fold-const.c (fold_convert_const_int_from_fixed): Use scalar_mode.
6977         * tree-streamer-in.c (unpack_ts_fixed_cst_value_fields): Use
6978         as_a <scalar_mode>.
6979
6980 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6981             Alan Hayward  <alan.hayward@arm.com>
6982             David Sherwood  <david.sherwood@arm.com>
6983
6984         * machmode.h (mode_for_vector): Take a scalar_mode instead
6985         of a machine_mode.
6986         * stor-layout.c (mode_for_vector): Likewise.
6987         * explow.c (promote_mode): Use as_a <scalar_mode>.
6988         * sdbout.c (sdbout_parms): Use is_a <scalar_mode>.
6989
6990 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6991             Alan Hayward  <alan.hayward@arm.com>
6992             David Sherwood  <david.sherwood@arm.com>
6993
6994         * target.def (preferred_simd_mode): Take a scalar_mode
6995         instead of a machine_mode.
6996         * targhooks.h (default_preferred_simd_mode): Likewise.
6997         * targhooks.c (default_preferred_simd_mode): Likewise.
6998         * config/arc/arc.c (arc_preferred_simd_mode): Likewise.
6999         * config/arm/arm.c (arm_preferred_simd_mode): Likewise.
7000         * config/c6x/c6x.c (c6x_preferred_simd_mode): Likewise.
7001         * config/epiphany/epiphany.c (epiphany_preferred_simd_mode): Likewise.
7002         * config/i386/i386.c (ix86_preferred_simd_mode): Likewise.
7003         * config/mips/mips.c (mips_preferred_simd_mode): Likewise.
7004         * config/nvptx/nvptx.c (nvptx_preferred_simd_mode): Likewise.
7005         * config/powerpcspe/powerpcspe.c (rs6000_preferred_simd_mode):
7006         Likewise.
7007         * config/rs6000/rs6000.c (rs6000_preferred_simd_mode): Likewise.
7008         * config/s390/s390.c (s390_preferred_simd_mode): Likewise.
7009         * config/sparc/sparc.c (sparc_preferred_simd_mode): Likewise.
7010         * config/aarch64/aarch64.c (aarch64_preferred_simd_mode): Likewise.
7011         (aarch64_simd_scalar_immediate_valid_for_move): Update accordingly.
7012         * doc/tm.texi: Regenerate.
7013         * optabs-query.c (can_vec_mask_load_store_p): Return false for
7014         non-scalar modes.
7015
7016 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7017             Alan Hayward  <alan.hayward@arm.com>
7018             David Sherwood  <david.sherwood@arm.com>
7019
7020         * target.def (scalar_mode_supported_p): Take a scalar_mode
7021         instead of a machine_mode.
7022         * targhooks.h (default_scalar_mode_supported_p): Likewise.
7023         * targhooks.c (default_scalar_mode_supported_p): Likewise.
7024         * config/aarch64/aarch64.c (aarch64_scalar_mode_supported_p): Likewise.
7025         * config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
7026         * config/arm/arm.c (arm_scalar_mode_supported_p): Likewise.
7027         * config/avr/avr.c (avr_scalar_mode_supported_p): Likewise.
7028         * config/c6x/c6x.c (c6x_scalar_mode_supported_p): Likewise.
7029         * config/i386/i386.c (ix86_scalar_mode_supported_p): Likewise.
7030         * config/ia64/ia64.c (ia64_scalar_mode_supported_p): Likewise.
7031         * config/mips/mips.c (mips_scalar_mode_supported_p): Likewise.
7032         * config/msp430/msp430.c (msp430_scalar_mode_supported_p): Likewise.
7033         * config/pa/pa.c (pa_scalar_mode_supported_p): Likewise.
7034         * config/pdp11/pdp11.c (pdp11_scalar_mode_supported_p): Likewise.
7035         * config/powerpcspe/powerpcspe.c (rs6000_scalar_mode_supported_p):
7036         Likewise.
7037         * config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p): Likewise.
7038         * config/s390/s390.c (s390_scalar_mode_supported_p): Likewise.
7039         * config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
7040         * config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
7041         * config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p):
7042         Likewise.
7043         * doc/tm.texi: Regenerate.
7044
7045 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7046             Alan Hayward  <alan.hayward@arm.com>
7047             David Sherwood  <david.sherwood@arm.com>
7048
7049         * coretypes.h (opt_scalar_mode): New typedef.
7050         * gdbhooks.py (build_pretty_printers): Handle it.
7051         * machmode.h (mode_iterator::get_2xwider): Add overload for
7052         opt_mode<T>.
7053         * emit-rtl.c (init_emit_once): Use opt_scalar_mode when iterating
7054         over scalar modes.
7055         * expr.c (convert_mode_scalar): Likewise.
7056         * omp-low.c (omp_clause_aligned_alignment): Likewise.
7057         * optabs.c (expand_float): Likewise.
7058         (expand_fix): Likewise.
7059         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
7060
7061 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7062             Alan Hayward  <alan.hayward@arm.com>
7063             David Sherwood  <david.sherwood@arm.com>
7064
7065         * optabs.c (expand_float): Explicitly check for scalars before
7066         using a branching expansion.
7067         (expand_fix): Likewise.
7068
7069 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7070             Alan Hayward  <alan.hayward@arm.com>
7071             David Sherwood  <david.sherwood@arm.com>
7072
7073         * expr.c (convert_mode): Split scalar handling out into...
7074         (convert_mode_scalar): ...this new function.  Treat the modes
7075         as scalar_modes.
7076
7077 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7078             Alan Hayward  <alan.hayward@arm.com>
7079             David Sherwood  <david.sherwood@arm.com>
7080
7081         * omp-expand.c (expand_omp_atomic): Use is_int_mode, is_float_mode
7082         and scalar_mode.
7083         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Likewise.
7084
7085 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7086             Alan Hayward  <alan.hayward@arm.com>
7087             David Sherwood  <david.sherwood@arm.com>
7088
7089         * fixed-value.h (fixed_from_double_int): Take a scalar_mode
7090         rather than a machine_mode.
7091         (fixed_from_string): Likewise.
7092         (fixed_convert): Likewise.
7093         (fixed_convert_from_int): Likewise.
7094         (fixed_convert_from_real): Likewise.
7095         (real_convert_from_fixed): Likewise.
7096         * fixed-value.c (fixed_from_double_int): Likewise.
7097         (fixed_from_string): Likewise.
7098         (fixed_convert): Likewise.
7099         (fixed_convert_from_int): Likewise.
7100         (fixed_convert_from_real): Likewise.
7101         (real_convert_from_fixed): Likewise.
7102         * config/avr/avr.c (avr_out_round): Use as_a <scalar_mode>.
7103
7104 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7105             Alan Hayward  <alan.hayward@arm.com>
7106             David Sherwood  <david.sherwood@arm.com>
7107
7108         * emit-rtl.c (immed_double_const): Use is_a <scalar_mode> instead
7109         of separate mode class checks.  Do not allow vector modes here.
7110         (immed_wide_int_const): Use as_a <scalar_mode>.
7111         * explow.c (trunc_int_for_mode): Likewise.
7112         * rtl.h (wi::int_traits<rtx_mode_t>::get_precision): Likewise.
7113         (wi::shwi): Likewise.
7114         (wi::min_value): Likewise.
7115         (wi::max_value): Likewise.
7116         * dwarf2out.c (loc_descriptor): Likewise.
7117         * simplify-rtx.c (simplify_immed_subreg): Fix rtx_mode_t argument
7118         for CONST_WIDE_INT.
7119
7120 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7121             Alan Hayward  <alan.hayward@arm.com>
7122             David Sherwood  <david.sherwood@arm.com>
7123
7124         * tree.h (SCALAR_TYPE_MODE): New macro.
7125         * expr.c (expand_expr_addr_expr_1): Use it.
7126         (expand_expr_real_2): Likewise.
7127         * fold-const.c (fold_convert_const_fixed_from_fixed): Likeise.
7128         (fold_convert_const_fixed_from_int): Likewise.
7129         (fold_convert_const_fixed_from_real): Likewise.
7130         (native_encode_fixed): Likewise
7131         (native_encode_complex): Likewise
7132         (native_encode_vector): Likewise.
7133         (native_interpret_fixed): Likewise.
7134         (native_interpret_real): Likewise.
7135         (native_interpret_complex): Likewise.
7136         (native_interpret_vector): Likewise.
7137         * omp-simd-clone.c (simd_clone_adjust_return_type): Likewise.
7138         (simd_clone_adjust_argument_types): Likewise.
7139         (simd_clone_init_simd_arrays): Likewise.
7140         (simd_clone_adjust): Likewise.
7141         * stor-layout.c (layout_type): Likewise.
7142         * tree.c (build_minus_one_cst): Likewise.
7143         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
7144         * tree-inline.c (estimate_move_cost): Likewise.
7145         * tree-ssa-math-opts.c (convert_plusminus_to_widen): Likewise.
7146         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise.
7147         (vectorizable_reduction): Likewise.
7148         * tree-vect-patterns.c (vect_recog_widen_mult_pattern): Likewise.
7149         (vect_recog_mixed_size_cond_pattern): Likewise.
7150         (check_bool_pattern): Likewise.
7151         (adjust_bool_pattern): Likewise.
7152         (search_type_for_mask_1): Likewise.
7153         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
7154         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
7155         (vectorizable_load): Likewise.
7156         (vectorizable_store): Likewise.
7157         * ubsan.c (ubsan_encode_value): Likewise.
7158         * varasm.c (output_constant): Likewise.
7159
7160 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7161             Alan Hayward  <alan.hayward@arm.com>
7162             David Sherwood  <david.sherwood@arm.com>
7163
7164         * coretypes.h (scalar_mode): New class.
7165         * machmode.h (scalar_mode): Likewise.
7166         (scalar_mode::includes_p): New function.
7167         (mode_to_inner): Return a scalar_mode rather than a machine_mode.
7168         * gdbhooks.py (build_pretty_printers): Handle scalar_mode.
7169         * genmodes.c (get_mode_class): Handle remaining scalar modes.
7170         * cfgexpand.c (expand_debug_expr): Use scalar_mode.
7171         * expmed.c (store_bit_field_1): Likewise.
7172         (extract_bit_field_1): Likewise.
7173         * expr.c (write_complex_part): Likewise.
7174         (read_complex_part): Likewise.
7175         (emit_move_complex_push): Likewise.
7176         (expand_expr_real_2): Likewise.
7177         * function.c (assign_parm_setup_reg): Likewise.
7178         (assign_parms_unsplit_complex): Likewise.
7179         * optabs.c (expand_binop): Likewise.
7180         * rtlanal.c (subreg_get_info): Likewise.
7181         * simplify-rtx.c (simplify_immed_subreg): Likewise.
7182         * varasm.c (output_constant_pool_2): Likewise.
7183
7184 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7185             Alan Hayward  <alan.hayward@arm.com>
7186             David Sherwood  <david.sherwood@arm.com>
7187
7188         * expmed.c (extract_high_half): Use scalar_int_mode and remove
7189         assertion.
7190         (expmed_mult_highpart_optab): Likewise.
7191         (expmed_mult_highpart): Likewise.
7192
7193 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7194             Alan Hayward  <alan.hayward@arm.com>
7195             David Sherwood  <david.sherwood@arm.com>
7196
7197         * builtins.h (builtin_strncpy_read_str): Take a scalar_int_mode
7198         instead of a machine_mode.
7199         (builtin_memset_read_str): Likewise.
7200         * builtins.c (c_readstr): Likewise.
7201         (builtin_memcpy_read_str): Likewise.
7202         (builtin_strncpy_read_str): Likewise.
7203         (builtin_memset_read_str): Likewise.
7204         (builtin_memset_gen_str): Likewise.
7205         (expand_builtin_signbit): Use scalar_int_mode for local variables.
7206         * cfgexpand.c (convert_debug_memory_address): Take a scalar_int_mode
7207         instead of a machine_mode.
7208         * combine.c (simplify_if_then_else): Use scalar_int_mode for local
7209         variables.
7210         (make_extraction): Likewise.
7211         (try_widen_shift_mode): Take and return scalar_int_modes instead
7212         of machine_modes.
7213         * config/aarch64/aarch64.c (aarch64_libgcc_cmp_return_mode): Return
7214         a scalar_int_mode instead of a machine_mode.
7215         * config/avr/avr.c (avr_addr_space_address_mode): Likewise.
7216         (avr_addr_space_pointer_mode): Likewise.
7217         * config/cr16/cr16.c (cr16_unwind_word_mode): Likewise.
7218         * config/msp430/msp430.c (msp430_addr_space_pointer_mode): Likewise.
7219         (msp430_unwind_word_mode): Likewise.
7220         * config/spu/spu.c (spu_unwind_word_mode): Likewise.
7221         (spu_addr_space_pointer_mode): Likewise.
7222         (spu_addr_space_address_mode): Likewise.
7223         (spu_libgcc_cmp_return_mode): Likewise.
7224         (spu_libgcc_shift_count_mode): Likewise.
7225         * config/rl78/rl78.c (rl78_addr_space_address_mode): Likewise.
7226         (rl78_addr_space_pointer_mode): Likewise.
7227         (fl78_unwind_word_mode): Likewise.
7228         (rl78_valid_pointer_mode): Take a scalar_int_mode instead of a
7229         machine_mode.
7230         * config/alpha/alpha.c (vms_valid_pointer_mode): Likewise.
7231         * config/ia64/ia64.c (ia64_vms_valid_pointer_mode): Likewise.
7232         * config/mips/mips.c (mips_mode_rep_extended): Likewise.
7233         (mips_valid_pointer_mode): Likewise.
7234         * config/tilegx/tilegx.c (tilegx_mode_rep_extended): Likewise.
7235         * config/ft32/ft32.c (ft32_valid_pointer_mode): Likewise.
7236         (ft32_addr_space_pointer_mode): Return a scalar_int_mode instead
7237         of a machine_mode.
7238         (ft32_addr_space_address_mode): Likewise.
7239         * config/m32c/m32c.c (m32c_valid_pointer_mode): Take a
7240         scalar_int_mode instead of a machine_mode.
7241         (m32c_addr_space_pointer_mode): Return a scalar_int_mode instead
7242         of a machine_mode.
7243         (m32c_addr_space_address_mode): Likewise.
7244         * config/powerpcspe/powerpcspe.c (rs6000_abi_word_mode): Likewise.
7245         (rs6000_eh_return_filter_mode): Likewise.
7246         * config/rs6000/rs6000.c (rs6000_abi_word_mode): Likewise.
7247         (rs6000_eh_return_filter_mode): Likewise.
7248         * config/s390/s390.c (s390_libgcc_cmp_return_mode): Likewise.
7249         (s390_libgcc_shift_count_mode): Likewise.
7250         (s390_unwind_word_mode): Likewise.
7251         (s390_valid_pointer_mode): Take a scalar_int_mode rather than a
7252         machine_mode.
7253         * target.def (mode_rep_extended): Likewise.
7254         (valid_pointer_mode): Likewise.
7255         (addr_space.valid_pointer_mode): Likewise.
7256         (eh_return_filter_mode): Return a scalar_int_mode rather than
7257         a machine_mode.
7258         (libgcc_cmp_return_mode): Likewise.
7259         (libgcc_shift_count_mode): Likewise.
7260         (unwind_word_mode): Likewise.
7261         (addr_space.pointer_mode): Likewise.
7262         (addr_space.address_mode): Likewise.
7263         * doc/tm.texi: Regenerate.
7264         * dojump.c (prefer_and_bit_test): Take a scalar_int_mode rather than
7265         a machine_mode.
7266         (do_jump): Use scalar_int_mode for local variables.
7267         * dwarf2cfi.c (init_return_column_size): Take a scalar_int_mode
7268         rather than a machine_mode.
7269         * dwarf2out.c (convert_descriptor_to_mode): Likewise.
7270         (scompare_loc_descriptor_wide): Likewise.
7271         (scompare_loc_descriptor_narrow): Likewise.
7272         * emit-rtl.c (adjust_address_1): Use scalar_int_mode for local
7273         variables.
7274         * except.c (sjlj_emit_dispatch_table): Likewise.
7275         (expand_builtin_eh_copy_values): Likewise.
7276         * explow.c (convert_memory_address_addr_space_1): Likewise.
7277         Take a scalar_int_mode rather than a machine_mode.
7278         (convert_memory_address_addr_space): Take a scalar_int_mode rather
7279         than a machine_mode.
7280         (memory_address_addr_space): Use scalar_int_mode for local variables.
7281         * expmed.h (expand_mult_highpart_adjust): Take a scalar_int_mode
7282         rather than a machine_mode.
7283         * expmed.c (mask_rtx): Likewise.
7284         (init_expmed_one_conv): Likewise.
7285         (expand_mult_highpart_adjust): Likewise.
7286         (extract_high_half): Likewise.
7287         (expmed_mult_highpart_optab): Likewise.
7288         (expmed_mult_highpart): Likewise.
7289         (expand_smod_pow2): Likewise.
7290         (expand_sdiv_pow2): Likewise.
7291         (emit_store_flag_int): Likewise.
7292         (adjust_bit_field_mem_for_reg): Use scalar_int_mode for local
7293         variables.
7294         (extract_low_bits): Likewise.
7295         * expr.h (by_pieces_constfn): Take a scalar_int_mode rather than
7296         a machine_mode.
7297         * expr.c (pieces_addr::adjust):  Likewise.
7298         (can_store_by_pieces): Likewise.
7299         (store_by_pieces): Likewise.
7300         (clear_by_pieces_1): Likewise.
7301         (expand_expr_addr_expr_1): Likewise.
7302         (expand_expr_addr_expr): Use scalar_int_mode for local variables.
7303         (expand_expr_real_1): Likewise.
7304         (try_casesi): Likewise.
7305         * final.c (shorten_branches): Likewise.
7306         * fold-const.c (fold_convert_const_int_from_fixed): Change the
7307         type of "mode" to machine_mode.
7308         * internal-fn.c (expand_arith_overflow_result_store): Take a
7309         scalar_int_mode rather than a machine_mode.
7310         (expand_mul_overflow): Use scalar_int_mode for local variables.
7311         * loop-doloop.c (doloop_modify): Likewise.
7312         (doloop_optimize): Likewise.
7313         * optabs.c (expand_subword_shift): Take a scalar_int_mode rather
7314         than a machine_mode.
7315         (expand_doubleword_shift_condmove): Likewise.
7316         (expand_doubleword_shift): Likewise.
7317         (expand_doubleword_clz): Likewise.
7318         (expand_doubleword_popcount): Likewise.
7319         (expand_doubleword_parity): Likewise.
7320         (expand_absneg_bit): Use scalar_int_mode for local variables.
7321         (prepare_float_lib_cmp): Likewise.
7322         * rtl.h (convert_memory_address_addr_space_1): Take a scalar_int_mode
7323         rather than a machine_mode.
7324         (convert_memory_address_addr_space): Likewise.
7325         (get_mode_bounds): Likewise.
7326         (get_address_mode): Return a scalar_int_mode rather than a
7327         machine_mode.
7328         * rtlanal.c (get_address_mode): Likewise.
7329         * stor-layout.c (get_mode_bounds): Take a scalar_int_mode rather
7330         than a machine_mode.
7331         * targhooks.c (default_mode_rep_extended): Likewise.
7332         (default_valid_pointer_mode): Likewise.
7333         (default_addr_space_valid_pointer_mode): Likewise.
7334         (default_eh_return_filter_mode): Return a scalar_int_mode rather
7335         than a machine_mode.
7336         (default_libgcc_cmp_return_mode): Likewise.
7337         (default_libgcc_shift_count_mode): Likewise.
7338         (default_unwind_word_mode): Likewise.
7339         (default_addr_space_pointer_mode): Likewise.
7340         (default_addr_space_address_mode): Likewise.
7341         * targhooks.h (default_eh_return_filter_mode): Likewise.
7342         (default_libgcc_cmp_return_mode): Likewise.
7343         (default_libgcc_shift_count_mode): Likewise.
7344         (default_unwind_word_mode): Likewise.
7345         (default_addr_space_pointer_mode): Likewise.
7346         (default_addr_space_address_mode): Likewise.
7347         (default_mode_rep_extended): Take a scalar_int_mode rather than
7348         a machine_mode.
7349         (default_valid_pointer_mode): Likewise.
7350         (default_addr_space_valid_pointer_mode): Likewise.
7351         * tree-ssa-address.c (addr_for_mem_ref): Use scalar_int_mode for
7352         local variables.
7353         * tree-ssa-loop-ivopts.c (get_shiftadd_cost): Take a scalar_int_mode
7354         rather than a machine_mode.
7355         * tree-switch-conversion.c (array_value_type): Use scalar_int_mode
7356         for local variables.
7357         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
7358         * var-tracking.c (use_narrower_mode): Take a scalar_int_mode rather
7359         than a machine_mode.
7360
7361 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7362             Alan Hayward  <alan.hayward@arm.com>
7363             David Sherwood  <david.sherwood@arm.com>
7364
7365         * dojump.c (do_jump_by_parts_greater_rtx): Change the type of
7366         the mode argument to scalar_int_mode.
7367         (do_jump_by_parts_zero_rtx): Likewise.
7368         (do_jump_by_parts_equality_rtx): Likewise.
7369         (do_jump_by_parts_greater): Take a mode argument.
7370         (do_jump_by_parts_equality): Likewise.
7371         (do_jump_1): Update calls accordingly.
7372
7373 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7374             Alan Hayward  <alan.hayward@arm.com>
7375             David Sherwood  <david.sherwood@arm.com>
7376
7377         * is-a.h (safe_dyn_cast): New function.
7378         * rtl.h (rtx_jump_table_data::get_data_mode): New function.
7379         (jump_table_for_label): Likewise.
7380         * final.c (final_addr_vec_align): Take an rtx_jump_table_data *
7381         instead of an rtx_insn *.
7382         (shorten_branches): Use dyn_cast instead of LABEL_P and
7383         JUMP_TABLE_DATA_P.  Use jump_table_for_label and
7384         rtx_jump_table_data::get_data_mode.
7385         (final_scan_insn): Likewise.
7386
7387 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7388             Alan Hayward  <alan.hayward@arm.com>
7389             David Sherwood  <david.sherwood@arm.com>
7390
7391         * combine.c (try_combine): Use is_a <scalar_int_mode> when
7392         trying to combine a full-register integer set with a subreg
7393         integer set.
7394
7395 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7396             Alan Hayward  <alan.hayward@arm.com>
7397             David Sherwood  <david.sherwood@arm.com>
7398
7399         * expr.c (expand_expr_addr_expr): Add a new_tmode local variable
7400         that is always either address_mode or pointer_mode.
7401
7402 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7403             Alan Hayward  <alan.hayward@arm.com>
7404             David Sherwood  <david.sherwood@arm.com>
7405
7406         * expr.c (expand_expr_real_2): Use word_mode instead of innermode
7407         when the two are known to be equal.
7408
7409 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7410             Alan Hayward  <alan.hayward@arm.com>
7411             David Sherwood  <david.sherwood@arm.com>
7412
7413         * simplify-rtx.c (simplify_const_unary_operation): Use
7414         is_a <scalar_int_mode> instead of checking for a nonzero
7415         precision.  Forcibly convert op_mode to a scalar_int_mode
7416         in that case.  More clearly differentiate the operand and
7417         result modes and use the former when deciding what the value
7418         of a count-bits operation should be.  Use is_int_mode instead
7419         of checking for a MODE_INT.  Remove redundant check for whether
7420         this mode has a zero precision.
7421
7422 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7423             Alan Hayward  <alan.hayward@arm.com>
7424             David Sherwood  <david.sherwood@arm.com>
7425
7426         * optabs.c (widen_leading): Change the type of the mode argument
7427         to scalar_int_mode.  Use opt_scalar_int_mode for the mode iterator.
7428         (widen_bswap): Likewise.
7429         (expand_parity): Likewise.
7430         (expand_ctz): Change the type of the mode argument to scalar_int_mode.
7431         (expand_ffs): Likewise.
7432         (epand_unop): Check for scalar integer modes before calling the
7433         above routines.
7434
7435 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7436             Alan Hayward  <alan.hayward@arm.com>
7437             David Sherwood  <david.sherwood@arm.com>
7438
7439         * expr.c (const_scalar_mask_from_tree): Add a mode argument.
7440         Expand commentary.
7441         (expand_expr_real_1): Update call accordingly.
7442
7443 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7444             Alan Hayward  <alan.hayward@arm.com>
7445             David Sherwood  <david.sherwood@arm.com>
7446
7447         * expmed.c (store_bit_field_using_insv): Add op0_mode and
7448         value_mode arguments.  Use scalar_int_mode internally.
7449         (store_bit_field_1): Rename the new integer mode from imode
7450         to op0_mode and use it instead of GET_MODE (op0).  Update calls
7451         to store_split_bit_field, store_bit_field_using_insv and
7452         store_fixed_bit_field.
7453         (store_fixed_bit_field): Add op0_mode and value_mode arguments.
7454         Use scalar_int_mode internally.  Use a bit count rather than a mode
7455         when calculating the largest bit size for get_best_mode.
7456         Update calls to store_split_bit_field and store_fixed_bit_field_1.
7457         (store_fixed_bit_field_1): Add mode and value_mode arguments.
7458         Remove assertion that OP0 has a scalar integer mode.
7459         (store_split_bit_field): Add op0_mode and value_mode arguments.
7460         Update calls to extract_fixed_bit_field.
7461         (extract_bit_field_using_extv): Add an op0_mode argument.
7462         Use scalar_int_mode internally.
7463         (extract_bit_field_1): Rename the new integer mode from imode to
7464         op0_mode and use it instead of GET_MODE (op0).  Update calls to
7465         extract_split_bit_field, extract_bit_field_using_extv and
7466         extract_fixed_bit_field.
7467         (extract_fixed_bit_field): Add an op0_mode argument.  Update calls
7468         to extract_split_bit_field and extract_fixed_bit_field_1.
7469         (extract_fixed_bit_field_1): Add a mode argument.  Remove assertion
7470         that OP0 has a scalar integer mode.  Use as_a <scalar_int_mode>
7471         on the target mode.
7472         (extract_split_bit_field): Add an op0_mode argument.  Update call
7473         to extract_fixed_bit_field.
7474
7475 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7476             Alan Hayward  <alan.hayward@arm.com>
7477             David Sherwood  <david.sherwood@arm.com>
7478
7479         * cse.c (cse_insn): Use opt_scalar_int_mode for the mode iterator.
7480         * explow.c (hard_function_value): Likewise.
7481         * expmed.c (extract_fixed_bit_field_1): Likewise.  Move the
7482         convert_to_mode call outside the loop.
7483         * expr.c (alignment_for_piecewise_move): Use opt_scalar_int_mode
7484         for the mode iterator.  Require the mode specified by max_pieces
7485         to exist.
7486         (emit_block_move_via_movmem): Use opt_scalar_int_mode for the
7487         mode iterator.
7488         (copy_blkmode_to_reg): Likewise.
7489         (set_storage_via_setmem): Likewise.
7490         * optabs.c (prepare_cmp_insn): Likewise.
7491         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
7492         * stor-layout.c (finish_bitfield_representative): Likewise.
7493
7494 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7495             Alan Hayward  <alan.hayward@arm.com>
7496             David Sherwood  <david.sherwood@arm.com>
7497
7498         * rtl.h (subreg_unpromoted_mode, subreg_promoted_mode): New functions.
7499         * expr.c (convert_move): Use them.
7500         (convert_modes): Likewise.
7501         (store_expr_with_bounds): Likewise.
7502
7503 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7504             Alan Hayward  <alan.hayward@arm.com>
7505             David Sherwood  <david.sherwood@arm.com>
7506
7507         * rtl.h (rtl_hooks::reg_nonzero_bits): Add a scalar_int_mode
7508         parameter for the mode of "x".  Remove the "known_x", "known_mode"
7509         and "known_ret" arguments.  Change the type of the mode argument
7510         to scalar_int_mode.
7511         (rtl_hooks:reg_num_sign_bit_copies): Likewise.
7512         * combine.c (reg_nonzero_bits_for_combine): Update accordingly.
7513         (reg_num_sign_bit_copies_for_combine): Likewise.
7514         * rtlanal.c (nonzero_bits1): Likewise.
7515         (num_sign_bit_copies1): Likewise.
7516         * rtlhooks-def.h (reg_nonzero_bits_general): Likewise.
7517         (reg_num_sign_bit_copies_general): Likewise.
7518         * rtlhooks.c (reg_num_sign_bit_copies_general): Likewise.
7519         (reg_nonzero_bits_general): Likewise.
7520
7521 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7522             Alan Hayward  <alan.hayward@arm.com>
7523             David Sherwood  <david.sherwood@arm.com>
7524
7525         * rtlanal.c (num_sign_bit_copies): Handle VOIDmode here rather
7526         than in subroutines.  Return 1 for non-integer modes.
7527         (cached_num_sign_bit_copies): Change the type of the mode parameter
7528         to scalar_int_mode.
7529         (num_sign_bit_copies1): Likewise.  Remove early exit for other mode
7530         classes.  Handle CONST_INT_P first and then check whether X also
7531         has a scalar integer mode.  Check the same thing for inner registers
7532         of a SUBREG and for values that are being extended or truncated.
7533
7534 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7535             Alan Hayward  <alan.hayward@arm.com>
7536             David Sherwood  <david.sherwood@arm.com>
7537
7538         * rtlanal.c (nonzero_bits): Handle VOIDmode here rather than
7539         in subroutines.  Return the mode mask for non-integer modes.
7540         (cached_nonzero_bits): Change the type of the mode parameter
7541         to scalar_int_mode.
7542         (nonzero_bits1): Likewise.  Remove early exit for other mode
7543         classes.  Handle CONST_INT_P first and then check whether X
7544         also has a scalar integer mode.
7545
7546 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7547             Alan Hayward  <alan.hayward@arm.com>
7548             David Sherwood  <david.sherwood@arm.com>
7549
7550         * expr.c (widest_int_mode_for_size): Make the comment match the code.
7551         Return a scalar_int_mode and assert that the size is greater than
7552         one byte.
7553         (by_pieces_ninsns): Update accordingly and remove VOIDmode handling.
7554         (op_by_pieces_d::op_by_pieces_d): Likewise.
7555         (op_by_pieces_d::run): Likewise.
7556         (can_store_by_pieces): Likewise.
7557
7558 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7559             Alan Hayward  <alan.hayward@arm.com>
7560             David Sherwood  <david.sherwood@arm.com>
7561
7562         * combine.c (extract_left_shift): Add a mode argument and update
7563         recursive calls.
7564         (make_compound_operation_int): Change the type of the mode parameter
7565         to scalar_int_mode and update the call to extract_left_shift.
7566
7567 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7568             Alan Hayward  <alan.hayward@arm.com>
7569             David Sherwood  <david.sherwood@arm.com>
7570
7571         * combine.c (simplify_and_const_int): Change the type of the mode
7572         parameter to scalar_int_mode.
7573         (simplify_and_const_int_1): Likewise.  Update recursive call.
7574
7575 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7576             Alan Hayward  <alan.hayward@arm.com>
7577             David Sherwood  <david.sherwood@arm.com>
7578
7579         * combine.c (simplify_compare_const): Check that the mode is a
7580         scalar_int_mode (rather than VOIDmode) before testing its
7581         precision.
7582         (simplify_comparison): Move COMPARISON_P handling out of the
7583         loop and restrict the latter part of the loop to scalar_int_modes.
7584         Check is_a <scalar_int_mode> before calling HWI_COMPUTABLE_MODE_P
7585         and when considering SUBREG_REGs.  Use is_int_mode instead of
7586         checking GET_MODE_CLASS against MODE_INT.
7587
7588 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7589             Alan Hayward  <alan.hayward@arm.com>
7590             David Sherwood  <david.sherwood@arm.com>
7591
7592         * combine.c (try_widen_shift_mode): Move check for equal modes to...
7593         (simplify_shift_const_1): ...here.  Use scalar_int_mode for
7594         shift_unit_mode and for modes involved in scalar shifts.
7595
7596 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7597             Alan Hayward  <alan.hayward@arm.com>
7598             David Sherwood  <david.sherwood@arm.com>
7599
7600         * combine.c (force_int_to_mode): New function, split out from...
7601         (force_to_mode): ...here.  Keep xmode up-to-date and use it
7602         instead of GET_MODE (x).
7603
7604 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7605             Alan Hayward  <alan.hayward@arm.com>
7606             David Sherwood  <david.sherwood@arm.com>
7607
7608         * optabs-query.h (extraction_insn::struct_mode): Change type to
7609         opt_scalar_int_mode and update comment.
7610         (extraction_insn::field_mode): Change type to scalar_int_mode.
7611         (extraction_insn::pos_mode): Likewise.
7612         * combine.c (make_extraction): Update accordingly.
7613         * optabs-query.c (get_traditional_extraction_insn): Likewise.
7614         (get_optab_extraction_insn): Likewise.
7615         * recog.c (simplify_while_replacing): Likewise.
7616         * expmed.c (narrow_bit_field_mem): Change the type of the mode
7617         parameter to opt_scalar_int_mode.
7618
7619 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7620             Alan Hayward  <alan.hayward@arm.com>
7621             David Sherwood  <david.sherwood@arm.com>
7622
7623         * machmode.h (bit_field_mode_iterator::next_mode): Take a pointer
7624         to a scalar_int_mode instead of a machine_mode.
7625         (bit_field_mode_iterator::m_mode): Change type to opt_scalar_int_mode.
7626         (get_best_mode): Return a boolean and use a pointer argument to store
7627         the selected mode.  Replace the limit mode parameter with a bit limit.
7628         * expmed.c (adjust_bit_field_mem_for_reg): Use scalar_int_mode
7629         for the values returned by bit_field_mode_iterator::next_mode.
7630         (store_bit_field): Update call to get_best_mode.
7631         (store_fixed_bit_field): Likewise.
7632         (extract_fixed_bit_field): Likewise.
7633         * expr.c (optimize_bitfield_assignment_op): Likewise.
7634         * fold-const.c (optimize_bit_field_compare): Likewise.
7635         (fold_truth_andor_1): Likewise.
7636         * stor-layout.c (bit_field_mode_iterator::next_mode): As above.
7637         Update for new type of m_mode.
7638         (get_best_mode): As above.
7639
7640 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7641             Alan Hayward  <alan.hayward@arm.com>
7642             David Sherwood  <david.sherwood@arm.com>
7643
7644         * expmed.c (strict_volatile_bitfield_p): Change the type of fieldmode
7645         to scalar_int_mode.  Remove check for SCALAR_INT_MODE_P.
7646         (store_bit_field): Check is_a <scalar_int_mode> before calling
7647         strict_volatile_bitfield_p.
7648         (extract_bit_field): Likewise.
7649
7650 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7651             Alan Hayward  <alan.hayward@arm.com>
7652             David Sherwood  <david.sherwood@arm.com>
7653
7654         * target.def (cstore_mode): Return a scalar_int_mode.
7655         * doc/tm.texi: Regenerate.
7656         * config/sparc/sparc.c (sparc_cstore_mode): Return a scalar_int_mode.
7657         * targhooks.h (default_cstore_mode): Likewise.
7658         * targhooks.c (default_cstore_mode): Likewise, using a forced
7659         conversion.
7660         * expmed.c (emit_cstore): Expect the target of the cstore to be
7661         a scalar_int_mode.
7662
7663 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7664             Alan Hayward  <alan.hayward@arm.com>
7665             David Sherwood  <david.sherwood@arm.com>
7666
7667         * cfgloop.h (rtx_iv): Change type of extend_mode and mode to
7668         scalar_int_mode.
7669         (niter_desc): Likewise mode.
7670         (iv_analyze): Add a mode parameter.
7671         (biv_p): Likewise.
7672         (iv_analyze_expr): Pass the mode paraeter before the rtx it describes
7673         and change its type to scalar_int_mode.
7674         * loop-iv.c: Update commentary at head of file.
7675         (iv_constant): Pass the mode paraeter before the rtx it describes
7676         and change its type to scalar_int_mode.  Remove VOIDmode handling.
7677         (iv_subreg): Change the type of the mode parameter to scalar_int_mode.
7678         (iv_extend): Likewise.
7679         (shorten_into_mode): Likewise.
7680         (iv_add): Use scalar_int_mode.
7681         (iv_mult): Likewise.
7682         (iv_shift): Likewise.
7683         (canonicalize_iv_subregs): Likewise.
7684         (get_biv_step_1): Pass the outer_mode parameter before the rtx
7685         it describes and change its mode to scalar_int_mode.   Also change
7686         the type of the returned inner_mode to scalar_int_mode.
7687         (get_biv_step): Likewise, turning outer_mode from a pointer
7688         into a direct parameter.  Update call to get_biv_step_1.
7689         (iv_analyze_biv): Add an outer_mode parameter.  Update calls to
7690         iv_constant and get_biv_step.
7691         (iv_analyze_expr): Pass the mode parameter before the rtx it describes
7692         and change its type to scalar_int_mode.  Don't initialise iv->mode
7693         to VOIDmode and remove later checks for its still being VOIDmode.
7694         Update calls to iv_analyze_op and iv_analyze_expr.  Check
7695         is_a <scalar_int_mode> when changing the mode under consideration.
7696         (iv_analyze_def): Ignore registers that don't have a scalar_int_mode.
7697         Update call to iv_analyze_expr.
7698         (iv_analyze_op): Add a mode parameter.  Reject subregs whose
7699         inner register is not also a scalar_int_mode.  Update call to
7700         iv_analyze_biv.
7701         (iv_analyze): Add a mode parameter.  Update call to iv_analyze_op.
7702         (biv_p): Add a mode parameter.  Update call to iv_analyze_biv.
7703         (iv_number_of_iterations): Use is_a <scalar_int_mode> instead of
7704         separate mode class checks.  Update calls to iv_analyze.  Remove
7705         fix-up of VOIDmodes after iv_analyze_biv.
7706         * loop-unroll.c (analyze_iv_to_split_insn): Reject registers that
7707         don't have a scalar_int_mode.  Update call to biv_p.
7708
7709 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7710             Alan Hayward  <alan.hayward@arm.com>
7711             David Sherwood  <david.sherwood@arm.com>
7712
7713         * cfgexpand.c (convert_debug_memory_address): Use
7714         as_a <scalar_int_mode>.
7715         * combine.c (expand_compound_operation): Likewise.
7716         (make_extraction): Likewise.
7717         (change_zero_ext): Likewise.
7718         (simplify_comparison): Likewise.
7719         * cse.c (cse_insn): Likewise.
7720         * dwarf2out.c (minmax_loc_descriptor): Likewise.
7721         (mem_loc_descriptor): Likewise.
7722         (loc_descriptor): Likewise.
7723         * expmed.c (init_expmed_one_mode): Likewise.
7724         (synth_mult): Likewise.
7725         (emit_store_flag_1): Likewise.
7726         (expand_divmod): Likewise.  Use HWI_COMPUTABLE_MODE_P instead
7727         of a comparison with size.
7728         * expr.c (expand_assignment): Use as_a <scalar_int_mode>.
7729         (reduce_to_bit_field_precision): Likewise.
7730         * function.c (expand_function_end): Likewise.
7731         * internal-fn.c (expand_arith_overflow_result_store): Likewise.
7732         * loop-doloop.c (doloop_modify): Likewise.
7733         * optabs.c (expand_binop): Likewise.
7734         (expand_unop): Likewise.
7735         (expand_copysign_absneg): Likewise.
7736         (prepare_cmp_insn): Likewise.
7737         (maybe_legitimize_operand): Likewise.
7738         * recog.c (const_scalar_int_operand): Likewise.
7739         * rtlanal.c (get_address_mode): Likewise.
7740         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
7741         (simplify_cond_clz_ctz): Likewise.
7742         * tree-nested.c (get_nl_goto_field): Likewise.
7743         * tree.c (build_vector_type_for_mode): Likewise.
7744         * var-tracking.c (use_narrower_mode): Likewise.
7745
7746 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7747             Alan Hayward  <alan.hayward@arm.com>
7748             David Sherwood  <david.sherwood@arm.com>
7749
7750         * tree.h (SCALAR_INT_TYPE_MODE): New macro.
7751         * builtins.c (expand_builtin_signbit): Use it.
7752         * cfgexpand.c (expand_debug_expr): Likewise.
7753         * dojump.c (do_jump): Likewise.
7754         (do_compare_and_jump): Likewise.
7755         * dwarf2cfi.c (expand_builtin_init_dwarf_reg_sizes): Likewise.
7756         * expmed.c (make_tree): Likewise.
7757         * expr.c (expand_expr_real_2): Likewise.
7758         (expand_expr_real_1): Likewise.
7759         (try_casesi): Likewise.
7760         * fold-const-call.c (fold_const_call_ss): Likewise.
7761         * fold-const.c (unextend): Likewise.
7762         (extract_muldiv_1): Likewise.
7763         (fold_single_bit_test): Likewise.
7764         (native_encode_int): Likewise.
7765         (native_encode_string): Likewise.
7766         (native_interpret_int): Likewise.
7767         * gimple-fold.c (gimple_fold_builtin_memset): Likewise.
7768         * internal-fn.c (expand_addsub_overflow): Likewise.
7769         (expand_neg_overflow): Likewise.
7770         (expand_mul_overflow): Likewise.
7771         (expand_arith_overflow): Likewise.
7772         * match.pd: Likewise.
7773         * stor-layout.c (layout_type): Likewise.
7774         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
7775         * tree-ssa-math-opts.c (convert_mult_to_widen): Likewise.
7776         * tree-ssanames.c (get_range_info): Likewise.
7777         * tree-switch-conversion.c (array_value_type) Likewise.
7778         * tree-vect-patterns.c (vect_recog_rotate_pattern): Likewise.
7779         (vect_recog_divmod_pattern): Likewise.
7780         (vect_recog_mixed_size_cond_pattern): Likewise.
7781         * tree-vrp.c (extract_range_basic): Likewise.
7782         (simplify_float_conversion_using_ranges): Likewise.
7783         * tree.c (int_fits_type_p): Likewise.
7784         * ubsan.c (instrument_bool_enum_load): Likewise.
7785         * varasm.c (mergeable_string_section): Likewise.
7786         (narrowing_initializer_constant_valid_p): Likewise.
7787         (output_constant): Likewise.
7788
7789 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7790             Alan Hayward  <alan.hayward@arm.com>
7791             David Sherwood  <david.sherwood@arm.com>
7792
7793         * machmode.h (NARROWEST_INT_MODE): New macro.
7794         * expr.c (alignment_for_piecewise_move): Use it instead of
7795         GET_CLASS_NARROWEST_MODE (MODE_INT).
7796         (push_block): Likewise.
7797         * stor-layout.c (bit_field_mode_iterator::bit_field_mode_iterator):
7798         Likewise.
7799         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
7800
7801 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7802             Alan Hayward  <alan.hayward@arm.com>
7803             David Sherwood  <david.sherwood@arm.com>
7804
7805         * postreload.c (move2add_valid_value_p): Change the type of the
7806         mode parameter to scalar_int_mode.
7807         (move2add_use_add2_insn): Add a mode parameter and use it instead
7808         of GET_MODE (reg).
7809         (move2add_use_add3_insn): Likewise.
7810         (reload_cse_move2add): Update accordingly.
7811
7812 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7813             Alan Hayward  <alan.hayward@arm.com>
7814             David Sherwood  <david.sherwood@arm.com>
7815
7816         * expr.c (expand_expr_real_2): Use scalar_int_mode for the
7817         double-word mode.
7818         * lower-subreg.c (resolve_shift_zext): Use is_a <scalar_int_mode>.
7819         * optabs.c (expand_unop): Likewise.
7820
7821 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7822             Alan Hayward  <alan.hayward@arm.com>
7823             David Sherwood  <david.sherwood@arm.com>
7824
7825         * dwarf2out.c (typed_binop): Change mode parameter to scalar_int_mode.
7826         (clz_loc_descriptor): Likewise.  Remove SCALAR_INT_MODE_P check.
7827         (popcount_loc_descriptor): Likewise.
7828         (bswap_loc_descriptor): Likewise.
7829         (rotate_loc_descriptor): Likewise.
7830         (mem_loc_descriptor): Add is_a <scalar_int_mode> checks before
7831         calling the functions above.
7832
7833 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7834             Alan Hayward  <alan.hayward@arm.com>
7835             David Sherwood  <david.sherwood@arm.com>
7836
7837         * combine.c (sign_extend_short_imm): Add is_a <scalar_int_mode>
7838         checks.
7839         (try_combine): Likewise.
7840         (simplify_if_then_else): Likewise.
7841         * cse.c (cse_insn): Likewise.
7842         * dwarf2out.c (mem_loc_descriptor): Likewise.
7843         * emit-rtl.c (gen_lowpart_common): Likewise.
7844         * simplify-rtx.c (simplify_truncation): Likewise.
7845         (simplify_binary_operation_1): Likewise.
7846         (simplify_const_relational_operation): Likewise.
7847         (simplify_ternary_operation): Likewise.
7848         * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise.
7849
7850 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7851             Alan Hayward  <alan.hayward@arm.com>
7852             David Sherwood  <david.sherwood@arm.com>
7853
7854         * cse.c (cse_insn): Add is_a <scalar_int_mode> checks.
7855         * reload.c (push_reload): Likewise.
7856         (find_reloads): Likewise.
7857
7858 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7859             Alan Hayward  <alan.hayward@arm.com>
7860             David Sherwood  <david.sherwood@arm.com>
7861
7862         * combine.c (find_split_point): Add is_a <scalar_int_mode> checks.
7863         (make_compound_operation_int): Likewise.
7864         (change_zero_ext): Likewise.
7865         * expr.c (convert_move): Likewise.
7866         (convert_modes): Likewise.
7867         * fwprop.c (forward_propagate_subreg): Likewise.
7868         * loop-iv.c (get_biv_step_1): Likewise.
7869         * optabs.c (widen_operand): Likewise.
7870         * postreload.c (move2add_valid_value_p): Likewise.
7871         * recog.c (simplify_while_replacing): Likewise.
7872         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
7873         (simplify_binary_operation_1): Likewise.  Remove redundant
7874         mode equality check.
7875
7876 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7877             Alan Hayward  <alan.hayward@arm.com>
7878             David Sherwood  <david.sherwood@arm.com>
7879
7880         * combine.c (combine_simplify_rtx): Add checks for
7881         is_a <scalar_int_mode>.
7882         (simplify_if_then_else): Likewise.
7883         (make_field_assignment): Likewise.
7884         (simplify_comparison): Likewise.
7885         * ifcvt.c (noce_try_bitop): Likewise.
7886         * loop-invariant.c (canonicalize_address_mult): Likewise.
7887         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
7888
7889 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7890             Alan Hayward  <alan.hayward@arm.com>
7891             David Sherwood  <david.sherwood@arm.com>
7892
7893         * gimple-fold.c (gimple_fold_builtin_memory_op): Use
7894         is_a <scalar_int_mode> instead of != BLKmode.
7895
7896 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7897             Alan Hayward  <alan.hayward@arm.com>
7898             David Sherwood  <david.sherwood@arm.com>
7899
7900         * cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>
7901         instead of != VOIDmode.
7902         * combine.c (if_then_else_cond): Likewise.
7903         (change_zero_ext): Likewise.
7904         * dwarf2out.c (mem_loc_descriptor): Likewise.
7905         (loc_descriptor): Likewise.
7906         * rtlanal.c (canonicalize_condition): Likewise.
7907         * simplify-rtx.c (simplify_relational_operation_1): Likewise.
7908
7909 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7910             Alan Hayward  <alan.hayward@arm.com>
7911             David Sherwood  <david.sherwood@arm.com>
7912
7913         * simplify-rtx.c (simplify_binary_operation_1): Use
7914         is_a <scalar_int_mode> instead of !VECTOR_MODE_P.
7915
7916 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7917             Alan Hayward  <alan.hayward@arm.com>
7918             David Sherwood  <david.sherwood@arm.com>
7919
7920         * wide-int.h (int_traits<unsigned char>) New class.
7921         (int_traits<unsigned short>) Likewise.
7922         * cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>.
7923         Use GET_MODE_UNIT_PRECISION and remove redundant test for
7924         SCALAR_INT_MODE_P.
7925         * combine.c (set_nonzero_bits_and_sign_copies): Use
7926         is_a <scalar_int_mode>.
7927         (find_split_point): Likewise.
7928         (combine_simplify_rtx): Likewise.
7929         (simplify_logical): Likewise.
7930         (expand_compound_operation): Likewise.
7931         (expand_field_assignment): Likewise.
7932         (make_compound_operation): Likewise.
7933         (extended_count): Likewise.
7934         (change_zero_ext): Likewise.
7935         (simplify_comparison): Likewise.
7936         * dwarf2out.c (scompare_loc_descriptor): Likewise.
7937         (ucompare_loc_descriptor): Likewise.
7938         (minmax_loc_descriptor): Likewise.
7939         (mem_loc_descriptor): Likewise.
7940         (loc_descriptor): Likewise.
7941         * expmed.c (init_expmed_one_mode): Likewise.
7942         * lra-constraints.c (lra_constraint_offset): Likewise.
7943         * optabs.c (prepare_libcall_arg): Likewise.
7944         * postreload.c (move2add_note_store): Likewise.
7945         * reload.c (operands_match_p): Likewise.
7946         * rtl.h (load_extend_op): Likewise.
7947         * rtlhooks.c (gen_lowpart_general): Likewise.
7948         * simplify-rtx.c (simplify_truncation): Likewise.
7949         (simplify_unary_operation_1): Likewise.
7950         (simplify_binary_operation_1): Likewise.
7951         (simplify_const_binary_operation): Likewise.
7952         (simplify_const_relational_operation): Likewise.
7953         (simplify_subreg): Likewise.
7954         * stor-layout.c (bitwise_mode_for_mode): Likewise.
7955         * var-tracking.c (adjust_mems): Likewise.
7956         (prepare_call_arguments): Likewise.
7957
7958 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7959             Alan Hayward  <alan.hayward@arm.com>
7960             David Sherwood  <david.sherwood@arm.com>
7961
7962         * machmode.h (is_int_mode): New fuction.
7963         * combine.c (find_split_point): Use it.
7964         (combine_simplify_rtx): Likewise.
7965         (simplify_if_then_else): Likewise.
7966         (simplify_set): Likewise.
7967         (simplify_shift_const_1): Likewise.
7968         (simplify_comparison): Likewise.
7969         * config/aarch64/aarch64.c (aarch64_rtx_costs): Likewise.
7970         * cse.c (notreg_cost): Likewise.
7971         (cse_insn): Likewise.
7972         * cselib.c (cselib_lookup_1): Likewise.
7973         * dojump.c (do_jump_1): Likewise.
7974         (do_compare_rtx_and_jump): Likewise.
7975         * dse.c (get_call_args): Likewise.
7976         * dwarf2out.c (rtl_for_decl_init): Likewise.
7977         (native_encode_initializer): Likewise.
7978         * expmed.c (emit_store_flag_1): Likewise.
7979         (emit_store_flag): Likewise.
7980         * expr.c (convert_modes): Likewise.
7981         (store_field): Likewise.
7982         (expand_expr_real_1): Likewise.
7983         * fold-const.c (fold_read_from_constant_string): Likewise.
7984         * gimple-ssa-sprintf.c (get_format_string): Likewise.
7985         * optabs-libfuncs.c (gen_int_libfunc): Likewise.
7986         * optabs.c (expand_binop): Likewise.
7987         (expand_unop): Likewise.
7988         (expand_abs_nojump): Likewise.
7989         (expand_one_cmpl_abs_nojump): Likewise.
7990         * simplify-rtx.c (mode_signbit_p): Likewise.
7991         (val_signbit_p): Likewise.
7992         (val_signbit_known_set_p): Likewise.
7993         (val_signbit_known_clear_p): Likewise.
7994         (simplify_relational_operation_1): Likewise.
7995         * tree.c (vector_type_mode): Likewise.
7996
7997 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7998             Alan Hayward  <alan.hayward@arm.com>
7999             David Sherwood  <david.sherwood@arm.com>
8000
8001         * machmode.h (smallest_mode_for_size): Fix formatting.
8002         (smallest_int_mode_for_size): New function.
8003         * cfgexpand.c (expand_debug_expr): Use smallest_int_mode_for_size
8004         instead of smallest_mode_for_size.
8005         * combine.c (make_extraction): Likewise.
8006         * config/arc/arc.c (arc_expand_movmem): Likewise.
8007         * config/arm/arm.c (arm_expand_divmod_libfunc): Likewise.
8008         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
8009         * config/s390/s390.c (s390_expand_insv): Likewise.
8010         * config/sparc/sparc.c (assign_int_registers): Likewise.
8011         * config/spu/spu.c (spu_function_value): Likewise.
8012         (spu_function_arg): Likewise.
8013         * coverage.c (get_gcov_type): Likewise.
8014         (get_gcov_unsigned_t): Likewise.
8015         * dse.c (find_shift_sequence): Likewise.
8016         * expmed.c (store_bit_field_1): Likewise.
8017         * expr.c (convert_move): Likewise.
8018         (store_field): Likewise.
8019         * internal-fn.c (expand_arith_overflow): Likewise.
8020         * optabs-query.c (get_best_extraction_insn): Likewise.
8021         * optabs.c (expand_twoval_binop_libfunc): Likewise.
8022         * stor-layout.c (layout_type): Likewise.
8023         (initialize_sizetypes): Likewise.
8024         * targhooks.c (default_get_mask_mode): Likewise.
8025         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Likewise.
8026
8027 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8028             Alan Hayward  <alan.hayward@arm.com>
8029             David Sherwood  <david.sherwood@arm.com>
8030
8031         * machmode.h (opt_mode::else_blk): New function.
8032         (int_mode_for_mode): Declare.
8033         * stor-layout.c (int_mode_for_mode): Return an opt_scalar_int_mode.
8034         * builtins.c (expand_builtin_signbit): Adjust for new int_mode_for_mode
8035         return type.
8036         * cfgexpand.c (expand_debug_expr): Likewise.
8037         * combine.c (gen_lowpart_or_truncate): Likewise.
8038         (gen_lowpart_for_combine): Likewise.
8039         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Likewise.
8040         * config/avr/avr.c (avr_to_int_mode): Likewise.
8041         (avr_out_plus_1): Likewise.
8042         (avr_out_plus): Likewise.
8043         (avr_out_round): Likewise.
8044         * config/i386/i386.c (ix86_split_to_parts): Likewise.
8045         * config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
8046         (s390_expand_vcond): Likewise.
8047         * config/spu/spu.c (spu_split_immediate): Likewise.
8048         (spu_expand_mov): Likewise.
8049         * dse.c (get_stored_val): Likewise.
8050         * expmed.c (store_bit_field_1): Likewise.
8051         (convert_extracted_bit_field): Use int_mode_for_mode instead of
8052         int_mode_for_size.
8053         (extract_bit_field_1): Adjust for new int_mode_for_mode return type.
8054         (extract_low_bits): Likewise.
8055         * expr.c (emit_group_load_1): Likewise.  Separate out the BLKmode
8056         handling rather than repeating the check.
8057         (emit_group_store): Likewise.
8058         (emit_move_via_integer): Adjust for new int_mode_for_mode return type.
8059         * optabs.c (expand_absneg_bit): Likewise.
8060         (expand_copysign_absneg): Likewise.
8061         (expand_copysign_bit): Likewise.
8062         * tree-if-conv.c (ifcvt_can_use_mask_load_store): Likewise.
8063         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
8064         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
8065         * var-tracking.c (prepare_call_arguments):  Likewise.
8066         * config/powerpcspe/powerpcspe.c (rs6000_do_expand_vec_perm): Use
8067         int_mode_for_mode instead of mode_for_size.
8068         * config/rs6000/rs6000.c (rs6000_do_expand_vec_perm): Likewise.
8069
8070 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8071             Alan Hayward  <alan.hayward@arm.com>
8072             David Sherwood  <david.sherwood@arm.com>
8073
8074         * machmode.h (int_mode_for_size): New function.
8075         * builtins.c (set_builtin_user_assembler_name): Use int_mode_for_size
8076         instead of mode_for_size.
8077         * calls.c (save_fixed_argument_area): Likewise.  Make use of BLKmode
8078         explicit.
8079         * combine.c (expand_field_assignment): Use int_mode_for_size
8080         instead of mode_for_size.
8081         (make_extraction): Likewise.
8082         (simplify_shift_const_1): Likewise.
8083         (simplify_comparison): Likewise.
8084         * dojump.c (do_jump): Likewise.
8085         * dwarf2out.c (mem_loc_descriptor): Likewise.
8086         * emit-rtl.c (init_derived_machine_modes): Likewise.
8087         * expmed.c (flip_storage_order): Likewise.
8088         (convert_extracted_bit_field): Likewise.
8089         * expr.c (copy_blkmode_from_reg): Likewise.
8090         * graphite-isl-ast-to-gimple.c (max_mode_int_precision): Likewise.
8091         * internal-fn.c (expand_mul_overflow): Likewise.
8092         * lower-subreg.c (simple_move): Likewise.
8093         * optabs-libfuncs.c (init_optabs): Likewise.
8094         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
8095         * tree.c (vector_type_mode): Likewise.
8096         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
8097         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Likewise.
8098         * tree-vect-generic.c (expand_vector_parallel): Likewise.
8099         * tree-vect-stmts.c (vectorizable_load): Likewise.
8100         (vectorizable_store): Likewise.
8101
8102 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8103             Alan Hayward  <alan.hayward@arm.com>
8104             David Sherwood  <david.sherwood@arm.com>
8105
8106         * coretypes.h (pod_mode): New type.
8107         (scalar_int_mode_pod): New typedef.
8108         * machmode.h (pod_mode): New class.
8109         (int_n_data_t::m): Change type to scalar_int_mode_pod.
8110         * genmodes.c (emit_mode_int_n): Update accordingly.
8111         * lower-subreg.h (target_lower_subreg): Change type to
8112         scalar_int_mode_pod.
8113         * gdbhooks.py (build_pretty_printer): Handle pod_mode and
8114         scalar_int_mode_pod.
8115
8116 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8117             Alan Hayward  <alan.hayward@arm.com>
8118             David Sherwood  <david.sherwood@arm.com>
8119
8120         * config/powerpcspe/powerpcspe.h (rs6000_pmode): Change type from
8121         machine_mode to scalar_int_mode.
8122         * config/powerpcspe/powerpcspe.c (rs6000_pmode): Likewise.
8123         (rs6000_option_override_internal): Remove cast to int.
8124         * config/rs6000/rs6000.h (rs6000_pmode): Change type from
8125         machine_mode to scalar_int_mode.
8126         * config/rs6000/rs6000.c (rs6000_pmode): Likewise.
8127         (rs6000_option_override_internal): Remove cast to int.
8128         * config/s390/s390.h (Pmode): Remove cast to machine_mode.
8129         * config/epiphany/epiphany.h (RTX_OK_FOR_OFFSET_P): Add cast
8130         to machine_mode.
8131         * config/s390/s390.c (s390_expand_builtin): Likewise.
8132         * coretypes.h (scalar_int_mode): New type.
8133         (opt_scalar_int_mode): New typedef.
8134         * machmode.h (scalar_int_mode): New class.
8135         (scalar_int_mode::includes_p): New function.
8136         (byte_mode): Change type to scalar_int_mode.
8137         (word_mode): Likewise.
8138         (ptr_mode): Likewise.
8139         * emit-rtl.c (byte_mode): Likewise.
8140         (word_mode): Likewise.
8141         (ptr_mode): Likewise.
8142         (init_derived_machine_modes): Update accordingly.
8143         * genmodes.c (get_mode_class): Return scalar_int_mode for MODE_INT
8144         and MODE_PARTIAL_INT.
8145         * gdbhooks.py (build_pretty_printer): Handle scalar_int_mode and
8146         opt_scalar_int_mode.
8147
8148 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8149             Alan Hayward  <alan.hayward@arm.com>
8150             David Sherwood  <david.sherwood@arm.com>
8151
8152         * target.def (libgcc_floating_mode_supported_p): Take a
8153         scalar_float_mode.
8154         * doc/tm.texi: Regenerate.
8155         * targhooks.h (default_libgcc_floating_mode_supported_p): Take a
8156         scalar_float_mode.
8157         * targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.
8158         * config/aarch64/aarch64.c (aarch64_libgcc_floating_mode_supported_p):
8159         Likewise.
8160
8161 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8162             Alan Hayward  <alan.hayward@arm.com>
8163             David Sherwood  <david.sherwood@arm.com>
8164
8165         * target.def (default_floatn_mode): Return an opt_scalar_float_mode.
8166         * doc/tm.texi: Regenerate.
8167         * config/arm/arm.c (arm_floatn_mode): Return an opt_scalar_float_mode.
8168         * config/powerpcspe/powerpcspe.c (rs6000_floatn_mode): Likewise.
8169         * config/rs6000/rs6000.c (rs6000_floatn_mode): Likewise.
8170         * targhooks.h (default_floatn_mode): Likewise.
8171         * targhooks.c (default_floatn_mode): Likewise.
8172         * tree.c (build_common_tree_nodes): Update accordingly.
8173
8174 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8175             Alan Hayward  <alan.hayward@arm.com>
8176             David Sherwood  <david.sherwood@arm.com>
8177
8178         * machmode.h (mode_iterator::start): Provide overload for opt_modes.
8179         (mode_iterator::iterate_p): Likewise.
8180         (mode_iterator::get_wider): Likewise.
8181         * expr.c (init_expr_target): Use opt_scalar_float_mode.
8182
8183 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8184             Alan Hayward  <alan.hayward@arm.com>
8185             David Sherwood  <david.sherwood@arm.com>
8186
8187         * coretypes.h (opt_scalar_float_mode): New typedef.
8188         * machmode.h (float_mode_for_size): New function.
8189         * emit-rtl.c (double_mode): Delete.
8190         (init_emit_once): Use float_mode_for_size.
8191         * stor-layout.c (layout_type): Likewise.
8192         * gdbhooks.py (build_pretty_printer): Handle opt_scalar_float_mode.
8193
8194 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8195             Alan Hayward  <alan.hayward@arm.com>
8196             David Sherwood  <david.sherwood@arm.com>
8197
8198         * output.h (assemble_real): Take a scalar_float_mode.
8199         * config/arm/arm.c (arm_assemble_integer): Update accordingly.
8200         * config/arm/arm.md (consttable_4): Likewise.
8201         (consttable_8): Likewise.
8202         (consttable_16): Likewise.
8203         * config/mips/mips.md (consttable_float): Likewise.
8204         * config/s390/s390.c (s390_output_pool_entry): Likewise.
8205         * varasm.c (assemble_real): Take a scalar_float_mode.
8206         (output_constant_pool_2): Update accordingly.
8207         (output_constant): Likewise.
8208
8209 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8210             Alan Hayward  <alan.hayward@arm.com>
8211             David Sherwood  <david.sherwood@arm.com>
8212
8213         * tree.h (SCALAR_FLOAT_TYPE_MODE): New macro.
8214         * builtins.c (expand_builtin_signbit): Use it instead of TYPE_MODE.
8215         * fold-const.c (fold_convert_const_real_from_fixed): Likewise.
8216         (native_encode_real): Likewise.
8217         (native_interpret_real): Likewise.
8218         * hsa-brig.c (emit_immediate_scalar_to_buffer): Likewise.
8219         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
8220
8221 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8222             Alan Hayward  <alan.hayward@arm.com>
8223             David Sherwood  <david.sherwood@arm.com>
8224
8225         * optabs-libfuncs.c (gen_trunc_conv_libfunc): Use is_a
8226         <scalar_float_mode>.  Simplify.
8227         (gen_extend_conv_libfunc): Likewise.
8228
8229 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8230             Alan Hayward  <alan.hayward@arm.com>
8231             David Sherwood  <david.sherwood@arm.com>
8232
8233         * coretypes.h (scalar_float_mode): New type.
8234         * machmode.h (mode_traits::from_int): Use machine_mode if
8235         USE_ENUM_MODES is defined.
8236         (is_a): New function.
8237         (as_a): Likewise.
8238         (dyn_cast): Likewise.
8239         (scalar_float_mode): New class.
8240         (scalar_float_mode::includes_p): New function.
8241         (is_float_mode): Likewise.
8242         * gdbhooks.py (MachineModePrinter): New class.
8243         (build_pretty_printer): Use it for scalar_float_mode.
8244         * real.h (FLOAT_MODE_FORMAT): Use as_a <scalar_float_mode>.
8245         (format_helper::format_helper): Turn into a template.
8246         * genmodes.c (get_mode_class): New function.
8247         (emit_insn_modes_h): Give modes the class returned by get_mode_class,
8248         or machine_mode if none.
8249         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Use
8250         as_a <scalar_float_mode>.
8251         * dwarf2out.c (mem_loc_descriptor): Likewise.
8252         (insert_float): Likewise.
8253         (add_const_value_attribute): Likewise.
8254         * simplify-rtx.c (simplify_immed_subreg): Likewise.
8255         * optabs.c (expand_absneg_bit): Take a scalar_float_mode.
8256         (expand_unop): Update accordingly.
8257         (expand_abs_nojump): Likewise.
8258         (expand_copysign_absneg): Take a scalar_float_mode.
8259         (expand_copysign_bit): Likewise.
8260         (expand_copysign): Update accordingly.
8261
8262 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8263             Alan Hayward  <alan.hayward@arm.com>
8264             David Sherwood  <david.sherwood@arm.com>
8265
8266         * coretypes.h (opt_mode): New class.
8267         * machmode.h (opt_mode): Likewise.
8268         (opt_mode::else_void): New function.
8269         (opt_mode::require): Likewise.
8270         (opt_mode::exists): Likewise.
8271         (GET_MODE_WIDER_MODE): Turn into a function and return an opt_mode.
8272         (GET_MODE_2XWIDER_MODE): Likewise.
8273         (mode_iterator::get_wider): Update accordingly.
8274         (mode_iterator::get_2xwider): Likewise.
8275         (mode_iterator::get_known_wider): Likewise, turning into a template.
8276         * combine.c (make_extraction): Update use of GET_MODE_WIDER_MODE,
8277         forcing a wider mode to exist.
8278         * config/cr16/cr16.h (LONG_REG_P): Likewise.
8279         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
8280         * config/c6x/c6x.c (c6x_rtx_costs): Update use of
8281         GET_MODE_2XWIDER_MODE, forcing a wider mode to exist.
8282         * lower-subreg.c (init_lower_subreg): Likewise.
8283         * optabs-libfuncs.c (init_sync_libfuncs_1): Likewise, but not
8284         on the final iteration.
8285         * config/i386/i386.c (ix86_expand_set_or_movmem): Check whether
8286         a wider mode exists before asking for a move pattern.
8287         (get_mode_wider_vector): Update use of GET_MODE_WIDER_MODE,
8288         forcing a wider mode to exist.
8289         (expand_vselect_vconcat): Update use of GET_MODE_2XWIDER_MODE,
8290         returning false if no such mode exists.
8291         * config/ia64/ia64.c (expand_vselect_vconcat): Likewise.
8292         * config/mips/mips.c (mips_expand_vselect_vconcat): Likewise.
8293         * expmed.c (init_expmed_one_mode): Update use of GET_MODE_WIDER_MODE.
8294         Avoid checking for a MODE_INT if we already know the mode is not a
8295         SCALAR_INT_MODE_P.
8296         (extract_high_half): Update use of GET_MODE_WIDER_MODE,
8297         forcing a wider mode to exist.
8298         (expmed_mult_highpart_optab): Likewise.
8299         (expmed_mult_highpart): Likewise.
8300         * expr.c (expand_expr_real_2): Update use of GET_MODE_WIDER_MODE,
8301         using else_void.
8302         * lto-streamer-in.c (lto_input_mode_table): Likewise.
8303         * optabs-query.c (find_widening_optab_handler_and_mode): Likewise.
8304         * stor-layout.c (bit_field_mode_iterator::next_mode): Likewise.
8305         * internal-fn.c (expand_mul_overflow): Update use of
8306         GET_MODE_2XWIDER_MODE.
8307         * omp-low.c (omp_clause_aligned_alignment): Likewise.
8308         * tree-ssa-math-opts.c (convert_mult_to_widen): Update use of
8309         GET_MODE_WIDER_MODE.
8310         (convert_plusminus_to_widen): Likewise.
8311         * tree-switch-conversion.c (array_value_type): Likewise.
8312         * var-tracking.c (emit_note_insn_var_location): Likewise.
8313         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
8314         Return false inside rather than outside the loop if no wider mode
8315         exists
8316         * optabs.c (expand_binop): Update use of GET_MODE_WIDER_MODE
8317         and GET_MODE_2XWIDER_MODE
8318         (can_compare_p): Use else_void.
8319         * gdbhooks.py (OptMachineModePrinter): New class.
8320         (build_pretty_printer): Use it for opt_mode.
8321
8322 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8323             Alan Hayward  <alan.hayward@arm.com>
8324             David Sherwood  <david.sherwood@arm.com>
8325
8326         * tree-switch-conversion.c (array_value_type): Only read TYPE_MODE
8327         once.  Use get_narrowest_mode instead of GET_CLASS_NARROWEST_MODE.
8328
8329 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8330             Alan Hayward  <alan.hayward@arm.com>
8331             David Sherwood  <david.sherwood@arm.com>
8332
8333         * machmode.h (mode_traits): New structure.
8334         (get_narrowest_mode): New function.
8335         (mode_iterator::start): Likewise.
8336         (mode_iterator::iterate_p): Likewise.
8337         (mode_iterator::get_wider): Likewise.
8338         (mode_iterator::get_known_wider): Likewise.
8339         (mode_iterator::get_2xwider): Likewise.
8340         (FOR_EACH_MODE_IN_CLASS): New mode iterator.
8341         (FOR_EACH_MODE): Likewise.
8342         (FOR_EACH_MODE_FROM): Likewise.
8343         (FOR_EACH_MODE_UNTIL): Likewise.
8344         (FOR_EACH_WIDER_MODE): Likewise.
8345         (FOR_EACH_2XWIDER_MODE): Likewise.
8346         * builtins.c (expand_builtin_strlen): Use new mode iterators.
8347         * combine.c (simplify_comparison): Likewise
8348         * config/i386/i386.c (type_natural_mode): Likewise.
8349         * cse.c (cse_insn): Likewise.
8350         * dse.c (find_shift_sequence): Likewise.
8351         * emit-rtl.c (init_derived_machine_modes): Likewise.
8352         (init_emit_once): Likewise.
8353         * explow.c (hard_function_value): Likewise.
8354         * expmed.c (extract_fixed_bit_field_1): Likewise.
8355         (extract_bit_field_1): Likewise.
8356         (expand_divmod): Likewise.
8357         (emit_store_flag_1): Likewise.
8358         * expr.c (init_expr_target): Likewise.
8359         (convert_move): Likewise.
8360         (alignment_for_piecewise_move): Likewise.
8361         (widest_int_mode_for_size): Likewise.
8362         (emit_block_move_via_movmem): Likewise.
8363         (copy_blkmode_to_reg): Likewise.
8364         (set_storage_via_setmem): Likewise.
8365         (compress_float_constant): Likewise.
8366         * omp-low.c (omp_clause_aligned_alignment): Likewise.
8367         * optabs-query.c (get_best_extraction_insn): Likewise.
8368         * optabs.c (expand_binop): Likewise.
8369         (expand_twoval_unop): Likewise.
8370         (expand_twoval_binop): Likewise.
8371         (widen_leading): Likewise.
8372         (widen_bswap): Likewise.
8373         (expand_parity): Likewise.
8374         (expand_unop): Likewise.
8375         (prepare_cmp_insn): Likewise.
8376         (prepare_float_lib_cmp): Likewise.
8377         (expand_float): Likewise.
8378         (expand_fix): Likewise.
8379         (expand_sfix_optab): Likewise.
8380         * postreload.c (move2add_use_add2_insn): Likewise.
8381         * reg-stack.c (reg_to_stack): Likewise.
8382         * reginfo.c (choose_hard_reg_mode): Likewise.
8383         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
8384         * stor-layout.c (mode_for_size): Likewise.
8385         (smallest_mode_for_size): Likewise.
8386         (mode_for_vector): Likewise.
8387         (finish_bitfield_representative): Likewise.
8388         * tree-ssa-math-opts.c (target_supports_divmod_p): Likewise.
8389         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
8390         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
8391         * var-tracking.c (prepare_call_arguments): Likewise.
8392
8393 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8394             Alan Hayward  <alan.hayward@arm.com>
8395             David Sherwood  <david.sherwood@arm.com>
8396
8397         * genconditions.c (write_header): Add a "#define USE_ENUM_MODES".
8398         * genmodes.c (emit_insn_modes_h): Define FOOmode to E_FOOmode if
8399         USE_ENUM_MODES is defined and to ((void) 0, E_FOOmode) otherwise.
8400         * machmode.h (mode_size): Move earlier in file.
8401         (mode_precision): Likewise.
8402         (mode_inner): Likewise.
8403         (mode_nunits): Likewise.
8404         (mode_unit_size): Likewise.
8405         (unit_unit_precision): Likewise.
8406         (mode_wider): Likewise.
8407         (mode_2xwider): Likewise.
8408         (machine_mode): New class.
8409         (mode_to_bytes): New function.
8410         (mode_to_bits): Likewise.
8411         (mode_to_precision): Likewise.
8412         (mode_to_inner): Likewise.
8413         (mode_to_unit_size): Likewise.
8414         (mode_to_unit_precision): Likewise.
8415         (mode_to_nunits): Likewise.
8416         (GET_MODE_SIZE): Use mode_to_bytes.
8417         (GET_MODE_BITSIZE): Use mode_to_bits.
8418         (GET_MODE_PRECISION): Use mode_to_precision.
8419         (GET_MODE_INNER): Use mode_to_inner.
8420         (GET_MODE_UNIT_SIZE): Use mode_to_unit_size.
8421         (GET_MODE_UNIT_PRECISION): Use mode_to_unit_precision.
8422         (GET_MODE_NUNITS): Use mode_to_nunits.
8423         * system.h (ALWAYS_INLINE): New macro.
8424         * config/powerpcspe/powerpcspe-c.c
8425         (altivec_resolve_overloaded_builtin): Use machine_mode instead of
8426         int for arg1_mode and arg2_mode.
8427
8428 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8429             Alan Hayward  <alan.hayward@arm.com>
8430             David Sherwood  <david.sherwood@arm.com>
8431
8432         * config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type):
8433         Prefix mode names with E_ in case statements.
8434         * config/aarch64/aarch64-elf.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
8435         * config/aarch64/aarch64.c (aarch64_split_simd_combine): Likewise.
8436         (aarch64_split_simd_move): Likewise.
8437         (aarch64_gen_storewb_pair): Likewise.
8438         (aarch64_gen_loadwb_pair): Likewise.
8439         (aarch64_gen_store_pair): Likewise.
8440         (aarch64_gen_load_pair): Likewise.
8441         (aarch64_get_condition_code_1): Likewise.
8442         (aarch64_constant_pool_reload_icode): Likewise.
8443         (get_rsqrte_type): Likewise.
8444         (get_rsqrts_type): Likewise.
8445         (get_recpe_type): Likewise.
8446         (get_recps_type): Likewise.
8447         (aarch64_gimplify_va_arg_expr): Likewise.
8448         (aarch64_simd_container_mode): Likewise.
8449         (aarch64_emit_load_exclusive): Likewise.
8450         (aarch64_emit_store_exclusive): Likewise.
8451         (aarch64_expand_compare_and_swap): Likewise.
8452         (aarch64_gen_atomic_cas): Likewise.
8453         (aarch64_emit_bic): Likewise.
8454         (aarch64_emit_atomic_swap): Likewise.
8455         (aarch64_emit_atomic_load_op): Likewise.
8456         (aarch64_evpc_trn): Likewise.
8457         (aarch64_evpc_uzp): Likewise.
8458         (aarch64_evpc_zip): Likewise.
8459         (aarch64_evpc_ext): Likewise.
8460         (aarch64_evpc_rev): Likewise.
8461         (aarch64_evpc_dup): Likewise.
8462         (aarch64_gen_ccmp_first): Likewise.
8463         (aarch64_gen_ccmp_next): Likewise.
8464         * config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
8465         (alpha_emit_xfloating_libcall): Likewise.
8466         (emit_insxl): Likewise.
8467         (alpha_arg_type): Likewise.
8468         * config/arc/arc.c (arc_vector_mode_supported_p): Likewise.
8469         (arc_preferred_simd_mode): Likewise.
8470         (arc_secondary_reload): Likewise.
8471         (get_arc_condition_code): Likewise.
8472         (arc_print_operand): Likewise.
8473         (arc_legitimate_constant_p): Likewise.
8474         * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
8475         * config/arc/arc.md (casesi_load): Likewise.
8476         (casesi_compact_jump): Likewise.
8477         * config/arc/predicates.md (proper_comparison_operator): Likewise.
8478         (cc_use_register): Likewise.
8479         * config/arm/aout.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
8480         * config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise.
8481         (arm_init_iwmmxt_builtins): Likewise.
8482         * config/arm/arm.c (thumb1_size_rtx_costs): Likewise.
8483         (neon_expand_vector_init): Likewise.
8484         (arm_attr_length_move_neon): Likewise.
8485         (maybe_get_arm_condition_code): Likewise.
8486         (arm_emit_vector_const): Likewise.
8487         (arm_preferred_simd_mode): Likewise.
8488         (arm_output_iwmmxt_tinsr): Likewise.
8489         (thumb1_output_casesi): Likewise.
8490         (thumb2_output_casesi): Likewise.
8491         (arm_emit_load_exclusive): Likewise.
8492         (arm_emit_store_exclusive): Likewise.
8493         (arm_expand_compare_and_swap): Likewise.
8494         (arm_evpc_neon_vuzp): Likewise.
8495         (arm_evpc_neon_vzip): Likewise.
8496         (arm_evpc_neon_vrev): Likewise.
8497         (arm_evpc_neon_vtrn): Likewise.
8498         (arm_evpc_neon_vext): Likewise.
8499         (arm_validize_comparison): Likewise.
8500         * config/arm/neon.md (neon_vc<cmp_op><mode>): Likewise.
8501         * config/avr/avr-c.c (avr_resolve_overloaded_builtin): Likewise.
8502         * config/avr/avr.c (avr_rtx_costs_1): Likewise.
8503         * config/c6x/c6x.c (c6x_vector_mode_supported_p): Likewise.
8504         (c6x_preferred_simd_mode): Likewise.
8505         * config/epiphany/epiphany.c (get_epiphany_condition_code): Likewise.
8506         (epiphany_rtx_costs): Likewise.
8507         * config/epiphany/predicates.md (proper_comparison_operator):
8508         Likewise.
8509         * config/frv/frv.c (condexec_memory_operand): Likewise.
8510         (frv_emit_move): Likewise.
8511         (output_move_single): Likewise.
8512         (output_condmove_single): Likewise.
8513         (frv_hard_regno_mode_ok): Likewise.
8514         (frv_matching_accg_mode): Likewise.
8515         * config/h8300/h8300.c (split_adds_subs): Likewise.
8516         (h8300_rtx_costs): Likewise.
8517         (h8300_print_operand): Likewise.
8518         (compute_mov_length): Likewise.
8519         (output_logical_op): Likewise.
8520         (compute_logical_op_length): Likewise.
8521         (compute_logical_op_cc): Likewise.
8522         (h8300_shift_needs_scratch_p): Likewise.
8523         (output_a_shift): Likewise.
8524         (compute_a_shift_length): Likewise.
8525         (compute_a_shift_cc): Likewise.
8526         (expand_a_rotate): Likewise.
8527         (output_a_rotate): Likewise.
8528         * config/i386/i386.c (classify_argument): Likewise.
8529         (function_arg_advance_32): Likewise.
8530         (function_arg_32): Likewise.
8531         (function_arg_64): Likewise.
8532         (function_value_64): Likewise.
8533         (ix86_gimplify_va_arg): Likewise.
8534         (ix86_legitimate_constant_p): Likewise.
8535         (put_condition_code): Likewise.
8536         (split_double_mode): Likewise.
8537         (ix86_avx256_split_vector_move_misalign): Likewise.
8538         (ix86_expand_vector_logical_operator): Likewise.
8539         (ix86_split_idivmod): Likewise.
8540         (ix86_expand_adjust_ufix_to_sfix_si): Likewise.
8541         (ix86_build_const_vector): Likewise.
8542         (ix86_build_signbit_mask): Likewise.
8543         (ix86_match_ccmode): Likewise.
8544         (ix86_cc_modes_compatible): Likewise.
8545         (ix86_expand_branch): Likewise.
8546         (ix86_expand_sse_cmp): Likewise.
8547         (ix86_expand_sse_movcc): Likewise.
8548         (ix86_expand_int_sse_cmp): Likewise.
8549         (ix86_expand_vec_perm_vpermi2): Likewise.
8550         (ix86_expand_vec_perm): Likewise.
8551         (ix86_expand_sse_unpack): Likewise.
8552         (ix86_expand_int_addcc): Likewise.
8553         (ix86_split_to_parts): Likewise.
8554         (ix86_vectorize_builtin_gather): Likewise.
8555         (ix86_vectorize_builtin_scatter): Likewise.
8556         (avx_vpermilp_parallel): Likewise.
8557         (inline_memory_move_cost): Likewise.
8558         (ix86_tieable_integer_mode_p): Likewise.
8559         (x86_maybe_negate_const_int): Likewise.
8560         (ix86_expand_vector_init_duplicate): Likewise.
8561         (ix86_expand_vector_init_one_nonzero): Likewise.
8562         (ix86_expand_vector_init_one_var): Likewise.
8563         (ix86_expand_vector_init_concat): Likewise.
8564         (ix86_expand_vector_init_interleave): Likewise.
8565         (ix86_expand_vector_init_general): Likewise.
8566         (ix86_expand_vector_set): Likewise.
8567         (ix86_expand_vector_extract): Likewise.
8568         (emit_reduc_half): Likewise.
8569         (ix86_emit_i387_round): Likewise.
8570         (ix86_mangle_type): Likewise.
8571         (ix86_expand_round_sse4): Likewise.
8572         (expand_vec_perm_blend): Likewise.
8573         (canonicalize_vector_int_perm): Likewise.
8574         (ix86_expand_vec_one_operand_perm_avx512): Likewise.
8575         (expand_vec_perm_1): Likewise.
8576         (expand_vec_perm_interleave3): Likewise.
8577         (expand_vec_perm_even_odd_pack): Likewise.
8578         (expand_vec_perm_even_odd_1): Likewise.
8579         (expand_vec_perm_broadcast_1): Likewise.
8580         (ix86_vectorize_vec_perm_const_ok): Likewise.
8581         (ix86_expand_vecop_qihi): Likewise.
8582         (ix86_expand_mul_widen_hilo): Likewise.
8583         (ix86_expand_sse2_abs): Likewise.
8584         (ix86_expand_pextr): Likewise.
8585         (ix86_expand_pinsr): Likewise.
8586         (ix86_preferred_simd_mode): Likewise.
8587         (ix86_simd_clone_compute_vecsize_and_simdlen): Likewise.
8588         * config/i386/sse.md (*andnot<mode>3): Likewise.
8589         (<mask_codefor><code><mode>3<mask_name>): Likewise.
8590         (*<code><mode>3): Likewise.
8591         * config/ia64/ia64.c (ia64_expand_vecint_compare): Likewise.
8592         (ia64_expand_atomic_op): Likewise.
8593         (ia64_arg_type): Likewise.
8594         (ia64_mode_to_int): Likewise.
8595         (ia64_scalar_mode_supported_p): Likewise.
8596         (ia64_vector_mode_supported_p): Likewise.
8597         (expand_vec_perm_broadcast): Likewise.
8598         * config/iq2000/iq2000.c (iq2000_move_1word): Likewise.
8599         (iq2000_function_arg_advance): Likewise.
8600         (iq2000_function_arg): Likewise.
8601         * config/m32c/m32c.c (m32c_preferred_reload_class): Likewise.
8602         * config/m68k/m68k.c (output_dbcc_and_branch): Likewise.
8603         (m68k_libcall_value): Likewise.
8604         (m68k_function_value): Likewise.
8605         (sched_attr_op_type): Likewise.
8606         * config/mcore/mcore.c (mcore_output_move): Likewise.
8607         * config/microblaze/microblaze.c (microblaze_function_arg_advance):
8608         Likewise.
8609         (microblaze_function_arg): Likewise.
8610         * config/mips/mips.c (mips16_build_call_stub): Likewise.
8611         (mips_print_operand): Likewise.
8612         (mips_mode_ok_for_mov_fmt_p): Likewise.
8613         (mips_vector_mode_supported_p): Likewise.
8614         (mips_preferred_simd_mode): Likewise.
8615         (mips_expand_vpc_loongson_even_odd): Likewise.
8616         (mips_expand_vec_unpack): Likewise.
8617         (mips_expand_vi_broadcast): Likewise.
8618         (mips_expand_vector_init): Likewise.
8619         (mips_expand_vec_reduc): Likewise.
8620         (mips_expand_msa_cmp): Likewise.
8621         * config/mips/mips.md (casesi_internal_mips16_<mode>): Likewise.
8622         * config/mn10300/mn10300.c (mn10300_print_operand): Likewise.
8623         (cc_flags_for_mode): Likewise.
8624         * config/msp430/msp430.c (msp430_print_operand): Likewise.
8625         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Likewise.
8626         (nds32_output_casesi_pc_relative): Likewise.
8627         * config/nds32/nds32.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
8628         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Likewise.
8629         (nvptx_gen_unpack): Likewise.
8630         (nvptx_gen_pack): Likewise.
8631         (nvptx_gen_shuffle): Likewise.
8632         (nvptx_gen_wcast): Likewise.
8633         (nvptx_preferred_simd_mode): Likewise.
8634         * config/pa/pa.c (pa_secondary_reload): Likewise.
8635         * config/pa/predicates.md (base14_operand): Likewise.
8636         * config/powerpcspe/powerpcspe-c.c
8637         (altivec_resolve_overloaded_builtin): Likewise.
8638         * config/powerpcspe/powerpcspe.c (rs6000_setup_reg_addr_masks):
8639         Likewise.
8640         (rs6000_preferred_simd_mode): Likewise.
8641         (output_vec_const_move): Likewise.
8642         (rs6000_expand_vector_extract): Likewise.
8643         (rs6000_split_vec_extract_var): Likewise.
8644         (reg_offset_addressing_ok_p): Likewise.
8645         (rs6000_legitimate_offset_address_p): Likewise.
8646         (rs6000_legitimize_address): Likewise.
8647         (rs6000_emit_set_const): Likewise.
8648         (rs6000_const_vec): Likewise.
8649         (rs6000_emit_move): Likewise.
8650         (spe_build_register_parallel): Likewise.
8651         (rs6000_darwin64_record_arg_recurse): Likewise.
8652         (swap_selector_for_mode): Likewise.
8653         (spe_init_builtins): Likewise.
8654         (paired_init_builtins): Likewise.
8655         (altivec_init_builtins): Likewise.
8656         (do_load_for_compare): Likewise.
8657         (rs6000_generate_compare): Likewise.
8658         (rs6000_expand_float128_convert): Likewise.
8659         (emit_load_locked): Likewise.
8660         (emit_store_conditional): Likewise.
8661         (rs6000_output_function_epilogue): Likewise.
8662         (rs6000_handle_altivec_attribute): Likewise.
8663         (rs6000_function_value): Likewise.
8664         (emit_fusion_gpr_load): Likewise.
8665         (emit_fusion_p9_load): Likewise.
8666         (emit_fusion_p9_store): Likewise.
8667         * config/powerpcspe/predicates.md (easy_fp_constant): Likewise.
8668         (fusion_gpr_mem_load): Likewise.
8669         (fusion_addis_mem_combo_load): Likewise.
8670         (fusion_addis_mem_combo_store): Likewise.
8671         * config/rs6000/predicates.md (easy_fp_constant): Likewise.
8672         (fusion_gpr_mem_load): Likewise.
8673         (fusion_addis_mem_combo_load): Likewise.
8674         (fusion_addis_mem_combo_store): Likewise.
8675         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
8676         Likewise.
8677         * config/rs6000/rs6000-string.c (do_load_for_compare): Likewise.
8678         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
8679         (rs6000_preferred_simd_mode): Likewise.
8680         (output_vec_const_move): Likewise.
8681         (rs6000_expand_vector_extract): Likewise.
8682         (rs6000_split_vec_extract_var): Likewise.
8683         (reg_offset_addressing_ok_p): Likewise.
8684         (rs6000_legitimate_offset_address_p): Likewise.
8685         (rs6000_legitimize_address): Likewise.
8686         (rs6000_emit_set_const): Likewise.
8687         (rs6000_const_vec): Likewise.
8688         (rs6000_emit_move): Likewise.
8689         (rs6000_darwin64_record_arg_recurse): Likewise.
8690         (swap_selector_for_mode): Likewise.
8691         (paired_init_builtins): Likewise.
8692         (altivec_init_builtins): Likewise.
8693         (rs6000_expand_float128_convert): Likewise.
8694         (emit_load_locked): Likewise.
8695         (emit_store_conditional): Likewise.
8696         (rs6000_output_function_epilogue): Likewise.
8697         (rs6000_handle_altivec_attribute): Likewise.
8698         (rs6000_function_value): Likewise.
8699         (emit_fusion_gpr_load): Likewise.
8700         (emit_fusion_p9_load): Likewise.
8701         (emit_fusion_p9_store): Likewise.
8702         * config/rx/rx.c (rx_gen_move_template): Likewise.
8703         (flags_from_mode): Likewise.
8704         * config/s390/predicates.md (s390_alc_comparison): Likewise.
8705         (s390_slb_comparison): Likewise.
8706         * config/s390/s390.c (s390_handle_vectorbool_attribute): Likewise.
8707         (s390_vector_mode_supported_p): Likewise.
8708         (s390_cc_modes_compatible): Likewise.
8709         (s390_match_ccmode_set): Likewise.
8710         (s390_canonicalize_comparison): Likewise.
8711         (s390_emit_compare_and_swap): Likewise.
8712         (s390_branch_condition_mask): Likewise.
8713         (s390_rtx_costs): Likewise.
8714         (s390_secondary_reload): Likewise.
8715         (__SECONDARY_RELOAD_CASE): Likewise.
8716         (s390_expand_cs): Likewise.
8717         (s390_preferred_simd_mode): Likewise.
8718         * config/s390/vx-builtins.md (vec_packsu_u<mode>): Likewise.
8719         * config/sh/sh.c (sh_print_operand): Likewise.
8720         (dump_table): Likewise.
8721         (sh_secondary_reload): Likewise.
8722         * config/sh/sh.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
8723         * config/sh/sh.md (casesi_worker_1): Likewise.
8724         (casesi_worker_2): Likewise.
8725         * config/sparc/predicates.md (icc_comparison_operator): Likewise.
8726         (fcc_comparison_operator): Likewise.
8727         * config/sparc/sparc.c (sparc_expand_move): Likewise.
8728         (emit_soft_tfmode_cvt): Likewise.
8729         (sparc_preferred_simd_mode): Likewise.
8730         (output_cbranch): Likewise.
8731         (sparc_print_operand): Likewise.
8732         (sparc_expand_vec_perm_bmask): Likewise.
8733         (vector_init_bshuffle): Likewise.
8734         * config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
8735         (spu_vector_mode_supported_p): Likewise.
8736         (spu_expand_insv): Likewise.
8737         (spu_emit_branch_or_set): Likewise.
8738         (spu_handle_vector_attribute): Likewise.
8739         (spu_builtin_splats): Likewise.
8740         (spu_builtin_extract): Likewise.
8741         (spu_builtin_promote): Likewise.
8742         (spu_expand_sign_extend): Likewise.
8743         * config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
8744         (tilegx_simd_int): Likewise.
8745         * config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p): Likewise.
8746         (tilepro_simd_int): Likewise.
8747         * config/v850/v850.c (const_double_split): Likewise.
8748         (v850_print_operand): Likewise.
8749         (ep_memory_offset): Likewise.
8750         * config/vax/vax.c (vax_rtx_costs): Likewise.
8751         (vax_output_int_move): Likewise.
8752         (vax_output_int_add): Likewise.
8753         (vax_output_int_subtract): Likewise.
8754         * config/visium/predicates.md (visium_branch_operator): Likewise.
8755         * config/visium/visium.c (rtx_ok_for_offset_p): Likewise.
8756         (visium_print_operand_address): Likewise.
8757         * config/visium/visium.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
8758         * config/xtensa/xtensa.c (xtensa_mem_offset): Likewise.
8759         (xtensa_expand_conditional_branch): Likewise.
8760         (xtensa_copy_incoming_a7): Likewise.
8761         (xtensa_output_literal): Likewise.
8762         * dfp.c (decimal_real_maxval): Likewise.
8763         * targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.
8764
8765 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8766             Alan Hayward  <alan.hayward@arm.com>
8767             David Sherwood  <david.sherwood@arm.com>
8768
8769         * genmodes.c (mode_size_inline): Add an E_ prefix to mode names.
8770         (mode_nunits_inline): Likewise.
8771         (mode_inner_inline): Likewise.
8772         (mode_unit_size_inline): Likewise.
8773         (mode_unit_precision_inline): Likewise.
8774         (emit_insn_modes_h): Likewise.  Also emit a #define of the
8775         unprefixed name.
8776         (emit_mode_wider): Add an E_ prefix to mode names.
8777         (emit_mode_complex): Likewise.
8778         (emit_mode_inner): Likewise.
8779         (emit_mode_adjustments): Likewise.
8780         (emit_mode_int_n): Likewise.
8781         * config/aarch64/aarch64-builtins.c (v8qi_UP, v4hi_UP, v4hf_UP)
8782         (v2si_UP, v2sf_UP, v1df_UP, di_UP, df_UP, v16qi_UP, v8hi_UP, v8hf_UP)
8783         (v4si_UP, v4sf_UP, v2di_UP, v2df_UP, ti_UP, oi_UP, ci_UP, xi_UP)
8784         (si_UP, sf_UP, hi_UP, hf_UP, qi_UP): Likewise.
8785         (CRC32_BUILTIN, ENTRY): Likewise.
8786         * config/aarch64/aarch64.c (aarch64_push_regs): Likewise.
8787         (aarch64_pop_regs): Likewise.
8788         (aarch64_process_components): Likewise.
8789         * config/alpha/alpha.c (alpha_emit_conditional_move): Likewise.
8790         * config/arm/arm-builtins.c (v8qi_UP, v4hi_UP, v4hf_UP, v2si_UP)
8791         (v2sf_UP, di_UP, v16qi_UP, v8hi_UP, v8hf_UP, v4si_UP, v4sf_UP)
8792         (v2di_UP, ti_UP, ei_UP, oi_UP, hf_UP, si_UP, void_UP): Likewise.
8793         * config/arm/arm.c (arm_init_libfuncs): Likewise.
8794         * config/i386/i386-builtin-types.awk (ix86_builtin_type_vect_mode):
8795         Likewise.
8796         * config/i386/i386-builtin.def (pcmpestr): Likewise.
8797         (pcmpistr): Likewise.
8798         * config/microblaze/microblaze.c (double_memory_operand): Likewise.
8799         * config/mmix/mmix.c (mmix_output_condition): Likewise.
8800         * config/powerpcspe/powerpcspe.c (rs6000_init_hard_regno_mode_ok):
8801         Likewise.
8802         * config/rl78/rl78.c (mduc_regs): Likewise.
8803         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
8804         (htm_expand_builtin): Likewise.
8805         * config/sh/sh.h (REGISTER_NATURAL_MODE): Likewise.
8806         * config/sparc/sparc.c (emit_save_or_restore_regs): Likewise.
8807         * config/xtensa/xtensa.c (print_operand): Likewise.
8808         * expmed.h (NUM_MODE_PARTIAL_INT): Likewise.
8809         (NUM_MODE_VECTOR_INT): Likewise.
8810         * genoutput.c (null_operand): Likewise.
8811         (output_operand_data): Likewise.
8812         * genrecog.c (print_parameter_value): Likewise.
8813         * lra.c (debug_operand_data): Likewise.
8814
8815 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8816
8817         * dwarf2out.c (scompare_loc_descriptor_wide)
8818         (scompare_loc_descriptor_narrow): New functions, split out from...
8819         (scompare_loc_descriptor): ...here.
8820         * expmed.c (emit_store_flag_int): New function, split out from...
8821         (emit_store_flag): ...here.
8822
8823 2017-08-30  Richard Biener  <rguenther@suse.de>
8824
8825         * dwarf2out.c (dwarf2out_finish): Remove setting AT_pubnames.
8826         (dwarf2out_early_finish): Move setting of AT_pubnames from
8827         early debug output to early finish.
8828
8829 2017-08-30  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
8830
8831         * gcc/config/msp430/msp430.h: Pass -mcode/data-region to the linker
8832         and -mdata-region to the assembler.
8833
8834 2017-08-30  Richard Biener  <rguenther@suse.de>
8835
8836         * dwarf2out.c (add_dwarf_attr): Check we don't add duplicate
8837         attributes.
8838         (gen_subprogram_die): Add DW_AT_object_pointer only early.
8839         (dwarf2out_early_global_decl): Only generate a DIE for the
8840         abstract origin if it doesn't already exist or is a declaration DIE.
8841         (resolve_addr): Do not add the linkage name twice when
8842         generating a stub DIE for the DW_TAG_GNU_call_site target.
8843
8844 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8845
8846         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
8847         Use machine_mode rather than int for arg1_mode.
8848
8849 2017-08-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
8850
8851         PR target/82015
8852         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Insure
8853         that the second argument of the built-in functions to unpack
8854         128-bit scalar types to 64-bit values is 0 or 1.  Change to use a
8855         switch statement instead a lot of if statements.
8856         * config/rs6000/rs6000.md (unpack<mode>, FMOVE128_VSX iterator):
8857         Allow 64-bit values to be in Altivec registers as well as
8858         traditional floating point registers.
8859         (pack<mode>, FMOVE128_VSX iterator): Likewise.
8860
8861 2017-08-29  Alexander Monakov  <amonakov@ispras.ru>
8862
8863         * ira-costs.c (record_address_regs): Handle both operands of PLUS for
8864         MAX_REGS_PER_ADDRESS == 1.
8865
8866 2017-08-29  Uros Bizjak  <ubizjak@gmail.com>
8867
8868         * config/i386/i386.opt (flag_fentry): Do not init to -1.
8869         * config/i386/i386.c (ix86_option_override_internal): Simplify
8870         setting of opts->x_flag_entry.
8871
8872 2017-08-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8873             Jakub Jelinek  <jakub@redhat.com>
8874             Richard Biener  <rguenther@suse.de>
8875
8876         PR tree-optimization/81503
8877         * gimple-ssa-strength-reduction.c (replace_mult_candidate): Ensure
8878         folded constant fits in the target type; reorder tests for clarity.
8879
8880 2017-08-29  Martin Liska  <mliska@suse.cz>
8881
8882         * passes.def: Include pass_lower_switch.
8883         * stmt.c (dump_case_nodes): Remove and move to
8884         tree-switch-conversion.
8885         (case_values_threshold): Likewise.
8886         (expand_switch_as_decision_tree_p): Likewise.
8887         (emit_case_decision_tree): Likewise.
8888         (expand_case): Likewise.
8889         (balance_case_nodes): Likewise.
8890         (node_has_low_bound): Likewise.
8891         (node_has_high_bound): Likewise.
8892         (node_is_bounded): Likewise.
8893         (emit_case_nodes): Likewise.
8894         (struct simple_case_node): New struct.
8895         (add_case_node): Remove.
8896         (emit_case_dispatch_table): Use vector instead of case_list.
8897         (reset_out_edges_aux): Remove.
8898         (compute_cases_per_edge): Likewise.
8899         (expand_case): Build list of simple_case_node.
8900         (expand_sjlj_dispatch_table): Use it.
8901         * tree-switch-conversion.c (struct case_node): Moved from
8902         stmt.c and adjusted.
8903         (emit_case_nodes): Likewise.
8904         (node_has_low_bound): Likewise.
8905         (node_has_high_bound): Likewise.
8906         (node_is_bounded): Likewise.
8907         (case_values_threshold): Likewise.
8908         (reset_out_edges_aux): Likewise.
8909         (compute_cases_per_edge): Likewise.
8910         (add_case_node): Likewise.
8911         (dump_case_nodes): Likewise.
8912         (balance_case_nodes): Likewise.
8913         (expand_switch_as_decision_tree_p): Likewise.
8914         (emit_jump): Likewise.
8915         (emit_case_decision_tree): Likewise.
8916         (try_switch_expansion): Likewise.
8917         (do_jump_if_equal): Likewise.
8918         (emit_cmp_and_jump_insns): Likewise.
8919         (fix_phi_operands_for_edge): New function.
8920         (record_phi_operand_mapping): Likewise.
8921         (class pass_lower_switch): New pass.
8922         (pass_lower_switch::execute): New function.
8923         (make_pass_lower_switch): Likewise.
8924         (conditional_probability):
8925         * timevar.def: Add TV_TREE_SWITCH_LOWERING.
8926         * tree-pass.h: Add make_pass_lower_switch.
8927
8928 2017-08-29  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
8929
8930         PR target/80993
8931         * gcc/config/msp430/msp430.c (msp430_attr): Mark interrupt
8932         handlers as used.
8933
8934 2017-08-29  Richard Biener  <rguenther@suse.de>
8935
8936         * dwarf2out.c (add_dwarf_attr): When checking is enabled verify
8937         we do not add a DW_AT_inline attribute twice.
8938         (gen_subprogram_die): Remove code setting DW_AT_inline on
8939         DECL_ABSTRACT_P nodes.
8940
8941 2017-08-29  Richard Sandiford  <richard.sandiford@linaro.org>
8942
8943         * gimplify.c (gimplify_call_expr): Copy the nothrow flag to
8944         calls to internal functions.
8945         (gimplify_modify_expr): Likewise.
8946         * tree-call-cdce.c (use_internal_fn): Likewise.
8947         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
8948         (convert_to_divmod): Set the nothrow flag.
8949         * tree-if-conv.c (predicate_mem_writes):  Likewise.
8950         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
8951         (vectorizable_call): Likewise.
8952         (vectorizable_store): Likewise.
8953         (vectorizable_load): Likewise.
8954         * tree-vect-patterns.c (vect_recog_pow_pattern): Likewise.
8955         (vect_recog_mask_conversion_pattern): Likewise.
8956
8957 2017-08-29  Martin Liska  <mliska@suse.cz>
8958
8959         PR other/39851
8960         * gcc.c (driver_handle_option): Add new argument.
8961         * opts-common.c (handle_option): Pass
8962         target_option_override_hook.
8963         * opts-global.c (lang_handle_option): Add new option.
8964         (set_default_handlers):  Add new argument.
8965         (decode_options): Likewise.
8966         * opts.c (target_handle_option): Likewise.
8967         (common_handle_option): Call target_option_override_hook.
8968         * opts.h (struct cl_option_handler_func): Add hook for
8969         target option override.
8970         (struct cl_option_handlers): Likewise.
8971         (set_default_handlers): Add new argument.
8972         (decode_options): Likewise.
8973         (common_handle_option): Likewise.
8974         (target_handle_option): Likewise.
8975         * toplev.c (toplev::main): Pass targetm.target_option.override
8976         hook.
8977
8978 2017-08-29  Richard Biener  <rguenther@suse.de>
8979         Dominik Infuehr <dominik.infuehr@theobroma-systems.com>
8980
8981         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Properly confine
8982         life to the active subtree.
8983
8984 2017-08-28  Jeff Law  <law@redhat.com>
8985
8986         * tree-ssa-dom.c (edge_info::record_simple_equiv): Call
8987         derive_equivalences.
8988         (derive_equivalences_from_bit_ior, record_temporary_equivalences):
8989         Code moved into....
8990         (edge_info::derive_equivalences): New private member function
8991
8992         * tree-ssa-dom.c (class edge_info): Changed from a struct
8993         to a class.  Add ctor/dtor, methods and data members.
8994         (edge_info::edge_info): Renamed from allocate_edge_info.
8995         Initialize additional members.
8996         (edge_info::~edge_info): New.
8997         (free_dom_edge_info): Delete the edge info.
8998         (record_edge_info): Use new class & associated member functions.
8999         Tighten forms for testing for edge equivalences.
9000         (record_temporary_equivalences): Iterate over the simple
9001         equivalences rather than assuming there's only one per edge.
9002         (cprop_into_successor_phis): Iterate over the simple
9003         equivalences rather than assuming there's only one per edge.
9004         (optimize_stmt): Use operand_equal_p rather than pointer
9005         equality for mini-DSE code.
9006
9007 2017-08-28  Nathan Sidwell  <nathan@acm.org>
9008
9009         * gcc.c (execute): Fold SIGPIPE handling into switch
9010         statement.  Adjust internal error message.
9011
9012 2017-08-28  Richard Biener  <rguenther@suse.de>
9013
9014         PR debug/81993
9015         * dwarf2out.c (gen_remaining_tmpl_value_param_die_attributes):
9016         Do nothing for removed DIEs.
9017
9018 2017-08-28  Richard Biener  <rguenther@suse.de>
9019
9020         PR tree-optimization/81977
9021         * tree-ssa-sccvn.c (vn_reference_lookup_3): Fix look through
9022         memcpy.
9023
9024 2017-08-28  Alexander Monakov  <amonakov@ispras.ru>
9025
9026         PR target/80640
9027         * doc/md.texi (mem_thread_fence): Remove mention of mode.  Rewrite.
9028         * optabs.c (expand_mem_thread_fence): Emit a compiler barrier when
9029         using targetm.gen_mem_thread_fence.
9030
9031 2017-08-27  Uros Bizjak  <ubizjak@gmail.com>
9032
9033         PR target/81995
9034         * config/i386/i386.md (*<btsc><mode>): Change operand 2
9035         predicate to register_operand.  Reorder operands.
9036         (*btr<mode>): Ditto.
9037         (*<btsc><mode>_mask): Change operand 3 predicate to register_operand.
9038         (*btr<mode>_mask): Ditto.
9039
9040 2017-08-25  Steven Munroe  <munroesj@gcc.gnu.org>
9041
9042         * config.gcc (powerpc*-*-*): Add xmmintrin.h and mm_malloc.h.
9043         * config/rs6000/xmmintrin.h: New file.
9044         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include xmmintrin.h.
9045
9046 2017-08-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9047
9048         PR target/81504
9049         * config/rs6000/rs6000-p8swap.c (find_alignment_op): Add reference
9050         parameter and_insn and return it.
9051         (recombine_lvx_pattern): Insert a copy to ensure availability of
9052         the base register of the copied masking operation at the point of
9053         the instruction replacement.
9054         (recombine_stvx_pattern): Likewise.
9055
9056 2017-08-25  Michael Meissner  <meissner@linux.vnet.ibm.com>
9057
9058         * config/rs6000/rs6000.opt (-mpower9-dform-scalar): Delete
9059         undocumented switches.
9060         (-mpower9-dform-vector): Likewise.
9061         (-mpower9-dform): Likewise.
9062         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
9063         comments to delete references to -mpower9-dform* switches.
9064         * config/rs6000/predicates.md (vsx_quad_dform_memory_operand):
9065         Delete reference to -mpower9-dform* switches, test for
9066         -mpower9-vector instead.
9067         * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Likewise.
9068         (OTHER_P9_VECTOR_MASKS): Likewise.
9069         (POWERPC_MASKS): Likewise.
9070         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Change
9071         tests against -mpower9-dform* to -mpower9-vector.  Delete code
9072         that checked for -mpower9-dform* consistancy with other options.
9073         Add test for -mpower9-misc to enable other power9 switches.
9074         (rs6000_init_hard_regno_mode_ok): Likewise.
9075         (rs6000_option_override_internal): Likewise.
9076         (rs6000_emit_prologue): Likewise.
9077         (rs6000_emit_epilogue): Likewise.
9078         (rs6000_opt_masks): Delete -mpower9-dform-{scalar,vector}.
9079         (rs6000_disable_incompatiable_switches): Delete -mpower9-dform.
9080         (emit_fusion_p9_load): Change tests for -mpower9-dform-scalar
9081         -mpower9-vector.
9082         (emit_fusion_p9_store): Likewise.
9083         * config/rs6000/rs6000.h (TARGET_P9_DFORM_SCALAR): Delete
9084         resetting these macros if the assembler does not support ISA 3.0
9085         instructions.
9086         (TARGET_P9_DFORM_VECTOR): Likewise.
9087         * config/rs6000/rs6000.md (peepholes to optimize altivec memory):
9088         Change to use -mpower9-vector instead of -mpower9-dform-scalar.
9089
9090 2017-08-25  Alan Modra  <amodra@gmail.com>
9091
9092         PR rtl-optimization/81747
9093         * cse.c (cse_extended_basic_block): Don't attempt to record
9094         equivalences for degenerate conditional branches that branch
9095         to their fall-through.
9096
9097 2017-08-24  Martin Sebor  <msebor@redhat.com>
9098
9099         PR middle-end/81908
9100         * gimple-fold.c (size_must_be_zero_p): New function.
9101         (gimple_fold_builtin_memory_op): Call it.
9102
9103 2017-08-24  Steven Munroe  <munroesj@gcc.gnu.org>
9104
9105         * config/rs6000/mm_malloc.h: New file.
9106
9107 2017-08-24  Bin Cheng  <bin.cheng@arm.com>
9108
9109         PR tree-optimization/81913
9110         * tree-ssa-loop-niter.c (number_of_iterations_cond): Skip niter
9111         analysis when either IVs in condition can wrap.
9112
9113 2017-08-24  Uros Bizjak  <ubizjak@gmail.com>
9114
9115         * dwarf2out.c (MAX_ARTIFICIAL_LABEL_BYTES): Increase to 40.
9116         * dwarf2cfi.c (MAX_ARTIFICIAL_LABEL_BYTES): Remove.
9117
9118 2017-08-24  Richard Biener  <rguenther@suse.de>
9119
9120         PR target/81921
9121         * targhooks.c (default_target_can_inline_p): Properly
9122         use target_option_default_node when no DECL_FUNCTION_SPECIFIC_TARGET
9123         is present and always compare.
9124         * config/i386/i386.c (ix86_valid_target_attribute_tree): Do not
9125         infer -mfpmath=sse from TARGET_SSE_P.
9126         (ix86_can_inline_p): Properly use target_option_default_node when
9127         no DECL_FUNCTION_SPECIFIC_TARGET is present and always compare.
9128
9129 2017-08-24  Richard Biener  <rguenther@suse.de>
9130
9131         PR debug/81936
9132         * dwarf2out.c (output_die): Handle flag_generate_offload like
9133         flag_generate_lto.
9134         (output_comp_unit): Likewise.
9135         (gen_array_type_die): Likewise.
9136         (dwarf2out_early_finish): Likewise.
9137         (note_variable_value_in_expr): Likewise.
9138         (dwarf2out_finish): Likewise.  Adjust assert.
9139         * cgraphunit.c (symbol_table::compile): Move setting of
9140         flag_generate_offload earlier ...
9141         (symbol_table::finalize_compilation_unit): ... here, before
9142         early debug finalization.
9143
9144 2017-08-24  Richard Biener  <rguenther@suse.de>
9145
9146         * config/i386/i386.c: Include symbol-summary.h, ipa-prop.h
9147         and ipa-fnsummary.h.
9148         (ix86_can_inline_p): When ix86_fpmath flags do not match
9149         check whether the callee uses FP math at all.
9150
9151 2017-08-24  Aldy Hernandez  <aldyh@redhat.com>
9152
9153         PR middle-end/81931
9154         * tree-ssanames.c (get_nonzero_bits): Use element_precision
9155         instead of TYPE_PRECISION.
9156
9157 2017-08-24  Richard Sandiford  <richard.sandiford@linaro.org>
9158             Alan Hayward  <alan.hayward@arm.com>
9159             David Sherwood  <david.sherwood@arm.com>
9160
9161         * combine.c (make_extraction): Use subreg_offset_from_lsb.
9162
9163 2017-08-23  Daniel Santos  <daniel.santos@pobox.com>
9164
9165         * config/i386/i386.h (ix86_frame::stack_realign_allocate_offset):
9166         Remove field.
9167         (ix86_frame::stack_realign_allocate): New field.
9168         (struct machine_frame_state): Modify comments.
9169         (machine_frame_state::sp_realigned_fp_end): New field.
9170         * config/i386/i386.c (ix86_compute_frame_layout): Rework stack frame
9171         layout calculation.
9172         (sp_valid_at): Add assertion to assure no attempt to access invalid
9173         offset of a realigned stack.
9174         (fp_valid_at): Likewise.
9175         (choose_baseaddr): Modify comments.
9176         (ix86_emit_outlined_ms2sysv_save): Adjust to changes in
9177         ix86_expand_prologue.
9178         (ix86_expand_prologue): Modify stack realignment and allocation.
9179         (ix86_expand_epilogue): Modify comments.
9180         * doc/sourcebuild.texi: Add documentation for target selectors avx2,
9181         avx2_runtime, avx512f, and avx512f_runtime.
9182
9183 2017-08-23  Uros Bizjak  <ubizjak@gmail.com>
9184
9185         * config/i386/i386.opt: Remove unneeded Init(0) initializations.
9186         (mstackrealign): Do not init to -1.
9187         * config/i386/i386.c (ix86_option_override_internal):
9188         Check opts_set, not opts when setting default value of
9189         opts->x_ix86_force_align_arg_pointer.
9190
9191 2017-08-23  Richard Biener  <rguenther@suse.de>
9192
9193         * function.c (fndecl_name): Use verbosity 1 (no arguments) for
9194         lang_hooks.decl_printable_name.
9195         * print-rtl-function.c (print_rtx_function): Likewise.
9196         * tree-pretty-print.c (dump_function_header): Likewise.
9197
9198 2017-08-23  Richard Biener  <rguenther@suse.de>
9199
9200         PR lto/81940
9201         * dwarf2out.c (dwarf2out_abstract_function): Handle LTO with
9202         -g0 at compile-time.
9203
9204 2017-08-23  Tamar Christina  <tamar.christina@arm.com>
9205
9206         PR middle-end/19706
9207         * doc/sourcebuild.texi (Other hardware attributes):
9208         Document xorsign.
9209
9210 2017-08-23  Tamar Christina  <tamar.christina@arm.com>
9211
9212         PR middle-end/19706
9213         * tree-ssa-math-opts.c (convert_expand_mult_copysign):
9214         Fix single-use check.
9215
9216 2017-08-23  Thomas Preud'homme  <thomas.preudhomme@arm.com>
9217
9218         * gcc.c (execute): Only test for SIGKILL and SIGQUIT if available.
9219
9220 2017-08-22  Daniel Santos  <daniel.santos@pobox.com>
9221
9222         * doc/install.texi: Modify to add more details on running selected
9223         tests.
9224
9225 2017-08-22  Daniel Santos  <daniel.santos@pobox.com>
9226
9227         * config/i386/i386.c (ix86_option_override_internal): Error when -mx32
9228         is combined with -mabi=ms.
9229         (ix86_function_type_abi): Limit errors for mixing -mx32 with attribute
9230         ms_abi.
9231
9232 2017-08-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9233
9234         PR tree-optimization/81488
9235         * gimple-ssa-strength-reduction (struct slsr_cand_d): Add visited
9236         and cached_basis fields.
9237         (MAX_SPREAD): New constant.
9238         (alloc_cand_and_find_basis): Initialize new fields.
9239         (clear_visited): New function.
9240         (create_phi_basis_1): Rename from create_phi_basis, set visited
9241         and cached_basis fields.
9242         (create_phi_basis): New wrapper function.
9243         (phi_add_costs_1): Rename from phi_add_costs, add spread
9244         parameter, set visited field, short-circuit when limits reached.
9245         (phi_add_costs): New wrapper function.
9246         (record_phi_increments_1): Rename from record_phi_increments, set
9247         visited field.
9248         (record_phi_increments): New wrapper function.
9249         (phi_incr_cost_1): Rename from phi_incr_cost, set visited field.
9250         (phi_incr_cost): New wrapper function.
9251         (all_phi_incrs_profitable_1): Rename from
9252         all_phi_incrs_profitable, set visited field.
9253         (all_phi_incrs_profitable): New wrapper function.
9254
9255 2017-08-22  Richard Sandiford  <richard.sandiford@linaro.org>
9256             Alan Hayward  <alan.hayward@arm.com>
9257             David Sherwood  <david.sherwood@arm.com>
9258
9259         * rtl.h (paradoxical_subreg_p): Define inline, and add a version
9260         that takes the outer and inner modes.
9261         * doc/rtl.texi: Use paradoxical_subreg_p instead of a GET_MODE_SIZE
9262         comparison as the canonical test for a paradoxical subreg.
9263         * combine.c (simplify_set): Use paradoxical_subreg_p.
9264         (make_extraction): Likewise.
9265         (force_to_mode): Likewise.
9266         (rtx_equal_for_field_assignment_p): Likewise.
9267         (gen_lowpart_for_combine): Likewise.
9268         (simplify_comparison): Likewise.
9269         * cse.c (equiv_constant): Likewise.
9270         * expmed.c (store_bit_field_1): Likewise.
9271         * final.c (alter_subreg): Likewise.
9272         * fwprop.c (propagate_rtx): Likewise.
9273         (forward_propagate_subreg): Likewise.
9274         * ira-conflicts.c (ira_build_conflicts): Likewise.
9275         * lower-subreg.c (simplify_gen_subreg_concatn): Likewise.
9276         * lra-constraints.c (curr_insn_transform): Likewise.
9277         (split_reg): Likewise.
9278         * lra-eliminations.c (move_plus_up): Likewise.
9279         (lra_eliminate_regs_1): Likewise.
9280         * recog.c (general_operand): Likewise.
9281         * ree.c (combine_reaching_defs): Likewise.
9282         * reload.c (push_reload): Likewise.
9283         (find_reloads): Likewise.
9284         * reload1.c (elimination_effects): Likewise.
9285         (compute_reload_subreg_offset): Likewise.
9286         (choose_reload_regs): Likewise.
9287         * rtlanal.c (subreg_lsb_1): Likewise.
9288         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
9289         (simplify_subreg): Likewise.
9290         * var-tracking.c (track_loc_p): Likewise.
9291         * emit-rtl.c (byte_lowpart_offset): Likewise.
9292         (paradoxical_subreg_p): Delete out-of-line definition.
9293
9294 2017-08-22  Jeff Law  <law@redhat.com>
9295
9296         PR tree-optimization/81741
9297         PR tree-optimization/71947
9298         * tree-ssa-dom.c: Include tree-inline.h.
9299         (record_temporary_equivalences): Only record SSA_NAME = SSA_NAME
9300         equivalences if one is more expensive to compute than the other.
9301         * tree-ssa-scopedtables.h (class const_or_copies): Make
9302         record_const_or_copy_raw method private.
9303         (class avail_exprs_stack): New method simplify_binary_operation.
9304         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr): Call
9305         avail_exprs_stack::simplify_binary_operation as needed.
9306         (avail_exprs_stack::simplify_binary_operation): New function.
9307
9308 2017-08-22  Sebastian Huber  <sebastian.huber@embedded-brains.de>
9309
9310         * config.gcc (powerpc-*-rtems*): Add rs6000/linux64.opt.
9311         * config/rs6000/rtems.h (ASM_PREFERRED_EH_DATA_FORMAT): New define.
9312         (DOT_SYMBOLS): Likewise.
9313         (MINIMAL_TOC_SECTION_ASM_OP): Likewise.
9314         (RELOCATABLE_NEEDS_FIXUP): Likewise.
9315         (RS6000_ABI_NAME): Likewise.
9316         (TARGET_CMODEL): Likewise.
9317         (TOC_SECTION_ASM_OP): Likewise.
9318         (SET_CMODEL): New macro.
9319         (SUBSUBTARGET_OVERRIDE_OPTIONS): Evaluate cmodel options.
9320
9321 2017-08-22  Richard Biener  <rguenther@suse.de>
9322
9323         * tree-inline.c (remap_type_1): Change asserts on TYPE_SIZE[_UNIT]
9324         to allow for free-lang-data replacements similar to verify_type_variant.
9325
9326 2017-08-22  Richard Sandiford  <richard.sandiford@linaro.org>
9327             Alan Hayward  <alan.hayward@arm.com>
9328             David Sherwood  <david.sherwood@arm.com>
9329
9330         * config/aarch64/aarch64.md (casesi): Use DImode rather than
9331         VOIDmode for the LABEL_REF.
9332
9333 2017-08-22  Richard Biener  <rguenther@suse.de>
9334
9335         * tree-cfg.c (gimple_split_edge): Avoid reallocating target PHI nodes.
9336
9337 2017-08-22  Richard Biener  <rguenther@suse.de>
9338
9339         * common.opt (feliminate-dwarf2-dups): Ignore.
9340         * doc/invoke.texi (feliminate-dwarf2-dups): Remove documentation.
9341         * dwarf2out.c (push_new_compile_unit, pop_compile_unit,
9342         same_die_p_wrap, compute_section_prefix,
9343         is_symbol_die, assign_symbol_names, break_out_includes): Remove.
9344         (comdat_symbol_id, comdat_symbol_number): Likewise.
9345         (cu_hash_table_entry, cu_hash_table_entry_hasher, cu_hash_type):
9346         Likewise.
9347         (check_duplicate_cu, record_comdat_symbol_number): Likewise.
9348         (output_die): Mark unreachable path unreachable.
9349         (dwarf2out_start_source_file): Do not create DW_TAG_GNU_BINCL.
9350         (dwarf2out_end_source_file): Do not create DW_TAG_GNU_EINCL.
9351         (dwarf2out_init): Remove code handling flag_eliminate_dwarf2_dups.
9352         (dwarf2out_early_finish): Likewise.
9353
9354 2017-08-22  Aldy Hernandez  <aldyh@redhat.com>
9355
9356         * wide-int.h (hwi_with_prec::hwi_with_prec): Sign extend.
9357
9358 2017-08-22  Georg-Johann Lay  <avr@gjlay.de>
9359
9360         PR target/81910
9361         * config/avr/avr.c (avr_handle_addr_attribute): Early return if
9362         not VAR_P. Filter attribute warnings with OPT_Wattributes.
9363         (avr_attribute_table) <io, io_low, address>: Initialize
9364         .decl_required with true.
9365
9366 2017-08-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
9367
9368         * config/rs6000/rs6000-cpus.def (-mvsx-scalar-float): Delete
9369         undocumented debugging options.
9370         (-mvsx-scalar-double): Likewise.
9371         (-mallow-df-permute): Likewise.
9372         (-mvectorize-builtins): Likewise.
9373         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
9374         (rs6000_builtin_vectorized_function): Likewise.
9375         (rs6000_builtin_md_vectorized_function): Likewise.
9376         (rs6000_opt_vars): Likewise.
9377
9378 2017-08-21  Uros Bizjak  <ubizjak@gmail.com>
9379
9380         PR target/46091
9381         * config/i386/i386.md (*btsq_imm): Rename from *btsq.
9382         (*btrq_imm): Rename from *btrq.
9383         (*btcq_imm): Rename from *btcq.
9384         (btsc): New code attribute.
9385         (*<btsc><mode>): New insn pattern.
9386         (*btr<mode>): Ditto.
9387         (*<btsc><mode>_mask): New insn_and_split pattern.
9388         (*btr<mode>_mask): Ditto.
9389
9390 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
9391             Alan Hayward  <alan.hayward@arm.com>
9392             David Sherwood  <david.sherwood@arm.com>
9393
9394         * function.c (pad_below): Simplify padding calculation.
9395
9396 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
9397             Alan Hayward  <alan.hayward@arm.com>
9398             David Sherwood  <david.sherwood@arm.com>
9399
9400         * target.def (function_prologue): Remove frame size argument.
9401         (function_epilogue): Likewise.
9402         * doc/tm.texi: Regenerate.
9403         * final.c (final_start_function): Update call to function_prologue.
9404         (final_end_function): Update call to function_epilogue.
9405         (default_function_pro_epilogue): Remove frame size argument.
9406         * output.h (default_function_pro_epilogue): Likewise.
9407         * config/arm/arm.c (arm_output_function_epilogue): Likewise.
9408         (arm_output_function_prologue): Likewise.
9409         * config/frv/frv.c (frv_function_prologue): Likewise.
9410         (frv_function_epilogue): Likewise.
9411         * config/i386/i386.c (ix86_output_function_epilogue): Likewise.
9412         * config/ia64/ia64.c (ia64_output_function_prologue): Likewise.
9413         (ia64_output_function_epilogue): Likewise.
9414         * config/m32r/m32r.c (m32r_output_function_prologue): Likewise.
9415         (m32r_output_function_epilogue): Likewise.
9416         * config/microblaze/microblaze.c (microblaze_function_prologue)
9417         (microblaze_function_epilogue): Likewise.
9418         * config/mips/mips.c (mips_output_function_prologue): Likewise.
9419         (mips_output_function_epilogue): Likewise.
9420         * config/mmix/mmix.c (mmix_target_asm_function_prologue): Likewise.
9421         (mmix_target_asm_function_epilogue): Likewise.
9422         * config/msp430/msp430.c (msp430_start_function): Likewise.
9423         * config/nds32/nds32.c (nds32_asm_function_prologue): Likewise.
9424         (nds32_asm_function_epilogue): Likewise.
9425         * config/nios2/nios2.c (nios2_asm_function_prologue): Likewise.
9426         * config/pa/pa.c (pa_output_function_prologue): Likewise.
9427         (pa_output_function_epilogue): Likewise.
9428         * config/powerpcspe/powerpcspe.c (rs6000_output_function_prologue)
9429         (rs6000_output_function_epilogue): Likewise.
9430         * config/rl78/rl78.c (rl78_start_function): Likewise.
9431         * config/rs6000/rs6000.c (rs6000_output_function_prologue): Likewise.
9432         (rs6000_output_function_epilogue): Likewise.
9433         * config/rx/rx.c (rx_output_function_prologue): Likewise.
9434         * config/sh/sh.c (sh_output_function_epilogue): Likewise.
9435         * config/sparc/sparc.c (sparc_asm_function_prologue): Likewise.
9436         (sparc_asm_function_epilogue): Likewise.
9437
9438 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
9439
9440         * tree.h (type_has_mode_precision_p): New function.
9441         * convert.c (convert_to_integer_1): Use it.
9442         * expr.c (expand_expr_real_2): Likewise.
9443         (expand_expr_real_1): Likewise.
9444         * fold-const.c (fold_single_bit_test_into_sign_test): Likewise.
9445         * match.pd: Likewise.
9446         * tree-ssa-forwprop.c (simplify_rotate): Likewise.
9447         * tree-ssa-math-opts.c (convert_mult_to_fma): Likewise.
9448         * tree-tailcall.c (process_assignment): Likewise.
9449         * tree-vect-loop.c (vectorizable_reduction): Likewise.
9450         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern)
9451         (vect_recog_mult_pattern, vect_recog_divmod_pattern): Likewise.
9452         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
9453         (vectorizable_assignment): Likewise.
9454         (vectorizable_shift): Likewise.
9455         (vectorizable_operation): Likewise.
9456         * tree-vrp.c (register_edge_assert_for_2): Likewise.
9457
9458 2017-08-21  Wilco Dijkstra  <wdijkstr@arm.com>
9459
9460         * match.pd: Add pow (C, x) simplification.
9461
9462 2017-08-21  Richard Biener  <rguenther@suse.de>
9463
9464         PR tree-optimization/81900
9465         * tree-ssa-pre.c (compute_antic_aux): Properly compute changed
9466         for blocks with abnormal predecessors.
9467         (compute_antic): Do not set visited flag prematurely.
9468
9469 2017-08-21  Georg-Johann Lay  <avr@gjlay.de>
9470
9471         PR target/79883
9472         * config/avr/avr.c (avr_set_current_function): Typo in diagnostic.
9473
9474 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
9475
9476         * stor-layout.h (vector_type_mode): Move to...
9477         * tree.h (vector_type_mode): ...here.
9478         * stor-layout.c (vector_type_mode): Move to...
9479         * tree.c (vector_type_mode): ...here.  Include rtl.h and regs.h.
9480
9481 2017-08-21  Richard Biener  <rguenther@suse.de>
9482
9483         * debug.h (struct gcc_debug_hooks): Add die_ref_for_decl and
9484         register_external_die hooks.
9485         (debug_false_tree_charstarstar_uhwistar): Declare.
9486         (debug_nothing_tree_charstar_uhwi): Likewise.
9487         * debug.c (do_nothing_debug_hooks): Adjust.
9488         (debug_false_tree_charstarstar_uhwistar): New do nothing.
9489         (debug_nothing_tree_charstar_uhwi): Likewise.
9490         * dbxout.c (dbx_debug_hooks): Adjust.
9491         (xcoff_debug_hooks): Likewise.
9492         * sdbout.c (sdb_debug_hooks): Likewise.
9493         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
9494         * dwarf2out.c (macinfo_label_base): New global.
9495         (dwarf2out_register_external_die): New function for the
9496         register_external_die hook.
9497         (dwarf2out_die_ref_for_decl): Likewise for die_ref_for_decl.
9498         (dwarf2_debug_hooks): Use them.
9499         (dwarf2_lineno_debug_hooks): Adjust.
9500         (struct die_struct): Add with_offset flag.
9501         (DEBUG_LTO_DWO_INFO_SECTION, DEBUG_LTO_INFO_SECTION,
9502         DEBUG_LTO_DWO_ABBREV_SECTION, DEBUG_LTO_ABBREV_SECTION,
9503         DEBUG_LTO_DWO_MACINFO_SECTION, DEBUG_LTO_MACINFO_SECTION,
9504         DEBUG_LTO_DWO_MACRO_SECTION, DEBUG_LTO_MACRO_SECTION,
9505         DEBUG_LTO_LINE_SECTION, DEBUG_LTO_DWO_STR_OFFSETS_SECTION,
9506         DEBUG_LTO_STR_DWO_SECTION, DEBUG_STR_LTO_SECTION): New macros
9507         defining section names for the early LTO debug variants.
9508         (reset_indirect_string): New helper.
9509         (add_AT_external_die_ref): Helper for dwarf2out_register_external_die.
9510         (print_dw_val): Add support for offsetted symbol references.
9511         (get_ultimate_context): Split out from is_cxx.
9512         (is_cxx): Use get_ultimate_context.
9513         (is_fortran): Add decl overload.
9514         (compute_comp_unit_symbol): Split out worker from
9515         compute_section_prefix.
9516         (compute_section_prefix): Call compute_comp_unit_symbol and
9517         set comdat_type_p here.
9518         (output_die): Skip DIE symbol output for the LTO added one.
9519         Handle DIE symbol references with offset.
9520         (output_comp_unit): Guard section name mangling properly.
9521         For LTO debug sections emit a symbol at the section beginning
9522         which we use to refer to its DIEs.
9523         (add_abstract_origin_attribute): For DIEs registered via
9524         dwarf2out_register_external_die directly refer to the early
9525         DIE rather than indirectly through the shadow one we created.
9526         Remove obsolete call to dwarf2out_abstract_function for
9527         non-function/block origins.
9528         (gen_array_type_die): When generating early LTO debug do
9529         not emit DW_AT_string_length.
9530         (gen_formal_parameter_die): Do not re-create DIEs for PARM_DECLs
9531         late when in LTO.  As suggested place a gcc_unreachable for
9532         the DECL_ABSTRACT_P case.
9533         (gen_subprogram_die): Avoid another specification DIE
9534         for early built declarations/definitions for the late LTO case.
9535         (gen_variable_die): Add type references for late duplicated VLA dies
9536         when in late LTO.
9537         (gen_inlined_subroutine_die): Do not call dwarf2out_abstract_function,
9538         we have the abstract instance already.
9539         (process_scope_var): Adjust decl DIE contexts in LTO which
9540         first puts them in limbo.
9541         (gen_decl_die): Do not generate type DIEs late apart from
9542         types for VLAs or for decls we do not yet have a DIE.  Do not
9543         call dwarf2out_abstract_function late.
9544         (dwarf2out_early_global_decl): Make sure to create DIEs
9545         for abstract instances of a decl first.
9546         (dwarf2out_late_global_decl): Adjust comment.
9547         (output_macinfo_op): With multiple macro sections use
9548         macinfo_label_base to distinguish labels.
9549         (output_macinfo): Likewise.  Update macinfo_label_base.
9550         Pass in the line info label.
9551         (note_variable_value_in_expr): When generating LTO resolve
9552         all variable values here by generating DIEs as needed.
9553         (init_sections_and_labels): Add early LTO debug flag parameter
9554         and generate different sections and names if set.  Add generation
9555         counter for the labels so we can have multiple of them.
9556         (reset_dies): Helper to allow DIEs to be output multiple times.
9557         (dwarf2out_finish): When outputting DIEs to the fat part of an
9558         LTO object first reset DIEs.
9559         (dwarf2out_early_finish): Output early DIEs when generating LTO.
9560         (modified_type_die): Check for decl_ultimate_origin being self
9561         before recursing.
9562         (gen_type_die_with_usage): Likewise.
9563         (gen_typedef_die): Allow decl_ultimate_origin being self.
9564         (set_decl_abstract_flags): Remove.
9565         (set_block_abstract_flags): Likewise.
9566         (dwarf2out_abstract_function): Treat the early generated DIEs
9567         as the abstract copy and only add DW_AT_inline and
9568         DW_AT_artificial here and call set_decl_origin_self.
9569         If the DIE has an abstract origin don't do anything.
9570         * tree.c (free_lang_data): Build a dummy TRANSLATION_UNIT_DECL
9571         if we have none yet (Go fails to build one, PR78628).
9572         (variably_modified_type_p): Prevent endless recursion for Ada
9573         cyclic pointer types.
9574         * lto-streamer-in.c: Include debug.h.
9575         (dref_queue): New global.
9576         (lto_read_tree_1): Stream in DIE references.
9577         (lto_input_tree): Register DIE references.
9578         (input_function): Stream DECL_DEBUG_ARGS.
9579         * lto-streamer-out.c: Include debug.h.
9580         (lto_write_tree_1): Output DIE references.
9581         (DFS::DFS_write_tree_body): Follow DECL_ABSTRACT_ORIGIN.
9582         Force a TRANSLATION_UNIT_DECL DECL_CONTEXT for file-scope decls.
9583         (output_function): Stream DECL_DEBUG_ARGS.
9584         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
9585         Stream DECL_ABSTRACT_ORIGIN.
9586         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
9587         (write_ts_decl_minimal_tree_pointers): Force a TRANSLATION_UNIT_DECL
9588         DECL_CONTEXT for file-scope decls.
9589         * lto-streamer.h (struct dref_entry): Declare.
9590         (dref_queue): Likewise.
9591         * cfgexpand.c (pass_expand::execute): Do not call the
9592         outlining_inline_function hook here.
9593         * lto-wrapper.c (debug_obj): New global.
9594         (tool_cleanup): Unlink it if required.
9595         (debug_objcopy): New function.
9596         (run_gcc): Handle early debug sections in the IL files by
9597         extracting them to separate files, partially linkin them and
9598         feeding the result back as result to the linker.
9599         * config/darwin.h (DEBUG_LTO_INFO_SECTION, DEBUG_LTO_ABBREV_SECTION,
9600         DEBUG_LTO_MACINFO_SECTION, DEBUG_LTO_LINE_SECTION,
9601         DEBUG_STR_LTO_SECTION, DEBUG_LTO_MACRO_SECTION): Put early debug
9602         sections into a separate segment.
9603         * config/darwin.c (darwin_asm_named_section): Handle __GNU_DWARF_LTO
9604         segments.
9605         (darwin_asm_dwarf_section): Likewise.
9606         (darwin_asm_output_dwarf_offset): Likewise.
9607         * config/i386/i386.c (make_resolver_func): Set DECL_IGNORED_P.
9608
9609 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
9610             Alan Hayward  <alan.hayward@arm.com>
9611             David Sherwood  <david.sherwood@arm.com>
9612
9613         * read-md.h (md_reader::record_potential_iterator_use): Replace
9614         pointer argument with an rtx and an index.
9615         * read-rtl.c (iterator_group::apply_iterator): Likewise.
9616         (apply_mode_iterator): Likewise.
9617         (apply_code_iterator): Likewise.
9618         (apply_int_iterator): Likewise.
9619         (apply_subst_iterator): Likewise.
9620         (record_iterator_use): Likewise.
9621         (record_attribute_use): Likewise.
9622         (md_reader::record_potential_iterator_use): Likewise.  Update calls
9623         to record_iterator_use and apply_iterator.
9624         (iterator_use): Replace ptr with x and index.
9625         (attribute_use): Likewise.
9626         (apply_attribute_uses): Update calls to apply_iterator.
9627         (apply_iterators): Likewise.  Update initialization of iterator_use.
9628         (rtx_reader::read_rtx_code): Update calls to record_iterator_use
9629         and record_potential_iterator_use.
9630         (rtx_reader::read_rtx_operand): Likewise.
9631
9632 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
9633             Alan Hayward  <alan.hayward@arm.com>
9634             David Sherwood  <david.sherwood@arm.com>
9635
9636         * varasm.c (const_rtx_hash_1): Don't hash in the mode of a
9637         CONST_WIDE_INT.
9638
9639 2017-08-21  Richard Biener  <rguenther@suse.de>
9640
9641         PR middle-end/81884
9642         * tree-ssa-alias.c (stmt_kills_ref_p): Handle array accesses
9643         at struct end conservatively when comparing common bases.
9644
9645 2017-08-21  Richard Biener  <rguenther@suse.de>
9646
9647         * tree-ssa-loop-im.c (struct lim_aux_data): Add ref index member.
9648         (mem_ref_in_stmt): Remove.
9649         (determine_max_movement): Use ref index to get at the reference.
9650         (invariantness_dom_walker::before_dom_children): Deal with
9651         lim data already initialized.
9652         (gather_mem_refs_stmt): Initialize lim data and record ref index.
9653
9654 2017-08-19  Uros Bizjak  <ubizjak@gmail.com>
9655
9656         * config/i386/i386.h (OPTION_MASK_ISA_ROUND): Remove.
9657         (TARGET_ISA_ROUND): Ditto.
9658         (TARGET_ROUND): Ditto.
9659         * config/i386/i386.c: Substitute TARGET_ROUND with TARGET_SSE4_1.
9660         * config/i386/i386.md: Ditto.
9661         * config/i386/sse.md: Ditto.
9662         * config/i386/i386-builtin.def: Substitute OPTION_MASK_ISA_ROUND
9663         with OPTION_MASK_ISA_SSE4_1.
9664
9665 2017-08-19  Uros Bizjak  <ubizjak@gmail.com>
9666
9667         PR target/81894
9668         * doc/extend.texi (x86 Built-in Functions): Correct the name of
9669         __builtin_ia32_lzcnt_u16.
9670
9671 2017-08-18  Peter Bergner  <bergner@vnet.ibm.com>
9672
9673         PR target/80210
9674         * config/rs6000/rs6000.c (rs6000_activate_target_options): New function.
9675         (rs6000_set_current_function): Rewrite function to use it.
9676
9677 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
9678
9679         PR c/53037
9680         * print-tree.c (print_node): Support DECL_WARN_IF_NOT_ALIGN
9681         and TYPE_WARN_IF_NOT_ALIGN.
9682         * stor-layout.c (do_type_align): Merge DECL_WARN_IF_NOT_ALIGN.
9683         (handle_warn_if_not_align): New.
9684         (place_union_field): Call handle_warn_if_not_align.
9685         (place_field): Call handle_warn_if_not_align.
9686         Copy TYPE_WARN_IF_NOT_ALIGN.
9687         (finish_builtin_struct): Copy TYPE_WARN_IF_NOT_ALIGN.
9688         (layout_type): Likewise.
9689         * tree-core.h (tree_type_common): Add warn_if_not_align.  Set
9690         spare to 18.
9691         (tree_decl_common): Add warn_if_not_align.
9692         * tree.c (build_range_type_1): Copy TYPE_WARN_IF_NOT_ALIGN.
9693         * tree.h (TYPE_WARN_IF_NOT_ALIGN): New.
9694         (SET_TYPE_WARN_IF_NOT_ALIGN): Likewise.
9695         (DECL_WARN_IF_NOT_ALIGN): Likewise.
9696         (SET_DECL_WARN_IF_NOT_ALIGN): Likewise.
9697         * doc/extend.texi: Document warn_if_not_aligned attribute.
9698         * doc/invoke.texi: Document -Wif-not-aligned and -Wpacked-not-aligned.
9699
9700 2017-08-17  Martin Liska  <mliska@suse.cz>
9701
9702         PR bootstrap/81864
9703         * tree-loop-distribution.c (ddrs_table): Change type to pointer type.
9704         (get_data_dependence): Use it as pointer type.
9705         (distribute_loop): Likewise.
9706
9707 2017-08-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9708
9709         * config/rs6000/altivec.md (UNSPEC_VMRGOW_DIRECT): New constant.
9710         (p8_vmrgew_v4sf_direct): Generalize to p8_vmrgew_<mode>_direct.
9711         (p8_vmrgow_<mode>_direct): New define_insn.
9712         * config/rs6000/rs6000.c (altivec_expand_vec_perm_const): Properly
9713         handle endianness for vmrgew and vmrgow permute patterns.
9714
9715 2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>
9716
9717         * config/rs6000/altivec.md (VParity): Remove TARGET_VSX_TIMODE.
9718         * config/rs6000/rs6000-cpus.def: Remove comment.
9719         (ISA_2_7_MASKS_SERVER): Delete OPTION_MASK_VSX_TIMODE;
9720         (POWERPC_MASKS): Likewise.
9721         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Remove unneeded
9722         use of TARGET_VSX_TIMODE.
9723         (rs6000_setup_reg_addr_masks): Change TARGET_VSX_TIMODE to TARGET_VSX.
9724         (rs6000_init_hard_regno_mode_ok): Remove unneeded uses of
9725         TARGET_VSX_TIMODE.  Change use of TARGET_VSX_TIMODE to TARGET_VSX.
9726         (rs6000_option_override_internal): Remove dead code.
9727         (rs6000_legitimize_address): Change TARGET_VSX_TIMODE to TARGET_VSX.
9728         (rs6000_legitimize_reload_address): Likewise.
9729         (rs6000_legitimate_address_p): Likewise.
9730         (rs6000_opt_masks): Delete "vsx-timode".
9731         (rs6000_disable_incompatible_switches): Remove mention of -mvsx-timode
9732         from function comment.
9733         * config/rs6000/rs6000.h (MASK_VSX_TIMODE): Delete.
9734         * config/rs6000/rs6000.md (FMOVE128_GPR): Remove TARGET_VSX_TIMODE.
9735         (V16QI, V8HI, V4SI, V4SF, V2DI, V2DF, V1TI): Remove useless empty
9736         condition.
9737         * config/rs6000/rs6000.opt (mvsx-timode): Replace with stub.
9738         * config/rs6000/vector.md (VEC_IP): Remove TARGET_VSX_TIMODE.
9739         * config/rs6000/vsx.md (VSX_LE_128): Likewise.
9740         (VSX_TI): Likewise.
9741         (VSX_M): Likewise.
9742         (define_peephole2): Likewise.
9743
9744 2017-08-17  Martin Sebor  <msebor@redhat.com>
9745
9746         PR c/81859
9747         * pretty-print.c (pp_format): Use strnlen in %.*s to avoid reading
9748         past the end of an array.
9749         (test_pp_format): Add test cases.
9750
9751 2017-08-17  Richard Sandiford  <richard.sandiford@linaro.org>
9752
9753         * internal-fn.def (CLRSB, CLZ, CTZ, FFS, PARITY, POPCOUNT): Add
9754         missing ECF_NOTHROW flags.
9755
9756 2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>
9757
9758         PR target/72804
9759         * config/rs6000/vsx.md (*vsx_le_permute_<mode>): Add support for
9760         operands residing in integer registers.
9761         (*vsx_le_perm_load_<mode>): Likewise.
9762         (*vsx_le_perm_store_<mode>): Likewise.
9763         (define_peephole2): Add peepholes to optimize the above.
9764
9765 2017-08-17  Marek Polacek  <polacek@redhat.com>
9766
9767         PR middle-end/81814
9768         * fold-const.c (operand_equal_for_comparison_p): Remove code that used
9769         to mimic what shorten_compare did.  Change the return type to bool.
9770         (fold_cond_expr_with_comparison): Update call to
9771         operand_equal_for_comparison_p.
9772         (fold_ternary_loc): Likewise.
9773
9774 2017-08-17  Jackson Woodruff  <jackson.woodruff@arm.com>
9775
9776         * aarch64-simd.md (mov<mode>): No longer force zero immediate into
9777         register.
9778         (*aarch64_simd_mov<mode>): Add new case for stp using zero immediate.
9779
9780 2017-08-17  Richard Biener  <rguenther@suse.de>
9781
9782         * tree-ssa-structalias.c (solve_graph): When propagating
9783         to successors update the graphs succ edges and avoid duplicate work.
9784
9785 2017-08-17  Maxim Ostapenko  <m.ostapenko@samsung.com>
9786
9787         PR target/81861
9788         * config/i386/i386.c (ix86_option_override_internal): Save target
9789         specific options after ix86_stack_protector_guard_reg was changed.
9790
9791 2017-08-17  Richard Biener  <rguenther@suse.de>
9792
9793         PR tree-optimization/81827
9794         * tree-ssa-structalias.c (struct variable_info): Add is_reg_var flag.
9795         (new_var_info): Initialize it conservatively.
9796         (get_call_vi): Mark register vars.
9797         (new_scalar_tmp_constraint_exp): Likewise.
9798         (handle_rhs_call): Likewise.
9799         (handle_const_call): Likewise.
9800         (create_function_info_for): Likewise.
9801         (solve_constraints): Sort varinfos to separate register from
9802         non-register vars to pack points-to solution bitmaps during
9803         iteration.
9804
9805 2017-08-17  Marek Polacek  <polacek@redhat.com>
9806
9807         * gimplify.c (gimplify_adjust_omp_clauses): Compare with 0 instead of 1.
9808
9809 2017-08-17  Richard Biener  <rguenther@suse.de>
9810
9811         * tree-vrp.c (vrp_int_const_binop): Do not set *overflow_p
9812         to true when overflow is undefined and we saturated the result.
9813
9814 2017-08-17  Alan Modra  <amodra@gmail.com>
9815
9816         PR target/80938
9817         * config/rs6000/rs6000.c (rs6000_savres_strategy): Revert 2017-08-09.
9818         Don't use store multiple if only one reg needs saving.
9819         (interesting_frame_related_regno): New function.
9820         (rs6000_frame_related): Don't emit frame info for regs that
9821         don't need saving.
9822         (rs6000_emit_epilogue): Likewise.
9823
9824 2017-08-16  Nathan Sidwell  <nathan@acm.org>
9825
9826         * tree-core.h (tree_type_non_common): Rename binfo to lang_1.
9827         * tree.h (TYPE_BINFO): Use type_non_common.maxval.
9828         (TYPE_LANG_SLOT_1): Use type_non_common.lang_1, for any type.
9829         * tree.c (free_lang_data_in_type): Use else-if chain.  Always
9830         clear TYPE_LANG_1.  Remove obsolete member-function stripping.
9831         (find_decls_types_r): Comment about TYPE_MAX_VALUES_RAW.
9832         (verify_type): Adjust for TYPE_BINFO move.
9833         * lto-streamer-out.c (DFS::DFS_write_tree_body): No need to
9834         process TYPE_BINFO directly.
9835         (hash_tree): Likewise.
9836         * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
9837         Likewise.
9838         * tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
9839         Likewise.
9840
9841 2017-08-16  David Malcolm  <dmalcolm@redhat.com>
9842
9843         * diagnostic-show-locus.c (colorizer::m_caret): Remove unused field.
9844
9845 2017-08-16  Uros Bizjak  <ubizjak@gmail.com>
9846
9847         PR target/46091
9848         * config/i386/i386.md (*anddi_1_btr): Change predicates of
9849         operand 0 and operand 1 to nomimmediate_operand. Add "m" constraint.
9850         Add ix86_binary_operator_ok to insn constraint.
9851         (*iordi_1_bts): Ditto.
9852         (*xordi_1_btc): Ditto.
9853         (*btsq): Change predicate of operand 0 to nonimmediate_operand.
9854         Update corresponding peephole2 pattern.
9855         (*btrq): Ditto.
9856         (*btcq): Ditto.
9857
9858 2017-08-16  Bin Cheng  <bin.cheng@arm.com>
9859
9860         PR tree-optimization/81832
9861         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Don't
9862         copy loop header which has IFN_LOOP_DIST_ALIAS call.
9863
9864 2017-08-16  Marek Polacek  <polacek@redhat.com>
9865
9866         PR middle/81695
9867         * fold-const.c (fold_indirect_ref_1): Restore original behavior
9868         regarding size_zero_node.
9869
9870 2017-08-16  Martin Liska  <mliska@suse.cz>
9871
9872         PR target/81753
9873         * config.gcc: Respect previously set extra_objs in case
9874         of darwin target.
9875
9876 2017-08-16  Richard Sandiford  <richard.sandiford@linaro.org>
9877
9878         PR tree-optimization/81835
9879         * tree-vect-loop.c (vect_is_simple_reduction): Simply checks for
9880         the phi SSA_NAME.  Check that the condition in a COND_EXPR does
9881         not depend on the phi.
9882
9883 2017-08-16  Alan Modra  <amodra@gmail.com>
9884
9885         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Delete
9886         dead code.
9887
9888 2017-08-16  Alan Modra  <amodra@gmail.com>
9889
9890         * config/rs6000/rs6000.c (rs6000_reg_live_or_pic_offset_p): Merge..
9891         (save_reg_p): ..into this.  Update all callers.
9892         (first_reg_to_save): Simplify.
9893
9894 2017-08-16  Alan Modra  <amodra@gmail.com>
9895
9896         * config/rs6000/rs6000.c (rs6000_savres_strategy): Don't restore
9897         fixed regs.
9898
9899 2017-08-15  Joseph Myers  <joseph@codesourcery.com>
9900
9901         PR target/78460
9902         PR target/67712
9903         * config/sh/sh-mem.cc (sh_expand_cmpnstr): Only unroll for
9904         constant count if that count is less than 32.
9905
9906 2017-08-15  Nathan Sidwell  <nathan@acm.org>
9907
9908         * gcc.c (execute): Emit friendlier message if inferior is killed
9909         by an external cause.
9910
9911 2017-08-15  Richard Biener  <rguenther@suse.de>
9912
9913         PR tree-optimization/81790
9914         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Handle both
9915         CONSTRUCTORs from simplifying and VN.
9916
9917 2017-08-14  Martin Sebor  <msebor@redhat.com>
9918
9919         * builtin-attrs.def: Add comments.
9920
9921 2017-08-14  Martin Sebor  <msebor@redhat.com>
9922
9923         PR c/81117
9924         * doc/extend.texi (attribute nonstring): Document new attribute.
9925
9926 2017-08-14  Martin Sebor  <msebor@redhat.com>
9927
9928         PR c/81117
9929         * tree-diagnostic.c (default_tree_printer): Handle %G.
9930         * gimple-pretty-print.h (percent_G_format): Declare new function.
9931         * gimple-pretty-print.c (percent_G_format): Define.
9932         * tree-pretty-print.c (percent_K_format): Add argument.
9933
9934 2017-08-14  Martin Sebor  <msebor@redhat.com>
9935
9936         PR translation/79998
9937         * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call):
9938         Remove a stray space.
9939
9940 2017-08-14  Uros Bizjak  <ubizjak@gmail.com>
9941
9942         PR target/46091
9943         * config/i386/i386.md (*anddi_1_btr): New insn_and_split pattern.
9944         (*iordi_1_bts): Ditto.
9945         (*xordi_1_btc): Ditto.
9946
9947 2017-08-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9948
9949         PR target/79845
9950         * config/rs6000/linux64.h (INVALID_64BIT): Use quoted strings.
9951         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
9952         Likewise.
9953         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Use
9954         quoted strings, and make more translator-friendly.
9955         (darwin_rs6000_override_options): Likewise.
9956         (rs6000_option_override_internal): Likewise.
9957         (rs6000_return_in_memory): Fix overlong line.
9958         (init_cmulative_args): Use quoted strings, and make more
9959         translator-friendly.
9960         (rs6000_pass_by_reference): Fix overlong line.
9961         (def_builtin): Use quoted strings.
9962         (altivec_expand_predicate_builtin): Use quoted strings, and make
9963         more translator-friendly.
9964         (htm_expand_builtin): Use quoted strings.
9965         (cpu_expand_builtin): Use quoted strings, and make more
9966         translator-friendly.
9967         (altivec_expand_builtin): Likewise.
9968         (paired_expand_predicate_builtin): Likewise.
9969         (rs6000_invalid_builtin): Likewise.
9970         (builtin_function_type): Use quoted strings.
9971         (rs6000_expand_split_stack_prologue): Use quoted strings, and make
9972         more translator-friendly.
9973         (rs6000_trampoline_init): Likewise.
9974         (rs6000_handle_altivec_attribute): Likewise.
9975         (rs6000_inner_target_options): Use quoted strings.
9976         (rs6000_disable_incompatible_switches): Likewise.
9977         * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Use quoted
9978         strings, and make more translator-friendly.
9979         (SUBSUBTARGET_OVERRIDE_OPTIONS): Use quoted strings.
9980
9981 2017-08-14  Bin Cheng  <bin.cheng@arm.com>
9982
9983         PR tree-optimization/81799
9984         * tree-loop-distribution.c (version_loop_by_alias_check): Force
9985         cond_expr to simple gimple operand.
9986
9987 2017-08-14  Wilco Dijkstra  <wdijkstr@arm.com>
9988
9989         PR middle-end/46932
9990         * doc/sourcebuild.texi (autoincdec): Add autoincdec description.
9991
9992 2017-08-14  Georg-Johann Lay  <avr@gjlay.de>
9993
9994         PR target/81754
9995         PR target/81268
9996         * config/avr/avr.opt (mgas-isr-prologues): New Var avr_gasisr_prologues.
9997         * config/avr/avr.md (gasisr, *gasisr): Use it instead of
9998         TARGET_GASISR_PROLOGUES.
9999         * config/avr/avr.c (avr_option_override): Same.
10000         (avr_pass_pre_proep::execute): Same.
10001
10002 2017-08-13  H.J. Lu  <hongjiu.lu@intel.com>
10003
10004         PR target/81820
10005         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Replace
10006         frame pointer with stack pointer - UNITS_PER_WORD in debug insns.
10007
10008 2017-08-13  Uros Bizjak  <ubizjak@gmail.com>
10009
10010         * config/i386/i386.md (*load_tp_<mode>): Redefine as
10011         define_insn_and_split.  Split to a memory load from 0 in
10012         DEFAULT_TLS_SEG_REG address space.  Merge with *load_tp_x32
10013         using PTR mode iterator.
10014         (*load_tp_x32_zext"): Redefine as define_insn_and_split.
10015         Split to a memory load from 0 in DEFAULT_TLS_SEG_REG address space.
10016         (*add_tp_<mode>): Redefine as define_insn_and_split.
10017         Split to an add with a memory load from 0 in DEFAULT_TLS_SEG_REG
10018         address space.  Merge with *add_tp_x32 using PTR mode iterator.
10019         (*add_tp_x32_zext"): Redefine as define_insn_and_split.
10020         Split to an add with a  memory load from 0 in
10021         DEFAULT_TLS_SEG_REG address space.
10022
10023 2017-08-12  Andrew Pinski  <apinski@cavium.com>
10024
10025         * config/aarch64/aarch64-option-extensions.def (rdma):
10026         Fix feature string to what Linux prints out in /proc/cpuinfo.
10027
10028 2017-08-12  Pierre-Marie de Rodat  <derodat@adacore.com>
10029
10030         PR ada/79542
10031         * dwarf2out.c (modified_type_die): For C typedef types that have
10032         an ultimate origin, process the ultimate origin instead of the
10033         input type.
10034         (gen_typedef_die): Assert that input DECLs have no ultimate
10035         origin.
10036         (gen_type_die_with_usage): For typedef variants that have an
10037         ultimate origin, just call gen_decl_die on the original DECL.
10038         (process_scope_var): Avoid creating DIEs for local typedefs and
10039         concrete static variables.
10040
10041 2017-08-12  Alan Modra  <amodra@gmail.com>
10042
10043         PR target/81170
10044         PR target/81295
10045         * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to
10046         match gnu-user.h startfile.
10047         (ENDFILE_LINUX_SPEC): Similarly.
10048
10049 2017-08-11  Thomas Schwinge  <thomas@codesourcery.com>
10050
10051         PR lto/81430
10052         * config/nvptx/nvptx.c (nvptx_override_options_after_change):
10053         Remove function.
10054         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Remove definition.
10055
10056 2017-08-11  Tamar Christina  <tamar.christina@arm.com>
10057         * config/aarch64/aarch64.md (mov<mode>): Change.
10058         (*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
10059         aarch64_reg_or_fp_float into aarch64_reg_or_fp_zero.
10060         * config/aarch64/predicates.md (aarch64_reg_or_fp_float): Removed.
10061
10062 2017-08-11  Eric Botcazou  <ebotcazou@adacore.com>
10063
10064         * tree-sra.c (build_access_from_expr_1): Use more precise diagnostics
10065         for storage order barriers.
10066
10067 2017-08-11  Martin Liska  <mliska@suse.cz>
10068
10069         PR tree-opt/79987
10070         * tree-chkp.c (chkp_get_bounds_for_decl_addr): Do not instrument
10071         variables of void type.
10072
10073 2017-08-11  Martin Liska  <mliska@suse.cz>
10074
10075         * asan.c (asan_protect_global): Replace ASM_OUTPUT_DEF with
10076         TARGET_SUPPORTS_ALIASES.
10077         * cgraph.c (cgraph_node::create_same_body_alias): Likewise.
10078         * ipa-visibility.c (can_replace_by_local_alias): Likewise.
10079         (optimize_weakref): Likewise.
10080         * symtab.c (symtab_node::noninterposable_alias): Likewise.
10081         * varpool.c (varpool_node::create_extra_name_alias): Likewise.
10082         * defaults.h: Introduce TARGET_SUPPORTS_ALIASES.
10083
10084 2017-08-11  Martin Liska  <mliska@suse.cz>
10085
10086         PR ipa/81213
10087         * config/i386/i386.c (make_resolver_func): Do complete
10088         refactoring of the function.
10089
10090 2017-08-10  Uros Bizjak  <ubizjak@gmail.com>
10091
10092         PR target/81708
10093         * config/i386/i386.opt (mstack-protector-guard-symbol=): New option
10094         * config/i386/i386.c (ix86_stack_protect_guard): Use
10095         ix86_stack_protect_guard_symbol_str to generate varible declaration.
10096         * doc/invoke.texi (x86 Options): Document
10097         -mstack-protector-guard-symbol= option.
10098
10099 2017-08-10  Uros Bizjak  <ubizjak@gmail.com>
10100
10101         * config/i386/i386-protos.h (ix86_split_stack_guard): New prototype.
10102         * config/i386/i386.c (ix86_split_stack_guard): New function.
10103         (ix86_xpand_split_stack_prologue): Call ix86_split_stack_guard.
10104         (ix86_legitimate_address_p) <case UNSPEC_STACK_CHECK>: Remove.
10105         (i386_asm_output_addr_const_extra) <case UNSPEC_STACK_CHECK>: Ditto.
10106         (optput_pic_addr_const): Remove UNSPEC_STACK_CHECK handling.
10107         * config/i386/i386.md (unspec): Remove UNSPEC_STACK_CHECK.
10108         (split_stack_space_check): Call ix86_split_stack_guard.
10109
10110 2017-08-10  Martin Sebor  <msebor@redhat.com>
10111
10112         * print-tree.c (print_node): Print location using the established
10113         format %s:%i%i.
10114         Replace spaces with colons.
10115         (debug_raw, debug): Ditto.
10116
10117 2017-08-10  Martin Sebor  <msebor@redhat.com>
10118
10119         PR c++/81586
10120         * pretty-print.c (pp_format): Correct the handling of %s precision.
10121
10122 2017-08-10  H.J. Lu  <hongjiu.lu@intel.com>
10123
10124         PR target/81736
10125         * config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
10126         to ...
10127         (ix86_finalize_stack_frame_flags): This.  Also clear
10128         frame_pointer_needed if -fno-omit-frame-pointer is used without
10129         stack access.
10130         (ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
10131         with ix86_finalize_stack_frame_flags.
10132         (ix86_expand_epilogue): Likewise.
10133         (ix86_expand_split_stack_prologue): Likewise.
10134         * doc/invoke.texi: Add a note for -fno-omit-frame-pointer.
10135
10136 2017-08-10  Martin Liska  <mliska@suse.cz>
10137
10138         PR c++/81355
10139         * c-attribs.c (handle_target_attribute):
10140         Report warning for an empty string argument of target attribute.
10141
10142 2017-08-09  Jakub Jelinek  <jakub@redhat.com>
10143
10144         PR c/81687
10145         * omp-low.c (omp_copy_decl): Don't remap FORCED_LABEL or DECL_NONLOCAL
10146         LABEL_DECLs.
10147         * tree-cfg.c (move_stmt_op): Don't adjust DECL_CONTEXT of FORCED_LABEL
10148         or DECL_NONLOCAL labels.
10149         (move_stmt_r) <case GIMPLE_LABEL>: Adjust DECL_CONTEXT of FORCED_LABEL
10150         or DECL_NONLOCAL labels here.
10151
10152 2017-08-09  Will Schmidt  <will_schmidt@vnet.ibm.com>
10153
10154         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add blurb
10155         to indicate when early gimple folding has been disabled.
10156         (rs6000_gimple_fold_builtin): Add debug content.
10157         (rs6000_invalid_builtin): Fix whitespace.
10158         (rs6000_expand_builtin): Fix whitespace.
10159         * config/rs6000/rs6000.opt: Add option for -mfold-gimple.
10160
10161 2017-08-09  Segher Boessenkool  <segher@kernel.crashing.org>
10162
10163         PR target/80938
10164         * config/rs6000/rs6000.c (rs6000_savres_strategy): Don't use
10165         SAVE_MULTIPLE if not all the registers that saves, should be saved.
10166
10167 2017-08-09  Jim Wilson  <jim.wilson@linaro.org>
10168
10169         * config/aarch64/aarch64-cores.def (falkor): Use falkor pipeline.
10170         (qdf24xx): Likewise.
10171         * config/aarch64/aarch64.md: Include falkor.md.
10172         * config/aarch64/falkor.md: New.
10173
10174 2017-08-09  Marek Polacek  <polacek@redhat.com>
10175
10176         PR c/81233
10177         * diagnostic-core.h (emit_diagnostic_valist): Add declaration.
10178         * diagnostic.c (emit_diagnostic): Add a comment.
10179         (emit_diagnostic_valist): New function.
10180
10181 2017-08-09  Marek Polacek  <polacek@redhat.com>
10182
10183         PR c/81417
10184         * input.c (make_location): New overload.
10185         * input.h (make_location): Declare.
10186
10187 2017-08-08  Alan Modra  <amodra@gmail.com>
10188             H.J. Lu  <hongjiu.lu@intel.com>
10189
10190         PR driver/81523
10191         * gcc.c (NO_PIE_SPEC): Delete.
10192         (PIE_SPEC): Define as !no-pie/pie.  Move static|shared|r
10193         exclusion..
10194         (LINK_PIE_SPEC): ..to here.
10195         (LINK_COMMAND_SPEC): Support -no-pie.
10196         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct
10197         chain of crtbegin*.o selection, update for PIE_SPEC changes and
10198         format.
10199         (GNU_USER_TARGET_ENDFILE_SPEC): Similarly.
10200         * config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly.
10201         (ENDFILE_CRTEND_SPEC): Similarly.
10202
10203 2017-08-08  Uros Bizjak  <ubizjak@gmail.com>
10204
10205         PR target/81708
10206         * config/i386/i386.opt (mstack-protector-guard-reg=): New option
10207         (mstack-protector-guard-offset=): Ditto.
10208         * config/i386/i386.c (ix86_option_override): Handle
10209         -mstack-protector-guard-reg= and -mstack-protector-guard-offset=
10210         options.
10211         (ix86_stack_protect_guard): Use ix86_stack_protect_guard_reg and
10212         ix86_stack_protect_guard_offset variables.
10213         (TARGET_STACK_PROTECT_GUARD): Always define.
10214         * doc/invoke.texi (x86 Options): Document -mstack-protector-guard-reg=
10215         and -mstack-protector-guard-offset= options.
10216
10217 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
10218
10219         * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): Handle
10220         boundary case for the last candidate.
10221
10222 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
10223
10224         * doc/invoke.texi: Document -ftree-loop-distribution for O3.
10225         * opts.c (default_options_table): Add OPT_ftree_loop_distribution.
10226
10227 2017-08-08  Tamar Christina  <tamar.christina@arm.com>
10228
10229         PR middle-end/19706
10230         * config/aarch64/aarch64.md (xorsign<mode>3): New optabs.
10231         * config/aarch64/aarch64-builtins.c
10232         (aarch64_builtin_vectorized_function): Added CASE_CFN_XORSIGN.
10233         * config/aarch64/aarch64-simd-builtins.def: Added xorsign BINOP.
10234         * config/aarch64/aarch64-simd.md: Added xorsign<mode>3
10235
10236 2017-08-08  Tamar Christina  <tamar.christina@arm.com>
10237             Andrew Pinski <pinskia@gmail.com>
10238
10239         PR middle-end/19706
10240         * internal-fn.def (XORSIGN): New.
10241         * optabs.def (xorsign_optab): New.
10242         * tree-ssa-math-opts.c (is_copysign_call_with_1): New.
10243         (convert_expand_mult_copysign): New.
10244         (pass_optimize_widening_mul::execute): Call
10245         convert_expand_mult_copysign.
10246
10247 2017-08-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10248
10249         PR tree-optimization/81354
10250         * gimple-ssa-strength-reduction.c (create_add_on_incoming_edge):
10251         Insert on edges rather than explicitly creating landing pads.
10252         (analyze_candidates_and_replace): Commit edge inserts.
10253
10254 2017-08-08  Richard Biener  <rguenther@suse.de>
10255
10256         PR middle-end/81719
10257         * tree-ssa-loop-niter.c: Include tree-dfa.h.
10258         (expand_simple_operations): Also look through ADDR_EXPRs with
10259         MEM_REF bases treating them as POINTER_PLUS_EXPR.
10260
10261 2017-08-08  Richard Biener  <rguenther@suse.de>
10262
10263         PR tree-optimization/81723
10264         * tree-vect-slp.c (struct bst_traits): New hash traits.
10265         (bst_fail): New global.
10266         (vect_build_slp_tree_2): New worker, split out from ...
10267         (vect_build_slp_tree): ... this now wrapping it with using
10268         bst_fail set to cache SLP tree build fails.  Properly handle
10269         max_tree_size.
10270         (vect_analyze_slp_instance): Allocate and free bst_fail.
10271
10272 2017-08-08  Martin Liska  <mliska@suse.cz>
10273
10274         PR tree-opt/81696
10275         * ipa-icf-gimple.c (func_checker::compare_cst_or_decl): Consider
10276         LABEL_DECLs that can be from a different function.
10277
10278 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
10279
10280         PR tree-optimization/81744
10281         * tree-predcom.c (prepare_finalizers_chain): Deep copy expr of
10282         loop's number of iterations.
10283
10284 2017-08-08  Martin Liska  <mliska@suse.cz>
10285
10286         * asan.c: Include header files.
10287         * attribs.c (build_decl_attribute_variant): New function moved
10288         from tree.[ch].
10289         (build_type_attribute_qual_variant): Likewise.
10290         (cmp_attrib_identifiers): Likewise.
10291         (simple_cst_list_equal): Likewise.
10292         (omp_declare_simd_clauses_equal): Likewise.
10293         (attribute_value_equal): Likewise.
10294         (comp_type_attributes): Likewise.
10295         (build_type_attribute_variant): Likewise.
10296         (lookup_ident_attribute): Likewise.
10297         (remove_attribute): Likewise.
10298         (merge_attributes): Likewise.
10299         (merge_type_attributes): Likewise.
10300         (merge_decl_attributes): Likewise.
10301         (merge_dllimport_decl_attributes): Likewise.
10302         (handle_dll_attribute): Likewise.
10303         (attribute_list_equal): Likewise.
10304         (attribute_list_contained): Likewise.
10305         * attribs.h (lookup_attribute): New function moved from tree.[ch].
10306         (lookup_attribute_by_prefix): Likewise.
10307         * bb-reorder.c: Include header files.
10308         * builtins.c: Likewise.
10309         * calls.c: Likewise.
10310         * cfgexpand.c: Likewise.
10311         * cgraph.c: Likewise.
10312         * cgraphunit.c: Likewise.
10313         * convert.c: Likewise.
10314         * dwarf2out.c: Likewise.
10315         * final.c: Likewise.
10316         * fold-const.c: Likewise.
10317         * function.c: Likewise.
10318         * gimple-expr.c: Likewise.
10319         * gimple-fold.c: Likewise.
10320         * gimple-pretty-print.c: Likewise.
10321         * gimple.c: Likewise.
10322         * gimplify.c: Likewise.
10323         * hsa-common.c: Likewise.
10324         * hsa-gen.c: Likewise.
10325         * internal-fn.c: Likewise.
10326         * ipa-chkp.c: Likewise.
10327         * ipa-cp.c: Likewise.
10328         * ipa-devirt.c: Likewise.
10329         * ipa-fnsummary.c: Likewise.
10330         * ipa-inline.c: Likewise.
10331         * ipa-visibility.c: Likewise.
10332         * ipa.c: Likewise.
10333         * lto-cgraph.c: Likewise.
10334         * omp-expand.c: Likewise.
10335         * omp-general.c: Likewise.
10336         * omp-low.c: Likewise.
10337         * omp-offload.c: Likewise.
10338         * omp-simd-clone.c: Likewise.
10339         * opts-global.c: Likewise.
10340         * passes.c: Likewise.
10341         * predict.c: Likewise.
10342         * sancov.c: Likewise.
10343         * sanopt.c: Likewise.
10344         * symtab.c: Likewise.
10345         * toplev.c: Likewise.
10346         * trans-mem.c: Likewise.
10347         * tree-chkp.c: Likewise.
10348         * tree-eh.c: Likewise.
10349         * tree-into-ssa.c: Likewise.
10350         * tree-object-size.c: Likewise.
10351         * tree-parloops.c: Likewise.
10352         * tree-profile.c: Likewise.
10353         * tree-ssa-ccp.c: Likewise.
10354         * tree-ssa-live.c: Likewise.
10355         * tree-ssa-loop.c: Likewise.
10356         * tree-ssa-sccvn.c: Likewise.
10357         * tree-ssa-structalias.c: Likewise.
10358         * tree-ssa.c: Likewise.
10359         * tree-streamer-in.c: Likewise.
10360         * tree-vectorizer.c: Likewise.
10361         * tree-vrp.c: Likewise.
10362         * tsan.c: Likewise.
10363         * ubsan.c: Likewise.
10364         * varasm.c: Likewise.
10365         * varpool.c: Likewise.
10366         * tree.c: Remove functions moved to attribs.[ch].
10367         * tree.h: Likewise.
10368         * config/aarch64/aarch64.c: Add attrs.h header file.
10369         * config/alpha/alpha.c: Likewise.
10370         * config/arc/arc.c: Likewise.
10371         * config/arm/arm.c: Likewise.
10372         * config/avr/avr.c: Likewise.
10373         * config/bfin/bfin.c: Likewise.
10374         * config/c6x/c6x.c: Likewise.
10375         * config/cr16/cr16.c: Likewise.
10376         * config/cris/cris.c: Likewise.
10377         * config/darwin.c: Likewise.
10378         * config/epiphany/epiphany.c: Likewise.
10379         * config/fr30/fr30.c: Likewise.
10380         * config/frv/frv.c: Likewise.
10381         * config/ft32/ft32.c: Likewise.
10382         * config/h8300/h8300.c: Likewise.
10383         * config/i386/winnt.c: Likewise.
10384         * config/ia64/ia64.c: Likewise.
10385         * config/iq2000/iq2000.c: Likewise.
10386         * config/lm32/lm32.c: Likewise.
10387         * config/m32c/m32c.c: Likewise.
10388         * config/m32r/m32r.c: Likewise.
10389         * config/m68k/m68k.c: Likewise.
10390         * config/mcore/mcore.c: Likewise.
10391         * config/microblaze/microblaze.c: Likewise.
10392         * config/mips/mips.c: Likewise.
10393         * config/mmix/mmix.c: Likewise.
10394         * config/mn10300/mn10300.c: Likewise.
10395         * config/moxie/moxie.c: Likewise.
10396         * config/msp430/msp430.c: Likewise.
10397         * config/nds32/nds32-isr.c: Likewise.
10398         * config/nds32/nds32.c: Likewise.
10399         * config/nios2/nios2.c: Likewise.
10400         * config/nvptx/nvptx.c: Likewise.
10401         * config/pa/pa.c: Likewise.
10402         * config/pdp11/pdp11.c: Likewise.
10403         * config/powerpcspe/powerpcspe.c: Likewise.
10404         * config/riscv/riscv.c: Likewise.
10405         * config/rl78/rl78.c: Likewise.
10406         * config/rx/rx.c: Likewise.
10407         * config/s390/s390.c: Likewise.
10408         * config/sh/sh.c: Likewise.
10409         * config/sol2.c: Likewise.
10410         * config/sparc/sparc.c: Likewise.
10411         * config/spu/spu.c: Likewise.
10412         * config/stormy16/stormy16.c: Likewise.
10413         * config/tilegx/tilegx.c: Likewise.
10414         * config/tilepro/tilepro.c: Likewise.
10415         * config/v850/v850.c: Likewise.
10416         * config/vax/vax.c: Likewise.
10417         * config/visium/visium.c: Likewise.
10418         * config/xtensa/xtensa.c: Likewise.
10419
10420 2017-08-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
10421
10422         PR target/81593
10423         * config/rs6000/vsx.md (vsx_concat_<mode>, VSX_D): Cleanup
10424         constraints since the -mupper-regs-* switches have been
10425         eliminated.
10426         (vsx_concat_<mode>_1): New combiner insns to recognize inserting
10427         into a vector from a double word element that was extracted from
10428         another vector, and eliminate extra XXPERMDI instructions.
10429         (vsx_concat_<mode>_2): Likewise.
10430         (vsx_concat_<mode>_3): Likewise.
10431         (vsx_set_<mode>, VSX_D): Rewrite vector set in terms of vector
10432         concat to allow optimizing inserts from previous extracts.
10433
10434 2017-08-07  Uros Bizjak  <ubizjak@gmail.com>
10435
10436         * config/i386/i386.c (ix86_stack_protect_guard): Generate
10437         memory reference to a SSP offset in TLS address space.
10438         (ix86_print_operand) <case '@'>: Remove.
10439         (ix86_print_operand_punct_valid_p): Remove '@' code.
10440         * config/i386/i386.md (unspec): Remove UNSPEC_SP_TLS_SET and
10441         UNSPEC_SP_TLS_TEST.
10442         (stack_tls_protect_set_<mode>): Remove.
10443         (stack_protect_set): Do not call gen_stack_tls_protect_set_<mode>.
10444         (stack_tls_protect_test_<mode>): Remove.
10445         (stack_protect_test): Do not call gen_stack_tls_protect_test_<mode>.
10446
10447 2017-08-07  Olivier Hainque  <hainque@adacore.com>
10448
10449         PR target/81755
10450         * config/vxworksae.h (VXWORKS_HAVE_TLS): Define.
10451
10452 2017-08-07  Douglas Rupp  <rupp@adacore.com>
10453
10454         * Makefile.in (install-mkheaders): Fix typo, where the multi_dir
10455         variable was referenced as multidir in command.
10456
10457 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
10458
10459         PR c/69389
10460         * gimplify.c (goa_stabilize_expr): Handle BIT_INSERT_EXPR and
10461         BIT_FIELD_REF.
10462
10463 2017-08-07  Martin Liska  <mliska@suse.cz>
10464
10465         * config/m32c/m32c.c: Add include of stringpool.h and attribs.h.
10466         * config/rl78/rl78.c: Add include of attribs.h.
10467         * config/sh/sh.c: Likewise.
10468         * config/v850/v850.c: Likewise.
10469
10470 2017-08-07  Tom de Vries  <tom@codesourcery.com>
10471
10472         PR middle-end/78266
10473         * omp-expand.c (expand_oacc_for): Ensure diff_type is large enough.
10474
10475 2017-08-07  Martin Liska  <mliska@suse.cz>
10476
10477         * config/mips/mips.c: Include attribs.h.
10478
10479 2017-08-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
10480
10481         PR fortran/68829
10482         * doc/invoke.texi: Document change in behvaior for -Ofast for
10483         Fortran.
10484
10485 2017-08-07  Wilco Dijkstra  <wdijkstr@arm.com>
10486
10487         * config/aarch64/aarch64.c (aarch64_pushwb_single_reg):
10488         Use gen_frame_mem.
10489         (aarch64_pop_regs): Likewise.
10490         (aarch64_gen_load_pair): Likewise.
10491         (aarch64_save_callee_saves): Likewise.
10492         (aarch64_restore_callee_saves): Likewise.
10493
10494 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
10495
10496         * config/i386/i386.c: Revert the last change.
10497
10498 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
10499
10500         PR target/81736
10501         * config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
10502         to ...
10503         (ix86_finalize_stack_frame_flags): This.  Also clear
10504         frame_pointer_needed if -fno-omit-frame-pointer is used without
10505         stack access.
10506         (ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
10507         with ix86_finalize_stack_frame_flags.
10508         (ix86_expand_epilogue): Likewise.
10509         (ix86_expand_split_stack_prologue): Likewise.
10510
10511 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
10512
10513         PR target/81743
10514         * config/i386/i386.c (get_builtin_code_for_version): Set priority
10515         to P_AES for Westmere.
10516
10517 2017-08-07  Jonathan Yong  <10walls@gmail.com>
10518
10519         * config/i386/mingw.opt (fset-stack-executable): Removed.
10520         * config/i386/cygming.opt (fset-stack-executable): Moved
10521         from mingw.opt.
10522         * config/i386/cygwin.h: Define CHECK_EXECUTE_STACK_ENABLED.
10523
10524 2017-08-07  Segher Boessenkool  <segher@kernel.crashing.org>
10525
10526         * print-rtl.c (print_exp): Print NOT as "~" instead of as "!".
10527
10528 2017-08-07  Marek Polacek  <polacek@redhat.com>
10529
10530         PR middle-end/81737
10531         * fold-const.c (fold_indirect_ref_1): Check type_domain.
10532
10533 2017-08-07  Martin Liska  <mliska@suse.cz>
10534
10535         * attribs.h (canonicalize_attr_name): New function.
10536         (cmp_attribs): Move from c-format.c and adjusted.
10537         (is_attribute_p): Moved from tree.h.
10538         * tree-inline.c: Add new includes.
10539         * tree.c (cmp_attrib_identifiers): Use cmp_attribs.
10540         (private_is_attribute_p): Remove.
10541         (private_lookup_attribute): Likewise.
10542         (private_lookup_attribute_by_prefix): Simplify.
10543         (remove_attribute): Use is_attribute_p.
10544         * tree.h: Remove removed declarations.
10545
10546 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
10547
10548         PR middle-end/81698
10549         * stmt.c (emit_case_dispatch_table): Add DEFAULT_EDGE argument,
10550         instead of computing it in the function.  Formatting fix.
10551         (expand_case): Don't rely on default_edge being the first edge,
10552         clear it if removing it, pass default_edge to
10553         emit_case_dispatch_table.
10554         (expand_sjlj_dispatch_table): Pass NULL as DEFAULT_EDGE, formatting
10555         fix.
10556
10557 2017-08-06  Uros Bizjak  <ubizjak@gmail.com>
10558
10559         * config/alpha/alpha.c (alpha_reorg): If trap is the last active
10560         insn in the function, emit NOP after the insn.
10561
10562 2017-08-06  Tom de Vries  <tom@codesourcery.com>
10563
10564         * omp-expand.c (expand_oacc_for): Add missing edge probability for tile
10565         and element loops.
10566
10567 2017-08-06  Tom de Vries  <tom@codesourcery.com>
10568
10569         * omp-expand.c (expand_oacc_for): Add missing edge probability for chunk
10570         loop.
10571
10572 2017-08-04  Yury Gribov  <tetra2005@gmail.com>
10573
10574         PR tree-optimization/57371
10575         * match.pd: New pattern.
10576
10577 2017-08-04  Marek Polacek  <polacek@redhat.com>
10578
10579         PR middle-end/81695
10580         * fold-const.c (fold_indirect_ref_1): For ((int *)&a + 4 -> a[1],
10581         perform the computation in offset_int.
10582
10583 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
10584
10585         PR tree-optimization/81136
10586         * tree-vectorizer.h: Include tree-hash-traits.h.
10587         (vec_base_alignments): New typedef.
10588         (vec_info): Add a base_alignments field.
10589         (vect_record_base_alignments): Declare.
10590         * tree-data-ref.h (data_reference): Add an is_conditional_in_stmt
10591         field.
10592         (DR_IS_CONDITIONAL_IN_STMT): New macro.
10593         (create_data_ref): Add an is_conditional_in_stmt argument.
10594         * tree-data-ref.c (create_data_ref): Likewise.  Use it to initialize
10595         the is_conditional_in_stmt field.
10596         (data_ref_loc): Add an is_conditional_in_stmt field.
10597         (get_references_in_stmt): Set the is_conditional_in_stmt field.
10598         (find_data_references_in_stmt): Update call to create_data_ref.
10599         (graphite_find_data_references_in_stmt): Likewise.
10600         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Likewise.
10601         * tree-vect-data-refs.c (vect_analyze_data_refs): Likewise.
10602         (vect_record_base_alignment): New function.
10603         (vect_record_base_alignments): Likewise.
10604         (vect_compute_data_ref_alignment): Adjust base_addr and aligned_to
10605         for nested statements even if we fail to compute a misalignment.
10606         Use pooled base alignments for unconditional references.
10607         (vect_find_same_alignment_drs): Compare base addresses instead
10608         of base objects.
10609         (vect_analyze_data_refs_alignment): Call vect_record_base_alignments.
10610         * tree-vect-slp.c (vect_slp_analyze_bb_1): Likewise.
10611
10612 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
10613
10614         * tree-vectorizer.h (vec_info): Add a constructor and destructor.
10615         Add an explicit name for the enum.  Use auto_vec for slp_instances
10616         and grouped_stores.
10617         (_loop_vec_info): Add a constructor and destructor.  Use auto_vec
10618         for all vectors.
10619         (_bb_vec_info): Add a constructor and destructor.
10620         (vinfo_for_stmt): Return NULL for uids of -1 as well.
10621         (destroy_loop_vec_info): Delete.
10622         (vect_destroy_datarefs): Likewise.
10623         * tree-vectorizer.c (vect_destroy_datarefs): Delete.
10624         (vec_info::vec_info): New function.
10625         (vec_info::~vec_info): Likewise.
10626         (vectorize_loops): Use delete instead of destroy_loop_vec_info.
10627         * tree-parloops.c (gather_scalar_reductions): Use delete instead of
10628         destroy_loop_vec_info.
10629         * tree-vect-loop.c (new_loop_vec_info): Replace with...
10630         (_loop_vec_info::_loop_vec_info): ...this.
10631         (destroy_loop_vec_info): Replace with...
10632         (_loop_vec_info::~_loop_vec_info): ...this.  Unconditionally delete
10633         the stmt_vec_infos.  Leave handling of vec_info information to its
10634         destructor.  Remove explicit vector releases.
10635         (vect_analyze_loop_form): Use new instead of new_loop_vec_info.
10636         (vect_analyze_loop): Use delete instead of destroy_loop_vec_info.
10637         * tree-vect-slp.c (new_bb_vec_info): Replace with...
10638         (_bb_vec_info::_bb_vec_info): ...this.  Don't reserve space in
10639         BB_VINFO_GROUPED_STORES or BB_VINFO_SLP_INSTANCES.
10640         (destroy_bb_vec_info): Replace with...
10641         (_bb_vec_info::~_bb_vec_info): ...this.  Leave handling of vec_info
10642         information to its destructor.
10643         (vect_slp_analyze_bb_1): Use new and delete instead of
10644         new_bb_vec_info and destroy_bb_vec_info.
10645         (vect_slp_bb): Replace 2 calls to destroy_bb_vec_info with a
10646         single delete.
10647
10648 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
10649
10650         * tree-data-ref.h (subscript): Add access_fn field.
10651         (data_dependence_relation): Add could_be_independent_p.
10652         (SUB_ACCESS_FN, DDR_COULD_BE_INDEPENDENT_P): New macros.
10653         (same_access_functions): Move to tree-data-ref.c.
10654         * tree-data-ref.c (ref_contains_union_access_p): New function.
10655         (access_fn_component_p): Likewise.
10656         (access_fn_components_comparable_p): Likewise.
10657         (dr_analyze_indices): Add a reference to access_fn_component_p.
10658         (dump_data_dependence_relation): Use SUB_ACCESS_FN instead of
10659         DR_ACCESS_FN.
10660         (constant_access_functions): Likewise.
10661         (add_other_self_distances): Likewise.
10662         (same_access_functions): Likewise.  (Moved from tree-data-ref.h.)
10663         (initialize_data_dependence_relation): Use XCNEW and remove
10664         explicit zeroing of DDR_REVERSED_P.  Look for a subsequence
10665         of access functions that have the same type.  Allow the
10666         subsequence to end with different bases in some circumstances.
10667         Record the chosen access functions in SUB_ACCESS_FN.
10668         (build_classic_dist_vector_1): Replace ddr_a and ddr_b with
10669         a_index and b_index.  Use SUB_ACCESS_FN instead of DR_ACCESS_FN.
10670         (subscript_dependence_tester_1): Likewise dra and drb.
10671         (build_classic_dist_vector): Update calls accordingly.
10672         (subscript_dependence_tester): Likewise.
10673         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Check
10674         DDR_COULD_BE_INDEPENDENT_P.
10675         * tree-vectorizer.h (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Test
10676         comp_alias_ddrs instead of may_alias_ddrs.
10677         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
10678         New function.
10679         (vect_analyze_data_ref_dependence): Use it if
10680         DDR_COULD_BE_INDEPENDENT_P, but fall back to using the recorded
10681         distance vectors if that fails.
10682         (dependence_distance_ge_vf): New function.
10683         (vect_prune_runtime_alias_test_list): Use it.  Don't clear
10684         LOOP_VINFO_MAY_ALIAS_DDRS.
10685
10686 2017-08-04  Richard Biener  <rguenther@suse.de>
10687
10688         PR middle-end/81705
10689         * fold-const.c (fold_binary_loc): Properly restrict
10690         minus_var0 && minus_var1 case when associating undefined overflow
10691         entities.
10692
10693 2017-08-04  Tom de Vries  <tom@codesourcery.com>
10694
10695         * omp-simd-clone.c (simd_clone_adjust): Add missing edge probability.
10696
10697 2017-08-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10698
10699         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
10700         Don't start diagnostic messages with a capital letter.
10701         * config/rs6000/rs6000.c (rs6000_option_override_internal):
10702         Likewise.
10703         (rs6000_invalid_builtin): Likewise.
10704         (rs6000_trampoline_init): Likewise.
10705
10706 2017-08-03  Jakub Jelinek  <jakub@redhat.com>
10707
10708         PR target/81621
10709         * bb-reorder.c (pass_partition_blocks::execute): Return TODO_df_finish
10710         after setting changeable df flags.
10711
10712 2017-08-03  Richard Biener  <rguenther@suse.de>
10713
10714         * tree-ssa-reassoc.c (should_break_up_subtract): Also break
10715         up if the use is in USE - X.
10716
10717 2017-08-03  Alexander Monakov  <amonakov@ispras.ru>
10718
10719         * toplev.c (dumpfile.h): New include.
10720         (internal_error_reentered): New static function.  Use it...
10721         (internal_error_function): ...here to handle reentered internal_error.
10722
10723 2017-08-03  Richard Biener  <rguenther@suse.de>
10724
10725         PR middle-end/81148
10726         * fold-const.c (split_tree): Add minus_var and minus_con
10727         arguments, remove unused loc arg.  Never generate NEGATE_EXPRs
10728         here but always use minus_*.
10729         (associate_trees): Assert we never associate with MINUS_EXPR
10730         and NULL first operand.  Do not recurse for PLUS_EXPR operands
10731         when associating as MINUS_EXPR either.
10732         (fold_binary_loc): Track minus_var and minus_con.
10733
10734 2017-08-03  Tom de Vries  <tom@codesourcery.com>
10735
10736         PR lto/81430
10737         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers): If
10738         ACCEL_COMPILER, apply finish_options on
10739         DECL_FUNCTION_SPECIFIC_OPTIMIZATION.
10740
10741 2017-08-03  Tom de Vries  <tom@codesourcery.com>
10742
10743         PR target/81662
10744         * config/nvptx/nvptx.c (nvptx_option_override): Emit sorry if
10745         function_entry_patch_area_size > 0.
10746
10747 2017-08-03  Jakub Jelinek  <jakub@redhat.com>
10748
10749         PR driver/81650
10750         * calls.c (alloc_max_size): Use HOST_WIDE_INT_UC (10??)
10751         instead of 10??LU, perform unit multiplication in wide_int,
10752         don't change alloc_object_size_limit if the limit is larger
10753         than SSIZE_MAX.
10754
10755         PR tree-optimization/81655
10756         PR tree-optimization/81588
10757         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Handle also
10758         the case when ranges[i].low and high are 1 for unsigned type with
10759         precision 1.
10760
10761         PR middle-end/81052
10762         * omp-low.c (diagnose_sb_0): Handle flag_openmp_simd like flag_openmp.
10763         (pass_diagnose_omp_blocks::gate): Enable also for flag_openmp_simd.
10764
10765 2017-08-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10766
10767         * tree-vrp.h: Add include guard.
10768
10769 2017-08-02  Uros Bizjak  <ubizjak@gmail.com>
10770
10771         PR target/81644
10772         * config/i386/i386.md (unspecv): Add UNSPECV_UD2.
10773         (ud2): New insn pattern.
10774         * config/i386/i386.c (ix86_expand_epilogue):
10775         For naked functions, generate ud2 instead of trap insn.
10776
10777 2017-08-02  Marek Polacek  <polacek@redhat.com>
10778
10779         PR other/81667
10780         * alloc-pool.h (base_pool_allocator): Initialize m_elt_size.
10781
10782 2017-08-02  Tom de Vries  <tom@codesourcery.com>
10783             Cesar Philippidis  <cesar@codesourcery.com>
10784
10785         * config/nvptx/nvptx.c (nvptx_lockless_update, nvptx_lockfull_update):
10786         Add missing edge probabilities.
10787
10788 2017-08-02  Tamar Christina  <tamar.christina@arm.com>
10789
10790         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
10791         Correct endianness.
10792
10793 2017-08-02  Jakub Jelinek  <jakub@redhat.com>
10794
10795         PR middle-end/79499
10796         * function.c (thread_prologue_and_epilogue_insns): Determine blocks
10797         for find_many_sub_basic_blocks bitmap by looking up BLOCK_FOR_INSN
10798         of first NONDEBUG_INSN_P in each of the split_prologue_seq and
10799         prologue_seq sequences - if any.
10800
10801 2017-08-02  Richard Biener  <rguenther@suse.de>
10802
10803         * tree-vect-stmts.c (vectorizable_store): Perform vector extracts
10804         via vectors if supported, integer extracts via punning if supported
10805         or otherwise vector extracts.
10806
10807 2017-08-02  Richard Biener  <rguenther@suse.de>
10808
10809         * tree-ssa-pre.c (bitmap_insert_into_set_1): Remove and inline
10810         into ...
10811         (bitmap_insert_into_set): ... this.
10812
10813 2017-08-02  Richard Biener  <rguenther@suse.de>
10814
10815         PR tree-optimization/81633
10816         Revert
10817         2015-08-17  Alan Hayward  <alan.hayward@arm.com>
10818
10819         PR tree-optimization/71752
10820         * tree-vect-slp.c (vect_get_slp_defs): Handle null operands.
10821
10822 2017-08-01  Daniel Santos  <daniel.santos@pobox.com>
10823
10824         * config/i386/i386.h (ix86_frame::outlined_save_offset): Remove field.
10825         (machine_function::call_ms2sysv_pad_out): Remove field.
10826         * config/i386/i386.c (xlogue_layout::get_stack_space_used): Modify.
10827         (ix86_compute_frame_layout): Likewise.
10828
10829 2017-08-01  H.J. Lu  <hongjiu.lu@intel.com>
10830
10831         PR target/81654
10832         * config/i386/i386.c (ix86_set_func_type): Disallow naked
10833         attribute with interrupt attribute.
10834
10835 2017-08-01  Andrew Pinski  <apinski@cavium.com>
10836
10837         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Check
10838         BIT_INSERT_EXPR's operand 1
10839         to see if the types precision matches.
10840
10841 2017-08-01  Martin Liska  <mliska@suse.cz>
10842
10843         PR middle-end/70140
10844         * builtins.c (expand_builtin_memcpy_args): Remove.
10845         (expand_builtin_memcpy): Call newly added function
10846         expand_builtin_memory_copy_args.
10847         (expand_builtin_memcpy_with_bounds): Likewise.
10848         (expand_builtin_mempcpy): Remove last argument.
10849         (expand_builtin_mempcpy_with_bounds): Likewise.
10850         (expand_builtin_memory_copy_args): New function created from
10851         expand_builtin_mempcpy_args with small modifications.
10852         (expand_builtin_mempcpy_args): Remove.
10853         (expand_builtin_stpcpy): Remove unused argument.
10854         (expand_builtin): Likewise.
10855         (expand_builtin_with_bounds): Likewise.
10856
10857 2017-08-01  Martin Liska  <mliska@suse.cz>
10858
10859         Revert r250771
10860         Make mempcpy more optimal (PR middle-end/70140).
10861
10862 2017-08-01  Jakub Jelinek  <jakub@redhat.com>
10863
10864         PR target/81622
10865         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
10866         __builtin_vec_cmpne verify both arguments are compatible vectors
10867         before looking at TYPE_MODE on the element type.  For __builtin_vec_ld
10868         verify arg1_type is a pointer or array type.  For __builtin_vec_st,
10869         move computation of aligned to after checking the argument types.
10870         Formatting fixes.
10871
10872         PR target/80846
10873         * config/rs6000/vsx.md (vextract_fp_from_shorth,
10874         vextract_fp_from_shortl): Add element mode after mode in gen_vec_init*
10875         calls.
10876
10877 2017-08-01  Jerome Lambourg  <lambourg@adacore.com>
10878             Doug Rupp  <rupp@adacore.com>
10879             Olivier Hainque  <hainque@adacore.com>
10880
10881         * config.gcc (arm-wrs-vxworks*): Rework to handle arm-wrs-vxworks7 as
10882         well as arm-wrs-vxworks. Update target_cpu_name from arm6 (arch v3) to
10883         arm8 (arch v4).
10884         * config/arm/vxworks.h (MAYBE_TARGET_BPABI_CPP_BUILTINS): New, helper
10885         for TARGET_OS_CPP_BUILTIN.
10886         (TARGET_OS_CPP_BUILTIN): Invoke MAYBE_TARGET_BPABI_CPP_BUILTINS(),
10887         refine CPU definitions for arm_arch5 and add those for arm_arch6 and
10888         arm_arch7.
10889         (MAYBE_ASM_ABI_SPEC): New, helper for SUBTARGET_EXTRA_ASM_SPEC,
10890         passing required abi options to the assembler for EABI configurations.
10891         (EXTRA_CC1_SPEC): New macro, to help prevent the implicit production
10892         of .text.hot and .text.unlikely sections for kernel modules when
10893         using ARM style exceptions.
10894         (CC1_SPEC): Remove obsolete attempt at mimicking Diab toolchain
10895         options. Add EXTRA_CC1_SPEC.
10896         (VXWORKS_ENDIAN_SPEC): Adjust comment and remove handling of Diab
10897         toolchain options.
10898         (DWARF2_UNWIND_INFO): Redefine to handle the pre/post VxWorks 7
10899         transition.
10900         (ARM_TARGET2_DWARF_FORMAT): Define.
10901         * config/arm/t-vxworks: Adjust multilib control to removal of the
10902         Diab command line options.
10903
10904 2017-08-01  Martin Liska  <mliska@suse.cz>
10905
10906         PR gcov-profile/81561
10907         * gcov.c (unblock): Make unblocking safe as we need to preserve
10908         index correspondence of blocks and block_lists.
10909
10910 2017-08-01  Richard Biener  <rguenther@suse.de>
10911
10912         PR tree-optimization/81181
10913         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
10914         (compute_antic): ... end of iteration here.
10915
10916 2017-08-01  James Greenhalgh  <james.greenhalgh@arm.com>
10917
10918         * common.opt (ftree-vectorize): No longer set flag_tree_vectorize.
10919         (ftree-loop-vectorize): Set as EnabledBy ftree-vectorize.
10920         (ftree-slp-vectorize): Likewise.
10921         * omp-expand (expand_omp_simd): Remove flag_tree_vectorize, as it
10922         can no longer be set independent of flag_tree_loop_vectorize.
10923         * omp-general.c (emp_max_vf): Likewise.
10924         * opts.c (enable_fdo_optimizations): Remove references to
10925         flag_tree_vectorize, these are now implicit.
10926         (common_handle_option): Remove handling for OPT_ftree_vectorize,
10927         and leave it for the options machinery.
10928
10929 2017-08-01  Martin Liska  <mliska@suse.cz>
10930
10931         PR middle-end/70140
10932         * builtins.c (expand_builtin_memcpy_args): Remove.
10933         (expand_builtin_memcpy): Call newly added function
10934         expand_builtin_memory_copy_args.
10935         (expand_builtin_memcpy_with_bounds): Likewise.
10936         (expand_builtin_mempcpy): Remove last argument.
10937         (expand_builtin_mempcpy_with_bounds): Likewise.
10938         (expand_builtin_memory_copy_args): New function created from
10939         expand_builtin_mempcpy_args with small modifications.
10940         (expand_builtin_mempcpy_args): Remove.
10941         (expand_builtin_stpcpy): Remove unused argument.
10942         (expand_builtin): Likewise.
10943         (expand_builtin_with_bounds): Likewise.
10944
10945 2017-08-01  Uros Bizjak  <ubizjak@gmail.com>
10946
10947         PR target/81641
10948         * config/i386/i386.c (ix86_print_operand_address_as): For -masm=intel
10949         print "ds:" only for immediates in generic address space.
10950
10951 2017-08-01  Uros Bizjak  <ubizjak@gmail.com>
10952
10953         PR target/81639
10954         * config/i386/i386.c (ix86_funciton_naked): New prototype.
10955         (ix86_function_ok_for_sibcall): Return false for naked functions.
10956
10957 2017-08-01  Richard Biener  <rguenther@suse.de>
10958
10959         * tree-ssa-pre.c (print_pre_expr): Handle NULL expr.
10960         (compute_antic): Seed worklist with exit block predecessors.
10961         * cfganal.c (dfs_find_deadend): For a cycle return the source
10962         of the edge closing it.
10963
10964 2017-08-01  Tamar Christina  <tamar.christina@arm.com>
10965
10966         * config/aarch64/aarch64.c
10967         (aarch64_can_const_movi_rtx_p): Move 0 check.
10968
10969 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
10970
10971         * tree.h (POINTER_TYPE_OVERFLOW_UNDEFINED): Delete.
10972         * fold-const.c (fold_comparison, fold_binary_loc): Delete use of
10973         above macro.
10974         * match.pd: Ditto in address comparison pattern.
10975
10976 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
10977
10978         PR tree-optimization/81627
10979         * tree-predcom.c (prepare_finalizers): Always rewrite into loop
10980         closed ssa form for store-store chain.
10981
10982 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
10983
10984         PR tree-optimization/81620
10985         * tree-predcom.c (add_ref_to_chain): Don't set has_max_use_after
10986         for store-store chain.
10987
10988 2017-08-01  Jakub Jelinek  <jakub@redhat.com>
10989
10990         PR tree-optimization/81588
10991         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If
10992         ranges[i].in_p, invert comparison code ccode.  For >/>=,
10993         swap rhs1 and rhs2 and comparison code unconditionally,
10994         for </<= don't do that.  Don't swap rhs1/rhs2 again if
10995         ranges[i].in_p, instead invert comparison code ccode if
10996         opcode or oe->rank is BIT_IOR_EXPR.
10997
10998         PR target/80846
10999         * optabs.def (vec_extract_optab, vec_init_optab): Change from
11000         a direct optab to conversion optab.
11001         * optabs.c (expand_vector_broadcast): Use convert_optab_handler
11002         with GET_MODE_INNER as last argument instead of optab_handler.
11003         * expmed.c (extract_bit_field_1): Likewise.  Use vector from
11004         vector extraction if possible and optab is available.
11005         * expr.c (store_constructor): Use convert_optab_handler instead
11006         of optab_handler.  Use vector initialization from smaller
11007         vectors if possible and optab is available.
11008         * tree-vect-stmts.c (vectorizable_load): Likewise.
11009         * doc/md.texi (vec_extract, vec_init): Document that the optabs
11010         now have two modes.
11011         * config/i386/i386.c (ix86_expand_vector_init): Handle expansion
11012         of vec_init from half-sized vectors with the same element mode.
11013         * config/i386/sse.md (ssehalfvecmode): Add V4TI case.
11014         (ssehalfvecmodelower, ssescalarmodelower): New mode attributes.
11015         (reduc_plus_scal_v8df, reduc_plus_scal_v4df, reduc_plus_scal_v2df,
11016         reduc_plus_scal_v16sf, reduc_plus_scal_v8sf, reduc_plus_scal_v4sf,
11017         reduc_<code>_scal_<mode>, reduc_umin_scal_v8hi): Add element mode
11018         after mode in gen_vec_extract* calls.
11019         (vec_extract<mode>): Renamed to ...
11020         (vec_extract<mode><ssescalarmodelower>): ... this.
11021         (vec_extract<mode><ssehalfvecmodelower>): New expander.
11022         (rotl<mode>3, rotr<mode>3, <shift_insn><mode>3, ashrv2di3): Add
11023         element mode after mode in gen_vec_init* calls.
11024         (VEC_INIT_HALF_MODE): New mode iterator.
11025         (vec_init<mode>): Renamed to ...
11026         (vec_init<mode><ssescalarmodelower>): ... this.
11027         (vec_init<mode><ssehalfvecmodelower>): New expander.
11028         * config/i386/mmx.md (vec_extractv2sf): Renamed to ...
11029         (vec_extractv2sfsf): ... this.
11030         (vec_initv2sf): Renamed to ...
11031         (vec_initv2sfsf): ... this.
11032         (vec_extractv2si): Renamed to ...
11033         (vec_extractv2sisi): ... this.
11034         (vec_initv2si): Renamed to ...
11035         (vec_initv2sisi): ... this.
11036         (vec_extractv4hi): Renamed to ...
11037         (vec_extractv4hihi): ... this.
11038         (vec_initv4hi): Renamed to ...
11039         (vec_initv4hihi): ... this.
11040         (vec_extractv8qi): Renamed to ...
11041         (vec_extractv8qiqi): ... this.
11042         (vec_initv8qi): Renamed to ...
11043         (vec_initv8qiqi): ... this.
11044         * config/rs6000/vector.md (VEC_base_l): New mode attribute.
11045         (vec_init<mode>): Renamed to ...
11046         (vec_init<mode><VEC_base_l>): ... this.
11047         (vec_extract<mode>): Renamed to ...
11048         (vec_extract<mode><VEC_base_l>): ... this.
11049         * config/rs6000/paired.md (vec_initv2sf): Renamed to ...
11050         (vec_initv2sfsf): ... this.
11051         * config/rs6000/altivec.md (splitter, altivec_copysign_v4sf3,
11052         vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi,
11053         vec_unpacku_lo_v8hi, mulv16qi3, altivec_vreve<mode>2): Add
11054         element mode after mode in gen_vec_init* calls.
11055         * config/aarch64/aarch64-simd.md (vec_init<mode>): Renamed to ...
11056         (vec_init<mode><Vel>): ... this.
11057         (vec_extract<mode>): Renamed to ...
11058         (vec_extract<mode><Vel>): ... this.
11059         * config/aarch64/iterators.md (Vel): New mode attribute.
11060         * config/s390/s390.c (s390_expand_vec_strlen, s390_expand_vec_movstr):
11061         Add element mode after mode in gen_vec_extract* calls.
11062         * config/s390/vector.md (non_vec_l): New mode attribute.
11063         (vec_extract<mode>): Renamed to ...
11064         (vec_extract<mode><non_vec_l>): ... this.
11065         (vec_init<mode>): Renamed to ...
11066         (vec_init<mode><non_vec_l>): ... this.
11067         * config/s390/s390-builtins.def (s390_vlgvb, s390_vlgvh, s390_vlgvf,
11068         s390_vlgvf_flt, s390_vlgvg, s390_vlgvg_dbl): Add element mode after
11069         vec_extract mode.
11070         * config/arm/iterators.md (V_elem_l): New mode attribute.
11071         * config/arm/neon.md (vec_extract<mode>): Renamed to ...
11072         (vec_extract<mode><V_elem_l>): ... this.
11073         (vec_extractv2di): Renamed to ...
11074         (vec_extractv2didi): ... this.
11075         (vec_init<mode>): Renamed to ...
11076         (vec_init<mode><V_elem_l>): ... this.
11077         (reduc_plus_scal_<mode>, reduc_plus_scal_v2di, reduc_smin_scal_<mode>,
11078         reduc_smax_scal_<mode>, reduc_umin_scal_<mode>,
11079         reduc_umax_scal_<mode>, neon_vget_lane<mode>, neon_vget_laneu<mode>):
11080         Add element mode after gen_vec_extract* calls.
11081         * config/mips/mips-msa.md (vec_init<mode>): Renamed to ...
11082         (vec_init<mode><unitmode>): ... this.
11083         (vec_extract<mode>): Renamed to ...
11084         (vec_extract<mode><unitmode>): ... this.
11085         * config/mips/loongson.md (vec_init<mode>): Renamed to ...
11086         (vec_init<mode><unitmode>): ... this.
11087         * config/mips/mips-ps-3d.md (vec_initv2sf): Renamed to ...
11088         (vec_initv2sfsf): ... this.
11089         (vec_extractv2sf): Renamed to ...
11090         (vec_extractv2sfsf): ... this.
11091         (reduc_plus_scal_v2sf, reduc_smin_scal_v2sf, reduc_smax_scal_v2sf):
11092         Add element mode after gen_vec_extract* calls.
11093         * config/mips/mips.md (unitmode): New mode iterator.
11094         * config/spu/spu.c (spu_expand_prologue, spu_allocate_stack,
11095         spu_builtin_extract): Add element mode after gen_vec_extract* calls.
11096         * config/spu/spu.md (inner_l): New mode attribute.
11097         (vec_init<mode>): Renamed to ...
11098         (vec_init<mode><inner_l>): ... this.
11099         (vec_extract<mode>): Renamed to ...
11100         (vec_extract<mode><inner_l>): ... this.
11101         * config/sparc/sparc.md (veltmode): New mode iterator.
11102         (vec_init<VMALL:mode>): Renamed to ...
11103         (vec_init<VMALL:mode><VMALL:veltmode>): ... this.
11104         * config/ia64/vect.md (vec_initv2si): Renamed to ...
11105         (vec_initv2sisi): ... this.
11106         (vec_initv2sf): Renamed to ...
11107         (vec_initv2sfsf): ... this.
11108         (vec_extractv2sf): Renamed to ...
11109         (vec_extractv2sfsf): ... this.
11110         * config/powerpcspe/vector.md (VEC_base_l): New mode attribute.
11111         (vec_init<mode>): Renamed to ...
11112         (vec_init<mode><VEC_base_l>): ... this.
11113         (vec_extract<mode>): Renamed to ...
11114         (vec_extract<mode><VEC_base_l>): ... this.
11115         * config/powerpcspe/paired.md (vec_initv2sf): Renamed to ...
11116         (vec_initv2sfsf): ... this.
11117         * config/powerpcspe/altivec.md (splitter, altivec_copysign_v4sf3,
11118         vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi,
11119         vec_unpacku_lo_v8hi, mulv16qi3): Add element mode after mode in
11120         gen_vec_init* calls.
11121
11122 2017-08-01  Richard Biener  <rguenther@suse.de>
11123
11124         PR tree-optimization/81297
11125         * tree-vrp.c (get_single_symbol): Remove assert, instead drop
11126         TREE_OVERFLOW from INTEGER_CSTs.
11127
11128 2017-07-31  Segher Boessenkool  <segher@kernel.crashing.org>
11129
11130         * config/rs6000/rs6000.c (enum rs6000_reg_type): Delete trailing comma.
11131
11132 2017-07-31  Carl Love  <cel@us.ibm.com>
11133
11134         * config/rs6000/rs6000-c: Add support for built-in functions
11135         vector signed char vec_xl_be (signed long long, signed char *);
11136         vector unsigned char vec_xl_be (signed long long, unsigned char *);
11137         vector signed int vec_xl_be (signed long long, signed int *);
11138         vector unsigned int vec_xl_be (signed long long, unsigned int *);
11139         vector signed long long vec_xl_be (signed long long, signed long long *);
11140         vector unsigned long long vec_xl_be (signed long long, unsigned long long *);
11141         vector signed short vec_xl_be (signed long long, signed short *);
11142         vector unsigned short vec_xl_be (signed long long, unsigned short *);
11143         vector double vec_xl_be (signed long long, double *);
11144         vector float vec_xl_be (signed long long, float *);
11145         * config/rs6000/altivec.h (vec_xl_be): Add #define.
11146         * config/rs6000/rs6000-builtin.def (XL_BE_V16QI, XL_BE_V8HI, XL_BE_V4SI)
11147         XL_BE_V2DI, XL_BE_V4SF, XL_BE_V2DF, XL_BE): Add definitions
11148         for the builtins.
11149         * config/rs6000/rs6000.c (altivec_expand_xl_be_builtin): Add function.
11150         (altivec_expand_builtin): Add switch statement to call
11151         altivec_expand_xl_be for each builtin.
11152         (altivec_init_builtins): Add def_builtin for _builtin_vsx_le_be_v8hi,
11153         __builtin_vsx_le_be_v4si, __builtin_vsx_le_be_v2di,
11154         __builtin_vsx_le_be_v4sf, __builtin_vsx_le_be_v2df,
11155         __builtin_vsx_le_be_v16qi.
11156         * doc/extend.texi: Update the built-in documentation file for the
11157         new built-in functions.
11158
11159 2017-07-31  Uros Bizjak  <ubizjak@gmail.com>
11160
11161         PR target/25967
11162         * config/i386/i386.c (ix86_allocate_stack_slots_for_args):
11163         New function.
11164         (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
11165
11166 2017-07-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11167
11168         * config.gcc: Add z14.
11169         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
11170         CPU model numbers for z13s and z14.
11171         * config/s390/s390-c.c (s390_resolve_overloaded_builtin): Replace
11172         arch12 with z14.
11173         * config/s390/s390-opts.h (enum processor_type): Rename
11174         PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
11175         * config/s390/s390.c (processor_table): Add field for CPU name to
11176         be passed to Binutils.
11177         (s390_asm_output_machine_for_arch): Use the new field in
11178         processor_table for Binutils.
11179         (s390_expand_builtin): Replace arch12 with z14.
11180         (s390_issue_rate): Rename PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
11181         (s390_get_sched_attrmask): Likewise.
11182         (s390_get_unit_mask): Likewise.
11183         * config/s390/s390.opt: Add z14 to processor_type enum.
11184
11185 2017-07-31  Martin Jambor  <mjambor@suse.cz>
11186
11187         PR hsa/81477
11188         * ipa-fnsummary.c (ipa_fn_summary_generate): Set versionable
11189         regardless of optimization level.
11190
11191 2017-07-31  Jan Hubicka <hubicka@ucw.cz>
11192             Martin Liska  <mliska@suse.cz>
11193
11194         * predict.def: Remove old comment and adjust probability.
11195         * gimplify.c (should_warn_for_implicit_fallthrough): Ignore
11196         PREDICT statements.
11197
11198 2017-07-31  Uros Bizjak  <ubizjak@gmail.com>
11199
11200         PR target/25967
11201         * config/i386/i386.c (ix86_function_naked): New function.
11202         (ix86_can_use_return_insn_p): Return false for naked functions.
11203         (ix86_expand_prologue): Skip prologue for naked functions.
11204         (ix86_expand_epilogue): Skip epilogue for naked functions
11205         and emit trap instruction.
11206         (ix86_warn_func_return): New function.
11207         (ix86_attribute_table): Add "naked" attribute specification.
11208         (TARGET_WARN_FUNC_RETURN): Define.
11209         * doc/extend.texi (x86 Function Attributes) <naked>: Document it.
11210
11211 2017-07-31  Martin Liska  <mliska@suse.cz>
11212
11213         * gimple-pretty-print.c (dump_gimple_label): Never dump BB info.
11214         (dump_gimple_bb_header): Always dump BB info.
11215         (pp_cfg_jump): Do not append info about BB when dumping a jump.
11216
11217 2017-07-31  Martin Liska  <mliska@suse.cz>
11218
11219         PR sanitize/81530
11220         * convert.c (convert_to_integer_1): Guard condition with flag_sanitize_p
11221         also with current_function_decl non-null equality.
11222
11223 2017-07-31  Jakub Jelinek  <jakub@redhat.com>
11224
11225         PR sanitizer/81604
11226         * ubsan.c (ubsan_type_descriptor): For UBSAN_PRINT_ARRAY don't
11227         change type to the element type, instead add eltype variable and
11228         use it where we are interested in the element type.
11229
11230         PR tree-optimization/81603
11231         * ipa-polymorphic-call.c
11232         (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Perform
11233         offset arithmetic in offset_int, bail out if the resulting bit offset
11234         doesn't fit into shwi.
11235
11236 2017-07-31  Martin Liska  <mliska@suse.cz>
11237
11238         * gimplify.c (mostly_copy_tree_r): Remove Java specific hunk.
11239         (gimplify_save_expr): Fix comment.
11240
11241 2017-07-30  H.J. Lu  <hongjiu.lu@intel.com>
11242
11243         PR target/79793
11244         * config/i386/i386.c (ix86_function_arg): Update arguments for
11245         exception handler.
11246         (ix86_compute_frame_layout): Set the initial stack offset to
11247         INCOMING_FRAME_SP_OFFSET.  Update red-zone offset with
11248         INCOMING_FRAME_SP_OFFSET.
11249         (ix86_expand_epilogue): Don't pop the 'ERROR_CODE' off the
11250         stack before exception handler returns.
11251         * config/i386/i386.h (INCOMING_FRAME_SP_OFFSET): Add the
11252         the 'ERROR_CODE' for exception handler.
11253
11254 2017-07-30  Uros Bizjak  <ubizjak@gmail.com>
11255
11256         * config/i386/i386.h (ASM_PRINTF_EXTENSIONS): New macro.
11257         (ASM_OUTPUT_REG_PUSH): Rewrite with new operand modifiers.
11258         (ASM_OUTPUT_REG_POP): Ditto.
11259         * config/i386/i386.c (ix86_asm_output_function_label): Use fputs
11260         instead of asm_fprintf to output pure string.
11261
11262 2017-07-29  Jakub Jelinek  <jakub@redhat.com>
11263
11264         * debug.h (struct gcc_debug_hooks): Add IMPLICIT argument
11265         to imported_module_or_decl hook.
11266         (debug_nothing_tree_tree_tree_bool): Remove.
11267         (debug_nothing_tree_tree_tree_bool_bool): New declaration.
11268         * debug.c (do_nothing_debug_hooks): Use
11269         debug_nothing_tree_tree_tree_bool_bool instead of
11270         debug_nothing_tree_tree_tree_bool.
11271         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
11272         * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
11273         * sdbout.c (sdb_debug_hooks): Likewise.
11274         * dwarf2out.c (dwarf2_lineno_debug_hooks): Likewise.
11275         (gen_namespace_die): Add DW_AT_export_symbols attribute if
11276         langhook wants it.
11277         (dwarf2out_imported_module_or_decl): Add IMPLICIT argument,
11278         if true, -gdwarf-5 and decl will have DW_AT_export_symbols
11279         attribute, don't add anything.
11280
11281 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11282
11283         * fold-const.c (fold_build1_stat_loc): Remove _stat from name.
11284         (fold_build2_stat_loc): Likewise.
11285         (fold_build3_stat_loc): Likewise.
11286         * fold-const.h (fold_build1, fold_build2, fold_build3): Adjust.
11287         (fold_build1_loc): Remove macro.
11288         (fold_build2_loc): Likewise.
11289         (fold_build3_loc): Likewise.
11290
11291 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11292
11293         * gimple.c (gimple_build_debug_bind_stat): Remove _stat from name.
11294         (gimple_build_debug_bind_source_stat): Likewise.
11295         * gimple.h (gimple_build_debug_bind): Remove macro.
11296         (gimple_build_debug_bind_source): Likewise.
11297
11298 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11299
11300         * bitmap.c (bitmap_alloc): Adjust.
11301         (bitmap_gc_alloc): Likewise.
11302         * bitmap.h (bitmap_initialize_stat): Remove _stat from name.
11303
11304 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11305
11306         * bitmap.c (bitmap_obstack_alloc_stat): Rename to bitmap_alloc.
11307         (bitmap_gc_alloc_stat): Rename to bitmap_gc_alloc.
11308         * bitmap.h (bitmap_obstack_alloc_stat): Adjust prototype.
11309         (bitmap_gc_alloc_stat): Likewise.
11310         (BITMAP_ALLOC, BITMAP_GGC_ALLOC): Adjust.
11311
11312 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11313
11314         * rtl.c (shallow_copy_rtx_stat): Remove _stat from name.
11315         * rtl.h (shallow_copy_rtx): Remove macro.
11316
11317 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11318
11319         * emit-rtl.c (gen_raw_REG): Adjust.
11320         * gengenrtl.c (gendef): Likewise.
11321         * rtl.c (rtx_alloc_stat): Remove _stat from name.
11322         * rtl.h (rtx_alloc): Remove macro.
11323
11324 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11325
11326         * tree.c (build_tree_list_vec_stat): Remove _stat from name.
11327         (build_tree_list_stat): Likewise.
11328         * tree.h (build_tree_list): Remove macro.
11329         (build_tree_list_vec): Likewise.
11330
11331 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11332
11333         * tree.c (make_vector_stat): Remove _stat from name.
11334         (build_vector_stat): Likewise.
11335         * tree.h (make_vector_stat): Remove macro.
11336         (build_vector_stat): Likewise.
11337
11338 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11339
11340         * tree.h (build_var_debug_value): Remove prototype.
11341
11342 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11343
11344         * tree.c (tree_cons_stat): Remove _stat from name.
11345         * tree.h (tree_cons): Remove macro.
11346
11347 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11348
11349         * tree.c (build_vl_exp_stat): Remove _stat from name.
11350         * tree.h (build_vl_exp): Remove macro.
11351
11352 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11353
11354         * tree.c (build_decl_stat): Remove _stat from name.
11355         * tree.h (build_decl): Remove macro.
11356
11357 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11358
11359         * gimple.c (gimple_build_with_ops_stat): Adjust.
11360         (gimple_alloc_stat): Remove _stat from name.
11361         * gimple.h (gimple_alloc): Remove macro.
11362
11363 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11364
11365         * tree.c (make_tree_vec_stat): Remove _stat from name.
11366         (grow_tree_vec_stat): Likewise.
11367         * tree.h (make_tree_vec_stat): Adjust prototype.
11368         (grow_tree_vec_stat): Likewise.
11369         (make_tree_vec): Remove macro.
11370         (grow_tree_vec): Likewise.
11371
11372 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11373
11374         * fold-const.c (fold_build1_stat_loc): Adjust.
11375         (fold_build2_stat_loc): Likewise.
11376         (fold_build3_stat_loc): Likewise.
11377         * tree.c (build0_stat): Remove _stat from name.
11378         (build1_stat): Likewise.
11379         (build2_stat): Likewise.
11380         (build3_stat): Likewise.
11381         (build4_stat): Likewise.
11382         (build5_stat): Likewise.
11383         * tree.h (build1_loc): Remove macro, and rename _stat function
11384         to this.
11385         (build2_loc): Likewise.
11386         (build3_loc): Likewise.
11387         (build4_loc): Likewise.
11388         (build5_loc): Likewise.
11389
11390 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11391
11392         * tree.c (make_int_cst_stat): Remove _stat from name.
11393         * tree.h (make_int_cst_stat): Adjust prototype.
11394         (make_int_cst): Remove macro.
11395
11396 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11397
11398         * tree.c (make_tre_binfo_stat): Remove _stat from name.
11399         * tree.h (make_tree_binfo_stat): Adjust prototype.
11400         (make_tree_binfo): Remove.
11401
11402 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11403
11404         * tree.c (copy_node_stat): Rename to copy_node.
11405         (build_distinct_type_copy): Adjust.
11406         * tree.h (copy_node_stat): Adjust prototype.
11407         (copy_node): Remove macro.
11408
11409 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11410
11411         * tree.c (make_node_stat): rename to make_node.
11412         (build_tree_list_stat): Adjust.
11413         (build0_stat): Likewise.
11414         (build2_stat): Likewise.
11415         (build3_stat): Likewise.
11416         (build4_stat): Likewise.
11417         (build5_stat): Likewise.
11418         (build_decl_stat): Likewise.
11419         * tree.h (make_node_stat): Adjust prototype.
11420         (make_node): remove macro.
11421
11422 2017-07-28  Peter Bergner  <bergner@vnet.ibm.com>
11423
11424         * config/rs6000/ppc-auxv.h (PPC_FEATURE2_DARN): New define.
11425         (PPC_FEATURE2_SCV): Likewise.
11426         * config/rs6000/rs6000.c (cpu_supports_info): Use them.
11427
11428 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
11429
11430         * config/aarch64/aarch64.c
11431         (aarch64_internal_mov_immediate): Add new special pattern.
11432         * config/aarch64/aarch64.md (*movdi_aarch64):
11433         Add reg/32bit const mov case.
11434
11435 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
11436             Richard Sandiford <richard.sandiford@linaro.org>
11437
11438         * config/aarch64/aarch64.md (mov<mode>): Generalize.
11439         (*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
11440         Add integer and movi cases.
11441         (movi-split-hf-df-sf split, fp16): New.
11442         (enabled): Added TARGET_FP_F16INST.
11443         * config/aarch64/iterators.md (GPF_HF): New.
11444         * config/aarch64/predicates.md (aarch64_reg_or_fp_float): New.
11445
11446 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
11447
11448         * config/aarch64/aarch64.c
11449         (aarch64_simd_container_mode): Add prototype.
11450         (aarch64_expand_mov_immediate): Add HI support.
11451         (aarch64_reinterpret_float_as_int, aarch64_float_const_rtx_p: New.
11452         (aarch64_can_const_movi_rtx_p): New.
11453         (aarch64_preferred_reload_class):
11454         Remove restrictions of using FP registers for certain SIMD operations.
11455         (aarch64_rtx_costs): Added new cost for CONST_DOUBLE moves.
11456         (aarch64_valid_floating_const): Add integer move validation.
11457         (aarch64_simd_imm_scalar_p): Remove.
11458         (aarch64_output_scalar_simd_mov_immediate): Generalize function.
11459         (aarch64_legitimate_constant_p): Expand list of supported cases.
11460         * config/aarch64/aarch64-protos.h
11461         (aarch64_float_const_rtx_p, aarch64_can_const_movi_rtx_p): New.
11462         (aarch64_reinterpret_float_as_int): New.
11463         (aarch64_simd_imm_scalar_p): Remove.
11464         * config/aarch64/constraints.md (Uvi): New.
11465         (Dd): Split into Ds and new Dd.
11466         * config/aarch64/aarch64.md (*movsi_aarch64):
11467         Add SIMD mov case.
11468         (*movdi_aarch64): Add SIMD mov case.
11469
11470 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
11471
11472         * tree-predcom.c: (struct chain): Handle store-store chain in which
11473         stores for elimination only store loop invariant values.
11474         (execute_pred_commoning_chain): Ditto.
11475         (prepare_initializers_chain_store_elim): Ditto.
11476         (prepare_finalizers): Ditto.
11477         (is_inv_store_elimination_chain): New function.
11478         (initialize_root_vars_store_elim_1): New function.
11479
11480 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
11481
11482         * tree-predcom.c: Revise general description of the pass.
11483         (enum chain_type): New enum type for store elimination.
11484         (struct chain): New field supporting store elimination.
11485         (struct component): Ditto.
11486         (dump_chain): Dump store-stores chain.
11487         (release_chain): Release resources.
11488         (split_data_refs_to_components): Compute and create component
11489         contains only stores for elimination.
11490         (get_chain_last_ref_at): New function.
11491         (make_invariant_chain): Initialization.
11492         (make_rooted_chain): Specify chain type in parameter and record it.
11493         (add_looparound_copies): Skip for store-stores chain.
11494         (determine_roots_comp): Compute type of chain and pass it to
11495         make_rooted_chain.
11496         (initialize_root_vars_store_elim_2): New function.
11497         (finalize_eliminated_stores): New function.
11498         (remove_stmt): Handle store for elimination.
11499         (execute_pred_commoning_chain): Execute predictive commoning on
11500         store-store chains.
11501         (determine_unroll_factor): Skip unroll for store-stores chain.
11502         (prepare_initializers_chain_store_elim): New function.
11503         (prepare_initializers_chain): Hanlde store-store chain.
11504         (prepare_finalizers_chain, prepare_finalizers): New function.
11505         (tree_predictive_commoning_loop): Return integer value indicating
11506         if loop is unrolled or lcssa form is corrupted.
11507         (tree_predictive_commoning): Rewrite for lcssa form if necessary.
11508
11509 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
11510
11511         * tree-predcom.c (initialize_root): Delete.
11512         (execute_pred_commoning_chain): Initialize root vars and replace
11513         reference of non-combined chain directly, rather than call above
11514         function.
11515
11516 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
11517
11518         * tree-predcom.c (ref_at_iteration): Add parameter NITERS.  Compute
11519         memory reference to DR at (NITERS + ITERS)-th iteration of loop.
11520
11521 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
11522
11523         * tree-predcom.c (struct chain): New field init_seq.
11524         (release_chain): Release init_seq.
11525         (prepare_initializers_chain): Record intialization stmts in above
11526         field.
11527         (insert_init_seqs): New function.
11528         (tree_predictive_commoning_loop): Call insert_init_seqs.
11529
11530 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
11531
11532         * tree-predcom.c (determine_roots_comp): Skip trivial components.
11533
11534 2017-07-28  Richard Biener  <rguenther@suse.de>
11535
11536         * match.pd: Remove superfluous :c.
11537         * genmatch.c (simplify::id): Add member.
11538         (lower_commutative, lower_opt_convert, lower_cond, lower_for):
11539         Copy id.
11540         (current_id): New global.
11541         (dt_node::parent): Move from ...
11542         (dt_operand::parent): ... here.  Add for_id member.
11543         (is_a_helper <dt_operand *>::test): DT_TRUE is also a dt_operand.
11544         (decision_tree::find_node): Relax order requirement when
11545         merging DT_TRUE nodes to ones inbetween the current simplify
11546         and the one we try to merge with.  Add diagnostic whenever
11547         we need to enforce pattern order by not merging.
11548         (decision_tree::insert): Set current_id.
11549         (decision_tree::print_node): Dump parent node and for_id.
11550         (parser::last_id): Add member.
11551         (parser::push_simplify): Assign unique id.
11552         (parser::parser): Initialize last_id.
11553
11554 2017-07-28  Martin Liska  <mliska@suse.cz>
11555
11556         PR sanitizer/81340
11557         * sanopt.c (sanitize_rewrite_addressable_params): Set VALUE_EXPR after
11558         gimple_build_debug_bind.
11559
11560 2017-07-28  Richard Biener  <rguenther@suse.de>
11561
11562         PR tree-optimization/81502
11563         * match.pd: Add pattern combining BIT_INSERT_EXPR with
11564         BIT_FIELD_REF.
11565         * tree-cfg.c (verify_expr): Verify types of BIT_FIELD_REF
11566         size/pos operands.
11567         (verify_gimple_assign_ternary): Likewise for BIT_INSERT_EXPR pos.
11568         * gimple-fold.c (maybe_canonicalize_mem_ref_addr): Use bitsizetype
11569         for BIT_FIELD_REF args.
11570         * fold-const.c (make_bit_field_ref): Likewise.
11571         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
11572
11573 2017-07-28  Jakub Jelinek  <jakub@redhat.com>
11574
11575         PR sanitizer/80998
11576         * sanopt.c (pass_sanopt::execute): Handle IFN_UBSAN_PTR.
11577         * tree-ssa-alias.c (call_may_clobber_ref_p_1): Likewise.
11578         * flag-types.h (enum sanitize_code): Add SANITIZER_POINTER_OVERFLOW.
11579         Or it into SANITIZER_UNDEFINED.
11580         * ubsan.c: Include gimple-fold.h and varasm.h.
11581         (ubsan_expand_ptr_ifn): New function.
11582         (instrument_pointer_overflow): New function.
11583         (maybe_instrument_pointer_overflow): New function.
11584         (instrument_object_size): Formatting fix.
11585         (pass_ubsan::execute): Call instrument_pointer_overflow
11586         and maybe_instrument_pointer_overflow.
11587         * internal-fn.c (expand_UBSAN_PTR): New function.
11588         * ubsan.h (ubsan_expand_ptr_ifn): Declare.
11589         * sanitizer.def (__ubsan_handle_pointer_overflow,
11590         __ubsan_handle_pointer_overflow_abort): New builtins.
11591         * tree-ssa-tail-merge.c (merge_stmts_p): Handle IFN_UBSAN_PTR.
11592         * internal-fn.def (UBSAN_PTR): New internal function.
11593         * opts.c (sanitizer_opts): Add pointer-overflow.
11594         * lto-streamer-in.c (input_function): Handle IFN_UBSAN_PTR.
11595         * fold-const.c (build_range_check): Compute pointer range check in
11596         integral type if pointer arithmetics would be needed.  Formatting
11597         fixes.
11598
11599 2017-07-28  Martin Liska  <mliska@suse.cz>
11600
11601         PR sanitizer/81460
11602         * sanopt.c (sanitize_rewrite_addressable_params): Do not rewrite
11603         parameters that are of a variable-length.
11604
11605 2017-07-28  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11606
11607         * config.gcc (powerpc-*-rtems*): Remove rs6000/eabi.h.  Add
11608         rs6000/biarch64.h.
11609         * config/rs6000/rtems.h (ASM_DECLARE_FUNCTION_SIZE): New macro.
11610         (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise.
11611         (CRT_CALL_STATIC_FUNCTION): Likewise.
11612         (ASM_DEFAULT_SPEC): New define.
11613         (ASM_SPEC32): Likewise.
11614         (ASM_SPEC64): Likewise.
11615         (ASM_SPEC_COMMON): Likewise.
11616         (ASM_SPEC): Likewise.
11617         (INVALID_64BIT): Likewise.
11618         (LINK_OS_DEFAULT_SPEC): Likewise.
11619         (LINK_OS_SPEC32): Likewise.
11620         (LINK_OS_SPEC64): Likewise.
11621         (POWERPC_LINUX): Likewise.
11622         (PTRDIFF_TYPE): Likewise.
11623         (RESTORE_FP_PREFIX): Likewise.
11624         (RESTORE_FP_SUFFIX): Likewise.
11625         (SAVE_FP_PREFIX): Likewise.
11626         (SAVE_FP_SUFFIX): Likewise.
11627         (SIZE_TYPE): Likewise.
11628         (SUBSUBTARGET_OVERRIDE_OPTIONS): Likewise.
11629         (TARGET_64BIT): Likewise.
11630         (TARGET_64BIT): Likewise.
11631         (TARGET_AIX): Likewise.
11632         (WCHAR_TYPE_SIZE): Likewise.
11633         (WCHAR_TYPE): Undefine.
11634         (TARGET_OS_CPP_BUILTINS): Add 64-bit PowerPC defines.
11635         (CPP_OS_DEFAULT_SPEC): Use previous CPP_OS_RTEMS_SPEC.
11636         (CPP_OS_RTEMS_SPEC): Delete.
11637         (SUBSUBTARGET_EXTRA_SPECS): Remove cpp_os_rtems.  Add
11638         asm_spec_common, asm_spec32, asm_spec64, link_os_spec32, and
11639         link_os_spec64.
11640         * config/rs6000/t-rtems: Add mcpu=e6500/m64 multilibs.
11641
11642 2017-07-28  Jakub Jelinek  <jakub@redhat.com>
11643
11644         PR tree-optimization/81578
11645         * tree-parloops.c (build_new_reduction): Bail out if
11646         reduction_code isn't one of the standard OpenMP reductions.
11647         Move the details printing after that decision.
11648
11649 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
11650
11651         * config/rs6000/predicates.md (volatile_mem_operand): Remove code
11652         related to reload_in_progress.
11653         (splat_input_operand): Likewise.
11654         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_rtx):
11655         Delete prototype.
11656         * config/rs6000/rs6000.c (machine_function): Remove sdmode_stack_slot
11657         field.
11658         (TARGET_EXPAND_TO_RTL_HOOK): Delete.
11659         (TARGET_INSTANTIATE_DECLS): Likewise.
11660         (legitimate_indexed_address_p): Delete reload_in_progress code.
11661         (rs6000_debug_legitimate_address_p): Likewise.
11662         (rs6000_eliminate_indexed_memrefs): Likewise.
11663         (rs6000_emit_le_vsx_store): Likewise.
11664         (rs6000_emit_move_si_sf_subreg): Likewise.
11665         (rs6000_emit_move): Likewise.
11666         (register_to_reg_type): Likewise.
11667         (rs6000_pre_atomic_barrier): Likewise.
11668         (rs6000_machopic_legitimize_pic_address): Likewise.
11669         (rs6000_allocate_stack_temp): Likewise.
11670         (rs6000_address_for_fpconvert): Likewise.
11671         (rs6000_address_for_altivec): Likewise.
11672         (rs6000_secondary_memory_needed_rtx): Delete function.
11673         (rs6000_check_sdmode): Likewise.
11674         (rs6000_alloc_sdmode_stack_slot): Likewise.
11675         (rs6000_instantiate_decls): Likewise.
11676         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED_RTX): Delete.
11677         * config/rs6000/rs6000.md (splitter for *movsi_got_internal):
11678         Delete reload_in_progress.
11679         (*vec_reload_and_plus_<mptrsize>): Likewise.
11680         * config/rs6000/vsx.md (vsx_mul_v2di): Likewise.
11681         (vsx_div_v2di): Likewise.
11682         (vsx_udiv_v2di): Likewise.
11683
11684 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
11685
11686         * config/rs6000/rs6000.opt (mlra): Replace with stub.
11687         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete OPTION_MASK_LRA.
11688         * config/rs6000/rs6000.c (TARGET_LRA_P): Delete.
11689         (rs6000_debug_reg_global): Delete print of LRA status.
11690         (rs6000_option_override_internal): Delete dead LRA related code.
11691         (rs6000_lra_p): Delete function.
11692         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mlra.
11693
11694 2017-07-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11695
11696         * config.gcc (riscv*-*-elf*): Add (riscv*-*-rtems*).
11697         * config/riscv/rtems.h: New file.
11698
11699 2017-07-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11700             Sudakshina Das  <sudi.das@arm.com>
11701
11702         * config/aarch64/aarch64.md
11703         (define_split for and<mode>3nr_compare): Move
11704         non aarch64_logical_operand to a register.
11705         (define_split for and_<SHIFT:optab><mode>3nr_compare0): Move non
11706         register immediate operand to a register.
11707         * config/aarch64/predicates.md (aarch64_mov_imm_operand): New.
11708
11709 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
11710
11711         PR middle-end/81564
11712         * tree-cfg.c (group_case_labels_stmt): Handle already deleted blocks.
11713
11714 2017-07-27  Richard Biener  <rguenther@suse.de>
11715
11716         PR tree-optimization/81573
11717         PR tree-optimization/81494
11718         * tree-vect-loop.c (vect_create_epilog_for_reduction): Handle
11719         multi defuse cycle case.
11720
11721 2017-07-27  Richard Biener  <rguenther@suse.de>
11722
11723         PR tree-optimization/81571
11724         * tree-vect-slp.c (vect_build_slp_tree): Properly verify reduction
11725         PHIs.
11726
11727 2017-07-27  Eric Botcazou  <ebotcazou@adacore.com>
11728
11729         * config/sparc/sparc.c (sparc_option_override): Set MASK_FSMULD flag
11730         earlier and only if MASK_FPU is set.  Adjust formatting.
11731
11732 2017-07-27  Martin Liska  <mliska@suse.cz>
11733
11734         * opt-functions.awk: Add validation of value of Init.
11735         * optc-gen.awk: Pass new argument.
11736
11737 2017-07-27  Martin Liska  <mliska@suse.cz>
11738
11739         * auto-profile.c (autofdo_source_profile::update_inlined_ind_target):
11740         Fix wrong condition.
11741
11742 2017-07-27  Martin Liska  <mliska@suse.cz>
11743
11744         * auto-profile.c (afdo_annotate_cfg): Assign zero counts to
11745         BBs and edges seen by autoFDO.
11746
11747 2017-07-27  Richard Biener  <rguenther@suse.de>
11748
11749         PR tree-optimization/81502
11750         * tree-ssa.c (non_rewritable_lvalue_p): Handle BIT_INSERT_EXPR
11751         with incompatible but same sized type.
11752         (execute_update_addresses_taken): Likewise.
11753
11754 2017-07-27  James Greenhalgh  <james.greenhalgh@arm.com>
11755
11756         * tree-ssa-loop-ch.c (pass_ch::process_loop_p): Guard on
11757         flag_tree_loop_vectorize rather than flag_tree_vectorize.
11758
11759 2017-07-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11760
11761         PR target/81534
11762         * config/s390/s390.md ("*atomic_compare_and_swap<mode>_1")
11763         ("*atomic_compare_and_swapdi_2", "*atomic_compare_and_swapsi_3"):
11764         Change s_operand to memory_operand.
11765
11766 2017-07-27  Richard Sandiford  <richard.sandiford@linaro.org>
11767
11768         * config/rs6000/rs6000-protos.h (rs6000_emit_le_vsx_permute): Declare.
11769         * config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Replace with...
11770         (rs6000_emit_le_vsx_permute): ...this.  Take the destination as input.
11771         Emit instructions rather than returning an expression.  Handle TFmode
11772         and KFmode by casting to TImode.
11773         (rs6000_emit_le_vsx_load): Update to use rs6000_emit_le_vsx_permute.
11774         (rs6000_emit_le_vsx_store): Likewise.
11775         * config/rs6000/vsx.md (VSX_TI): New iterator.
11776         (*vsx_le_permute_<mode>): Use it instead of VSX_LE_128.
11777         (*vsx_le_undo_permute_<mode>): Likewise.
11778         (*vsx_le_perm_load_<mode>): Use rs6000_emit_le_vsx_permute to
11779         emit the split sequence.
11780         (*vsx_le_perm_store_<mode>): Likewise.
11781
11782 2017-07-27  Jakub Jelinek  <jakub@redhat.com>
11783
11784         PR tree-optimization/81555
11785         PR tree-optimization/81556
11786         * tree-ssa-reassoc.c (rewrite_expr_tree): Add NEXT_CHANGED argument,
11787         if true, force CHANGED for the recursive invocation.
11788         (reassociate_bb): Remember original length of ops array, pass
11789         len != orig_len as NEXT_CHANGED in rewrite_expr_tree call.
11790
11791         * attribs.c (decl_attributes): Imply noinline, noclone and no_icf
11792         attributes for noipa attribute.  For naked attribute use
11793         lookup_attribute first before lookup_attribute_spec.
11794         * final.c (rest_of_handle_final): Disable IPA RA for functions with
11795         noipa attribute.
11796         * ipa-visibility.c (non_local_p): Fix comment typos.  Return true
11797         for functions with noipa attribute.
11798         (cgraph_externally_visible_p): Return true for functions with noipa
11799         attribute.
11800         * cgraph.c (cgraph_node::get_availability): Return AVAIL_INTERPOSABLE
11801         for functions with noipa attribute.
11802         * doc/extend.texi: Document noipa function attribute.
11803         * tree-ssa-structalias.c (refered_from_nonlocal_fn): Set *nonlocal_p
11804         also for functions with noipa attribute.
11805         (ipa_pta_execute): Set nonlocal_p also for nodes with noipa attribute.
11806
11807 2017-07-26  Andrew Pinski  <apinski@cavium.com>
11808
11809         * config/aarch64/aarch64.c (thunderx_vector_cost): Decrease cost of
11810         vec_unalign_load_cost and vec_unalign_store_cost.
11811
11812 2017-07-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
11813
11814         * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Delete
11815         -mvsx-small-integer option.
11816         (ISA_3_0_MASKS_IEEE): Likewise.
11817         (OTHER_VSX_VECTOR_MASKS): Likewise.
11818         (POWERPC_MASKS): Likewise.
11819         * config/rs6000/rs6000.opt (-mvsx-small-integer): Likewise.
11820         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Simplify
11821         code, only testing for DImode being allowed in non-VSX floating
11822         point registers.
11823         (rs6000_init_hard_regno_mode_ok): Change TARGET_VSX_SMALL_INTEGER
11824         to TARGET_P8_VECTOR test.  Remove redundant VSX test inside of
11825         another VSX test.
11826         (rs6000_option_override_internal): Delete -mvsx-small-integer.
11827         (rs6000_expand_vector_set): Change TARGET_VSX_SMALL_INTEGER to
11828         TARGET_P8_VECTOR test.
11829         (rs6000_secondary_reload_simple_move): Likewise.
11830         (rs6000_preferred_reload_class): Delete TARGET_VSX_SMALL_INTEGER,
11831         since TARGET_P9_VECTOR was already tested.
11832         (rs6000_opt_masks): Remove -mvsx-small-integer.
11833         * config/rs6000/vsx.md (vsx_extract_<mode>): Delete
11834         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
11835         used.
11836         (vsx_extract_<mode>_p9): Delete TARGET_VSX_SMALL_INTEGER, since a
11837         test for TARGET_VEXTRACTUB was used, and that uses
11838         TARGET_P9_VECTOR.
11839         (p9 extract splitter): Likewise.
11840         (vsx_extract_<mode>_di_p9): Likewise.
11841         (vsx_extract_<mode>_store_p9): Likewise.
11842         (vsx_extract_si): Delete TARGET_VSX_SMALL_INTEGER, since a test
11843         for TARGET_P9_VECTOR was used.  Delete code that is now dead with
11844         the elimination of TARGET_VSX_SMALL_INTEGER.
11845         (vsx_extract_<mode>_p8): Likewise.
11846         (vsx_ext_<VSX_EXTRACT_I:VS_scalar>_fl_<FL_CONV:mode>): Likewise.
11847         (vsx_ext_<VSX_EXTRACT_I:VS_scalar>_ufl_<FL_CONV:mode>): Likewise.
11848         (vsx_set_<mode>_p9): Likewise.
11849         (vsx_set_v4sf_p9): Likewise.
11850         (vsx_set_v4sf_p9_zero): Likewise.
11851         (vsx_insert_extract_v4sf_p9): Likewise.
11852         (vsx_insert_extract_v4sf_p9_2): Likewise.
11853         * config/rs6000/rs6000.md (sign extend splitter): Change
11854         TARGET_VSX_SMALL_INTEGER to TARGET_P8_VECTOR test.
11855         (floatsi<mode>2_lfiwax_mem): Likewise.
11856         (floatunssi<mode>2_lfiwzx_mem): Likewise.
11857         (float<QHI:mode><FP_ISA3:mode>2): Delete TARGET_VSX_SMALL_INTEGER,
11858         since a test for TARGET_P9_VECTOR was used.
11859         (float<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
11860         (floatuns<QHI:mode><FP_ISA3:mode>2): Likewise.
11861         (floatuns<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
11862         (fix_trunc<mode>si2): Change TARGET_VSX_SMALL_INTEGER to
11863         TARGET_P8_VECTOR test.
11864         (fix_trunc<mode>si2_stfiwx): Likewise.
11865         (fix_trunc<mode>si2_internal): Likewise.
11866         (fix_trunc<SFDF:mode><QHI:mode>2): Delete
11867         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
11868         used.
11869         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
11870         (fixuns_trunc<mode>si2): Change TARGET_VSX_SMALL_INTEGER to
11871         TARGET_P8_VECTOR test.
11872         (fixuns_trunc<mode>si2_stfiwx): Likewise.
11873         (fixuns_trunc<SFDF:mode><QHI:mode>2): Delete
11874         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
11875         used.
11876         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
11877         (fctiw<u>z_<mode>_smallint): Delete TARGET_VSX_SMALL_INTEGER,
11878         since a test for TARGET_P9_VECTOR was used.
11879         (splitter for loading small constants): Likewise.
11880
11881 2017-07-26  Andrew Pinski  <apinski@cavium.com>
11882
11883         * config/aarch64/aarch64.c (thunderx_vector_cost): Fix
11884         vec_fp_stmt_cost.
11885
11886 2017-07-26  H.J. Lu  <hongjiu.lu@intel.com>
11887
11888         PR target/81563
11889         * config/i386/i386.c (sp_valid_at): Properly check CFA offset.
11890         (fp_valid_at): Likewise.
11891
11892 2017-07-26  James Greenhalgh  <james.greenhalgh@arm.com>
11893
11894         * config/aarch64/aarch64.c (cortexa57_addrcost_table): Remove.
11895         (qdf24xx_addrcost_table): Likewise.
11896         (cortexa57_tunings): Update to use generic_branch_cost.
11897         (cortexa72_tunings): Likewise.
11898         (cortexa73_tunings): Likewise.
11899         (qdf24xx_tunings): Likewise.
11900
11901 2017-07-26  James Greenhalgh  <james.greenhalgh@arm.com>
11902
11903         * config/aarch64/aarch64.c (cortexa57_branch_cost): Remove.
11904         (thunderx2t99_branch_cost): Likewise.
11905         (cortexa35_tunings): Update to use generic_branch_cost.
11906         (cortexa53_tunings): Likewise.
11907         (cortexa57_tunings): Likewise.
11908         (cortexa72_tunings): Likewise.
11909         (cortexa73_tunings): Likewise.
11910         (thunderx2t99_tunings): Likewise.
11911
11912 2017-07-26  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11913
11914         * config/sparc/sparc.c (dump_target_flag_bits): Dump MASK_FSMULD.
11915         (sparc_option_override): Honour MASK_FSMULD.
11916         * config/sparc/sparc.h (MASK_FEATURES): Add MASK_FSMULD.
11917         * config/sparc/sparc.md (muldf3_extend): Use TARGET_FSMULD.
11918         * config/sparc/sparc.opt (mfsmuld): New option.
11919         * doc/invoke.texi (mfsmuld): Document option.
11920
11921 2017-07-26  Marek Polacek  <polacek@redhat.com>
11922
11923         PR middle-end/70992
11924         * tree.c (build2_stat): Don't set TREE_CONSTANT on divisions by zero.
11925
11926 2017-07-26  Richard Biener  <rguenther@suse.de>
11927
11928         * gimple-match-head.c (do_valueize): Return OP if valueize
11929         returns NULL_TREE.
11930         (get_def): New helper to get at the def stmt of a SSA name
11931         if valueize allows.
11932         * genmatch.c (dt_node::gen_kids_1): Use get_def instead of
11933         do_valueize to get at the def stmt.
11934         (dt_operand::gen_gimple_expr): Simplify do_valueize calls.
11935
11936 2017-07-26  Wilco Dijkstra  <wdijkstr@arm.com>
11937
11938         PR middle-end/46932
11939         * auto-inc-dec.c (parse_add_or_inc): Block autoinc on sfp.
11940
11941 2017-07-26  Martin Liska  <mliska@suse.cz>
11942
11943         PR sanitize/81186
11944         * function.c (expand_function_start): Make expansion of
11945         nonlocal_goto_save_area after parm_birth_insn.
11946
11947 2017-07-26  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11948
11949         * config/sparc/sparc.c (sparc_option_override): Remove MASK_FPU
11950         from all CPU target flags enable members.
11951
11952 2017-07-26  Richard Biener  <rguenther@suse.de>
11953
11954         * genmatch.c (dt_simplify::gen): Make iterator vars const.
11955         (decision_tree::gen): Make 'type' const.
11956         (write_predicate): Likewise.
11957
11958 2017-07-24  Michael Meissner  <meissner@linux.vnet.ibm.com>
11959
11960         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok):
11961         Eliminate TARGET_UPPER_REGS_{DF,DI,SF} usage.
11962         (rs6000_option_override_internal): Likewise.
11963         (rs6000_expand_vector_set): Likewise.
11964         * config/rs6000/rs6000.h (TARGET_UPPER_REGS_DF): Delete.
11965         (TARGET_UPPER_REGS_SF): Likewise.
11966         (TARGET_UPPER_REGS_DI): Likewise.
11967         (TARGET_VEXTRACTUB): Eliminate TARGET_UPPER_REGS_{DF,DI,SF}.
11968         (TARGET_DIRECT_MOVE_64BIT): Likewise.
11969         * config/rs6000/rs6000.md (ALTIVEC_DFORM): Likewise.
11970         (float<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
11971         (Splitters for DI constants in Altivec registers): Likewise.
11972         * config/rs6000/vsx.md (vsx_set_<mode>_p9): Likewise.
11973         (vsx_set_v4sf_p9): Likewise.
11974         (vsx_set_v4sf_p9_zero): Likewise.
11975         (vsx_insert_extract_v4sf_p9): Likewise.
11976         (vsx_insert_extract_v4sf_p9_2): Likewise.
11977
11978 2017-07-25  Carl Love  <cel@us.ibm.com>
11979
11980         * doc/extend.texi: Update the built-in documentation file for the
11981         existing built-in functions
11982         vector signed char vec_cnttz (vector signed char);
11983         vector unsigned char vec_cnttz (vector unsigned char);
11984         vector signed short vec_cnttz (vector signed short);
11985         vector unsigned short vec_cnttz (vector unsigned short);
11986         vector signed int vec_cnttz (vector signed int);
11987         vector unsigned int vec_cnttz (vector unsigned int);
11988         vector signed long long vec_cnttz (vector signed long long);
11989         vector unsigned long long vec_cnttz (vector unsigned long long);
11990
11991 2017-07-25  Andrew Pinski  <apinski@cavium.com>
11992
11993         * tree-ssa-uninit.c (warn_uninitialized_vars): Don't warn about memory
11994         accesses where the use is for the first operand of a BIT_INSERT.
11995
11996 2017-07-25  Jim Wilson  <jim.wilson@linaro.org>
11997
11998         PR bootstrap/81521
11999         * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
12000         for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
12001
12002 2017-07-25  Jim Wilson  <jim.wilson@linaro.org>
12003
12004         * config/i386/gstabs.h: Delete.
12005         * config/i386/openbsd.h, config/i386/t-openbsd: Likewise.
12006
12007 2017-07-25  Uros Bizjak  <ubizjak@gmail.com>
12008
12009         * config/i386/i386.c (ix86_decompose_address): Do not check for
12010         register RTX when looking at index_reg or base_reg.
12011         * config/i386/i386.h (INCOMING_RETURN_ADDR_RTX): Use stack_pointer_rtx.
12012
12013 2017-07-25  Eric Botcazou  <ebotcazou@adacore.com>
12014
12015         * gimple.c (gimple_assign_set_rhs_with_ops): Do not ask gsi_replace
12016         to update EH info here.
12017
12018 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
12019
12020         * match.pd ((X * CST1) * CST2): Simplify to X * (CST1 * CST2).
12021
12022 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
12023
12024         * match.pd ((X * CST) * Y): Reassociate to (X * Y) * CST.
12025
12026 2017-07-25  Torsten Duwe  <duwe@suse.de>
12027
12028         * common.opt: Introduce -fpatchable-function-entry
12029         command line option, and its variables function_entry_patch_area_size
12030         and function_entry_patch_area_start.
12031         * opts.c (common_handle_option): Add -fpatchable_function_entry_ case,
12032         including a two-value parser.
12033         * target.def (print_patchable_function_entry): New target hook.
12034         * targhooks.h (default_print_patchable_function_entry): New function.
12035         * targhooks.c (default_print_patchable_function_entry): Likewise.
12036         * toplev.c (process_options): Switch off IPA-RA if
12037         patchable function entries are being generated.
12038         * varasm.c (assemble_start_function): Look at the
12039         patchable-function-entry command line switch and current
12040         function attributes and maybe generate NOP instructions by
12041         calling the print_patchable_function_entry hook.
12042         * doc/extend.texi: Document patchable_function_entry attribute.
12043         * doc/invoke.texi: Document -fpatchable_function_entry
12044         command line option.
12045         * doc/tm.texi.in (TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY):
12046         New target hook.
12047         * doc/tm.texi: Re-generate.
12048
12049 2017-07-25  Jakub Jelinek  <jakub@redhat.com>
12050
12051         PR target/81532
12052         * config/i386/constraints.md (Yd, Ye): Use ALL_SSE_REGS for
12053         TARGET_AVX512DQ rather than TARGET_AVX512BW.
12054
12055 2017-07-25  Tamar Christina  <tamar.christina@arm.com>
12056
12057         * config/arm/parsecpu.awk (all_cores): Remove duplicates.
12058
12059 2017-07-25  Richard Biener  <rguenther@suse.de>
12060
12061         PR tree-optimization/81455
12062         * tree-ssa-loop-unswitch.c (find_loop_guard): Make sure to
12063         not walk in cycles when looking for guards.
12064
12065 2017-07-25  Richard Biener  <rguenther@suse.de>
12066
12067         PR tree-optimization/81529
12068         * tree-vect-stmts.c (process_use): Disregard live induction PHIs
12069         when optimizing backedge uses.
12070
12071 2017-07-25  David Edelsohn  <dje.gcc@gmail.com>
12072
12073         * dwarf2asm.c (dw2_asm_output_nstring): Encode double quote
12074         character for AIX.
12075         * dwarf2out.c (output_macinfo): Copy debug_line_section_label
12076         to dl_section_ref.  On AIX, append an expression to subtract
12077         the size of the section length to dl_section_ref.
12078
12079 2017-07-25  Segher Boessenkool  <segher@kernel.crashing.org>
12080
12081         * configure.ac: If any of the config.* scripts fail, exit 1.
12082         * configure: Regenerate.
12083
12084 2017-07-25  Richard Biener  <rguenther@suse.de>
12085
12086         PR middle-end/81546
12087         * tree-ssa-operands.c (verify_imm_links): Remove cap on number
12088         of immediate uses, be more verbose on errors.
12089
12090 2017-07-25  Richard Biener  <rguenther@suse.de>
12091
12092         PR tree-optimization/81510
12093         * tree-vect-loop.c (vect_is_simple_reduction): When the
12094         reduction stmt is not inside the loop bail out.
12095
12096 2017-07-25  Richard Biener  <rguenther@suse.de>
12097
12098         PR tree-optimization/81303
12099         * tree-vect-loop-manip.c (vect_loop_versioning): Build
12100         profitability check against LOOP_VINFO_NITERSM1.
12101
12102 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
12103
12104         * domwalk.c (cmp_bb_postorder): Simplify.
12105         (sort_bbs_postorder): New function.  Use it...
12106         (dom_walker::walk): ...here to optimize common cases.
12107
12108 2017-07-25  Martin Liska  <mliska@suse.cz>
12109
12110         PR ipa/81520
12111         * ipa-visibility.c (function_and_variable_visibility): Make the
12112         redirection just on target that supports aliasing.
12113         Fix GNU coding style.
12114
12115 2017-07-25  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12116
12117         PR libgcc/61152
12118         * config/aarch64/rtems.h: Add GCC Runtime Library Exception.
12119         Format changes.
12120         * config/arm/rtems.h: Likewise.
12121         * config/bfin/rtems.h: Likewise.
12122         * config/i386/rtemself.h: Likewise.
12123         * config/lm32/rtems.h: Likewise.
12124         * config/m32c/rtems.h: Likewise.
12125         * config/m68k/rtemself.h: Likewise.
12126         * config/microblaze/rtems.h: Likewise.
12127         * config/mips/rtems.h: Likewise.
12128         * config/moxie/rtems.h: Likewise.
12129         * config/nios2/rtems.h: Likewise.
12130         * config/powerpcspe/rtems.h: Likewise.
12131         * config/rs6000/rtems.h: Likewise.
12132         * config/rtems.h: Likewise.
12133         * config/sh/rtems.h: Likewise.
12134         * config/sh/rtemself.h: Likewise.
12135         * config/sparc/rtemself.h: Likewise.
12136
12137 2017-07-25  Georg-Johann Lay  <avr@gjlay.de>
12138
12139         PR 81487
12140         * hsa-brig.c (brig_init): Use xasprintf instead of asprintf.
12141         * gimple-pretty-print.c (dump_profile, dump_probability): Same.
12142         * tree-ssa-structalias.c (alias_get_name): Same.
12143
12144 2017-07-25  Bin Cheng  <bin.cheng@arm.com>
12145
12146         PR target/81414
12147         * config/aarch64/cortex-a57-fma-steering.c (analyze): Skip fmul/fmac
12148         instructions if no du chain is found.
12149
12150 2017-07-25  Georg-Johann Lay  <avr@gjlay.de>
12151
12152         * config/avr/avr-log.c (avr_log_vadump) ['T']: Print NULL-TREE.
12153
12154 2017-07-25  Richard Biener  <rguenther@suse.de>
12155
12156         PR middle-end/81505
12157         * fold-const.c (fold_negate_const): TREE_OVERFLOW should be
12158         sticky.
12159
12160 2017-07-24  Michael Meissner  <meissner@linux.vnet.ibm.com>
12161
12162         * config/rs6000/rs6000-cpus.def (ISA_2_6_MASKS_SERVER): Delete
12163         upper-regs options.
12164         (ISA_2_7_MASKS_SERVER): Likewise.
12165         (ISA_3_0_MASKS_IEEE): Likewise.
12166         (OTHER_P8_VECTOR_MASKS): Likewise.
12167         (OTHER_VSX_VECTOR_MASKS): Likewise.
12168         (POWERPC_MASKS): Likewise.
12169         (power7 cpu): Use ISA_2_6_MASKS_SERVER instead of using a
12170         duplicate list of options.
12171         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove
12172         explicit -mupper-regs options.
12173         * config/rs6000/rs6000.opt (-mvsx-scalar-memory): Delete
12174         -mupper-regs* options.  Delete -mvsx-scalar-memory, which was an
12175         alias for -mupper-regs-df.
12176         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
12177         (rs6000_init_hard_regno_mode_ok): Likewise.
12178         (rs6000_option_override_internal): Likewise.
12179         (rs6000_opt_masks): Likewise.
12180         * config/rs6000/rs6000.h (TARGET_UPPER_REGS_DF): Define upper regs
12181         options in terms of whether -mvsx or -mpower8-vector was used.
12182         (TARGET_UPPER_REGS_DI): Likewise.
12183         (TARGET_UPPER_REGS_SF): Likewise.
12184         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete the
12185         -mupper-regs-* options.
12186
12187 2017-07-24  Segher Boessenkool  <segher@kernel.crashing.org>
12188
12189         * passes.c (emergency_dump_function): Print some empty lines and a
12190         header before the RTL dump.
12191
12192 2017-07-24  Segher Boessenkool  <segher@kernel.crashing.org>
12193
12194         * cfgrtl.c (rtl_dump_bb): Don't call NEXT_INSN on NULL.
12195
12196 2017-07-24  Wilco Dijkstra  <wdijkstr@arm.com>
12197
12198         PR target/79041
12199         * config/aarch64/aarch64.c (aarch64_classify_symbol):
12200         Avoid SYMBOL_SMALL_ABSOLUTE for literals with pc-relative literals.
12201
12202 2017-07-24  Carl Love  <cel@us.ibm.com>
12203
12204         * config/rs6000/rs6000-c.c: Add support for built-in functions
12205         vector float vec_extract_fp32_from_shorth (vector unsigned short);
12206         vector float vec_extract_fp32_from_shortl (vector unsigned short);
12207         * config/rs6000/altivec.h (vec_extract_fp_from_shorth,
12208         vec_extract_fp_from_shortl): Add defines for the two builtins.
12209         * config/rs6000/rs6000-builtin.def (VEXTRACT_FP_FROM_SHORTH,
12210         VEXTRACT_FP_FROM_SHORTL): Add BU_P9V_OVERLOAD_1 and BU_P9V_VSX_1
12211         new builtins.
12212         * config/rs6000/vsx.md vsx_xvcvhpsp): Add define_insn.
12213         (vextract_fp_from_shorth, vextract_fp_from_shortl): Add define_expands.
12214         * doc/extend.texi: Update the built-in documentation file for the
12215         new built-in function.
12216
12217 2017-07-24  Jakub Jelinek  <jakub@redhat.com>
12218
12219         PR bootstrap/81521
12220         * tree.def: Remove TYPE_METHODS documentation, adjust TYPE_FIELDS
12221         documentation.
12222         * doc/generic.texi: Likewise.
12223         * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
12224         for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
12225
12226 2017-07-24  Jackson Woodruff  <jackson.woodruff@arm.com>
12227
12228         * config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): New.
12229         (aarch64_mls_elt_merge<mode>): Likewise.
12230
12231 2017-07-23  Krister Walfridsson  <krister.walfridsson@gmail.com>
12232
12233         * config.gcc (*-*-netbsd*): Remove check for NetBSD versions not
12234         having __cxa_atexit.
12235
12236 2017-07-23  Michael Collison  <michael.collison@arm.com>
12237
12238         * config/arm/arm.c (arm_option_override): Deprecate
12239         use of -mstructure-size-boundary.
12240         * config/arm/arm.opt: Deprecate -mstructure-size-boundary.
12241         * doc/invoke.texi: Deprecate -mstructure-size-boundary.
12242
12243 2017-07-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12244
12245         PR target/80695
12246         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
12247         Reduce cost estimate for direct moves.
12248
12249 2017-07-23  Uros Bizjak  <ubizjak@gmail.com>
12250
12251         PR target/80569
12252         * config/i386/i386.c (ix86_option_override_internal): Disable
12253         BMI, BMI2 and TBM instructions for -m16.
12254
12255 2017-07-21  Carl Love  <cel@us.ibm.com>
12256
12257         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
12258         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
12259         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
12260         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
12261         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
12262         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
12263         VMULOSW): New enum "unspec" values.
12264         (altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
12265         altivec_vmulosw): New patterns.
12266         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
12267         VMULOSW): Add definitions.
12268
12269 2017-07-21  Jim Wilson  <jim.wilson@linaro.org>
12270
12271         * config/aarch64/aarch64-cores.def (falkor): Add AARCH64_FL_RDMA.
12272         (qdf24xx): Likewise.
12273         * config/aarch64/aarch64-options-extensions.def (rdma); New.
12274         * config/aarch64/aarch64.h (AARCH64_FL_RDMA): New.
12275         (AARCH64_FL_V8_1): Renumber.
12276         (AARCH64_FL_FOR_ARCH8_1): Add AARCH64_FL_RDMA.
12277         (AARCH64_ISA_RDMA): Use AARCH64_FL_RDMA.
12278         * config/aarch64/arm_neon.h: Use +rdma instead of arch=armv8.1-a.
12279         * doc/invoke.texi (AArch64 Options): Mention +rmda in -march docs.  Add
12280         rdma to feature modifiers list.
12281
12282 2017-07-21  Yury Gribov  <tetra2005@gmail.com>
12283
12284         PR middle-end/56727
12285         * ipa-visibility (function_and_variable_visibility): Convert
12286         recursive PLT call to direct call if appropriate.
12287
12288 2017-07-21  Andrew Pinski  <apinski@cavium.com>
12289
12290         * tree-ssa-sccvn.c (vn_nary_op_eq): Check BIT_INSERT_EXPR's
12291         operand 1 to see if the types precision matches.
12292         * fold-const.c (operand_equal_p): Likewise.
12293
12294 2017-07-21  Richard Biener  <rguenther@suse.de>
12295
12296         PR tree-optimization/81303
12297         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Pass
12298         in datarefs vector.  Allow NULL dr0 for no peeling cost estimate.
12299         (vect_peeling_hash_get_lowest_cost): Adjust.
12300         (vect_enhance_data_refs_alignment): Likewise.  Use
12301         vect_get_peeling_costs_all_drs to compute the penalty for no
12302         peeling to match up costs.
12303
12304 2017-07-21  Richard Biener  <rguenther@suse.de>
12305
12306         PR tree-optimization/81500
12307         * tree-vect-loop.c (vect_is_simple_reduction): Properly fail if
12308         we didn't identify a reduction path.
12309
12310 2017-07-21  Tom de Vries  <tom@codesourcery.com>
12311             Cesar Philippidis  <cesar@codesourcery.com>
12312
12313         PR gcov-profile/81442
12314         * config/nvptx/nvptx.c (nvptx_goacc_reduction_init): Add missing edge
12315         probabilities.
12316
12317 2017-07-21  Tom de Vries  <tom@codesourcery.com>
12318
12319         PR lto/81430
12320         * config/nvptx/nvptx.c (nvptx_override_options_after_change): New
12321         function.
12322         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define to
12323         nvptx_override_options_after_change.
12324
12325 2017-07-21  Ulrich Drepper  <drepper@redhat.com>
12326
12327         * dwarf2out.c (output_file_names): Avoid double testing for
12328         dwarf_version >= 5.
12329
12330 2017-07-21  Georg-Johann Lay  <avr@gjlay.de>
12331
12332         * doc/invoke.texi (AVR Built-in Functions): Re-layout section.
12333
12334 2016-07-21  Jan Hubicka  <hubicka@ucw.cz>
12335
12336         * cfgcleanup.c (flow_find_cross_jump): Do not crossjump across
12337         hot/cold regions.
12338         (try_crossjump_to_edge): Do not punt on partitioned functions.
12339
12340 2016-07-21  Jan Hubicka  <hubicka@ucw.cz>
12341
12342         * bb-reorder.c (find_rarely_executed_basic_blocks_and_crossing_edges):
12343         Put all BBs reachable only via paths crossing cold region to cold
12344         region.
12345         * cfgrtl.c (find_bbs_reachable_by_hot_paths): New function.
12346
12347 2016-07-21  Richard Biener  <rguenther@suse.de>
12348
12349         PR tree-optimization/81303
12350         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Take
12351         into account prologue and epilogue iterations when raising
12352         min_profitable_iters to sth at least covering one vector iteration.
12353
12354 2017-07-21  Tamar Christina  <tamar.christina@arm.com>
12355
12356         * config/arm/arm.c (arm_test_cpu_arch_dat):
12357         Check for overlap.
12358
12359 2017-07-20  Nathan Sidwell  <nathan@acm.org>
12360
12361         Remove TYPE_METHODS.
12362         * tree.h (TYPE_METHODS): Delete.
12363         * dwarf2out.c (gen_member_die): Member fns are on TYPE_FIELDS.
12364         * dbxout.c (dbxout_type_fields): Ignore FUNCTION_DECLs.
12365         (dbxout_type_methods): Scan TYPE_FIELDS.
12366         (dbxout_type): Don't check TYPE_METHODS here.
12367         * function.c (use_register_for_decl): Always ignore register for
12368         class types when not optimizing.
12369         * ipa-devirt.c (odr_types_equivalent_p): Delete TYPE_METHODS scan.
12370         * tree.c (free_lang_data_in_type): Stitch out member functions and
12371         templates from TYPE_FIELDS.
12372         (build_distinct_type_copy, verify_type_variant,
12373         verify_type): Member fns are on TYPE_FIELDS.
12374         * tree-dump.c (dequeue_and_dump): No TYPE_METHODS.
12375         * tree-pretty-print.c (dump_generic_node): Likewise.
12376
12377 2017-07-20  Jakub Jelinek  <jakub@redhat.com>
12378
12379         PR target/80846
12380         * config/i386/i386.c (ix86_expand_vector_init_general): Handle
12381         V2TImode and V4TImode.
12382         (ix86_expand_vector_extract): Likewise.
12383         * config/i386/sse.md (VMOVE): Enable V4TImode even for just
12384         TARGET_AVX512F, instead of only for TARGET_AVX512BW.
12385         (ssescalarmode): Handle V4TImode and V2TImode.
12386         (VEC_EXTRACT_MODE): Add V4TImode and V2TImode.
12387         (*vec_extractv2ti, *vec_extractv4ti): New insns.
12388         (VEXTRACTI128_MODE): New mode iterator.
12389         (splitter for *vec_extractv?ti first element): New.
12390         (VEC_INIT_MODE): New mode iterator.
12391         (vec_init<mode>): Consolidate 3 expanders into one using
12392         VEC_INIT_MODE mode iterator.
12393
12394 2017-07-20  Alexander Monakov  <amonakov@ispras.ru>
12395
12396         * lra-assigns.c (pseudo_compare_func): Fix comparison step based on
12397         non_spilled_static_chain_regno_p.
12398
12399 2017-07-20  Alexander Monakov  <amonakov@ispras.ru>
12400
12401         * gimple-ssa-store-merging.c (sort_by_bitpos): Return 0 on equal bitpos.
12402
12403 2017-07-20  Jan Hubicka  <hubicka@ucw.cz>
12404
12405         * bb-reorder.c (connect_traces): Allow copying of blocks within
12406         single partition.
12407
12408 2017-07-20  Richard Biener  <rguenther@suse.de>
12409
12410         * gimple.h (gimple_phi_result): Add gphi * overload.
12411         (gimple_phi_result_ptr): Likewise.
12412         (gimple_phi_arg): Likewise.  Adjust index assert to only
12413         allow actual argument accesses rather than all slots available
12414         by capacity.
12415         (gimple_phi_arg_def): Add gphi * overload.
12416         * tree-phinodes.c (make_phi_node): Initialize only actual
12417         arguments.
12418         (resize_phi_node): Clear memory not covered by old node,
12419         do not initialize excess argument slots.
12420         (reserve_phi_args_for_new_edge): Initialize new argument slot
12421         completely.
12422
12423 2017-07-20  Bin Cheng  <bin.cheng@arm.com>
12424
12425         PR tree-optimization/81388
12426         Revert r238585:
12427         2016-07-21  Bin Cheng  <bin.cheng@arm.com>
12428
12429         * tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Clean up
12430         by removing computation of may_be_zero.
12431
12432 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
12433             Tom de Vries  <tom@codesourcery.com>
12434
12435         PR middle-end/81030
12436         * cfgbuild.c (find_many_sub_basic_blocks): Update REG_BR_PROB note
12437         when gimple level profile disagrees with what RTL expander did.
12438
12439 2017-07-20  Richard Biener  <rguenther@suse.de>
12440
12441         PR tree-optimization/61171
12442         * tree-vectorizer.h (slp_instance): Add reduc_phis member.
12443         (vect_analyze_stmt): Add slp instance parameter.
12444         (vectorizable_reduction): Likewise.
12445         * tree-vect-loop.c (vect_analyze_loop_operations): Adjust.
12446         (vect_is_simple_reduction): Deal with chains not detected
12447         as SLP reduction chain, specifically not properly associated
12448         chains containing a mix of plus/minus.
12449         (get_reduction_op): Remove.
12450         (get_initial_defs_for_reduction): Simplify, pass in whether
12451         this is a reduction chain, pass in the SLP node for the PHIs.
12452         (vect_create_epilog_for_reduction): Get the SLP instance as
12453         arg and adjust.
12454         (vectorizable_reduction): Get the SLP instance as arg.
12455         During analysis remember the SLP node with the PHIs in the
12456         instance.  Simplify getting at the vectorized reduction PHIs.
12457         * tree-vect-slp.c (vect_slp_analyze_node_operations): Pass
12458         through SLP instance.
12459         (vect_slp_analyze_operations): Likewise.
12460         * tree-vect-stms.c (vect_analyze_stmt): Likewise.
12461         (vect_transform_stmt): Likewise.
12462
12463 2017-07-20  Tom de Vries  <tom@codesourcery.com>
12464
12465         PR tree-optimization/81489
12466         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Move
12467         read of phi arg location to before loop that modifies phi.
12468
12469 2017-07-20  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
12470
12471         * match.pd (((m1 >/</>=/<= m2) * d -> (m1 >/</>=/<= m2) ? d : 0):
12472         New pattern.
12473
12474 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
12475
12476         PR middle-end/81331
12477         * except.c (execute): Fix ordering issue.
12478
12479 2018-07-19  Segher Boessenkool  <segher@kernel.crashing.org>
12480
12481         PR rtl-optimization/81423
12482         * combine.c (make_compound_operation_int): Don't try to optimize
12483         the AND of a SUBREG of an LSHIFTRT if that SUBREG is paradoxical.
12484
12485 2017-07-19  Segher Boessenkool  <segher@kernel.crashing.org>
12486
12487         PR rtl-optimization/81423
12488         * simplify-rtx.c (simplify_truncation): Handle truncating an IOR
12489         with a constant that is -1 in the truncated to mode.
12490
12491 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
12492
12493         * predict.c (propagate_unlikely_bbs_forward): Break out from ...
12494         (determine_unlikely_bbs): ... here.
12495         * predict.h (propagate_unlikely_bbs_forward): Declare.
12496         * cfgexpand.c (pass_expand::execute): Use it.
12497         * bb-reorder.c (sanitize_hot_paths): Do not consider known to be
12498         unlikely edges.
12499         (find_rarely_executed_basic_blocks_and_crossing_edges): Use
12500         propagate_unlikely_bbs_forward.
12501
12502 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
12503
12504         PR middle-end/81331
12505         * except.c (maybe_add_nop_after_section_switch): New function.
12506         (execute): Use it.
12507
12508 2017-07-19  Tom de Vries  <tom@codesourcery.com>
12509
12510         * gimple.h (gimple_phi_set_arg): Make assert more strict.
12511
12512 2017-07-19  Tom de Vries  <tom@codesourcery.com>
12513
12514         * gimple.h (gimple_phi_arg): Make assert more strict.
12515
12516 2017-07-19  Steven Munroe  <munroesj@gcc.gnu.org>
12517
12518         * config.gcc (powerpc*-*-*): Add mmintrin.h.
12519         * config/rs6000/mmintrin.h: New file.
12520         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include mmintrin.h.
12521
12522 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
12523
12524         PR tree-optimization/81346
12525         * match.pd: Optimize (X - 1U) <= INT_MAX-1U into (int) X > 0.
12526
12527 2017-07-19  Tom de Vries  <tom@codesourcery.com>
12528
12529         * config/nvptx/nvptx.md (VECIM): Add V2DI.
12530
12531 2017-07-19  Tom de Vries  <tom@codesourcery.com>
12532
12533         * config/nvptx/nvptx-modes.def: Add V2DImode.
12534         * config/nvptx/nvptx-protos.h (nvptx_data_alignment): Declare.
12535         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2DImode.
12536         (nvptx_output_mov_insn): Handle lack of mov.b128.
12537         (nvptx_print_operand): Handle 'H' and 'L' codes.
12538         (nvptx_vector_mode_supported): Allow V2DImode.
12539         (nvptx_preferred_simd_mode): New function.
12540         (nvptx_data_alignment): New function.
12541         (TARGET_VECTORIZE_PREFERRED_SIMD_MODE): Redefine to
12542         nvptx_preferred_simd_mode.
12543         * config/nvptx/nvptx.h (STACK_BOUNDARY, BIGGEST_ALIGNMENT): Change from
12544         64 to 128 bits.
12545         (DATA_ALIGNMENT): Define.  Set to nvptx_data_alignment.
12546
12547 2017-07-19  Tom de Vries  <tom@codesourcery.com>
12548
12549         * config/nvptx/nvptx-modes.def: New file.  Add V2SImode.
12550         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2SImode.
12551         (nvptx_vector_mode_supported): New function.  Allow V2SImode.
12552         (TARGET_VECTOR_MODE_SUPPORTED_P): Redefine to nvptx_vector_mode_supported.
12553         * config/nvptx/nvptx.md (VECIM): New mode iterator. Add V2SI.
12554         (mov<VECIM>_insn): New define_insn.
12555         (define_expand "mov<VECIM>): New define_expand.
12556
12557 2017-07-19  Tom de Vries  <tom@codesourcery.com>
12558
12559         * config/nvptx/nvptx.c (nvptx_print_operand): Handle v2 vector mode.
12560
12561 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
12562
12563         PR tree-optimization/81346
12564         * fold-const.h (fold_div_compare, range_check_type): Declare.
12565         * fold-const.c (range_check_type): New function.
12566         (build_range_check): Use range_check_type.
12567         (fold_div_compare): No longer static, rewritten into
12568         a match.pd helper function.
12569         (fold_comparison): Don't call fold_div_compare here.
12570         * match.pd (X / C1 op C2): New optimization using fold_div_compare
12571         as helper function.
12572
12573 2017-07-19  Nathan Sidwell  <nathan@acm.org>
12574
12575         * tree.h (TYPE_MINVAL, TYPE_MAXVAL): Rename to ...
12576         (TYPE_MIN_VALUE_RAW, TYPE_MAX_VALUE_RAW): ... these.
12577         * tree.c (find_decls_types_r, verify_type): Use
12578         TYPE_{MIN,MAX}_VALUE_RAW.
12579         * lto-streamer-out.c (DFS::DFS_write_tree_body): Likewise.
12580         (hash_tree): Likewise.
12581         * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
12582         Likewise.
12583         * tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
12584         Likewise.
12585
12586 2017-07-18  Tom de Vries  <tom@codesourcery.com>
12587
12588         PR middle-end/81464
12589         * omp-expand.c (expand_omp_for_static_chunk): Handle
12590         equal-argument loop exit phi.
12591
12592 2017-07-18  Uros Bizjak  <ubizjak@gmail.com>
12593
12594         PR target/81471
12595         * config/i386/i386.md (rorx_immediate_operand): New mode attribute.
12596         (*bmi2_rorx<mode>3_1): Use rorx_immediate_operand as
12597         operand 2 predicate.
12598         (*bmi2_rorxsi3_1_zext): Use const_0_to_31_operand as
12599         operand 2 predicate.
12600         (ror,rol -> rorx splitters): Use const_int_operand as
12601         operand 2 predicate.
12602
12603 2017-06-18  Richard Biener  <rguenther@suse.de>
12604
12605         PR tree-optimization/81410
12606         * tree-vect-stmts.c (vectorizable_load): Properly adjust for
12607         the gap in the ! slp_perm SLP case after each group.
12608
12609 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
12610
12611         PR middle-end/81463
12612         * cfgloopmanip.c (scale_loop_profile): Watch out for zero frequency
12613         again.
12614
12615 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
12616
12617         PR middle-end/81462
12618         * predict.c (set_even_probabilities): Cleanup; do not affect
12619         probabilities that are already known.
12620         (combine_predictions_for_bb): Call even when count is set.
12621
12622 2017-07-18  Nathan Sidwell  <nathan@acm.org>
12623
12624         * tree-parloops.c (try_transform_to_exit_first_loop_alt): Use
12625         TYPE_MAX_VALUE.
12626
12627 2017-07-18  Bin Cheng  <bin.cheng@arm.com>
12628
12629         PR target/81408
12630         * tree-ssa-loop-niter.c (number_of_iterations_exit): Dump missed
12631         optimization for loop niter analysis.
12632
12633 2017-07-18  Georg-Johann Lay  <avr@gjlay.de>
12634
12635         PR target/81473
12636         * config/avr/avr.c (avr_optimize_casesi): Don't use
12637         INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX.
12638
12639 2017-07-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
12640
12641         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Remove
12642         body_cost_vec from _vect_peel_extended_info.
12643         (vect_peeling_hash_get_lowest_cost): Do not set body_cost_vec.
12644         (vect_peeling_hash_choose_best_peeling): Remove body_cost_vec and
12645         npeel.
12646
12647 2017-07-18  Bin Cheng  <bin.cheng@arm.com>
12648
12649         * config/arm/arm.c (emit_unlikely_jump): Remove unused var.
12650
12651 2017-07-18  Richard Biener  <rguenther@suse.de>
12652
12653         PR tree-optimization/80620
12654         PR tree-optimization/81403
12655         * tree-ssa-pre.c (phi_translate_1): Clear range and points-to
12656         info when re-using a VN table entry.
12657
12658 2017-07-18  Richard Biener  <rguenther@suse.de>
12659
12660         PR tree-optimization/81418
12661         * tree-vect-loop.c (vectorizable_reduction): Properly compute
12662         vectype_in.  Verify that with lane-reducing reduction operations
12663         we have a single def-use cycle.
12664
12665 2017-07-17  Carl Love  <cel@us.ibm.com>
12666
12667         Revert commit r249424   2017-06-20  Carl Love  <cel@us.ibm.com>
12668
12669         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
12670         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
12671         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
12672         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
12673         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
12674         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
12675         VMULOSW): New enum "unspec" values.
12676         (vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
12677         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
12678         altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
12679         altivec_vmulosw): New patterns.
12680         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
12681         VMULOSW): Add definitions.
12682 2017-07-17  Uros Bizjak  <ubizjak@gmail.com>
12683
12684         * config/alpha/alpha.c: Include predict.h.
12685
12686 2017-07-17  Yury Gribov  <tetra2005@gmail.com>
12687
12688         * tree-vrp.c (compare_assert_loc): Fix comparison function
12689         to return predictable results.
12690
12691 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
12692
12693         * config/arc/arc.md (adddi3): Remove support for mexpand-adddi
12694         option.
12695         (subdi3): Likewise.
12696         * config/arc/arc.opt (mexpand-adddi): Deprecate it.
12697         * doc/invoke.texi (mexpand-adddi): Update text.
12698
12699 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
12700
12701         * config/arc/arc.md (clzsi2): Expand to an arc_clzsi2 instruction
12702         that also clobbers the CC register. The old expand code is moved
12703         to ...
12704         (*arc_clzsi2): ... here.
12705         (ctzsi2): Expand to an arc_ctzsi2 instruction that also clobbers
12706         the CC register. The old expand code is moved to ...
12707         (arc_ctzsi2): ... here.
12708
12709 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
12710
12711         * config/arc/arc.opt (mindexed-loads): Use initial value
12712         TARGET_INDEXED_LOADS_DEFAULT.
12713         (mauto-modify-reg): Use initial value
12714         TARGET_AUTO_MODIFY_REG_DEFAULT.
12715         * config/arc/elf.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
12716         (TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
12717         * config/arc/linux.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
12718         (TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
12719
12720 2017-07-17  Martin Liska  <mliska@suse.cz>
12721
12722         PR sanitizer/81302
12723         * opts.c (finish_options): Do not allow -fgnu-tm
12724         w/ -fsanitize={kernel-,}address.  Say sorry.
12725
12726 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
12727
12728         PR target/81369
12729         * tree-loop-distribution.c (classify_partition): Only assert on
12730         numer of iterations.
12731         (merge_dep_scc_partitions): Delete prameter.  Update function call.
12732         (distribute_loop): Remove code handling loop with unknown niters.
12733         (pass_loop_distribution::execute): Skip loop with unknown niters.
12734
12735 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
12736
12737         PR target/81369
12738         * tree-loop-distribution.c (merge_dep_scc_partitions): Sink call to
12739         function sort_partitions_by_post_order.
12740
12741 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
12742
12743         PR tree-optimization/81374
12744         * tree-loop-distribution.c (pass_loop_distribution::execute): Record
12745         the max index of basic blocks, rather than number of basic blocks.
12746
12747 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
12748
12749         * config/arc/arc-protos.h (arc_legitimate_pc_offset_p): Remove
12750         proto.
12751         (arc_legitimate_pic_operand_p): Likewise.
12752         * config/arc/arc.c (arc_legitimate_pic_operand_p): Remove
12753         function.
12754         (arc_needs_pcl_p): Likewise.
12755         (arc_legitimate_pc_offset_p): Likewise.
12756         (arc_legitimate_pic_addr_p): Remove LABEL_REF case, as this
12757         function is also used in constrains.md.
12758         (arc_legitimate_constant_p): Use arc_legitimate_pic_addr_p to
12759         validate pic constants. Handle CONST_INT, CONST_DOUBLE, MINUS and
12760         PLUS.  Only return true/false in known cases, otherwise assert.
12761         (arc_legitimate_address_p): Remove arc_legitimate_pic_addr_p as it
12762         is already called in arc_legitimate_constant_p.
12763         * config/arc/arc.h (CONSTANT_ADDRESS_P): Consider also LABEL for
12764         pic addresses.
12765         (LEGITIMATE_PIC_OPERAND_P): Use
12766         arc_raw_symbolic_reference_mentioned_p function.
12767         * config/arc/constraints.md (Cpc): Use arc_legitimate_pic_addr_p
12768         function.
12769         (Cal): Likewise.
12770         (C32): Likewise.
12771
12772 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
12773         Andrew Burgess  <andrew.burgess@embecosm.com>
12774
12775         * config/arc/arc-protos.h (arc_compute_function_type): Change prototype.
12776         (arc_return_address_register): New function.
12777         * config/arc/arc.c (arc_handle_fndecl_attribute): New function.
12778         (arc_handle_fndecl_attribute): Add naked attribute.
12779         (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
12780         (TARGET_WARN_FUNC_RETURN): Likewise.
12781         (arc_allocate_stack_slots_for_args): New function.
12782         (arc_warn_func_return): Likewise.
12783         (machine_function): Change type fn_type.
12784         (arc_compute_function_type): Consider new naked function type,
12785         change function return type.
12786         (arc_must_save_register): Adapt to handle new
12787         arc_compute_function_type's return type.
12788         (arc_expand_prologue): Likewise.
12789         (arc_expand_epilogue): Likewise.
12790         (arc_return_address_regs): Delete.
12791         (arc_return_address_register): New function.
12792         (arc_epilogue_uses): Use above function.
12793         * config/arc/arc.h (arc_return_address_regs): Delete prototype.
12794         (arc_function_type): Change encoding, add naked type.
12795         (ARC_INTERRUPT_P): Change to handle the new encoding.
12796         (ARC_FAST_INTERRUPT_P): Likewise.
12797         (ARC_NORMAL_P): Define.
12798         (ARC_NAKED_P): Likewise.
12799         (arc_compute_function_type): Delete prototype.
12800         * config/arc/arc.md (in_ret_delay_slot): Use
12801         arc_return_address_register function.
12802         (simple_return): Likewise.
12803         (p_return_i): Likewise.
12804
12805 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
12806
12807         PR tree-optimization/81428
12808         * match.pd (X / X -> one): Don't optimize _Fract divisions, as 1
12809         can't be built for those types.
12810
12811 2017-07-17  Georg-Johann Lay  <avr@gjlay.de>
12812
12813         Remove stuff dead since r239246.
12814
12815         * config/avr/avr-arch.h (avr_inform_devices): Remove dead proto.
12816         * config/avr/avr-devices.c (mcu_name, comparator, avr_mcus_str)
12817         (avr_inform_devices): Remove dead stuff.
12818
12819 2017-07-17  Tamar Christina  <tamar.christina@arm.com>
12820
12821         * config/arm/arm_neon.h: Fix softp typo.
12822
12823 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
12824
12825         PR tree-optimization/81365
12826         * tree-ssa-phiprop.c (propagate_with_phi): When considering hoisting
12827         aggregate moves onto bb predecessor edges, make sure there are no
12828         loads that could alias the lhs in between the start of bb and the
12829         loads from *phi.
12830
12831 2017-07-17  Georg-Johann Lay  <avr@gjlay.de>
12832
12833         PR 80929
12834         * config/avr/avr.c (avr_mul_highpart_cost): New static function.
12835         (avr_rtx_costs_1) [TRUNCATE]: Use it to compute mul_highpart cost.
12836         [LSHIFTRT, outer_code = TRUNCATE]: Same.
12837
12838 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
12839
12840         PR tree-optimization/81396
12841         * tree-ssa-math-opts.c (struct symbolic_number): Add n_ops field.
12842         (init_symbolic_number): Initialize it to 1.
12843         (perform_symbolic_merge): Add n_ops from both operands into the new
12844         n_ops.
12845         (find_bswap_or_nop): Don't consider n->n == cmpnop computations
12846         without base_addr as useless if they need more than one operation.
12847         (bswap_replace): Handle !bswap case for NULL base_addr.
12848
12849 2017-07-17  Tom de Vries  <tom@codesourcery.com>
12850
12851         PR target/81069
12852         * config/nvptx/nvptx.c (nvptx_single): Insert diverging branch as late
12853         as possible.
12854
12855 2017-07-17  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12856
12857         * config/sparc/rtemself.h (TARGET_OS_CPP_BUILTINS): Add
12858         conditional builtin define __FIX_LEON3FT_B2BST.
12859
12860 2017-07-17  Daniel Cederman  <cederman@gaisler.com>
12861
12862         * config/sparc/t-rtems: Add mfix-gr712rc multilibs. Replace
12863         MULTILIB_EXCEPTIONS with MULTILIB_REQUIRED. Match -mfix-gr712rc
12864         with -mfix-ut700.
12865
12866 2017-07-16  Eric Botcazou  <ebotcazou@adacore.com>
12867
12868         PR rtl-optimization/81424
12869         * optabs.c (prepare_cmp_insn): Use copy_to_reg instead of force_reg
12870         to remove potential trapping from operands if -fnon-call-exceptions.
12871
12872 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
12873
12874         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Use
12875         profile_proability for scalling.
12876         * scale_profile_for_vect_loop.c (scale_profile_for_vect_loop): Likewise.
12877
12878 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
12879
12880         * cgraph.c (cgraph_edge::redirect_call_stmt_to_caller): Cleanup.
12881
12882 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
12883
12884         * cfgloopmanip.c (scale_loop_profile): Avoid use of REG_BR_PROB_BASE
12885         fixpoint arithmetics.
12886
12887 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
12888
12889         * tree-ssa-loop-unswitch.c (hoist_guard): Avoid use of REG_BR_PROB_BASE
12890         fixpoint arithmetics.
12891
12892 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
12893
12894         * asan.c (create_cond_insert_point): Avoid use of REG_BR_PROB_BASE
12895         fixpoint arithmetics.
12896
12897 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
12898
12899         * profile-count.h (profile_probability::from_reg_br_prob_note,
12900         profile_probability::to_reg_br_prob_note): New functions.
12901         * doc/rtl.texi (REG_BR_PROB_NOTE): Update documentation.
12902         * reg-notes.h (REG_BR_PROB, REG_BR_PRED): Update docs.
12903         * predict.c (probability_reliable_p): Update.
12904         (edge_probability_reliable_p): Update.
12905         (br_prob_note_reliable_p): Update.
12906         (invert_br_probabilities): Update.
12907         (add_reg_br_prob_note): New function.
12908         (combine_predictions_for_insn): Update.
12909         * asan.c (asan_clear_shadow): Update.
12910         * cfgbuild.c (compute_outgoing_frequencies): Update.
12911         * cfgrtl.c (force_nonfallthru_and_redirect): Update.
12912         (update_br_prob_note): Update.
12913         (rtl_verify_edges): Update.
12914         (purge_dead_edges): Update.
12915         (fixup_reorder_chain): Update.
12916         * emit-rtl.c (try_split): Update.
12917         * ifcvt.c (cond_exec_process_insns): Update.
12918         (cond_exec_process_if_block): Update.
12919         (dead_or_predicable): Update.
12920         * internal-fn.c (expand_addsub_overflow): Update.
12921         (expand_neg_overflow): Update.
12922         (expand_mul_overflow): Update.
12923         * loop-doloop.c (doloop_modify): Update.
12924         * loop-unroll.c (compare_and_jump_seq): Update.
12925         * optabs.c (emit_cmp_and_jump_insn_1): Update.
12926         * predict.h: Update.
12927         * reorg.c (mostly_true_jump): Update.
12928         * rtl.h: Update.
12929         * config/aarch64/aarch64.c (aarch64_emit_unlikely_jump): Update.
12930         * config/alpha/alpha.c (emit_unlikely_jump): Update.
12931         * config/arc/arc.c: (emit_unlikely_jump): Update.
12932         * config/arm/arm.c: (emit_unlikely_jump): Update.
12933         * config/bfin/bfin.c (cbranch_predicted_taken_p): Update.
12934         * config/frv/frv.c (frv_print_operand_jump_hint): Update.
12935         * config/i386/i386.c (ix86_expand_split_stack_prologue): Update.
12936         (ix86_print_operand): Update.
12937         (ix86_split_fp_branch): Update.
12938         (predict_jump): Update.
12939         * config/ia64/ia64.c (ia64_print_operand): Update.
12940         * config/mmix/mmix.c (mmix_print_operand): Update.
12941         * config/powerpcspe/powerpcspe.c (output_cbranch): Update.
12942         (rs6000_expand_split_stack_prologue): Update.
12943         * config/rs6000/rs6000.c: Update.
12944         * config/s390/s390.c (s390_expand_vec_strlen): Update.
12945         (s390_expand_vec_movstr): Update.
12946         (s390_expand_cs_tdsi): Update.
12947         (s390_expand_split_stack_prologue): Update.
12948         * config/sh/sh.c (sh_print_operand): Update.
12949         (expand_cbranchsi4): Update.
12950         (expand_cbranchdi4): Update.
12951         * config/sparc/sparc.c (output_v9branch): Update.
12952         * config/spu/spu.c (get_branch_target): Update.
12953         (ea_load_store_inline): Update.
12954         * config/tilegx/tilegx.c (cbranch_predicted_p): Update.
12955         * config/tilepro/tilepro.c: Update.
12956
12957 2017-07-16  Eric Botcazou  <ebotcazou@adacore.com>
12958
12959         * gimplify.c (mostly_copy_tree_r): Revert latest change.
12960         (gimplify_save_expr): Likewise.
12961
12962 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
12963
12964         * ipa-visibility.c (function_and_variable_visibility): Fix pasto.
12965
12966 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
12967
12968         * ipa-fnsummary.c (pass_data_ipa_fn_summary): Use
12969         TV_IPA_FNSUMMARY.
12970         * timevar.def (TV_IPA_FNSUMMARY): Define.
12971
12972 2017-07-16  Daniel Cederman  <cederman@gaisler.com>
12973
12974         * config/sparc/sparc.md (divdf3_fix): Add NOP to prevent back
12975         to back store errata sensitive sequence from being generated.
12976         (sqrtdf2_fix): Likewise.
12977
12978 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
12979
12980         * tree-ssa-threadupdate.c (compute_path_counts,
12981         update_joiner_offpath_counts): Use profile_probability.
12982
12983 2017-07-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12984
12985         Revert:
12986         2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12987
12988         * config/arm/arm-c.c (arm_cpu_builtins): Define
12989         __ARM_FEATURE_NUMERIC_MAXMIN solely based on TARGET_VFP5.
12990
12991 2017-07-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12992
12993         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
12994         array entries to represent __ieee128 versions of the
12995         scalar_test_data_class, scalar_test_neg, scalar_extract_exp,
12996         scalar_extract_sig, and scalar_insert_exp built-in functions.
12997         (altivec_resolve_overloaded_builtin): Add special case handling
12998         for the __builtin_scalar_insert_exp function, as represented by
12999         the P9V_BUILTIN_VEC_VSIEDP constant.
13000         * config/rs6000/rs6000-builtin.def (VSEEQP): Add scalar extract
13001         exponent support for __ieee128 argument.
13002         (VSESQP): Add scalar extract signature support for __ieee128
13003         argument.
13004         (VSTDCNQP): Add scalar test negative support for __ieee128
13005         argument.
13006         (VSIEQP): Add scalar insert exponent support for __int128 argument
13007         with __ieee128 result.
13008         (VSIEQPF): Add scalar insert exponent support for __ieee128
13009         argument with __ieee128 result.
13010         (VSTDCQP): Add scalar test data class support for __ieee128
13011         argument.
13012         (VSTDCNQP): Add overload support for scalar test negative with
13013         __ieee128 argument.
13014         (VSTDCQP): Add overload support for scalar test data class
13015         __ieee128 argument.
13016         * config/rs6000/vsx.md (UNSPEC_VSX_SXSIG) Replace
13017         UNSPEC_VSX_SXSIGDP.
13018         (UNSPEC_VSX_SIEXPQP): New constant.
13019         (xsxexpqp): New insn for VSX scalar extract exponent quad
13020         precision.
13021         (xsxsigqp): New insn for VSX scalar extract significand quad
13022         precision.
13023         (xsiexpqpf): New insn for VSX scalar insert exponent quad
13024         precision with floating point argument.
13025         (xststdcqp): New expand for VSX scalar test data class quad
13026         precision.
13027         (xststdcnegqp): New expand for VSX scalar test negative quad
13028         precision.
13029         (xststdcqp): New insn to match expansions for VSX scalar test data
13030         class quad precision and VSX scalar test negative quad precision.
13031         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Add
13032         special case operand checking to enforce that second operand of
13033         VSX scalar test data class with quad precision argument is a 7-bit
13034         unsigned literal.
13035         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
13036         prototypes and descriptions of __ieee128 versions of
13037         scalar_extract_exp, scalar_extract_sig, scalar_insert_exp,
13038         scalar_test_data_class, and scalar_test_neg built-in functions.
13039
13040 2016-07-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13041
13042         PR tree-optimization/81162
13043         * gimple-ssa-strength-reduction.c (replace_mult_candidate): Don't
13044         replace a negate with an add.
13045
13046 2017-07-14  James Greenhalgh  <james.greenhalgh@arm.com>
13047
13048         * doc/invoke.texi (arm/-mcpu): Document +crypto.
13049
13050 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13051
13052         * config/arm/arm-c.c (arm_cpu_builtins): Define
13053         __ARM_FEATURE_NUMERIC_MAXMIN solely based on TARGET_VFP5.
13054
13055 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13056
13057         * config/arm/arm-cpus.in (cortex-r52): Add new entry.
13058         (armv8-r): Set ARM Cortex-R52 as default CPU.
13059         * config/arm/arm-tables.opt: Regenerate.
13060         * config/arm/arm-tune.md: Regenerate.
13061         * config/arm/driver-arm.c (arm_cpu_table): Add entry for ARM
13062         Cortex-R52.
13063         * doc/invoke.texi: Mention -mtune=cortex-r52 and availability of fp.dp
13064         extension for -mcpu=cortex-r52.
13065
13066 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13067
13068         * config/arm/arm-isa.h (isa_bit_FP_ARMv8): Delete enumerator.
13069         (ISA_FP_ARMv8): Define as ISA_FPv5 and ISA_FP_D32.
13070         * config/arm/arm-cpus.in (armv8-r): Define fp.sp as enabling FPv5.
13071         (fp-armv8): Define it as FP_ARMv8 only.
13072         config/arm/arm.h (TARGET_FPU_ARMV8): Delete.
13073         (TARGET_VFP_FP16INST): Define using TARGET_VFP5 rather than
13074         TARGET_FPU_ARMV8.
13075         config/arm/arm.c (arm_rtx_costs_internal): Replace checks against
13076         TARGET_FPU_ARMV8 by checks against TARGET_VFP5.
13077         * config/arm/arm-builtins.c (arm_builtin_vectorized_function): Define
13078         first ARM_CHECK_BUILTIN_MODE definition using TARGET_VFP5 rather
13079         than TARGET_FPU_ARMV8.
13080         * config/arm/arm-c.c (arm_cpu_builtins): Likewise for
13081         __ARM_FEATURE_NUMERIC_MAXMIN macro definition.
13082         * config/arm/arm.md (cmov<mode>): Condition on TARGET_VFP5 rather than
13083         TARGET_FPU_ARMV8.
13084         * config/arm/neon.md (neon_vrint): Likewise.
13085         (neon_vcvt): Likewise.
13086         (neon_<fmaxmin_op><mode>): Likewise.
13087         (<fmaxmin><mode>3): Likewise.
13088         * config/arm/vfp.md (l<vrint_pattern><su_optab><mode>si2): Likewise.
13089         * config/arm/predicates.md (arm_cond_move_operator): Check against
13090         TARGET_VFP5 rather than TARGET_FPU_ARMV8 and fix spacing.
13091
13092 2017-07-14  Jackson Woodruff  <jackson.woodruff@arm.com>
13093
13094         * config/aarch64/aarch64.c (aarch64_print_operand): Move comments
13095         to top of function.
13096
13097 2017-07-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13098
13099         * gimple-ssa-store-merging.c (clear_bit_region): Replace reference to
13100         loop in comment with memset.
13101
13102 2017-07-14  Martin Liska  <mliska@suse.cz>
13103
13104         * cfgexpand.c (expand_gimple_basic_block): Remove dead comment.
13105         * dwarf2out.c (is_java): Remove the function.
13106         (output_pubname): Remove usage of the function.
13107         (lower_bound_default): Remove usage of DW_LANG_Java.
13108         (gen_compile_unit_die): Likewise.
13109         * gcc.c: Remove compiler defaults for .java and .zip files.
13110         * gimple-expr.c (remove_suffix): Change as there's no longer
13111         extension than 4-letter one.
13112         * gimplify.c (mostly_copy_tree_r): Remove Java-special part.
13113         (gimplify_save_expr): Likewise.
13114         * ipa-utils.h (polymorphic_type_binfo_p): Remove the comment
13115         as it's possible even for other languages than Java.
13116         * langhooks.h (struct lang_hooks): Remove Java from a comment.
13117         * lto-opts.c (lto_write_options): Remove reference to Java.
13118         * opts.c (strip_off_ending): Update file extension handling.
13119         * tree-cfg.c (verify_gimple_call): Remove comment with Java.
13120         * tree-eh.c (lower_resx): Likewise.
13121         * tree.c (free_lang_data_in_type): Remove dead code.
13122         (find_decls_types_r): Likewise.
13123         (build_common_builtin_nodes): Remove Java from a comment.
13124         (verify_type): Remove dead code.
13125         * varasm.c (assemble_external): Remove Java from a comment.
13126
13127 2017-07-14  Martin Liska  <mliska@suse.cz>
13128
13129         * opts.c (finish_options): Add quotes.
13130         (common_handle_option): Likewise.
13131
13132 2017-07-14  Martin Liska  <mliska@suse.cz>
13133
13134         * dbxout.c (get_lang_number): Do not handle GNU Pascal.
13135         * dbxout.h (extern void dbxout_stab_value_internal_label_diff):
13136         Remove N_SO_PASCAL.
13137         * dwarf2out.c (lower_bound_default): Do not handle
13138         DW_LANG_Pascal83.
13139         (gen_compile_unit_die): Likewise.
13140         * gcc.c: Remove default extension binding for GNU Pascal.
13141         * stmt.c: Remove Pascal language from a comment.
13142         * xcoffout.c: Likewise.
13143
13144 2017-07-13  David Malcolm  <dmalcolm@redhat.com>
13145
13146         PR c/81405
13147         * diagnostic-show-locus.c (fixit_cmp): New function.
13148         (layout::layout): Sort m_fixit_hints.
13149         (column_range::column_range): Assert that the values are valid.
13150         (struct char_span): New struct.
13151         (correction::overwrite): New method.
13152         (struct source_line): New struct.
13153         (line_corrections::add_hint): Add assertions.  Reimplement memcpy
13154         calls in terms of classes source_line and char_span, and
13155         correction::overwrite.
13156         (selftest::test_overlapped_fixit_printing_2): New function.
13157         (selftest::diagnostic_show_locus_c_tests): Call it.
13158
13159 2017-07-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
13160
13161         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Return
13162         early if there is no lhs.
13163
13164 2017-07-13  Martin Liska  <mliska@suse.cz>
13165
13166         * dwarf2out.c (gen_pointer_type_die): Remove dead code.
13167         (gen_reference_type_die): Likewise.
13168         * stor-layout.c: Remove Pascal-related comment.
13169
13170 2017-07-13  Martin Liska  <mliska@suse.cz>
13171
13172         * opts.c (finish_options): Add quotes to error messages.
13173         (parse_sanitizer_options): Likewise.
13174
13175 2017-07-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13176
13177         * doc/invoke.texi (armv8-r): Document +fp.sp ARMv8-R extension.
13178
13179 2017-07-13  Richard Earnshaw  <rearnsha@arm.com>
13180
13181         * config/arm/vxworks.h (TARGET_ENDIAN_DEFAULT): Define.
13182
13183 2017-07-13  Maxim Ostapenko  <m.ostapenko@samsung.com>
13184
13185         * asan.c (asan_emit_allocas_unpoison): Use ptr_mode for arguments
13186         during expansion.
13187         * builtins.c (expand_asan_emit_allocas_unpoison): Likewise.
13188
13189 2017-07-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
13190
13191         PR target/81193
13192         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If GLIBC
13193         provides the hardware capability bits, define the macro
13194         __BUILTIN_CPU_SUPPORTS__.
13195         * config/rs6000/rs6000.c (cpu_expand_builtin): Generate a warning
13196         if GLIBC does not provide the hardware capability bits.  Add a
13197         gcc_unreachable call if the built-in cpu function is neither
13198         __builtin_cpu_is nor __builtin_cpu_supports.
13199         (rs6000_get_function_versions_dispatcher): Change the warning
13200         that an old GLIBC is used which does not export the capability
13201         bits to be an error.
13202         * doc/extend.texi (target_clones attribute): Document the
13203         restriction that GLIBC 2.23 or newer is needed on the PowerPC.
13204         (PowerPC built-in functions): Document that GLIBC 2.23 or newer is
13205         needed by __builtin_cpu_is and __builtin_cpu_supports.  Document
13206         the macros defined by GCC if the newer GLIBC is available.
13207
13208 2017-07-12  Jeff Law  <law@redhat.com>
13209
13210         * config/riscv/riscv.c: Remove unnecessary includes.  Reorder
13211         remaining includes slightly.
13212         * config/riscv/riscv-builtins.c: Include profile-count.h.
13213
13214 2017-07-12  Georg-Johann Lay  <avr@gjlay.de>
13215
13216         PR target/79883
13217         * config/avr/avr.c (avr_set_current_function): In diagnostic
13218         messages: Quote keywords and (parts of) identifiers.
13219         [WITH_AVRLIBC]: Warn for functions named "ISR", "SIGNAL" or
13220         "INTERUPT".
13221
13222 2017-07-12  Carl Love  <cel@us.ibm.com>
13223
13224         * config/rs6000/rs6000-c.c: Add support for built-in functions
13225         vector bool char vec_revb (vector bool char);
13226         vector bool short vec_revb (vector short char);
13227         vector bool int vec_revb (vector bool int);
13228         vector bool long long vec_revb (vector bool long long);
13229         * doc/extend.texi: Update the built-in documentation file for the
13230         new built-in functions.
13231
13232 2017-07-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13233
13234         * config/s390/s390.md: Remove movcc splitter.
13235
13236 2017-07-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13237
13238         * config/s390/s390.c (s390_rtx_costs): Return proper costs for
13239         load/store on condition.
13240
13241 2017-07-12  Georg-Johann Lay  <avr@gjlay.de>
13242
13243         PR target/81407
13244         * config/avr/avr.c (avr_encode_section_info)
13245         [progmem && !TREE_READONLY]: Error if progmem object needs
13246         constructing.
13247
13248 2017-07-11  Michael Collison  <michael.collison@arm.com>
13249
13250         * config/aarch64/aarch64-simd.md (aarch64_sub<mode>_compare0):
13251         New pattern.
13252
13253 2017-07-11  Carl Love  <cel@us.ibm.com>
13254
13255         * config/rs6000/rs6000-c.c: Add support for builtins
13256         vector unsigned int vec_parity_lsbb (vector signed int);
13257         vector unsigned int vec_parity_lsbb (vector unsigned int);
13258         vector unsigned __int128 vec_parity_lsbb (vector signed __int128);
13259         vector unsigned __int128 vec_parity_lsbb (vector unsigned __int128);
13260         vector unsigned long long vec_parity_lsbb (vector signed long long);
13261         vector unsigned long long vec_parity_lsbb (vector unsigned long long);
13262         * config/rs6000/rs6000-builtin.def (VPARITY_LSBB): Add BU_P9V_OVERLOAD1.
13263         * config/rs6000/altivec.h (vec_parity_lsbb): Add define.
13264         * doc/extend.texi: Update the built-in documentation file for the
13265         new built-in functions.
13266
13267 2017-07-11  David Malcolm  <dmalcolm@redhat.com>
13268
13269         * diagnostic-show-locus.c: Include "gcc-rich-location.h".
13270         (layout::m_primary_loc): New field.
13271         (layout::layout): Initialize new field.  Move location filtering
13272         logic from here to...
13273         (layout::maybe_add_location_range): ...this new method.  Add
13274         support for filtering to just the lines already specified by other
13275         locations.
13276         (layout::will_show_line_p): New method.
13277         (gcc_rich_location::add_location_if_nearby): New method.
13278         (selftest::test_add_location_if_nearby): New test function.
13279         (selftest::diagnostic_show_locus_c_tests): Call it.
13280         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
13281         New method.
13282
13283 2017-07-11  Tom de Vries  <tom@codesourcery.com>
13284
13285         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG): New macro.
13286         (bb_first_real_insn): New function.
13287         (nvptx_single): Add extra initialization of broadcasted condition
13288         variables.
13289
13290 2017-07-11  Nathan Sidwell  <nathan@acm.org>
13291
13292         * dwarf2out.c (gen_member_die): Remove useless check for anon ctors.
13293
13294 2017-07-11  Georg-Johann Lay  <avr@gjlay.de>
13295
13296         * doc/extend.texi (AVR Function Attributes): Remove weblink to
13297         Binutils doc as TEXI will mess them up.
13298         * doc/invoke.texi (AVR Options): Same here.
13299
13300 2017-07-11  Daniel Cederman  <cederman@gaisler.com>
13301
13302         * config/sparc/sparc.opt (mfix-ut700): New option.
13303         (mfix-gr712rc): Likewise.
13304         (sparc_fix_b2bst): New variable.
13305         * doc/invoke.texi (SPARC options): Document them.
13306         (ARM options): Fix warnings.
13307         * config/sparc/sparc.c (sparc_do_work_around_errata): Insert NOP
13308         instructions to prevent sequences that can trigger the store-store
13309         errata for certain LEON3FT processors.
13310         (pass_work_around_errata::gate): Also test sparc_fix_b2bst.
13311         (sparc_option_override): Set sparc_fix_b2bst appropriately.
13312         * config/sparc/sparc.md (fix_b2bst): New attribute.
13313         (in_branch_delay): Prevent stores in delay slot if fix_b2bst.
13314
13315 2017-07-10  Uros Bizjak  <ubizjak@gmail.com>
13316
13317         PR target/81375
13318         * config/i386/i386.md (divsf3): Add TARGET_SSE to TARGET_SSE_MATH.
13319         (rcpps): Ditto.
13320         (*rsqrtsf2_sse): Ditto.
13321         (rsqrtsf2): Ditto.
13322         (div<mode>3): Macroize insn from divdf3 and divsf3
13323         using MODEF mode iterator.
13324
13325 2017-07-10  Martin Sebor  <msebor@redhat.com>
13326
13327         PR tree-optimization/80397
13328         * gimple-ssa-sprintf.c (format_integer): Use INTEGRAL_TYPE_P()
13329         instead of testing for equality to INTEGER_TYPE.
13330
13331 2017-07-10  Vineet Gupta <vgupta@synopsys.com>
13332
13333         * config.gcc: Remove uclibc from arc target spec.
13334
13335 2017-07-10  Claudiu Zissulescu  <claziss@synopsys.com>
13336
13337         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Define.
13338
13339 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
13340
13341         PR lto/80838
13342         * lto-wrapper.c (remove_option): New function.
13343         (merge_and_complain): Merge PIC/PIE options more realistically.
13344
13345 2017-07-10  Georg-Johann Lay  <avr@gjlay.de>
13346
13347         Better ISR prologues by supporting GASes __gcc_isr pseudo insn.
13348
13349         PR target/20296
13350         PR target/81268
13351         * configure.ac [target=avr]: Add GAS check for -mgcc-isr.
13352         (HAVE_AS_AVR_MGCCISR_OPTION):  If so, AC_DEFINE it.
13353         * config.in: Regenerate.
13354         * configure: Regenerate.
13355         * doc/extend.texi (AVR Function Attributes) <no_gccisr>: Document it.
13356         * doc/invoke.texi (AVR Options) <-mgas-isr-prologues>: Document it.
13357         * config/avr/avr.opt (-mgas-isr-prologues): New option and...
13358         (TARGET_GASISR_PROLOGUES): ...target mask.
13359         * common/config/avr/avr-common.c
13360         (avr_option_optimization_table) [OPT_LEVELS_1_PLUS_NOT_DEBUG]:
13361         Set -mgas-isr-prologues.
13362         * config/avr/avr-passes.def (avr_pass_pre_proep): Add
13363         INSERT_PASS_BEFORE for it.
13364         * config/avr/avr-protos.h (make_avr_pass_pre_proep): New proto.
13365         * config/avr/avr.c (avr_option_override)
13366         [!HAVE_AS_AVR_MGCCISR_OPTION]: Unset TARGET_GASISR_PROLOGUES.
13367         (avr_no_gccisr_function_p, avr_hregs_split_reg): New static functions.
13368         (avr_attribute_table) <no_gccisr>: Add new function attribute.
13369         (avr_set_current_function) <is_no_gccisr>: Init machine field.
13370         (avr_pass_data_pre_proep, avr_pass_pre_proep): New pass data
13371         and rtl_opt_pass.
13372         (make_avr_pass_pre_proep): New function.
13373         (emit_push_sfr) <treg>: Add argument to function and use it
13374         instead of TMP_REG.
13375         (avr_expand_prologue) [machine->gasisr.maybe]: Emit gasisr insn
13376         and set machine->gasisr.yes.
13377         (avr_expand_epilogue) [machine->gasisr.yes]: Similar.
13378         (avr_asm_function_end_prologue) [machine->gasisr.yes]: Add
13379         __gcc_isr.n_pushed to .L__stack_usage.
13380         (TARGET_ASM_FINAL_POSTSCAN_INSN): Define to...
13381         (avr_asm_final_postscan_insn): ...this new static function.
13382         * config/avr/avr.h (machine_function)
13383         <is_no_gccisr, use_L__stack_usage>: New fields.
13384         <gasisr, gasisr.yes, gasisr.maybe, gasisr.regno>: New fields.
13385         * config/avr/avr.md (UNSPECV_GASISR): Add unspecv enum.
13386         (GASISR_Prologue, GASISR_Epilogue, GASISR_Done): New define_constants.
13387         (gasisr, *gasisr): New expander and insn.
13388         * config/avr/gen-avr-mmcu-specs.c (print_mcu)
13389         [HAVE_AS_AVR_MGCCISR_OPTION]: Print asm_gccisr spec.
13390         * config/avr/specs.h (ASM_SPEC) <asm_gccisr>: Add sub spec.
13391
13392 2017-07-10  Richard Earnshaw  <rearnsha@arm.com>
13393
13394         * config/arm/parsecpu.awk (gen_comm_data): Do not escape single quotes
13395         in quoted strings.
13396
13397 2017-07-10  Georg-Johann Lay  <avr@gjlay.de>
13398
13399         Move jump-tables out of .text again.
13400
13401         PR target/81075
13402         * config/avr/avr.c (ASM_OUTPUT_ADDR_VEC_ELT): Remove function.
13403         (ASM_OUTPUT_ADDR_VEC): New function.
13404         (avr_adjust_insn_length) [JUMP_TABLE_DATA_P]: Return 0.
13405         (avr_final_prescan_insn) [avr_log.insn_addresses]: Dump
13406         INSN_ADDRESSes as asm comment.
13407         * config/avr/avr.h (JUMP_TABLES_IN_TEXT_SECTION): Adjust comment.
13408         (ASM_OUTPUT_ADDR_VEC_ELT): Remove define.
13409         (ASM_OUTPUT_ADDR_VEC): Define to avr_output_addr_vec.
13410         * config/avr/avr.md (*tablejump): Adjust comment.
13411         * config/avr/elf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove.
13412         * config/avr/avr-log.c (avr_log_set_avr_log) <insn_addresses>:
13413         New detail.
13414         * config/avr/avr-protos.h (avr_output_addr_vec_elt): Remove proto.
13415         (avr_output_addr_vec): New proto.
13416         (avr_log_t) <insn_addresses>: New field.
13417
13418 2017-07-09  H.J. Lu  <hongjiu.lu@intel.com>
13419
13420         PR target/81313
13421         * config/i386/i386.c (ix86_function_arg_advance): Set
13422         outgoing_args_on_stack to true if there are outgoing arguments
13423         on stack.
13424         (ix86_function_arg): Likewise.
13425         (ix86_get_drap_rtx): Use DRAP only if there are outgoing
13426         arguments on stack and ACCUMULATE_OUTGOING_ARGS is false.
13427         * config/i386/i386.h (machine_function): Add
13428         outgoing_args_on_stack.
13429
13430 2017-07-09  Krister Walfridsson  <krister.walfridsson@gmail.com>
13431
13432         * config.gcc (*-*-netbsd*): Remove check for NetBSD versions not
13433         supporting pthreds.
13434         * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always enable pthreads.
13435
13436 2017-07-08  Richard Sandiford  <richard.sandiford@linaro.org>
13437
13438         * Makefile.in (HOOKS_H, RTL_BASE_H, FUNCTION_H, EXPR_H, REGS_H)
13439         (REAL_H): Remove $(MACHMODE_H).
13440         (FIXED_VALUE_H, TREE_CORE_H, CFGLOOP_H): Remove $(MACHMODE_H) and
13441         double-int.h.
13442         (CORETYPES_H): Add signop.h, wide-int.h, wide-int-print.h,
13443         $(MACHMODE_H) and double-int.h.
13444         (build/min-insn-modes.o): Depend on $(CORETYPES_H) rather than
13445         $(MACHMODE_H).
13446         (gengtype-state.o, gengtype.o, build/gengtype.o): Don't depend on
13447         double-int.h.
13448
13449 2017-07-07  Andrew Pinski  <apinski@cavium.com>
13450
13451         * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Check
13452         prev_set and curr_set for AARCH64_FUSE_ALU_BRANCH.
13453
13454 2017-07-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
13455
13456         * config/rs6000/rs6000.c (rs6000_get_function_versions_dispatcher):
13457         Add warning if GCC was not configured to link against a GLIBC that
13458         exports the hardware capability bits.
13459         (make_resolver_func): Make resolver function private and not a
13460         COMDAT function.  Create the name with clone_function_name instead
13461         of make_unique_name.
13462
13463         PR target/81348
13464         * config/rs6000/rs6000.md (HI sign_extend splitter): Use the
13465         correct operand in doing the split.
13466
13467 2017-07-07 Carl Love  <cel@us.ibm.com>
13468
13469         * config/rs6000/rs6000-c: Add support for built-in function
13470         vector unsigned short vec_pack_to_short_fp32 (vector float,
13471                                                       vector float).
13472         * config/rs6000/rs6000-builtin.def (CONVERT_4F32_8I16): Add
13473         BU_P9V_AV_2 and BU_P9V_OVERLOAD_2 definitions.
13474         * config/rs6000/altivec.h (vec_pack_to_short_fp32): Add define.
13475         * config/rs6000/altivec.md(UNSPEC_CONVERT_4F32_8I16): Add UNSPEC.
13476         (convert_4f32_8i16): Add define_expand.
13477         * doc/extend.texi: Update the built-in documentation file for the
13478         new built-in function.
13479
13480 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13481
13482         * config/sparc/m8.md: New file.
13483         * config/sparc/sparc.md: Include m8.md.
13484
13485 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13486
13487         * config/sparc/sparc.opt: New option -mvis4b.
13488         * config/sparc/sparc.c (dump_target_flag_bits): Handle MASK_VIS4B.
13489         (sparc_option_override): Handle VIS4B.
13490         (enum sparc_builtins): Define
13491         SPARC_BUILTIN_DICTUNPACK{8,16,32},
13492         SPARC_BUILTIN_FPCMP{LE,GT,EQ,NE}{8,16,32}SHL,
13493         SPARC_BUILTIN_FPCMPU{LE,GT}{8,16,32}SHL,
13494         SPARC_BUILTIN_FPCMPDE{8,16,32}SHL and
13495         SPARC_BUILTIN_FPCMPUR{8,16,32}SHL.
13496         (check_constant_argument): New function.
13497         (sparc_vis_init_builtins): Define builtins
13498         __builtin_vis_dictunpack{8,16,32},
13499         __builtin_vis_fpcmp{le,gt,eq,ne}{8,16,32}shl,
13500         __builtin_vis_fpcmpu{le,gt}{8,16,32}shl,
13501         __builtin_vis_fpcmpde{8,16,32}shl and
13502         __builtin_vis_fpcmpur{8,16,32}shl.
13503         (sparc_expand_builtin): Check that the constant operands to
13504         __builtin_vis_fpcmp*shl and _builtin_vis_dictunpack* are indeed
13505         constant and in range.
13506         * config/sparc/sparc-c.c (sparc_target_macros): Handle
13507         TARGET_VIS4B.
13508         * config/sparc/sparc.h (SPARC_IMM2_P): Define.
13509         (SPARC_IMM5_P): Likewise.
13510         * config/sparc/sparc.md (cpu_feature): Add new feagure "vis4b".
13511         (enabled): Handle vis4b.
13512         (UNSPEC_DICTUNPACK): New unspec.
13513         (UNSPEC_FPCMPSHL): Likewise.
13514         (UNSPEC_FPUCMPSHL): Likewise.
13515         (UNSPEC_FPCMPDESHL): Likewise.
13516         (UNSPEC_FPCMPURSHL): Likewise.
13517         (cpu_feature): New CPU feature `vis4b'.
13518         (dictunpack{8,16,32}): New insns.
13519         (FPCSMODE): New mode iterator.
13520         (fpcscond): New code iterator.
13521         (fpcsucond): Likewise.
13522         (fpcmp{le,gt,eq,ne}{8,16,32}{si,di}shl): New insns.
13523         (fpcmpu{le,gt}{8,16,32}{si,di}shl): Likewise.
13524         (fpcmpde{8,16,32}{si,di}shl): Likewise.
13525         (fpcmpur{8,16,32}{si,di}shl): Likewise.
13526         * config/sparc/constraints.md: Define constraints `q' for unsigned
13527         2-bit integer constants and `t' for unsigned 5-bit integer
13528         constants.
13529         * config/sparc/predicates.md (imm5_operand_dictunpack8): New
13530         predicate.
13531         (imm5_operand_dictunpack16): Likewise.
13532         (imm5_operand_dictunpack32): Likewise.
13533         (imm2_operand): Likewise.
13534         * doc/invoke.texi (SPARC Options): Document -mvis4b.
13535         * doc/extend.texi (SPARC VIS Built-in Functions): Document the
13536         ditunpack* and fpcmp*shl builtins.
13537
13538 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13539
13540         * config.gcc: Handle m8 in --with-{cpu,tune} options.
13541         * config.in: Add HAVE_AS_SPARC6 define.
13542         * config/sparc/driver-sparc.c (cpu_names): Add entry for the SPARC
13543         M8.
13544         * config/sparc/sol2.h (CPP_CPU64_DEFAULT_SPEC): Define for
13545         TARGET_CPU_m8.
13546         (ASM_CPU32_DEFAUILT_SPEC): Likewise.
13547         (CPP_CPU_SPEC): Handle m8.
13548         (ASM_CPU_SPEC): Likewise.
13549         * config/sparc/sparc-opts.h (enum processor_type): Add
13550         PROCESSOR_M8.
13551         * config/sparc/sparc.c (m8_costs): New struct.
13552         (sparc_option_override): Handle TARGET_CPU_m8.
13553         (sparc32_initialize_trampoline): Likewise.
13554         (sparc64_initialize_trampoline): Likewise.
13555         (sparc_issue_rate): Likewise.
13556         (sparc_register_move_cost): Likewise.
13557         * config/sparc/sparc.h (TARGET_CPU_m8): Define.
13558         (CPP_CPU64_DEFAULT_SPEC): Define for M8.
13559         (ASM_CPU64_DEFAULT_SPEC): Likewise.
13560         (CPP_CPU_SPEC): Handle M8.
13561         (ASM_CPU_SPEC): Likewise.
13562         (AS_M8_FLAG): Define.
13563         * config/sparc/sparc.md: Add m8 to the cpu attribute.
13564         * config/sparc/sparc.opt: New option -mcpu=m8 for sparc targets.
13565         * configure.ac (HAVE_AS_SPARC6): Check for assembler support for
13566         M8 instructions.
13567         * configure: Regenerate.
13568         * doc/invoke.texi (SPARC Options): Document -mcpu=m8 and
13569         -mtune=m8.
13570
13571 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13572
13573         * config/sparc/niagara7.md: Rework the DFA scheduler to use insn
13574         subtypes.
13575         * config/sparc/sparc.md: Remove the `v3pipe' insn attribute.
13576         ("*movdi_insn_sp32"): Do not set v3pipe.
13577         ("*movsi_insn"): Likewise.
13578         ("*movdi_insn_sp64"): Likewise.
13579         ("*movsf_insn"): Likewise.
13580         ("*movdf_insn_sp32"): Likewise.
13581         ("*movdf_insn_sp64"): Likewise.
13582         ("*zero_extendsidi2_insn_sp64"): Likewise.
13583         ("*sign_extendsidi2_insn"): Likewise.
13584         ("*mov<VM32:mode>_insn"): Likewise.
13585         ("*mov<VM64:mode>_insn_sp64"): Likewise.
13586         ("*mov<VM64:mode>_insn_sp32"): Likewise.
13587         ("<plusminus_insn><VADDSUB:mode>3"): Likewise.
13588         ("<vlop:code><VL:mode>3"): Likewise.
13589         ("*not_<vlop:code><VL:mode>3"): Likewise.
13590         ("*nand<VL:mode>_vis"): Likewise.
13591         ("*<vlnotop:code>_not1<VL:mode>_vis"): Likewise.
13592         ("*<vlnotop:code>_not2<VL:mode>_vis"): Likewise.
13593         ("one_cmpl<VL:mode>2"): Likewise.
13594         ("faligndata<VM64:mode>_vis"): Likewise.
13595         ("alignaddrsi_vis"): Likewise.
13596         ("alignaddrdi_vis"): Likweise.
13597         ("alignaddrlsi_vis"): Likewise.
13598         ("alignaddrldi_vis"): Likewise.
13599         ("fcmp<gcond:code><GCM:gcm_name><P:mode>_vis"): Likewise.
13600         ("bmaskdi_vis"): Likewise.
13601         ("bmasksi_vis"): Likewise.
13602         ("bshuffle<VM64:mode>_vis"): Likewise.
13603         ("cmask8<P:mode>_vis"): Likewise.
13604         ("cmask16<P:mode>_vis"): Likewise.
13605         ("cmask32<P:mode>_vis"): Likewise.
13606         ("pdistn<P:mode>_vis"): Likewise.
13607         ("<vis3_addsub_ss_patname><VASS:mode>3"): Likewise.
13608
13609 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13610
13611         * config/sparc/sparc.md ("subtype"): New insn attribute.
13612         ("*wrgsr_sp64"): Set insn subtype.
13613         ("*rdgsr_sp64"): Likewise.
13614         ("alignaddrsi_vis"): Likewise.
13615         ("alignaddrdi_vis"): Likewise.
13616         ("alignaddrlsi_vis"): Likewise.
13617         ("alignaddrldi_vis"): Likewise.
13618         ("<plusminus_insn><VADDSUB:mode>3"): Likewise.
13619         ("fexpand_vis"): Likewise.
13620         ("fpmerge_vis"): Likewise.
13621         ("faligndata<VM64:mode>_vis"): Likewise.
13622         ("bshuffle<VM64:mode>_vis"): Likewise.
13623         ("cmask8<P:mode>_vis"): Likewise.
13624         ("cmask16<P:mode>_vis"): Likewise.
13625         ("cmask32<P:mode>_vis"): Likewise.
13626         ("fchksm16_vis"): Likewise.
13627         ("v<vis3_shift_patname><GCM:mode>3"): Likewise.
13628         ("fmean16_vis"): Likewise.
13629         ("fp<plusminus_insn>64_vis"): Likewise.
13630         ("<plusminus_insn>v8qi3"): Likewise.
13631         ("<vis3_addsub_ss_patname><VASS:mode>3"): Likewise.
13632         ("<vis4_minmax_patname><VMMAX:mode>3"): Likewise.
13633         ("<vis4_uminmax_patname><VMMAX:mode>3"): Likewise.
13634         ("<vis3_addsub_ss_patname>v8qi3"): Likewise.
13635         ("<vis4_addsub_us_patname><VAUS:mode>3"): Likewise.
13636         ("*movqi_insn"): Likewise.
13637         ("*movhi_insn"): Likewise.
13638         ("*movsi_insn"): Likewise.
13639         ("movsi_pic_gotdata_op"): Likewise.
13640         ("*movdi_insn_sp32"): Likewise.
13641         ("*movdi_insn_sp64"): Likewise.
13642         ("movdi_pic_gotdata_op"): Likewise.
13643         ("*movsf_insn"): Likewise.
13644         ("*movdf_insn_sp32"): Likewise.
13645         ("*movdf_insn_sp64"): Likewise.
13646         ("*zero_extendhisi2_insn"): Likewise.
13647         ("*zero_extendqihi2_insn"): Likewise.
13648         ("*zero_extendqisi2_insn"): Likewise.
13649         ("*zero_extendqidi2_insn"): Likewise.
13650         ("*zero_extendhidi2_insn"): Likewise.
13651         ("*zero_extendsidi2_insn_sp64"): Likewise.
13652         ("ldfsr"): Likewise.
13653         ("prefetch_64"): Likewise.
13654         ("prefetch_32"): Likewise.
13655         ("tie_ld32"): Likewise.
13656         ("tie_ld64"): Likewise.
13657         ("*tldo_ldub_sp32"): Likewise.
13658         ("*tldo_ldub1_sp32"): Likewise.
13659         ("*tldo_ldub2_sp32"): Likewise.
13660         ("*tldo_ldub_sp64"): Likewise.
13661         ("*tldo_ldub1_sp64"): Likewise.
13662         ("*tldo_ldub2_sp64"): Likewise.
13663         ("*tldo_ldub3_sp64"): Likewise.
13664         ("*tldo_lduh_sp32"): Likewise.
13665         ("*tldo_lduh1_sp32"): Likewise.
13666         ("*tldo_lduh_sp64"): Likewise.
13667         ("*tldo_lduh1_sp64"): Likewise.
13668         ("*tldo_lduh2_sp64"): Likewise.
13669         ("*tldo_lduw_sp32"): Likewise.
13670         ("*tldo_lduw_sp64"): Likewise.
13671         ("*tldo_lduw1_sp64"): Likewise.
13672         ("*tldo_ldx_sp64"): Likewise.
13673         ("*mov<VM32:mode>_insn"): Likewise.
13674         ("*mov<VM64:mode>_insn_sp64"): Likewise.
13675         ("*mov<VM64:mode>_insn_sp32"): Likewise.
13676
13677 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13678
13679         * config/sparc/sparc.md ("type"): New insn type viscmp.
13680         ("fcmp<gcond:code><GCM:gcm_name><P:mode>_vis"): Set insn type to
13681         viscmp.
13682         ("fpcmp<gcond:code>8<P:mode>_vis"): Likewise.
13683         ("fucmp<gcond:code>8<P:mode>_vis"): Likewise.
13684         ("fpcmpu<gcond:code><GCM:gcm_name><P:mode>_vis"): Likewise.
13685         * config/sparc/niagara7.md ("n7_vis_logical_v3pipe"): Handle
13686         viscmp.
13687         ("n7_vis_logical_11cycle"): Likewise.
13688         * config/sparc/niagara4.md ("n4_vis_logical"): Likewise.
13689         * config/sparc/niagara2.md ("niag3_vis": Likewise.
13690         * config/sparc/niagara.md ("niag_vis"): Likewise.
13691         * config/sparc/ultra3.md ("us3_fga"): Likewise.
13692         * config/sparc/ultra1_2.md ("us1_fga_double"): Likewise.
13693
13694 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13695
13696         * config/sparc/sparc.md: New instruction type `bmask'.
13697         (bmaskdi_vis): Use the `bmask' type.
13698         (bmasksi_vis): Likewise.
13699         * config/sparc/ultra3.md (us3_array): Likewise.
13700         * config/sparc/niagara7.md (n7_array): Likewise.
13701         * config/sparc/niagara4.md (n4_array): Likewise.
13702         * config/sparc/niagara2.md (niag2_vis): Likewise.
13703         (niag3_vis): Likewise.
13704         * config/sparc/niagara.md (niag_vis): Likewise.
13705
13706 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
13707
13708         * ipa-comdats.c: Remove optimize check from gate.
13709         * ipa-fnsummary.c (ipa_fn_summary_generate): do not generate summary
13710         for functions not optimized.
13711         (ipa_fn_summary_read): Skip optimize check.
13712         (ipa_fn_summary_write): Likewise.
13713         * ipa-inline-analysis.c (do_estimate_growth_1): Check that caller
13714         is optimized.
13715         * ipa-inline.c (can_inline_edge_p): Not optimized functions are
13716         uninlinable.
13717         (can_inline_edge_p): Check flag_pcc_struct_return for match.
13718         (check_callers): Give up on caller which is not optimized.
13719         (inline_small_functions): Likewise.
13720         (ipa_inline): Do not give up when not optimizing.
13721         * ipa-visbility.c (function_and_variable_visibility): Do not optimize
13722         away unoptimizes cdtors.
13723         (whole_program_function_and_variable_visibility): Do
13724         ipa_discover_readonly_nonaddressable_vars in LTO mode.
13725         * ipa.c (process_references): Do not check optimize.
13726         (symbol_table::remove_unreachable_nodes): Update optimize check.
13727         (set_writeonly_bit): Update optimize check.
13728         (pass_ipa_cdtor_merge::gate): Do not check optimize.
13729         (pass_ipa_single_use::gate): Remove.
13730
13731 2017-07-06  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
13732
13733         * config/rs6000/rs6000.c (union_defs, union_uses, insn_is_load_p,
13734         insn_is_store_p, insn_is_swap_p, const_load_sequence_p, v2df_reduction_p,
13735         rtx_is_swappable_p, insn_is_swappable_p, chain_contains_only_swaps,
13736         mark_swaps_for_removal, swap_const_vector_halves, adjust_subreg_index,
13737         permute_load, permute_store, adjust_extract, adjust_splat,
13738         adjust_xxpermdi, adjust_concat, adjust_vperm, handle_special_swappables,
13739         replace_swap_with_copy, dump_swap_insn_table,
13740         alignment_with_canonical_addr, alignment_mask, find_alignment_op,
13741         recombine_lvx_pattern, recombine_stvx_pattern,
13742         recombine_lvx_stvx_patterns, rs6000_analyze_swaps,
13743         make_pass_analyze_swaps): Move all code related to p8 swap optimizations
13744         to file rs6000-p8swap.c.
13745         * config/rs6000/rs6000-p8swap.c: New file.
13746         * config/rs6000/t-rs6000: Add rule to build rs6000-p8swap.o.
13747         * config.gcc: Add rs6000-p8swap.o to extra_objs for powerpc*-*-*
13748         and rs6000*-*-* targets.
13749
13750 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
13751
13752         * Makefile.in (selftest): Remove dependency on s-selftest-c++.
13753
13754 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
13755
13756         * lto-wrapper.c (merge_and_complain): Do not merge
13757         fexceptions, fnon_call_exceptions, ftrapv, ffp_contract_, fmath_errno,
13758         fsigned_zeros, ftrapping_math, fwrapv.
13759         (append_compiler_options): Do not track these options.
13760         (append_linker_options): Likewie
13761
13762 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
13763
13764         * cgraphunit.c (cgraph_node::finalize_function): When
13765         !flag_toplevel_reorde set no_reorder flag.
13766         (varpool_node::finalize_decl): Likewise.
13767         (symbol_table::compile): Drop no toplevel reorder path.
13768
13769 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
13770
13771         * bb-reorder.c (better_edge_p): Do not build traces across abnormal/eh
13772         edges; zero probability is not better than uninitialized.
13773
13774 2017-07-06  Maxim Ostapenko  <m.ostapenko@samsung.com>
13775
13776         * asan.h (asan_sanitize_allocas_p): Declare.
13777         * asan.c (asan_sanitize_allocas_p): New function.
13778         (handle_builtin_stack_restore): Bail out if !asan_sanitize_allocas_p.
13779         (handle_builtin_alloca): Likewise.
13780         * cfgexpand.c (expand_used_vars): Do not add allocas unpoisoning stuff
13781         if !asan_sanitize_allocas_p.
13782         * params.def (asan-instrument-allocas): Add new option.
13783         * params.h (ASAN_PROTECT_ALLOCAS): Define.
13784         * opts.c (common_handle_option): Disable allocas sanitization for
13785         KASan by default.
13786
13787 2017-07-06  Maxim Ostapenko  <m.ostapenko@samsung.com>
13788
13789         * asan.c: Include gimple-fold.h.
13790         (get_last_alloca_addr): New function.
13791         (handle_builtin_stackrestore): Likewise.
13792         (handle_builtin_alloca): Likewise.
13793         (asan_emit_allocas_unpoison): Likewise.
13794         (get_mem_refs_of_builtin_call): Add new parameter, remove const
13795         quallifier from first paramerer. Handle BUILT_IN_ALLOCA,
13796         BUILT_IN_ALLOCA_WITH_ALIGN and BUILT_IN_STACK_RESTORE builtins.
13797         (instrument_builtin_call): Pass gimple iterator to
13798         get_mem_refs_of_builtin_call.
13799         (last_alloca_addr): New global.
13800         * asan.h (asan_emit_allocas_unpoison): Declare.
13801         * builtins.c (expand_asan_emit_allocas_unpoison): New function.
13802         (expand_builtin): Handle BUILT_IN_ASAN_ALLOCAS_UNPOISON.
13803         * cfgexpand.c (expand_used_vars): Call asan_emit_allocas_unpoison
13804         if function calls alloca.
13805         * gimple-fold.c (replace_call_with_value): Remove static keyword.
13806         * gimple-fold.h (replace_call_with_value): Declare.
13807         * internal-fn.c: Include asan.h.
13808         * sanitizer.def (BUILT_IN_ASAN_ALLOCA_POISON,
13809         BUILT_IN_ASAN_ALLOCAS_UNPOISON): New builtins.
13810
13811 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
13812
13813         * Makefile.in (SELFTEST_FLAGS): Drop "-x c", moving it to...
13814         (C_SELFTEST_FLAGS): New.
13815         (CPP_SELFTEST_FLAGS): New.
13816         (SELFTEST_DEPS): New, from deps of s-selftest.
13817         (C_SELFTEST_DEPS): New, from deps of s-selftest.
13818         (CPP_SELFTEST_DEPS): New.
13819         (selftest): Add dependency on s-selftest-c++.
13820         (s-selftest): Rename to...
13821         (s-selftest-c): ...this, moving deps to SELFTEST_DEPS
13822         and C_SELFTEST_DEPS, and using C_SELFTEST_FLAGS rather
13823         than SELFTEST_FLAGS.
13824         (selftest-gdb): Rename to...
13825         (selftest-c-gdb): ...this, using C_SELFTEST_DEPS and
13826         C_SELFTEST_FLAGS.
13827         (selftest-gdb): Reintroduce as an alias for selftest-c-gdb.
13828         (selftest-valgrind): Rename to...
13829         (selftest-c-valgrind): ...this, using C_SELFTEST_DEPS and
13830         C_SELFTEST_FLAGS.
13831         (selftest-valgrind): Reintroduce as an alias for
13832         selftest-c-valgrind.
13833         (s-selftest-c++): New.
13834         (selftest-c++-gdb): New.
13835         (selftest-c++-valgrind): New.
13836
13837 2017-07-06  Olivier Hainque  <hainque@adacore.com>
13838
13839         * gcc.c (process_command): When deciding if undefined variables
13840         should be ignored when processing specs, accept "gcc -v" as well.
13841
13842 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
13843
13844         * auto-profile.c (afdo_set_bb_count, afdo_propagate_edge,
13845         afdo_annotate_cfg): Set counts/probabilities as determined by afdo.
13846
13847 2017-07-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13848
13849         * config/arm/arm-cpus.in (armv8-r): Add new entry.
13850         * config/arm/arm-isa.h (ISA_ARMv8r): Define macro.
13851         * config/arm/arm-tables.opt: Regenerate.
13852         * config/arm/arm.h (enum base_architecture): Add BASE_ARCH_8R
13853         enumerator.
13854         * doc/invoke.texi: Mention -march=armv8-r and its extensions.
13855
13856 2017-07-06  Carl Love  <cel@us.ibm.com>
13857
13858         * ChangeLog: Clean up from mid air collision
13859
13860 2017-07-06  Carl Love  <cel@us.ibm.com>
13861
13862         * config/rs6000/rs6000-c.c: Add support for built-in functions
13863         vector signed int vec_subc (vector signed int, vector signed int);
13864         vector signed __int128 vec_subc (vector signed __int128,
13865                                          vector signed __int128);
13866         vector unsigned __int128 vec_subc (vector unsigned __int128,
13867                                            vector unsigned __int128);
13868         vector signed int vec_sube (vector signed int, vector signed int,
13869                                     vector signed int);
13870         vector unsigned int vec_sube (vector unsigned int,
13871                                       vector unsigned int,
13872                                       vector unsigned int);
13873         vector signed __int128 vec_sube (vector signed __int128,
13874                                          vector signed __int128,
13875                                          vector signed__int128);
13876         vector unsigned __int128 vec_sube (vector unsigned __int128,
13877                                            vector unsigned __int128,
13878                                            vector unsigned __int128);
13879         vector signed int vec_subec (vector signed int, vector signed int,
13880                                      vector signed int);
13881         vector unsigned int vec_subec (vector unsigned int,
13882                                        vector unsigned int,
13883                                        vector unsigned int);
13884         vector signed __int128 vec_subec (vector signed __int128,
13885                                           vector signed __int128,
13886                                           vector signed__int128);
13887         vector unsigned __int128 vec_subec (vector unsigned __int128,
13888                                             vector unsigned __int128,
13889                                             vector unsigned __int128);
13890         * config/rs6000/rs6000.c (ALTIVEC_BUILTIN_VEC_SUBE,
13891         ALTIVEC_BUILTIN_VEC_SUBEC): Add ef_builtins.
13892         * config/rs6000/rs6000-builtin.def (SUBE, SUBEC): Add
13893         BU_ALTIVEC_OVERLOAD_X definitions.
13894         * config/rs6000/altivec.h (vec_sube, vec_subec): Add builtin defines.
13895         * doc/extend.texi: Update the built-in documentation file for the new
13896         built-in functions.
13897
13898 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
13899
13900         PR c++/79300
13901         * diagnostic-show-locus.c (layout::layout): Use start and finish
13902         spelling location for the start and finish of each range.
13903         * genmatch.c (linemap_client_expand_location_to_spelling_point):
13904         Add unused aspect param.
13905         * input.c (expand_location_1): Add "aspect" param, and use it
13906         to access the correct part of the location.
13907         (expand_location): Pass LOCATION_ASPECT_CARET to new param of
13908         expand_location_1.
13909         (expand_location_to_spelling_point): Likewise.
13910         (linemap_client_expand_location_to_spelling_point): Add "aspect"
13911         param, and pass it to expand_location_1.
13912
13913 2017-07-06  Sebastian Peryt  <sebastian.peryt@intel.com>
13914
13915         * config/i386/avx512fintrin.h (_mm_mask_getexp_round_ss,
13916         _mm_maskz_getexp_round_ss, _mm_mask_getexp_round_sd,
13917         _mm_maskz_getexp_round_sd, _mm_mask_getmant_round_sd,
13918         _mm_maskz_getmant_round_sd, _mm_mask_getmant_round_ss,
13919         _mm_maskz_getmant_round_ss, _mm_mask_getexp_ss, _mm_maskz_getexp_ss,
13920         _mm_mask_getexp_sd, _mm_maskz_getexp_sd, _mm_mask_getmant_sd,
13921         _mm_maskz_getmant_sd, _mm_mask_getmant_ss,
13922         _mm_maskz_getmant_ss): New intrinsics.
13923         (__builtin_ia32_getexpss128_mask): Changed to ...
13924         __builtin_ia32_getexpss128_round ... this.
13925         (__builtin_ia32_getexpsd128_mask): Changed to ...
13926         __builtin_ia32_getexpsd128_round ... this.
13927         * config/i386/i386-builtin-types.def
13928         ((V2DF, V2DF, V2DF, INT, V2DF, UQI, INT),
13929         (V4SF, V4SF, V4SF, INT, V4SF, UQI, INT)): New function type aliases.
13930         * config/i386/i386-builtin.def (__builtin_ia32_getexpsd_mask_round,
13931         __builtin_ia32_getexpss_mask_round,     __builtin_ia32_getmantsd_mask_round,
13932         __builtin_ia32_getmantss_mask_round): New builtins.
13933         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_INT_V2DF_UQI_INT,
13934         V4SF_FTYPE_V4SF_V4SF_INT_V4SF_UQI_INT): Handle new types.
13935         (CODE_FOR_avx512f_vgetmantv2df_mask_round,
13936         CODE_FOR_avx512f_vgetmantv4sf_mask_round): New cases.
13937         * config/i386/sse.md
13938         (avx512f_sgetexp<mode><round_saeonly_name>): Changed to ...
13939         avx512f_sgetexp<mode><mask_scalar_name>
13940         <round_saeonly_scalar_name> ... this.
13941         (vgetexp<ssescalarmodesuffix>\t{<round_saeonly_op3>%2, %1, %0|
13942         %0, %1, %2<round_saeonly_op3>}): Changed to ...
13943         vgetexp<ssescalarmodesuffix>
13944         \t{<round_saeonly_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
13945         %0<mask_scalar_operand3>, %1, %2<round_saeonly_scalar_mask_op3>} ... this.
13946         (avx512f_vgetmant<mode><round_saeonly_name>): Changed to ...
13947         avx512f_vgetmant<mode><mask_scalar_name>
13948         <round_saeonly_scalar_name> ... this.
13949         (vgetmant<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
13950         %0, %1, %2<round_saeonly_op4>, %3}): Changed to ...
13951         vgetmant<ssescalarmodesuffix>
13952         \t{%3, <round_saeonly_scalar_mask_op4>%2, %1, %0<mask_scalar_operand4>|
13953         %0<mask_scalar_operand4>, %1, %2
13954         <round_saeonly_scalar_mask_op4>, %3} ... this.
13955         * config/i386/subst.md (mask_scalar_operand4,
13956         round_saeonly_scalar_mask_operand4,     round_saeonly_scalar_mask_op4,
13957         round_saeonly_scalar_nimm_predicate): New subst attributes.
13958
13959 2017-07-06  Julia Koval  <julia.koval@intel.com>
13960
13961         * config/i386/i386.c (ix86_erase_embedded_rounding):
13962         Remove code for old rounding pattern.
13963
13964 2017-07-06  Richard Earnshaw  <rearnsha@arm.com>
13965
13966         * config/arm/t-arm (GTM_H): Add arm-cpu.h.
13967
13968 2017-07-06  Christophe Lyon  <christophe.lyon@linaro.org>
13969
13970         * doc/sourcebuild.texi (Test Directives, Variants of
13971         dg-require-support): Add documentation for dg-require-stack-check.
13972
13973 2017-07-05  Sebastian Peryt  <sebastian.peryt@intel.com>
13974
13975         * config/i386/subst.md (mask_scalar, round_scalar,
13976         round_saeonly_scalar): New meta-templates.
13977         (mask_scalar_name, mask_scalar_operand3, round_scalar_name,
13978         round_scalar_mask_operand3, round_scalar_mask_op3,
13979         round_scalar_constraint, round_scalar_prefix, round_saeonly_scalar_name,
13980         round_saeonly_scalar_mask_operand3, round_saeonly_scalar_mask_op3,
13981         round_saeonly_scalar_constraint,
13982         round_saeonly_scalar_prefix): New subst attribute.
13983         * config/i386/sse.md
13984         (<sse>_vm<plusminus_insn><mode>3<mask_name><round_name>): Renamed to ...
13985         <sse>_vm<plusminus_insn><mode>3<mask_scalar_name>
13986         <round_scalar_name> ... this.
13987         (<sse>_vm<multdiv_mnemonic><mode>3<mask_name><round_name>): Renamed to ...
13988         <sse>_vm<multdiv_mnemonic><mode>3<mask_scalar_name>
13989         <round_scalar_name> ... this.
13990         (<sse>_vm<code><mode>3<mask_name><round_saeonly_name>): Renamed to ...
13991         <sse>_vm<code><mode>3<mask_scalar_name>
13992         <round_saeonly_scalar_name> ... this.
13993         (v<plusminus_mnemonic><ssescalarmodesuffix>
13994         \t{<round_mask_op3>%2, %1, %0<mask_operand3>|
13995         %0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}): Changed to ...
13996         v<plusminus_mnemonic><ssescalarmodesuffix>
13997         \t{<round_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
13998         %0<mask_scalar_operand3>, %1, %<iptr>2<round_scalar_mask_op3>} ... this.
13999         (v<multdiv_mnemonic><ssescalarmodesuffix>
14000         \t{<round_mask_op3>%2, %1, %0<mask_operand3>|
14001         %0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}): Changed to ...
14002         v<multdiv_mnemonic><ssescalarmodesuffix>
14003         \t{<round_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
14004         %0<mask_scalar_operand3>, %1, %<iptr>2<round_scalar_mask_op3>} ... this.
14005         (v<maxmin_float><ssescalarmodesuffix>
14006         \t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|
14007         %0<mask_operand3>, %1, %<iptr>2<round_saeonly_mask_op3>}): Changed to ...
14008         v<maxmin_float><ssescalarmodesuffix>
14009         \t{<round_saeonly_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
14010         %0<mask_scalar_operand3>, %1, %<iptr>2
14011         <round_saeonly_scalar_mask_op3>} ... this.
14012
14013 2017-07-05  Richard Earnshaw  <rearnsha@arm.com>
14014
14015         * config/arm/arm.c (arm_fixed_condition_code_regs): New function.
14016         (TARGET_FIXED_CONDITION_CODE_REGS): Redefine.
14017
14018 2017-07-05  Richard Sandiford  <richard.sandiford@linaro.org>
14019             Alan Hayward  <alan.hayward@arm.com>
14020             David Sherwood  <david.sherwood@arm.com>
14021
14022         * combine.c (simplify_if_then_else): Remove "enum" before
14023         "machine_mode".
14024         * compare-elim.c (can_eliminate_compare): Likewise.
14025         * config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type):
14026         Likewise.
14027         (aarch64_lookup_simd_builtin_type): Likewise.
14028         (aarch64_simd_builtin_type): Likewise.
14029         (aarch64_init_simd_builtin_types): Likewise.
14030         (aarch64_simd_expand_args): Likewise.
14031         * config/aarch64/aarch64-protos.h (aarch64_simd_attr_length_rglist):
14032         Likewise.
14033         (aarch64_reverse_mask): Likewise.
14034         (aarch64_simd_emit_reg_reg_move): Likewise.
14035         (aarch64_gen_adjusted_ldpstp): Likewise.
14036         (aarch64_ccmp_mode_to_code): Likewise.
14037         (aarch64_operands_ok_for_ldpstp): Likewise.
14038         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
14039         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
14040         Likewise.
14041         (aarch64_min_divisions_for_recip_mul): Likewise.
14042         (aarch64_reassociation_width): Likewise.
14043         (aarch64_get_condition_code_1): Likewise.
14044         (aarch64_simd_emit_reg_reg_move): Likewise.
14045         (aarch64_simd_attr_length_rglist): Likewise.
14046         (aarch64_reverse_mask): Likewise.
14047         (aarch64_operands_ok_for_ldpstp): Likewise.
14048         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
14049         (aarch64_gen_adjusted_ldpstp): Likewise.
14050         * config/aarch64/cortex-a57-fma-steering.c (fma_node::rename):
14051         Likewise.
14052         * config/arc/arc.c (legitimate_offset_address_p): Likewise.
14053         * config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise.
14054         (arm_lookup_simd_builtin_type): Likewise.
14055         (arm_simd_builtin_type): Likewise.
14056         (arm_init_simd_builtin_types): Likewise.
14057         (arm_expand_builtin_args): Likewise.
14058         * config/arm/arm-protos.h (arm_expand_builtin): Likewise.
14059         * config/ft32/ft32.c (ft32_libcall_value): Likewise.
14060         (ft32_setup_incoming_varargs): Likewise.
14061         (ft32_function_arg): Likewise.
14062         (ft32_function_arg_advance): Likewise.
14063         (ft32_pass_by_reference): Likewise.
14064         (ft32_arg_partial_bytes): Likewise.
14065         (ft32_valid_pointer_mode): Likewise.
14066         (ft32_addr_space_pointer_mode): Likewise.
14067         (ft32_addr_space_legitimate_address_p): Likewise.
14068         * config/i386/i386-protos.h (ix86_operands_ok_for_move_multiple):
14069         Likewise.
14070         * config/i386/i386.c (ix86_setup_incoming_vararg_bounds): Likewise.
14071         (ix86_emit_outlined_ms2sysv_restore): Likewise.
14072         (iamcu_alignment): Likewise.
14073         (canonicalize_vector_int_perm): Likewise.
14074         (ix86_noce_conversion_profitable_p): Likewise.
14075         (ix86_mpx_bound_mode): Likewise.
14076         (ix86_operands_ok_for_move_multiple): Likewise.
14077         * config/microblaze/microblaze-protos.h
14078         (microblaze_expand_conditional_branch_reg): Likewise.
14079         * config/microblaze/microblaze.c
14080         (microblaze_expand_conditional_branch_reg): Likewise.
14081         * config/powerpcspe/powerpcspe.c (rs6000_init_hard_regno_mode_ok):
14082         Likewise.
14083         (rs6000_reassociation_width): Likewise.
14084         (rs6000_invalid_binary_op): Likewise.
14085         (fusion_p9_p): Likewise.
14086         (emit_fusion_p9_load): Likewise.
14087         (emit_fusion_p9_store): Likewise.
14088         * config/riscv/riscv-protos.h (riscv_regno_mode_ok_for_base_p):
14089         Likewise.
14090         (riscv_hard_regno_mode_ok_p): Likewise.
14091         (riscv_address_insns): Likewise.
14092         (riscv_split_symbol): Likewise.
14093         (riscv_legitimize_move): Likewise.
14094         (riscv_function_value): Likewise.
14095         (riscv_hard_regno_nregs): Likewise.
14096         (riscv_expand_builtin): Likewise.
14097         * config/riscv/riscv.c (riscv_build_integer_1): Likewise.
14098         (riscv_build_integer): Likewise.
14099         (riscv_split_integer): Likewise.
14100         (riscv_legitimate_constant_p): Likewise.
14101         (riscv_cannot_force_const_mem): Likewise.
14102         (riscv_regno_mode_ok_for_base_p): Likewise.
14103         (riscv_valid_base_register_p): Likewise.
14104         (riscv_valid_offset_p): Likewise.
14105         (riscv_valid_lo_sum_p): Likewise.
14106         (riscv_classify_address): Likewise.
14107         (riscv_legitimate_address_p): Likewise.
14108         (riscv_address_insns): Likewise.
14109         (riscv_load_store_insns): Likewise.
14110         (riscv_force_binary): Likewise.
14111         (riscv_split_symbol): Likewise.
14112         (riscv_force_address): Likewise.
14113         (riscv_legitimize_address): Likewise.
14114         (riscv_move_integer): Likewise.
14115         (riscv_legitimize_const_move): Likewise.
14116         (riscv_legitimize_move): Likewise.
14117         (riscv_address_cost): Likewise.
14118         (riscv_subword): Likewise.
14119         (riscv_output_move): Likewise.
14120         (riscv_canonicalize_int_order_test): Likewise.
14121         (riscv_emit_int_order_test): Likewise.
14122         (riscv_function_arg_boundary): Likewise.
14123         (riscv_pass_mode_in_fpr_p): Likewise.
14124         (riscv_pass_fpr_single): Likewise.
14125         (riscv_pass_fpr_pair): Likewise.
14126         (riscv_get_arg_info): Likewise.
14127         (riscv_function_arg): Likewise.
14128         (riscv_function_arg_advance): Likewise.
14129         (riscv_arg_partial_bytes): Likewise.
14130         (riscv_function_value): Likewise.
14131         (riscv_pass_by_reference): Likewise.
14132         (riscv_setup_incoming_varargs): Likewise.
14133         (riscv_print_operand): Likewise.
14134         (riscv_elf_select_rtx_section): Likewise.
14135         (riscv_save_restore_reg): Likewise.
14136         (riscv_for_each_saved_reg): Likewise.
14137         (riscv_register_move_cost): Likewise.
14138         (riscv_hard_regno_mode_ok_p): Likewise.
14139         (riscv_hard_regno_nregs): Likewise.
14140         (riscv_class_max_nregs): Likewise.
14141         (riscv_memory_move_cost): Likewise.
14142         * config/rl78/rl78-protos.h (rl78_split_movsi): Likewise.
14143         * config/rl78/rl78.c (rl78_split_movsi): Likewise.
14144         (rl78_addr_space_address_mode): Likewise.
14145         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14146         Likewise.
14147         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
14148         (rs6000_reassociation_width): Likewise.
14149         (rs6000_invalid_binary_op): Likewise.
14150         (fusion_p9_p): Likewise.
14151         (emit_fusion_p9_load): Likewise.
14152         (emit_fusion_p9_store): Likewise.
14153         * config/visium/visium-protos.h (prepare_move_operands): Likewise.
14154         (ok_for_simple_move_operands): Likewise.
14155         (ok_for_simple_move_strict_operands): Likewise.
14156         (ok_for_simple_arith_logic_operands): Likewise.
14157         (visium_legitimize_reload_address): Likewise.
14158         (visium_select_cc_mode): Likewise.
14159         (output_cbranch): Likewise.
14160         (visium_split_double_move): Likewise.
14161         (visium_expand_copysign): Likewise.
14162         (visium_expand_int_cstore): Likewise.
14163         (visium_expand_fp_cstore): Likewise.
14164         * config/visium/visium.c (visium_pass_by_reference): Likewise.
14165         (visium_function_arg): Likewise.
14166         (visium_function_arg_advance): Likewise.
14167         (visium_libcall_value): Likewise.
14168         (visium_setup_incoming_varargs): Likewise.
14169         (visium_legitimate_constant_p): Likewise.
14170         (visium_legitimate_address_p): Likewise.
14171         (visium_legitimize_address): Likewise.
14172         (visium_secondary_reload): Likewise.
14173         (visium_register_move_cost): Likewise.
14174         (visium_memory_move_cost): Likewise.
14175         (prepare_move_operands): Likewise.
14176         (ok_for_simple_move_operands): Likewise.
14177         (ok_for_simple_move_strict_operands): Likewise.
14178         (ok_for_simple_arith_logic_operands): Likewise.
14179         (visium_function_value_1): Likewise.
14180         (rtx_ok_for_offset_p): Likewise.
14181         (visium_legitimize_reload_address): Likewise.
14182         (visium_split_double_move): Likewise.
14183         (visium_expand_copysign): Likewise.
14184         (visium_expand_int_cstore): Likewise.
14185         (visium_expand_fp_cstore): Likewise.
14186         (visium_split_cstore): Likewise.
14187         (visium_select_cc_mode): Likewise.
14188         (visium_split_cbranch): Likewise.
14189         (output_cbranch): Likewise.
14190         (visium_print_operand_address): Likewise.
14191         * expmed.c (flip_storage_order): Likewise.
14192         * expmed.h (emit_cstore): Likewise.
14193         (flip_storage_order): Likewise.
14194         * genrecog.c (validate_pattern): Likewise.
14195         * hsa-gen.c (gen_hsa_addr): Likewise.
14196         * internal-fn.c (expand_arith_overflow): Likewise.
14197         * ira-color.c (allocno_copy_cost_saving): Likewise.
14198         * lra-assigns.c (find_hard_regno_for_1): Likewise.
14199         * lra-constraints.c (prohibited_class_reg_set_mode_p): Likewise.
14200         (process_invariant_for_inheritance): Likewise.
14201         * lra-eliminations.c (move_plus_up): Likewise.
14202         * omp-low.c (lower_oacc_reductions): Likewise.
14203         * simplify-rtx.c (simplify_subreg): Likewise.
14204         * target.def (TARGET_SETUP_INCOMING_VARARG_BOUNDS): Likewise.
14205         (TARGET_CHKP_BOUND_MODE): Likewise..
14206         * targhooks.c (default_chkp_bound_mode): Likewise.
14207         (default_setup_incoming_vararg_bounds): Likewise.
14208         * targhooks.h (default_chkp_bound_mode): Likewise.
14209         (default_setup_incoming_vararg_bounds): Likewise.
14210         * tree-ssa-math-opts.c (divmod_candidate_p): Likewise.
14211         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
14212         (have_whole_vector_shift): Likewise.
14213         * tree-vect-stmts.c (vectorizable_load): Likewise.
14214         * doc/tm.texi: Regenerate.
14215
14216 2017-07-05  Georg-Johann Lay  <avr@gjlay.de>
14217
14218         Graceful degrade if Binutils PR21472 is not available.
14219
14220         PR target/81072
14221         * configure.ac [target=avr]: WARN instead of ERROR if avrxmega3
14222         .rodata in flash test fails.
14223         (HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH): Define it if test passes.
14224         * confgure: Regenerate.
14225         * config.in: Regenerate.
14226         * config/avr/avr.c (avr_asm_named_section)
14227         [HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH]: Only trigger
14228         __do_copy_data for stuff in .rodata if flash_pm_offset = 0.
14229         (avr_asm_init_sections): Same.
14230
14231 2017-07-05  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
14232
14233         * config/arm/neon.md (fma<VCVTF:mode>4): Remove %?.
14234         (fma<VH:mode>4_intrinsic): Likewise.
14235         (*fmsub<VCVTF:mode>4): Likewise.
14236         (*fmsub<VH:mode>4_intrinsic): Likewise.
14237
14238 2017-07-05  Georg-Johann Lay  <avr@gjlay.de>
14239
14240         PR target/81305
14241         * config/avr/avr.c (avr_out_movhi_mr_r_xmega) [CONSTANT_ADDRESS_P]:
14242         Don't depend on "optimize > 0".
14243         (out_movhi_r_mr, out_movqi_mr_r): Same.
14244         (out_movhi_mr_r, out_movqi_r_mr): Same.
14245         (avr_address_cost) [CONSTANT_ADDRESS_P]: Don't depend cost for
14246         io_address_operand on "optimize > 0".
14247
14248 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14249
14250         * tree-loop-distribution.c: Add general explanantion on the pass.
14251         (generate_loops_for_partition): Mark distributed loop.
14252         (pg_add_dependence_edges): New parameter.  Handle alias data
14253         dependence specially and record it in the parameter if asked.
14254         (struct pg_vdata, pg_edata, pg_edge_callback_data): New structs.
14255         (init_partition_graph_vertices, add_partition_graph_edge): New.
14256         (pg_skip_alias_edge, free_partition_graph_edata_cb): New.
14257         (free_partition_graph_vdata, build_partition_graph): New.
14258         (sort_partitions_by_post_order, merge_dep_scc_partitions): New.
14259         (pg_collect_alias_ddrs, break_alias_scc_partitions): New.
14260         (data_ref_segment_size, latch_dominated_by_data_ref): New.
14261         (compute_alias_check_pairs, version_loop_by_alias_check): New.
14262         (version_for_distribution_p, finalize_partitions): New.
14263         (distribute_loop): Handle alias data dependence specially.  Factor
14264         out loop fusion code as functions and call these functions.
14265
14266 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14267
14268         * tree-loop-distribution.c (classify_partition): New parameter and
14269         better handle reduction statement.
14270         (rdg_build_partitions): Revise comment.
14271         (distribute_loop): Compute statements in all partitions and pass it
14272         to classify_partition.
14273
14274 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14275
14276         * tree-loop-distribution.c (enum partition_type): New.
14277         (struct partition): New field type.
14278         (partition_merge_into): Add parameter.  Update partition type.
14279         (data_dep_in_cycle_p, update_type_for_merge): New functions.
14280         (build_rdg_partition_for_vertex): Compute partition type.
14281         (rdg_build_partitions): Dump partition type.
14282         (distribute_loop): Update calls to partition_merge_into.
14283
14284 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14285
14286         * tree-loop-distribution.c (struct ddr_hasher): New.
14287         (ddr_hasher::hash, ::equal, get_data_dependence): New function.
14288         (ddrs_table): New.
14289         (classify_partition): Call get_data_dependence.
14290         (pg_add_dependence_edges): Ditto.
14291         (distribute_loop): Release data dependence hash table.
14292
14293 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14294
14295         * tree-loop-distribution.c (ref_base_address): Delete.
14296         (similar_memory_accesses): Rename ...
14297         (share_memory_accesses): ... to this.  Check if partitions access
14298         the same memory reference.
14299         (distribute_loop): Call share_memory_accesses.
14300
14301 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14302
14303         * tree-loop-distribution.c (struct partition): New field recording
14304         its data reference.
14305         (partition_alloc, partition_free): Init and release data refs.
14306         (partition_merge_into): Merge data refs.
14307         (build_rdg_partition_for_vertex): Collect data refs for partition.
14308         (pg_add_dependence_edges): Change parameters from vector to bitmap.
14309         Update uses.
14310         (distribute_loop): Remve data refs from vertice data of partition
14311         graph.
14312
14313 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14314
14315         * tree-loop-distribution.c (params.h): Include header file.
14316         (MAX_DATAREFS_NUM, DR_INDEX): New macro.
14317         (datarefs_vec): New global var.
14318         (create_rdg_vertices): Use datarefs_vec directly.
14319         (free_rdg): Don't free data references.
14320         (build_rdg): Update use.  Don't free data references.
14321         (distribute_loop): Compute global variable for data references.
14322         Bail out if there are too many data references.
14323
14324 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14325
14326         * tree-loop-distribution.c (loop_nest): New global var.
14327         (build_rdg): Use loop directly, rather than loop nest.
14328         (pg_add_dependence_edges): Remove loop nest parameter.  Use global
14329         variable directly.
14330         (distribute_loop): Compute global variable loop nest.  Update use.
14331
14332 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14333
14334         * tree-loop-distribution.c (enum fuse_type, fuse_message): New.
14335         (partition_merge_into): New parameter.  Dump reason for fusion.
14336         (distribute_loop): Update use of partition_merge_into.
14337
14338 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14339
14340         * tree-loop-distribution.c (bb_top_order_index): New.
14341         (bb_top_order_index_size, bb_top_order_cmp): New.
14342         (stmts_from_loop): Use topological order.
14343         (pass_loop_distribution::execute): Compute and release topological
14344         order for basic blocks.
14345
14346 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14347
14348         * tree-loop-distribution.c (pass_loop_distribution::execute): Skip
14349         if no loops.
14350
14351 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14352
14353         * cfgloop.h (struct loop): Add comment.  New field orig_loop_num.
14354         * cfgloopmanip.c (lv_adjust_loop_entry_edge): Comment change.
14355         * internal-fn.c (expand_LOOP_DIST_ALIAS): New function.
14356         * internal-fn.def (LOOP_DIST_ALIAS): New.
14357         * tree-vectorizer.c (fold_loop_vectorized_call): Rename to ...
14358         (fold_loop_internal_call): ... this.
14359         (vect_loop_dist_alias_call): New function.
14360         (set_uid_loop_bbs): Call fold_loop_internal_call.
14361         (vectorize_loops): Fold IFN_LOOP_VECTORIZED and IFN_LOOP_DIST_ALIAS
14362         internal calls.
14363
14364 2017-07-04  Uros Bizjak  <ubizjak@gmail.com>
14365
14366         PR target/81300
14367         * config/i386/i386.md (setcc + movzbl/and to xor + setcc peepholes):
14368         Require dead FLAGS_REG at the beginning of a peephole.
14369
14370 2017-07-04  Uros Bizjak  <ubizjak@gmail.com>
14371
14372         PR target/81294
14373         * config/i386/adxintrin.h (_subborrow_u32): Swap _X and _Y
14374         arguments in the call to __builtin_ia32_sbb_u32.
14375         (_subborrow_u64): Swap _X and _Y arguments in the call to
14376         __builtin_ia32_sbb_u64.
14377
14378 2017-07-04  Jakub Jelinek  <jakub@redhat.com>
14379
14380         PR debug/81278
14381         * tree-vrp.c (compare_assert_loc): Turn into a function template
14382         with stable template parameter.  Only test if a->e is NULL,
14383         !a->e == !b->e has been verified already.  Use e == NULL or
14384         e != NULL instead of e or ! e tests.  If stable is true, don't use
14385         iterative_hash_expr, on the other side allow a or b or both NULL
14386         and sort the NULLs last.
14387         (process_assert_insertions): Sort using compare_assert_loc<false>
14388         instead of compare_assert_loc, later sort using
14389         compare_assert_loc<true> before calling process_assert_insertions_for
14390         in a loop.  Use break instead of continue once seen NULL pointer.
14391
14392 2017-07-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
14393
14394         * config/arm/driver-arm.c (arm_cpu_table): Add entry for ARM
14395         Cortex-R7 and Cortex-R8 processors.
14396
14397 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
14398
14399         * ipa-utils.c (ipa_merge_profiles): Fix merging when dst is
14400         uninitialized while src is not.
14401
14402 2017-07-04  Richard Earnshaw  <rearnsha@arm.com>
14403
14404         * common/config/arm/arm-common.c: Adjust include path for
14405         arm-cpu-cdata.h
14406         * config/arm/t-arm (TM_H): Adjust path for arm-cpu.h.
14407         (arm-cpu.h): Create in build directory.  Adjust dependency rules.
14408         (arm-cpu-data.h): Likewise.
14409         (arm-cpu-cdata.h): Likewise.
14410         * config/arm/arm-cpu.h: Delete.
14411         * config/arm/arm-cpu-cdata.h: Delete.
14412         * config/arm/arm-cpu-data.h: Delete.
14413
14414 2017-07-04  James Greenhalgh  <james.greenhalgh@arm.com>
14415
14416         * config/arm/arm-cpus.in (cortex-a55): New.
14417         (cortex-a75): Likewise.
14418         (cortex-a75.cortex-a55): Likewise.
14419         * config/arm/driver-arm.c (arm_cpu_table): Add cortex-a55 and
14420         cortex-a75.
14421         * doc/invoke.texi (-mcpu): Document cortex-a55 and cortex-a75.
14422         * config/arm/arm-cpu-cdata.h: Regenerate.
14423         * config/arm/arm-cpu-data.h: Regenerate.
14424         * config/arm/arm-cpu.h: Regenerate.
14425         * config/arm/arm-tables.opt: Regenerate.
14426         * config/arm/arm-tune.md: Regenerate.
14427
14428 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
14429
14430         * haifa-sched.c (sched_create_recovery_edges): Update profile.
14431
14432 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
14433
14434         * bb-reorder.c (better_edge_p): Fix handling of uninitialized
14435         probability.
14436
14437 2017-07-04  Richard Sandiford  <richard.sandiford@linaro.org>
14438
14439         PR tree-optimization/81292
14440         * tree-ssa-strlen.c (handle_builtin_strlen): When setting
14441         full_string_p, also call adjust_related_strinfos if the adjustment
14442         is simple, otherwise invalidate related strinfos.
14443
14444 2017-07-04  Martin Liska  <mliska@suse.cz>
14445
14446         PR sanitizer/81040
14447         * sanopt.c (sanitize_rewrite_addressable_params): Mark the
14448         newly created variable as DECL_IGNORED_P.
14449
14450 2017-07-04  Martin Liska  <mliska@suse.cz>
14451
14452         PR ipa/81293
14453         * ipa-inline.c (inline_small_functions):
14454         Use xstrdup_for_dump.
14455
14456 2017-07-04  Tom de Vries  <tom@codesourcery.com>
14457
14458         * graph.c (draw_cfg_edges): Save and restore EDGE_DFS_BACK.
14459
14460 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
14461
14462         PR target/81033
14463         * config/darwin.c (darwin_function_switched_text_sections):
14464         Fix spaces.
14465
14466 2017-07-03  Jan Hubicka  <hubicka@ucw.cz>
14467
14468         * tree-vect-loop-manip.c (vect_do_peeling): Fix scaling up.
14469
14470 2017-07-03  Richard Earnshaw  <rearnsha@arm.com>
14471
14472         * doc/invoke.texi (ARM Options): Add -mbe8 and -mbe32 to option summary.
14473
14474 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
14475
14476         * tree-vect-loop.c (vect_analyze_loop_2): Treat min_scalar_loop_bound,
14477         min_profitable_iters, and th as inclusive lower bounds.
14478         Fix LOOP_VINFO_PEELING_FOR_GAPS condition.
14479         (vect_estimate_min_profitable_iters): Return inclusive lower bounds
14480         for min_profitable_iters and min_profitable_estimate.
14481         (vect_transform_loop): Treat th as an inclusive lower bound.
14482         * tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
14483
14484 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
14485
14486         PR target/81033
14487         * config/darwin.c (darwin_function_switched_text_sections):
14488         Replace DECL_NAME with DECL_ASSEMBLER_NAME, split assemble_name_raw
14489         in two pieces, and suppress the use of buf.
14490
14491 2017-07-03  Nathan Sidwell  <nathan@acm.org>
14492
14493         * hash-table.h (hash_table_mod1): Fix indentation.
14494
14495 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14496
14497         PR middle-end/81290
14498         * predict.c (force_edge_cold): Be more careful about propagation
14499         backward.
14500         * profile-count.h (profile_probability::guessed,
14501         profile_probability::fdo, profile_count::guessed, profile_count::fdo):
14502         New.
14503         * tree-ssa-threadupdate.c (recompute_probabilities): Result is guessed.
14504
14505 2017-07-03  James Greenhalgh  <james.greenhalgh@arm.com>
14506
14507         * doc/invoke.texi (rcpc architecture extension): Document it.
14508
14509 2017-07-03  Richard Biener  <rguenther@suse.de>
14510
14511         PR tree-optimization/60510
14512         * tree-vect-loop.c (vect_create_epilog_for_reduction): Pass in
14513         the scalar reduction PHI and use it.
14514         (vectorizable_reduction): Properly guard the single_defuse_cycle
14515         path for non-SLP reduction chains where we cannot use it.
14516         Rework reduc_def/index and vector type deduction.  Rework
14517         vector operand gathering during reduction op code-gen.
14518         * tree-vect-slp.c (vect_analyze_slp): For failed SLP reduction
14519         chains dissolve the chain and leave it to non-SLP reduction
14520         handling.
14521
14522 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
14523
14524         * tree-data-ref.h (dr_alignment): Declare.
14525         * tree-data-ref.c (dr_alignment): New function.
14526         * tree-vectorizer.h (dataref_aux): Remove base_element_aligned.
14527         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
14528         set it.
14529         * tree-vect-stmts.c (vectorizable_store): Use dr_alignment.
14530
14531 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
14532
14533         * tree-data-ref.h (innermost_loop_behavior): Add base_alignment
14534         and base_misalignment fields.
14535         (DR_BASE_ALIGNMENT, DR_BASE_MISALIGNMENT): New macros.
14536         * tree-data-ref.c: Include builtins.h.
14537         (dr_analyze_innermost): Set up the new innmost_loop_behavior fields.
14538         * tree-vectorizer.h (STMT_VINFO_DR_BASE_ALIGNMENT): New macro.
14539         (STMT_VINFO_DR_BASE_MISALIGNMENT): Likewise.
14540         * tree-vect-data-refs.c: Include tree-cfg.h.
14541         (vect_compute_data_ref_alignment): Use the new innermost_loop_behavior
14542         fields instead of calculating an alignment here.
14543         (vect_analyze_data_refs): Use dr_analyze_innermost.  Dump the new
14544         innermost_loop_behavior fields.
14545
14546 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
14547
14548         * tree-data-ref.h (innermost_loop_behavior): Add a step_alignment
14549         field.
14550         (DR_STEP_ALIGNMENT): New macro.
14551         * tree-vectorizer.h (STMT_VINFO_DR_STEP_ALIGNMENT): Likewise.
14552         * tree-data-ref.c (dr_analyze_innermost): Initalize step_alignment.
14553         (create_data_ref): Print it.
14554         * tree-vect-stmts.c (vectorizable_load): Use the step alignment
14555         to tell whether the step preserves vector (mis)alignment.
14556         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
14557         Move the check for an integer step and generalise to all INTEGER_CST.
14558         (vect_analyze_data_refs): Set DR_STEP_ALIGNMENT when setting DR_STEP.
14559         Print the outer step alignment.
14560
14561 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
14562
14563         * tree-data-ref.h (innermost_loop_behavior): Replace aligned_to
14564         with offset_alignment.
14565         (DR_ALIGNED_TO): Delete.
14566         (DR_OFFSET_ALIGNMENT): New macro.
14567         * tree-vectorizer.h (STMT_VINFO_DR_ALIGNED_TO): Delete.
14568         (STMT_VINFO_DR_OFFSET_ALIGNMENT): New macro.
14569         * tree-data-ref.c (dr_analyze_innermost): Update after above changes.
14570         (create_data_ref): Likewise.
14571         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
14572         (vect_analyze_data_refs): Likewise.
14573         * tree-if-conv.c (if_convertible_loop_p_1): Use memset before
14574         creating dummy innermost behavior.
14575
14576 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
14577
14578         * tree-data-ref.h (dr_analyze_innermost): Replace the dr argument
14579         with a "innermost_loop_behavior *" and refeence tree.
14580         * tree-data-ref.c (dr_analyze_innermost): Likewise.
14581         (create_data_ref): Update call accordingly.
14582         * tree-predcom.c (find_looparound_phi): Likewise.
14583
14584 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
14585
14586         * tree-vectorizer.h (_stmt_vec_info): Replace individual dr_*
14587         fields with dr_wrt_vec_loop.
14588         (STMT_VINFO_DR_BASE_ADDRESS, STMT_VINFO_DR_INIT, STMT_VINFO_DR_OFFSET)
14589         (STMT_VINFO_DR_STEP, STMT_VINFO_DR_ALIGNED_TO): Update accordingly.
14590         (STMT_VINFO_DR_WRT_VEC_LOOP): New macro.
14591         (vect_dr_behavior): New function.
14592         (vect_create_addr_base_for_vector_ref): Remove loop parameter.
14593         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
14594         vect_dr_behavior.  Use a step_preserves_misalignment_p boolean to
14595         track whether the step preserves the misalignment.
14596         (vect_create_addr_base_for_vector_ref): Remove loop parameter.
14597         Use vect_dr_behavior.
14598         (vect_setup_realignment): Update call accordingly.
14599         (vect_create_data_ref_ptr): Likewise.  Use vect_dr_behavior.
14600         * tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Update
14601         call to vect_create_addr_base_for_vector_ref.
14602         (vect_create_cond_for_align_checks): Likewise.
14603         * tree-vect-patterns.c (vect_recog_bool_pattern): Copy
14604         STMT_VINFO_DR_WRT_VEC_LOOP as a block.
14605         (vect_recog_mask_conversion_pattern): Likewise.
14606         * tree-vect-stmts.c (compare_step_with_zero): Use vect_dr_behavior.
14607         (new_stmt_vec_info): Remove redundant zeroing.
14608
14609 2017-07-03  Richard Earnshaw  <rearnsha@arm.com>
14610
14611         * common/config/arm/arm-common.c (arm_be8_option): New function.
14612         * config/arm/arm-isa.h (isa_feature): Add new feature bit isa_bit_be8.
14613         (ISA_ARMv6): Add isa_bit_be8.
14614         * config/arm/arm.h (arm_be8_option): Add prototype.
14615         (BE8_SPEC_FUNCTION): New define.
14616         (EXTRA_SPEC_FUNCTIONS): Add BE8_SPEC_FUNCTION.
14617         * config/arm/arm.opt (mbig-endian): Mark as Negative of mlittle-endian.
14618         (mlittle-endian): Similarly.
14619         (mbe8, mbe32): New options.
14620         * config/arm/bpabi.h (BE8_LINK_SPEC): Call arm_be8_option.
14621         * doc/invoke.texi (ARM Options): Document -mbe8 and -mbe32.
14622
14623 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14624
14625         * tree-cfg.c (gimple_find_sub_bbs): Fix profile updating.
14626
14627 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14628
14629         * tree-cfgcleanup.c (want_merge_blocks_p): New function.
14630         (cleanup_tree_cfg_bb): Use it.
14631         * profile-count.h (profile_count::of_for_merging, profile_count::merge):
14632         New functions.
14633         * tree-cfg.c (gimple_merge_blocks): Use profile_count::merge.
14634
14635 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14636
14637         PR bootstrap/81285
14638         * loop-doloop.c (add_test): Update profile.
14639
14640 2017-07-03  Martin Liska  <mliska@suse.cz>
14641
14642         PR sanitize/81040
14643         * sanopt.c (rewrite_usage_of_param): New function.
14644         (sanitize_rewrite_addressable_params): Likewise.
14645         (pass_sanopt::execute): Call rewrite_usage_of_param.
14646
14647 2017-07-03  Richard Biener  <rguenther@suse.de>
14648
14649         * tree-vect-loop.c (vect_create_epilog_for_reduction): Revert
14650         back to using VIEW_CONVERT_EXPR.
14651
14652 2017-07-03  Martin Liska  <mliska@suse.cz>
14653
14654         PR other/78366
14655         * doc/extend.texi: Document when a resolver function is
14656         generated for target_clones.
14657
14658 2017-07-03  Martin Liska  <mliska@suse.cz>
14659
14660         * asan.c (asan_emit_stack_protection): Unpoison just red zones
14661         and shadow memory of auto variables which are subject of
14662         use-after-scope sanitization.
14663         (asan_expand_mark_ifn): Add do set only when is_poison.
14664
14665 2016-07-03  Richard Biener  <rguenther@suse.de>
14666
14667         * tree-vect-loop.c (vect_analyze_loop_operations): Also analyze
14668         reduction PHIs.
14669         (vect_force_simple_reduction): Record reduction def -> phi mapping.
14670         (vectorizable_reduction): Perform reduction PHI creation when
14671         visiting a reduction PHI and adjust and simplify code generation
14672         phase of the reduction op.  Cache dts, use fold_binary, not fold_build2.
14673         (vect_transform_loop): Visit reduction PHIs.
14674         * tree-vect-slp.c (vect_get_and_check_slp_defs): Record reduction
14675         defs into the SLP tree.
14676         (vect_build_slp_tree): Reduction defs terminate the recursion.
14677         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Allow lookup
14678         of reduction defs.
14679         (vect_get_vec_defs_for_stmt_copy): Export.
14680         (vect_get_vec_defs): Likewise.
14681         * tree-vectorizer.h (struct _stmt_vec_info): Amend reduc_def
14682         purpose.
14683         (vect_get_vec_defs_for_stmt_copy): Declare.
14684         (vect_get_vec_defs): Likewise.
14685
14686 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
14687
14688         * tree-data-ref.c (dr_analyze_innermost): Replace the "nest"
14689         parameter with a "loop" parameter and use it instead of the
14690         loop containing DR_STMT.  Don't check simple_iv when doing
14691         BB analysis.  Describe the two analysis modes in the comment.
14692
14693 2017-07-03  Tom de Vries  <tom@codesourcery.com>
14694
14695         PR tree-optimization/69468
14696         * tree-ssa-tail-merge.c (ignore_edge_flags): New constant.
14697         (find_same_succ_bb): Handle ignore_edge_flags.
14698
14699 2017-07-03  Tom de Vries  <tom@codesourcery.com>
14700
14701         PR tree-optimization/81192
14702         * tree-ssa-tail-merge.c (same_succ_hash): Use bb->loop_father->num in
14703         hash.
14704         (same_succ::equal): Don't find bbs to be equal if bb->loop_father
14705         differs.
14706         (find_same_succ_bb): Remove obsolete test on bb->loop_father->latch.
14707
14708 2017-07-03  Tom de Vries  <tom@codesourcery.com>
14709
14710         PR tree-optimization/81192
14711         * tree-ssa-tail-merge.c (same_succ_flush_bb): Handle
14712         BB_SAME_SUCC (bb) == NULL.
14713
14714 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14715
14716         * cfgrtl.c (rtl_verify_edges): Enable checking of profile_probability
14717         consistency.
14718
14719 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14720
14721         * dumpfile.c: Include profile-count.h
14722         * tree-cfg.c (gimple_duplicate_sese_tail): Drop UNUSED attributes;
14723         update profile.
14724         (insert_cond_bb): Update profile.
14725         * tree-cfg.h (insert_cond_bb): Update prototype.
14726         * tree-chkp-opt.c (chkp_optimize_string_function_calls): Update.
14727         * tree-dump.c: Do not include tree-cfg.
14728
14729 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14730
14731         * bb-reorder.c (fix_up_crossing_landing_pad): Update profile.
14732
14733 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14734
14735         * expect.c (dw2_build_landing_pads): Update profile of the landing pad
14736         bb.
14737
14738 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14739
14740         * tree-complex.c (expand_complex_div_wide): update profile.
14741
14742 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
14743             Alan Hayward  <alan.hayward@arm.com>
14744             David Sherwood  <david.sherwood@arm.com>
14745
14746         * Makefile.in (MACHMODE_H): Remove insn-modes.h
14747         (CORETYPES_H): New define.
14748         (MOSTLYCLEANFILES): Add insn-modes-inline.h.
14749         (insn-modes-inline.h, s-modes-inline-h): New rules.
14750         (generated_files): Add insn-modes-inline.h.
14751         (RTL_BASE_H, TREE_CORE_H): Use CORETYPES_H instead of coretypes.h.
14752         (build/gensupport.o, build/ggc-none.o, build/print-rtl.o): Likewise.
14753         (build/read-md.o, build/read-rtl.o, build/rtl.o): Likewise.
14754         (build/vec.o, build/hash-table.o, build/inchash.o): Likewise.
14755         (build/gencondmd.o, build/genattr.o, build/genattr-common.o): Likewise.
14756         (build/genattrtab.o, build/genautomata.o, build/gencheck.o): Likewise.
14757         (build/gencodes.o, build/genconditions.o): Likewise.
14758         (build/genconfig.o, build/genconstants.o, build/genemit.o): Likewise.
14759         (build/genenums.o, build/genextract.o, build/genflags.o): Likewise.
14760         (build/gentarget-def.o, build/genmddeps.o, build/genopinit.o)
14761         (build/genoutput.o, build/genpeep.o, build/genpreds.o): Likewise.
14762         (build/genrecog.o, build/genmddump.o, build/genmatch.o): Likewise.
14763         (build/gencfn-macros.o, build/gcov-iov.o): Likewise.
14764         * coretypes.h: Include everything up to real.h for generators.
14765         Include insn-modes.h first.  Include wide-int-print.h after
14766         wide-int.h.  Include insn-modes-inline.h and then machmode.h.
14767         * machmode.h: Don't include insn-modes.h here.
14768         * function-tests.c: Remove includes of signop.h, machmode.h,
14769         double-int.h and wide-int.h.
14770         * rtl.h: Likewise.
14771         * gcc-rich-location.c: Remove includes of machmode.h, double-int.h
14772         and wide-int.h.
14773         * optc-save-gen.awk: Likewise.
14774         * gencheck.c (BITS_PER_UNIT): Delete dummy definition.
14775         * godump.c: Remove include of wide-int-print.h.
14776         * pretty-print.h: Likewise.
14777         * wide-int-print.cc: Likewise.
14778         * wide-int.cc: Likewise.
14779         * hash-map-tests.c: Remove include of signop.h.
14780         * hash-set-tests.c: Likewise.
14781         * rtl-tests.c: Likewise.
14782         * mkconfig.sh: Remove include of machmode.h.
14783         * genmodes.c (emit_insn_modes_h): Split emission of inline functions
14784         into...
14785         (emit_insn_modes_inline_h): ...this new function.  Emit the code
14786         into an insn-modes-inline.h header file, adding appropriate
14787         include guards and end comments.
14788         (emit_insn_modes_c_header): Remove include of machmode.h.
14789         (emit_min_insn_modes_c_header): Include coretypes.h rather than
14790         machmode.h.
14791         (main): Handle -i flag and call emit_insn_modes_inline_h when
14792         it is passed.
14793
14794 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
14795
14796         * tree-ssa-strlen.c (strinfo): Rename the length field to
14797         nonzero_chars.  Add a full_string_p field.
14798         (compare_nonzero_chars, zero_length_string_p): New functions.
14799         (get_addr_stridx): Add an offset_out parameter.
14800         Use compare_nonzero_chars.
14801         (get_stridx): Update accordingly.  Use compare_nonzero_chars.
14802         (new_strinfo): Update after above changes to strinfo.
14803         (set_endptr_and_length): Set full_string_p.
14804         (get_string_length): Update after above changes to strinfo.
14805         (unshare_strinfo): Update call to new_strinfo.
14806         (maybe_invalidate): Likewise.
14807         (get_stridx_plus_constant): Change off to unsigned HOST_WIDE_INT.
14808         Use compare_nonzero_chars and zero_string_p.  Treat nonzero_chars
14809         as a uhwi instead of an shwi.  Update after above changes to
14810         strinfo and new_strinfo.
14811         (zero_length_string): Assert that chainsi contains full strings.
14812         Use zero_length_string_p.  Update call to new_strinfo.
14813         (adjust_related_strinfos): Update after above changes to strinfo.
14814         Copy full_string_p from origsi.
14815         (adjust_last_stmt): Use zero_length_string_p.
14816         (handle_builtin_strlen): Update after above changes to strinfo and
14817         new_strinfo.  Install the lhs as the string length if the previous
14818         entry didn't describe a full string.
14819         (handle_builtin_strchr): Update after above changes to strinfo
14820         and new_strinfo.
14821         (handle_builtin_strcpy): Likewise.
14822         (handle_builtin_strcat): Likewise.
14823         (handle_builtin_malloc): Likewise.
14824         (handle_pointer_plus): Likewise.
14825         (handle_builtin_memcpy): Likewise.  Track nonzero characters
14826         that aren't necessarily followed by a nul terminator.
14827         (handle_char_store): Likewise.
14828
14829 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
14830
14831         PR tree-optimization/80769
14832         * tree-ssa-strlen.c (strinfo): Document that "stmt" is also used
14833         for malloc and calloc.  Document the new invariant that all related
14834         strinfos have delayed lengths or none do.
14835         (verify_related_strinfos): Move earlier in file.
14836         (set_endptr_and_length): New function, split out from...
14837         (get_string_length): ...here.  Also set the lengths of related
14838         strinfos.
14839         (zero_length_string): Assert that chainsi has known (rather than
14840         delayed) lengths.
14841         (adjust_related_strinfos): Likewise.
14842
14843 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
14844
14845         PR tree-optimization/81136
14846         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Only
14847         assert that two references with the same misalignment have the same
14848         compile-time misalignment if those compile-time misalignments
14849         are known.
14850
14851 2017-07-01  Andi Kleen  <ak@linux.intel.com>
14852
14853         * print-tree.c (print_node): Print all attributes.
14854
14855 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
14856
14857         * cfg.c (scale_bbs_frequencies): New function.
14858         * cfg.h (scale_bbs_frequencies): Declare it.
14859         * cfgloopanal.c (single_likely_exit): Cleanup.
14860         * cfgloopmanip.c (scale_loop_frequencies): Take profile_probability
14861         as parameter.
14862         (scale_loop_profile): Likewise.
14863         (loop_version): Likewise.
14864         (create_empty_loop_on_edge): Update.
14865         * cfgloopmanip.h (scale_loop_frequencies, scale_loop_profile,
14866         scale_loop_frequencies, scale_loop_profile, loopify,
14867         loop_version): Update prototypes.
14868         * modulo-sched.c (sms_schedule): Update.
14869         * predict.c (unlikely_executed_edge_p): Also check probability.
14870         (probably_never_executed_edge_p): Fix typo.
14871         * tree-if-conv.c (version_loop_for_if_conversion): Update.
14872         * tree-parloops.c (gen_parallel_loop): Update.
14873         * tree-ssa-loop-ivcanon.c (try_peel_loop): Update.
14874         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
14875         * tree-ssa-loop-split.c (split_loop): Update.
14876         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
14877         * tree-vect-loop-manip.c (vect_do_peeling): Update.
14878         (vect_loop_versioning): Update.
14879         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
14880
14881 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
14882
14883         * trans-mem.c (split_bb_make_tm_edge): Update profile.
14884
14885 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
14886
14887         * tree-if-conv.c (combine_blocks): Use make_single_succ_edge
14888         to keep profile consistent.
14889
14890 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
14891
14892         * cfgrtl.c (rtl_flow_call_edges_add): Update profile.
14893         * tree-cfg.c (gimple_flow_call_edges_add): Likewise.
14894         * profile-count.h (max_safe_multiplier): Make unsigned.
14895         (profile_count::guessed_zero): New.
14896
14897 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
14898
14899         * bb-reorder.c (fix_up_crossing_landing_pad,
14900         fix_crossing_conditional_branches): Use make_single_succ_edge
14901         to keep profile consistent.
14902
14903 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
14904
14905         * tree-vect-loop.c (optimize_mask_stores): Use make_single_succ_edge
14906         to update profile.
14907
14908 2017-07-01  Jakub Jelinek  <jakub@redhat.com>
14909
14910         PR sanitizer/81262
14911         * bb-reorder.c (fix_up_fall_thru_edges): Move variable declarations to
14912         the right scopes, make sure cond_jump isn't preserved between multiple
14913         iterations.  Search for fallthru edge whenever there are 3+ edges and
14914         use find_fallthru_edge for it.
14915
14916 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
14917
14918         Patch by Alexander Monakov <amonakov@ispras.ru>
14919         * sel-sched-ir.c (compute_succs_info): Handle uninitialized
14920         probabilities consistently.
14921
14922 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
14923
14924         * pa.c (pa_expand_compare_and_swap_loop): Update call of
14925         emit_cmp_and_jump_insns.
14926
14927 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
14928
14929         PR ipa/81261
14930         * tree-inline.c (expand_call_inline): Combine profile statuses.
14931
14932 2017-06-30  Andrew Pinski  <apinski@cavium.com>
14933
14934         * tree-if-conv.c (predicate_scalar_phi): Update new_stmt if
14935         fold_stmt returned true.
14936
14937 2017-06-30  Nathan Sidwell  <nathan@acm.org>
14938
14939         * ggc.h (empty_string): Delete.
14940         * cfgexpand.c (expand_asm_stmt): Use plain "".
14941         * optabs.c (expand_asm_memory_barrier): Likewise.
14942         * stringpool.c (empty_string): Delete.
14943         (digit_vector, digit_string): Delete.
14944         (ggc_alloc_string): Use plain "", don't optimize single digit
14945         strings.  Use ggc_alloc_atomic.
14946
14947 2017-06-30  Richard Earnshaw  <rearnsha@arm.com>
14948
14949         * rtlanal.c (insn_rtx_cost): If a parallel contains exactly one
14950         comparison set and one other set, use the cost of the non-comparison
14951         set.
14952
14953 2017-06-30  Nathan Sidwell  <nathan@acm.org>
14954
14955         * ggc.h: Replace all 'static inline' with plain 'inline'.  Fix
14956         some formatting.
14957
14958 2017-06-30  Peter Bergner  <bergner@vnet.ibm.com>
14959
14960         * tree-cfg.c (group_case_labels_stmt): Merge scanning and compressing
14961         loops.  Remove now unneeded calls to gimple_switch_set_label() that
14962         just set removed labels to NULL_TREE.
14963
14964 2017-06-30  Aldy Hernandez  <aldyh@redhat.com>
14965
14966         * tree-ssanames.c (set_range_info_raw): Abstract from ...
14967         (set_range_info): ...here.  Only call set_range_info_raw if domain
14968         is useful.
14969         (set_nonzero_bits): Call set_range_info_raw.
14970         * tree-ssanames.h (set_range_info_raw): New.
14971
14972 2017-06-30  Jakub Jelinek  <jakub@redhat.com>
14973
14974         PR target/81225
14975         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): For V8FI,
14976         V16FI and VI8F_256 iterators, use <store_mask_predicate> instead
14977         of nonimmediate_operand and <store_mask_constraint> instead of m
14978         for the input operand.  For V8FI iterator, always split if input
14979         is a MEM.  For V16FI and V8SF_256 iterators, don't test if both
14980         operands are MEM if <mask_applied>.  For VI4F_256 iterator, use
14981         <store_mask_predicate> instead of register_operand and
14982         <store_mask_constraint> instead of v for the input operand.  Make
14983         sure both operands aren't MEMs for if not <mask_applied>.
14984
14985 2017-06-30  Sylvestre Ledru  <sylvestre@debian.org>
14986
14987         * lto-wrapper.c (copy_file) Close both file descriptors before
14988         exiting normally.
14989
14990 2017-06-30  Martin Liska  <mliska@suse.cz>
14991
14992         PR ipa/81214
14993         * multiple_target.c (create_dispatcher_calls): Make ifunc
14994         also for function that don't have calls or are not referenced.
14995
14996 2017-06-30  Richard Biener  <rguenther@suse.de>
14997
14998         * tree-vect-slp.c (vect_slp_analyze_node_operations): Only
14999         analyze the first scalar stmt.  Move vector type computation
15000         for the BB case here from ...
15001         * tree-vect-stmts.c (vect_analyze_stmt): ... here.  Guard
15002         live operation processing in the SLP case properly.
15003
15004 2017-06-30  Richard Biener  <rguenther@suse.de>
15005
15006         * graph.c (draw_cfg_node_succ_edges): Fix broken dot syntax.
15007
15008 2017-06-30  Martin Liska  <mliska@suse.cz>
15009
15010         PR sanitizer/81021
15011         * tree-eh.c (lower_resx): Call BUILT_IN_ASAN_HANDLE_NO_RETURN
15012         before BUILT_IN_UNWIND_RESUME when ASAN is used.
15013
15014 2017-06-30  Yvan Roux  <yvan.roux@linaro.org>
15015
15016         * doc/invoke.texi (AArch64): Add missing options and remove redundant
15017         ones.
15018
15019 2017-06-30  Richard Biener  <rguenther@suse.de>
15020
15021         PR tree-optimization/81249
15022         * tree-vect-loop.c (vect_create_epilog_for_reduction): Convert
15023         condition reduction result to original scalar type.
15024
15025 2017-06-30  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15026
15027         * profile-count.h (enum profile_quality): Fix typos and whitespace
15028         issues.
15029
15030 2017-06-30  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15031
15032         * config/s390/s390.c (s390_expand_setmem): Adjust to the new data
15033         type for branch probabilities.
15034
15035 2017-06-29  Julian Brown  <julian@codesourcery.com>
15036             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
15037
15038         * config/aarch64/aarch64-fusion-pairs.def: Add ALU_BRANCH entry.
15039         * config/aarch64/aarch64.c (AARCH64_FUSE_ALU_BRANCH): New fusion type.
15040         (thunderx2t99_tunings): Set AARCH64_FUSE_ALU_BRANCH flag.
15041         (aarch_macro_fusion_pair_p): Add support for AARCH64_FUSE_ALU_BRANCH.
15042
15043 2017-06-29  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
15044
15045         * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Push the
15046         check for CC usage into AARCH64_FUSE_CMP_BRANCH.
15047         * config/i386/i386.c (ix86_macro_fusion_pair_p): Push the check for
15048         CC usage from generic code to here.
15049         * sched-deps.c (sched_macro_fuse_insns): Move the condition for
15050         CC usage into the target macros.
15051
15052 2017-06-29  Maya Rashish  <coypu@sdf.org>
15053
15054         * config/netbsd.h (NETBSD_LIB_SPEC): Add -lc when creating shared
15055         objects.
15056
15057 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
15058
15059         * arm/arm-builtins.c: Include profile-count.h
15060         * except.c (sjlj_emit_function_enter): Use
15061         profile_probability::unlikely.
15062
15063 2017-06-29  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15064
15065         * config/rs6000/rs6000.c (toc_relative_expr_p): Make tocrel_base
15066         and tocrel_offset be pointer args rather than implicitly using
15067         static versions.
15068         (legitimate_constant_pool_address_p, rs6000_emit_move,
15069         const_load_sequence_p, adjust_vperm): Add local tocrel_base and
15070         tocrel_offset and use in toc_relative_expr_p call.
15071         (print_operand, print_operand_address): Use static tocrel_base_oac
15072         and tocrel_offset_oac.
15073         (rs6000_output_addr_const_extra): Use static tocrel_base_oac and
15074         tocrel_offset_oac.
15075
15076 2017-06-29  Maya Rashish  <coypu@sdf.org>
15077
15078         * config/vax/builtins.md (ffssi2_internal): Correct constraint.
15079
15080 2017-06-29  Eric Botcazou  <ebotcazou@adacore.com>
15081
15082         * expr.c (expand_expr) <normal_inner_ref>: When testing for unaligned
15083         objects, take into account only the alignment of 'op0' and 'mode1' if
15084         'op0' is a MEM.
15085
15086 2017-06-29  Steve Ellcey  <sellcey@cavium.com>
15087
15088         * ccmp.c (ccmp_tree_comparison_p): New function.
15089         (ccmp_candidate_p): Update to use above function.
15090         (get_compare_parts): New function.
15091         (expand_ccmp_next): Update to use new functions.
15092         (expand_ccmp_expr_1): Take tree arg instead of gimple, update to use
15093         new functions.
15094         (expand_ccmp_expr): Pass tree instead of gimple to expand_ccmp_expr_1,
15095         take mode as argument.
15096         * ccmp.h (expand_ccmp_expr): Add mode as argument.
15097         * expr.c (expand_expr_real_1): Pass mode as argument.
15098
15099 2017-06-29  Segher Boessenkool  <segher@kernel.crashing.org>
15100
15101         * combine.c (combine_instructions): Print insns to dump_file, together
15102         with their costs.
15103
15104 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
15105
15106         * asan.c (asan_emit_stack_protection): Update.
15107         (create_cond_insert_point): Update.
15108         * auto-profile.c (afdo_propagate_circuit): Update.
15109         * basic-block.h (struct edge_def): Turn probability to
15110         profile_probability.
15111         (EDGE_FREQUENCY): Update.
15112         * bb-reorder.c (find_traces_1_round): Update.
15113         (better_edge_p): Update.
15114         (sanitize_hot_paths): Update.
15115         * cfg.c (unchecked_make_edge): Initialize probability to uninitialized.
15116         (make_single_succ_edge): Update.
15117         (check_bb_profile): Update.
15118         (dump_edge_info): Update.
15119         (update_bb_profile_for_threading): Update.
15120         * cfganal.c (connect_infinite_loops_to_exit): Initialize new edge
15121         probabilitycount to 0.
15122         * cfgbuild.c (compute_outgoing_frequencies): Update.
15123         * cfgcleanup.c (try_forward_edges): Update.
15124         (outgoing_edges_match): Update.
15125         (try_crossjump_to_edge): Update.
15126         * cfgexpand.c (expand_gimple_cond): Update make_single_succ_edge.
15127         (expand_gimple_tailcall): Update.
15128         (construct_init_block): Use make_single_succ_edge.
15129         (construct_exit_block): Use make_single_succ_edge.
15130         * cfghooks.c (verify_flow_info): Update.
15131         (redirect_edge_succ_nodup): Update.
15132         (split_edge): Update.
15133         (account_profile_record): Update.
15134         * cfgloopanal.c (single_likely_exit): Update.
15135         * cfgloopmanip.c (scale_loop_profile): Update.
15136         (set_zero_probability): Remove.
15137         (duplicate_loop_to_header_edge): Update.
15138         * cfgloopmanip.h (loop_version): Update prototype.
15139         * cfgrtl.c (try_redirect_by_replacing_jump): Update.
15140         (force_nonfallthru_and_redirect): Update.
15141         (update_br_prob_note): Update.
15142         (rtl_verify_edges): Update.
15143         (purge_dead_edges): Update.
15144         (rtl_lv_add_condition_to_bb): Update.
15145         * cgraph.c: (cgraph_edge::redirect_call_stmt_to_calle): Update.
15146         * cgraphunit.c (init_lowered_empty_function): Update.
15147         (cgraph_node::expand_thunk): Update.
15148         * cilk-common.c: Include profile-count.h
15149         * dojump.c (inv): Remove.
15150         (jumpifnot): Update.
15151         (jumpifnot_1): Update.
15152         (do_jump_1): Update.
15153         (do_jump): Update.
15154         (do_jump_by_parts_greater_rtx): Update.
15155         (do_compare_rtx_and_jump): Update.
15156         * dojump.h (jumpifnot, jumpifnot_1, jumpif_1, jumpif, do_jump,
15157         do_jump_1. do_compare_rtx_and_jump): Update prototype.
15158         * dwarf2cfi.c: Include profile-count.h
15159         * except.c (dw2_build_landing_pads): Use make_single_succ_edge.
15160         (sjlj_emit_dispatch_table): Likewise.
15161         * explow.c: Include profile-count.h
15162         * expmed.c (emit_store_flag_force): Update.
15163         (do_cmp_and_jump): Update.
15164         * expr.c (compare_by_pieces_d::generate): Update.
15165         (compare_by_pieces_d::finish_mode): Update.
15166         (emit_block_move_via_loop): Update.
15167         (store_expr_with_bounds): Update.
15168         (store_constructor): Update.
15169         (expand_expr_real_2): Update.
15170         (expand_expr_real_1): Update.
15171         * expr.h (try_casesi, try_tablejump): Update prototypes.
15172         * gimple-pretty-print.c (dump_probability): Update.
15173         (dump_profile): New.
15174         (dump_gimple_label): Update.
15175         (dump_gimple_bb_header): Update.
15176         * graph.c (draw_cfg_node_succ_edges): Update.
15177         * hsa-gen.c (convert_switch_statements): Update.
15178         * ifcvt.c (cheap_bb_rtx_cost_p): Update.
15179         (find_if_case_1): Update.
15180         (find_if_case_2): Update.
15181         * internal-fn.c (expand_arith_overflow_result_store): Update.
15182         (expand_addsub_overflow): Update.
15183         (expand_neg_overflow): Update.
15184         (expand_mul_overflow): Update.
15185         (expand_vector_ubsan_overflow): Update.
15186         * ipa-cp.c (good_cloning_opportunity_p): Update.
15187         * ipa-split.c (split_function): Use make_single_succ_edge.
15188         * ipa-utils.c (ipa_merge_profiles): Update.
15189         * loop-doloop.c (add_test): Update.
15190         (doloop_modify): Update.
15191         * loop-unroll.c (compare_and_jump_seq): Update.
15192         (unroll_loop_runtime_iterations): Update.
15193         * lra-constraints.c (lra_inheritance): Update.
15194         * lto-streamer-in.c (input_cfg): Update.
15195         * lto-streamer-out.c (output_cfg): Update.
15196         * mcf.c (adjust_cfg_counts): Update.
15197         * modulo-sched.c (sms_schedule): Update.
15198         * omp-expand.c (expand_omp_for_init_counts): Update.
15199         (extract_omp_for_update_vars): Update.
15200         (expand_omp_ordered_sink): Update.
15201         (expand_omp_for_ordered_loops): Update.
15202         (expand_omp_for_generic): Update.
15203         (expand_omp_for_static_nochunk): Update.
15204         (expand_omp_for_static_chunk): Update.
15205         (expand_cilk_for): Update.
15206         (expand_omp_simd): Update.
15207         (expand_omp_taskloop_for_outer): Update.
15208         (expand_omp_taskloop_for_inner): Update.
15209         * omp-simd-clone.c (simd_clone_adjust): Update.
15210         * optabs.c (expand_doubleword_shift): Update.
15211         (expand_abs): Update.
15212         (emit_cmp_and_jump_insn_1): Update.
15213         (expand_compare_and_swap_loop): Update.
15214         * optabs.h (emit_cmp_and_jump_insns): Update prototype.
15215         * predict.c (predictable_edge_p): Update.
15216         (edge_probability_reliable_p): Update.
15217         (set_even_probabilities): Update.
15218         (combine_predictions_for_insn): Update.
15219         (combine_predictions_for_bb): Update.
15220         (propagate_freq): Update.
15221         (estimate_bb_frequencies): Update.
15222         (force_edge_cold): Update.
15223         * profile-count.c (profile_count::dump): Add missing space into dump.
15224         (profile_count::debug): Add newline.
15225         (profile_count::differs_from_p): Explicitly convert to unsigned.
15226         (profile_count::stream_in): Update.
15227         (profile_probability::dump): New member function.
15228         (profile_probability::debug): New member function.
15229         (profile_probability::differs_from_p): New member function.
15230         (profile_probability::differs_lot_from_p): New member function.
15231         (profile_probability::stream_in): New member function.
15232         (profile_probability::stream_out): New member function.
15233         * profile-count.h (profile_count_quality): Rename to ...
15234         (profile_quality): ... this one.
15235         (profile_probability): New.
15236         (profile_count): Update.
15237         * profile.c (compute_branch_probabilities): Update.
15238         * recog.c (peep2_attempt): Update.
15239         * sched-ebb.c (schedule_ebbs): Update.
15240         * sched-rgn.c (find_single_block_region): Update.
15241         (compute_dom_prob_ps): Update.
15242         (schedule_region): Update.
15243         * sel-sched-ir.c (compute_succs_info): Update.
15244         * stmt.c (struct case_node): Update.
15245         (do_jump_if_equal): Update.
15246         (get_outgoing_edge_probs): Update.
15247         (conditional_probability): Update.
15248         (emit_case_dispatch_table): Update.
15249         (expand_case): Update.
15250         (expand_sjlj_dispatch_table): Update.
15251         (emit_case_nodes): Update.
15252         * targhooks.c: Update.
15253         * tracer.c (better_p): Update.
15254         (find_best_successor): Update.
15255         * trans-mem.c (expand_transaction): Update.
15256         * tree-call-cdce.c: Update.
15257         * tree-cfg.c (gimple_split_edge): Upate.
15258         (move_sese_region_to_fn): Upate.
15259         * tree-cfgcleanup.c (cleanup_control_expr_graph): Upate.
15260         * tree-eh.c (lower_resx): Upate.
15261         (cleanup_empty_eh_move_lp): Upate.
15262         * tree-if-conv.c (version_loop_for_if_conversion): Update.
15263         * tree-inline.c (copy_edges_for_bb): Update.
15264         (copy_cfg_body): Update.
15265         * tree-parloops.c (gen_parallel_loop): Update.
15266         * tree-profile.c (gimple_gen_ic_func_profiler): Update.
15267         (gimple_gen_time_profiler): Update.
15268         * tree-ssa-dce.c (remove_dead_stmt): Update.
15269         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
15270         * tree-ssa-loop-im.c (execute_sm_if_changed): Update.
15271         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update.
15272         (unloop_loops): Update.
15273         (try_peel_loop): Update.
15274         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
15275         * tree-ssa-loop-split.c (connect_loops): Update.
15276         (split_loop): Update.
15277         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
15278         (hoist_guard): Update.
15279         * tree-ssa-phionlycprop.c (propagate_rhs_into_lhs): Update.
15280         * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Update.
15281         (value_replacement): Update.
15282         * tree-ssa-reassoc.c (branch_fixup): Update.
15283         * tree-ssa-tail-merge.c (replace_block_by): Update.
15284         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Update.
15285         (create_edge_and_update_destination_phis): Update.
15286         (compute_path_counts): Update.
15287         (recompute_probabilities): Update.
15288         (update_joiner_offpath_counts): Update.
15289         (freqs_to_counts_path): Update.
15290         (duplicate_thread_path): Update.
15291         * tree-switch-conversion.c (hoist_edge_and_branch_if_true): Update.
15292         (struct switch_conv_info): Update.
15293         (gen_inbound_check): Update.
15294         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
15295         (vect_do_peeling): Update.
15296         (vect_loop_versioning): Update.
15297         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
15298         (optimize_mask_stores): Update.
15299         * ubsan.c (ubsan_expand_null_ifn): Update.
15300         * value-prof.c (gimple_divmod_fixed_value): Update.
15301         (gimple_divmod_fixed_value_transform): Update.
15302         (gimple_mod_pow2): Update.
15303         (gimple_mod_pow2_value_transform): Update.
15304         (gimple_mod_subtract): Update.
15305         (gimple_mod_subtract_transform): Update.
15306         (gimple_ic): Update.
15307         (gimple_stringop_fixed_value): Update.
15308         (gimple_stringops_transform): Update.
15309         * value-prof.h: Update.
15310
15311 2017-06-29  Carl Love  <cel@us.ibm.com>
15312
15313         * config/rs6000/rs6000-c.c: Add support for built-in functions
15314         vector signed int vec_signed (vector float);
15315         vector signed long long vec_signed (vector double);
15316         vector signed int vec_signed2 (vector double, vector double);
15317         vector signed int vec_signede (vector double);
15318         vector signed int vec_signedo (vector double);
15319         * config/rs6000/rs6000.c (rs6000_generate_vsigned2_code): Add
15320         instruction generator.
15321         * config/rs6000/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
15322         UNSPEC_VSX_VSIGNED2): Add UNSPECS.
15323         (vsx_xvcvspsxws, vsx_xvcvdpuxds_scale, vsx_xvcvspuxws, vsigned2_v2df):
15324         Add define_insn.
15325         (vsignedo_v2df, vsignede_v2df, vunsigned2_v2df, vunsignedo_v2df,
15326         vunsignede_v2df): Add define_expands.
15327         * config/rs6000/rs6000-builtin.def (VEC_SIGNED, VEC_UNSIGNED,
15328         VEC_SIGNED2, VEC_UNSIGNED2, VEC_SIGNEDE, VEC_UNSIGNEDE, VEC_SIGNEDO,
15329         VEC_UNSIGNEDO): Add definitions.
15330         * config/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
15331         UNSPEC_VSX_VSIGNED2): Add UNSPECs.
15332         (vsx_xvcvspsxws, vsx_xvcvspuxws): Add define_insn.
15333         (vsigned2_v2df, vsigendo_v2df, vsignede_v2df,
15334         vunsigned2_v2df, vunsignedo_v2df, vunsignede_v2df): Add define_expands.
15335         * config/rs6000/altivec.h (vec_signed, vec_signed2,
15336         vec_signede and vec_signedo, vec_unsigned, vec_unsigned2,
15337         vec_unsignede, vec_unsignedo): Add builtin defines.
15338         * config/rs6000-protos.h (rs6000_generate_vsigned2_code): Add extern
15339         declaration.
15340         * doc/extend.texi: Update the built-in documentation file for the
15341         new built-in functions.
15342
15343 2017-06-29  Richard Biener  <rguenther@suse.de>
15344
15345         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Do not add
15346         reduction chains to LOOP_VINFO_REDUCTIONS.
15347         * tree-vect-slp.c (vect_analyze_slp): Continue looking for
15348         SLP reductions after processing reduction chains.
15349
15350 2017-06-29  Nathan Sidwell  <nathan@acm.org>
15351
15352         * builtins.c (fold_builtin_FUNCTION): Use
15353         lang_hooks.decl_printable_name.
15354
15355 2017-06-29  Peter Bergner  <bergner@vnet.ibm.com>
15356
15357         PR middle-end/81194
15358         * cfgexpand.c (expand_gimple_stmt_1): Handle switch statements
15359         with only one label.
15360         * stmt.c (expand_case): Assert NCASES is greater than one.
15361
15362 2017-06-29  Richard Biener  <rguenther@suse.de>
15363
15364         * tree-cfg.c (group_case_labels_stmt): Return whether we changed
15365         anything.
15366         (group_case_labels): Likewise.
15367         (find_taken_edge): Push sanity checking on val to workers...
15368         (find_taken_edge_cond_expr): ... here
15369         (find_taken_edge_switch_expr): ... and here, handle cases
15370         with just a default label.
15371         * tree-cfg.h (group_case_labels_stmt): Adjust prototype.
15372         (group_case_labels): Likewise.
15373         * tree-cfgcleanup.c (execute_cleanup_cfg_post_optimizing): When
15374         group_case_labels does anything cleanup the CFG again.
15375
15376 2017-06-29  Bin Cheng  <bin.cheng@arm.com>
15377
15378         PR tree-optimization/81196
15379         * tree-ssa-loop-niter.c (number_of_iterations_cond): Handle loop
15380         exit condition comparing two IVs.
15381
15382 2017-06-29  Richard Earnshaw  <rearnsha@arm.com>
15383
15384         * config/arm/parsecpu.awk (gen_comm_data): Add initializer for
15385         profile to the dummy entry at the end of the list of architectures.
15386         * config/arm/arm-cpu-cdata.h: Regenerated.
15387
15388 2017-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15389             Michael Collison <michael.collison@arm.com>
15390
15391         PR target/70119
15392         * config/aarch64/aarch64.md (*aarch64_<optab>_reg_<mode>3_mask1):
15393         New pattern.
15394         (*aarch64_reg_<mode>3_neg_mask2): New pattern.
15395         (*aarch64_reg_<mode>3_minus_mask): New pattern.
15396         (*aarch64_<optab>_reg_di3_mask2): New pattern.
15397         * config/aarch64/aarch64.c (aarch64_rtx_costs): Account for cost
15398         of shift when the shift amount is masked with constant equal to
15399         the size of the mode.
15400         * config/aarch64/predicates.md (subreg_lowpart_operator): New
15401         predicate.
15402
15403 2017-06-29  Martin Liska  <mliska@suse.cz>
15404
15405         * config/i386/i386.opt: Change range from [1,5] to [0,5].
15406
15407 2017-06-29  Yury Gribov  <tetra2005@gmail.com>
15408
15409         PR bootstrap/80565
15410         * ipa-cp.c (allocate_and_init_ipcp_value): Add initialization
15411         code.
15412         * ipa-inline.h
15413         (edge_growth_cache_entry::edge_growth_cache_entry): New
15414         function.
15415         (reset_edge_growth_cache): Update to use constructor.
15416
15417 2017-06-28  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
15418
15419         * config/aarch64/aarch64.h (AARCH64_EXPAND_ALIGNMENT): New.
15420         (DATA_ALIGNMENT): Update to use AARCH64_EXPAND_ALIGNMENT.
15421         (LOCAL_ALIGNMENT): Update to use AARCH64_EXPAND_ALIGNMENT.
15422
15423 2017-06-28  Sebastian Peryt  <sebastian.peryt@intel.com>
15424
15425         * config/i386/avx512vlintrin.h (_mm256_permutexvar_epi64)
15426         (_mm256_permutexvar_epi32, _mm256_permutex_epi64): New intrinsics.
15427
15428 2017-06-28  Szabolcs Nagy  <szabolcs.nagy@arm.com>
15429
15430         * config.gcc (*-linux-musl*): Add t-musl tmake_file.
15431         (*-linux-uclibc*): Add t-uclibc tmake_file.
15432         * config/t-musl: New.
15433         * config/t-uclibc: New.
15434
15435 2017-06-28  Richard Earnshaw  <rearnsha@arm.com>
15436
15437         * config/arm/parsecpu.awk (profile): Parse new keyword in an arch
15438         context.
15439         (gen_comm_data): Emit architectural setting of arch_prof.
15440         * config/arm/arm-cpus.in (armv6-m, armv6s-m, armv7-a, armv7ve): Set the
15441         profile.
15442         (armv7-r, armv7-m, armv7e-m, armv8-a, armv8.1-a, armv8.2-a): Likewise.
15443         (armv8-m.base, armv8-m.main): Likewise.
15444         * arm-protos.h (arm_build_target): Add profile field.
15445         (arch_option): Likewise.
15446         * config/arm/arm.c (arm_configure_build_target): Copy the profile to
15447         the active target.
15448         * config/arm/arm.h (TARGET_ARM_ARCH_PROFILE): Use
15449         arm_active_target.profile.
15450
15451 2017-06-28  Richard Biener  <rguenther@suse.de>
15452
15453         PR middle-end/81227
15454         * fold-const.c (negate_expr_p): Use TYPE_UNSIGNED, not
15455         TYPE_OVERFLOW_WRAPS.
15456         * match.pd (negate_expr_p): Likewise.
15457         * tree-ssa-reassoc.c (optimize_range_tests_diff): Use
15458         fold_build2, not fold_binary.
15459
15460 2017-06-28  Wilco Dijkstra  <wdijkstr@arm.com>
15461
15462         * config/aarch64/aarch64 (aarch64_expand_mov_immediate):
15463         Convert memory address to Pmode.
15464         (aarch64_print_operand): Assert MEM operands are always Pmode.
15465
15466 2017-06-28  Wilco Dijkstra  <wdijkstr@arm.com>
15467
15468         PR target/79665
15469         * config/arm/aarch-common.c (arm_no_early_alu_shift_dep):
15470         Remove redundant if.
15471         (aarch_forward_to_shift_is_not_shifted_reg): Remove.
15472         * config/arm/aarch-common-protos.h
15473         (aarch_forward_to_shift_is_not_shifted_re): Remove.
15474         * config/arm/cortex-a53.md: Use arm_no_early_alu_shift_dep in bypass.
15475
15476 2017-06-28  Michael Meissner  <meissner@linux.vnet.ibm.com>
15477
15478         PR ipa/81238
15479         * multiple_target.c (create_dispatcher_calls): Set the default
15480         clone to be static, not public.
15481
15482 2017-06-28  Richard Biener  <rguenther@suse.de>
15483
15484         * tree-vect-loop.c (vectorizable_reduction): Move special
15485         cond reduction IV var creation ...
15486         (vect_create_epilog_for_reduction): ... here.  Remove induction_index
15487         parameter.  Use STMT_VINFO_VECTYPE.
15488         * tree-vect-slp.c (vect_get_constant_vectors): Properly reset
15489         constant_p.
15490
15491 2017-06-28  Martin Liska  <mliska@suse.cz>
15492
15493         PR ipa/81128
15494         * ipa-visibility.c (non_local_p): Handle visibility.
15495
15496 2017-06-28  Martin Liska  <mliska@suse.cz>
15497
15498         PR driver/79659
15499         * common.opt: Add IntegerRange to various options.
15500         * opt-functions.awk (integer_range_info): New function.
15501         * optc-gen.awk: Add integer_range_info to cl_options struct.
15502         * opts-common.c (decode_cmdline_option): Handle
15503         CL_ERR_INT_RANGE_ARG.
15504         (cmdline_handle_error): Likewise.
15505         * opts.c (print_filtered_help): Show valid interval in
15506         when --help is provided.
15507         * opts.h (struct cl_option): Add range_min and range_max fields.
15508         * config/i386/i386.opt: Add IntegerRange for -mbranch-cost.
15509
15510 2017-06-28  Marc Glisse  <marc.glisse@inria.fr>
15511
15512         * match.pd ((X & ~Y) | (~X & Y)): Generalize to + and ^.
15513         (x * C EQ/NE y * C): New transformation.
15514
15515 2017-06-28  Christophe Lyon  <christophe.lyon@linaro.org>
15516
15517         * genmultilib (combination_space): Accept '+' in option names.
15518
15519 2017-06-28  Martin Liska  <mliska@suse.cz>
15520
15521         PR sanitizer/81224
15522         * asan.c (instrument_derefs): Bail out inner references
15523         that are hard register variables.
15524
15525 2017-06-28  Jakub Jelinek  <jakub@redhat.com>
15526
15527         PR target/81175
15528         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Use def_builtin
15529         rather than def_builtin_pure for __builtin_ia32_gatherpf*.
15530
15531 2017-06-28  Richard Biener  <rguenther@suse.de>
15532
15533         * tree-vectorizer.h (vect_get_vec_defs): Remove.
15534         (vect_get_slp_defs): Adjust.
15535         * tree-vect-loop.c (get_initial_defs_for_reduction): Split
15536         out from ...
15537         * tree-vect-slp.c (vect_get_constant_vectors): ... here and
15538         simplify.
15539         * tree-vect-loop.c (vect_create_epilog_for_reduction): Use
15540         get_initial_defs_for_reduction instead of vect_get_vec_defs.
15541         (vectorizable_reduction): Adjust.
15542         * tree-vect-slp.c (vect_get_constant_vectors): Remove reduction
15543         handling.
15544         (vect_get_slp_defs): Likewise.
15545         * tree-vect-stmts.c (vect_get_vec_defs): Make static and adjust.
15546         (vectorizable_bswap): Adjust.
15547         (vectorizable_call): Likewise.
15548         (vectorizable_conversion): Likewise.
15549         (vectorizable_assignment): Likewise.
15550         (vectorizable_shift): Likewise.
15551         (vectorizable_operation): Likewise.
15552         (vectorizable_store): Likewise.
15553         (vectorizable_condition): Likewise.
15554         (vectorizable_comparison): Likewise.
15555
15556 2017-06-28  Michael Collison  <michael.collison@arm.com>
15557
15558         PR target/68535
15559         * config/arm/arm.c (gen_ldm_seq): Remove last unnecessary
15560         set of base_reg
15561         (arm_gen_movmemqi): Removed unused variable 'i'.
15562         Convert 'for' loop into 'while' loop.
15563         (arm_expand_prologue): Remove last unnecessary set of insn.
15564         (thumb_pop): Remove unused variable 'pushed_words'.
15565         (thumb_exit): Remove last unnecessary set of regs_to_pop.
15566
15567 2017-06-28  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15568
15569         * config/s390/predicates.md: Use s390_rel_address_ok_p.
15570         * config/s390/s390-protos.h: Add prototype of
15571         s390_rel_address_ok_p.
15572         * config/s390/s390.c (s390_got_symbol): New function.
15573         (s390_rel_address_ok_p): New function.
15574         (legitimize_pic_address): Use s390_rel_address_ok_p.
15575         (s390_load_got): Use s390_got_symbol.
15576         (s390_option_override): Issue error if
15577         -mno-pic-data-is-text-relative is used without -fpic/-fPIC.
15578         * config/s390/s390.h (TARGET_DEFAULT_PIC_DATA_IS_TEXT_RELATIVE):
15579         New macro.
15580         * config/s390/s390.opt: New option mpic-data-is-text-relative.
15581
15582 2017-06-27  Andrew Pinski  <apinski@cavium.com>
15583
15584         * match.pd (X >/>=/</<= 0 ? 1.0 : -1.0): New patterns.
15585         (X * copysign (1.0, X)): New pattern.
15586         (X * copysign (1.0, -X)): New pattern.
15587         (copysign (-1.0, CST)): New pattern.
15588
15589 2017-06-27  Joseph Myers  <joseph@codesourcery.com>
15590
15591         * genmultilib (combination_space): Remove variable.
15592         Validate reuse rules against regular expression for any sequence
15593         of multilib options in any order.
15594
15595 2017-06-27  Michael Collison  <michael.collison@arm.com>
15596
15597         * config/aarch64/aarch64-simd.md (aarch64_combine<mode>): Directly
15598         call aarch64_split_simd_combine.
15599         * (aarch64_combine_internal<mode>): Delete pattern.
15600         * config/aarch64/aarch64.c (aarch64_split_simd_combine):
15601         Allow register and subreg operands.
15602
15603 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
15604
15605         * config/i386/vxworks.h (ASM_SPEC): Remove definition. No target
15606         specific need, just fallback on defaults.
15607         (ASM_OUTPUT_ALIGNED_BSS): Add #undef before #define.
15608
15609 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
15610             Olivier Hainque  <hainque@adacore.com>
15611
15612         * config/i386/vxworks.h (DBX_REGISTER_NUMBER): Pick distinct
15613         map for 64bits.
15614         (TARGET_OS_CPP_BUILTINS): builtin_define CPU to X86_64 for 64bit
15615         targets. Pick a default if no particular attempt applied.
15616         (STACK_CHECK_PROTECT): Double for 64bit targets, which have
15617         larger contexts.
15618
15619 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
15620
15621         * config.gcc (i*86-wrs-vxworks7): Handle new acceptable triplet.
15622         (x86_64-wrs-vxworks7): Likewise.
15623
15624 2017-06-27  Marek Polacek  <polacek@redhat.com>
15625
15626         PR sanitizer/81223
15627         * ubsan.c (instrument_null): Check get_base_address's result for null.
15628
15629 2017-06-27  Marc Glisse  <marc.glisse@inria.fr>
15630
15631         * match.pd ((A+-B)+(C-A), (A+B)-(A-C)): New transformations.
15632
15633 2017-06-27  Marc Glisse  <marc.glisse@inria.fr>
15634
15635         * builtin-types.def (BT_FENV_T_PTR, BT_CONST_FENV_T_PTR,
15636         BT_FEXCEPT_T_PTR, BT_CONST_FEXCEPT_T_PTR): New primitive types.
15637         (BT_FN_INT_FENV_T_PTR, BT_FN_INT_CONST_FENV_T_PTR,
15638         BT_FN_INT_FEXCEPT_T_PTR_INT, BT_FN_INT_CONST_FEXCEPT_T_PTR_INT):
15639         New function types.
15640         * builtins.def (BUILT_IN_FECLEAREXCEPT, BUILT_IN_FEGETENV,
15641         BUILT_IN_FEGETEXCEPTFLAG, BUILT_IN_FEGETROUND,
15642         BUILT_IN_FEHOLDEXCEPT, BUILT_IN_FERAISEEXCEPT,
15643         BUILT_IN_FESETENV, BUILT_IN_FESETEXCEPTFLAG,
15644         BUILT_IN_FESETROUND, BUILT_IN_FETESTEXCEPT,
15645         BUILT_IN_FEUPDATEENV): New builtins.
15646         * tree-core.h (TI_FENV_T_PTR_TYPE, TI_CONST_FENV_T_PTR_TYPE,
15647         TI_FEXCEPT_T_PTR_TYPE, TI_CONST_FEXCEPT_T_PTR_TYPE): New entries.
15648         * tree.h (fenv_t_ptr_type_node, const_fenv_t_ptr_type_node,
15649         fexcept_t_ptr_type_node, const_fexcept_t_ptr_type_node): New
15650         macros.
15651         (builtin_structptr_types): Adjust size.
15652         * tree.c (builtin_structptr_types): Add four entries.
15653
15654 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
15655             Olivier Hainque  <hainque@adacore.com>
15656
15657         * config/vxworks.h (VXWORKS_LIB_SPEC): Incorporate ...
15658         (TLS_SYM): New local macro, forcing reference to __tls__ on
15659         link command lines for VxWorks 7 RTPs, triggering initialization
15660         of tlsLib.
15661         (VXWORKS_HAVE_TLS): New macro. State whether the target VxWorks
15662         OS features TLS support, true for RTPs on VxWorks 7.
15663         * config/vxworks.c (vxworks_override_options): Setup emutls
15664         accordingly.
15665
15666 2017-06-27  Jakub Jelinek  <jakub@redhat.com>
15667
15668         * predict.c (test_prediction_value_range): Use -1U instead of -1
15669         to avoid narrowing conversion warning.
15670         * dumpfile.c (dump_options): Wrap all value into dump_flags_t cast
15671         to avoid narrowing conversion warning.
15672         * opt-functions.awk (var_ref): Return (unsigned short) -1 instead of
15673         -1.
15674         * optc-gen.awk (END): Expect (unsigned short) -1 instead of -1.
15675
15676 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
15677
15678         * config/vxworks.h (VXWORKS_LIBS_RTP): Alternative definition for
15679         64bit configurations.
15680         (PTR_DIFF_TYPE): Alternative definition for TARGET_LP64.
15681         (SIZE_TYPE): Likewise.
15682         * config/vxworks.c (vxworks_emutls_var_fields): Use
15683         long_unsigned_type_node instead of unsigned_type_node as the offset
15684         field type, which is "pointer" mode in emutls.c.
15685
15686 2017-06-27  Jakub Jelinek  <jakub@redhat.com>
15687
15688         PR sanitizer/81209
15689         * ubsan.c (ubsan_encode_value): Initialize DECL_CONTEXT on var.
15690
15691         PR middle-end/81207
15692         * gimple-fold.c (replace_call_with_call_and_fold): Handle
15693         gimple_vuse copying separately from gimple_vdef copying.
15694
15695 2017-06-27  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15696
15697         * value-prof.c (free_hist): Remove call to memset and the enclosing if
15698         condition.
15699
15700 2017-06-26  Jerome Lambourg  <lambourg@adacore.com>
15701             Olivier Hainque  <hainque@adacore.com>
15702
15703         * config.gcc (*-*-vxworks*): Add TARGET_VXWORKS7=1 to tm_defines
15704         for all vxworks7 targets.
15705         * config/vxworks.h (TARGET_VXWORKS7): If not defined, define to 0.
15706         (VXWORKS_ADDITIONAL_CPP_SPEC): Alternative definition for VXWORKS7.
15707         (VXWORKS_LIBS_RTP, VXWORKS_LIBS_RTP_DIR): New macros, allowing
15708         variations for VX6/VX7 and 32/64bits later on in ...
15709         (VXWORKS_LIB_SPEC): Leverage new macros.
15710         (VXWORKS_OS_CPP_BUILTINS): Define _VSB_CONFIG_FILE for VXWORKS7,
15711         as well as _ALLOW_KEYWORD_MACROS when "inline" is not a keyword.
15712
15713 2017-06-26  Jerome Lambourg  <lambourg@adacore.com>
15714
15715         * config/vxworks.h (VXWORKS_OS_CPP_BUILTINS): builtin_define
15716         _VX_TOOL_FAMILY and _VX_TOOL to gnu.
15717
15718 2017-06-26  Carl Love  <cel@us.ibm.com>
15719
15720         * config/rs6000/rs6000-c.c: Add support for built-in functions
15721         vector bool char vec_reve (vector bool char);
15722         vector signed char vec_reve (vector signed char);
15723         vector unsigned char vec_reve (vector unsigned char);
15724         vector bool int vec_reve (vector bool int);
15725         vector signed int vec_reve (vector signed int);
15726         vector unsigned int vec_reve (vector unsigned int);
15727         vector bool long long vec_reve (vector bool long long);
15728         vector signed long long vec_reve (vector signed long long);
15729         vector unsigned long long vec_reve (vector unsigned long long);
15730         vector bool short vec_reve (vector bool short);
15731         vector signed short vec_reve (vector signed short);
15732         vector double vec_reve (vector double);
15733         vector float vec_reve (vector float);
15734         * config/rs6000/rs6000-builtin.def (VREVE_V2DI, VREVE_V4SI,
15735         VREVE_V8HI, VREVE_V16QI, VREVE_V2DF, VREVE_V4SF, VREVE): New builtin.
15736         * config/rs6000/altivec.md (UNSPEC_VREVEV): New UNSPEC.
15737         (altivec_vreve): New pattern.
15738         * config/rs6000/altivec.h (vec_reve): New define.
15739         * doc/extend.texi (vec_rev): Update the built-in documentation file
15740         for the new built-in functions.
15741
15742 2016-06-26  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15743
15744         PR tree-optimization/71815
15745         * gimple-ssa-strength-reduction.c (uses_consumed_by_stmt): New
15746         function.
15747         (find_basis_for_candidate): Call uses_consumed_by_stmt rather than
15748         has_single_use.
15749         (slsr_process_phi): Likewise.
15750         (replace_uncond_cands_and_profitable_phis): Don't replace a
15751         multiply candidate with a stride of 1 (copy or cast).
15752         (phi_incr_cost): Call uses_consumed_by_stmt rather than
15753         has_single_use.
15754         (lowest_cost_path): Likewise.
15755         (total_savings): Likewise.
15756
15757 2017-06-26  Richard Biener  <rguenther@suse.de>
15758
15759         PR target/81175
15760         * config/i386/i386.c (ix86_init_mmx_sse_builtins):
15761         Use def_builtin_pure for all gather builtins.
15762
15763 2017-06-26  Richard Biener  <rguenther@suse.de>
15764
15765         PR tree-optimization/81203
15766         * tree-tailcall.c (find_tail_calls): Do not move stmts into
15767         non-dominating BBs.
15768
15769 2017-06-26  Marek Polacek  <polacek@redhat.com>
15770
15771         PR c/80116
15772         * doc/invoke.texi: Document -Wmultistatement-macros.
15773
15774 2017-06-26  Christophe Lyon  <christophe.lyon@linaro.org>
15775
15776         * doc/sourcebuild.texi (ARM-specific attributes): Document new
15777         arm_neon_ok_no_float_abi effective target.
15778
15779 2017-06-26  Richard Biener  <rguenther@suse.de>
15780
15781         PR tree-optimization/80928
15782         * cfghooks.c (duplicate_block): Do not copy BB_DUPLICATED flag.
15783         (copy_bbs): Set BB_DUPLICATED flag early.
15784         (execute_on_growing_pred): Do not execute for BB_DUPLICATED
15785         marked blocks.
15786         (execute_on_shrinking_pred): Likewise.
15787         * tree-ssa.c (ssa_redirect_edge): Do not look for PHI args in
15788         BB_DUPLICATED blocks.
15789         * tree-ssa-phionlycoprop.c (eliminate_degenerate_phis_1): Properly
15790         iterate over all PHIs considering removal of *gsi.
15791
15792 2017-06-23  Jim Wilson  <jim.wilson@linaro.org>
15793
15794         * doc/invoke.texi (AArch64 Options, -mtune): Re-add falkor and
15795         qdf24xx.
15796
15797 2017-06-23  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15798
15799         * config/rs6000/rs6000-string.c: (expand_block_clear,
15800         do_load_for_compare, select_block_compare_mode,
15801         compute_current_alignment, expand_block_compare,
15802         expand_strncmp_align_check, expand_strn_compare,
15803         expand_block_move, rs6000_output_load_multiple)
15804         Move functions related to string/block move/compare
15805         to a separate file.
15806         * config/rs6000/rs6000.c: Move above functions to rs6000-string.c.
15807         * config/rs6000/rs6000-protos.h (rs6000_emit_dot_insn): Add prototype
15808         for this function which is now used in two files.
15809         * config/rs6000/t-rs6000: Add rule to compile rs6000-string.o.
15810         * config.gcc: Add rs6000-string.o to extra_objs for
15811         targets powerpc*-*-* and rs6000*-*-*.
15812
15813 2017-06-23  Michael Meissner  <meissner@linux.vnet.ibm.com>
15814
15815         PR target/80510
15816         * config/rs6000/rs6000.md (ALTIVEC_DFORM): Do not allow DImode in
15817         32-bit, since indexed is not valid for DImode.
15818         (mov<mode>_hardfloat32): Reorder ISA 2.07 load/stores before ISA
15819         3.0 d-form load/stores to be the same as mov<mode>_hardfloat64.
15820         (define_peephole2 for Altivec d-form load): Add 32-bit support.
15821         (define_peephole2 for Altivec d-form store): Likewise.
15822
15823         PR ipa/81185
15824         * multiple_target.c (create_dispatcher_calls): Only create the
15825         dispatcher call if the function is the default clone of a
15826         versioned function.
15827
15828 2017-06-23  Segher Boessenkool  <segher@kernel.crashing.org>
15829
15830         PR middle-end/80902
15831         * builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
15832         a call, force the call to not be a tail call.
15833
15834 2017-06-23  Jeff Law  <law@redhat.com>
15835
15836         * doc/contrib.texi: Add entry for Steven Pemberton's work on
15837         enquire.
15838
15839 2017-06-23  Will Schmidt  <will_schmidt@vnet.ibm.com>
15840
15841         * config/rs6000/rs6000.c: Add include of ssa-propagate.h for
15842         update_call_from_tree().  (rs6000_gimple_fold_builtin): Add
15843         handling for early expansion of vector shifts (sl,sr,sra,rl).
15844         (builtin_function_type): Add vector shift right instructions
15845         to the unsigned argument list.
15846
15847 2017-06-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
15848
15849         rtl-optimizatoin/79286
15850         * ira.c (update_equiv_regs): Revert to using may_trap_or_fault_p again.
15851         * rtlanal.c (rtx_addr_can_trap_p_1): SYMBOL_REF_FUNCTION_P can never
15852         trap.  PIC register plus a const unspec without offset can never trap.
15853
15854 2017-06-23  Marc Glisse  <marc.glisse@inria.fr>
15855
15856         * tree.h (builtin_structptr_type): New type.
15857         (builtin_structptr_types): Declare new array.
15858         * tree.c (builtin_structptr_types): New array.
15859         (free_lang_data, build_common_tree_nodes): Use it.
15860
15861 2017-06-23  Jonathan Wakely  <jwakely@redhat.com>
15862
15863         PR c++/81187
15864         * doc/invoke.texi (-Wnoexcept-type): Fix name of option, from
15865         -Wnoexcept.
15866
15867 2017-06-22  Matt Turner  <mattst88@gmail.com>
15868
15869         * config/i386/driver-i386.c (host_detect_local_cpu): Add Kaby
15870         Lake models to skylake case.  Assume skylake for unknown
15871         models with clflushopt.
15872
15873 2017-06-22  Jeff Law  <law@redhat.com>
15874
15875         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Handle
15876         frame sizes that do not satisfy aarch64_uimm12_shift.
15877
15878 2017-06-22  Jan Hubicka <hubicka@ucw.cz>
15879
15880         * profile-count.h (apply_probability,
15881         apply_scale, probability_in): Fix checks for zero.
15882
15883 2017-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15884
15885         * incpath.c (add_sysroot_to_chain): Allow for $SYSROOT prefix.
15886         * doc/cppdiropts.texi (-I @var{dir}): Document it.
15887
15888 2016-06-22  Richard Biener  <rguenther@suse.de>
15889
15890         * tree-vect-loop.c (vect_model_reduction_cost): Handle
15891         COND_REDUCTION and INTEGER_INDUC_COND_REDUCTION without
15892         REDUC_MAX_EXPR support.
15893         (vectorizable_reduction): Likewise.
15894         (vect_create_epilog_for_reduction): Likewise.
15895
15896 2017-06-22  James Greenhalgh  <james.greenhalgh@arm.com>
15897
15898         * match.pd (A / (1 << B) -> A >> B): New.
15899         * generic-match-head.c: Include optabs-tree.h.
15900         * gimple-match-head.c: Likewise.
15901         * optabs-tree.h (target_supports_op_p): New.
15902         * optabs-tree.c (target_supports_op_p): New.
15903
15904 2017-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15905
15906         * configure.ac (gcc_cv_ld_static_dynamic): Also check stderr for
15907         $gcc_cv_ld --help output.
15908         (gcc_cv_ld_demangle): Likewise.
15909         (gcc_cv_ld_eh_frame_hdr): Likewise.
15910         (gcc_cv_ld_pie): Likewise.
15911         (gcc_cv_ld_as_needed): Likewise.  Prefer native forms unless $gnu_ld.
15912         (gcc_cv_ld_buildid): Likewise.
15913         (gcc_cv_ld_sysroot): Likewise.
15914         (ld_bndplt_support): Likewise.
15915         (ld_pushpopstate_support): Likewise.
15916         * configure: Regenerate.
15917         * config/sol2.h [!USE_GLD] (SYSROOT_SPEC): Define.
15918
15919 2017-06-21  Jakub Jelinek  <jakub@redhat.com>
15920
15921         PR target/81151
15922         * config/i386/sse.md (round<mode>2): Renumber match_dup and
15923         operands indexes to avoid gap between operands and match_dups.
15924
15925 2017-06-21  Andrew Pinski  <apinski@cavium.com>
15926
15927         * config/aarch64/aarch64-cost-tables.h (thunderx_extra_costs):
15928         Increment Arith_shift and Arith_shift_reg by 1.
15929         * config/aarch64/aarch64-tuning-flags.def (cheap_shift_extend):
15930         New tuning flag.
15931         * config/aarch64/aarch64.c (thunderx_tunings): Enable
15932         AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND.
15933         (aarch64_strip_extend): Add new argument and test for it.
15934         (aarch64_cheap_mult_shift_p): New function.
15935         (aarch64_rtx_mult_cost): Call aarch64_cheap_mult_shift_p and don't
15936         add a cost if it is true.
15937         Update calls to aarch64_strip_extend.
15938         (aarch64_rtx_costs): Update calls to aarch64_strip_extend.
15939
15940 2017-06-21  Andrew Pinski  <apinski@cavium.com>
15941
15942         * config/aarch64/aarch64-cores.def (thunderxt88p1): Use thunderxt88
15943         tunings.
15944         (thunderxt88): Likewise.
15945         * config/aarch64/aarch64.c (thunderxt88_prefetch_tune): New variable.
15946         (thunderx_prefetch_tune): New variable.
15947         (thunderx2t99_prefetch_tune): Update for the correct values.
15948         (thunderxt88_tunings): New variable.
15949         (thunderx_tunings): Use thunderx_prefetch_tune instead of
15950         generic_prefetch_tune.
15951         (thunderx2t99_tunings): Use AUTOPREFETCHER_WEAK.
15952
15953 2017-06-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15954
15955         * config/aarch64/atomics.md (aarch64_compare_and_swap<mode>_lse,
15956         SHORT): Relax operand 3 to aarch64_reg_or_zero and constraint to Z.
15957         (aarch64_compare_and_swap<mode>_lse, GPI): Likewise.
15958         (aarch64_atomic_cas<mode>, SHORT): Likewise for operand 2.
15959         (aarch64_atomic_cas<mode>, GPI): Likewise.
15960
15961 2017-06-21  Martin Liska  <mliska@suse.cz>
15962
15963         * gimplify.c (gimplify_label_expr): Insert GIMPLE_PREDICT
15964         statements on cold and hot labels.
15965         * predict.c (tree_estimate_probability_bb): Remove the
15966         prediction from this place.
15967
15968 2017-06-21  Martin Liska  <mliska@suse.cz>
15969
15970         PR tree-optimization/79489
15971         * gimplify.c (maybe_add_early_return_predict_stmt): New
15972         function.
15973         (gimplify_return_expr): Call the function.
15974         * predict.c (tree_estimate_probability_bb): Remove handling
15975         of early return.
15976         * predict.def: Update comment about early return predictor.
15977         * gimple-predict.h (is_gimple_predict): New function.
15978         * predict.def: Change default value of early return to 66.
15979         * tree-tailcall.c (find_tail_calls): Skip GIMPLE_PREDICT
15980         statements.
15981         * passes.def: Put pass_strip_predict_hints to the beginning of
15982         IPA passes.
15983
15984 2017-06-21  Pierre-Marie de Rodat  <derodat@adacore.com>
15985
15986         * dwarf2out.c (gen_decl_die): Remove the guard to skip file-scope
15987         FUNCTION_DECL declarations.
15988         (dwarf2out_early_global_decl): Remove the guard to skip FUNCTION_DECL
15989         declarations.
15990         (dwaf2out_decl): Likewise.
15991         * godump.c (go_early_global_decl): Skip call to the real debug hook
15992         for FUNCTION_DECL declarations.
15993         * passes.c (rest_of_decl_compilation): Skip call to the
15994         early_global_decl debug hook for FUNCTION_DECL declarations, unless
15995         -fdump-go-spec is passed.
15996
15997 2017-06-21  Marc Glisse  <marc.glisse@inria.fr>
15998
15999         * config/i386/i386.c (struct builtin_isa): New field pure_p.
16000         Reorder for compactness.
16001         (def_builtin, def_builtin2, ix86_add_new_builtins): Handle pure_p.
16002         (def_builtin_pure, def_builtin_pure2): New functions.
16003         (ix86_init_mmx_sse_builtins) [__builtin_ia32_stmxcsr]: Mark as pure.
16004
16005 2017-06-21  Marc Glisse  <marc.glisse@inria.fr>
16006
16007         * match.pd (nop_convert): New predicate.
16008         ((A +- CST1) +- CST2): Allow some NOP conversions.
16009
16010 2017-06-21  Jakub Jelinek  <jakub@redhat.com>
16011
16012         PR c++/81130
16013         * gimplify.c (omp_add_variable): Don't force GOVD_SEEN for types
16014         with ctors/dtors if GOVD_SHARED is set.
16015
16016 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
16017
16018         * config/aarch64/aarch64.md (movti_aarch64):
16019         Emit mov rather than orr.
16020         (movtf_aarch64): Likewise.
16021         * config/aarch64/aarch64-simd.md (aarch64_simd_mov):
16022         Emit mov rather than orr.
16023
16024 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
16025
16026         * config/aarch64/aarch64-simd.md (aarch64_simd_dup):
16027         Swap alternatives, make integer dup more expensive.
16028
16029 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
16030
16031         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
16032         Return true for non-tls symbols.
16033
16034 2017-06-21  James Greenhalgh  <james.greenhalgh@arm.com>
16035
16036         * config/aarch64/aarch64-cores.def (cortex-a55): New.
16037         (cortex-a75): Likewise.
16038         (cortex-a75.cortex-a55): Likewise.
16039         * config/aarch64/aarch64-tune.md: Regenerate.
16040         * doc/invoke.texi (-mtune): Document new values for -mtune.
16041
16042 2017-06-21  Tom de Vries  <tom@codesourcery.com>
16043
16044         * doc/sourcebuild.texi (Add Options, Features for dg-add-options): Add
16045         stack_size feature.
16046         (Effective-Target Keywords, Other attributes): Suggest using
16047         dg-add-options stack_size feature to get stack limit in stack_size
16048         effective target documentation.
16049
16050 2017-06-21  Julian Brown  <julian@codesourcery.com>
16051             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
16052
16053         * config/aarch64/aarch64-simd.md (aarch64_crypto_pmulldi)
16054         (aarch64_crypto_pmullv2di): Change type attribute to crypto_pmull.
16055         * config/aarch64/thunderx2t99.md (thunderx2t99_pmull): New
16056         reservation.
16057         * config/arm/cortex-a53.md (cortex_a53_advsimd_type): Add crypto_pmull to
16058         attribute type list for neon_multiply.
16059         * config/arm/cortex-a57.md (cortex_a57_neon_type): Add crypto_pmull to
16060         attribute type list for neon_multiply.
16061         * config/arm/crypto.md (crypto_vmullp64): Change type to crypto_pmull.
16062         * config/arm/exynos-m1.md (exynos_m1_neon_type): Add crypto_pmull to
16063         attribute type list for neon_multiply.
16064         * config/arm/types.md (crypto_pmull): Add.
16065         * config/arm/xgene1.md (xgene1_neon_pmull): Add crypto_pmull to
16066         attribute type list.
16067
16068 2017-06-20  Andreas Tobler  <andreast@gcc.gnu.org>
16069
16070         * config.gcc (armv6*-*-freebsd*): Change the target_cpu_cname to
16071         arm1176jzf-s.
16072
16073 2017-06-20  Jakub Jelinek  <jakub@redhat.com>
16074
16075         * ira-costs.c (find_costs_and_classes): Initialize cost_classes later
16076         to make sure not to dereference a NULL cost_classes_ptr pointer.
16077
16078 2017-06-20  Carl Love  <cel@us.ibm.com>
16079
16080         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
16081         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
16082         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
16083         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
16084         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
16085         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
16086         VMULOSW): New enum "unspec" values.
16087         (vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
16088         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
16089         altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
16090         altivec_vmulosw): New patterns.
16091         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
16092         VMULOSW): Add definitions.
16093
16094 2017-06-20  Julia Koval  <julia.koval@intel.com>
16095
16096         * config/i386/i386.c: Fix rounding expand for new pattern.
16097         * config/i386/subst.md: Fix pattern (parallel -> unspec).
16098
16099 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
16100
16101         * config/aarch64/aarch64-option-extensions.def (rcpc): New.
16102         * config/aarch64/aarch64.h (AARCH64_FL_RCPC): New.
16103
16104 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
16105
16106         * config/aarch64/aarch64-option-extensions.def (fp16): Fix expected
16107         feature string.
16108
16109 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
16110
16111         * config/aarch64/aarch64-cores.def: Rearrange to sort by
16112         architecture, then by implementer ID.
16113         * config/aarch64/aarch64-tune.md: Regenerate.
16114
16115 2017-06-20  Richard Biener  <rguenther@suse.de>
16116
16117         PR middle-end/81097
16118         * fold-const.c (split_tree): Fold to type before negating.
16119
16120 2017-06-20  David Malcolm  <dmalcolm@redhat.com>
16121
16122         * diagnostic-show-locus.c
16123         (selftest::test_fixit_deletion_affecting_newline): New function.
16124         (selftest::diagnostic_show_locus_c_tests): Call it.
16125
16126 2017-06-20  Andreas Schwab  <schwab@suse.de>
16127
16128         PR target/80970
16129         * config/m68k/m68k.md (bsetdreg, bchgdreg, bclrdreg): Use "=d"
16130         instead of "+d".
16131
16132 2017-06-20  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
16133
16134         * config/arm/arm-c.c (arm_cpu_builtins): New block to define
16135         __ARM_FEATURE_COPROC according to support.
16136
16137 2017-06-20  Jakub Jelinek  <jakub@redhat.com>
16138
16139         * tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
16140         Rewritten to avoid overflow for > 32-bit pointers.
16141
16142         PR sanitizer/81125
16143         * ubsan.h (ubsan_encode_value): Workaround buggy clang++ parser
16144         by removing enum keyword.
16145         (ubsan_type_descriptor): Likewise.  Formatting fix.
16146
16147         PR target/81121
16148         * config/i386/i386.md (TARGET_USE_VECTOR_CONVERTS float si->{sf,df}
16149         splitter): Require TARGET_SSE2 in the condition.
16150
16151 2017-06-20  Michael Meissner  <meissner@linux.vnet.ibm.com>
16152
16153         PR target/79799
16154         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Add support
16155         for doing vector set of SFmode on ISA 3.0.
16156         * config/rs6000/vsx.md (vsx_set_v4sf_p9): Likewise.
16157         (vsx_set_v4sf_p9_zero): Special case setting 0.0f to a V4SF
16158         element.
16159         (vsx_insert_extract_v4sf_p9): Add an optimization for inserting a
16160         SFmode value into a V4SF variable that was extracted from another
16161         V4SF variable without converting the element to double precision
16162         and back to single precision vector format.
16163         (vsx_insert_extract_v4sf_p9_2): Likewise.
16164
16165 2017-06-19  Jakub Jelinek  <jakub@redhat.com>
16166
16167         * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Multiply
16168         in UWHI to avoid undefined overflow.
16169
16170         PR sanitizer/81125
16171         * ubsan.h (enum ubsan_encode_value_phase): New.
16172         (ubsan_encode_value): Change second argument to
16173         enum ubsan_encode_value_phase with default value of
16174         UBSAN_ENCODE_VALUE_GENERIC.
16175         * ubsan.c (ubsan_encode_value): Change second argument to
16176         enum ubsan_encode_value_phase PHASE from bool IN_EXPAND_P,
16177         adjust uses, for UBSAN_ENCODE_VALUE_GENERIC use just
16178         create_tmp_var_raw instead of create_tmp_var and use a
16179         TARGET_EXPR.
16180         (ubsan_expand_bounds_ifn, ubsan_build_overflow_builtin,
16181         instrument_bool_enum_load, ubsan_instrument_float_cast): Adjust
16182         ubsan_encode_value callers.
16183
16184         PR sanitizer/81111
16185         * ubsan.c (ubsan_encode_value): If current_function_decl is NULL,
16186         use create_tmp_var_raw instead of create_tmp_var, mark it addressable
16187         just by setting TREE_ADDRESSABLE on the result and use a TARGET_EXPR.
16188
16189 2017-06-19  Richard Biener  <rguenther@suse.de>
16190
16191         PR middle-end/81118
16192         * tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Clear niter
16193         estimates if we changed anything.
16194
16195 2017-06-19  Richard Biener  <rguenther@suse.de>
16196
16197         PR tree-optimization/80887
16198         * tree-ssa-sccvn.c (mprts_hook_cnt): New global.
16199         (vn_lookup_simplify_result): Allow only mprts_hook_cnt succesful
16200         simplified lookups, then reset mprts_hook.
16201         (vn_nary_build_or_lookup_1): Set mprts_hook_cnt to 9 before
16202         simplifying.
16203         (try_to_simplify): Likewise.
16204
16205 2017-06-19  Martin Liska  <mliska@suse.cz>
16206
16207         PR sanitizer/80879
16208         * gimplify.c (gimplify_switch_expr):
16209         Initialize live_switch_vars for SWITCH_BODY == STATEMENT_LIST.
16210
16211 2017-06-19  Martin Liska  <mliska@suse.cz>
16212
16213         * doc/install.texi: Document that PGO runs in 4 stages.
16214
16215 2017-06-19  Martin Liska  <mliska@suse.cz>
16216
16217         PR ipa/80732
16218         * attribs.c (make_dispatcher_decl): Do not append '.ifunc'
16219         to dispatcher function name.
16220         * multiple_target.c (replace_function_decl): New function.
16221         (create_dispatcher_calls): Redirect both edges and references.
16222
16223 2017-06-19  Jan Hubicka <hubicka@ucw.cz>
16224
16225         * profile-count.c (profile_count::dump): Dump quality.
16226         (profile_count::differs_from_p): Update for unsigned val.
16227         * profile-count.h (profile_count_quality): New enum.
16228         (profile_count): Turn m_val to 62bit unsigned, add quality tracking.
16229
16230 2017-06-19  Richard Biener  <rguenther@suse.de>
16231
16232         * tree-ssa-loop-niter.h (estimate_numbers_of_iterations): Take
16233         struct function as arg.
16234         (estimate_numbers_of_iterations): Export overload with loop arg.
16235         (free_numbers_of_iterations_estimates_loop): Use an overload of
16236         free_numbers_of_iterations_estimates instead.
16237         * tree-cfg.c (remove_bb): Adjust.
16238         * tree-cfgcleanup.c (remove_forwarder_block_with_phi): Likewise.
16239         * tree-parloops.c (gen_parallel_loop): Likewise.
16240         * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables):
16241         Likewise.
16242         (tree_unroll_loops_completely): Likewise.
16243         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop):
16244         Use an overload instead and export.
16245         (estimated_loop_iterations): Adjust.
16246         (max_loop_iterations): Likewise.
16247         (likely_max_loop_iterations): Likewise.
16248         (estimate_numbers_of_iterations): Take struct function as arg
16249         and adjust.
16250         (loop_exits_before_overflow): Adjust.
16251         (free_numbers_of_iterations_estimates_loop): Use an overload.
16252         * tree-vect-loop.c (vect_analyze_loop_form): Adjust.
16253         * tree-vectorizer.c (vect_free_loop_info_assumptions): Likewise.
16254
16255 2017-06-19  Richard Biener  <rguenther@suse.de>
16256
16257         PR ipa/81112
16258         * ipa-prop.c (find_constructor_constant_at_offset): Handle
16259         RANGE_EXPR conservatively.
16260
16261 2017-06-16  Carl Love  <cel@us.ibm.com>
16262
16263         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
16264         definitions for vec_float, vec_float2, vec_floato,
16265         vec_floate built-ins.
16266         * config/rs6000/vsx.md (define_c_enum "unspec"): Add RTL code
16267         for instructions vsx_xvcvsxws vsx_xvcvuxwsp, float2, floato and
16268         floate.
16269         * config/rs6000/rs6000-builtin.def (FLOAT2_V2DI, FLOATE_V2DF,
16270         FLOATE_2DI, FLOATO_V2DF, FLOATEE_V2DI, XVCVSXWSP_V4SF,
16271         UNS_FLOATO_V2DI, UNS_FLOATE_V2DI): Add definitions.
16272         * config/altivec.md (define_insn "p8_vmrgew_<mode>",
16273         define_mode_attr VF_sxddp): Add V4SF type to p8_vmrgew.
16274         * config/rs6000/altivec.h (vec_float, vec_float2, vec_floate,
16275         vec_floato): Add builtin defines.
16276         * doc/extend.texi (vec_float, vec_float2, vec_floate, vec_floato):
16277         Update the built-in documentation file for the new built-in
16278         functions.
16279
16280 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16281
16282         * config/arm/arm.opt (marm): Mark as the negative of of -mthumb.
16283         (mthumb): Mark as the negative of -marm.
16284
16285 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16286
16287         * doc/invoke.texi (ARM Options, -mcpu): Document supported
16288         extension options.
16289         (ARM Options, -mtune): Document that this accepts the same
16290         extension options as -mcpu.
16291         (ARM Options, -mfpu): Document addition of -mfpu=auto.
16292
16293 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16294
16295         * doc/invoke.texi (ARM Options, -march=): Document new syntax and
16296         permitted extensions.
16297
16298 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16299
16300         * config/arm/arm-cpus.in (armv7): Add extension +nofp.
16301         (armv7-r): Add aliases vfpv3xd and vfpv3-d16.
16302         (armv8-m.main): Add option +nodsp.
16303         * config/arm/arm-cpu-cdata.h: Regenerated.
16304
16305 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16306
16307         * config/arm/t-fuchsia: New file.
16308         * config.gcc (arm*-*-fuchsia*): Use it.
16309
16310 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16311
16312         * config/arm/t-symbian: Rewrite for new option infrastructure.
16313
16314 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16315
16316         * config/arm/t-phoenix (MULTILIB_REUSE): Clear variable.
16317         (MULTILIB_REQUIRED): Likewise.
16318
16319 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16320
16321         * config/arm/t-linux-eabi (MULTILIB_EXCEPTIONS): Set to empty.
16322         (MULTILIB_RESUE): Likewise.
16323         (MULTILIB_MATCHES): Likewise.
16324         (MULTLIB_REQUIRED): Likewise.
16325
16326 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16327
16328         * config/arm/t-rtems: Rewrite for new option framework.
16329
16330 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16331
16332         * config/arm/t-aprofile (v7_a_nosimd_variants, v7_a_simd_variants)
16333         (v7ve_nosimd_variatns, v7ve_vfpv3_simd_variants)
16334         (v7ve_vfpv4_simd_variants, v8_a_nosimd_variants, v8_a_simd_variants)
16335         (v8_1_a_simd_variants, v8_2_a_simd_variants): Move to ...
16336         * config/arm/t-multilib: ... here.
16337         (MULTILIB_OPTIONS): Add armv7 and armv7+fp architectures.
16338         (MULTILIB_MATCHES): Use armv7 libraries for armv7-r.  Also use for
16339         armv7-a and armv8*-a when A-profile libraries have not been built.
16340         * config/arm/t-rmprofile: Rewrite.
16341
16342 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16343
16344         * genmultilib (multilib_reuse): Allow an explicit period to be escaped
16345         with a backslash.  Remove the backslash after substituting unescaped
16346         periods.
16347         * doc/fragments.texi (MULTILIB_REUSE): Document it.
16348
16349 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16350
16351         * config.gcc: (arm*-*-*): When building a-profile libraries, force
16352         the driver to pass through the default setting of -mfloat-abi.
16353         * common/config/arm/arm-common.c (arm_target_thumb_only): Return -marm
16354         rather than NULL.
16355         * config/arm/t-multilib (MULTILIB_REUSE): Initialize to empty.
16356         (all_feat_combs): New rule.
16357         (MULTILIB_OPTIONS): Use explicit ARM and Thumb directories.  Rework
16358         default libraries.
16359         * config/arm/t-aprofile: Rewrite.
16360
16361 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16362
16363         * config/arm/arm.h (FPUTYPE_AUTO): Define.
16364         * config/arm/arm.c (arm_option_override): Use FPUTYPE_AUTO if the
16365         fpu is not specified by the user/command-line.
16366         * config/arm/bpabi.h (FPUTYPE_DEFAULT): Delete.
16367         * config/arm/netbsd-elf.h (FPUTYPE_DEFAULT): Delete.
16368         * config/arm/linux-elf.h (FPUTYPE_DEFAULT): Delete.
16369         * config/arm/vxworks.h (FPUTYPE_DEFAULT): Delete.
16370         * common/config/arm/arm-common.c (arm_canon_arch_option): Use
16371         FPUTYPE_AUTO insted of FPUTYPE_DEFAULT.
16372
16373 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16374
16375         * config/arm/elf.h (MULTILIB_DEFAULTS): Delete.
16376         * config/arm/t-arm-elf: Rewritten.
16377
16378 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16379
16380         * config/arm/arm.h (TARGET_HARD_FLOAT): Also check that we
16381         have some floating-point instructions.
16382         (TARGET_SOFT_FLOAT): Define as inverse of TARGET_HARD_FLOAT.
16383         (TARGET_MAYBE_HARD_FLOAT): New macro.
16384         * config/arm/arm-builtins.c (arm_init_builtins): Use
16385         TARGET_MAYBE_HARD_FLOAT.
16386         * config/arm/arm.c (arm_option_override): Use TARGET_HARD_FLOAT_ABI.
16387
16388 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16389
16390         * common/config/arm/arm-common.c: Define INCLUDE_LIST.
16391         (configargs.h): Include it.
16392         (arm_print_hint_for_fpu_option): New function.
16393         (arm_parse_fpu_option): New function.
16394         (candidate_extension): New class.
16395         (arm_canon_for_multilib): New function.
16396         * config/arm/arm.h (CANON_ARCH_SPEC_FUNCTION): New macro.
16397         (EXTRA_SPEC_FUNCTIONS): Add CANON_ARCH_SPEC_FUNCTION.
16398         (ARCH_CANONICAL_SPECS): New macro.
16399         (DRIVER_SELF_SPECS): Add ARCH_CANONICAL_SPECS.
16400
16401 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16402
16403         * config.gcc (arm*-*-*): Ensure both target_cpu_cname and with_cpu
16404         are set after handling multilib fragments.  Set target_cpu_default2
16405         from with_cpu.
16406
16407 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16408
16409         * config.gcc (arm*-*-fucshia*): Set target_cpu_cname to the real
16410         cpu name.
16411         (arm*-*-*): Set target_cpu_default2 to a quoted string.
16412         * config/arm/parsecpu.awk (check_cpu): Validate any extension
16413         options.
16414         (check_arch): Likewise.
16415         * config/arm/arm.c (arm_configure_build_target): Handle
16416         TARGET_CPU_DEFAULT being a string constant.  Scan any feature
16417         options in the default.
16418
16419 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16420
16421         * config/arm/arm-protos.h (cpu_arch_extension): Add field to record
16422         when an option is an alias of another.
16423         * config/arm/parsecpu.awk (optalias): New parser token.
16424         (gen_comm_data): Mark non-alias options as such.  Emit entries
16425         for extension aliases.
16426         * config/arm/arm-cpus.in (armv5e): Make vfpv2 an alias.
16427         (armv5te, armv5tej, armv6, armv6j, armv6k, armv6z): Likewise.
16428         (armv6kz, armv6zk, armv6t2): Likewise.
16429         (armv7): Make vfpv3-d16 an alias.
16430         (armv7-a): Make vfpv3-d16, neon and neon-vfpv3 aliases.  Sort in
16431         canonical order.
16432         (armv7ve): Make vfpv4-d16, neon-vfpv3 and neon-vfpv4 aliases.
16433         Sort in canonical order.
16434         (armv8-a): Sort in canonical order.
16435         (armv8.1-a, armv8.2-a):  Likewise.
16436         (generic-armv7-a): Make neon and neon-vfpv3 aliases.  Sort in
16437         canonical order.
16438         (cortex-a9): Sort in canonical order.
16439         * config/arm/arm.c (selftests.h): Include it.
16440         (arm_test_cpu_arch_data): New function.
16441         (arm_run_self_tests): New function.
16442         (TARGET_RUN_TARGET_SELFTESTS): Redefine.
16443         (targetm): Move declaration to the end of the file.
16444         * arm-cpu-cdata.h: Regenerated.
16445
16446 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16447
16448         * config/arm/arm.h (TARGET_MODE_SPECS): Add additional parameter to
16449         call to target_mode_check describing the type of option passed.
16450         * common/config/arm/arm-common.c (arm_arch_core_flag): Delete.
16451         (arm_target_thumb_only): Use arm_parse_arch_option_name or
16452         arm_parse_cpu_option_name to match parameters against list of
16453         available targets.
16454         * config/arm/parsecpu.awk (gen_comm_data): Don't generate
16455         arm_arch_core_flags data structure.
16456         * config/arm/arm-cpu_cdata.h: Regenerated.
16457
16458 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16459
16460         * common/config/arm/arm-common.c (arm_initialize_isa): Moved here from
16461         config/arm/arm.c.
16462         (arm_print_hint_for_cpu_option): Likewise.
16463         (arm_print_hint_for_arch_option): Likewise.
16464         (arm_parse_cpu_option_name): Likewise.
16465         (arm_parse_arch_option_name): Likewise.
16466         * config/arm/arm.c (arm_identify_fpu_from_isa): Use the computed number
16467         of entries in the all_fpus list.
16468         * config/arm/arm-protos.h (all_architectures, all_cores): Declare.
16469         (arm_parse_cpu_option_name): Declare.
16470         (arm_parse_arch_option_name): Declare.
16471         (arm_parse_option_features): Declare.
16472         (arm_intialize_isa): Declare.
16473         * config/arm/parsecpu.awk (gen_data): Move CPU and architecture
16474         data tables to ...
16475         (gen_comm_data): ... here.  Make definitions non-static.
16476         * config/arm/arm-cpu-data.h: Regenerated.
16477         * config/arm/arm-cpu-cdata.h: Regenerated.
16478
16479 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16480
16481         * config/arm/arm-protos.h (arm_build_target): Remove arch_core.
16482         (cpu_arch_extension): New structure.
16483         (cpu_arch_option, arch_option, cpu_option): New structures.
16484         * config/arm/parsecpu.awk (gen_headers): Build an enumeration of
16485         architecture types.
16486         (gen_data): Generate new format data tables.
16487         * config/arm/arm.c (cpu_tune): New structure.
16488         (cpu_option, processors): Delete.
16489         (arm_print_hint_for_core_or_arch): Delete.  Replace with ...
16490         (arm_print_hint_for_cpu_option): ... this and ...
16491         (arm_print_hint_for_arch_option): ... this.
16492         (arm_parse_arch_cpu_name): Delete.  Replace with ...
16493         (arm_parse_cpu_option_name): ... this and ...
16494         (arm_parse_arch_option_name): ... this.
16495         (arm_unrecognized_feature): Change type of target parameter to
16496         cpu_arch_option.
16497         (arm_parse_arch_cpu_features): Delete.  Replace with ...
16498         (arm_parse_option_features): ... this.
16499         (arm_configure_build_target): Rework to use new configuration data
16500         tables.
16501         (arm_print_tune_info): Rework for new configuration data tables.
16502         * config/arm/arm-cpu-data.h: Regenerated.
16503         * config/arm/arm-cpu.h: Regenerated.
16504
16505 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16506
16507         * Makefile.in (OBJS): Move sbitmap.o from here ...
16508         (OBJS-libcommon): ... to here.
16509
16510 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16511
16512         * config/arm/arm-isa.h (ISA_ALL_FPU_INTERNAL): Renamed from ISA_ALL_FPU.
16513         (ISA_ALL_CRYPTO): New macro.
16514         (ISA_ALL_SIMD): New macro
16515         (ISA_ALL_FP): New macro.
16516         * config/arm/arm.c (fpu_bitlist): Update initializer.
16517         * config/arm/arm-cpus.in: Use new ISA_ALL macros to disable crypto,
16518         simd or fp.
16519         (arm9e): Add fpu.  Add option for nofp
16520         (arm946e-s, arm966e-s, arm968e-s, arm10e, arm1020e, arm1022e): Likewise.
16521         (arm926ej-s, arm1026ej-s): Likewise.
16522         (generic-armv7-a): Add fpu.  Add options for simd, vfpv3, vfpv3-d16,
16523         vfpv3-fp16, vfpv3-d16-fp16, vfpv4, vfpv4-d16, neon, neon-vfp3,
16524         neon-fp16, neon-vfpv4, nofp and nosimd.
16525         (cortex-a5, cortex-a7): Add fpu.  Add options for nosimd and nofp.
16526         (cortex-a8): Add fpu.  Add option for nofp.
16527         (cortex-a9): Add fpu.  Add options for nosimd and nofp.
16528         (cortex-a12, cortex-a15, cortex-a17): Add fpu.  Add option for nofp.
16529         (cortex-r4f): Add fpu.
16530         (cortex-r5): Add fpu.  Add options for nofp.dp and nofp.
16531         (cortex-r7): Use idiv option from architecture.  Add fpu.  Add option
16532         for nofp.
16533         (cortex-r8): Likewise.
16534         (cortex-m4): Add fpu.  Add option for nofp.
16535         (cortex-a15.cortex-a7): Add fpu.  Add option for nofp.
16536         (cortex-a17.cortex-a7): Likewise.
16537         (cortex-a32): Add fpu.  Add options for crypto and nofp.
16538         (cortex-a35, cortex-a53): Likewise.
16539         (cortex-a57): Add fpu.  Add option for crypto.
16540         (cortex-a72, cortex-a73): Likewise.
16541         (exynos-m1): Likewise.
16542         (cortex-a57.cortex-a53, cortex-a72.cortex-a53): Likewise.
16543         (cortex-a73.cortex-a35, cortex-a73.cortex-a53): Likewise.
16544         (cortex-m33): Add fpu.  Add option for nofp.
16545         * config/arm/arm-cpu-cdata.h: Regenerated
16546         * config/arm/arm-cpu-data.h: Regenerated.
16547
16548 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16549
16550         * arm-cpus.in (armv5e): Add options fp, vfpv2 and nofp.
16551         (armv5te, armv5tej): Likewise.
16552         (armv6, armv6j, armv6k, armv6z, armv6kz, armv6zk, armv6t2): Likewise.
16553         (armv7): Add options fp and vfpv3-d16.
16554         (armv7-a): Add options fp, simd, vfpv3, vfpv3-d16, vfpv3-d16-fp16,
16555         vfpv3-fp16, vfpv4, vfpv4-d16, neon, neon-vfpv3, neon-fp16, neon-vfpv4,
16556         nofp and nosimd.
16557         (armv7ve): Likewise.
16558         (armv7-r): Add options fp, fp.sp, idiv, nofp and noidiv.
16559         (armv7e-m): Add options fp, fpv5, fp.dp and nofp.
16560         (armv8-a): Add nocrypto option.
16561         (armv8.1-a, armv8.2-a): Likewise.
16562         (armv8-m.main): add options fp, fp.dp and nofp.
16563
16564 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16565
16566         * config/arm/arm-cpus.in (armv8-a): Add options crc, simd crypto and
16567         nofp.
16568         (armv8-a+crc): Delete.
16569         (armv8.1-a): Add options simd, crypto and nofp.
16570         (armv8.2-a): Add options fp16, simd, crypto and nofp.
16571         (armv8.2-a+fp16): Delete.
16572         (armv8-m.main): Add option dsp.
16573         (armv8-m.main+dsp): Delete.
16574         (cortex-a8): Add fpu.  Add nofp option.
16575         (cortex-a9): Add fpu.  Add nofp and nosimd options.
16576         * config/arm/parsecpu.awk (gen_data): Generate option tables and
16577         link to main cpu and architecture data structures.
16578         (gen_comm_data): Only put isa attributes from the main architecture
16579         in common tables.
16580         (option): New statement for architecture and CPU entries.
16581         * arm.c (struct cpu_option): New structure.
16582         (struct processors): Add entry for options.
16583         (arm_unrecognized_feature): New function.
16584         (arm_parse_arch_cpu_name): Ignore any characters after the first
16585         '+' character.
16586         (arm_parse_arch_cpu_feature): New function.
16587         (arm_configure_build_target): Separate out any CPU and architecture
16588         features and parse separately.  Don't error out if -mfpu=auto is
16589         used with only an architecture string.
16590         (arm_print_asm_arch_directives): New function.
16591         (arm_file_start): Call it.
16592         * config/arm/arm-cpu-cdata.h: Regenerated.
16593         * config/arm/arm-cpu-data.h: Likewise.
16594         * config/arm/arm-tables.opt: Likewise.
16595
16596 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16597
16598         * config/arm/elf.h (ASM_SPEC): Only pass -mfpu through to the
16599         assembler when it is not -mfpu=auto.
16600
16601 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16602
16603         * config/arm/arm.h (BIG_LITTLE_SPEC): Delete macro.
16604         (ASM_REWRITE_SPEC_FUNCTIONS): New macro.
16605         (BIG_LITTLE_CPU_SPEC_FUNCTIONS): Delete macro.
16606         (ASM_CPU_SPEC): Rewrite.
16607         (MCPU_MTUNE_NATIVE_FUNCTIONS): New macro.
16608         (EXTRA_SPEC_FUNCTIONS): Move outside of ifdef.  Use
16609         MCPU_MTUNE_NATIVE_FUNCTIONS and ASM_REWRITE_SPEC_FUNCTIONS.  Remove
16610         reference to BIG_LITTLE_CPU_SPEC_FUNCTIONS.
16611         * common/config/arm/arm-common.c (arm_rewrite_selected_cpu): Ensure
16612         copied string is NUL-terminated.  Also strip any characters prefixed
16613         by '+'.
16614         (arm_rewrite_selected_arch): New function.
16615         (arm_rewrite_march): New function.
16616
16617 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16618
16619         * config/arm/arm.opt (x_arm_arch_string): New TargetSave option.
16620         (x_arm_cpu_string, x_arm_tune_string): Likewise.
16621         (march, mcpu, mtune): Convert to string-based options.
16622         * config/arm/arm.c (arm_print_hint_for_core_or_arch): New function.
16623         (arm_parse_arch_cpu_name): New function.
16624         (arm_configure_build_target): Use arm_parse_arch_cpu_name to
16625         identify selected architecture or CPU.
16626         (arm_option_save): New function.
16627         (TARGET_OPTION_SAVE): Redefine.
16628         (arm_option_restore): Restore string options.
16629         (arm_option_print): Print string options.
16630
16631 2017-06-16  Martin Sebor  <msebor@redhat.com>
16632
16633         PR tree-optimization/80933
16634         PR tree-optimization/80934
16635         * builtins.c (fold_builtin_3): Do not handle bcmp here.
16636         * gimple-fold.c (gimple_fold_builtin_bcmp): New function.
16637         (gimple_fold_builtin_bcopy, gimple_fold_builtin_bzero): Likewise.
16638         (gimple_fold_builtin): Call them.
16639
16640 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
16641
16642         * gimple-ssa-isolate-paths.c (isolate_path): Set edge leading to path
16643         as unlikely; update profile.
16644
16645 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
16646
16647         * predict.c (force_edge_cold): Handle declaring edges impossible
16648         more aggresively.
16649
16650 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
16651
16652         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update
16653         profile.
16654         (try_unroll_loop_completely): Fix reporting.
16655
16656 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
16657
16658         * tree-ssa-tail-merge.c (replace_block_by): Fix profile updating.
16659
16660 2017-06-16  James Greenhalgh  <james.greenhalgh@arm.com>
16661
16662         PR target/71778
16663         * config/arm/arm-builtins.c (arm_expand_builtin_args): Return TARGET
16664         if given a non-constant argument for an intrinsic which requires a
16665         constant.
16666
16667 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
16668
16669         * profile.c (compare_freqs): New function.
16670         (branch_prob): Sort edge list.
16671         (find_spanning_tree): Assume that the list is priority sorted.
16672
16673 2017-06-16  Richard Biener  <rguenther@suse.de>
16674
16675         PR tree-optimization/81090
16676         * passes.def (pass_record_bounds): Remove.
16677         * tree-pass.h (make_pass_record_bounds): Likewise.
16678         * tree-ssa-loop.c (pass_data_record_bounds, pass_record_bounds,
16679         make_pass_record_bounds): Likewise.
16680         * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables): Do
16681         not free niter estimates at the beginning but at the end.
16682         * tree-scalar-evolution.c (scev_finalize): Free niter estimates.
16683
16684 2017-06-16  Richard Biener  <rguenther@suse.de>
16685
16686         * tree-switch-conversion.c (emit_case_bit_tests): Adjust
16687         initializer to workaround ICE in host GCC 4.8.
16688
16689 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
16690
16691         * ipa-inline-transform.c (update_noncloned_frequencies): Update also
16692         counts.
16693         (clone_inlined_nodes): Update.
16694
16695 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
16696
16697         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune): Update
16698         prefetch settings, and enable prefetching by default at -O3.
16699
16700 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
16701
16702         * config/aarch64/aarch64.c (aarch64_override_options_internal):
16703         Set flag_prefetch_loop_arrays according to tuning data.
16704
16705 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
16706
16707         * config/aarch64/aarch64-protos.h (struct cpu_prefetch_tune):
16708         New tune structure.
16709         (struct tune_params): Use cpu_prefetch_tune instead of cache_line_size.
16710         [Unrelated to main purpose of the patch] Place the pointer field last
16711         to enable type checking errors when tune structure are wrongly merged.
16712         * config/aarch64/aarch64.c (generic_prefetch_tune,)
16713         (exynosm1_prefetch_tune, qdf24xx_prefetch_tune,)
16714         (thunderx2t99_prefetch_tune): New tune constants.
16715         (tune_params *_tunings): Update all tunings (no functional change).
16716         (aarch64_override_options_internal): Set PARAM_SIMULTANEOUS_PREFETCHES,
16717         PARAM_L1_CACHE_SIZE, PARAM_L1_CACHE_LINE_SIZE, and PARAM_L2_CACHE_SIZE
16718         from tunings structures.
16719
16720 2017-06-16  Jakub Jelinek  <jakub@redhat.com>
16721
16722         PR sanitizer/81094
16723         * ubsan.c (instrument_null): Add T argument, use it instead
16724         of computing it based on IS_LHS.
16725         (instrument_object_size): Likewise.
16726         (pass_ubsan::execute): Adjust instrument_null and
16727         instrument_object_size callers to pass gimple_get_lhs or
16728         gimple_assign_rhs1 result to it.  Use instrument_null instead of
16729         calling get_base_address and instrument_mem_ref.  Handle
16730         aggregate call arguments for object-size sanitization.
16731
16732 2017-06-16  Yury Gribov  <tetra2005@gmail.com>
16733
16734         PR tree-optimization/81089
16735         * tree-vrp.c (is_masked_range_test): Validate operands of
16736         subexpression.
16737
16738 2017-06-15  Martin Sebor  <msebor@redhat.com>
16739
16740         PR c++/80560
16741         * dumpfile.c (dump_register): Avoid calling memset to initialize
16742         a class with a default ctor.
16743         * gcc.c (struct compiler): Remove const qualification.
16744         * genattrtab.c (gen_insn_reserv): Replace memset with initialization.
16745         * hash-table.h: Ditto.
16746         * ipa-cp.c (allocate_and_init_ipcp_value): Replace memset with
16747           assignment.
16748         * ipa-prop.c (ipa_free_edge_args_substructures): Ditto.
16749         * omp-low.c (lower_omp_ordered_clauses): Replace memset with
16750         default ctor.
16751         * params.h (struct param_info): Make struct members non-const.
16752         * tree-switch-conversion.c (emit_case_bit_tests): Replace memset
16753         with default initialization.
16754         * vec.h (vec_copy_construct, vec_default_construct): New helper
16755         functions.
16756         (vec<T>::copy, vec<T>::splice, vec<T>::reserve): Replace memcpy
16757         with vec_copy_construct.
16758         (vect<T>::quick_grow_cleared): Replace memset with default ctor.
16759         (vect<T>::vec_safe_grow_cleared, vec_safe_grow_cleared): Same.
16760         * doc/invoke.texi (-Wclass-memaccess): Document.
16761
16762 2017-06-15  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
16763
16764         * emit-rtl.h (is_leaf): Update comment about local
16765         register allocator.
16766
16767 2017-06-15  Jozef Lawrynowicz   <jozef.l@somniumtech.com>
16768
16769         PR target/78818
16770         * config/msp430/msp430.c (msp430_data_attr): Check that it's possible
16771         for a variable to have a section before checking if the section has a
16772         name.
16773         Set section to.persistent if persistent attribute is set.
16774         Warn if .persistent attribute is used on an automatic variable.
16775
16776 2017-06-15  Eric Botcazou  <ebotcazou@adacore.com>
16777
16778         PR rtl-optimization/80474
16779         * reorg.c (update_block): Do not ignore instructions in a delay slot.
16780
16781 2017-06-15  Segher Boessenkool  <segher@kernel.crashing.org>
16782
16783         * config/rs6000/rs6000.md (add<mode>3): Use reg_or_subregno instead
16784         of REGNO.
16785
16786 2017-06-14  Maciej W. Rozycki  <macro@imgtec.com>
16787
16788         * config/mips/mips.md (MIPS16_T_REGNUM): Remove constant.
16789         (casesi): Emit bounds checking as RTL.
16790         (casesi_internal_mips16_<mode>): Remove bounds checking.
16791
16792 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
16793
16794         * config/xtensa/xtensa.c (xtensa_option_override): Append
16795         MASK_CONST16 to target_flags in the absence of TARGET_L32R.
16796         (hwloop_optimize, hwloop_fail, hwloop_pattern_reg,
16797          xtensa_doloop_hooks): Define unconditionally.
16798         (xtensa_reorg_loops): Only call reorg_loops in the presence of
16799         TARGET_LOOPS.
16800         * config/xtensa/xtensa.h (TARGET_L32R): New definition.
16801         (TARGET_DEFAULT): Remove XCHAL_HAVE_L32R condition and account
16802         for it in xtensa_option_override.
16803         (HARD_FRAME_POINTER_IS_FRAME_POINTER,
16804          HARD_FRAME_POINTER_IS_ARG_POINTER): New definitions.
16805
16806 2017-06-14  Boris Kolpackov  <boris@codesynthesis.com>
16807
16808         * doc/cppopts.texi: Document '-' special value to -MF.
16809
16810 2017-06-14  Wilco Dijkstra  <wdijkstr@arm.com>
16811
16812         * config/arm/cortex-a53.md (cortex_a53_fpalu) Adjust latency.
16813         (cortex_a53_fconst): Likewise.
16814         (cortex_a53_fpmul): Likewise.
16815         (cortex_a53_f_load_64): Likewise.
16816         (cortex_a53_f_load_many): Likewise.
16817         (cortex_a53_advsimd_alu): Likewise.
16818         (cortex_a53_advsimd_alu_q): Likewise.
16819         (cortex_a53_advsimd_mul): Likewise.
16820         (cortex_a53_advsimd_mul_q): Likewise.
16821         (fpmac bypass): Add new bypass for fpmac-fpmac case.
16822         Add missing fmul, r2f_cvt and fconst cases.
16823
16824 2017-06-14  Richard Biener  <rguenther@suse.de>
16825
16826         PR middle-end/81088
16827         * fold-const.c (split_tree): Drop TREE_OVERFLOW flag from
16828         literal constants.
16829         (fold_binary_loc): When associating do not treat pre-existing
16830         TREE_OVERFLOW on literal constants as a reason to allow
16831         TREE_OVERFLOW on associated literal constants.
16832
16833 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
16834
16835         * config/sparc/sparc.h (MASK_ISA): Add MASK_LEON and MASK_LEON3.
16836         (MASK_FEATURES): New macro.
16837         * config/sparc/sparc.c (sparc_option_override): Remove the special
16838         handling of -mfpu and generalize it to all MASK_FEATURES switches.
16839
16840 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
16841
16842         * simplify-rtx.c (simplify_binary_operation_1) <UDIV>: Do not simplify
16843         a division of 0 if non-call exceptions are enabled.
16844
16845 2017-06-14  Andrew Pinski  <apinski@cavium.com>
16846             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
16847
16848         PR target/71663
16849         * config/aarch64/aarch64.c (aarch64_expand_vector_init):
16850         Improve vector initialization code gen for only variable case.
16851
16852 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
16853
16854         * config/sparc/driver-sparc.c (cpu_names): Add SPARC-T5 entry.
16855
16856 2017-06-14  Richard Biener  <rguenther@suse.de>
16857
16858         PR tree-optimization/81083
16859         * tree-ssa-sccvn.c (vn_reference_lookup_3): Do not use abnormals
16860         as values.
16861
16862 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16863
16864         * config/rs6000/rs6000.c: Update all comments that mentioned SPE.
16865         (rs6000_expand_builtin): Remove RS6000_BTC_EVSEL.
16866         * config/rs6000/rs6000.h (RS6000_BTC_EVSEL): Delete.
16867         * config/rs6000/vxworks.h (VXCPU_FOR_8548): Delete.  Adjust former use.
16868         * config/rs6000/vxworksae.h (VXCPU_FOR_8548): Delete.
16869         * config/rs6000/vxworksmils.h (VXCPU_FOR_8548): Delete.
16870
16871 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16872
16873         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete VECTOR_SPE.
16874         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete VECTOR_SPE.
16875
16876 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16877
16878         * config/rs6000/rs6000.h (FIXED_SCRATCH): Delete.
16879
16880 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16881
16882         * config/rs6000/t-rtems: Don't handle SPE.
16883
16884 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16885
16886         * config/rs6000/t-linux: Don't handle SPE.
16887
16888 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16889
16890         * config/rs6000/eabispe.h: Delete file.
16891
16892 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16893
16894         * config/rs6000/t-spe: Delete file.
16895
16896 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16897
16898         * config/rs6000/rs6000.c (SPE_CONST_OFFSET_OK): Delete.
16899         (rs6000_legitimate_offset_address_p): Return false for anything in
16900         V2SImode or V2SFmode.
16901
16902 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16903
16904         * config/rs6000/rs6000-modes.def: Remove all 8-byte vector modes
16905         except V2SF and V2SI.  Rearrange the vector modes, and add comments.
16906         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove V8QImode
16907         and V4HImode.
16908         (reg_offset_addressing_ok_p): Remove V4HImode and V1DImode.
16909         (rs6000_legitimate_offset_address_p): Ditto.
16910         (rs6000_emit_move): Ditto.
16911         (rs6000_init_builtins): Remove V4HI_type_node.
16912
16913 2017-06-13  Martin Liska  <mliska@suse.cz>
16914
16915         PR sanitize/78204
16916         * asan.c (asan_sanitize_stack_p): Use sanitize_flags_p.
16917         (gate_asan): Likewise.
16918         * asan.h (asan_no_sanitize_address_p): Remove the function.
16919         (sanitize_flags_p): New function.
16920         * builtins.def: Fix coding style.
16921         * common.opt: Use renamed enum value.
16922         * convert.c (convert_to_integer_1): Use sanitize_flags_p.
16923         * doc/extend.texi: Document no_sanitize attribute.
16924         * flag-types.h (enum sanitize_code): Rename SANITIZE_NONDEFAULT
16925         to SANITIZE_UNDEFINED_NONDEFAULT.
16926         * gcc.c (sanitize_spec_function): Use the renamed enum value.
16927         * gimple-fold.c (optimize_atomic_compare_exchange_p):
16928         Use sanitize_flags_p.
16929         * gimplify.c (gimplify_function_tree): Likewise.
16930         * ipa-inline.c (sanitize_attrs_match_for_inline_p): Likewise.
16931         * opts.c (parse_no_sanitize_attribute): New function.
16932         (common_handle_option): Use renamed enum value.
16933         * opts.h (parse_no_sanitize_attribute): Declare.
16934         * tree.c (sanitize_flags_p): New function.
16935         * tree.h: Declared here.
16936         * tsan.c: Use sanitize_flags_p.
16937         * ubsan.c (ubsan_expand_null_ifn): Likewise.
16938         (instrument_mem_ref): Likewise.
16939         (instrument_bool_enum_load): Likewise.
16940         (do_ubsan_in_current_function): Remove the function.
16941         (pass_ubsan::execute): Use sanitize_flags_p.
16942         * ubsan.h: Remove do_ubsan_in_current_function
16943         * tree-cfg.c (print_no_sanitize_attr_value): New function.
16944         (dump_function_to_file): Use it here.
16945
16946 2017-06-13  Martin Jambor  <mjambor@suse.cz>
16947
16948         PR tree-optimization/80803
16949         PR tree-optimization/81063
16950         * tree-sra.c (subtree_mark_written_and_enqueue): Move up in the file.
16951         (propagate_subaccesses_across_link): Enqueue subtree whenever
16952         necessary instead of relying on the caller.
16953
16954 2017-06-13  Martin Jambor  <mjambor@suse.cz>
16955
16956         * tree-sra.c (add_access_to_work_queue): Only enqueue accesses
16957         that have a first_link.
16958         (sort_and_splice_var_accesses): Do not check first_link before
16959         enquing.
16960         (subtree_mark_written_and_enqueue): Likewise.
16961         (propagate_all_subaccesses): Likewise and do not stop at first
16962         parent with a first_link.
16963
16964 2017-06-13  Martin Jambor  <mjambor@suse.cz>
16965
16966         * tree-sra.c (dump_access_tree_1): Fix accidental dumping to stderr
16967         instead of f.
16968
16969 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
16970
16971         * match.pd: New pattern.
16972
16973 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
16974
16975         * tree-vrp.c (is_masked_range_test): New function.
16976         (register_edge_assert_for): Determine ranges for
16977         some bit tests.
16978
16979 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
16980
16981         PR tree-optimization/67328
16982         * fold-const.c (maskable_range_p): New function.
16983         (build_range_check): Generate bittests if possible.
16984
16985 2017-06-13  Martin Liska  <mliska@suse.cz>
16986
16987         * gimple-pretty-print.c (dump_probability): Add new argument.
16988         (dump_edge_probability): Dump both probability and count.
16989         (dump_gimple_label): Likewise.
16990         (dump_gimple_bb_header): Likewise.
16991
16992 2017-06-13  Georg-Johann Lay  <avr@gjlay.de>
16993
16994         PR target/81072
16995         * config/avr/avr-devices.c: Fix indentation.
16996         * config/avr/gen-avr-mmcu-specs.c: Dito.
16997
16998 2017-06-13  Richard Biener  <rguenther@suse.de>
16999
17000         * tree-vect-loop.c (vect_model_reduction_cost): Do not fail,
17001         instead get vector type from stmt_info.
17002         (vectorizable_reduction): Adjust.  Remove dead code.
17003
17004 2017-06-13  Richard Biener  <rguenther@suse.de>
17005
17006         PR middle-end/81065
17007         * fold-const.c (extract_muldiv_1): Remove bogus distribution
17008         case of C * (x * C2 + C3).
17009         (fold_addr_of_array_ref_difference): Properly fold index difference.
17010
17011 2017-06-12  David S. Miller  <davem@davemloft.net>
17012
17013         PR target/80968
17014         * config/sparc/sparc.md (return expander): Emit frame blockage if
17015         function uses alloca.
17016
17017 2017-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
17018
17019         * combine.c (make_field_assignment): Check len rather than the mode
17020         precision when calling force_to_mode.
17021
17022 2017-06-12  Georg-Johann Lay  <avr@gjlay.de>
17023
17024         Support multilibs and devices that see flash in RAM address range.
17025
17026         PR target/81072
17027         * config/avr/avr-arch.h (avr_arch_id) <ARCH_AVRXMEGA3>: New enum.
17028         (avr_mcu_t) <flash_pm_offset>: New field.
17029         (avr_device_specific_features) <AVR_ISA_RCALL>: New enum.
17030         * config/avr/avr.h (AVR_SHORT_CALLS): New define.
17031         (AVR_HAVE_JMP_CALL): Don't set if AVR_SHORT_CALLS.
17032         (AVR_TINY_PM_OFFSET): Remove macro.
17033         * config/avr/avr.opt (-mshort-calls): New option.
17034         * config/avr/gen-avr-mmcu-specs.c (print_mcu)
17035         [*self_spec]: Add / remove -mshort-calls depending on AVR_ISA_RCALL.
17036         * config/avr/avr-c.c (avr_cpu_cpp_builtins)
17037         <__AVR_SHORT_CALLS__>: Built-in define if AVR_SHORT_CALLS.
17038         <__AVR_HAVE_JMP_CALL__>: Use AVR_HAVE_JMP_CALL as condition
17039         instead of avr_arch->have_jmp_call.
17040         <__AVR_PM_BASE_ADDRESS__>: Built-in define if avr_arch->flash_pm_offset.
17041         [AVR_TINY] <__AVR_TINY_PM_BASE_ADDRESS__>: Use
17042         avr_arch->flash_pm_offset to define.
17043         * config/avr/avr-devices.c (avr_arch_types): Add initializers for
17044         new field flash_pm_offset.  Add entry for avrxmega3.
17045         (avr_texinfo): Add entry for avrxmega3.
17046         * config/avr/avr-mcus.def: Add entries for: avrxmega3,
17047         attiny212, attiny214,
17048         attiny412, attiny414, attiny416, attiny417,
17049         attiny814, attiny816, attiny817,
17050         attiny1614, attiny1616, attiny1617,
17051         attiny3214, attiny3216, attiny3217.
17052         * config/avr/avr.c (avr_assemble_integer)[AVR_TINY]: Use
17053         avr_arch->flash_pm_offset instead of AVR_TINY_PM_OFFSET.
17054         (avr_print_operand_address) [AVR_TINY]: Same.
17055         (avr_asm_init_sections) <readonly_data_section>: Only patch
17056         callback if avr_arch->flash_pm_offset = 0.
17057         (avr_asm_named_section) <avr_need_copy_data_p>: Skip setting it
17058         for rodata if avr_arch->flash_pm_offset != 0.
17059         (avr_encode_section_info) [AVR_TINY]: Adjust comment.
17060         * config/avr/genmultilib.awk (dir_rcall, opt_rcall): New vars.
17061         (opts) [AVR_ISA_RCALL]: Append opt_rcall.
17062         (m_options): Append opt_rcall.
17063         (m_dirnames): Append dir_rcall.
17064         * config/avr/t-multilib: Regenerate.
17065
17066         * configure.ac [target=avr]: Check whether avrxmega3 default
17067         linker description file works as needed.
17068         * configure: Regenerate.
17069         * doc/avr-mmcu.texi: Regenerate.
17070         * doc/invoke.texi (AVR Options) <-mshort-calls>: Document it.
17071         <__AVR_ARCH__>: Document avrxmega3 and 103.
17072         <__AVR_HAVE_JMP_CALL__>: Adjust documentation.
17073         <__AVR_SHORT_CALLS__>: Document it.
17074         <__AVR_PM_BASE_ADDRESS__>: Document it.
17075         * doc/extend.texi (AVR Options) <-mshort-calls>: Document it.
17076         (AVR Variable Attributes) <progmem>: Document this is
17077         not needed for avrxmega3.
17078         (AVR Named Address Spaces) <__flash>: Dito.
17079
17080 2017-06-12  Jan Hubicka  <hubicka@ucw.cz>
17081
17082         * cgraph.c (cgraph_node::dump): Complain about profile insanities.
17083
17084 2017-06-12  Doug Rupp  <rupp@adacore.com>
17085
17086         * config.gcc (*-*-vxworks*): Set use_gcc_stdint to "provide".
17087         Append vxworks-stdint.h to the tm_file list.
17088         * config/vxworks-stdint.h: New file.
17089
17090 2017-06-12  Martin Liska  <mliska@suse.cz>
17091
17092         PR tree-optimization/81041
17093         * tree-profile.c (gimple_gen_ic_func_profiler):
17094         Create an extra BB in profile-generate
17095         (gimple_gen_time_profiler): Likewise.
17096
17097 2017-06-12  Jakub Jelinek  <jakub@redhat.com>
17098
17099         PR tree-optimization/81003
17100         * tree-ssa-reassoc.c (force_into_ssa_name): New function.
17101         (update_range_test): Use it instead of force_gimple_operand_gsi.
17102
17103 2017-06-12  Richard Biener  <rguenther@suse.de>
17104
17105         PR tree-optimization/81053
17106         * tree-vect-loop.c (vect_is_simple_reduction): Handle PHI
17107         with backedge value not defined in loop.  Simplify def stmt
17108         compute.
17109
17110 2017-06-11  Tom de Vries  <tom@codesourcery.com>
17111
17112         PR target/79939
17113         * config/nvptx/nvptx.c (nvptx_cannot_force_const_mem): New function.
17114         Return true.
17115         (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to
17116         nvptx_cannot_force_const_mem.
17117
17118 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
17119
17120         * opts.c (finish_options): Move test for flag_split_stack after
17121         it has been initialized.
17122
17123 2017-06-11  Jason Merrill  <jason@redhat.com>
17124
17125         * tree.h (id_equal): New.
17126         * dwarf2out.c, hsa-gen.c, ipa-devirt.c, omp-expand.c,
17127         omp-simd-clone.c, read-rtl-function.c, tree-chkp.c, tree.c: Use it
17128         instead of strcmp of IDENTIFIER_POINTER.
17129
17130 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
17131
17132         * ipa-inline-transform.c: Include function.h, cfg.h and basic-block.h
17133         (mark_all_inlined_calls_cdtor): Fix formating.
17134         (inline_transform): Rescale profile before inlining.
17135
17136 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
17137
17138         * cgraph.h (cgraph_edge::clone): Update prototype.
17139         * cgraphclones.c (cgraph_edge::clone): Update profile scaling.
17140         (cgraph_node::create_clone): Update.
17141         (cgraph_node::create_version_clone): Update.
17142         * tree-inline.c (copy_bb): Update.
17143         (expand_call_inline): Update.
17144
17145 2017-06-10  Segher Boessenkool  <segher@kernel.crashing.org>
17146
17147         * config/rs6000/rs6000.c (emit_vrsave_prologue): New function,
17148         factored out from ...
17149         (rs6000_emit_prologue): ... here.
17150
17151 2017-06-10  Segher Boessenkool  <segher@kernel.crashing.org>
17152
17153         * config/rs6000/rs6000.c (emit_split_stack_prologue): New function,
17154         factored out from ...
17155         (rs6000_emit_prologue): ... here.
17156
17157 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
17158
17159         * predict.c (drop_profile): Also drop individual bb/edge and cgraph
17160         edge counts.
17161         (handle_missing_profiles): Fix computation of tp_first_run.
17162         (counts_to_freqs): Do not touch freqs when count is 0.
17163
17164 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
17165
17166         * cgraphbuild.c (cgraph_edge::rebuild_references): Do not touch
17167         profile.
17168
17169 2017-06-10  Tom de Vries  <tom@codesourcery.com>
17170
17171         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
17172         attributes): Document signal effective target.
17173
17174 2017-06-10  Tom de Vries  <tom@codesourcery.com>
17175
17176         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
17177         Document effective target stack_size.
17178
17179 2017-06-09  David Malcolm  <dmalcolm@redhat.com>
17180
17181         * diagnostic.c (diagnostic_report_diagnostic): Only add fixits
17182         to the edit_context if they can be auto-applied.
17183
17184 2017-06-9  Ian Lance Taylor  <iant@golang.org>
17185
17186         * opts.c (finish_options): If -fsplit-stack, disable implicit
17187         -forder-blocks-and-partition.
17188         * doc/invoke.texi (Optimize Options): Document that when using
17189         -fsplit-stack -forder-blocks-and-partition is not implicitly
17190         enabled.
17191
17192 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
17193
17194         * builtin-attrs.def (ATTR_NORETURN_NOTHROW_LEAF_COLD_LIST,
17195         ATTR_CONST_NORETURN_NOTHROW_LEAF_COLD_LIST,
17196         ATTR_TMPURE_NORETURN_NOTHROW_LEAF_COLD_LIST): New.
17197         * builtins.def (abort, trap, unreachable): Declare cold.
17198         * calls.c (flags_from_decl_or_type): Lookup ECF_COLD.
17199         * tree-core.h (ECF_COLD): New.
17200         * tree.c (set_call_expr_flags): Handle ECF_COLD.
17201         (build_common_builtin_nodes): Mark unreachable and abort as cold.
17202
17203 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
17204
17205         * predict.c (unlikely_executed_stmt_p): Cleanup.
17206
17207 2017-06-09  Richard Biener  <rguenther@suse.de>
17208
17209         * tree-ssa-loop-im.c (execute_sm): Do not force multi-threaded
17210         model if the ref is always written to.
17211
17212 2017-06-09  Tamar Christina  <tamar.christina@arm.com>
17213
17214         * config/aarch64/aarch64.md (lrint<GPF:mode><GPI:mode>2): New.
17215
17216 2017-06-09  Tamar Christina  <tamar.christina@arm.com>
17217
17218         * config/arm/arm.c (arm_rtx_costs_internal): Make sdiv more expensive
17219         than udiv.
17220
17221 2017-06-09  Tom de Vries  <tom@codesourcery.com>
17222
17223         PR target/80855
17224         * config/nvptx/nvptx.md (define_expand "mov<QHSDISDFM>"): Error out with
17225         "target cannot support label values" when encountering LABEL_REF.
17226
17227 2017-06-09  Martin Liska  <mliska@suse.cz>
17228
17229         * tree-profile.c (gimple_gen_ic_profiler): Update comment.
17230         (gimple_gen_ic_func_profiler): Emit direct comparison
17231         of __gcov_indirect_call_callee with NULL.
17232         (gimple_gen_time_profiler): Change probability from
17233         PROB_VERY_UNLIKELY to PROB_UNLIKELY.
17234
17235 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
17236
17237         * profile.c (edge_gcov_counts): Turn to pointer.
17238         (compute_branch_probabilities, compute_branch_probabilities): Update.
17239         (branch_prob): Do not clear edge_gcov_count.
17240         * profile.h (edge_gcov_counts): Turn to pointer.
17241         (edge_gcov_count): Update.
17242
17243 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
17244
17245         * gimple.h (gimple_check_failed): Mark cold.
17246
17247 2017-06-09  Richard Biener  <rguenther@suse.de>
17248
17249         PR tree-optimization/66623
17250         * tree-vect-loop.c (vect_is_simple_reduction): Cleanup,
17251         refactor check_reduction into two parts, properly computing
17252         whether we have to check reduction validity for outer loop
17253         vectorization.
17254
17255 2017-06-09  Richard Biener  <rguenther@suse.de>
17256
17257         PR tree-optimization/79483
17258         * graphite-scop-detection.c (order): New global.
17259         (get_order): Compute bb to order mapping that satisfies code
17260         generation constraints.
17261         (cmp_pbbs): New helper.
17262         (build_scops): Start domwalk at entry block, sort generated
17263         pbbs.
17264
17265 2017-06-09  Richard Biener  <rguenther@suse.de>
17266
17267         PR middle-end/81007
17268         * ipa-polymorphic-call.c
17269         (ipa_polymorphic_call_context::restrict_to_inner_class):
17270         Skip FIELD_DECLs with error_mark_node type.
17271         * passes.def (all_lowering_passes): Run pass_build_cgraph_edges
17272         last again.
17273
17274 2017-06-09  Martin Liska  <mliska@suse.cz>
17275
17276         * predict.c (struct branch_predictor): New struct.
17277         (test_prediction_value_range): New test.
17278         (predict_c_tests): New function.
17279         * selftest-run-tests.c (selftest::run_tests): Run the function.
17280         * selftest.h: Declare new tests.
17281
17282 2017-06-09  Segher Boessenkool  <segher@kernel.crashing.org>
17283
17284         PR target/80966
17285         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
17286         gen_add3_insn did not fail.
17287         * config/rs6000/rs6000.md (add<mode>3): If asked to add a constant to
17288         r0, construct that number in a temporary reg and add that reg to r0.
17289         If asked to put the result in r0 as well, fail.
17290
17291 2017-06-08  Will Schmidt  <will_schmidt@vnet.ibm.com>
17292
17293         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
17294         for early expansion of vec_eqv.
17295
17296 2017-06-08  Jakub Jelinek  <jakub@redhat.com>
17297
17298         PR middle-end/81005
17299         * ubsan.c (instrument_null): Avoid pointless code temporary.
17300         (pass_ubsan::execute): Instrument aggregate arguments of calls.
17301
17302 2017-06-08  Uros Bizjak  <ubizjak@gmail.com>
17303
17304         PR target/81015
17305         Revert:
17306         2016-12-14  Uros Bizjak  <ubizjak@gmail.com>
17307
17308         PR target/59874
17309         * config/i386/i386.md (*ctzhi2): New insn_and_split pattern.
17310         (*clzhi2): Ditto.
17311
17312 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
17313
17314         * predict.c (unlikely_executed_edge_p): Move ahead.
17315         (probably_never_executed_edge_p): Use it.
17316
17317 2017-06-08  Alexander Ivchenko  <alexander.ivchenko@intel.com>
17318
17319         PR middle-end/79988
17320         * tree-chkp.c (chkp_gimple_call_builtin_p): Remove
17321         gimple_call_builtin_p call.
17322
17323 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
17324
17325         * system.h (fancy_abort): Annotate by ATTRIBUTE_COLD.
17326         * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1,
17327         rtl_check_failed_type2, rtl_check_failed_code1,
17328         rtl_check_failed_code2, rtl_check_failed_code_mode,
17329         rtl_check_failed_block_symbol, cwi_check_failed_bounds,
17330         rtvec_check_failed_bounds, rtl_check_failed_flag,
17331         _fatal_insn_not_found, _fatal_insn): Likewise.
17332         * tree.h (tree_contains_struct_check_failed,
17333         tree_check_failed, tree_not_check_failed,
17334         tree_class_check_failed, tree_range_check_failed,
17335         tree_not_class_check_failed, tree_int_cst_elt_check_failed,
17336         tree_vec_elt_check_failed, phi_node_elt_check_failed,
17337         tree_operand_check_failed, omp_clause_check_failed,
17338         omp_clause_operand_check_failed, omp_clause_range_check_failed):
17339         Likewise.
17340
17341 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
17342
17343         * cgraph.c (cgraph_edge::maybe_hot_p): Do not check
17344         flag_branch_probabilities.
17345         * ipa-inline.c (edge_badness): Likewise.
17346         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
17347         * postreload-gcse.c (eliminate_partially_redundant_load): Likewise.
17348         * predict.c (maybe_hot_frequency_p): Likewise.
17349         (probably_never_executed): Likewise.
17350         * sched-ebb.c (schedule_ebbs): Likewise.
17351         * sched-rgn.c (find_single_block_region): Likewise.
17352         * tracer.c (tail_duplicate): Likewise.
17353
17354 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
17355
17356         * opts.c (finish_options): x_flag_reorder_blocks_and_partition no
17357         longer requires x_flag_profile_use.
17358
17359 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
17360
17361         * cfgrtl.c (cfg_layout_initialize): Check crtl->has_bb_partition
17362         instead of flag_reorder_blocks_and_partition.
17363         * dbxout.c (dbxout_function_end): Likewise.
17364         * dwarf2out.c (gen_subprogram_die): Likewise.
17365         * haifa-sched.c (sched_create_recovery_edges): Likewise.
17366         * hw-doloop.c (reorg_loops): Likewise.
17367         * varasm.c (assemble_start_function,
17368         assemble_end_function): Likewise.
17369         (decide_function_section): Do not check for
17370         flag_reorder_blocks_and_partition.
17371
17372 2017-06-08  Alexander Ivchenko  <alexander.ivchenko@intel.com>
17373
17374         * tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
17375         New function.
17376         (chkp_get_hard_register_fake_addr_expr): Ditto.
17377         (chkp_build_addr_expr): Add check for hard reg case.
17378         (chkp_parse_array_and_component_ref): Ditto.
17379         (chkp_find_bounds_1): Ditto.
17380         (chkp_process_stmt): Don't generate bounds store for
17381         hard reg case.
17382
17383 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
17384
17385         * predict.c (maybe_hot_bb_p): Do not check profile status.
17386         (maybe_hot_edge_p): Likewise.
17387         (probably_never_executed): Check for zero counts even if profile
17388         is not read.
17389         (unlikely_executed_edge_p): New function.
17390         (unlikely_executed_stmt_p): New function.
17391         (unlikely_executed_bb_p): New function.
17392         (set_even_probabilities): Use unlikely predicates.
17393         (combine_predictions_for_bb): Likewise.
17394         (predict_paths_for_bb): Likewise.
17395         (predict_paths_leading_to_edge): Likewise.
17396         (determine_unlikely_bbs): New function.
17397         (estimate_bb_frequencies): Use it.
17398         (compute_function_frequency): Use zero counts even if profile is
17399         not read.
17400         * profile-count.h: Fix typo.
17401
17402 2017-08-08  Julia Koval  <julia.koval@intel.com>
17403
17404         * config/i386/avx512bwintrin.h (_mm512_mask_cvtepi16_storeu_epi8,
17405         _mm512_mask_cvtsepi16_storeu_epi8,
17406         _mm512_mask_cvtusepi16_storeu_epi8): New intrinsics.
17407         * config/i386/avx512vlbwintrin.h (_mm256_mask_cvtepi16_storeu_epi8,
17408         _mm_mask_cvtsepi16_storeu_epi8, _mm256_mask_cvtsepi16_storeu_epi8,
17409         _mm_mask_cvtusepi16_storeu_epi8, _mm256_mask_cvtusepi16_storeu_epi8,
17410         _mm_mask_cvtepi16_storeu_epi8): New intrinsics.
17411         * config/i386/i386-builtin-types.def (PV8Q, V8QI): New pointer type.
17412         (VOID_FTYPE_PV32QI_V32HI_USI, VOID_FTYPE_PV8QI_V8HI_UQI,
17413         VOID_FTYPE_PV16QI_V16HI_UHI): New function types.
17414         * config/i386/i386-builtin.def (__builtin_ia32_pmovwb128mem_mask,
17415         __builtin_ia32_pmovwb256mem_mask, __builtin_ia32_pmovswb128mem_mask,
17416         __builtin_ia32_pmovswb256mem_mask, __builtin_ia32_pmovuswb128mem_mask,
17417         __builtin_ia32_pmovuswb256mem_mask,
17418         __builtin_ia32_pmovuswb512mem_mask, __builtin_ia32_pmovswb512mem_mask)
17419         __builtin_ia32_pmovwb512mem_mask): New builtins.
17420
17421 2017-08-08  Julia Koval  <julia.koval@intel.com>
17422
17423         PR target/73350,80862
17424         * config/i386/subst.md (round): Fix round pattern.
17425         * config/i386/i386.c (ix86_erase_embedded_rounding):
17426         Fix erasing rounding for the fixed pattern.
17427
17428 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
17429
17430         * cfgbuild.c (find_many_sub_basic_blocks): Fix thinko.
17431
17432 2017-06-08  Martin Liska  <mliska@suse.cz>
17433
17434         PR gcov-profile/80911
17435         * gcov.c (block_info::block_info): New constructor.
17436
17437 2017-06-07  Carl Love  <cel@us.ibm.com>
17438
17439         * config/rs6000/rs6000-c: The return type of the following
17440         built-in functions was implemented as int not long long.  Fix sign
17441         of return value for the unsigned version of vec_mulo and vec_mule.
17442         vector unsigned long long vec_bperm (vector unsigned long long,
17443                                              vector unsigned char)
17444         vector signed long long vec_mule (vector signed int,
17445                                           vector signed int)
17446         vector unsigned long long vec_mule (vector unsigned int,
17447                                             vector unsigned int)
17448         vector signed long long vec_mulo (vector signed int,
17449                                           vector signed int)
17450         vector unsigned long long vec_mulo (vector unsigned int,
17451                                             vector unsigned int)
17452         * doc/extend.texi: Fix the documentation for the built-in
17453         functions.
17454
17455 2017-06-07  Carl Love  <cel@us.ibm.com>
17456
17457         PR target/80982
17458         * config/rs6000/altivec.md (double<mode>2): Fix the implementation of
17459         for BE.
17460
17461 2017-06-07  Carl Love  <cel@us.ibm.com>
17462
17463         * config/rs6000/altivec.md: Fix argument swizzle in vec_doublel
17464         support, Generate       doublehv for signed int/float for BE case only.
17465
17466 2017-06-07  Alexander Monakov  <amonakov@ispras.ru>
17467
17468         * doc/invoke.texi (mcx16): Rewrite.
17469
17470 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17471
17472         * config/rs6000/predicates.md (rs6000_nonimmediate_operand): Delete.
17473         * config/rs6000/rs6000.md (*movsi_internal1, movsi_from_sf,
17474         *mov<mode>_softfloat, and an anonymous splitter): Use
17475         nonimmediate_operand instead of rs6000_nonimmediate_operand.
17476
17477 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17478
17479         * config/rs6000/darwin.h (REGISTER_NAMES): Delete the SPE_ACC and
17480         SPEFSCR registers.
17481         * config/rs6000/rs6000.c (rs6000_reg_names, alt_reg_names): Ditto.
17482         (enum rs6000_reg_type): Delete SPE_ACC_TYPE and SPEFSCR_REG_TYPE.
17483         (rs6000_debug_reg_global): Adjust.
17484         (rs6000_init_hard_regno_mode_ok): Adjust.
17485         (rs6000_dbx_register_number): Adjust.
17486         * config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Change to 115.
17487         (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
17488         Remove SPE_ACC and SPEFSCR.
17489         (REG_ALLOC_ORDER): Ditto.
17490         (FRAME_POINTER_REGNUM): Change to 111.
17491         (enum reg_class): Remove the SPE_ACC and SPEFSCR registers.
17492         (REG_CLASS_NAMES): Ditto.
17493         (REG_CLASS_CONTENTS): Delete the SPE_ACC and SPEFSCR registers.
17494         (REGISTER_NAMES): Ditto.
17495         (ADDITIONAL_REG_NAMES): Ditto.
17496         (rs6000_reg_names): Ditto.
17497         * config/rs6000/rs6000.md: Renumber some register number
17498         define_constants.
17499
17500 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17501
17502         * config/rs6000/darwin.h (REGISTER_NAMES): Delete the SPE high
17503         registers.
17504         * config/rs6000/rs6000.c (rs6000_reg_names, alt_reg_names): Ditto.
17505         * config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Change from 149
17506         to 117.
17507         (DWARF_REG_TO_UNWIND_COLUMN): Do not define.
17508         (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
17509         Delete the SPE high registers.
17510         (REG_ALLOC_ORDER): Ditto.
17511         (enum reg_class): Remove SPE_HIGH_REGS.
17512         (REG_CLASS_NAMES): Ditto.
17513         (REG_CLASS_CONTENTS): Delete the SPE high registers.
17514         (REGISTER_NAMES): Ditto.
17515         (rs6000_reg_names): Ditto.
17516         * doc/tm.texi.in: Remove SPE as example.
17517         * doc/tm.texi: Regenerate.
17518
17519 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17520
17521         * config/rs6000/8540.md (ppc8540_brinc): Delete.
17522         * config/rs6000/e500mc.md (e500mc_brinc): Delete.
17523         * config/rs6000/e500mc64.md (e500mc64_brinc): Delete.
17524         * config/rs6000/rs6000.md (type): Remove "brinc".
17525
17526 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17527
17528         * config.gcc (powerpc*-*-*): Don't add spe.h to extra_headers.
17529         (powerpc*-linux*spe*): Use ${cpu_type} instead of rs6000.
17530         * config/rs6000/linuxspe.h: Delete file.
17531         * config/rs6000/rs6000.md: Don't include spe.md.
17532         * config/rs6000/spe.h: Delete file.
17533         * config/rs6000/spe.md: Delete file.
17534         * config/rs6000/t-rs6000: Remove spe.md.
17535
17536 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17537
17538         * config/rs6000/predicates.md (reg_or_mem_operand): Reformat.
17539         (reg_or_none500mem_operand): Delete.
17540         * config/rs6000/rs6000.md (extendsfdf2): Use reg_or_mem_operand
17541         instead of reg_or_none500mem_operand.
17542
17543 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17544
17545         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
17546         handling of SPE flags.
17547         * config/rs6000/rs6000.opt (-mspe, -mspe=no, -mspe=yes): Delete.
17548
17549 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17550
17551         * config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
17552         SPE ABI handling.
17553         * config/rs6000/paired.md (paired_negv2sf2): Rename to negv2sf2.
17554         (paired_absv2sf2, paired_addv2sf3, paired_subv2sf3, paired_mulv2sf3,
17555         paired_divv2sf3): Similar.
17556         * config/rs6000/predicates.md: Replace TARGET_SPE, TARGET_SPE_ABI,
17557         SPE_VECTOR_MODE and SPE_HIGH_REGNO_P by 0; simplify.
17558         * config/rs6000/rs6000-builtin.def: Delete RS6000_BUILTIN_E and
17559         RS6000_BUILTIN_S.
17560         Delete BU_SPE_1, BU_SPE_2, BU_SPE_3, BU_SPE_E, BU_SPE_P, and BU_SPE_X.
17561         Rename the paired_* instruction patterns.
17562         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Do not
17563         define __SPE__.
17564         * config/rs6000/rs6000-protos.h (invalid_e500_subreg): Delete.
17565         * config/rs6000/rs6000.c: Delete RS6000_BUILTIN_E and RS6000_BUILTIN_S.
17566         (struct rs6000_stack): Delete fields spe_gp_save_offset, spe_gp_size,
17567         spe_padding_size, and spe_64bit_regs_used.  Replace TARGET_SPE and
17568         TARGET_SPE_ABI with 0, simplify.  Replace SPE_VECTOR_MODE with
17569         PAIRED_VECTOR_MODE.
17570         (struct machine_function): Delete field spe_insn_chain_scanned_p.
17571         (spe_func_has_64bit_regs_p): Delete.
17572         (spe_expand_predicate_builtin): Delete.
17573         (spe_expand_evsel_builtin): Delete.
17574         (TARGET_DWARF_REGISTER_SPAN): Do not define.
17575         (TARGET_MEMBER_TYPE_FORCES_BLK): Do not define.
17576         (invalid_e500_subreg): Delete.
17577         (rs6000_legitimize_address): Always force_reg op2 as well, for
17578         paired single memory accesses.
17579         (rs6000_member_type_forces_blk): Delete.
17580         (rs6000_spe_function_arg): Delete.
17581         (rs6000_expand_unop_builtin): Delete SPE handling.
17582         (rs6000_expand_binop_builtin): Ditto.
17583         (spe_expand_stv_builtin): Delete.
17584         (bdesc_2arg_spe): Delete.
17585         (spe_expand_builtin): Delete.
17586         (spe_expand_predicate_builtin): Delete.
17587         (spe_expand_evsel_builtin): Delete.
17588         (rs6000_invalid_builtin): Remove RS6000_BTM_SPE handling.
17589         (spe_init_builtins): Delete.
17590         (spe_func_has_64bit_regs_p): Delete.
17591         (savres_routine_name): Delete "info" parameter.  Adjust callers.
17592         (rs6000_emit_stack_reset): Ditto.
17593         (rs6000_dwarf_register_span): Delete.
17594         * config/rs6000/rs6000.h (TARGET_SPE_ABI, TARGET_SPE,
17595         UNITS_PER_SPE_WORD, SPE_HIGH_REGNO_P, SPE_SIMD_REGNO_P,
17596         SPE_VECTOR_MODE, RS6000_BTM_SPE, RS6000_BUILTIN_E, RS6000_BUILTIN_S):
17597         Delete.
17598         * config/rs6000/rs6000.md (FIRST_SPE_HIGH_REGNO, LAST_SPE_HIGH_REGNO):
17599         Delete.
17600         * config/rs6000/rs6000.opt (-mabi=spe, -mabi=no-spe): Delete.
17601         * config/rs6000/spe.md: Delete every pattern that uses TARGET_SPE.
17602         * config/rs6000/vector.md (absv2sf2, negv2sf2, addv2sf3, subv2sf3,
17603         mulv2sf3, divv2sf3): Delete expanders.
17604
17605 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17606
17607         config/rs6000/rs6000.md (UNSPEC_MV_CR_GT): Delete.
17608
17609 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17610
17611         * config/rs6000/rs6000-protos.h (output_e500_flip_gt_bit): Delete.
17612         * config/rs6000/rs6000.c: Ditto.
17613
17614 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17615
17616         * config/rs6000/predicated.md (rs6000_cbranch_operator): Delete.
17617         * config/rs6000/rs6000.md: Replace rs6000_cbranch_operator by
17618         comparison_operator.
17619
17620 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17621
17622         * config/rs6000/rs6000.c: Remove everything related to -mfloat-gprs.
17623         * config/rs6000/rs6000.opt: Ditto.
17624         * config/rs6000/t-rtems: Ditto.
17625
17626 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17627
17628         * config/rs6000/predicates.md: Replace TARGET_E500_DOUBLE and
17629         TARGET_E500_SINGLE by 0, simplify.
17630         * config/rs6000/rs6000.c: Ditto.
17631         (rs6000_option_override_internal): Delete CHECK_E500_OPTIONS.
17632         (spe_build_register_parallel): Delete.
17633         * config/rs6000/rs6000.h: Delete TARGET_E500_SINGLE,
17634         TARGET_E500_DOUBLE, and CHECK_E500_OPTIONS.
17635         * config/rs6000/rs6000.md: Replace TARGET_E500_DOUBLE,
17636         TARGET_E500_SINGLE, and <E500_CONVERT> by 0, simplify.
17637         (E500_CONVERT): Delete.
17638         * config/rs6000/spe.md: Remove many patterns and all define_constants.
17639
17640 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17641
17642         * config/rs6000/darwin.md: Replace TARGET_FPRS by 1 and simplify.
17643         * config/rs6000/dfp.md: Ditto.
17644         (negdd2, *negdd2_fpr): Merge.
17645         (absdd2, *absdd2_fpr): Merge.
17646         (negtd2, *negtd2_fpr): Merge.
17647         (abstd2, *abstd2_fpr): Merge.
17648         * config/rs6000/e500.h: Delete file.
17649         * config/rs6000/predicates.md (rs6000_cbranch_operator): Replace
17650         TARGET_FPRS by 1 and simplify.
17651         * config/rs6000/rs6000-c.c: Ditto.
17652         * config/rs6000/rs6000.c: Ditto.  Also replace TARGET_SF_SPE and
17653         TARGET_DF_SPE by 0.
17654         * config/rs6000/rs6000.h: Ditto.  Delete TARGET_SF_SPE and
17655         TARGET_DF_SPE.
17656         * config/rs6000/rs6000.md: Ditto.
17657         (floatdidf2, *floatdidf2_fpr): Merge.
17658         (move_from_CR_gt_bit): Delete.
17659         * config/rs6000/spe.md: Replace TARGET_FPRS by 1 and simplify.
17660         (E500_CR_IOR_COMPARE): Delete.
17661         (All patterns that require !TARGET_FPRS): Delete.
17662         * config/rs6000/vsx.md: Replace TARGET_FPRS by 1 and simplify.
17663
17664 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17665
17666         * passes.def (pass_iv_canon): Move before pass_loop_distribution.
17667
17668 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17669
17670         * graphds.c (add_edge): Intitialize edge's attached data.
17671         (foll_in_subgraph, dfs_fst_edge, dfs_next_edge): New function
17672         pointer parameter.  Call pointed function on each edge during
17673         graph traversing.  Skip traversing the edge when the function
17674         returns true.
17675         (graphds_dfs, graphds_scc): Ditto.
17676         (for_each_edge): New parameter.  Pass the new parameter to callback
17677         function.
17678         * graphds.h (skip_edge_callback): New function pointer type.
17679         (graphds_dfs, graphds_scc): New function pointer parameter.
17680         (graphds_edge_callback, for_each_edge): New parameter.
17681
17682 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17683
17684         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test): Factor
17685         out code checking if runtime alias check is possible to below ...
17686         Call the new function.
17687         * tree-data-ref.c (runtime_alias_check_p): ... to new function.
17688         * tree-data-ref.h (runtime_alias_check_p): New decalaration.
17689
17690 2017-06-07  Marek Polacek  <polacek@redhat.com>
17691
17692         PR sanitizer/80932
17693         * fold-const.c (extract_muldiv_1) <case MINUS_EXPR>: Add
17694         TYPE_OVERFLOW_WRAPS check.
17695
17696 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17697
17698         * tree-vect-loop-manip.c (vect_do_peeling): Don't skip vector loop
17699         if versioning is required.
17700         * tree-vect-loop.c (vect_analyze_loop_2): Merge niter check for loop
17701         peeling with the check for versioning.
17702
17703 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17704
17705         * tree-vectorizer.h (vect_build_loop_niters): New parameter.
17706         * tree-vect-loop-manip.c (vect_build_loop_niters): New parameter.
17707         Set true to new parameter if new ssa variable is defined.
17708         (vect_gen_vector_loop_niters): Refactor.  Set range information
17709         for the new vector loop bound variable.
17710         (vect_do_peeling): Ditto.
17711
17712 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17713
17714         * tree-affine.c (ssa.h): Include header file.
17715         (tree_to_aff_combination): Handle (T1)(X - CST) when inner type
17716         has wrapping overflow behavior.
17717
17718 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17719
17720         * tree-affine.c (tree_to_aff_combination): Handle (T1)(X + X).
17721
17722 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17723
17724         (aff_combination_expand): Move (T1)(X *+- CST) simplification to ...
17725         (tree_to_aff_combination): ... here.
17726
17727 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17728
17729         * tree-ssa-loop-ivopts.c (ivopts_estimate_reg_pressure): New
17730         reg_pressure model function.
17731         (ivopts_global_cost_for_size): Delete.
17732         (determine_set_costs, iv_ca_recount_cost): Call new model function
17733         ivopts_estimate_reg_pressure.
17734
17735 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
17736
17737         * config/aarch64/aarch64.c (aarch64_rtx_costs): Make sdiv more
17738         expensive than udiv.  Remove floating point cases from mod.
17739
17740 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
17741
17742         * config/arm/aarch-cost-tables.h (cortexa53_extra_cost):
17743         Increase idiv cost.
17744
17745 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
17746
17747         * config/aarch64/aarch64.md
17748         (copysignsf3): Fix mask generation.
17749
17750 2017-06-07  Jakub Jelinek  <jakub@redhat.com>
17751
17752         * dumpfile.h (enum tree_dump_index): Rename TDI_generic to
17753         TDI_gimple.
17754         (class dump_manager): Add register_dumps method.
17755         * dumpfile.c: Include langhooks.h.
17756         (dump_files): Use 0 instead of 3/4/5 for TDI_{original,gimple,nested}.
17757         (FIRST_AUTO_NUMBERED_DUMP): Decrease to 1.
17758         (FIRST_ME_AUTO_NUMBERED_DUMP): Define.
17759         (dump_manager::dump_register): Start with 512 entries instead of 32.
17760         (dump_manager::register_dumps): New method.
17761         * toplev.c (general_init): Instead of invoking register_dumps
17762         langhook, invoke register_dumps method on the dump manager.
17763         * gimplify.c (gimplify_function_tree): Use TDI_gimple instead of
17764         TDI_generic.
17765
17766 2017-06-07  Richard Sandiford  <richard.sandiford@linaro.org>
17767
17768         * doc/md.texi: Clarify the restrictions on a define_insn condition.
17769         Say that # requires an associated define_split to exist, and that
17770         the define_split must be suitable for use after register allocation.
17771
17772 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
17773
17774         * cfgbuild.c (find_bb_boundaries): Initialize profile of split blocks.
17775         (compute_outgoing_frequencies): Also initialize zero counts.
17776         (find_many_sub_basic_blocks): Do not produce uninitialized profile
17777         around loops; preserve more of profile when nothing changes.
17778
17779 2017-06-06  Jim Wilson  <jim.wilson@linaro.org>
17780
17781         * config/aarch64/aarch64-cost-tables.h (qdf24xx_extra_costs): Move to
17782         here.
17783         * config/arm/aarch-cost-tables.h (qdf24xx_extra_costs): From here.
17784         * config/arm/arm-cpu-cdata.h: Regenerate.
17785         * config/arm/arm-cpu-data.h, config/arm/arm-cpu.h: Likewise.
17786         * config/arm/arm-tables.opt, config/arm/arm-tune.md: Likewise.
17787         * config/arm/arm-cpus.in: Delete falkor and qdf24xx entries.
17788         * config/arm/arm.c (arm_qdf24xx_tune): Delete.
17789         * config/arm/bpabi.h (BE8_LINK_SPEC): Delete falkor and qdf24xx
17790         support.
17791         * config/arm/t-aprofile (MULTILIB_MATCHES): Delete falkor and qdf24xx
17792         support.
17793         * config/arm/t-rmprofile: Likewise.
17794         * doc/invoke.texi (ARM Options): Drop falkor and qdf24xx support.
17795
17796 2017-06-06  David S. Miller  <davem@davemloft.net>
17797
17798         PR target/80968
17799         * config/sparc/sparc.c (sparc_expand_prologue): Emit frame
17800         blockage if function uses alloca.
17801
17802 2017-06-06  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
17803
17804         * tree-ssa-loop-prefetch.c (struct mem_ref_group, struct mem_ref):
17805         New "uid" fields to hold pretty-print IDs of group and ref.
17806         Memory references are now identified as <group_id>:<ref_id>
17807         instead of using [random] addresses.
17808         (dump_mem_details): Simplify, no functional change.
17809         (dump_mem_ref): Simplify and make output more concise.
17810         Replace couple of fprintf's throughout code with calls to dump_mem_ref.
17811         (find_or_create_group): Initialize group uid.
17812         (record_ref): Initialize ref uid.  Improve debug output.
17813         (prune_group_by_reuse, should_issue_prefetch_p,)
17814         (should_issue_prefetch_p, schedule_prefetches, issue_prefetch_ref,)
17815         (mark_nontemporal_store, determine_loop_nest_reuse):
17816         Improve debug output.
17817
17818 2017-06-06  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
17819
17820         * dbgcnt.def (prefetch): New debug counter.
17821         * tree-ssa-loop-prefetch.c (dbgcnt.h): New include.
17822         (schedule_prefetches): Stop issueing prefetches if debug counter
17823         tripped.
17824
17825 2017-06-06  Tom de Vries  <tom@codesourcery.com>
17826
17827         * doc/sourcebuild.texi (Testsuites, C Language Testsuites,
17828         gcc.c-torture/compile): Remove mention of NO_LABEL_VALUES in fixme.
17829
17830 2017-06-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17831
17832         * config/aarch64/atomics.md (atomic_compare_and_swap<mode> expander):
17833         Use aarch64_reg_or_zero predicate for operand 4.
17834         (aarch64_compare_and_swap<mode> define_insn_and_split):
17835         Use aarch64_reg_or_zero predicate for operand 3.  Add 'Z' constraint.
17836         (aarch64_store_exclusive<mode>): Likewise for operand 2.
17837
17838 2017-06-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
17839
17840         * config/arm/arm.c (arm_compute_save_reg_mask): Rename into ...
17841         (arm_compute_save_core_reg_mask): This.
17842         (thumb1_compute_save_reg_mask): Rename into ...
17843         (thumb1_compute_save_core_reg_mask): This.
17844         (arm_compute_save_reg0_reg12_mask): Adapt comment.
17845         (arm_compute_frame_layout): Likewise.
17846
17847 2017-06-06  Richard Biener  <rguenther@suse.de>
17848
17849         PR tree-optimization/80974
17850         * tree-ssa-sccvn.c (set_ssa_val_to): Do not change but only
17851         keep or clear leaders SSA info.
17852
17853 2017-06-06  Tom de Vries  <tom@codesourcery.com>
17854
17855         * config/nvptx/nvptx.c (split_mode_p): New function.
17856         (nvptx_declare_function_name, nvptx_print_operand): Use split_mode_p.
17857
17858 2017-06-06  Tom de Vries  <tom@codesourcery.com>
17859
17860         * config/nvptx/nvptx.c (nvptx_print_operand): Use maybe_split_mode.
17861
17862 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
17863
17864         PR bootstrap/80978
17865         * tree-cfg.c (execute_fixup_cfg): Fix condition on when to rescale
17866         profile.
17867
17868 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
17869
17870         * shrink-wrap.c (handle_simple_exit): Update profile.
17871         (try_shrink_wrapping): Upate profile.
17872
17873 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
17874
17875         * predict.c (tree_estimate_probability_bb): Add LOCAL_ONLY.
17876         (tree_guess_outgoing_edge_probabilities): New.
17877         * predict.h (tree_guess_outgoing_edge_probabilities): Declare.
17878         * tree-cfg.c (gimple_find_sub_bbs): Propagate profile.
17879
17880 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
17881
17882         * ipa-split.c (split_function): Initialize return bb profile.
17883
17884 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
17885
17886         * profile.c (compute_branch_probabilities): Also initialize
17887         EXIT_BLOCK profile.
17888
17889 2017-06-06  Richard Biener  <rguenther@suse.de>
17890
17891         PR tree-optimization/80928
17892         * tree-vect-loop.c (vect_update_vf_for_slp): Amend dumps.
17893         (vect_analyze_loop_operations): Properly guard analysis for
17894         pure SLP case.
17895         (vect_transform_loop): Likewise.
17896         (vect_analyze_loop_2): Also reset SLP type on PHIs.
17897         (vect_model_induction_cost): Do not cost for pure SLP.
17898         (vectorizable_induction): Pass in SLP node, implement SLP vectorization
17899         of induction in inner loop vectorization.
17900         * tree-vect-slp.c (vect_create_new_slp_node): Handle PHIs.
17901         (vect_get_and_check_slp_defs): Handle vect_induction_def.
17902         (vect_build_slp_tree): Likewise.  Handle PHIs as terminating the
17903         recursion.
17904         (vect_analyze_slp_cost_1): Cost induction.
17905         (vect_detect_hybrid_slp_stmts): Handle PHIs.
17906         (vect_get_slp_vect_defs): Likewise.
17907         * tree-vect-stmts.c (vect_analyze_stmt): Handle induction.
17908         (vect_transform_stmt): Handle SLP reductions.
17909         * tree-vectorizer.h (vectorizable_induction): Adjust.
17910
17911 2017-06-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
17912
17913         * config/rs6000/rs6000.c (make_resolver_func): Update
17914         init_lowered_empty_function call.
17915
17916 2017-06-05  Bernd Edlinger  <bernd.edlinger@hotmail.de>
17917
17918         * doc/invoke.texi: Document the -fprofile-abs-path option.
17919         * common.opt (fprofile-abs-path): New option.
17920         * gcov-io.h (gcov_write_filename): Declare.
17921         * gcov-io.c (gcov_write_filename): New function.
17922         * coverage.c (coverage_begin_function): Use gcov_write_filename.
17923         * profile.c (output_location): Likewise.
17924
17925 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
17926
17927         * shring-wrap.c: Revert accidental commit.
17928
17929 2017-06-05  Volker Reichelt  <v.reichelt@netcologne.de>
17930
17931         * doc/invoke.texi (-Wduplicated-branches): Add to warning list.
17932
17933 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
17934
17935         * cfgexpand.c (expand_gimple_tailcall): Initialize profile of
17936         new edge.
17937         * ipa-inline.c (want_inline_self_recursive_call_p): Watch for missing
17938         profile in callgraph edge.
17939         * profile-count.h (apply_probability): If THIS is 0, then result is 0
17940         (apply_scale): Likewise.
17941         * tree-inline.c (copy_bb, copy_edges_for_bb, copy_cfg_body):
17942         Also scale profile when inlining function with zero profile.
17943         (initialize_cfun): Update exit block profile even when it is zero.
17944         * tree-ssa-threadupdate.c (clear_counts_path): Handle correctly case
17945         when profile is read.
17946
17947 2017-06-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
17948
17949         * config/rs6000/rs6000.c (toplevel): Include attribs.h.
17950         (CLONE_*): New constants to define the processors we can generate
17951         code for with the target_clone attribute.
17952         (rs6000_clone_map): New array to identify which clone processors
17953         the current program is running on.
17954         (TARGET_COMPARE_VERSION_PRIORITY): Define to enable the
17955         target_clone attribute.
17956         (TARGET_GENERATE_VERSION_DISPATCHER_BODY): Likewise.
17957         (TARGET_GET_FUNCTION_VERSIONS_DISPATCHER): Likewise.
17958         (TARGET_OPTION_FUNCTION_VERSIONS): Likewise.
17959         (cpu_expand_builtin): Add support for target_clone attribute.
17960         (rs6000_valid_attribute_p): Allow "default" attribute.
17961         (get_decl_name): New debug function to simplify printing the
17962         current function name in debugging statements.
17963         (rs6000_clone_priority): New functions to support the target_clone
17964         attribute, and be able to generate code to switch between ISA 2.05
17965         through ISA 3.0 (power6 through power9).
17966         (rs6000_compare_version_priority): Likewise.
17967         (rs6000_get_function_versions_dispatcher): Likewise.
17968         (make_resolver_func): Likewise.
17969         (add_condition_to_bb): Likewise.
17970         (dispatch_function_versions): Likewise.
17971         (rs6000_generate_version_dispatcher_body): Likewise.
17972         (rs6000_can_inline_p): Call get_decl_name for debugging usage.
17973         (fusion_gpr_load_p): Fix a spacing issue.
17974         * doc/extend.texi (Common Function Attributes): Document that the
17975         PowerPC supports the target_clone attribute.
17976
17977 2017-06-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>
17978
17979         * config/arm/arm.h: explain F symbol found in description of ARM
17980         register allocation in its legend.
17981
17982 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
17983
17984         * config/mips/frame-header-opt.c: Include profile-count.h.
17985         * config/riscv/riscv.c: Include profile-count.h
17986
17987 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
17988
17989         * tree-ssa-loop-im.c (execute_sm_if_changed): Add FLAG_BBS parameter;
17990         update profile.
17991         (sm_set_flag_if_changed): Add bbs field.
17992         (execute_sm_if_changed_flag_set): Pass BBS.
17993         (execute_sm): Update.
17994
17995 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17996
17997         * config/aarch64/aarch64-simd.md (aarch64_store_lane0<mode>):
17998         New pattern.
17999
18000 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18001
18002         * config/aarch64/aarch64.md (sub<mode>3_compare1_imm): New define_insn.
18003         (peephole2): New peephole2 to emit the above.
18004         * config/aarch64/predicates.md (aarch64_sub_immediate): New predicate.
18005
18006 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18007
18008         * config/aarch64/aarch64.c (define_peephole2 above
18009         *sub_<shift>_<mode>): New peephole.
18010
18011 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
18012
18013         * config/i386/i386.c (make_resolver_func): Update.
18014         * Makefile.in: Add profile-count.h and profile-count.o
18015         * auto-profile.c (afdo_indirect_call): Update to new API.
18016         (afdo_set_bb_count): Update.
18017         (afdo_propagate_edge): Update.
18018         (afdo_propagate_circuit): Update.
18019         (afdo_calculate_branch_prob): Update.
18020         (afdo_annotate_cfg): Update.
18021         * basic-block.h: Include profile-count.h
18022         (struct edge_def): Turn count to profile_count.
18023         (struct basic_block_def): Likewie.
18024         (REG_BR_PROB_BASE): Move to profile-count.h
18025         (RDIV): Move to profile-count.h
18026         * bb-reorder.c (max_entry_count): Turn to profile_count.
18027         (find_traces): Update.
18028         (rotate_loop):Update.
18029         (connect_traces):Update.
18030         (sanitize_hot_paths):Update.
18031         * bt-load.c (migrate_btr_defs): Update.
18032         * cfg.c (RDIV): Remove.
18033         (init_flow): Use alloc_block.
18034         (alloc_block): Uninitialize count.
18035         (unchecked_make_edge): Uninitialize count.
18036         (check_bb_profile): Update.
18037         (dump_edge_info): Update.
18038         (dump_bb_info): Update.
18039         (update_bb_profile_for_threading): Update.
18040         (scale_bbs_frequencies_int): Update.
18041         (scale_bbs_frequencies_gcov_type): Update.
18042         (scale_bbs_frequencies_profile_count): New.
18043         * cfg.h (update_bb_profile_for_threading): Update.
18044         (scale_bbs_frequencies_profile_count): Declare.
18045         * cfgbuild.c (compute_outgoing_frequencies): Update.
18046         (find_many_sub_basic_blocks): Update.
18047         * cfgcleanup.c (try_forward_edges): Update.
18048         (try_crossjump_to_edge): Update.
18049         * cfgexpand.c (expand_gimple_tailcall): Update.
18050         (construct_exit_block): Update.
18051         * cfghooks.c (verify_flow_info): Update.
18052         (dump_bb_for_graph): Update.
18053         (split_edge): Update.
18054         (make_forwarder_block): Update.
18055         (duplicate_block): Update.
18056         (account_profile_record): Update.
18057         * cfgloop.c (find_subloop_latch_edge_by_profile): Update.
18058         (get_estimated_loop_iterations): Update.
18059         * cfgloopanal.c (expected_loop_iterations_unbounded): Update.
18060         (single_likely_exit): Update.
18061         * cfgloopmanip.c (scale_loop_profile): Update.
18062         (loopify): Update.
18063         (set_zero_probability): Update.
18064         (lv_adjust_loop_entry_edge): Update.
18065         * cfgrtl.c (force_nonfallthru_and_redirect): Update.
18066         (purge_dead_edges): Update.
18067         (rtl_account_profile_record): Update.
18068         * cgraph.c (cgraph_node::create): Uninitialize count.
18069         (symbol_table::create_edge): Uninitialize count.
18070         (cgraph_update_edges_for_call_stmt_node): Update.
18071         (cgraph_edge::dump_edge_flags): Update.
18072         (cgraph_node::dump): Update.
18073         (cgraph_edge::maybe_hot_p): Update.
18074         * cgraph.h: Include profile-count.h
18075         (create_clone), create_edge, create_indirect_edge): Update.
18076         (cgraph_node): Turn count to profile_count.
18077         (cgraph_edge0: Likewise.
18078         (make_speculative, clone): Update.
18079         (create_edge): Update.
18080         (init_lowered_empty_function): Update.
18081         * cgraphclones.c (cgraph_edge::clone): Update.
18082         (duplicate_thunk_for_node): Update.
18083         (cgraph_node::create_clone): Update.
18084         * cgraphunit.c (cgraph_node::analyze): Update.
18085         (cgraph_node::expand_thunk): Update.
18086         * final.c (dump_basic_block_info): Update.
18087         * gimple-streamer-in.c (input_bb): Update.
18088         * gimple-streamer-out.c (output_bb): Update.
18089         * graphite.c (print_global_statistics): Update.
18090         (print_graphite_scop_statistics): Update.
18091         * hsa-brig.c: Include basic-block.h.
18092         * hsa-dump.c: Include basic-block.h.
18093         * hsa-gen.c (T sum_slice): Update.
18094         (convert_switch_statements):Update.
18095         * hsa-regalloc.c: Include basic-block.h.
18096         * ipa-chkp.c (chkp_produce_thunks): Update.
18097         * ipa-cp.c (struct caller_statistics): Update.
18098         (init_caller_stats): Update.
18099         (gather_caller_stats): Update.
18100         (ipcp_cloning_candidate_p): Update.
18101         (good_cloning_opportunity_p): Update.
18102         (get_info_about_necessary_edges): Update.
18103         (dump_profile_updates): Update.
18104         (update_profiling_info): Update.
18105         (update_specialized_profile): Update.
18106         (perhaps_add_new_callers): Update.
18107         (decide_about_value): Update.
18108         (ipa_cp_c_finalize): Update.
18109         * ipa-devirt.c (struct odr_type_warn_count): Update.
18110         (struct decl_warn_count): Update.
18111         (struct final_warning_record): Update.
18112         (possible_polymorphic_call_targets): Update.
18113         (ipa_devirt): Update.
18114         * ipa-fnsummary.c (redirect_to_unreachable): Update.
18115         * ipa-icf.c (sem_function::merge): Update.
18116         * ipa-inline-analysis.c (do_estimate_edge_time): Update.
18117         * ipa-inline.c (compute_uninlined_call_time): Update.
18118         (compute_inlined_call_time): Update.
18119         (want_inline_small_function_p): Update.
18120         (want_inline_self_recursive_call_p): Update.
18121         (edge_badness): Update.
18122         (lookup_recursive_calls): Update.
18123         (recursive_inlining): Update.
18124         (inline_small_functions): Update.
18125         (dump_overall_stats): Update.
18126         (dump_inline_stats): Update.
18127         * ipa-profile.c (ipa_profile_generate_summary): Update.
18128         (ipa_propagate_frequency): Update.
18129         (ipa_profile): Update.
18130         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
18131         * ipa-utils.c (ipa_merge_profiles): Update.
18132         * loop-doloop.c (doloop_modify): Update.
18133         * loop-unroll.c (report_unroll): Update.
18134         (unroll_loop_runtime_iterations): Update.
18135         * lto-cgraph.c (lto_output_edge): Update.
18136         (lto_output_node): Update.
18137         (input_node): Update.
18138         (input_edge): Update.
18139         (merge_profile_summaries): Update.
18140         * lto-streamer-in.c (input_cfg): Update.
18141         * lto-streamer-out.c (output_cfg): Update.
18142         * mcf.c (create_fixup_graph): Update.
18143         (adjust_cfg_counts): Update.
18144         (sum_edge_counts): Update.
18145         * modulo-sched.c (sms_schedule): Update.
18146         * postreload-gcse.c (eliminate_partially_redundant_load): Update.
18147         * predict.c (maybe_hot_count_p): Update.
18148         (probably_never_executed): Update.
18149         (dump_prediction): Update.
18150         (combine_predictions_for_bb): Update.
18151         (propagate_freq): Update.
18152         (handle_missing_profiles): Update.
18153         (counts_to_freqs): Update.
18154         (rebuild_frequencies): Update.
18155         (force_edge_cold): Update.
18156         * predict.h: Include profile-count.h
18157         (maybe_hot_count_p, counts_to_freqs): UPdate.
18158         * print-rtl-function.c: Do not include cfg.h
18159         * print-rtl.c: Include basic-block.h
18160         * profile-count.c: New file.
18161         * profile-count.h: New file.
18162         * profile.c (is_edge_inconsistent): Update.
18163         (correct_negative_edge_counts): Update.
18164         (is_inconsistent): Update.
18165         (set_bb_counts): Update.
18166         (read_profile_edge_counts): Update.
18167         (compute_frequency_overlap): Update.
18168         (compute_branch_probabilities): Update; Initialize and deinitialize
18169         gcov_count tables.
18170         (branch_prob): Update.
18171         * profile.h (bb_gcov_counts, edge_gcov_counts): New.
18172         (edge_gcov_count): New.
18173         (bb_gcov_count): New.
18174         * shrink-wrap.c (try_shrink_wrapping): Update.
18175         * tracer.c (better_p): Update.
18176         * trans-mem.c (expand_transaction): Update.
18177         (ipa_tm_insert_irr_call): Update.
18178         (ipa_tm_insert_gettmclone_call): Update.
18179         * tree-call-cdce.c: Update.
18180         * tree-cfg.c (gimple_duplicate_sese_region): Update.
18181         (gimple_duplicate_sese_tail): Update.
18182         (gimple_account_profile_record): Update.
18183         (execute_fixup_cfg): Update.
18184         * tree-inline.c (copy_bb): Update.
18185         (copy_edges_for_bb): Update.
18186         (initialize_cfun): Update.
18187         (freqs_to_counts): Update.
18188         (copy_cfg_body): Update.
18189         (expand_call_inline): Update.
18190         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
18191         * tree-ssa-loop-ivcanon.c (unloop_loops): Update.
18192         (try_unroll_loop_completely): Update.
18193         (try_peel_loop): Update.
18194         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
18195         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop): Update.
18196         * tree-ssa-loop-split.c (connect_loops): Update.
18197         * tree-ssa-loop-unswitch.c (hoist_guard): Update.
18198         * tree-ssa-reassoc.c (branch_fixup): Update.
18199         * tree-ssa-tail-merge.c (replace_block_by): Update.
18200         * tree-ssa-threadupdate.c (create_block_for_threading): Update.
18201         (compute_path_counts): Update.
18202         (update_profile): Update.
18203         (recompute_probabilities): Update.
18204         (update_joiner_offpath_counts): Update.
18205         (estimated_freqs_path): Update.
18206         (freqs_to_counts_path): Update.
18207         (clear_counts_path): Update.
18208         (ssa_fix_duplicate_block_edges): Update.
18209         (duplicate_thread_path): Update.
18210         * tree-switch-conversion.c (case_bit_test_cmp): Update.
18211         (struct switch_conv_info): Update.
18212         * tree-tailcall.c (decrease_profile): Update.
18213         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
18214         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
18215         * value-prof.c (check_counter): Update.
18216         (gimple_divmod_fixed_value): Update.
18217         (gimple_mod_pow2): Update.
18218         (gimple_mod_subtract): Update.
18219         (gimple_ic_transform): Update.
18220         (gimple_stringop_fixed_value): Update.
18221         * value-prof.h (gimple_ic): Update.
18222
18223 2017-06-02  Carl Love  <cel@us.ibm.com>
18224
18225         * config/rs6000/rs6000-c: Add support for built-in functions
18226         vector double vec_doublee (vector signed int);
18227         vector double vec_doublee (vector unsigned int);
18228         vector double vec_doublee (vector float);
18229         vector double vec_doubleh (vector signed int);
18230         vector double vec_doubleh (vector unsigned int);
18231         vector double vec_doubleh (vector float);
18232         vector double vec_doublel (vector signed int);
18233         vector double vec_doublel (vector unsigned int);
18234         vector double vec_doublel (vector float);
18235         vector double vec_doubleo (vector signed int);
18236         vector double vec_doubleo (vector unsigned int);
18237         vector double vec_doubleo (vector float);.
18238         * config/rs6000/rs6000-builtin.def: Add definitions for DOUBLEE,
18239         DOUBLEO, DOUBLEH, DOUBLEL, UNS_DOUBLEO, UNS_DOUBLEE, UNS_DOUBLEH,
18240         UNS_DOUBLEL.
18241         * config/rs6000/altivec.md: Add code generator for doublee<mode>2,
18242         unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2, doubleh<mode>2,
18243         unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2, add mode attribute
18244         VS_sxwsp.
18245         * config/rs6000/altivec.h: Add define for vec_doublee, vec_doubleo,
18246         vec_doublel, vec_doubleh.
18247         * doc/extend.texi: Update the built-in documentation file for the
18248         new built-in functions.
18249
18250 2017-06-02  David Malcolm  <dmalcolm@redhat.com>
18251
18252         PR jit/80954
18253         * ipa-inline-analysis.c (free_growth_caches): Set
18254         edge_removal_hook_holder to NULL after removing it.
18255
18256 2017-06-02  Sudakshina Das  <sudi.das@arm.com>
18257
18258         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Return CC_SWP for
18259         comparision with zero.
18260
18261 2017-06-02  Will Schmidt  <will_schmidt@vnet.ibm.com>
18262         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
18263         for early expansion of vec_min and vec_max builtins.
18264         (builtin_function_type): Add min/max unsigned variants to those
18265         identified as having unsigned arguments.
18266
18267 2017-06-02  Olivier Hainque  <hainque@adacore.com>
18268
18269         * config/vx-common.h (DWARF_UNWIND_INFO): Switch #define to 1.
18270
18271 2017-06-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18272
18273         * config/aarch64/aarch64-simd.md (*aarch64_simd_vec_copy_lane<mode>):
18274         Use VALL_F16 iterator rather than VALL.
18275
18276 2017-06-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18277
18278         * config/aarch64/aarch64.c (aarch64_split_compare_and_swap):
18279         Emit CBNZ inside loop when doing a strong exchange and comparing
18280         against zero.  Generate the CC flags after the loop.
18281
18282 2017-06-02  David Edelsohn  <dje.gcc@gmail.com>
18283
18284         * dwarf2out.c (DWARF_INITIAL_LENGTH_SIZE_STR): New.
18285         (dl_section_ref): New.
18286         (dwarf2out_finish): Copy debug_line_section_label to dl_section_ref.
18287         On AIX, append an expression to subtract the size of the
18288         section length to dl_section_ref.
18289
18290 2017-06-02  Will Schmidt  <will_schmidt@vnet.ibm.com>
18291
18292         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
18293         for early expansion of vector absolute builtins.
18294
18295 2017-06-02  Richard Biener  <rguenther@suse.de>
18296
18297         * tree-vect-slp.c (vect_detect_hybrid_slp_2): Match up
18298         what we consider a relevant use stmt with vect_detect_hybrid_slp_stmts.
18299
18300 2017-06-02  Richard Biener  <rguenther@suse.de>
18301
18302         PR tree-optimization/80948
18303         * tree-tailcall.c (find_tail_calls): Track stmts to move in
18304         stmt order as well.
18305
18306 2017-06-02  Richard Biener  <rguenther@suse.de>
18307
18308         * tree-vect-loop.c (vect_analyze_loop_operations): Not relevant
18309         PHIs are ok.
18310         * tree-vect-stmts.c (process_use): Do not mark backedge defs
18311         for inductions as relevant.
18312
18313 2017-06-02  Richard Biener  <rguenther@suse.de>
18314
18315         * tree-vect-loop.c (get_initial_def_for_induction): Inline into ...
18316         (vectorizable_induction): ... this.  Remove dead code.
18317
18318 2017-06-02  Eric Botcazou  <ebotcazou@adacore.com>
18319
18320         * builtins. (expand_builtin_alloca): Remove second parameter and
18321         infer its value from the first parameter instead.
18322         (expand_builtin) <BUILT_IN_ALLOCA>: Adjust call to above.
18323
18324 2017-06-02  Jakub Jelinek  <jakub@redhat.com>
18325
18326         PR rtl-optimization/80903
18327         * loop-doloop.c (add_test): Unshare sequence.
18328
18329 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
18330
18331         * doc/invoke.texi: Document the -Wsizeof-pointer-div warning.
18332
18333 2017-06-01  Bernd Edlinger  <bernd.edlinger@hotmail.de>
18334
18335         * config/i386/i386.c (x86_64_ms_sysv_extra_clobbered_registers): Make
18336         static.
18337         (xlogue_layout::get_stack_space_used, xlogue_layout::s_instances,
18338         xlogue_layout::get_instance, logue_layout::xlogue_layout,
18339         sp_valid_at, fp_valid_at, choose_basereg): Formatting.
18340         (xlogue_layout::get_stub_rtx): Make static.
18341         (xlogue_layout::get_stub_name): Avoid const-cast, make static.
18342         (xlogue_layout::compute_stub_managed_regs): Rename to...
18343         (xlogue_layout::count_stub_managed_regs): ...this.
18344         (xlogue_layout::is_stub_managed_reg): New function.
18345         (xlogue_layout::m_stub_names): Rename to...
18346         (xlogue_layout::s_stub_names): ...this, make static.
18347         (xlogue_layout::STUB_INDEX_OFFSET, xlogue_layout::MIN_REGS,
18348         xlogue_layout::MAX_REGS, xlogue_layout::MAX_EXTRA_REGS,
18349         xlogue_layout::VARIANT_COUNT, xlogue_layout::STUB_NAME_MAX_LEN,
18350         xlogue_layout::s_stub_names): Instantiate statics.
18351         (stub_managed_regs): Remove.
18352         (ix86_save_reg): Use xlogue_layout::compute_stub_managed_regs.
18353         (disable_call_ms2sysv_xlogues): Rename to...
18354         (warn_once_call_ms2sysv_xlogues): ...this, and warn only once.
18355         (ix86_initial_elimination_offset, ix86_expand_call): Fix call_ms2sysv
18356         warning logic.
18357         (ix86_static_chain): Make sure that ix86_static_chain_on_stack can't
18358         change after reload_completed.
18359         (ix86_can_use_return_insn_p): Use the ix86_frame data structure
18360         directly.
18361         (ix86_expand_prologue): Likewise.
18362         (ix86_expand_epilogue): Likewise.
18363         (ix86_expand_split_stack_prologue): Likewise.
18364         (ix86_compute_frame_layout): Remove frame parameter ...
18365         (TARGET_COMPUTE_FRAME_LAYOUT): ... and export it as a target hook.
18366         (ix86_finalize_stack_realign_flags): Call ix86_compute_frame_layout
18367         only if necessary.
18368         (ix86_init_machine_status): Don't set use_fast_prologue_epilogue_nregs.
18369         (ix86_frame): Move from here ...
18370         * config/i386/i386.h (ix86_frame): ... to here.
18371         (machine_function): Remove use_fast_prologue_epilogue_nregs, cache the
18372         complete ix86_frame data structure instead.  Remove some_ld_name.
18373
18374 2017-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
18375
18376         * dwarf2out.c (dwarf2out_late_global_decl): Add locations for
18377         symbols that hold a DECL_VALUE_EXPR.
18378
18379 2017-06-01  Martin Jambor  <mjambor@suse.cz>
18380
18381         PR tree-optimization/80898
18382         * tree-sra.c (process_subtree_disqualification): Removed.
18383         (disqualify_candidate): Do not acll
18384         process_subtree_disqualification.
18385         (subtree_mark_written_and_enqueue): New function.
18386         (propagate_all_subaccesses): Set grp_write of LHS subtree if the
18387         RHS has been disqualified and re-queue LHS if necessary.  Apart
18388         from that, ignore disqualified RHS.
18389
18390 2017-06-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18391
18392         * config/s390/s390.c (s390_emit_epilogue): Disable early return
18393         address fetch for z10 or later.
18394
18395 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
18396
18397         * config/arc/arc.md (tst_movb): Add guard when splitting.
18398
18399 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
18400
18401         * config/arc/arc.c (arc_can_eliminate): Test against
18402         arc_frame_pointer_needed.
18403
18404 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
18405
18406         * config/arc/arc.c (arc_expand_prologue): Emit a special barrier
18407         to prevent store reordering.
18408         * config/arc/arc.md (UNSPEC_ARC_STKTIE): Define.
18409         (type): Add block type.
18410         (stack_tie): Define special instruction to be used in
18411         expand_prologue.
18412
18413 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
18414
18415         * config/arc/arc.md (commutative_binary_comparison): Remove 'I'
18416         constraint. It is not valid for the pattern.
18417         (noncommutative_binary_comparison): Likewise.
18418
18419 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
18420
18421         * config/arc/simdext.md (movv2hi_insn): Change predicate to avoid
18422         scaled addresses.
18423
18424 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
18425
18426         * config/arc/arc.c (arc_conditional_register_usage): Allow r30 to
18427         be used by the reg-alloc.
18428
18429 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
18430
18431         * config/arc/arc.md (mulsi3): Avoid use of hard registers before
18432         reg-alloc when having mul64 or mul32x16 instructions.
18433         (mulsidi3): Likewise.
18434         (umulsidi3): Likewise.
18435         (mulsi32x16): New pattern.
18436         (mulsi64): Likewise.
18437         (mulsidi64): Likewise.
18438         (umulsidi64): Likewise.
18439         (MUL32x16_REG): Define.
18440         (mul64_600): Use MUL32x16_REG.
18441         (mac64_600): Likewise.
18442         (umul64_600): Likewise.
18443         (umac64_600): Likewise.
18444
18445 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
18446
18447         * config/arc/arc.md (mulsi3_700): Make it commutative.
18448
18449 2017-06-01  Jose E. Marchesi  <jose.marchesi@oracle.com>
18450
18451         * config/sparc/sparc.md (*zero_extendsidi2_insn_sp64): Set insn
18452         type for movstouw.
18453         (*sign_extendsidi2_insn): Likewise for movstosw.
18454
18455 2017-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
18456
18457         * dwarf2out.c (get_discr_value): Call the get_debug_type hook on
18458         the type of the input discriminant value.  Convert the
18459         discriminant value of signedness vary.
18460
18461 2017-06-01  Volker Reichelt  <v.reichelt@netcologne.de>
18462
18463         * doc/invoke.texi (-Wcatch-value): Document new shortcut.
18464         Add to -Wall section.
18465
18466 2017-06-01  Richard Biener  <rguenther@suse.de>
18467
18468         PR middle-end/66313
18469         * fold-const.c (fold_plusminus_mult_expr): If the factored
18470         factor may be zero use a wrapping type for the inner operation.
18471         * tree-tailcall.c (independent_of_stmt_p): Pass in to_move bitmap
18472         and handle moved defs.
18473         (process_assignment): Properly guard the unary op case.  Return a
18474         tri-state indicating that moving the stmt before the call may allow
18475         to continue.  Pass through to_move.
18476         (find_tail_calls): Handle moving unrelated defs before
18477         the call.
18478
18479 2017-05-31  Segher Boessenkool  <segher@kernel.crashing.org>
18480
18481         PR target/80618
18482         * config/rs6000/vector.md (*vector_uneq<mode>): Write the nor in the
18483         splitter result in the canonical way.
18484
18485 2017-05-31  Uros Bizjak  <ubizjak@gmail.com>
18486
18487         * config/i386/i386.md (*zero_extendsidi2): Enable alternative (?r, *Yj)
18488         also for 32bit target.  Update insn attributes.
18489         (zero-extendsidi2 splitter): Allow all registers for operand 1.
18490
18491 2017-05-31  Sebastian Peryt  <sebastian.peryt@intel.com>
18492
18493         * config/i386/avx512fintrin.h (_mm_mask_max_sd)
18494         (_mm_maskz_max_sd, _mm_mask_max_ss, _mm_maskz_max_ss)
18495         (_mm_mask_min_sd, _mm_maskz_min_sd, _mm_mask_min_ss)
18496         (_mm_maskz_min_ss): New intrinsics.
18497
18498 2017-05-31  Martin Liska  <mliska@suse.cz>
18499
18500         * tree-vect-loop.c (vect_create_epilog_for_reduction):
18501         Change comment style to one we normally use.
18502         (vectorizable_reduction): Likewise.
18503         (vectorizable_induction): Likewise.
18504         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
18505         (vectorizable_call): Likewise.
18506         (vectorizable_simd_clone_call): Likewise.
18507         (vectorizable_conversion): Likewise.
18508         (vectorizable_assignment): Likewise.
18509         (vectorizable_shift): Likewise.
18510         (vectorizable_operation): Likewise.
18511         (vectorizable_store): Likewise.
18512         (vectorizable_load): Likewise.
18513         * tree-vectorizer.h: Likewise.
18514
18515 2017-05-31  Alexander Monakov  <amonakov@ispras.ru>
18516
18517         * passes.c (emergency_dump_function): New.
18518         * tree-pass.h (emergency_dump_function): Declare.
18519         * plugin.c (plugins_internal_error_function): Remove.
18520         * plugin.h (plugins_internal_error_function): Remove declaration.
18521         * toplev.c (internal_error_function): New static function.  Use it...
18522         (general_init): ...here.
18523
18524 2017-05-31  Graham Markall  <graham.markall@embecosm.com>
18525
18526         * config/arc/arc.c (arc_print_operand): Handle constant operands.
18527         (arc_rtx_costs): Add costs for new patterns.
18528         * config/arc/arc.md: Additional *add_n and *sub_n patterns.
18529         * config/arc/predicates.md: Add _1_2_3_operand predicate.
18530
18531 2017-05-31  Richard Sandiford  <richard.sandiford@linaro.org>
18532
18533         * tree-ssa-strlen.c (get_next_strinfo): New function.
18534         (get_stridx_plus_constant): Use it.
18535         (zero_length_string): Likewise.
18536         (adjust_related_strinfos): Likewise.
18537         (adjust_last_stmt): Likewise.
18538
18539 2017-05-31  Richard Biener  <rguenther@suse.de>
18540
18541         PR target/80880
18542         * config/i386/i386.c (ix86_expand_builtin): Remove assert
18543         for arg being an SSA name when expanding IX86_BUILTIN_BNDRET.
18544
18545 2017-05-31  Richard Sandiford  <richard.sandiford@linaro.org>
18546
18547         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Remove
18548         loop_vinfo argument and use of dependence distance vectors.
18549         Check instead whether the two references differ only in their
18550         initial value and assume that they have the same alignment if the
18551         difference is a multiple of the vector alignment.
18552         (vect_analyze_data_refs_alignment): Update call accordingly.
18553
18554 2017-05-31  Martin Liska  <mliska@suse.cz>
18555
18556         PR target/79155
18557         * config/i386/cpuid.h: Fix typo in a comment in cpuid.h.
18558
18559 2017-05-31  Bin Cheng  <bin.cheng@arm.com>
18560
18561         * tree-vect-loop-manip.c (create_intersect_range_checks_index)
18562         (create_intersect_range_checks): Move from ...
18563         * tree-data-ref.c (create_intersect_range_checks_index)
18564         (create_intersect_range_checks): ... to here.
18565         (create_runtime_alias_checks): New function factored from ...
18566         * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): ...
18567         here.  Call above function.
18568         * tree-data-ref.h (create_runtime_alias_checks): New function.
18569
18570 2017-05-31  Bin Cheng  <bin.cheng@arm.com>
18571
18572         * tree-data-ref.c (prune_runtime_alias_test_list): Relax minimal
18573         segment length for dr_b and compute it in wide_int.
18574
18575 2017-05-31  Richard Biener  <rguenther@suse.de>
18576
18577         PR tree-optimization/80906
18578         * graphite-isl-ast-to-gimple.c (copy_loop_close_phi_nodes): Get
18579         and pass through iv_map.
18580         (copy_bb_and_scalar_dependences): Adjust.
18581         (translate_pending_phi_nodes): Likewise.
18582         (copy_loop_close_phi_args): Handle code-generating IVs instead
18583         of ICEing.
18584
18585 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
18586
18587         * diagnostic-color.c (color_dict): Add "type-diff".
18588         (parse_gcc_colors): Update comment.
18589         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
18590         -fdiagnostics-show-template-tree and -fno-elide-type.
18591         (GCC_COLORS): Add type-diff to example.
18592         (type-diff=): New.
18593         (-fdiagnostics-show-template-tree): New.
18594         (-fno-elide-type): New.
18595         * pretty-print.c (pp_format): Pass quote and formatters[argno] to
18596         the pp_format_decoder callback.  Call any m_format_postprocessor's
18597         "handle" method.
18598         (pretty_printer::pretty_printer): Initialize
18599         m_format_postprocessor.
18600         (pretty_printer::~pretty_printer): Delete any
18601         m_format_postprocessor.
18602         * pretty-print.h (printer_fn): Add bool and const char ** parameters.
18603         (class format_postprocessor): New class.
18604         (struct pretty_printer::format_decoder): Document the new parameters.
18605         (struct pretty_printer::m_format_postprocessor): New field.
18606         * tree-diagnostic.c (default_tree_printer): Update for new
18607         bool and const char ** params.
18608         * tree-diagnostic.h (default_tree_printer): Likewise.
18609
18610 2017-05-30  Segher Boessenkool  <segher@kernel.crashing.org>
18611
18612         * config/rs6000/predicates.md (cc_reg_not_micro_cr0_operand): Delete.
18613         (lwa_operand): Delete rs6000_gen_cell_microcode test.
18614         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
18615         rs6000_gen_cell_microcode code.
18616         (rs6000_final_prescan_insn): Delete.
18617         (rs6000_opt_vars): Delete the "gen-cell-microcode" and
18618         "warn-cell-microcode" entries.
18619         * config/rs6000/rs6000.h (FINAL_PRESCAN_INSN): Delete.
18620         * config/rs6000/rs6000.md: Delete rs6000_gen_cell_microcode tests
18621         throughout.  Change cc_reg_not_micro_cr0_operand to
18622         cc_reg_not_cr0_operand throughout.
18623         (*extendhi<mode>2_noload): Delete.
18624         * config/rs6000/rs6000.opt (mgen-cell-microcode): Replace by stub.
18625         (mwarn-cell-microcode): Delete.
18626         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete
18627         -mgen-cell-microcode and -mwarn-cell-microcode.
18628
18629 2017-05-30  Uros Bizjak  <ubizjak@gmail.com>
18630
18631         PR target/80833
18632         * config/i386/constraints.md (Yd): New constraint.
18633         (Ye): Ditto.
18634         * config/i386/i386.md (*movti_internal): Add (?r, Ye)
18635         and (?Yd, r) alternatives.  Update insn attributes.
18636         * config/i386/i386.md (*movti_internal): Add (?r, *Ye)
18637         and (?*Yd, r) alternatives.  Update insn attributes.
18638         (double-mode inter-unit splitters): Add new GR<->XMM splitters.
18639
18640 2017-05-30  Pierre-Marie de Rodat  <derodat@adacore.com>
18641
18642         * gimplify.c (gimplify_modify_expr): Don't create a
18643         DECL_DEBUG_EXPR link if *FROM_P does not belong to the current
18644         function.
18645
18646 2017-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
18647
18648         * config/arm/arm-builtins.c (arm_expand_builtin): Remove const.
18649
18650 2017-05-30  Richard Biener  <rguenther@suse.de>
18651
18652         * tree-vectorizer.h (struct _stmt_vec_info): Add reduc_type
18653         and reduc_def fields.
18654         (STMT_VINFO_REDUC_TYPE): New define.
18655         (STMT_VINFO_REDUC_DEF): Likewise.
18656         (vect_force_simple_reduction): Adjust prototype.
18657         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Adjust.
18658         (vect_is_simple_reduction): Remove check_reduction argument.
18659         (vect_force_simple_reduction): Adjust and set
18660         STMT_VINFO_REDUC_TYPE and STMT_VINFO_REDUC_DEF.
18661         (vectorizable_reduction): Do not re-do reduction analysis
18662         but use STMT_VINFO_REDUC_TYPE and STMT_VINFO_REDUC_DEF.
18663         * tree-parloops.c (gather_scalar_reductions): Adjust.
18664
18665 2017-05-30  Richard Biener  <rguenther@suse.de>
18666
18667         PR middle-end/80901
18668         * cfgexpand.c (expand_gimple_cond): Match up loop fixup with
18669         split_edge code.
18670
18671 2017-05-24  Robin Dapp  <rdapp@linux.vnet.ibm.com>
18672
18673         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs):
18674         Introduce unknown_misalignment parameter and remove vf.
18675         (vect_peeling_hash_get_lowest_cost):
18676         Pass unknown_misalignment parameter.
18677         (vect_enhance_data_refs_alignment):
18678         Fix unsupportable data ref treatment.
18679
18680 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
18681
18682         * tree-vect-data-refs.c (vect_get_data_access_cost):
18683         Workaround for SLP handling.
18684         (vect_enhance_data_refs_alignment):
18685         Compute costs for doing no peeling at all, compare to the best
18686         peeling costs so far and avoid peeling if cheaper.
18687
18688 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
18689
18690         * tree-vect-data-refs.c (vect_peeling_hash_choose_best_peeling):
18691         Return peeling info and set costs to zero for unlimited cost
18692         model.
18693         (vect_enhance_data_refs_alignment): Also inspect all datarefs
18694         with unknown misalignment. Compute and costs for unknown
18695         misalignment, compare them to the costs for known misalignment
18696         and choose the cheapest for peeling.
18697
18698 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
18699
18700         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Rename.
18701         (vect_get_peeling_costs_all_drs): Create function.
18702         (vect_peeling_hash_get_lowest_cost):
18703         Use vect_get_peeling_costs_all_drs.
18704         (vect_peeling_supportable): Create function.
18705         (vect_enhance_data_refs_alignment): Use vect_peeling_supportable.
18706
18707 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
18708
18709         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Create
18710         DR_HAS_NEGATIVE_STEP.
18711         (vect_update_misalignment_for_peel): Define DR_MISALIGNMENT.
18712         (vect_enhance_data_refs_alignment): Use.
18713         (vect_duplicate_ssa_name_ptr_info): Use.
18714         * tree-vectorizer.h (dr_misalignment): Use.
18715         (known_alignment_for_access_p): Use.
18716
18717 2017-05-30  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
18718
18719         PR target/78838
18720         * config/msp430/msp430.c (gen_prefix): Return NULL when section name is
18721         .lowtext.
18722         (has_section_name): New function.
18723
18724 2017-05-30  Martin Liska  <mliska@suse.cz>
18725
18726         PR other/80909
18727         * auto-profile.c (get_function_decl_from_block): Fix
18728         parenthesis.
18729
18730 2017-05-30  Richard Biener  <rguenther@suse.de>
18731
18732         PR middle-end/80876
18733         * cfgexpand.c (expand_gimple_cond): Fixup preserving loops again.
18734
18735 2017-05-30  Martin Liska  <mliska@suse.cz>
18736
18737         * dumpfile.c: Use newly added macro DUMP_FILE_INFO.
18738         * dumpfile.h (struct dump_file_info): Remove ctors.
18739
18740 2017-05-30  Martin Liska  <mliska@suse.cz>
18741
18742         * predict.def: Fix GNU coding style.
18743
18744 2017-05-29  Max Filippov  <jcmvbkbc@gmail.com>
18745
18746         * config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
18747         Mark 'to' argument with ATTRIBUTE_UNUSED.
18748
18749 2017-05-29  Max Filippov  <jcmvbkbc@gmail.com>
18750
18751         * config/xtensa/xtensa.c (xtensa_emit_call): Use
18752         HOST_WIDE_INT_PRINT_HEX instead of 0x%lx format string.
18753         (print_operand): Use HOST_WIDE_INT_PRINT_DEC instead of %ld
18754         format string.
18755
18756 2017-05-29  Eric Botcazou  <ebotcazou@adacore.com>
18757
18758         * doc/install.texi (Options specification): Restore entry of
18759         --enable-sjlj-exceptions.
18760
18761 2017-05-27  Michael Eager  <eager@eagercon.com>
18762
18763         Revert:
18764         2016-01-21  Ajit Agarwal  <ajitkum@xilinx.com>
18765
18766         See https://gcc.gnu.org/ml/gcc/2017-05/msg00221.html.
18767
18768         * config/microblaze/microblaze.h
18769         (FIXED_REGISTERS): Update in macro.
18770         (CALL_USED_REGISTERS): Update in macro.
18771
18772 2017-05-27  François-Xavier Coudett  <fxcoudert@gcc.gnu.org>
18773
18774         * doc/install.texi: Add links to macOS binary distributions.
18775
18776 2017-05-27  Jakub Jelinek  <jakub@redhat.com>
18777
18778         PR bootstrap/80887
18779         Revert:
18780         2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
18781
18782         * match.pd ((A +- CST1) +- CST2): Allow some conversions.
18783
18784 2017-05-26  Martin Liska  <mliska@suse.cz>
18785
18786         * dumpfile.h (enum dump_kind): Renumber TDF_* flags to be contiguous.
18787
18788 2017-05-26  Martin Liska  <mliska@suse.cz>
18789
18790         * cfg.c (check_bb_profile): Do not use TDF_COMMENT and print
18791         always leading ';; '.
18792         (dump_bb_info): Likewise.
18793         (brief_dump_cfg): Likewise.
18794         * cfgrtl.c (print_rtl_with_bb): Do not use TDF_COMMENT.
18795         * dumpfile.c: Remove usage of TDF_VERBOSE.
18796         * dumpfile.h (enum dump_kind): Likewise.
18797         (dump_gimple_bb_header): Do not use TDF_COMMENT.
18798         * print-tree.c (debug_verbose): Remove.
18799         * tree-cfg.c (gimple_dump_cfg): Do not use TDF_COMMENT.
18800         (dump_function_to_file): Remove dumps guarded with TDF_VERBOSE.
18801         * tree-diagnostic.c (default_tree_printer): Replace
18802         TDF_DIAGNOSTIC with TDF_SLIM.
18803
18804 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
18805
18806         * tree-vect-loop-manip.c (create_intersect_range_checks_index): Pass
18807         in parameter loop, rather than loop_vinfo.
18808         (create_intersect_range_checks): Ditto.
18809         (vect_create_cond_for_alias_checks): Update call to above functions.
18810
18811 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
18812
18813         PR tree-optimization/80815
18814         * tree-data-ref.c (prune_runtime_alias_test_list): Simplify condition
18815         for merging runtime alias checks.  Handle negative DR_STEPs.
18816
18817 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
18818
18819         * tree-vect-data-refs.c (Operator==, comp_dr_with_seg_len_pair):
18820         Move from ...
18821         * tree-data-ref.c (Operator==, comp_dr_with_seg_len_pair): To here.
18822         * tree-vect-data-refs.c (vect_prune_runtime_alias_test_list): Factor
18823         out code pruning runtime alias checks.
18824         * tree-data-ref.c (prune_runtime_alias_test_list): New function
18825         factored out from above.
18826         * tree-vectorizer.h (struct dr_with_seg_len, dr_with_seg_len_pair_t):
18827         Move from ...
18828         * tree-data-ref.h (struct dr_with_seg_len, dr_with_seg_len_pair_t):
18829         ... to here.
18830         (prune_runtime_alias_test_list): New decalaration.
18831
18832 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
18833
18834         * tree-vect-data-refs.c (compare_tree): Rename and move ...
18835         * tree-data-ref.c (data_ref_compare_tree): ... to here.
18836         * tree-data-ref.h (data_ref_compare_tree): New decalaration.
18837         * tree-vect-data-refs.c (dr_group_sort_cmp): Update uses.
18838         (operator==, comp_dr_with_seg_len_pair): Ditto.
18839         (vect_prune_runtime_alias_test_list): Ditto.
18840
18841 2017-05-26  Martin Liska  <mliska@suse.cz>
18842
18843         PR ipa/80663
18844         * params.def: Bound partial-inlining-entry-probability param.
18845
18846 2017-05-26  Marek Polacek  <polacek@redhat.com>
18847
18848         PR sanitizer/80875
18849         * fold-const.c (fold_binary_loc) <case MULT_EXPR>: Check if OP1
18850         can be negated.
18851
18852 2017-05-26  Richard Biener  <rguenther@suse.de>
18853
18854         PR tree-optimization/80842
18855         * tree-ssa-ccp.c (set_lattice_value): Always meet with the old
18856         value.
18857
18858 2017-05-26  Richard Biener  <rguenther@suse.de>
18859
18860         PR tree-optimization/80844
18861         * tree-vectorizer.c (adjust_simduid_builtins): Propagate results.
18862
18863 2017-05-25  Sebastian Peryt  <sebastian.peryt@intel.com>
18864
18865         * doc/md.texi (Machine Constraints): Update x86 family
18866         machine constraints section to match 'config/i386/constraints.md'.
18867
18868 2017-05-25  Volker Reichelt  <v.reichelt@netcologne.de>
18869
18870         * doc/invoke.texi (-Wcatch-value=): Document new warning option.
18871
18872 2017-05-25  Nathan Sidwell  <nathan@acm.org>
18873
18874         * doc/invoke.texi (--enable-languages): Update documentation.
18875
18876 2017-05-25  Martin Liska  <mliska@suse.cz>
18877
18878         * dumpfile.c: Add TDF_FOLDING.
18879         * dumpfile.h (enum dump_kind): Likewise.
18880         * genmatch.c (dt_simplify::gen_1): Use it.
18881
18882 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
18883
18884         * match.pd (view_convert (convert@0 @1)): Handle zero-extension.
18885
18886 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
18887
18888         * match.pd ((A +- CST1) +- CST2): Allow some conversions.
18889         * tree.c (drop_tree_overflow): Handle COMPLEX_CST and VECTOR_CST.
18890
18891 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
18892
18893         * fold-const.c (fold_binary_loc) [(A & C) == D]: Remove transformation.
18894         * match.pd (X == C): Rewrite it here.
18895         (with_possible_nonzero_bits, with_possible_nonzero_bits2,
18896         with_certain_nonzero_bits2): New predicates.
18897         * tree-ssanames.c (get_nonzero_bits): Handle INTEGER_CST.
18898
18899 2017-05-24  Nathan Sidwell  <nathan@acm.org>
18900
18901         * lto-streamer-in.c (lto_input_data_block): Adjust T const cast to
18902         avoid warning.
18903
18904         * auto-profile.c (afdo_propagate): Adjust T const cast to avoid
18905         warning.
18906
18907 2017-05-24  Segher Boessenkool  <segher@kernel.crashing.org>
18908
18909         * config/powerpcspe: New port.  Files are copied from the rs6000
18910         port, with "rs6000" in filenames replaced by "powerpcspe".
18911
18912 2017-05-24  Wilco Dijkstra  <wdijkstr@arm.com>
18913
18914         PR rtl-optimization/80754
18915         * lra-remat.c (do_remat): Add overlap checks for dst_regno.
18916
18917 2017-05-24  Sheldon Lobo  <smlobo@sheldon.us.oracle.com>
18918
18919         * config/sparc/sparc.md (length): Return the correct value for -mflat
18920         sibcalls to match output_sibcall.
18921
18922 2017-05-24  Segher Boessenkool  <segher@kernel.crashing.org>
18923
18924         PR bootstrap/80860
18925         PR bootstrap/80843
18926         * config/rs6000/rs6000.c (struct machine_function): Add new field
18927         n_components.
18928         (rs6000_get_separate_components): Init that field, use it.
18929         (rs6000_components_for_bb): Use the field.
18930
18931 2017-05-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>
18932
18933         * config/arm/arm.c (arm_expand_prologue): Fix typo in comment.
18934
18935 2017-05-24  Peter Bergner  <bergner@vnet.ibm.com>
18936
18937         PR middle-end/80823
18938         * tree-cfg.c (group_case_labels_stmt): Delete increment of "i";
18939
18940 2017-05-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18941
18942         PR target/80725
18943         * config/s390/s390.c (s390_check_qrst_address): Check incoming
18944         address against address_operand predicate.
18945         * config/s390/s390.md ("*indirect_jump"): Swap alternatives.
18946
18947 2017-05-24  Eric Botcazou  <ebotcazou@adacore.com>
18948
18949         * var-tracking.c (track_expr_p): Do not return 0 for tracked record
18950         parameters passed indirectly.
18951
18952 2017-05-23  Uros Bizjak  <ubizjak@gmail.com>
18953
18954         * config/i386/i386.md (*movdi_internal): Remove SSE4
18955         alternative 18 (?r, *v).  Update insn attributes.
18956         (*movsi_internal): Remove SSE4 alternative 13 (?r, *v).
18957         Update insn attributes.
18958         (*zero_extendsidi2): Remove SSE4 alternative (?r, *x).
18959         Update insn attributes.
18960         * config/i386/sse.md (vec_extract<ssevecmodelower>_0): Remove SSE4
18961         alternative 1 (r, v). Remove isa attribute.
18962         * config/i386/i386.c (dimode_scalar_chain::make_vector_copies):
18963         Always move value through stack for !TARGET_INTER_UNIT_MOVES_TO_VEC
18964         and !TARGET_INTER_UNIT_MOVES_TO_VEC targets.
18965
18966 2017-05-23  Tom de Vries  <tom@codesourcery.com>
18967
18968         * doc/sourcebuild.texi (Directives, Verify compiler message): Document
18969         dg-line directive.
18970
18971 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
18972
18973         * cgraphunit.c (symbol_table::process_new_functions): Update.
18974         * ipa-fnsummary.c (pass_data_inline_parameters): Remove.
18975         (inline_generate_summary): Rename to ...
18976         (ipa_fn_summary_generate): ... this one.
18977         (inline_read_summary): Rename to ...
18978         (ipa_fn_summary_read): ... this one.
18979         (inline_write_summary): Rename to ...
18980         (ipa_fn_summary_write): ... this one.
18981         (inline_free_summary): Rename to ...
18982         (ipa_free_fn_summary): ... this one.
18983         (pass_data_local_fn_summary, pass_local_fn_summary,
18984         make_pass_local_fn_summary, pass_data_ipa_free_fn_summary,
18985         pass_ipa_free_fn_summary, make_pass_ipa_free_fn_summary,
18986         pass_data_ipa_fn_summary, pass_ipa_fn_summary,
18987         make_pass_ipa_fn_summary): New.
18988         * ipa-fnsummary.h (inline_generate_summary, inline_read_summary,
18989         inline_write_summary, inline_free_summary): Remove.
18990         (ipa_free_fn_summary) : New.
18991         * ipa-inline.c (ipa_inline): Update.
18992         (pass_ipa_inline): Do not generate summaries.
18993         * ipa.c (pass_data_ipa_free_fn_summary, pass_ipa_free_fn_summary):
18994         Remove.
18995         * passes.def: Replace pass_inline_parameters by pass_local_fn_summary
18996         and add pass_ipa_fn_summary.
18997         * tree-pass.h (make_pass_ipa_fn_summary, make_pass_local_fn_summary):
18998         New.
18999         (make_pass_inline_parameters): Remove.
19000
19001 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
19002
19003         * omp-low.c (struct omp_context): Remove "default_kind" member.
19004         Adjust all users.
19005
19006         * omp-offload.c (execute_oacc_device_lower): Remove the
19007         parallelism dimensions function attributes for unparallelized
19008         OpenACC kernels constructs.
19009
19010 2017-05-23  Martin Liska  <mliska@suse.cz>
19011
19012         * cgraph.c (cgraph_node::get_create): Use symtab_node::dump_{asm_,}name
19013         functions.
19014         (cgraph_edge::make_speculative): Likewise.
19015         (cgraph_edge::resolve_speculation): Likewise.
19016         (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
19017         (cgraph_node::dump): Likewise.
19018         * cgraph.h: Likewise.
19019         * cgraphunit.c (analyze_functions): Likewise.
19020         (symbol_table::compile): Likewise.
19021         * ipa-cp.c (print_all_lattices): Likewise.
19022         (determine_versionability): Likewise.
19023         (initialize_node_lattices): Likewise.
19024         (ipcp_verify_propagated_values): Likewise.
19025         (estimate_local_effects): Likewise.
19026         (update_profiling_info): Likewise.
19027         (create_specialized_node): Likewise.
19028         (perhaps_add_new_callers): Likewise.
19029         (decide_about_value): Likewise.
19030         (decide_whether_version_node): Likewise.
19031         (identify_dead_nodes): Likewise.
19032         (ipcp_store_bits_results): Likewise.
19033         * ipa-devirt.c (dump_targets): Likewise.
19034         (ipa_devirt): Likewise.
19035         * ipa-icf.c (sem_item::dump): Likewise.
19036         (sem_function::equals): Likewise.
19037         (sem_variable::equals): Likewise.
19038         (sem_item_optimizer::read_section): Likewise.
19039         (sem_item_optimizer::execute): Likewise.
19040         (congruence_class::dump): Likewise.
19041         * ipa-inline-analysis.c (dump_ipa_call_summary): Likewise.
19042         (dump_inline_summary): Likewise.
19043         (estimate_node_size_and_time): Likewise.
19044         (inline_analyze_function): Likewise.
19045         * ipa-inline-transform.c (inline_call): Likewise.
19046         * ipa-inline.c (report_inline_failed_reason): Likewise.
19047         (want_early_inline_function_p): Likewise.
19048         (edge_badness): Likewise.
19049         (update_edge_key): Likewise.
19050         (inline_small_functions): Likewise.
19051         * ipa-profile.c (ipa_profile): Likewise.
19052         * ipa-prop.c (ipa_print_node_jump_functions): Likewise.
19053         (ipa_make_edge_direct_to_target): Likewise.
19054         (remove_described_reference): Likewise.
19055         (ipa_impossible_devirt_target): Likewise.
19056         (propagate_controlled_uses): Likewise.
19057         (ipa_print_node_params): Likewise.
19058         (ipcp_transform_function): Likewise.
19059         * ipa-pure-const.c (pure_const_read_summary): Likewise.
19060         (propagate_pure_const): Likewise.
19061         * ipa-reference.c (generate_summary): Likewise.
19062         (read_write_all_from_decl): Likewise.
19063         (propagate): Likewise.
19064         (ipa_reference_read_optimization_summary): Likewise.
19065         * ipa-utils.c (ipa_merge_profiles): Likewise.
19066         * ipa.c (walk_polymorphic_call_targets): Likewise.
19067         (symbol_table::remove_unreachable_nodes): Likewise.
19068         (ipa_single_use): Likewise.
19069         * passes.c (execute_todo): Likewise.
19070         * predict.c (drop_profile): Likewise.
19071         * symtab.c (symtab_node::get_dump_name): New function.
19072         (symtab_node::dump_name): Likewise.
19073         (symtab_node::dump_asm_name): Likewise.
19074         (symtab_node::dump_references): Likewise.
19075         (symtab_node::dump_referring): Likewise.
19076         (symtab_node::dump_base): Likewise.
19077         (symtab_node::debug_symtab): Likewise.
19078         * tree-sra.c (convert_callers_for_node): Likewise.
19079         * tree-ssa-structalias.c (ipa_pta_execute): Likewise.
19080         * value-prof.c (init_node_map): Likewise.
19081
19082 2017-05-23  Martin Liska  <mliska@suse.cz>
19083
19084         * cgraph.h: Move symtab_node::dump_table to symbol_table::dump
19085         and symtab_node::debug_symtab to symbol_table::debug.
19086         * cgraphunit.c (analyze_functions): Use the renamed function.
19087         (symbol_table::compile): Likewise.
19088         * ipa-cp.c (ipcp_verify_propagated_values): Likewise.
19089         * ipa-icf.c (sem_item_optimizer::execute): Likewise.
19090         * passes.c (execute_todo): Likewise.
19091         * symtab.c (symbol_table::dump): New function.
19092         * tree-ssa-structalias.c (ipa_pta_execute): Use the renamed function.
19093
19094 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
19095
19096         * ipa-fnsummary.c (estimate_node_size_and_time): Do not sanity check
19097         that nonconst implies exec.
19098
19099 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
19100
19101         * ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list,
19102         inline_edge_removal_hook, inline_edge_duplication_hook): Remove.
19103         (inline_edge_summary_vec): Turn into ...
19104         (ipa_call_summaries): ... this one.
19105         (redirect_to_unreachable, edge_set_predicate,
19106         evaluate_properties_for_edge, inline_summary_alloc,
19107         reset_ipa_call_summary, reset_inline_summary,
19108         inline_summary_t::duplicate): Update.
19109         (inline_edge_duplication_hook): Turn to ...
19110         (ipa_call_summary_t::duplicate): ... this one.
19111         (inline_edge_removal_hook): Turn to ...
19112         (ipa_call_summary_t::remove): ... this one.
19113         (dump_inline_edge_summary): Turn to ...
19114         (dump_ipa_call_summary): ... this one.
19115         (estimate_function_body_sizes): Update.
19116         (inline_update_callee_summaries): Update.
19117         (remap_edge_change_prob): Update.
19118         (remap_edge_summaries): Update.
19119         (inline_merge_summary): Update.
19120         (do_estimate_edge_time): Update.
19121         (inline_generate_summary): Update.
19122         (inline_read_section): Update.
19123         (inline_read_summary): Update.
19124         (inline_free_summary): Update.
19125         * ipa-inline.c (can_inline_edge_p): Update.
19126         (compute_inlined_call_time): Update.
19127         (want_inline_small_function_p): Update.
19128         (edge_badness): Update.
19129         (early_inliner): Update.
19130         * ipa-inline.h (inline_edge_summary): Turn to ...
19131         (ipa_call_summary): ... this one.
19132         (ipa_call_summary_t): New class.
19133         (inline_edge_summary_t, inline_edge_summary_vec): Remove.
19134         (ipa_call_summaries): New.
19135         (inline_edge_summary): Remove.
19136         (estimate_edge_growth): Update.
19137         * ipa-profile.c (ipa_propagate_frequency_1): Update.
19138         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
19139         * ipa-split.c (execute_split_functions): Update.
19140         * ipa.c (symbol_table::remove_unreachable_nodes): Update.
19141
19142 2017-05-23  Tom de Vries  <tom@codesourcery.com>
19143
19144         * doc/sourcebuild.texi (Effective-Target Keywords, Other hardware
19145         attributes): Document rdrand effective target.
19146
19147 2017-05-23  Tom de Vries  <tom@codesourcery.com>
19148
19149         * doc/sourcebuild.texi (Effective-Target Keywords, Other hardware
19150         attributes): Sort alphabetically.
19151
19152 2017-05-23  Georg-Johann Lay  <avr@gjlay.de>
19153
19154         * config/avr/genmultilib.awk: Use gsub instead of gensub.
19155
19156 2017-05-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
19157
19158         PR target/80718
19159         * config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Split
19160         V2DF/V2DI splat into two separate patterns, one that handles
19161         registers, and the other that only handles memory.  Drop support
19162         for splatting from a GPR on ISA 2.07 and then splitting the
19163         splat into direct move and splat.
19164         (vsx_splat_<mode>_reg): Likewise.
19165         (vsx_splat_<mode>_mem): Likewise.
19166
19167 2017-05-22  Segher Boessenkool  <segher@kernel.crashing.org>
19168
19169         * cfgcleanup.c (bb_is_just_return): Allow CLOBBERs.
19170
19171 2017-05-22  Jakub Jelinek  <jakub@redhat.com>
19172
19173         PR middle-end/80809
19174         * omp-low.c (finish_taskreg_remap): New function.
19175         (finish_taskreg_scan): If unit size of ctx->record_type
19176         is non-constant, unshare the size expression and replace
19177         decls in it with possible outer var refs.
19178
19179         PR middle-end/80809
19180         * gimplify.c (omp_add_variable): For GOVD_DEBUG_PRIVATE use
19181         GOVD_SHARED rather than GOVD_PRIVATE with it.
19182         (gimplify_adjust_omp_clauses_1, gimplify_adjust_omp_clauses): Expect
19183         GOVD_SHARED rather than GOVD_PRIVATE with GOVD_DEBUG_PRIVATE.
19184
19185         PR middle-end/80853
19186         * omp-low.c (lower_reduction_clauses): Pass OMP_CLAUSE_PRIVATE
19187         as last argument to build_outer_var_ref for pointer bases of array
19188         section reductions.
19189
19190 2017-05-19  Martin Sebor  <msebor@redhat.com>
19191
19192         * print-tree.c (print_node): Print DECL_READ_P flag.
19193
19194 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
19195
19196         * Makefile.in: Add ipa-fnsummary.o and ipa-fnsummary.h
19197         * auto-profile.c: Replace ipa-inline.h by ipa-fnsummary.h
19198         * cgraph.c: Likewise.
19199         * cgraphunit.c: Likewise.
19200         * gengtype.c: Likewise.
19201         * ipa-cp.c: Likewise.
19202         * ipa-devirt.c: Likewise.
19203         * ipa-icf.c: Likewise.
19204         * ipa-predicate.c: Likewise.
19205         * ipa-profile.c: Likewise.
19206         * ipa-prop.c: Likewise.
19207         * ipa-split.c: Likewise.
19208         * ipa.c: Likewise.
19209         * ipa-inline-analysis.c (inline_summaries, ipa_call_summaries,
19210         edge_predicate_pool, dump_inline_hints,
19211         inline_summary::account_size_time, redirect_to_unreachable,
19212         edge_set_predicate, set_hint_predicate,
19213         evaluate_conditions_for_known_args, evaluate_properties_for_edge,
19214         inline_summary_alloc, ipa_call_summary::reset, inline_summary::reset,
19215         inline_summary_t::remove, remap_hint_predicate_after_duplication,
19216         inline_summary_t::duplicate, ipa_call_summary_t::duplicate,
19217         ipa_call_summary_t::remove, initialize_growth_caches,
19218         free_growth_caches, dump_ipa_call_summary, dump_inline_summary,
19219         debug_inline_summary, dump_inline_summaries, initialize_inline_failed,
19220         mark_modified, unmodified_parm_1, unmodified_parm,
19221         unmodified_parm_or_parm_agg_item, eliminated_by_inlining_prob,
19222         set_cond_stmt_execution_predicate, set_switch_stmt_execution_predicate,
19223         compute_bb_predicates, will_be_nonconstant_expr_predicate,
19224         will_be_nonconstant_predicate, record_modified_bb_info,
19225         get_minimal_bb, record_modified, param_change_prob,
19226         phi_result_unknown_predicate, predicate_for_phi_result,
19227         array_index_predicate, clobber_only_eh_bb_p, fp_expression_p,
19228         estimate_function_body_sizes, compute_inline_parameters,
19229         compute_inline_parameters_for_curren, pass_data_inline_parameters,
19230         estimate_node_size_and_time, estimate_ipcp_clone_size_and_time,
19231         inline_update_callee_summaries, remap_edge_change_prob,
19232         remap_edge_summaries, remap_hint_predicate, inline_merge_summary,
19233         inline_update_overall_summary, inline_indirect_intraprocedural_analysis,
19234         inline_analyze_function, inline_summary_t::insert,
19235         inline_generate_summary, read_ipa_call_summary, inline_read_section,
19236         inline_read_summary, write_ipa_call_summary, inline_write_summary,
19237         inline_free_summary): Move to ipa-fnsummary.h
19238         (predicate_t): Remove.
19239         * ipa-fnsummary.c: New file.
19240         * ipa-inline.h:  Do not include sreal.h and ipa-predicate.h
19241         (enum inline_hints_vals, inline_hints, agg_position_info,
19242         INLINE_SIZE_SCALE, size_time_entry, inline_summary, inline_summary_t,
19243         inline_summaries, ipa_call_summary, ipa_call_summary_t,
19244         ipa_call_summaries, debug_inline_summary, dump_inline_summaries,
19245         dump_inline_summary, dump_inline_hints, inline_generate_summary,
19246         inline_read_summary, inline_write_summary, inline_free_summary,
19247         inline_analyze_function, initialize_inline_failed,
19248         inline_merge_summary, inline_update_overall_summary,
19249         compute_inline_parameters): Move to ipa-fnsummary.h
19250         * ipa-fnsummary.h: New file.
19251         * ipa-inline-transform.h: Include ipa-inline.h.
19252         * ipa-inline.c: LIkewise.
19253
19254 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
19255
19256         * ipa-inline.c (edge_badness): Use inlined_time instead of
19257         inline_summaries->get.
19258
19259 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
19260
19261         * ipa-inline.c (edge_badness): Use estimate_size_after_inlining.
19262
19263 2017-05-22  Nathan Sidwell  <nathan@acm.org>
19264
19265         * doc/invoke.texi (fdump-translation-unit): Delete documentation.
19266         (fdump-lang): Document 'raw' option.
19267         * dumpfile.h (TDI_tu): Delete.
19268         * dumpfile.c (dump_files): Remove translation-unit.
19269         (FIRST_AUTO_NUMBERED_DUMP): Decrement.
19270
19271 2017-05-22  Georg-Johann Lay  <avr@gjlay.de>
19272
19273         * config/avr/t-avr (AWK) [t-multilib]: Remove "-v FORMAT=Makefile"
19274         command option from $(AWK) call.
19275         * config/avr/genmultilib.awk: Simplify and rewrite so that it
19276         generates MULTILIB_REQUIRED instead of MULTILIB_EXCEPTIONS.
19277         [FORMAT]: Remove handling of variable.
19278         * config/avr/t-multilib: Regenerate.
19279
19280 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
19281
19282         * ipa-inline-analysis.c (inline_summary::reset): Do not reset
19283         self_time.
19284         (dump_inline_summary): Do not print self_time.
19285         (estimate_function_body_sizes): Do not set self_time.
19286         (compute_inline_parameters): Likewise.
19287         (inline_read_section, inline_write_summary): Do not stream self_time.
19288         * ipa-inline.h (inline_summary): Drop self_time.
19289
19290 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
19291
19292         * ipa-inline-analysis.c (account_size_time): Rename to ...
19293         (inline_summary::account_size_time): ... this one.
19294         (reset_ipa_call_summary): Turn to ...
19295         (ipa_call_summary::reset): ... this one.
19296         (reset_inline_summary): Turn to ...
19297         (inline_summary::reset): ... this one.
19298         (inline_summary_t::remove): Update.
19299         (inline_summary_t::duplicate): Update.
19300         (ipa_call_summary_t::remove): Update.
19301         (dump_inline_summary): Update.
19302         (estimate_function_body_sizes): Update.
19303         (compute_inline_parameters): Update.
19304         (estimate_node_size_and_time): Update.
19305         (inline_merge_summary): Update.
19306         (inline_update_overall_summary): Update.
19307         (inline_read_section): Update.
19308         (inline_write_summary): Update.
19309         * ipa-inline.h (inline_summary): Rename entry to size_time_table;
19310         add account_size_time and reset member functions.
19311         (ipa_call_summary): Add reset function.
19312         * ipa-predicate.h (predicate::operator &): Constify.
19313
19314 2017-05-22  Richard Biener  <rguenther@suse.de>
19315
19316         * df-scan.c (df_insn_refs_verify): Speedup when not verifying.
19317
19318 2017-05-19  Jason Merrill  <jason@redhat.com>
19319
19320         * tree.c (make_tree_vec_stat, grow_tree_vec_stat): Use size_t.
19321
19322 2017-05-19  Marek Polacek  <polacek@redhat.com>
19323
19324         PR sanitizer/80800
19325         * fold-const.c (extract_muldiv_1) <case TRUNC_DIV_EXPR>: Add
19326         TYPE_OVERFLOW_WRAPS checks.
19327
19328 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
19329
19330         * tree-core.h (enum omp_clause_default_kind): Add
19331         "OMP_CLAUSE_DEFAULT_PRESENT".
19332         * tree-pretty-print.c (dump_omp_clause): Handle it.
19333         * gimplify.c (enum gimplify_omp_var_data): Add
19334         "GOVD_MAP_FORCE_PRESENT".
19335         (gimplify_adjust_omp_clauses_1): Map it to
19336         "GOMP_MAP_FORCE_PRESENT".
19337         (oacc_default_clause): Handle "OMP_CLAUSE_DEFAULT_PRESENT".
19338
19339         * gimplify.c (oacc_default_clause): Clarify.
19340
19341 2017-05-19  Nathan Sidwell  <nathan@acm.org>
19342
19343         LANG_HOOK_REGISTER_DUMPS
19344         * toplev.c (general_init): Call register dump lang hook.
19345         * doc/invoke.texi: Document -fdump-lang option family.
19346         * dumpfile.c (dump_files): Remove class dump here.
19347         (FIRST_AUTO_NUMBERED_DUMP): Adjust.
19348         * dumpfile.h (tree_dump_index): Remove TDI_class.
19349         * langhooks-def.h (lhd_register_dumps): Declare.
19350         (LANG_HOOKS_REGISTER_DUMPS): Define.
19351         (LANG_HOOKS_INITIALIZER): Add it.
19352         * langhooks.c (lhd_register_dumps): Define.
19353         * langhooks.h (struct lang_hooks): Add register_dumps.
19354
19355 2017-05-19  Nathan Sidwell  <nathan@acm.org>
19356
19357         * context.h (context::set_passes): New.
19358         * context.c (context::context): Do not create pass manager.
19359         * toplev.c (general_init): Create pass manager here.
19360
19361 2017-05-19  Segher Boessenkool  <segher@kernel.crashing.org>
19362
19363         * config/rs6000/rs6000.md (splitter to load of -1 and mask): Don't
19364         use this splitter if two add or or instructions would also work for
19365         the constant we want to generate.
19366
19367 2017-05-19  Richard Biener  <rguenther@suse.de>
19368
19369         PR build/80821
19370         * genmatch.c (dt_node::gen_kids_1): Add missing scope around
19371         predicate evaluation.
19372
19373 2017-05-19  Jan Hubicka  <hubicka@ucw.cz>
19374
19375         * ipa-inline.h (ipa_call_summary): Turn sizes into signed;
19376         add ctor.
19377         * ipa-inline.c (want_inline_small_function_p): Do not cast to
19378         unsigned.
19379
19380 2017-05-19  Jan Hubicka  <hubicka@ucw.cz>
19381
19382         * ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list,
19383         inline_edge_removal_hook, inline_edge_duplication_hook): Remove.
19384         (inline_edge_summary_vec): Turn into ...
19385         (ipa_call_summaries): ... this one.
19386         (redirect_to_unreachable, edge_set_predicate,
19387         evaluate_properties_for_edge, inline_summary_alloc,
19388         reset_ipa_call_summary, reset_inline_summary,
19389         inline_summary_t::duplicate): Update.
19390         (inline_edge_duplication_hook): Turn to ...
19391         (ipa_call_summary_t::duplicate): ... this one.
19392         (inline_edge_removal_hook): Turn to ...
19393         (ipa_call_summary_t::remove): ... this one.
19394         (dump_inline_edge_summary): Turn to ...
19395         (dump_ipa_call_summary): ... this one.
19396         (estimate_function_body_sizes): Update.
19397         (inline_update_callee_summaries): Update.
19398         (remap_edge_change_prob): Update.
19399         (remap_edge_summaries): Update.
19400         (inline_merge_summary): Update.
19401         (do_estimate_edge_time): Update.
19402         (inline_generate_summary): Update.
19403         (inline_read_section): Update.
19404         (inline_read_summary): Update.
19405         (inline_free_summary): Update.
19406         * ipa-inline.c (can_inline_edge_p): Update.
19407         (compute_inlined_call_time): Update.
19408         (want_inline_small_function_p): Update.
19409         (edge_badness): Update.
19410         (early_inliner): Update.
19411         * ipa-inline.h (inline_edge_summary): Turn to ...
19412         (ipa_call_summary): ... this one.
19413         (ipa_call_summary_t): New class.
19414         (inline_edge_summary_t, inline_edge_summary_vec): Remove.
19415         (ipa_call_summaries): New.
19416         (inline_edge_summary): Remove.
19417         (estimate_edge_growth): Update.
19418         * ipa-profile.c (ipa_propagate_frequency_1): Update.
19419         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
19420         * ipa-split.c (execute_split_functions): Update.
19421         * ipa.c (symbol_table::remove_unreachable_nodes): Update.
19422
19423 2017-05-19  Richard Biener  <rguenther@suse.de>
19424
19425         PR middle-end/80764
19426         * cfgexpand.c (expand_gimple_cond): Fix loop fixup.
19427
19428 2017-05-18  Segher Boessenkool  <segher@kernel.crashing.org>
19429
19430         * config/rs6000/rs6000.c (struct machine_function): Add field
19431         fpr_is_wrapped_separately.
19432         (rs6000_get_separate_components): Use 64 components.  Handle the
19433         new FPR components.
19434         (rs6000_components_for_bb): Handle the FPR components.
19435         (rs6000_emit_prologue_components): Handle the FPR components.
19436         (rs6000_emit_epilogue_components): Handle the FPR components.
19437         (rs6000_set_handled_components): Handle the FPR components.
19438         (rs6000_emit_prologue): Don't output prologue code for those FPRs
19439         that are already separately shrink-wrapped.
19440         (rs6000_emit_epilogue): Don't output epilogue code for those FPRs
19441         that are already separately shrink-wrapped.
19442
19443 2017-05-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
19444
19445         PR target/80510
19446         * config/rs6000/predicates.md (simple_offsettable_mem_operand):
19447         New predicate.
19448
19449         * config/rs6000/rs6000.md (ALTIVEC_DFORM): New iterator.
19450         (define_peephole2 for Altivec d-form load): Add peepholes to catch
19451         cases where the register allocator uses a move and an offsettable
19452         memory operation to/from a FPR register on ISA 2.06/2.07.
19453         (define_peephole2 for Altivec d-form store): Likewise.
19454
19455 2017-05-18  Uros Bizjak  <ubizjak@gmail.com>
19456
19457         PR target/80799
19458         * config/i386/mmx.md (*mov<mode>_internal): Enable
19459         alternatives 11, 12, 13 and 14 also for 32bit targets.
19460         Remove alternatives 15, 16, 17 and 18.
19461         * config/i386/sse.md (vec_concatv2di): Change
19462         alternative (!x, *y) to (x, ?!*Yn).
19463
19464 2017-05-18  Paolo Carlini  <paolo.carlini@oracle.com>
19465
19466         * dumpfile.h (enum dump_kind): Remove stray comma.
19467
19468 2017-05-18  Jan Hubicka  <hubicka@ucw.cz>
19469
19470         * Makefile.in: Add ipa-predicate.o and ipa-predicate.h
19471         * ipa-inline-analysis.c (NUM_CONDITIONS): turn into
19472         predicate::num_conditions
19473         (IS_NOT_CONSTANT): turn into predicate::is_not_constant.
19474         (CHANGED): turn into predicate::changed.
19475         (agg_position_info): Move to ipa-predicate.h
19476         (add_condition, predicate::add_clause, predicate::operator &=,
19477         predicate::or_with, predicate::evaluate, predicate::probability,
19478         dump_condition, dump_clause, predicate::dump,
19479         predicate::remap_after_duplication, predicate::remap_after_inlining,
19480         predicate::stream_in, predicate::stream_out): Move to ipa-predicate.c
19481         (evaluate_conditions_for_known_args): Update.
19482         (set_cond_stmt_execution_predicate): Update.
19483         * ipa-inline.h: Include ipa-predicate.h
19484         (condition, inline_param_summary, conditions, agg_position_info,
19485         predicate): Move to ipa-predicate.h
19486         * ipa-predicate.c: New file.
19487         * ipa-predicate.h: New file.
19488
19489 2017-05-18  Wilco Dijkstra  <wdijkstr@arm.com>
19490
19491         * final.c (leaf_function_p): Check we are not in a sequence.
19492
19493 2017-05-18  Martin Liska  <mliska@suse.cz>
19494
19495         * cfgrtl.c (rtl_verify_edges): Remove usage of TDF_RTL.
19496         * dumpfile.c (dump_register): Use new enum dump_kind.
19497         (get_dump_file_name): Likewise.
19498         (dump_enable_all): Likewise.
19499         (dump_switch_p_1): Likewise.
19500         (enable_rtl_dump_file): Remove usage of TDF_RTL.
19501         * dumpfile.h (enum dump_kind): New enum type.
19502         (struct dump_file_info): Create constructor and
19503         format fields and comments.
19504         * passes.c (pass_manager::register_one_dump_file):
19505         Use num dump_kind.
19506         * statistics.c (statistics_early_init): Likewise.
19507         * tree-ssa-loop-prefetch.c (dump_mem_details): Replace
19508         TDF_TREE with TDF_SLIM.
19509         (gather_memory_references_ref): Likewise.
19510
19511 2017-05-18  Martin Liska  <mliska@suse.cz>
19512
19513         * vec.h (struct vnull): Use it.
19514
19515 2017-05-18  Jan Hubicka  <hubicka@ucw.cz>
19516
19517         * ipa-inline-analysis.c (predicate_conditions): Move to ipa-inline.h
19518         (true_predicate, false_predicate, true_predicate_p,
19519         false_predicate_p): Remove.
19520         (single_cond_predicate, not_inlined_predicate): Turn to member function
19521         in ipa-inline.h
19522         (add_condition): Update.
19523         (add_clause): Turn to...
19524         (predicate::add_clause): ... this one; update; allow passing NULL
19525         as parameter.
19526         (and_predicates): Turn to ...
19527         (predicate::operator &=): ... this one.
19528         (predicates_equal_p): Move to predicate::operator == in ipa-inline.h
19529         (or_predicates): Turn to ...
19530         (predicate::or_with): ... this one.
19531         (evaluate_predicate): Turn to ...
19532         (predicate::evaluate): ... this one.
19533         (predicate_probability): Turn to ...
19534         (predicate::probability): ... this one.
19535         (dump_condition): Update.
19536         (dump_predicate): Turn to ...
19537         (predicate::dump): ... this one.
19538         (account_size_time): Update.
19539         (edge_set_predicate): Update.
19540         (set_hint_predicate): UPdate.
19541         (evaluate_conditions_for_known_args): Update.
19542         (evaluate_properties_for_edge): Update.
19543         (remap_predicate_after_duplication): Turn to...
19544         (predicate::remap_after_duplication): ... this one.
19545         (remap_hint_predicate_after_duplication): Update.
19546         (inline_summary_t::duplicate): UPdate.
19547         (dump_inline_edge_summary): Update.
19548         (dump_inline_summary): Update.
19549         (set_cond_stmt_execution_predicate): Update.
19550         (set_switch_stmt_execution_predicate): Update.
19551         (compute_bb_predicates): Update.
19552         (will_be_nonconstant_expr_predicate): Update.
19553         (will_be_nonconstant_predicate): Update.
19554         (phi_result_unknown_predicate): Update.
19555         (predicate_for_phi_result): Update.
19556         (array_index_predicate): Update.
19557         (estimate_function_body_sizes): Update.
19558         (estimate_node_size_and_time): Update.
19559         (estimate_ipcp_clone_size_and_time): Update.
19560         (remap_predicate): Rename to ...
19561         (predicate::remap_after_inlining): ... this one.
19562         (remap_hint_predicate): Update.
19563         (inline_merge_summary): Update.
19564         (inline_update_overall_summary): Update.
19565         (estimate_size_after_inlining): Update.
19566         (read_predicate): Rename to ...
19567         (predicate::stream_in): ... this one.
19568         (read_inline_edge_summary): Update.
19569         (write_predicate): Rename to ...
19570         (predicate::stream_out): ... this one.
19571         (write_inline_edge_summary): Update.
19572         * ipa-inline.h (MAX_CLAUSES): Turn to predicate::max_clauses.
19573         (clause_t): Turn to uint32_t
19574         (predicate): Turn to class; implement constructor and operators
19575         ==, !=, &
19576         (size_time_entry): Update.
19577         (inline_summary): Update.
19578         (inline_edge_summary): Update.
19579
19580 2017-05-18  Marc Glisse  <marc.glisse@inria.fr>
19581
19582         * fold-const.c (fold_binary_loc): Move transformation...
19583         * match.pd (C - X CMP X): ... here.
19584
19585 2017-05-18  Sheldon Lobo  <sheldon.lobo@oracle.com>
19586
19587         * config/sparc/sparc.c (sparc_option_override): Set function
19588         alignment for -mcpu=niagara7 to 64 to match the I$ line.
19589         * config/sparc/sparc.h (BRANCH_COST): Set the SPARC M7 branch
19590         latency to 1.
19591         * config/sparc/sparc.h (BRANCH_COST): Set the SPARC T4 branch
19592         latency to 2.
19593         * config/sparc/sol2.h: Fix a ASM_CPU32_DEFAULT_SPEC typo.
19594
19595 2017-05-18  Marek Polacek  <polacek@redhat.com>
19596
19597         PR sanitizer/80797
19598         * ubsan.c (instrument_null): Unwrap ADDR_EXPRs.
19599         (pass_ubsan::execute): Call gimple_assign_single_p instead of
19600         gimple_assign_load_p.
19601
19602 2017-05-17  Segher Boessenkool  <segher@kernel.crashing.org>
19603
19604         PR middle-end/80692
19605         * real.c (do_compare): Give decimal_do_compare preference over
19606         comparing just the signs.
19607
19608 2017-05-17  Uros Bizjak  <ubizjak@gmail.com>
19609
19610         * doc/md.texi (Canonicalization of Instructions): Describe the
19611         canonical form of instructions that inherently set a condition
19612         code register.
19613
19614 2017-05-17  Peter Bergner  <bergner@vnet.ibm.com>
19615
19616         PR middle-end/80775
19617         * tree-cfg.c: Move deletion of unreachable case statements to after
19618         the merging of consecutive case labels.
19619
19620 2017-05-17  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19621
19622         * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Refer
19623         readers to __gnu_cmse_nonsecure_call libcall for saving, clearing and
19624         restoring of callee-saved registers.
19625
19626 2017-05-17  Eric Botcazou  <ebotcazou@adacore.com>
19627
19628         * compare-elim.c (equivalent_reg_at_start): Adjust outdated comment.
19629         * config/visium/visium.c (single_set_and_flags): Likewise.
19630         * config/visium/visium.md (Substitutions): Likewise.
19631
19632 2017-05-17  Martin Liska  <mliska@suse.cz>
19633
19634         * cfg.c: Introduce dump_flags_t type and
19635         use it instead of int type.
19636         * cfg.h: Likewise.
19637         * cfghooks.c: Likewise.
19638         * cfghooks.h (struct cfg_hooks): Likewise.
19639         * cfgrtl.c: Likewise.
19640         * cfgrtl.h: Likewise.
19641         * cgraph.c (cgraph_node::get_body): Likewise.
19642         * coretypes.h: Likewise.
19643         * domwalk.c: Likewise.
19644         * domwalk.h: Likewise.
19645         * dumpfile.c (struct dump_option_value_info): Likewise.
19646         (dump_enable_all): Likewise.
19647         (dump_switch_p_1): Likewise.
19648         (opt_info_switch_p): Likewise.
19649         * dumpfile.h (enum tree_dump_index): Likewise.
19650         (struct dump_file_info): Likewise.
19651         * genemit.c: Likewise.
19652         * generic-match-head.c: Likewise.
19653         * gengtype.c (open_base_files): Likewise.
19654         * gimple-pretty-print.c: Likewise.
19655         * gimple-pretty-print.h: Likewise.
19656         * graph.c (print_graph_cfg): Likewise.
19657         * graphite-scop-detection.c (dot_all_sese): Likewise.
19658         * ipa-devirt.c (build_type_inheritance_graph): Likewise.
19659         * loop-unroll.c (report_unroll): Likewise.
19660         * passes.c (pass_manager::register_one_dump_file): Likewise.
19661         * print-tree.c: Likewise.
19662         * statistics.c: Likewise.
19663         * tree-cfg.c: Likewise.
19664         * tree-cfg.h: Likewise.
19665         * tree-dfa.c: Likewise.
19666         * tree-dfa.h: Likewise.
19667         * tree-dump.c (dump_function): Likewise.
19668         * tree-dump.h (struct dump_info): Likewise.
19669         * tree-pretty-print.c: Likewise.
19670         * tree-pretty-print.h: Likewise.
19671         * tree-ssa-live.c: Likewise.
19672         * tree-ssa-live.h: Likewise.
19673         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Likewise.
19674         * tree-vect-loop.c: Likewise.
19675         * tree-vect-slp.c: Likewise.
19676
19677 2017-05-16  James Greenhalgh  <james.greenhalgh@arm.com>
19678             Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19679
19680         PR tree-optimization/80457
19681         * tree-vect-stmts.c (vect_model_simple_cost): Model the cost
19682         of all arguments to a statement as scalar_to_vec operations.
19683         (vectorizable_call): Adjust call to vect_model_simple_cost for
19684         new parameter.
19685         (vectorizable_conversion): Likewise.
19686         (vectorizable_assignment): Likewise.
19687         (vectorizable_shift): Likewise.
19688         (vectorizable_operation): Likewise.
19689         (vectorizable_comparison): Likewise.
19690         (vect_is_simple_cond): Record the def types for operands.
19691         (vectorizable_condition): Likewise, call vect_model_simple_cost.
19692         * tree-vectorizer.h (vect_model_simple_cost): Add new parameter
19693         for statement argument count.
19694
19695 2017-05-16  Carl Love  <cel@us.ibm.com>
19696
19697         * config/rs6000/rs6000-c: Add support for built-in functions
19698         vector unsigned long long vec_bperm (vector unsigned long long,
19699                                              vector unsigned char)
19700         vector signed long long vec_mule (vector signed int,
19701                                           vector signed int)
19702         vector unsigned long long vec_mule (vector unsigned int,
19703                                             vector unsigned int)
19704         vector signed long long vec_mulo (vector signed int,
19705                                           vector signed int)
19706         vector unsigned long long vec_mulo (vector unsigned int,
19707                                             vector unsigned int)
19708         vector signed char vec_sldw (vector signed char,
19709                                      vector signed char,
19710                                      const int)
19711         vector unsigned char vec_sldw (vector unsigned char,
19712                                        vector unsigned char,
19713                                        const int)
19714         vector signed short vec_sldw (vector signed short,
19715                                       vector signed short,
19716                                       const int)
19717         vector unsigned short vec_sldw (vector unsigned short,
19718                                         vector unsigned short,
19719                                         const int)
19720         vector signed int vec_sldw (vector signed int,
19721                                     vector signed int,
19722                                     const int)
19723         vector unsigned int vec_sldw (vector unsigned int,
19724                                       vector unsigned int,
19725                                       const int)
19726         vector signed long long vec_sldw (vector signed long long,
19727                                           vector signed long long,
19728                                           const int)
19729         vector unsigned long long vec_sldw (vector unsigned long long,
19730                                             vector unsigned long long,
19731                                             const int)
19732         * config/rs6000/rs6000-c: Add support for built-in functions
19733         * config/rs6000/rs6000-builtin.def: Add definition for SLDW.
19734         * config/rs6000/altivec.h: Add defintion for vec_sldw.
19735         * doc/extend.texi: Update the built-in documentation for the
19736         new built-in functions.
19737
19738 2017-05-16  Marek Polacek  <polacek@redhat.com>
19739
19740         PR sanitizer/80536
19741         PR sanitizer/80386
19742         * tree.c (save_expr): Don't fold the expression.
19743
19744 2017-05-16  Uros Bizjak  <ubizjak@gmail.com>
19745
19746         * config/i386/i386.md (*movsi_internal): Split (?rm,*y) alternative
19747         to (?r,*Yn) and (?m,*y) alternatives, and (?*y,rm) to (?*Ym,r)
19748         and (?*y,m).  Update insn attributes.
19749
19750 2017-05-16  Martin Liska  <mliska@suse.cz>
19751
19752         * cgraph.c (cgraph_edge::resolve_speculation): Add default value for
19753         flags argument of print_gimple_stmt, print_gimple_expr,
19754         print_generic_stmt and print_generic_expr.
19755         * cgraphclones.c (symbol_table::materialize_all_clones): Likewise.
19756         * coretypes.h: Likewise.
19757         * except.c (dump_eh_tree): Likewise.
19758         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
19759         * gimple-pretty-print.h: Likewise.
19760         * gimple-ssa-backprop.c (dump_usage_prefix): Likewise.
19761         (backprop::push_to_worklist): Likewise.
19762         (backprop::pop_from_worklist): Likewise.
19763         (backprop::process_use): Likewise.
19764         (backprop::intersect_uses): Likewise.
19765         (note_replacement): Likewise.
19766         * gimple-ssa-store-merging.c
19767         (pass_store_merging::terminate_all_aliasing_chains): Likewise.
19768         (imm_store_chain_info::coalesce_immediate_stores): Likewise.
19769         (pass_store_merging::execute): Likewise.
19770         * gimple-ssa-strength-reduction.c (dump_candidate): Likewise.
19771         (ssa_base_cand_dump_callback): Likewise.
19772         (dump_incr_vec): Likewise.
19773         (replace_refs): Likewise.
19774         (replace_mult_candidate): Likewise.
19775         (create_add_on_incoming_edge): Likewise.
19776         (create_phi_basis): Likewise.
19777         (insert_initializers): Likewise.
19778         (all_phi_incrs_profitable): Likewise.
19779         (introduce_cast_before_cand): Likewise.
19780         (replace_one_candidate): Likewise.
19781         * gimplify.c (gimplify_expr): Likewise.
19782         * graphite-isl-ast-to-gimple.c (is_valid_rename): Likewise.
19783         (set_rename): Likewise.
19784         (rename_uses): Likewise.
19785         (copy_loop_phi_nodes): Likewise.
19786         (add_close_phis_to_merge_points): Likewise.
19787         (copy_loop_close_phi_args): Likewise.
19788         (copy_cond_phi_args): Likewise.
19789         (graphite_copy_stmts_from_block): Likewise.
19790         (translate_pending_phi_nodes): Likewise.
19791         * graphite-poly.c (print_pdr): Likewise.
19792         (dump_gbb_cases): Likewise.
19793         (dump_gbb_conditions): Likewise.
19794         (print_scop_params): Likewise.
19795         * graphite-scop-detection.c (build_cross_bb_scalars_def): Likewise.
19796         (build_cross_bb_scalars_use): Likewise.
19797         (gather_bbs::before_dom_children): Likewise.
19798         * hsa-dump.c (dump_hsa_immed): Likewise.
19799         * ipa-cp.c (print_ipcp_constant_value): Likewise.
19800         (get_replacement_map): Likewise.
19801         * ipa-inline-analysis.c (dump_condition): Likewise.
19802         (estimate_function_body_sizes): Likewise.
19803         * ipa-polymorphic-call.c (check_stmt_for_type_change): Likewise.
19804         (ipa_polymorphic_call_context::get_dynamic_type): Likewise.
19805         * ipa-prop.c (ipa_dump_param): Likewise.
19806         (ipa_print_node_jump_functions_for_edge): Likewise.
19807         (ipa_modify_call_arguments): Likewise.
19808         (ipa_modify_expr): Likewise.
19809         (ipa_dump_param_adjustments): Likewise.
19810         (ipa_dump_agg_replacement_values): Likewise.
19811         (ipcp_modif_dom_walker::before_dom_children): Likewise.
19812         * ipa-pure-const.c (check_stmt): Likewise.
19813         (pass_nothrow::execute): Likewise.
19814         * ipa-split.c (execute_split_functions): Likewise.
19815         * omp-offload.c (dump_oacc_loop_part): Likewise.
19816         (dump_oacc_loop): Likewise.
19817         * trans-mem.c (tm_log_emit): Likewise.
19818         (tm_memopt_accumulate_memops): Likewise.
19819         (dump_tm_memopt_set): Likewise.
19820         (dump_tm_memopt_transform): Likewise.
19821         * tree-cfg.c (gimple_verify_flow_info): Likewise.
19822         (print_loop): Likewise.
19823         * tree-chkp-opt.c (chkp_print_addr): Likewise.
19824         (chkp_gather_checks_info): Likewise.
19825         (chkp_get_check_result): Likewise.
19826         (chkp_remove_check_if_pass): Likewise.
19827         (chkp_use_outer_bounds_if_possible): Likewise.
19828         (chkp_reduce_bounds_lifetime): Likewise.
19829         * tree-chkp.c (chkp_register_addr_bounds): Likewise.
19830         (chkp_mark_completed_bounds): Likewise.
19831         (chkp_register_incomplete_bounds): Likewise.
19832         (chkp_mark_invalid_bounds): Likewise.
19833         (chkp_maybe_copy_and_register_bounds): Likewise.
19834         (chkp_build_returned_bound): Likewise.
19835         (chkp_get_bound_for_parm): Likewise.
19836         (chkp_build_bndldx): Likewise.
19837         (chkp_get_bounds_by_definition): Likewise.
19838         (chkp_generate_extern_var_bounds): Likewise.
19839         (chkp_get_bounds_for_decl_addr): Likewise.
19840         * tree-chrec.c (chrec_apply): Likewise.
19841         * tree-data-ref.c (dump_data_reference): Likewise.
19842         (dump_subscript): Likewise.
19843         (dump_data_dependence_relation): Likewise.
19844         (analyze_overlapping_iterations): Likewise.
19845         * tree-inline.c (expand_call_inline): Likewise.
19846         (tree_function_versioning): Likewise.
19847         * tree-into-ssa.c (dump_defs_stack): Likewise.
19848         (dump_currdefs): Likewise.
19849         (dump_names_replaced_by): Likewise.
19850         (dump_update_ssa): Likewise.
19851         (update_ssa): Likewise.
19852         * tree-object-size.c (pass_object_sizes::execute): Likewise.
19853         * tree-parloops.c (build_new_reduction): Likewise.
19854         (try_create_reduction_list): Likewise.
19855         (ref_conflicts_with_region): Likewise.
19856         (oacc_entry_exit_ok_1): Likewise.
19857         (oacc_entry_exit_single_gang): Likewise.
19858         * tree-pretty-print.h: Likewise.
19859         * tree-scalar-evolution.c (set_scalar_evolution): Likewise.
19860         (get_scalar_evolution): Likewise.
19861         (add_to_evolution): Likewise.
19862         (get_loop_exit_condition): Likewise.
19863         (analyze_evolution_in_loop): Likewise.
19864         (analyze_initial_condition): Likewise.
19865         (analyze_scalar_evolution): Likewise.
19866         (instantiate_scev): Likewise.
19867         (number_of_latch_executions): Likewise.
19868         (gather_chrec_stats): Likewise.
19869         (final_value_replacement_loop): Likewise.
19870         (scev_const_prop): Likewise.
19871         * tree-sra.c (dump_access): Likewise.
19872         (disqualify_candidate): Likewise.
19873         (create_access): Likewise.
19874         (reject): Likewise.
19875         (maybe_add_sra_candidate): Likewise.
19876         (create_access_replacement): Likewise.
19877         (analyze_access_subtree): Likewise.
19878         (analyze_all_variable_accesses): Likewise.
19879         (sra_modify_assign): Likewise.
19880         (initialize_constant_pool_replacements): Likewise.
19881         (find_param_candidates): Likewise.
19882         (decide_one_param_reduction): Likewise.
19883         (replace_removed_params_ssa_names): Likewise.
19884         * tree-ssa-ccp.c (ccp_fold_stmt): Likewise.
19885         * tree-ssa-copy.c (dump_copy_of): Likewise.
19886         (copy_prop_visit_cond_stmt): Likewise.
19887         * tree-ssa-dce.c (mark_operand_necessary): Likewise.
19888         * tree-ssa-dom.c (pass_dominator::execute): Likewise.
19889         (record_equivalences_from_stmt): Likewise.
19890         * tree-ssa-dse.c (compute_trims): Likewise.
19891         (delete_dead_call): Likewise.
19892         (delete_dead_assignment): Likewise.
19893         * tree-ssa-forwprop.c (forward_propagate_into_gimple_cond): Likewise.
19894         (forward_propagate_into_cond): Likewise.
19895         (pass_forwprop::execute): Likewise.
19896         * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
19897         * tree-ssa-loop-im.c (invariantness_dom_walker::before_dom_children):
19898         Likewise.
19899         (move_computations_worker): Likewise.
19900         (execute_sm): Likewise.
19901         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Likewise.
19902         (remove_exits_and_undefined_stmts): Likewise.
19903         (remove_redundant_iv_tests): Likewise.
19904         * tree-ssa-loop-ivopts.c (dump_use): Likewise.
19905         (adjust_iv_update_pos): Likewise.
19906         * tree-ssa-math-opts.c (bswap_replace): Likewise.
19907         * tree-ssa-phiopt.c (factor_out_conditional_conversion): Likewise.
19908         (value_replacement): Likewise.
19909         * tree-ssa-phiprop.c (phiprop_insert_phi): Likewise.
19910         * tree-ssa-pre.c (print_pre_expr): Likewise.
19911         (get_representative_for): Likewise.
19912         (create_expression_by_pieces): Likewise.
19913         (insert_into_preds_of_block): Likewise.
19914         (eliminate_insert): Likewise.
19915         (eliminate_dom_walker::before_dom_children): Likewise.
19916         (eliminate): Likewise.
19917         (remove_dead_inserted_code): Likewise.
19918         * tree-ssa-propagate.c (substitute_and_fold): Likewise.
19919         * tree-ssa-reassoc.c (get_rank): Likewise.
19920         (eliminate_duplicate_pair): Likewise.
19921         (eliminate_plus_minus_pair): Likewise.
19922         (eliminate_not_pairs): Likewise.
19923         (undistribute_ops_list): Likewise.
19924         (eliminate_redundant_comparison): Likewise.
19925         (update_range_test): Likewise.
19926         (optimize_range_tests_var_bound): Likewise.
19927         (optimize_vec_cond_expr): Likewise.
19928         (rewrite_expr_tree): Likewise.
19929         (rewrite_expr_tree_parallel): Likewise.
19930         (linearize_expr): Likewise.
19931         (break_up_subtract): Likewise.
19932         (linearize_expr_tree): Likewise.
19933         (attempt_builtin_powi): Likewise.
19934         (attempt_builtin_copysign): Likewise.
19935         (transform_stmt_to_copy): Likewise.
19936         (transform_stmt_to_multiply): Likewise.
19937         (dump_ops_vector): Likewise.
19938         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Likewise.
19939         (print_scc): Likewise.
19940         (set_ssa_val_to): Likewise.
19941         (visit_reference_op_store): Likewise.
19942         (visit_use): Likewise.
19943         (sccvn_dom_walker::before_dom_children): Likewise.
19944         (run_scc_vn): Likewise.
19945         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
19946         Likewise.
19947         (expr_hash_elt::print): Likewise.
19948         (const_and_copies::pop_to_marker): Likewise.
19949         (const_and_copies::record_const_or_copy_raw): Likewise.
19950         * tree-ssa-structalias.c (compute_dependence_clique): Likewise.
19951         * tree-ssa-uninit.c (collect_phi_def_edges): Likewise.
19952         (dump_predicates): Likewise.
19953         (find_uninit_use): Likewise.
19954         (warn_uninitialized_phi): Likewise.
19955         (pass_late_warn_uninitialized::execute): Likewise.
19956         * tree-ssa.c (verify_vssa): Likewise.
19957         (verify_ssa): Likewise.
19958         (maybe_optimize_var): Likewise.
19959         * tree-vrp.c (dump_value_range): Likewise.
19960         (dump_all_value_ranges): Likewise.
19961         (dump_asserts_for): Likewise.
19962         (register_edge_assert_for_2): Likewise.
19963         (vrp_visit_cond_stmt): Likewise.
19964         (vrp_visit_switch_stmt): Likewise.
19965         (vrp_visit_stmt): Likewise.
19966         (vrp_visit_phi_node): Likewise.
19967         (simplify_cond_using_ranges_1): Likewise.
19968         (fold_predicate_in): Likewise.
19969         (evrp_dom_walker::before_dom_children): Likewise.
19970         (evrp_dom_walker::push_value_range): Likewise.
19971         (evrp_dom_walker::pop_value_range): Likewise.
19972         (execute_early_vrp): Likewise.
19973
19974 2017-05-16  Richard Biener  <rguenther@suse.de>
19975
19976         * dwarf2out.c (loc_list_from_tree_1): Do not create
19977         DW_OP_GNU_variable_value for DECL_IGNORED_P decls.
19978
19979 2017-05-16  Richard Biener  <rguenther@suse.de>
19980
19981         * dwarf2out.c (resolve_variable_value_in_expr): Lookup DIE
19982         just generated.
19983         (note_variable_value_in_expr): If we resolved the decl ref
19984         do not push to the stack.
19985
19986 2017-05-16  Matthew Wahab  <matthew.wahab@arm.com>
19987
19988         * config/arm/arm_neon.h (vadd_f16): Use standard arithmetic
19989         operations in fast-math mode.
19990         (vaddq_f16): Likewise.
19991         (vmul_f16): Likewise.
19992         (vmulq_f16): Likewise.
19993         (vsub_f16): Likewise.
19994         (vsubq_f16): Likewise.
19995         * config/arm/neon.md (add<mode>3): New.
19996         (sub<mode>3): New.
19997         (fma:<VH:mode>3): New.  Also remove outdated comment.
19998         (mul<mode>3): New.
19999
20000 2017-05-16  Martin Liska  <mliska@suse.cz>
20001
20002         PR ipa/79849.
20003         PR ipa/79850.
20004         * ipa-devirt.c (warn_types_mismatch): Fix typo.
20005         (odr_types_equivalent_p): Likewise.
20006
20007 2017-05-15  Sylvestre Ledru  <sylvestre@debian.org>
20008
20009         * plugin.c (try_init_one_plugin): Fix ressource leaks (CID 726637).
20010
20011 2017-05-15  Uros Bizjak  <ubizjak@gmail.com>
20012
20013         PR target/80425
20014         * config/i386.i386.md (*zero_extendsidi2): Do not penalize
20015         non-interunit SSE move alternatives with '?'.
20016         (zero-extendsidi peephole2): New peephole to skip intermediate
20017         general register in SSE zero-extend sequence.
20018
20019 2017-05-15  Jeff Law  <law@redhat.com>
20020
20021         * reorg.c (relax_delay_slots): Create a new variable to hold
20022         the temporary target rather than clobbering TARGET_LABEL.
20023
20024         * config/tilegx/tilegx.c (tilegx_expand_unaligned_load): Add
20025         missing argument to extract_bit_field call.
20026         * config/tilepro/tilepro.c (tilepro_expand_unaligned_load): Likewise.
20027
20028 2017-05-15  Martin Liska  <mliska@suse.cz>
20029
20030         PR driver/31468
20031         * gcc.c (process_command): Do not allow empty argument of -o option.
20032
20033 2017-05-15  Renlin Li  <renlin.li@arm.com>
20034
20035         * config/aarch64/aarch64-protos.h (aarch64_expand_call): Declare.
20036         * config/aarch64/aarch64.c (aarch64_expand_call): Define.
20037         * config/aarch64/constraints.md (Usf): Add long call check.
20038         * config/aarch64/aarch64.md (call): Use aarch64_expand_call.
20039         (call_value): Likewise.
20040         (sibcall): Likewise.
20041         (sibcall_value): Likewise.
20042         (call_insn): New.
20043         (call_value_insn): New.
20044         (sibcall_insn): Update rtx pattern.
20045         (sibcall_value_insn): Likewise.
20046         (call_internal): Remove.
20047         (call_value_internal): Likewise.
20048         (sibcall_internal): Likewise.
20049         (sibcall_value_internal): Likewise.
20050         (call_reg): Likewise.
20051         (call_symbol): Likewise.
20052         (call_value_reg): Likewise.
20053         (call_value_symbol): Likewise.
20054
20055 2017-05-14  Krister Walfridsson  <krister.walfridsson@gmail.com>
20056
20057         PR target/80600
20058         * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always add -lgcc.
20059
20060 2017-05-14  Uros Bizjak  <ubizjak@gmail.com>
20061
20062         * config/i386.i386.c (ix86_cc_modes_compatible): CCNOmode is
20063         compatible with CCGOCmode and with CCZmode.
20064
20065 2017-05-14  Martin Sebor  <msebor@redhat.com>
20066
20067         PR middle-end/77671
20068         * gimple-fold.c (gimple_fold_builtin_sprintf): Make extern.
20069         (gimple_fold_builtin_snprintf): Same.
20070         * gimple-fold.h (gimple_fold_builtin_sprintf): Declare.
20071         (gimple_fold_builtin_snprintf): Same.
20072         * gimple-ssa-sprintf.c (get_format_string): Correct the detection
20073         of character types.
20074         (is_call_safe): New function.
20075         (try_substitute_return_value): Call it.
20076         (try_simplify_call): New function.
20077         (pass_sprintf_length::handle_gimple_call): Call it.
20078
20079 2017-05-14  Martin Sebor  <msebor@redhat.com>
20080
20081         PR middle-end/80669
20082         * builtins.c (expand_builtin_stpncpy): Simplify.
20083
20084 2017-05-14  Daniel Santos  <daniel.santos@pobox.com>
20085
20086         * config/i386/i386.opt: Add option -mcall-ms2sysv-xlogues.
20087         * config/i386/i386.h
20088         (x86_64_ms_sysv_extra_clobbered_registers): Change type to unsigned.
20089         (NUM_X86_64_MS_CLOBBERED_REGS): New macro.
20090         (struct machine_function): Add new members call_ms2sysv,
20091         call_ms2sysv_pad_in, call_ms2sysv_pad_out and call_ms2sysv_extra_regs.
20092         (struct machine_frame_state): New fields sp_realigned and
20093         sp_realigned_offset.
20094         * config/i386/i386.c
20095         (enum xlogue_stub): New enum.
20096         (enum xlogue_stub_sets): New enum.
20097         (class xlogue_layout): New class.
20098         (struct ix86_frame): New fields stack_realign_allocate_offset,
20099         stack_realign_offset and outlined_save_offset.  Modify comments to
20100         detail stack layout when using out-of-line stubs.
20101         (ix86_target_string): Add -mcall-ms2sysv-xlogues option.
20102         (ix86_option_override_internal): Add sorry() for TARGET_SEH and
20103         -mcall-ms2sysv-xlogues.
20104         (stub_managed_regs): New static variable.
20105         (ix86_save_reg): Add new parameter ignore_outlined to optionally omit
20106         registers managed by out-of-line stub.
20107         (disable_call_ms2sysv_xlogues): New function.
20108         (ix86_compute_frame_layout): Modify re-alignment calculations, disable
20109         m->call_ms2sysv when appropriate and compute frame layout for
20110         out-of-line stubs.
20111         (sp_valid_at, fp_valid_at): New inline functions.
20112         (choose_basereg): New function.
20113         (choose_baseaddr): Add align parameter, use choose_basereg and modify
20114         all callers.
20115         (ix86_emit_save_reg_using_mov, ix86_emit_restore_sse_regs_using_mov):
20116         Use align parameter of choose_baseaddr to generated aligned SSE movs
20117         when possible.
20118         (pro_epilogue_adjust_stack): Modify to track
20119         machine_frame_state::sp_realigned.
20120         (ix86_nsaved_regs): Modify to accommodate changes to ix86_save_reg.
20121         (ix86_nsaved_sseregs): Likewise.
20122         (ix86_emit_save_regs): Likewise.
20123         (ix86_emit_save_regs_using_mov): Likewise.
20124         (ix86_emit_save_sse_regs_using_mov): Likewise.
20125         (get_scratch_register_on_entry): Likewise.
20126         (gen_frame_set): New function.
20127         (gen_frame_load): Likewise.
20128         (gen_frame_store): Likewise.
20129         (emit_outlined_ms2sysv_save): Likewise.
20130         (emit_outlined_ms2sysv_restore): Likewise.
20131         (ix86_expand_prologue): Modify stack re-alignment code and call
20132         emit_outlined_ms2sysv_save when appropriate.
20133         (ix86_emit_leave): Clear machine_frame_state::sp_realigned.  Add
20134         parameter rtx_insn *insn, which allows the function to be used to only
20135         generate the notes.
20136         (ix86_expand_epilogue): Modify validity checks of frame and stack
20137         pointers, and call emit_outlined_ms2sysv_restore when appropriate.
20138         (ix86_expand_call): Modify to enable m->call_ms2sysv when appropriate.
20139         * config/i386/predicates.md
20140         (save_multiple): New predicate.
20141         (restore_multiple): Likewise.
20142         * config/i386/sse.md
20143         (save_multiple<mode>): New pattern.
20144         (save_multiple_realign<mode>): Likewise.
20145         (restore_multiple<mode>): Likewise.
20146         (restore_multiple_and_return<mode>): Likewise.
20147         (restore_multiple_leave_return<mode>): Likewise.
20148         * Makefile.in: Export HOSTCXX and HOSTCXXFLAGS to site.exp
20149
20150 2017-05-14  Julia Koval  <julia.koval@intel.com>
20151
20152         * config/i386/i386-builtin-types.def (VOID_FTYPE_INT_INT64): New type.
20153         * config/i386/i386-builtin.def (__builtin_ia32_xgetbv)
20154         (__builtin_ia32_xsetbv): New builtins.
20155         * config/i386/i386.c (ix86_expand_special_args_builtin):
20156         Process new types.
20157         (ix86_expand_builtin): Special expand for new intrinsics.
20158         * config/i386/i386.md (UNSPECV_XGETBV, UNSPECV_XSETBV): New.
20159         (xsetbv, xsetbv_rex64, xgetbv, xgetbv_rex64): New insn patterns.
20160         * config/i386/xsaveintrin.h (_xsetbv, _getbv): New intrinsics.
20161
20162 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20163
20164         * cfganal.c (inverted_post_order_compute): Change argument type
20165         to vec *.
20166         * cfganal.h (inverted_post_order_compute): Adjust prototype.
20167         * df-core.c (rest_of_handle_df_initialize): Adjust.
20168         (rest_of_handle_df_finish): Likewise.
20169         (df_analyze_1): Likewise.
20170         (df_analyze): Likewise.
20171         (loop_inverted_post_order_compute): Change argument to be a vec *.
20172         (df_analyze_loop): Adjust.
20173         (df_get_n_blocks): Likewise.
20174         (df_get_postorder): Likewise.
20175         * df.h (struct df_d): Change field to be a vec.
20176         * lcm.c (compute_laterin): Adjust.
20177         (compute_available): Likewise.
20178         * lra-lives.c (lra_create_live_ranges_1): Likewise.
20179         * tree-ssa-dce.c (remove_dead_stmt): Likewise.
20180         * tree-ssa-pre.c (compute_antic): Likewise.
20181
20182 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20183
20184         * cfganal.c (connect_infinite_loops_to_exit): Adjust.
20185         (depth_first_search::depth_first_search): Change structure init
20186         function to this constructor.
20187         (depth_first_search::add_bb): Rename function to this member.
20188         (depth_first_search::execute): Likewise.
20189         (flow_dfs_compute_reverse_finish): Adjust.
20190
20191 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20192
20193         * ddg.c (find_nodes_on_paths): Use auto_sbitmap.
20194         (longest_simple_path): Likewise.
20195         * shrink-wrap.c (spread_components): Likewise.
20196         (disqualify_problematic_components): Likewise.
20197         (emit_common_heads_for_components): Likewise.
20198         (emit_common_tails_for_components): Likewise.
20199         (insert_prologue_epilogue_for_components): Likewise.
20200
20201 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20202
20203         * tree-ssa-dse.c (dse_dom_walker): Make m_live_byes a
20204         auto_sbitmap.
20205
20206 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20207
20208         * df-core.c (df_set_blocks): Start using auto_bitmap.
20209         (df_compact_blocks): Likewise.
20210         * df-problems.c (df_rd_confluence_n): Likewise.
20211         * df-scan.c (df_insn_rescan_all): Likewise.
20212         (df_process_deferred_rescans): Likewise.
20213         (df_update_entry_block_defs): Likewise.
20214         (df_update_exit_block_uses): Likewise.
20215         (df_entry_block_bitmap_verify): Likewise.
20216         (df_exit_block_bitmap_verify): Likewise.
20217         (df_scan_verify): Likewise.
20218         * lra-constraints.c (lra_constraints): Likewise.
20219         (undo_optional_reloads): Likewise.
20220         (lra_undo_inheritance): Likewise.
20221         * lra-remat.c (calculate_gen_cands): Likewise.
20222         (do_remat): Likewise.
20223         * lra-spills.c (assign_spill_hard_regs): Likewise.
20224         (spill_pseudos): Likewise.
20225         * tree-ssa-pre.c (bitmap_set_and): Likewise.
20226         (bitmap_set_subtract_values): Likewise.
20227
20228 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20229
20230         * haifa-sched.c (estimate_shadow_tick): Replace manual bitmap
20231         management with auto_bitmap.
20232         (fix_inter_tick): Likewise.
20233         (fix_recovery_deps): Likewise.
20234         * ira.c (add_store_equivs): Likewise.
20235         (find_moveable_pseudos): Likewise.
20236         (split_live_ranges_for_shrink_wrap): Likewise.
20237         * print-rtl.c (rtx_reuse_manager::rtx_reuse_manager): Likewise.
20238         (rtx_reuse_manager::seen_def_p): Likewise.
20239         (rtx_reuse_manager::set_seen_def): Likewise.
20240         * print-rtl.h (class rtx_reuse_manager): Likewise.
20241
20242 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20243
20244         * bt-load.c (combine_btr_defs): Use auto_bitmap to manage bitmap
20245         lifetime.
20246         (migrate_btr_def): Likewise.
20247         * cfgloop.c (get_loop_body_in_bfs_order): Likewise.
20248         * df-core.c (loop_post_order_compute): Likewise.
20249         (loop_inverted_post_order_compute): Likewise.
20250         * hsa-common.h: Likewise.
20251         * hsa-gen.c (hsa_bb::~hsa_bb): Likewise.
20252         * init-regs.c (initialize_uninitialized_regs): Likewise.
20253         * ipa-inline.c (resolve_noninline_speculation): Likewise.
20254         (inline_small_functions): Likewise.
20255         * ipa-reference.c (ipa_reference_write_optimization_summary): Likewise.
20256         * ira.c (combine_and_move_insns): Likewise.
20257         (build_insn_chain): Likewise.
20258         * loop-invariant.c (find_invariants): Likewise.
20259         * lower-subreg.c (propagate_pseudo_copies): Likewise.
20260         * predict.c (tree_predict_by_opcode): Likewise.
20261         (predict_paths_leading_to): Likewise.
20262         (predict_paths_leading_to_edge): Likewise.
20263         (estimate_loops_at_level): Likewise.
20264         (estimate_loops): Likewise.
20265         * shrink-wrap.c (try_shrink_wrapping): Likewise.
20266         (spread_components): Likewise.
20267         * tree-cfg.c (remove_edge_and_dominated_blocks): Likewise.
20268         * tree-loop-distribution.c (rdg_build_partitions): Likewise.
20269         * tree-predcom.c (tree_predictive_commoning_loop): Likewise.
20270         * tree-ssa-coalesce.c (coalesce_ssa_name): Likewise.
20271         * tree-ssa-phionlycprop.c (pass_phi_only_cprop::execute): Likewise.
20272         * tree-ssa-pre.c (remove_dead_inserted_code): Likewise.
20273         * tree-ssa-sink.c (nearest_common_dominator_of_uses): Likewise.
20274         * tree-ssa-threadupdate.c (compute_path_counts): Likewise.
20275         (mark_threaded_blocks): Likewise.
20276         (thread_through_all_blocks): Likewise.
20277         * tree-ssa.c (verify_ssa): Likewise.
20278         (execute_update_addresses_taken): Likewise.
20279         * tree-ssanames.c (verify_ssaname_freelists): Likewise.
20280
20281 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20282
20283         * cfganal.c (mark_dfs_back_edges): Replace manual stack with
20284         auto_vec.
20285         (post_order_compute): Likewise.
20286         (inverted_post_order_compute): Likewise.
20287         (pre_and_rev_post_order_compute_fn): Likewise.
20288
20289 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20290
20291         * genrecog.c (int_set::int_set): Explicitly construct our
20292         auto_vec base class.
20293         * vec.h (auto_vec::auto_vec): New constructor.
20294
20295 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20296
20297         * bitmap.h (class auto_bitmap): New constructor taking
20298         bitmap_obstack * argument.
20299
20300 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20301
20302         * bitmap.h (class auto_bitmap): Change type of m_bits to
20303         bitmap_head, and adjust ctor / dtor and member operators.
20304
20305 2017-05-13  Uros Bizjak  <ubizjak@gmail.com>
20306
20307         * compare-elim.c (equivalent_reg_at_start): Return NULL_RTX
20308         when returned register mode doesn't match original mode.
20309
20310 2017-05-12  Jeff Law  <law@redhat.com>
20311             Jakub Jelinek  <jakub@redhat.com>
20312
20313         * config/mn10300/mn10300.c (mn10300_match_ccmode): Fix where
20314         we look for cc setter after the compare-elim changes.
20315         * config/mn10300/mn10300.md (addsi3_flags): Fix order of patterns
20316         within the vector to match what compare-elim now expects.
20317         (subsi3_flags, andsi3_flags, iorsi3_flags): Likewise.
20318         (xorsi3_flags, one_cmplsi2_flags): Likewise.
20319
20320         * config/rx/rx.c (rx_match_ccmode): Fix where we look cc setter
20321         after the compare-elim changes.
20322         * config/rx/rx.md (abssi2_flags): Fix order of patterns within
20323         the vector to match what compare-elim now expects.
20324         (addsi3_flags, adc_flags, addsi3_flags peepholes): Likewise.
20325         (andsi3_flags, negsi2_flags, one_cmplsi2_flags): Likewise.
20326         (iorsi3_flags, rotlsi3_flags, rotrsi3_flags): Likewise.
20327         (ashrsi3_flags, lshrsi3_flags, ashlsi3_flags): Likewise.
20328         (ssaddsi3, subsi3_flags, sbb_flags, xorsi3_flags): Likewise.
20329
20330         * config/visium/visium.c (single_set_and_flags): Fix where
20331         we look for cc setter after the compare-elim changes.
20332         * config/visium/visium.md (flags_subst_logic): Fix order of patterns
20333         with the vector to match what compare-elim now expects.
20334         (flags_subst_arith, add<mode>3_insn_set_carry): Likewise.
20335         (add<mode>3_insn_set_overflow, addsi3_insn_set_carry): Likewise.
20336         (addsi3_insn_set_overflow, sub<mode>3_insn_set_carry): Likewise.
20337         (sub<mode>3_insn_set_overflow, subsi3_insn_set_carry): Likewise.
20338         (subsi3_insn_set_overflow, negsi2_insn_set_carry): Likewise.
20339         (neg<mode>2_insn_set_overflow): Likewise.
20340
20341 2017-05-12  Jim Wilson  <jim.wilson@linaro.org>
20342
20343         PR middle-end/79794
20344         * expmed.c (extract_bit_field_1): Add alt_rtl argument.  Before
20345         maybe_expand_insn call, set ops[0].target.  If still set after call,
20346         set alt_rtl.  Add extra arg to recursive calls.
20347         (extract_bit_field): Add alt_rtl argument.  Pass to
20348         extract_bit_field.
20349         * expmed.h (extract_bit_field): Fix prototype.
20350         * expr.c (emit_group_load_1, copy_blkmode_from_reg)
20351         (copy_blkmode_to_reg, read_complex_part, store_field): Pass extra NULL
20352         to extract_bit_field_calls.
20353         (expand_expr_real_1): Pass alt_rtl to expand_expr_real instead of 0.
20354         Pass alt_rtl to extract_bit_field calls.
20355         * calls.c (store_unaligned_arguments_into_psuedos)
20356         load_register_parameters): Pass extra NULL to extract_bit_field calls.
20357         * optabs.c (maybe_legitimize_operand): Clear op->target when call
20358         gen_reg_rtx.
20359         * optabs.h (struct expand_operand): Add target bitfield.
20360
20361 2017-05-12  Uros Bizjak  <ubizjak@gmail.com>
20362
20363         * compare-elim.c (try_eliminate_compare): Canonicalize
20364         operation with embedded compare to
20365         [(set (reg:CCM) (compare:CCM (operation) (immediate)))
20366          (set (reg) (operation)].
20367
20368         * config/i386/i386.c (TARGET_FLAGS_REGNUM): New define.
20369
20370 2017-05-12  Uros Bizjak  <ubizjak@gmail.com>
20371
20372         PR target/80723
20373         * config/i386/i386.c (ix86_rtx_cost) [case PLUS]: Ignore the
20374         cost of adding a carry flag for ADC instruction.
20375         [case MINUS]: Ignore the cost of subtracting a carry flag
20376         for SBB instruction.
20377
20378 2017-05-12  Steven Munroe  <munroesj@gcc.gnu.org>
20379
20380         * config.gcc (powerpc*-*-*): Add bmi2intrin.h, bmiintrin.h,
20381         and x86intrin.h
20382         * config/rs6000/bmiintrin.h: New file.
20383         * config/rs6000/bmi2intrin.h: New file.
20384         * config/rs6000/x86intrin.h: New file.
20385
20386 2017-05-12  Jeff Law  <law@redhat.com>
20387
20388         * tree-vrp.c (vrp_dom_walker::before_dom_children): Push unwinding
20389         markers.
20390
20391 2017-05-12  Peter Bergner  <bergner@vnet.ibm.com>
20392
20393         PR middle-end/80707
20394         * tree-cfg.c: Remove cfg edges of unreachable case statements.
20395
20396 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
20397
20398         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
20399         early expansion of vector divide builtins.
20400         (builtin_function_type): Add VSX_BUILTIN_UDIV_V2DI to the list of
20401         builtins identified as having unsigned arguments.
20402
20403 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
20404
20405         * config/rs6000/rs6000.c (gimple-fold.h): New #include.
20406         (rs6000_gimple_fold_builtin): Add handling for early GIMPLE
20407         expansion of vector logical operations (and, andc, or, xor,
20408         nor, orc, nand).
20409
20410 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
20411
20412         * gimple-fold.c (create_tmp_reg_or_ssa_name): Remove static declaration.
20413         * gimple-fold.h (create_tmp_reg_or_ssa_name): New prototype.
20414
20415 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
20416
20417         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
20418         early GIMPLE expansion of vector multiplies.
20419
20420 2017-05-12  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
20421
20422         * config/arm/arm.md (movsi): Add TARGET_32BIT in addition to the
20423         TARGET_HAVE_MOVT conditional.
20424         (movt splitter): Likewise.
20425
20426 2017-05-12  Richard Biener  <rguenther@suse.de>
20427
20428         * tree-ssa-sccvn.h (has_VN_INFO): Declare.
20429         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
20430         Fold all stmts not inplace.
20431
20432 2017-05-12  Richard Biener  <rguenther@suse.de>
20433
20434         PR tree-optimization/80713
20435         * tree-ssa-pre.c (remove_dead_inserted_code): Clear
20436         inserted_exprs bit for not removed stmts.
20437
20438 2017-05-12  Thomas Schwinge  <thomas@codesourcery.com>
20439
20440         PR middle-end/69921
20441         * tree-parloops.c (create_parallel_loop): Set "oacc kernels
20442         parallelized" attribute for parallelized OpenACC kernels.
20443         * omp-offload.c (execute_oacc_device_lower): Use it.
20444
20445         * omp-expand.c (expand_omp_target) <GF_OMP_TARGET_KIND_OACC_KERNELS>:
20446         Set "oacc kernels" attribute.
20447         * omp-general.c (oacc_set_fn_attrib): Remove is_kernel formal
20448         parameter.  Adjust all users.
20449         (oacc_fn_attrib_kernels_p): Remove function.
20450         * omp-offload.c (execute_oacc_device_lower): Look for "oacc
20451         kernels" attribute instead of calling oacc_fn_attrib_kernels_p.
20452         * tree-ssa-loop.c (gate_oacc_kernels): Likewise.
20453         * tree-parloops.c (create_parallel_loop): If oacc_kernels_p,
20454         assert "oacc kernels" attribute is set.
20455
20456 2017-05-11  Carl Love  <cel@us.ibm.com>
20457
20458         * config/rs6000/rs6000-c: Add support for built-in functions
20459         vector unsigned char vec_popcnt (vector signed char)
20460         vector unsigned char vec_popcnt (vector unsigned char)
20461         vector unsigned short vec_popcnt (vector signed short)
20462         vector unsigned short vec_popcnt (vector unsigned short)
20463         vector unsigned int vec_popcnt (vector signed int)
20464         vector unsigned int vec_popcnt (vector unsigned int)
20465         vector unsigned long long vec_popcnt (vector signed long long)
20466         vector unsigned long long vec_popcnt (vector unsigned long long)
20467         vector signed long long vec_slo (vector signed long long,
20468                                          vector signed char)
20469         vector signed long long vec_slo (vector signed long long,
20470                                          vector unsigned char)
20471         vector unsigned long long vec_slo (vector unsigned long long,
20472                                            vector signed char)
20473         vector unsigned long long vec_slo (vector unsigned long long,
20474                                            vector unsigned char)
20475         * config/rs6000/rs6000-builtin.def: Add definitions for VPOPCNTUB,
20476         VPOPCNTUH, VPOPCNTUW, and VPOPCNTUD overloads.
20477         * config/rs6000/altivec.h: Add define for vec_popcnt, vec_popcntb,
20478         vec_popcnth, vec_popcntw and vec_popcntd built-in functions.
20479         * doc/extend.texi: Update the built-in documentation file for the
20480         new built-in functions.
20481
20482 2017-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
20483
20484         * attribs.h (sorted_attr_string): Move machine independent
20485         functions for target clone support from the i386 port to common
20486         code.  Rename ix86_function_versions to common_function_versions.
20487         Rename make_name to make_unique_name.
20488         (common_function_versions): Likewise.
20489         (make_unique_name): Likewise.
20490         (make_dispatcher_decl): Likewise.
20491         (is_function_default_version): Likewise.
20492         * attribs.c (attr_strcmp): Likewise.
20493         (sorted_attr_string): Likewise.
20494         (common_function_versions): Likewise.
20495         (make_unique_name): Likewise.
20496         (make_dispatcher_decl): Likewise.
20497         (is_function_default_version): Likewise.
20498         * config/i386/i386.c (attr_strcmp): Likewise.
20499         (sorted_attr_string): Likewise.
20500         (ix86_function_versions): Likewise.
20501         (make_name): Likewise.
20502         (make_dispatcher_decl): Likewise.
20503         (is_function_default_version): Likewise.
20504         (TARGET_OPTION_FUNCTION_VERSIONS): Update target function hook.
20505
20506 2017-05-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20507
20508         PR target/80695
20509         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
20510         Account for direct move costs for vec_construct of integer
20511         vectors.
20512
20513 2017-05-11  Uros Bizjak  <ubizjak@gmail.com>
20514
20515         PR target/80706
20516         * config/i386/sync.md (UNSPEC_LDX_ATOMIC): New unspec.
20517         (UNSPEC_STX_ATOMIC): Ditto.
20518         (loaddi_via_sse): New insn.
20519         (storedi_via_sse): Ditto.
20520         (atomic_loaddi_fpu): Emit loaddi_via_sse and storedi_via_sse.
20521         Update corresponding peephole2 patterns.
20522         (atomic_storedi_fpu): Ditto.
20523
20524 2017-05-11  Julia Koval  <julia.koval@intel.com>
20525
20526         * config/i386/avx512fintrin.h (_mm_mask_rsqrt14_sd)
20527         (_mm_maskz_rsqrt14_sd, _mm_mask_rsqrt14_ss, _mm_maskz_rsqrt14_ss):
20528         New intrinsics.
20529         * config/i386/i386-builtin.def (__builtin_ia32_rsqrt14sd_mask)
20530         (__builtin_ia32_rsqrt14ss_mask): New builtins.
20531         * config/i386/sse.md (rsqrt14_<mode>_mask): New pattern.
20532
20533 2017-05-11  Nathan Sidwell  <nathan@acm.org>
20534
20535         * graphite-poly.c: Include dumpfile.h.
20536
20537         * dumpfle.h (dump_function): Declare here ...
20538         * tree-dump.h (dump_function): ... not here.
20539         * dumpfile.c: #include tree-cfg.h.
20540         (dump_function): Move here from ...
20541         * tree-dump.c (dump_function): ... here.
20542         * gimplify.c: #include splay-tree.h, not tree-dump.h.
20543         * graphite-poly.c: Don't include tree-dump.h.
20544         * cgraphclones.c: Include dumpfile.h not tree-dump.h.
20545         * print-tree.c: Likewise.
20546         * stor-layout.c: Likewise.
20547         * tree-nested.c: Likewise.
20548
20549         * dumpfile.c (dump_start): Use TDF_FLAGS.
20550         (dump_enable_all): Fix TDF_KIND check thinko.
20551
20552 2017-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20553
20554         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
20555         array entries to represent two legal parameterizations of the
20556         overloaded __builtin_cmpb function, as represented by the
20557         P6_OV_BUILTIN_CMPB constant.
20558         (altivec_resolve_overloaded_builtin): Add special case handling
20559         for the __builtin_cmpb function, as represented by the
20560         P6_OV_BUILTIN_CMPB constant.
20561         * config/rs6000/rs6000-builtin.def (BU_P6_2): New macro.
20562         (BU_P6_64BIT_2): New macro.
20563         (BU_P6_OVERLOAD_2): New macro
20564         (CMPB_32): Add 32-bit compare-bytes support for 32-bit only targets.
20565         (CMPB): Add 64-bit compare-bytes support for 32-bit and 64-bit targets.
20566         (CMPB): Add overload support to represent both 32-bit and 64-bit
20567         compare-bytes function.
20568         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
20569         support for TARGET_CMPB.
20570         * config/rs6000/rs6000.h: Add support for RS6000_BTM_CMPB.
20571         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
20572         documentation of the __builtin_cmpb overloaded built-in function.
20573
20574 2017-05-11  Richard Biener  <rguenther@suse.de>
20575
20576         PR tree-optimization/80705
20577         * tree-vect-data-refs.c (vect_analyze_data_refs): DECL_NONALIASED
20578         bases are not vectorizable.
20579
20580 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20581
20582         * tree-ssa-loop-ivopts.c (determine_set_costs): Skip non-interger
20583         when counting register pressure.
20584
20585 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20586
20587         * tree-ssa-loop-ivopts.c (compare_cost_pair): New.
20588         (iv_ca_more_deps): Renamed to ...
20589         (iv_ca_compare_deps): ... this.
20590         (iv_ca_extend): Extend iv_ca if NEW_CP is cheaper than OLD_CP.
20591
20592 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20593
20594         * tree-ssa-loop-ivopts.c (find_interesting_uses): Move inv vars dump
20595         to ...
20596         (determine_group_iv_costs): ... here.
20597         (find_inv_vars_cb): Record inv var if it's not recorded before.
20598
20599 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20600
20601         * tree-ssa-loop-ivopts.c (allow_ip_end_pos_p): Refine comments.
20602         (get_shiftadd_cost): Ditto.
20603
20604 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20605
20606         * tree-ssa-address.c: Include header file.
20607         (move_hint_to_base): Return TRUE if BASE_HINT is moved to memory
20608         address.
20609         (add_to_parts): Refactor.
20610         (addr_to_parts): New parameter.  Update use of move_hint_to_base.
20611         (create_mem_ref): Update use of addr_to_parts.  Re-associate addr
20612         in new order.
20613
20614 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20615
20616         PR tree-optimization/53090
20617         * tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New enum value
20618         COMP_IV_EXPR_2.
20619         (extract_cond_operands): Detect condition with IV on both sides
20620         and return COMP_IV_EXPR_2.
20621         (find_interesting_uses_cond): Add iv_use for both IVs in condition.
20622         (rewrite_use_compare): Simplify by removing call to function
20623         extract_cond_operands.
20624
20625 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20626
20627         * tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New.
20628         (extract_cond_operands): Detect condition comparing against non-
20629         invariant bound and return appropriate enum value.
20630         (find_interesting_uses_cond): Update use of extract_cond_operands.
20631         Handle its return value accordingly.
20632         (determine_group_iv_cost_cond, rewrite_use_compare): Ditto.
20633
20634 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20635
20636         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Re-associate
20637         nonlinear iv_use computation in loop invariant sensitive way.
20638
20639 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20640
20641         * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): New.
20642         (find_iv_candidates): Call relate_compare_use_with_all_cands.
20643
20644 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20645
20646         * tree-ssa-loop-ivopts.c (struct iv_cand): New field inv_exprs.
20647         (dump_cand): Support iv_cand.inv_exprs.
20648         (add_candidate_1): Record invariant exprs in iv_cand.inv_exprs
20649         for candidates.
20650         (iv_ca_set_no_cp, iv_ca_set_cp, free_loop_data): Support
20651         iv_cand.inv_exprs.
20652
20653 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20654
20655         * tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Move
20656         from ...
20657         * tree-ssa-address.c (multiplier_allowed_in_address_p): ... to here
20658         as local function.  Include necessary header files.
20659         * tree-ssa-loop-ivopts.h (multiplier_allowed_in_address_p): Delete.
20660
20661 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20662
20663         * tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify.
20664
20665 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20666
20667         * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Handle more
20668         operators: TRUNC_DIV_EXPR, BIT_AND_EXPR, BIT_IOR_EXPR, LSHIFT_EXPR,
20669         RSHIFT_EXPR and BIT_NOT_EXPR.
20670
20671 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20672
20673         * tree-ssa-loop-ivopts.c (get_loop_invariant_expr): Simplify.
20674         (adjust_setup_cost): New parameter supporting round up adjustment.
20675         (struct address_cost_data): Delete.
20676         (force_expr_to_var_cost): Don't bound cost with spill_cost.
20677         (split_address_cost, ptr_difference_cost): Delete.
20678         (difference_cost, compare_aff_trees, record_inv_expr): Delete.
20679         (struct ainc_cost_data): New struct.
20680         (get_address_cost_ainc): New function.
20681         (get_address_cost, get_computation_cost): Reimplement.
20682         (determine_group_iv_cost_address): Record inv_expr for all uses of
20683         a group.
20684         (determine_group_iv_cost_cond): Call get_loop_invariant_expr.
20685         (iv_ca_has_deps): Reimplemented to ...
20686         (iv_ca_more_deps): ... this.  Check if NEW_CP introduces more deps
20687         than OLD_CP.
20688         (iv_ca_extend): Call iv_ca_more_deps.
20689
20690 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20691
20692         * tree-ssa-address.c (struct mem_address): Move to header file.
20693         (valid_mem_ref_p, move_fixed_address_to_symbol): Make it global.
20694         * tree-ssa-address.h (struct mem_address): Move from C file.
20695         (valid_mem_ref_p, move_fixed_address_to_symbol): Declare.
20696
20697 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20698
20699         * tree-affine.h (aff_combination_type): New interface.
20700         (aff_combination_zero_p): Remove static.
20701         (aff_combination_const_p): New interface.
20702         (aff_combination_singleton_var_p): New interfaces.
20703
20704 2017-05-11  Richard Biener  <rguenther@suse.de>
20705
20706         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
20707         Skip unreachable blocks and destinations.
20708         (eliminate): Move stmt removal and fixup ...
20709         (fini_eliminate): ... here.  Skip inserted exprs.
20710         (pass_pre::execute): Move fini_pre after fini_eliminate.
20711         * tree-ssa-tailmerge.c: Include tree-cfgcleanup.h.
20712         (tail_merge_optimize): Run cleanup_tree_cfg if requested by
20713         PRE to get rid of dead code that has invalid SSA form and
20714         split critical edges again.
20715
20716 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20717
20718         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
20719
20720 2017-05-11  Richard Biener  <rguenther@suse.de>
20721
20722         * passes.c (execute_function_todo): Verify loops if they are
20723         said to be up-to-date.
20724         * cfgexpand.c (pass_expand::execute): Discard loops for -dx.
20725         * trans-mem.c (pass_tm_edges::execute): Mark loops for fixup.
20726
20727 2017-05-10  John David Anglin  <danglin@gcc.gnu.org>
20728
20729         PR target/80090
20730         * config/pa/pa.c (pa_assemble_integer): When outputting a SYMBOL_REF,
20731         handle calling assemble_external ourself.
20732
20733         PR target/79027
20734         * config/pa/pa.c (pa_cannot_change_mode_class): Reject changes to/from
20735         modes with zero size.  Enhance comment.
20736
20737 2017-05-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20738
20739         * config/rs6000/rs6000.c (altivec_init_builtins): Define POWER8
20740         built-ins for vec_xl and vec_xst with short and char pointer
20741         arguments.
20742
20743 2017-05-10  Sebastian Peryt  <sebastian.peryt@intel.com>
20744
20745         * config/i386/avx512fintrin.h (_mm_mask_max_round_sd)
20746         (_mm_maskz_max_round_sd, _mm_mask_max_round_ss)
20747         (_mm_maskz_max_round_ss, _mm_mask_min_round_sd)
20748         (_mm_maskz_min_round_sd, _mm_mask_min_round_ss)
20749         (_mm_maskz_min_round_ss): New intrinsics.
20750         * config/i386/i386-builtin-types.def (V2DF, V2DF, V2DF, V2DF, UQI, INT)
20751         (V4SF, V4SF, V4SF, V4SF, UQI, INT): New function type aliases.
20752         * config/i386/i386-builtin.def (__builtin_ia32_maxsd_mask_round)
20753         (__builtin_ia32_maxss_mask_round, __builtin_ia32_minsd_mask_round)
20754         (__builtin_ia32_minss_mask_round): New builtins.
20755         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
20756         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
20757         * config/i386/sse.md (<sse>_vm<code><mode>3<round_saeonly_name>):
20758         Rename to ...
20759         (<sse>_vm<code><mode>3<mask_name><round_saeonly_name>): ... this.
20760         (v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_op3>%2, %1, %0|%0, %1, %<iptr>2<round_saeonly_op3>}):
20761         Change to ...
20762         (v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_saeonly_mask_op3>}):
20763         ... this.
20764
20765 2017-05-10  Sebastian Peryt  <sebastian.peryt@intel.com>
20766
20767         * config/i386/avx512fintrin.h (_mm_mask_mul_round_sd)
20768         (_mm_maskz_mul_round_sd, _mm_mask_mul_round_ss)
20769         (_mm_maskz_mul_round_ss, _mm_mask_div_round_sd)
20770         (_mm_maskz_div_round_sd, _mm_mask_div_round_ss)
20771         (_mm_maskz_div_round_ss, _mm_mask_mul_sd, _mm_maskz_mul_sd)
20772         (_mm_mask_mul_ss, _mm_maskz_mul_ss, _mm_mask_div_sd)
20773         (_mm_maskz_div_sd, _mm_mask_div_ss, _mm_maskz_div_ss): New intrinsics.
20774         * config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
20775         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
20776         * config/i386/i386-builtin.def (__builtin_ia32_divsd_mask_round)
20777         (__builtin_ia32_divss_mask_round, __builtin_ia32_mulsd_mask_round)
20778         (__builtin_ia32_mulss_mask_round): New builtins.
20779         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
20780         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
20781         * config/i386/sse.md (<sse>_vm<multdiv_mnemonic><mode>3<round_name>):
20782         Rename to ...
20783         (<sse>_vm<multdiv_mnemonic><mode>3<mask_name><round_name>): ... this.
20784         (v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
20785         Change to ...
20786         (v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
20787         ... this.
20788
20789 2017-05-10  Julia Koval  <julia.koval@intel.com>
20790
20791         * config/i386/avxintrin.h (_mm256_set_m128, _mm256_set_m128d)
20792         (_mm256_set_m128i, _mm256_setr_m128, _mm256_setr_m128d)
20793         (_mm256_setr_m128i): New intrinsics.
20794
20795 2017-05-10  Julia Koval  <julia.koval@intel.com>
20796
20797         * config/i386/avx512fintrin.h (_mm_mask_rcp14_sd)
20798         (_mm_maskz_rcp14_sd, _mm_mask_rcp14_ss)
20799         (_mm_maskz_rcp14_ss): New intrinsics.
20800         * config/i386/i386-builtin.def (__builtin_ia32_rcp14sd_mask)
20801         (__builtin_ia32_rcp14ss_mask): New builtins.
20802         * config/i386/sse.md (srcp14<mode>_mask): New pattern.
20803
20804 2017-05-10  Peter Bergner  <bergner@vnet.ibm.com>
20805
20806         PR tree-optimization/51513
20807         * tree-cfg.c (gimple_seq_unreachable_p): New function.
20808         (assert_unreachable_fallthru_edge_p): Use it.
20809         (group_case_labels_stmt): Likewise.
20810         * tree-cfg.h: Prototype it.
20811         * stmt.c: Include cfghooks.h and tree-cfg.h.
20812         (emit_case_dispatch_table) <gap_label>: New local variable.
20813         Use it to fill dispatch table gaps.
20814         Test for default_label before updating probabilities.
20815         (expand_case) <default_label>: Remove unneeded initialization.
20816         Test for unreachable default case statement and remove its edge.
20817         Set default_label accordingly.
20818         * tree-ssa-ccp.c (optimize_unreachable): Update comment.
20819
20820 2017-05-10  Carl Love  <cel@us.ibm.com>
20821
20822         * config/rs6000/rs6000-c: Add support for built-in functions
20823         vector signed char      vec_neg (vector signed char)
20824         vector signed short int vec_neg (vector short int)
20825         vector signed int       vec_neg (vector signed int)
20826         vector signed long long vec_neg (vector signed long long)
20827         vector float            vec_neg (vector float)
20828         vector double           vec_neg (vector double)
20829         * config/rs6000/rs6000-builtin.def: Add definitions for NEG function
20830         overload.
20831         * config/rs6000/altivec.h: Add define for vec_neg
20832         * doc/extend.texi: Update the built-in documentation for the
20833         new built-in functions.
20834
20835 2017-05-10  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20836
20837         PR tree-optimization/77644
20838         * match.pd (sqrt(x) cmp sqrt(y) -> x cmp y): New pattern.
20839
20840 2017-05-10  Nathan Sidwell  <nathan@acm.org>
20841
20842         * dumpfile.h (TDI_lang_all): New.
20843         (TDF_KIND): New. Renumber others
20844         (TDF_LANG, TDF_TREE, TDF_RTL, TDF_IPA): Enumerate value, rather
20845         than bits.
20846         * dumpfile.c (dump_files): Mark language dumps as TDF_LANG.  add
20847         lang-all.
20848         (get_dump_file_name): Adjust suffix generation.
20849         (dump_enable_all): Use TDF_KIND.
20850         * doc/invoke.texi (-fdump-lang-all): Document.
20851
20852         * dumpfile.h: Tabify.
20853
20854 2017-05-10  Wilco Dijkstra  <wdijkstr@arm.com>
20855
20856         PR target/80671
20857         * config/aarch64/cortex-a57-fma-steering.c (merge_forest):
20858         Move member access before delete.
20859
20860 2017-05-10  Alexandre Oliva <aoliva@redhat.com>
20861
20862         * tree-inline.c (expand_call_inline): Split block at stmt
20863         before the call.
20864
20865 2017-05-09  Michael Meissner  <meissner@linux.vnet.ibm.com>
20866
20867         PR target/68163
20868         * config/rs6000/rs6000.md (f32_lr): Delete mode attributes that
20869         are now unused after splitting mov{sf,sd}_hardfloat.
20870         (f32_lr2): Likewise.
20871         (f32_lm): Likewise.
20872         (f32_lm2): Likewise.
20873         (f32_li): Likewise.
20874         (f32_li2): Likewise.
20875         (f32_lv): Likewise.
20876         (f32_sr): Likewise.
20877         (f32_sr2): Likewise.
20878         (f32_sm): Likewise.
20879         (f32_sm2): Likewise.
20880         (f32_si): Likewise.
20881         (f32_si2): Likewise.
20882         (f32_sv): Likewise.
20883         (f32_dm): Likewise.
20884         (f32_vsx): Likewise.
20885         (f32_av): Likewise.
20886         (mov<mode>_hardfloat): Split into separate movsf and movsd pieces.
20887         For movsf, order stores so the VSX stores occur before the GPR
20888         store which encourages the register allocator to use a traditional
20889         FPR instead of a GPR.  For movsd, order the stores so that the GPR
20890         store comes before the VSX stores to allow the power6 to work.
20891         This is due to the power6 not having a 32-bit integer store
20892         instruction from a FPR.
20893         (movsf_hardfloat): Likewise.
20894         (movsd_hardfloat): Likewise.
20895
20896 2017-05-09  Martin Sebor  <msebor@redhat.com>
20897
20898         PR translation/80280
20899         * config/sol2-c.c (cmn_err_flag_specs): Initialize new data member
20900         added in r247778.
20901
20902         PR translation/80280
20903         * config/i386/msformat-c.c (ms_printf_flag_specs): Initialize new
20904         data member added in r247778.
20905         (ms_scanf_flag_specs, ms_strftime_flag_specs): Same.
20906
20907 2017-05-09  Nathan Sidwell  <nathan@acm.org>
20908
20909         * tree.h (tree_fits_shwi_p, tree_fits_uhwi_p): Unconditionally pure.
20910
20911         * ipa-devirt.c (default_hash_traits<type_pair>): Skip struct-scope
20912         typedefs.
20913
20914 2017-05-09  Marek Polacek  <polacek@redhat.com>
20915
20916         * doc/invoke.texi: Fix typo.
20917
20918 2017-05-09  Richard Biener  <rguenther@suse.de>
20919
20920         * tree-vrp.c (vrp_val_is_max): Adjust comment.
20921         (vrp_val_is_min): Likewise.
20922         (set_value_range_to_value): Likewise.
20923         (set_value_range_to_nonnegative): Likewise.
20924         (gimple_assign_nonzero_p): Likewise.
20925         (gimple_stmt_nonzero_p): Likewise.
20926         (vrp_int_const_binop): Likewise.  Remove unreachable case.
20927         (adjust_range_with_scev): Adjust comments.
20928         (compare_range_with_value): Likewise.
20929         (extract_range_from_phi_node): Likewise.
20930         (test_for_singularity): Likewise.
20931
20932 2017-05-09  Richard Biener  <rguenther@suse.de>
20933
20934         * tree-vrp.c (get_single_symbol): Add assert that we don't
20935         get overflowed constants as invariant part.
20936         (compare_values_warnv): Add comment before the TREE_NO_WARNING
20937         checks.  Use wi::cmp instead of recursing for integer constants.
20938         (compare_values): Just ignore whether we assumed undefined
20939         overflow instead of failing the compare.
20940         (extract_range_for_var_from_comparison_expr): Add comment before the
20941         TREE_NO_WARNING sets.
20942         (test_for_singularity): Likewise.
20943         (extract_range_from_comparison): Do not disable optimization
20944         when we assumed undefined overflow.
20945         (extract_range_basic): Remove init of unused var.
20946
20947 2017-05-09  Richard Biener  <rguenther@suse.de>
20948
20949         * tree-vrp.c (vrp_int_const_binop): Use wide-ints and simplify.
20950         (extract_range_from_multiplicative_op_1): Adjust.
20951         (extract_range_from_binary_expr_1): Use int_const_binop.
20952
20953 2017-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20954
20955         PR target/80101
20956         * config/rs6000/power6.md: Replace store_data_bypass_p calls with
20957         rs6000_store_data_bypass_p in seven define_bypass directives and
20958         in several comments.
20959         * config/rs6000/rs6000-protos.h: Add prototype for
20960         rs6000_store_data_bypass_p function.
20961         * config/rs6000/rs6000.c (rs6000_store_data_bypass_p): New
20962         function implements slightly different (rs6000-specific) semantics
20963         than store_data_bypass_p, returning false rather than aborting
20964         with assertion error when arguments do not satisfy the
20965         requirements of store data bypass.
20966         (rs6000_adjust_cost): Replace six calls of store_data_bypass_p with
20967         rs6000_store_data_bypass_p.
20968
20969 2017-05-08  Max Filippov  <jcmvbkbc@gmail.com>
20970
20971         * config/xtensa/xtensa-protos.h
20972         (xtensa_initial_elimination_offset): New declaration.
20973         * config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
20974         New function. Move its body from the INITIAL_ELIMINATION_OFFSET
20975         macro definition, add case for FRAME_POINTER_REGNUM when
20976         FRAME_GROWS_DOWNWARD.
20977         * config/xtensa/xtensa.h (FRAME_GROWS_DOWNWARD): New macro definition.
20978         (INITIAL_ELIMINATION_OFFSET): Replace body with call to
20979         xtensa_initial_elimination_offset.
20980
20981 2017-05-08  Nathan Sidwell  <nathan@acm.org>
20982
20983         * doc/invoke.texi: Alphabetize -fdump options.
20984
20985 2017-05-08  Martin Sebor  <msebor@redhat.com>
20986
20987         PR translation/80280
20988         * config/sol2-c.c (solaris_pragma_align): Correct quoting.
20989
20990 2017-05-08  Bernd Edlinger  <bernd.edlinger@hotmail.de>
20991
20992         * target.def (compute_frame_layout): New optional target hook.
20993         * doc/tm.texi.in (TARGET_COMPUTE_FRAME_LAYOUT): Add hook.
20994         * doc/tm.texi (TARGET_COMPUTE_FRAME_LAYOUT): Add documentation.
20995         * lra-eliminations.c (update_reg_eliminate): Call compute_frame_layout
20996         target hook.
20997         * reload1.c (verify_initial_elim_offsets): Likewise.
20998         * config/arm/arm.c (TARGET_COMPUTE_FRAME_LAYOUT): Define.
20999         (use_simple_return_p): Call arm_compute_frame_layout if needed.
21000         (arm_get_frame_offsets): Split up into this ...
21001         (arm_compute_frame_layout): ... and this function.
21002
21003 2017-05-08  Richard Sandiford  <richard.sandiford@arm.com>
21004
21005         * config/aarch64/constraints.md (Usa): New constraint.
21006         * config/aarch64/aarch64.md (*movsi_aarch64, *movdi_aarch64): Use it.
21007
21008 2017-05-08  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21009
21010         * config.gcc (arm*-*-*): Set TM_MULTILIB_CONFIG from
21011         with_multilib_list after it has been checked.
21012
21013 2017-05-08  Richard Biener  <rguenther@suse.de>
21014
21015         * tree-ssa-pre.c (bitmap_set_and): Avoid bitmap copy.
21016         (bitmap_set_subtract_values): Likewise.
21017
21018 2017-05-08  Richard Biener  <rguenther@suse.de>
21019
21020         * tree-vrp.c (gimple_assign_nonzero_warnv_p): Rename to ...
21021         (gimple_assign_nonzero): ... this and remove strict_overflow_p
21022         argument.
21023         (gimple_stmt_nonzero_warnv_p): Rename to ...
21024         (gimple_stmt_nonzero_p): ... this and remove strict_overflow_p
21025         argument.
21026         (vrp_stmt_computes_nonzero): Remove strict_overflow_p argument.
21027         (extract_range_basic): Adjust, do not disable propagation on
21028         strict overflow sensitive simplification.
21029         (vrp_visit_cond_stmt): Likewise.
21030
21031 2017-05-05  Jan Hubicka  <hubicka@ucw.cz>
21032
21033         * ipa-inline-analysis.c (estimate_function_body_sizes): Recompute
21034         body size unconditionally.
21035
21036 2017-05-07  Jeff Law  <law@redhat.com>
21037
21038         Revert:
21039         2017-05-06  Jeff Law  <law@redhat.com>
21040         PR tree-optimization/78496
21041         * tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
21042         code.
21043
21044         PR tree-optimization/78496
21045         * tree-vrp.c (simplify_assert_expr_using_ranges): New function.
21046         (simplify_stmt_using_ranges): Call it.
21047         (vrp_dom_walker::before_dom_children): Extract equivalences
21048         from an ASSERT_EXPR with an equality comparison against a
21049         constant.
21050
21051 2017-05-06  Jeff Law  <law@redhat.com>
21052
21053         PR tree-optimization/78496
21054         * tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
21055         code.
21056
21057         PR tree-optimization/78496
21058         * tree-vrp.c (simplify_assert_expr_using_ranges): New function.
21059         (simplify_stmt_using_ranges): Call it.
21060         (vrp_dom_walker::before_dom_children): Extract equivalences
21061         from an ASSERT_EXPR with an equality comparison against a
21062         constant.
21063
21064 2017-05-06  Richard Sandiford  <richard.sandiford@linaro.org>
21065
21066         * lra-constraints.c (lra_copy_reg_equiv): New function.
21067         (split_reg): Use it to copy equivalence information from the
21068         original register to the spill register.
21069
21070 2017-05-06  Richard Sandiford  <richard.sandiford@linaro.org>
21071
21072         PR rtl-optimization/75964
21073         * simplify-rtx.c (simplify_const_relational_operation): Remove
21074         invalid handling of comparisons of integer ABS.
21075
21076 2017-05-06  Uros Bizjak  <ubizjak@gmail.com>
21077
21078         * config/i386/i386.c (ext_80387_constant_init): Do not explicitly
21079         initialize to zero.
21080         (init_regs): Remove declaration.
21081         (function_arg_advance_32): Initialize error_p as boolean variable.
21082
21083 2017-05-05  Nathan Sidwell  <nathan@acm.org>
21084
21085         * store-motion.c (remove_reachable_equiv_notes): Reformat long
21086         lines.  Use for (;;).
21087
21088 2017-05-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21089
21090         * config/rs6000/rs6000.c (rs6000_vect_nonmem): New static var.
21091         (rs6000_init_cost): Initialize rs6000_vect_nonmem.
21092         (rs6000_add_stmt_cost): Update rs6000_vect_nonmem.
21093         (rs6000_finish_cost): Avoid vectorizing simple copy loops with
21094         VF=2 that require versioning.
21095
21096 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
21097
21098         * diagnostic.h (CARET_LINE_MARGIN): Convert from macro to const
21099         int.
21100
21101 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
21102
21103         * diagnostic.h (diagnostic_override_option_index): Convert from
21104         macro to inline function.
21105
21106 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
21107
21108         * diagnostic.c (last_module_changed_p): New function.
21109         (set_last_module): New function.
21110         (diagnostic_report_current_module): Convert macro usage to
21111         the above functions.
21112         * diagnostic.h (diagnostic_context::last_module): Strengthen
21113         from const line_map * to const line_map_ordinary *.
21114         (diagnostic_last_module_changed): Delete macro.
21115         (diagnostic_set_last_module): Delete macro.
21116
21117 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
21118
21119         * diagnostic.c (diagnostic_impl): Replace report_diagnostic
21120         with diagnostic_report_diagnostic.
21121         (diagnostic_n_impl_richloc): Likewise.
21122         * diagnostic.h (report_diagnostic): Delete macro.
21123         * rtl-error.c (diagnostic_for_asm): Replace report_diagnostic
21124         with diagnostic_report_diagnostic.
21125         * substring-locations.c (format_warning_va): Likewise.
21126
21127 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
21128
21129         * diagnostic.c (diagnostic_report_diagnostic): Eliminate
21130         save/restor of format_spec.  Move option-printing code to...
21131         (print_option_information): ...this new function, and
21132         reimplement by simply printing to the pretty_printer,
21133         rather than appending to the format string.
21134
21135 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
21136
21137         * diagnostic.c (diagnostic_report_diagnostic): Split out pragma
21138         handling logic into...
21139         (update_effective_level_from_pragmas): ...this new function.
21140
21141 2017-05-04  Andrew Waterman  <andrew@sifive.com>
21142
21143         * config/riscv/riscv.opt (mstrict-align): New option.
21144         * config/riscv/riscv.h (STRICT_ALIGNMENT): Use it.  Update comment.
21145         (SLOW_UNALIGNED_ACCESS): Define.
21146         (riscv_slow_unaligned_access): Declare.
21147         * config/riscv/riscv.c (riscv_tune_info): Add slow_unaligned_access
21148         field.
21149         (riscv_slow_unaligned_access): New variable.
21150         (rocket_tune_info): Set slow_unaligned_access to true.
21151         (optimize_size_tune_info): Set slow_unaligned_access to false.
21152         (riscv_cpu_info_table): Add entry for optimize_size_tune_info.
21153         (riscv_valid_lo_sum_p): Use TARGET_STRICT_ALIGN.
21154         (riscv_option_override): Set riscv_slow_unaligned_access.
21155         * doc/invoke.texi: Add -mstrict-align to RISC-V.
21156
21157 2017-05-04  Kito Cheng  <kito.cheng@gmail.com>
21158
21159         * config/riscv/riscv.md: Unify indentation.
21160
21161 2017-05-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
21162
21163         PR target/79038
21164         PR target/79202
21165         PR target/79203
21166         * config/rs6000/rs6000.md (u code attribute): Add FIX and
21167         UNSIGNED_FIX.
21168         (extendsi<mode>2): Add support for doing sign extension via
21169         VUPKHSW and XXPERMDI if the value is in Altivec registers and we
21170         don't have ISA 3.0 instructions.
21171         (extendsi<mode>2 splitter): Likewise.
21172         (fix_trunc<mode>si2): If we are at ISA 2.07 (VSX small integer),
21173         generate the normal insns since SImode can now go in vector
21174         registers.  Disallow the special UNSPECs needed for previous
21175         machines to hide SImode being used.  Add new insns
21176         fctiw{,w}_<mode>_smallint if SImode can go in vector registers.
21177         (fix_trunc<mode>si2_stfiwx): Likewise.
21178         (fix_trunc<mode>si2_internal): Likewise.
21179         (fixuns_trunc<mode>si2): Likewise.
21180         (fixuns_trunc<mode>si2_stfiwx): Likewise.
21181         (fctiw<u>z_<mode>_smallint): Likewise.
21182         (fctiw<u>z_<mode>_mem): New combiner pattern to prevent conversion
21183         of floating point to 32-bit integer from doing a direct move to
21184         the GPR registers to do a store.
21185         (fctiwz_<mode>): Break long line.
21186
21187 2017-05-05  Bin Cheng  <bin.cheng@arm.com>
21188
21189         * Makefile.in (GTFILES): Add tree-ssa-loop-ivopts.c.
21190         * tree-ssa-loop-ivopts.c (compute_max_addr_offset): Delete.
21191         (addr_list, addr_offset_valid_p): New.
21192         (split_address_groups): Check offset validity with above function.
21193         (gt-tree-ssa-loop-ivopts.h): Include header file.
21194
21195 2017-05-05  Nathan Sidwell  <nathan@acm.org>
21196
21197         * config.gcc (arm*-*-*): Add missing 'fi'.
21198
21199 2017-05-05  Steve Ellcey  <sellcey@cavium.com>
21200
21201         * doc/invoke.texi (-fopt-info): Explicitly say order of options
21202         included in -fopt-info does not matter.
21203         * doc/optinfo.texi (-fopt-info): Fix description of default
21204         behavour. Explicitly say order of options included in -fopt-info
21205         does not matter.
21206
21207 2017-05-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21208
21209         * config.gcc: Allow combinations of aprofile and rmprofile values for
21210         --with-multilib-list.
21211         * config/arm/t-multilib: New file.
21212         * config/arm/t-aprofile: Remove initialization of MULTILIB_*
21213         variables.  Remove setting of ISA and floating-point ABI in
21214         MULTILIB_OPTIONS and MULTILIB_DIRNAMES.  Set architecture and FPU in
21215         MULTI_ARCH_OPTS_A and MULTI_ARCH_DIRS_A rather than MULTILIB_OPTIONS
21216         and MULTILIB_DIRNAMES respectively.  Add comment to introduce all
21217         matches.  Add architecture matches for marvel-pj4 and generic-armv7-a
21218         CPU options.
21219         * config/arm/t-rmprofile: Likewise except for the matches changes.
21220         * doc/install.texi (--with-multilib-list): Document the combination of
21221         aprofile and rmprofile values and warn about pitfalls in doing that.
21222
21223 2017-05-05  Wilco Dijkstra  <wdijkstr@arm.com>
21224
21225         * config/aarch64/aarch64.md (movsi_aarch64): Remove '*' from r=w.
21226         (movdi_aarch64): Likewise.
21227
21228 2017-05-05  Jakub Jelinek  <jakub@redhat.com>
21229
21230         PR tree-optimization/80632
21231         * tree-switch-conversion.c (struct switch_conv_info): Add target_vop
21232         field.
21233         (build_arrays): Initialize it for virtual phis.
21234         (fix_phi_nodes): Use it for virtual phis.
21235
21236         PR tree-optimization/80558
21237         * tree-vrp.c (extract_range_from_binary_expr_1): Optimize
21238         [x, y] op z into [x op, y op z] for op & or | if conditions
21239         are met.
21240
21241 2017-05-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
21242             Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
21243
21244         PR target/71607
21245         * config/arm/arm.md (use_literal_pool): Remove.
21246         (64-bit immediate split): No longer takes cost into consideration
21247         if arm_disable_literal_pool is enabled.
21248         * config/arm/arm.c (arm_tls_referenced_p): Add diagnostic if TLS is
21249         used when arm_disable_literal_pool is enabled.
21250         (arm_max_const_double_inline_cost): Remove use of
21251         arm_disable_literal_pool.
21252         (push_minipool_fix): Add assert.
21253         (arm_reorg): Add return if arm_disable_literal_pool is enabled.
21254         * config/arm/vfp.md (no_literal_pool_df_immediate): New.
21255         (no_literal_pool_sf_immediate): New.
21256
21257 2017-05-05  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21258
21259         PR tree-optimization/80613
21260         * tree-ssa-dce.c (propagate_necessity): Remove cases for
21261         BUILT_IN_STRDUP and BUILT_IN_STRNDUP.
21262
21263 2017-05-05  Richard Biener  <rguenther@suse.de>
21264
21265         * tree-ssa-pre.c (get_or_alloc_expr_for): Simplify.
21266
21267 2017-05-05  Georg-Johann Lay  <avr@gjlay.de>
21268
21269         * config/avr/avr.md [flag_strict_overflow]: Remove any occurence
21270         of this flag from insn conditions due to removal from r247495.
21271
21272 2017-05-05  Wilco Dijkstra  <wdijkstr@arm.com>
21273
21274         * config/arm/aarch-common.c (arm_early_load_addr_dep_ptr):
21275         New function.
21276         (arm_early_store_addr_dep_ptr): Likewise.
21277         * config/arm/aarch-common-protos.h
21278         (arm_early_load_addr_dep_ptr): Add prototype.
21279         (arm_early_store_addr_dep_ptr): Likewise.
21280         * config/arm/cortex-a53.md: Add new bypasses.
21281
21282 2017-05-05  Jakub Jelinek  <jakub@redhat.com>
21283
21284         * tree.c (next_type_uid): Change type to unsigned.
21285         (type_hash_canon): Decrement back next_type_uid if
21286         freeing a type node with the highest TYPE_UID.  For INTEGER_TYPEs
21287         also ggc_free TYPE_MIN_VALUE, TYPE_MAX_VALUE and TYPE_CACHED_VALUES
21288         if possible.
21289
21290 2017-05-04  Martin Sebor  <msebor@redhat.com>
21291
21292         * builtins.c: Fix a trivial typo in a comment.
21293
21294         PR middle-end/79234
21295         * builtins.c (check_sizes): Adjust to handle reading past the end.
21296         Avoid printing excessive upper bound of ranges.  Use %E to print
21297         tree nodes instead of converting them to %wu.
21298         (expand_builtin_memchr): New function.
21299         (compute_dest_size): Rename...
21300         (compute_objsize): ...to this.
21301         (expand_builtin_memcpy): Adjust.
21302         (expand_builtin_mempcpy): Adjust.
21303         (expand_builtin_strcat): Adjust.
21304         (expand_builtin_strcpy): Adjust.
21305         (check_strncat_sizes): Adjust.
21306         (expand_builtin_strncat): Adjust.
21307         (expand_builtin_strncpy): Adjust and simplify.
21308         (expand_builtin_memset): Adjust.
21309         (expand_builtin_bzero): Adjust.
21310         (expand_builtin_memcmp): Adjust.
21311         (expand_builtin): Handle memcmp.
21312         (maybe_emit_chk_warning): Check strncat just once.
21313
21314 2017-05-04  Martin Sebor  <msebor@redhat.com>
21315
21316         PR preprocessor/79214
21317         PR middle-end/79222
21318         PR middle-end/79223
21319         * builtins.c (check_sizes): Add inlining context and issue
21320         warnings even when -Wno-system-headers is set.
21321         (check_strncat_sizes): Same.
21322         (expand_builtin_strncat): Same.
21323         (expand_builtin_memmove): New function.
21324         (expand_builtin_stpncpy): Same.
21325         (expand_builtin): Handle memmove and stpncpy.
21326
21327 2017-05-04  Bin Cheng  <bin.cheng@arm.com>
21328
21329         * tree-ssa-loop-ivopts.c (struct cost_pair): Remove field inv_expr
21330         which is not used any more.
21331
21332 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
21333
21334         * config/aarch64/aarch64.c (generic_tunings): Update prefetch model.
21335
21336 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
21337
21338         * config/aarch64/aarch64.c (cortexa35_tunings): Set jump alignment to 4.
21339         (cortexa53_tunings): Likewise.
21340         (cortexa57_tunings): Likewise.
21341         (cortexa72_tunings): Likewise.
21342         (cortexa73_tunings): Likewise.
21343
21344 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
21345
21346         * config/aarch64/aarch64.c (generic_tunings): Set jump alignment to 4.
21347         Set loop alignment to 8.
21348
21349 2017-05-04  Martin Sebor  <msebor@redhat.com>
21350
21351         PR translation/80280
21352         * builtins.c (expand_builtin_object_size): Add missing quoting to
21353         %D and like directives.
21354         * hsa-gen.c (hsa_type_for_scalar_tree_type): Same.
21355         (hsa_type_for_tree_type): Same.
21356         (verify_function_arguments): Same.
21357         * symtab.c (symbol_table::change_decl_assembler_name): Same.
21358         * varasm.c (get_section): Same.
21359         (mark_weak): Same.
21360
21361 2017-05-04  Martin Sebor  <msebor@redhat.com>
21362
21363         PR translation/80280
21364         * config/i386/i386.c (ix86_function_versions): Quote a %D directive.
21365
21366 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
21367
21368         * config/aarch64/aarch64.c (generic_addrcost_table):
21369         Change HI/TI mode setting.
21370
21371 2017-05-04  Martin Jambor  <mjambor@suse.cz>
21372
21373         PR tree-optimization/80622
21374         * tree-sra.c (comes_initialized_p): New function.
21375         (build_accesses_from_assign): Only set write lazily when
21376         comes_initialized_p is false.
21377         (analyze_access_subtree): Use comes_initialized_p.
21378         (propagate_subaccesses_across_link): Assert !comes_initialized_p
21379         instead of testing for PARM_DECL.
21380
21381 2017-05-04  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21382
21383         * config/aarch64/aarch64.md (prefetch); Adjust predicate and
21384         constraint on operand 0 to allow more general addressing modes.
21385         Adjust output template.
21386         * config/aarch64/aarch64.c (aarch64_address_valid_for_prefetch_p):
21387         New function.
21388         * config/aarch64/aarch64-protos.h
21389         (aarch64_address_valid_for_prefetch_p): Declare prototype.
21390         * config/aarch64/constraints.md (Dp): New address constraint.
21391         * config/aarch64/predicates.md (aarch64_prefetch_operand): New
21392         predicate.
21393
21394 2017-05-04  Jan Hubicka  <hubicka@ucw.cz>
21395
21396         * ipa-cp.c (perform_estimation_of_a_value): Drop base_time parameter;
21397         update use of estimate_ipcp_clone_size_and_time.
21398         (estimate_local_effects): Update use of
21399         estimate_ipcp_clone_size_and_time and perform_estimation_of_a_value.
21400         * ipa-inline.h (estimate_ipcp_clone_size_and_time): Update prototype.
21401         * ipa-inline-analysis.c (estimate_ipcp_clone_size_and_time):
21402         Return nonspecialized time.
21403
21404 2017-05-04  Richard Biener  <rguenther@suse.de>
21405
21406         * tree-ssa-alias.c (get_continuation_for_phi): Improve looking
21407         for the last VUSE which def dominates the PHI.  Directly call
21408         maybe_skip_until.
21409         (get_continuation_for_phi_1): Remove.
21410
21411 2017-05-04  Richard Sandiford  <richard.sandiford@linaro.org>
21412
21413         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): Add commentary
21414         to explain the use of truncating division.  Cap the number of
21415         iterations to the maximum given by nb_iterations_upper_bound,
21416         if defined.
21417
21418 2017-05-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21419
21420         * configure.ac (--enable-mingw-wildcard): Add new configurable feature.
21421         * configure: Regenerate.
21422         * config.in: Regenerate.
21423         * config/i386/driver-mingw32.c: new file.
21424         * config/i386/x-mingw32: Add rule to build driver-mingw32.o.
21425         * config.host: Link driver-mingw32.o on MinGW host.
21426         * doc/install.texi: Document new --enable-mingw-wildcard configure
21427         option.
21428
21429 2017-05-04  Marek Polacek  <polacek@redhat.com>
21430
21431         PR tree-optimization/80612
21432         * calls.c (get_size_range): Check for INTEGRAL_TYPE_P.
21433
21434 2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
21435             Andre Simoes Dias Vieira  <andre.simoesdiasvieira@arm.com>
21436
21437         * config/arm/arm.md (movsi): Change TARGET_32BIT to TARGET_HAVE_MOVT.
21438         (movt splitter): Likewise.
21439         * config/arm/arm.c (arm_option_check_internal): Change arm_arch_thumb2
21440         to TARGET_HAVE_MOVT, and merge with -mslow-flash-data check.
21441         (const_ok_for_arm): Change else to else if (TARGET_THUMB2) and add else
21442         block for Thumb-1 with MOVT.
21443         (thumb2_legitimate_address_p): Move code block ...
21444         (can_avoid_literal_pool_for_label_p): ... into this new function.
21445         (thumb1_legitimate_address_p): Add check for TARGET_HAVE_MOVT and
21446         literal pool.
21447         (thumb_legitimate_constant_p): Add conditional on TARGET_HAVE_MOVT
21448         * doc/invoke.texi (-mpure-code): Change "ARMv7-M targets" for
21449         "M-profile targets with the MOVT instruction".
21450
21451 2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
21452
21453         * config/arm/arm-builtins.c (arm_init_builtins): Rename
21454         __builtin_arm_ldfscr to __builtin_arm_get_fpscr, and rename
21455         __builtin_arm_stfscr to __builtin_arm_set_fpscr.
21456
21457 2017-05-04  Martin Liska  <mliska@suse.cz>
21458
21459         * tree-vrp.c (simplify_cond_using_ranges_2): Remove unused
21460         variable cond_code.
21461
21462 2017-05-04  Richard Biener  <rguenther@suse.de>
21463
21464         * tree.c (array_at_struct_end_p): Handle arrays at struct
21465         end with flexarrays more conservatively.  Refactor and treat
21466         arrays of arrays or aggregates more strict.  Fix
21467         VIEW_CONVERT_EXPR handling.  Remove allow_compref argument.
21468         * tree.c (array_at_struct_end_p): Adjust prototype.
21469         * emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust.
21470         * gimple-fold.c (get_range_strlen): Likewise.
21471         * tree-chkp.c (chkp_may_narrow_to_field): Likewise.
21472
21473 2017-05-04  Richard Biener  <rguenther@suse.de>
21474
21475         PR tree-optimization/31130
21476         * tree-vrp.c (needs_overflow_infinity): Remove as always returning
21477         false.
21478         (supports_overflow_infinity): Likewise.
21479         (is_negative_overflow_infinity): Likewise.
21480         (is_positive_overflow_infinity): Likewise.
21481         (is_overflow_infinity): Likewise.
21482         (stmt_overflow_infinity): Likewise.
21483         (overflow_infinity_range_p): Likewise.
21484         (usable_range_p): Remove as always returning true.
21485         (make_overflow_infinity): Remove.
21486         (negative_overflow_infinity): Likewise.
21487         (positive_overflow_infinity): Likewise.
21488         (avoid_overflow_infinity): Likewise.
21489         (set_value_range): Adjust accordingly.
21490         (set_value_range_to_nonnegative): Likewise, remove now unused
21491         overflow_infinity arg.
21492         (vrp_operand_equal_p): Adjust.
21493         (update_value_range): Likewise.
21494         (range_int_cst_singleton_p): Likewise.
21495         (operand_less_p): Likewise.
21496         (compare_values_warnv): Likewise.
21497         (extract_range_for_var_from_comparison_expr): Likewise.
21498         (vrp_int_const_binop): Likewise.
21499         (zero_nonzero_bits_from_vr): Likewise.
21500         (extract_range_from_multiplicative_op_1): Likewise.
21501         (extract_range_from_binary_expr_1): Likewise.
21502         (extract_range_from_unary_expr): Likewise.
21503         (extract_range_from_comparison): Likewise.
21504         (extract_range_basic): Likewise.
21505         (adjust_range_with_scev): Likewise.
21506         (compare_ranges): Likewise.
21507         (compare_range_with_value): Likewise.
21508         (dump_value_range): Likewise.
21509         (test_for_singularity): Likewise, remove strict_overflow_p parameter
21510         never used.
21511         (simplify_cond_using_ranges): Adjust.
21512
21513 2017-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
21514
21515         * brig-builtins.def: Added a builtin for class_f64.
21516         * builtin-types.def: Added a builtin type needed by class_f64.
21517
21518 2017-05-03  Jason Merrill  <jason@redhat.com>
21519
21520         * timevar.def: Add TV_CONSTEXPR.
21521
21522 2017-05-03  David Malcolm  <dmalcolm@redhat.com>
21523
21524         * common.opt (fdiagnostics-parseable-fixits): Fix typo.
21525
21526 2017-05-03  Martin Jambor  <mjambor@suse.cz>
21527
21528         * ipa-prop.c (ipa_update_after_lto_read): Removed.
21529         * ipa-prop.h (ipa_update_after_lto_read): Remove declaration.
21530         * ipa-cp.c (ipcp_propagate_stage): Do not call
21531         ipa_update_after_lto_read.
21532         * ipa-inline.c (ipa_inline): Likewise.
21533
21534 2017-05-03  Martin Jambor  <mjambor@suse.cz>
21535
21536         * ipa-prop.h (ipa_edge_args): Make a class.  Mark with for_user GTY
21537         tag.  Added a default constructor and a destructor.
21538         (ipa_edge_args_sum_t): New class;
21539         (ipa_edge_args_sum): Declare.
21540         (ipa_edge_args_vector): Remove declaration.
21541         (IPA_EDGE_REF): Use ipa_edge_args_sum.
21542         (ipa_free_edge_args_substructures): Remove declaration.
21543         (ipa_check_create_edge_args): Use ipa_edge_args_sum.
21544         (ipa_edge_args_info_available_for_edge_p): Likewise.
21545         * ipa-prop.c (ipa_edge_args_vector): Removed.
21546         (edge_removal_hook_holder): Likewise.
21547         (edge_duplication_hook_holder): Likewise.
21548         (ipa_edge_args_sum): New variable.
21549         (ipa_propagate_indirect_call_infos): Test ipa_edge_args_sum instead of
21550         ipa_edge_args_vector.
21551         (ipa_free_edge_args_substructures): Likewise.
21552         (ipa_free_all_edge_args): Free ipa_edge_args_sum instead of
21553         ipa_edge_args_vector.
21554         (ipa_edge_removal_hook): Turned into method
21555         ipa_edge_args_sum_t::remove.
21556         (ipa_edge_duplication_hook): Turned into method
21557         ipa_edge_args_sum_t::duplicate.
21558         (ipa_register_cgraph_hooks): Create ipa_edge_args_sum instead of
21559         registering edge hooks.
21560         (ipa_unregister_cgraph_hooks): Do not unregister edge hooks.
21561         * ipa-inline-analysis.c (estimate_function_body_sizes): Test
21562         ipa_edge_args_sum instead of ipa_edge_args_vector.
21563         * ipa-profile.c (ipa_profile): Likewise.
21564
21565 2017-05-03  Martin Jambor  <mjambor@suse.cz>
21566
21567         * symbol-summary.h (function_summary): New method exists.
21568         (function_summary::symtab_removal): Deallocate through release.
21569         (call_summary): New class.
21570         (gt_ggc_mx): New overload.
21571         (gt_pch_nx): Likewise.
21572         (gt_pch_nx): Likewise.
21573
21574 2017-05-03  Jeff Law  <law@redhat.com>
21575
21576         PR tree-optimization/78496
21577         * tree-vrp.c (simplify_cond_using_ranges_1): Renamed
21578         from simplify_cond_using_ranges.  Split off code to walk
21579         backwards through casts into ...
21580         (simplify_cond_using_ranges_2): New function.
21581         (simplify_stmt_using_ranges): Call simplify_cond_using_ranges_1.
21582         (execute_vrp): After identifying jump threads, call
21583         simplify_cond_using_ranges_2.
21584
21585 2017-05-03  Jan Hubicka  <hubicka@ucw.cz>
21586
21587         PR bootstrap/80609
21588         * ipa-inline.h (inline_summary): Add ctor.
21589         (create_ggc): Do not use ggc_cleared_alloc.
21590
21591 2017-05-03  Jeff Downs  <heydowns@somuchpressure.net>
21592             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21593
21594         * gcc.c (handle_braces): Support escaping in switch matching
21595         text.
21596         * doc/invoke.texi (Spec Files): Document it.
21597         Remove superfluous @code markup in items.
21598
21599 2017-05-03  David Malcolm  <dmalcolm@redhat.com>
21600
21601         * diagnostic-show-locus.c (struct column_range): New struct.
21602         (get_affected_columns): New function.
21603         (get_printed_columns): New function.
21604         (struct correction): New struct.
21605         (correction::ensure_capacity): New function.
21606         (correction::ensure_terminated): New function.
21607         (struct line_corrections): New struct.
21608         (line_corrections::~line_corrections): New dtor.
21609         (line_corrections::add_hint): New function.
21610         (layout::print_trailing_fixits): Reimplement in terms of the new
21611         classes.
21612         (selftest::test_overlapped_fixit_printing): New function.
21613         (selftest::diagnostic_show_locus_c_tests): Call it.
21614
21615 2017-05-03  Nathan Sidwell  <nathan@acm.org>
21616
21617         Canonicalize canonical type hashing
21618         * tree.h (type_hash_canon_hash): Declare.
21619         * tree.c (type_hash_list, attribute_hash_list): Move into
21620         type_hash_canon_hash.
21621         (build_type_attribute_qual_variant): Break out hash code calc into
21622         type_hash_canon_hash.
21623         (type_hash_canon_hash): New.  Generic type hash computation.
21624         (build_range_type_1, build_array_type_1, build_function_type,
21625         build_method_type_directly, build_offset_type, build_complex_type,
21626         make_vector_type): Call it.
21627
21628 2017-05-03  Richard Biener  <rguenther@suse.de>
21629
21630         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
21631         When all DRs have unknown misaligned do not always peel
21632         when there is a store but apply the same costing model as if
21633         there were only loads.
21634
21635 2017-05-03  Richard Biener  <rguenther@suse.de>
21636
21637         Revert
21638         PR tree-optimization/80492
21639         * tree-ssa-alias.c (decl_refs_may_alias_p): Handle
21640         compare_base_decls returning dont-know properly.
21641
21642 2017-05-03  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21643
21644         * config/arm/iterators.md (CCSI): New mode iterator.
21645         (arch): New mode attribute.
21646         * config/arm/sync.md (atomic_compare_and_swap<mode>_1): Rename into ...
21647         (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1): This and ...
21648         (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): This.  Use CCSI
21649         code iterator for success result mode.
21650         * config/arm/arm.c (arm_expand_compare_and_swap): Adapt code to use
21651         the corresponding new insn generators.
21652
21653 2017-05-03  Bin Cheng  <bin.cheng@arm.com>
21654
21655         Revert r247509
21656         2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21657         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
21658
21659 2017-05-03  Richard Sandiford  <richard.sandiford@linaro.org>
21660
21661         * tree-data-ref.h (SUB_CONFLICTS_IN_A): Wrap SUB argument in brackets.
21662         (SUB_CONFLICTS_IN_B, SUB_LAST_CONFLICT, SUB_DISTANCE): Likewise.
21663         (DDR_A): Wrap DDR argument in brackets.
21664         (DDR_B, DDR_AFFINE_P, DDR_ARE_DEPENDENT, DDR_SUBSCRIPTS): Likewise.
21665         (DDR_LOOP_NEST, DDR_INNER_LOOP, DDR_SELF_REFERENCE): Likewise.
21666         (DDR_REVERSED_P): Likewise.
21667
21668 2017-05-03  Jakub Jelinek  <jakub@redhat.com>
21669
21670         PR tree-optimization/79472
21671         * tree-switch-conversion.c (struct switch_conv_info): Add
21672         contiguous_range and default_case_nonstandard fields.
21673         (collect_switch_conv_info): Compute contiguous_range and
21674         default_case_nonstandard fields, don't clear final_bb if
21675         contiguous_range and only the default case doesn't have the required
21676         structure.
21677         (check_all_empty_except_final): Set default_case_nonstandard instead
21678         of failing if contiguous_range and the default case doesn't have empty
21679         block.
21680         (check_final_bb): Add SWTCH argument, don't fail if contiguous_range
21681         and only the default case doesn't have the required constants.  Skip
21682         virtual phis.
21683         (gather_default_values): Skip virtual phis.  Allow non-NULL CASE_LOW
21684         if default_case_nonstandard.
21685         (build_constructors): Build constant 1 just once.  Assert that default
21686         values aren't inserted in between cases if contiguous_range.  Skip
21687         virtual phis.
21688         (build_arrays): Skip virtual phis.
21689         (prune_bbs): Add DEFAULT_BB argument, don't remove that bb.
21690         (fix_phi_nodes): Don't add e2f phi arg if default_case_nonstandard.
21691         Handle virtual phis.
21692         (gen_inbound_check): Handle default_case_nonstandard case.
21693         (process_switch): Adjust check_final_bb caller.  Call
21694         gather_default_values with the first non-default case instead of
21695         default case if default_case_nonstandard.
21696
21697 2017-05-02  Nathan Sidwell  <nathan@acm.org>
21698
21699         * ggc-page.c (move_ptes_to_front): Replace unsigned >0 with i--
21700         check.  Fix formatting.
21701
21702 2017-05-02  Jan Hubicka  <hubicka@ucw.cz>
21703
21704         * ipa-inline-analysis.c (estimate_node_size_and_time): Allow roundoff
21705         errors when comparing specialized and unspecialized times.
21706
21707 2017-05-02  David Malcolm  <dmalcolm@redhat.com>
21708
21709         * diagnostic-show-locus.c
21710         (layout::should_print_annotation_line_p): Make private.
21711         (layout::print_annotation_line): Make private.
21712         (layout::annotation_line_showed_range_p): Make private.
21713         (layout::show_ruler): Make private.
21714         (layout::print_source_line): Make private.  Pass in line and
21715         line_width, rather than calling location_get_source_line.  Drop
21716         returned value.
21717         (layout::print_leading_fixits): New method.
21718         (layout::print_any_fixits): Rename to...
21719         (layout::print_trailing_fixits): ...this, and make private.
21720         Don't print newline fixits.
21721         (diagnostic_show_locus): Move logic for printing one row into...
21722         (layout::print_line): ...this new function.  Move the
21723         location_get_source_line call and error-handling from
21724         print_source_line to here.  Call print_leading_fixits, and rename
21725         print_any_fixits to print_trailing_fixits.
21726         (selftest::test_fixit_insert_containing_newline): Update now that
21727         newlines are partially supported.
21728         (selftest::test_fixit_insert_containing_newline_2): New test.
21729         (selftest::test_fixit_replace_containing_newline): Update comments.
21730         (selftest::diagnostic_show_locus_c_tests): Call the new test.
21731         * edit-context.c (class added_line): New class.
21732         (class edited_line): Describe newline handling in comment.
21733         (edited_line::actually_edited_p): New method.
21734         (edited_line::print_content): Delete redundant decl.
21735         (edited_line::m_predecessors): New field.
21736         (edited_file::print_content): Call edited_line::print_content.
21737         (edited_file::print_diff): Update to support newlines.
21738         (edited_file::print_diff_hunk): Likewise.
21739         (edited_file::print_run_of_changed_lines): New function.
21740         (edited_file::print_diff_line): Convert to...
21741         (print_diff_line): ...this.
21742         (edited_file::get_effective_line_count): New function.
21743         (edited_line::edited_line): Initialize new field m_predecessors.
21744         (edited_line::~edited_line): Clean up m_predecessors.
21745         (edited_line::apply_fixit): Handle newlines.
21746         (edited_line::get_effective_line_count): New function.
21747         (edited_line::print_content): New function.
21748         (edited_line::print_diff_lines): New function.
21749         (selftest::test_applying_fixits_insert_containing_newline): New
21750         test.
21751         (selftest::test_applying_fixits_replace_containing_newline): New
21752         test.
21753         (selftest::insert_line): New function.
21754         (selftest::test_applying_fixits_multiple_lines): Add example of
21755         inserting a line.
21756         (selftest::edit_context_c_tests): Call the new tests.
21757
21758 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21759
21760         * tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Delete
21761         parameter cand.  Update dump information.
21762         (get_computation_cost): Update uses.
21763
21764 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21765
21766         * tree-ssa-loop-ivopts.c (get_computation_aff_1): New.
21767         (get_computation_aff): Reorder parameters.  Use get_computation_aff_1.
21768         (get_computation_at, rewrite_use_address): Update use of
21769         get_computation_aff.
21770
21771 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21772
21773         * tree-ssa-loop-ivopts.c (get_computation_at): Reorder parameters.
21774         (get_computation): Delete.
21775         (get_computation_cost): Implement like get_computation_cost_at.
21776         Use get_computation_at.
21777         (get_computation_cost_at): Delete.
21778         (rewrite_use_nonlinear_expr): Use get_computation_at.
21779         (rewrite_use_compare, remove_unused_ivs): Ditto.
21780
21781 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21782
21783         * tree-ssa-loop-ivopts.c (rewrite_use_address): Simple refactor.
21784
21785 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21786
21787         * tree-ssa-loop-ivopts.c (struct iv_ca): Rename n_regs to n_invs.
21788         (ivopts_global_cost_for_size): Rename parameter and update uses.
21789         (iv_ca_recount_cost): Update uses.
21790         (iv_ca_set_remove_invs, iv_ca_set_no_cp): Record invariants and
21791         candidates seperately in n_invs and n_cands.
21792         (iv_ca_set_add_invs, iv_ca_set_cp, iv_ca_new): Ditto.
21793
21794 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21795
21796         * tree-ssa-loop-ivopts.c (struct walk_tree_data): New.
21797         (find_inv_vars_cb): New.
21798         (find_depends): Renamed to ...
21799         (find_inv_vars): ... this.
21800         (add_candidate_1, force_var_cost): Call find_inv_vars.
21801         (split_address_cost, determine_group_iv_cost_cond): Ditto.
21802
21803 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21804
21805         * tree-ssa-loop-ivopts.c (struct cost_pair): Rename depends_on to
21806         inv_vars.  Add inv_exprs.
21807         (struct iv_cand): Rename depends_on to inv_vars.
21808         (struct ivopts_data): Rename max_inv_id/n_invariant_uses to
21809         max_inv_var_id/n_inv_var_uses.  Move max_inv_expr_id around.
21810         Refactor field used_inv_exprs from has_map to array n_inv_expr_uses.
21811         (dump_cand): Dump inv_vars.
21812         (tree_ssa_iv_optimize_init): Support inv_vars and inv_exprs.
21813         (record_invariant, find_depends, add_candidate_1): Ditto.
21814         (set_group_iv_cost, force_var_cost): Ditto.
21815         (split_address_cost, ptr_difference_cost, difference_cost): Ditto.
21816         (get_computation_cost_at, get_computation_cost): Ditto.
21817         (determine_group_iv_cost_generic): Ditto.
21818         (determine_group_iv_cost_address): Ditto.
21819         (determine_group_iv_cost_cond, autoinc_possible_for_pair): Ditto.
21820         (determine_group_iv_costs): Ditto.
21821         (iv_ca_recount_cost): Update call to ivopts_global_cost_for_size.
21822         (iv_ca_set_remove_invariants): Renamed to ...
21823         (iv_ca_set_remove_invs): ... this.  Support inv_vars and inv_exprs.
21824         (iv_ca_set_no_cp): Use iv_ca_set_remove_invs.
21825         (iv_ca_set_add_invariants):  Renamed to ...
21826         (iv_ca_set_add_invs): ... this.  Support inv_vars and inv_exprs.
21827         (iv_ca_set_cp): Use iv_ca_set_add_invs.
21828         (iv_ca_has_deps): Support inv_vars and inv_exprs.
21829         (iv_ca_new, iv_ca_free, iv_ca_dump, free_loop_data): Ditto.
21830         (create_new_ivs): Remove useless dump.
21831
21832 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21833
21834         * tree-ssa-loop-ivopts.c (get_computation_cost_at): Remove pseudo
21835         iv_cand code.
21836         (determine_group_iv_cost_cond, determine_iv_cost): Ditto.
21837         (iv_ca_set_no_cp, create_new_iv): Ditto.
21838
21839 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21840
21841         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
21842
21843 2017-05-02  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
21844
21845         * tree.h (EXPR_CILK_SPAWN): Use macro TREE_CHECK2 instead of
21846         function tree_check2.
21847
21848 2017-05-02  Martin Liska  <mliska@suse.cz>
21849
21850         * doc/gcov.texi: Add missing preposition.
21851         * gcov.c (function_info::function_info): Properly fill up
21852         all member variables.
21853
21854 2017-05-02  Tamar Christina  <tamar.christina@arm.com>
21855
21856         * expr.c (expand_expr_real_2): Re-cost if previous costs are the same.
21857
21858 2017-05-02  Tamar Christina  <tamar.christina@arm.com>
21859
21860         * simplify-rtx.c (simplify_binary_operation_1): Add LSHIFTRT case.
21861
21862 2017-05-02  Martin Liska  <mliska@suse.cz>
21863
21864         PR lto/77954.
21865         * lto-streamer-in.c (lto_read_tree_1): Remove
21866         LTO_STREAMER_DEBUG.
21867         * lto-streamer.c (struct tree_hash_entry): Likewise.
21868         (struct tree_entry_hasher): Likewise.
21869         (tree_entry_hasher::hash): Likewise.
21870         (tree_entry_hasher::equal): Likewise.
21871         (lto_streamer_init): Likewise.
21872         (lto_orig_address_map): Likewise.
21873         (lto_orig_address_get): Likewise.
21874         (lto_orig_address_remove): Likewise.
21875         * lto-streamer.h: Likewise.
21876         * tree-streamer-in.c (streamer_alloc_tree): Likewise.
21877         * tree-streamer-out.c (streamer_write_tree_header): Likewise.
21878
21879 2017-05-02  Sebastian Peryt  <sebastian.peryt@intel.com>
21880
21881         * config/i386/avx512fintrin.h (_mm_mask_add_round_sd)
21882         (_mm_maskz_add_round_sd, _mm_mask_add_round_ss)
21883         (mm_maskz_add_round_ss, _mm_mask_sub_round_sd)
21884         (mm_maskz_sub_round_sd, _mm_mask_sub_round_ss)
21885         (mm_maskz_sub_round_ss, _mm_mask_add_sd)
21886         (mm_maskz_add_sd, _mm_mask_add_ss, _mm_maskz_add_ss)
21887         (mm_mask_sub_sd, _mm_maskz_sub_sd, _mm_mask_sub_ss)
21888         (mm_maskz_sub_ss): New intrinsics.
21889         * config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
21890         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
21891         * config/i386/i386-builtin.def (__builtin_ia32_addsd_mask_round)
21892         (__builtin_ia32_addss_mask_round, __builtin_ia32_subsd_mask_round)
21893         (__builtin_ia32_subss_mask_round): New builtins.
21894         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
21895         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
21896         * config/i386/sse.md (<sse>_vm<plusminus_insn><mode>3<round_name>):
21897         Renamed to ...
21898         (<sse>_vm<plusminus_insn><mode>3<mask_name><round_name>): ... this.
21899         (v<plusminus_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
21900         Changed to ...
21901         (v<plusminus_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
21902         ... this.
21903
21904 2017-05-02  Martin Jambor  <mjambor@suse.cz>
21905
21906         PR tree-optimization/78687
21907         * tree-sra.c (access): New field parent.
21908         (process_subtree_disqualification): New function.
21909         (disqualify_candidate): Call it.
21910         (build_accesses_from_assign): Reset write flag if creating an
21911         assighnment link.
21912         (build_access_subtree): Fill in parent field and also prpagate
21913         down grp_write flag.
21914         (create_artificial_child_access): New parameter set_grp_write, set
21915         grp_write to its value.
21916         (propagate_subaccesses_across_link): Also propagate grp_write flag
21917         values.
21918         (propagate_all_subaccesses): Push the closest parent back to work
21919         queue if add_access_to_work_queue returned true.
21920
21921 2017-05-02  Richard Biener  <rguenther@suse.de>
21922
21923         * common.opt (fstrict-overflow): Alias negative to fwrapv.
21924         * doc/invoke.texi (fstrict-overflow): Remove all traces of
21925         -fstrict-overflow documentation.
21926         * tree.h (TYPE_OVERFLOW_UNDEFINED): Do not test flag_strict_overflow.
21927         (POINTER_TYPE_OVERFLOW_UNDEFINED): Test !flag_wrapv instead of
21928         flag_strict_overflow.
21929         * ipa-inline.c (can_inline_edge_p): Do not test flag_strict_overflow.
21930         * lto-opts.c (lto_write_options): Do not stream it.
21931         * lto-wrapper.c (merge_and_complain): Do not handle it.
21932         * opts.c (default_options_table): Do not set -fstrict-overflow.
21933         (finish_options): Likewise do not clear it when sanitizing.
21934         * simplify-rtx.c (simplify_const_relational_operation): Do not
21935         test flag_strict_overflow.
21936
21937 2017-05-02  Uros Bizjak  <ubizjak@gmail.com>
21938
21939         * config/alpha/alpha.md (*add<mode>3_ieee): Merge to add<mode>3
21940         using enabled attribute.
21941         (*sub<mode>3_ieee): Merge to sub<mode>3 using enabled attribute.
21942         (*mul<mode>3_ieee): Merge to mul<mode>3 using enabled attribute.
21943         (*div<mode>3_ieee): Merge to div<mode>3 using enabled attribute.
21944         (*sqrt<mode>2_ieee): Merge to sqrt<mode>2 using enabled attribute.
21945         (*fix_truncdfdi_ieee): Merge to *fix_truncdfdi2 using enabled attribute.
21946         (*fix_truncsfdi_ieee): Merge to *fix_truncsfdi2 using enabled attribute.
21947         (*floatdisf_ieee): Merge to floatdisf2 using enabled attribute.
21948         (*floatdidf_ieee): Merge to floatdidf2 using enabled attribute.
21949         (*truncdfsf2_ieee): Merge to truncdfsf2 using enabled attribute.
21950         (*cmpdf_ieee): Merge to *cmpdf_internal using enabled attribute.
21951
21952 2017-05-02  Uros Bizjak  <ubizjak@gmail.com>
21953
21954         * config/i386/i386.c (ix86_code_end): Use {FIRST,LAST}_INT_REG.
21955
21956 2017-05-02  Richard Biener  <rguenther@suse.de>
21957
21958         PR tree-optimization/80591
21959         Revert
21960         2017-04-10  Richard Biener  <rguenther@suse.de>
21961
21962         * tree-ssa-structalias.c (find_func_aliases): Properly handle
21963         asm inputs.
21964
21965 2017-05-02  Richard Biener  <rguenther@suse.de>
21966
21967         PR tree-optimization/80549
21968         * tree-cfgcleanup.c (mfb_keep_latches): New helper.
21969         (cleanup_tree_cfg_noloop): Create forwarders to known loop
21970         headers if they do not have a preheader.
21971
21972 2017-05-02  Martin Liska  <mliska@suse.cz>
21973
21974         PR other/80589
21975         * common.opt: Fix typo.
21976         * doc/invoke.texi: Likewise.
21977
21978 2017-05-01  Jan Beulich  <jbeulich@suse.com>
21979
21980         * config/i386/sse.md (xop_vpermil2<mode>3): Do not allow operand
21981         swapping, add (x,x,m,x,n) alternative.
21982
21983 2017-05-01  Nathan Sidwell  <nathan@acm.org>
21984
21985         * calls.c (combine_pending_stack_adjustment_and_call): Remove
21986         unnecessary unadjusted_alignment check.
21987
21988 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
21989
21990         PR c++/80038
21991         * cilk_common.c (expand_builtin_cilk_detach): Move pedigree
21992         operations here.
21993         * gimplify.c (gimplify_cilk_detach): New function.
21994         (gimplify_call_expr, gimplify_modify_expr): Call it as needed.
21995         * tree-core.h: Document EXPR_CILK_SPAWN.
21996         * tree.h (EXPR_CILK_SPAWN): Define.
21997
21998 2017-05-01  David Malcolm  <dmalcolm@redhat.com>
21999
22000         * diagnostic-show-locus.c (layout::get_expanded_location): Rewrite
22001         to use new fixit_hint representation, using the "replace" logic.
22002         (get_line_span_for_fixit_hint): Likewise.
22003         (layout::print_any_fixits): Likewise.
22004         (selftest::test_one_liner_many_fixits): Rename to...
22005         (selftest::test_one_liner_many_fixits_1): ...this, and update
22006         comment and expected output to reflect that the multiple fix-it
22007         hints are now consolidated into one insertion.
22008         (selftest::test_one_liner_many_fixits_2): New test.
22009         (selftest::test_diagnostic_show_locus_one_liner): Update for
22010         above.
22011         (selftest::test_fixit_consolidation): Update for fix-it API
22012         change.
22013         * diagnostic.c (print_parseable_fixits): Likewise.
22014         * edit-context.c (edited_line::m_line_events): Convert from
22015         auto_vec <line_event *> to auto_vec <line_event>.
22016         (class line_event): Convert from abstract base class to a concrete
22017         class, taking over the role of replace_event.
22018         (class insert_event): Delete.
22019         (class replace_event): Rename to class line_event.  Convert to
22020         half-open range.
22021         (edit_context::add_fixits): Reimplement.
22022         (edit_context::apply_insert): Delete.
22023         (edit_context::apply_replace): Rename to...
22024         (edit_context::apply_fixit): ...this.  Convert to half-open range.
22025         (edited_file::apply_insert): Delete.
22026         (edited_file::apply_replace): Rename to...
22027         (edited_file::apply_fixit): ...this.
22028         (edited_line::~edited_line): Drop deletion of events.
22029         (edited_line::apply_insert): Delete.
22030         (edited_line::apply_replace): Rename to...
22031         (edited_line::apply_fixit): ...this.  Convert to half-open range.
22032         Update for change to type of m_line_events.
22033         * edit-context.h (edit_context::apply_insert): Delete.
22034         (edit_context::apply_replace): Rename to...
22035         (edit_context::apply_fixit): ...this.
22036
22037 2017-05-01  Martin Sebor  <msebor@redhat.com>
22038
22039         * gimple-ssa-sprintf.c (format_integer): Set knownrange when it's
22040         known.
22041
22042 2017-05-01  Uros Bizjak  <ubizjak@gmail.com>
22043
22044         PR target/68491
22045         * config/i386/cpuid.h (__get_cpuid): Always return 0 when
22046         __get_cpuid_max returns 0.
22047         (__get_cpuid_count): Ditto.
22048
22049 2017-05-01  Eric Botcazou  <ebotcazou@adacore.com>
22050
22051         * tree.c (substitute_in_expr) <tcc_vl_exp>: Also inline a call if the
22052         replacement expression is another instance of one of its arguments.
22053
22054 2017-05-01  Jakub Jelinek  <jakub@redhat.com>
22055
22056         PR target/79430
22057         * rtlanal.c (reg_set_p): If reg is a stack_pointer_rtx, also
22058         check for stack push/pop autoinc.
22059         * config/i386/i386.c (ix86_agi_dependent): Return false
22060         if the only reason why modified_in_p returned true is that
22061         addr is SP based and set_insn is a push or pop.
22062
22063 2017-04-29  Jan Hubicka  <hubicka@ucw.cz>
22064
22065         * ipa-inline.c (compute_inlined_call_time): Remove now unnecesary
22066         overflow check.
22067
22068 2017-04-29  Jan Hubicka  <hubicka@ucw.cz>
22069
22070         PR ipa/79224
22071         * ipa-inline-analysis.c (dump_predicate): Add optional parameter NL.
22072         (account_size_time): Use two predicates - exec_pred and
22073         nonconst_pred_ptr.
22074         (evaluate_conditions_for_known_args): Compute both clause and
22075         nonspec_clause.
22076         (evaluate_properties_for_edge): Evaulate both clause and nonspec_clause.
22077         (inline_summary_t::duplicate): Update.
22078         (estimate_function_body_sizes): Caluculate exec and nonconst predicates
22079         separately.
22080         (compute_inline_parameters): Likewise.
22081         (estimate_edge_size_and_time): Update caluclation of time.
22082         (estimate_node_size_and_time): Compute both time and nonspecialized
22083         time.
22084         (estimate_ipcp_clone_size_and_time): Update.
22085         (inline_merge_summary): Update.
22086         (do_estimate_edge_time): Update.
22087         (do_estimate_edge_size): Update.
22088         (do_estimate_edge_hints): Update.
22089         (inline_read_section, inline_write_summary): Stream both new predicates.
22090         * ipa-inline.c (compute_uninlined_call_time): Take uninlined_call_time
22091         as argument.
22092         (compute_inlined_call_time): Cleanup.
22093         (big_speedup_p): Update.
22094         (edge_badness): Update.
22095         * ipa-inline.h (INLINE_TIME_SCALE): Remove.
22096         (size_time_entry): Replace predicate by exec_predicate and
22097         nonconst_predicate.
22098         (edge_growth_cache_entry): Cache both time nad nonspecialized time.
22099         (estimate_edge_time): Return also nonspec_time.
22100         (reset_edge_growth_cache): Update.
22101
22102 2017-04-29  Jakub Jelinek  <jakub@redhat.com>
22103
22104         PR rtl-optimization/80491
22105         * ifcvt.c (noce_process_if_block): When looking for x setter
22106         with missing else_bb, don't check only the insn right before
22107         cond_earliest, but look for the last insn that x is modified in
22108         within the same bb.
22109
22110         PR rtl-optimization/80491
22111         * alias.c (memory_modified_in_insn_p): Return true for CALL_INSNs.
22112
22113 2017-04-29  Marc Glisse  <marc.glisse@inria.fr>
22114
22115         PR tree-optimization/80487
22116         * tree-ssa-alias.c (stmt_kills_ref_p): Handle stpncpy and strncpy.
22117
22118 2017-04-29  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22119
22120         PR tree-optimization/79697
22121         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Check if callee
22122         is BUILT_IN_STRDUP, BUILT_IN_STRNDUP, BUILT_IN_REALLOC.
22123         (propagate_necessity): Check if def_callee is BUILT_IN_STRDUP or
22124         BUILT_IN_STRNDUP.
22125         * gimple-fold.c (gimple_fold_builtin_realloc): New function.
22126         (gimple_fold_builtin): Call gimple_fold_builtin_realloc.
22127
22128 2017-04-28  Martin Sebor  <msebor@redhat.com>
22129
22130         PR tree-optimization/80523
22131         * gimple-ssa-sprintf.c (target_to_host_charmap): New global variable.
22132         (init_target_to_host_charmap, target_to_host, target_strtol10): New
22133         functions.
22134         (maybe_warn, format_directive, parse_directive): Use new functions.
22135         (pass_sprintf_length::execute): Call init_target_to_host_charmap.
22136
22137 2017-04-28  Marc Glisse  <marc.glisse@inria.fr>
22138
22139         * match.pd (X+Z OP Y+Z, X-Z OP Y-Z, Z-X OP Z-Y): New transformations.
22140
22141 2017-04-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
22142
22143         * configure.ac (SYSTEM_HEADER_DIR, BUILD_SYSTEM_HEADER_DIR,
22144         target_header_dir): Set correctly.
22145         * configure: Regenerated.
22146         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
22147         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
22148         instead of SYSTEM_HEADER_DIR.
22149
22150 2017-04-28  Jan Hubicka  <hubicka@ucw.cz>
22151
22152         * ipa-cp.c (perform_estimation_of_a_value): Turn time to sreal.
22153         (estimate_local_effects): Likewise.
22154         * ipa-inline.c (compute_inlined_call_time, want_inline_small_function_p,
22155         edge_badness, inline_small_functions, dump_overall_stats): LIkewise.
22156         * ipa-inline.h (edge_growth_cache_entry, estimate_time_after_inlining,
22157         estimate_ipcp_clone_size_and_time, do_estimate_edge_time,
22158         do_estimate_edge_time, estimate_edge_time): Likewise.
22159         * ipa-inline-analysis.c (estimate_node_size_and_time,
22160         estimate_ipcp_clone_size_and_time, do_estimate_edge_time): Likewise.
22161         (estimate_time_after_inlining): Remove.
22162
22163 2017-04-28  Martin Liska  <mliska@suse.cz>
22164
22165         * doc/gcov.texi: Enhance documentation of gcov.
22166
22167 2017-04-28  Martin Liska  <mliska@suse.cz>
22168
22169         * doc/gcov.texi: Sort options in alphabetic order.
22170         * doc/gcov-dump.texi: Likewise.
22171         * doc/gcov-tool.texi: Likewise.
22172         * gcov.c (print_usage): Likewise.
22173         * gcov-dump.c (print_usage): Likewise.
22174         * gcov-tool.c (print_merge_usage_message): Likewise.
22175         (print_rewrite_usage_message): Likewise.
22176         (print_overlap_usage_message): Likewise.
22177
22178 2017-04-28  Martin Liska  <mliska@suse.cz>
22179
22180         PR gcov-profile/53915
22181         * gcov.c (format_gcov): Print 'NAN %' when top > bottom.
22182
22183 2017-04-28  Martin Liska  <mliska@suse.cz>
22184
22185         PR gcov-profile/79891
22186         * gcov.c (add_line_counts): Assign BBs to lines just if the BB
22187         is marked by compiler as living on a line.
22188         (get_cycles_count): Remove usage of the union.
22189         (output_intermediate_file): Likewise.
22190         (find_source): Fix GNU coding style.
22191         (accumulate_line_counts): Remove old non-all block mode.
22192         (output_lines): Remove usage of the union.
22193         * profile.c (output_location): Include all BBs, even if
22194         belonging to a same line (and file) as a previous BB.
22195
22196 2017-04-28  Martin Liska  <mliska@suse.cz>
22197
22198         * gcov.c (process_args): Handle new argument 'w'.
22199         (read_graph_file): Assign ID to BBs.
22200         (output_branch_count): Display BB # if verbose flag is set.
22201         (output_lines): Likewise for arcs.
22202         (print_usage): Add '--verbose' option help.
22203         * doc/gcov.texi: Document --verbose (-w) option.
22204
22205 2017-04-28  Martin Liska  <mliska@suse.cz>
22206
22207         * gcov.c (struct block_location_info): New struct.
22208         (process_file): Fill up the new structure.
22209         (read_graph_file): Replace usage of encoding by the newly added
22210         struct.
22211         (add_line_counts): Likewise.
22212         (accumulate_line_counts): Remove usage of the union.
22213         (function_info::function_info): New function.
22214         (function_info::~function_info): Likewise.
22215         (process_file): Call delete instead of release_function.
22216         (release_function): Release the function.
22217         (release_structures): Call delete instead of release_function.
22218         (solve_flow_graph): Replace usage of num_blocks.
22219         (find_exception_blocks): Likewise.
22220         (output_lines): Fix GNU coding style.
22221
22222 2017-04-28  Martin Liska  <mliska@suse.cz>
22223
22224         PR driver/56469
22225         * coverage.c (coverage_remove_note_file): New function.
22226         * coverage.h: Declare the function.
22227         * toplev.c (finalize): Clean if an error has been seen.
22228
22229 2017-04-28  Martin Liska  <mliska@suse.cz>
22230
22231         PR gcov-profile/80031
22232         * gcov-dump.c (tag_blocks): Just print number of basic blocks.
22233         * gcov-io.h (GCOV_TAG_BLOCKS_NUM): Remove unused macro.
22234         * gcov.c (read_graph_file): Read just number of blocks.
22235         * profile.c (branch_prob): Do not stream 0 flags per a basic
22236         block.
22237
22238 2017-04-28  Martin Liska  <mliska@suse.cz>
22239
22240         * gcov-dump.c (tag_*): Add new argument to declarations.
22241         (dump_gcov_file): Likewise.
22242         (tag_blocks): Add and use new argument depth.
22243         (tag_arcs): Likewise.
22244         (tag_lines): Likewise.
22245         (tag_counters): Likewise.
22246         (tag_summary): Likewise.
22247         (dump_working_sets): Use depth to do a proper indentation.
22248
22249 2017-04-28  Jakub Jelinek  <jakub@redhat.com>
22250
22251         PR bootstrap/80531
22252         * cgraph.h (symtab_node::debug_symtab): No longer inline.
22253         * symtab.c (symtab_node::debug_symtab): Move definition here.
22254
22255 2017-04-28  Richard Biener  <rguenther@suse.de>
22256
22257         * lto-streamer.h (LTO_major_version): Bump to 7.
22258
22259 2017-04-28  Richard Biener  <rguenther@suse.de>
22260
22261         * tree-vrp.c (assert_info): New struct.
22262         (add_assert_info): New helper.
22263         (register_edge_assert_for_2): Refactor to add asserts to a vector
22264         of assert_info.
22265         (register_edge_assert_for_1): Likewise.
22266         (register_edge_assert_for): Likewise.
22267         (finish_register_edge_assert_for): New helper actually registering
22268         asserts where live on edge.
22269         (find_conditional_asserts): Adjust.
22270         (find_switch_asserts): Likewise.
22271         (evrp_dom_walker::try_find_new_range): Generalize.
22272         (evrp_dom_walker::before_dom_children): Use register_edge_assert_for.
22273
22274 2017-04-27  Marek Polacek  <polacek@redhat.com>
22275
22276         PR sanitizer/80349
22277         * fold-const.c (fold_binary_loc) <case EQ_EXPR, NE_EXPR>: Convert
22278         arg10 and arg11 to itype.
22279
22280 2017-04-27  Jonathan Wakely  <jwakely@redhat.com>
22281
22282         * doc/extend.texi (Object Size Checking): Improve grammar.
22283
22284 2017-04-27  Richard Earnshaw  <rearnsha@arm.com>
22285
22286         PR target/80530
22287         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Ensure
22288         that the logic for permitting reciprocal estimates matches that
22289         in use_rsqrt_p.
22290
22291 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
22292
22293         PR c++/80534
22294         * tree.c (type_cache_hasher::equal): Only compare
22295         TYPE_TYPELESS_STORAGE flag on non-aggregate element types.
22296         (build_array_type_1): Only hash TYPE_TYPELESS_STORAGE flag on
22297         non-aggregate element types.
22298         * tree.h (TYPE_TYPELESS_STORAGE): Fix comment typo, add more details
22299         about the flag on ARRAY_TYPEs in the comment, formatting fix.
22300
22301 2017-04-27  Richard Biener  <rguenther@suse.de>
22302
22303         PR middle-end/80533
22304         * emit-rtl.c (set_mem_attributes_minus_bitpos): When
22305         stripping ARRAY_REFs from MEM_EXPR make sure we're not
22306         keeping a reference to a trailing array.
22307
22308 2017-04-27  Richard Biener  <rguenther@suse.de>
22309
22310         PR middle-end/80539
22311         * tree-chrec.c (chrec_fold_plus_poly_poly): Deal with not
22312         being in loop-closed SSA form conservatively.
22313         (chrec_fold_multiply_poly_poly): Likewise.
22314
22315 2017-04-27  Tamar Christina  <tamar.christina@arm.com>
22316
22317         PR middle-end/79665
22318         * expr.c (expand_expr_real_2): Move TRUNC_MOD_EXPR, FLOOR_MOD_EXPR,
22319         CEIL_MOD_EXPR, ROUND_MOD_EXPR cases.
22320
22321 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
22322
22323         PR target/77728
22324         * config/aarch64/aarch64.c (struct aarch64_fn_arg_alignment): Remove.
22325         (aarch64_function_arg_alignment): Return unsigned int again, but still
22326         ignore TYPE_FIELDS chain decls other than FIELD_DECLs.
22327         (aarch64_layout_arg): Adjust aarch64_function_arg_alignment caller.
22328         Don't emit -Wpsabi note.
22329         (aarch64_function_arg_boundary): Likewise.
22330         (aarch64_gimplify_va_arg_expr): Adjust aarch64_function_arg_alignment
22331         caller.
22332
22333 2017-04-26  Nathan Sidwell  <nathan@acm.org>
22334
22335         * tree.h (crc32_unsigned_n): Declare.
22336         (crc32_unsigned, crc32_unsigned): Make inline.
22337         * tree.c (crc32_unsigned_bits): Replace with ...
22338         (crc32_unsigned_n): ... this.
22339         (crc32_unsigned, crc32_byte): Remove.
22340         (crc32_string): Remove unnecessary braces.
22341
22342 2017-04-25  Jan Hubicka  <hubicka@ucw.cz>
22343
22344         * ipa-cp.c (estimate_local_effects): Convert sreal to int.
22345         * ipa-inline-analysis.c (MAX_TIME): Remove.
22346         (account_size_time): Use sreal for time.
22347         (dump_inline_summary): Update.
22348         (estimate_function_body_sizes): Update.
22349         (estimate_edge_size_and_time): Update.
22350         (estimate_calls_size_and_time): Update.
22351         (estimate_node_size_and_time): Update.
22352         (inline_merge_summary): Update.
22353         (inline_update_overall_summary): Update.
22354         (estimate_time_after_inlining): Update.
22355         (inline_read_section): Update.
22356         (inline_write_summary): Update.
22357         * ipa-inline.c (compute_uninlined_call_time): Update.
22358         (compute_inlined_call_time): Update.
22359         (recursive_inlining): Update.
22360         (inline_small_functions): Update.
22361         (dump_overall_stats): Update.
22362         * ipa-inline.h: Include sreal.h.
22363         (size_time_entry): Turn time to sreal.
22364         (inline_summary): Turn self_time nad time to sreal.
22365
22366 2017-04-25  Jan Hubicka  <hubicka@ucw.cz>
22367
22368         * sreal.c: Include backend.h, tree.h, gimple.h, cgraph.h and
22369         data-streamer.h
22370         (sreal::stream_out, sreal::stream_in): New.
22371         * sreal.h (sreal::stream_out, sreal::stream_in): Declare.
22372
22373 2017-04-25  Jakub Jelinek  <jakub@redhat.com>
22374
22375         * Makefile.in (s-options): Invoke opt-gather.awk with LC_ALL=C in the
22376         environment.
22377
22378 2017-04-25  Uros Bizjak  <ubizjak@gmail.com>
22379
22380         PR target/70799
22381         * config/i386/i386.c (dimode_scalar_to_vector_candidate_p):
22382         Handle ASHIFTRT.
22383         (dimode_scalar_chain::compute_convert_gain): Ditto.
22384         (dimode_scalar_chain::make_vector_copies): Ditto.
22385         (dimode_scalar_chain::convert_reg): Ditto.
22386         (dimode_scalar_chain::convert_insn): Ditto.
22387         * config/i386/sse.md (VI24_AVX512BW_1): Remove mode iterator.
22388         (VI248_AVX512BW_1): New mode iterator.
22389         (<mask_codefor>ashr<mode>3<mask_name>): Merge insn pattern with
22390         <mask_codefor>ashrv2di3<mask_name> insn using VI248_AVX512BW_1
22391         mode iterator.
22392
22393 2017-04-25  Martin Sebor  <msebor@redhat.com>
22394
22395         PR tree-optimization/80497
22396         * gimple-ssa-sprintf.c (get_int_range): Avoid assuming all integer
22397         constants are representable in HOST_WIDE_INT.
22398         (parse_directive): Ditto.
22399
22400 2017-04-25  Martin Sebor  <msebor@redhat.com>
22401
22402         PR bootstrap/80486
22403         * dominance.c (dom_info::m_n_basic_blocks): Change type to unsigned.
22404         (new_zero_array): Adjust signature.
22405         (dom_info::dom_init): Used unsigned rather that size_t.
22406         (dom_info::dom_info): Same.
22407
22408 2017-04-25  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
22409             Jakub Jelinek  <jakub@redhat.com>
22410
22411         PR target/77728
22412         * config/arm/arm.c: Include gimple.h.
22413         (aapcs_layout_arg): Emit -Wpsabi note if arm_needs_doubleword_align
22414         returns negative, increment ncrn only if it returned positive.
22415         (arm_needs_doubleword_align): Return int instead of bool,
22416         ignore DECL_ALIGN of non-FIELD_DECL TYPE_FIELDS chain
22417         members, but if there is any such non-FIELD_DECL
22418         > PARM_BOUNDARY aligned decl, return -1 instead of false.
22419         (arm_function_arg): Emit -Wpsabi note if arm_needs_doubleword_align
22420         returns negative, increment nregs only if it returned positive.
22421         (arm_setup_incoming_varargs): Likewise.
22422         (arm_function_arg_boundary): Emit -Wpsabi note if
22423         arm_needs_doubleword_align returns negative, return
22424         DOUBLEWORD_ALIGNMENT only if it returned positive.
22425
22426 2017-04-25  Marek Polacek  <polacek@redhat.com>
22427
22428         PR sanitizer/80349
22429         * fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
22430         first argument to type.
22431
22432 2017-04-25  Bill Seurer  <seurer@linux.vnet.ibm.com>
22433
22434         PR target/80482
22435         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Change
22436         type checks to test for compatibility instead of equality.
22437
22438 2017-04-25  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
22439             Jakub Jelinek  <jakub@redhat.com>
22440
22441         PR target/77728
22442         * config/aarch64/aarch64.c (struct aarch64_fn_arg_alignment): New
22443         type.
22444         (aarch64_function_arg_alignment): Return aarch64_fn_arg_alignment
22445         struct.  Ignore DECL_ALIGN of decls other than FIELD_DECL for
22446         the alignment computation, but return their maximum in warn_alignment.
22447         (aarch64_layout_arg): Adjust aarch64_function_arg_alignment caller.
22448         Emit a -Wpsabi note if warn_alignment is 16 bytes, but alignment
22449         is smaller.
22450         (aarch64_function_arg_boundary): Likewise.  Simplify using MIN/MAX.
22451         (aarch64_gimplify_va_arg_expr): Adjust aarch64_function_arg_alignment
22452         caller.
22453
22454 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
22455
22456         * config/arc/simdext.md (dmpyh): Fix typo.
22457
22458 2017-04-25  Richard Biener  <rguenther@suse.de>
22459
22460         PR tree-optimization/80492
22461         * alias.c (compare_base_decls): Handle registers with asm
22462         specification conservatively.
22463         * tree-ssa-alias.c (decl_refs_may_alias_p): Handle
22464         compare_base_decls returning dont-know properly.
22465
22466 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
22467
22468         * config/arc/arc.c (LEGITIMATE_OFFSET_ADDRESS_P): Delete macro.
22469         (legitimate_offset_address_p): New function.
22470         (arc_legitimate_address_p): Use above function.
22471
22472 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
22473
22474         * config/arc/arc.c (arc_output_mi_thunk): Emit PIC calls.
22475
22476 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
22477
22478         * config/arc/arc.c (arc_conditional_register_usage): Use ACCL,
22479         ACCH registers whenever they are available.
22480
22481 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
22482
22483         * config/arc/arc.c (arc_conditional_register_usage): Make D0, D1
22484         double regs fix when not used.
22485
22486 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
22487
22488         * config/arc/arc.h (REGNO_OK_FOR_BASE_P): Consider also extension
22489         core registers.
22490         (REG_OK_FOR_INDEX_P_NONSTRICT): Likewise.
22491         (REG_OK_FOR_BASE_P_NONSTRICT): Likewise.
22492
22493 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
22494
22495         * config/arc/arc.c (arc_output_addsi): Check for h-register class
22496         when emitting short ADD instructions.
22497
22498 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
22499
22500         * config/arc/arc.md (cmpsi_cc_insn_mixed): Use 'h' register
22501         constraint.
22502         (cmpsi_cc_c_insn): Likewise.
22503         (cbranchsi4_scratch): Compute proper instruction length using
22504         compact_hreg_operand.
22505         * config/arc/predicates.md (compact_hreg_operand): New predicate.
22506
22507 2017-04-25  Richard Biener  <rguenther@suse.de>
22508
22509         PR middle-end/80509
22510         * passes.c (pass_manager::pass_manager): Initialize
22511         m_name_to_pass_map.
22512
22513 2017-04-25  Richard Biener  <rguenther@suse.de>
22514
22515         PR tree-optimization/79201
22516         * tree-ssa-sink.c (statement_sink_location): Handle calls.
22517
22518 2017-04-25  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22519
22520         PR target/80464
22521         * config/s390/vector.md: Split MEM->GPR vector moves for
22522         non-s_operand addresses.
22523
22524 2017-04-25  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22525
22526         PR target/79895
22527         * config/s390/predicates.md (reload_const_wide_int_operand): New
22528         predicate.
22529         * config/s390/s390.md ("movti"): Remove d/P alternative.
22530         ("movti_bigconst"): New pattern definition.
22531
22532 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
22533
22534         PR target/80080
22535         * s390-protos.h (s390_expand_cs_hqi): Removed.
22536         (s390_expand_cs, s390_expand_atomic_exchange_tdsi): New prototypes.
22537         * config/s390/s390.c (s390_emit_compare_and_swap): Handle all integer
22538         modes as well as CCZ1mode and CCZmode.
22539         (s390_expand_atomic_exchange_tdsi, s390_expand_atomic): Adapt to new
22540         signature of s390_emit_compare_and_swap.
22541         (s390_expand_cs_hqi): Likewise, make static.
22542         (s390_expand_cs_tdsi): Generate an explicit compare before trying
22543         compare-and-swap, in some cases.
22544         (s390_expand_cs): Wrapper function.
22545         (s390_expand_atomic_exchange_tdsi): New backend specific expander for
22546         atomic_exchange.
22547         (s390_match_ccmode_set): Allow CCZmode <-> CCZ1 mode.
22548         * config/s390/s390.md ("atomic_compare_and_swap<mode>"): Merge the
22549         patterns for small and large integers.  Forbid symref memory operands.
22550         Move expander to s390.c.  Require cc register.
22551         ("atomic_compare_and_swap<DGPR:mode><CCZZ1:mode>_internal")
22552         ("*atomic_compare_and_swap<TDI:mode><CCZZ1:mode>_1")
22553         ("*atomic_compare_and_swapdi<CCZZ1:mode>_2")
22554         ("*atomic_compare_and_swapsi<CCZZ1:mode>_3"): Use s_operand to forbid
22555         symref memory operands.  Remove CC mode and call s390_match_ccmode
22556         instead.
22557         ("atomic_exchange<mode>"): Allow and implement all integer modes.
22558
22559 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
22560
22561         * config/s390/s390.md (define_peephole2): New peephole to help
22562         combining the load-and-test pattern with volatile memory.
22563
22564 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
22565
22566         * config/s390/s390.md ("cstorecc4"): Use load-on-condition and deal
22567         with CCZmode for TARGET_Z196.
22568
22569 2017-04-25  Jakub Jelinek  <jakub@redhat.com>
22570
22571         PR rtl-optimization/80501
22572         * combine.c (make_compound_operation_int): Set subreg_code to SET
22573         even for AND with mask of the sign bit of mode.
22574
22575         PR rtl-optimization/80500
22576         * loop-unroll.c (combine_var_copies_in_loop_exit): Call copy_rtx on
22577         sum's initial value.
22578
22579 2017-04-25  Julian Brown  <julian@codesourcery.com>
22580             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
22581
22582         * config/aarch64/thunderx2t99.md (thunderx2t99_crc): New Reservation.
22583
22584 2017-04-25  Marc Glisse  <marc.glisse@inria.fr>
22585
22586         * fold-const.c (tree_single_nonzero_warnv_p): Handle SSA_NAME.
22587
22588 2017-04-25  Julian Brown  <julian@codesourcery.com>
22589             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
22590
22591         * config/aarch64/thunderx2t99.md (thunderx2t99_aes): New Reservation.
22592         (thunderx2t99_sha): New Reservation.
22593
22594 2017-04-25  Julian Brown  <julian@codesourcery.com>
22595             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
22596
22597         * config/aarch64/aarch64-simd.md (aarch64_simd_vec_set<mode>): Fix
22598         type for 1-element load.
22599
22600 2017-04-24  Marc Glisse  <marc.glisse@inria.fr>
22601
22602         * match.pd (X/[ex]C CMP Y/[ex]C): New transformation.
22603
22604 2017-04-24  Martin Jambor  <mjambor@suse.cz>
22605
22606         PR tree-optimization/80293
22607         * tree-sra.c (scalarizable_type_p): New parameter const_decl, make
22608         char arrays not totally scalarizable if it is false.
22609         (analyze_all_variable_accesses): Pass correct value in the new
22610         parameter.  Add a statistics counter.
22611
22612 2017-04-24  Jan Hubicka  <hubicka@ucw.cz>
22613
22614         PR middle-end/79931
22615         * ipa-devirt.c (dump_possible_polymorphic_call_targets): Fix ICE.
22616
22617 2017-04-24  Richard Biener  <rguenther@suse.de>
22618
22619         PR tree-optimization/80494
22620         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Bail
22621         out for complex types.
22622
22623 2017-04-24  Richard Biener  <rguenther@suse.de>
22624
22625         * tree-ssa-sccvn.h (run_scc_vn): Adjust prototype.
22626         * tree-ssa-sccvn.c (print_scc): Print SCC size.
22627         (extract_and_process_scc_for_name): Never fail but drop SCC to varying.
22628         (DFS): Adjust and never fail.
22629         (sccvn_dom_walker::fail): Remove.
22630         (sccvn_dom_walker::before_dom_children): Adjust.
22631         (run_scc_vn): Likewise and never fail.
22632         * tree-ssa-pre.c (pass_pre::execute): Adjust.
22633         (pass_fre::execute): Likewise.
22634
22635 2017-04-24  Richard Biener  <rguenther@suse.de>
22636
22637         PR tree-optimization/79725
22638         * tree-ssa-sink.c (statement_sink_location): Return whether
22639         failure reason was zero uses.  Move that check later.
22640         (sink_code_in_bb): Deal with zero uses by removing the stmt
22641         if possible.
22642
22643 2017-04-24  Richard Biener  <rguenther@suse.de>
22644
22645         PR c++/2972
22646         * tree-ssa-uninit.c (warn_uninitialized_vars): Handle some
22647         pointer-based references.
22648
22649 2017-04-24  Richard Biener  <rguenther@suse.de>
22650
22651         PR bootstrap/79814
22652         * pass_manager.h (pass_manager::operator new): Remove.
22653         (pass_manager::operator delete): Likewise.
22654         * passes.c (pass_manager::operator new): Remove.
22655         (pass_manager::operator delete): Likewise.
22656         (pass_manager::pass_manager): Zero individual pass members.
22657
22658 2017-04-23  Uros Bizjak  <ubizjak@gmail.com>
22659
22660         PR target/70799
22661         * config/i386/i386.c (dimode_scalar_to_vector_candidate_p)
22662         <case ASHIFT, case LSHIFTRT>: Also consider variable shifts.
22663         Check "XEXP (src, 1)" operand here.
22664         <case PLUS, case MINUS, case IOR, case XOR, case AND>:
22665         Check "XEXP (src, 1)" operand here.
22666         (dimode_scalar_chain::make_vector_copies): Detect count register
22667         of a shift instruction.  Zero extend count register from QImode
22668         to DImode to satisfy vector shift pattern count operand predicate.
22669         Substitute vector shift count operand with a DImode copy.
22670         (dimode_scalar_chain::convert_reg): Ditto, zero-extend from
22671         vector register.
22672
22673 2017-04-21  Uros Bizjak  <ubizjak@gmail.com>
22674
22675         * config/i386/i386.md (*extzvqi_mem_rex64): Move above *extzv<mode>.
22676         Remove UNSPEC_NOREX_MEM tag.  Update corresponding peephole2 pattern.
22677         (*insvqi_1_mem_rex64): Move above insv<mode>_1.  Remove
22678         UNSPEC_NOREX_MEM tag.  Update corresponding peephole2 pattern.
22679         (UNSPEC_NOREX_MEM): Remove definition.
22680
22681 2017-04-21  Richard Biener  <rguenther@suse.de>
22682
22683         PR tree-optimization/79547
22684         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
22685         Handle strlen, strcmp, strncmp, strcasecmp, strncasecmp, memcmp,
22686         bcmp, strspn, strcspn, __builtin_object_size and __builtin_constant_p
22687         without any constraints.
22688
22689 2017-04-21  Richard Biener  <rguenther@suse.de>
22690
22691         PR tree-optimization/78847
22692         * fold-const.c (split_tree): Handle POINTER_PLUS_EXPR.
22693
22694 2017-04-21  Richard Biener  <rguenther@suse.de>
22695
22696         * tree.h (build_qualified_type): Annotate with CXX_MEM_STAT_INFO.
22697         (build_distinct_type_copy): Likewise.
22698         (build_variant_type_copy): Likewise.
22699         * tree.c (build_qualified_type): Pass down mem-stat info.
22700         (build_distinct_type_copy): Likewise.
22701         (build_variant_type_copy): Likewise.
22702
22703 2017-04-21  Richard Biener  <rguenther@suse.de>
22704
22705         PR tree-optimization/80237
22706         * tree-ssa-pre.c (find_leader_in_sets): Add third set argument,
22707         defaulted to NULL.
22708         (phi_translate_1): Also allow a leader in AVAIL_OUT of pred
22709         for a simplified result.
22710
22711 2016-04-21  Richard Biener  <rguenther@suse.de>
22712
22713         * tree-ssa-loop-ivcanon.c (constant_after_peeling): Do not require
22714         sth as strict as a simple_iv but a chrec without symbols and an
22715         operand defined in the loop we are peeling (and not some subloop).
22716         (propagate_constants_for_unrolling): Propagate all constants.
22717
22718 2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
22719
22720         PR target/79804
22721         * config/i386/i386.c (print_reg): Remove assert for disalowed
22722         regno values, call output_operand_lossage instead.
22723
22724 2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
22725
22726         PR target/78090
22727         * config/i386/constraints.md (Yc): New register constraint.
22728         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
22729         Use Yc constraint for alternative 2 of operand 0.  Remove
22730         preferred_for_speed attribute.
22731
22732 2017-04-20  Alexander Monakov  <amonakov@ispras.ru>
22733
22734         * omp-low.c (lower_lastprivate_clauses): Correct handling of linear and
22735         lastprivate clauses in SIMT case.
22736
22737 2017-04-20  Volker Reichelt  <v.reichelt@netcologne.de>
22738
22739         * doc/invoke.texi (-Wextra-semi): Document new warning option.
22740
22741 2017-04-20  Richard Biener  <rguenther@suse.de>
22742
22743         PR tree-optimization/57796
22744         * tree-vect-stmts.c (vect_model_store_cost): Cost scatters
22745         as N scalar stores.
22746         (vect_model_load_cost): Cost gathers as N scalar loads.
22747
22748 2017-04-20  Richard Biener  <rguenther@suse.de>
22749
22750         * ggc-page.c (ggc_allocated_p): Rename to ...
22751         (safe_lookup_page_table_entry): ... this and return the lookup
22752         result.
22753         (gt_ggc_m_S): Use safe_lookup_page_table_entry.
22754
22755 2017-04-20  Richard Biener  <rguenther@suse.de>
22756
22757         PR tree-optimization/80453
22758         * tree-ssa-sccvn.h (struct vn_phi_s): Add cclhs and ccrhs members.
22759         * tree-ssa-sccvn.c (cond_stmts_equal_p): Use recorded lhs and rhs
22760         from the conditions.
22761         (vn_phi_eq): Pass them down.
22762         (vn_phi_lookup): Record them.
22763         (vn_phi_insert): Likewise.
22764
22765 2017-04-20  Matthew Fortune  <matthew.fortune@imgtec.com>
22766
22767         * config/mips/mips.c (mips_expand_vec_perm_const): Re-fix
22768         uninitialized variable warning to avoid buffer overrun.
22769
22770 2017-04-20  Alexander Monakov  <amonakov@ispras.ru>
22771
22772         PR other/71250
22773         * doc/invoke.texi (-Wmissing-field-initializers): Mention that warning
22774         is suppressed for '{ 0 }' in C.
22775
22776 2017-04-20  Jakub Jelinek  <jakub@redhat.com>
22777
22778         * BASE-VER: Set to 8.0.0.
22779
22780 2017-04-20  Thomas Preud'homme  <thomas.preudhomme@arm.com>
22781
22782         * config/arm/arm.c (arm_elf_asm_cdtor): Create non-default
22783         priority .init_array and .fini_array section with SECTION_NOTYPE
22784         flag.
22785
22786 2017-04-20  Jakub Jelinek  <jakub@redhat.com>
22787
22788         PR middle-end/80423
22789         * tree.h (build_array_type): Add typeless_storage default argument.
22790         * tree.c (type_cache_hasher::equal): Also compare
22791         TYPE_TYPELESS_STORAGE flag for ARRAY_TYPEs.
22792         (build_array_type): Add typeless_storage argument, set
22793         TYPE_TYPELESS_STORAGE to it, if shared also hash it, and pass to
22794         recursive call.
22795         (build_nonshared_array_type): Adjust build_array_type_1 caller.
22796         (build_array_type): Likewise.  Add typeless_storage argument.
22797
22798 2017-04-19  Eric Botcazou  <ebotcazou@adacore.com>
22799             Jakub Jelinek  <jakub@redhat.com>
22800
22801         PR tree-optimization/80426
22802         * tree-vrp.c (extract_range_from_binary_expr_1): For an additive
22803         operation on symbolic operands, also compute the overflow for the
22804         invariant part when the operation degenerates into a negation.
22805
22806 2017-04-19  Jakub Jelinek  <jakub@redhat.com>
22807
22808         PR debug/80461
22809         * dwarf2out.c (modified_type_die, gen_type_die_with_usage):
22810         Check for t with zero TYPE_QUALS_NO_ADDR_SPACE.
22811
22812         PR debug/80436
22813         * tree-ssa-loop-manip.c (find_uses_to_rename_def): Ignore debug uses.
22814
22815 2017-04-19  Georg-Johann Lay  <avr@gjlay.de>
22816
22817         PR target/80462
22818         * config/avr/avr.c (tree.h): Include it.
22819         (cgraph.h): Include it.
22820         (avr_encode_section_info): Don't warn for uninitialized progmem
22821         variable if it's just an alias.
22822
22823 2017-04-19  Richard Biener  <rguenther@suse.de>
22824
22825         PR ipa/65972
22826         * auto-profile.c (afdo_vpt_for_early_inline): Update SSA
22827         when needed by AutoPGO.
22828
22829 2017-04-19  Paulo J. Matos  <paulo@matos-sorge.com>
22830
22831         PR lto/50345
22832         * doc/lto.texi: Remove an extra 'that'.
22833
22834 2017-04-19  Segher Boessenkool  <segher@kernel.crashing.org>
22835
22836         PR rtl-optimization/80429
22837         * ira.c (split_live_ranges_for_shrink_wrap): Don't split regs that
22838         are only used in debug insns.
22839
22840 2017-04-19  Eric Botcazou  <ebotcazou@adacore.com>
22841             Vladimir Makarov  <vmakarov@redhat.com>
22842
22843         * config/sparc/predicates.md (input_operand): Add comment.  Return
22844         true for any memory operand when LRA is in progress.
22845         * config/sparc/sparc.c (sparc_expand_move): Minor formatting fix.
22846
22847 2017-04-18  Jeff Law  <law@redhat.com>
22848
22849         PR target/74563
22850         * mips.md ({return,simple_return}_internal): Do not overwrite
22851         operands[0].
22852
22853 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
22854
22855         PR tree-optimization/80443
22856         * tree-vrp.c (intersect_ranges): For signed 1-bit precision type,
22857         instead of adding 1, subtract -1 and similarly instead of subtracting
22858         1 add -1.
22859
22860 2017-04-18  Richard Sandiford  <richard.sandiford@arm.com>
22861
22862         PR rtl-optimization/80357
22863         * haifa-sched.c (tmp_bitmap): New variable.
22864         (model_recompute): Handle duplicate use records.
22865         (alloc_global_sched_pressure_data): Initialize tmp_bitmap.
22866         (free_global_sched_pressure_data): Free it.
22867
22868 2017-04-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
22869
22870         Revert:
22871         2017-02-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
22872         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
22873         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
22874         instead of SYSTEM_HEADER_DIR.
22875
22876 2017-04-18  Jeff Law  <law@redhat.com>
22877
22878         PR middle-end/80422
22879         * cfgcleanup.c (try_crossjump_to_edge): Verify SRC1 and SRC2 have
22880         predecessors after walking up the insn chain.
22881
22882 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
22883
22884         PR debug/80263
22885         * dwarf2out.c (modified_type_die): Try harder not to emit internal
22886         sizetype type into debug info.
22887
22888 2017-04-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
22889
22890         PR target/80099
22891         * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Eliminate
22892         unneeded test for TARGET_UPPER_REGS_SF.
22893         * config/rs6000/vsx.md (vsx_extract_v4sf_var): Likewise.
22894
22895 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
22896
22897         PR sanitizer/80444
22898         * sancov.c (sancov_pass): Use gsi_start_nondebug_after_labels_bb
22899         instead of gsi_after_labels.
22900
22901 2017-04-18  Jeff Law  <law@redhat.com>
22902
22903         * regcprop.c (maybe_mode_change): Avoid creating copies of the
22904         stack pointer.
22905
22906         Revert:
22907         2017-04-13  Jeff Law  <law@redhat.com>
22908         * config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
22909         in operands[1] if it is a MEM and TARGET_MIPS16 is active.
22910
22911 2017-04-18  Georg-Johann Lay  <avr@gjlay.de>
22912
22913         PR target/79453
22914         * config/avr/avr.c (intl.h): Include it.
22915         (avr_pgm_check_var_decl) [reason]: Wrap diagnostic snippets into _().
22916
22917 2017-04-18  Martin Liska  <mliska@suse.cz>
22918
22919         PR gcov-profile/78783
22920         * gcov-tool.c (gcov_output_files): Validate that destination
22921         file is either removed by the tool or by a user.
22922
22923 2017-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
22924             Guy Benyei  <guybe@mellanox.com>
22925
22926         * config/arc/arc.c (arc_reorg): Move loop_end_id into a more local
22927         block, and do not negate it, the stored id is already negative.
22928
22929 2017-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
22930
22931         * config/arc/arc.md (doloop_begin_i): Use @pcl assembler syntax.
22932
22933 2017-04-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
22934
22935         PR target/80098
22936         * config/rs6000/rs6000-cpus.def (OTHER_P9_VECTOR_MASKS): Define
22937         masks of options that should be turned off if the VSX vector
22938         options are turned off.
22939         (OTHER_P8_VECTOR_MASKS): Likewise.
22940         (OTHER_VSX_VECTOR_MASKS): Likewise.
22941         * config/rs6000/rs6000.c (rs6000_option_override_internal): Call
22942         rs6000_disable_incompatible_switches to validate no type switches
22943         like -mvsx.
22944         (rs6000_incompatible_switch): New function to disallow turning on
22945         other vector options if -mno-vsx, -mno-power8-vector, or
22946         -mno-power9-vector are specified.
22947
22948 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
22949
22950         * config/arc/arc.h (CRT_CALL_STATIC_FUNCTION): Use long calls.
22951
22952 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
22953
22954         * config/arc/arc-protos.h (arc_decl_pretend_args): Remove.
22955         * config/arc/arc.c (arc_decl_pretend_args): Likewise.
22956         * config/arc/arc.h (CFA_FRAME_BASE_OFFSET): Likewise.
22957         (ARG_POINTER_CFA_OFFSET): Likewise.
22958
22959 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
22960
22961         * config/arc/arc.c (arc_mode_dependent_address_p): Relax
22962         conditions to take advantage of various optimizations.
22963
22964 2017-04-13  Jeff Law  <law@redhat.com>
22965
22966         * config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
22967         in operands[1] if it is a MEM and TARGET_MIPS16 is active.
22968         (zero_extendsidi2_dext): Likewise.
22969
22970 2017-04-13  Jakub Jelinek  <jakub@redhat.com>
22971
22972         PR sanitizer/80403
22973         * fold-const.c (fold_ternary_loc): Revert
22974         use op0 instead of fold_convert_loc (loc, type, arg0) part of
22975         2017-04-12 change.
22976
22977 2017-04-13  Vladimir Makarov  <vmakarov@redhat.com>
22978
22979         PR rtl-optimization/80343
22980         * lra-remat.c (update_scratch_ops): Assign original hard reg to
22981         new scratch pseudo.
22982
22983 2017-04-13  Denis Khalikov <d.khalikov@partner.samsung.com>
22984
22985         PR sanitizer/80414
22986         * ubsan.c (ubsan_expand_bounds_ifn): Pass original index
22987         to ubsan_encode_value.
22988
22989 2017-04-13  Jeff Law  <law@redhat.com>
22990
22991         * reload1.c (eliminate_regs_1): Call gen_rtx_raw_SUBREG for SUBREGs
22992         appearing in DEBUG_INSNs.
22993
22994 2017-04-13  Martin Liska  <mliska@suse.cz>
22995
22996         PR gcov-profile/80413
22997         * gcov-io.c (gcov_write_string): Copy to buffer just when
22998         allocated size is greater than zero.
22999
23000 2017-04-13  Jakub Jelinek  <jakub@redhat.com>
23001
23002         PR debug/80321
23003         * dwarf2out.c (decls_for_scope): Ignore declarations of
23004         current_function_decl in BLOCK_NONLOCALIZED_VARS.
23005
23006 2017-04-12  Jan Hubicka  <hubicka@ucw.cz>
23007
23008         PR lto/69953
23009         * ipa-visibility.c (non_local_p): Fix typos.
23010         (localize_node): When localizing symbol in same comdat group,
23011         dissolve the group only when we know external symbols are going
23012         to be privatized.
23013         (function_and_variable_visibility): Do not localize DECL_EXTERNAL.
23014
23015 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
23016
23017         PR tree-optimization/79390
23018         * optabs.c (emit_conditional_move): If the preferred op2/op3 operand
23019         order does not result in usable sequence, retry with reversed operand
23020         order.
23021
23022         PR sanitizer/80403
23023         PR sanitizer/80404
23024         PR sanitizer/80405
23025         * fold-const.c (fold_ternary_loc): Use op1 instead of arg1 as argument
23026         to fold_build2_loc.  Convert TREE_OPERAND (tem, 0) to type.  Use
23027         op0 instead of fold_convert_loc (loc, type, arg0).
23028
23029 2017-04-12  Jeff Law  <law@redhat.com>
23030
23031         * genattrtab.c (write_eligible_delay): Verify DELAY_INSN still
23032         has a delay slot in the generated code.
23033
23034         * config/cris/cris.md (cris_preferred_reload_class): Return
23035         GENNONACR_REGS rather than GENERAL_REGS.
23036
23037 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
23038
23039         PR c/80163
23040         * expr.c <CASE_CONVERT>: For EXPAND_INITIALIZER determine SIGN_EXTEND
23041         vs. ZERO_EXTEND based on signedness of treeop0's type rather than
23042         signedness of the result type.
23043
23044 2017-04-12  Richard Biener  <rguenther@suse.de>
23045             Jeff Law  <law@redhat.com>
23046
23047         PR tree-optimization/80359
23048         * tree-ssa-dse.c (maybe_trim_partially_dead_store): Do not
23049         trim stores to TARGET_MEM_REFs.
23050
23051 2017-04-12  Richard Biener  <rguenther@suse.de>
23052
23053         PR tree-optimization/79390
23054         * gimple-ssa-split-paths.c (is_feasible_trace): Restrict
23055         threading case even more.
23056
23057 2017-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
23058
23059         PR target/80382
23060         * config/rs6000/sync.md (atomic_load<mode>, atomic_store<mode): Test
23061         for quad_address_p for TImode, instead of just not indexed_address.
23062
23063 2017-04-12  Richard Biener  <rguenther@suse.de>
23064             Bernd Edlinger  <bernd.edlinger@hotmail.de>
23065
23066         PR middle-end/79671
23067         * alias.c (component_uses_parent_alias_set_from): Handle
23068         TYPE_TYPELESS_STORAGE.
23069         (get_alias_set): Likewise.
23070         * tree-core.h (tree_type_common): Add typeless_storage flag.
23071         * tree.h (TYPE_TYPELESS_STORAGE): New macro.
23072         * stor-layout.c (place_union_field): Set TYPE_TYPELESS_STORAGE
23073         for types containing members with TYPE_TYPELESS_STORAGE.
23074         (place_field): Likewise.
23075         (layout_type): Likewise for ARRAY_TYPE.
23076         * lto-streamer-out.c (hash_tree): Hash TYPE_TYPELESS_STORAGE.
23077         * tree-streamer-in.c (unpack_ts_type_common_value_fields): Stream
23078         TYPE_TYPELESS_STORAGE.
23079         * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
23080
23081 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
23082
23083         PR sanitizer/80349
23084         * fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
23085         first argument to type.
23086
23087 2017-04-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23088
23089         PR target/80376
23090         PR target/80315
23091         * config/rs6000/rs6000.c (rs6000_expand_unop_builtin): Return
23092         CONST0_RTX (mode) rather than const0_rtx where appropriate.
23093         (rs6000_expand_binop_builtin): Likewise.
23094         (rs6000_expand_ternop_builtin): Likewise; also add missing
23095         vsx_xxpermdi_* variants; also fix typo (arg1 => arg2) for
23096         vshasigma built-ins.
23097         * doc/extend.texi: Document that vec_xxpermdi's third argument
23098         must be a constant.
23099
23100 2017-04-11  Uros Bizjak  <ubizjak@gmail.com>
23101
23102         * config/i386/i386.c (dimode_scalar_chain::compute_convert_gain):
23103         Use shift_const cost parameter when calculating gain of STV shifts.
23104
23105 2017-04-11  Vladimir Makarov  <vmakarov@redhat.com>
23106
23107         PR rtl-optimization/70478
23108         * lra-constraints.c (process_alt_operands): Check memory for
23109         disfavoring memory insn operand.
23110
23111 2017-04-11  Jakub Jelinek  <jakub@redhat.com>
23112
23113         PR middle-end/80100
23114         * simplify-rtx.c (simplify_binary_operation_1) <case IOR>: Perform
23115         left shift in unsigned HOST_WIDE_INT type.
23116
23117         PR rtl-optimization/80385
23118         * simplify-rtx.c (simplify_unary_operation_1): Don't transform
23119         (not (neg X)) into (plus X -1) for complex or non-integral modes.
23120
23121         PR libgomp/80394
23122         * omp-low.c (scan_omp_task): Don't optimize away empty tasks
23123         if they have any depend clauses.
23124
23125 2017-04-11  Martin Liska  <mliska@suse.cz>
23126
23127         PR ipa/80212
23128         * cgraph.c (cgraph_node::dump): Dump calls_comdat_local.
23129         * ipa-split.c (split_function): Create a local comdat symbol
23130         if caller is in a comdat group.
23131
23132 2017-04-11  Martin Liska  <mliska@suse.cz>
23133
23134         PR ipa/80212
23135         * ipa-cp.c (determine_versionability): Handle calls_comdat_local
23136         flags.
23137
23138 2017-04-11  Martin Sebor  <msebor@redhat.com>
23139
23140         PR middle-end/80364
23141         * gimple-ssa-sprintf.c (get_int_range): Remove second argument and
23142         always use the int type.  Use INTEGRAL_TYPE_P() rather than testing
23143         for INTEGER_TYPE.
23144         (directive::set_width, directive::set_precision, format_character):
23145         Adjust.
23146         (parse_directive): Use INTEGRAL_TYPE_P() rather than testing for
23147         INTEGER_TYPE.
23148
23149 2017-04-11  Richard Earnshaw  <rearnsha@arm.com>
23150
23151         PR target/80389
23152         * config/arm/arm.c (arm_configure_build_target): When -mcpu and -arch
23153         conflict, set target->arch_name instead of target->cpu_name.
23154
23155 2017-04-11  Richard Biener  <rguenther@suse.de>
23156
23157         PR tree-optimization/80374
23158         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Use
23159         build_zero_cst, remove fold_convertible_p check again.
23160
23161 2017-04-11  Martin Liska  <mliska@suse.cz>
23162
23163         PR sanitizer/70878
23164         * ubsan.c (instrument_object_size): Do not instrument register
23165         variables.
23166
23167 2017-04-11  Jakub Jelinek  <jakub@redhat.com>
23168
23169         PR target/80381
23170         * config/i386/i386-builtin-types.def
23171         (V16HI_FTYPE_V16HI_INT_V16HI_UHI_COUNT,
23172         V16HI_FTYPE_V16HI_V8HI_V16HI_UHI_COUNT,
23173         V16SI_FTYPE_V16SI_INT_V16SI_UHI_COUNT,
23174         V16SI_FTYPE_V16SI_V4SI_V16SI_UHI_COUNT,
23175         V2DI_FTYPE_V2DI_INT_V2DI_UQI_COUNT,
23176         V2DI_FTYPE_V2DI_V2DI_V2DI_UQI_COUNT,
23177         V32HI_FTYPE_V32HI_INT_V32HI_USI_COUNT,
23178         V32HI_FTYPE_V32HI_V8HI_V32HI_USI_COUNT,
23179         V4DI_FTYPE_V4DI_INT_V4DI_UQI_COUNT,
23180         V4DI_FTYPE_V4DI_V2DI_V4DI_UQI_COUNT,
23181         V4SI_FTYPE_V4SI_INT_V4SI_UQI_COUNT,
23182         V4SI_FTYPE_V4SI_V4SI_V4SI_UQI_COUNT,
23183         V8DI_FTYPE_V8DI_INT_V8DI_UQI_COUNT,
23184         V8DI_FTYPE_V8DI_V2DI_V8DI_UQI_COUNT,
23185         V8HI_FTYPE_V8HI_INT_V8HI_UQI_COUNT,
23186         V8HI_FTYPE_V8HI_V8HI_V8HI_UQI_COUNT,
23187         V8SI_FTYPE_V8SI_INT_V8SI_UQI_COUNT,
23188         V8SI_FTYPE_V8SI_V4SI_V8SI_UQI_COUNT): New function type aliases.
23189         * config/i386/i386-builtin.def (__builtin_ia32_pslld512_mask,
23190         __builtin_ia32_pslldi512_mask, __builtin_ia32_psllq512_mask,
23191         __builtin_ia32_psllqi512_mask, __builtin_ia32_psrad512_mask,
23192         __builtin_ia32_psradi512_mask, __builtin_ia32_psraq512_mask,
23193         __builtin_ia32_psraqi512_mask, __builtin_ia32_psrld512_mask,
23194         __builtin_ia32_psrldi512_mask, __builtin_ia32_psrlq512_mask,
23195         __builtin_ia32_psrlqi512_mask, __builtin_ia32_psllwi128_mask,
23196         __builtin_ia32_pslldi128_mask, __builtin_ia32_psllqi128_mask,
23197         __builtin_ia32_psllw128_mask, __builtin_ia32_pslld128_mask,
23198         __builtin_ia32_psllq128_mask, __builtin_ia32_psllwi256_mask,
23199         __builtin_ia32_psllw256_mask, __builtin_ia32_pslldi256_mask,
23200         __builtin_ia32_pslld256_mask, __builtin_ia32_psllqi256_mask,
23201         __builtin_ia32_psllq256_mask, __builtin_ia32_psradi128_mask,
23202         __builtin_ia32_psrad128_mask, __builtin_ia32_psradi256_mask,
23203         __builtin_ia32_psrad256_mask, __builtin_ia32_psraqi128_mask,
23204         __builtin_ia32_psraq128_mask, __builtin_ia32_psraqi256_mask,
23205         __builtin_ia32_psraq256_mask, __builtin_ia32_psrldi128_mask,
23206         __builtin_ia32_psrld128_mask, __builtin_ia32_psrldi256_mask,
23207         __builtin_ia32_psrld256_mask, __builtin_ia32_psrlqi128_mask,
23208         __builtin_ia32_psrlq128_mask, __builtin_ia32_psrlqi256_mask,
23209         __builtin_ia32_psrlq256_mask, __builtin_ia32_psrawi256_mask,
23210         __builtin_ia32_psraw256_mask, __builtin_ia32_psrawi128_mask,
23211         __builtin_ia32_psraw128_mask, __builtin_ia32_psrlwi256_mask,
23212         __builtin_ia32_psrlw256_mask, __builtin_ia32_psrlwi128_mask,
23213         __builtin_ia32_psrlw128_mask, __builtin_ia32_psllwi512_mask,
23214         __builtin_ia32_psllw512_mask, __builtin_ia32_psrawi512_mask,
23215         __builtin_ia32_psraw512_mask, __builtin_ia32_psrlwi512_mask,
23216         __builtin_ia32_psrlw512_mask): Use _COUNT suffixed function type
23217         aliases.
23218         * config/i386/i386.c (ix86_expand_args_builtin): Rename last_arg_count
23219         flag to second_arg_count, handle 4 argument function type _COUNT
23220         aliases, handle second_arg_count on second argument rather than last.
23221
23222 2017-04-10  Jeff Law  <law@redhat.com>
23223
23224         PR tree-optimization/80374
23225         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Do not try to
23226         record anything if we can not convert integer_zero_node to the
23227         desired type.
23228
23229 2017-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23230
23231         PR target/80108
23232         * config/rs6000/rs6000.c (rs6000_option_override_internal):
23233         Enhance special handling given to the TARGET_P9_MINMAX option in
23234         relation to certain other options.
23235
23236 2017-04-10  Bin Cheng  <bin.cheng@arm.com>
23237
23238         PR tree-optimization/80153
23239         * tree-ssa-loop-ivopts.c (add_iv_candidate_for_use): Check and
23240         remove POINTER_PLUS_EXPR's base part directly, rather than through
23241         aff_tree.
23242
23243 2017-04-10  Richard Biener  <rguenther@suse.de>
23244             Bin Cheng  <bin.cheng@arm.com>
23245
23246         PR tree-optimization/80153
23247         * tree-affine.c (aff_combination_to_tree): Get base pointer from
23248         the first element of pointer type aff_tree.  Build result expr in
23249         aff_tree's type.
23250         (add_elt_to_tree): Convert to type unconditionally.  Remove other
23251         fold_convert calls.
23252         * tree-ssa-loop-ivopts.c (alloc_iv): Pass in consistent types.
23253         (rewrite_use_nonlinear_expr): Check invariant using iv information.
23254
23255 2017-04-10  Richard Biener  <rguenther@suse.de>
23256
23257         * tree-ssa-structalias.c (find_func_aliases): Properly handle
23258         asm inputs.
23259
23260 2017-04-10  Vladimir Makarov  <vmakarov@redhat.com>
23261
23262         PR rtl-optimization/70478
23263         * lra-constraints.c (curr_small_class_check): New.
23264         (update_and_check_small_class_inputs): New.
23265         (process_alt_operands): Update curr_small_class_check.  Disfavor
23266         alternative insn memory operands.  Check available regs for small
23267         class operands.
23268
23269 2017-03-31  Matthew Fortune  <matthew.fortune@imgtec.com>
23270
23271         PR target/80057
23272         * config/mips/mips.opt (-mvirt): Update description.
23273         * doc/invoke.texi (-mvirt): Likewise.
23274
23275 2017-04-10  Richard Biener  <rguenther@suse.de>
23276
23277         PR middle-end/80362
23278         * fold-const.c (fold_binary_loc): Look at unstripped ops when
23279         looking for NEGATE_EXPR in -A / -B to A / B folding.
23280
23281 2017-04-10  Martin Liska  <mliska@suse.cz>
23282
23283         PR gcov-profile/80224
23284         * gcov.c (print_usage): Fix usage string.
23285         (get_gcov_intermediate_filename): Remove.
23286         (output_gcov_file): Use both for normal and intermediate format.
23287         (generate_results): Do not initialize special file for
23288         intermediate format.
23289
23290 2017-04-10  Richard Biener  <rguenther@suse.de>
23291
23292         PR tree-optimization/80304
23293         * tree-ssa-loop-im.c (ref_indep_loop_p_1): Also recurse
23294         for safelen.
23295
23296 2017-04-10  Nathan Sidwell  <nathan@acm.org>
23297
23298         PR target/79905
23299         * config/rs6000/rs6000.c (rs6000_vector_type): New.
23300         (rs6000_init_builtins): Use it.
23301
23302 2016-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23303
23304         * config/arm/arm.md (<mrc>): Add mode to SET source.
23305         (<mrrc>): Likewise.
23306
23307 2017-04-10  Richard Biener  <rguenther@suse.de>
23308
23309         PR middle-end/80344
23310         * gimplify.c (is_gimple_mem_rhs_or_call): Allow CLOBBERs.
23311
23312 2017-04-10  Jakub Jelinek  <jakub@redhat.com>
23313
23314         PR target/80324
23315         * config/i386/avx512fintrin.h (_mm512_reduce_add_epi32,
23316         _mm512_reduce_mul_epi32, _mm512_reduce_and_epi32,
23317         _mm512_reduce_or_epi32, _mm512_mask_reduce_add_epi32,
23318         _mm512_mask_reduce_mul_epi32, _mm512_mask_reduce_and_epi32,
23319         _mm512_mask_reduce_or_epi32, _mm512_reduce_min_epi32,
23320         _mm512_reduce_max_epi32, _mm512_reduce_min_epu32,
23321         _mm512_reduce_max_epu32, _mm512_mask_reduce_min_epi32,
23322         _mm512_mask_reduce_max_epi32, _mm512_mask_reduce_min_epu32,
23323         _mm512_mask_reduce_max_epu32, _mm512_reduce_add_ps,
23324         _mm512_reduce_mul_ps, _mm512_mask_reduce_add_ps,
23325         _mm512_mask_reduce_mul_ps, _mm512_reduce_min_ps, _mm512_reduce_max_ps,
23326         _mm512_mask_reduce_min_ps, _mm512_mask_reduce_max_ps,
23327         _mm512_reduce_add_epi64, _mm512_reduce_mul_epi64,
23328         _mm512_reduce_and_epi64, _mm512_reduce_or_epi64,
23329         _mm512_mask_reduce_add_epi64, _mm512_mask_reduce_mul_epi64,
23330         _mm512_mask_reduce_and_epi64, _mm512_mask_reduce_or_epi64,
23331         _mm512_reduce_min_epi64, _mm512_reduce_max_epi64,
23332         _mm512_mask_reduce_min_epi64, _mm512_mask_reduce_max_epi64,
23333         _mm512_reduce_min_epu64, _mm512_reduce_max_epu64,
23334         _mm512_mask_reduce_min_epu64, _mm512_mask_reduce_max_epu64,
23335         _mm512_reduce_add_pd, _mm512_reduce_mul_pd, _mm512_mask_reduce_add_pd,
23336         _mm512_mask_reduce_mul_pd, _mm512_reduce_min_pd, _mm512_reduce_max_pd,
23337         _mm512_mask_reduce_min_pd, _mm512_mask_reduce_max_pd): New intrinsics.
23338
23339 2017-04-08  Vladimir Makarov  <vmakarov@redhat.com>
23340
23341         PR rtl-optimization/70478
23342         * lra-constraints.c: Reverse the last patch.
23343
23344 2017-04-08  Andreas Tobler  <andreast@gcc.gnu.org>
23345
23346         * config/aarch64/aarch64-freebsd.h: Define MCOUNT_NAME.
23347         Add comment for WCHAR_T.
23348
23349 2017-04-08  Martin Liska  <mliska@suse.cz>
23350
23351         Revert:
23352         2017-04-07  Martin Liska  <mliska@suse.cz>
23353
23354         PR ipa/80212
23355         * ipa-split.c (split_function): Add function part to a same comdat
23356         group.
23357
23358 2017-04-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23359
23360         PR target/80358
23361         * config/rs6000/rs6000.c (expand_block_compare): Fix boundary check.
23362
23363 2017-04-07  Pat Haugen  <pthaugen@us.ibm.com>
23364
23365         * rs6000/rs6000.c (vec_load_pendulum): Rename...
23366         (vec_pairing): ...to this.
23367         (power9_sched_reorder2): Rewrite code for pairing vector/vecload insns.
23368         (rs6000_sched_init): Adjust for name change.
23369         (struct rs6000_sched_context): Likewise.
23370         (rs6000_init_sched_context): Likewise.
23371         (rs6000_set_sched_context): Likewise.
23372
23373 2017-04-07  Jakub Jelinek  <jakub@redhat.com>
23374
23375         PR target/80322
23376         PR target/80323
23377         PR target/80325
23378         PR target/80326
23379         * config/i386/avxintrin.h (_mm256_cvtsd_f64, _mm256_cvtss_f32): New
23380         intrinsics.
23381         * config/i386/avx512fintrin.h (_mm512_int2mask, _mm512_mask2int,
23382         _mm512_abs_ps, _mm512_mask_abs_ps, _mm512_abs_pd, _mm512_mask_abs_pd,
23383         _mm512_cvtsd_f64, _mm512_cvtss_f32): Likewise.
23384
23385 2017-04-07  Andreas Tobler  <andreast@gcc.gnu.org>
23386
23387         * config/aarch64/aarch64-freebsd.h: Define WCHAR_TYPE.
23388
23389 2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>
23390
23391         PR rtl-optimization/70703
23392         * ira-color.c (update_conflict_hard_regno_costs): Use
23393         int64_t instead of HOST_WIDE_INT.
23394
23395 2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>
23396
23397         PR rtl-optimization/70478
23398         * lra-constraints.c (process_alt_operands): Disfavor alternative
23399         insn memory operands.
23400
23401 2017-04-07  Jeff Law  <law@redhat.com>
23402
23403         * config/iq2000/iq2000.c (final_prescan_insn): Do not separate a
23404         CALL and NOTE_INSN_CALL_ARG_LOCATION.
23405
23406 2017-04-07  Martin Liska  <mliska@suse.cz>
23407
23408         PR target/79889
23409         * config/aarch64/aarch64.c (aarch64_process_target_attr):
23410         Show error message instead of an ICE.
23411
23412 2017-04-07  Martin Liska  <mliska@suse.cz>
23413
23414         PR ipa/80212
23415         * ipa-split.c (split_function): Add function part to a same comdat
23416         group.
23417
23418 2017-04-07  Richard Biener  <rguenther@suse.de>
23419
23420         PR middle-end/80341
23421         * tree.c (get_unwidened): Also handle ! for_type case for
23422         INTEGER_CSTs.
23423         * convert.c (do_narrow): Split out from ...
23424         (convert_to_integer_1): ... here.  Do not pass final truncation
23425         type to get_unwidened for TRUNC_DIV_EXPR.
23426
23427 2017-04-07  Richard Biener  <rguenther@suse.de>
23428
23429         * tree-affine.c (wide_int_ext_for_comb): Take type rather
23430         than aff_tree.
23431         (aff_combination_const): Adjust.
23432         (aff_combination_scale): Likewise.
23433         (aff_combination_add_elt): Likewise.
23434         (aff_combination_add_cst): Likewise.
23435         (aff_combination_convert): Likewise.
23436         (add_elt_to_tree): Likewise.  Remove unused argument.
23437         (aff_combination_to_tree): Adjust calls to add_elt_to_tree.
23438
23439 2017-04-07  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23440
23441         * config/arm/arm.h (ARM_DEFAULT_SHORT_ENUMS): Provide default
23442         definition.
23443         * config/arm/arm.c (arm_default_short_enums): Use
23444         ARM_DEFAULT_SHORT_ENUMS.
23445         * config/arm/rtems.h (ARM_DEFAULT_SHORT_ENUMS): Define.
23446
23447 2017-04-06  Jakub Jelinek  <jakub@redhat.com>
23448
23449         PR debug/80234
23450         * dwarf2out.c (gen_member_die): Handle C++17 inline static data
23451         members with redundant out-of-class redeclaration.
23452
23453 2017-04-06  Uros Bizjak  <ubizjak@gmail.com>
23454
23455         PR target/80286
23456         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): New pattern.
23457         * config/i386/i386.md (*zero_extendsidi2):
23458         Add (?*x,*x) and (?*v,*v) alternatives.
23459
23460 2017-04-06  Uros Bizjak  <ubizjak@gmail.com>
23461
23462         PR target/79733
23463         * config/i386/i386.c (ix86_expand_builtin)
23464         <case IX86_BUILTIN_K{,OR}TEST{C,Z}{8,16,32,64}>: Determine insn operand
23465         mode from insn data. Convert operands to insn operand mode.
23466         Copy operands that don't satisfy insn predicate to a register.
23467
23468 2017-04-06  Sam Thursfield  <sam.thursfield@codethink.co.uk>
23469
23470         * config/rs6000/x-aix: Increase memory limit for genautomata on AIX.
23471         Update comments.
23472
23473 2017-04-06  Richard Biener  <rguenther@suse.de>
23474
23475         PR tree-optimization/80334
23476         * tree-ssa-loop-ivopts.c (rewrite_use_address): Properly
23477         preserve alignment of accesses.
23478
23479 2017-04-06  Richard Biener  <rguenther@suse.de>
23480
23481         PR tree-optimization/80262
23482         * tree-sra.c (build_ref_for_offset): Preserve address-space
23483         information.
23484         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address):
23485         Drop useless address-space information on MEM_REF offsets.
23486
23487 2017-04-05  Andreas Schwab  <schwab@linux-m68k.org>
23488
23489         * builtins.def (BUILT_IN_UPDATE_SETJMP_BUF): Fix type.
23490
23491 2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>
23492
23493         PR rtl-optimization/70703
23494         * ira-color.c (update_conflict_hard_regno_costs): Use
23495         HOST_WIDE_INT instead of long.
23496
23497 2017-04-05  Uros Bizjak  <ubizjak@gmail.com>
23498
23499         PR target/80298
23500         * config/i386/mmintrin.h: Add -msse target option when __SSE__ is
23501         not defined for x86_64 target.  Add -mmmx target option when __SSE2__
23502         is not defined.
23503         * config/i386/mm3dnow.h: Add -msse target when __SSE__ is not defined
23504         for x86_64 target.  Handle -m3dnowa option.
23505
23506 2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>
23507
23508         PR rtl-optimization/70703
23509         * ira-color.c (update_costs_from_allocno): Use the smallest mode.
23510         (update_conflict_hard_regno_costs): Use long instead of unsigned
23511         arithmetic for cost calculation.
23512
23513 2017-04-05  Jakub Jelinek  <jakub@redhat.com>
23514             Bernd Edlinger  <bernd.edlinger@hotmail.de>
23515
23516         PR sanitizer/80308
23517         * asan.c (asan_store_shadow_bytes): Fix location of last_chunk_value
23518         for big endian.
23519
23520 2017-04-05  Eric Botcazou  <ebotcazou@adacore.com>
23521
23522         PR target/78002
23523         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Replace
23524         ptr_mode with Pmode throughout.
23525         * config/aarch64/aarch64.md (probe_stack_range_<PTR:mode): Rename
23526         into probe_stack_range and use DImode.
23527
23528 2017-04-05  Dominik Vogt  <vogt@linux.vnet.ibm.com>
23529
23530         PR target/79890
23531         * config/s390/s390.c (s390_register_info_gprtofpr): Return if
23532         call_eh_return is true.
23533
23534 2017-04-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23535
23536         * config/s390/s390-c.c (s390_resolve_overloaded_builtin):
23537         Initialize last_match_fntype_index.
23538
23539 2017-04-05  Jakub Jelinek  <jakub@redhat.com>
23540
23541         PR target/80310
23542         * tree-nvr.c: Include internal-fn.h.
23543         (pass_return_slot::execute): Ignore internal calls without
23544         direct optab.
23545
23546 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
23547             Richard Biener  <rguenther@suse.de>
23548
23549         PR c++/80297
23550         * genmatch.c (capture::gen_transform): For GENERIC unshare_expr
23551         captures used multiple times, except for the last use.
23552         * generic-match-head.c: Include gimplify.h.
23553
23554 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
23555
23556         PR tree-optimization/79390
23557         * target.h (struct noce_if_info): Declare.
23558         * targhooks.h (default_noce_conversion_profitable_p): Declare.
23559         * target.def (noce_conversion_profitable_p): New target hook.
23560         * ifcvt.h (struct noce_if_info): New type, moved from ...
23561         * ifcvt.c (struct noce_if_info): ... here.
23562         (noce_conversion_profitable_p): Renamed to ...
23563         (default_noce_conversion_profitable_p): ... this.  No longer
23564         static nor inline.
23565         (noce_try_store_flag_constants, noce_try_addcc,
23566         noce_try_store_flag_mask, noce_try_cmove, noce_try_cmove_arith,
23567         noce_convert_multiple_sets): Use targetm.noce_conversion_profitable_p
23568         instead of noce_conversion_profitable_p.
23569         * config/i386/i386.c: Include ifcvt.h.
23570         (ix86_option_override_internal): Don't override
23571         PARAM_MAX_RTL_IF_CONVERSION_INSNS default.
23572         (ix86_noce_conversion_profitable_p): New function.
23573         (TARGET_NOCE_CONVERSION_PROFITABLE_P): Redefine.
23574         * config/i386/x86-tune.def (X86_TUNE_ONE_IF_CONV_INSN): Adjust comment.
23575         * doc/tm.texi.in (TARGET_NOCE_CONVERSION_PROFITABLE_P): Add.
23576         * doc/tm.texi: Regenerated.
23577
23578 2017-04-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23579
23580         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Grammar
23581         correction.
23582
23583 2017-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
23584
23585         PR target/80307
23586         * config/arm/arm.c (thumb1_rtx_costs): Give a cost of 32
23587         instructions for small multiply cores.
23588
23589 2017-04-04  Jeff Law  <law@redhat.com>
23590
23591         * config/mips/mips.c (mips_multi_add): Zero initialize the newly
23592         added member.
23593         (mips_expand_vec_perm_const): Initialize elements in orig_perm
23594         that are not set by the loop over the elements.
23595
23596 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
23597
23598         PR target/80286
23599         * config/i386/i386.c (ix86_expand_args_builtin): If op has scalar
23600         int mode, convert_modes it to mode as unsigned, otherwise use
23601         lowpart_subreg to mode rather than SImode.
23602         * config/i386/sse.md (<mask_codefor>ashr<mode>3<mask_name>,
23603         ashr<mode>3, ashr<mode>3<mask_name>, <shift_insn><mode>3<mask_name>):
23604         Use DImode instead of SImode for the shift count operand.
23605         * config/i386/mmx.md (mmx_ashr<mode>3, mmx_<shift_insn><mode>3):
23606         Likewise.
23607
23608 2017-04-04  Richard Biener  <rguenther@suse.de>
23609
23610         PR middle-end/80281
23611         * match.pd (A + (-B) -> A - B): Make sure to preserve unsigned
23612         arithmetic done for the negate or the plus.  Simplify.
23613         (A - (-B) -> A + B): Likewise.
23614         * fold-const.c (split_tree): Make sure to not negate pointers.
23615
23616 2017-04-04  Segher Boessenkool  <segher@kernel.crashing.org>
23617
23618         PR rtl-optimization/60818
23619         * simplify-rtx.c (simplify_binary_operation_1): Do not replace
23620         a compare of comparisons with the thing compared if this results
23621         in a different machine mode.
23622
23623 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
23624
23625         * alias.c (base_alias_check): Fix typo in comment.
23626         * cgraph.h (class ipa_polymorphic_call_context): Likewise.
23627         * cgraphunit.c (symbol_table::compile): Likewise.
23628         * collect2.c (maybe_run_lto_and_relink): Likewise.
23629         * config/arm/arm.c (arm_thumb1_mi_thunk): Likewise.
23630         * config/avr/avr-arch.h (avr_arch_info_t): Likewise.
23631         * config/avr/avr.c (avr_map_op_t): Likewise.
23632         * config/cr16/cr16.h (DATA_ALIGNMENT): Likewise.
23633         * config/epiphany/epiphany.c (TARGET_ARG_PARTIAL_BYTES): Likewise.
23634         * config/epiphany/epiphany.md (movcc): Likewise.
23635         * config/i386/i386.c (legitimize_pe_coff_extern_decl): Likewise.
23636         * config/m68k/m68k.c (struct _sched_ib, m68k_sched_variable_issue):
23637         Likewise.
23638         * config/mips/mips.c (mips_save_restore_reg): Likewise.
23639         * config/rx/rx.c (rx_is_restricted_memory_address): Likewise.
23640         * config/s390/s390.c (Z10_EARLYLOAD_DISTANCE): Likewise.
23641         * config/sh/sh.c (sh_rtx_costs): Likewise.
23642         * fold-const.c (fold_truth_andor): Likewise.
23643         * genautomata.c (collapse_flag): Likewise.
23644         * gengtype.h (struct type::u::s): Likewise.
23645         * gensupport.c (has_subst_attribute, add_mnemonic_string): Likewise.
23646         * input.c (FORMAT_AMOUNT): Likewise.
23647         * ipa-cp.c (class ipcp_lattice, agg_replacements_to_vector)
23648         (known_aggs_to_agg_replacement_list): Likewise.
23649         * ipa-inline-analysis.c: Likewise.
23650         * ipa-inline.h (estimate_edge_time, estimate_edge_hints): Likewise.
23651         * ipa-polymorphic-call.c
23652         (ipa_polymorphic_call_context::restrict_to_inner_class): Likewise.
23653         * loop-unroll.c (analyze_insn_to_expand_var): Likewise.
23654         * lra.c (lra_optional_reload_pseudos, lra_subreg_reload_pseudos):
23655         Likewise.
23656         * modulo-sched.c (apply_reg_moves): Likewise.
23657         * omp-expand.c (build_omp_regions_1): Likewise.
23658         * trans-mem.c (struct tm_wrapper_hasher): Likewise.
23659         * tree-ssa-loop-ivopts.c (may_eliminate_iv): Likewise.
23660         * tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Likewise.
23661         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
23662         * value-prof.c: Likewise.
23663         * var-tracking.c (val_reset): Likewise.
23664
23665 2017-04-03  Richard Biener  <rguenther@suse.de>
23666
23667         PR tree-optimization/80275
23668         * fold-const.c (split_address_to_core_and_offset): Handle
23669         POINTER_PLUS_EXPR.
23670
23671 2017-04-03  Eric Botcazou  <ebotcazou@adacore.com>
23672
23673         * tree-nested.c (get_descriptor_type): Make sure that the alignment of
23674         descriptors is at least equal to that of functions.
23675
23676 2017-04-02  Uros Bizjak  <ubizjak@gmail.com>
23677
23678         * config/i386/sse.md (movdi_to_sse): Add missing DONE.
23679
23680 2017-04-02  Uros Bizjak  <ubizjak@gmail.com>
23681
23682         PR target/80250
23683         * config/i386/sse.md (mov<IMOD4:mode>): Remove insn pattern.
23684         (mov<IMOD4:mode>): New expander.
23685         (*mov<IMOD4:mode>_internal): New insn and split pattern.
23686
23687 2017-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
23688
23689         PR rtl-optimization/79405
23690         * fwprop.c (propagations_left): New variable.
23691         (forward_propagate_into): Decrement it.
23692         (fwprop_init): Initialize it.
23693         (fw_prop): If the variable has reached zero, stop propagating.
23694         (fwprop_addr): Ditto.
23695
23696 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
23697
23698         PR debug/79255
23699         * dwarf2out.c (decls_for_scope): If BLOCK_NONLOCALIZED_VAR is
23700         a FUNCTION_DECL, pass it as decl instead of origin to
23701         process_scope_var.
23702
23703 2017-03-31  Alexander Monakov  <amonakov@ispras.ru>
23704
23705         * config/nvptx/nvptx.c (nvptx_output_softstack_switch): Correct format
23706         string.
23707
23708 2017-03-31  Pat Haugen  <pthaugen@us.ibm.com>
23709
23710         PR target/80107
23711         * config/rs6000/rs6000.md (extendhi<mode>2): Add test for
23712         TARGET_VSX_SMALL_INTEGER.
23713
23714 2017-03-31  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23715
23716         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
23717         reference to the OpenPOWER 64-Bit ELF V2 ABI Specification.
23718
23719 2017-03-31  Matthew Fortune  <matthew.fortune@imgtec.com>
23720
23721         * config/mips/mips-msa.md (msa_vec_extract_<msafmt_f>): Update
23722         extraction from odd-numbered MSA register.
23723
23724 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
23725
23726         PR middle-end/80173
23727         * expmed.c (store_bit_field_1): Don't attempt to create
23728         a word subreg out of hard registers wider than word if they
23729         have HARD_REGNO_NREGS of 1 for their mode.
23730
23731         PR middle-end/80163
23732         * varasm.c (initializer_constant_valid_p_1): Disallow sign-extending
23733         conversions to integer types wider than word and pointer.
23734
23735         PR debug/80025
23736         * cselib.h (rtx_equal_for_cselib_1): Add depth argument.
23737         (rtx_equal_for_cselib_p): Pass 0 to it.
23738         * cselib.c (cselib_hasher::equal): Likewise.
23739         (rtx_equal_for_cselib_1): Add depth argument.  If depth
23740         is 128, don't look up VALUE locs and punt.  Increment
23741         depth in recursive calls when walking VALUE locs.
23742
23743 2017-03-31  Bernd Edlinger  <bernd.edlinger@hotmail.de>
23744
23745         * gcov.c (md5sum_to_hex): Fix output of MD5 hex bytes.
23746         (make_gcov_file_name): Use the canonical path name for generating
23747         the MD5 value.
23748         (read_line): Fix handling of files with ascii null bytes.
23749
23750 2017-03-30  Matthew Fortune  <matthew.fortune@imgtec.com>
23751
23752         * config/mips/mips.c (mips_expand_vector_init): Create a const_vector
23753         to initialise a vector register instead
23754         of using a const_int.
23755
23756 2017-03-30  Jakub Jelinek  <jakub@redhat.com>
23757
23758         PR translation/80189
23759         * gimplify.c (omp_default_clause): Use %qs instead of %s in
23760         diagnostic messages.
23761
23762 2017-03-30  Peter Bergner  <bergner@vnet.ibm.com>
23763
23764         PR target/80246
23765         * config/rs6000/dfp.md (dfp_dxex_<mode>): Update mode of operand 0.
23766         (dfp_diex_<mode>): Update mode of operand 1.
23767         * doc/extend.texi (dxex, dxexq): Document change to return type.
23768         (diex, diexq): Document change to argument type.
23769
23770 2017-03-30  Martin Jambor  <mjambor@suse.cz>
23771
23772         PR ipa/77333
23773         * cgraph.h (cgraph_build_function_type_skip_args): Declare.
23774         * cgraph.c (redirect_call_stmt_to_callee): Set gimple fntype so that
23775         it reflects the signature changes performed at the callee side.
23776         * cgraphclones.c (build_function_type_skip_args): Make public, renamed
23777         to cgraph_build_function_type_skip_args.
23778         (build_function_decl_skip_args): Adjust call to the above function.
23779
23780 2017-03-30  Jakub Jelinek  <jakub@redhat.com>
23781
23782         PR target/80206
23783         * config/i386/sse.md
23784         (<extract_type>_vextract<shuffletype><extract_suf>_mask): Use
23785         register as dest whenever it is a MEM not rtx_equal_p to the
23786         corresponding dup operand, and when forcing into reg move the
23787         reg into the memory afterwards.
23788         (<extract_type_2>_vextract<shuffletype><extract_suf_2>_mask):
23789         Likewise.  Use <ssehalfvecmode> instead of <ssequartermode>
23790         for the force_reg mode.
23791         (avx512vl_vextractf128<mode>): Use register as dest either
23792         always when a MEM, or when it is a MEM not rtx_equal_p to the
23793         corresponding dup operand, or even not when it is a CONST_VECTOR
23794         depending on the mode and lo vs. hi.
23795         (avx512dq_vextract<shuffletype>64x2_1_maskm): Remove extraneous
23796         parens.
23797         (avx512f_vextract<shuffletype>32x4_1_maskm): Likewise.
23798         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name>):
23799         Likewise.  Require that operands[2] is even.
23800         (<mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name>):
23801         Remove extraneous parens.  Require that operands[2] is a multiple
23802         of 4.
23803         (vec_extract_lo_<mode><mask_name>): Don't bother testing if
23804         operands[0] is a MEM if <mask_applied>, the predicates/constraints
23805         disallow memory then.
23806
23807 2017-03-30  Richard Biener  <rguenther@suse.de>
23808
23809         PR tree-optimization/77498
23810         * tree-ssa-pre.c (phi_translate_1): Do not allow simplifications
23811         to non-constants over backedges.
23812
23813 2017-03-29  Segher Boessenkool  <segher@kernel.crashing.org>
23814
23815         PR rtl-optimization/80233
23816         * combine.c (combine_instructions): Only take NONDEBUG_INSN_P insns
23817         as last_combined_insn.  Do not test for BARRIER_P separately.
23818
23819 2017-03-29  Andreas Schwab  <schwab@suse.de>
23820
23821         PR ada/80146
23822         * calls.c (prepare_call_address): Convert funexp to Pmode before
23823         copying to temp reg.
23824
23825 2017-03-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23826
23827         PR tree-optimization/80158
23828         * gimple-ssa-strength-reduction.c (replace_mult_candidate):
23829         Handle possible future case of more than one alternate
23830         interpretation.
23831         (replace_rhs_if_not_dup): Likewise.
23832         (replace_one_candidate): Likewise.
23833
23834 2017-03-28  Vladimir Makarov  <vmakarov@redhat.com>
23835
23836         PR rtl-optimization/80193
23837         * ira.c (ira): Do not check allocation for LRA.
23838
23839 2017-03-28  Alexander Monakov  <amonakov@ispras.ru>
23840
23841         * config/nvptx/nvptx-protos.h (nvptx_output_simt_enter): Declare.
23842         (nvptx_output_simt_exit): Declare.
23843         * config/nvptx/nvptx.c (nvptx_init_unisimt_predicate): Use
23844         cfun->machine->unisimt_location.  Handle NULL unisimt_predicate.
23845         (init_softstack_frame): Move initialization of crtl->is_leaf to...
23846         (nvptx_declare_function_name): ...here.  Emit declaration of local
23847         memory space buffer for omp_simt_enter insn.
23848         (nvptx_output_unisimt_switch): New.
23849         (nvptx_output_softstack_switch): New.
23850         (nvptx_output_simt_enter): New.
23851         (nvptx_output_simt_exit): New.
23852         * config/nvptx/nvptx.h (struct machine_function): New fields
23853         has_simtreg, unisimt_location, simt_stack_size, simt_stack_align.
23854         * config/nvptx/nvptx.md (UNSPECV_SIMT_ENTER): New unspec.
23855         (UNSPECV_SIMT_EXIT): Ditto.
23856         (omp_simt_enter_insn): New insn.
23857         (omp_simt_enter): New expansion.
23858         (omp_simt_exit): New insn.
23859         * config/nvptx/nvptx.opt (msoft-stack-reserve-local): New option.
23860
23861         * internal-fn.c (expand_GOMP_SIMT_ENTER): New.
23862         (expand_GOMP_SIMT_ENTER_ALLOC): New.
23863         (expand_GOMP_SIMT_EXIT): New.
23864         * internal-fn.def (GOMP_SIMT_ENTER): New internal function.
23865         (GOMP_SIMT_ENTER_ALLOC): Ditto.
23866         (GOMP_SIMT_EXIT): Ditto.
23867         * target-insns.def (omp_simt_enter): New insn.
23868         (omp_simt_exit): Ditto.
23869         * omp-low.c (struct omplow_simd_context): New fields simt_eargs,
23870         simt_dlist.
23871         (lower_rec_simd_input_clauses): Implement SIMT privatization.
23872         (lower_rec_input_clauses): Likewise.
23873         (lower_lastprivate_clauses): Handle SIMT privatization.
23874
23875         * omp-offload.c: Include langhooks.h, tree-nested.h, stor-layout.h.
23876         (ompdevlow_adjust_simt_enter): New.
23877         (find_simtpriv_var_op): New.
23878         (execute_omp_device_lower): Handle IFN_GOMP_SIMT_ENTER,
23879         IFN_GOMP_SIMT_ENTER_ALLOC, IFN_GOMP_SIMT_EXIT.
23880
23881         * tree-inline.h (struct copy_body_data): New field dst_simt_vars.
23882         * tree-inline.c (expand_call_inline): Handle SIMT privatization.
23883         (copy_decl_for_dup_finish): Ditto.
23884
23885         * tree-ssa.c (execute_update_addresses_taken): Handle GOMP_SIMT_ENTER.
23886
23887 2017-03-28  Uros Bizjak  <ubizjak@gmail.com>
23888
23889         PR target/53383
23890         * config/i386/i386.c (ix86_option_override_internal): Always
23891         allow -mpreferred-stack-boundary=3 for 64-bit targets.
23892
23893 2017-03-28  Bin Cheng  <bin.cheng@arm.com>
23894
23895         * tree-vect-loop.c (optimize_mask_stores): Add bb to the right loop.
23896
23897 2017-03-28  Bin Cheng  <bin.cheng@arm.com>
23898
23899         * tree-vect-loop-manip.c (slpeel_add_loop_guard): New param and
23900         mark new edge's irreducible flag accordign to it.
23901         (vect_do_peeling): Check loop preheader edge's irreducible flag
23902         and pass it to function slpeel_add_loop_guard.
23903
23904 2017-03-28  Richard Sandiford  <richard.sandiford@arm.com>
23905
23906         PR tree-optimization/80218
23907         * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
23908         Update block frequencies and counts.
23909
23910 2017-03-28  Richard Biener  <rguenther@suse.de>
23911
23912         PR tree-optimization/78644
23913         * tree-ssa-ccp.c (evaluate_stmt): When we may not use the value
23914         of a simplification result we may not use it at all.
23915
23916 2017-03-28  Richard Biener  <rguenther@suse.de>
23917
23918         PR ipa/80205
23919         * tree-inline.c (copy_phis_for_bb): Do not create PHI node
23920         without arguments, generate default definition of a SSA name.
23921
23922 2017-03-28  Richard Biener  <rguenther@suse.de>
23923
23924         PR middle-end/80222
23925         * gimple-fold.c (gimple_fold_indirect_ref): Do not touch
23926         TYPE_REF_CAN_ALIAS_ALL references.
23927         * fold-const.c (fold_indirect_ref_1): Likewise.
23928
23929 2017-03-28  Martin Liska  <mliska@suse.cz>
23930
23931         PR ipa/80104
23932         * cgraphunit.c (cgraph_node::expand_thunk): Mark argument of a
23933         thunk call as DECL_GIMPLE_REG_P when vector or complex type.
23934
23935 2017-03-28  Claudiu Zissulescu  <claziss@synopsys.com>
23936             Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
23937
23938         * config/arc/arc.h (CPP_SPEC): Add subtarget_cpp_spec.
23939         (EXTRA_SPECS): Define.
23940         (SUBTARGET_EXTRA_SPECS): Likewise.
23941         (SUBTARGET_CPP_SPEC): Likewise.
23942         * config/arc/elf.h (EXTRA_SPECS): Renamed to
23943         SUBTARGET_EXTRA_SPECS.
23944         * config/arc/linux.h (SUBTARGET_CPP_SPEC): Define.
23945
23946 2017-03-28  Claudiu Zissulescu  <claziss@synopsys.com>
23947
23948         * config/arc/simdext.md (vst64_insn): Update pattern.
23949         (vld32wh_insn): Likewise.
23950         (vld32wl_insn): Likewise.
23951         (vld64_insn): Likewise.
23952         (vld32_insn): Likewise.
23953
23954 2017-03-28  Marek Polacek  <polacek@redhat.com>
23955
23956         PR sanitizer/80067
23957         * fold-const.c (fold_comparison): Use protected_set_expr_location
23958         instead of SET_EXPR_LOCATION.
23959
23960 2017-03-28  Markus Trippelsdorf  <markus@trippelsdorf.de>
23961
23962         * tree.c (add_expr): Avoid name lookup warning.
23963
23964 2017-03-27  Jeff Law  <law@redhat.com>
23965
23966         PR tree-optimization/80216
23967         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Fix typo in
23968         function name.  Limit recursion depth.
23969         (record_temporary_equivalences): Corresponding changes.
23970
23971 2017-03-27  Jonathan Wakely  <jwakely@redhat.com>
23972
23973         * doc/invoke.texi (-Wno-narrowing): Reorder so default behavior is
23974         covered first.
23975
23976 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
23977
23978         PR target/80102
23979         * reg-notes.def (REG_CFA_NOTE): Define.  Use it for CFA related
23980         notes.
23981         * cfgcleanup.c (reg_note_cfa_p): New array.
23982         (insns_have_identical_cfa_notes): New function.
23983         (old_insns_match_p): Don't cross-jump in between /f
23984         and non-/f instructions.  If both i1 and i2 are frame related,
23985         verify all CFA notes, their order and content.
23986
23987 2017-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
23988
23989         PR target/78543
23990         * config/rs6000/rs6000.md (bswaphi2_extenddi): Combine bswap
23991         HImode and SImode with zero extend to DImode to one insn.
23992         (bswap<mode>2_extenddi): Likewise.
23993         (bswapsi2_extenddi): Likewise.
23994         (bswaphi2_extendsi): Likewise.
23995         (bswaphi2): Combine bswap HImode and SImode into one insn.
23996         Separate memory insns from swapping register.
23997         (bswapsi2): Likewise.
23998         (bswap<mode>2): Likewise.
23999         (bswaphi2_internal): Delete, no longer used.
24000         (bswapsi2_internal): Likewise.
24001         (bswap<mode>2_load): Split bswap HImode/SImode into separate load,
24002         store, and gpr<-gpr swap insns.
24003         (bswap<mode>2_store): Likewise.
24004         (bswaphi2_reg): Register only splitter, combine with the splitter.
24005         (bswaphi2 splitter): Likewise.
24006         (bswapsi2_reg): Likewise.
24007         (bswapsi2 splitter): Likewise.
24008         (bswapdi2): If we have the LDBRX and STDBRX instructions, split
24009         the insns into load, store, and register/register insns.
24010         (bswapdi2_ldbrx): Likewise.
24011         (bswapdi2_load): Likewise.
24012         (bswapdi2_store): Likewise.
24013         (bswapdi2_reg): Likewise.
24014
24015 2017-03-27  Gunther Nikl  <gnikl@users.sourceforge.net>
24016
24017         * system.h (HAVE_DESIGNATED_INITIALIZERS): Fix non C++ case.
24018         (HAVE_DESIGNATED_UNION_INITIALIZERS): Likewise.
24019
24020 2017-03-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24021
24022         PR target/80103
24023         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Edit and
24024         add comments.
24025         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
24026         special handling for target option conflicts between dform
24027         options (-mpower9-dform, -mpower9-dform-vector,
24028         -mpower9-dform-scalar) and -mno-direct-move.
24029
24030 2017-03-27  Richard Biener  <rguenther@suse.de>
24031
24032         PR tree-optimization/80181
24033         * tree-ssa-ccp.c (likely_value): UNDEFINED ^ X is UNDEFINED.
24034
24035 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
24036
24037         * config/arc/predicates.md (move_double_src_operand): Replace the
24038         call to move_double_src_operand with a call to address_operand.
24039
24040 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
24041
24042         * config/arc/elf.h (ARGET_ARC_TP_REGNO_DEFAULT): Define.
24043         * config/arc/linux.h (ARGET_ARC_TP_REGNO_DEFAULT): Likewise.
24044         * config/arc/arc.opt (mtp-regno): Use ARGET_ARC_TP_REGNO_DEFAULT.
24045
24046 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
24047
24048         * config/arc/predicates.md (long_immediate_loadstore_operand):
24049         Consider scaled addresses cases.
24050
24051 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
24052
24053         * config/arc/arc.c (arc_epilogue_uses): BLINK should be also
24054         restored when in interrupt.
24055         * config/arc/arc.md (simple_return): ARCv2 rtie instruction
24056         doesn't have delay slot.
24057
24058 2017-03-27  Richard Biener  <rguenther@suse.de>
24059
24060         PR ipa/79776
24061         * tree-ssa-structalias.c (associate_varinfo_to_alias): Skip
24062         inlined thunk clones.
24063
24064 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
24065
24066         PR sanitizer/80168
24067         * asan.c (instrument_derefs): Copy over last operand from
24068         original COMPONENT_REF to the new COMPONENT_REF with
24069         DECL_BIT_FIELD_REPRESENTATIVE.
24070         * ubsan.c (instrument_object_size): Likewise.
24071
24072 2017-03-27  Richard Biener  <rguenther@suse.de>
24073
24074         PR tree-optimization/80170
24075         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Make
24076         sure DR/SCEV didnt fold in constants we do not see when looking
24077         at the reference base alignment.
24078
24079 2017-03-27  Richard Biener  <rguenther@suse.de>
24080
24081         PR middle-end/80171
24082         * gimple-fold.c (fold_ctor_reference): Properly guard against
24083         NULL return value from canonicalize_constructor_val.
24084
24085 2017-03-25  Uros Bizjak  <ubizjak@gmail.com>
24086
24087         PR target/80180
24088         * config/i386/i386.c (ix86_expand_builtin)
24089         <IX86_BUILTIN_RDSEED{16,32,64}_STEP>: Do not expand arg0 between
24090         flags reg setting and flags reg using instructions.
24091         <IX86_BUILTIN_RDRAND{16,32,64}_STEP>: Ditto.  Use non-flags reg
24092         clobbering instructions to zero extend op2.
24093
24094 2017-03-25  Gerald Pfeifer  <gerald@pfeifer.com>
24095
24096         * doc/install.texi (Configuration) <--with-aix-soname>:
24097         Update link to AIX ld.
24098
24099 2017-03-25  Bernd Schmidt  <bschmidt@redhat.com>
24100
24101         PR rtl-optimization/80160
24102         PR rtl-optimization/80159
24103         * lra-assigns.c (must_not_spill_p): Tighten new test to also take
24104         reg_alternate_class into account.
24105
24106 2017-03-24  Vladimir Makarov  <vmakarov@redhat.com>
24107
24108         PR target/80148
24109         * lra-assigns.c (assign_by_spills): Add spilled non-reload pseudos
24110         to consider in curr_insn_transform.
24111
24112 2017-03-24  Jakub Jelinek  <jakub@redhat.com>
24113
24114         * genrecog.c (validate_pattern): Add VEC_SELECT validation.
24115         * genmodes.c (emit_min_insn_modes_c): Call emit_mode_nunits
24116         and emit_mode_inner.
24117
24118 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24119
24120         * config/s390/s390-builtins.def: Add VXE builtins.  Add a flags
24121         argument to the overloaded builtin variants.  Use the new flag to
24122         deprecate certain builtin variants.
24123         * config/s390/s390-builtin-types.def: Add new builtin types.
24124         * config/s390/s390-builtins.h: Support new flags field for
24125         overloaded builtins.
24126         * config/s390/s390-c.c (OB_DEF_VAR): New flags field.
24127         (s390_macro_to_expand): Enable vector float data type.
24128         (s390_cpu_cpp_builtins_internal): Indicate support of the new
24129         builtins by incrementing the __VEC__ version number.
24130         (s390_expand_overloaded_builtin): Support expansion of vec_xl and
24131         vec_xst.
24132         (s390_resolve_overloaded_builtin): Emit error messages depending
24133         on the builtin flags.
24134         * config/s390/s390.c (s390_expand_builtin): Support additional
24135         flags argument.  Change error message to match the messages
24136         emitted in s390-c.c.
24137         * config/s390/s390.md: New UNSPEC_* constants.
24138         (op_type): Add new instruction types.
24139         * config/s390/vecintrin.h: Add new builtins and test data class
24140         constants.
24141         * config/s390/vx-builtins.md (V_HW_32_64): Add V4SF.
24142         (V_HW_4, VEC_HW, VECF_HW): New mode iterators.
24143         (VEC_INEXACT, VEC_NOINEXACT): New constants.
24144         ("vec_splats<mode>", "vec_insert<mode>", "vec_promote<mode>")
24145         ("vec_insert_and_zero<mode>", "vec_mergeh<mode>")
24146         ("vec_mergel<mode>"): V_HW -> VEC_HW.
24147
24148         ("vlrlrv16qi", "vstrlrv16qi", "vbpermv16qi", "vec_msumv2di")
24149         ("vmslg", "*vftci<mode>_cconly", "vftci<mode>_intcconly")
24150         ("*vftci<mode>", "vftci<mode>_intcc", "vec_double_s64")
24151         ("vec_double_u64", "vfmin<mode>", "vfmax<mode>"): New definition.
24152
24153         ("and_av2df3", "and_cv2df3", "vec_andc_av2df3")
24154         ("vec_andc_cv2df3", "xor_av2df3", "xor_cv2df3", "vec_nor_av2df3")
24155         ("vec_nor_cv2df3", "ior_av2df3", "ior_cv2df3", "vec_nabs")
24156         ("*vftcidb", "*vftcidb_cconly", "vftcidb"): Remove definition.
24157
24158         ("vec_all_<fpcmpcc:code>v2df", "vec_any_<fpcmpcc:code>v2df")
24159         ("vec_scatter_elementv4si_DI", "vec_cmp<fpcmp:code>v2df")
24160         ("vec_di_to_df_s64", "vec_di_to_df_u64", "vec_df_to_di_u64")
24161         ("vfidb", "*vldeb", "*vledb", "*vec_cmp<insn_cmp>v2df_cconly")
24162         ("vec_cmpeqv2df_cc", "vec_cmpeqv2df_cc", "vec_cmphv2df_cc")
24163         ("vec_cmphev2df_cc", "*vec_cmpeqv2df_cc")
24164         ("*vec_cmphv2df_cc", "*vec_cmphev2df_cc"): Enable new modes as ...
24165
24166         ("vec_all_<fpcmpcc:code><mode>", "vec_any_<fpcmpcc:code><mode>")
24167         ("vec_scatter_element<V_HW_4:mode>_DI")
24168         ("vec_cmp<fpcmp:code><mode>", "vcdgb", "vcdlgb", "vclgdb")
24169         ("vec_fpint<mode>", "vflls")
24170         ("vflrd", "*vec_cmp<insn_cmp><mode>_cconly", "vec_cmpeq<mode>_cc")
24171         ("vec_cmpeq<mode>_cc", "vec_cmph<mode>_cc", "vec_cmphe<mode>_cc")
24172         ("*vec_cmpeq<mode>_cc", "*vec_cmph<mode>_cc")
24173         ("*vec_cmphe<mode>_cc"): ... these.
24174
24175         ("vec_ctd_s64", "vec_ctsl", "vec_ctul", "vec_st2f"): Use rounding
24176         mode constant instead of magic value.
24177
24178 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24179
24180         * config/s390/s390.c (s390_expand_vec_compare): Support other
24181         vector floating point modes than just V2DF.
24182         (s390_expand_vcond): Likewise.
24183         (s390_hard_regno_mode_ok): Allow SFmode values in VRs.
24184         (s390_cannot_change_mode_class): Prevent mode changes between TF
24185         and V1TF in vector registers.
24186         * config/s390/s390.md (DF, SF): New mode attributes.
24187         ("*cmp<mode>_ccs", "add<mode>3", "sub<mode>3", "mul<mode>3")
24188         ("fma<mode>4", "fms<mode>4", "div<mode>3", "*neg<mode>2"): Add
24189         SFmode support for VRs.
24190         * config/s390/vector.md (V_HW, V_HW2, VT_HW, ti*, nonvec): Add new
24191         vector fp modes.
24192         (VFT, VF_HW): New mode iterators.
24193         (vw, sdx): New mode attributes.
24194         ("addv2df3", "subv2df3", "mulv2df3", "divv2df3", "sqrtv2df2")
24195         ("fmav2df4","fmsv2df4", "negv2df2", "absv2df2", "*negabsv2df2")
24196         ("smaxv2df3", "sminv2df3", "*vec_cmp<VFCMP_HW_OP:code>v2df_nocc")
24197         ("vec_cmpuneqv2df", "vec_cmpltgtv2df", "vec_orderedv2df")
24198         ("vec_unorderedv2df"): Adjust the v2df only patterns to support
24199         also the new vector floating point modes.  Renaming to ...
24200
24201         ("add<mode>3", "sub<mode>3", "mul<mode>3", "div<mode>3")
24202         ("sqrt<mode>2", "fma<mode>4", "fms<mode>4", "neg<mode>2")
24203         ("abs<mode>2", "negabs<mode>2", "smax<mode>3")
24204         ("smin<mode>3", "*vec_cmp<VFCMP_HW_OP:code><mode>_nocc")
24205         ("vec_cmpuneq<mode>", "vec_cmpltgt<mode>", "vec_ordered<mode>")
24206         ("vec_unordered<mode>"): ... these.
24207
24208         ("neg_fma<mode>4", "neg_fms<mode>4", "*smax<mode>3_vxe")
24209         ("*smin<mode>3_vxe", "*sminv2df3_vx", "*vec_extendv4sf")
24210         ("*vec_extendv2df"): New insn definitions.
24211
24212 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24213
24214         * config/s390/s390.md ("*adddi3_sign", "*subdi3_sign", "mulditi3")
24215         ("mulditi3_2", "*muldi3_sign"): New patterns.
24216         ("muldi3", "*muldi3", "mulsi3", "*mulsi3"): Add an expander and
24217         rename the pattern definition.
24218
24219 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24220
24221         * config/s390/s390.md ("indirect_jump"): Turn insn definition into
24222         expander.
24223         ("*indirect_jump", "*indirect2_jump"): New pattern definitions.
24224
24225 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24226
24227         * config/s390/s390.c (s390_expand_vec_init): Use vllezl
24228         instruction if possible.
24229         * config/s390/vector.md (vec_halfnumelts): New mode
24230         attribute.
24231         ("*vec_vllezlf<mode>"): New pattern.
24232
24233 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24234
24235         * config/s390/vector.md ("popcountv16qi2", "popcountv8hi2")
24236         ("popcountv4si2", "popcountv2di2"): Rename to ...
24237         ("popcount<mode>2", "popcountv8hi2_vx", "popcountv4si2_vx")
24238         ("popcountv2di2_vx"): ... these and add !TARGET_VXE to the
24239         condition.
24240         ("popcount<mode>2_vxe"): New pattern.
24241
24242 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24243
24244         * common/config/s390/s390-common.c (processor_flags_table): Add
24245         arch12.
24246         * config.gcc: Add arch12.
24247         * config/s390/driver-native.c (s390_host_detect_local_cpu):
24248         Default to arch12 for unknown CPU model numbers.
24249         * config/s390/s390-builtins.def: Add B_VXE builtin flag.
24250         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Adjust
24251         PROCESSOR_max sanity check.
24252         * config/s390/s390-opts.h (enum processor_type): Add
24253         PROCESSOR_ARCH12.
24254         * config/s390/s390.c (processor_table): Add arch12.
24255         (s390_expand_builtin): Add check for B_VXE flag.
24256         (s390_issue_rate): Add PROCESSOR_ARCH12.
24257         (s390_get_sched_attrmask): Likewise.
24258         (s390_get_unit_mask): Likewise.
24259         (s390_sched_score): Enable z13 scheduling for arch12.
24260         (s390_sched_reorder): Likewise.
24261         (s390_sched_variable_issue): Likewise.
24262         * config/s390/s390.h (enum processor_flags): Add PF_ARCH12 and
24263         PF_VXE.
24264         (s390_tune_attr): Use z13 scheduling also for arch12.
24265         (TARGET_CPU_ARCH12, TARGET_CPU_ARCH12_P, TARGET_CPU_VXE)
24266         (TARGET_CPU_VXE_P, TARGET_ARCH12, TARGET_ARCH12_P, TARGET_VXE)
24267         (TARGET_VXE_P): New macros.
24268         * config/s390/s390.md: Add arch12 to cpu attribute.  Add arch12
24269         and vxe to cpu_facility.  Add arch12 and vxe to enabled attribute.
24270         * config/s390/s390.opt: Add arch12 as processor_type.
24271
24272 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24273
24274         * config/s390/s390.md
24275         ("fixuns_truncdddi2", "fixuns_trunctddi2")
24276         ("fixuns_trunc<BFP:mode><GPR:mode>2"): Merge into ...
24277         ("fixuns_trunc<FP:mode><GPR:mode>2"): New expander.
24278
24279         ("fixuns_trunc<BFP:mode><GPR:mode>2", "fixuns_trunc<mode>si2"):
24280         Rename expanders to ...
24281
24282         ("fixuns_trunc<BFP:mode><GPR:mode>2_emu")
24283         ("fixuns_truncdddi2_emu"): ... these.
24284
24285         ("fixuns_trunc<mode>si2_emu"): New expander.
24286
24287         ("*fixuns_truncdfdi2_z13"): Rename to ...
24288         ("*fixuns_truncdfdi2_vx"): ... this.
24289
24290 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24291
24292         * config/s390/2964.md: Remove the single element vector compare
24293         instructions which are no longer used.
24294         * config/s390/s390.c (s390_select_ccmode): Remove handling of
24295         vector CCmodes.
24296         (s390_canonicalize_comparison): Remove handling of DFmode
24297         compares.
24298         (s390_expand_vec_compare_scalar): Remove function.
24299         (s390_emit_compare): Don't call s390_expand_vec_compare_scalar.
24300         * config/s390/s390.md ("*vec_cmp<insn_cmp>df_cconly"): Remove
24301         pattern.
24302         ("*cmp<mode>_ccs"): Add wfcdb instruction.
24303
24304 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24305
24306         * config/s390/s390.md ("mov<mode>_64dfp" DD_DF): Use vleig for loading a
24307         FP zero.
24308         ("*mov<mode>_64" DD_DF): Remove the vector instructions. These
24309         will anyway by matched by mov<mode>_64dfp.
24310
24311 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24312
24313         * config/s390/s390.md ("mov<mode>" SD_SF): Change vleg/vsteg to
24314         vlef/vstef.  Add missing operand to vleif.
24315
24316 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24317
24318         * config/s390/s390.c (s390_expand_vec_init): Enable vector load
24319         pair for all vector types with 64 bit elements.
24320         * config/s390/vx-builtins.md (V_HW_64): Move mode iterator to ...
24321         * config/s390/vector.md (V_HW_64): ... here.
24322         (V_128_NOSINGLE): New mode iterator.
24323         ("vec_init<V_HW:mode>"): Use V_128 as mode iterator.
24324         ("*vec_splat<mode>"): Use V_128_NOSINGLE mode iterator.
24325         ("*vec_tf_to_v1tf", "*vec_ti_to_v1ti"): New pattern definitions.
24326         ("*vec_load_pairv2di"): Change to ...
24327         ("*vec_load_pair<mode>"): ... this one.
24328
24329 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24330
24331         * config/s390/constraints.md: Add comments.
24332         (jKK): Reject element sizes > 8 bytes.
24333         * config/s390/s390.c (s390_split_ok_p): Enable splitting also for
24334         s_operands.
24335         * config/s390/s390.md: Add the s_operand checks formerly in
24336         s390_split_ok_p to various splitters where they are still
24337         required.
24338         * config/s390/vector.md ("mov<mode>" V_128): Add GPR alternatives
24339         for 128 bit vectors.  Plus two splitters.
24340
24341 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24342
24343         * config/s390/s390.md: Rename the cpu facilty vec to vx throughout
24344         the file.
24345
24346 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24347
24348         PR target/79893
24349         * config/s390/s390-c.c (s390_adjust_builtin_arglist): Issue an
24350         error if the boundary argument is not constant.
24351
24352 2017-03-24  Jakub Jelinek  <jakub@redhat.com>
24353
24354         PR rtl-optimization/80112
24355         * loop-doloop.c (doloop_condition_get): Don't check condition
24356         if cmp isn't SET with IF_THEN_ELSE src.
24357
24358 2017-03-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24359
24360         PR tree-optimization/80158
24361         * gimple-ssa-strength-reduction.c (replace_mult_candidate): When
24362         replacing a candidate statement, also replace it for the
24363         candidate's alternate interpretation.
24364         (replace_rhs_if_not_dup): Likewise.
24365         (replace_one_candidate): Likewise.
24366
24367 2017-03-24  Richard Biener  <rguenther@suse.de>
24368
24369         PR tree-optimization/80167
24370         * graphite-isl-ast-to-gimple.c
24371         (translate_isl_ast_to_gimple::is_valid_rename): Handle default-defs
24372         properly.
24373         (translate_isl_ast_to_gimple::get_rename): Likewise.
24374
24375 2017-03-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24376
24377         * config/rs6000/rs6000.c (rs6000_option_override_internal): Change
24378         handling of certain combinations of target options, including the
24379         combinations -mpower8-vector vs. -mno-vsx, -mpower9-vector vs.
24380         -mno-power8-vector, and -mpower9_dform vs. -mno-power9-vector.
24381
24382 2017-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24383
24384         PR target/71436
24385         * config/arm/arm.md (*load_multiple): Add reload_completed to
24386         matching condition.
24387
24388 2017-03-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24389             Richard Biener  <rguenth@suse.de>
24390
24391         PR tree-optimization/79908
24392         PR tree-optimization/80136
24393         * tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
24394         been cast away, gimplify_and_add suffices.
24395
24396 2017-03-23  Markus Trippelsdorf  <markus@trippelsdorf.de>
24397
24398         * tree-vrp.c (identify_jump_threads): Delete avail_exprs.
24399
24400 2017-03-23  Richard Biener  <rguenther@suse.de>
24401
24402         PR tree-optimization/80032
24403         * gimplify.c (gimple_push_cleanup): Forced unconditional
24404         cleanups still have to go to the conditional_cleanups
24405         sequence.
24406
24407 2017-03-22  Jakub Jelinek  <jakub@redhat.com>
24408
24409         PR tree-optimization/80072
24410         * tree-ssa-reassoc.c (struct operand_entry): Change id field type
24411         to unsigned int.
24412         (next_operand_entry_id): Change type to unsigned int.
24413         (sort_by_operand_rank): Make sure to return the right return value
24414         even if unsigned fields are bigger than INT_MAX.
24415         (struct oecount): Change cnt and id type to unsigned int.
24416         (oecount_hasher::equal): Formatting fix.
24417         (oecount_cmp): Make sure to return the right return value
24418         even if unsigned fields are bigger than INT_MAX.
24419         (undistribute_ops_list): Change next_oecount_id type to unsigned int.
24420
24421         PR c++/80129
24422         * gimplify.c (gimplify_modify_expr_rhs) <case COND_EXPR>: Clear
24423         TREE_READONLY on result if writing it more than once.
24424
24425         PR sanitizer/80110
24426         * doc/invoke.texi (-fsanitize=thread): Document that with
24427         -fnon-call-exceptions atomics are not able to throw
24428         exceptions.
24429
24430         PR sanitizer/80110
24431         * tsan.c: Include tree-eh.h.
24432         (instrument_builtin_call): Call maybe_clean_eh_stmt or
24433         maybe_clean_or_replace_eh_stmt where needed.
24434         (instrument_memory_accesses): Add cfg_changed argument.
24435         Call gimple_purge_dead_eh_edges on each block and set *cfg_changed
24436         if it returned true.
24437         (tsan_pass): Adjust caller.  Return TODO_cleanup_cfg if cfg_changed.
24438
24439         PR rtl-optimization/63191
24440         * config/i386/i386.c (ix86_delegitimize_address): Turn into small
24441         wrapper function, moved the whole old content into ...
24442         (ix86_delegitimize_address_1): ... this.  New inline function.
24443         (ix86_find_base_term): Use ix86_delegitimize_address_1 with
24444         true as last argument instead of ix86_delegitimize_address.
24445
24446 2017-03-22  Wilco Dijkstra  <wdijkstr@arm.com>
24447
24448         * config/aarch64/aarch64.c (generic_branch_cost): Copy
24449         cortexa57_branch_cost.
24450
24451 2017-03-22  Wilco Dijkstra  <wdijkstr@arm.com>
24452
24453         * config/aarch64/aarch64.c (generic_tunings): Add AES fusion.
24454
24455 2017-03-21  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24456
24457         PR target/80123
24458         * doc/md.texi (Constraints): Document wA constraint.
24459         * config/rs6000/constraints.md (wA): New.
24460         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Add wA reg_class.
24461         (rs6000_init_hard_regno_mode_ok): Init wA constraint.
24462         * config/rs6000/rs6000.h (RS6000_CONSTRAINT_wA): New.
24463         * config/rs6000/vsx.md (vsx_splat_<mode>): Use wA constraint.
24464
24465 2017-03-22  Cesar Philippidis  <cesar@codesourcery.com>
24466
24467         PR c++/80029
24468         * gimplify.c (is_oacc_declared): New function.
24469         (oacc_default_clause): Use it to set default flags for acc declared
24470         variables inside parallel regions.
24471         (gimplify_scan_omp_clauses): Strip firstprivate pointers for acc
24472         declared variables.
24473         (gimplify_oacc_declare): Gimplify the declare clauses.  Add the
24474         declare attribute to any decl as necessary.
24475
24476 2017-03-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
24477
24478         PR target/80082
24479         * config/arm/arm-isa.h (isa_bit_lpae): New feature bit.
24480         (ISA_ARMv7ve): Add isa_bit_lpae to the definition.
24481         * config/arm/arm-protos.h (arm_arch7ve): Rename into ...
24482         (arm_arch_lpae): This.
24483         * config/arm/arm.c (arm_arch7ve): Rename into ...
24484         (arm_arch_lpae): This.  Define it in term of isa_bit_lpae.
24485         * config/arm/arm.h (TARGET_HAVE_LPAE): Redefine in term of
24486         arm_arch_lpae.
24487
24488 2017-03-22  Martin Liska  <mliska@suse.cz>
24489
24490         PR target/79906
24491         * config/rs6000/rs6000.c (rs6000_inner_target_options): Show
24492         error message instead of an ICE.
24493
24494 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24495
24496         * doc/extend.texi (6.11 Additional Floating Types): Revise.
24497
24498 2017-03-21  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24499
24500         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Add
24501         comments.
24502         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
24503         comments.
24504
24505 2017-03-21  Martin Sebor  <msebor@redhat.com>
24506
24507         * doc/extend.texi: Use "cannot" instead of "can't."
24508         * doc/hostconfig.texi: Same.
24509         * doc/install.texi: Same.
24510         * doc/invoke.texi: Same.
24511         * doc/loop.texi: Same.
24512         * doc/md.texi: Same.
24513         * doc/objc.texi: Same.
24514         * doc/rtl.texi: Same.
24515         * doc/tm.texi: Same.
24516         * doc/tm.texi.in: Same.
24517         * doc/trouble.texi: Same.
24518
24519 2017-03-21  Alexandre Oliva <aoliva@redhat.com>
24520
24521         PR debug/63238
24522         * dwarf2out.c (struct checksum_attributes): Add at_alignment.
24523         (collect_checksum_attributes): Set it.
24524         (die_checksum_ordered): Use it.
24525
24526 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24527
24528         PR tree-optimization/79908
24529         * tree-stdarg.c (expand_ifn_va_arg_1): Revert the following
24530         change: For a VA_ARG whose LHS has been cast away, use
24531         force_gimple_operand to construct the side effects.
24532
24533 2017-03-21  David Malcolm  <dmalcolm@redhat.com>
24534
24535         PR translation/80001
24536         * omp-offload.c (oacc_loop_fixed_partitions): Make diagnostics
24537         more amenable to translation.
24538         (oacc_loop_auto_partitions): Likewise.
24539
24540 2017-03-21  Marek Polacek  <polacek@redhat.com>
24541             Martin Sebor  <msebor@redhat.com>
24542
24543         PR tree-optimization/80109
24544         * gimple-ssa-warn-alloca.c (alloca_call_type): Only call get_range_info
24545         on INTEGRAL_TYPE_P.
24546
24547 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
24548             Segher Boessenkool  <segher@kernel.crashing.org>
24549
24550         PR target/80125
24551         * combine.c (can_combine_p): Revert the 2017-03-20 change, only
24552         check reg_used_between_p between insn and one of succ or succ2
24553         depending on if succ is artificial insn not inserted into insn
24554         stream.
24555
24556 2017-03-21  Martin Liska  <mliska@suse.cz>
24557
24558         PR gcov-profile/80081
24559         * Makefile.in: Add gcov-dump and fix installation of gcov-tool.
24560         * doc/gcc.texi: Include gcov-dump stuff.
24561         * doc/gcov-dump.texi: New file.
24562
24563 2017-03-21  Toma Tabacu  <toma.tabacu@imgtec.com>
24564
24565         PR rtl-optimization/79150
24566         * config/mips/mips.c (mips_block_move_loop): Emit a NOP after the
24567         conditional jump, if the jump is the last insn of the loop.
24568
24569 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24570             Richard Biener  <rguenth@suse.de>
24571
24572         PR tree-optimization/79908
24573         * tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
24574         been cast away, use force_gimple_operand to construct the side
24575         effects.
24576
24577 2017-03-21  Martin Liska  <mliska@suse.cz>
24578
24579         PR libfortran/79956
24580         * simplify-rtx.c (simplify_immed_subreg): Initialize a variable
24581         to NULL.
24582
24583 2017-03-21  Brad Spengler <spender@grsecurity.net>
24584
24585         PR plugins/80094
24586         * plugin.c (htab_hash_plugin): New function.
24587         (add_new_plugin): Use it and adjust.
24588         (parse_plugin_arg_opt): Adjust.
24589         (init_one_plugin): Likewise.
24590
24591 2017-03-21  Richard Biener  <rguenther@suse.de>
24592
24593         PR tree-optimization/80032
24594         * gimplify.c (gimple_push_cleanup): Add force_uncond parameter,
24595         if set force the cleanup to happen unconditionally.
24596         (gimplify_target_expr): Push inserted clobbers with force_uncond
24597         to avoid them being removed by control-dependent DCE.
24598
24599 2017-03-21  Richard Biener  <rguenther@suse.de>
24600
24601         PR tree-optimization/80122
24602         * tree-inline.c (copy_bb): Do not expans va-arg packs or
24603         va_arg_pack_len when the inlined call stmt requires pack
24604         expansion itself.
24605         * tree-inline.h (struct copy_body_data): Make call_stmt a gcall *.
24606
24607 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
24608
24609         PR sanitizer/78158
24610         * tsan.c (instrument_builtin_call): If the memory model argument
24611         is not a constant, assume it is valid.
24612
24613         PR c/67338
24614         * fold-const.c (round_up_loc): Negate divisor in unsigned type to
24615         avoid UB.
24616
24617 2017-03-20  Segher Boessenkool  <segher@kernel.crashing.org>
24618
24619         PR rtl-optimization/79910
24620         * combine.c (can_combine_p): Do not allow combining an I0 or I1
24621         if its dest is used by an insn before I2 (other than the combined
24622         insns themselves, which are properly handled already).
24623
24624 2017-03-20  Segher Boessenkool  <segher@kernel.crashing.org>
24625
24626         Revert:
24627         2017-03-17  Bernd Schmidt  <bschmidt@redhat.com>
24628
24629         * combine.c (record_used_regs): New static function.
24630         (try_combine): Handle situations where there is an additional
24631         instruction between I2 and I3 which needs to have a LOG_LINK
24632         updated.
24633
24634         Revert:
24635         2017-03-17  Jim Wilson  <jim.wilson@linaro.org>
24636
24637         * combine.c (try_combine): Delete redundant i1 test.  Call
24638         prev_nonnote_nondebug_insn instead of prev_nonnote_insn.
24639
24640 2017-03-20  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24641
24642         PR target/80083
24643         * config/rs6000/rs6000.md (*movsi_internal1): Fix constraints for
24644         alternatives 13/14.
24645
24646 2017-03-20  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24647
24648         PR tree-optimization/80054
24649         * gimple-ssa-strength-reduction.c (all_phi_incrs_profitable): Fail
24650         the optimization if a PHI or any of its arguments is not dominated
24651         by the candidate's basis.  Use gphi* rather than gimple* as
24652         appropriate.
24653         (replace_profitable_candidates): Clean up a gimple* variable that
24654         should be a gphi* variable.
24655
24656 2017-03-20  Martin Sebor  <msebor@redhat.com>
24657
24658         PR c++/52477
24659         * doc/extend.texi (attribute constructor): Document present limitation.
24660
24661 2017-03-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24662
24663         PR target/79963
24664         * config/rs6000/altivec.h (vec_all_ne): Under __cplusplus__ and
24665         __POWER9_VECTOR__ #ifdef control, change template definition to
24666         use Power9-specific built-in function.
24667         (vec_any_eq): Likewise.
24668         * config/rs6000/vector.md (vector_ae_v2di_p): Change the flag used
24669         to control outcomes from this test.
24670         (vector_ae_<mode>p): For VEC_F modes, likewise.
24671
24672 2017-03-20  Ian Lance Taylor  <iant@google.com>
24673
24674         * config/i386/i386.c (ix86_function_regparm): Save an extra
24675         register for -fsplit-stack with DECL_STATIC_CHAIN.
24676
24677 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com>
24678
24679         PR target/79912
24680         * config/riscv/riscv.c (riscv_preferred_reload_class): Remove.
24681         (TARGET_PREFERRED_RELOAD_CLASS): Likewise.
24682
24683 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com>
24684
24685         * config/riscv/riscv.c (riscv_print_operand): Use "fence
24686         iorw,ow".
24687         * config/riscv/sync.mc (mem_thread_fence_1): Use "fence
24688         iorw,iorw".
24689
24690 2017-03-20  Marek Polacek  <polacek@redhat.com>
24691
24692         PR sanitizer/80063
24693         * asan.c (DEF_SANITIZER_BUILTIN): Use do { } while (0).
24694
24695 2017-03-20  Richard Biener  <rguenther@suse.de>
24696
24697         PR tree-optimization/80113
24698         * graphite-isl-ast-to-gimple.c (copy_loop_phi_nodes): Do not
24699         allocate extra SSA name for PHI def.
24700         (add_close_phis_to_outer_loops): Likewise.
24701         (add_close_phis_to_merge_points): Likewise.
24702         (copy_loop_close_phi_args): Likewise.
24703         (copy_cond_phi_nodes): Likewise.
24704
24705 2017-03-20  Martin Liska  <mliska@suse.cz>
24706
24707         PR middle-end/79753
24708         * tree-chkp.c (chkp_build_returned_bound): Do not build
24709         returned bounds for a LHS that's not a BOUNDED_P type.
24710
24711 2017-03-20  Martin Liska  <mliska@suse.cz>
24712
24713         PR target/79769
24714         PR target/79770
24715         * tree-chkp.c (chkp_find_bounds_1): Handle REAL_CST,
24716         COMPLEX_CST and VECTOR_CST.
24717
24718 2017-03-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24719
24720         PR target/78857
24721         * config/s390/s390.md ("cmp<mode>_ccs_0"): Add a clobber of the
24722         target operand.  A new splitter adds the clobber statement in case
24723         the target operand is dead anyway.
24724
24725 2017-03-19  Gerald Pfeifer  <gerald@pfeifer.com>
24726
24727         * doc/install.texi (Specific) <sparc-*-linux*>: No longer refer
24728         to age-old versions of binutils and glibc.
24729
24730 2017-03-18  Segher Boessenkool  <segher@kernel.crashing.org>
24731
24732         * doc/contrib.texi (Contributors): Remove duplicate entry for myself.
24733
24734 2017-03-18  Gerald Pfeifer  <gerald@pfeifer.com>
24735
24736         * doc/contrib.texi (Contributors): Add Segher Boessenkool.
24737
24738 2017-03-18  Gerald Pfeifer  <gerald@pfeifer.com>
24739
24740         * doc/install.texi (Specific) <arm-*-eabi>: Remove old
24741         requirement for binutils 2.13.
24742
24743 2017-03-17  Jim Wilson  <jim.wilson@linaro.org>
24744
24745         * combine.c (try_combine): Delete redundant i1 test.  Call
24746         prev_nonnote_nondebug_insn instead of prev_nonnote_insn.
24747
24748 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com
24749
24750         * doc/install.texi (Specific) <riscv32-*-elf>: Add riscv32-*-elf,
24751         riscv32-*-linux, riscv64-*-elf, riscv64-*-linux to the table of
24752         contents.
24753         <riscv64-*-elf>: Re-arrange section
24754         <riscv32-*-elf>: Add a note about requiring binutils 2.28.
24755         <riscv32-*-linux>: Likewise.
24756         <riscv64-*-elf>: Likewise
24757         <riscv64-*-linux>: Likewise.
24758
24759 2017-03-17  Richard Earnshaw  <rearnsha@arm.com>
24760
24761         PR target/80052
24762         * aarch64.opt(verbose-cost-dump): Fix typo.
24763
24764 2017-03-17  Pat Haugen  <pthaugen@us.ibm.com>
24765
24766         PR target/79951
24767         * config/rs6000/rs6000.md (copysign<mode>3_fcpsgn): Test
24768         for VECTOR_UNIT_VSX_P (<MODE>mode) too.
24769
24770 2017-03-17  Bernd Schmidt  <bschmidt@redhat.com>
24771
24772         * reload.c (find_reloads): When reloading a nonoffsettable address,
24773         use RELOAD_OTHER for it and its address reloads.
24774
24775         PR rtl-optimization/79910
24776         * combine.c (record_used_regs): New static function.
24777         (try_combine): Handle situations where there is an additional
24778         instruction between I2 and I3 which needs to have a LOG_LINK
24779         updated.
24780
24781 2017-03-17  Jeff Law  <law@redhat.com>
24782
24783         PR tree-optimization/71437
24784         * tree-vrp.c (simplify_stmt_for_jump_threading): Lookup the
24785         conditional in the hash table first.
24786         (vrp_dom_walker::before_dom_children): Extract condition from
24787         ASSERT_EXPR.  Record condition, its inverion and any implied
24788         conditions as well.
24789
24790 2017-03-17  Marek Polacek  <polacek@redhat.com>
24791             Markus Trippelsdorf  <markus@trippelsdorf.de>
24792
24793         PR tree-optimization/80079
24794         * gimple-ssa-store-merging.c (class pass_store_merging): Initialize
24795         m_stores_head.
24796
24797 2017-03-17  Richard Biener  <rguenther@suse.de>
24798
24799         PR middle-end/80075
24800         * tree-eh.c (stmt_could_throw_1_p): Only handle gimple assigns.
24801         Properly verify the LHS before the RHS possibly claims to be
24802         handled.
24803         (stmt_could_throw_p): Hande gimple conds fully here.  Clobbers
24804         do not throw.
24805
24806 2017-03-17  Martin Jambor  <mjambor@suse.cz>
24807
24808         * doc/invoke.texi (Option Options): Include -fipa-vrp in the list.
24809         (List of -O2 options): Likewise.
24810         (-fipa-bit-cp): Replace "ipa" with "interprocedural."
24811         (-fipa-vrp) New.
24812
24813 2017-03-17  Tom de Vries  <tom@codesourcery.com>
24814
24815         * gcov-dump.c (print_usage): Print bug_report_url.
24816
24817 2017-03-17  Richard Biener  <rguenther@suse.de>
24818
24819         PR middle-end/80050
24820         * genmatch.c (parser::next): Remove pointless check for CPP_EOF.
24821         (parser::peek): Likewise.
24822
24823 2017-03-17  Richard Biener  <rguenther@suse.de>
24824
24825         PR tree-optimization/80048
24826         * sese.c (free_sese_info): Properly release rename_map and
24827         copied_bb_map elements.
24828
24829 2017-03-16  Alexandre Oliva <aoliva@redhat.com>
24830
24831         * gimple-ssa-store-merging.c (struct imm_store_chain_info):
24832         Add linked-list forward and backlinks.  Insert on
24833         construction, remove on destruction.
24834         (class pass_store_merging): Add m_stores_head field.
24835         (pass_store_merging::terminate_and_process_all_chains):
24836         Iterate over m_stores_head list.
24837         (pass_store_merging::terminate_all_aliasing_chains):
24838         Likewise.
24839         (pass_store_merging::execute): Check for debug stmts first.
24840         Push new chains onto the m_stores_head stack.
24841
24842 2017-03-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
24843
24844         PR target/71294
24845         * config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Allow a
24846         SPLAT operation on ISA 2.07 64-bit systems that have direct move,
24847         but no MTVSRDD support, by doing MTVSRD and XXPERMDI.
24848
24849 2017-03-16  Jeff Law  <law@redhat.com>
24850
24851         PR tree-optimization/71437
24852         * tree-ssa-dom.c (dom_opt_dom_walker): Remove thread_across_edge
24853         member function.  Implementation moved into after_dom_children
24854         member function and into the threader's thread_outgoing_edges
24855         function.
24856         (dom_opt_dom_walker::after_dom_children): Simplify by moving
24857         some code into new thread_outgoing_edges.
24858         * tree-ssa-threadedge.c (thread_across_edge): Make static and simplify
24859         definition.  Simplify marker handling (do it here).   Assume we always
24860         have the available expression and the const/copies tables.
24861         (thread_outgoing_edges): New function extracted from tree-ssa-dom.c
24862         and tree-vrp.c
24863         * tree-ssa-threadedge.h (thread_outgoing_edges): Declare.
24864         * tree-vrp.c (equiv_stack): No longer file scoped.
24865         (vrp_dom_walker): New class.
24866         (vrp_dom_walker::before_dom_children): New member function.
24867         (vrp_dom_walker::after_dom_children): Likewise.
24868         (identify_jump_threads):  Setup domwalker.  Use it rather than
24869         walking edges in a random order by hand.  Simplify setup/finalization.
24870         (finalize_jump_threads): Remove.
24871         (vrp_finalize): Do not call identify_jump_threads here.
24872         (execute_vrp): Do it here instead and call thread_through_all_blocks
24873         here too.
24874
24875         PR tree-optimization/71437
24876         * tree-ssa-dom.c (pfn_simplify): Add basic_block argument.  All
24877         callers changed.
24878         (simplify_stmt_for_jump_threading): Add basic_block argument.  All
24879         callers changed.
24880         (lhs_of_dominating_assert): Moved from here into tree-vrp.c.
24881         (dom_opt_dom_walker::thread_across_edge): Remove
24882         handle_dominating_asserts argument.  All callers changed.
24883         (record_temporary_equivalences_from_stmts_at_dest): Corresponding
24884         changes.  Remove calls to lhs_of_dominating_assert.  Other
24885         uses of handle_dominating_asserts turn into unconditional code
24886         (simplify_control_stmt_condition_1): Likewise.
24887         (simplify_control_stmt_condition): Likewise.
24888         (thread_through_normal_block, thread_across_edge): Likewise.
24889         * tree-ssa-threadedge.h (thread_across_edge): Corresponding changes.
24890         * tree-vrp.c (lhs_of_dominating_assert): Move here.  Return original
24891         object if it is not an SSA_NAME.
24892         (simplify_stmt_for_jump_threading): Call lhs_of_dominating_assert
24893         before calling into the VRP specific simplifiers.
24894         (identify_jump_threads): Remove handle_dominating_asserts
24895         argument.
24896
24897 2017-03-16  Jakub Jelinek  <jakub@redhat.com>
24898
24899         PR fortran/79886
24900         * tree-diagnostic.c (default_tree_printer): No longer static.
24901         * tree-diagnostic.h (default_tree_printer): New prototype.
24902
24903 2017-03-16  Tamar Christina  <tamar.christina@arm.com>
24904
24905         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>)
24906         Change ins into fmov.
24907
24908 2017-03-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24909
24910         * config/aarch64/iterators.md (h_con): Return "x" for V4HF and V8HF.
24911         * config/aarch64/aarch64-simd.md (*aarch64_fma4_elt_from_dup<mode>):
24912         Use h_con constraint for operand 1.
24913         (*aarch64_fnma4_elt_from_dup<mode>): Likewise.
24914         (*aarch64_mulx_elt_from_dup<mode>): Likewise for operand 2.
24915
24916 2017-03-15  Jeff Law  <law@redhat.com>
24917
24918         PR tree-optimization/71437
24919         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): New function.
24920         (record_temporary_equivalences): Use it.
24921
24922         PR tree-optimization/71437
24923         * tree-ssa-dom.c (struct cond_equivalence): Moved from here into
24924         tree-ssa-scopedtables.
24925         (lookup_avail_expr, build_and_record_new_cond): Likewise.
24926         (record_conditions, record_cond, vuse_eq): Likewise.
24927         (record_edge_info): Adjust to API tweak of record_conditions.
24928         (simplify_stmt_for_jump_threading): Similarly for lookup_avail_expr.
24929         (record_temporary_equivalences, optimize_stmt): Likewise.
24930         (eliminate_redundant_computations): Likewise.
24931         (record_equivalences_from_stmt): Likewise.
24932         * tree-ssa-scopedtables.c: Include options.h and params.h.
24933         (vuse_eq): New function, moved from tree-ssa-dom.c
24934         (build_and_record_new_cond): Likewise.
24935         (record_conditions): Likewise.  Accept vector of conditions rather
24936         than edge_equivalence structure for first argument.
24937         for the first argument.
24938         (avail_exprs_stack::lookup_avail_expr): New member function, moved
24939         from tree-ssa-dom.c.
24940         (avail_exprs_stack::record_cond): Likewise.
24941         * tree-ssa-scopedtables.h (struct cond_equivalence): Moved here
24942         from tree-ssa-dom.c.
24943         (avail_exprs_stack): Add new member functions lookup_avail_expr
24944         and record_cond.
24945         (record_conditions): Declare.
24946
24947 2017-03-15  Vladimir Makarov  <vmakarov@redhat.com>
24948
24949         PR target/80017
24950         * lra-constraints.c (process_alt_operands): Increase reject for
24951         reloading an input/output operand.
24952
24953 2017-03-15  Michael Meissner  <meissner@linux.vnet.ibm.com>
24954
24955         PR target/79038
24956         * config/rs6000/rs6000.md (float<QHI:mode><IEEE128:mode>2): Define
24957         insns to convert from signed/unsigned char/short to IEEE 128-bit
24958         floating point.
24959         (floatuns<QHI:mode><IEEE128:mode>2): Likewise.
24960
24961 2017-03-15  Uros Bizjak  <ubizjak@gmail.com>
24962
24963         PR target/80019
24964         * config/i386/i386.c (ix86_vector_duplicate_value): Create
24965         subreg of inner mode for values already in registers.
24966
24967 2017-03-15  Bernd Schmidt  <bschmidt@redhat.com>
24968
24969         * config/c6x/c6x.c (hwloop_optimize): Handle case where the old
24970         iteration reg is used after the loop.
24971
24972 2017-03-14  Martin Sebor  <msebor@redhat.com>
24973
24974         PR tree-optimization/79800
24975         * gimple-ssa-sprintf.c (format_floating: Add argument.  Handle
24976         precision in negative-positive range.
24977         (format_floating): Call non-const overload with adjusted precision.
24978
24979 2017-03-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
24980
24981         PR target/79947
24982         * config/rs6000/rs6000.h (TARGET_FRSQRTES): Add check for
24983         -mpowerpc-gfxopt.
24984
24985 2017-03-14  Martin Sebor  <msebor@redhat.com>
24986
24987         PR middle-end/80020
24988         * builtin-attrs.def (ATTR_ALLOC_SIZE_2_NOTHROW_LIST): New macro.
24989         * builtins.def (aligned_alloc): Use it.
24990
24991         PR c/79936
24992         * Makefile.in (GTFILES): Add calls.c.
24993         * calls.c: Include "gt-calls.h".
24994
24995 2017-03-14  Bernd Schmidt  <bschmidt@redhat.com>
24996
24997         PR rtl-optimization/79728
24998         * regs.h (struct target_regs): New field
24999         x_contains_allocatable_regs_of_mode.
25000         (contains_allocatable_regs_of_mode): New macro.
25001         * reginfo.c (init_reg_sets_1): Initialize it, and change
25002         contains_reg_of_mode so it includes global regs as well.
25003         * reload.c (push_reload): Use contains_allocatable_regs_of_mode
25004         rather than contains_regs_of_mode.
25005
25006 2017-03-14  Martin Liska  <mliska@suse.cz>
25007
25008         * doc/invoke.texi: Document options that can't be combined with
25009         -fcheck-pointer-bounds.
25010
25011 2017-03-14  Martin Liska  <mliska@suse.cz>
25012
25013         PR middle-end/79831
25014         * doc/invoke.texi (-Wchkp): Document the option.
25015
25016 2017-03-14  Martin Liska  <mliska@suse.cz>
25017
25018         * Makefile.in: Install gcov-dump.
25019
25020 2017-03-14  Martin Liska  <mliska@suse.cz>
25021
25022         * multiple_target.c (expand_target_clones): Bail out for
25023         an invalid attribute.
25024
25025 2017-03-14  Richard Biener  <rguenther@suse.de>
25026
25027         * alias.c (struct alias_set_entry): Pack properly.
25028         * cfgloop.h (struct loop): Likewise.
25029         * cse.c (struct set): Likewise.
25030         * ipa-utils.c (struct searchc_env): Likewise.
25031         * loop-invariant.c (struct invariant): Likewise.
25032         * lra-remat.c (struct cand): Likewise.
25033         * recog.c (struct change_t): Likewise.
25034         * rtl.h (struct address_info): Likewise.
25035         * symbol-summary.h (function_summary): Likewise.
25036         * tree-loop-distribution.c (struct partition): Likewise.
25037         * tree-object-size.c (struct object_size_info): Likewise.
25038         * tree-ssa-loop-ivopts.c (struct cost_pair): Likewise.
25039         * tree-ssa-threadupdate.c (struct ssa_local_info_t): Likewise.
25040         * tree-vect-data-refs.c (struct _vect_peel_info): Likewise.
25041         * tree-vect-slp.c (struct _slp_oprnd_info): Likewise.
25042         * tree-vect-stmts.c (struct simd_call_arg_info): Likewise.
25043         * tree-vectorizer.h (struct _loop_vec_info): Likewise.
25044         (struct _stmt_vec_info): Likewise.
25045
25046 2017-03-14  Martin Liska  <mliska@suse.cz>
25047
25048         PR target/79892
25049         * multiple_target.c (create_dispatcher_calls): Check that
25050         a target can create a function dispatcher.
25051
25052 2017-03-14  Martin Liska  <mliska@suse.cz>
25053
25054         PR lto/66295
25055         * multiple_target.c (expand_target_clones): Drop local.local
25056         flag for default implementation.
25057
25058 2017-03-14  Richard Biener  <rguenther@suse.de>
25059
25060         PR tree-optimization/80030
25061         * tree-vect-stmts.c (vectorizable_store): Plug memleak.
25062
25063 2017-03-13  Kito Cheng  <kito.cheng@gmail.com>
25064
25065         * config/riscv/riscv.c (riscv_emit_float_compare>: Use
25066         gcc_fallthrough() instead of __attribute__((fallthrough));
25067
25068 2017-03-13  Gerald Pfeifer  <gerald@pfeifer.com>
25069
25070         * doc/gcc.texi: Remove "up" link to (DIR).
25071         * doc/gccint.texi: Ditto.
25072
25073 2017-03-13  Gerald Pfeifer  <gerald@pfeifer.com>
25074
25075         * doc/install.texi (Specific) <avr>: Remove reference to
25076         binutils 2.13.
25077
25078 2017-03-13  Jeff Law  <law@redhat.com>
25079
25080         * config/riscv/riscv.c (riscv_emit_float_compare): Use fallthru
25081         attribute rather than comments.
25082
25083         * config/pdp11/pdp11.md (movmemhi): Adjust operand numbers to
25084         match_scratch operand is highest.
25085
25086 2017-03-13  Martin Liska  <mliska@suse.cz>
25087
25088         PR middle-end/78339
25089         * ipa-pure-const.c (warn_function_noreturn): If the declarations
25090         is a CHKP clone, use original declaration.
25091
25092 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
25093
25094         * config/arc/arc.c (arc_init): Use multiplier whenever we have it.
25095         (arc_conditional_register_usage): Use a different allocation order
25096         when optimizing for size.
25097         * common/config/arc/arc-common.c (arc_option_optimization_table):
25098         Section anchors default on when optimizing for size.
25099
25100 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
25101
25102         * config/arc/arc.md (*tst_bitfield_tst): Fix pattern.
25103
25104 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
25105
25106         * config/arc/arc.c (arc_output_addsi): Emit code density adds.
25107         * config/arc/arc.md (cpu_facility): Add cd variant.
25108         (*movqi_insn): Add code density variant.
25109         (*movhi_insn): Likewise.
25110         (*movqi_insn): Likewise.
25111         (*addsi3_mixed): Likewise.
25112         (subsi3_insn): Likewise.
25113
25114 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
25115
25116         * config/arc/arc.md (movsi_cond_exec): Update constraint.
25117
25118 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
25119
25120         * config/arc/arc.c (arc_legitimize_pic_address): Handle PIC
25121         expressions with MINUS and UNARY ops.
25122
25123 2017-03-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25124
25125         PR target/79911
25126         * config/arm/neon.md (vec_sel_widen_ssum_lo<VQI:mode><VW:mode>3):
25127         Rename to...
25128         (vec_sel_widen_ssum_lo<mode><V_half>3): ... This. Avoid mismatch
25129         between vec_select and vector argument.
25130         (vec_sel_widen_ssum_hi<VQI:mode><VW:mode>3): Rename to...
25131         (vec_sel_widen_ssum_hi<mode><V_half>3): ... This. Likewise.
25132         (vec_sel_widen_usum_lo<VQI:mode><VW:mode>3): Rename to...
25133         (vec_sel_widen_usum_lo<mode><V_half>3): ... This.
25134         (vec_sel_widen_usum_hi<VQI:mode><VW:mode>3): Rename to...
25135         (vec_sel_widen_usum_hi<mode><V_half>3): ... This.
25136
25137 2017-03-13  Richard Biener  <rguenther@suse.de>
25138
25139         PR other/79991
25140         * params.def (vect-max-peeling-for-alignment): Fix typo.
25141
25142 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
25143
25144         * doc/install.texi (Specific) <mips-*-*>: Remove description of
25145         issue that only occurred with binutils below 2.18.
25146
25147 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
25148
25149         * doc/install.texi (Specific) <cris-axis-elf>: No longer
25150         refer to binutils 2.11/2.12 minimum.
25151
25152 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
25153
25154         * doc/install.texi (Specific) <powerpc-*-*>: Remove link to
25155         ftp.kernel.org and simplify binutils requirement.
25156
25157 2017-03-11  Gerald Pfeifer  <gerald@pfeifer.com>
25158
25159         * doc/invoke.texi (Warning Options): Fix spelling of link-time
25160         optimization.
25161         (Optimize Options): Ditto.  Also remove redundancy.
25162
25163 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
25164
25165         PR translation/79848
25166         * ipa-devirt.c (warn_types_mismatch): Simplify uses of "%<%s%>" to
25167         "%qs".
25168         * ipa-pure-const.c (suggest_attribute): Likewise.  Convert _
25169         to G_ to avoid double translation.
25170
25171 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
25172
25173         PR translation/79923
25174         * auto-profile.c (get_combined_location): Convert leading
25175         character of diagnostics to lower case and remove trailing period.
25176         (read_profile): Likewise for various diagnostics.
25177         * config/arm/arm.c (arm_option_override): Remove trailing period
25178         from various diagnostics.
25179         * config/msp430/msp430.c (msp430_expand_delay_cycles): Likewise.
25180         (msp430_expand_delay_cycles): Likewise.
25181
25182 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
25183
25184         PR target/79925
25185         * config/aarch64/aarch64.c (aarch64_validate_mcpu): Quote the
25186         full command-line argument, rather than just "str".
25187         (aarch64_validate_march): Likewise.
25188         (aarch64_validate_mtune): Likewise.
25189
25190 2017-03-10  Bernd Schmidt  <bschmidt@redhat.com>
25191
25192         PR rtl-optimization/78911
25193         * lra-assigns.c (must_not_spill_p): New function.
25194         (spill_for): Use it.
25195
25196 2017-03-10  Jakub Jelinek  <jakub@redhat.com>
25197
25198         PR tree-optimization/79981
25199         * tree-vrp.c (extract_range_basic): Handle IMAGPART_EXPR of
25200         ATOMIC_COMPARE_EXCHANGE ifn result.
25201         (stmt_interesting_for_vrp, vrp_visit_stmt): Handle
25202         IFN_ATOMIC_COMPARE_EXCHANGE.
25203
25204 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
25205
25206         PR driver/79875
25207         * opts.c (parse_sanitizer_options): Add missing question mark to
25208         "did you mean" message.
25209
25210 2017-03-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25211
25212         * config/rs6000/rs6000-builtin.def (VMULEUB_UNS): Remove orphaned
25213         built-in.
25214         (VMULEUH_UNS): Likewise.
25215         (VMULOUB_UNS): Likewise.
25216         (VMULOUH_UNS): Likewise.
25217         * config/rs6000/rs6000.c (builtin_function_type): Remove
25218         references to ALTIVEC_BUILTIN_VMUL[EO]U[BH]_UNS.
25219
25220 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
25221
25222         PR bootstrap/79952
25223         * read-rtl-function.c (function_reader::read_rtx_operand): Update
25224         x with result of extra_parsing_for_operand_code_0.
25225         (function_reader::extra_parsing_for_operand_code_0): Convert
25226         return type from void to rtx, returning x.  When reading
25227         SYMBOL_REF with SYMBOL_FLAG_HAS_BLOCK_INFO, reallocate x to the
25228         larger size containing struct block_symbol.
25229
25230 2017-03-10  Segher Boessenkool  <segher@kernel.crashing.org>
25231
25232         * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
25233         -mfloat128-hardware without -m64.
25234
25235 2017-03-10  Will Schmidt <will_schmidt@vnet.ibm.com>
25236
25237         PR target/79941
25238         * config/rs6000/rs6000.c (builtin_function_type): Add VMUL*U[HB]
25239         entries to the case statement that marks unsigned arguments to
25240         overloaded functions.
25241
25242 2017-03-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25243
25244         * config/rs6000/rs6000.c (rs6000_option_override_internal): Fix
25245         two typographic errors in the handling of TARGET_UPPER_REGS_DI.
25246
25247 2017-03-10  Pat Haugen  <pthaugen@us.ibm.com>
25248
25249         PR target/79907
25250         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Test
25251         TARGET_UPPER_REGS_DI when setting 'wi' constraint regclass.
25252
25253 2017-03-10  Martin Liska  <mliska@suse.cz>
25254
25255         PR target/65705
25256         PR target/69804
25257         * toplev.c (process_options): Enable MPX with LSAN and UBSAN.
25258         * tree-chkp.c (chkp_walk_pointer_assignments): Verify that
25259         FIELD != NULL.
25260
25261 2017-03-10  Olivier Hainque  <hainque@adacore.com>
25262
25263         * tree-switch-conversion (array_value_type): Start by resetting
25264         candidate type to it's main variant.
25265
25266 2017-03-10  Jakub Jelinek  <jakub@redhat.com>
25267
25268         PR rtl-optimization/79909
25269         * combine.c (try_combine): Use simplify_replace_rtx on individual
25270         CALL_INSN_FUNCTION_USAGE elements instead of replace_rtx on copy_rtx
25271         of the whole CALL_INSN_FUNCTION_USAGE.
25272
25273         PR tree-optimization/79972
25274         * gimple-ssa-warn-alloca.c (alloca_call_type): Only call
25275         get_range_info on SSA_NAMEs.  Formatting fixes.
25276
25277 2017-03-10  Richard Biener  <rguenther@suse.de>
25278             Jakub Jelinek  <jakub@redhat.com>
25279
25280         PR tree-optimization/77975
25281         * tree-ssa-loop-niter.c (get_base_for): Allow phi argument from latch
25282         edge to be constant.
25283         (get_val_for): For constant x return it.  Formatting fix.
25284         (loop_niter_by_eval): Avoid pointless looping if the next iteration
25285         would use the same bases as the current one.
25286
25287 2017-03-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25288
25289         * config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Use rotate
25290         instead of vec_select for V1TImode.
25291         * conifg/rs6000/vsx.md (VSX_LE): Remove mode iterator that is no
25292         longer needed.
25293         (VSX_LE_128): Add V1TI to this mode iterator.
25294         (*vsx_le_perm_load_<mode>): Change to use VSX_D mode iterator.
25295         (*vsx_le_perm_store_<mode>): Likewise.
25296         (pre-reload splitter for VSX stores): Likewise.
25297         (post-reload splitter for VSX stores): Likewise.
25298         (*vsx_xxpermdi2_le_<mode>): Likewise.
25299         (*vsx_lxvd2x2_le_<mode>): Likewise.
25300         (*vsx_stxvd2x2_le_<mode>): Likewise.
25301
25302 2017-03-09  Michael Eager  <eager@eagercon.com>
25303
25304         Correct failures with --enable-checking=yes,rtl.
25305
25306         * config/microblaze/microblaze.c (microblaze_expand_shift):
25307         Replace GET_CODE test with CONST_INT_P and INTVAL test with
25308         test for const0_rtx.
25309         * config/microblaze/microblaze.md (ashlsi3_byone, ashrsi3_byone,
25310         lshrsi3_byone): Replace INTVAL with test for const1_rtx.
25311
25312 2017-03-09  Richard Biener  <rguenther@suse.de>
25313
25314         PR tree-optimization/79977
25315         * graphite-scop-detection.c (scop_detection::merge_sese):
25316         Handle the case of extra exits to blocks dominating the entry.
25317
25318 2017-03-09  Toma Tabacu  <toma.tabacu@imgtec.com>
25319
25320         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
25321         Document rdynamic.
25322
25323 2017-03-09  Vladimir Makarov  <vmakarov@redhat.com>
25324
25325         PR rtl-optimization/79949
25326         * lra-constraints.c (process_alt_operands): Check memory when
25327         trying to predict a cycle.  Print about the overall increase.
25328
25329 2017-03-09  Richard Biener  <rguenther@suse.de>
25330
25331         PR middle-end/79971
25332         * gimple-expr.c (useless_type_conversion_p): Preserve
25333         TYPE_SATURATING for fixed-point types.
25334
25335 2017-03-09  Richard Biener  <rguenther@suse.de>
25336
25337         PR ipa/79970
25338         * ipa-prop.c (ipa_modify_formal_parameters): Avoid changing
25339         alignment of BLKmode params.
25340
25341 2017-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25342
25343         PR target/79913
25344         * config/aarch64/iterators.md (VALL_F16_NO_V2Q): New mode iterator.
25345         (VALL_NO_V2Q): Likewise.
25346         (VDQF_DF): Delete.
25347         * config/aarch64/aarch64-simd.md
25348         (aarch64_dup_lane_<vswap_width_name><mode>): Use VALL_F16_NO_V2Q
25349         iterator.
25350         (*aarch64_simd_vec_copy_lane_<vswap_width_name><mode>): Use
25351         VALL_NO_V2Q mode iterator.
25352         (*aarch64_vgetfmulx<mode>): Use VDQF iterator.
25353
25354 2017-03-09  Martin Liska  <mliska@suse.cz>
25355
25356         PR tree-optimization/79631
25357         * tree-chkp-opt.c (chkp_is_constant_addr): Call
25358         tree_int_cst_sign_bit just for INTEGER constants.
25359
25360 2017-03-09  Martin Liska  <mliska@suse.cz>
25361
25362         PR target/65705
25363         PR target/69804
25364         * toplev.c (process_options): Disable -fcheck-pointer-bounds with
25365         sanitizers.
25366
25367 2017-03-09  Marek Polacek  <polacek@redhat.com>
25368
25369         PR c++/79672
25370         * tree.c (inchash::add_expr): Handle TREE_VEC.
25371
25372 2017-03-09  Martin Liska  <mliska@suse.cz>
25373
25374         PR ipa/79764
25375         (chkp_narrow_size_and_offset): New function.
25376         (chkp_parse_array_and_component_ref): Support BIT_FIELD_REF.
25377         (void chkp_parse_bit_field_ref): New function.
25378         (chkp_make_addressed_object_bounds): Add case for BIT_FIELD_REF.
25379         (chkp_process_stmt): Use chkp_parse_bit_field_ref.
25380
25381 2017-03-09  Martin Liska  <mliska@suse.cz>
25382
25383         PR ipa/79761
25384         * tree-chkp.c (chkp_get_bound_for_parm): Get bounds for a param.
25385         (chkp_find_bounds_1): Remove gcc_unreachable.
25386
25387 2017-03-09  Jakub Jelinek  <jakub@redhat.com>
25388
25389         PR sanitizer/79944
25390         * asan.c (get_mem_refs_of_builtin_call): For BUILT_IN_ATOMIC* and
25391         BUILT_IN_SYNC*, determine the access type from the size suffix and
25392         always build a MEM_REF with that type.  Handle forgotten
25393         BUILT_IN_SYNC_FETCH_AND_NAND_16 and BUILT_IN_SYNC_NAND_AND_FETCH_16.
25394
25395         PR target/79932
25396         * config/i386/avx512vlintrin.h (_mm256_cmpge_epi32_mask,
25397         _mm256_cmpge_epi64_mask, _mm256_cmpge_epu32_mask,
25398         _mm256_cmpge_epu64_mask, _mm256_cmple_epi32_mask,
25399         _mm256_cmple_epi64_mask, _mm256_cmple_epu32_mask,
25400         _mm256_cmple_epu64_mask, _mm256_cmplt_epi32_mask,
25401         _mm256_cmplt_epi64_mask, _mm256_cmplt_epu32_mask,
25402         _mm256_cmplt_epu64_mask, _mm256_cmpneq_epi32_mask,
25403         _mm256_cmpneq_epi64_mask, _mm256_cmpneq_epu32_mask,
25404         _mm256_cmpneq_epu64_mask, _mm256_mask_cmpge_epi32_mask,
25405         _mm256_mask_cmpge_epi64_mask, _mm256_mask_cmpge_epu32_mask,
25406         _mm256_mask_cmpge_epu64_mask, _mm256_mask_cmple_epi32_mask,
25407         _mm256_mask_cmple_epi64_mask, _mm256_mask_cmple_epu32_mask,
25408         _mm256_mask_cmple_epu64_mask, _mm256_mask_cmplt_epi32_mask,
25409         _mm256_mask_cmplt_epi64_mask, _mm256_mask_cmplt_epu32_mask,
25410         _mm256_mask_cmplt_epu64_mask, _mm256_mask_cmpneq_epi32_mask,
25411         _mm256_mask_cmpneq_epi64_mask, _mm256_mask_cmpneq_epu32_mask,
25412         _mm256_mask_cmpneq_epu64_mask, _mm_cmpge_epi32_mask,
25413         _mm_cmpge_epi64_mask, _mm_cmpge_epu32_mask, _mm_cmpge_epu64_mask,
25414         _mm_cmple_epi32_mask, _mm_cmple_epi64_mask, _mm_cmple_epu32_mask,
25415         _mm_cmple_epu64_mask, _mm_cmplt_epi32_mask, _mm_cmplt_epi64_mask,
25416         _mm_cmplt_epu32_mask, _mm_cmplt_epu64_mask, _mm_cmpneq_epi32_mask,
25417         _mm_cmpneq_epi64_mask, _mm_cmpneq_epu32_mask, _mm_cmpneq_epu64_mask,
25418         _mm_mask_cmpge_epi32_mask, _mm_mask_cmpge_epi64_mask,
25419         _mm_mask_cmpge_epu32_mask, _mm_mask_cmpge_epu64_mask,
25420         _mm_mask_cmple_epi32_mask, _mm_mask_cmple_epi64_mask,
25421         _mm_mask_cmple_epu32_mask, _mm_mask_cmple_epu64_mask,
25422         _mm_mask_cmplt_epi32_mask, _mm_mask_cmplt_epi64_mask,
25423         _mm_mask_cmplt_epu32_mask, _mm_mask_cmplt_epu64_mask,
25424         _mm_mask_cmpneq_epi32_mask, _mm_mask_cmpneq_epi64_mask,
25425         _mm_mask_cmpneq_epu32_mask, _mm_mask_cmpneq_epu64_mask): Move
25426         definitions outside of __OPTIMIZE__ guarded section.
25427
25428         PR target/79932
25429         * config/i386/avx512bwintrin.h (_mm512_packs_epi32,
25430         _mm512_maskz_packs_epi32, _mm512_mask_packs_epi32,
25431         _mm512_packus_epi32, _mm512_maskz_packus_epi32,
25432         _mm512_mask_packus_epi32): Move definitions outside of __OPTIMIZE__
25433         guarded section.
25434
25435 2017-03-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25436
25437         * config/s390/vx-builtins.md ("vfee<mode>", "vfeez<mode>")
25438         ("vfenez<mode>"): Add missing constraints.
25439
25440 2017-03-08  Martin Sebor  <msebor@redhat.com>
25441
25442         PR target/79928
25443         * config/nds32/nds32.c (nds32_option_override):
25444         Fix misspelled diagnostic.
25445
25446 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
25447
25448         PR c/79940
25449         * gimplify.c (gimplify_omp_for): Replace index var in outer
25450         taskloop statement with an artificial variable and add
25451         OMP_CLAUSE_PRIVATE clause for it.
25452
25453 2017-03-08  Richard Biener  <rguenther@suse.de>
25454
25455         PR tree-optimization/79955
25456         * tree-ssa-uninit.c (warn_uninitialized_vars): Do not warn
25457         for accesses that are completely outside of the variable.
25458
25459 2017-03-08  Andrew Haley  <aph@redhat.com>
25460
25461         PR tree-optimization/79943
25462         * tree-ssa-loop-split.c (compute_new_first_bound): When
25463         calculating the new upper bound, (END-BEG) should be added, not
25464         subtracted.
25465
25466 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
25467
25468         * config/avr/avr.md (setmemhi): Make sure match_dup
25469         operand number comes before match_scratch.
25470
25471 2017-03-08  Richard Biener  <rguenther@suse.de>
25472
25473         PR tree-optimization/79920
25474         * tree-vect-slp.c (vect_create_mask_and_perm): Remove and inline
25475         with ncopies == 1 to ...
25476         (vect_transform_slp_perm_load): ... here.  Properly compute
25477         all element loads by iterating VF times over the group.  Do
25478         not handle ncopies (computed in a broken way) in
25479         vect_create_mask_and_perm.
25480
25481 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
25482
25483         PR sanitizer/79904
25484         * internal-fn.c (expand_vector_ubsan_overflow): If arg0 or arg1
25485         is a uniform vector, use uniform_vector_p return value instead of
25486         building ARRAY_REF on folded VIEW_CONVERT_EXPR to array type.
25487
25488 2017-03-07  Marek Polacek  <polacek@redhat.com>
25489
25490         PR middle-end/79809
25491         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Use HOST_WIDE_INT.
25492         (alloca_call_type): Likewise.
25493
25494 2017-03-07  Martin Liska  <mliska@suse.cz>
25495
25496         * gcov.c (process_args): Put comment to correct location.
25497
25498 2017-03-07  Martin Liska  <mliska@suse.cz>
25499
25500         PR middle-end/68270
25501         * tree-chkp.c (chkp_may_narrow_to_field): Add new argument ref.
25502         Use array_at_struct_end_p instead of DECL_CHAIN (field).
25503         (chkp_narrow_bounds_for_field): Likewise.
25504         (chkp_parse_array_and_component_ref): Pass one more argument to
25505         call.
25506
25507 2017-03-07  Richard Biener  <rguenther@suse.de>
25508
25509         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve
25510         preheaders.
25511
25512 2017-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
25513
25514         * config/i386/i386.c (ix86_local_alignment): Align most aggregates
25515         of 16 bytes and more to 16 bytes, not those of 16 bits and more.
25516
25517 2017-03-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25518
25519         PR c/79855
25520         * params.def (PARAM_STORE_MERGING_ALLOW_UNALIGNED): Add full stop
25521         to end of description.
25522         (PARAM_MAX_STORES_TO_MERGE): Likewise.
25523
25524 2017-03-07  Jakub Jelinek  <jakub@redhat.com>
25525
25526         PR rtl-optimization/79901
25527         * config/i386/sse.md (*avx512bw_<code><mode>3<mask_name>): Renamed to
25528         ...
25529         (*avx512f_<code><mode>3<mask_name>): ... this.
25530         (<code><mode>3 with maxmin code iterator): Use VI8_AVX2_AVX512F
25531         iterator instead of VI8_AVX2_AVX512BW.
25532
25533         PR rtl-optimization/79901
25534         * expr.c (expand_expr_real_2): For vector MIN/MAX, if there is no
25535         min/max expander, expand it using expand_vec_cond_expr.
25536
25537         PR sanitizer/79897
25538         * ubsan.c (ubsan_encode_value): Call mark_addressable on the
25539         temporary.
25540
25541 2017-03-06  Jakub Jelinek  <jakub@redhat.com>
25542
25543         PR c++/79821
25544         * dwarf2out.h (dw_vec_const): Change array type from unsigned char *
25545         to void * for PCH reasons.
25546         * dwarf2out.c (output_loc_operands, output_die): Cast
25547         v.val_vec.array to unsigned char *.
25548
25549 2017-03-06  John David Anglin  <danglin@gcc.gnu.org>
25550
25551         PR target/77850
25552         * config/pa/pa-64.h (PAD_VARARGS_DOWN): Don't pad down complex and
25553         vector types.
25554
25555 2017-03-06  Vladimir Makarov  <vmakarov@redhat.com>
25556
25557         PR rtl-optimization/79571
25558         * lra-constraints.c (process_alt_operands): Calculate static
25559         reject and subtract it from overall when only addresses will be
25560         reloaded.
25561
25562 2017-03-06  Julia Koval  <julia.koval@intel.com>
25563
25564         PR target/79793
25565         * config/i386/i386.c (ix86_minimum_incoming_stack_boundary): Set
25566         incoming stack boundary to 128 for 64-bit targets.
25567
25568 2017-03-06  Richard Biener  <rguenther@suse.de>
25569
25570         PR tree-optimization/79894
25571         * tree-vectorizer.c (vectorize_loops): Set loop_vectorized_call
25572         to NULL after folding it.
25573
25574 2017-03-06  Richard Biener  <rguenther@suse.de>
25575
25576         PR tree-optimization/79824
25577         * tree-vect-stmts.c (get_group_load_store_type): Fix alignment
25578         check disabling peeling for gaps.
25579
25580 2017-03-06  Toma Tabacu  <toma.tabacu@imgtec.com>
25581
25582         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
25583         attributes): Document gettimeofday.
25584
25585 2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>
25586
25587         * config/s390/s390.c (s390_option_override_internal): Set
25588         PARAM_MIN_VECT_LOOP_BOUND
25589
25590 2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>
25591
25592         * config/s390/s390.c (s390_asm_output_function_label): Use nopr %r0.
25593         * config/s390/s390.md: Likewise.
25594
25595 2017-03-06  Jakub Jelinek  <jakub@redhat.com>
25596
25597         PR target/79812
25598         * config/i386/sse.md (VI8F_256_512): Remove mode iterator.
25599         (<avx2_avx512>_perm<mode>): Rename to ...
25600         (avx2_perm<mode>): ... this.  Use VI8F_256 iterator instead
25601         of VI8F_256_512.
25602         (<avx512>_perm<mode>_mask): Rename to ...
25603         (avx512vl_perm<mode>_mask): ... this.  Use VI8F_256 iterator instead
25604         of VI8F_256_512.
25605         (<avx2_avx512>_perm<mode>_1<mask_name>): Rename to ...
25606         (avx2_perm<mode>_1<mask_name): ... this.  Use VI8F_256 iterator
25607         instead of VI8F_256_512.
25608         (avx512f_perm<mode>): New define_expand.
25609         (avx512f_perm<mode>_mask): Likewise.
25610         (avx512f_perm<mode>_1<mask_name>): New define_insn.
25611         (<avx512>_vec_dup<mode>_1): Fix up vec_select mode.
25612
25613 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
25614
25615         * config/mips/mips-msa.md (msa_fmax_a_<msafmt>, msa_fmin_a_<msafmt>,
25616         msa_max_a_<msafmt>, msa_min_a_<msafmt>): Introduce mode interator for
25617         if_then_else.
25618         (smin<mode>3, smax<mode>3): Change operand print code from 'B' to 'E'.
25619
25620 2017-03-06  Martin Liska  <mliska@suse.cz>
25621
25622         PR sanitize/79783
25623         * asan.c (asan_expand_poison_ifn): Do not expand ASAN_POISON
25624         when having a SSA NAME w/o VAR_DECL assigned to it.
25625
25626 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
25627
25628         * config/mips/mips-msa.md (msa_dotp_<su>_d, msa_dpadd_<su>_d,
25629         msa_dpsub_<su>_d): Fix MODE for vec_select.
25630
25631 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
25632
25633         * config/mips/mips.c (mips_gen_const_int_vector): Change type of last
25634         argument.
25635         * config/mips/mips-protos.h (mips_gen_const_int_vector): Likewise.
25636
25637 2017-03-06  Richard Biener  <rguenther@suse.de>
25638
25639         * lto-streamer.c (lto_check_version): Use %qs in diagnostics.
25640         * plugin.c (register_plugin_info): Likewise.
25641         * tree-chkp.c (chkp_make_static_const_bounds): Likewise.
25642
25643 2017-03-05  Jakub Jelinek  <jakub@redhat.com>
25644
25645         * config/i386/sse.md (sse_storehps, sse_storelps,
25646         avx_<castmode><avxsizesuffix>_<castmode>,
25647         avx512f_<castmode><avxsizesuffix>_<castmode>,
25648         avx512f_<castmode><avxsizesuffix>_256<castmode>): Require
25649         in condition that at least one operand is not a MEM.
25650
25651 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
25652
25653         PR middle-end/79805
25654         * internal-fn.def (ATOMIC_BIT_TEST_AND_SET, ATOMIC_BIT_TEST_AND_RESET,
25655         ATOMIC_BIT_TEST_AND_COMPLEMENT, ATOMIC_COMPARE_EXCHANGE): Remove
25656         ECF_NOTHROW.
25657         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Set
25658         gimple_call_nothrow_p flag based on whether original builtin can throw.
25659         If it can, emit following stmts on the fallthrough edge.
25660         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Similarly, except
25661         don't create new bb if inserting just debug stmts on the edge, try to
25662         insert them on the fallthru bb or just reset debug stmts.
25663
25664 2017-03-03  Segher Boesssenkool  <segher@kernel.crashing.org>
25665
25666         PR target/43763
25667         * config/rs6000/rs6000.c (rs6000_final_prescan_insn): Save and
25668         restore recog_data (including the operand rtxes inside it) around
25669         the call to get_insn_template.
25670
25671 2017-03-03  Martin Sebor  <msebor@redhat.com>
25672
25673         PR tree-optimization/79699
25674         * context.c (context::~context): Free MPFR caches to avoid
25675         a memory leak on program exit.
25676
25677 2017-03-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25678
25679         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
25680         Use wide_int::ulow () instead of .elt (0).
25681
25682 2017-03-03  Uros Bizjak  <ubizjak@gmail.com>
25683
25684         * config/i386/i386.md (*pushtf): Change *roF constraint to *roC.
25685         (*pushxf): Limit oF constraint to 32bit targets and add oC
25686         constraint for 64bit targets.
25687         (pushxf splitter): Use PUSH_ROUNDING to calculate stack adjustment.
25688         (*pushdf): Change rmF constraint to rmC.
25689
25690 2017-03-03  Martin Liska  <mliska@suse.cz>
25691
25692         * tree-ssa-loop-prefetch.c (pass_loop_prefetch::execute):
25693         Remove unused variable.
25694
25695 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
25696
25697         PR target/79807
25698         * config/i386/i386.c (ix86_expand_multi_arg_builtin): If target
25699         is a memory operand, increase num_memory.
25700         (ix86_expand_args_builtin): Likewise.
25701
25702 2017-03-03  Jan Hubicka  <jh@suse.cz>
25703
25704         PR lto/79760
25705         * ipa-devirt.c (maybe_record_node): Properly handle
25706         __cxa_pure_virtual visibility.
25707
25708 2017-03-03  Martin Liska  <mliska@suse.cz>
25709
25710         PR tree-optimization/79803
25711         * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Remove
25712         assert.
25713         (pass_loop_prefetch::execute): Disabled optimization if an
25714         assumption about L1 cache size is not met.
25715
25716 2017-03-03  Martin Liska  <mliska@suse.cz>
25717
25718         PR rtl-optimization/79574
25719         * gcse.c (struct gcse_expr): Use HOST_WIDE_INT instead of int.
25720         (hash_scan_set): Likewise.
25721         (dump_hash_table): Likewise.
25722         (hoist_code): Likewise.
25723
25724 2017-03-03  Richard Biener  <rguenther@suse.de>
25725
25726         * fixed-value.c (fixed_from_string): Restore use of elt (1)
25727         in place of uhigh ().
25728         (fixed_convert_from_real): Likewise.
25729
25730 2017-03-03  Uros Bizjak  <ubizjak@gmail.com>
25731
25732         PR target/79514
25733         * config/i386/i386.md (*pushxf_rounded): Use Pmode instead of DImode.
25734
25735 2017-03-03  Richard Biener  <rguenther@suse.de>
25736
25737         PR middle-end/79818
25738         * match.pd ( X +- C1 CMP C2 -> X CMP C2 -+ C1): Add missing
25739         TYPE_OVERFLOW_UNDEFINED check.
25740
25741 2017-03-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25742
25743         * config/rs6000/vector.md (vector_ne_<mode>_p): Correct operand
25744         numbers.
25745         (vector_ae_<mode>_p): Likewise.
25746         (vector_nez_<mode>_p): Likewise.
25747         (vector_ne_v2di_p): Likewise.
25748         (vector_ae_v2di_p): Likewise.
25749         (vector_ne_<mode>_p): Likewise.
25750         * config/rs6000/vsx.md (vsx_tsqrt<mode>2_fg): Correct operand
25751         numbers.
25752         (vsx_tsqrt<mode>2_fe): Likewise.
25753
25754 2017-03-02  Uros Bizjak  <ubizjak@gmail.com>
25755
25756         PR target/79514
25757         * config/i386/i386.md (*pushxf_rounded): New insn_and_split pattern.
25758
25759 2017-03-02  Jakub Jelinek  <jakub@redhat.com>
25760
25761         PR rtl-optimization/79780
25762         * cprop.c (one_cprop_pass): When second and further conditional trap
25763         in a single basic block is turned into an unconditional trap, turn it
25764         into a deleted note to avoid RTL verification failures.
25765
25766 2017-03-02  Richard Biener  <rguenther@suse.de>
25767
25768         * fold-const.c (const_binop): Use ulow () instead of elt (0).
25769
25770 2017-03-02  Richard Biener  <rguenther@suse.de>
25771
25772         PR tree-optimization/79345
25773         PR c++/42000
25774         * tree-ssa-alias.c (walk_aliased_vdefs_1): Take a limit
25775         param and abort the walk, returning -1 if it is hit.
25776         (walk_aliased_vdefs): Take a limit param and pass it on.
25777         * tree-ssa-alias.h (walk_aliased_vdefs): Add a limit param,
25778         defaulting to 0 and return a signed int.
25779         * tree-ssa-uninit.c (struct check_defs_data): New struct.
25780         (check_defs): New helper.
25781         (warn_uninitialized_vars): Use walk_aliased_vdefs to warn
25782         about uninitialized memory.
25783         * fixed-value.c (fixed_from_string): Use ulow/uhigh to avoid
25784         bogus uninitialized warning.
25785         (fixed_convert_from_real): Likewise.
25786
25787 2017-03-02  Bin Cheng  <bin.cheng@arm.com>
25788
25789         PR tree-optimization/66768
25790         * tree-ssa-loop-ivopts.c (find_interesting_uses_address): Skip addr
25791         iv_use if base object can't be determined.
25792
25793 2017-03-02  Jakub Jelinek  <jakub@redhat.com>
25794
25795         PR tree-optimization/79345
25796         * gensupport.h (struct pattern_stats): Add min_scratch_opno field.
25797         * gensupport.c (get_pattern_stats_1) <case MATCH_SCRATCH>: Update it.
25798         (get_pattern_stats): Initialize it.
25799         * genemit.c (gen_expand): Verify match_scratch numbers come after
25800         match_operand/match_dup numbers.
25801         * config/i386/i386.md (<s>mul<mode>3_highpart): Swap match_dup and
25802         match_scratch numbers.
25803         * config/i386/sse.md (avx2_gathersi<mode>, avx2_gatherdi<mode>):
25804         Likewise.
25805         * config/s390/s390.md (trunctdsd2): Likewise.
25806
25807 2017-03-02  Richard Biener  <rguenther@suse.de>
25808
25809         * wide-int.h (wide_int_storage::operator=): Implement in terms
25810         of wi::copy.
25811
25812 2017-03-02  Richard Biener  <rguenther@suse.de>
25813
25814         PR tree-optimization/79777
25815         * tree-ssa-pre.c (eliminate_insert): Give up if we simplify
25816         the to insert expression to sth existing.
25817
25818 2017-03-01  Martin Sebor  <msebor@redhat.com>
25819
25820         PR middle-end/79692
25821         * gimple-ssa-sprintf.c
25822         (directive::known_width_and_precision): New function.
25823         (format_integer): Use it.
25824         (get_mpfr_format_length): Consider the full range of precision
25825         when computing %g output with the # flag.  Set the likely byte
25826         count to 3 rather than 1 when precision is indeterminate.
25827         (format_floating): Correct the lower bound of precision.
25828
25829 2017-03-01  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25830
25831         * doc/invoke.texi: Document default code model for 64-bit Linux.
25832
25833 2017-03-01  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25834
25835         PR target/79752
25836         * config/rs6000/rs6000.md (peephole2 for udiv/umod): Should emit
25837         udiv rather than div since input pattern is unsigned.
25838
25839 2017-03-01  Uros Bizjak  <ubizjak@gmail.com>
25840
25841         * config/i386/i386.c (print_reg): Warn for values of
25842         unsupported size in integer register.
25843
25844 2017-03-01  Michael Meissner  <meissner@linux.vnet.ibm.com>
25845
25846         PR target/79439
25847         * config/rs6000/predicates.md (current_file_function_operand): Do
25848         not allow self calls to be local if the function is replaceable.
25849
25850 2017-03-01  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25851
25852         PR target/79395
25853         * config/rs6000/altivec.h (vec_ctz and others): Change the
25854         preprocessor macro that controls conditional compilation from
25855         _ARCH_PWR9 to __POWER9_VECTOR__.
25856         (vec_all_ne): Change parameterization of __altivec_scalar_pred
25857         macro expansion under preprocessor #ifdef __POWER9_VECTOR__
25858         control (instead of _ARCH_PWR9 control) so that template
25859         definition uses power9-specific function.
25860         (vec_any_eq): Likewise.
25861         (vec_all_ne): Change macro definition to use a power9-specific
25862         expansion under #ifdef __POWER9_VECTOR__ control (instead of
25863         _ARCH_PWR9 control).
25864         (vec_any_eq) Likewise.
25865         * config/rs6000/rs6000-builtin.def (CMPNEF): Remove BU_P9V_AV_2
25866         expansion for CMPNEF to remove support for xvcmpnesp instruction.
25867         (CMPNED): Remove BU_P9V_AV2 expansion for CMPNED to remove
25868         support for xvcmpnedp instruction.
25869         (VCMPNEB_P): Replace BU_P9V_AV_P macro expansion with BU_P9V_AV_2
25870         macro expansion so that Power9 implementation of vec_all_ne does
25871         not use the AltiVec predicate framework.
25872         (VCMPNEH_P): Likewise.
25873         (VCMPNEW_P): Likewise.
25874         (VCMPNED_P): Likewise.
25875         (VCMPNEFP_P): Likewise.
25876         (VCMPNEDP_P): Likewise.
25877         (VCMPAEB_P): Add BU_P9V_AV_2 macro expansion to change
25878         implementation of vec_any_eq to not use AltiVec predicate
25879         framework.
25880         (VCMPAEH_P): Likewise.
25881         (VCMPAEW_P): Likewise.
25882         (VCMPAED_P): Likewise.
25883         (VCMPAEFP_P): Likewise.
25884         (VCMPAEDP_P): Likewise.
25885         (VCMPNE_P): Replace BU_P9V_OVERLOAD_P macro expansion with
25886         BU_P9V_OVERLOAD_2 so that Power9 implementation of vec_all_ne does
25887         not use the AltiVec predicate framework.
25888         (VCMPAE_P): Add BU_P9V_OVERLOAD_2 macro to change implementation
25889         of vec_any_eq to not use AltiVec predicate framework.
25890         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Add
25891         support for predefined __POWER9_VECTOR__ macro to indicate that
25892         Power9 instruction selection is enabled.
25893         (altivec_overloaded_builtins): Remove extraneous
25894         ALTIVEC_BUILTIN_VEC_CMPNE entry for overloaded
25895         function argument types RS6000_BTI_bool_V16QI and
25896         RS6000_BTI_bool_V16QI.  Remove erroneous ALTIVEC_BUILTIN_VEC_CMPNE
25897         entry for overloaded function argument types RS6000_BTI_bool_V4SI
25898         andRS6000_BTI_bool_V4SI, mapping to P9V_BUILTIN_CMPNEB.  Remove
25899         two entries mapping to P9V_BUITIN_CMPNED and one entry mapping to
25900         P9V_BUILTIN_CMPNEF to force use of instructions not specific to
25901         Power9 for implementations of vec_cmpne.  Change the signature for
25902         all definitions of the overloaded P9V_BUILTIN_VEC_CMPNE_P function
25903         (representing vec_all_ne) to remove the previously described first
25904         argument of type RS6000_BTI_INTSI, as this was an artifact of
25905         reliance on the AltiVec predicate framework, which is no longer
25906         used in the implementation of these functions.  Add
25907         P9V_BUILTIN_VEC_VCMPAE_P entries (representing the vec_anyeq
25908         function) to match all of the P9V_BUILTIN_VEC_VCMNE_P entries
25909         since, unlike the AltiVec predicate framework implementation, we
25910         do not share function descriptors between vec_alle and vec_anyeq.
25911         (altivec_resolve_overloaded_builtin): Add SFmode and DFmode to the
25912         set of modes that receive special treatment even when
25913         TARGET_P9_VECTOR is true.  The special treatment emits code that
25914         does not depend on Power9 instructions.
25915         * config/rs6000/vector.md (vector_ne_<mode>_p): Change this
25916         define_expand to not rely on AltiVec predicate framework.
25917         (vector_ae_<mode>p): New define_expand to represent vec_any_eq
25918         function.
25919         (vector_ne_v2di_p): Change this define_expand to not rely on
25920         AltiVec predicate framework.
25921         (vector_ae_v2di_p): New define_expand to represent vec_any_eq
25922         function.
25923         (vector_ne_<mode>_p): Change this define_expand to not rely on
25924         AltiVec predicate framework.
25925         (vector_ae_<mode>p): New define_expand to represent vec_any_eq
25926         function.
25927         * config/rs6000/vsx.md (*vsx_ne_<mode>_p): For modes VSX_EXTRACT_I
25928         (V16QI, V8HI, V4SI), correct a typo in the code emitted for this
25929         define_insn pattern.
25930         (*vsx_ne_<mode>_p): For modes VSX_F (V4SF and V2DF), remove this
25931         define_insn pattern because the xvcmpne<VSs>. instruction is not
25932         supported.
25933         (vcmpne<VSs>): Remove this define_insn because xvcmpne<VSs>
25934         instruction is not supported.
25935
25936 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
25937
25938         * config/nvptx/nvptx.c: Include intl.h.
25939
25940 2017-03-01  Martin Jambor  <mjambor@suse.cz>
25941
25942         PR lto/78140
25943         * ipa-prop.h (ipa_bits): Removed field known.
25944         (ipa_jump_func): Removed field vr_known.  Changed fields bits and m_vr
25945         to pointers.  Adjusted their comments to warn about their sharing.
25946         (ipcp_transformation_summary): Change bits to a vector of pointers.
25947         (ipa_check_create_edge_args): Moved to ipa-prop.c, declare.
25948         (ipa_get_ipa_bits_for_value): Declare.
25949         * tree-vrp.h (value_range): Mark as GTY((for_user)).
25950         * ipa-prop.c (ipa_bit_ggc_hash_traits): New.
25951         (ipa_bits_hash_table): Likewise.
25952         (ipa_vr_ggc_hash_traits): Likewise.
25953         (ipa_vr_hash_table): Likewise.
25954         (ipa_print_node_jump_functions_for_edge): Adjust for bits and m_vr
25955         being pointers and vr_known being removed.
25956         (ipa_set_jf_unknown): Likewise.
25957         (ipa_get_ipa_bits_for_value): New function.
25958         (ipa_set_jfunc_bits): Likewise.
25959         (ipa_get_value_range): New overloaded functions.
25960         (ipa_set_jfunc_vr): Likewise.
25961         (ipa_compute_jump_functions_for_edge): Use the above functions to
25962         construct bits and vr parts of jump functions.
25963         (ipa_check_create_edge_args): Move here from ipa-prop.h, also allocate
25964         ipa_bits_hash_table and ipa_vr_hash_table if they do not already
25965         exist.
25966         (ipcp_grow_transformations_if_necessary): Also allocate
25967         ipa_bits_hash_table and ipa_vr_hash_table if they do not already
25968         exist.
25969         (ipa_node_params_t::duplicate): Do not copy bits, just pointers to
25970         them.  Fix too long lines.
25971         (ipa_write_jump_function): Adjust for bits and m_vr being pointers and
25972         vr_known being removed.
25973         (ipa_read_jump_function): Use new setter functions to construct bits
25974         and vr parts of jump functions or set them to NULL.
25975         (write_ipcp_transformation_info): Adjust for bits being pointers.
25976         (read_ipcp_transformation_info): Likewise.
25977         (ipcp_update_bits): Likewise.  Fix excessively long lines a trailing
25978         space.
25979         Include gt-ipa-prop.h.
25980         * ipa-cp.c (propagate_bits_across_jump_function): Adjust for bits
25981         being pointers.
25982         (ipcp_store_bits_results): Likewise.
25983         (propagate_vr_across_jump_function): Adjust for m_vr being a pointer.
25984         Do not write to existing jump functions but use a temporary instead.
25985
25986 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
25987
25988         PR c++/79681
25989         * fold-const.c (make_bit_field_ref): If orig_inner is COMPONENT_REF,
25990         attempt to use its first operand as BIT_FIELD_REF base.
25991
25992 2017-03-01  Richard Biener  <rguenther@suse.de>
25993
25994         PR middle-end/79721
25995         * tree-chrec.c (chrec_evaluate): Perform computation of Newtons
25996         interpolating formula in wrapping arithmetic.
25997         (chrec_apply): Convert chrec_evaluate return value to wanted type.
25998
25999 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
26000
26001         PR tree-optimization/79734
26002         * tree-vect-generic.c (expand_vector_condition): Optimize
26003         AVX512 vector boolean VEC_COND_EXPRs into bitwise operations.
26004         Handle VEC_COND_EXPR where comparison has different inner width from
26005         type's inner width.
26006
26007 2017-02-28  Sandra Loosemore  <sandra@codesourcery.com>
26008
26009         * doc/invoke.texi (ARC Options): Copy-edit to fix punctuation,
26010         markup, and similar issues.  Remove @opindex entries for things
26011         that aren't options.  Add missing -mmpy-option entries.
26012
26013 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
26014
26015         PR tree-optimization/79737
26016         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): If bitlen is
26017         a multiple of BITS_PER_UNIT and !BYTES_BIG_ENDIAN, clear
26018         tmpbuf[byte_size - 1].  Call natice_encode_expr with byte_size - 1
26019         instead of byte_size.  Formatting fix.
26020         (shift_bytes_in_array_right): Formatting fix.
26021
26022 2017-02-28  Eric Botcazou  <ebotcazou@adacore.com>
26023
26024         PR target/79749
26025         * config/sparc/sparc.c (sparc_frame_pointer_required): Add missing
26026         condition on optimize for the leaf function test.
26027
26028 2017-02-28  Martin Liska  <mliska@suse.cz>
26029
26030         PR lto/79625
26031         * read-rtl-function.c (function_reader::handle_unknown_directive):
26032         Bail out when one uses -flto.
26033
26034 2017-02-28  Martin Liska  <mliska@suse.cz>
26035
26036         * common.opt: Replace space with tabular for options of <number>
26037         type.
26038         * config/i386/i386.opt: Show <number> value for
26039         -mlarge-data-threshold.
26040         * opts.c (print_filtered_help): Do not display number in hexadecimal
26041         format.
26042
26043 2017-02-28  Martin Liska  <mliska@suse.cz>
26044
26045         * common.opt: Fix --help=option -Q for options which are of
26046         an enum type.
26047
26048 2017-02-28  Uros Bizjak  <ubizjak@gmail.com>
26049
26050         * config/i386/i386.c (print_reg): Error out for values
26051         of 8-bit size in invalid integer register.
26052
26053 2017-02-28  Martin Sebor  <msebor@redhat.com>
26054
26055         PR tree-optimization/79691
26056         * passes.def (pass_all_optimizations_g): Enable pass_sprintf_length.
26057
26058 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
26059
26060         PR target/79729
26061         * config/i386/i386.c (ix86_print_operand) <case 'R'>: Replace
26062         gcc_unreachable with output_operand_lossage.
26063
26064 2017-02-28  Richard Biener  <rguenther@suse.de>
26065
26066         PR tree-optimization/79740
26067         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Allow redundant
26068         inserts.
26069         (visit_nary_op): Insert the nary into the hashtable if we
26070         pattern-matched sth.
26071         * tree-ssa-pre.c (eliminate_insert): Robustify.
26072
26073 2017-02-28  Richard Biener  <rguenther@suse.de>
26074
26075         PR middle-end/79731
26076         * fold-const.c (decode_field_reference): Reject out-of-bound
26077         accesses.
26078
26079 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
26080
26081         * config/i386/i386.c: Include intl.h.
26082         (ix86_option_override_internal): Use cond ? G_("...") : G_("...")
26083         instead of just cond ? "..." : "...".
26084         * config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Likewise.
26085         * coverage.c (read_counts_file): Likewise.
26086         * omp-offload.c: Include intl.h.
26087         (oacc_loop_fixed_partitions): Use cond ? G_("...") : G_("...") instead
26088         of just cond ? "..." : "...".
26089         * gcov.c (read_count_file): Use cond ? N_("...") : N_("...") instead
26090         of just cond ? "..." : "...".
26091
26092 2017-02-28  Richard Earnshaw  <rearnsha@arm.com>
26093
26094         PR target/79742
26095         * config/arm/parsecpu.awk (gen_data): Set tuning target to 'tune for'
26096         entry, if present.
26097         * config/arm/arm-cpus.in (cortex-m0plus.small-multiply): Correct
26098         'tune for' CPU name.
26099         * config/arm/arm-cpu-data.h: Regenerated.
26100
26101 2017-02-28  Richard Biener  <rguenther@suse.de>
26102
26103         PR tree-optimization/79732
26104         * tree-inline.c (expand_call_inline): Do not shadow var.
26105
26106 2017-02-28  Richard Biener  <rguenther@suse.de>
26107
26108         PR tree-optimization/79723
26109         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Preserve
26110         address-space properly.
26111
26112 2017-02-28  Thomas Schwinge  <thomas@codesourcery.com>
26113
26114         * doc/optinfo.texi (Optimization groups): Fix option used for
26115         OPTGROUP_ALL.
26116         * doc/invoke.texi (-fopt-info): Document "omp".
26117         * dumpfile.h: Sort OPTGROUP_OMP before OPTGROUP_VEC.
26118         (OPTGROUP_ALL): Add OPTGROUP_OMP.
26119         * hsa-gen.c (pass_data_gen_hsail): Use OPTGROUP_OMP.
26120         * ipa-hsa.c (pass_data_ipa_hsa): Likewise.
26121         * omp-simd-clone.c (pass_data_omp_simd_clone): Likewise.
26122
26123         * dumpfile.h (OPTGROUP_OPENMP): Rename to OPTGROUP_OMP.  Adjust
26124         all users.
26125         * dumpfile.c (optgroup_options): Instead of "openmp", associate
26126         OPTGROUP_OMP with "omp".
26127
26128 2017-02-27  Pat Haugen  <pthaugen@us.ibm.com>
26129
26130         PR target/79544
26131         * config/rs6000/rs6000-c.c (struct altivec_builtin_types): Use VSRAD
26132         for arithmetic shift of unsigned V2DI.
26133
26134 2017-02-27  Claudiu Zissulescu  <claziss@synopsys.com>
26135
26136         * config.gcc (arc*-): Clean up, use arc/big.h, arc/elf.h, and
26137         arc/linux.h headers.
26138         * config/arc/arc.h (TARGET_OS_CPP_BUILTINS): Remove.
26139         (LINK_SPEC): Likewise.
26140         (ARC_TLS_EXTRA_START_SPEC): Likewise.
26141         (EXTRA_SPECS): Likewise.
26142         (STARTFILE_SPEC): Likewise.
26143         (ENDFILE_SPEC): Likewise.
26144         (LIB_SPEC): Likewise.
26145         (TARGET_SDATA_DEFAULT): Likewise.
26146         (TARGET_MMEDIUM_CALLS_DEFAULT): Likewise.
26147         (MULTILIB_DEFAULTS): Likewise.
26148         (DWARF2_UNWIND_INFO): Likewise.
26149         * config/arc/big.h: New file.
26150         * config/arc/elf.h: Likewise.
26151         * config/arc/linux.h: Likewise.
26152         * config/arc/t-uClibc: Remove.
26153
26154 2017-02-27  Bin Cheng  <bin.cheng@arm.com>
26155
26156         PR tree-optimization/77536
26157         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): New function.
26158         (tree_transform_and_unroll_loop): Use above function to compute the
26159         estimated niter of unrolled loop and use it when scaling profile.
26160         Also use count info rather than frequency if it's non-zero.
26161         * tree-ssa-loop-manip.h niter_for_unrolled_loop(): New declaration.
26162         * tree-vect-loop.c (scale_profile_for_vect_loop): New function.
26163         (vect_transform_loop): Call above function.
26164
26165 2017-02-27  Richard Biener  <rguenther@suse.de>
26166
26167         PR tree-optimization/45397
26168         * tree-ssa-pre.c (eliminate_insert): Handle BIT_AND_EXPR.
26169         * tree-ssa-sccvn.c (valueized_wider_op): New helper.
26170         (visit_nary_op): Add pattern matching for CSEing sign-changed
26171         or truncated operations with wider ones.
26172
26173 2017-02-27  Richard Biener  <rguenther@suse.de>
26174
26175         PR tree-optimization/79690
26176         * tree-vect-stmts.c (vectorizable_store): Use vector type
26177         built from the DR with address-space.
26178
26179 2017-02-26  Gerald Pfeifer  <gerald@pfeifer.com>
26180
26181         * doc/invoke.texi (Optimize Options): Refine the description
26182         of asan-use-after-return.
26183
26184 2017-02-25  Alan Modra  <amodra@gmail.com>
26185
26186         PR rtl-optimization/79584
26187         * lra-constraints.c (base_to_reg): Reload ad->base, the entire
26188         base, not ad->base_term, the reg within base.  Remove assertion
26189         that ad->base == ad->base_term.  Replace gen_int_mode using
26190         bogus mode with const0_rtx.
26191
26192 2017-02-25  Jakub Jelinek  <jakub@redhat.com>
26193
26194         PR middle-end/79396
26195         * tree-eh.c (operation_could_trap_p, stmt_could_throw_1_p): Handle
26196         FMA_EXPR like tcc_binary or tcc_unary.
26197
26198         * tree-ssa-loop-niter.c (number_of_iterations_exit): Simplify warning.
26199
26200         PR debug/77589
26201         * dwarf2out.c (struct dw_loc_list_struct): Add noted_variable_value
26202         bitfield.
26203         (size_of_loc_descr): Handle DW_OP_GNU_variable_value.
26204         (output_loc_operands): Handle DW_OP_call_ref and
26205         DW_OP_GNU_variable_value.
26206         (struct variable_value_struct): New type.
26207         (struct variable_value_hasher): Likewise.
26208         (variable_value_hash): New variable.
26209         (string_types): Remove.
26210         (copy_loc_descr): New function.
26211         (add_loc_descr_to_each): Clarify comment.  Use copy_loc_descr.
26212         (prepend_loc_descr_to_each): New function.
26213         (add_loc_list): Fix comment typo.  Use prepend_loc_descr_to_each
26214         instead of add_loc_descr_to_each if the first argument is single
26215         location list and the second has multiple.
26216         (resolve_args_picking_1): Handle DW_OP_GNU_variable_value.
26217         (loc_list_from_tree_1): For early_dwarf, emit DW_OP_GNU_variable_value
26218         when looking for variable value which doesn't have other location info.
26219         (loc_list_from_tree): Formatting fix.
26220         (gen_array_type_die): Simplify DW_AT_string_length handling.
26221         (adjust_string_types): Remove.
26222         (gen_subprogram_die): Don't call adjust_string_types nor test/set
26223         string_types.  Call resolve_variable_values.
26224         (prune_unused_types_walk_loc_descr): Handle DW_OP_GNU_variable_value.
26225         (resolve_addr_in_expr): Likewise.  Add A argument.
26226         (copy_deref_exprloc): Remove deref argument.  Adjust for the
26227         original expression being DW_OP_GNU_variable_value with optionally
26228         DW_OP_stack_value after it instead of DW_OP_call4 with DW_OP_deref
26229         optionally after it.
26230         (optimize_string_length): Rework for DW_OP_GNU_variable_value.
26231         (resolve_addr): Adjust optimize_string_length and resolve_addr_in_expr
26232         callers.  Set remove_AT_byte_size if removing DW_AT_string_length.
26233         (variable_value_hasher::hash, variable_value_hasher::equal): New
26234         methods.
26235         (resolve_variable_value_in_expr, resolve_variable_value,
26236         resolve_variable_values, note_variable_value_in_expr,
26237         note_variable_value): New functions.
26238         (dwarf2out_early_finish): Call note_variable_value on all toplevel
26239         DIEs.
26240
26241 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
26242
26243         PR c/79677
26244         * opts.h (handle_generated_option): Add GENERATED_P argument.
26245         * opts-common.c (handle_option): Adjust function comment.
26246         (handle_generated_option): Add GENERATED_P argument, pass it to
26247         handle_option.
26248         (control_warning_option): Pass false to handle_generated_option
26249         GENERATED_P.
26250         * opts.c (maybe_default_option): Pass true to handle_generated_option
26251         GENERATED_P.
26252         * optc-gen.awk: Likewise.
26253
26254 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
26255
26256         * config/sh/sh.md (tstsi_t): If operands[0] is a SUBREG instead of
26257         a REG, look at the REG it is a SUBREG of.
26258         (splitter for cmpeqsi_t): Ditto.
26259
26260 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
26261
26262         * config/pa/pa.c (pa_combine_instructions): Do not share RTL.  Make
26263         the special USEs with the pattern of the insn, not the insn itself.
26264
26265 2017-02-24  Matthew Fortune  <matthew.fortune@imgtec.com>
26266
26267         PR target/79473
26268         * doc/invoke.texi: Document -mload-store-pairs.
26269
26270 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
26271             Sandra Loosemore  <sandra@codesourcery.com>
26272
26273         * config/nios2/nios2.c (nios2_simple_const_p): Returns false if the
26274         argument isn't a CONST_INT.
26275         (nios2_alternate_compare_const): Assert op is a CONST_INT.
26276         (nios2_valid_compare_const_p): Assert op is a CONST_INT.
26277         (nios2_validate_compare): Bypass alternate compare logic if *op2
26278         is not a CONST_INT.
26279         (ldstwm_operation_p): Return false if first_base is not a REG or
26280         if first_offset is not a CONST_INT.
26281
26282 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
26283
26284         * config/cris/cris.md: Use correct operand in a define_peephole2.
26285
26286 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
26287
26288         * config/c6x/c6x.c (predicate_insn): Do not incorrectly share RTL.
26289
26290 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
26291
26292         * config/arc/arc.c (arc_ccfsm_advance): Only take the PATTERN of
26293         this_insn if it is an INSN or JUMP_INSN.
26294         (force_offsettable): Look at base, not at addr.
26295         * config/arc/predicates.md (brcc_nolimm_operator): Don't call INTVAL
26296         on things that aren't necessarily CONST_INTs.
26297
26298 2017-02-24  Uros Bizjak  <ubizjak@gmail.com>
26299
26300         * doc/invoke.texi (x86 Options, -mfpmath=sse): Mention that
26301         -mfpmath=sse is the default also for x86-32 targets with SSE2
26302         instruction set when @option{-ffast-math} is enabled
26303
26304 2017-02-24  Jeff Law  <law@redhat.com>
26305
26306         PR rtl-optimizatoin/79286
26307         * ira.c (update_equiv_regs): Drop may_trap_p exception to
26308         dominance test.
26309
26310 2017-02-24  Richard Biener  <rguenther@suse.de>
26311
26312         PR tree-optimization/79389
26313         * gimple-ssa-split-paths.c (is_feasible_trace): Properly skip
26314         debug insns.
26315
26316 2017-02-24  Aldy Hernandez  <aldyh@redhat.com>
26317
26318         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update
26319         function comment to reflect reality.
26320         (loop_exits_before_overflow): Fix typo in function description.
26321
26322 2017-02-24  Richard Biener  <rguenther@suse.de>
26323
26324         PR tree-optimization/79389
26325         * gimple-ssa-split-paths.c (is_feasible_trace): Verify more
26326         properly that a threading opportunity exists.  Detect conditional
26327         copy/constant propagation opportunities.
26328
26329 2017-02-23  Eric Botcazou  <ebotcazou@adacore.com>
26330
26331         * config/visium/visium.md (type): Add trap.
26332         (b): New mode attribute.
26333         (*btst): Rename into...
26334         (*btst<mode>): ...this and adjust.
26335         (*cbranchsi4_btst_insn): Rename into...
26336         (*cbranch<mode>4_btst_insn): ...this and adjust.
26337         (trap): New define_insn.
26338
26339 2017-02-23  Jakub Jelinek  <jakub@redhat.com>
26340
26341         PR tree-optimization/79389
26342         * ifcvt.c (struct noce_if_info): Add rev_cond field.
26343         (noce_reversed_cond_code): New function.
26344         (noce_emit_store_flag): Use rev_cond if non-NULL instead of
26345         reversed_comparison_code.  Formatting fix.
26346         (noce_try_store_flag): Test rev_cond != NULL in addition to
26347         reversed_comparison_code.
26348         (noce_try_store_flag_constants): Likewise.
26349         (noce_try_store_flag_mask): Likewise.
26350         (noce_try_addcc): Use rev_cond if non-NULL instead of
26351         reversed_comparison_code.
26352         (noce_try_cmove_arith): Likewise.  Formatting fixes.
26353         (noce_try_minmax, noce_try_abs): Clear rev_cond.
26354         (noce_find_if_block): Initialize rev_cond.
26355         (find_cond_trap): Call noce_get_condition with then_bb == trap_bb
26356         instead of false as last argument never attempt to reverse it
26357         afterwards.
26358
26359 2017-02-23  Bin Cheng  <bin.cheng@arm.com>
26360
26361         PR tree-optimization/79663
26362         * tree-predcom.c (combine_chains): Process refs in reverse order
26363         only for ZERO length chains, and add explaining comment.
26364
26365 2017-02-23  Jeff Law  <law@redhat.com>
26366
26367         PR tree-optimization/79578
26368         * tree-ssa-dse.c (clear_bytes_written_by): Use OEP_ADDRESS_OF
26369         in call to operand_equal_p.
26370
26371 2017-01-23  Dominique d'Humieres  <dominiq@lps.ens.fr>
26372
26373         PR target/71017
26374         * config/i386/cpuid.h: Fix another undefined behavior.
26375
26376 2017-02-23  Richard Biener  <rguenther@suse.de>
26377
26378         PR tree-optimization/79683
26379         * tree-vect-stmts.c (vect_analyze_stmt): Do not overwrite
26380         vector types for data-refs.
26381
26382 2017-02-23  Martin Liska  <mliska@suse.cz>
26383
26384         * params.def (PARAM_MIN_NONDEBUG_INSN_UID): Change default to 0.
26385
26386 2017-02-23  Jakub Jelinek  <jakub@redhat.com>
26387
26388         PR middle-end/79665
26389         * internal-fn.c (get_range_pos_neg): Moved to ...
26390         * tree.c (get_range_pos_neg): ... here.  No longer static.
26391         * tree.h (get_range_pos_neg): New prototype.
26392         * expr.c (expand_expr_real_2) <case TRUNC_DIV_EXPR>: If both arguments
26393         are known to be in between 0 and signed maximum inclusive, try to
26394         expand both unsigned and signed divmod and use the cheaper one from
26395         those.
26396
26397 2017-02-22  Jeff Law  <law@redhat.com>
26398
26399         PR tree-optimization/79578
26400         * tree-ssa-dse.c (clear_bytes_written_by): Use operand_equal_p
26401         to compare base operands.
26402
26403 2017-02-22  Segher Boessenkool  <segher@kernel.crashing.org>
26404
26405         PR target/79211
26406         * config/rs6000/rs6000.md (*fsel<SFDF:mode><SFDF2:mode>4): Use
26407         gpc_reg_operand instead of fpr_reg_operand.
26408
26409 2017-02-22  Sameera Deshpande  <sameera.deshpande@imgtec.com>
26410
26411         * config/mips/mips.c (mips_return_in_memory): Force FP
26412         vector types to be returned in memory for o32 ABI.
26413
26414 2017-02-22  Jakub Jelinek  <jakub@redhat.com>
26415
26416         * dwarf2out.c (gen_variable_die): For -gdwarf-5, use DW_TAG_variable
26417         instead of DW_TAG_member for static data member declarations and don't
26418         set no_linkage_name for static inline data members.
26419         (gen_member_die): For -gdwarf-5 don't change DW_TAG_variable
26420         to DW_TAG_member.
26421
26422 2017-02-22  Martin Liska  <mliska@suse.cz>
26423
26424         * doc/invoke.texi: Replace inequality signs with square brackets
26425         for -Wnormalized.
26426
26427 2017-02-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26428
26429         PR tree-optimization/68644
26430         * gcc.dg/tree-ssa/ivopts-lt-2.c: Skip for powerpc*-*-*.
26431
26432 2017-02-22  Matthew Fortune  <matthew.fortune@imgtec.com>
26433
26434         PR target/78660
26435         * lra-constraints.c (simplify_operand_subreg): Handle
26436         WORD_REGISTER_OPERATIONS targets.
26437
26438 2017-02-22  Jakub Jelinek  <jakub@redhat.com>
26439
26440         PR target/70465
26441         * reg-stack.c (emit_swap_insn): Treat (float_extend:?F (mem:?F))
26442         and (const_double:?F) like (mem:?F) for the purpose of fxch %st(1)
26443         elimination by swapping fld*.
26444
26445 2017-02-22  Richard Biener  <rguenther@suse.de>
26446
26447         PR tree-optimization/79673
26448         * tree-ssa-pre.c (compute_avail): Use wide_int_to_tree to
26449         convert the [TARGET_]MEM_REF offset INTEGER_CST, scrapping off
26450         irrelevant address-space qualifiers and avoiding a
26451         ADDR_SPACE_CONVERT_EXPR from fold_convert.
26452
26453 2017-02-22  Richard Biener  <rguenther@suse.de>
26454
26455         PR tree-optimization/79666
26456         * tree-vrp.c (extract_range_from_binary_expr_1): Make sure
26457         to not symbolically negate if that may introduce undefined
26458         overflow.
26459
26460 2017-02-22  Martin Liska  <mliska@suse.cz>
26461
26462         PR lto/79587
26463         * data-streamer-in.c (streamer_read_gcov_count): Remove assert.
26464         * data-streamer-out.c (streamer_write_gcov_count_stream):
26465         Likewise.
26466         * value-prof.c (stream_out_histogram_value): Make assert more
26467         precise based on type of counter.
26468
26469 2017-02-21  Uros Bizjak  <ubizjak@gmail.com>
26470
26471         PR target/79593
26472         * config/i386/i386.md (standard_x87sse_constant_load splitter):
26473         Use nonimmediate_operand instead of memory_operand for operand 1.
26474         (float-extend standard_x87sse_constant_load splitter): Ditto.
26475
26476 2017-02-21  Jeff Law  <law@redhat.com>
26477
26478         PR tree-optimization/79621
26479         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Ignore
26480         blocks with edges to themselves.
26481
26482 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
26483
26484         PR target/79633
26485         * tree-chkp-opt.c (chkp_optimize_string_function_calls): Use
26486         is_gimple_call instead of comparing gimple_code with GIMPLE_CALL.
26487         Use gimple_call_builtin_p.
26488
26489         PR target/79570
26490         * sel-sched.c (moveup_expr_cached): Don't call sel_bb_head
26491         on temporarily removed DEBUG_INSNs.
26492
26493         PR tree-optimization/79649
26494         * tree-loop-distribution.c (classify_partition): Give up on
26495         non-generic address space loads/stores.
26496
26497 2017-02-21  Aldy Hernandez  <aldyh@redhat.com>
26498
26499         * doc/loop.texi (Loop manipulation): Remove nonexistent
26500         tree_ssa_loop_version from the documentation.
26501         * cfgloopmanip.c (loop_version): Document CONDITION_BB argument.
26502
26503 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
26504
26505         PR target/79494
26506         * config/i386/i386.c (ix86_expand_split_stack_prologue): Call
26507         make_reg_eh_region_note_nothrow_nononlocal on call_insn.
26508         * config/rs6000/rs6000.c: Include except.h.
26509         (rs6000_expand_split_stack_prologue): Call
26510         make_reg_eh_region_note_nothrow_nononlocal on the call insn.
26511
26512 2017-02-21  Martin Jambor  <mjambor@suse.cz>
26513
26514         PR lto/79579
26515         * ipa-prop.c (ipa_prop_write_jump_functions): Bail out if no edges
26516         have been analyzed.
26517
26518 2017-02-21  Martin Jambor  <mjambor@suse.cz>
26519
26520         * common.opt (-fipa-cp-alignment): Mark as ignored and preserved
26521         for backward compatibility only.
26522         * doc/invoke.texi (Option Summary): Remove all references to
26523         -fipa-cp-alignment.
26524
26525 2017-02-21  Matthew Fortune  <matthew.fortune@imgtec.com>
26526
26527         PR target/78660
26528         Revert:
26529         2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
26530
26531         * lra-constraints.c (curr_insn_transform): Handle
26532         WORD_REGISTER_OPERATIONS requirements when reloading SUBREGs.
26533
26534 2017-02-21  Martin Liska  <mliska@suse.cz>
26535
26536         * config/i386/i386.opt: Replace -masm-dialect with -masm.
26537
26538 2017-02-21  Thomas Schwinge  <thomas@codesourcery.com>
26539
26540         PR translation/79638
26541         * config/nvptx/nvptx.c (ENTRY_TEMPLATE): Single out "%ntid.y".
26542
26543 2017-02-21  Eric Botcazou  <ebotcazou@adacore.com>
26544
26545         PR ada/67205
26546         * config/arm/arm.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define.
26547         (arm_function_ok_for_sibcall): Return false for an indirect call by
26548         descriptor if all the argument registers are used.
26549         (arm_relayout_function): Use FUNCTION_ALIGNMENT macro to adjust the
26550         alignment of the function.
26551
26552 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
26553
26554         PR tree-optimization/61441
26555         * simplify-rtx.c (simplify_const_unary_operation): For
26556         -fsignaling-nans and sNaN operand, return NULL_RTX rather than
26557         the sNaN unmodified.
26558
26559 2017-02-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
26560
26561         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
26562         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
26563         instead of SYSTEM_HEADER_DIR.
26564
26565 2017-02-20  Gerald Pfeifer  <gerald@pfeifer.com>
26566             Martin LiÅ¡ka  <mliska@suse.cz>
26567
26568         * doc/invoke.texi (use-after-scope-direct-emission-threshold):
26569         Fix typos and grammar, use active voice, and clarify.
26570
26571 2017-02-20  Marek Polacek  <polacek@redhat.com>
26572
26573         PR middle-end/79537
26574         * gimplify.c (gimplify_expr): Handle unused *&&L;.
26575
26576         PR sanitizer/79558
26577         * ubsan.c (ubsan_type_descriptor): Check if TYPE_MAX_VALUE is null.
26578
26579 2017-02-20  Jakub Jelinek  <jakub@redhat.com>
26580
26581         PR target/79568
26582         * config/i386/i386.c (ix86_expand_builtin): Handle
26583         OPTION_MASK_ISA_AVX512VL and OPTION_MASK_ISA_64BIT in
26584         ix86_builtins_isa[fcode].isa as a requirement of those
26585         flags and any other flag in the bitmask.
26586         (ix86_init_mmx_sse_builtins): Use 0 instead of
26587         ~OPTION_MASK_ISA_64BIT as mask.
26588         * config/i386/i386-builtin.def (__builtin_ia32_rdtsc,
26589         __builtin_ia32_rdtscp, __builtin_ia32_pause, __builtin_ia32_bsrsi,
26590         __builtin_ia32_rdpmc, __builtin_ia32_rolqi, __builtin_ia32_rolhi,
26591         __builtin_ia32_rorqi, __builtin_ia32_rorhi): Likewise.
26592
26593 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
26594
26595         PR target/78012
26596         * lra-constraints.c (split_reg): Check requested split mode
26597         is supported by the register.
26598
26599 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
26600
26601         * lra-constraints.c (simplify_operand_subreg): Remove early
26602         return false.
26603
26604 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
26605
26606         PR target/78660
26607         * lra-constraints.c (curr_insn_transform): Tighten condition
26608         for converting SUBREG reloads from OP_OUT to OP_INOUT.
26609
26610 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
26611
26612         PR target/78660
26613         * lra-constraints.c (curr_insn_transform): Handle
26614         WORD_REGISTER_OPERATIONS requirements when reloading SUBREGs.
26615
26616 2017-02-19  Uros Bizjak  <ubizjak@gmail.com>
26617
26618         Revert:
26619         2016-05-30  Uros Bizjak  <ubizjak@gmail.com>
26620
26621         * config/i386/sync.md (mfence_nosse): Use "lock orl $0, -4(%esp)".
26622
26623 2017-02-19  Jonathan Wakely  <jwakely@redhat.com>
26624
26625         PR c++/69523
26626         * doc/invoke.texi (C++ Dialect Options) [-Wliteral-suffix]: Update
26627         description.
26628
26629 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
26630
26631         * gimple-pretty-print.c (dump_ternary_rhs): Adjust gimple dump format
26632         for FMA_EXPR.
26633
26634 2017-02-18  Jakub Jelinek  <jakub@redhat.com>
26635
26636         * final.c (last_columnnum, override_columnnum): New variables.
26637         (final_start_function): Set last_columnnum, pass it to begin_prologue
26638         hook and pass 0 to dwarf2out_begin_prologue.
26639         (final_scan_insn): Update override_columnnum.  Pass last_columnnum
26640         to source_line debug hook.
26641         (notice_source_line): Compute last_columnnum and for debug_column_info
26642         return true on column changes.
26643         * debug.h (struct gcc_debug_hooks): Add column argument to
26644         source_line and begin_prologue hooks.
26645         (debug_nothing_int_charstar_int_bool): Remove prototype.
26646         (debug_nothing_int_int_charstar,
26647         debug_nothing_int_int_charstar_int_bool): New prototypes.
26648         (dwarf2out_begin_prologue): Add column argument.
26649         * debug.c (do_nothing_debug_hooks): Adjust source_line and
26650         begin_prologue hooks.
26651         (debug_nothing_int_charstar_int_bool): Remove.
26652         (debug_nothing_int_int_charstar,
26653         debug_nothing_int_int_charstar_int_bool): New functions.
26654         * dwarf2out.c (dwarf2out_begin_prologue): Add column argument, pass it
26655         through to dwarf2out_source_line.
26656         (dwarf2_lineno_debug_hooks): Adjust begin_prologue hook.
26657         (dwarf2out_source_line): Add column argument, emit it if requested.
26658         * sdbout.c (sdbout_source_line, sdbout_begin_prologue): Add column
26659         arguments.
26660         * xcoffout.h (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
26661         * xcoffout.c (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
26662         * vmsdbgout.c (vmsdbgout_begin_prologue): Add column argument, pass it
26663         through to dwarf2out_begin_prologue.
26664         (vmsdbgout_source_line): Add column argument, pass it through to
26665         dwarf2out_source_line.
26666         * dbxout.c (dbxout_begin_prologue): Add column argument, adjust
26667         dbxout_source_line caller.
26668         (dbxout_source_line): Add column argument.
26669
26670         * common.opt (gno-column-info, gcolumn-info): New options.
26671         * dwarf2out.c (dwarf2_lineno_debug_hooks): Formatting fix.
26672         (check_die): Also test for multiple DW_AT_decl_column attributes.
26673         (add_src_coords_attributes, dwarf2out_imported_module_or_decl_1): Add
26674         DW_AT_decl_column if requested.
26675         (gen_subprogram_die): Compare and/or add also DW_AT_decl_column
26676         if requested.
26677         (gen_variable_die): Likewise.
26678         (add_call_src_coords_attributes): Add DW_AT_call_column if requested.
26679         * doc/invoke.texi (-gcolumn-info, -gno-column-info): Document.
26680
26681         PR target/79569
26682         * config/i386/i386.opt (m3dnowa): Replace Undocumented with Report.
26683         * common/config/i386/i386-common.c (OPTION_MASK_ISA_3DNOW_A_SET): Define.
26684         (ix86_handle_option): Handle OPT_m3dnowa.
26685         * doc/invoke.texi (-m3dnowa): Document.
26686         * doc/extend.texi (__builtin_ia32_pmulhuw, __builtin_ia32_pf2iw): Use
26687         -m3dnowa instead of -m3dnow -march=athlon.
26688
26689         PR target/79559
26690         * config/i386/i386.c (ix86_print_operand): Use output_operand_lossage
26691         instead of gcc_assert for K, r and R code checks.  Formatting fixes.
26692
26693 2017-02-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26694
26695         PR target/79261
26696         * config/rs6000/rs6000.c (rs6000_expand_ternop_builtin): Add
26697         support for CODE_FOR_vsx_xxpermdi_v2d[fi]_be.
26698         * config/rs6000/rs6000.md (reload_gpr_from_vsx<mode>): Call
26699         generator for vsx_xxpermdi_<mode>_be.
26700         * config/rs6000/vsx.md (vsx_xxpermdi_<mode>): Remove logic to
26701         force big-endian semantics.
26702         (vsx_xxpermdi_<mode>_be): New define_expand with same
26703         implementation as previous version of vsx_xxpermdi_<mode>.
26704
26705 2017-02-17  Jakub Jelinek  <jakub@redhat.com>
26706
26707         PR tree-optimization/79327
26708         * gimple-ssa-sprintf.c (format_integer): Remove likely_adjust
26709         variable, its initialization and use.
26710
26711 2017-02-17  Julia Koval  <julia.koval@intel.com>
26712
26713         * common/config/i386/i386-common.c (OPTION_MASK_ISA_RDPID_SET): New.
26714         (OPTION_MASK_ISA_PKU_UNSET): New.
26715         (ix86_handle_option): Handle -mrdpid.
26716         * config/i386/cpuid.h (bit_RDPID): New.
26717         * config/i386/driver-i386.c (host_detect_local_cpu):
26718         Detect RDPID feature.
26719         * config/i386/i386-builtin.def (__builtin_ia32_rdpid): New.
26720         * config/i386/i386-c.c (ix86_target_macros_internal):
26721         Handle RDPID flag.
26722         * config/i386/i386.c (ix86_target_string): Add -mrdpid to isa2_opts.
26723         (ix86_valid_target_attribute_inner_p): Add "rdpid".
26724         (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
26725         * config/i386/i386.h (TARGET_RDPID, TARGET_RDPID_P): New.
26726         * config/i386/i386.md (define_insn "rdpid"): New.
26727         * config/i386/i386.opt Add -mrdpid.
26728         * config/i386/immintrin.h (_rdpid_u32): New.
26729
26730 2017-02-17  Vladimir Makarov  <vmakarov@redhat.com>
26731
26732         PR rtl-optimization/79541
26733         * lra-constraints.c (curr_insn_transform): Remove wrong asm insn
26734         instead of transforming it into USE.
26735
26736 2017-02-17  Segher Boessenkool  <segher@kernel.crashing.org>
26737
26738         * config/rs6000/rs6000.md (extendsfdf2): Remove default arguments.
26739         If HONOR_SNANS (SFmode) force the input to a register.
26740         (*extendsfdf2_fpr): Add !HONOR_SNANS (SFmode) condition.
26741         (*extendsfdf2_snan): New pattern, used when using SNaNs; it generates
26742         an frsp or similar insn.
26743
26744 2017-02-17  Martin Liska  <mliska@suse.cz>
26745
26746         PR rtl-optimization/79577
26747         * params.def (selsched-max-sched-times): Increase minimum to 1.
26748
26749 2017-02-17  Martin Liska  <mliska@suse.cz>
26750
26751         PR rtl-optimization/79574
26752         * gcse.c (want_to_gcse_p): Prevent integer overflow.
26753
26754 2017-02-17  Martin Liska  <mliska@suse.cz>
26755
26756         PR tree-optimization/79529
26757         * tree-ssa-loop-unswitch.c (is_maybe_undefined): Use
26758         ssa_defined_default_def_p to handle cases which are implicitly
26759         defined.
26760         * tree-ssa.c (ssa_defined_default_def_p): New function.
26761         (ssa_undefined_value_p): Use ssa_defined_default_def_p to handle cases
26762         which are implicitly defined.
26763         * tree-ssa.h (ssa_defined_default_def_p): Declare.
26764
26765 2017-02-17  Richard Biener  <rguenther@suse.de>
26766
26767         PR middle-end/79576
26768         * params.def (max-ssa-name-query-depth): Limit to 10.
26769
26770 2017-02-17  Richard Biener  <rguenther@suse.de>
26771
26772         PR tree-optimization/79552
26773         * tree-ssa-structalias.c (visit_loadstore): Properly verify
26774         default defs.
26775
26776 2017-02-17  Richard Biener  <rguenther@suse.de>
26777
26778         PR bootstrap/79567
26779         * genmatch.c (output_line_directive): Handle DIR_SEPARATOR_2.
26780
26781 2017-02-17  Marek Polacek  <polacek@redhat.com>
26782
26783         PR middle-end/79536
26784         * fold-const.c (fold_negate_expr_1): Renamed from fold_negate_expr.
26785         (fold_negate_expr): New wrapper.
26786
26787 2017-02-16  Sandra Loosemore  <sandra@codesourcery.com>
26788
26789         * doc/invoke.texi (C++ Dialect Options) [-Wno-non-template-friend]: 
26790         Correct terminology and de-emphasize pre-standard behavior.
26791
26792 2017-02-16  Alan Modra  <amodra@gmail.com>
26793
26794         PR rtl-optimization/79286
26795         * ira.c (def_dominates_uses): New function.
26796         (update_equiv_regs): Don't create an equivalence for insns that
26797         may trap where the register def does not dominate the use.
26798
26799 2017-02-16  Vladimir Makarov  <vmakarov@redhat.com>
26800
26801         PR rtl-optimization/78127
26802         * lra.c (lra): Call lra_eliminate before finish the loop after
26803         lra_constraint.
26804
26805 2017-02-16  Richard Biener  <rguenther@suse.de>
26806
26807         * graphite.h: Do not include isl/isl_val_gmp.h, instead include
26808         isl/isl_val.h.
26809         * graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): Remove.
26810         (gcc_expression_from_isl_expr_int): Use generic isl_val interface.
26811         * graphite-sese-to-poly.c: Do not include isl/isl_val_gmp.h.
26812         (isl_val_int_from_wi): New function.
26813         (extract_affine_gmp): Rename to ...
26814         (extract_affine_wi): ... this, take a widest_int.
26815         (extract_affine_int): Just wrap extract_affine_wi.
26816         (add_param_constraints): Use isl_val_int_from_wi.
26817         (add_loop_constraints): Likewise, and extract_affine_wi.
26818
26819 2017-02-15  Jeff Law  <law@redhat.com>
26820
26821         PR middle-end/79521
26822         * ira-costs.c (scan_one_insn): Check have_regs_of_mode before calling
26823         ira_init_register_move_cost_if_necessary.
26824
26825 2017-02-15  Martin Sebor  <msebor@redhat.com>
26826
26827         PR middle-end/32003
26828         * doc/invoke.texi (-fdump-final-insns): Replace option accidentally
26829         removed in a prior commit.
26830
26831 2017-02-15  Bin Cheng  <bin.cheng@arm.com>
26832
26833         PR tree-optimization/79347
26834         * tree-vect-loop-manip.c (vect_do_peeling): Maintain profile
26835         counters during peeling.
26836
26837 2017-02-15  Thomas Schwinge  <thomas@codesourcery.com>
26838
26839         * Makefile.in (site.exp): Remove "set ISLVER".
26840
26841 2017-02-15  Jakub Jelinek  <jakub@redhat.com>
26842
26843         PR target/79487
26844         * real.c (real_from_integer): Call real_convert even for decimal.
26845
26846 2017-02-15  Dominik Vogt  <vogt@linux.vnet.ibm.com>
26847
26848         PR target/79421
26849         * config/s390/s390.c: define TARGET_CUSTOM_FUNCTION_DESCRIPTORS.
26850
26851 2017-02-14  Andrew Pinski  <apinski@cavium.com>
26852
26853         * config/aarch64/aarch64-cores.def (thunderx2t99): Move to under 'C"
26854         cores and change the partno/implementer to be correct.
26855         (thunderx2t99p1): New core which replaces thunderx2t99 and still has
26856         the 'B" as the implementer.
26857         * config/aarch64/aarch64-tune.md: Regenerate.
26858
26859 2017-02-14  Carl Love  <cel@us.ibm.com>
26860
26861         * config/rs6000/rs6000.c: Add case statement entry to make the
26862         xvcvuxdsp built-in argument unsigned.
26863         * config/rs6000/vsx.md: Fix the source and return operand types so they
26864         match the instruction definitions from the ISA document.  Fix typo
26865         in the instruction generation for the (define_insn "vsx_xvcvuxdsp"
26866         statement.
26867
26868 2017-02-14  Vladimir Makarov  <vmakarov@redhat.com>
26869
26870         PR target/79282
26871         * lra-int.h (struct lra_operand_data, struct lra_insn_reg): Add
26872         member early_clobber_alts.
26873         * lra-lives.c (reg_early_clobber_p): New.
26874         (process_bb_lives): Use it.
26875         * lra.c (new_insn_reg): New arg early_clobber_alts.  Use it.
26876         (debug_operand_data): Initialize early_clobber_alts.
26877         (setup_operand_alternative): Set up early_clobber_alts.
26878         (collect_non_operand_hard_regs): Ditto.  Pass early clobber
26879         alternatives to new_insn_reg.
26880         (add_regs_to_insn_regno_info): Add arg early_clobber_alts.  Use
26881         it.
26882         (lra_update_insn_regno_info): Pass the new arg.
26883
26884 2017-02-14  Jakub Jelinek  <jakub@redhat.com>
26885
26886         PR middle-end/79505
26887         * omp-offload.c (free_oacc_loop): Release loop->ifns vector.
26888         (new_oacc_loop_raw): Don't clear already cleared fields.
26889
26890         PR target/79481
26891         * config/i386/avx512pfintrin.h (_mm512_prefetch_i32gather_pd,
26892         _mm512_prefetch_i32gather_ps, _mm512_prefetch_i64gather_pd,
26893         _mm512_prefetch_i64gather_ps): New inline functions and macros.
26894
26895 2017-02-14  Uros Bizjak  <ubizjak@gmail.com>
26896
26897         PR target/79495
26898         * config/i386/i386.md (*movxf_internal): Add (o,rC) alternative.
26899
26900 2017-02-14  H.J. Lu  <hongjiu.lu@intel.com>
26901
26902         PR target/79498
26903         * config/i386/i386.c (timode_scalar_chain::convert_insn): Insert
26904         the extra instruction to the right place to store 128-bit constant
26905         when needed.
26906
26907 2017-02-14  Martin Sebor  <msebor@redhat.com>
26908
26909         PR middle-end/79448
26910         * gimple-ssa-sprintf.c (format_directive): Avoid issuing INT_MAX
26911           warning for strings of unknown length.
26912
26913 2017-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
26914
26915         * config.gcc (supported_defaults) [powerpc*-*-*]: Update.
26916
26917 2017-02-14  Jeff Law  <law@redhat.com>
26918
26919         PR target/79404
26920         * ira-costs.c (scan_one_insn): Initialize register move costs
26921         for pseudos seen in USE/CLOBBER insns.
26922
26923         PR tree-optimization/79095
26924         * tree-vrp.c (extract_range_from_binary_expr_1): For EXACT_DIV_EXPR,
26925         if the numerator has the range ~[0,0] make the resultant range ~[0,0].
26926         (extract_range_from_binary_expr): For MINUS_EXPR with no derived range,
26927         if the operands are known to be not equal, then the resulting range
26928         is ~[0,0].
26929         (intersect_ranges): If the new range is ~[0,0] and the old range is
26930         wide, then prefer ~[0,0].
26931         * tree-vrp.c (overflow_comparison_p_1): New function.
26932         (overflow_comparison_p): New function.
26933         * tree-vrp.c (register_edge_assert_for_2): Register additional asserts
26934         if NAME is used in an overflow test.
26935         (vrp_evaluate_conditional_warnv_with_ops): If the ops represent an
26936         overflow check that can be expressed as an equality test, then adjust
26937         ops to be that equality test.
26938
26939 2017-02-14  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
26940
26941         * config/s390/s390-builtin-types.def: Remove flags argument.
26942         * config/s390/s390.c (s390_init_builtins): Likewise.
26943
26944 2017-02-14  Martin Liska  <mliska@suse.cz>
26945
26946         * tree-ssa-loop-unswitch.c (hoist_guard): Release get_loop_body
26947         vector.  Fix trailing white spaces.
26948
26949 2017-02-14  James Greenhalgh  <james.greenhalgh@arm.com>
26950
26951         * config/aarch64/aarch64.c (aarch64_simd_container_mode): Handle
26952         HFmode.
26953
26954 2017-02-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26955
26956         PR rtl-optimization/68664
26957         * config/arm/arm.c (arm_sched_can_speculate_insn):
26958         New function.  Declare prototype.
26959         (TARGET_SCHED_CAN_SPECULATE_INSN): Define.
26960
26961 2017-02-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26962
26963         PR rtl-optimization/68664
26964         * config/aarch64/aarch64.c (aarch64_sched_can_speculate_insn):
26965         New function.
26966         (TARGET_SCHED_CAN_SPECULATE_INSN): Define.
26967
26968 2017-02-14  Amit Pawar  <amit.pawar@amd.com>
26969
26970         * config/i386/i386.c (znver1_cost): Fix the alignment for function and
26971         max skip bytes for function, loop and jump.
26972
26973 2017-02-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
26974
26975         * gimple-pretty-print.c (dump_unary_rhs): Adjust dump format for
26976         ABS_EXPR for gimple dump.
26977
26978 2017-02-14  Jakub Jelinek  <jakub@redhat.com>
26979
26980         PR target/79462
26981         * config/sh/sh.c (expand_cbranchdi4): Don't clear operands[4].
26982
26983         PR tree-optimization/79408
26984         * tree-vrp.c (simplify_div_or_mod_using_ranges): Handle also the
26985         case when on TRUNC_MOD_EXPR op0 is INTEGER_CST.
26986         (simplify_stmt_using_ranges): Call simplify_div_or_mod_using_ranges
26987         also if rhs1 is INTEGER_CST.
26988
26989 2017-02-14  Richard Biener  <rguenther@suse.de>
26990
26991         PR middle-end/79432
26992         * tree-into-ssa.c (insert_phi_nodes): When the function can
26993         have abnormal edges rewrite SSA names with broken use-def
26994         dominance out of SSA and register them for PHI insertion.
26995
26996 2017-02-13  Martin Sebor  <msebor@redhat.com>
26997
26998         PR middle-end/79496
26999         * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call): Avoid
27000         clearing info.nowrite flag when snprintf size argument is a range.
27001
27002 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
27003
27004         * cprop.c (cprop_jump): Add missing space in string literal.
27005         * tree-ssa-structalias.c (rewrite_constraints): Likewise.
27006         (get_constraint_for_component_ref): Likewise.
27007         * df-core.c (df_worklist_dataflow_doublequeue): Likewise.
27008         * tree-outof-ssa.c (insert_partition_copy_on_edge): Likewise.
27009         * lra-constraints.c (process_alt_operands): Likewise.
27010         * ipa-inline.c (inline_small_functions): Likewise.
27011         * tree-ssa-sccvn.c (visit_reference_op_store): Likewise.
27012         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
27013         * trans-mem.c (diagnose_tm_1_op): Likewise.
27014         * omp-grid.c (grid_find_single_omp_among_assignments): Likewise.
27015         (grid_parallel_clauses_gridifiable): Likewise.
27016
27017         * config/nvptx/mkoffload.c (process): Add space in between
27018         , and %d.
27019
27020         * config/i386/i386.h (REG_CLASS_NAMES): Add , in between
27021         "MOD4_SSE_REGS" and "ALL_REGS".
27022
27023         * spellcheck.c (test_data): Add , in between "foo" and "food".
27024
27025 2017-02-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
27026
27027         PR target/79449
27028         * config/rs6000/rs6000.c (expand_block_compare): Make sure runtime
27029         boundary crossing check and subsequent code generation agree.
27030
27031 2017-02-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27032
27033         * config/aarch64/aarch64.c (has_memory_op): Delete.
27034         (aarch64_madd_needs_nop): Use contains_mem_rtx_p instead of
27035         has_memory_op.
27036
27037 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
27038
27039         PR rtl-optimization/79388
27040         PR rtl-optimization/79450
27041         * combine.c (distribute_notes): When removing TEM_INSN for which
27042         corresponding dest has last value recorded, invalidate that last
27043         value.
27044
27045 2017-02-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27046
27047         * config/arm/arm.c (arm_print_tune_info): Use ASM_COMMENT_START instead
27048         of explicit '@'.  Add missing assembly comment marker on branch costs
27049         printout.
27050
27051 2017-02-13  Nathan Sidwell  <nathan@acm.org>
27052
27053         * gengtype-lex.l (<in_struct>): Add '/'.
27054
27055 2017-02-13  Martin Liska  <mliska@suse.cz>
27056
27057         PR c/79471
27058         * calls.c (expand_call): Replace XALLOCAVEC with XCNEWVEC.
27059
27060 2017-02-13  Richard Biener  <rguenther@suse.de>
27061
27062         * configure.ac (HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS):
27063         Remove.
27064         * configure: Re-generate.
27065         * config.in: Likewise.
27066         * graphite-dependences.c: Simplify as if
27067         HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS was defined.
27068         * graphite-isl-ast-to-gimple.c: Likewise.
27069         * graphite-optimize-isl.c: Likewise.
27070         * graphite-poly.c: Likewise.
27071         * graphite-sese-to-poly.c: Likewise.
27072         * graphite.h: Likewise.
27073         * toplev.c: Include isl/version.h and use isl_version () for
27074         printing the ISL version.
27075         * doc/install.texi: Update ISL requirement.
27076
27077 2017-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
27078
27079         * doc/standards.texi (Standards): Update reference to
27080         Objective-C 2.0.
27081
27082 2017-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
27083
27084         * doc/extend.texi (Named Address Spaces): sourceware.org now
27085         defaults to https.
27086         * doc/install.texi (Binaries): Ditto.
27087         (Specific): Ditto.
27088
27089 2017-02-11  Sandra Loosemore  <sandra@codesourcery.com>
27090
27091         * doc/cpp.texi: Replace "stringify"/"stringification" with C
27092         standard terminology "stringize"/"stringizing" throughout.
27093         * doc/cppinternals.texi: Likewise.
27094
27095 2017-02-11  Sandra Loosemore  <sandra@codesourcery.com>
27096
27097         * doc/extend.texi: Fix some spelling mistakes and typos.
27098         * doc/invoke.texi: Likewise.
27099
27100 2017-02-11  Jan Hubicka  <hubicka@ucw.cz>
27101
27102         PR ipa/79224
27103         * params.def (inline-min-speedup) Change from 10 to 8.
27104
27105 2017-02-11  Jakub Jelinek  <jakub@redhat.com>
27106
27107         * doc/invoke.texi (fopenmp): Bump OpenMP version from 4.0 to
27108         4.5.
27109
27110 2017-02-11  Jan Hubicka  <hubicka@ucw.cz>
27111
27112         PR ipa/79224
27113         * ipa-inline-analysis.c (get_minimal_bb): New function.
27114         (record_modified): Use it.
27115         (remap_edge_change_prob): Handle also ancestor functions.
27116
27117 2017-02-11  Gerald Pfeifer  <gerald@pfeifer.com>
27118
27119         * doc/contrib.texi (Contributors): Remove broken link into
27120         the Mauve CVS repository.
27121
27122 2017-02-11  Jakub Jelinek  <jakub@redhat.com>
27123
27124         PR middle-end/79454
27125         * internal-fn.c (expand_vector_ubsan_overflow): Use piece-wise
27126         result computation whenever lhs doesn't have vector mode, not
27127         just when it has BLKmode.
27128
27129 2017-02-10  Gerald Pfeifer  <gerald@pfeifer.com>
27130
27131         * doc/makefile.texi (profiledbootstrap): Refer to the
27132         installation instructions only in textual form.
27133
27134 2017-02-10  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
27135
27136         PR target/79295
27137         * config/rs6000/altivec.md (bcd<bcd_add_sub>): Fix constraints.
27138
27139 2017-02-10  Gerald Pfeifer  <gerald@pfeifer.com>
27140
27141         * doc/install.texi (Specific): Use https for blackfin.uclinux.org.
27142         (Specific): Update mingw-w64 reference.
27143         (Binaries): Ditto.
27144         (Specific): Remove broken link to Renesas RX processor.
27145
27146 2017-02-10  Richard Biener  <rguenther@suse.de>
27147
27148         * toplev.c (process_options): Do not mention obsolete graphite
27149         options when printing sorry message about missing graphite support.
27150         Mention -floop-nest-optimize.
27151
27152 2017-02-10  Christophe Lyon  <christophe.lyon@linaro.org>
27153
27154         * config/aarch64/arm_neon.h (vtst_p8): Rewrite without asm.
27155         (vtst_p16): Likewise.
27156         (vtstq_p8): Likewise.
27157         (vtstq_p16): Likewise.
27158         (vtst_p64): New.
27159         (vtstq_p64): Likewise.
27160         * config/arm/arm_neon.h (vgetq_lane_p64): New.
27161         (vset_lane_p64): New.
27162         (vsetq_lane_p64): New.
27163
27164 2017-02-10  Jakub Jelinek  <jakub@redhat.com>
27165
27166         PR tree-optimization/79411
27167         * tree-ssa-reassoc.c (is_reassociable_op): Return false if
27168         stmt operands are SSA_NAMEs used in abnormal phis.
27169         (can_reassociate_p): Return false if op is SSA_NAME used in abnormal
27170         phis.
27171
27172 2017-02-09  Jan Hubicka  <hubicka@ucw.cz>
27173
27174         PR ipa/70795
27175         * cgraphunit.c (cgraph_node::add_new_function): Set externally_visible
27176         flag if needed.
27177
27178 2017-02-09  Jan Hubicka  <hubicka@ucw.cz>
27179
27180         * tree-ssa-loop-unswitch.c (hoist_guard): Update profile.
27181
27182 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
27183
27184         * omp-offload.c (oacc_loop_auto_partitions): Use || instead of |
27185         to avoid warning.
27186
27187         PR c/79413
27188         * gimplify.h (is_gimple_sizepos): Only test for INTEGER_CST constants,
27189         not arbitrary TREE_CONSTANT.
27190
27191         PR c/79431
27192         * gimplify.c (gimplify_adjust_omp_clauses): Ignore
27193         "omp declare target link" attribute unless is_global_var.
27194         * omp-offload.c (find_link_var_op): Likewise.
27195
27196 2017-02-09  Nathan Sidwell  <nathan@codesourcery.com>
27197             Chung-Lin Tang  <cltang@codesourcery.com>
27198
27199         * gimplify.c (gimplify_scan_omp_clauses): No special handling for
27200         OMP_CLAUSE_TILE.
27201         (gimplify_adjust_omp_clauses): Don't delete TILE.
27202         (gimplify_omp_for): Deal with TILE.
27203         * internal-fn.c (expand_GOACC_TILE): New function.
27204         * internal-fn.def (GOACC_DIM_POS): Comment may be overly conservative.
27205         (GOACC_TILE): New.
27206         * omp-expand.c (struct oacc_collapse): Add tile and outer fields.
27207         (expand_oacc_collapse_init): Add LOC paramter.  Initialize tile
27208         element fields.
27209         (expand_oacc_collapse_vars): Add INNER parm, adjust for tiling,
27210         avoid DIV for outermost collapse var.
27211         (expand_oacc_for): Insert tile element loop as needed.  Adjust.
27212         Remove out of date comments, fix whitespace.
27213         * omp-general.c (omp_extract_for_data): Deal with tiling.
27214         * omp-general.h (enum oacc_loop_flags): Add OLF_TILE flag,
27215         adjust OLF_DIM_BASE value.
27216         (struct omp_for_data): Add tiling field.
27217         * omp-low.c (scan_sharing_clauses): Allow OMP_CLAUSE_TILE.
27218         (lower_oacc_head_mark): Add OLF_TILE as appropriate.  Ensure 2 levels
27219         for auto loops.  Remove default auto determining, moved to
27220         oacc_loop_fixed_partitions.
27221         * omp-offload.c (struct oacc_loop): Change 'ifns' to vector of call
27222         stmts, add e_mask field.
27223         (oacc_dim_call): New function, abstracted out from oacc_thread_numbers.
27224         (oacc_thread_numbers): Use oacc_dim_call.
27225         (oacc_xform_tile): New.
27226         (new_oacc_loop_raw): Initialize e_mask, adjust for ifns vector.
27227         (finish_oacc_loop): Adjust for ifns vector.
27228         (oacc_loop_discover_walk): Append loop abstraction sites to list,
27229         add case for GOACC_TILE fns.
27230         (oacc_loop_xform_loop): Delete.
27231         (oacc_loop_process): Iterate over call list directly, and add
27232         handling for GOACC_TILE fns.
27233         (oacc_loop_fixed_partitions): Determine default auto, deal with TILE,
27234         dump partitioning.
27235         (oacc_loop_auto_partitions): Add outer_assign parm. Assign all but
27236         vector partitioning to outer loops.  Assign 2 partitions to loops
27237         when available. Add TILE handling.
27238         (oacc_loop_partition): Adjust oacc_loop_auto_partitions call.
27239         (execite_oacc_device_lower): Process GOACC_TILE fns,
27240         ignore unknown specs.
27241         * tree-nested.c (convert_nonlocal_omp_clauses): Allow OMP_CLAUSE_TILE.
27242         * tree.c (omp_clause_num_ops): Adjust TILE ops.
27243         * tree.h (OMP_CLAUSE_TILE_ITERVAR, OMP_CLAUSE_TILE_COUNT): New.
27244
27245 2017-02-09  Gerald Pfeifer  <gerald@pfeifer.com>
27246
27247         * configure.ac (ACX_BUGURL): Update.
27248         * configure: Regenerate.
27249
27250 2017-02-09  Richard Biener  <rguenther@suse.de>
27251
27252         PR tree-optimization/69823
27253         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
27254         Properly enumerate all BBs in the region.  Use auto_vec/auto_bitmap.
27255
27256 2017-02-09  Andrew Burgess  <andrew.burgess@embecosm.com>
27257
27258         * config/arc/arc-c.def: Add __NPS400__ definition.
27259         * config/arc/arc.h (CPP_SPEC): Don't define __NPS400__ here.
27260         (TARGET_NPS400): Define.
27261
27262 2017-02-09  Andrew Burgess  <andrew.burgess@embecosm.com>
27263
27264         * config/arc/arc-arch.h (arc_arch_t): Move unchanged to earlier in
27265         file.
27266         (arc_cpu_t): Change base_architecture field, arch, to a arc_arc_t
27267         pointer, arch_info.
27268         (arc_cpu_types): Fill the arch_info field with a pointer into the
27269         arc_arch_types table.
27270         (arc_selected_cpu): Declare.
27271         * config/arc/arc.c (arc_selected_cpu): Make global.
27272         (arc_selected_arch): Delete.
27273         (arc_base_cpu): Delete.
27274         (arc_override_options): Remove references to deleted variables,
27275         update access to arch information.
27276         (ARC_OPT): Update access to arch information.
27277         (ARC_OPTX): Likewise.
27278         * config/arc/arc.h (arc_base_cpu): Remove declaration.
27279         (TARGET_ARC600): Update access to arch information.
27280         (TARGET_ARC601): Likewise.
27281         (TARGET_ARC700): Likewise.
27282         (TARGET_EM): Likewise.
27283         (TARGET_HS): Likewise.
27284         * config/arc/driver-arc.c (arc_cpu_to_as): Update access to arch
27285         information.
27286
27287 2017-02-08  Pat Haugen  <pthaugen@us.ibm.com>
27288
27289         PR target/78604
27290         * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Invert
27291         condition/operands for integer GE/LE/GEU/LEU operations.
27292
27293 2017-02-08  Segher Boessenkool  <segher@kernel.crashing.org>
27294
27295         PR translation/79397
27296         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Fix spelling
27297         of AltiVec.
27298
27299 2017-02-08  Martin Jambor  <mjambor@suse.cz>
27300
27301         PR ipa/79375
27302         * ipa-prop.c (ipa_alloc_node_params): Make static, return bool
27303         whether allocation happened.
27304         (ipa_initialize_node_params): Do not call ipa_alloc_node_params if
27305         nothing was allocated.
27306
27307 2017-02-08  Jakub Jelinek  <jakub@redhat.com>
27308
27309         PR tree-optimization/79408
27310         * tree-vrp.c (simplify_div_or_mod_using_ranges): If op1 is not
27311         constant, but SSA_NAME with a known integer range, use the minimum
27312         of that range instead of op1 to determine if modulo can be replaced
27313         with its first operand.
27314
27315 2016-02-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27316
27317         * config/riscv/riscv.c (riscv_build_integer_1): Avoid use of INT16_MAX.
27318
27319 2017-02-08  Richard Biener  <rguenther@suse.de>
27320
27321         PR tree-optimization/71824
27322         * graphite-scop-detection.c (scop_detection::build_scop_breadth):
27323         Check all loops contained in the merged region.
27324
27325 2017-02-07  Andrew Pinski  <apinski@cavium.com>
27326
27327         * config/aarch64/aarch64.md (popcount<mode>2): New pattern.
27328
27329 2017-02-07  Andrew Pinski  <apinski@cavium.com>
27330
27331         * config/aarch64/aarch64-cores.def (thunderx): Disable LSE.
27332         (thunderxt88): Likewise.
27333         (thunderxt81): Disable LSE and change v8.1 to v8.
27334         (thunderxt83): Likewise.
27335
27336 2017-02-07  Jakub Jelinek  <jakub@redhat.com>
27337             Richard Biener  <rguenther@suse.de>
27338
27339         PR middle-end/79399
27340         * ira-int.h (struct target_ira_int): Change x_max_struct_costs_size
27341         type from int to size_t.
27342         * ira-costs.c (struct_costs_size): Change type from int to size_t.
27343
27344 2017-02-07  Jakub Jelinek  <jakub@redhat.com>
27345
27346         PR rtl-optimization/79386
27347         * cprop.c (bypass_conditional_jumps): Initialize
27348         bypass_last_basic_block already before splitting bbs after
27349         unconditional traps...
27350         (bypass_conditional_jumps): ... rather than here.
27351
27352         PR target/79299
27353         * config/i386/sse.md (xtg_mode, gatherq_mode): New mode attrs.
27354         (*avx512f_gathersi<mode>, *avx512f_gathersi<mode>_2,
27355         *avx512f_gatherdi<mode>, *avx512f_gatherdi<mode>_2): Use them,
27356         fix -masm=intel patterns.
27357
27358 2017-02-07  Richard Biener  <rguenther@suse.de>
27359
27360         PR tree-optimization/79256
27361         PR middle-end/79278
27362         * builtins.c (get_object_alignment_2): Use min_align_of_type
27363         to extract alignment for MEM_REFs to honor BIGGEST_FIELD_ALIGNMENT
27364         and ADJUST_FIELD_ALIGN.
27365
27366         * doc/tm.texi.in (ADJUST_FIELD_ALIGN): Adjust to take additional
27367         type parameter.
27368         * doc/tm.texi: Regenerate.
27369         * stor-layout.c (layout_decl): Adjust.
27370         (update_alignment_for_field): Likewise.
27371         (place_field): Likewise.
27372         (min_align_of_type): Likewise.
27373         * config/arc/arc.h (ADJUST_FIELD_ALIGN): Adjust.
27374         * config/epiphany/epiphany.h (ADJUST_FIELD_ALIGN): Likewise.
27375         * config/epiphany/epiphany.c (epiphany_adjust_field_align): Likewise.
27376         * config/frv/frv.h (ADJUST_FIELD_ALIGN): Likewise.
27377         * config/frv/frv.c (frv_adjust_field_align): Likewise.
27378         * config/i386/i386.h (ADJUST_FIELD_ALIGN): Likewise.
27379         * config/i386/i386.c (x86_field_alignment): Likewise.
27380         * config/rs6000/aix.h (ADJUST_FIELD_ALIGN): Likewise.
27381         * config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Likewise.
27382         * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
27383         * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
27384         * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Likewise.
27385         * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p):
27386          Likewise.
27387
27388         Revert
27389         2017-01-30  Richard Biener  <rguenther@suse.de>
27390
27391         PR tree-optimization/79256
27392         * targhooks.c (default_builtin_vector_alignment_reachable): Honor
27393         BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus
27394         alignment on TYPE.
27395
27396 2017-02-07  Toma Tabacu  <toma.tabacu@imgtec.com>
27397
27398         * config/mips/mips.c (mips_expand_builtin_insn): Convert the QImode
27399         argument of the pshufh, psllh, psllw, psrah, psraw, psrlh, psrlw
27400         builtins to SImode and emit a zero-extend, if necessary.
27401
27402 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
27403
27404         * docs/invoke.texi (RISC-V Options): Alphabetize.
27405
27406 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
27407
27408         * doc/invoke.texi (RISC-V Options): Use two spaces to separate
27409         options.
27410
27411 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
27412
27413         * config/riscv/riscv.c: New file.
27414         * common/config/riscv/riscv-common.c: Likewise.
27415         * config.gcc: Likewise.
27416         * config/riscv/constraints.md: Likewise.
27417         * config/riscv/elf.h: Likewise.
27418         * config/riscv/generic.md: Likewise.
27419         * config/riscv/linux.h: Likewise.
27420         * config/riscv/multilib-generator: Likewise.
27421         * config/riscv/peephole.md: Likewise.
27422         * config/riscv/pic.md: Likewise.
27423         * config/riscv/predicates.md: Likewise.
27424         * config/riscv/riscv-builtins.c: Likewise.
27425         * config/riscv/riscv-c.c: Likewise.
27426         * config/riscv/riscv-ftypes.def: Likewise.
27427         * config/riscv/riscv-modes.def: Likewise.
27428         * config/riscv/riscv-opts.h: Likewise.
27429         * config/riscv/riscv-protos.h: Likewise.
27430         * config/riscv/riscv.h: Likewise.
27431         * config/riscv/riscv.md: Likewise.
27432         * config/riscv/riscv.opt: Likewise.
27433         * config/riscv/sync.md: Likewise.
27434         * config/riscv/t-elf-multilib: Likewise.
27435         * config/riscv/t-linux: Likewise.
27436         * config/riscv/t-linux-multilib: Likewise.
27437         * config/riscv/t-riscv: Likewise.
27438         * configure.ac: Likewise.
27439         * doc/contrib.texi: Add Kito Cheng, Palmer Dabbelt, and Andrew
27440         Waterman as RISC-V maintainers.
27441         * doc/install.texi: Add RISC-V entries.
27442         * doc/invoke.texi: Add RISC-V options section.
27443         * doc/md.texi: Add RISC-V constraints section.
27444         * configure: Regenerated.
27445
27446 2017-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
27447
27448         PR target/66144
27449         * config/rs6000/vector.md (vcond<mode><mode>): Allow the true and
27450         false values to be constant vectors with all 0 or all 1 bits set.
27451         (vcondu<mode><mode>): Likewise.
27452         * config/rs6000/predicates.md (vector_int_reg_or_same_bit): New
27453         predicate.
27454         (fpmask_comparison_operator): Update comment.
27455         (vecint_comparison_operator): New predicate.
27456         * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Optimize
27457         vector conditionals when the true and false values are constant
27458         vectors with all 0 bits or all 1 bits set.
27459
27460 2017-02-06  Martin Sebor  <msebor@redhat.com>
27461
27462         PR  tree-optimization/79376
27463         * gimple-fold.c (get_range_strlen): Set the minimum length to zero.
27464
27465 2017-02-06  Uros Bizjak  <ubizjak@gmail.com>
27466
27467         * config/i386/sse.md (vector modes -> vec_extract* splitter): Use
27468         explicit subreg RTX with operand 1.  Use VECTOR_MODE_P predicate
27469         to simplify split condition.
27470
27471 2017-02-06  Jakub Jelinek  <jakub@redhat.com>
27472
27473         * omp-expand.c (oxpand_omp_atomic_fetch_op,
27474         expand_omp_atomic_pipeline): Return false if can_atomic_load_p is
27475         false.
27476
27477 2017-02-06  Segher Boessenkool  <segher@kernel.crashing.org>
27478
27479         PR rtl-optimization/68664
27480         * target.def (can_speculate_insn): New hook.
27481         * doc/tm.texi.in (TARGET_SCHED_CAN_SPECULATE_INSN): New hook.
27482         * doc/tm.texi: Regenerate.
27483         * sched-rgn.c (can_schedule_ready_p): Use the new hook.
27484         * config/rs6000/rs6000.c (TARGET_SCHED_CAN_SPECULATE_INSN): New macro.
27485         (rs6000_sched_can_speculate_insn): New function.
27486
27487 2017-02-06  Jakub Jelinek  <jakub@redhat.com>
27488
27489         PR tree-optimization/79284
27490         * tree-vectorizer.h (VECT_SCALAR_BOOLEAN_TYPE_P): Define.
27491         * tree-vect-stmts.c (vect_get_vec_def_for_operand,
27492         vectorizable_mask_load_store, vectorizable_operation,
27493         vect_is_simple_cond, get_same_sized_vectype): Use it instead
27494         of comparing TREE_CODE of a type against BOOLEAN_TYPE.
27495         * tree-vect-patterns.c (check_bool_pattern, search_type_for_mask_1,
27496         vect_recog_bool_pattern, vect_recog_mask_conversion_pattern): Likewise.
27497         * tree-vect-slp.c (vect_get_constant_vectors): Likewise.
27498         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
27499         Remove redundant gimple_code (stmt) == GIMPLE_ASSIGN test after
27500         is_gimple_assign (stmt).  Replace another such test with
27501         is_gimple_assign (stmt).
27502
27503 2017-02-06  Georg-Johann Lay  <avr@gjlay.de>
27504
27505         PR target/78883
27506         * config/avr/avr.c (rtl-iter.h): Include it.
27507         (TARGET_LEGITIMATE_COMBINED_INSN): New hook define...
27508         (avr_legitimate_combined_insn): ...and implementation.
27509
27510 2017-02-06  Dominik Vogt  <vogt@linux.vnet.ibm.com>
27511
27512         * config/s390/predicates.md ("larl_operand"): Use macros from hwint.h.
27513         * config/s390/s390.c (s390_const_operand_ok)
27514         (s390_canonicalize_comparison, s390_extract_part)
27515         (s390_single_part, s390_contiguous_bitmask_nowrap_p)
27516         (s390_contiguous_bitmask_p, s390_rtx_costs)
27517         (legitimize_pic_address): Likewise.
27518         * config/s390/s390.md ("clzdi2", "clztidi2"): Likewise.
27519         * config/s390/vx-builtins.md ("vec_genbytemaskv16qi")
27520         ("vec_permi<mode>", "vfae<mode>", "*vfaes<mode>", "vstrc<mode>")
27521         ("*vstrcs<mode>"): Use UINTVAL() to set unsigned HOST_WIDE_INT.
27522         * config/s390/vector.md ("vec_vfenes<mode>"): Likewise.
27523
27524 2017-02-06  Georg-Johann Lay  <avr@gjlay.de>
27525
27526         * config/avr/avr.md (*addhi3_zero_extend): Add alternative where
27527         REGNO($0) == REGNO($1).
27528
27529 2017-02-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27530
27531         * config/s390/linux.h(SIZE_TYPE): Add comment.
27532
27533 2017-02-06  Julian Brown  <julian@codesourcery.com>
27534             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
27535             Virendra Pathak  <virendra.pathak@broadcom.com>
27536
27537         * config/aarch64/aarch64-cores.def: Change the scheduler
27538         to Thunderx2t99.
27539         * config/aarch64/aarch64.md: Include thunderx2t99.md.
27540         * config/aarch64/thunderx2t99.md: New file.
27541
27542 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
27543
27544         * doc/standards.texi (Go Language): Update link to language
27545         standard.
27546
27547 2017-02-05  Jan Hubicka  <hubicka@ucw.cz>
27548
27549         * tree-eh.c (lower_resx): Sanitize profile.
27550         (cleanup_empty_eh_move_lp): Likewise.
27551
27552 2017-02-05  Jan Hubicka  <hubicka@ucw.cz>
27553
27554         PR tree-ssa/79347
27555         * cfgloopmanip.c (lv_adjust_loop_entry_edge, loop_version): Add
27556         ELSE_PROB.
27557         * cfgloopmanip.h (loop_version): Update prototype.
27558         * modulo-sched.c (sms_schedule): Update call of loop_version.
27559         * tree-if-conv.c(version_loop_for_if_conversion): Likewise.
27560         * tree-parloops.c (gen_parallel_loop): Likewise.
27561         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Likewise.
27562         * tree-ssa-loop-split.c (split_loop): Likewise.
27563         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Likewise.
27564         * tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
27565
27566 2017-02-05  Martin Liska  <mliska@suse.cz>
27567
27568         PR bootstrap/78985
27569         * config/s390/s390.c (s390_gimplify_va_arg): Initialize local
27570         variable to NULL.
27571         (print_operand_address): Initialize a struct to zero.
27572
27573 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
27574
27575         * doc/contrib.texi (Contributors): Refer to Hans Boehm's
27576         garbage collector only in textual form.
27577
27578 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
27579
27580         * doc/extend.texi (x86 specific memory model extensions for
27581         transactional memory): Simplify a phrase.
27582
27583 2017-02-05  Eric Botcazou  <ebotcazou@adacore.com>
27584
27585         PR target/79353
27586         * config/sparc/sync.md (atomic_loaddi_1): Replace 'U' constraint with
27587         'r', 'm' constraint with 'T' and !TARGET_ARCH64 with TARGET_ARCH32.
27588         (atomic_storedi_1): Likewise.
27589
27590 2017-02-04  Jakub Jelinek  <jakub@redhat.com>
27591
27592         PR tree-optimization/79338
27593         * tree-parloops.c (gather_scalar_reductions): Don't call
27594         vect_analyze_loop_form for loop->inner before destroying loop's
27595         loop_vinfo.
27596
27597 2017-02-03  Martin Sebor  <msebor@redhat.com>
27598
27599         PR tree-optimization/79327
27600         * gimple-ssa-sprintf.c (tree_digits): Avoid adding the base prefix
27601         when precision has resulted in leading zeros.
27602         (format_integer): Adjust the likely counter to assume an unknown
27603         argument that may be zero is non-zero.
27604
27605 2017-02-03  Jason Merrill  <jason@redhat.com>
27606
27607         PR c++/78689
27608         * tree-inline.c (copy_tree_body_r) [COND_EXPR]: Revert change to
27609         avoid copying non-taken branch.
27610
27611 2017-02-03  Jakub Jelinek  <jakub@redhat.com>
27612
27613         PR tree-optimization/79340
27614         * tree-vect-loop.c (vectorizable_reduction): Release
27615         vec_defs elements after safe_splicing them into other vectors.
27616         Formatting fixes.
27617
27618         PR tree-optimization/79327
27619         * gimple-ssa-sprintf.c (adjust_range_for_overflow): If returning
27620         true, always set *argmin and *argmax to TYPE_{MIN,MAX}_VALUE of
27621         dirtype.
27622         (format_integer): Use wide_int_to_tree instead of build_int_cst
27623         + to_?hwi.  If argmin is NULL, just set argmin and argmax to
27624         TYPE_{MIN,MAX}_VALUE of argtype.  Simplify and fix computation
27625         of shortest and longest sequence.
27626
27627 2017-02-03  Uros Bizjak  <ubizjak@gmail.com>
27628
27629         * config/i386/i386.c (dimode_scalar_chain::convert_reg):
27630         Use pextrd for TARGET_SSE4_1 when creating scalar copy.
27631
27632 2017-02-03  Walter Lee  <walt@tilera.com>
27633
27634         PR target/78862
27635         * config/tilegx/tilegx.md (tilegx_expand_prologue): Add blockage
27636         after initial stackframe link reg save.
27637         * config/tilepro/tilepro.md (tilepro_expand_prologue): Likewise.
27638
27639 2017-02-03  Jakub Jelinek  <jakub@redhat.com>
27640
27641         PR target/79354
27642         * config/rs6000/rs6000.md (movsi_from_sf): Use wb constraint instead of
27643         wu for stxssp alternative.
27644
27645 2017-02-03  Martin Sebor  <msebor@redhat.com>
27646
27647         PR tree-optimization/79352
27648         * gimple-fold.c (get_range_strlen): Add argument.
27649         (get_range_strlen): Change return type to bool.
27650         (get_maxval_strlen): Pass in a dummy argument.
27651         * gimple-fold.h (get_range_strlen): Change return type to bool.
27652         * gimple-ssa-sprintf.c (get_string_length): Set unlikely counter.
27653         * tree.h (array_at_struct_end_p): Add argument.
27654         * tree.c (array_at_struct_end_p): Handle it.
27655
27656 2017-02-03  Martin Liska  <mliska@suse.cz>
27657
27658         PR lto/66295
27659         * multiple_target.c (create_dispatcher_calls): Redirect edge
27660         from a caller of a dispatcher.
27661         (expand_target_clones): Make the clones local.
27662         (ipa_target_clone): Do both target clones and resolvers.
27663         (ipa_dispatcher_calls): Remove the pass.
27664         (pass_dispatcher_calls::gate): Likewise.
27665         (make_pass_dispatcher_calls): Likewise.
27666         * passes.def (pass_target_clone): Put as very first IPA early
27667         pass.
27668
27669 2017-02-03  Martin Liska  <mliska@suse.cz>
27670
27671         * symtab.c (symtab_node::binds_to_current_def_p): Bail out
27672         in case of a function with ifunc attribute.
27673
27674 2017-02-03  Martin Liska  <mliska@suse.cz>
27675
27676         * cgraph.c (cgraph_node::dump): Dump function version info.
27677         * symtab.c (symtab_node::dump_base): Add missing new line.
27678
27679 2017-02-02  Jan Hubicka  <hubicka@ucw.cz>
27680
27681         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): New function.
27682         (ifcombine_ifandif): Use it.
27683
27684 2017-02-03  Martin Liska  <mliska@suse.cz>
27685
27686         * doc/invoke.texi: Document default value for
27687         use-after-scope-direct-emission-threshold.
27688
27689 2017-02-03  Martin Liska  <mliska@suse.cz>
27690
27691         PR tree-optimization/79339
27692         * gimple-ssa-sprintf.c (format_floating_max): Call mpfr_clear.
27693         (format_floating): Likewise.
27694
27695 2017-02-03  Martin Liska  <mliska@suse.cz>
27696
27697         PR ipa/79337
27698         * ipa-prop.c (ipa_node_params_t::insert): Remove current
27699         implementation.
27700         (ipa_node_params_t::remove): Likewise.
27701         * ipa-prop.h (ipa_node_params::ipa_node_params): Make default
27702         initialization from removed ipa_node_params_t::insert.
27703         (ipa_node_params::~ipa_node_params): Move from removed
27704         ipa_node_params_t::release.
27705         * symbol-summary.h (symbol_summary::m_released): New member.
27706         Do not release a summary twice.  Do not allow to call finalizer
27707         for types of a summary that live in GGC memory.
27708
27709 2017-02-02  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
27710
27711         * config/aarch64/aarch64.c (thunderx2t99_tunings): Enable AES and
27712         cmp_branch fusion.
27713
27714 2017-02-02  Martin Sebor  <msebor@redhat.com>
27715
27716         PR middle-end/79275
27717         * gimple-ssa-sprintf.c (get_string_length): Set lower bound to zero.
27718         (format_string): Tighten up the range of output for non-constant
27719         strings and correct the expected range for wide non-constant strings.
27720
27721 2017-02-02  Martin Sebor  <msebor@redhat.com>
27722
27723         * doc/invoke.texi (-maccumulate-args): Fix bad grammar.
27724
27725         PR middle-end/32003
27726         * doc/invoke.texi (-fdump-tree-): Remove pass-specific options from
27727         index.
27728         (-fdump-tree-@var): Add to index and document how to come up
27729         with pass-specific option and dump file names.
27730         (-fdump-passes): Clarify where to look for output.
27731
27732 2017-02-02  Jan Hubicka  <hubicka@ucw.cz>
27733
27734         PR middle-end/77445
27735         * tree-ssa-threadbackward.c (profitable_jump_thread_path): Dump
27736         statistics of the analyzed path; allow threading for speed when
27737         any of BBs along the path are optimized for speed.
27738
27739 2017-02-02  Eric Botcazou  <ebotcazou@adacore.com>
27740
27741         PR middle-end/78468
27742         * emit-rtl.c (init_emit): Add ??? comment for problematic alignment
27743         settings of the virtual registers.
27744
27745         Revert again
27746         2016-08-23  Dominik Vogt  <vogt@linux.vnet.ibm.com>
27747
27748         * explow.c (get_dynamic_stack_size): Take known alignment of stack
27749         pointer + STACK_DYNAMIC_OFFSET into account when calculating the size
27750         needed.
27751
27752 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27753
27754         * config/s390/vx-builtins.md ("vec_ceil", "vec_floor")
27755         ("vec_trunc", "vec_roundc", "vec_round"): Remove expanders.
27756
27757 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27758
27759         * config/s390/s390.md: Add missing comments with the expanded
27760         mnemonics.
27761         * config/s390/vector.md: Likewise.
27762         * config/s390/vx-builtins.md: Likewise.
27763
27764 2017-02-02  Jakub Jelinek  <jakub@redhat.com>
27765
27766         PR target/79197
27767         * config/rs6000/rs6000.md (*fixuns_trunc<mode>di2_fctiduz): Rename to ...
27768         (fixuns_trunc<mode>di2): ... this, remove previous expander.  Put all
27769         conditions on a single line.
27770
27771 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27772
27773         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename
27774         __S390_VX__ to __VX__.
27775
27776 2017-02-01  Andrew Pinski  <apinski@cavium.com>
27777
27778         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost): Pass
27779         stmt_info to record_stmt_cost.
27780         (vect_get_known_peeling_cost): Pass stmt_info if known to
27781         record_stmt_cost.
27782         * config/aarch64/aarch64-protos.h (cpu_vector_cost): Split
27783         cpu_vector_cost field into
27784         scalar_int_stmt_cost and scalar_fp_stmt_cost.  Split vec_stmt_cost
27785         field into vec_int_stmt_cost and vec_fp_stmt_cost.
27786         * config/aarch64/aarch64.c (generic_vector_cost): Update for the
27787         splitting of scalar_stmt_cost and vec_stmt_cost.
27788         (thunderx_vector_cost): Likewise.
27789         (cortexa57_vector_cost): LIkewise.
27790         (exynosm1_vector_cost): Likewise.
27791         (xgene1_vector_cost): Likewise.
27792         (thunderx2t99_vector_cost): Improve after the splitting of the two
27793         fields.
27794         (aarch64_builtin_vectorization_cost): Update for the splitting of
27795         scalar_stmt_cost and vec_stmt_cost.
27796
27797 2017-02-01  Torvald Riegel  <triegel@redhat.com>
27798             Richard Henderson  <rth@redhat.com>
27799
27800         * builtins.c (fold_builtin_atomic_always_lock_free): Make "lock-free"
27801         conditional on existance of a fast atomic load.
27802         * optabs-query.c (can_atomic_load_p): New function.
27803         * optabs-query.h (can_atomic_load_p): Declare it.
27804         * optabs.c (expand_atomic_exchange): Always delegate to libatomic if
27805         no fast atomic load is available for the particular size of access.
27806         (expand_atomic_compare_and_swap): Likewise.
27807         (expand_atomic_load): Likewise.
27808         (expand_atomic_store): Likewise.
27809         (expand_atomic_fetch_op): Likewise.
27810         * testsuite/lib/target-supports.exp
27811         (check_effective_target_sync_int_128): Remove x86 because it provides
27812         no fast atomic load.
27813         (check_effective_target_sync_int_128_runtime): Likewise.
27814
27815 2017-02-01  Richard Biener  <rguenther@suse.de>
27816
27817         * graphite.c: Include tree-vectorizer.h for find_loop_location.
27818         (graphite_transform_loops): Provide opt-info for optimized nests.
27819         * tree-parloop.c (parallelize_loops): Provide opt-info for
27820         parallelized loops.
27821
27822 2017-02-01  Richard Biener  <rguenther@suse.de>
27823
27824         PR middle-end/79315
27825         * tree-cfg.c (move_stmt_op): Never set TREE_BLOCK when it
27826         was not set before.
27827
27828 2017-02-01  Richard Biener  <rguenther@suse.de>
27829
27830         PR tree-optimization/71824
27831         * graphite-scop-detection.c (scop_detection::build_scop_breadth):
27832         Verify the loops are valid in the merged SESE region.
27833         (scop_detection::can_represent_loop_1): Check analyzing the
27834         evolution of the number of iterations in the region succeeds.
27835
27836 2017-01-31  Ian Lance Taylor  <iant@golang.org>
27837
27838         * config/i386/i386.c (ix86_expand_split_stack_prologue): Add
27839         REG_ARGS_SIZE note to 32-bit push insns and call insn.
27840
27841 2017-01-31  David Malcolm  <dmalcolm@redhat.com>
27842
27843         PR preprocessor/79210
27844         * input.c (get_substring_ranges_for_loc): Replace line_width
27845         assertion with error-handling.
27846
27847 2017-01-31  Richard Biener  <rguenther@suse.de>
27848
27849         PR tree-optimization/77318
27850         * graphite-sese-to-poly.c (extract_affine): Fix assert.
27851         (create_pw_aff_from_tree): Take loop parameter.
27852         (add_condition_to_pbb): Pass loop of the condition to
27853         create_pw_aff_from_tree.
27854
27855 2017-01-31  Jakub Jelinek  <jakub@redhat.com>
27856
27857         * config/s390/s390.c (s390_asan_shadow_offset): New function.
27858         (TARGET_ASAN_SHADOW_OFFSET): Redefine.
27859
27860 2017-01-31  Michael Meissner  <meissner@linux.vnet.ibm.com>
27861
27862         PR target/78597
27863         PR target/79038
27864         * config/rs6000/rs6000-protos.h (convert_float128_to_int): Delete,
27865         no longer used.
27866         (convert_int_to_float128): Likewise.
27867         * config/rs6000/rs6000.c (convert_float128_to_int): Likewise.
27868         (convert_int_to_float128): Likewise.
27869         * config/rs6000/rs6000.md (UNSPEC_IEEE128_MOVE): Likewise.
27870         (UNSPEC_IEEE128_CONVERT): Likewise.
27871         (floatsi<mode>2, FLOAT128 iterator): Bypass calling
27872         rs6000_expand_float128_convert if we have IEEE 128-bit hardware.
27873         Use local variables for IBM extended format.
27874         (fix_trunc<mode>si2, FLOAT128 iterator): Likewise.
27875         (fix_trunc<mode>si2_fprs): Likewise.
27876         (fixuns_trunc<IEEE128:mode><SDI:mode>2): Likewise.
27877         (floatuns<IEEE128:mode>2, IEEE128 iterator): Likewise.
27878         (fix<uns>_<mode>si2_hw): Rework the IEEE 128-bt hardware support
27879         to know that we can now have integers of all sizes in vector
27880         registers.
27881         (fix<uns>_<mode>di2_hw): Likewise.
27882         (float<uns>_<mode>si2_hw): Likewise.
27883         (fix_<mode>si2_hw): Likewise.
27884         (fixuns_<mode>si2_hw): Likewise.
27885         (float<uns>_<mode>di2_hw): Likewise.
27886         (float_<mode>di2_hw): Likewise.
27887         (float_<mode>si2_hw): Likewise.
27888         (floatuns_<mode>di2_hw): Likewise.
27889         (floatuns_<mode>si2_hw): Likewise.
27890         (xscvqp<su>wz_<mode>): Delete, no longer used.
27891         (xscvqp<su>dz_<mode>): Likewise.
27892         (xscv<su>dqp_<mode>): Likewise.
27893         (ieee128_mfvsrd_64bit): Likewise.
27894         (ieee128_mfvsrd_32bit): Likewise.
27895         (ieee128_mfvsrwz): Likewise.
27896         (ieee128_mtvsrw): Likewise.
27897         (ieee128_mtvsrd_64bit): Likewise.
27898         (ieee128_mtvsrd_32bit): Likewise.
27899
27900 2017-01-31  Martin Liska  <mliska@suse.cz>
27901
27902         PR ipa/79285
27903         * ipa-prop.c (ipa_free_all_node_params): Call release method
27904         instead of ~sumbol_summary to not to trigger double times
27905         dtor of hash_map.
27906
27907 2017-01-31  Aldy Hernandez  <aldyh@redhat.com>
27908
27909         PR tree-optimization/71691
27910         * bitmap.h (class auto_bitmap): New.
27911         * tree-ssa-loop-unswitch.c (tree_may_unswitch_on): Call
27912         is_maybe_undefined instead of ssa_undefined_value_p.
27913
27914 2017-01-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27915
27916         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename
27917         __S390_ARCH_LEVEL__ to __ARCH__.
27918
27919 2017-01-31  Jakub Jelinek  <jakub@redhat.com>
27920
27921         PR tree-optimization/79267
27922         * value-prof.c (gimple_ic): Only drop lhs for noreturn calls
27923         if should_remove_lhs_p is true.
27924
27925 2017-01-30  Alexandre Oliva <aoliva@redhat.com>
27926
27927         PR debug/63238
27928         * dwarf2out.c (clone_as_declaration): Drop DW_AT_alignment.
27929         (add_alignment_attribute): New.
27930         (base_type_die): Add alignment attribute.
27931         (subrange_type_die): Likewise.
27932         (modified_type_die): Likewise.
27933         (gen_array_type_die): Likewise.
27934         (gen_descr_array_type_die: Likewise.
27935         (gen_enumeration_type_die): Likewise.
27936         (gen_subprogram_die): Likewise.
27937         (gen_variable_die): Likewise.
27938         (gen_field_die): Likewise.
27939         (gen_ptr_to_mbr_type_die): Likewise.
27940         (gen_struct_or_union_type_die): Likewise.
27941         (gen_subroutine_type_die): Likewise.
27942         (gen_typedef_die): Likewise.
27943         (base_type_cmp): Compare alignment attribute.
27944
27945 2017-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
27946
27947         PR target/79170
27948         * config/rs6000/altivec.md (*setb_internal): Rename to setb_signed.
27949         (setb_unsigned) New pattern for setb with CCUNS.
27950         * config/rs6000/rs6000.c (expand_block_compare): Use a different
27951         subfc./subfe sequence to avoid overflow problems.  Generate a
27952         shorter sequence with cmpld/setb for power9.
27953         * config/rs6000/rs6000.md (subf<mode>3_carry_dot2): Add a new pattern
27954         for generating subfc. instruction.
27955         (cmpstrsi): Add TARGET_POPCNTD predicate as the generate sequence
27956         now uses this instruction.
27957
27958 2017-01-30  Ian Lance Taylor  <iant@google.com>
27959
27960         PR debug/79289
27961         * dwarf2out.c (gen_type_die_with_usage): When picking a variant
27962         for FUNCTION_TYPE/METHOD_TYPE, use the first matching one.
27963
27964 2017-01-30  Martin Sebor  <msebor@redhat.com>
27965
27966         * gimple-ssa-sprintf.c (fmtresult::adjust_for_width_or_precision):
27967         Move constant to the right of a relational operator.
27968         (get_mpfr_format_length, format_character, format_string): Ditto.
27969         (should_warn_p, maybe_warn): Same.
27970
27971         * doc/invoke.texi (-Wformat-truncation=1): Fix typo.
27972
27973 2017-01-30  Maxim Ostapenko  <m.ostapenko@samsung.com>
27974
27975         PR lto/79061
27976         * asan.c (get_translation_unit_decl): Remove function.
27977         (asan_add_global): Force has_dynamic_init to zero in LTO mode.
27978
27979 2017-01-30  Martin Liska  <mliska@suse.cz>
27980
27981         PR gcov-profile/79259
27982         * opts.c (common_handle_option): Enable flag_ipa_bit_cp w/
27983         -fprofile-generate.
27984
27985 2017-01-30  Martin Liska  <mliska@suse.cz>
27986
27987         PR bootstrap/78985
27988         * config/aarch64/cortex-a57-fma-steering.c (func_fma_steering::analyze):
27989         Initialize variables with NULL value.
27990
27991 2017-01-30  Richard Earnshaw  <rearnsh@arm.com>
27992
27993         PR target/79260
27994         * config.gcc (arm*-*-*): Add arm/arm-flags.h and arm/arm-isa.h to
27995         tm_p_file.
27996         * arm/arm-protos.h: Don't directly include arm-flags.h and arm-isa.h.
27997
27998 2017-01-30  Richard Biener  <rguenther@suse.de>
27999
28000         PR tree-optimization/79276
28001         * tree-vrp.c (process_assert_insertions): Properly adjust common
28002         when removing a duplicate.
28003
28004         * gcc.dg/torture/pr79276.c: New testcase.
28005
28006 2017-01-30  Richard Biener  <rguenther@suse.de>
28007
28008         PR tree-optimization/79256
28009         * targhooks.c (default_builtin_vector_alignment_reachable): Honor
28010         BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus
28011         alignment on TYPE.
28012         * tree.c (build_aligned_type): Set TYPE_USER_ALIGN.
28013
28014 2017-01-30  Dominik Vogt  <vogt@linux.vnet.ibm.com>
28015
28016         PR target/79240
28017         * config/s390/s390.md ("*r<noxa>sbg_<mode>_srl_bitmask")
28018         ("*r<noxa>sbg_<mode>_sll_bitmask")
28019         ("*extzv_<mode>_srl<clobbercc_or_nocc>")
28020         ("*extzv_<mode>_sll<clobbercc_or_nocc>"):
28021         Use contiguous_bitmask_nowrap_operand.
28022
28023 2017-01-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28024
28025         PR target/79268
28026         * config/rs6000/altivec.h (vec_xl): Revise #define.
28027         (vec_xst): Likewise.
28028
28029 2017-01-27  Uros Bizjak  <ubizjak@gmail.com>
28030
28031         * config/i386/i386.c (print_reg): Use REGNO instead of true_regnum.
28032
28033 2017-01-27  Bernd Schmidt  <bschmidt@redhat.com>
28034
28035         PR rtl-optimization/79194
28036         * cprop.c (one_cprop_pass): Move deletion of code after unconditional
28037         traps before call to bypass_conditional_jumps.
28038
28039 2017-01-27  Vladimir Makarov  <vmakarov@redhat.com>
28040
28041         PR tree-optimization/71374
28042         * lra-constraints.c (check_conflict_input_operands): New.
28043         (match_reload): Use it.
28044
28045 2017-01-27  Vladimir Makarov  <vmakarov@redhat.com>
28046
28047         PR target/79131
28048         * lra-assigns.c (find_hard_regno_for_1): Take endianess for into
28049         account to calculate conflict_set.
28050
28051 2017-01-27  Bin Cheng  <bin.cheng@arm.com>
28052
28053         PR rtl-optimization/78559
28054         * combine.c (try_combine): Discard REG_EQUAL and REG_EQUIV for
28055         other_insn in combine.
28056
28057 2017-01-27  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
28058
28059         * builtin-types.def: Use unsigned_char_type_node for BT_UINT8.  Use
28060         uint16_type_node for BT_UINT16.
28061
28062 2017-01-27  David Malcolm  <dmalcolm@redhat.com>
28063
28064         * doc/sourcebuild.texi (Testsuites): Add "GIMPLE Tests" and
28065         "RTL Tests" to menu.
28066         (GIMPLE Tests): New node.
28067         (RTL Tests): New node.
28068
28069 2017-01-27  Richard Biener  <rguenther@suse.de>
28070
28071         PR tree-optimization/79245
28072         * tree-loop-distribution.c (distribute_loop): Apply cost
28073         modeling also to detected patterns.
28074
28075 2017-01-27  Richard Biener  <rguenther@suse.de>
28076
28077         PR tree-optimization/71433
28078         * tree-vrp.c (register_new_assert_for): Revert earlier changes.
28079         (compare_assert_loc): New function.
28080         (process_assert_insertions): Sort and optimize assert locations
28081         to remove duplicates and push down identical assertions on
28082         edges to their destination block.
28083
28084 2017-01-27  Richard Biener  <rguenther@suse.de>
28085
28086         PR tree-optimization/79244
28087         * tree-vrp.c (remove_range_assertions): Forcefully propagate
28088         out SSA names even if abnormal.
28089
28090 2017-01-27  Jakub Jelinek  <jakub@redhat.com>
28091
28092         * realmpfr.h: Poison MPFR_RND{N,Z,U,D}.
28093         * gimple-ssa-sprintf.c (format_floating_max): Use GMP_RNDN
28094         instead of MPFR_RNDN.
28095
28096 2017-01-27  Richard Earnshaw  <rearnsha@arm.com>
28097
28098         PR target/79239
28099         * arm.c (arm_option_override): Don't call build_target_option_node
28100         until after doing all option overrides.
28101         (arm_valid_target_attribute_tree): Likewise.
28102
28103 2017-01-27  Martin Liska  <mliska@suse.cz>
28104
28105         * doc/invoke.texi (-fprofile-arcs): Document profiling support
28106         for {cd}tors and C++ {cd}tors.
28107
28108 2017-01-27  Dominik Vogt  <vogt@linux.vnet.ibm.com>
28109
28110         * config/s390/s390.md ("*setmem_long_and")
28111         ("*setmem_long_and_31z"): Use zero_extend instead of and.
28112
28113 2017-01-26  Martin Sebor  <msebor@redhat.com>
28114
28115         * gimple-ssa-sprintf.c (format_floating): Simplify the computation
28116         of precision.
28117
28118 2017-01-26  Martin Sebor  <msebor@redhat.com>
28119
28120         * gimple-ssa-sprintf.c (format_floating): Test HAVE_XFmode and
28121         HAVE_DFmode before using XFmode or DFmode.
28122         (parse_directive): Avoid using the z length modifier to avoid
28123         the ISO C++98 does not support the â€˜z’ gnu_printf length modifier.
28124
28125         PR middle-end/78703
28126         * gimple-ssa-sprintf.c (adjust_for_width_or_precision): Change
28127         to accept adjustment as an array.
28128         (get_int_range): New function.
28129         (struct directive): Make width and prec arrays.
28130         (directive::set_width, directive::set_precision): Call get_int_range.
28131         (format_integer, format_floating): Handle width and precision ranges.
28132         (format_string, parse_directive): Same.
28133
28134 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
28135
28136         PR debug/79129
28137         * dwarf2out.c (generate_skeleton_bottom_up): For children with
28138         comdat_type_p set, just clone them, but keep the children in the
28139         original DIE.
28140
28141         PR debug/78835
28142         * dwarf2out.c (prune_unused_types): Mark all functions with DIEs
28143         which have direct callers with -fvar-tracking-assignments enabled
28144         in the current TU.
28145         (resolve_addr): Avoid adding skeleton DIEs for DW_AT_call_origin
28146         inside of type units.
28147
28148 2017-01-26  Martin Sebor  <msebor@redhat.com>
28149
28150         PR middle-end/78703
28151         * gimple-ssa-sprintf.c (struct result_range): Add likely and
28152         unlikely counters.
28153         (struct format_result): Replace number_chars, number_chars_min,
28154         and number_chars_max with a single member of struct result_range.
28155         Remove bounded.
28156         (format_result::operator+=): Adjust.
28157         (struct fmtresult): Remove bounded.  Handle likely and unlikely
28158         counters.
28159         (fmtresult::adjust_for_width_or_precision): New function.
28160         (fmtresult:type_max_digits): New function.
28161         (bytes_remaining): Handle likely and unlikely counters.
28162         (min_bytes_remaining): Remove.
28163         (format_percent): Simplify.
28164         (format_integer, format_floating): Set likely and unlikely counters.
28165         (get_string_length, format_character, format_string): Same.
28166         (format_plain, should_warn_p): New function.
28167         (maybe_warn): Call should_warn_p.  Update diagnostic messages
28168         and handle those for all directives, including plain strings.
28169         (format_directive): Handle likely and unlikely counters.
28170         Remove unnecessary quoting from diagnostics.  Add an informational
28171         note.
28172         (add_bytes): Remove.
28173         (pass_sprintf_length::compute_format_length): Simplify.
28174         (try_substitute_return_value): Handle likely and unlikely counters.
28175
28176 2017-01-26  Carl Love  <cel@us.ibm.com>
28177
28178         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Remove
28179         bogus entries for the P8V_BUILTIN_VEC_VGBBD built-ins
28180
28181 2017-01-26  Vladimir Makarov  <vmakarov@redhat.com>
28182
28183         PR target/79131
28184         * lra-assigns.c (setup_live_pseudos_and_spill_after_risky): Take
28185         endianess for subregs into account.
28186         * lra-constraints.c (lra_constraints): Do risky transformations
28187         always on the first iteration.
28188         * lra-lives.c (check_pseudos_live_through_calls): Add arg
28189         last_call_used_reg_set.
28190         (process_bb_lives): Define and use last_call_used_reg_set.
28191         * lra.c (lra): Always continue after lra_constraints on the first
28192         iteration.
28193
28194 2017-01-26  Kirill Yukhin  <kirill.yukhin@gmail.com>
28195
28196         * gcc.target/i386/avx512bw-kshiftlq-2.c: Use unsigned long long
28197         constant.
28198         * gcc.target/i386/avx512bw-kshiftrq-2.c: Ditto.
28199
28200 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
28201
28202         * config/i386/avx512fintrin.h (_ktest_mask16_u8,
28203         _ktestz_mask16_u8, _ktestc_mask16_u8, _kadd_mask16): Move to ...
28204         * config/i386/avx512dqintrin.h (_ktest_mask16_u8,
28205         _ktestz_mask16_u8, _ktestc_mask16_u8, _kadd_mask16): ... here.
28206         * config/i386/i386-builtin.def (__builtin_ia32_ktestchi,
28207         __builtin_ia32_ktestzhi, __builtin_ia32_kaddhi): Use
28208         OPTION_MASK_ISA_AVX512DQ instead of OPTION_MASK_ISA_AVX512F.
28209         * config/i386/sse.md (SWI1248_AVX512BWDQ2): New mode iterator.
28210         (kadd<mode>, ktest<mode>): Use it instead of SWI1248_AVX512BWDQ.
28211
28212 2017-01-26  Marek Polacek  <polacek@redhat.com>
28213
28214         PR c/79199
28215         * fold-const.c (operand_equal_p) [COND_EXPR]: Use OP_SAME_WITH_NULL
28216         for the third operand.
28217
28218 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
28219
28220         PR middle-end/79236
28221         * omp-low.c (struct omp_context): Add simt_stmt field.
28222         (scan_omp_for): Return omp_context *.
28223         (scan_omp_simd): Set simt_stmt on the non-_simt_ SIMD
28224         context to the _simt_ SIMD stmt.
28225         (lower_omp_for): For combined SIMD with sibling _simt_
28226         SIMD, make sure to use the same decls in _looptemp_
28227         clauses as in the sibling.
28228
28229 2017-01-26  David Sherwood  <david.sherwood@arm.com>
28230
28231         PR middle-end/79212
28232         * gimplify.c (omp_notice_variable): Add GOVD_SEEN flag to variables in
28233         all contexts.
28234
28235 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
28236
28237         PR target/70465
28238         * reg-stack.c (emit_swap_insn): Instead of fld a; fld b; fxchg %st(1);
28239         emit fld b; fld a; if possible.
28240
28241         * brig-builtins.def: Update copyright years.
28242         * config/arm/arm_acle_builtins.def: Update copyright years.
28243
28244 2017-01-25  Michael Meissner  <meissner@linux.vnet.ibm.com>
28245
28246         PR target/79179
28247         * config/rs6000/vsx.md (vsx_extract_<mode>_store): Use wY
28248         constraint instead of o for the stxsd instruction.
28249
28250 2017-01-25  Carl Love  <cel@us.ibm.com>
28251
28252         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Fix order
28253         of entries for ALTIVEC_BUILTIN_VEC_PACKS and P8V_BUILTIN_VEC_VGBBD.
28254
28255 2017-01-25  Jonathan Wakely  <jwakely@redhat.com>
28256
28257         * doc/invoke.texi (C++ Dialect Options): Fix typo.
28258
28259 2017-01-25  Richard Biener  <rguenther@suse.de>
28260
28261         PR tree-optimization/69264
28262         * target.def (vector_alignment_reachable): Improve documentation.
28263         * doc/tm.texi: Regenerate.
28264         * targhooks.c (default_builtin_vector_alignment_reachable): Simplify
28265         and add a comment.
28266         * tree-vect-data-refs.c (vect_supportable_dr_alignment): Revert
28267         earlier changes with respect to TYPE_USER_ALIGN.
28268         (vector_alignment_reachable_p): Likewise.  Improve dumping.
28269
28270 2016-01-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28271
28272         PR target/79145
28273         * config/arm/arm.md (xordi3): Force constant operand into a register
28274         for TARGET_IWMMXT.
28275
28276 2016-01-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28277
28278         * doc/invoke.texi (-fstore-merging): Correct default optimization
28279         levels at which it is enabled.
28280         (-O): Move -fstore-merging from list to...
28281         (-O2): ... Here.
28282
28283 2017-01-25  Richard Biener  <rguenther@suse.de>
28284
28285         PR debug/78363
28286         * omp-expand.c: Include debug.h.
28287         (expand_omp_taskreg): Make sure to generate early debug before
28288         outlining anything from a function.
28289         (expand_omp_target): Likewise.
28290         (grid_expand_target_grid_body): Likewise.
28291
28292 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
28293
28294         PR lto/79061
28295         * asan.c (get_translation_unit_decl): New function.
28296         (asan_add_global): Extract modules file name from globals
28297         TRANSLATION_UNIT_DECL name.
28298
28299 2017-01-24  Eric Botcazou  <ebotcazou@adacore.com>
28300
28301         PR target/77439
28302         * config/arm/arm.c (arm_function_ok_for_sibcall): Add back restriction
28303         for long calls with APCS frame and VFP.
28304
28305 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
28306
28307         * cfg.c (original_copy_tables_initialized_p): New function.
28308         * cfg.h (original_copy_tables_initialized_p): New decl.
28309         * cfgrtl.c (relink_block_chain): Guard the call to
28310         free_original_copy_tables with a call to
28311         original_copy_tables_initialized_p.
28312         * cgraph.h (symtab_node::native_rtl_p): New decl.
28313         * cgraphunit.c (symtab_node::native_rtl_p): New function.
28314         (symtab_node::needed_p): Don't assert for early assembly output
28315         for __RTL functions.
28316         (cgraph_node::finalize_function): Set "force_output" for __RTL
28317         functions.
28318         (cgraph_node::analyze): Bail out early for __RTL functions.
28319         (analyze_functions): Update assertion to support __RTL functions.
28320         (cgraph_node::expand): Bail out early for __RTL functions.
28321         * final.c (rest_of_clean_state): Don't call delete_tree_ssa for
28322         __RTL functions.
28323         * function.h (struct function): Update comment for field
28324         "pass_startwith".
28325         * gimple-expr.c: Include "tree-pass.h".
28326         (gimple_has_body_p): Return false for __RTL functions.
28327         * Makefile.in (OBJS): Add run-rtl-passes.o.
28328         * pass_manager.h (gcc::pass_manager::get_rest_of_compilation): New
28329         accessor.
28330         (gcc::pass_manager::get_clean_slate): New accessor.
28331         * passes.c: Include "insn-addr.h".
28332         (should_skip_pass_p): Add logging.  Update logic for running
28333         "expand" to be compatible with both __GIMPLE and __RTL.  Guard
28334         property-provider override so it is only done for gimple passes.
28335         Don't skip dfinit.
28336         (skip_pass): New function.
28337         (execute_one_pass): Call skip_pass when skipping passes.
28338         * read-md.c (md_reader::read_char): Support filtering
28339         the input to a subset of line numbers.
28340         (md_reader::md_reader): Initialize fields
28341         m_first_line and m_last_line.
28342         (md_reader::read_file_fragment): New function.
28343         * read-md.h (md_reader::read_file_fragment): New decl.
28344         (md_reader::m_first_line): New field.
28345         (md_reader::m_last_line): New field.
28346         * read-rtl-function.c (function_reader::create_function): Only
28347         create cfun if it doesn't already exist.  Set PROP_rtl on cfun's
28348         curr_properties.  Set DECL_INITIAL to a dummy block.
28349         (read_rtl_function_body_from_file_range): New function.
28350         * read-rtl-function.h (read_rtl_function_body_from_file_range):
28351         New decl.
28352         * run-rtl-passes.c: New file.
28353         * run-rtl-passes.h: New file.
28354
28355 2017-01-24  Jeff Law  <law@redhat.com>
28356
28357         * config/microblaze/microblaze.h (ASM_FORMAT_PRIVATE_NAME): Increase
28358         buffer size.
28359
28360 2017-01-24  Bin Cheng  <bin.cheng@arm.com>
28361
28362         PR tree-optimization/79159
28363         * tree-ssa-loop-niter.c (get_cst_init_from_scev): New function.
28364         (record_nonwrapping_iv): Improve boundary using above function if no
28365         value range information.
28366
28367 2017-01-24  Pekka Jääskeläinen  <pekka@parmance.com>
28368             Martin Jambor  <mjambor@suse.cz>
28369
28370         * brig-builtins.def: New file.
28371         * builtins.def (DEF_HSAIL_BUILTIN): New macro.
28372         (DEF_HSAIL_ATOMIC_BUILTIN): Likewise.
28373         (DEF_HSAIL_SAT_BUILTIN): Likewise.
28374         (DEF_HSAIL_INTR_BUILTIN): Likewise.
28375         (DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN): Likewise.
28376         * builtin-types.def (BT_INT8): New.
28377         (BT_INT16): Likewise.
28378         (BT_UINT8): Likewise.
28379         (BT_UINT16): Likewise.
28380         (BT_FN_ULONG): Likewise.
28381         (BT_FN_UINT_INT): Likewise.
28382         (BT_FN_UINT_ULONG): Likewise.
28383         (BT_FN_UINT_LONG): Likewise.
28384         (BT_FN_UINT_PTR): Likewise.
28385         (BT_FN_ULONG_PTR): Likewise.
28386         (BT_FN_INT8_FLOAT): Likewise.
28387         (BT_FN_INT16_FLOAT): Likewise.
28388         (BT_FN_UINT32_FLOAT): Likewise.
28389         (BT_FN_UINT16_FLOAT): Likewise.
28390         (BT_FN_UINT8_FLOAT): Likewise.
28391         (BT_FN_UINT64_FLOAT): Likewise.
28392         (BT_FN_UINT16_UINT32): Likewise.
28393         (BT_FN_UINT32_UINT16): Likewise.
28394         (BT_FN_UINT16_UINT16_UINT16): Likewise.
28395         (BT_FN_INT_PTR_INT): Likewise.
28396         (BT_FN_UINT_PTR_UINT): Likewise.
28397         (BT_FN_LONG_PTR_LONG): Likewise.
28398         (BT_FN_ULONG_PTR_ULONG): Likewise.
28399         (BT_FN_VOID_UINT64_UINT64): Likewise.
28400         (BT_FN_UINT8_UINT8_UINT8): Likewise.
28401         (BT_FN_INT8_INT8_INT8): Likewise.
28402         (BT_FN_INT16_INT16_INT16): Likewise.
28403         (BT_FN_INT_INT_INT): Likewise.
28404         (BT_FN_UINT_FLOAT_UINT): Likewise.
28405         (BT_FN_FLOAT_UINT_UINT): Likewise.
28406         (BT_FN_ULONG_UINT_UINT): Likewise.
28407         (BT_FN_ULONG_UINT_PTR): Likewise.
28408         (BT_FN_ULONG_ULONG_ULONG): Likewise.
28409         (BT_FN_UINT_UINT_UINT): Likewise.
28410         (BT_FN_VOID_UINT_PTR): Likewise.
28411         (BT_FN_UINT_UINT_PTR: Likewise.
28412         (BT_FN_UINT32_UINT64_PTR): Likewise.
28413         (BT_FN_INT_INT_UINT_UINT): Likewise.
28414         (BT_FN_UINT_UINT_UINT_UINT): Likewise.
28415         (BT_FN_UINT_UINT_UINT_PTR): Likewise.
28416         (BT_FN_UINT_ULONG_ULONG_UINT): Likewise.
28417         (BT_FN_ULONG_ULONG_ULONG_ULONG): Likewise.
28418         (BT_FN_LONG_LONG_UINT_UINT): Likewise.
28419         (BT_FN_ULONG_ULONG_UINT_UINT): Likewise.
28420         (BT_FN_VOID_UINT32_UINT64_PTR): Likewise.
28421         (BT_FN_VOID_UINT32_UINT32_PTR): Likewise.
28422         (BT_FN_UINT_UINT_UINT_UINT_UINT): Likewise.
28423         (BT_FN_UINT_FLOAT_FLOAT_FLOAT_FLOAT): Likewise.
28424         (BT_FN_ULONG_ULONG_ULONG_UINT_UINT): Likewise.
28425         * doc/frontends.texi: List BRIG FE.
28426         * doc/install.texi (Testing): Add BRIG tesring requirements.
28427         * doc/invoke.texi (Overall Options): Mention BRIG.
28428         * doc/standards.texi (Standards): Doucment BRIG HSA version.
28429
28430 2017-01-24  Richard Biener  <rguenther@suse.de>
28431
28432         PR translation/79208
28433         * ipa-devirt.c (odr_types_equivalent_p): Fix typo in diagnostic.
28434
28435 2017-01-24  Martin Jambor  <mjambor@suse.cz>
28436
28437         PR bootstrap/79198
28438         * ipa-prop.c (ipa_free_all_node_params): Call summary destructor.
28439         * ipa-prop.c (ipa_node_params_t::insert): Initialize fields known_csts
28440         and known_contexts.
28441
28442 2017-01-24  Aldy Hernandez  <aldyh@redhat.com>
28443
28444         PR middle-end/79123
28445         * gimple-ssa-warn-alloca.c (alloca_call_type): Make sure
28446         casts from signed to unsigned really don't have a range.
28447
28448 2017-01-24  Markus Trippelsdorf  <markus@trippelsdorf.de>
28449
28450         * gimple-ssa-sprintf.c (format_floating): Change MPFR_RNDx to
28451         GMP_RNDx for compatiblity.
28452
28453 2017-01-24  Martin Liska  <mliska@suse.cz>
28454
28455         PR bootstrap/79132
28456         * tree-ssa-reassoc.c (rewrite_expr_tree_parallel): Insert assert
28457         that would prevent us to call alloca with -1 as argument.
28458
28459 2017-01-24  Jakub Jelinek  <jakub@redhat.com>
28460
28461         * dwarf2out.c (output_compilation_unit_header, output_file_names):
28462         Avoid -Wformat-security warning.
28463
28464 2017-01-23  Andrew Pinski  <apinski@cavium.com>
28465
28466         * config/aarch64/aarch64.c (thunderx2t99_addrcost_table): Improve
28467         cost table.
28468
28469 2017-01-23  Martin Sebor  <msebor@redhat.com>
28470
28471         PR middle-end/78703
28472         * gimple-ssa-sprintf.c (warn_level): New global.
28473         (format_integer): Use it here and throughout the rest of the file.
28474         Use the same switch to compute sign as base.
28475         (maybe_warn): New function.
28476         (format_directive): Factor out warnings into maybe_warn.
28477         Add debugging output.  Use warn_level.
28478         (add_bytes): Use warn_level.
28479         (pass_sprintf_length::compute_format_length): Add debugging output.
28480         (try_substitute_return_value): Same.
28481         (pass_sprintf_length::handle_gimple_call): Set and use warn_level.
28482
28483         PR middle-end/78703
28484         * gimple-ssa-sprintf.c (struct format_result): Remove constant member.
28485         (struct fmtresult, format_integer, format_floating): Adjust.
28486         (fmtresult::fmtresult): Set max correctly in two argument ctor.
28487         (get_string_length, format_string,format_directive): Same.
28488         (pass_sprintf_length::compute_format_length): Same.
28489         (try_substitute_return_value): Simplify slightly.
28490
28491         PR middle-end/78703
28492         * gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust formatting.
28493         (fmtresult::operator+=): Outlined.
28494         (struct fmtresult): Add ctors.
28495         (struct conversion_spec): Rename...
28496         (struct directive): ...to this.  Add and remove data members.
28497         (directive::set_width, directive::set_precision): New functions.
28498         (format_percent): Use fmtresult ctor.
28499         (get_width_and_precision): Remove.
28500         (format_integer): Make naming changes.  Avoid computing width and
28501         precision.
28502         (format_floating): Same.  Adjust indentation.
28503         (format_character, format_none): New functions.
28504         (format_string): Moved character handling to format_character.
28505         (format_directive): Remove arguments, change return type.
28506         (parse_directive): New function.
28507         (pass_sprintf_length::compute_format_length): Move directive
28508         parsing to parse_directive.
28509
28510 2017-01-23  Jakub Jelinek  <jakub@redhat.com>
28511
28512         * tree.h (assign_assembler_name_if_neeeded): Rename to ...
28513         (assign_assembler_name_if_needed): ... this.
28514         * tree.c (assign_assembler_name_if_neeeded): Rename to ...
28515         (assign_assembler_name_if_needed): ... this.
28516         (free_lang_data_in_cgraph): Adjust callers.
28517         * cgraphunit.c (cgraph_node::analyze): Likewise.
28518         * omp-expand.c (expand_omp_taskreg, expand_omp_target):
28519         Likewise.
28520
28521 2017-01-23  Richard Biener  <rguenther@suse.de>
28522
28523         PR tree-optimization/79088
28524         PR tree-optimization/79188
28525         * tree-ssa-threadupdate.c (mark_threaded_blocks): Move code
28526         resetting loop bounds after last path deletion.  Reset loop
28527         bounds of the target loop, make code match the comments.
28528         * tree-ssa-threadbackwards.c (pass_early_thread_jumps::execute):
28529         Make sure loops need no fixups.
28530
28531 2017-01-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>
28532
28533         * config/rs6000/rs6000-builtin.def (VSIEDPF): Add scalar insert
28534         exponent support with double type for first argument.
28535         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Changed
28536         type returned by __builtin_vec_extract_sig,
28537         __builtin_vec_extract_sig_sp, and __builtin_vec_extract_sig_dp
28538         functions from "vector int" to "vector unsigned int" or from
28539         "vector long long int" to "vector unsigned long long int".
28540         Changed type returned by __builtin_vec_extract_exp,
28541         __builtin_vec_extract_exp_sp, and __builtin_vec_extract_exp_dp
28542         functions from "vector int" to "vector unsigned int" or from
28543         "vector long long int" to "vector unsigned long long int".
28544         Changed return type of __builtin_vec_test_data_class,
28545         __builtin_vec_test_data_class_sp, and
28546         __builtin_vec_test_data_class_dp from "vector int" to
28547         "vector bool int" or from "vector long long int" to "vector bool
28548         long long int" and changed second argument type from "unsigned
28549         int" to "int".  Added new overloaded function forms "vector float
28550         __builtin_vec_insert_exp (vector float, vector unsigned int)" and
28551         "vector float __builtin_vec_insert_exp_sp (vector float, vector
28552         unsigned int)" and "vector double __builtin_vec_insert_exp (vector
28553         double, vector unsigned long long int)" and "vector double
28554         __builtin_vec_insert_exp_dp (vector double, vector unsigned long
28555         long int)".  Changed return type of
28556         __builtin_scalar_test_data_class and
28557         __builtin_scalar_test_data_class_sp and
28558         __builtin_scalar_test_data_class_dp from "unsigned int" to "bool
28559         int" and changed second argument from "unsigned int" to "int".
28560         Changed type returned by __builtin_scalar_test_neg,
28561         __builtin_scalar_test_neg_sp, and __builtin_scalar_test_neg_dp
28562         from "int" to "bool int".  Added new overloaded function form
28563         "double __builtin_scalar_insert_exp (double, unsigned long long int)".
28564         * config/rs6000/vsx.md (xsiexpdpf): New insn for scalar insert
28565         exponent double-precision with floating point first argument.
28566         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
28567         documentation of scalar_test_data_class, scalar_test_neg,
28568         scalar_extract_sig, scalar_extract_exp, scalar_insert_exp,
28569         vector_extract_exp, vec_extract_sig, vec_insert_exp, and
28570         vec_test_data_class built-in functions to reflect refinements in
28571         their type signatures.
28572
28573 2017-01-23  Andreas Tobler  <andreast@gcc.gnu.org>
28574
28575         * config/aarch64/aarch64.c (aarch64_elf_asm_constructor): Increase
28576         size of buf.
28577         (aarch64_elf_asm_destructor): Likewise.
28578
28579 2017-01-23  Bernd Schmidt  <bschmidt@redhat.com>
28580
28581         PR rtl-optimization/78634
28582         * config/i386/i386.c (ix86_max_noce_ifcvt_seq_cost): New function.
28583         (TARGET_MAX_NOCE_IFCVT_SEQ_COST): Define.
28584         * ifcvt.c (noce_try_cmove): Add missing cost check.
28585
28586         PR rtl-optimization/71724
28587         * combine.c (if_then_else_cond): Look for situations where it is
28588         beneficial to undo the work of one of the recursive calls.
28589
28590 2017-01-23  Bin Cheng  <bin.cheng@arm.com>
28591
28592         PR tree-optimization/70754
28593         * tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE.
28594         (reassociate_to_the_same_stmt): New parameter INSERT_BEFORE.  Insert
28595         combined stmt before it if not NULL.
28596         (combine_chains): Process refs reversely and compute dominance point
28597         for root ref.
28598
28599 2017-01-23  Martin Liska  <mliska@suse.cz>
28600
28601         PR tree-optimization/79196
28602         * tree-ssa-strlen.c (fold_strstr_to_memcmp): Rename to ...
28603         (fold_strstr_to_strncmp): ... this.  Fold the pattern to strncmp
28604         instead of memcmp.
28605         (strlen_optimize_stmt): Call the renamed function.
28606
28607 2017-01-23  Michael Matz  <matz@suse.de>
28608
28609         PR tree-optimization/78384
28610         * tree-ssa-loop-split.c (patch_loop_exit): Use correct edge.
28611
28612 2017-01-23  Richard Biener  <rguenther@suse.de>
28613
28614         PR tree-optimization/79186
28615         * tree-vrp.c (register_new_assert_for): Make sure we've seen
28616         both incoming edges before moving an assert.
28617
28618 2017-01-23  Martin Jambor  <mjambor@suse.cz>
28619
28620         * ipa-prop.c (load_from_param_1): Removed.
28621         (load_from_unmodified_param): Bits from load_from_param_1 put back
28622         here.
28623         (load_from_param): Removed.
28624         (compute_complex_assign_jump_func): Removed stmt2 and just replaced it
28625         with stmt.  Reverted back to use of load_from_unmodified_param.
28626
28627 2017-01-23  Martin Jambor  <mjambor@suse.cz>
28628
28629         PR ipa/79108
28630         * ipa-prop.h (ipa_param_descriptor): Anotate with with GTY(()).
28631         (ipa_node_params): Annotate with GTY((for_user)).  Make descriptors
28632         field a pointer to garbage collected vector, mark lattices and
28633         ipcp_orig_node with GTY((skip)).
28634         (ipa_get_param_count): Adjust to descriptors being a pointer.
28635         (ipa_get_param): Likewise.
28636         (ipa_get_type): Likewise.
28637         (ipa_get_param_move_cost): Likewise.
28638         (ipa_set_param_used): Likewise.
28639         (ipa_get_controlled_uses): Likewise.
28640         (ipa_set_controlled_uses): Likewise.
28641         (ipa_is_param_used): Likewise.
28642         (ipa_node_params_t): Move into garbage collector.  New methods insert
28643         and remove.
28644         (ipa_node_params_sum): Annotate wth GTY(()).
28645         (ipa_check_create_node_params): Adjust to ipa_node_params_sum being
28646         garbage collected.
28647         (ipa_load_from_parm_agg): Adjust declaration.
28648         * ipa-icf.c (param_used_p): Adjust to descriptors being a pointer.
28649         * ipa-profile.c (ipa_profile): Likewise.
28650         * ipa-prop.c (ipa_get_param_decl_index_1): Likewise.
28651         (ipa_populate_param_decls): Make descriptors parameter garbage
28652         collected.
28653         (ipa_dump_param): Adjust to descriptors being a pointer.
28654         (ipa_alloc_node_params): Likewise.
28655         (ipa_initialize_node_params): Likewise.
28656         (load_from_param_1): Make descriptors parameter garbage collected.
28657         (load_from_unmodified_param): Likewise.
28658         (load_from_param): Likewise.
28659         (ipa_load_from_parm_agg): Likewise.
28660         (ipa_node_params::~ipa_node_params): Removed.
28661         (ipa_free_all_node_params): Remove call to delete operator.
28662         (ipa_node_params_t::insert): New.
28663         (ipa_node_params_t::remove): Likewise.
28664         (ipa_node_params_t::duplicate): Adjust to descriptors being a pointer,
28665         copy known_csts and known_contexts vectors.
28666         (ipa_read_node_info): Adjust to descriptors being a pointer.
28667         (ipcp_modif_dom_walker): Make m_descriptors field garbage
28668         collected.
28669         (ipcp_transform_function): Make descriptors variable garbage
28670         collected.
28671
28672 2017-01-23  Andrew Senkevich  <andrew.senkevich@intel.com>
28673
28674         * config/i386/avx512bwintrin.h: Add k-mask test, kortest intrinsics.
28675         * config/i386/avx512dqintrin.h: Ditto.
28676         * config/i386/avx512fintrin.h: Ditto.
28677         * config/i386/i386.c: Handle new builtins.
28678         * config/i386/i386-builtin.def: Add new builtins.
28679         * config/i386/sse.md (ktest<mode>, kortest<mode>): New.
28680         (UNSPEC_KORTEST, UNSPEC_KTEST): New.
28681
28682 2017-01-23  Jakub Jelinek  <jakub@redhat.com>
28683             Martin Liska  <mliska@suse.cz>
28684
28685         * asan.h: Define ASAN_USE_AFTER_SCOPE_ATTRIBUTE.
28686         * asan.c (asan_expand_poison_ifn): Support stores and use
28687         appropriate ASAN report function.
28688         * internal-fn.c (expand_ASAN_POISON_USE): New function.
28689         * internal-fn.def (ASAN_POISON_USE): Declare.
28690         * tree-into-ssa.c (maybe_add_asan_poison_write): New function.
28691         (maybe_register_def): Create ASAN_POISON_USE when sanitizing.
28692         * tree-ssa-dce.c (eliminate_unnecessary_stmts): Remove
28693         ASAN_POISON calls w/o LHS.
28694         * tree-ssa.c (execute_update_addresses_taken): Create clobber
28695         for ASAN_MARK (UNPOISON, &x, ...) in order to prevent usage of a LHS
28696         from ASAN_MARK (POISON, &x, ...) coming to a PHI node.
28697         * gimplify.c (asan_poison_variables): Add attribute
28698         use_after_scope_memory to variables that really needs to live
28699         in memory.
28700         * tree-ssa.c (is_asan_mark_p): Do not rewrite into SSA when
28701         having the attribute.
28702
28703 2017-01-23  Martin Liska  <mliska@suse.cz>
28704
28705         * asan.c (create_asan_shadow_var): New function.
28706         (asan_expand_poison_ifn): Likewise.
28707         * asan.h (asan_expand_poison_ifn): New declaration.
28708         * internal-fn.c (expand_ASAN_POISON): Likewise.
28709         * internal-fn.def (ASAN_POISON): New builtin.
28710         * sanopt.c (pass_sanopt::execute): Expand
28711         asan_expand_poison_ifn.
28712         * tree-inline.c (copy_decl_for_dup_finish): Make function
28713         external.
28714         * tree-inline.h (copy_decl_for_dup_finish): Likewise.
28715         * tree-ssa.c (is_asan_mark_p): New function.
28716         (execute_update_addresses_taken): Rewrite local variables
28717         (identified just by use-after-scope as addressable) into SSA.
28718
28719 2017-01-22  Gerald Pfeifer  <gerald@pfeifer.com>
28720
28721         * doc/install.texi (Specific): opensource.apple.com uses https
28722         now. Remove trailing slash.
28723
28724 2017-01-22  Gerald Pfeifer  <gerald@pfeifer.com>
28725
28726         * README.Portability: Remove note on an Irix compatibility issue.
28727
28728 2017-01-22  Dimitry Andric <dim@FreeBSD.org>
28729
28730         * gcov.c (INCLUDE_ALGORITHM): Define.
28731         (INCLUDE_VECTOR): Define.
28732         No longer include <vector> and <algorithm> directly.
28733
28734 2017-01-21  Gerald Pfeifer  <gerald@pfeifer.com>
28735
28736         * doc/extend.texi (Thread-Local): Change www.akkadia.org reference
28737         to https.
28738         * doc/invoke.texi (Code Gen Options): Ditto.
28739
28740 2017-01-21  Jan Hubicka  <hubicka@ucw.cz>
28741
28742         PR lto/78407
28743         * cfg.c (update_bb_profile_for_threading): Fix updating of probablity.
28744
28745 2017-01-21  Bernd Schmidt  <bschmidt@redhat.com>
28746
28747         rtl-optimization/79125
28748         * cprop.c (local_cprop_pass): Handle cases where we make an
28749         unconditional trap.
28750
28751 2017-01-20  Segher Boessenkool  <segher@kernel.crashing.org>
28752
28753         PR target/61729
28754         PR target/77850
28755         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
28756         read from, for big endian.
28757
28758 2017-01-20  Jiong Wang  <jiong.wang@arm.com>
28759
28760         * config/aarch64/aarch64-builtins.c (aarch64_init_builtins): Register
28761         register pauth builtins for LP64 only.
28762
28763 2017-01-20  Marek Polacek  <polacek@redhat.com>
28764
28765         PR c/79152
28766         * gimplify.c (should_warn_for_implicit_fallthrough): Handle consecutive
28767         non-case labels.
28768
28769 2017-01-20  Alexander Monakov  <amonakov@ispras.ru>
28770
28771         * omp-expand.c (expand_omp_simd): Clear PROP_gimple_lomp_dev regardless
28772         of safelen status.
28773         * omp-offload.c (pass_omp_device_lower::gate): Use PROP_gimple_lomp_dev.
28774         * passes.c (dump_properties): Handle PROP_gimple_lomp_dev.
28775         * tree-inline.c (expand_call_inline): Propagate PROP_gimple_lomp_dev.
28776
28777 2017-01-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28778
28779         PR target/71270
28780         * config/arm/arm.c (neon_valid_immediate): Reject vector constants
28781         in big-endian mode when they are not a single duplicated value.
28782
28783 2017-01-20  Richard Biener  <rguenther@suse.de>
28784
28785         * BASE-VER: Bump to 7.0.1.
28786
28787 2017-01-20  Alexander Monakov  <amonakov@ispras.ru>
28788
28789         * omp-low.c (omplow_simd_context): New struct.  Use it...
28790         (lower_rec_simd_input_clauses): ...here and...
28791         (lower_rec_input_clauses): ...here to hold common data.  Adjust all
28792         references to idx, lane, max_vf, is_simt.
28793
28794 2017-01-20  Graham Markall  <graham.markall@embecosm.com>
28795
28796         * config/arc/arc.h (LINK_SPEC): Use arclinux_nps emulation when
28797         mcpu=nps400.
28798
28799 2017-01-20  Martin Jambor  <mjambor@suse.cz>
28800
28801         * hsa.h: Renaed to hsa-common.h.  Adjusted a comment.
28802         * hsa.c: Renaed to hsa-common.c.  Change include of gt-hsa.h to
28803         gt-hsa-common.h.
28804         * Makefile.in (OBJS): Rename hsa.o to hsa-common.o.
28805         (GTFILES): Rename hsa.c to hsa-common.c.
28806         * hsa-brig.c: Change include of hsa.h to hsa-common.h.
28807         * hsa-dump.c: Likewise.
28808         * hsa-gen.c: Likewise.
28809         * hsa-regalloc.c: Likewise.
28810         * ipa-hsa.c: Likewise.
28811         * omp-expand.c: Likewise.
28812         * omp-low.c: Likewise.
28813         * toplev.c: Likewise.
28814
28815 2017-01-20  Marek Polacek  <polacek@redhat.com>
28816
28817         PR c/64279
28818         * doc/invoke.texi: Document -Wduplicated-branches.
28819         * fold-const.c (operand_equal_p): Handle MODIFY_EXPR, INIT_EXPR,
28820         COMPOUND_EXPR, PREDECREMENT_EXPR, PREINCREMENT_EXPR,
28821         POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, CLEANUP_POINT_EXPR, EXPR_STMT,
28822         STATEMENT_LIST, and RETURN_EXPR.  For non-pure non-const functions
28823         return 0 only when not OEP_LEXICOGRAPHIC.
28824         (fold_build_cleanup_point_expr): Use the expression
28825         location when building CLEANUP_POINT_EXPR.
28826         * tree-core.h (enum operand_equal_flag): Add OEP_LEXICOGRAPHIC.
28827         * tree.c (add_expr): Handle error_mark_node.
28828
28829 2017-01-20  Martin Liska  <mliska@suse.cz>
28830
28831         PR lto/69188
28832         * tree-profile.c (init_ic_make_global_vars): Do not call
28833         finalize_decl.
28834         (gimple_init_gcov_profiler): Likewise.
28835
28836 2017-01-20  Martin Liska  <mliska@suse.cz>
28837
28838         PR ipa/71190
28839         * cgraph.h (maybe_create_reference): Remove argument and
28840         update comment.
28841         * cgraphclones.c (cgraph_node::create_virtual_clone): Remove one
28842         argument.
28843         * ipa-cp.c (create_specialized_node): Likewise.
28844         * symtab.c (symtab_node::maybe_create_reference): Handle
28845         VAR_DECLs and ADDR_EXPRs and select ipa_ref_use type.
28846
28847 2017-01-20  Martin Liska  <mliska@suse.cz>
28848
28849         * read-rtl-function.c (function_reader::create_function): Use
28850         build_decl instread of build_decl_stat.
28851
28852 2017-01-20  Andrew Senkevich  <andrew.senkevich@intel.com>
28853
28854         * config/i386/avx512bwintrin.h: Add k-mask registers shift intrinsics.
28855         * config/i386/avx512dqintrin.h: Ditto.
28856         * config/i386/avx512fintrin.h: Ditto.
28857         * config/i386/i386-builtin-types.def: Add new types.
28858         * config/i386/i386.c: Handle new types.
28859         * config/i386/i386-builtin.def (__builtin_ia32_kshiftliqi)
28860         (__builtin_ia32_kshiftlihi, __builtin_ia32_kshiftlisi)
28861         (__builtin_ia32_kshiftlidi, __builtin_ia32_kshiftriqi)
28862         (__builtin_ia32_kshiftrihi, __builtin_ia32_kshiftrisi)
28863         (__builtin_ia32_kshiftridi): New.
28864         * config/i386/sse.md (k<code><mode>): Rename *k<code><mode>.
28865
28866 2017-01-19  Segher Boessenkool  <segher@kernel.crashing.org>
28867
28868         PR target/78875
28869         PR target/79140
28870         * config/rs6000/rs6000.c (TARGET_STACK_PROTECT_GUARD): Unconditionally
28871         define to rs6000_init_stack_protect_guard.
28872         (rs6000_init_stack_protect_guard): New function.
28873
28874 2017-01-19  Matthew Fortune  <matthew.fortune@imgtec.com>
28875             Yunqiang Su  <yunqiang.su@imgtec.com>
28876
28877         * config.gcc (supported_defaults): Add madd4.
28878         (with_madd4): Add validation.
28879         (all_defaults): Add madd4.
28880         * config/mips/mips.opt (mmadd4): New option.
28881         * config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
28882         mmadd4.
28883         (TARGET_CPU_CPP_BUILTINS): Add builtin_define for
28884         __mips_no_madd4.
28885         (ISA_HAS_UNFUSED_MADD4): Gate with mips_madd4.
28886         (ISA_HAS_FUSED_MADD4): Likewise.
28887         * doc/invoke.texi (-mmadd4): Document the new option.
28888         * doc/install.texi (--with-madd4): Document the new option.
28889
28890 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
28891
28892         * config/aarch64/aarch64-builtins.c (enum aarch64_builtins): New
28893         entries for AARCH64_PAUTH_BUILTIN_XPACLRI,
28894         AARCH64_PAUTH_BUILTIN_PACIA1716, AARCH64_PAUTH_BUILTIN_AUTIA1716.
28895         (aarch64_init_pauth_hint_builtins): New.
28896         (aarch64_init_builtins): Call aarch64_init_pauth_hint_builtins.
28897         (aarch64_expand_builtin): Expand new builtins.
28898
28899 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
28900
28901         * reg-notes.def (CFA_TOGGLE_RA_MANGLE): New reg-note.
28902         * combine-stack-adj.c (no_unhandled_cfa): Handle
28903         REG_CFA_TOGGLE_RA_MANGLE.
28904         * dwarf2cfi.c (dwarf2out_frame_debug): Handle REG_CFA_TOGGLE_RA_MANGLE.
28905         * config/aarch64/aarch64.c (aarch64_expand_prologue): Generates DWARF
28906         info for return address signing.
28907         (aarch64_expand_epilogue): Likewise.
28908
28909 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
28910
28911         * config/aarch64/aarch64-opts.h (aarch64_function_type): New enum.
28912         * config/aarch64/aarch64-protos.h
28913         (aarch64_return_address_signing_enabled): New declaration.
28914         * config/aarch64/aarch64.c (aarch64_return_address_signing_enabled):
28915         New function.
28916         (aarch64_expand_prologue): Sign return address before it's pushed onto
28917         stack.
28918         (aarch64_expand_epilogue): Authenticate return address fetched from
28919         stack.
28920         (aarch64_override_options): Sanity check for ILP32 and ISA level.
28921         (aarch64_attributes): New function attributes for "sign-return-address".
28922         * config/aarch64/aarch64.md (UNSPEC_AUTI1716, UNSPEC_AUTISP,
28923         UNSPEC_PACI1716, UNSPEC_PACISP, UNSPEC_XPACLRI): New unspecs.
28924         ("*do_return"): Generate combined instructions according to key index.
28925         ("<pauth_mnem_prefix>sp", "<pauth_mnem_prefix1716", "xpaclri"): New.
28926         * config/aarch64/iterators.md (PAUTH_LR_SP, PAUTH_17_16): New integer
28927         iterators.
28928         (pauth_mnem_prefix, pauth_hint_num_a): New integer attributes.
28929         * config/aarch64/aarch64.opt (msign-return-address=): New.
28930         * doc/extend.texi (AArch64 Function Attributes): Documents
28931         "sign-return-address=".
28932         * doc/invoke.texi (AArch64 Options): Documents "-msign-return-address=".
28933
28934 2017-01-19  Matthew Fortune  <matthew.fortune@imgtec.com>
28935
28936         * doc/invoke.texi: Add missing -mlxc1-sxc1 options to
28937         overall option summary.
28938
28939 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
28940
28941         * config/aarch64/aarch64-arches.def: New entry for "armv8.3-a".
28942         * config/aarch64/aarch64.h (AARCH64_FL_V8_3, AARCH64_FL_FOR_ARCH8_3,
28943         AARCH64_ISA_V8_3, TARGET_ARMV8_3): New.
28944         * doc/invoke.texi (AArch64 Options): Document "armv8.3-a".
28945
28946 2017-01-19  Michael Meissner  <meissner@linux.vnet.ibm.com>
28947
28948         * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Enable
28949         -mpower9-minmax by default for -mcpu=power9.
28950         (ISA_3_MASKS_IEEE): Require -mvsx-small-integer to enable IEEE
28951         128-bit floating point.
28952
28953 2017-01-20  Alan Modra  <amodra@gmail.com>
28954
28955         * config/rs6000/rs6000.md (cmpstrnsi, cmpstrsi): Fail if
28956         optimizing for size.
28957
28958 2017-01-20  Alan Modra  <amodra@gmail.com>
28959
28960         PR target/79144
28961         * config/rs6000/rs6000.c (expand_strn_compare): Get the asm name
28962         for strcmp and strncmp from corresponding builtin decl.
28963
28964 2017-01-19  Uros Bizjak  <ubizjak@gmail.com>
28965
28966         * config.gcc (x86_64-*-rtems*): Use i386/rtemself.h
28967         instead of i386/rtems-64.h.
28968         * config/i386/rtems-64.h: Remove.
28969
28970 2017-01-19  Uros Bizjak  <ubizjak@gmail.com>
28971
28972         PR target/78478
28973         Revert:
28974         2013-11-05  Uros Bizjak  <ubizjak@gmail.com>
28975
28976         * config/i386/rtemself.h (LONG_DOUBLE_TYPE_SIZE): New define.
28977
28978 2017-01-19  Tamar Christina  <tamar.christina@arm.com>
28979
28980         * config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup):
28981         Change int to HOST_WIDE_INT.
28982         * config/aarch64/aarch64-protos.h
28983         (aarch64_simd_gen_const_vector_dup): Likewise.
28984         * config/aarch64/aarch64-simd.md: Add copysign<mode>3.
28985
28986 2017-01-19  David Malcolm  <dmalcolm@redhat.com>
28987
28988         * langhooks-def.h (lhd_type_for_size): New decl.
28989         (LANG_HOOKS_TYPE_FOR_SIZE): Define as lhd_type_for_size.
28990         * langhooks.c (lhd_type_for_size): New function, taken from
28991         lto_type_for_size.
28992
28993 2017-01-19  Pat Haugen  <pthaugen@us.ibm.com>
28994
28995         * config/rs6000/power9.md (power9-alu): Remove 'cmp' type and add
28996         define_bypass for CR latency.
28997         (power9-cracked-alu): Update bypass latency and remove power9-branch.
28998         (power9-alu2): Add define_bypass for CR latency.
28999         (power9-cmp): New.
29000         (power9-mul): Update insn latency.
29001         (power9-mul-compare): Update insn latency, bypass latency and remove
29002         power9-branch.
29003
29004 2016-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29005
29006         * config/aarch64/aarch64-protos.h (aarch64_nopcrelative_literal_loads):
29007         Delete.
29008         * config/aarch64/aarch64.md
29009         (aarch64_reload_movcp<GPF_TF:mode><P:mode>): Delete reference to
29010         aarch64_nopcrelative_literal_loads.
29011         (aarch64_reload_movcp<VALL:mode><P:mode>): Likewise.
29012
29013 2017-01-19  Chenghua Xu  <paul.hua.gm@gmail.com>
29014
29015         * config/mips/mips.h (ISA_HAS_FUSED_MADD4): Enable for
29016         TARGET_LOONGSON_3A.
29017         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_LOONGSON_3A.
29018
29019 2017-01-19  Doug Gilmore  <doug.gilmore@imgtec.com>
29020
29021         PR target/78176
29022         * config.gcc (supported_defaults): Add lxc1-sxc1.
29023         (with_lxc1_sxc1): Add validation.
29024         (all_defaults): Add lxc1-sxc1.
29025         * config/mips/mips.opt (mlxc1-sxc1): New option.
29026         * config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
29027         mlxc1-sxc1.
29028         (TARGET_CPU_CPP_BUILTINS): Add builtin_define for
29029         __mips_no_lxc1_sxc1.
29030         (ISA_HAS_LXC1_SXC1): Gate with mips_lxc1_sxc1.
29031         * doc/invoke.texi (-mlxc1-sxc1): Document the new option.
29032         * doc/install.texi (--with-lxc1-sxc1): Document the new option.
29033
29034 2017-01-19  Richard Biener  <rguenther@suse.de>
29035
29036         PR tree-optimization/72488
29037         * tree-ssa-sccvn.c (run_scc_vn): When we abort the VN make
29038         sure to restore SSA info.
29039         * tree-ssa.c (verify_ssa): Verify SSA info is not shared.
29040
29041 2017-01-19  Richard Earnshaw  <rearnsha@arm.com>
29042
29043         PR rtl-optimization/79121
29044         * expr.c (expand_expr_real_2, case LSHIFT_EXPR): Look at the signedness
29045         of the inner type when shifting an extended value.
29046
29047 2017-01-17  Jan Hubicka  <hubicka@ucw.cz>
29048
29049         PR lto/78407
29050         * symtab.c (symtab_node::equal_address_to): Fix comparing of
29051         interposable aliases.
29052
29053 2017-01-18  Peter Bergner  <bergner@vnet.ibm.com>
29054
29055         PR target/78516
29056         * config/rs6000/spe.md (mov_si<mode>_e500_subreg0): Fix constraints.
29057         Use the evmergelohi instruction.
29058         (mov_si<mode>_e500_subreg4_2_le): Likewise.
29059         (mov_sitf_e500_subreg8_2_be): Likewise.
29060         (mov_sitf_e500_subreg12_2_le): Likewise.
29061         (mov_si<mode>_e500_subreg0_2_le): Fix constraints.
29062         (mov_si<mode>_e500_subreg4_2_be): Likewise.
29063         (mov_sitf_e500_subreg8_2_le): Likewise.
29064         (mov_sitf_e500_subreg12_2_be): Likewise.
29065
29066 2017-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29067
29068         * config/rs6000/altivec.md (altivec_vbpermq): Change "type"
29069         attribute from vecsimple to vecperm.
29070         (altivec_vbpermq2): Likewise.
29071
29072 2017-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29073
29074         PR target/79040
29075         * config/rs6000/altivec.h: Fix typo of vec_cntlz to vec_cnttz.
29076
29077 2017-01-18  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
29078         * config/rs6000/rs6000-protos.h (expand_strn_compare): Add arg.
29079         * config/rs6000/rs6000.c (expand_strn_compare): Add ability to expand
29080         strcmp. Fix bug where comparison didn't stop with zero byte. Fix
29081         case where N arg is SIZE_MAX.
29082         * config/rs6000/rs6000.md (cmpstrnsi): Args to expand_strn_compare.
29083         (cmpstrsi): Add pattern.
29084
29085 2017-01-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
29086
29087         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
29088         __builtin_vec_revb builtins.
29089         * config/rs6000/rs6000-builtins.def (P9V_BUILTIN_XXBRQ_V16QI): Add
29090         built-in functions to support generation of the ISA 3.0 XXBR<x>
29091         vector byte reverse instructions.
29092         (P9V_BUILTIN_XXBRQ_V1TI): Likewise.
29093         (P9V_BUILTIN_XXBRD_V2DI): Likewise.
29094         (P9V_BUILTIN_XXBRD_V2DF): Likewise.
29095         (P9V_BUILTIN_XXBGW_V4SI): Likewise.
29096         (P9V_BUILTIN_XXBGW_V4SF): Likewise.
29097         (P9V_BUILTIN_XXBGH_V8HI): Likewise.
29098         (P9V_BUILTIN_VEC_REVB): Likewise.
29099         * config/rs6000/vsx.md (p9_xxbrq_v1ti): New insns/expanders to
29100         generate the ISA 3.0 XXBR<x> vector byte reverse instructions.
29101         (p9_xxbrq_v16qi): Likewise.
29102         (p9_xxbrd_<mode>, VSX_D iterator): Likewise.
29103         (p9_xxbrw_<mode>, VSX_W iterator): Likewise.
29104         (p9_xxbrh_v8hi): Likewise.
29105         * config/rs6000/altivec.h (vec_revb): Define if ISA 3.0.
29106         * doc/extend.texi (RS/6000 Altivec Built-ins): Document the
29107         vec_revb built-in functions.
29108
29109 2017-01-18  Uros Bizjak  <ubizjak@gmail.com>
29110
29111         PR rtl-optimization/78952
29112         * config/i386/i386.md (any_extract): New code iterator.
29113         (*insvqi_2): Use any_extract for source operand.
29114         (*insvqi_3): Use any_shiftrt for source operand.
29115
29116 2017-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
29117
29118         * config/aarch64/aarch64.c (aarch64_sched_adjust_priority)
29119         New function.
29120         (TARGET_SCHED_ADJUST_PRIORITY): Define target hook.
29121
29122 2017-01-18  Matthias Klose  <doko@ubuntu.com>
29123
29124         * doc/install.texi: Allow default for --with-target-bdw-gc-include.
29125
29126 2016-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29127
29128         * config/rs6000/altivec.h (vec_bperm): Change #define.
29129         * config/rs6000/altivec.md (UNSPEC_VBPERMD): New enum constant.
29130         (altivec_vbpermq2): New define_insn.
29131         (altivec_vbpermd): Likewise.
29132         * config/rs6000/rs6000-builtin.def (VBPERMQ2): New monomorphic
29133         function interface.
29134         (VBPERMD): Likewise.
29135         (VBPERM): New polymorphic function interface.
29136         * config/rs6000/r6000-c.c (altivec_overloaded_builtins_table):
29137         Add entries for P9V_BUILTIN_VEC_VBPERM.
29138         * doc/extend.texi: Add interfaces for vec_bperm.
29139
29140 2017-01-18  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29141
29142         * config/s390/s390-c.c (s390_expand_overloaded_builtin): Downcase
29143         first letter of error messages.
29144         (s390_resolve_overloaded_builtin): Likewise.
29145         * config/s390/s390.c (s390_expand_builtin): Likewise.
29146         (s390_invalid_arg_for_unprototyped_fn): Likewise.
29147         (s390_valid_target_attribute_inner_p): Likewise.
29148         * config/s390/s390.md ("tabort"): Likewise.
29149
29150 2017-01-18  Toma Tabacu  <toma.tabacu@imgtec.com>
29151
29152         * config/mips/mips.h (ISA_HAS_DIV3): Remove unused macro.
29153         (ISA_AVOID_DIV_HILO): New macro.
29154         (ISA_HAS_DIV): Use new ISA_AVOID_DIV_HILO macro.
29155         (ISA_HAS_DDIV): Likewise.
29156
29157 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
29158
29159         * doc/invoke.texi (fabi-version): Correct number of occurrences.
29160
29161 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
29162
29163         * doc/invoke.texi (fabi-version): Spelling fix.
29164
29165 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
29166
29167         PR c++/70182
29168         * doc/invoke.texi (fabi-version): Mention mangling fix for
29169         operator names.
29170
29171 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
29172
29173         PR c++/77489
29174         * doc/invoke.texi (fabi-version): Document discriminator mangling.
29175
29176 2017-01-17  Segher Boessenkool  <segher@kernel.crashing.org>
29177
29178         PR target/78875
29179         * config/rs6000/rs6000-opts.h (stack_protector_guard): New enum.
29180         * config/rs6000/rs6000.c (rs6000_option_override_internal): Handle
29181         the new options.
29182         * config/rs6000/rs6000.md (stack_protect_set): Handle the new more
29183         flexible settings.
29184         (stack_protect_test): Ditto.
29185         * config/rs6000/rs6000.opt (mstack-protector-guard=,
29186         mstack-protector-guard-reg=, mstack-protector-guard-offset=): New
29187         options.
29188         * doc/invoke.texi (Option Summary) [RS/6000 and PowerPC Options]:
29189         Add -mstack-protector-guard=, -mstack-protector-guard-reg=, and
29190         -mstack-protector-guard-offset=.
29191         (RS/6000 and PowerPC Options): Ditto.
29192
29193 2017-01-17  Uros Bizjak  <ubizjak@gmail.com>
29194
29195         * config/i386/i386.h (MASK_CLASS_P): New define.
29196         * config/i386/i386.c (inline_secondary_memory_needed): Ensure that
29197         there are no registers from different register sets also when
29198         mask registers are used.  Update function comment.
29199         * config/i386/i386.md (*movsi_internal): Split (*k/*krm) alternative
29200         to (*k/*r) and (*k/*km) alternatives.
29201
29202 2017-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
29203
29204         * config/aarch64/aarch64.md (eh_return): Remove pattern and splitter.
29205         * config/aarch64/aarch64.h (AARCH64_EH_STACKADJ_REGNUM): Remove.
29206         (EH_RETURN_HANDLER_RTX): New define.
29207         * config/aarch64/aarch64.c (aarch64_frame_pointer_required):
29208         Force frame pointer in EH return functions.
29209         (aarch64_expand_epilogue): Add barrier for eh_return.
29210         (aarch64_final_eh_return_addr): Remove.
29211         (aarch64_eh_return_handler_rtx): New function.
29212         * config/aarch64/aarch64-protos.h (aarch64_final_eh_return_addr):
29213         Remove.
29214         (aarch64_eh_return_handler_rtx): New prototype.
29215
29216 2017-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29217
29218         * config/rs6000/altivec.h (vec_rlmi): New #define.
29219         (vec_vrlnm): Likewise.
29220         (vec_rlnm): Likewise.
29221         * config/rs6000/altivec.md (UNSPEC_VRLMI): New UNSPEC enum value.
29222         (UNSPEC_VRLNM): Likewise.
29223         (VIlong): New mode iterator.
29224         (altivec_vrl<VI_char>mi): New define_insn.
29225         (altivec_vrl<VI_char>nm): Likewise.
29226         * config/rs6000/rs6000-builtin.def (VRLWNM): New monomorphic
29227         function entry.
29228         (VRLDNM): Likewise.
29229         (RLNM): New polymorphic function entry.
29230         (VRLWMI): New monomorphic function entry.
29231         (VRLDMI): Likewise.
29232         (RLMI): New polymorphic function entry.
29233         * config/rs6000/r6000-c.c (altivec_overloaded_builtin_table): Add
29234         new entries for P9V_BUILTIN_VEC_RLMI and P9V_BUILTIN_VEC_RLNM.
29235         * doc/extend.texi: Add description of vec_rlmi, vec_rlnm, and
29236         vec_vrlnm.
29237
29238 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
29239
29240         PR debug/78839
29241         * dwarf2out.c (field_byte_offset): Restore the
29242         PCC_BITFIELD_TYPE_MATTERS behavior for INTEGER_CST DECL_FIELD_OFFSET
29243         and DECL_FIELD_BIT_OFFSET.  Use fold_build2 instead of build2 + fold.
29244         (analyze_variants_discr, gen_variant_part): Use fold_build2 instead
29245         of build2 + fold.
29246
29247 2017-01-17  Eric Botcazou  <ebotcazou@adacore.com>
29248
29249         PR ada/67205
29250         * config/aarch64/aarch64.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define
29251
29252 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
29253
29254         PR debug/71669
29255         * dwarf2out.c (add_data_member_location_attribute): For constant
29256         offset bitfield emit for -gdwarf-5 DW_AT_data_bit_offset attribute
29257         instead of DW_AT_data_member_location, DW_AT_bit_offset and
29258         DW_AT_byte_size attributes.
29259
29260 2017-01-17  Eric Botcazou  <ebotcazou@adacore.com>
29261
29262         * config/rs6000/rs6000.c (rs6000_emit_move): Also use a TOC reference
29263         after forcing to constant memory when the code model is medium.
29264
29265 2017-01-17  Julia Koval  <julia.koval@intel.com>
29266
29267         PR target/76731
29268         * config/i386/avx512fintrin.h
29269         (_mm512_i32gather_ps): Change __addr type to void const*.
29270         (_mm512_mask_i32gather_ps): Ditto.
29271         (_mm512_i32gather_pd): Ditto.
29272         (_mm512_mask_i32gather_pd): Ditto.
29273         (_mm512_i64gather_ps): Ditto.
29274         (_mm512_mask_i64gather_ps): Ditto.
29275         (_mm512_i64gather_pd): Ditto.
29276         (_mm512_mask_i64gather_pd): Ditto.
29277         (_mm512_i32gather_epi32): Ditto.
29278         (_mm512_mask_i32gather_epi32): Ditto.
29279         (_mm512_i32gather_epi64): Ditto.
29280         (_mm512_mask_i32gather_epi64): Ditto.
29281         (_mm512_i64gather_epi32): Ditto.
29282         (_mm512_mask_i64gather_epi32): Ditto.
29283         (_mm512_i64gather_epi64): Ditto.
29284         (_mm512_mask_i64gather_epi64): Ditto.
29285         (_mm512_i32scatter_ps): Change __addr type to void*.
29286         (_mm512_mask_i32scatter_ps): Ditto.
29287         (_mm512_i32scatter_pd): Ditto.
29288         (_mm512_mask_i32scatter_pd): Ditto.
29289         (_mm512_i64scatter_ps): Ditto.
29290         (_mm512_mask_i64scatter_ps): Ditto.
29291         (_mm512_i64scatter_pd): Ditto.
29292         (_mm512_mask_i64scatter_pd): Ditto.
29293         (_mm512_i32scatter_epi32): Ditto.
29294         (_mm512_mask_i32scatter_epi32): Ditto.
29295         (_mm512_i32scatter_epi64): Ditto.
29296         (_mm512_mask_i32scatter_epi64): Ditto.
29297         (_mm512_i64scatter_epi32): Ditto.
29298         (_mm512_mask_i64scatter_epi32): Ditto.
29299         (_mm512_i64scatter_epi64): Ditto.
29300         (_mm512_mask_i64scatter_epi64): Ditto.
29301         * config/i386/avx512pfintrin.h
29302         (_mm512_mask_prefetch_i32gather_pd): Change __addr type to void const*.
29303         (_mm512_mask_prefetch_i32gather_ps): Ditto.
29304         (_mm512_mask_prefetch_i64gather_pd): Ditto.
29305         (_mm512_mask_prefetch_i64gather_ps): Ditto.
29306         (_mm512_prefetch_i32scatter_pd): Change __addr type to void*.
29307         (_mm512_prefetch_i32scatter_ps): Ditto.
29308         (_mm512_mask_prefetch_i32scatter_pd): Ditto.
29309         (_mm512_mask_prefetch_i32scatter_ps): Ditto.
29310         (_mm512_prefetch_i64scatter_pd): Ditto.
29311         (_mm512_prefetch_i64scatter_ps): Ditto.
29312         (_mm512_mask_prefetch_i64scatter_pd): Ditto.
29313         (_mm512_mask_prefetch_i64scatter_ps): Ditto.
29314         * config/i386/avx512vlintrin.h
29315         (_mm256_mmask_i32gather_ps): Change __addr type to void const*.
29316         (_mm_mmask_i32gather_ps): Ditto.
29317         (_mm256_mmask_i32gather_pd): Ditto.
29318         (_mm_mmask_i32gather_pd): Ditto.
29319         (_mm256_mmask_i64gather_ps): Ditto.
29320         (_mm_mmask_i64gather_ps): Ditto.
29321         (_mm256_mmask_i64gather_pd): Ditto.
29322         (_mm_mmask_i64gather_pd): Ditto.
29323         (_mm256_mmask_i32gather_epi32): Ditto.
29324         (_mm_mmask_i32gather_epi32): Ditto.
29325         (_mm256_mmask_i32gather_epi64): Ditto.
29326         (_mm_mmask_i32gather_epi64): Ditto.
29327         (_mm256_mmask_i64gather_epi32): Ditto.
29328         (_mm_mmask_i64gather_epi32): Ditto.
29329         (_mm256_mmask_i64gather_epi64): Ditto.
29330         (_mm_mmask_i64gather_epi64): Ditto.
29331         (_mm256_i32scatter_ps): Change __addr type to void*.
29332         (_mm256_mask_i32scatter_ps): Ditto.
29333         (_mm_i32scatter_ps): Ditto.
29334         (_mm_mask_i32scatter_ps): Ditto.
29335         (_mm256_i32scatter_pd): Ditto.
29336         (_mm256_mask_i32scatter_pd): Ditto.
29337         (_mm_i32scatter_pd): Ditto.
29338         (_mm_mask_i32scatter_pd): Ditto.
29339         (_mm256_i64scatter_ps): Ditto.
29340         (_mm256_mask_i64scatter_ps): Ditto.
29341         (_mm_i64scatter_ps): Ditto.
29342         (_mm_mask_i64scatter_ps): Ditto.
29343         (_mm256_i64scatter_pd): Ditto.
29344         (_mm256_mask_i64scatter_pd): Ditto.
29345         (_mm_i64scatter_pd): Ditto.
29346         (_mm_mask_i64scatter_pd): Ditto.
29347         (_mm256_i32scatter_epi32): Ditto.
29348         (_mm256_mask_i32scatter_epi32): Ditto.
29349         (_mm_i32scatter_epi32): Ditto.
29350         (_mm_mask_i32scatter_epi32): Ditto.
29351         (_mm256_i32scatter_epi64): Ditto.
29352         (_mm256_mask_i32scatter_epi64): Ditto.
29353         (_mm_i32scatter_epi64): Ditto.
29354         (_mm_mask_i32scatter_epi64): Ditto.
29355         (_mm256_i64scatter_epi32): Ditto.
29356         (_mm256_mask_i64scatter_epi32): Ditto.
29357         (_mm_i64scatter_epi32): Ditto.
29358         (_mm_mask_i64scatter_epi32): Ditto.
29359         (_mm256_i64scatter_epi64): Ditto.
29360         (_mm256_mask_i64scatter_epi64): Ditto.
29361         (_mm_i64scatter_epi64): Ditto.
29362         (_mm_mask_i64scatter_epi64): Ditto.
29363         * config/i386/i386-builtin-types.def (V16SF_V16SF_PCFLOAT_V16SI_HI_INT)
29364         (V8DF_V8DF_PCDOUBLE_V8SI_QI_INT, V8SF_V8SF_PCFLOAT_V8DI_QI_INT)
29365         (V8DF_V8DF_PCDOUBLE_V8DI_QI_INT, V16SI_V16SI_PCINT_V16SI_HI_INT)
29366         (V8DI_V8DI_PCINT64_V8SI_QI_INT, V8SI_V8SI_PCINT_V8DI_QI_INT)
29367         (V8DI_V8DI_PCINT64_V8DI_QI_INT, V2DF_V2DF_PCDOUBLE_V4SI_QI_INT)
29368         (V4DF_V4DF_PCDOUBLE_V4SI_QI_INT, V2DF_V2DF_PCDOUBLE_V2DI_QI_INT)
29369         (V4DF_V4DF_PCDOUBLE_V4DI_QI_INT, V4SF_V4SF_PCFLOAT_V4SI_QI_INT)
29370         (V8SF_V8SF_PCFLOAT_V8SI_QI_INT, V4SF_V4SF_PCFLOAT_V2DI_QI_INT)
29371         (V4SF_V4SF_PCFLOAT_V4DI_QI_INT, V2DI_V2DI_PCINT64_V4SI_QI_INT)
29372         (V4DI_V4DI_PCINT64_V4SI_QI_INT, V2DI_V2DI_PCINT64_V2DI_QI_INT)
29373         (V4DI_V4DI_PCINT64_V4DI_QI_INT, V4SI_V4SI_PCINT_V4SI_QI_INT)
29374         (V8SI_V8SI_PCINT_V8SI_QI_INT, V4SI_V4SI_PCINT_V2DI_QI_INT)
29375         (V4SI_V4SI_PCINT_V4DI_QI_INT, VOID_PFLOAT_HI_V16SI_V16SF_INT)
29376         (VOID_PFLOAT_QI_V8SI_V8SF_INT, VOID_PFLOAT_QI_V4SI_V4SF_INT)
29377         (VOID_PDOUBLE_QI_V8SI_V8DF_INT, VOID_PDOUBLE_QI_V4SI_V4DF_INT)
29378         (VOID_PDOUBLE_QI_V4SI_V2DF_INT, VOID_PFLOAT_QI_V8DI_V8SF_INT)
29379         (VOID_PFLOAT_QI_V4DI_V4SF_INT, VOID_PFLOAT_QI_V2DI_V4SF_INT)
29380         (VOID_PDOUBLE_QI_V8DI_V8DF_INT, VOID_PDOUBLE_QI_V4DI_V4DF_INT)
29381         (VOID_PDOUBLE_QI_V2DI_V2DF_INT, VOID_PINT_HI_V16SI_V16SI_INT)
29382         (VOID_PINT_QI_V8SI_V8SI_INT, VOID_PINT_QI_V4SI_V4SI_INT)
29383         (VOID_PLONGLONG_QI_V8SI_V8DI_INT, VOID_PLONGLONG_QI_V4SI_V4DI_INT)
29384         (VOID_PLONGLONG_QI_V4SI_V2DI_INT, VOID_PINT_QI_V8DI_V8SI_INT)
29385         (VOID_PINT_QI_V4DI_V4SI_INT, VOID_PINT_QI_V2DI_V4SI_INT)
29386         (VOID_PLONGLONG_QI_V8DI_V8DI_INT, VOID_QI_V8SI_PCINT64_INT_INT)
29387         (VOID_PLONGLONG_QI_V4DI_V4DI_INT, VOID_PLONGLONG_QI_V2DI_V2DI_INT)
29388         (VOID_HI_V16SI_PCINT_INT_INT, VOID_QI_V8DI_PCINT64_INT_INT)
29389         (VOID_QI_V8DI_PCINT_INT_INT): Remove.
29390         (V16SF_V16SF_PCVOID_V16SI_HI_INT,  V8DF_V8DF_PCVOID_V8SI_QI_INT)
29391         (V8SF_V8SF_PCVOID_V8DI_QI_INT, V8DF_V8DF_PCVOID_V8DI_QI_INT)
29392         (V16SI_V16SI_PCVOID_V16SI_HI_INT, V8DI_V8DI_PCVOID_V8SI_QI_INT)
29393         (V8SI_V8SI_PCVOID_V8DI_QI_INT, V8DI_V8DI_PCVOID_V8DI_QI_INT)
29394         (VOID_PVOID_HI_V16SI_V16SF_INT, VOID_PVOID_QI_V8SI_V8DF_INT)
29395         (VOID_PVOID_QI_V8DI_V8SF_INT, VOID_PVOID_QI_V8DI_V8DF_INT)
29396         (VOID_PVOID_HI_V16SI_V16SI_INT, VOID_PVOID_QI_V8SI_V8DI_INT)
29397         (VOID_PVOID_QI_V8DI_V8SI_INT, VOID_PVOID_QI_V8DI_V8DI_INT)
29398         (V2DF_V2DF_PCVOID_V4SI_QI_INT, V4DF_V4DF_PCVOID_V4SI_QI_INT)
29399         (V2DF_V2DF_PCVOID_V2DI_QI_INT, V4DF_V4DF_PCVOID_V4DI_QI_INT
29400         (V4SF_V4SF_PCVOID_V4SI_QI_INT, V8SF_V8SF_PCVOID_V8SI_QI_INT)
29401         (V4SF_V4SF_PCVOID_V2DI_QI_INT, V4SF_V4SF_PCVOID_V4DI_QI_INT)
29402         (V2DI_V2DI_PCVOID_V4SI_QI_INT, V4DI_V4DI_PCVOID_V4SI_QI_INT)
29403         (V2DI_V2DI_PCVOID_V2DI_QI_INT, V4DI_V4DI_PCVOID_V4DI_QI_INT)
29404         (V4SI_V4SI_PCVOID_V4SI_QI_INT, V8SI_V8SI_PCVOID_V8SI_QI_INT)
29405         (V4SI_V4SI_PCVOID_V2DI_QI_INT, V4SI_V4SI_PCVOID_V4DI_QI_INT)
29406         (VOID_PVOID_QI_V8SI_V8SF_INT, VOID_PVOID_QI_V4SI_V4SF_INT)
29407         (VOID_PVOID_QI_V4SI_V4DF_INT, VOID_PVOID_QI_V4SI_V2DF_INT)
29408         (VOID_PVOID_QI_V4DI_V4SF_INT, VOID_PVOID_QI_V2DI_V4SF_INT)
29409         (VOID_PVOID_QI_V4DI_V4DF_INT, VOID_PVOID_QI_V2DI_V2DF_INT)
29410         (VOID_PVOID_QI_V8SI_V8SI_INT, VOID_PVOID_QI_V4SI_V4SI_INT)
29411         (VOID_PVOID_QI_V4SI_V4DI_INT, VOID_PVOID_QI_V4SI_V2DI_INT)
29412         (VOID_PVOID_QI_V4DI_V4SI_INT, VOID_PVOID_QI_V2DI_V4SI_INT)
29413         (VOID_PVOID_QI_V4DI_V4DI_INT, VOID_PVOID_QI_V2DI_V2DI_INT)
29414         (VOID_QI_V8SI_PCVOID_INT_INT, VOID_HI_V16SI_PCVOID_INT_INT)
29415         (VOID_QI_V8DI_PCVOID_INT_INT): Add.
29416         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Adjust builtin
29417         definitions accordingly.
29418
29419 2017-01-17  Kito Cheng  <kito.cheng@gmail.com>
29420             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
29421
29422         PR target/79079
29423         * internal-fn.c (expand_mul_overflow): Use convert_modes instead of
29424         gen_lowpart.
29425
29426 2017-01-17  Vladimir Makarov  <vmakarov@redhat.com>
29427
29428         PR target/79058
29429         * ira-conflicts.c (ira_build_conflicts): Update total conflict
29430         hard regs for inner regno.
29431
29432 2017-01-17  Martin Liska  <mliska@suse.cz>
29433
29434         PR ipa/71207
29435         * ipa-polymorphic-call.c (contains_type_p): Fix wrong
29436         assumption and add comment.
29437
29438 2017-01-17  Nathan Sidwell  <nathan@acm.org>
29439
29440         * ipa-visibility.c (localize_node): New function, broken out of ...
29441         (function_and_variable_visibility): ... here. Call it.
29442
29443 2017-01-17  Jan Hubicka  <hubicka@ucw.cz>
29444
29445         PR middle-end/77445
29446         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges):
29447         correctly set frequency of oudgoing edge.
29448         (duplicate_thread_path): Fix profile updating.
29449
29450 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
29451
29452         PR other/79046
29453         * configure.ac: Add GCC_BASE_VER.
29454         * Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
29455         version from BASE-VER file.
29456         (CFLAGS-gcc.o): Add -DBASEVER=$(BASEVER_s).
29457         (gcc.o): Depend on $(BASEVER).
29458         * common.opt (dumpfullversion): New option.
29459         * gcc.c (driver_handle_option): Handle OPT_dumpfullversion.
29460         * doc/invoke.texi: Document -dumpfullversion.
29461         * doc/install.texi: Document --with-gcc-major-version-only.
29462         * configure: Regenerated.
29463
29464 2017-01-17  Richard Biener  <rguenther@suse.de>
29465
29466         PR tree-optimization/71433
29467         * tree-vrp.c (register_new_assert_for): Merge same asserts
29468         on all incoming edges.
29469         (process_assert_insertions_for): Handle insertions at the
29470         beginning of BBs.
29471
29472 2017-01-17  Gerald Pfeifer  <gerald@pfeifer.com>
29473
29474         * config/i386/cygwin.h (LIBGCJ_SONAME): Remove.
29475         * config/i386/mingw32.h (LIBGCJ_SONAME): Remove.
29476
29477 2017-01-17  Kaz Kojima  <kkojima@gcc.gnu.org>
29478
29479         PR target/78633
29480         * config/sh/sh.md (cmpeqsi_t+1): Call copy_rtx to avoid invalid
29481         RTL sharing.
29482
29483 2017-01-17  Alan Modra  <amodra@gmail.com>
29484
29485         PR target/79066
29486         * config/rs6000/rs6000.md (elf_high, elf_low): Disable when pic.
29487         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Don't allow
29488         symbolic stack limit when pic.
29489
29490 2017-01-16  Martin Sebor  <msebor@redhat.com>
29491
29492         PR tree-optimization/78608
29493         * gimple-ssa-sprintf.c (tree_digits): Avoid negating TYPE_MIN.
29494
29495 2017-01-16  Jeff Law  <law@redhat.com>
29496
29497         Revert:
29498         2016-12-02  Tadek Kijkowski  <tkijkowski@gmail.com>
29499         * Makefile.in (PREPROCESSOR_DEFINES): Add a level of indirection
29500         for several include directories that may be relative to sysroot.
29501         * config/i386/x-mingw32 (gplus_includedir): Define.
29502         (gplus_tool_includedir, gplus_backward_include_dir): Likewise.
29503         (native_system_includedir): Likewise.
29504         * config/i386/mingw32.h (STANDARD_STARTFILE_PREFIX_1): Do not
29505         override if TARGET_SYSTEM_ROOT is defined.
29506         (NATIVE_SYSTEM_HEADER_DIR): Likewise.
29507
29508         PR tree-optimization/79090
29509         PR tree-optimization/33562
29510         PR tree-optimization/61912
29511         PR tree-optimization/77485
29512         * tree-ssa-dse.c (compute_trims): Accept STMT argument.  Dump STMT
29513         and computed trims into the dump file.
29514
29515 2017-01-17  Uros Bizjak  <ubizjak@gmail.com>
29516
29517         * config/i386/i386.h (LIMIT_RELOAD_CLASS): Remove.
29518
29519 2017-01-16  Jakub Jelinek  <jakub@redhat.com>
29520
29521         PR c/79089
29522         * gimplify.c (gimplify_init_constructor): If want_value and
29523         object == lhs, unshare lhs to avoid invalid tree sharing.  Formatting
29524         fix.
29525
29526         PR target/79080
29527         * loop-doloop.c (doloop_modify): Call unshare_all_rtl_in_chain on
29528         sequence.  Formatting fixes.
29529         (doloop_optimize): Formatting fixes.
29530
29531         PR driver/49726
29532         * gcc.c (debug_level_greater_than_spec_func): New function.
29533         (static_spec_functions): Add debug-level-gt spec function.
29534         (ASM_DEBUG_SPEC, cpp_options): Use %:debug-level-gt(0) instead of
29535         !g0.
29536         * config/darwin.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
29537         * config/darwin9.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
29538         * common.opt (g, gcoff, gdwarf, gdwarf-, ggdb, gno-pubnames,
29539         gpubnames, ggnu-pubnames, gno-record-gcc-switches,
29540         grecord-gcc-switches, gno-strict-dwarf, gstrict-dwarf, gstabs,
29541         gstabs+, gtoggle, gvms, gxcoff, gxcoff+): Add Driver flag.
29542
29543 2017-01-16  Uros Bizjak  <ubizjak@gmail.com>
29544
29545         * config/i386/i386.h (HARD_REGNO_CALLER_SAVE_MODE): Apply HImode and
29546         QImode fixups to general and mask registers only.
29547
29548 2017-01-16  Carl Love  <cel@us.ibm.com>
29549
29550         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Add support
29551         for built-in functions
29552         vector signed char vec_nabs (vector signed char)
29553         vector signed short vec_nabs (vector signed short)
29554         vector signed int vec_nabs (vector signed int)
29555         vector signed long long vec_nabs (vector signed long long)
29556         vector float vec_nabs (vector float)
29557         vector double vec_nabs (vector double)
29558         * config/rs6000/rs6000-builtin.def: Add definitions for NABS functions
29559         and NABS overload.
29560         * config/rs6000/altivec.md: New define_expand nabs<mode>2 types
29561         * config/rs6000/altivec.h: New define for vec_nabs built-in function.
29562         * doc/extend.texi: Update the documentation file for the new built-in
29563         functions.
29564
29565 2017-01-16  Martin Sebor  <msebor@redhat.com>
29566
29567         * gimple-ssa-sprintf.c (format_directive): Correct a typo in a warning
29568         message.
29569
29570 2017-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29571
29572         * config/rs6000/rs6000.c (rtx_is_swappable_p): Change
29573         UNSPEC_VSX__XXSPLTD to require special splat handling.
29574
29575 2017-01-16  David Malcolm  <dmalcolm@redhat.com>
29576
29577         PR bootstrap/78616
29578         * system.h: Poison strndup.
29579
29580 2017-01-16  Alan Modra  <amodra@gmail.com>
29581
29582         PR target/79098
29583         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Don't
29584         use a switch.
29585
29586 2017-01-16  Georg-Johann Lay  <avr@gjlay.de>
29587
29588         * config/avr/avr.h (BRANCH_COST) [reload_completed]: Increase by 4.
29589
29590 2017-01-15  Uros Bizjak  <ubizjak@gmail.com>
29591
29592         * config/i386/i386.c (ix86_legitimate_combined_insn): Do not
29593         call recog here.  Assert that INSN_CODE (insn) is non-negative.
29594
29595 2017-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
29596
29597         PR target/72749
29598         * cfgrtl.c (rtl_split_edge): Also patch jump insns that jump to the
29599         fallthrough.
29600         * haifa-sched.c (dump_insn_stream): Don't crash if there is a label
29601         in the currently scheduled RTL fragment.
29602
29603 2017-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
29604
29605         PR rtl-optimization/78751
29606         * ifcvt.c (find_cond_trap): If we generated a non-existing insn,
29607         give up.
29608
29609 2017-01-14  Jeff Law  <law@redhat.com>
29610
29611         PR tree-optimization/79090
29612         * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject zero length and
29613         variable length stores.
29614         (compute_trims): Delete dead assignment to *trim_tail.
29615         (dse_dom_walker::dse_optimize_stmt): Optimize mem* calls with
29616         zero length.
29617
29618 2017-01-14  Bernd Schmidt  <bschmidt@redhat.com>
29619
29620         PR rtl-optimization/78626
29621         PR rtl-optimization/78727
29622         * cprop.c (one_cprop_pass): Collect unconditional traps in the middle
29623         of a block, and split such blocks after everything else is finished.
29624
29625 2017-01-14  Alan Modra  <amodra@gmail.com>
29626
29627         PR target/72749
29628         * combine.c (recog_for_combine_1): Set INSN_CODE before calling
29629         target legitimate_combined_insn.
29630         * config/rs6000/rs6000.c (TARGET_LEGITIMATE_COMBINED_INSN): Define.
29631         (rs6000_legitimate_combined_insn): New function.
29632         * config/rs6000/rs6000.md (UNSPEC_DOLOOP): Delete, and remove
29633         all uses.
29634         (ctr<mode>_internal3): Rename from *ctr<mode>_internal5.
29635         (ctr<mode>_internal4): Rename from *ctr<mode>_internal6.
29636         (ctr<mode>_internal1, ctr<mode>_internal2): Remove '*' from name.
29637
29638 2017-01-14  Gerald Pfeifer  <gerald@pfeifer.com>
29639
29640         * doc/frontends.texi (G++ and GCC): Remove references to Java.
29641
29642 2017-01-13  Jeff Law  <law@redhat.com>
29643
29644         PR tree-optimization/33562
29645         PR tree-optimization/61912
29646         PR tree-optimization/77485
29647         * tree-ssa-dse.c (delete_dead_call): Accept gsi rather than
29648         a statement.
29649         (delete_dead_assignment): Likewise.
29650         (dse_dom_walker::dse_optimize_stmt): Pass in the gsi rather than
29651         statement to delete_dead_call and delete_dead_assignment.
29652
29653 2017-01-13  David Malcolm  <dmalcolm@redhat.com>
29654
29655         PR c/78304
29656         * substring-locations.c (format_warning_va): Strengthen case 1 so
29657         that both endpoints of the substring must be within the format
29658         range for just the substring to be printed.
29659
29660 2017-01-13  Uros Bizjak  <ubizjak@gmail.com>
29661
29662         * config/i386/i386.opt (msgx): Use ix86_isa_flags2 variable.
29663         * config/i386/i386.c (ix86_target_string): Add missing options
29664         to isa_opts and reorder options by implied ISAs.  Rename isa_opts2 to
29665         isa2_opts, ix86_flag_opts to flag2_opts, ix86_target_other to
29666         flags_other and ix86_target_other to flags2_other.  Display unknown
29667         isa2 options.
29668         (ix86_valid_target_attribute_inner_p): Add missing options and
29669         reorder options by implied ISAs, as in ix86_target_string.
29670
29671 2017-01-13  Richard Sandiford  <richard.sandiford@arm.com>
29672
29673         * hash-table.h (hash_table::too_empty_p): New function.
29674         (hash_table::expand): Use it.
29675         (hash_table::traverse): Likewise.
29676         (hash_table::empty_slot): Use sizeof (value_type) instead of
29677         sizeof (PTR) to convert bytes to elements.  Shrink the table
29678         if the current size is excessive for the current number of
29679         elements.
29680
29681 2017-01-13  Richard Sandiford  <richard.sandiford@arm.com>
29682
29683         * ira-costs.c (record_reg_classes): Break from the inner loop
29684         early once alt_fail is known to be true.  Update outer loop
29685         handling accordingly.
29686
29687 2017-01-13  Jeff Law  <law@redhat.com>
29688
29689         * tree-ssa-dse.c (decrement_count): New function.
29690         (increment_start_addr, maybe_trim_memstar_call): Likewise.
29691         (dse_dom_walker::optimize_stmt): Call maybe_trim_memstar_call directly
29692         when we know the partially dead statement is a mem* function.
29693
29694         PR tree-optimization/61912
29695         PR tree-optimization/77485
29696         * tree-ssa-dse.c: Include expr.h.
29697         (maybe_trim_constructor_store): New function.
29698         (maybe_trim_partially_dead_store): Call maybe_trim_constructor_store.
29699
29700         PR tree-optimization/33562
29701         PR tree-optimization/61912
29702         PR tree-optimization/77485
29703         * doc/invoke.texi: Document new dse-max-object-size param.
29704         * params.def (PARM_DSE_MAX_OBJECT_SIZE): New PARAM.
29705         * tree-ssa-dse.c: Include params.h.
29706         (dse_store_status): New enum.
29707         (initialize_ao_ref_for_dse): New, partially extracted from
29708         dse_optimize_stmt.
29709         (valid_ao_ref_for_dse, normalize_ref): New.
29710         (setup_live_bytes_from_ref, compute_trims): Likewise.
29711         (clear_bytes_written_by, maybe_trim_complex_store): Likewise.
29712         (maybe_trim_partially_dead_store): Likewise.
29713         (maybe_trim_complex_store): Likewise.
29714         (dse_classify_store): Renamed from dse_possibly_dead_store_p.
29715         Track what bytes live from the original store.  Return tri-state
29716         for dead, partially dead or live.
29717         (dse_dom_walker): Add constructor, destructor and new private members.
29718         (delete_dead_call, delete_dead_assignment): New extracted from
29719         dse_optimize_stmt.
29720         (dse_optimize_stmt): Make a member of dse_dom_walker.
29721         Use initialize_ao_ref_for_dse.
29722
29723         PR tree-optimization/33562
29724         PR tree-optimization/61912
29725         PR tree-optimization/77485
29726         * sbitmap.h (bitmap_count_bits): Prototype.
29727         (bitmap_clear_range, bitmap_set_range): Likewise.
29728         * sbitmap.c (bitmap_clear_range): New function.
29729         (bitmap_set_range, sbitmap_popcount, bitmap_count_bits): Likewise.
29730
29731 2017-01-13  Martin Liska  <mliska@suse.cz>
29732
29733         PR ipa/79043
29734         * function.c (set_cfun): Add new argument force.
29735         * function.h (set_cfun): Likewise.
29736         * ipa-inline-transform.c (inline_call): Use the function when
29737         strict alising from is dropped for function we inline to.
29738
29739 2017-01-13  Richard Biener  <rguenther@suse.de>
29740
29741         * tree-pretty-print.c (dump_generic_node): Fix inverted condition
29742         for dumping GIMPLE INTEGER_CSTs.
29743
29744 2017-01-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
29745
29746         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define __STDC_VERSION__
29747         to 201112L since C++17.
29748
29749 2017-01-13  Maxim Ostapenko  <m.ostapenko@samsung.com>
29750
29751         PR sanitizer/78887
29752         * asan.c (asan_needs_odr_indicator_p): Don't emit ODR indicators
29753         if -fsanitize=kernel-address is present.
29754
29755 2017-01-13  Richard Biener  <rguenther@suse.de>
29756
29757         * tree-pretty-print.c (dump_generic_node): Dump INTEGER_CSTs
29758         as _Literal ( type ) number in case usual suffixes do not
29759         preserve all information.
29760
29761 2017-01-13  Richard Biener  <rguenther@suse.de>
29762
29763         PR tree-optimization/77283
29764         * gimple-ssa-split-paths.c: Include gimple-ssa.h, tree-phinodes.h
29765         and ssa-iterators.h.
29766         (is_feasible_trace): Implement a cost model based on joiner
29767         PHI node uses.
29768
29769 2017-01-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
29770
29771         PR target/79004
29772         * config/rs6000/rs6000.md (FP_ISA3): Do not optimize converting
29773         char or short to __float128/_Float128 directly.
29774
29775 2017-01-12  Martin Sebor  <msebor@redhat.com>
29776
29777         to -Wformat-overflow.
29778         * gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust.
29779         (min_bytes_remaining): Same.
29780         (get_string_length): Same.
29781         (format_string): Same.
29782         (format_directive): Same.
29783         (add_bytes): Same.
29784         (pass_sprintf_length::handle_gimple_call): Same.
29785
29786 2017-01-12  Jakub Jelinek  <jakub@redhat.com>
29787
29788         * gimple-ssa-sprintf.c (try_substitute_return_value): Remove
29789         info.nowrite calls with no lhs that can't throw.  Return bool
29790         whether gsi_remove has been called or not.
29791         (pass_sprintf_length::handle_gimple_call): Return bool whether
29792         try_substitute_return_value called gsi_remove.  Formatting fix.
29793         (pass_sprintf_length::execute): Don't use gsi_remove if
29794         handle_gimple_call returned true.
29795
29796         PR bootstrap/79069
29797         * cfgrtl.c (rtl_tidy_fallthru_edge): For any_uncondjump_p that can't
29798         be removed due to side-effects, don't remove following barrier nor
29799         turn the successor edge into fallthru edge.
29800
29801 2017-01-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29802
29803         PR target/79044
29804         * config/rs6000/rs6000.c (insn_is_swappable_p): Mark
29805         element-reversing loads and stores as not swappable.
29806
29807 2017-01-12  Nathan Sidwell  <nathan@acm.org>
29808             Nicolai Stange  <nicstange@gmail.com>
29809
29810         * combine.c (try_combine): Don't ignore result of overlap checking
29811         loop.  Combine overlap & asm check into single loop.
29812
29813 2017-01-12  Richard Biener  <rguenther@suse.de>
29814
29815         * tree-pretty-print.c (dump_generic_node): Provide -gimple
29816         variant for MEM_REF.  Sanitize INTEGER_CST for -gimple.
29817
29818 2017-01-12  Richard Biener  <rguenther@suse.de>
29819
29820         * tree.c (initialize_tree_contains_struct): Make TS_OPTIMIZATION
29821         and TS_TARGET_OPTION directly derive from TS_BASE.
29822         * tree-core.h (tree_optimization_option): Derive from tree_base.
29823         (tree_target_option): Likewise.
29824
29825 2017-01-11  Uros Bizjak  <ubizjak@gmail.com>
29826
29827         * config/i386/i386.c (memory_address_length): Increase len
29828         only when rip_relative_addr_p returns false.
29829
29830 2017-01-11  Julia Koval  <julia.koval@intel.com>
29831
29832         * common/config/i386/i386-common.c (OPTION_MASK_ISA_SGX_UNSET): New.
29833         (OPTION_MASK_ISA_SGX_SET): New.
29834         (ix86_handle_option): Handle OPT_msgx.
29835         * config.gcc: Added sgxintrin.h.
29836         * config/i386/driver-i386.c (host_detect_local_cpu): Detect sgx.
29837         * config/i386/i386-c.c (ix86_target_macros_internal): Define __SGX__.
29838         * config/i386/i386.c (ix86_target_string): Add -msgx.
29839         (PTA_SGX): New.
29840         (ix86_option_override_internal): Handle new options.
29841         (ix86_valid_target_attribute_inner_p): Add sgx.
29842         * config/i386/i386.h (TARGET_SGX, TARGET_SGX_P): New.
29843         * config/i386/i386.opt: Add msgx.
29844         * config/i386/sgxintrin.h: New file.
29845         * config/i386/x86intrin.h: Add sgxintrin.h.
29846
29847 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
29848
29849         PR c++/71537
29850         * fold-const.c (maybe_nonzero_address): Return 1 for function
29851         local objects.
29852         (tree_single_nonzero_warnv_p): Don't handle function local objects
29853         here.
29854
29855         PR c++/72813
29856         * gcc.c (default_compilers): Don't add -o %g.s for -S -save-temps
29857         of c-header.
29858
29859 2017-01-11  David Malcolm  <dmalcolm@redhat.com>
29860
29861         PR driver/78877
29862         * opts.c: Include "spellcheck.h"
29863         (struct string_fragment): New struct.
29864         (struct edit_distance_traits<const string_fragment &>): New
29865         struct.
29866         (get_closest_sanitizer_option): New function.
29867         (parse_sanitizer_options): Offer suggestions for unrecognized arguments.
29868
29869 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
29870
29871         * dwarf2out.c (DWARF_COMPILE_UNIT_HEADER_SIZE): For DWARF5 decrease
29872         by 12.
29873         (DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE): Always
29874         DWARF_COMPILE_UNIT_HEADER_SIZE plus 12.
29875         (DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE): Define.
29876         (calc_base_type_die_sizes): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE
29877         for initial die_offset if dwarf_split_debug_info.
29878         (output_comp_unit): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE for
29879         initial next_die_offset if dwo_id is non-NULL.  Don't emit padding
29880         fields.
29881         (output_skeleton_debug_sections): Formatting fix.  Use
29882         DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE instead of
29883         DWARF_COMPILE_UNIT_HEADER_SIZE.  Don't emit padding.
29884
29885 2017-01-11  Wilco Dijkstra  <wdijkstr@arm.com>
29886
29887         * config/arm/cortex-a53.md: Add bypasses for
29888         cortex_a53_r2f_cvt.
29889         (cortex_a53_r2f): Only use for transfers.
29890         (cortex_a53_f2r): Likewise.
29891         (cortex_a53_r2f_cvt): Add reservation for conversions.
29892         (cortex_a53_f2r_cvt): Likewise.
29893
29894 2017-01-11  Tamar Christina  <tamar.christina@arm.com>
29895
29896         * config/arm/arm_neon.h: Add __artificial__ and gnu_inline
29897         to all inlined functions, change static to extern.
29898
29899 2017-01-11  Christophe Lyon  <christophe.lyon@linaro.org>
29900
29901         PR target/78253
29902         * config/arm/arm.c (legitimize_pic_address): Handle reference to
29903         weak symbol.
29904         (arm_assemble_integer): Likewise.
29905
29906 2017-01-11  Richard Earnshaw  <rearnsha@arm.com>
29907
29908         * config.gcc: Use new awk script to check CPU, FPU and architecture
29909         parameters for --with-... options.
29910         * config/arm/parsecpu.awk: New file
29911         * config/arm/arm-cpus.in: New file.
29912         * config/arm/arm-opts.h: Include arm-cpu.h instead of processing .def
29913         files.
29914         * config/arm/arm.c: Include arm-cpu-data.h instead of processing .def
29915         files.
29916         * config/arm/t-arm: Update dependency rules.
29917         * common/config/arm/arm-common.c: Include arm-cpu-cdata.h instead
29918         of processing .def files.
29919         * config/arm/genopt.sh: Deleted.
29920         * config/arm/gentune.sh: Deleted.
29921         * config/arm/arm-cores.def: Deleted.
29922         * config/arm/arm-arches.def: Deleted.
29923         * config/arm/arm-fpus.def: Deleted.
29924         * config/arm/arm-tune.md: Regenerated.
29925         * config/arm/arm-tables.opt: Regenerated.
29926         * config/arm/arm-cpu.h: New generated file.
29927         * config/arm/arm-cpu-data.h: New generated file.
29928         * config/arm/arm-cpu-cdata.h: New generated file.
29929
29930 2017-01-11  Maxim Ostapenko  <m.ostapenko@samsung.com>
29931
29932         PR lto/79042
29933         * lto-cgraph.c (lto_output_varpool_node): Pack dynamically_initialized
29934         bit.
29935         (input_varpool_node): Unpack dynamically_initialized bit.
29936
29937 2017-01-11  Eric Botcazou  <ebotcazou@adacore.com>
29938
29939         PR rtl-optimization/79032
29940         * lra-constraints.c (simplify_operand_subreg): In the MEM case, test
29941         the alignment of the adjusted memory reference against that of MODE,
29942         instead of the alignment of the original memory reference.
29943
29944 2017-01-11  Martin Jambor  <mjambor@suse.cz>
29945
29946         * hsa.c (hsa_callable_function_p): Revert addition of DECL_ARTIFICIAL
29947         test.
29948         * ipa-hsa.c (process_hsa_functions): Only duplicate non-artificial
29949         decorated functions.
29950
29951 2017-01-11  Richard Biener  <rguenther@suse.de>
29952
29953         * tree-vrp.c (evrp_dom_walker::before_dom_children): Also
29954         set range/nonnull info for PHI results.  Do not set it on
29955         stmts marked for removal.
29956
29957 2017-01-10  Eric Botcazou  <ebotcazou@adacore.com>
29958
29959         * expr.c (store_field): In the bitfield case, fetch the return value
29960         from the registers before applying a single big-endian adjustment.
29961         Always do a final load for a BLKmode value not larger than a word.
29962
29963 2017-01-10  David Malcolm  <dmalcolm@redhat.com>
29964
29965         PR c++/77949
29966         * input.c (selftest::test_accessing_ordinary_linemaps): Verify
29967         that we correctly handle column numbers greater than
29968         LINE_MAP_MAX_COLUMN_NUMBER.
29969
29970 2017-01-10  Martin Sebor  <msebor@redhat.com>
29971
29972         PR middle-end/78245
29973         * gimple-ssa-sprintf.c (get_destination_size): Call
29974         {init,fini}object_sizes.
29975         * tree-object-size.c (addr_object_size): Adjust.
29976         (pass_through_call): Adjust.
29977         (pass_object_sizes::execute): Adjust.
29978         * tree-object-size.h (fini_object_sizes): Declare.
29979
29980 2017-01-10  Martin Sebor  <msebor@redhat.com>
29981
29982         PR tree-optimization/78775
29983         * builtins.c (get_size_range): Move...
29984         * calls.c: ...to here.
29985         (alloc_max_size): Accept zero argument.
29986         (operand_signed_p): Remove.
29987         (maybe_warn_alloc_args_overflow): Call get_size_range.
29988         * calls.h (get_size_range): Declare.
29989
29990 2017-01-10  Joe Seymour  <joe.s@somniumtech.com>
29991
29992         * config/msp430/driver-msp430.c (msp430_mcu_data): Sync with data
29993         from TI's devices.csv file as of September 2016.
29994         * config/msp430/msp430.c (msp430_mcu_data): Likewise.
29995
29996 2017-01-10  Sandra Loosemore  <sandra@codesourcery.com>
29997
29998         * doc/extend.texi: Tweak formatting to fix overfull hbox warnings.
29999         * doc/invoke.texi: Likewise.
30000         * doc/md.texi: Likewise.
30001         * doc/objc.texi: Likewise.
30002
30003 2017-01-10  Joshua Conner  <joshconner@google.com>
30004
30005         * config/arm/fuchsia-elf.h: New file.
30006         * config/fuchsia.h: New file.
30007         * config.gcc (*-*-fuchsia*): Set native_system_header_dir.
30008         (aarch64*-*-fuchsia*, arm*-*-fuchsia*, x86_64-*-fuchsia*): Add to
30009         targets.
30010         * config.host: (aarch64*-*-fuchsia*, arm*-*-fuchsia*): Add to hosts.
30011
30012 2016-01-10  Richard Biener  <rguenther@suse.de>
30013
30014         PR tree-optimization/79034
30015         * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
30016         Propagate out degenerate PHIs in the joiner.
30017
30018 2017-01-10  Martin Liska  <mliska@suse.cz>
30019
30020         * ipa-icf.c (sort_sem_items_by_decl_uid): New function.
30021         (sort_congruence_classes_by_decl_uid): Likewise.
30022         (sort_congruence_class_groups_by_decl_uid): Likewise.
30023         (sem_item_optimizer::merge_classes): Sort class, groups in these
30024         classes and members in the groups by DECL_UID of declarations.
30025         This would make merge operations stable.
30026
30027 2017-01-10  Martin Liska  <mliska@suse.cz>
30028
30029         * ipa-icf.c (sem_item_optimizer::sem_item_optimizer): Remove
30030         usage of m_classes_vec.
30031         (sem_item_optimizer::~sem_item_optimizer):  Likewise.
30032         (sem_item_optimizer::get_group_by_hash): Likewise.
30033         (sem_item_optimizer::subdivide_classes_by_equality): Likewise.
30034         (sem_item_optimizer::subdivide_classes_by_sensitive_refs): Likewise.
30035         (sem_item_optimizer::verify_classes): Likewise.
30036         (sem_item_optimizer::process_cong_reduction): Likewise.
30037         (sem_item_optimizer::dump_cong_classes): Likewise.
30038         (sem_item_optimizer::merge_classes): Likewise.
30039         * ipa-icf.h (congruence_class_hash): Rename from
30040         congruence_class_group_hash.  Remove declaration of m_classes_vec.
30041
30042 2017-01-10  Andrew Senkevich  <andrew.senkevich@intel.com>
30043
30044         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VPOPCNTDQ_SET,
30045         OPTION_MASK_ISA_AVX512VPOPCNTDQ_UNSET): New.
30046         * config.gcc: Add avx512vpopcntdqintrin.h.
30047         * config/i386/avx512vpopcntdqintrin.h: New.
30048         * config/i386/cpuid.h (bit_AVX512VPOPCNTDQ): New.
30049         * config/i386/i386-builtin-types.def: Add new types.
30050         * config/i386/i386-builtin.def (__builtin_ia32_vpopcountd_v16si,
30051         __builtin_ia32_vpopcountd_v16si_mask, __builtin_ia32_vpopcountq_v8di,
30052         __builtin_ia32_vpopcountq_v8di_mask): New.
30053         * config/i386/i386-c.c (ix86_target_macros_internal): Define
30054         __AVX512VPOPCNTDQ__.
30055         * config/i386/i386.c (ix86_target_string): Add -mavx512vpopcntdq.
30056         (PTA_AVX512VPOPCNTDQ): Define.
30057         * config/i386/i386.h (TARGET_AVX512VPOPCNTDQ,
30058         TARGET_AVX512VPOPCNTDQ_P): Define.
30059         * config/i386/i386.opt: Add mavx512vpopcntdq.
30060         * config/i386/immintrin.h: Include avx512vpopcntdqintrin.h.
30061         * config/i386/sse.md (define_insn "vpopcount<mode><mask_name>"): New.
30062
30063 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
30064
30065         PR middle-end/77484
30066         * predict.def (PRED_CALL): Set to 67.
30067
30068 2017-01-09  Eric Botcazou  <ebotcazou@adacore.com>
30069
30070         * expr.c (store_field): In the bitfield case, if the value comes from
30071         a function call and is of an aggregate type returned in registers, do
30072         not modify the field mode; extract the value in all cases if the mode
30073         is BLKmode and the size is not larger than a word.
30074
30075 2017-01-09  Dominique d'Humieres  <dominiq@lps.ens.fr>
30076
30077         PR target/71017
30078         * config/i386/cpuid.h: Fix undefined behavior.
30079
30080 2017-01-04  Jeff Law  <law@redhat.com>
30081
30082         PR tree-optimization/79007
30083         PR tree-optimization/67955
30084         * tree-ssa-alias.c (same_addr_size_stores_p): Only need to be
30085         conservative for pt.null when flag_non_call_exceptions is on.
30086
30087 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
30088
30089         PR translation/79019
30090         PR translation/79020
30091         * params.def (PARAM_INLINE_MIN_SPEEDUP,
30092         PARAM_IPA_CP_SINGLE_CALL_PENALTY,
30093         PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD): Fix typos
30094         in descriptions.
30095         * config/avr/avr.opt (maccumulate-args): Likewise.
30096         * config/msp430/msp430.opt (mwarn-mcu): Likewise.
30097         * common.opt (freport-bug): Likewise.
30098         * cif-code.def (CIF_FINAL_ERROR): Likewise.
30099         * doc/invoke.texi (ipa-cp-single-call-penalty): Likewise.
30100         * config/s390/s390.c (s390_invalid_binary_op): Fix spelling in
30101         translatable string.
30102         * config/i386/i386.c (function_value_32): Likewise.
30103         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Likewise.
30104         * config/msp430/msp430.c (msp430_option_override, msp430_attr):
30105         Likewise.
30106         * config/msp430/driver-msp430.c (msp430_select_hwmult_lib): Likewise.
30107         * common/config/msp430/msp430-common.c (msp430_handle_option):
30108         Likewise.
30109         * symtab.c (symtab_node::verify_base): Likewise.
30110         * opts.c (set_debug_level): Likewise.
30111         * tree.c (verify_type_variant): Likewise.  Fix typo in comment.
30112         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add
30113         missing whitespace to translatable strings.
30114         * config/avr/avr.md (bswapsi2): Fix typo in comment.
30115         * config/sh/superh.h: Likewise.
30116         * config/i386/xopintrin.h: Likewise.
30117         * config/i386/znver1.md: Likewise.
30118         * config/rs6000/rs6000.c (struct rs6000_opt_mask): Likewise.
30119         * ipa-inline-analysis.c (compute_inline_parameters): Likewise.
30120         * double-int.h (struct double_int): Likewise.
30121         * double-int.c (div_and_round_double): Likewise.
30122         * wide-int.cc: Likewise.
30123         * tree-ssa.c (non_rewritable_mem_ref_base): Likewise.
30124         * tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise.
30125         * cfgcleanup.c (crossjumps_occured): Renamed to ...
30126         (crossjumps_occurred): ... this.
30127         (try_crossjump_bb, try_head_merge_bb, try_optimize_cfg, cleanup_cfg):
30128         Adjust all uses.
30129
30130         PR tree-optimization/78899
30131         * tree-if-conv.c (version_loop_for_if_conversion): Instead of
30132         returning bool return struct loop *, NULL for failure and the new
30133         loop on success.
30134         (versionable_outer_loop_p): Don't version outer loop if it has
30135         dont_vectorized bit set.
30136         (tree_if_conversion): When versioning outer loop, ensure
30137         tree_if_conversion is performed also on the inner loop of the
30138         non-vectorizable outer loop copy.
30139         * tree-vectorizer.c (set_uid_loop_bbs): Formatting fix.  Fold
30140         LOOP_VECTORIZED in inner loop of the scalar outer loop and
30141         prevent vectorization of it.
30142         (vectorize_loops): For outer + inner LOOP_VECTORIZED, ensure
30143         the outer loop vectorization of the non-scalar version is attempted
30144         before vectorization of the inner loop in scalar version.  If
30145         outer LOOP_VECTORIZED guarded loop is not vectorized, prevent
30146         vectorization of its inner loop.
30147         * tree-vect-loop-manip.c (rename_variables_in_bb): If outer_loop
30148         has 2 inner loops, rename also on edges from bb whose single pred
30149         is outer_loop->header.  Fix typo in function comment.
30150
30151 2017-01-09  Martin Sebor  <msebor@redhat.com>
30152
30153         PR bootstrap/79033
30154         * asan.c (asan_emit_stack_protection): Increase local buffer size
30155         to avoid snprintf truncation warning.
30156
30157 2017-01-09  Andrew Pinski  <apinski@cavium.com>
30158
30159         * config/aarch64/aarch64-cores.def: Add thunderx2t99.  Change vulcan
30160         to reference thunderx2t99 for the tuning structure
30161         * config/aarch64/aarch64-cost-tables.h (vulcan_extra_costs):
30162         Rename to ...
30163         (thunderx2t99_extra_costs): This.
30164         * config/aarch64/aarch64-tune.md: Regenerate.
30165         * config/aarch64/aarch64.c (vulcan_addrcost_table): Rename to ...
30166         (vulcan_addrcost_table): This.
30167         (vulcan_regmove_cost): Rename to ...
30168         (thunderx2t99_regmove_cost): This.
30169         (vulcan_vector_cost): Rename to ...
30170         (thunderx2t99_vector_cost): this.
30171         (vulcan_branch_cost): Rename to ...
30172         (thunderx2t99_branch_cost): This.
30173         (vulcan_tunings): Rename to ...
30174         (thunderx2t99_tunings): This and s/vulcan/thunderx2t99 .
30175         * doc/invoke.texi (AARCH64/mtune): Add thunderx2t99.
30176
30177 2017-01-09  Martin Jambor  <mjambor@suse.cz>
30178
30179         PR ipa/78365
30180         PR ipa/78599
30181         * ipa-prop.h (ipa_jump_func): Swap positions of vr_known and m_vr.
30182         * ipa-cp.c (ipa_vr_operation_and_type_effects): New function.
30183         (propagate_vr_accross_jump_function): Use the above function for all
30184         value range computations for pass-through jump functions and type
30185         converasion from explicit value range values.
30186         (ipcp_propagate_stage): Do not attempt to deduce types of formal
30187         parameters from TYPE_ARG_TYPES.
30188         * ipa-prop.c (ipa_write_jump_function): Remove trailing whitespace.
30189         (ipa_write_node_info): Stream type of the actual argument.
30190         (ipa_read_node_info): Likewise. Also remove trailing whitespace.
30191
30192 2017-01-09  Martin Liska  <mliska@suse.cz>
30193
30194         PR pch/78970
30195         * gcc.c (driver_handle_option): Handle OPT_E and set have_E.
30196         (lookup_compiler): Do not show error message with have_E.
30197
30198 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
30199
30200         PR tree-optimization/78938
30201         * tree-vect-stmts.c (vectorizable_condition): For non-masked COND_EXPR
30202         where comp_vectype is VECTOR_BOOLEAN_TYPE_P, use
30203         BIT_{NOT,XOR,AND,IOR}_EXPR on the comparison operands instead of
30204         {EQ,NE,GE,GT,LE,LT}_EXPR directly inside of VEC_COND_EXPR.  Formatting
30205         fixes.
30206
30207 2017-01-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
30208
30209         * tree-ssa-address.c (gen_addr_rtx): Don't handle index if it
30210         is const0_rtx.
30211
30212 2017-01-09  Richard Biener  <rguenther@suse.de>
30213
30214         PR tree-optimization/78997
30215         * tree-vect-slp.c (vect_mask_constant_operand_p): Handle SSA
30216         name condition properly.
30217
30218 2017-01-09  Richard Biener  <rguenther@suse.de>
30219
30220         PR debug/79000
30221         * dwarf2out.c (is_cxx): New overload with context.
30222         (is_naming_typedef_decl): Use it.
30223
30224 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
30225
30226         * invoke.texi (Option Summary): Correct spacing in option lists
30227         and add line breaks to fix over-long lines.
30228
30229 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
30230
30231         PR middle-end/17660
30232
30233         * extend.texi (Common Variable Attributes): Add xref to GCC
30234         Internals manual to explain mode attribute keywords.
30235
30236 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
30237
30238         PR other/16519
30239         * doc/invoke.texi (Option Summary): Move -pthread to Linker Options
30240         and Preprocessor Options.
30241         (Options for Linking): Document -pthread here....
30242         (RS/6000 and PowerPC Options): ...not here.
30243         (Solaris 2 Options): ...or here.
30244         * doc/cppopts.texi: Document -pthread.
30245
30246 2017-01-08  Martin Sebor  <msebor@redhat.com>
30247
30248         PR middle-end/77708
30249         * doc/invoke.texi (Warning Options): Document -Wformat-truncation.
30250         * gimple-ssa-sprintf.c (call_info::reval_used, call_info::warnopt):
30251         New member functions.
30252         (format_directive): Used them.
30253         (add_bytes): Same.
30254         (pass_sprintf_length::handle_gimple_call): Same.
30255         * graphite-sese-to-poly.c (tree_int_to_gmp): Increase buffer size
30256         to avoid truncation for any argument.
30257         (extract_affine_mul): Same.
30258         * tree.c (get_file_function_name): Same.
30259
30260 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
30261
30262         PR middle-end/77484
30263         * predict.def (PRED_INDIR_CALL): Set to 86.
30264
30265 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
30266
30267         PR preprocessor/54124
30268         * doc/cppopts.texi: Reformat -d subtable to list the full name
30269         of the options.  Add cross-reference to the docs for the general
30270         compiler -d options.
30271         * doc/invoke.texi (Developer Options): Add cross-reference to the
30272         preprocessor-specific -d option documentation.
30273
30274 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
30275
30276         PR preprocessor/13498
30277         * doc/cpp.texi (Search Path): Rewrite to remove obsolete and
30278         redudant material, and reflect new command-line options.
30279         (System Headers): Likewise.
30280
30281 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
30282
30283         * doc/cppdiropts.texi: Merge documentation of -I, -iquote,
30284         -isystem, and -idirafter.  Copy-edit.
30285         * doc/cppopts.texi: Copy-edit.  Remove contradiction about
30286         default for -ftrack-macro-expansion.  Delete obsolete and
30287         badly-formatted implementation details about -fdebug-cpp output.
30288         * doc/cppwarnopts.texi: Copy-edit.
30289
30290 2017-01-07  David Malcolm  <dmalcolm@redhat.com>
30291
30292         PR c++/72803
30293         * input.c (selftest::test_accessing_ordinary_linemaps): Verify
30294         that the transition from a max line width >= 1<<10 to narrower
30295         lines works correctly.
30296
30297 2017-01-07  Alexandre Oliva <aoliva@redhat.com>
30298
30299         * doc/options.texi (PerFunction): New.
30300         * opt-functions.awk (switch_flags): Map both Optimization and
30301         PerFunction to CL_OPTIMIZATION.
30302         * opth-gen.awk: Test for PerFunction flag along with
30303         Optimization.
30304         * optc-save-gen.awk: Likewise.  Introduce var_opt_hash and set
30305         it only when the latter is present.  Skip those that don't in
30306         the hash function generator.
30307         * common.opt (fvar-tracking): Mark as PerFunction instead of
30308         Optimization.
30309         (fvar-tracking-assignments): Likewise.
30310         (fvar-tracking-assignments-toggle): Likewise.
30311         (fvar-tracking-uninit): Likewise.
30312
30313 2017-01-07  Jakub Jelinek  <jakub@redhat.com>
30314
30315         PR translation/79018
30316         * params.def (PARAM_MAX_STORES_TO_MERGE): Add missing space between
30317         the and store.
30318
30319 2017-01-06  Mikael Pettersson  <mikpelinux@gmail.com>
30320
30321         PR target/57583
30322         * config/m68k/m68k.opt (LONG_JUMP_TABLE_OFFSETS): New option.
30323         * config/m68k/linux.h (ASM_RETURN_CASE_JUMP): Handle
30324         TARGET_LONG_JUMP_TABLE_OFFSETS.
30325         * config/m68k/m68kelf.h (ASM_RETURN_CASE_JUMP): Likewise.
30326         * config/m68k/netbsd-elf.h (ASM_RETURN_CASE_JUMP): Likewise.
30327         * config/m68k/m68k.h (CASE_VECTOR_MODE): Likewise.
30328         (ASM_OUTPUT_ADDR_DIFF_ELF): Likewise.
30329         * config/m68k/m68k.md (tablejump expander): Likewise.
30330         (*tablejump_pcrel_hi): Renamed from unnamed insn, reject
30331         TARGET_LONG_JUMP_TABLE_OFFSETS.
30332         (*tablejump_pcrel_si): New insn, handle TARGET_LONG_JUMP_TABLE_OFFSETS.
30333         * doc/invoke.texi (M68K options): Add -mlong-jump-table-offsets.
30334
30335 2017-01-06  Edgar E. Iglesias <edgar.iglesias@xilinx.com>
30336             David Holsgrove <david.holsgrove@xilinx.com>
30337
30338         * common/config/microblaze/microblaze-common.c
30339         (TARGET_EXCEPT_UNWIND_INFO): Remove.
30340         * config/microblaze/microblaze-protos.h (microblaze_eh_return):
30341         New prototype.
30342         * config/microblaze/microblaze.c (microblaze_must_save_register)
30343         (microblaze_expand_epilogue, microblaze_return_addr): Handle
30344         calls_eh_return.
30345         (microblaze_eh_return): New function.
30346         * config/microblaze/microblaze.h (RETURN_ADDR_OFFSET)
30347         (EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM)
30348         (EH_RETURN_STACKADJ_RTX, ASM_PREFERRED_EH_DATA_FORMAT): New macros.
30349         * config/microblaze/microblaze.md (eh_return): New pattern.
30350
30351 2017-01-06  Jakub Jelinek  <jakub@redhat.com>
30352
30353         * system.h (GCC_DIAGNOSTIC_PUSH_IGNORED, GCC_DIAGNOSTIC_POP,
30354         GCC_DIAGNOSTIC_STRINGIFY): Define.
30355
30356         * read-rtl.c (rtx_reader::read_rtx_code): Avoid -Wsign-compare warning.
30357
30358 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
30359
30360         * config/arm/arm.md (<mcrr>): New.
30361         (<mrrc>): New.
30362         * config/arm/arm.c (arm_arch5te): New.
30363         (arm_option_override): Set arm_arch5te.
30364         (arm_coproc_builtin_available): Add support for mcrr, mcrr2, mrrc
30365         and mrrc2.
30366         * config/arm/arm-builtins.c (MCRR_QUALIFIERS): Define to...
30367         (arm_mcrr_qualifiers): ... this. New.
30368         (MRRC_QUALIFIERS): Define to...
30369         (arm_mrrc_qualifiers): ... this. New.
30370         * config/arm/arm_acle.h (__arm_mcrr, __arm_mcrr2, __arm_mrrc,
30371         __arm_mrrc2): New.
30372         * config/arm/arm_acle_builtins.def (mcrr, mcrr2, mrrc, mrrc2): New.
30373         * config/arm/iterators.md (MCRRI, mcrr, MCRR): New.
30374         (MRRCI, mrrc, MRRC): New.
30375         * config/arm/unspecs.md (VUNSPEC_MCRR, VUNSPEC_MCRR2, VUNSPEC_MRRC,
30376         VUNSPEC_MRRC2): New.
30377
30378 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
30379
30380         * config/arm/arm.md (<mcr>): New.
30381         (<mrc>): New.
30382         * config/arm/arm.c (arm_coproc_builtin_available): Add
30383         support for mcr, mrc, mcr2 and mrc2.
30384         * config/arm/arm-builtins.c (MCR_QUALIFIERS): Define to...
30385         (arm_mcr_qualifiers): ... this. New.
30386         (MRC_QUALIFIERS): Define to ...
30387         (arm_mrc_qualifiers): ... this. New.
30388         (MCR_QUALIFIERS): Define to ...
30389         (arm_mcr_qualifiers): ... this. New.
30390         * config/arm/arm_acle.h (__arm_mcr, __arm_mrc, __arm_mcr2,
30391         __arm_mrc2): New.
30392         * config/arm/arm_acle_builtins.def (mcr, mcr2, mrc, mrc2): New.
30393         * config/arm/iterators.md (MCRI, mcr, MCR, MRCI, mrc, MRC): New.
30394         * config/arm/unspecs.md (VUNSPEC_MCR, VUNSPEC_MCR2, VUNSPEC_MRC,
30395         VUNSPEC_MRC2): New.
30396
30397 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
30398
30399         * config/arm/arm.md (*ldc): New.
30400         (*stc): New.
30401         (<ldc>): New.
30402         (<stc>): New.
30403         * config/arm/arm.c (arm_coproc_builtin_available): Add
30404         support for ldc,ldcl,stc,stcl,ldc2,ldc2l,stc2 and stc2l.
30405         (arm_coproc_ldc_stc_legitimate_address): New.
30406         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
30407         'qualifier_const_pointer'.
30408         (LDC_QUALIFIERS): Define to...
30409         (arm_ldc_qualifiers): ... this. New.
30410         (STC_QUALIFIERS): Define to...
30411         (arm_stc_qualifiers): ... this. New.
30412         * config/arm/arm-protos.h
30413         (arm_coproc_ldc_stc_legitimate_address): New.
30414         * config/arm/arm_acle.h (__arm_ldc, __arm_ldcl, __arm_stc,
30415         __arm_stcl, __arm_ldc2, __arm_ldc2l, __arm_stc2, __arm_stc2l): New.
30416         * config/arm/arm_acle_builtins.def (ldc, ldc2, ldcl, ldc2l, stc,
30417         stc2, stcl, stc2l): New.
30418         * config/arm/constraints.md (Uz): New.
30419         * config/arm/iterators.md (LDCI, STCI, ldc, stc, LDC STC): New.
30420         * config/arm/unspecs.md (VUNSPEC_LDC, VUNSPEC_LDC2, VUNSPEC_LDCL,
30421         VUNSPEC_LDC2L, VUNSPEC_STC, VUNSPEC_STC2, VUNSPEC_STCL,
30422         VUNSPEC_STC2L): New.
30423
30424 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
30425
30426         * config/arm/arm.md (<cdp>): New.
30427         * config/arm/arm.c (neon_const_bounds): Rename this ...
30428         (arm_const_bounds): ... this.
30429         (arm_coproc_builtin_available): New.
30430         * config/arm/arm-builtins.c (SIMD_MAX_BUILTIN_ARGS): Increase.
30431         (arm_type_qualifiers): Add 'qualifier_unsigned_immediate'.
30432         (CDP_QUALIFIERS): Define to...
30433         (arm_cdp_qualifiers): ... this. New.
30434         (void_UP): Define.
30435         (arm_expand_builtin_args): Add case for 6 arguments.
30436         * config/arm/arm-protos.h (neon_const_bounds): Rename this ...
30437         (arm_const_bounds): ... this.
30438         (arm_coproc_builtin_available): New.
30439         * config/arm/arm_acle.h (__arm_cdp): New.
30440         (__arm_cdp2): New.
30441         * config/arm/arm_acle_builtins.def (cdp): New.
30442         (cdp2): New.
30443         * config/arm/iterators.md (CDPI,CDP,cdp): New.
30444         * config/arm/neon.md: Rename all 'neon_const_bounds' to
30445         'arm_const_bounds'.
30446         * config/arm/types.md (coproc): New.
30447         * config/arm/unspecs.md (VUNSPEC_CDP, VUNSPEC_CDP2): New.
30448         * doc/extend.texi (ACLE): Add a mention of Coprocessor intrinsics.
30449         * doc/sourcebuild.texi (arm_coproc1_ok, arm_coproc2_ok,
30450         arm_coproc3_ok, arm_coproc4_ok): Document new effective targets.
30451
30452 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
30453
30454         * config/arm/arm-builtins.c (arm_unsigned_binop_qualifiers): New.
30455         (UBINOP_QUALIFIERS): New.
30456         (si_UP): Define.
30457         (acle_builtin_data): New. Change comment.
30458         (arm_builtins): Remove ARM_BUILTIN_CRC32B, ARM_BUILTIN_CRC32H,
30459         ARM_BUILTIN_CRC32W, ARM_BUILTIN_CRC32CB, ARM_BUILTIN_CRC32CH,
30460         ARM_BUILTIN_CRC32CW. Add ARM_BUILTIN_ACLE_BASE and include
30461         arm_acle_builtins.def.
30462         (ARM_BUILTIN_ACLE_PATTERN_START): Define.
30463         (arm_init_acle_builtins): New.
30464         (CRC32_BUILTIN): Remove.
30465         (bdesc_2arg): Remove entries for crc32b, crc32h, crc32w,
30466         crc32cb, crc32ch and crc32cw.
30467         (arm_init_crc32_builtins): Remove.
30468         (arm_init_builtins): Use arm_init_acle_builtins rather
30469         than arm_init_crc32_builtins.
30470         (arm_expand_acle_builtin): New.
30471         (arm_expand_builtin): Use 'arm_expand_acle_builtin'.
30472         * config/arm/arm_acle_builtins.def: New.
30473
30474 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
30475
30476         * config/arm/arm-builtins.c (neon_builtin_datum): Rename to ..
30477         (arm_builtin_datum): ... this.
30478         (arm_init_neon_builtin): Rename to ...
30479         (arm_init_builtin): ... this. Add a new parameters PREFIX
30480         and USE_SIG_IN_NAME.
30481         (arm_init_neon_builtins): Replace 'arm_init_neon_builtin' with
30482         'arm_init_builtin'. Replace type 'neon_builtin_datum' with
30483         'arm_builtin_datum'.
30484         (arm_init_vfp_builtins): Likewise.
30485         (builtin_arg): Rename enum's replacing 'NEON_ARG' with
30486         'ARG_BUILTIN' and add a 'ARG_BUILTIN_NEON_MEMORY.
30487         (arm_expand_neon_args): Rename to ...
30488         (arm_expand_builtin_args): ... this. Rename builtin_arg
30489         enum values and differentiate between ARG_BUILTIN_MEMORY
30490         and ARG_BUILTIN_NEON_MEMORY.
30491         (arm_expand_neon_builtin_1): Rename to ...
30492         (arm_expand_builtin_1): ... this. Rename builtin_arg enum
30493         values, arm_expand_builtin_args and add bool parameter NEON.
30494         (arm_expand_neon_builtin): Use arm_expand_builtin_1.
30495         (arm_expand_vfp_builtin): Likewise.
30496         (NEON_MAX_BUILTIN_ARGS): Remove, it was unused.
30497
30498 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
30499
30500         PR middle-end/77484
30501         * predict.def (PRED_POLYMORPHIC_CALL): Set to 59.
30502         * predict.c (tree_estimate_probability_bb): Reverse direction of
30503         polymorphic call predictor.
30504
30505 2017-01-06  David Malcolm  <dmalcolm@redhat.com>
30506
30507         * passes.c (execute_one_pass): Split out pass-skipping logic into...
30508         (determine_pass_name_match): ...this new function and...
30509         (should_skip_pass_p): ...this new function.
30510
30511 2017-01-06  Nathan Sidwell  <nathan@acm.org>
30512
30513         * ipa-visibility.c (function_and_variable_visibility): Reformat
30514         comments and long lines.  Remove extrneous if.
30515         * symtab.c (symtab_node::make_decl_local): Fix code format.
30516         (symtab_node::set_section_for_node): Fix comment typo.
30517
30518 2017-01-06  Martin Liska  <mliska@suse.cz>
30519
30520         PR bootstrap/79003
30521         * lra-constraints.c: Rename invariant to lra_invariant.
30522         * predict.c (set_even_probabilities): Initialize e to NULL.
30523
30524 2017-01-05  Martin Sebor  <msebor@redhat.com>
30525
30526         PR tree-optimization/78910
30527         * gimple-ssa-sprintf.c (tree_digits): Add an argument.
30528         (format_integer): Correct off-by-one error in the handling
30529         of precision with negative numbers in signed conversions..
30530
30531 2017-01-05  Eric Botcazou  <ebotcazou@adacore.com>
30532
30533         * doc/invoke.texi (C Dialect Options): Adjust -fsso-struct entry.
30534
30535 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
30536
30537         PR tree-optimization/71016
30538         * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Pass cond_stmt to
30539         factor_out_conditional_conversion.  Formatting fix.
30540         (factor_out_conditional_conversion): Add cond_stmt argument.
30541         If arg1 is INTEGER_CST, punt if new_arg0 is not any operand of
30542         cond_stmt and if arg0_def_stmt is not the only stmt in its bb.
30543         Formatting fix.
30544
30545 2017-01-05  David Malcolm  <dmalcolm@redhat.com>
30546
30547         * Makefile.in (OBJS): Add read-md.o, read-rtl.o,
30548         read-rtl-function.o, and selftest-rtl.o.
30549         * config/aarch64/aarch64.c: Include selftest.h and selftest-rtl.h.
30550         (selftest::aarch64_test_loading_full_dump): New function.
30551         (selftest::aarch64_run_selftests): New function.
30552         (TARGET_RUN_TARGET_SELFTESTS): Wire it up to
30553         selftest::aarch64_run_selftests.
30554         * config/i386/i386.c
30555         (selftest::ix86_test_loading_dump_fragment_1): New function.
30556         (selftest::ix86_test_loading_call_insn): New function.
30557         (selftest::ix86_test_loading_full_dump): New function.
30558         (selftest::ix86_test_loading_unspec): New function.
30559         (selftest::ix86_run_selftests): Call the new functions.
30560         * emit-rtl.c (maybe_set_max_label_num): New function.
30561         * emit-rtl.h (maybe_set_max_label_num): New decl.
30562         * function.c (instantiate_decls): Guard call to
30563         instantiate_decls_1 with if (DECL_INITIAL (fndecl)).
30564         * function-tests.c (selftest::verify_three_block_rtl_cfg): Remove
30565         "static".
30566         * gensupport.c (gen_reader::gen_reader): Pass "false"
30567         for new "compact" param of rtx_reader.
30568         * print-rtl.c (rtx_writer::print_rtx_operand): Print "(nil)"
30569         rather than an empty string for NULL strings.
30570         * read-md.c: Potentially include config.h rather than bconfig.h.
30571         Wrap include of errors.h with #ifdef GENERATOR_FILE.
30572         (have_error): New global, copied from errors.c.
30573         (md_reader::read_name): Rename to...
30574         (md_reader::read_name_1): ...this, adding "out_loc" param,
30575         and converting "missing name or number" to returning false, rather
30576         than failing.
30577         (md_reader::read_name): Reimplement in terms of read_name_1.
30578         (md_reader::read_name_or_nil): New function.
30579         (md_reader::read_string): Handle "(nil)" by returning NULL.
30580         (md_reader::md_reader): Add new param "compact".
30581         (md_reader::read_md_files): Wrap with #ifdef GENERATOR_FILE.
30582         (md_reader::read_file): New method.
30583         * read-md.h (md_reader::md_reader): Add new param "compact".
30584         (md_reader::read_file): New method.
30585         (md_reader::is_compact): New accessor.
30586         (md_reader::read_name): Convert return type from void to file_location.
30587         (md_reader::read_name_or_nil): New decl.
30588         (md_reader::read_name_1): New decl.
30589         (md_reader::m_compact): New field.
30590         (noop_reader::noop_reader): Pass "false" for new "compact" param
30591         of rtx_reader.
30592         (rtx_reader::rtx_reader): Add new "compact" param.
30593         (rtx_reader::read_rtx_operand): Make virtual and convert return
30594         type from void to rtx.
30595         (rtx_reader::read_until): New decl.
30596         (rtx_reader::handle_any_trailing_information): New virtual function.
30597         (rtx_reader::postprocess): New virtual function.
30598         (rtx_reader::finalize_string): New virtual function.
30599         (rtx_reader::m_in_call_function_usage): New field.
30600         (rtx_reader::m_reuse_rtx_by_id): New field.
30601         * read-rtl-function.c: New file.
30602         * selftest-rtl.c (selftest::assert_rtx_ptr_eq_at): New function.
30603         * selftest-rtl.h (ASSERT_RTX_PTR_EQ): New macro.
30604         (selftest::verify_three_block_rtl_cfg): New decl.
30605         * read-rtl-function.h: New file.
30606         * read-rtl.c: Potentially include config.h rather than bconfig.h.
30607         For host, include function.h, memmodel.h, and emit-rtl.h.
30608         (one_time_initialization): New function.
30609         (struct compact_insn_name): New struct.
30610         (compact_insn_names): New array.
30611         (find_code): Handle insn codes in compact dumps.
30612         (apply_subst_iterator): Wrap with #ifdef GENERATOR_FILE.
30613         (bind_subst_iter_and_attr): Likewise.
30614         (add_condition_to_string): Likewise.
30615         (add_condition_to_rtx): Likewise.
30616         (apply_attribute_uses): Likewise.
30617         (add_current_iterators): Likewise.
30618         (apply_iterators): Likewise.
30619         (initialize_iterators): Guard usage of apply_subst_iterator with
30620         #ifdef GENERATOR_FILE.
30621         (read_conditions): Wrap with #ifdef GENERATOR_FILE.
30622         (md_reader::read_mapping): Likewise.
30623         (add_define_attr_for_define_subst): Likewise.
30624         (add_define_subst_attr): Likewise.
30625         (read_subst_mapping): Likewise.
30626         (check_code_iterator): Likewise.
30627         (rtx_reader::read_rtx): Likewise.  Move one-time initialization
30628         logic to...
30629         (one_time_initialization): New function.
30630         (rtx_reader::read_until): New method.
30631         (read_flags): New function.
30632         (parse_reg_note_name): New function.
30633         (rtx_reader::read_rtx_code): Initialize "iterator" to NULL.
30634         Handle reuse_rtx ids.
30635         Wrap iterator lookup within #ifdef GENERATOR_FILE.
30636         Add parsing support for RTL dumps, mirroring the special-cases in
30637         print_rtx, by calling read_flags, reading REG_NOTE names, INSN_UID
30638         values, and calling handle_any_trailing_information.
30639         (rtx_reader::read_rtx_operand): Convert return type from void
30640         to rtx, returning return_rtx.  Handle case 'e'.  Call
30641         finalize_string on XSTR and XTMPL fields.
30642         (rtx_reader::read_nested_rtx):  Handle dumps in which trailing
30643          "(nil)" values were omitted.  Call the postprocess vfunc on the
30644         return_rtx.
30645         (rtx_reader::rtx_reader): Add new "compact" param and pass to base
30646         class ctor.  Initialize m_in_call_function_usage.  Call
30647         one_time_initialization.
30648         * rtl-tests.c (selftest::test_uncond_jump): Call
30649         set_new_first_and_last_insn.
30650         * rtl.h (read_rtx): Wrap decl with #ifdef GENERATOR_FILE.
30651         * selftest-rtl.c: New file.
30652         * selftest-rtl.h (class selftest::rtl_dump_test): New class.
30653         (selftest::get_insn_by_uid): New decl.
30654         * selftest-run-tests.c (selftest::run_tests): Call
30655         read_rtl_function_c_tests.
30656         * selftest.h  (selftest::read_rtl_function_c_tests): New decl.
30657         * tree-dfa.c (ssa_default_def): Return NULL_TREE for rtl function
30658         dumps.
30659
30660 2017-01-05  Uros Bizjak  <ubizjak@gmail.com>
30661
30662         * config/i386/i386.md (*testqi_ext_3): No need to handle memory
30663         operands in a special way.  Assert that pos+len <= mode precision.
30664
30665 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
30666
30667         * common.opt (fvect-cost-model): Remove RejectNegative flag, use
30668         3 argument Alias with unlimited for the negative form.
30669         (fno-vect-cost-model): Removed.
30670
30671 2017-01-05  Martin Liska  <mliska@suse.cz>
30672
30673         * hsa-gen.c (gen_hsa_divmod): New function.
30674         (gen_hsa_insn_for_internal_fn_call): Use the function for IFN_DIVMOD.
30675
30676 2017-01-05  Martin Liska  <mliska@suse.cz>
30677
30678         PR pch/78970
30679         * gcc.c (lookup_compiler): Reject '-' filename for a precompiled
30680         header.
30681
30682 2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
30683
30684         * config/s390/s390.c (s390_expand_setmem): Unroll the loop for
30685         small constant length operands.
30686
30687 2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
30688
30689         * config/s390/s390.c (s390_expand_setmem): Avoid overlapping bytes
30690         between loop iterations.
30691
30692 2017-01-05  Martin Liska  <mliska@suse.cz>
30693
30694         PR sanitizer/78815
30695         * gimplify.c (gimplify_decl_expr): Compare to
30696         asan_poisoned_variables instread of checking flags.
30697         (gimplify_target_expr): Likewise.
30698         (gimplify_expr): Likewise.
30699         (gimplify_function_tree): Conditionally initialize
30700         asan_poisoned_variables.
30701
30702 2017-01-04  Jeff Law  <law@redhat.com>
30703
30704         PR tree-optimizatin/78812
30705         * rtl.h (contains_mem_rtx_p): Prototype.
30706         * ifcvt.c (containts_mem_rtx_p): Move from here to...
30707         * rtlanal.c (contains_mem_rtx_p): Here and remove static linkage.
30708         * gcse.c (prune_expressions): Use contains_mem_rtx_p to discover
30709         and prune MEMs that are not at the toplevel of a SET_SRC rtx.  Look
30710         through ZERO_EXTEND and SIGN_EXTEND when trying to avoid pruning MEMs.
30711
30712 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
30713
30714         * input.c (assert_char_at_range): Default-initialize actual_range.
30715
30716 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
30717
30718         * df-scan.c (df_ref_create_structure): Make regno unsigned,
30719         to match the caller.
30720
30721 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
30722
30723         * cfgexpand.c (expand_gimple_basic_block): Disregard debug
30724         insns after final jump in test to emit dummy move.
30725
30726 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
30727
30728         * gimple-iterator.h (gsi_one_nondebug_before_end_p): New.
30729         * tree-eh.c (cleanup_empty_eh): Skip more debug stmts.
30730
30731 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
30732
30733         * multiple_target.c (create_dispatcher_calls): Init e_next.
30734         * tree-ssa-loop-split.c (split_loop): Init border.
30735         * tree-vect-loop.c (vect_determine_vectorization_factor): Init
30736         scalar_type.
30737
30738 2017-01-04  Michael Meissner  <meissner@linux.vnet.ibm.com>
30739
30740         PR target/71977
30741         PR target/70568
30742         PR target/78823
30743         * config/rs6000/predicates.md (sf_subreg_operand): New predicate.
30744         (altivec_register_operand): Do not return true if the operand
30745         contains a SUBREG mixing SImode and SFmode.
30746         (vsx_register_operand): Likewise.
30747         (vsx_reg_sfsubreg_ok): New predicate.
30748         (vfloat_operand): Do not return true if the operand contains a
30749         SUBREG mixing SImode and SFmode.
30750         (vint_operand): Likewise.
30751         (vlogical_operand): Likewise.
30752         (gpc_reg_operand): Likewise.
30753         (int_reg_operand): Likewise.
30754         * config/rs6000/rs6000-protos.h (valid_sf_si_move): Add declaration.
30755         * config/rs6000/rs6000.c (valid_sf_si_move): New function to
30756         determine if a MOVSI or MOVSF operation contains SUBREGs that mix
30757         SImode and SFmode.
30758         (rs6000_emit_move_si_sf_subreg): New helper function.
30759         (rs6000_emit_move): Call rs6000_emit_move_si_sf_subreg to possbily
30760         fixup SUBREGs involving SImode and SFmode.
30761         * config/rs6000/vsx.md (SFBOOL_*): New constants that are operand
30762         numbers for the new peephole2 optimization.
30763         (peephole2 for SFmode unions): New peephole2 to optimize cases in
30764         the GLIBC math library that do AND/IOR/XOR operations on single
30765         precision floating point.
30766         * config/rs6000/rs6000.h (TARGET_NO_SF_SUBREG): New internal
30767         target macros to say whether we need to avoid SUBREGs mixing
30768         SImode and SFmode.
30769         (TARGET_ALLOW_SF_SUBREG): Likewise.
30770         * config/rs6000/rs6000.md (UNSPEC_SF_FROM_SI): New unspecs.
30771         (UNSPEC_SI_FROM_SF): Likewise.
30772         (iorxor): Change spacing.
30773         (and_ior_xor): New iterator for AND, IOR, and XOR.
30774         (movsi_from_sf): New insns for SImode/SFmode SUBREG support.
30775         (movdi_from_sf_zero_ext): Likewise.
30776         (mov<mode>_hardfloat, FMOVE32 iterator): Use register_operand
30777         instead of gpc_reg_operand.  Add SImode/SFmode SUBREG support.
30778         (movsf_from_si): New insn for SImode/SFmode SUBREG support.
30779         (fma<mode>4): Use gpc_reg_operand instead of register_operand.
30780         (fms<mode>4): Likewise.
30781         (fnma<mode>4): Likewise.
30782         (fnms<mode>4): Likewise.
30783         (nfma<mode>4): Likewise.
30784         (nfms<mode>4): Likewise.
30785
30786 2017-01-04  Marek Polacek  <polacek@redhat.com>
30787
30788         PR c++/64767
30789         * doc/invoke.texi: Document -Wpointer-compare.
30790
30791 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
30792
30793         * optc-gen.awk: Emit #error for -W*/-f*/-m* Enum without
30794         RejectNegative.
30795
30796         * dwarf2out.c (output_loc_list): Don't throw away 64K+ location
30797         descriptions for -gdwarf-5 and emit them as uleb128 instead of
30798         2-byte data.
30799
30800 2017-01-04  Kelvin Nilsen  <kelvin@gcc.gnu.org>
30801
30802         PR target/78056
30803         * doc/sourcebuild.texi (PowerPC-specific attributes): Add
30804         documentation of the powerpc_popcntb_ok attribute.
30805         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
30806         code to issue warning messages if a requested CPU configuration is
30807         not supported by the binary (assembler and loader) toolchain.
30808         (spe_init_builtins): Add two assertions to prevent ICE if attempt is
30809         made to define a built-in function that has been disabled.
30810         (paired_init_builtins): Add assertion to prevent ICE if attempt is
30811         made to define a built-in function that has been disabled.
30812         (altivec_init_builtins): Add comment explaining why definition
30813         of the DST built-in functions is not preceded by an assertion
30814         check.  Add assertions to prevent ICE if attempts are made to
30815         define an altivec predicate or an abs* built-in function that has
30816         been disabled.
30817         (htm_init_builtins): Add comment explaining why definition of the
30818         htm built-in functions is not preceded by an assertion check.
30819
30820 2017-01-04  Jeff Law  <law@redhat.com>
30821
30822         PR tree-optimizatin/67955
30823         * tree-ssa-alias.c (same_addr_size_stores_p): Check offsets first.
30824         Allow any SSA_VAR_P as the base objects.  Use integer_zerop.  Verify
30825         the points-to solution does not include pt_null.  Use DECL_PT_UID
30826         unconditionally.
30827
30828 2017-01-04  Uros Bizjak  <ubizjak@gmail.com>
30829
30830         * config/i386/i386.md (HI/SImode test with imm to QImode splitters):
30831         Use gen_int_mode instead of gen_lopwart for const_int operands.
30832
30833 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
30834
30835         PR tree-optimization/71563
30836         * match.pd: Simplify X << Y into X if Y is known to be 0 or
30837         out of range value - has low bits known to be zero.
30838
30839 2017-01-04  Alan Modra  <amodra@gmail.com>
30840
30841         * Makefile.in (aclocal_deps): Update and order as per aclocal.m4.
30842         * configure: Regenerate.
30843         * config.in: Regenerate.
30844
30845 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
30846
30847         PR bootstrap/77569
30848         * input.c (ebcdic_execution_charset::on_error): Don't use strstr for
30849         a substring of the message, but strcmp with the whole message.  Ifdef
30850         ENABLE_NLS, translate the message first using dgettext.
30851
30852 2017-01-03  Jeff Law  <law@redhat.com>
30853
30854         PR tree-optimizatin/78856
30855         * tree-ssa-threadupdate.c: Include tree-vectorizer.h.
30856         (mark_threaded_blocks): Remove code to truncate thread paths that
30857         cross multiple loop headers.  Instead invalidate the cached loop
30858         iteration information and handle case of a thread path walking
30859         into an irreducible region.
30860
30861 2017-01-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
30862
30863         PR target/78900
30864         * config/rs6000/rs6000.c (rs6000_split_signbit): Change some
30865         assertions.  Add support for doing the signbit if the IEEE 128-bit
30866         floating point value is in a GPR.
30867         * config/rs6000/rs6000.md (Fsignbit): Delete.
30868         (signbit<mode>2_dm): Delete using <Fsignbit> and just use "wa".
30869         Update the length attribute if the value is in a GPR.
30870         (signbit<mode>2_dm_<su>ext): Add combiner pattern to eliminate
30871         the sign or zero extension instruction, since the value is always 0/1.
30872         (signbit<mode>2_dm2): Delete using <Fsignbit>.
30873
30874         PR target/78953
30875         * config/rs6000/vsx.md (vsx_extract_<mode>_store_p9): If we are
30876         extracting SImode to a GPR register so that we can generate a
30877         store, limit the vector to be in a traditional Altivec register
30878         for the vextuwrx instruction.
30879
30880 2017-01-03  Ian Lance Taylor  <iant@google.com>
30881
30882         * godump.c (go_format_type): Treat ENUMERAL_TYPE like INTEGER_TYPE.
30883
30884 2017-01-03  Martin Sebor  <msebor@redhat.com>
30885
30886         PR tree-optimization/78696
30887         * gimple-ssa-sprintf.c (format_floating): Correct handling of
30888         precision.  Use MPFR for %f for greater fidelity.  Correct handling
30889         of %g.
30890         (pass_sprintf_length::compute_format_length): Set width and precision
30891         specified by asrerisk to void_node for vararg functions.
30892         (try_substitute_return_value): Adjust dump output.
30893
30894 2017-01-03  David Edelsohn  <dje.gcc@gmail.com>
30895
30896         * doc/invoke.texi (RS6000 options): LRA is enabled by default.
30897
30898 2017-01-03  Eric Botcazou  <ebotcazou@adacore.com>
30899
30900         * doc/invoke.texi (SPARC options): Document -mlra as the default.
30901         * config/sparc/sparc.c (sparc_option_override): Force LRA unless
30902         -mlra/-mno-lra was passed to the compiler.
30903
30904 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
30905
30906         PR rtl-optimization/65618
30907         * emit-rtl.c (try_split): Move initialization of "before" and
30908         "after" to just before the call to emit_insn_after_setloc.
30909
30910 2017-01-03  Gerald Pfeifer  <gerald@pfeifer.com>
30911
30912         * doc/md.texi (Standard Names): Remove reference to Java frontend.
30913
30914 2017-01-03  Pierre-Marie de Rodat  <derodat@adacore.com>
30915
30916         * dwarf2out.c (gen_enumeration_type_die): When
30917         -gno-strict-dwarf, add a DW_AT_encoding attribute.
30918
30919 2017-01-03  Jakub Jelinek  <jakub@redhat.com>
30920
30921         PR tree-optimization/78965
30922         * gimple-ssa-sprintf.c (pass_sprintf_length::compute_format_length):
30923         Change first argument from const call_info & to call_info &.  For %n
30924         set info.nowrite to false.
30925
30926         PR middle-end/78901
30927         * gimple-ssa-sprintf.c (try_substitute_return_value): Don't change
30928         possibly throwing calls.
30929
30930         * genmatch.c (dt_node::gen_kids_1): If generic_exprs include SSA_NAME
30931         and exprs_len || fns_len, emit the code for SSA_NAME next to the exprs
30932         and fns handling, rather than in a separate case SSA_NAME.
30933
30934 2017-01-02  Jeff Law  <law@redhat.com>
30935
30936         * config/darwin-driver.c (darwin_driver_init): Const-correctness
30937         fixes for first_period and second_period variables.
30938
30939 2017-01-02  Uros Bizjak  <ubizjak@gmail.com>
30940
30941         PR target/78967
30942         * config/i386/i386.md (UNSPEC_NOREX_MEM): New unspec.
30943         (*insvqi_1): New insn pattern.
30944         (*insvqi_1_mem_rex64): Ditto.
30945         (*insvqi_2): Ditto.
30946         (*insvqi_3): Rename from *insvqi.
30947
30948         (*extzvqi_mem_rex64): Add UNSPEC_NOREX_MEM tag.
30949
30950 2017-01-02  Gerald Pfeifer  <gerald@pfeifer.com>
30951
30952         * doc/cfg.texi (Edges): Remove reference to Java.
30953         (Maintaining the CFG): Ditto.
30954
30955 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
30956
30957         PR middle-end/77674
30958         * symtab.c (symtab_node::binds_to_current_def_p): Fix handling of
30959         transparent aliases.
30960
30961 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
30962
30963         PR middle-end/77484
30964         * predict.def (PRED_CALL): Update hitrate.
30965         (PRED_INDIR_CALL, PRED_POLYMORPHIC_CALL): New predictors.
30966         * predict.c (tree_estimate_probability_bb): Split CALL predictor
30967         into direct/indirect/polymorphic variants.
30968
30969 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
30970
30971         Update copyright years.
30972
30973         * gcc.c (process_command): Update copyright notice dates.
30974         * gcov-dump.c (print_version): Ditto.
30975         * gcov.c (print_version): Ditto.
30976         * gcov-tool.c (print_version): Ditto.
30977         * gengtype.c (create_file): Ditto.
30978         * doc/cpp.texi: Bump @copying's copyright year.
30979         * doc/cppinternals.texi: Ditto.
30980         * doc/gcc.texi: Ditto.
30981         * doc/gccint.texi: Ditto.
30982         * doc/gcov.texi: Ditto.
30983         * doc/install.texi: Ditto.
30984         * doc/invoke.texi: Ditto.
30985 \f
30986 Copyright (C) 2017 Free Software Foundation, Inc.
30987
30988 Copying and distribution of this file, with or without modification,
30989 are permitted in any medium without royalty provided the copyright
30990 notice and this notice are preserved.