2017-11-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
[official-gcc.git] / gcc / ChangeLog
blob24190a70d4e23282bbba0cd9e761fe9662930dfe
1 2017-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
3         * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Get rid of
4         padding_bits_to_clear_ptr.
5         (cmse_nonsecure_entry_clear_before_return): Likewise.
7 2017-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
9         * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Use
10         auto_sbitap instead of integer bitfield to control register needing
11         clearing.
13 2017-11-22  Jakub Jelinek  <jakub@redhat.com>
15         PR tree-optimization/83044
16         * tree-vrp.c (vrp_prop::check_array_ref): If eltsize is not
17         INTEGER_CST or is 0, clear up_bound{,_p1} and later ignore tests
18         that need the upper bound.  Subtract offset from
19         get_addr_base_and_unit_offset only if positive and subtract it
20         before division by eltsize rather than after it.
22         PR debug/83084
23         * valtrack.c (propagate_for_debug_subst, propagate_for_debug): Reset
24         debug insns if they would contain UNSPEC_VOLATILE or volatile asm.
25         (dead_debug_insert_temp): Likewise, but also ignore even non-volatile
26         asm.
28         PR middle-end/82875
29         * optabs.c (expand_doubleword_mult, expand_binop): Before calling
30         expand_binop with *mul_widen_optab, make sure at least one of the
31         operands doesn't have VOIDmode.
33         PR debug/83034
34         * dwarf2out.c (mem_loc_descriptor): Handle VEC_SERIES.
36         PR rtl-optimization/82044
37         PR tree-optimization/82042
38         * dse.c (record_store): Check for overflow.
39         (check_mem_read_rtx): Properly check for overflow if width == -1, call
40         add_wild_read instead of clear_rhs_from_active_local_stores on
41         overflow and log it into dump_file.
43 2017-11-22  Richard Biener  <rguenther@suse.de>
45         * gimple-iterator.c (gimple_find_edge_insert_loc): Ignore
46         fake edges to exit when looking for a place to insert.
47         * tree-ssa-pre.c (clear_expression_ids): Inline into callers
48         and remove.
49         (insert_into_preds_of_block): Commit edge insertion immediately,
50         assert that doesn't require new BBs.
51         (fini_pre): Release expressions.
52         (pass_pre::execute): Shuffle things around a bit, if the fn
53         is too large do not compute AVAIL either as this is really the
54         quadratic bit.
56 2017-11-22  Richard Biener  <rguenther@suse.de>
58         PR tree-optimization/83089
59         * tree-if-conv.c (pass_if_conversion::execute): If anything
60         changed reset SCEV and free the number of iteration estimates.
62 2017-11-21  Martin Sebor  <msebor@redhat.com>
64         PR tree-optimization/82945
65         * calls.h (warn_nonstring_bound): Remove unused function.
67 2017-11-21  Martin Sebor  <msebor@redhat.com>
69         PR tree-optimization/82945
70         * builtins.c (expand_builtin_strlen): Call maybe_warn_nonstring_arg.
71         * calls.h (maybe_warn_nonstring_arg): Declare new function.
72         * calls.c (get_attr_nonstring_decl, maybe_warn_nonstring_arg): New
73         functions.
74         (initialize_argument_information): Call maybe_warn_nonstring_arg.
75         * calls.h (get_attr_nonstring_decl): Declare new function.
76         * doc/extend.texi (attribute nonstring): Update.
77         * gimple-fold.c (gimple_fold_builtin_strncpy): Call
78         get_attr_nonstring_decl and handle it.
79         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Same.  Improve
80         detection of nul-termination.
81         (strlen_to_stridx): Change to a pointer.
82         (handle_builtin_strlen, handle_builtin_stxncpy): Adjust.
83         (pass_strlen::execute): Same.
85 2017-11-21  Sergey Shalnov  <Sergey.Shalnov@intel.com>
87         * config/i386/i386-opts.h (enum prefer_vector_width): Added new enum
88         for the new option -mprefer-vector-width=[none|128|256|512].
89         * config/i386/i386.c (ix86_target_string): remove old style options
90         -mprefer-avx256 and make -mprefer-avx128 as alias.
91         (ix86_option_override_internal):  Apply defaults for the
92         -mprefer-vector-width=[128|256] option.
93         * config/i386/i386.h (TARGET_PREFER_AVX128, TARGET_PREFER_AVX256):
94         Implement macros to work with -mprefer-vector-width=.
95         * config/i386/i386.opt: Implemented option
96         -mprefer-vector-width=[none|128|256|512].
97         * doc/invoke.texi: Documentation for
98         -mprefer-vector-width=[none|128|256|512].
100 2017-11-21  Pat Haugen  <pthaugen@us.ibm.com>
102         * config/rs6000/ppc-asm.h (f50, vs50): Fix values.
104 2017-11-21  Jonathan Wakely  <jwakely@redhat.com>
106         * doc/invoke.texi (-Wmaybe-uninitialized): Rephrase for clarity.
108 2017-11-21  Marc Glisse  <marc.glisse@inria.fr>
110         * doc/generic.texi: Document POINTER_DIFF_EXPR, update
111         POINTER_PLUS_EXPR.
112         * cfgexpand.c (expand_debug_expr): Handle POINTER_DIFF_EXPR.
113         * expr.c (expand_expr_real_2): Likewise.
114         * fold-const.c (const_binop, fold_addr_of_array_ref_difference,
115         fold_binary_loc): Likewise.
116         * match.pd (X-X, P+(Q-P), &D-P, (P+N)-P, P-(P+N), (P+M)-(P+N),
117         P-Q==0, -(A-B), X-Z<Y-Z, (X-Z)-(Y-Z), Z-X<Z-Y, (Z-X)-(Z-Y),
118         (A-B)+(C-A)): New transformations for POINTER_DIFF_EXPR, based on
119         MINUS_EXPR transformations.
120         * optabs-tree.c (optab_for_tree_code): Handle POINTER_DIFF_EXPR.
121         * tree-cfg.c (verify_expr, verify_gimple_assign_binary): Likewise.
122         * tree-inline.c (estimate_operator_cost): Likewise.
123         * tree-pretty-print.c (dump_generic_node, op_code_prio,
124         op_symbol_code): Likewise.
125         * tree-vect-stmts.c (vectorizable_operation): Likewise.
126         * vr-values.c (extract_range_from_binary_expr): Likewise.
127         * varasm.c (initializer_constant_valid_p_1): Likewise.
128         * tree.def: New tree code POINTER_DIFF_EXPR.
130 2017-11-21  Uros Bizjak  <ubizjak@gmail.com>
132         * config/i386/i386.md (*bswap<mode>2_movbe): Add
133         integer suffix to movbe mnemonic.
134         (*bswaphi2_movbe): Ditto.
135         (bswaphi_lowpart): Merge with *bswaphi_lowpart_1.
137 2017-11-21  Jakub Jelinek  <jakub@redhat.com>
139         PR c++/83045
140         * tree-cfg.c (pass_warn_function_return::execute): Formatting fix.
141         Also warn if seen __builtin_unreachable () call with BUILTINS_LOCATION.
142         Use LOCATION_LOCUS when comparing against UNKNOWN_LOCATION.
144 2017-11-21  Martin Liska  <mliska@suse.cz>
146         * tree-inline.c (expand_call_inline): Remove not needed
147         xstrdup_for_dump.
149 2017-11-21  James Cowgill  <James.Cowgill@imgtec.com>
150             Jakub Jelinek  <jakub@redhat.com>
152         PR target/82880
153         * config/mips/frame-header-opt.c (mips_register_frame_header_opt):
154         Remove static keyword from f variable.
156 2017-11-21  Jakub Jelinek  <jakub@redhat.com>
158         PR tree-optimization/83086
159         * gimple-ssa-store-merging.c
160         (imm_store_chain_info::try_coalesce_bswap): Test this_n.base_addr
161         rather than n.base_addr.
163 2017-11-21  Martin Liska  <mliska@suse.cz>
165         PR rtl-optimization/82044
166         PR tree-optimization/82042
167         * dse.c (check_mem_read_rtx): Check for overflow.
169 2017-11-21  Aldy Hernandez  <aldyh@redhat.com>
171         * tree-ssa-threadbackward.c (find_jump_threads_backwards): Fix
172         typo in comment.
174 2017-11-21  Claudiu Zissulescu  <claziss@synopsys.com>
176         * cfgrtl.c (force_nonfallthru_and_redirect): Don't split a call
177         and its corresponding call arg location note.
179 2017-11-21  Claudiu Zissulescu  <claziss@synopsys.com>
180             Andrew Burgess  <andrew.burgess@embecosm.com>
182         * config/arc/arc-protos.h (arc_compute_frame_size): Delete
183         declaration.
184         (arc_return_slot_offset): Likewise.
185         (arc_eh_return_address_location): New declaration.
186         * config/arc/arc.c (TARGET_BUILTIN_SETJMP_FRAME_VALUE): Define.
187         (MUST_SAVE_REGISTER): Add exception handler case.
188         (MUST_SAVE_RETURN_ADDR): Likewise.
189         (arc_frame_pointer_required): Likewise.
190         (arc_frame_pointer_needed): New function.
191         (arc_compute_frame_size): Changed.
192         (arc_expand_prologue): Likewise.
193         (arc_expand_epilogue): Likewise.
194         (arc_initial_elimination_offset): Likewise.
195         (arc_return_slot_offset): Delete.
196         (arc_eh_return_address_location): New function.
197         (arc_builtin_setjmp_frame_value): Likewise.
198         * config/arc/arc.h (EH_RETURN_DATA_REGNO): Use 2 registers.
199         (EH_RETURN_STACKADJ_RTX): Define.
200         (EH_RETURN_HANDLER_RTX): Likewise.
201         * config/arc/arc.md (eh_return): Delete.
203 2017-11-21  Aldy Hernandez  <aldyh@redhat.com>
205         * print-tree.h (debug_vec_tree): Remove prototype.
206         * gdbinit.in (pvt): Remove macro.
208 2017-11-21  Jakub Jelinek  <jakub@redhat.com>
210         PR tree-optimization/83047
211         * gimple-ssa-store-merging.c
212         (imm_store_chain_info::output_merged_store): If the loads with the
213         same vuse are in different basic blocks, for load_gsi pick a load
214         location that is dominated by the other loads.
216         PR c++/83059
217         * config/i386/i386.c (ix86_memmodel_check): Start
218         -Winvalid-memory-model diagnostics with lowercase letter.
220         PR debug/82718
221         * dwarf2out.c (dw_loc_list): If crtl->has_bb_partition, temporarily
222         set in_cold_section_p to the partition containing loc_list->first.
223         When seeing loc_list->last_before_switch node, update secname and
224         perform range_across_switch second partition handling only after that.
226         PR debug/82933
227         * run-rtl-passes.c: Include debug.h.
228         (run_rtl_passes): Call debug_hooks->assembly_start.
229         * dwarf2out.c (dwarf2out_assembly_start): Return early if invoked
230         multiple times.
232         PR target/82981
233         * internal-fn.c (expand_mul_overflow): Use OPTAB_WIDEN instead of
234         OPTAB_DIRECT in calls to expand_simple_binop.
236 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
238         PR c/81404
239         * Makefile.in (C_COMMON_OBJS): Add c-family/known-headers.o.
241 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
243         PR c++/72786
244         * spellcheck.h (best_match::blithely_get_best_candidate): New
245         accessor.
247 2017-11-20  Jakub Jelinek  <jakub@redhat.com>
249         * config/i386/i386.c (parse_mtune_ctrl_str): Start diagnostics
250         with lower case letter.
252 2017-11-20  Uros Bizjak  <ubizjak@gmail.com>
254         * config/i386/i386.md (bswaphi2): New expander.
255         (*bswaphi2_movbe): New insn pattern.
256         (bswaphi -> rorhi pepehole2): New peephole pattern.
258 2017-11-20  Jeff Law  <law@redhat.com>
260         * Makefile.in (OBJS): Add gimple-ssa-evrp-analyze.o.
261         * gimple-ssa-evrp-analyze.c: New file pulled from gimple-ssa-evrp.c.
262         * gimple-ssa-evrp-analyze.h: New file pulled from gimple-ssa-evrp.c.
263         * gimple-ssa-evrp.c: Remove bits moved into new files.  Include
264         gimple-ssa-evrp-analyze.h.
266         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Do not
267         set BB_VISITED here.
268         (evrp_range_analyzer::enter): Set BB_VISITED here instead.
270 2017-11-20  Bin Cheng  <bin.cheng@arm.com>
272         * tree-predcom.c: Add general comment on Store-Store chains.
273         (split_data_refs_to_components): Postpone clearing eliminate_store_p
274         flag in component.
275         (get_chain_last_ref_at): Rename into...
276         (get_chain_last_write_at): ...this.
277         (get_chain_last_write_before_load): New function.
278         (add_ref_to_chain): Promote type of chain from CT_STORE_LOAD to
279         CT_STORE_STORE when write reference is added.
280         (determine_roots_comp): Support load ref in CT_STORE_STORE chains.
281         (is_inv_store_elimination_chain): Update get_chain_last_write_at call.
282         (initialize_root_vars_store_elim_1): Ditto.
283         (initialize_root_vars_store_elim_2): Ditto.  Replace rhs once default
284         definition is created.
285         (execute_pred_commoning_chain): Support load ref in CT_STORE_STORE
286         chain by replacing it with dominant stored value.
288 2017-11-20  Bin Cheng  <bin.cheng@arm.com>
290         * tree-predcom.c (add_ref_to_chain): Remove check on distance.
292 2017-11-20  Marc Glisse  <marc.glisse@inria.fr>
294         * vr-values.c (extract_range_from_binary_expr): Use a full range
295         for VR_VARYING.
297 2017-11-20  Thomas Preud'homme  <thomas.preudhomme@arm.com>
299         * config/arm/arm.md (R4_REGNUM): Define constant.
300         (nonsecure_call_internal): Remove r4 clobber.
301         (nonsecure_call_value_internal): Likewise.
302         * config/arm/thumb1.md (nonsecure_call_reg_thumb1_v5): Remove second
303         clobber and resequence match_operands.
304         (nonsecure_call_value_reg_thumb1_v5): Likewise.
305         * config/arm/thumb2.md (nonsecure_call_reg_thumb2): Likewise.
306         (nonsecure_call_value_reg_thumb2): Likewise.
308 2017-11-20  Jakub Jelinek  <jakub@redhat.com>
310         PR tree-optimization/78821
311         * gimple-ssa-store-merging.c (find_bswap_or_nop_load): Give up
312         if base is TARGET_MEM_REF.  If base is not MEM_REF, set base_addr
313         to the address of the base rather than the base itself.
314         (find_bswap_or_nop_1): Just use pointer comparison for vuse check.
315         (find_bswap_or_nop_finalize): New function.
316         (find_bswap_or_nop): Use it.
317         (bswap_replace): Return a tree rather than bool, change first
318         argument from gimple * to gimple_stmt_iterator, allow inserting
319         into an empty sequence, allow ins_stmt to be NULL - then emit
320         all stmts into gsi.  Fix up MEM_REF address gimplification.
321         (pass_optimize_bswap::execute): Adjust bswap_replace caller.
322         (struct store_immediate_info): Add N and INS_STMT non-static
323         data members.
324         (store_immediate_info::store_immediate_info): Initialize them
325         from newly added ctor args.
326         (merged_store_group::apply_stores): Formatting fixes.  Sort by
327         bitpos at the end.
328         (stmts_may_clobber_ref_p): For stores call also
329         refs_anti_dependent_p.
330         (gather_bswap_load_refs): New function.
331         (imm_store_chain_info::try_coalesce_bswap): New method.
332         (imm_store_chain_info::coalesce_immediate_stores): Use it.
333         (split_group): Handle LROTATE_EXPR and NOP_EXPR rhs_code specially.
334         (imm_store_chain_info::output_merged_store): Fail if number of
335         new estimated stmts is bigger or equal than old.  Handle LROTATE_EXPR
336         and NOP_EXPR rhs_code.
337         (pass_store_merging::process_store): Compute n and ins_stmt, if
338         ins_stmt is non-NULL and the store rhs is otherwise invalid, use
339         LROTATE_EXPR rhs_code.  Pass n and ins_stmt to store_immediate_info
340         ctor.
341         (pass_store_merging::execute): Calculate dominators.
343         * tree-ssa-math-opts.c (nop_stats, bswap_stats, struct symbolic_number,
344         BITS_PER_MARKER, MARKER_MASK, MARKER_BYTE_UNKNOWN, HEAD_MARKER, CMPNOP,
345         CMPXCHG, do_shift_rotate, verify_symbolic_number_p,
346         init_symbolic_number, find_bswap_or_nop_load, perform_symbolic_merge,
347         find_bswap_or_nop_1, find_bswap_or_nop, pass_data_optimize_bswap,
348         class pass_optimize_bswap, bswap_replace,
349         pass_optimize_bswap::execute): Moved to ...
350         * gimple-ssa-store-merging.c: ... this file.
351         Include optabs-tree.h.
352         (nop_stats, bswap_stats, do_shift_rotate, verify_symbolic_number_p,
353         init_symbolic_number, find_bswap_or_nop_load, perform_symbolic_merge,
354         find_bswap_or_nop_1, find_bswap_or_nop, bswap_replace): Put into
355         anonymous namespace, remove static keywords.
356         (pass_optimize_bswap::gate): Test BITS_PER_UNIT == 8 here...
357         (pass_optimize_bswap::execute): ... rather than here.  Formatting fix.
359 2017-11-20  Jan Hubicka  <hubicka@ucw.cz>
361         PR bootstrap/83062
362         * ipa-inline.c (can_inline_edge_p): Fix typo in previous patch.
364 2017-11-20  Aldy Hernandez  <aldyh@redhat.com>
366         * vec.h (debug_helper): New function.
367         (DEFINE_DEBUG_VEC): New macro.
368         * hash-set.h (debug_helper): New function.
369         (DEFINE_DEBUG_HASH_SET): New macro.
370         * cfg.c (debug_slim (edge)): New function.
371         Call DEFINE_DEBUG_VEC for edges.
372         Call DEFINE_DEBUG_HASH_SET for edges.
373         * cfghooks.c (debug_slim (basic_block)): New function.
374         Call DEFINE_DEBUG_VEC for basic blocks.
375         Call DEFINE_DEBUG_HASH_SET for basic blocks.
376         * print-tree.c (debug_slim): New function to handle trees.
377         Call DEFINE_DEBUG_VEC for trees.
378         Call DEFINE_DEBUG_HASH_SET for trees.
379         (debug (vec<tree, va_gc>) &): Remove.
380         (debug (<vec<tree, va_gc>) *): Remove.
381         * print-rtl.c (debug_slim): New function to handle const_rtx.
382         Call DEFINE_DEBUG_VEC for rtx_def.
383         Call DEFINE_DEBUG_VEC for rtx_insn.
384         Call DEFINE_DEBUG_HASH_SET for rtx_def.
385         Call DEFINE_DEBUG_HASH_SET for rtx_insn.
386         * sel-sched-dump.c (debug (vec<rtx_insn *> &): Remove.
387         (debug (vec<rtx_insn *> *ptr): Remove.
388         (debug_insn_vector): Remove.
389         * stor-layout.c (debug_rli): Call debug() instead of debug_vec_tree.
391 2017-11-20  Tom de Vries  <tom@codesourcery.com>
393         PR rtl-optimization/82020
394         * simplify-rtx.c (simplify_ternary_operation): Fix comparison mode of
395         IF_THEN_ELSE condition.
397 2017-11-19  Jeff Law  <law@redhat.com>
399         * tree-ssa-dom.c (record_equivalences_from_phis): Fix handling
400         of degenerates resulting from ignoring an edge.
402 2017-11-19  Jan Hubicka  <hubicka@ucw.cz>
404         PR ipa/81360
405         * ipa-inline.c (can_inline_edge_p): Also check that caller is optimized
407 2017-11-19  Jan Hubicka  <hubicka@ucw.cz>
409         PR ipa/83001
410         * profile-count.c (profile_count::to_sreal_scale): Fix return value
411         for uninitialied counts.
413 2017-11-19  Jan Hubicka  <hubicka@ucw.cz>
415         PR ipa/60243
416         * tree-inline.c (estimate_num_insns): Set to 1 at least.
418 2017-11-19  Jan Hubicka  <hubicka@ucw.cz>
420         PR target/82713
421         * i386.c (ix86_builtin_vectorization_cost): Be ready for insane types.
423 2017-11-19  Tom de Vries  <tom@codesourcery.com>
425         * config/arc/arc.h (FUNCTION_PROFILER): Remove semicolon after
426         "do while (0)".
428 2017-11-19  Tom de Vries  <tom@codesourcery.com>
430         * config/phoenix.h (TARGET_OS_CPP_BUILTINS): Remove semicolon after
431         "do {} while (0)".
433 2017-11-19  Tom de Vries  <tom@codesourcery.com>
435         * config/visium/visium.h (ASM_OUTPUT_CASE_END): Remove semicolon after
436         macro body.
438 2017-11-19  Tom de Vries  <tom@codesourcery.com>
440         * config/ft32/ft32.h (REGISTER_TARGET_PRAGMAS): Remove semicolon after
441         "do {} while (0)".
442         * config/spu/spu.h (REGISTER_TARGET_PRAGMAS): Same.
444 2017-11-19  Tom de Vries  <tom@codesourcery.com>
446         * config/mcore/mcore-elf.h (MCORE_EXPORT_NAME): Remove semicolon after
447         "do {} while (0)".
448         * config/mcore/mcore.h (ASM_OUTPUT_ALIGNED_COMMON): After missing
449         semicolon after MCORE_EXPORT_NAME call.
451 2017-11-19  Tom de Vries  <tom@codesourcery.com>
453         PR target/82961
454         * vmsdbgout.c (vmsdbgout_early_finish): New function.
455         (vmsdbg_debug_hooks): Set early_finish field to vmsdbgout_early_finish.
457 2017-11-18  Jan Hubicka  <hubicka@ucw.cz>
459         * cgraphclones.c (cgraph_edge::clone): Rename gcov_count to prof_count.
460         (cgraph_edge::clone): Cleanup updating of profile.
461         * ipa-cp.c (update_profiling_info): Likewise.
462         * ipa-inline-transform.c (inline_transform): Likewise.
463         * ipa-inline.c (inline_small_functions): Add missing space to dump.
464         * ipa-split.c (execute_split_functions): Do not split when function
465         is cold.
466         * predict.c (estimate_bb_frequencies): Cleanup updating of profile.
467         * profile-count.c (profile_count::dump): Add global0.
468         (profile_count::to_cgraph_frequency): Do not ICE when entry is
469         undefined.
470         (profile_count::to_sreal_scale): Likewise.
471         (profile_count::adjust_for_ipa_scaling): Fix typo in comment.
472         (profile_count::combine_with_ipa_count): New function.
473         * profile-count.h (profile_guessed_global0adjusted): New.
474         (profile_count::adjusted_zero): New.
475         (profile_count::global0adjusted): New.
476         (profile_count::combine_with_ipa_count): New.
477         * tree-inline.c (copy_edges_for_bb): Add NUM/DEN arugment;
478         correct profile of return block of split functions.
479         (copy_cfg_body): Remove unused profile_count.
480         (copy_body): Likewise.
481         (expand_call_inline): Update.
482         (tree_function_versioning): Update.
484 2017-11-18  Aldy Hernandez  <aldyh@redhat.com>
486         * hash-set.h (hash_set::empty): New.
487         * tree-ssa-threadbackward.h: Delete.
488         * tree-ssa-threadbackward.c (class thread_jumps): New.
489         Move max_threaded_paths into class.
490         (fsm_find_thread_path): Remove arguments that are now in class.
491         (profitable_jump_thread_path): Rename to...
492         (thread_jumps::profitable_jump_thread_path): ...this.
493         (convert_and_register_jump_thread_path): Rename to...
494         (thread_jumps::convert_and_register_current_path): ...this.
495         (check_subpath_and_update_thread_path): Rename to...
496         (thread_jumps::check_subpath_and_update_thread_path): ...this.
497         (register_jump_thread_path_if_profitable): Rename to...
498         (thread_jumps::register_jump_thread_path_if_profitable): ...this.
499         (handle_phi): Rename to...
500         (thread_jumps::handle_phi): ...this.
501         (handle_assignment): Rename to...
502         (thread_jumps::handle_assignment): ...this.
503         (fsm_find_control_statement_thread_paths): Rename to...
504         (thread_jumps::fsm_find_control_statement_thread_paths): ...this.
505         (find_jump_threads_backwards): Rename to...
506         (thread_jumps::find_jump_threads_backwards): ...this.
507         Initialize path local data.
508         (pass_thread_jumps::execute): Call find_jump_threads_backwards
509         from within thread_jumps class.
510         (pass_early_thread_jumps::execute): Same.
512 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
514         * cgraph.c (cgraph_node::dump): Do IPA sanity checking on IPA counts.
516 2017-11-17  Steve Ellcey  <sellcey@cavium.com>
518         * config/aarch64/aarch64-simd.md (fnma<mode>4): Move neg operator
519         to canonical location.
521 2017-11-17  Steve Ellcey  <sellcey@cavium.com>
523         PR target/81356
524         * config/aarch64/aarch64.c (aarch64_use_by_pieces_infrastructure_p):
525         Remove.
526         (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): Remove define.
528 2017-11-17  H.J. Lu  <hongjiu.lu@intel.com>
530         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Use
531         rcrt1.o%s/grcrt1.o%s for -static-pie.
533 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
535         * i386.c (ix86_multiplication_cost, ix86_division_cost,
536         ix86_shift_rotate_cost): Break out from ...
537         (ix86_rtx_costs): ... here.
538         (ix86_add_stmt_cost): Use rtx cost machinery to compute cost of
539         vector operations.
541 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
543         * predict.c (determine_unlikely_bbs): Set cgraph node count to 0
544         when entry block was promoted unlikely.
545         (estimate_bb_frequencies): Increase frequency scale.
546         * profile-count.h (profile_count): Export precision info.
548 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
550         * tree-tailcall.c (eliminate_tail_call): Be more careful about not
551         disturbin profile of entry block.
553 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
555         * ipa-fnsummary.c (estimate_node_size_and_time): Be more tolerant for
556         roundoff errors.
558 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
560         * ipa-cp.c (update_profiling_info): Handle conversion to local profile.
561         * tree-cfg.c (execute_fixup_cfg): Do fixup same way as inliner does.
563 2017-11-17  Jeff Law  <law@redhat.com>
565         * gimple-ssa-evrp.c (class evrp_range_analyzer): New class extracted
566         from evrp_dom_walker class.  Various methods moved into new class.
567         (evrp_range_analyzer::evrp_range_analyzer): Constructor for new class.
568         (evrp_range_analyzer::enter): New method.
569         (evrp_range_analyzer::leave): New method.
570         (evrp_dom_walker): Remove delegators no longer needed by this class.
571         Replace vr_values data member with evrp_range_analyzer
573         * gimple-ssa-evrp.c (evrp_dom_walker::record_ranges_from_phis): New
574         method extracted from evrp_dom_walker::before_dom_children.
575         (evrp_dom_walker::record_ranges_from_stmt): Likewise.
576         (evrp_dom_walker::record_ranges_from_incoming_edge): Likewise.
578         * gimple-ssa-evrp.c (evrp_dom_walker): Add cleanup method.
579         Add private copy constructor and move assignment operators.
580         Privatize methods and class data where trivially possible.
581         (evrp_dom_walker::cleanup): New function, extracted from
582         execute_early_vrp.  Simplify access to class data.
584         * vr-values.h (get_output_for_vrp): Prototype.
585         * vr-values.c (get_output_for_vrp): New function extracted from
586         vrp_visit_assignment_or_call and extract_range_from_stmt.
587         (vrp_visit_assignment_or_call): Use get_output_for_vrp.  Simplify.
589 2017-11-17  Luis Machado  <luis.machado@linaro.org>
591         * config/aarch64/aarch64.c
592         (qdf24xx_prefetch_tune) <default_opt_level>: Set to -1.
593         (qdf24xx_tunings) <autoprefetcher_model>: Set to
594         tune_params::AUTOPREFETCHER_WEAK.
596 2017-11-17  Tamar Christina  <tamar.christina@arm.com>
598         PR target/82641
599         * config/arm/arm.c (arm_valid_target_attribute_rec):
600         Parse "arch=" and "+<ext>".
601         (arm_valid_target_attribute_tree): Re-init global options.
602         (arm_option_override): Make non-static.
603         (arm_options_perform_arch_sanity_checks): Make errors fatal.
604         * gcc/config/arm/arm-c.c (__ARM_FEATURE_CMSE): Support undef.
605         (__ARM_FEATURE_CRC32): Support undef.
606         * config/arm/arm_acle.h (__ARM_FEATURE_CRC32): Replace with pragma.
607         * doc/extend.texi (ARM Function Attributes): Add pragma and target.
609 2017-11-17  David Malcolm  <dmalcolm@redhat.com>
611         * gdbinit.in (break-on-diagnostic): New command.
613 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
615         * config/i386/i386.c (ix86_expand_epilogue): Change simple
616         return to indirect jump for EH return if control-flow
617         protection is enabled. Change explicit 'false' argument in
618         pro_epilogue_adjust_stack with a value of
619         flag_cf_protection.
620         * config/i386/i386.md (simple_return_indirect_internal):
621         Remove SImode restriction to support 64-bit.
623 2017-11-17  Segher Boessenkool  <segher@kernel.crashing.org>
625         * combine.c (added_notes_insn): New.
626         (try_combine): Handle added_notes_insn like added_links_insn.
627         Rewrite return value code.
628         (distribute_notes): Set added_notes_insn to the earliest insn we added
629         a note to.
631 2017-11-17  Segher Boessenkool  <segher@kernel.crashing.org>
633         PR rtl-optimization/82621
634         * combine.c (try_combine): Do not split PARALLELs of two SETs if the
635         dest of one of those SETs is unused.
637 2017-11-17  Richard Biener  <rguenther@suse.de>
639         PR fortran/83017
640         * tree-core.h (enum annot_expr_kind): Add annot_expr_parallel_kind.
641         * tree-pretty-print.c (dump_generic_node): Handle
642         annot_expr_parallel_kind.
643         * tree-cfg.c (replace_loop_annotate_in_block): Likewise.
644         * gimplify.c (gimple_boolify): Likewise.
646 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
648         * config.gcc (extra_headers): Add cet.h for x86 targets.
649         * config/i386/cet.h: New file.
650         * doc/install.texi: Add --enable-cet/--disable-cet.
652 2017-11-17  Richard Biener  <rguenther@suse.de>
654         PR tree-optimization/83017
655         * tree-parloops.c (MIN_PER_THREAD): Use --param parloops-min-per-thread.
656         (gen_parallel_loop): Properly count iterations.
657         (parallelize_loops): Handle loop->can_be_parallel independent
658         of flag_loop_parallelize_all.  Make static profitability test match
659         the runtime one.
660         * params.def (PARAM_PARLOOPS_MIN_PER_THREAD): New.
661         * invoke.texi (parloops-min-per-thread): Document.
663 2017-11-17  Vineet Gupta  <vgupta@synopsys.com>
665         * config/arc/linux.h: GLIBC_DYNAMIC_LINKER update per glibc
666         upstreaming review comments.
668 2017-11-17  Tamar Christina  <tamar.christina@arm.com>
670         * expr.c (copy_blkmode_to_reg): Fix bitsize for targets
671         with fast unaligned access.
672         * doc/sourcebuild.texi (word_mode_no_slow_unalign): New.
674 2017-11-17  Thomas Preud'homme  <thomas.preudhomme@arm.com>
676         * config/arm/arm.c (cmse_nonsecure_entry_clear_before_return): Allocate
677         to_clear_arg_regs_bitmap to the same size as to_clear_bitmap.
679 2017-11-17  Richard Biener  <rguenther@suse.de>
681         * tree-ssa-pre.c (phi_translate_1): Remove redundant constant
682         folding of references.
684 2017-11-17  Qing Zhao  <qing.zhao@oracle.com>
686         PR middle-end/78809
687         * gimple-fold.c (gimple_fold_builtin_string_compare): Add handling
688         of replacing call to strncmp with corresponding call to strcmp when
689         meeting conditions.
691 2017-11-17  Sergey Shalnov  <Sergey.Shalnov@intel.com>
693         * config/i386/x86-tune.def (X86_TUNE_AVX256_OPTIMAL): Add tuning
694         option prefer-avx256 for skylake-avx512 configuration.
695         * config/i386/i386.c (ix86_option_override_internal): Ditto.
696         (get_builtin_code_for_version): Ditto.
698 2017-11-17  Chung-Ju Wu  <jasonwucj@gmail.com>
699             Monk Chiang  <sh.chiang04@gmail.com>
701         * config/nds32/nds32.h (FIRST_PSEUDO_REGISTER): Modify.
702         (FIXED_REGISTERS): Reserve more register numbers.
703         (CALL_USED_REGISTERS): Likewise.
704         (REG_ALLOC_ORDER): Likewise.
705         (REG_CLASS_CONTENTS): Likewise.
706         (REGISTER_NAMES): Likewise.
708 2017-11-17  Chung-Ju Wu  <jasonwucj@gmail.com>
709             Kito Cheng  <kito.cheng@gmail.com>
711         * config/nds32/nds32-modes.def: Add vector mode V4QI V2HI V8QI V4HI
712         V2SI.
713         * config/nds32/iterators.md: Add vector mode iterators and attributes.
715 2017-11-16  Steven Munroe  <munroesj@gcc.gnu.org>
717         * config/rs6000/mmintrin.h (_mm_add_pi32[_ARCH_PWR]): Correct
718         parameter list for vec_splats.
720 2017-11-16  Joseph Myers  <joseph@codesourcery.com>
722         * doc/invoke.texi (-std=c17): Refer to 2018 expected publication
723         date of C17.
724         (-std=c18, -std=iso9899:2018, -std=gnu18): Document option aliases.
726 2017-11-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
728         PR bootstrap/82856
729         * doc/install.texi: Document incompatibility of Perl >=5.6.26
730         with the required version of automake 1.11.6.
732 2017-11-16  Pat Haugen  <pthaugen@us.ibm.com>
734         * rs6000/power9.md (power9fpdiv): New automaton and cpu_unit defined
735         for it.
736         (DU_C2_3_power9): Correct reservation combinations.
737         (FP_DIV_power9, VEC_DIV_power9): New.
738         (power9-alu): Split out rotate/shift...
739         (power9-rot): ...to here, correct dispatch resource.
740         (power9-cracked-alu, power9-mul, power9-mul-compare): Correct dispatch
741         resource.
742         (power9-fp): Correct latency.
743         (power9-sdiv): Add div/sqrt resource.
744         (power9-ddiv): Correct latency, add div/sqrt resource.
745         (power9-sqrt, power9-dsqrt): Add div/sqrt resource.
746         (power9-vecfdiv, power9-vecdiv): Correct latency, add div/sqrt
747         resource.
748         (power9-qpdiv, power9-qpmul): Adjust resource usage.
750 2017-11-15  Michael Meissner  <meissner@linux.vnet.ibm.com>
752         * config/rs6000/rs6000.c (rs6000_expand_builtin): Do not do the
753         switch statement mapping KF built-ins to TF built-ins if we don't
754         have the proper ISA 3.0 assembler support.
756 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
758         * tree-emutls.c (lower_emutls_data): Remove unused bb_freq.
759         (lower_emutls_function_body): Do not compute it.
761 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
763         * ipa-split.c (split_bb_info): Turn time to sreal.
764         (split_point): Likewise.
765         (dump_split_point): Likewise.
766         (fine_split_points): Likewise.
767         (execute_split_functions): Only zero split_bbs; turn time to sreals.
769 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
771         * ipa-fnsummary.c (analyze_function_body): Accumulate time consistently
772         in sreal.
774 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
776         * predict.c (combine_predictions_for_bb): Preserve zero predicted
777         edges.
778         (expensive_function_p): Remove useless assert.
779         (determine_unlikely_bbs): Propagate also forward; determine cold blocks
781 2017-11-16  Martin Sebor  <msebor@redhat.com>
783         PR tree-optimization/82588
784         PR tree-optimization/82583
785         * tree-vrp.c (check_array_ref): Handle flexible array members,
786         string literals, and inner indices.
787         (search_for_addr_array): Add detail to diagnostics.
789 2017-11-16  Nathan Sidwell  <nathan@acm.org>
791         PR c++/82836
792         PR c++/82737
793         * tree.h (COPY_DECL_RTL): Rename parms for clarity.
794         (SET_DECL_ASSEMBLER_NAME): Forward to
795         overwrite_decl_assembler_name.
796         (COPY_DECL_ASSEMBLER_NAME): Rename parms for clarity.
797         (overwrite_decl_assembler_name): Declare.
798         * tree.c (overwrite_decl_assembler_name): New.
799         * langhooks-def.h (lhd_overwrite_decl_assembler_name): Declare.
800         (LANG_HOOKS_OVERWRITE_DECL_ASSEMBLER_NAME): Provide default.
801         (LANG_HOOKS_INITIALIZER): Add it.
802         * langhooks.h (struct lang_hooks): Add overwrite_decl_assembler_name.
803         * langhooks.c (lhd_set_decl_assembler_name): Use
804         SET_DECL_ASSEMBLER_NAME.
805         (lhd_overwrite_decl_assembler_name): Default implementation.
807 2017-11-16  Wilco Dijkstra  <wdijkstr@arm.com>
808             Jackson Woodruff  <jackson.woodruff@arm.com>
810         PR tree-optimization/71026
811         * match.pd: Canonicalize constant multiplies in division.
813 2017-11-16  Wilco Dijkstra  <wdijkstr@arm.com>
815         * opts.c (default_options_table): Add OPT_fomit_frame_pointer entry.
816         * common/config/alpha/alpha-common.c (TARGET_OPTION_OPTIMIZATION_TABLE):
817         Remove OPT_fomit_frame_pointer entry.
818         * common/config/arc/arc-common.c: Likewise.
819         * common/config/arm/arm-common.c: Likewise.
820         * common/config/avr/avr-common.c: Likewise.
821         * common/config/c6x/c6x-common.c: Likewise.
822         * common/config/cr16/cr16-common.c: Likewise.
823         * common/config/cris/cris-common.c: Likewise.
824         * common/config/epiphany/epiphany-common.c: Likewise.
825         * common/config/fr30/fr30-common.c: Likewise.
826         * common/config/frv/frv-common.c: Likewise.
827         * common/config/ia64/ia64-common.c: Likewise.
828         * common/config/iq2000/iq2000-common.c: Likewise.
829         * common/config/lm32/lm32-common.c: Likewise.
830         * common/config/m32r/m32r-common.c: Likewise.
831         * common/config/mcore/mcore-common.c: Likewise.
832         * common/config/microblaze/microblaze-common.c: Likewise.
833         * common/config/mips/mips-common.c: Likewise.
834         * common/config/mmix/mmix-common.c: Likewise.
835         * common/config/mn10300/mn10300-common.c: Likewise.
836         * common/config/nios2/nios2-common.c: Likewise.
837         * common/config/pa/pa-common.c: Likewise.
838         * common/config/pdp11/pdp11-common.c: Likewise.
839         * common/config/powerpcspe/powerpcspe-common.c: Likewise.
840         * common/config/riscv/riscv-common.c: Likewise.
841         * common/config/rs6000/rs6000-common.c: Likewise.
842         * common/config/rx/rx-common.c: Likewise.
843         * common/config/s390/s390-common.c: Likewise.
844         * common/config/sh/sh-common.c: Likewise.
845         * common/config/sparc/sparc-common.c: Likewise.
846         * common/config/tilegx/tilegx-common.c: Likewise.
847         * common/config/tilepro/tilepro-common.c: Likewise.
848         * common/config/v850/v850-common.c: Likewise.
849         * common/config/visium/visium-common.c: Likewise.
850         * common/config/xstormy16/xstormy16-common.c: Likewise.
851         * common/config/xtensa/xtensa-common.c: Likewise.
852         * invoke.texi (-fomit-frame-pointer): Update documentation.
854 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
856         * tree-cfg.c (gimple_find_sub_bbs): Do not compute freq.
858 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
860         * cfg.c (scale_bbs_frequencies_int,
861         cale_bbs_frequencies_gcov_type): Remove.
862         * cfg.h (scale_bbs_frequencies_int,
863         cale_bbs_frequencies_gcov_type): Remove.
865 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
867         * tree-ssa-loop-manip.c
868         (scale_dominated_blocks_in_loop): Update to profile counts.
869         (tree_transform_and_unroll_loop): Likewise.
871 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
873         * tree-vect-loop-manip.c (vect_do_peeling): Do not use
874         scale_bbs_frequencies_int.
876 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
878         * final.c (compute_alignments): Use counts rather than frequencies.
880 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
882         * cfgloopanal.c: Include sreal.h
883         (average_num_loop_insns): Use counts and sreal for accounting.
885 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
887         * cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
888         manipulation.
890 2017-11-16  Chung-Ju Wu  <jasonwucj@gmail.com>
891             Kito Cheng  <kito.cheng@gmail.com>
893         * config/nds32/constraints.md: Provide more constraints.
894         * config/nds32/nds32.h (enum reg_class, REG_CLASS_NAMES,
895         REG_CLASS_CONTENTS): Define R5_REG, R8_REG, and FRAME_POINTER_REG to
896         support constraints usage.
898 2017-11-16  Chung-Ju Wu  <jasonwucj@gmail.com>
900         * config/nds32/constants.md (UNSPEC_VOLATILE_FUNC_RETURN): Remove.
902 2017-11-16  Chung-Ju Wu  <jasonwucj@gmail.com>
903             Kito Cheng  <kito.cheng@gmail.com>
905         * config/nds32/nds32.opt: Add mext-perf, mext-perf2, mext-string.
906         * config/nds32/nds32.opt: Refine the layout.
907         * config/nds32/nds32.c (TARGET_EXT_PERF, TARGET_EXT_PERF2,
908         TARGET_EXT_STRING): Support new options.
909         * config/nds32/nds32.h: Likewise.
910         * config/nds32/nds32.md: Likewise.
911         * config/nds32/nds32-predicates.c: Likewise.
912         * config/nds32/constraints.md: Likewise.
913         * common/config/nds32/nds32-common.c: Likewise.
915 2017-11-16  Julia Koval  <julia.koval@intel.com>
917         PR target/82983
918         * config/i386/gfniintrin.h: Add sse check.
919         * config/i386/i386.c (ix86_expand_builtin): Fix gfni check.
921 2017-11-16  Julia Koval  <julia.koval@intel.com>
923         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VBMI2_SET,
924         OPTION_MASK_ISA_AVX512VBMI2_UNSET): New.
925         (ix86_handle_option): Handle -mavx512vbmi2.
926         * config/i386/cpuid.h: Add bit_AVX512VBMI2.
927         * config/i386/driver-i386.c (host_detect_local_cpu): Handle new bit.
928         * config/i386/i386-c.c (__AVX512VBMI2__): New.
929         * config/i386/i386.c (ix86_target_string): Handle -mavx512vbmi2.
930         (ix86_valid_target_attribute_inner_p): Ditto.
931         * config/i386/i386.h (TARGET_AVX512VBMI2, TARGET_AVX512VBMI2_P): New.
932         * config/i386/i386.opt (mavx512vbmi2): New option.
933         * doc/invoke.texi: Add new option.
935 [2017-11-16  Julia Koval  <julia.koval@intel.com>
937         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8, _mm256_gf2p8mul_epi8,
938         _mm_mask_gf2p8mul_epi8, _mm_maskz_gf2p8mul_epi8,
939         _mm256_mask_gf2p8mul_epi8, _mm256_maskz_gf2p8mul_epi8,
940         _mm512_mask_gf2p8mul_epi8, _mm512_maskz_gf2p8mul_epi8,
941         _mm512_gf2p8mul_epi8): New intrinsics.
942         * config/i386/i386-builtin-types.def
943         (V64QI_FTYPE_V64QI_V64QI): New type.
944         * config/i386/i386-builtin.def (__builtin_ia32_vgf2p8mulb_v64qi,
945         __builtin_ia32_vgf2p8mulb_v64qi_mask, __builtin_ia32_vgf2p8mulb_v32qi,
946         __builtin_ia32_vgf2p8mulb_v32qi_mask, __builtin_ia32_vgf2p8mulb_v16qi,
947         __builtin_ia32_vgf2p8mulb_v16qi_mask): New builtins.
948         * config/i386/sse.md (vgf2p8mulb_*): New pattern.
949         * config/i386/i386.c (ix86_expand_args_builtin): Handle new type.
951 2017-11-15  Uros Bizjak  <ubizjak@gmail.com>
953         * config/i386/i386.c (x86_print_call_or_nop): Emit 5 byte nop
954         explicitly as a stream of bytes.
956 2017-11-15  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
958         * config/rs6000/altivec.h (vec_xst_be): New #define.
959         * config/rs6000/altivec.md (altivec_vperm_<mode>_direct): Rename
960         and externalize from *altivec_vperm_<mode>_internal.
961         * config/rs6000/rs6000-builtin.def (XL_BE_V16QI): Remove macro
962         instantiation.
963         (XL_BE_V8HI): Likewise.
964         (XL_BE_V4SI): Likewise.
965         (XL_BE_V4SI): Likewise.
966         (XL_BE_V2DI): Likewise.
967         (XL_BE_V4SF): Likewise.
968         (XL_BE_V2DF): Likewise.
969         (XST_BE): Add BU_VSX_OVERLOAD_X macro instantiation.
970         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Correct
971         all array entries with these keys: VSX_BUILTIN_VEC_XL,
972         VSX_BUILTIN_VEC_XL_BE, VSX_BUILTIN_VEC_XST.  Add entries for key
973         VSX_BUILTIN_VEC_XST_BE.
974         * config/rs6000/rs6000.c (altivec_expand_xl_be_builtin): Remove.
975         (altivec_expand_builtin): Remove handling for VSX_BUILTIN_XL_BE_*
976         built-ins.
977         (altivec_init_builtins): Replace conditional calls to def_builtin
978         for __builtin_vsx_ld_elemrev_{v8hi,v16qi} and
979         __builtin_vsx_st_elemrev_{v8hi,v16qi} based on TARGET_P9_VECTOR
980         with unconditional calls.  Remove calls to def_builtin for
981         __builtin_vsx_le_be_<mode>.  Add a call to def_builtin for
982         __builtin_vec_xst_be.
983         * config/rs6000/vsx.md (vsx_ld_elemrev_v8hi): Convert define_insn
984         to define_expand, and add alternate RTL generation for P8.
985         (*vsx_ld_elemrev_v8hi_internal): New define_insn based on
986         vsx_ld_elemrev_v8hi.
987         (vsx_ld_elemrev_v16qi): Convert define_insn to define_expand, and
988         add alternate RTL generation for P8.
989         (*vsx_ld_elemrev_v16qi_internal): New define_insn based on
990         vsx_ld_elemrev_v16qi.
991         (vsx_st_elemrev_v8hi): Convert define_insn
992         to define_expand, and add alternate RTL generation for P8.
993         (*vsx_st_elemrev_v8hi_internal): New define_insn based on
994         vsx_st_elemrev_v8hi.
995         (vsx_st_elemrev_v16qi): Convert define_insn to define_expand, and
996         add alternate RTL generation for P8.
997         (*vsx_st_elemrev_v16qi_internal): New define_insn based on
998         vsx_st_elemrev_v16qi.
1000 2017-11-15  H.J. Lu  <hongjiu.lu@intel.com>
1002         PR target/82990
1003         * config/i386/i386.c (pass_insert_vzeroupper::gate): Remove
1004         TARGET_AVX512ER check.
1005         (ix86_option_override_internal): Set MASK_VZEROUPPER if
1006         neither -mzeroupper nor -mno-zeroupper is used and
1007         TARGET_EMIT_VZEROUPPER is set.
1008         * config/i386/i386.h (TARGET_EMIT_VZEROUPPER): New.
1009         * config/i386/x86-tune.def: Add X86_TUNE_EMIT_VZEROUPPER.
1011 2017-11-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
1013         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
1014         folding of vector compares.
1015         (fold_build_vec_cmp): New helper function.
1016         (fold_compare_helper): New helper function.
1017         (builtin_function_type): Add compare builtins to the list of functions
1018         having unsigned arguments.  Cosmetic updates to comment indentation.
1019         * config/rs6000/vsx.md (vcmpneb, vcmpneh, vcmpnew): Update to specify
1020         the not+eq combination.
1022 2017-11-15  Bin Cheng  <bin.cheng@arm.com>
1024         PR tree-optimization/82726
1025         PR tree-optimization/70754
1026         * tree-predcom.c (order_drefs_by_pos): New function.
1027         (combine_chains): Move code setting has_max_use_after to...
1028         (try_combine_chains): ...here.  New parameter.  Sort combined chains
1029         according to position information.
1030         (tree_predictive_commoning_loop): Update call to above function.
1031         (update_pos_for_combined_chains, pcom_stmt_dominates_stmt_p): New.
1033 2017-11-15  Bin Cheng  <bin.cheng@arm.com>
1035         PR tree-optimization/82726
1036         Revert
1037         2017-01-23  Bin Cheng  <bin.cheng@arm.com>
1039         PR tree-optimization/70754
1040         * tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE.
1041         (reassociate_to_the_same_stmt): New parameter INSERT_BEFORE.  Insert
1042         combined stmt before it if not NULL.
1043         (combine_chains): Process refs reversely and compute dominance point
1044         for root ref.
1046         Revert
1047         2017-02-23  Bin Cheng  <bin.cheng@arm.com>
1049         PR tree-optimization/79663
1050         * tree-predcom.c (combine_chains): Process refs in reverse order
1051         only for ZERO length chains, and add explaining comment.
1053 2017-11-15  Tamar Christina  <tamar.christina@arm.com>
1055         * config/arm/arm-cpus.in (armv8_3, ARMv8_3a, armv8.3-a): New
1056         * config/arm/arm-tables.opt (armv8.3-a): Regenerated.
1057         * doc/invoke.texi (ARM Options): Add armv8.3-a.
1059 2017-11-15  Tamar Christina  <tamar.christina@arm.com>
1061         * config/arm/arm.h (TARGET_DOTPROD): Add arm_arch8_2.
1063 2017-11-15  Martin Liska  <mliska@suse.cz>
1065         * tree-cfg.c (pass_warn_function_return::execute):
1066         Compare warn_return_type for greater than zero.
1068 2017-11-15  Sebastian Peryt  <sebastian.peryt@intel.com>
1070         PR target/82941
1071         PR target/82942
1072         * config/i386/i386.c (pass_insert_vzeroupper): Modify gate condition
1073         to return true on Xeon and not on Xeon Phi.
1074         (ix86_check_avx256_register): Changed to ...
1075         (ix86_check_avx_upper_register): ... this. Add extra check for
1076         VALID_AVX512F_REG_OR_XI_MODE.
1077         (ix86_avx_u128_mode_needed): Changed
1078         ix86_check_avx256_register to ix86_check_avx_upper_register.
1079         (ix86_check_avx256_stores): Changed to ...
1080         (ix86_check_avx_upper_stores): ... this. Changed
1081         ix86_check_avx256_register to ix86_check_avx_upper_register.
1082         (ix86_avx_u128_mode_after): Changed
1083         avx_reg256_found to avx_upper_reg_found. Changed
1084         ix86_check_avx256_stores to ix86_check_avx_upper_stores.
1085         (ix86_avx_u128_mode_entry): Changed
1086         ix86_check_avx256_register to ix86_check_avx_upper_register.
1087         (ix86_avx_u128_mode_exit): Ditto.
1088         * config/i386/i386.h: (host_detect_local_cpu): New define.
1090 2017-11-15  Dominik Infuehr  <dominik.infuehr@theobroma-systems.com>
1092         * config/arm/xgene1.md (xgene1): Split into automatons
1093         xgene1_main, xgene1_decoder, xgene1_div, xgene1_simd.
1094         (xgene1_f_load): Adjust reservations and/or types.
1095         (xgene1_f_store): Likewise.
1096         (xgene1_load_pair): Likewise.
1097         (xgene1_store_pair): Likewise.
1098         (xgene1_fp_load1): Likewise.
1099         (xgene1_load1): Likewise.
1100         (xgene1_store1): Likewise.
1101         (xgene1_move): Likewise.
1102         (xgene1_alu): Likewise.
1103         (xgene1_simd): Likewise.
1104         (xgene1_bfm): Likewise.
1105         (xgene1_neon_load1): Likewise.
1106         (xgene1_neon_store1): Likewise.
1107         (xgene1_neon_logic): Likewise.
1108         (xgene1_neon_st1): Likewise.
1109         (xgene1_neon_ld1r): Likewise.
1110         (xgene1_alu_cond): Added.
1111         (xgene1_shift_reg): Likwise.
1112         (xgene1_bfx): Likewise.
1113         (xgene1_mul): Split into xgene1_mul32, xgene1_mul64.
1115 2017-11-15  Jakub Jelinek  <jakub@redhat.com>
1117         PR target/82981
1118         * internal-fn.c: Include gimple-ssa.h, tree-phinodes.h and
1119         ssa-iterators.h.
1120         (can_widen_mult_without_libcall): New function.
1121         (expand_mul_overflow): If only checking unsigned mul overflow,
1122         not result, and can do efficiently MULT_HIGHPART_EXPR, emit that.
1123         Don't use WIDEN_MULT_EXPR if it would involve a libcall, unless
1124         no other way works.  Add MULT_HIGHPART_EXPR + MULT_EXPR support.
1125         (expand_DIVMOD): Formatting fix.
1126         * expmed.h (expand_mult): Add NO_LIBCALL argument.
1127         * expmed.c (expand_mult): Likewise.  Use OPTAB_WIDEN rather
1128         than OPTAB_LIB_WIDEN if NO_LIBCALL is true, and allow it to fail.
1130         PR tree-optimization/82977
1131         * tree-ssa-strlen.c (strlen_optimize_stmt): Pass a reference to a copy
1132         constructed temporary to strlen_to_stridx.put.
1134 2017-11-15  Martin Liska  <mliska@suse.cz>
1136         * configure.ac: Remove -fkeep-inline-functions from coverage_flags.
1137         * configure: Regenerate.
1139 2017-11-15  Martin Liska  <mliska@suse.cz>
1141         PR target/82927
1142         * config/sh/sh-mem.cc: Use proper probability for
1143         REG_BR_PROB_NOTE.
1145 2017-11-14  Jeff Law  <law@redhat.com>
1147         * explow.c (anti_adjust_stack_and_probe_stack_clash): Avoid probing
1148         the red zone for stack_clash_protection_final_dynamic_probe targets
1149         when the total dynamic stack size is zero bytes.
1151         * tree-ssa-threadupdate.c (thread_through_all_blocks): Thread
1152         blocks is post order.
1154 2017-11-15  Alexandre Oliva <aoliva@redhat.com>
1156         * dumpfile.h (TDF_COMPARE_DEBUG): New.
1157         * final.c (rest_of_clean_state): Set it for the
1158         -fcompare-debug dump.
1159         * tree-pretty-print.c (dump_generic_node): Omit OBJ_TYPE_REF
1160         class when TDF_COMPARE_DEBUG is set.
1162         * dwarf2out.c (gen_producer_string): Discard
1163         OPT_fcompare_debug.
1165 2017-11-15  Joseph Myers  <joseph@codesourcery.com>
1167         PR c/81156
1168         * doc/extend.texi (Other Builtins): Document __builtin_tgmath.
1169         * ginclude/tgmath.h (__tg_cplx, __tg_ldbl, __tg_dbl, __tg_choose)
1170         (__tg_choose_2, __tg_choose_3, __TGMATH_REAL_1_2)
1171         (__TGMATH_REAL_2_3): Remove macros.
1172         (__TGMATH_CPLX, __TGMATH_CPLX_2, __TGMATH_REAL, __TGMATH_REAL_2)
1173         (__TGMATH_REAL_3, __TGMATH_CPLX_ONLY): Define using
1174         __builtin_tgmath.
1175         (frexp, ldexp, nexttoward, scalbn, scalbln): Define using
1176         __TGMATH_REAL_2.
1177         (remquo): Define using __TGMATH_REAL_3.
1179 2017-11-14  Jeff Law  <law@redhat.com>
1181         * vr-values.c: New file with contents extracted from tree-vrp.c.
1182         * Makefile.in (OBJS): Add vr-values.o
1183         * tree-vrp.h (set_value_range_to_nonnull): Prototype.
1184         (set_value_range, set_and_canonicalize_value_range): Likewise.
1185         (vrp_bitmap_equal_p, range_is_nonnull): Likewise.
1186         (value_range_constant_singleton, symbolic_range_p): Likewise.
1187         (compare_values, compare_values_warnv, vrp_val_is_min): Likewise.
1188         (vrp_val_is_max, copy_value_range, set_value_range_to_value): Likewise.
1189         (extract_range_from_binary_expr_1, vrp_val_min, vrp_val_max): Likewise.
1190         (set_value_range_to_null, range_int_cst_p, opreand_less_p): Likewise.
1191         (find_case_label_range, find_case_label_index): Likewise.
1192         (zero_nonzero_bits_from_vr, overflow_comparison_p): Likewise.
1193         (range_int_cst_singleton_p, value_inside_range): Likewise.
1194         (get_single_symbol): Likewise.
1195         (switch_update): Move structure definition here.
1196         (to_remove_edges, to_update_switch_stmts): Provide externs.
1197         * tree-vrp.c: Move all methods for vr-values class to vr-values.c
1198         (vrp_val_max, vrp_val_min, vrp_val_is_max): Make externally visible.
1199         (vrp_val_is_min, set_value_range): Likewise.
1200         (set_and_canonicalize_value_range, copy_value_range): Likewise.
1201         (set_value_range_to_value, set_value_range_to_nonnull): Likewise.
1202         (set_value_range_to_null, vrp_bitmap_equal_p): Likewise.
1203         (range_is_nonnull, range_int_cst_p): Likewwise.
1204         (range_int_cst_singleton_p, symbolic_range_p): Likewise.
1205         (get_single_symbol, operand_less_p): Likewise
1206         (compare_values_warnv, compare_values): Likewise.
1207         (value_inside_range, value_range_constant_singleton): Likewise.
1208         (zero_nonzero_bitgs_from_vr): Likewise.
1209         (extract_range_from_binary_expr_1): Likewise.
1210         (overflow_comparison_p): Likewise.
1211         (to_remove_edges, to_update_switch_stmts): Likewise.
1212         (find_case_label-index, find_case_label_range): Likewise.
1213         (switch_update, set_value_range_to_nonnegative): Remove.
1214         (set_value_range_to_truthvalue): Likewise.
1215         (symbolic_range_based_on_p, gimple_assign_nonzero_p): Likewise.
1216         (gimple_stmt_nonzero_p, compare_ranges): Likewise.
1217         (compare_range_with_value, vrp_valueize, vrp_valueize_1): Likewise.
1218         (find_case_label_ranges, test_for_singularity): Likewise.
1219         (range_fits_type_p, simplify_conversion_using_ranges): LIkewise.
1220         (x_vr_values): Move to its remaining use site.
1222 2017-11-10  Jeff Law  <law@redhat.com>
1224         * vr-values.h (VR_INITIALIZER): Move #define here.
1225         * gimple-ssa-evrp.c: New file with contents extracted from tree-vrp.c
1226         * Makefile.in (OBJS): Add tree-evrp.o
1227         * tree-vrp.h (assert_info): Move structure definition here.
1228         (set_value_range_to_varying): Prototype.
1229         (vrp_operand_equal_p, range_includes_zero_p): Likewise.
1230         (infer_value_range, register_edge_assert_for): Likewise.
1231         (stmt_interesting_for_vrp): Likewise.
1232         * tree-vrp.c: Move all methods for evrp class into gimple-ssa-evrp.c.
1233         (set_value_range_to_varying): No longer static.
1234         (vrp_operand_equal_p, range_includes_zero_p): Likewise.
1235         (infer_value_range, register_edge_assert_for): Likewise.
1237 2017-11-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
1239         * config/rs6000/rs6000.md (bswapdi2): On 32-bit ISA 3.0, don't
1240         generate the XXBRD instruction.
1242         * config/rs6000/rs6000-c.c (is_float128_p): New helper function.
1243         (rs6000_builtin_type_compatible): Treat _Float128 and long double
1244         as being compatible if -mabi=ieeelongdouble.
1245         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_HW_1): New macros
1246         to setup float128 built-ins with hardware support.
1247         (BU_FLOAT128_HW_2): Likewise.
1248         (BU_FLOAT128_HW_3): Likewise.
1249         (BU_FLOAT128_HW_VSX_1): Likewise.
1250         (BU_FLOAT128_HW_VSX_2): Likewise.
1251         (scalar_extract_expq): Change float128 built-in functions to
1252         accommodate having both KFmode and TFmode functions.  Use the
1253         KFmode variant as the default.
1254         (scalar_extract_sigq): Likewise.
1255         (scalar_test_neg_qp): Likewise.
1256         (scalar_insert_exp_q): Likewise.
1257         (scalar_insert_exp_qp): Likewise.
1258         (scalar_test_data_class_qp): Likewise.
1259         (sqrtf128_round_to_odd): Delete processing the round to odd
1260         built-in functions as special built-in functions, and define them
1261         as float128 built-ins.  Use the KFmode variant as the default.
1262         (truncf128_round_to_odd): Likewise.
1263         (addf128_round_to_odd): Likewise.
1264         (subf128_round_to_odd): Likewise.
1265         (mulf128_round_to_odd): Likewise.
1266         (divf128_round_to_odd): Likewise.
1267         (fmaf128_round_to_odd): Likewise.
1268         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Add
1269         support for KFmode and TFmode xststdcqp calls.
1270         (rs6000_expand_builtin): If long double is IEEE 128-bit floating
1271         point, switch the built-in handlers for the get/set float128
1272         exponent, get float128 mantissa, float128 test built-ins, and the
1273         float128 round to odd built-in functions.  Eliminate creating the
1274         float128 round to odd built-in functions as special built-ins.
1275         (rs6000_init_builtins): Eliminate special creation of the float128
1276         round to odd built-in functions.
1277         * config/rs6000/vsx.md (xsxexpqp_<mode>): Change float128 built-in
1278         function insns to support both TFmode and KFmode variants.
1279         (xsxsigqp_<mode>): Likewise.
1280         (xsiexpqpf_<mode>): Likewise.
1281         (xsiexpqp_<mode>): Likewise.
1282         (xststdcqp_<mode>): Likewise.
1283         (xststdcnegqp_<mode>): Likewise.
1284         (xststdcqp_<mode>): Likewise.
1286 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
1288         * tree-ssa-threadupdate.c (compute_path_counts): Remove
1289         unused path_in_freq_ptr parameter.
1290         (ssa_fix_duplicate_block_edges): Do not pass around path_in_freq
1292 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
1294         * ipa-inline.c (edge_badness): Dump sreal frequency.
1295         (compute_inlined_call_time): Match natural implementaiton ...
1296         * ipa-fnsummary.c (estimate_edge_size_and_time): ... here; remove
1297         forgotten division by CGRAPH_FREQ_BASE.
1299 2017-11-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1301         * config.gcc (*-*-solaris2*): Enable default_use_cxa_atexit since
1302         Solaris 11.  Update comment.
1303         * configure.ac (gcc_cv_ld_pid): Adapt comment for Solaris 12
1304         renaming.
1305         * config/sol2.h (STARTFILE_SPEC): Likewise.
1306         * configure: Regenerate.
1308 2017-11-14  Carl Love  <cel@us.ibm.com>
1310         * config/rs6000/rs6000.c (swap_endian_selector_for_mode): Remove
1311         le_ and be_ prefixes to swap* variables.  Remove
1312         if (VECTOR_ELT_ORDER_BIG) statement. Remove E_V16QImode case
1313         statements.
1315 2017-11-14  Jason Merrill  <jason@redhat.com>
1317         Support GTY((cache)) on hash_map.
1318         * hash-traits.h (ggc_remove): Add ggc_maybe_mx member function.
1319         (ggc_cache_remove): Override it instead of ggc_mx.
1320         * hash-table.h (gt_ggc_mx): Call it instead of ggc_mx.
1321         (gt_cleare_cache): Call ggc_mx instead of gt_ggc_mx.
1322         * hash-map-traits.h (simple_hashmap_traits): Add maybe_mx member.
1323         (simple_cache_map_traits): Override maybe_mx.
1324         * hash-map.h (hash_entry): Add ggc_maybe_mx and keep_cache_entry.
1325         (hash_map): Friend gt_cleare_cache.
1326         (gt_cleare_cache): New.
1327         * tree.h (tree_cache_traits): New hash_map traits class.
1328         (tree_cache_map): New typedef.
1330 2017-11-14  Richard Biener  <rguenther@suse.de>
1332         * tree-cfgcleanup.c (cleanup_control_expr_graph): Remove first_p
1333         paramter and handling.
1334         (cleanup_control_flow_bb): Likewise.
1335         (cleanup_control_flow_pre): New helper performing a DFS walk
1336         to call cleanup_control_flow_bb in PRE order.
1337         (cleanup_tree_cfg_1): Do the first phase of cleanup_control_flow_bb
1338         via cleanup_control_flow_pre.
1340 2017-11-14  James Greenhalgh  <james.greenhalgh@arm.com>
1342         * config/aarch64/aarch64-simd.md
1343         (aarch64_simd_bsl<mode>_internal): Remove DImode.
1344         (*aarch64_simd_bsl<mode>_alt): Likewise.
1345         (aarch64_simd_bsldi_internal): New.
1346         (aarch64_simd_bsldi_alt): Likewise.
1348 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
1350         * tracer.c (better_p): Do not compare frequencies.
1351         * reg-stack.c (better_edge): Likewise.
1352         * shrink-wrap.c (try_shrink_wrapping): Do not convert to gcov counts
1353         and back.
1355 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
1357         * auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
1358         * cgraphunit.c (cgraph_node::expand_thunk): Use update_max_bb_count.
1359         * ipa-utils.c (ipa_merge_profiles): Use update_max_bb_count.
1360         * lto-streamer-in.c (input_function): Use update_max_bb_count.
1361         * omp-expand.c (expand_omp_taskreg): Use update_max_bb_count.
1362         * predict.c (maybe_hot_frequency_p): Inline to ...
1363         (maybe_hot_count_p): ... here; rewrite to counts.
1364         (counts_to_freqs): Rename to ...
1365         (update_max_bb_count): ... this one.
1366         (expensive_function_p): Use counts.
1367         (estimate_bb_frequencies): Update.
1368         (rebuild_frequencies): Update.
1369         * predict.h (counts_to_freqs): Rename to ...
1370         (update_max_bb_count): ... this one.
1371         * profile.c (compute_branch_probabilities): Add debug info
1372         * tree-inline.c (expand_call_inline): Update debug info.
1373         (optimize_inline_calls): Use update_max_bb_count..
1374         (tree_function_versioning): Use update_max_bb_count..
1375         * value-prof.c (gimple_value_profile_transformations):
1376         Do not use update_max_bb_count.
1378 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
1380         * ipa-inline.c (compute_uninlined_call_time, compute_inlined_call_time):
1381         always use frequencies.
1383 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
1385         * bb-reorder.c: Remove frequencies from comments.
1386         (better_edge_p): Use profile counts.
1387         (find_traces): Dump profile counts.
1388         (rotate_loop): Use profile counts.
1389         (find_traces_1_round): Likewise.
1390         (connect_better_edge_p): Use counts instead of probabilities for
1391         reverse walk.
1392         (copy_bb_p): Drop early check for non-0 frequency.
1393         (sanitize_hot_paths): Update comments.
1395 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
1397         * ipa-split.c (struct split_point): Add count.
1398         (consider_split): Do not compute incoming frequency; compute incoming
1399         count and store it to split_point.
1400         (split_function): Set count of the call to split part correctly.
1402 2017-11-13  Carl Love  <cel@us.ibm.com>
1404         * config/rs6000/altivec.md (altivec_vsumsws_be): Add define_expand.
1406 2017-11-13  Tom Tromey  <tom@tromey.com>
1408         * doc/cpp.texi (Variadic Macros): Document __VA_OPT__.
1410 2017-11-13  Carl Love  <cel@us.ibm.com>
1412         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins):
1413         Add support for builtins:
1414         unsigned int vec_first_{,miss}_match_{,or_eos}index,
1415         vector {un,}signed {char,int,short},
1416         vector {un,}signed {char,int,short}) arguments.
1417         * config/rs6000/rs6000-builtin.def (VFIRSTMATCHINDEX,
1418         VFIRSTMATCHOREOSINDEX, VFIRSTMISMATCHINDEX, VFIRSTMISMATCHOREOSINDEX):
1419         Add BU_P9V_AV_2 expansions for the builtins.
1420         * config/rs6000/altivec.h (vec_first_match_index,
1421         vec_first_mismatch_index, vec_first_match_or_eos_index,
1422         vec_first_mismatch_or_eos_index): Add #defines for the builtins.
1423         * config/rs6000/rs6000-protos.h (bytes_in_mode): Add
1424         new extern declaration.
1425         * config/rs6000/rs6000.c (bytes_in_mode): Add new function.
1426         * config/rs6000/vsx.md (first_match_index_<mode>,
1427         first_match_or_eos_index_<mode>, first_mismatch_index_<mode>,
1428         first_mismatch_or_eos_index_<mode>): Add define expand.
1429         (vctzlsbb_<mode>): Add mode field to define_insn for vctzlsbb.
1430         * doc/extend.texi: Update the built-in documenation file for the new
1431         built-in functions.
1433 2017-11-13  Michael Meissner  <meissner@linux.vnet.ibm.com>
1435         * match.pd: Convert fminf<N>, fminf<N>x, fmax<N>, and fmax<N>x
1436         into the min/max operations for _Float<N> and _Float<N>X types.
1438 2017-11-13  Eric Botcazou  <ebotcazou@adacore.com>
1440         PR lto/81351
1441         * dwarf2out.c (do_eh_frame): New static variable.
1442         (dwarf2out_begin_prologue): Set it.
1443         (dwarf2out_frame_finish): Test it instead of dwarf2out_do_eh_frame.
1445 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
1447         * tree-ssa-coalesce.c (coalesce_cost): Fix formating.
1449         * tree-ssa-sink.c (select_best_block): Do not use frequencies.
1451 2017-11-13  Eric Botcazou  <ebotcazou@adacore.com>
1453         PR lto/81351
1454         * debug.h (dwarf2out_do_eh_frame): Declare.
1455         * dwarf2cfi.c (dwarf2out_do_eh_frame): New predicate.
1456         (dwarf2out_do_frame): Use it.
1457         (dwarf2out_do_cfi_asm): Likewise.
1458         * dwarf2out.c (dwarf2out_frame_finish): Likewise.
1459         (dwarf2out_assembly_start): Likewise.
1460         (dwarf2out_begin_prologue): Fix comment.
1461         * toplev.c (compile_file): Always call dwarf2out_frame_finish
1462         if the target needs either debug or unwind DWARF2 info.
1463         * lto-opts.c (lto_write_options): Do not save -fexceptions,
1464         -fnon-call-exceptions, -ffp-contract, -fmath-errno, -fsigned-zeros,
1465         -ftrapping-math, -ftrapv and -fwrapv.
1467 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
1469         * cgraph.c (cgraph_edge::sreal_frequency): New function.
1470         * cgraph.h (cgraph_edge::sreal_frequency): Declare.
1471         * ipa-fnsummary.c (dump_ipa_call_summary): Use sreal_frequency.
1472         (estimate_edge_size_and_time): Likewise.
1473         (ipa_merge_fn_summary_after_inlining): Likewise.
1474         * ipa-inline.c (cgraph_freq_base_rec): Remove.
1475         (compute_uninlined_call_time): Use sreal_frequency.
1476         (compute_inlined_call_time): Likewise.
1477         (ipa_inline): Do not initialize cgraph_freq_base_rec.
1478         * profile-count.c: Include sreal.h.
1479         (profile_count::to_sreal_scale): New.
1480         * profile-count.h: Forward declare sreal.
1481         (profile_count::to_sreal_scale): Declare.
1483 2017-11-13  Nathan Sidwell  <nathan@acm.org>
1485         * diagnostic.c (maybe_line_and_column): New.
1486         (diagnostic_get_location_text): Use it.
1487         (diagnostic_report_current_module): Likewise.
1488         (test_diagnostic_get_location_text): Add tests.
1490 2017-11-13  Luis Machado  <luis.machado@linaro.org>
1492         * doc/md.texi (Specifying processor pipeline description): Fix
1493         incorrect latency for the div instruction example.
1495 2017-11-13  Jakub Jelinek  <jakub@redhat.com>
1497         PR tree-optimization/78821
1498         * gimple-ssa-store-merging.c (compatible_load_p): Don't require
1499         that bit_not_p is the same.
1500         (imm_store_chain_info::coalesce_immediate_stores): Likewise.
1501         (split_group): Count precisely bit_not_p bits in each statement.
1502         (invert_op): New function.
1503         (imm_store_chain_info::output_merged_store): Use invert_op to
1504         emit BIT_XOR_EXPR with a xor_mask instead of BIT_NOT_EXPR if some
1505         but not all orig_stores have BIT_NOT_EXPR in the corresponding spots.
1507 2017-11-13  Martin Liska  <mliska@suse.cz>
1509         * gcov.c (struct coverage_info): Remove typedef of coverage_t.
1510         (struct source_info): Likewise.
1511         (add_branch_counts): Likewise.
1512         (add_line_counts): Likewise.
1513         (function_summary): Likewise.
1514         (output_intermediate_line): Likewise.
1515         (generate_results): Likewise.
1517 2017-11-13  Martin Liska  <mliska@suse.cz>
1519         * gcov.c (struct block_info): Remove typedef for block_t.
1520         (struct line_info): Likewise.
1521         (line_info::has_block): Likewise.
1522         (EXIT_BLOCK): Likewise.
1523         (unblock): Likewise.
1524         (circuit): Likewise.
1525         (get_cycles_count): Likewise.
1526         (process_file): Likewise.
1527         (read_graph_file): Likewise.
1528         (solve_flow_graph): Likewise.
1529         (find_exception_blocks): Likewise.
1530         (add_line_counts): Likewise.
1531         (accumulate_line_info): Likewise.
1532         (output_line_details): Likewise.
1534 2017-11-13  Martin Liska  <mliska@suse.cz>
1536         * gcov.c (struct arc_info): Remove typedef for arc_t.
1537         (struct line_info): Likewise.
1538         (add_branch_counts): Likewise.
1539         (output_branch_count): Likewise.
1540         (function_info::~function_info): Likewise.
1541         (circuit): Likewise.
1542         (output_intermediate_line): Likewise.
1543         (read_graph_file): Likewise.
1544         (solve_flow_graph): Likewise.
1545         (find_exception_blocks): Likewise.
1546         (add_line_counts): Likewise.
1547         (accumulate_line_info): Likewise.
1548         (output_line_details): Likewise.
1549         (output_function_details): Likewise.
1551 2017-11-13  Martin Liska  <mliska@suse.cz>
1553         * gcov.c (struct function_info): Remove typedef for function_t.
1554         (struct source_info): Likewise.
1555         (source_info::get_functions_at_location): Likewise.
1556         (solve_flow_graph): Likewise.
1557         (find_exception_blocks): Likewise.
1558         (add_line_counts): Likewise.
1559         (output_intermediate_file): Likewise.
1560         (process_file): Likewise.
1561         (generate_results): Likewise.
1562         (release_structures): Likewise.
1563         (read_graph_file): Likewise.
1564         (read_count_file): Likewise.
1565         (accumulate_line_counts): Likewise.
1566         (output_lines): Likewise.
1568 2017-11-13  Martin Liska  <mliska@suse.cz>
1570         * gcov.c (function_info::function_info): Remove num_counts
1571         and add vector<gcov_type>.
1572         (function_info::~function_info): Use the vector.
1573         (process_file): Likewise.
1574         (read_graph_file): Likewise.
1575         (read_count_file): Likewise.
1576         (solve_flow_graph): Likewise.
1578 2017-11-13  Martin Liska  <mliska@suse.cz>
1580         * gcov.c (function_info::is_artificial): New function.
1581         (process_file): Erase all artificial early.
1582         (generate_results): Skip as all artificial are already
1583         removed.
1585 2017-11-13  Martin Liska  <mliska@suse.cz>
1587         * gcov.c (read_graph_file): Store to global vector of functions.
1588         (read_count_file): Iterate the vector.
1589         (process_file): Likewise.
1590         (generate_results): Likewise.
1591         (release_structures): Likewise.
1593 2017-11-13  Jakub Jelinek  <jakub@redhat.com>
1595         PR tree-optimization/82954
1596         * gimple-ssa-store-merging.c
1597         (imm_store_chain_info::coalesce_immediate_stores): If
1598         !infof->ops[N].base_addr, split group if info->ops[N].base_addr.
1600 2017-11-13  Richard Sandiford  <richard.sandiford@linaro.org>
1602         * config/aarch64/aarch64-simd.md (aarch64_store_lane0<mode>):
1603         Upddate call to ENDIAN_LANE_N.
1604         (aarch64_<sur>dot_lane<vsi2qi>): Use aarch64_endian_lane_rtx.
1605         (aarch64_<sur>dot_laneq<vsi2qi>): Likewise.
1606         (*aarch64_simd_vec_copy_lane<mode>): Update calls to ENDIAN_LANE_N
1607         and use aarch64_endian_lane_rtx.
1608         (*aarch64_simd_vec_copy_lane_<vswap_width_name><mode>): Likewise.
1610 2017-11-12  Tom de Vries  <tom@codesourcery.com>
1612         * config/riscv/riscv.h (ASM_OUTPUT_LABELREF): Wrap in do {} while (0).
1614 2017-11-12  Tom de Vries  <tom@codesourcery.com>
1616         * config/elfos.h (ASM_OUTPUT_ASCII): Remove semicolon after macro body.
1618 2017-11-12  Tom de Vries  <tom@codesourcery.com>
1620         * config/cr16/cr16.h (ASM_OUTPUT_LABELREF): Remove semicolon after macro
1621         body.
1622         * config/powerpcspe/xcoff.h (ASM_OUTPUT_LABELREF): Same.
1623         * config/rs6000/xcoff.h (ASM_OUTPUT_LABELREF): Same.
1624         * defaults.h (ASM_OUTPUT_LABELREF): Same.
1626 2017-11-11  Martin Sebor  <msebor@redhat.com>
1628         PR c/81117
1629         * doc/extend.texi (attribute nonstring): Remove spurious argument.
1631         PR bootstrap/82948
1632         * prefic.c (translate_name): Replace strncpy with memcpy to
1633         avoid -Wstringop-truncation.
1635 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
1637         * tree-ssa-loop-im.c (execute_sm_if_changed): Do not compute freq_sum.
1639 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
1641         * predict.c (maybe_hot_frequency_p): Do not use cfun.
1643 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
1645         * tree-ssa-tail-merge.c (replace_block_by): Fix and re-enable profile
1646         merging.
1648 2017-11-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
1650         * config/rs6000/rs6000.md (bswaphi2_reg): On ISA 3.0 systems,
1651         enable generating XXBRH if the value is in a vector register.
1652         (bswapsi2_reg): On ISA 3.0 systems, enable generating XXBRW if the
1653         value is in a vector register.
1654         (bswapdi2_reg): On ISA 3.0 systems, always use XXBRD to do
1655         register to register bswap64's instead of doing the GPR sequence
1656         used on previous machines.
1657         (bswapdi2_xxbrd): New insn.
1658         (bswapdi2_reg): Disallow on ISA 3.0.
1659         (register to register bswap64 splitter): Do not split the insn on
1660         ISA 3.0 systems that use XXBRD.
1662 2017-11-10  Martin Sebor  <msebor@redhat.com>
1664         PR c/81117
1665         * config/darwin-c.c (framework_construct_pathname): Replace strncpy
1666         with memcpy.
1667         (find_subframework_file): Same.
1669 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
1671         * auto-profile.c (afdo_indirect_call): Drop frequency.
1672         * cgraph.c (symbol_table::create_edge): Drop frequency argument.
1673         (cgraph_node::create_edge): Drop frequency argument.
1674         (cgraph_node::create_indirect_edge): Drop frequency argument.
1675         (cgraph_edge::make_speculative): Drop frequency arguments.
1676         (cgraph_edge::resolve_speculation): Do not update frequencies
1677         (cgraph_edge::dump_edge_flags): Do not dump frequency.
1678         (cgraph_node::dump): Check consistency in IPA mode.
1679         (cgraph_edge::maybe_hot_p): Use IPA counter.
1680         (cgraph_edge::verify_count_and_frequency): Rename to ...
1681         (cgraph_edge::verify_count): ... this one; drop frequency checking.
1682         (cgraph_node::verify_node): Update.
1683         * cgraph.h (struct cgraph_edge): Drop frequency.
1684         (cgraph_edge::frequency): New function.
1685         * cgraphbuild.c (pass_build_cgraph_edges::execute): Donot pass
1686         frequencies.
1687         (cgraph_edge::rebuild_edges): Likewise.
1688         * cgraphclones.c (cgraph_edge::clone): Scale only counts.
1689         (duplicate_thunk_for_node): Do not pass frequency.
1690         (cgraph_node::create_clone): Scale only counts.
1691         (cgraph_node::create_virtual_clone): Do not pass frequency.
1692         (cgraph_node::create_edge_including_clones): Do not pass frequency.
1693         (cgraph_node::create_version_clone): Do not pass frequency.
1694         * cgraphunit.c (cgraph_node::analyze): Do not pass frequency.
1695         (cgraph_node::expand_thunk): Do not pass frequency.
1696         (cgraph_node::create_wrapper): Do not pass frequency.
1697         * gimple-iterator.c (update_call_edge_frequencies): Do not pass
1698         frequency.
1699         * gimple-streamer-in.c (input_bb): Scale only IPA counts.
1700         * ipa-chkp.c (chkp_produce_thunks): Do not pass frequency.
1701         * ipa-cp.c (ipcp_lattice::print): Use frequency function.
1702         (gather_caller_stats): Use frequency function.
1703         (ipcp_cloning_candidate_p): Use frequency function.
1704         (ipcp_propagate_stage): Use frequency function.
1705         (get_info_about_necessary_edges): Use frequency function.
1706         (update_profiling_info): Update only IPA profile.
1707         (update_specialized_profile): Use frequency functoin.
1708         (perhaps_add_new_callers): Update only IPA profile.
1709         * ipa-devirt.c (ipa_devirt): Use IPA profile.
1710         * ipa-fnsummary.c (redirect_to_unreachable): Do not set frequrency.
1711         (dump_ipa_call_summary): Use frequency function.
1712         (estimate_edge_size_and_time): Use frequency function.
1713         (ipa_merge_fn_summary_after_inlining): Use frequency function.
1714         * ipa-inline-analysis.c (do_estimate_edge_time): Use IPA profile.
1715         * ipa-inline-transform.c (update_noncloned_frequencies): Rename to ..
1716         (update_noncloned_counts): ... ths one; scale counts only.
1717         (clone_inlined_nodes): Do not scale frequency.
1718         (inline_call): Do not pass frequency.
1719         * ipa-inline.c (compute_uninlined_call_time): Use IPA profile.
1720         (compute_inlined_call_time): Use IPA profile.
1721         (want_inline_small_function_p): Use IPA profile.
1722         (want_inline_self_recursive_call_p): Use IPA profile.
1723         (edge_badness): Use IPA profile.
1724         (lookup_recursive_calls): Use IPA profile.
1725         (recursive_inlining): Do not pass frequency.
1726         (resolve_noninline_speculation): Do not update frequency.
1727         (inline_small_functions): Collect max of IPA profile.
1728         (dump_overall_stats): Dump IPA porfile.
1729         (dump_inline_stats): Dump IPA porfile.
1730         (ipa_inline): Collect IPA stats.
1731         * ipa-inline.h (clone_inlined_nodes): Update prototype.
1732         * ipa-profile.c (ipa_propagate_frequency_1): Use frequency function.
1733         (ipa_propagate_frequency): Use frequency function.
1734         (ipa_profile): Cleanup.
1735         * ipa-prop.c (ipa_make_edge_direct_to_target): Do not pass frequency
1736         * ipa-utils.c (ipa_merge_profiles): Merge all profiles.
1737         * lto-cgraph.c (lto_output_edge): Do not stream frequency.
1738         (input_node): Do not stream frequency.
1739         (input_edge): Do not stream frequency.
1740         (merge_profile_summaries): Scale only IPA profiles.
1741         * omp-simd-clone.c (simd_clone_adjust): Do not pass frequency.
1742         * predict.c (drop_profile): Do not recompute frequency.
1743         * trans-mem.c (ipa_tm_insert_irr_call): Do not pass frequency.
1744         (ipa_tm_insert_gettmclone_call): Do not pass frequency.
1745         * tree-cfg.c (execute_fixup_cfg): Drop profile to global0 if needed.
1746         * tree-chkp.c (chkp_copy_bounds_for_assign): Do not pass frequency.
1747         * tree-emutls.c (gen_emutls_addr): Do not pass frequency.
1748         * tree-inline.c (copy_bb): Do not scale frequency.
1749         (expand_call_inline): Do not scale frequency.
1750         (tree_function_versioning): Do not scale frequency.
1751         * ubsan.c (ubsan_create_edge): Do not pass frequency.
1753 2017-11-10  Julia Koval  <julia.koval@intel.com>
1755         * config/i386/gfniintrin.h (_mm_gf2p8affine_epi64_epi8)
1756         (_mm256_gf2p8affine_epi64_epi8, _mm_mask_gf2p8affine_epi64_epi8)
1757         (_mm_maskz_gf2p8affine_epi64_epi8, _mm256_mask_gf2p8affine_epi64_epi8)
1758         (_mm256_maskz_gf2p8affine_epi64_epi8)
1759         (_mm512_mask_gf2p8affine_epi64_epi8, _mm512_gf2p8affine_epi64_epi8)
1760         (_mm512_maskz_gf2p8affine_epi64_epi8): New intrinsics.
1761         * config/i386/i386-builtin.def (__builtin_ia32_vgf2p8affineqb_v64qi)
1762         (__builtin_ia32_vgf2p8affineqb_v32qi)
1763         (__builtin_ia32_vgf2p8affineqb_v16qi): New builtins.
1764         * config/i386/sse.md (vgf2p8affineqb_<mode><mask_name>): New pattern.
1766 2017-11-10  Tamar Christina  <tamar.christina@arm.com>
1768         PR target/82641
1769         * config/arm/arm.c
1770         (arm_option_override): Refactor.
1771         (arm_option_reconfigure_globals): New.
1772         (arm_options_perform_arch_sanity_checks): New.
1773         * config/arm/arm-protos.h (arm_option_reconfigure_globals):
1774         New prototype.
1775         (arm_options_perform_arch_sanity_checks): Likewise
1777 2017-11-10  Pat Haugen  <pthaugen@us.ibm.com>
1779         * rs6000/power9.md (power9-qpdiv): Correct DFU pipe usage.
1780         (power9-qpmul): New.
1781         * rs6000/rs6000.md ("type" attr): Add qmul.
1782         (mul<mode>3, fma<mode>4_hw, *fms<mode>4_hw, *nfma<mode>4_hw,
1783         *nfms<mode>4_hw, mul<mode>3_odd, fma<mode>4_odd, *fms<mode>4_odd,
1784         *nfma<mode>4_odd, *nfms<mode>4_odd): Change type to qmul.
1786 2017-11-10  Martin Sebor  <msebor@redhat.com>
1788         PR c/81117
1789         * builtins.c (compute_objsize): Handle arrays that
1790         compute_builtin_object_size likes to fail for.  Make extern.
1791         * builtins.h (compute_objsize): Declare.
1792         (check_strncpy_sizes): New function.
1793         (expand_builtin_strncpy): Call check_strncpy_sizes.
1794         * gimple-fold.c (gimple_fold_builtin_strncpy): Implement
1795         -Wstringop-truncation.
1796         (gimple_fold_builtin_strncat): Same.
1797         * gimple.c (gimple_build_call_from_tree): Set call location.
1798         * tree-ssa-strlen.c (strlen_to_stridx): New global variable.
1799         (maybe_diag_bound_equal_length, is_strlen_related_p): New functions.
1800         (handle_builtin_stxncpy, handle_builtin_strncat): Same.
1801         (handle_builtin_strlen): Use strlen_to_stridx.
1802         (strlen_optimize_stmt): Handle flavors of strncat, strncpy, and
1803         stpncpy.
1804         Use strlen_to_stridx.
1805         (pass_strlen::execute): Release strlen_to_stridx.
1806         * doc/invoke.texi (-Wsizeof-pointer-memaccess): Document enhancement.
1807         (-Wstringop-truncation): Document new option.
1809 2017-11-10  Martin Liska  <mliska@suse.cz>
1811         PR gcov-profile/82702
1812         * gcov.c (main): Handle intermediate files in a different
1813         way.
1814         (get_gcov_intermediate_filename): New function.
1815         (output_gcov_file): Remove support of intermediate files.
1816         (generate_results): Allocate intermediate file.
1817         (release_structures): Clean-up properly fn_end.
1818         (output_intermediate_file): Start iterating with line 1.
1820 2017-11-10  Jakub Jelinek  <jakub@redhat.com>
1822         PR tree-optimization/82929
1823         * gimple-ssa-store-merging.c (struct store_immediate_info): Add
1824         ops_swapped_p non-static data member.
1825         (store_immediate_info::store_immediate_info): Clear it.
1826         (imm_store_chain_info::coalesce_immediate_stores): If swapping
1827         ops set ops_swapped_p.
1828         (count_multiple_uses): Handle ops_swapped_p.
1830 2017-11-10  Martin Liska  <mliska@suse.cz>
1832         * coverage.c (coverage_init): Stream information about
1833         support of has_unexecuted_blocks.
1834         * doc/gcov.texi: Document that.
1835         * gcov-dump.c (dump_gcov_file): Support it in gcov_dump tool.
1836         * gcov.c (read_graph_file): Likewise.
1837         (output_line_beginning): Fix a small issue with
1838         color output.
1840 2017-11-10  Bin Cheng  <bin.cheng@arm.com>
1842         * tree-predcom.c (determine_roots_comp): Avoid memory leak by freeing
1843         reference of trivial component.
1845 2017-11-10  Jakub Jelinek  <jakub@redhat.com>
1847         PR bootstrap/82916
1848         * gimple-ssa-store-merging.c
1849         (pass_store_merging::terminate_all_aliasing_chains): For
1850         gimple_store_p stmts also call refs_output_dependent_p.
1852         PR rtl-optimization/82913
1853         * compare-elim.c (try_merge_compare): Punt if def_insn is not
1854         single set.
1856 2017-11-09  Jeff Law  <law@redhat.com>
1858         * vr-values.h: New file with vr_values class.
1859         * tree-vrp.c: Include vr-values.h
1860         (vrp_value_range_pool, vrp_equiv_obstack, num_vr_values): Move static
1861         data objects into the vr_values class.
1862         (vr_value, values_propagated, vr_phi_edge_counts): Likewise.
1863         (get_value_range): Make it a member function within vr_values class.
1864         (set_defs_to_varying, update_value_range, add_equivalence): Likewise.
1865         (vrp_stmt_computes_nonzero_p, op_with_boolean_value_range_p): Likewise.
1866         (op_with_constant_singleton_value_range): Likewise.
1867         (extract_range_for_var_from_comparison_expr): Likewise.
1868         (extract_range_from_assert, extract_range_from_ssa_name): Likewise.
1869         (extract_range_from_binary_expr): Likewise.
1870         (extract_range_from_unary_expr): Likewise.
1871         (extract_range_from_cond_expr, extrat_range_from_comparison): Likewise.
1872         (check_for_binary_op_overflow, extract_range_basic): Likewise.
1873         (extract_range_from_assignment, adjust_range_with_scev): Likewise.
1874         (dump_all_value_ranges, get_vr_for_comparison): Likewise.
1875         (compare_name_with_value, compare_names): Likewise.
1876         (vrp_evaluate_conditional_warnv_with_ops_using_ranges): Likewise.
1877         (vrp_evaluate_conditional_warnv_with_ops): Likewise.  Remove prototype.
1878         (vrp_evaluate_conditional, vrp_visit_cond_stmt): Likewise.
1879         (vrp_visit_switch_stmt, extract_range_from_stmt): Likewise.
1880         (extract_range_from_phi_node): Likewise.
1881         (simplify_truth_ops_using_ranges): Likewise.
1882         (simplify_div_or_mod_using_ranges): Likewise.
1883         (simplify_min_or_max_using_ranges, simplify_abs_using_ranges): Likewise.
1884         (simplify_bit_ops_using_ranges, simplify_cond_using_ranges_1): Likewise.
1885         (simplify_cond_using_ranges_2, simplify_switch_using_ranges): Likewise.
1886         (simplify_float_conversion_using_ranges): Likewise.
1887         (simplify_internal_call_using_ranges): Likewise.
1888         (two_valued_val_range_p, simplify_stmt_using_ranges): Likewise.
1889         (vrp_visit_assignment_or_call): Likewise.  Smuggle class instance
1890         poitner via x_vr_values for calls into gimple folder.
1891         (vrp_initialize_lattice): Make this the vr_values ctor.
1892         (vrp_free_lattice): Make this the vr_values dtor.
1893         (set_vr_value): New function.
1894         (class vrp_prop): Add vr_values data member.  Add various member
1895         functions as well as member functions that delegate to vr_values.
1896         (check_array_ref): Make a member function within vrp_prop class.
1897         (search_for_addr_array, vrp_initialize): Likewise.
1898         (vrp_finalize): Likewise.  Revamp to avoid direct access to
1899         vr_value, values_propagated, etc.
1900         (check_array_bounds): Extract vrp_prop class instance pointer from
1901         walk info structure.  Use it to call member functions.
1902         (check_all_array_refs): Make a member function within vrp_prop class.
1903         Smuggle class instance pointer via walk info structure.
1904         (x_vr_values): New local static.
1905         (vrp_valueize): Use x_vr_values to get class instance.
1906         (vr_valueize_1): Likewise.
1907         (class vrp_folder): Add vr_values data member.  Add various member
1908         functions as well as member functions that delegate to vr_values.
1909         (fold_predicate_in): Make a mber fucntion within vrp_folder class.
1910         (simplify_stmt_for_jump_threading): Extract smuggled vr_values
1911         class instance from vr_values.  Use it to call member functions.
1912         (vrp_dom_walker): Add vr_values data member.
1913         (vrp_dom_walker::after_dom_children): Smuggle vr_values class
1914         instance via x_vr_values.
1915         (identify_jump_threads): Accept vr_values as argument.  Store
1916         it into the walker structure.
1917         (evrp_dom_walker): Add vr_values class data member.  Add various
1918         delegators.
1919         (evrp_dom_walker::try_find_new_range): Use vr_values data
1920         member to access the memory allocator.
1921         (evrp_dom_walker::before_dom_children): Store vr_values class
1922         instance into the vrp_folder class.
1923         (evrp_dom_walker::push_value_range): Rework to avoid direct
1924         access to num_vr_values and vr_value.
1925         (evrp_dom_walker::pop_value_range): Likewise.
1926         (execute_early_vrp): Remove call to vrp_initialize_lattice.
1927         Use vr_values to get to dump_all_value_ranges member function.
1928         Remove call to vrp_free_lattice.  Call vrp_initialize, vrp_finalize,
1929         and simplify_cond_using_ranges_2 via vrp_prop class instance.
1930         Pass vr_values class instance down to identify_jump_threads.
1931         Remove call to vrp_free_lattice.
1932         (debug_all_value_ranges): Remove.
1934         * tree-vrp.c (vrp_prop): Move class to earlier point in the file.
1935         (vrp_folder): Likewise.
1937         * tree-vrp.c (set_value_range): Do not reference vrp_equiv_obstack.
1938         Get it from the existing bitmap instead.
1939         (vrp_intersect_ranges_1): Likewise.
1941 2017-11-09  Jakub Jelinek  <jakub@redhat.com>
1943         * gimple-ssa-store-merging.c (struct store_immediate_info): Add
1944         bit_not_p field.
1945         (store_immediate_info::store_immediate_info): Add bitnotp argument,
1946         set bit_not_p to it.
1947         (imm_store_chain_info::coalesce_immediate_stores): Break group
1948         if bit_not_p is different.
1949         (count_multiple_uses, split_group,
1950         imm_store_chain_info::output_merged_store): Handle info->bit_not_p.
1951         (handled_load): Avoid multiple chained BIT_NOT_EXPRs.
1952         (pass_store_merging::process_store): Handle BIT_{AND,IOR,XOR}_EXPR
1953         result inverted using BIT_NOT_EXPR, compute bit_not_p, pass it
1954         to store_immediate_info ctor.
1956 2017-11-09  Jim Wilson  <jimw@sifive.com>
1958         * collect2.c (OBJECT_FORMAT_COFF): Remove EXTENDED_COFF support.
1959         (scan_prog_file): Likewise.
1961 2017-11-09  Jan Hubicka  <hubicka@ucw.cz>
1963         * bb-reorder.c (max_entry_frequency): Remove.
1964         (find_traces, rotate_loop, mark_bb_visited, connect_better_edge_p,
1965         connect_traces, push_to_next_round_p): Remove prototypes.
1966         (find_traces_1_round): Use counts only.
1967         (push_to_next_round_p): Likewise.
1968         (find_traces): Likewise.
1969         (rotate_loop): Likewise.
1970         (find_traces_1_round): Likewise.
1971         (connect_traces): Likewise.
1972         (edge_order): Likewise.
1974 2017-11-09  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1976         * config/arm/arm.c (output_return_instruction): Add comments to
1977         indicate requirement for cmse_nonsecure_entry return to account
1978         for the size of clearing instruction output here.
1979         (thumb_exit): Likewise.
1980         * config/arm/thumb2.md (thumb2_cmse_entry_return): Fix length for
1981         return in hardfloat mode.
1983 2017-11-09  Segher Boessenkool  <segher@kernel.crashing.org>
1985         * config/rs6000/rs6000.c (machine_function): Add a bool,
1986         "toc_is_wrapped_separately".
1987         (rs6000_option_override_internal): Enable OPTION_MASK_SAVE_TOC_INDIRECT
1988         if it wasn't explicitly set or unset, we are optimizing for speed, and
1989         doing separate shrink-wrapping.
1990         (rs6000_get_separate_components): Enable the TOC component if
1991         saving the TOC register in the prologue.
1992         (rs6000_components_for_bb): Handle the TOC component.
1993         (rs6000_emit_prologue_components): Store the TOC register where needed.
1994         (rs6000_set_handled_components): Mark TOC as handled, if handled.
1995         (rs6000_emit_prologue): Don't save the TOC if that is already done.
1997 2017-11-09  Martin Jambor  <mjambor@suse.cz>
1999         * ipa-param-manipulation.c: New file.
2000         * ipa-param-manipulation.h: Likewise.
2001         * Makefile.in (OBJS): Add ipa-param-manipulation.o.
2002         (PLUGIN_HEADERS): Addded ipa-param-manipulation.h
2003         * ipa-param.h (ipa_parm_op): Moved to ipa-param-manipulation.h.
2004         (ipa_parm_adjustment): Likewise.
2005         (ipa_parm_adjustment_vec): Likewise.
2006         (ipa_get_vector_of_formal_parms): Moved declaration to
2007         ipa-param-manipulation.h.
2008         (ipa_get_vector_of_formal_parm_types): Likewise.
2009         (ipa_modify_formal_parameters): Likewise.
2010         (ipa_modify_call_arguments): Likewise.
2011         (ipa_combine_adjustments): Likewise.
2012         (ipa_dump_param_adjustments): Likewise.
2013         (ipa_modify_expr): Likewise.
2014         (ipa_get_adjustment_candidate): Likewise.
2015         * ipa-prop.c (ipa_get_vector_of_formal_parms): Moved to
2016         ipa-param-manipulation.c.
2017         (ipa_get_vector_of_formal_parm_types): Likewise.
2018         (ipa_modify_formal_parameters): Likewise.
2019         (ipa_modify_call_arguments): Likewise.
2020         (ipa_modify_expr): Likewise.
2021         (get_ssa_base_param): Likewise.
2022         (ipa_get_adjustment_candidate): Likewise.
2023         (index_in_adjustments_multiple_times_p): Likewise.
2024         (ipa_combine_adjustments): Likewise.
2025         (ipa_dump_param_adjustments): Likewise.
2026         * tree-sra.c: Also include ipa-param-manipulation.h
2027         * omp-simd-clone.c: Include ipa-param-manipulation.h instead of
2028         ipa-param.h.
2030 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
2031             Alan Hayward  <alan.hayward@arm.com>
2032             David Sherwood  <david.sherwood@arm.com>
2034         * doc/sourcebuild.texi (vect_masked_store): Document.
2036 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
2037             Alan Hayward  <alan.hayward@arm.com>
2038             David Sherwood  <david.sherwood@arm.com>
2040         * doc/sourcebuild.texi (vect_align_stack_vars): Document.
2042 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
2043             Alan Hayward  <alan.hayward@arm.com>
2044             David Sherwood  <david.sherwood@arm.com>
2046         * doc/sourcebuild.texi (vect_variable_length): Document.
2048 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
2049             Alan Hayward  <alan.hayward@arm.com>
2050             David Sherwood  <david.sherwood@arm.com>
2052         * doc/sourcebuild.texi (vect_unaligned_possible): Document.
2054 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
2055             Alan Hayward  <alan.hayward@arm.com>
2056             David Sherwood  <david.sherwood@arm.com>
2058         * doc/sourcebuild.texi (vect_element_align_preferred): Document.
2060 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
2061             Alan Hayward  <alan.hayward@arm.com>
2062             David Sherwood  <david.sherwood@arm.com>
2064         * doc/sourcebuild.texi (vect_perm_short, vect_perm_byte): Document
2065         previously undocumented selectors.
2066         (vect_perm3_byte, vect_perm3_short, vect_perm3_int): Document.
2068 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
2070         * doc/rtl.texi (const_vector): Say that elements can be
2071         const_wide_ints too.
2072         * emit-rtl.h (valid_for_const_vec_duplicate_p): Declare.
2073         * emit-rtl.c (valid_for_const_vec_duplicate_p): New function.
2074         (gen_vec_duplicate): Use it instead of CONSTANT_P.
2075         * optabs.c (expand_vector_broadcast): Likewise.
2077 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
2078             Alan Hayward  <alan.hayward@arm.com>
2079             David Sherwood  <david.sherwood@arm.com>
2081         * tree-ssa-loop-ivopts.c (get_address_cost): Try using a
2082         scaled index even if the unscaled address was invalid.
2083         Don't increase the complexity of using a scale in that case.
2085 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
2086             Alan Hayward  <alan.hayward@arm.com>
2087             David Sherwood  <david.sherwood@arm.com>
2089         * doc/rtl.texi: Rewrite the subreg rules so that they partition
2090         the inner register into REGMODE_NATURAL_SIZE bytes rather than
2091         UNITS_PER_WORD bytes.
2092         * emit-rtl.c (validate_subreg): Divide subregs into blocks
2093         based on REGMODE_NATURAL_SIZE of the inner mode.
2094         (gen_lowpart_common): Split the SCALAR_FLOAT_MODE_P and
2095         !SCALAR_FLOAT_MODE_P cases.  Use REGMODE_NATURAL_SIZE for the latter.
2096         * expmed.c (lowpart_bit_field_p): Divide the value up into
2097         chunks of REGMODE_NATURAL_SIZE rather than UNITS_PER_WORD.
2098         * expr.c (store_constructor): Use REGMODE_NATURAL_SIZE to test
2099         whether something is likely to occupy more than one register.
2101 2017-11-09  Jan Hubicka  <hubicka@ucw.cz>
2103         PR ipa/82879
2104         * ipa-inline-transform.c (update_noncloned_frequencies): Use
2105         profile_count::adjust_for_ipa_scaling.
2106         * tree-inline.c (copy_bb, copy_cfg_body): Likewise.
2107         * profile-count.c (profile_count::adjust_for_ipa_scaling): New member
2108         function.
2109         * profile-count.h (profile_count::adjust_for_ipa_scaling): Declare.
2111 2017-11-09  Jakub Jelinek  <jakub@redhat.com>
2113         * gimple-ssa-store-merging.c (count_multiple_uses): New function.
2114         (split_group): Add total_orig and total_new arguments, estimate the
2115         number of statements related to the store group without store merging
2116         and with store merging.
2117         (imm_store_chain_info::output_merged_store): Adjust split_group
2118         callers, punt if estimated number of statements with store merging
2119         is not smaller than estimated number of statements without it.
2120         Formatting fix.
2121         (handled_load): Remove has_single_use checks.
2122         (pass_store_merging::process_store): Likewise.
2124 2017-11-09  Richard Biener  <rguenther@suse.de>
2126         PR tree-optimization/82902
2127         * tree-ssa-phiprop.c (propagate_with_phi): Test proper type.
2129 2017-11-09  Martin Liska  <mliska@suse.cz>
2131         PR target/82863
2132         * emit-rtl.c (init_emit_regs): Initialize split_branch_probability to
2133         uninitialized.
2135 2017-11-09  Martin Liska  <mliska@suse.cz>
2137         PR tree-optimization/82669
2138         * sbitmap.h (bmp_iter_set_init): Remove non needed check.
2140 2017-11-09  Martin Liska  <mliska@suse.cz>
2142         PR gcov-profile/48463
2143         * coverage.c (coverage_begin_function): Output also end locus
2144         of a function and information whether the function is
2145         artificial.
2146         * gcov-dump.c (tag_function): Parse and print the information.
2147         * gcov.c (INCLUDE_MAP): Add include.
2148         (INCLUDE_SET): Likewise.
2149         (struct line_info): Move earlier in the source file because
2150         of vector<line_info> in function_info structure.
2151         (line_info::line_info): Likewise.
2152         (line_info::has_block): Likewise.
2153         (struct source_info): Add new member index.
2154         (source_info::get_functions_at_location): New function.
2155         (function_info::group_line_p): New function.
2156         (output_intermediate_line): New function.
2157         (output_intermediate_file): Use the mentioned function.
2158         (struct function_start): New.
2159         (struct function_start_pair_hash): Likewise.
2160         (process_file): Add code that identifies group functions.
2161         Assign lines either to global or function scope.
2162         (generate_results): Skip artificial functions.
2163         (find_source): Assign index for each source file.
2164         (read_graph_file): Read new flag artificial and end_line.
2165         (add_line_counts): Assign it either to global of function scope.
2166         (accumulate_line_counts): Isolate core of the function to
2167         accumulate_line_info and call it for both function and global
2168         scope lines.
2169         (accumulate_line_info): New function.
2170         (output_line_beginning): Fix GNU coding style.
2171         (print_source_line): New function.
2172         (output_line_details): Likewise.
2173         (output_function_details): Likewise.
2174         (output_lines): Iterate both source (global) scope and function
2175         scope.
2176         (struct function_line_start_cmp): New class.
2177         * doc/gcov.texi: Reflect changes in documentation.
2179 2017-11-09  Jakub Jelinek  <jakub@redhat.com>
2181         PR debug/82837
2182         * dwarf2out.c (const_ok_for_output_1): Reject NEG in addition to NOT.
2183         (mem_loc_descriptor): Handle (const (neg (...))) as (neg (const (...)))
2184         and similarly for not instead of neg.
2186 2017-11-08  Andi Kleen  <ak@linux.intel.com>
2188         * config/i386/i386.opt: Add -mforce-indirect-call.
2189         * config/i386/predicates.md: Check for flag_force_indirect_call.
2190         * doc/invoke.texi: Document -mforce-indirect-call
2192 2017-11-08  Kito Cheng  <kito.cheng@gmail.com>
2194         * config/riscv/riscv-protos.h (riscv_slow_unaligned_access_p):
2195         New extern.
2196         (MOVE_RATIO): Use riscv_slow_unaligned_access_p.
2197         config/riscv/riscv.c (predict.h): New include.
2198         (riscv_slow_unaligned_access_p): No longer static.
2199         (riscv_block_move_straight): Add require.
2200         config/riscv/riscv-protos.h (riscv_hard_regno_nregs): Delete.
2202 2017-11-08  Jakub Jelinek  <jakub@redhat.com>
2204         PR target/82855
2205         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>,
2206         <avx512>_eq<mode>3<mask_scalar_merge_name>_1): Use
2207         nonimmediate_operand predicate for operand 1 instead of
2208         register_operand.
2210 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2212         * config/aarch64/aarch64-simd.md (store_pair_lanes<mode>):
2213         New pattern.
2214         * config/aarch64/constraints.md (Uml): New constraint.
2215         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): New
2216         predicate.
2218 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2220         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
2221         of two vec_duplicates into a vec_concat.
2223 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2225         * simplify-rtx.c (simplify_ternary_operation, VEC_MERGE):
2226         Simplify vec_merge of vec_duplicate and vec_concat.
2227         * config/aarch64/constraints.md (Utq): New constraint.
2228         * config/aarch64/aarch64-simd.md (load_pair_lanes<mode>): New
2229         define_insn.
2231 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2233         * simplify-rtx.c (simplify_ternary_operation, VEC_MERGE):
2234         Simplify vec_merge of vec_duplicate and const_vector.
2235         * config/aarch64/predicates.md (aarch64_simd_or_scalar_imm_zero):
2236         New predicate.
2237         * config/aarch64/aarch64-simd.md (*aarch64_combinez<mode>): Use VDC
2238         mode iterator.  Update predicate on operand 1 to
2239         handle non-const_vec constants.  Delete constraints.
2240         (*aarch64_combinez_be<mode>): Likewise for operand 2.
2242 2017-11-08  Jakub Jelinek  <jakub@redhat.com>
2244         PR tree-optimization/78821
2245         * gimple-ssa-store-merging.c (struct store_operand_info): Add bit_not_p
2246         data member.
2247         (store_operand_info::store_operand_info): Initialize it to false.
2248         (pass_store_merging::terminate_all_aliasing_chains): Rewritten to use
2249         ref_maybe_used_by_stmt_p and stmt_may_clobber_ref_p on lhs of each
2250         store in the group, and if chain_info is non-NULL, to ignore altogether
2251         that chain.
2252         (compatible_load_p): Fail if bit_not_p does not match.
2253         (imm_store_chain_info::output_merged_store): Handle bit_not_p loads.
2254         (handled_load): Fill in bit_not_p.  Handle BIT_NOT_EXPR.
2255         (pass_store_merging::process_store): Adjust
2256         terminate_all_aliasing_chains calls to pass NULL in all current spots,
2257         call terminate_all_aliasing_chains newly when adding a store into
2258         a chain with non-NULL chain_info.
2260 2017-11-08  Wilco Dijkstra  <wdijkstr@arm.com>
2262         * config/aarch64/aarch64.c (aarch64_can_eliminate): Simplify logic.
2264 2017-11-08  Wilco Dijkstra  <wdijkstr@arm.com>
2266         * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
2267         Remove.
2268         (aarch64_layout_frame): Initialise emit_frame_chain.
2269         (aarch64_can_eliminate): Remove omit leaf frame pointer code.
2270         (TARGET_FRAME_POINTER_REQUIRED): Remove define.
2272 2017-11-08  Martin Liska  <mliska@suse.cz>
2274         * gimplify.c (expand_FALLTHROUGH_r): Simplify usage
2275         of gimple_call_internal_p.
2277 2017-11-07  Tom de Vries  <tom@codesourcery.com>
2279         * config/mips/mips.h (ASM_OUTPUT_LABELREF): Wrap in "do {} while (0)".
2281 2017-11-07  Tom de Vries  <tom@codesourcery.com>
2283         * config/mips/mips.h (ASM_OUTPUT_CASE_END): Remove semicolon after
2284         "do {} while (0)".
2286 2017-11-08  Martin Liska  <mliska@suse.cz>
2288         PR sanitizer/82792
2289         * gimplify.c (expand_FALLTHROUGH_r): Skip IFN_ASAN_MARK.
2291 2017-11-07  Eric Botcazou  <ebotcazou@adacore.com>
2293         * gimple-pretty-print.c (dump_profile): Return "" instead of NULL.
2295 2017-11-07  Jakub Jelinek  <jakub@redhat.com>
2297         PR target/82855
2298         * config/i386/i386.md (SWI1248_AVX512BWDQ2_64): New mode iterator.
2299         (*cmp<mode>_ccz_1): New insn with $k alternative.
2301         PR target/82855
2302         * config/i386/i386.c (ix86_swap_binary_operands_p): Treat
2303         RTX_COMM_COMPARE as commutative as well.
2304         (ix86_binary_operator_ok): Formatting fix.
2305         * config/i386/sse.md (*mul<mode>3<mask_name><round_name>,
2306         *<code><mode>3<mask_name><round_saeonly_name>,
2307         *<code><mode>3<mask_name>, *<code>tf3, *mul<mode>3<mask_name>,
2308         *<s>mul<mode>3_highpart<mask_name>,
2309         *vec_widen_umult_even_v16si<mask_name>,
2310         *vec_widen_umult_even_v8si<mask_name>,
2311         *vec_widen_umult_even_v4si<mask_name>,
2312         *vec_widen_smult_even_v16si<mask_name>,
2313         *vec_widen_smult_even_v8si<mask_name>, *sse4_1_mulv2siv2di3<mask_name>,
2314         *avx2_pmaddwd, *sse2_pmaddwd, *<sse4_1_avx2>_mul<mode>3<mask_name>,
2315         *avx2_<code><mode>3, *avx512f_<code><mode>3<mask_name>,
2316         *sse4_1_<code><mode>3<mask_name>, *<code>v8hi3,
2317         *sse4_1_<code><mode>3<mask_name>, *<code>v16qi3, *avx2_eq<mode>3,
2318         <avx512>_eq<mode>3<mask_scalar_merge_name>_1, *sse4_1_eqv2di3,
2319         *sse2_eq<mode>3, <mask_codefor><code><mode>3<mask_name>,
2320         *<code><mode>3, *<sse2_avx2>_uavg<mode>3<mask_name>,
2321         *<ssse3_avx2>_pmulhrsw<mode>3<mask_name>, *ssse3_pmulhrswv4hi3): Use
2322         !(MEM_P (operands[1]) && MEM_P (operands[2])) condition instead of
2323         ix86_binary_operator_ok.  Formatting fixes.
2324         (*<plusminus_insn><mode>3<mask_name><round_name>,
2325         *<plusminus_insn><mode>3, *<plusminus_insn><mode>3_m): Formatting
2326         fixes.
2328 2017-11-07  Segher Boessenkool  <segher@kernel.crashing.org>
2330         * config/rs6000/rs6000.md (GPR2): New mode_iterator.
2331         ("cstore<mode>4"): Don't always expand with rs6000_emit_int_cmove for
2332         eq and ne if TARGET_ISEL.
2333         (cmp): New code_iterator.
2334         (UNS, UNSU_, UNSIK): New code_attrs.
2335         (<code><GPR:mode><GPR2:mode>2_isel): New define_insn_and_split.
2336         ("eq<mode>3"): New define_expand, rename the define_insn_and_split
2337         to...
2338         ("eq<mode>3"): ... this.
2339         ("ne<mode>3"): New define_expand, rename the define_insn_and_split
2340         to...
2341         ("ne<mode>3"): ... this.
2343 2017-11-07  Julia Koval  <julia.koval@intel.com>
2345         PR target/82812
2346         * common/config/i386/i386-common.c
2347         (OPTION_MASK_ISA_GENERAL_REGS_ONLY_UNSET): Remove MPX from flag.
2348         (ix86_handle_option): Move MPX to isa_flags2 and GFNI to isa_flags.
2349         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto.
2350         * config/i386/i386.opt: Ditto.
2351         * config/i386/i386.c (ix86_target_string): Ditto.
2352         (ix86_option_override_internal): Ditto.
2353         (ix86_init_mpx_builtins): Move MPX to args2.
2354         (ix86_expand_builtin): Special handling for OPTION_MASK_ISA_GFNI.
2355         * config/i386/i386-builtin.def (__builtin_ia32_vgf2p8affineinvqb_v64qi,
2356         __builtin_ia32_vgf2p8affineinvqb_v64qi_mask,
2357         __builtin_ia32_vgf2p8affineinvqb_v32qi,
2358         __builtin_ia32_vgf2p8affineinvqb_v32qi_mask,
2359         __builtin_ia32_vgf2p8affineinvqb_v16qi,
2360         __builtin_ia32_vgf2p8affineinvqb_v16qi_mask): Move to ARGS array.
2362 2017-11-07  Uros Bizjak  <ubizjak@gmail.com>
2364         PR target/80425
2365         * config/i386.i386.md (*zero_extendsidi2): Change (?r,*Yj), (?*Yi,r)
2366         and (*x,m) to ($r,Yj), ($Yi,r) and ($x,m).
2367         (zero-extendsidi peephole2): Remove peephole.
2369 2017-11-07  Eric Botcazou  <ebotcazou@adacore.com>
2371         PR c/53037
2372         * stor-layout.c: Include attribs.h.
2373         (handle_warn_if_not_align): Replace test on TYPE_USER_ALIGN with
2374         explicit lookup of "aligned" attribute.
2376 2017-11-07  Andrew Waterman  <andrew@sifive.com>
2378         * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): New prototype.
2379         (riscv_expand_block_move): Likewise.
2380         * config/riscv/riscv.h (MOVE_RATIO): Tune cost to movmemsi
2381         implementation.
2382         (RISCV_MAX_MOVE_BYTES_PER_LOOP_ITER): New define.
2383         (RISCV_MAX_MOVE_BYTES_STRAIGHT): New define.
2384         * config/riscv/riscv.c (riscv_block_move_straight): New function.
2385         (riscv_adjust_block_mem): Likewise.
2386         (riscv_block_move_loop): Likewise.
2387         (riscv_expand_block_move): Likewise.
2388         gcc/config/riscv/riscv.md (movmemsi): New pattern.
2390 2017-11-07  Michael Clark  <michaeljclark@mac.com>
2392         * config/riscv/linux.h (MUSL_ABI_SUFFIX): New define.
2393         (MUSL_DYNAMIC_LINKER): Likewise.
2395 2017-11-07  Richard Sandiford  <richard.sandiford@linaro.org>
2397         * config/aarch64/aarch64.md (ashl<mode>3, ashr<mode>3, lshr<mode>3)
2398         (rotr<mode>3, rotl<mode>3): Use aarch64_reg_or_imm instead of
2399         nonmmory_operand.
2401 2017-11-07  Richard Biener  <rguenther@suse.de>
2403         * match.pd: Fix build.
2405 2017-11-07  Wilco Dijkstra  <wdijkstr@arm.com>
2406             Jackson Woodruff  <jackson.woodruff@arm.com>
2408         PR tree-optimization/71026
2409         * match.pd: Canonicalize negate in division.
2411 2017-11-07  Sudakshina Das  <sudi.das@arm.com>
2413         PR middle-end/80131
2414         * match.pd: Simplify 1 << (C - x) where C = precision (x) - 1.
2416 2017-11-07  Marc Glisse  <marc.glisse@inria.fr>
2418         * match.pd ((a&~b)|(a^b),(a&~b)^~a,(a|b)&~(a^b),a|~(a^b),
2419         (a|b)|(a&^b),(a&b)|~(a^b),~(~a&b),~X^Y): New transformations.
2421 2017-11-07  Marc Glisse  <marc.glisse@inria.fr>
2423         * fold-const.c (negate_expr_p) [PLUS_EXPR, MINUS_EXPR]: Handle
2424         non-scalar integral types.
2425         * match.pd (negate_expr_p): Handle MINUS_EXPR.
2426         (-(A-B), -(~A)): New transformations.
2428 2017-11-07  Tom de Vries  <tom@codesourcery.com>
2430         * config/powerpcspe/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Remove
2431         semicolon after "do {} while (0)".
2432         * config/powerpcspe/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
2433         * config/powerpcspe/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
2434         * config/powerpcspe/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
2435         * config/powerpcspe/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
2436         * config/powerpcspe/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
2438 2017-11-07  Tom de Vries  <tom@codesourcery.com>
2440         * config/rs6000/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Remove semicolon
2441         after "do {} while (0)".
2442         * config/rs6000/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
2443         * config/rs6000/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
2444         * config/rs6000/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
2445         * config/rs6000/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
2446         * config/rs6000/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
2448 2017-11-07  Tom de Vries  <tom@codesourcery.com>
2450         PR other/82784
2451         * config/arm/arm.c (HANDLE_NARROW_SHIFT_ARITH): Remove semicolon after
2452         "while {} do (0)".
2453         (arm_rtx_costs_internal): Add missing semicolon after
2454         HANDLE_NARROW_SHIFT_ARITH call.
2456 2017-11-06  Segher Boessenkool  <segher@kernel.crashing.org>
2458         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
2459         disable isel if it was not set explicitly.
2461 2017-11-06  James Bowman  <james.bowman@ftdichip.com>
2463         * gcc/dwarf2out.c (modified_type_die): Retain ADDR_SPACE qualifiers.
2464         (add_type_attribute) likewise.
2466 2017-11-06  H.J. Lu  <hongjiu.lu@intel.com>
2468         * config/i386/i386.c (ix86_can_use_return_insn_p): Use reference
2469         of struct ix86_frame.
2470         (ix86_initial_elimination_offset): Likewise.
2471         (ix86_expand_split_stack_prologue): Likewise.
2473 2017-11-06  Marc Glisse  <marc.glisse@inria.fr>
2475         * tree-vrp.h (enum value_range_type): Update stale comment.
2477 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
2478             Alan Hayward  <alan.hayward@arm.com>
2479             David Sherwood  <david.sherwood@arm.com>
2481         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm)
2482         (aarch64_expand_vec_perm_const): Take the number of units too.
2483         * config/aarch64/aarch64.c (aarch64_expand_vec_perm)
2484         (aarch64_expand_vec_perm_const): Likewise.
2485         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>)
2486         (vec_perm<mode>): Update accordingly.
2488 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
2489             Alan Hayward  <alan.hayward@arm.com>
2490             David Sherwood  <david.sherwood@arm.com>
2492         * config/aarch64/aarch64-protos.h (aarch64_simd_vect_par_cnst_half):
2493         Take the number of units too.
2494         * config/aarch64/aarch64.c (aarch64_simd_vect_par_cnst_half): Likewise.
2495         (aarch64_simd_check_vect_par_cnst_half): Update call accordingly,
2496         but check for a vector mode before rather than after the call.
2497         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
2498         (move_hi_quad_<mode>, vec_unpack<su>_hi_<mode>)
2499         (vec_unpack<su>_lo_<mode, vec_widen_<su>mult_lo_<mode>)
2500         (vec_widen_<su>mult_hi_<mode>, vec_unpacks_lo_<mode>)
2501         (vec_unpacks_hi_<mode>, aarch64_saddl2<mode>, aarch64_uaddl2<mode>)
2502         (aarch64_ssubl2<mode>, aarch64_usubl2<mode>, widen_ssum<mode>3)
2503         (widen_usum<mode>3, aarch64_saddw2<mode>, aarch64_uaddw2<mode>)
2504         (aarch64_ssubw2<mode>, aarch64_usubw2<mode>, aarch64_sqdmlal2<mode>)
2505         (aarch64_sqdmlsl2<mode>, aarch64_sqdmlal2_lane<mode>)
2506         (aarch64_sqdmlal2_laneq<mode>, aarch64_sqdmlsl2_lane<mode>)
2507         (aarch64_sqdmlsl2_laneq<mode>, aarch64_sqdmlal2_n<mode>)
2508         (aarch64_sqdmlsl2_n<mode>, aarch64_sqdmull2<mode>)
2509         (aarch64_sqdmull2_lane<mode>, aarch64_sqdmull2_laneq<mode>)
2510         (aarch64_sqdmull2_n<mode>): Update accordingly.
2512 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
2513             Alan Hayward  <alan.hayward@arm.com>
2514             David Sherwood  <david.sherwood@arm.com>
2516         * config/aarch64/aarch64-protos.h (aarch64_reverse_mask): Take
2517         the number of units too.
2518         * config/aarch64/aarch64.c (aarch64_reverse_mask): Likewise.
2519         * config/aarch64/aarch64-simd.md (vec_load_lanesoi<mode>)
2520         (vec_store_lanesoi<mode>, vec_load_lanesci<mode>)
2521         (vec_store_lanesci<mode>, vec_load_lanesxi<mode>)
2522         (vec_store_lanesxi<mode>): Update accordingly.
2524 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
2525             Alan Hayward  <alan.hayward@arm.com>
2526             David Sherwood  <david.sherwood@arm.com>
2528         * config/aarch64/aarch64-protos.h (aarch64_endian_lane_rtx): Declare.
2529         * config/aarch64/aarch64.c (aarch64_endian_lane_rtx): New function.
2530         * config/aarch64/aarch64.h (ENDIAN_LANE_N): Take the number
2531         of units rather than the mode.
2532         * config/aarch64/iterators.md (nunits): New mode attribute.
2533         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args):
2534         Use aarch64_endian_lane_rtx instead of GEN_INT (ENDIAN_LANE_N ...).
2535         * config/aarch64/aarch64-simd.md (aarch64_dup_lane<mode>)
2536         (aarch64_dup_lane_<vswap_width_name><mode>, *aarch64_mul3_elt<mode>)
2537         (*aarch64_mul3_elt_<vswap_width_name><mode>): Likewise.
2538         (*aarch64_mul3_elt_to_64v2df, *aarch64_mla_elt<mode>): Likewise.
2539         (*aarch64_mla_elt_<vswap_width_name><mode>, *aarch64_mls_elt<mode>)
2540         (*aarch64_mls_elt_<vswap_width_name><mode>, *aarch64_fma4_elt<mode>)
2541         (*aarch64_fma4_elt_<vswap_width_name><mode>):: Likewise.
2542         (*aarch64_fma4_elt_to_64v2df, *aarch64_fnma4_elt<mode>): Likewise.
2543         (*aarch64_fnma4_elt_<vswap_width_name><mode>): Likewise.
2544         (*aarch64_fnma4_elt_to_64v2df, reduc_plus_scal_<mode>): Likewise.
2545         (reduc_plus_scal_v4sf, reduc_<maxmin_uns>_scal_<mode>): Likewise.
2546         (reduc_<maxmin_uns>_scal_<mode>): Likewise.
2547         (*aarch64_get_lane_extend<GPI:mode><VDQQH:mode>): Likewise.
2548         (*aarch64_get_lane_zero_extendsi<mode>): Likewise.
2549         (aarch64_get_lane<mode>, *aarch64_mulx_elt_<vswap_width_name><mode>)
2550         (*aarch64_mulx_elt<mode>, *aarch64_vgetfmulx<mode>): Likewise.
2551         (aarch64_sq<r>dmulh_lane<mode>, aarch64_sq<r>dmulh_laneq<mode>)
2552         (aarch64_sqrdml<SQRDMLH_AS:rdma_as>h_lane<mode>): Likewise.
2553         (aarch64_sqrdml<SQRDMLH_AS:rdma_as>h_laneq<mode>): Likewise.
2554         (aarch64_sqdml<SBINQOPS:as>l_lane<mode>): Likewise.
2555         (aarch64_sqdml<SBINQOPS:as>l_laneq<mode>): Likewise.
2556         (aarch64_sqdml<SBINQOPS:as>l2_lane<mode>_internal): Likewise.
2557         (aarch64_sqdml<SBINQOPS:as>l2_laneq<mode>_internal): Likewise.
2558         (aarch64_sqdmull_lane<mode>, aarch64_sqdmull_laneq<mode>): Likewise.
2559         (aarch64_sqdmull2_lane<mode>_internal): Likewise.
2560         (aarch64_sqdmull2_laneq<mode>_internal): Likewise.
2561         (aarch64_vec_load_lanesoi_lane<mode>): Likewise.
2562         (aarch64_vec_store_lanesoi_lane<mode>): Likewise.
2563         (aarch64_vec_load_lanesci_lane<mode>): Likewise.
2564         (aarch64_vec_store_lanesci_lane<mode>): Likewise.
2565         (aarch64_vec_load_lanesxi_lane<mode>): Likewise.
2566         (aarch64_vec_store_lanesxi_lane<mode>): Likewise.
2567         (aarch64_simd_vec_set<mode>): Update use of ENDIAN_LANE_N.
2568         (aarch64_simd_vec_setv2di): Likewise.
2570 2017-11-06  Carl Love  <cel@us.ibm.com>
2572         * config/rs6000/rs6000-c.c (P8V_BUILTIN_VEC_REVB): Add power 8
2573         definitions.
2574         (P9V_BUILTIN_VEC_REVB): Remove the power 9 instance definitions.
2575         * config/rs6000/altivec.h (vec_revb): Change the #define from power 9
2576         to power 8.
2577         * config/rs6000/r6000-protos.h (swap_endian_selector_for_mode): Add new
2578         extern declaration.
2579         * config/rs6000/rs6000.c (swap_endian_selector_for_mode): Add function.
2580         * config/rs6000/rs6000-builtin.def (BU_P8V_VSX_1, BU_P8V_OVERLOAD_1):
2581         Add power 8 macro expansions.
2582         (BU_P9V_OVERLOAD_1): Remove power 9 overload expansion.
2583         * config/rs6000/vsx.md (revb_<mode>): Add define_expand to generate
2584         power 8 instructions.  (VSX_XXBR): Add iterator.
2586 2017-11-06  Wilco Dijkstra  <wdijkstr@arm.com>
2588         * config/arm/arm.md (predicable_short_it): Change default to "no",
2589         improve documentation, remove uses that are identical to the default.
2590         (enabled_for_depr_it): Rename to enabled_for_short_it.
2591         * gcc/config/arm/arm-fixed.md (predicable_short_it):
2592         Remove default uses.
2593         * gcc/config/arm/ldmstm.md (predicable_short_it): Likewise.
2594         * gcc/config/arm/sync.md (predicable_short_it): Likewise.
2595         * gcc/config/arm/thumb2.md (predicable_short_it): Likewise.
2596         * gcc/config/arm/vfp.md (predicable_short_it): Likewise.
2598 2017-11-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
2600         PR target/82748
2601         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_1): Delete
2602         float128 helper macros, which are no longer used after deleting
2603         the old 'q' built-in functions, and moving the round to odd
2604         built-in functions to being special built-in functions.
2605         (BU_FLOAT128_2): Likewise.
2606         (BU_FLOAT128_1_HW): Likewise.
2607         (BU_FLOAT128_2_HW): Likewise.
2608         (BU_FLOAT128_3_HW): Likewise.
2609         (FABSQ): Delete old 'q' built-in functions.
2610         (COPYSIGNQ): Likewise.
2611         (SQRTF128_ODD): Move round to odd built-in functions to be
2612         special built-in functions, so that we can handle
2613         -mabi=ieeelongdouble.
2614         (TRUNCF128_ODD): Likewise.
2615         (ADDF128_ODD): Likewise.
2616         (SUBF128_ODD): Likewise.
2617         (MULF128_ODD): Likewise.
2618         (DIVF128_ODD): Likewise.
2619         (FMAF128_ODD): Likewise.
2620         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Map old 'q'
2621         built-in names to 'f128'.
2622         * config/rs6000/rs6000.c (rs6000_fold_builtin): Remove folding the
2623         old 'q' built-in functions, as the machine independent code for
2624         'f128' built-in functions handles this.
2625         (rs6000_expand_builtin): Add expansion for float128 round to odd
2626         functions, keying off on -mabi=ieeelongdouble of whether to use
2627         the KFmode or TFmode variant.
2628         (rs6000_init_builtins): Initialize the _Float128 round to odd
2629         built-in functions.
2630         * doc/extend.texi (PowerPC Built-in Functions): Document the old
2631         _Float128 'q' built-in functions are now mapped into the new
2632         'f128' built-in functions.
2634 2017-11-06  David Edelsohn  <dje.gcc@gmail.com>
2636         * collect2.c (add_lto_object): Compile for OBJECT_COFF.
2637         (scan_prog_file): Don't skip PASS_LTOINFO. Scan for LTO objects.
2639 2017-11-06  David Malcolm  <dmalcolm@redhat.com>
2641         PR jit/82826
2642         * ipa-fnsummary.c (ipa_fnsummary_c_finalize): New function.
2643         * ipa-fnsummary.h (ipa_fnsummary_c_finalize): New decl.
2644         * toplev.c: Include "ipa-fnsummary.h".
2645         (toplev::finalize): Call ipa_fnsummary_c_finalize.
2647 2017-11-06  Jakub Jelinek  <jakub@redhat.com>
2649         PR tree-optimization/82838
2650         * gimple-ssa-store-merging.c
2651         (imm_store_chain_info::output_merged_store): Call force_gimple_operand_1
2652         on a separate gimple_seq which is then appended to seq.
2654 2017-11-06  Jeff Law  <law@redhat.com>
2656         PR target/82788
2657         * config/i386/i386.c (PROBE_INTERVAL): Remove.
2658         (get_probe_interval): New functions.
2659         (ix86_adjust_stack_and_probe_stack_clash): Use get_probe_interval.
2660         (ix86_adjust_stack_and_probe): Likewise.
2661         (output_adjust_stack_and_probe): Likewise.
2662         (ix86_emit_probe_stack_range): Likewise.
2663         (ix86_expand_prologue): Likewise.
2665 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
2667         PR tree-optimization/82816
2668         * tree-ssa-math-opts.c (convert_mult_to_widen): Return false
2669         if the modes of the two types are the same.
2670         (convert_plusminus_to_widen): Likewise.
2672 2017-11-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
2674         * config/rs6000/altivec.md (*p9_vadu<mode>3) Rename to
2675         p9_vadu<mode>3.
2676         (usadv16qi): New define_expand.
2677         (usadv8hi): New define_expand.
2679 2017-11-06  Jan Hubicka  <hubicka@ucw.cz>
2681         PR bootstrap/82832
2682         * ipa-inline-transform.c (update_noncloned_frequencies): Always
2683         scale.
2684         (inline_transform): Likewise.
2685         * predict.c (counts_to_freqs): Remove useless conditional.
2686         * profile-count.h (profile_count::apply_scale): Move sanity check.
2687         * tree-inline.c (copy_bb): Always scale.
2688         (copy_cfg_body): Likewise.
2690 2017-11-06  Christophe Lyon  <christophe.lyon@linaro.org>
2692         PR target/67591
2693         * config/arm/arm.md (*sub_shiftsi): Add predicable_short_it
2694         attribute.
2695         (*cmp_ite0): Add enabled_for_depr_it attribute.
2696         (*cmp_ite1): Likewise.
2698 2017-11-06  Segher Boessenkool  <segher@kernel.crashing.org>
2700         * config/rs6000/rs6000.c (rs6000_insn_cost): Handle TYPE_MFCR and
2701         TYPE_MFCRF.
2703 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
2705         * tree-vrp.c (vrp_int_const_binop): Return true on success and
2706         return the value by pointer.
2707         (extract_range_from_multiplicative_op_1): Update accordingly.
2708         Return as soon as an operation fails.
2710 2017-11-05  Tom de Vries  <tom@codesourcery.com>
2712         PR other/82784
2713         * asan.c (DEF_SANITIZER_BUILTIN_1): Factor out of ...
2714         (DEF_SANITIZER_BUILTIN): ... here.
2715         (initialize_sanitizer_builtins): Use DEF_SANITIZER_BUILTIN_1 instead of
2716         DEF_SANITIZER_BUILTIN in if stmt.  Add missing semicolon.
2718 2017-11-05  Tom de Vries  <tom@codesourcery.com>
2720         PR other/82784
2721         * config/elfos.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove semicolon after
2722         macro body.
2723         (ASM_OUTPUT_CASE_LABEL): Add semicolon after
2724         ASM_OUTPUT_BEFORE_CASE_LABEL call.
2725         * config/arc/arc.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove semicolon
2726         after macro body.
2727         * config/m68k/m68kelf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
2728         * config/mips/mips.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
2729         * config/v850/v850.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
2731 2017-11-05  Tom de Vries  <tom@codesourcery.com>
2733         PR other/82784
2734         * graphite-scop-detection.c (DEBUG_PRINT): Remove semicolon after
2735         "do {} while (0)".
2737 2017-11-04  Michael Clark  <michaeljclark@mac.com>
2739         * config/riscv/riscv.c (riscv_print_operand): Add a 'i' format.
2740         config/riscv/riscv.md (addsi3): Use 'i' for immediates.
2741         (adddi3): Likewise.
2742         (*addsi3_extended): Likewise.
2743         (*addsi3_extended2): Likewise.
2744         (<optab>si3): Likewise.
2745         (<optab>di3): Likewise.
2746         (<optab><mode>3): Likewise.
2747         (<*optabe>si3_internal): Likewise.
2748         (zero_extendqi<SUPERQI:mode>2): Likewise.
2749         (*add<mode>hi3): Likewise.
2750         (*xor<mode>hi3): Likewise.
2751         (<optab>di3): Likewise.
2752         (*<optab>si3_extend): Likewise.
2753         (*sge<u>_<X:mode><GPR:mode>): Likewise.
2754         (*slt<u>_<X:mode><GPR:mode>): Likewise.
2755         (*sle<u>_<X:mode><GPR:mode>): Likewise.
2757 2017-11-04  Andrew Waterman  <andrew@sifive.com>
2759         * config/riscv/riscv.c (riscv_option_override): Conditionally set
2760         TARGET_STRICT_ALIGN based upon -mtune argument.
2762 2017-11-04  Andrew Waterman  <andrew@sifive.com>
2764         * config/riscv/riscv.h (SLOW_BYTE_ACCESS): Change to 1.
2766 2017-11-04  Daniel Santos  <daniel.santos@pobox.com>
2768         config/i386/i386.c (choose_basereg): Use optional scratch
2769         register and add assertion.
2770         (x86_emit_outlined_ms2sysv_save): Use scratch register when
2771         needed, and don't allocate stack.
2772         (ix86_expand_prologue): Rearrange where SSE saves/stub call is
2773         emitted, correct wrong allocation with -mcall-ms2sysv-xlogues.
2774         (ix86_emit_outlined_ms2sysv_restore): Fix non-immediate offsets.
2776 2017-11-03  Jeff Law  <law@redhat.com>
2778         * config/i386/i386.c (ix86_emit_restore_reg_using_pop): Prototype.
2779         (ix86_adjust_stack_and_probe_stack_clash): Use a push/pop sequence
2780         to probe at the start of a noreturn function.
2782 2017-11-03  Jakub Jelinek  <jakub@redhat.com>
2784         PR tree-optimization/78821
2785         * gimple-ssa-store-merging.c: Update the file comment.
2786         (MAX_STORE_ALIAS_CHECKS): Define.
2787         (struct store_operand_info): New type.
2788         (store_operand_info::store_operand_info): New constructor.
2789         (struct store_immediate_info): Add rhs_code and ops data members.
2790         (store_immediate_info::store_immediate_info): Add rhscode, op0r
2791         and op1r arguments to the ctor, initialize corresponding data members.
2792         (struct merged_store_group): Add load_align_base and load_align
2793         data members.
2794         (merged_store_group::merged_store_group): Initialize them.
2795         (merged_store_group::do_merge): Update them.
2796         (merged_store_group::apply_stores): Pick the constant for
2797         encode_tree_to_bitpos from one of the two operands, or skip
2798         encode_tree_to_bitpos if neither operand is a constant.
2799         (class pass_store_merging): Add process_store method decl.  Remove
2800         bool argument from terminate_all_aliasing_chains method decl.
2801         (pass_store_merging::terminate_all_aliasing_chains): Remove
2802         var_offset_p argument and corresponding handling.
2803         (stmts_may_clobber_ref_p): New function.
2804         (compatible_load_p): New function.
2805         (imm_store_chain_info::coalesce_immediate_stores): Terminate group
2806         if there is overlap and rhs_code is not INTEGER_CST.  For
2807         non-overlapping stores terminate group if rhs is not mergeable.
2808         (get_alias_type_for_stmts): Change first argument from
2809         auto_vec<gimple *> & to vec<gimple *> &.  Add IS_LOAD, CLIQUEP and
2810         BASEP arguments.  If IS_LOAD is true, look at rhs1 of the stmts
2811         instead of lhs.  Compute *CLIQUEP and *BASEP in addition to the
2812         alias type.
2813         (get_location_for_stmts): Change first argument from
2814         auto_vec<gimple *> & to vec<gimple *> &.
2815         (struct split_store): Remove orig_stmts data member, add orig_stores.
2816         (split_store::split_store): Create orig_stores rather than orig_stmts.
2817         (find_constituent_stmts): Renamed to ...
2818         (find_constituent_stores): ... this.  Change second argument from
2819         vec<gimple *> * to vec<store_immediate_info *> *, push pointers
2820         to info structures rather than the statements.
2821         (split_group): Rename ALLOW_UNALIGNED argument to
2822         ALLOW_UNALIGNED_STORE, add ALLOW_UNALIGNED_LOAD argument and handle
2823         it.  Adjust find_constituent_stores caller.
2824         (imm_store_chain_info::output_merged_store): Handle rhs_code other
2825         than INTEGER_CST, adjust split_group, get_alias_type_for_stmts and
2826         get_location_for_stmts callers.  Set MR_DEPENDENCE_CLIQUE and
2827         MR_DEPENDENCE_BASE on the MEM_REFs if they are the same in all stores.
2828         (mem_valid_for_store_merging): New function.
2829         (handled_load): New function.
2830         (pass_store_merging::process_store): New method.
2831         (pass_store_merging::execute): Use process_store method.  Adjust
2832         terminate_all_aliasing_chains caller.
2834 2017-11-03  Wilco Dijkstra  <wdijkstr@arm.com>
2836         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
2837         Return true for more constants, symbols and label references.
2838         (aarch64_valid_floating_const): Remove unused function.
2840 2017-11-03  Wilco Dijkstra  <wdijkstr@arm.com>
2842         PR target/82786
2843         * config/aarch64/aarch64.c (aarch64_layout_frame):
2844         Undo forcing of LR at bottom of frame.
2846 2017-11-03  Jeff Law  <law@redhat.com>
2848         PR target/82823
2849         * config/i386/i386.c (ix86_expand_prologue): Tighten assert
2850         for int_registers_saved.
2852         * cfganal.c (single_pred_edge_ignoring_loop_edges): New function
2853         extracted from tree-ssa-dom.c.
2854         * cfganal.h (single_pred_edge_ignoring_loop_edges): Prototype.
2855         * tree-ssa-dom.c (single_incoming_edge_ignoring_loop_edges): Remove.
2856         (record_equivalences_from_incoming_edge): Add additional argument
2857         to single_pred_edge_ignoring_loop_edges call.
2858         * tree-ssa-uncprop.c (single_incoming_edge_ignoring_loop_edges): Remove.
2859         (uncprop_dom_walker::before_dom_children): Add additional argument
2860         to single_pred_edge_ignoring_loop_edges call.
2861         * tree-ssa-sccvn.c (sccvn_dom_walker::before_dom_children): Use
2862         single_pred_edge_ignoring_loop_edges rather than open coding.
2863         * tree-vrp.c (evrp_dom_walker::before_dom_children): Similarly.
2865 2017-11-03  Marc Glisse  <marc.glisse@inria.fr>
2867         * match.pd (-(-A)): Rewrite.
2869 2017-11-03  Segher Boessenkool  <segher@kernel.crashing.org>
2871         * config/rs6000/rs60000-protos.h (rs6000_emit_sISEL): Delete.
2872         (rs6000_emit_int_cmove): New declaration.
2873         * config/rs6000/rs6000.c (rs6000_emit_int_cmove): Delete declaration.
2874         (rs6000_emit_sISEL): Delete.
2875         (rs6000_emit_int_cmove): Make non-static.
2876         * config/rs6000/rs6000.md (cstore<mode>4): Use rs6000_emit_int_cmove
2877         instead of rs6000_emit_sISEL.
2879 2017-11-03  Jan Hubicka  <hubicka@ucw.cz>
2881         * asan.c (create_cond_insert_point): Maintain profile.
2882         * ipa-utils.c (ipa_merge_profiles): Be sure only IPA profiles are
2883         merged.
2884         * basic-block.h (struct basic_block_def): Remove frequency.
2885         (EDGE_FREQUENCY): Use to_frequency
2886         * bb-reorder.c (push_to_next_round_p): Use only IPA counts for global
2887         heuristics.
2888         (find_traces): Update to use to_frequency.
2889         (find_traces_1_round): Likewise; use only IPA counts.
2890         (bb_to_key): Likewise.
2891         (connect_traces): Use IPA counts only.
2892         (copy_bb_p): Update to use to_frequency.
2893         (fix_up_crossing_landing_pad): Likewise.
2894         (sanitize_hot_paths): Likewise.
2895         * bt-load.c (basic_block_freq): Likewise.
2896         * cfg.c (init_flow): Set count_max to uninitialized.
2897         (check_bb_profile): Remove frequencies; check counts.
2898         (dump_bb_info): Do not dump frequencies.
2899         (update_bb_profile_for_threading): Update counts only.
2900         (scale_bbs_frequencies_int): Likewise.
2901         (MAX_SAFE_MULTIPLIER): Remove.
2902         (scale_bbs_frequencies_gcov_type): Update counts only.
2903         (scale_bbs_frequencies_profile_count): Update counts only.
2904         (scale_bbs_frequencies): Update counts only.
2905         * cfg.h (struct control_flow_graph): Add count-max.
2906         (update_bb_profile_for_threading): Update prototype.
2907         * cfgbuild.c (find_bb_boundaries): Do not update frequencies.
2908         (find_many_sub_basic_blocks): Likewise.
2909         * cfgcleanup.c (try_forward_edges): Likewise.
2910         (try_crossjump_to_edge): Likewise.
2911         * cfgexpand.c (expand_gimple_cond): Likewise.
2912         (expand_gimple_tailcall): Likewise.
2913         (construct_init_block): Likewise.
2914         (construct_exit_block): Likewise.
2915         * cfghooks.c (verify_flow_info): Check consistency of counts.
2916         (dump_bb_for_graph): Do not dump frequencies.
2917         (split_block_1): Do not update frequencies.
2918         (split_edge): Do not update frequencies.
2919         (make_forwarder_block): Do not update frequencies.
2920         (duplicate_block): Do not update frequencies.
2921         (account_profile_record): Do not update frequencies.
2922         * cfgloop.c (find_subloop_latch_edge_by_profile): Use IPA counts
2923         for global heuristics.
2924         * cfgloopanal.c (average_num_loop_insns): Update to use to_frequency.
2925         (expected_loop_iterations_unbounded): Use counts only.
2926         * cfgloopmanip.c (scale_loop_profile): Simplify.
2927         (create_empty_loop_on_edge): Simplify
2928         (loopify): Simplify
2929         (duplicate_loop_to_header_edge): Simplify
2930         * cfgrtl.c (force_nonfallthru_and_redirect): Update profile.
2931         (update_br_prob_note): Take care of removing note when profile
2932         becomes undefined.
2933         (relink_block_chain): Do not dump frequency.
2934         (rtl_account_profile_record): Use to_frequency.
2935         * cgraph.c (symbol_table::create_edge): Convert count to ipa count.
2936         (cgraph_edge::redirect_call_stmt_to_calle): Conver tcount to ipa count.
2937         (cgraph_update_edges_for_call_stmt_node): Likewise.
2938         (cgraph_edge::verify_count_and_frequency): Update.
2939         (cgraph_node::verify_node): Temporarily disable frequency verification.
2940         * cgraphbuild.c (compute_call_stmt_bb_frequency): Use
2941         to_cgraph_frequency.
2942         (cgraph_edge::rebuild_edges): Convert to ipa counts.
2943         * cgraphunit.c (init_lowered_empty_function): Do not initialize
2944         frequencies.
2945         (cgraph_node::expand_thunk): Update profile.
2946         * except.c (dw2_build_landing_pads): Do not update frequency.
2947         * final.c (compute_alignments): Use to_frequency.
2948         (dump_basic_block_info): Do not dump frequency.
2949         * gimple-pretty-print.c (dump_profile): Do not dump frequency.
2950         (dump_gimple_bb_header): Do not dump frequency.
2951         * gimple-ssa-isolate-paths.c (isolate_path): Do not update frequency;
2952         do update count.
2953         * gimple-streamer-in.c (input_bb): Do not stream frequency.
2954         * gimple-streamer-out.c (output_bb): Do not stream frequency.
2955         * haifa-sched.c (sched_pressure_start_bb): Use to_freuqency.
2956         (init_before_recovery): Do not update frequency.
2957         (sched_create_recovery_edges): Do not update frequency.
2958         * hsa-gen.c (convert_switch_statements): Do not update frequency.
2959         * ipa-cp.c (ipcp_propagate_stage): Update search for max_count.
2960         (ipa_cp_c_finalize): Set max_count to uninitialized.
2961         * ipa-fnsummary.c (get_minimal_bb): Use counts.
2962         (param_change_prob): Use counts.
2963         * ipa-profile.c (ipa_profile_generate_summary): Do not summarize
2964         local profiles.
2965         * ipa-split.c (consider_split): Use to_frequency.
2966         (split_function): Use to_frequency.
2967         * ira-build.c (loop_compare_func): Likewise.
2968         (mark_loops_for_removal): Likewise.
2969         (mark_all_loops_for_removal): Likewise.
2970         * loop-doloop.c (doloop_modify): Do not update frequency.
2971         * loop-unroll.c (unroll_loop_runtime_iterations): Do not update
2972         frequency.
2973         * lto-streamer-in.c (input_function): Update count_max.
2974         * omp-expand.c (expand_omp_taskreg): Update count_max.
2975         * omp-simd-clone.c (simd_clone_adjust): Update profile.
2976         * predict.c (maybe_hot_frequency_p): Use to_frequency.
2977         (maybe_hot_count_p): Use ipa counts only.
2978         (maybe_hot_bb_p): Simplify.
2979         (maybe_hot_edge_p): Simplify.
2980         (probably_never_executed): Do not take frequency argument.
2981         (probably_never_executed_bb_p): Do not pass frequency.
2982         (probably_never_executed_edge_p): Likewise.
2983         (combine_predictions_for_bb): Check that profile is nonzero.
2984         (propagate_freq): Do not set frequency.
2985         (drop_profile): Simplify.
2986         (counts_to_freqs): Simplify.
2987         (expensive_function_p): Use to_frequency.
2988         (propagate_unlikely_bbs_forward): Simplify.
2989         (determine_unlikely_bbs): Simplify.
2990         (estimate_bb_frequencies): Add hack to silence graphite issues.
2991         (compute_function_frequency): Use ipa counts.
2992         (pass_profile::execute): Update.
2993         (rebuild_frequencies): Use counts only.
2994         (force_edge_cold): Use counts only.
2995         * profile-count.c (profile_count::dump): Dump new count types.
2996         (profile_count::differs_from_p): Check compatiblity.
2997         (profile_count::to_frequency): New function.
2998         (profile_count::to_cgraph_frequency): New function.
2999         * profile-count.h (struct function): Declare.
3000         (enum profile_quality): Add profile_guessed_local and
3001         profile_guessed_global0.
3002         (class profile_proability): Decrease number of bits to 29;
3003         update from_reg_br_prob_note and to_reg_br_prob_note.
3004         (class profile_count: Update comment; decrease number of bits
3005         to 61. Check compatibility.
3006         (profile_count::compatible_p): New private member function.
3007         (profile_count::ipa_p): New member function.
3008         (profile_count::operator<): Handle global zero correctly.
3009         (profile_count::operator>): Handle global zero correctly.
3010         (profile_count::operator<=): Handle global zero correctly.
3011         (profile_count::operator>=): Handle global zero correctly.
3012         (profile_count::nonzero_p): New member function.
3013         (profile_count::force_nonzero): New member function.
3014         (profile_count::max): New member function.
3015         (profile_count::apply_scale): Handle IPA scalling.
3016         (profile_count::guessed_local): New member function.
3017         (profile_count::global0): New member function.
3018         (profile_count::ipa): New member function.
3019         (profile_count::to_frequency): Declare.
3020         (profile_count::to_cgraph_frequency): Declare.
3021         * profile.c (OVERLAP_BASE): Delete.
3022         (compute_frequency_overlap): Delete.
3023         (compute_branch_probabilities): Do not use compute_frequency_overlap.
3024         * regs.h (REG_FREQ_FROM_BB): Use to_frequency.
3025         * sched-ebb.c (rank): Use counts only.
3026         * shrink-wrap.c (handle_simple_exit): Use counts only.
3027         (try_shrink_wrapping): Use counts only.
3028         (place_prologue_for_one_component): Use counts only.
3029         * tracer.c (find_best_predecessor): Use to_frequency.
3030         (find_trace): Use to_frequency.
3031         (tail_duplicate): Use to_frequency.
3032         * trans-mem.c (expand_transaction): Do not update frequency.
3033         * tree-call-cdce.c: Do not update frequency.
3034         * tree-cfg.c (gimple_find_sub_bbs): Likewise.
3035         (gimple_merge_blocks): Likewise.
3036         (gimple_split_edge): Likewise.
3037         (gimple_duplicate_sese_region): Likewise.
3038         (gimple_duplicate_sese_tail): Likewise.
3039         (move_sese_region_to_fn): Likewise.
3040         (gimple_account_profile_record): Likewise.
3041         (insert_cond_bb): Likewise.
3042         * tree-complex.c (expand_complex_div_wide): Likewise.
3043         * tree-eh.c (lower_resx): Update profile.
3044         * tree-inline.c (copy_bb): Simplify count scaling; do not scale
3045         frequencies.
3046         (initialize_cfun): Do not initialize frequencies
3047         (freqs_to_counts): Delete.
3048         (copy_cfg_body): Ignore count parameter.
3049         (copy_body): Update.
3050         (expand_call_inline): Update count_max.
3051         (optimize_inline_calls): Update count_max.
3052         (tree_function_versioning): Update count_max.
3053         * tree-ssa-coalesce.c (coalesce_cost_bb): Use to_frequency.
3054         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Do not update
3055         frequency.
3056         * tree-ssa-loop-im.c (execute_sm_if_changed): Use counts only.
3057         * tree-ssa-loop-ivcanon.c (unloop_loops): Do not update freuqency.
3058         (try_peel_loop): Likewise.
3059         * tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Use
3060         to_frequency.
3061         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): Pass -1.
3062         (tree_transform_and_unroll_loop): Do not use frequencies
3063         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations):
3064         Use reliable prediction only.
3065         * tree-ssa-loop-unswitch.c (hoist_guard): Do not use frequencies.
3066         * tree-ssa-sink.c (select_best_block): Use to_frequency.
3067         * tree-ssa-tail-merge.c (replace_block_by): Temporarily disable
3068         probability scaling.
3069         * tree-ssa-threadupdate.c (create_block_for_threading): Do
3070         not update frequency
3071         (any_remaining_duplicated_blocks): Likewise.
3072         (update_profile): Likewise.
3073         (estimated_freqs_path): Delete.
3074         (freqs_to_counts_path): Delete.
3075         (clear_counts_path): Delete.
3076         (ssa_fix_duplicate_block_edges): Likewise.
3077         (duplicate_thread_path): Likewise.
3078         * tree-switch-conversion.c (gen_inbound_check): Use counts.
3079         * tree-tailcall.c (decrease_profile): Do not update frequency.
3080         (eliminate_tail_call): Likewise.
3081         * tree-vect-loop-manip.c (vect_do_peeling): Likewise.
3082         * tree-vect-loop.c (scale_profile_for_vect_loop): Likewise.
3083         (optimize_mask_stores): Likewise.
3084         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
3085         * ubsan.c (ubsan_expand_null_ifn): Update profile.
3086         (ubsan_expand_ptr_ifn): Update profile.
3087         * value-prof.c (gimple_ic): Simplify.
3088         * value-prof.h (gimple_ic): Update prototype.
3089         * ipa-inline-transform.c (inline_transform): Fix scaling conditoins.
3090         * ipa-inline.c (compute_uninlined_call_time): Be sure that
3091         counts are nonzero.
3092         (want_inline_self_recursive_call_p): Likewise.
3093         (resolve_noninline_speculation): Only cummulate defined counts.
3094         (inline_small_functions): Use nonzero_p.
3095         (ipa_inline): Do not access freed node.
3097 2017-11-03  Wilco Dijkstra  <wdijkstr@arm.com>
3099         * config/aarch64/aarch64.c (aarch64_override_options_internal):
3100         Set PARAM_SCHED_PRESSURE_ALGORITHM to SCHED_PRESSURE_MODEL.
3102 2017-11-03  Kito Cheng  <kito.cheng@gmail.com>
3104         * config/riscv/riscv.c (riscv_legitimize_move): Handle
3105         non-legitimate address.
3107 2017-11-03  Segher Boessenkool  <segher@kernel.crashing.org>
3109         * config/rs6000/rs6000.md (*lt0_disi): Delete.
3110         (*lt0_<mode>di, *lt0_<mode>si): New.
3112 2017-11-03  Segher Boessenkool  <segher@kernel.crashing.org>
3114         * config/rs6000/rs6000.md (move_from_CR_ov_bit): Change condition to
3115         TARGET_PAIRED_FLOAT.
3117 2017-11-03  Siddhesh Poyarekar  <siddhesh.poyarekar@linaro.org>
3118             Jim Wilson  <jim.wilson@linaro.org>
3120         * config/aarch64/aarch64-cores.def (saphira): New CPU.
3121         * config/aarch64/aarch64-tune.md: Regenerated.
3122         * doc/invoke.texi (AArch64 Options/-mtune): Add "saphira".
3123         * gcc/config/aarch64/aarch64.c (saphira_tunings): New tuning table.
3125 2017-11-03  Cupertino Miranda  <cmiranda@synopsys.com>
3127         * config/arc/arc.c (arc_save_restore): Corrected CFA note.
3128         (arc_expand_prologue): Restore blink for millicode.
3129         * config/arc/linux.h (LINK_EH_SPEC): Defined.
3131 2017-11-03  Richard Sandiford  <richard.sandiford@linaro.org>
3133         PR target/82809
3134         * config/i386/i386.c (ix86_vector_duplicate_value): Use
3135         gen_vec_duplicate after forcing the scalar into a register.
3137 2017-11-02  Segher Boessenkool  <segher@kernel.crashing.org>
3139         * combine (try_combine): Print the insns input to try_combine to the
3140         dump file.
3142 2017-11-02  Steve Ellcey  <sellcey@cavium.com>
3144         PR target/79868
3145         * config/aarch64/aarch64-c.c (aarch64_pragma_target_parse):
3146         Remove second argument from aarch64_process_target_attr call.
3147         * config/aarch64/aarch64-protos.h (aarch64_process_target_attr):
3148         Ditto.
3149         * config/aarch64/aarch64.c (aarch64_attribute_info): Change
3150         field type.
3151         (aarch64_handle_attr_arch): Remove second argument.
3152         (aarch64_handle_attr_cpu): Ditto.
3153         (aarch64_handle_attr_tune): Ditto.
3154         (aarch64_handle_attr_isa_flags): Ditto.
3155         (aarch64_process_one_target_attr): Ditto.
3156         (aarch64_process_target_attr): Ditto.
3157         (aarch64_option_valid_attribute_p): Remove second argument.
3158         on aarch64_process_target_attr call.
3160 2017-11-02  David Malcolm  <dmalcolm@redhat.com>
3162         * diagnostic.c: Include "selftest-diagnostic.h".
3163         (selftest::assert_location_text): New function.
3164         (selftest::test_diagnostic_get_location_text): New function.
3165         (selftest::diagnostic_c_tests): Call it.
3167 2017-11-02  David Malcolm  <dmalcolm@redhat.com>
3169         * Makefile.in (OBJS-libcommon): Add selftest-diagnostic.o.
3170         * diagnostic-show-locus.c: Include "selftest-diagnostic.h".
3171         (class selftest::test_diagnostic_context): Move to...
3172         * selftest-diagnostic.c: New file.
3173         * selftest-diagnostic.h: New file.
3175 2017-11-02  James Bowman  <james.bowman@ftdichip.com>
3177         * config/ft32/ft32.c (ft32_addr_space_legitimate_address_p): increase
3178         offset range for FT32B.
3179         * config/ft32/ft32.h: option "mcompress" enables relaxation.
3180         * config/ft32/ft32.md: Add TARGET_NOPM.
3181         * config/ft32/ft32.opt: Add mft32b, mcompress, mnopm.
3182         * gcc/doc/invoke.texi: Add mft32b, mcompress, mnopm.
3184 2017-11-02  Wilco Dijkstra  <wdijkstr@arm.com>
3186         * config/aarch64/aarch64.h (MALLOC_ABI_ALIGNMENT): New define.
3188 2017-11-02  Jeff Law  <law@redhat.com>
3190         * gimple-ssa-sprintf.c (sprintf_dom_walker): Remove
3191         virtual keyword on FINAL OVERRIDE members.
3193         * tree-ssa-propagate.h (ssa_propagation_engine): Group
3194         virtuals together.  Add virtual destructor.
3195         (substitute_and_fold_engine): Similarly.
3197 2017-11-02  Jan Hubicka  <hubicka@ucw.cz>
3199         * x86-tune.def (X86_TUNE_USE_INCDEC): Enable for Haswell+.
3201 2017-11-02  Richard Biener  <rguenther@suse.de>
3203         PR tree-optimization/82795
3204         * tree-if-conv.c (predicate_mem_writes): Remove bogus assert.
3206 2017-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3208         * acinclude.m4 (gcc_AC_INITFINI_ARRAY): Don't require
3209         gcc_SUN_LD_VERSION.
3210         (gcc_GAS_CHECK_FEATURE): Remove.
3211         * configure.ac (ld_vers) <*-*-solaris2*>: Move comments from
3212         gcc_AC_INITFINI_ARRAY here.  Update for Solaris 11.4 changes.
3213         * configure: Regenerate.
3215 2017-11-02  Claudiu Zissulescu <claziss@synopsys.com>
3217         * config/arc/arc.c (hwloop_optimize): Account for empty
3218         body loops.
3220 2017-11-02  Richard Biener  <rguenther@suse.de>
3222         PR middle-end/82765
3223         * varasm.c (decode_addr_const): Make offset HOST_WIDE_INT.
3224         Truncate ARRAY_REF index and element size.
3226 2017-11-01  Palmer Dabbelt  <palmer@dabbelt.com>
3228         * doc/invoke.texi (RISC-V Options): Use "@minus{}2 GB", not "-2 GB".
3230 2017-11-01  Jeff Law  <law@redhat.com>
3232         * tree-ssa-ccp.c (ccp_folder): New class derived from
3233         substitute_and_fold_engine.
3234         (ccp_folder::get_value): New member function.
3235         (ccp_folder::fold_stmt): Renamed from ccp_fold_stmt.
3236         (ccp_fold_stmt): Remove prototype.
3237         (ccp_finalize): Call substitute_and_fold from the ccp_class.
3238         * tree-ssa-copy.c (copy_folder): New class derived from
3239         substitute_and_fold_engine.
3240         (copy_folder::get_value): Renamed from get_value.
3241         (fini_copy_prop): Call substitute_and_fold from copy_folder class.
3242         * tree-vrp.c (vrp_folder): New class derived from
3243         substitute_and_fold_engine.
3244         (vrp_folder::fold_stmt): Renamed from vrp_fold_stmt.
3245         (vrp_folder::get_value): New member function.
3246         (vrp_finalize): Call substitute_and_fold from vrp_folder class.
3247         (evrp_dom_walker::before_dom_children): Similarly for replace_uses_in.
3248         * tree-ssa-propagate.h (substitute_and_fold_engine): New class to
3249         provide a class interface to folder/substitute routines.
3250         (ssa_prop_fold_stmt_fn): Remove typedef.
3251         (ssa_prop_get_value_fn): Likewise.
3252         (subsitute_and_fold): Remove prototype.
3253         (replace_uses_in): Likewise.
3254         * tree-ssa-propagate.c (substitute_and_fold_engine::replace_uses_in):
3255         Renamed from replace_uses_in.  Call the virtual member function
3256         (substitute_and_fold_engine::replace_phi_args_in): Similarly.
3257         (substitute_and_fold_dom_walker): Remove initialization of
3258         data member entries for calbacks.  Add substitute_and_fold_engine
3259         member and initialize it.
3260         (substitute_and_fold_dom_walker::before_dom_children0: Use the
3261         member functions for get_value, replace_phi_args_in c
3262         replace_uses_in, and fold_stmt calls.
3263         (substitute_and_fold_engine::substitute_and_fold): Renamed from
3264         substitute_and_fold.  Remove assert.   Update ctor call.
3266         * tree-ssa-propagate.h (ssa_prop_visit_stmt_fn): Remove typedef.
3267         (ssa_prop_visit_phi_fn): Likewise.
3268         (class ssa_propagation_engine): New class to provide an interface
3269         into ssa_propagate.
3270         * tree-ssa-propagate.c (ssa_prop_visit_stmt): Remove file scoped
3271         variable.
3272         (ssa_prop_visit_phi): Likewise.
3273         (ssa_propagation_engine::simulate_stmt): Moved into class.
3274         Call visit_phi/visit_stmt from the class rather than via
3275         file scoped static variables.
3276         (ssa_propagation_engine::simulate_block): Moved into class.
3277         (ssa_propagation_engine::process_ssa_edge_worklist): Similarly.
3278         (ssa_propagation_engine::ssa_propagate): Similarly.  No longer
3279         set file scoped statics for the visit_stmt/visit_phi callbacks.
3280         * tree-complex.c (complex_propagate): New class derived from
3281         ssa_propagation_engine.
3282         (complex_propagate::visit_stmt): Renamed from complex_visit_stmt.
3283         (complex_propagate::visit_phi): Renamed from complex_visit_phi.
3284         (tree_lower_complex): Call ssa_propagate via the complex_propagate
3285         class.
3286         * tree-ssa-ccp.c: (ccp_propagate): New class derived from
3287         ssa_propagation_engine.
3288         (ccp_propagate::visit_phi): Renamed from ccp_visit_phi_node.
3289         (ccp_propagate::visit_stmt): Renamed from ccp_visit_stmt.
3290         (do_ssa_ccp): Call ssa_propagate from the ccp_propagate class.
3291         * tree-ssa-copy.c (copy_prop): New class derived from
3292         ssa_propagation_engine.
3293         (copy_prop::visit_stmt): Renamed from copy_prop_visit_stmt.
3294         (copy_prop::visit_phi): Renamed from copy_prop_visit_phi_node.
3295         (execute_copy_prop): Call ssa_propagate from the copy_prop class.
3296         * tree-vrp.c (vrp_prop): New class derived from ssa_propagation_engine.
3297         (vrp_prop::visit_stmt): Renamed from vrp_visit_stmt.
3298         (vrp_prop::visit_phi): Renamed from vrp_visit_phi_node.
3299         (execute_vrp): Call ssa_propagate from the vrp_prop class.
3301 2017-11-01  Jakub Jelinek  <jakub@redhat.com>
3303         PR rtl-optimization/82778
3304         PR rtl-optimization/82597
3305         * compare-elim.c (struct comparison): Add in_a_setter field.
3306         (find_comparison_dom_walker::before_dom_children): Remove killed
3307         bitmap and df_simulate_find_defs call, instead walk the defs.
3308         Compute last_setter and initialize in_a_setter.  Merge definitions
3309         with first initialization for a few variables.
3310         (try_validate_parallel): Use insn_invalid_p instead of
3311         recog_memoized.  Return insn rather than just the pattern.
3312         (try_merge_compare): Fix up comment.  Don't uselessly test if
3313         in_a is a REG_P.  Use cmp->in_a_setter instead of walking UD
3314         chains.
3315         (execute_compare_elim_after_reload): Remove df_chain_add_problem
3316         call.
3318 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3319             Alan Hayward  <alan.hayward@arm.com>
3320             David Sherwood  <david.sherwood@arm.com>
3322         * config/aarch64/aarch64.c (aarch64_rtx_costs): Use
3323         aarch64_hard_regno_nregs to get the number of registers
3324         in a mode.
3326 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3327             Alan Hayward  <alan.hayward@arm.com>
3328             David Sherwood  <david.sherwood@arm.com>
3330         * config/aarch64/constraints.md (Upl): Rename to...
3331         (Uaa): ...this.
3332         * config/aarch64/aarch64.md
3333         (*zero_extend<SHORT:mode><GPI:mode>2_aarch64, *addsi3_aarch64_uxtw):
3334         Update accordingly.
3336 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3337             Alan Hayward  <alan.hayward@arm.com>
3338             David Sherwood  <david.sherwood@arm.com>
3340         * config/aarch64/aarch64.c (aarch64_add_constant_internal)
3341         (aarch64_add_constant, aarch64_add_sp, aarch64_sub_sp): Move
3342         earlier in file.
3344 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3345             Alan Hayward  <alan.hayward@arm.com>
3346             David Sherwood  <david.sherwood@arm.com>
3348         * config/aarch64/aarch64.c (aarch64_evpc_trn, aarch64_evpc_uzp)
3349         (aarch64_evpc_zip, aarch64_evpc_ext, aarch64_evpc_rev)
3350         (aarch64_evpc_dup): Generate rtl direcly, rather than using
3351         named expanders.
3352         (aarch64_expand_vec_perm_const_1): Explicitly check for permutes
3353         of a single element.
3354         * config/aarch64/iterators.md: Add a comment above the permute
3355         unspecs to say that they are generated directly by
3356         aarch64_expand_vec_perm_const.
3357         * config/aarch64/aarch64-simd.md: Likewise the permute instructions.
3359 2017-11-01  Nathan Sidwell  <nathan@acm.org>
3361         * tree-dump.c (dequeue_and_dump): Use HAS_DECL_ASSEMBLER_NAME_P.
3363 2017-11-01  Palmer Dabbelt  <palmer@dabbelt.com>
3365         * doc/invoke.texi (RISC-V Options): Explicitly name the medlow
3366         and medany code models, and describe what they do.
3368 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3370         Revert accidental duplicate:
3372         * combine.c (can_change_dest_mode): Reject changes in
3373         REGMODE_NATURAL_SIZE.
3375 2017-11-01  Segher Boessenkool  <segher@kernel.crashing.org>
3377         PR rtl-optimization/64682
3378         PR rtl-optimization/69567
3379         PR rtl-optimization/69737
3380         PR rtl-optimization/82683
3381         * combine.c (distribute_notes) <REG_DEAD>: If the new I2 sets the same
3382         register mentioned in the note, drop the note, unless it came from I3,
3383         in which case it should go to I3 again.
3385 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3387         * tree-ssa-dse.c (normalize_ref): Check whether the ranges overlap
3388         and return false if not.
3389         (clear_bytes_written_by, live_bytes_read): Update accordingly.
3391 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3393         * tree-ssa-alias.h (ranges_overlap_p): Return false if either
3394         range is known to be empty.
3396 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3397             Alan Hayward  <alan.hayward@arm.com>
3398             David Sherwood  <david.sherwood@arm.com>
3400         * simplify-rtx.c (simplify_const_unary_operation): Use GET_MODE_NUNITS
3401         and CONST_VECTOR_NUNITS instead of computing the number of units from
3402         the byte sizes of the vector and element.
3403         (simplify_binary_operation_1): Likewise.
3404         (simplify_const_binary_operation): Likewise.
3405         (simplify_ternary_operation): Likewise.
3407 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3408             Alan Hayward  <alan.hayward@arm.com>
3409             David Sherwood  <david.sherwood@arm.com>
3411         * var-tracking.c (INT_MEM_OFFSET): Replace with...
3412         (int_mem_offset): ...this new function.
3413         (var_mem_set, var_mem_delete_and_set, var_mem_delete)
3414         (find_mem_expr_in_1pdv, dataflow_set_preserve_mem_locs)
3415         (same_variable_part_p, use_type, add_stores, vt_get_decl_and_offset):
3416         Update accordingly.
3418 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3419             Alan Hayward  <alan.hayward@arm.com>
3420             David Sherwood  <david.sherwood@arm.com>
3422         * lower-subreg.c (interesting_mode_p): New function.
3423         (compute_costs, find_decomposable_subregs, decompose_register)
3424         (simplify_subreg_concatn, can_decompose_p, resolve_simple_move)
3425         (resolve_clobber, dump_choices): Use it.
3427 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3428             Alan Hayward  <alan.hayward@arm.com>
3429             David Sherwood  <david.sherwood@arm.com>
3431         * rtlhash.c (add_rtx): Use add_hwi for 'w' and add_int for 'i'.
3433 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3434             Alan Hayward  <alan.hayward@arm.com>
3435             David Sherwood  <david.sherwood@arm.com>
3437         * alias.c (find_base_value, find_base_term): Only process integer
3438         truncations.  Check the precision rather than the size.
3440 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3441             Alan Hayward  <alan.hayward@arm.com>
3442             David Sherwood  <david.sherwood@arm.com>
3444         * machmode.h (is_narrower_int_mode): New function
3445         * optabs.c (expand_float, expand_fix): Use it.
3446         * dwarf2out.c (rotate_loc_descriptor): Likewise.
3448 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3449             Alan Hayward  <alan.hayward@arm.com>
3450             David Sherwood  <david.sherwood@arm.com>
3452         * rtl.h (narrower_subreg_mode): New function.
3453         * ira-color.c (update_costs_from_allocno): Use it.
3455 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3456             Alan Hayward  <alan.hayward@arm.com>
3457             David Sherwood  <david.sherwood@arm.com>
3459         * optabs-query.h (convert_optab_p): New function, split out from...
3460         (convert_optab_handler): ...here.
3461         (widening_optab_handler): Delete.
3462         (find_widening_optab_handler): Remove permit_non_widening parameter.
3463         (find_widening_optab_handler_and_mode): Likewise.  Provide an
3464         override that operates on mode class wrappers.
3465         * optabs-query.c (widening_optab_handler): Delete.
3466         (find_widening_optab_handler_and_mode): Remove permit_non_widening
3467         parameter.  Assert that the two modes are the same class and that
3468         the "from" mode is narrower than the "to" mode.  Use
3469         convert_optab_handler instead of widening_optab_handler.
3470         * expmed.c (expmed_mult_highpart_optab): Use convert_optab_handler
3471         instead of widening_optab_handler.
3472         * expr.c (expand_expr_real_2): Update calls to
3473         find_widening_optab_handler.
3474         * optabs.c (expand_widen_pattern_expr): Likewise.
3475         (expand_binop_directly): Take the insn_code as a parameter.
3476         (expand_binop): Only call find_widening_optab_handler for
3477         conversion optabs; use optab_handler otherwise.  Update calls
3478         to find_widening_optab_handler and expand_binop_directly.
3479         Use convert_optab_handler instead of widening_optab_handler.
3480         * tree-ssa-math-opts.c (convert_mult_to_widen): Update calls to
3481         find_widening_optab_handler and use scalar_mode rather than
3482         machine_mode.
3483         (convert_plusminus_to_widen): Likewise.
3485 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3486             Alan Hayward  <alan.hayward@arm.com>
3487             David Sherwood  <david.sherwood@arm.com>
3489         * machmode.h (fixed_size_mode): New class.
3490         * rtl.h (get_pool_mode): Return fixed_size_mode.
3491         * gengtype.c (main): Add fixed_size_mode.
3492         * target.def (get_raw_result_mode): Return a fixed_size_mode.
3493         (get_raw_arg_mode): Likewise.
3494         * doc/tm.texi: Regenerate.
3495         * targhooks.h (default_get_reg_raw_mode): Return a fixed_size_mode.
3496         * targhooks.c (default_get_reg_raw_mode): Likewise.
3497         * config/ia64/ia64.c (ia64_get_reg_raw_mode): Likewise.
3498         * config/mips/mips.c (mips_get_reg_raw_mode): Likewise.
3499         * config/msp430/msp430.c (msp430_get_raw_arg_mode): Likewise.
3500         (msp430_get_raw_result_mode): Likewise.
3501         * config/avr/avr-protos.h (regmask): Use as_a <fixed_side_mode>
3502         * dbxout.c (dbxout_parms): Require fixed-size modes.
3503         * expr.c (copy_blkmode_from_reg, copy_blkmode_to_reg): Likewise.
3504         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Likewise.
3505         * omp-low.c (lower_oacc_reductions): Likewise.
3506         * simplify-rtx.c (simplify_immed_subreg): Take fixed_size_modes.
3507         (simplify_subreg): Update accordingly.
3508         * varasm.c (constant_descriptor_rtx::mode): Change to fixed_size_mode.
3509         (force_const_mem): Update accordingly.  Return NULL_RTX for modes
3510         that aren't fixed-size.
3511         (get_pool_mode): Return a fixed_size_mode.
3512         (output_constant_pool_2): Take a fixed_size_mode.
3514 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3515             Alan Hayward  <alan.hayward@arm.com>
3516             David Sherwood  <david.sherwood@arm.com>
3518         * doc/rtl.texi (vec_series): Document.
3519         (const): Say that the operand can be a vec_series.
3520         * rtl.def (VEC_SERIES): New rtx code.
3521         * rtl.h (const_vec_series_p_1): Declare.
3522         (const_vec_series_p): New function.
3523         * emit-rtl.h (gen_const_vec_series): Declare.
3524         (gen_vec_series): Likewise.
3525         * emit-rtl.c (const_vec_series_p_1, gen_const_vec_series)
3526         (gen_vec_series): Likewise.
3527         * optabs.c (expand_mult_highpart): Use gen_const_vec_series.
3528         * simplify-rtx.c (simplify_unary_operation): Handle negations
3529         of vector series.
3530         (simplify_binary_operation_series): New function.
3531         (simplify_binary_operation_1): Use it.  Handle VEC_SERIES.
3532         (test_vector_ops_series): New function.
3533         (test_vector_ops): Call it.
3534         * config/powerpcspe/altivec.md (altivec_lvsl): Use
3535         gen_const_vec_series.
3536         (altivec_lvsr): Likewise.
3537         * config/rs6000/altivec.md (altivec_lvsl, altivec_lvsr): Likewise.
3539 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3540             Alan Hayward  <alan.hayward@arm.com>
3541             David Sherwood  <david.sherwood@arm.com>
3543         * doc/rtl.texi (const): Update description of address constants.
3544         Say that vector constants are allowed too.
3545         * common.md (E, F): Use CONSTANT_P instead of checking for
3546         CONST_VECTOR.
3547         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
3548         checking for CONST_VECTOR.
3549         * expmed.c (make_tree): Use build_vector_from_val for a CONST
3550         VEC_DUPLICATE.
3551         * expr.c (expand_expr_real_2): Check for vector modes instead
3552         of checking for CONST_VECTOR.
3553         * rtl.h (const_vec_p): New function.
3554         (const_vec_duplicate_p): Check for a CONST VEC_DUPLICATE.
3555         (unwrap_const_vec_duplicate): Handle them here too.
3557 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3558             David Malcolm  <dmalcolm@redhat.com>
3559             Alan Hayward  <alan.hayward@arm.com>
3560             David Sherwood  <david.sherwood@arm.com>
3562         * rtl.h (vec_duplicate_p): New function.
3563         * selftest-rtl.c (assert_rtx_eq_at): New function.
3564         * selftest-rtl.h (ASSERT_RTX_EQ): New macro.
3565         (assert_rtx_eq_at): Declare.
3566         * selftest.h (selftest::simplify_rtx_c_tests): Declare.
3567         * selftest-run-tests.c (selftest::run_tests): Call it.
3568         * simplify-rtx.c: Include selftest.h and selftest-rtl.h.
3569         (simplify_unary_operation_1): Recursively handle vector duplicates.
3570         (simplify_binary_operation_1): Likewise.  Handle VEC_SELECTs of
3571         vector duplicates.
3572         (simplify_subreg): Handle subregs of vector duplicates.
3573         (make_test_reg, test_vector_ops_duplicate, test_vector_ops)
3574         (selftest::simplify_rtx_c_tests): New functions.
3576 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3577             Alan Hayward  <alan.hayward@arm.com>
3578             David Sherwood  <david.sherwood@arm.com>
3580         * emit-rtl.h (gen_const_vec_duplicate): Declare.
3581         (gen_vec_duplicate): Likewise.
3582         * emit-rtl.c (gen_const_vec_duplicate_1): New function, split
3583         out from...
3584         (gen_const_vector): ...here.
3585         (gen_const_vec_duplicate, gen_vec_duplicate): New functions.
3586         (gen_rtx_CONST_VECTOR): Use gen_const_vec_duplicate for constants
3587         whose elements are all equal.
3588         * optabs.c (expand_vector_broadcast): Use gen_const_vec_duplicate.
3589         * simplify-rtx.c (simplify_const_unary_operation): Likewise.
3590         (simplify_relational_operation): Likewise.
3591         * config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup):
3592         Likewise.
3593         (aarch64_simd_dup_constant): Use gen_vec_duplicate.
3594         (aarch64_expand_vector_init): Likewise.
3595         * config/arm/arm.c (neon_vdup_constant): Likewise.
3596         (neon_expand_vector_init): Likewise.
3597         (arm_expand_vec_perm): Use gen_const_vec_duplicate.
3598         (arm_block_set_unaligned_vect): Likewise.
3599         (arm_block_set_aligned_vect): Likewise.
3600         * config/arm/neon.md (neon_copysignf<mode>): Likewise.
3601         * config/i386/i386.c (ix86_expand_vec_perm): Likewise.
3602         (expand_vec_perm_even_odd_pack): Likewise.
3603         (ix86_vector_duplicate_value): Use gen_vec_duplicate.
3604         * config/i386/sse.md (one_cmpl<mode>2): Use CONSTM1_RTX.
3605         * config/ia64/ia64.c (ia64_expand_vecint_compare): Use
3606         gen_const_vec_duplicate.
3607         * config/ia64/vect.md (addv2sf3, subv2sf3): Use CONST1_RTX.
3608         * config/mips/mips.c (mips_gen_const_int_vector): Use
3609         gen_const_vec_duplicate.
3610         (mips_expand_vector_init): Use CONST0_RTX.
3611         * config/powerpcspe/altivec.md (abs<mode>2, nabs<mode>2): Likewise.
3612         (define_split): Use gen_const_vec_duplicate.
3613         * config/rs6000/altivec.md (abs<mode>2, nabs<mode>2): Use CONST0_RTX.
3614         (define_split): Use gen_const_vec_duplicate.
3615         * config/s390/vx-builtins.md (vec_genmask<mode>): Likewise.
3616         (vec_ctd_s64, vec_ctd_u64, vec_ctsl, vec_ctul): Likewise.
3617         * config/spu/spu.c (spu_const): Likewise.
3619 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3620             Alan Hayward  <alan.hayward@arm.com>
3621             David Sherwood  <david.sherwood@arm.com>
3623         * combine.c (can_change_dest_mode): Reject changes in
3624         REGMODE_NATURAL_SIZE.
3626 2017-10-31  Sandra Loosemore  <sandra@codesourcery.com>
3628         * configure.ac (--enable-libssp): New.
3629         (gcc_cv_libc_provides_ssp): Check for explicit setting before
3630         trying to determine target-specific default.  Adjust indentation.
3631         * configure: Regenerated.
3632         * doc/install.texi (Configuration): Expand --disable-libssp
3633         documentation.
3635 2017-10-31  Daniel Santos  <daniel.santos@pobox.com>
3637         config/i386/i386.c (ix86_expand_epilogue): Correct stack
3638         calculation.
3640 2017-10-31  Martin Jambor  <mjambor@suse.cz>
3642         PR c++/81702
3643         * gimple-fold.c (gimple_get_virt_method_for_vtable): Remove assert.
3645 2017-10-31  David Malcolm  <dmalcolm@redhat.com>
3647         * auto-profile.c (autofdo_source_profile::read): Use
3648         UNKNOWN_LOCATION rather than 0.
3649         * diagnostic-core.h (warning_at_rich_loc): Rename to...
3650         (warning_at): ...this overload.
3651         (warning_at_rich_loc_n): Rename to...
3652         (warning_n): ...this overload.
3653         (error_at_rich_loc): Rename to...
3654         (error_at): ...this overload.
3655         (pedwarn_at_rich_loc): Rename to...
3656         (pedwarn): ...this overload.
3657         (permerror_at_rich_loc): Rename to...
3658         (permerror): ...this overload.
3659         (inform_at_rich_loc): Rename to...
3660         (inform): ...this overload.
3661         * diagnostic.c: (diagnostic_n_impl): Delete location_t-based decl.
3662         (diagnostic_n_impl_richloc): Rename to...
3663         (diagnostic_n_impl): ...this rich_location *-based decl.
3664         (inform_at_rich_loc): Rename to...
3665         (inform): ...this, and add an assertion.
3666         (inform_n): Update for removal of location_t-based diagnostic_n_impl.
3667         (warning_at_rich_loc): Rename to...
3668         (warning_at): ...this, and add an assertion.
3669         (warning_at_rich_loc_n): Rename to...
3670         (warning_n): ...this, and add an assertion.
3671         (warning_n): Update location_t-based implementation for removal of
3672         location_t-based diagnostic_n_impl.
3673         (pedwarn_at_rich_loc): Rename to...
3674         (pedwarn): ...this, and add an assertion.
3675         (permerror_at_rich_loc): Rename to...
3676         (permerror): ...this, and add an assertion.
3677         (error_n): Update for removal of location_t-based diagnostic_n_impl.
3678         (error_at_rich_loc): Rename to...
3679         (error_at): ...this, and add an assertion.
3680         * gcc.c (do_spec_1): Use UNKNOWN_LOCATION rather than 0.
3681         (driver::do_spec_on_infiles): Likewise.
3682         * substring-locations.c (format_warning_va): Update for renaming
3683         of inform_at_rich_loc.
3685 2017-10-31  Michael Meissner  <meissner@linux.vnet.ibm.com>
3687         * builtins.def (DEF_FLOATN_BUILTIN): Change most _Float<N> and
3688         _Float<N>X built-in functions so that the variant without the
3689         "__builtin_" prefix is only enabled for the GNU C and Objective C
3690         languages when they are in non-strict ANSI/ISO mode.
3691         (DEF_EXT_LIB_FLOATN_NX_BUILTINS): Likewise.
3692         * target.def (floatn_builtin_p): Add a target hook to control
3693         whether _Float<N> and _Float<N>X built-in functions without the
3694         "__builtin_" prefix are enabled, and return true for C and
3695         Objective C in the default hook.  Include langhooks.h in
3696         targhooks.c.
3697         * targhooks.h (default_floatn_builtin_p): Likewise.
3698         * targhooks.c (default_floatn_builtin_p): Likewise.
3699         * doc/tm.texi.in (TARGET_FLOATN_BUILTIN_P): Document the
3700         floatn_builtin_p target hook.
3701         * doc/tm.texi (TARGET_FLOATN_BUILTIN_P): Likewise.
3703 2017-10-31  Matthew Fortune  <matthew.fortune@imgtec.com>
3704             Eric Botcazou  <ebotcazou@adacore.com>
3706         PR rtl-optimization/81803
3707         * lra-constraints.c (curr_insn_transform): Also reload the whole
3708         register for a strict subreg no wider than a word if this is for
3709         a WORD_REGISTER_OPERATIONS target.
3711 2017-10-31  Jason Merrill  <jason@redhat.com>
3713         * gdbinit.in: Skip over inlines from timevar.h.
3715 2017-10-31  Martin Liska  <mliska@suse.cz>
3717         * doc/gcov.texi: Document new option.
3718         * gcov.c (print_usage): Likewise print it.
3719         (process_args): Support the argument.
3720         (format_count): New function.
3721         (format_gcov): Use the function.
3723 2017-10-31  Martin Liska  <mliska@suse.cz>
3725         * gcov.c (struct name_map): do not use typedef.
3726         Define operator== and operator<.
3727         (name_search): Remove.
3728         (name_sort): Remove.
3729         (main): Do not allocate names.
3730         (process_file): Add vertical space.
3731         (generate_results): Use std::find.
3732         (release_structures): Do not release memory.
3733         (find_source): Use std::find.
3735 2017-10-31  Martin Liska  <mliska@suse.cz>
3737         * gcov.c (struct line_info): Remove it's typedef.
3738         (line_info::line_info): Add proper ctor.
3739         (line_info::has_block): Do not use a typedef.
3740         (struct source_info): Do not use typedef.
3741         (circuit): Likewise.
3742         (get_cycles_count): Likewise.
3743         (output_intermediate_file): Iterate via vector iterator.
3744         (add_line_counts): Use std::vector methods.
3745         (accumulate_line_counts): Likewise.
3746         (output_lines): Likewise.
3748 2017-10-31  Martin Liska  <mliska@suse.cz>
3750         * gcov.c (struct source_info): Remove typedef.
3751         (source_info::source_info): Add proper ctor.
3752         (accumulate_line_counts): Use struct, not it's typedef.
3753         (output_gcov_file): Likewise.
3754         (output_lines): Likewise.
3755         (main): Do not allocate an array.
3756         (output_intermediate_file): Use size of vector container.
3757         (process_file): Resize the vector.
3758         (generate_results): Do not preallocate, use newly added vector
3759         lines.
3760         (release_structures): Do not release sources.
3761         (find_source): Use vector methods.
3762         (add_line_counts): Do not use typedef.
3764 2017-10-31  Martin Liska  <mliska@suse.cz>
3766         * doc/gcov.texi: Document that.
3767         * gcov.c (add_line_counts): Mark lines with a non-executed
3768         statement.
3769         (output_line_beginning): Handle such lines.
3770         (output_lines): Pass new argument.
3771         (output_intermediate_file): Print it in intermediate format.
3773 2017-10-31  Martin Liska  <mliska@suse.cz>
3775         * color-macros.h: New file.
3776         * diagnostic-color.c: Factor out color related to macros to
3777         color-macros.h.
3778         * doc/gcov.texi: Document -k option.
3779         * gcov.c (INCLUDE_STRING): Include string.h.
3780         (print_usage): Add -k option.
3781         (process_args): Parse it.
3782         (pad_count_string): New function.
3783         (output_line_beginning): Likewise.
3784         (DEFAULT_LINE_START): New macro.
3785         (output_lines): Support color output.
3787 2017-10-31  Martin Liska  <mliska@suse.cz>
3789         PR gcov-profile/82633
3790         * doc/gcov.texi: Document -fkeep-{static,inline}-functions and
3791         their interaction with GCOV infrastructure.
3792         * configure.ac: Add -fkeep-{inline,static}-functions to
3793         coverage_flags.
3794         * configure: Regenerate.
3796 2017-10-31  Uros Bizjak  <ubizjak@gmail.com>
3798         PR target/82772
3799         * config/alpha/sync.md (fetchop_constr) <and>: Change to "rINM".
3801 2017-10-31  Segher Boessenkool  <segher@kernel.crashing.org>
3803         PR target/82674
3804         * config/rs6000/rs6000.md (allocate_stack): Force update interval
3805         into a register if it does not fit into an immediate offset field.
3807 2017-10-31  Olivier Hainque  <hainque@adacore.com>
3809         * gcc/Makefile.in (FLAGS_TO_PASS): Pass libsubdir as well.
3811 2017-10-31  Julia Koval  <julia.koval@intel.com>
3813         * config.gcc: Add gfniintrin.h.
3814         * config/i386/gfniintrin.h: New.
3815         * config/i386/i386-builtin-types.def
3816         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
3817         __builtin_ia32_vgf2p8affineinvqb_v64qi_mask,
3818         __builtin_ia32_vgf2p8affineinvqb_v32qi,
3819         __builtin_ia32_vgf2p8affineinvqb_v32qi_mask,
3820         __builtin_ia32_vgf2p8affineinvqb_v16qi,
3821         __builtin_ia32_vgf2p8affineinvqb_v16qi_mask): New builtins.
3822         * config/i386/i386-builtin.def (V64QI_FTYPE_V64QI_V64QI_INT_V64QI_UDI,
3823         V32QI_FTYPE_V32QI_V32QI_INT_V32QI_USI,
3824         V16QI_FTYPE_V16QI_V16QI_INT_V16QI_UHI,
3825         V64QI_FTYPE_V64QI_V64QI_INT): New types.
3826         * config/i386/i386.c (ix86_expand_args_builtin): Handle new types.
3827         * config/i386/immintrin.h: Include gfniintrin.h.
3828         * config/i386/sse.md (vgf2p8affineinvqb_*) New pattern.
3830 2017-10-30  Eric Botcazou  <ebotcazou@adacore.com>
3832         * gcc.c (HAVE_TARGET_EXECUTABLE_SUFFIX): Remove old kludge.
3834 2017-10-30  Wilco Dijkstra  <wdijkstr@arm.com>
3836         * config/arm/arm.md (ashldi3): Remove shift by 1 expansion.
3837         (arm_ashldi3_1bit): Remove pattern.
3838         (ashrdi3): Remove shift by 1 expansion.
3839         (arm_ashrdi3_1bit): Remove pattern.
3840         (lshrdi3): Remove shift by 1 expansion.
3841         (arm_lshrdi3_1bit): Remove pattern.
3842         * config/arm/arm.c (arm_rtx_costs_internal): Slightly increase
3843         cost of ashldi3 by 1.
3844         * config/arm/neon.md (ashldi3_neon): Remove shift by 1 expansion.
3845         (<shift>di3_neon): Likewise.
3847 2017-10-30  Dominik Infuehr  <dominik.infuehr@theobroma-systems.com>
3849         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov): Rename
3850         both identically named patterns to (*aarch64_simd_mov<VD:mode>)
3851         and (*aarch64_simd_mov<VQ:mode>).
3852         (*aarch64_simd_mov<VD:mode>): Change type attribute to match
3853         pattern alternative.
3854         (*aarch64_simd_mov<VQ:mode>): Re-order and change type
3855         attributes to match pattern alternative.
3857 2017-10-30  Steven Munroe  <munroesj@gcc.gnu.org>
3859         * config.gcc (powerpc*-*-*): Add emmintrin.h.
3860         * config/rs6000/emmintrin.h: New file.
3861         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include emmintrin.h.
3863 2017-10-30  Wilco Dijkstra  <wdijkstr@arm.com>
3865         * config/arm/vfp.md (movdi_vfp): Merge changes from movdi_vfp_cortexa8.
3866         * (movdi_vfp_cortexa8): Remove pattern.
3868 2017-10-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3870         * doc/install.texi (Specific, alpha*-*-*): Remove DEC OSF/1
3871         etc. reference.
3872         (Specific, alpha*-dec-osf5.1): Remove.
3873         (Specific, mips-sgi-irix5): Remove.
3874         (Specific, mips-sgi-irix6): Remove.
3876 2017-10-30  Jakub Jelinek  <jakub@redhat.com>
3878         PR middle-end/22141
3879         * gimple-ssa-store-merging.c (merged_store_group::apply_stores): Fix
3880         arguments to clear_bit_region_be.
3882 2017-10-30  Jim Wilson  <wilson@tuliptree.org>
3884         * gimplify.c: Include memmodel.h.
3886 2017-10-30  Martin Jambor  <mjambor@suse.cz>
3888         * omp-grid.c (grid_attempt_target_gridification): Also insert a
3889         condition whether loop should be executed at all.
3891 2017-10-30  Will Schmidt  <will_schmidt@vnet.ibm.com>
3893         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
3894         gimple folding of vec_madd() intrinsics.
3895         * config/rs6000/altivec.md (mulv8hi3): Rename altivec_vmladduhm to
3896         fmav8hi4.  (altivec_vmladduhm): Rename to fmav8hi4.
3897         * config/rs6000/rs6000-builtin.def: Rename vmladduhm to fmav8hi4
3899 2017-10-30  Richard Biener  <rguenther@suse.de>
3901         PR tree-optimization/82762
3902         Revert
3903         2017-10-23  Richard Biener  <rguenther@suse.de>
3905         PR tree-optimization/82129
3906         Revert
3907         2017-08-01  Richard Biener  <rguenther@suse.de>
3909         PR tree-optimization/81181
3910         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
3911         (compute_antic): ... end of iteration here.
3913 2017-10-30  Joseph Myers  <joseph@codesourcery.com>
3915         * doc/invoke.texi (C Dialect Options): Document -std=c17,
3916         -std=iso9899:2017 and -std=gnu17.
3917         * doc/standards.texi (C Language): Document C17 support.
3918         * doc/cpp.texi (Overview): Mention -std=c17.
3919         (Standard Predefined Macros): Document C11 and C17 values of
3920         __STDC_VERSION__.  Do not refer to C99 support as incomplete.
3921         * doc/extend.texi (Inline): Do not list individual options for
3922         standards newer than C99.
3923         * dwarf2out.c (highest_c_language, gen_compile_unit_die): Handle
3924         "GNU C17".
3925         * config/rl78/rl78.c (rl78_option_override): Handle "GNU C17"
3926         language name.
3928 2017-10-30  Maxim Ostapenko  <m.ostapenko@samsung.com>
3930         * asan.c (asan_finish_file): Align asan globals array by shadow
3931         granularity.
3933 2017-10-30  Jakub Jelinek  <jakub@redhat.com>
3935         PR middle-end/22141
3936         * gimple-ssa-store-merging.c: Include rtl.h and expr.h.
3937         (struct store_immediate_info): Add bitregion_start and bitregion_end
3938         fields.
3939         (store_immediate_info::store_immediate_info): Add brs and bre
3940         arguments and initialize bitregion_{start,end} from those.
3941         (struct merged_store_group): Add bitregion_start, bitregion_end,
3942         align_base and mask fields.  Drop unnecessary struct keyword from
3943         struct store_immediate_info.  Add do_merge method.
3944         (clear_bit_region_be): Use memset instead of loop storing zeros.
3945         (merged_store_group::do_merge): New method.
3946         (merged_store_group::merge_into): Use do_merge.  Allow gaps in between
3947         stores as long as the surrounding bitregions have no gaps.
3948         (merged_store_group::merge_overlapping): Use do_merge.
3949         (merged_store_group::apply_stores): Test that bitregion_{start,end}
3950         is byte aligned, rather than requiring that start and width are
3951         byte aligned.  Drop unnecessary struct keyword from
3952         struct store_immediate_info.  Allocate and populate also mask array.
3953         Make start of the arrays relative to bitregion_start rather than
3954         start and size them according to bitregion_{end,start} difference.
3955         (struct imm_store_chain_info): Drop unnecessary struct keyword from
3956         struct store_immediate_info.
3957         (pass_store_merging::gate): Punt if BITS_PER_UNIT or CHAR_BIT is not 8.
3958         (pass_store_merging::terminate_all_aliasing_chains): Drop unnecessary
3959         struct keyword from struct store_immediate_info.
3960         (imm_store_chain_info::coalesce_immediate_stores): Allow gaps in
3961         between stores as long as the surrounding bitregions have no gaps.
3962         Formatting fixes.
3963         (struct split_store): Add orig non-static data member.
3964         (split_store::split_store): Initialize orig to false.
3965         (find_constituent_stmts): Return store_immediate_info *, non-NULL
3966         if there is exactly a single original stmt.  Change stmts argument
3967         to pointer from reference, if NULL, don't push anything to it.  Add
3968         first argument, use it to optimize skipping over orig stmts that
3969         are known to be before bitpos already.  Simplify.
3970         (split_group): Return unsigned int count how many stores are or
3971         would be needed rather than a bool.  Add allow_unaligned argument.
3972         Change split_stores argument from reference to pointer, if NULL,
3973         only do a dry run computing how many stores would be produced.
3974         Rewritten algorithm to use both alignment and misalign if
3975         !allow_unaligned and handle bitfield stores with gaps.
3976         (imm_store_chain_info::output_merged_store): Set start_byte_pos
3977         from bitregion_start instead of start.  Compute allow_unaligned
3978         here, if true, do 2 split_group dry runs to compute which one
3979         produces fewer stores and prefer aligned if equal.  Punt if
3980         new count is bigger or equal than original before emitting any
3981         statements, rather than during that.  Remove no longer needed
3982         new_ssa_names tracking.  Replace num_stmts with
3983         split_stores.length ().  Use 32-bit stack allocated entries
3984         in split_stores auto_vec.  Try to reuse original store lhs/rhs1
3985         if possible.  Handle bitfields with gaps.
3986         (pass_store_merging::execute): Ignore bitsize == 0 stores.
3987         Compute bitregion_{start,end} for the stores and construct
3988         store_immediate_info with that.  Formatting fixes.
3990 2017-10-30  Uros Bizjak  <ubizjak@gmail.com>
3992         PR target/82725
3993         * config/i386/i386.c (legitimate_pic_address_disp_p): Allow
3994         UNSPEC_DTPOFF and UNSPEC_NTPOFF with SImode immediate offset.
3996 2017-10-29  Jim Wilson  <wilson@tuliptree.org>
3998         * gimplify.c: Include tm_p.h.
4000         * common.opt (gcoff): Re-add as ignored option.
4001         (gcoff1, gcoff2, gcoff3): Likewise.
4003         * Makefile.in (OBJS): Delete sdbout.o.
4004         (GTFILES): Delete $(srcdir)/sdbout.c.
4005         * debug.h: Delete sdb_debug_hooks.
4006         * final.c: Delete sdbout.h include.
4007         (final_scan_insn): Delete SDB_DEBUG check.
4008         (rest_of_clean_state): Likewise.
4009         * output.h: Delete sdb_begin_function_line.
4010         * sdbout.c: Delete.
4011         * sdbout.h: Delete.
4012         * toplev.c: Delete sdbout.h include.
4013         (process_options): Delete SDB_DEBUG check.
4014         * tree-core.h (tree_type_common): Delete pointer field of
4015         tree_type_symtab.
4016         * tree.c (copy_node): Clear TYPE_SYMTAB_DIE instead of
4017         TYPE_SYMTAB_POINTER.
4018         * tree.h (TYPE_SYMTAB_POINTER): Delete.
4019         (TYPE_SYMTAB_IS_POINTER): Delete.
4020         (TYPE_SYMTAB_IS_DIE): Renumber.
4021         * xcoffout.c: Refer to former sdbout.c file.
4022         (xcoffout_begin_prologue): Use past tense for sdbout.c reference.
4024         * doc/install.texi (--with-stabs): Delete COFF and ECOFF info.
4025         * doc/invoke.texi (SEEALSO): Delete adb and sdb references.
4026         (Debugging Options): Delete -gcoff.
4027         (-gstabs): Delete SDB reference.
4028         (-gcoff): Delete.
4029         (-gcoff@var{level}): Delete.
4030         * doc/passes.texi (Debugging information output): Delete SDB and
4031         sdbout.c references.
4032         * doc/tm.texi: Regenerate.
4033         * doc/tm.texi.in (DWARF_CIE_DATA_ALIGNMENT): Delete SDB from xref.
4034         (SDB and DWARF): Change node name to DWARF and delete SDB and COFF
4035         references.
4036         (DEBUGGER_AUTO_OFFSET): Delete COFF and SDB references.
4037         (PREFERRED_DEBUGGING_TYPE): Delete SDB_DEBUG and -gcoff references.
4038         (SDB_DEBUGGING_INFO): Delete.
4039         (PUT_SDB_@dots{}, SDB_DELIM, SDB_ALLOW_UNKNOWN_REFERENCES)
4040         SDB_ALLOW_FORWARD_REFERENCES, SDB_OUTPUT_SOURCE_LINE): Delete.
4041         * target.def (output_source_filename): Delete COFF reference.
4043         * common.opt (gcoff): Delete.
4044         (gxcoff+): Update Negative chain.
4045         * defaults.h: Delete all references to SDB_DEBUGGING_INFO and
4046         SDB_DEBUG.
4047         * dwarf2out.c (gen_array_type_die): Change SDB to debuggers.
4048         * flag-types.h (enum debug_info_type): Delete SDB_DEBUG.
4049         * function.c (number_blocks): Delete SDB_DEBUGGING_INFO, SDB_DEBUG,
4050         and SDB references.
4051         (expand_function_start): Change sdb reference to past tense.
4052         (expand_function_end): Change sdb reference to past tense.
4053         * gcc.c (cpp_unique_options): Delete gcoff3 reference.
4054         * opts.c (debug_type_names): Delete coff entry.
4055         (common_handle_option): Delete OPT_gcoff case.
4056         * system.h (SDB_DEBUG, SDB_DEBUGGING_INFO): Poison.
4058         * config/dbxcoff.h (PREFERRED_DEBUGGING_TYPE): Set to DBX_DEBUG.
4059         * config/cris/cris.h: Delete SDB reference in comment.
4060         * config/i386/cygming.h: Don't define SDB_DEBUGGING_INFO.
4061         (ASM_DECLARE_FUNCTION_NAME): Delete SDB reference from comment.
4062         * config/i386/gas.h: Don't define SDB_DEBUGGING_INFO.
4063         * config/i386/i386.c (svr4_dbx_register_map): Change SDB references
4064         to past tense.
4065         (ix86_expand_prologue): Likewise.
4066         * config/i386/winnt.c (i386_pe_start_function): Don't check SDB_DEBUG.
4067         * config/ia64/ia64.h: Likewise.
4068         * config/m68k/m68kelf.h (DBX_REGISTER_NUMBER): Delete SDB reference.
4069         * config/mips/mips.h (SUBTARGET_ASM_DEBUGGING_SPEC): Delete gcoff*
4070         support.
4071         * config/mmix/mmix.h: Likewise.
4072         * config/nds32/nds32.c: Likewise.
4073         * config/stormy/storym16.h: Likewise.
4074         * config/visium/visium.h: Likewise.
4075         * config/vx-common.h (SDB_DEBUGGING_INFO): Delete undef.
4077 2017-10-28  Sandra Loosemore  <sandra@codesourcery.com>
4079         * config/nios2/nios2.h (FRAME_GROWS_DOWNWARD): Define to 1.
4080         * config/nios2/nios2.c (nios2_initial_elimination_offset):  Make
4081         FRAME_POINTER_REGNUM point at high end of local var area.
4083 2017-10-27  Eric Botcazou  <ebotcazou@adacore.com>
4085         * bb-reorder.c (find_traces_1_round): Fix off-by-one index.
4086         Move comment around.  Do not reset best_edge for a copiable
4087         destination if the copy would cause a partition change.
4088         (better_edge_p): Remove redundant check.
4090 2017-10-27  Uros Bizjak  <ubizjak@gmail.com>
4092         * config/i386/i386-protos.h (ix86_fp_compare_mode): Remove prototype.
4094 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
4096         * builtins.c (CASE_MATHFN_FLOATN): New helper macro to add cases
4097         for math functions that have _Float<N> and _Float<N>X variants.
4098         (mathfn_built_in_2): Add support for math functions that have
4099         _Float<N> and _Float<N>X variants.
4100         (DEF_INTERNAL_FLT_FLOATN_FN): New helper macro.
4101         (expand_builtin_mathfn_ternary): Add support for fma with
4102         _Float<N> and _Float<N>X variants.
4103         (expand_builtin): Likewise.
4104         (fold_builtin_3): Likewise.
4105         * builtins.def (DEF_EXT_LIB_FLOATN_NX_BUILTINS): New macro to
4106         create math function _Float<N> and _Float<N>X variants as external
4107         library builtins.
4108         (BUILT_IN_COPYSIGN _Float<N> and _Float<N>X variants) Use
4109         DEF_EXT_LIB_FLOATN_NX_BUILTINS to make built-in functions using
4110         the __builtin_ prefix and if not strict ansi, without the prefix.
4111         (BUILT_IN_FABS _Float<N> and _Float<N>X variants): Likewise.
4112         (BUILT_IN_FMA _Float<N> and _Float<N>X variants): Likewise.
4113         (BUILT_IN_FMAX _Float<N> and _Float<N>X variants): Likewise.
4114         (BUILT_IN_FMIN _Float<N> and _Float<N>X variants): Likewise.
4115         (BUILT_IN_NAN _Float<N> and _Float<N>X variants): Likewise.
4116         (BUILT_IN_SQRT _Float<N> and _Float<N>X variants): Likewise.
4117         * builtin-types.def (BT_FN_FLOAT16_FLOAT16_FLOAT16_FLOAT16): New
4118         function signatures for fma _Float<N> and _Float<N>X variants.
4119         (BT_FN_FLOAT32_FLOAT32_FLOAT32_FLOAT32): Likewise.
4120         (BT_FN_FLOAT64_FLOAT64_FLOAT64_FLOAT64): Likewise.
4121         (BT_FN_FLOAT128_FLOAT128_FLOAT128_FLOAT128): Likewise.
4122         (BT_FN_FLOAT32X_FLOAT32X_FLOAT32X_FLOAT32X): Likewise.
4123         (BT_FN_FLOAT64X_FLOAT64X_FLOAT64X_FLOAT64X): Likewise.
4124         (BT_FN_FLOAT128X_FLOAT128X_FLOAT128X_FLOAT128X): Likewise.
4125         * gencfn-macros.c (print_case_cfn): Add support for math functions
4126         that have _Float<N> and _Float<N>X variants.
4127         (print_define_operator_list): Likewise.
4128         (fltfn_suffixes): Likewise.
4129         (main): Likewise.
4130         * internal-fn.def (DEF_INTERNAL_FLT_FLOATN_FN): New helper macro
4131         for math functions that have _Float<N> and _Float<N>X variants.
4132         (SQRT): Add support for sqrt, copysign, fmin and fmax _Float<N>
4133         and _Float<N>X variants.
4134         (COPYSIGN): Likewise.
4135         (FMIN): Likewise.
4136         (FMAX): Likewise.
4137         * fold-const.c (tree_call_nonnegative_warnv_p): Add support for
4138         copysign, fma, fmax, fmin, and sqrt _Float<N> and _Float<N>X
4139         variants.
4140         (integer_valued_read_call_p): Likewise.
4141         * fold-const-call.c (fold_const_call_ss): Likewise.
4142         (fold_const_call_sss): Add support for copysign, fmin, and fmax
4143         _Float<N> and _Float<N>X variants.
4144         (fold_const_call_ssss): Add support for fma _Float<N> and
4145         _Float<N>X variants.
4146         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Add
4147         support for copysign and fma _Float<N> and _Float<N>X variants.
4148         (backprop::process_builtin_call_use): Likewise.
4149         * tree-call-cdce.c (can_test_argument_range); Add support for
4150         sqrt _Float<N> and _Float<N>X variants.
4151         (edom_only_function): Likewise.
4152         (get_no_error_domain): Likewise.
4153         * tree-ssa-math-opts.c (internal_fn_reciprocal): Likewise.
4154         * tree-ssa-reassoc.c (attempt_builtin_copysign): Add support for
4155         copysign _Float<N> and _Float<N>X variants.
4156         * config/rs6000/rs6000-builtin.def (SQRTF128): Delete, this is now
4157         handled by machine independent code.
4158         (FMAF128): Likewise.
4159         * doc/cpp.texi (Common Predefined Macros): Document defining
4160         __FP_FAST_FMAF<N> and __FP_FAST_FMAF<N>X if the backend supports
4161         fma _Float<N> and _Float<N>X variants.
4163 2017-10-27  Uros Bizjak  <ubizjak@gmail.com>
4165         PR target/82692
4166         * config/i386/i386-modes.def (CCFPU): Remove definition.
4167         * config/i386/i386.c (put_condition_mode): Remove CCFPU mode handling.
4168         (ix86_cc_modes_compatible): Ditto.
4169         (ix86_expand_carry_flag_compare): Ditto.
4170         (ix86_expand_int_movcc): Ditto.
4171         (ix86_expand_int_addcc): Ditto.
4172         (ix86_reverse_condition): Ditto.
4173         (ix86_unordered_fp_compare): Rename from ix86_fp_compare_mode.
4174         Return true/false for unordered/ordered fp comparisons.
4175         (ix86_cc_mode): Always return CCFPmode for float mode comparisons.
4176         (ix86_prepare_fp_compare_args): Update for rename.
4177         (ix86_expand_fp_compare): Update for rename.  Generate unordered
4178         compare RTXes wrapped with UNSPEC_NOTRAP unspec.
4179         (ix86_expand_sse_compare_and_jump): Ditto.
4180         * config/i386/predicates.md (fcmov_comparison_operator):
4181         Remove CCFPU mode handling.
4182         (ix86_comparison_operator): Ditto.
4183         (ix86_carry_flag_operator): Ditto.
4184         * config/i386/i386.md (UNSPEC_NOTRAP): New unspec.
4185         (*cmpu<mode>_i387): Wrap compare RTX with UNSPEC_NOTRAP unspec.
4186         (*cmpu<mode>_cc_i387): Ditto.
4187         (FPCMP): Remove mode iterator.
4188         (unord): Remove mode attribute.
4189         (unord_subst): New define_subst transformation
4190         (unord): New define_subst attribute.
4191         (unordered): Ditto.
4192         (*cmpi<unord><MODEF:mode>): Rewrite using unord_subst transformation.
4193         (*cmpi<unord>xf_i387): Ditto.
4194         * config/i386/sse.md (<sse>_<unord>comi<round_saeonly_name>): Merge
4195         from <sse>_comi<round_saeonly_name> and <sse>_ucomi<round_saeonly_name>
4196         using unord_subst transformation.
4197         * config/i386/subst.md (SUBST_A): Remove CCFP and CCFPU modes.
4198         (round_saeonly): Also handle CCFP mode.
4199         * reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_NOTRAP unspec.
4200         Remove UNSPEC_SAHF unspec handling.
4202 2017-10-27  Jan Hubicka  <hubicka@ucw.cz>
4204         * x86-tune.def (X86_TUNE_INTER_UNIT_MOVES_TO_VEC): Disable for Zen.
4206 2017-10-27  Jeff Law  <law@redhat.com>
4208         * gimple-ssa-sprintf.c: Include domwalk.h.
4209         (class sprintf_dom_walker): New class, derived from dom_walker.
4210         (sprintf_dom_walker::before_dom_children): New function.
4211         (struct call_info): Moved into sprintf_dom_walker class
4212         (compute_formath_length, handle_gimple_call): Likewise.
4213         (sprintf_length::execute): Call the dominator walker rather
4214         than walking the statements.
4216         * tree-vrp.c (check_all_array_refs): Do not use wi->info to smuggle
4217         gimple statement locations.
4218         (check_array_bounds): Corresponding changes.  Get the statement's
4219         location directly from wi->stmt.
4221 2017-10-27  Palmer Dabbelt  <palmer@dabbelt.com>
4223         PR target/82717
4224         * doc/invoke.texi (RISC-V) <-mabi>: Correct and improve.
4226 2017-10-27  Jan Hubicka  <hubicka@ucw.cz>
4228         * config/i386/x86-tune.def (X86_TUNE_PARTIAL_REG_DEPENDENCY,
4229         X86_TUNE_MOVX): Disable for Haswell and newer CPUs.
4231 2017-10-27  Jakub Jelinek  <jakub@redhat.com>
4233         PR target/82703
4234         * config/i386/i386-protos.h (maybe_get_pool_constant): Removed.
4235         * config/i386/i386.c (maybe_get_pool_constant): Removed.
4236         (ix86_split_to_parts): Use avoid_constant_pool_reference instead of
4237         maybe_get_pool_constant.
4238         * config/i386/predicates.md (zero_extended_scalar_load_operand):
4239         Likewise.
4241 2017-10-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4243         * doc/install.texi (Specific, i?86-*-solaris2.10): Simplify gas
4244         2.26 caveat.  Update gas and gld versions.
4245         (Specific, *-*-solaris2*): Update binutils version.  Remove caveat
4246         reference.
4248 2017-10-27  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4250         * cgraph.h (set_malloc_flag): Declare.
4251         * cgraph.c (set_malloc_flag_1): New function.
4252         (set_malloc_flag): Likewise.
4253         * ipa-fnsummary.h (ipa_call_summary): Add new field is_return_callee.
4254         * ipa-fnsummary.c (ipa_call_summary::reset): Set is_return_callee to
4255         false.
4256         (read_ipa_call_summary): Add support for reading is_return_callee.
4257         (write_ipa_call_summary): Stream is_return_callee.
4258         * ipa-inline.c (ipa_inline): Remove call to ipa_free_fn_summary.
4259         * ipa-pure-const.c: Add headers ssa.h, alloc-pool.h, symbol-summary.h,
4260         ipa-prop.h, ipa-fnsummary.h.
4261         (pure_const_names): Change to static.
4262         (malloc_state_e): Define.
4263         (malloc_state_names): Define.
4264         (funct_state_d): Add field malloc_state.
4265         (varying_state): Set malloc_state to STATE_MALLOC_BOTTOM.
4266         (check_retval_uses): New function.
4267         (malloc_candidate_p): Likewise.
4268         (analyze_function): Add support for malloc attribute.
4269         (pure_const_write_summary): Stream malloc_state.
4270         (pure_const_read_summary): Add support for reading malloc_state.
4271         (dump_malloc_lattice): New function.
4272         (propagate_malloc): New function.
4273         (warn_function_malloc): New function.
4274         (ipa_pure_const::execute): Call propagate_malloc and
4275         ipa_free_fn_summary.
4276         (pass_local_pure_const::execute): Add support for malloc attribute.
4277         * ssa-iterators.h (RETURN_FROM_IMM_USE_STMT): New macro.
4278         * doc/invoke.texi: Document Wsuggest-attribute=malloc.
4280 2017-10-27  Martin Liska  <mliska@suse.cz>
4282         PR gcov-profile/82457
4283         * doc/invoke.texi: Document that one needs a non-strict ISO mode
4284         for fork-like functions to be properly instrumented.
4286 2017-10-27  Richard Biener  <rguenther@suse.de>
4288         PR middle-end/81659
4289         * tree-eh.c (pass_lower_eh_dispatch::execute): Free dominator
4290         info when we redirected EH.
4292 2017-10-26  Michael Collison  <michael.collison@arm.com>
4294         * config/aarch64/aarch64.md(<optab>_trunc><vf><GPI:mode>2):
4295         New pattern.
4296         (<optab>_trunchf<GPI:mode>2: New pattern.
4297         (<optab>_trunc<vgp><GPI:mode>2: New pattern.
4298         * config/aarch64/iterators.md (wv): New mode attribute.
4299         (vf, VF): New mode attributes.
4300         (vgp, VGP): New mode attributes.
4301         (s): Update attribute with SImode and DImode prefixes.
4303 2017-10-26  Sandra Loosemore  <sandra@codesourcery.com>
4305         * config/nios2/constraints.md ("S"): Match r0rel_constant_p too.
4306         * config/nios2/nios2-protos.h (r0rel_constant_p): Declare.
4307         * config/nios2/nios2.c: (nios2_r0rel_sec_regex): New.
4308         (nios2_option_overide): Initialize it.  Don't allow R0-relative
4309         addressing with PIC.
4310         (nios2_rtx_costs): Handle r0rel_constant_p like gprel_constant_p.
4311         (nios2_symbolic_constant_p): Likewise.
4312         (nios2_legitimate_address_p): Likewise.
4313         (nios2_r0rel_section_name_p): New.
4314         (nios2_symbol_ref_in_r0rel_data_p): New.
4315         (nios2_emit_move_sequence): Handle r0rel_constant_p.
4316         (r0rel_constant_p): New.
4317         (nios2_print_operand_address): Handle r0rel_constant_p.
4318         (nios2_cdx_narrow_form_p): Likewise.
4319         * config/nios2/nios2.opt (mr0rel-sec=): New option.
4320         * doc/invoke.texi (Option Summary): Add -mr0rel-sec.
4321         (Nios II Options): Document -mr0rel-sec.
4323 2017-10-26  Sandra Loosemore  <sandra@codesourcery.com>
4325         * config/nios2/nios2.c: Include xregex.h.
4326         (nios2_gprel_sec_regex): New.
4327         (nios2_option_overide): Initialize it.  Don't allow GP-relative
4328         addressing with PIC.
4329         (nios2_small_section_name_p): Check for regex match.
4330         * config/nios2/nios2.opt (mgprel-sec=): New option.
4331         * doc/invoke.texi (Option Summary): Add -mgprel-sec.
4332         (Nios II Options): Document -mgprel-sec.
4334 2017-10-26  Jim Wilson  <wilson@tuliptree.org>
4336         * doc/invoke.texi (-fdebug-prefix-map): Expand documentation.
4338 2017-10-26  Tom de Vries  <tom@codesourcery.com>
4340         PR tree-optimization/82707
4341         * gimple.c (gimple_copy): Fix unsharing of
4342         GIMPLE_OMP_{SINGLE,TARGET,TEAMS}.
4344 2017-10-26  Olga Makhotina  <olga.makhotina@intel.com>
4346         * config/i386/avx512fintrin.h (_mm512_cmpeq_pd_mask,
4347         _mm512_cmple_pd_mask, _mm512_cmplt_pd_mask,
4348         _mm512_cmpneq_pd_mask, _mm512_cmpnle_pd_mask,
4349         _mm512_cmpnlt_pd_mask, _mm512_cmpord_pd_mask,
4350         _mm512_cmpunord_pd_mask, _mm512_mask_cmpeq_pd_mask,
4351         _mm512_mask_cmple_pd_mask, _mm512_mask_cmplt_pd_mask,
4352         _mm512_mask_cmpneq_pd_mask, _mm512_mask_cmpnle_pd_mask,
4353         _mm512_mask_cmpnlt_pd_mask, _mm512_mask_cmpord_pd_mask,
4354         _mm512_mask_cmpunord_pd_mask, _mm512_cmpeq_ps_mask,
4355         _mm512_cmple_ps_mask, _mm512_cmplt_ps_mask,
4356         _mm512_cmpneq_ps_mask, _mm512_cmpnle_ps_mask,
4357         _mm512_cmpnlt_ps_mask, _mm512_cmpord_ps_mask,
4358         _mm512_cmpunord_ps_mask, _mm512_mask_cmpeq_ps_mask,
4359         _mm512_mask_cmple_ps_mask, _mm512_mask_cmplt_ps_mask,
4360         _mm512_mask_cmpneq_ps_mask, _mm512_mask_cmpnle_ps_mask,
4361         _mm512_mask_cmpnlt_ps_mask, _mm512_mask_cmpord_ps_mask,
4362         _mm512_mask_cmpunord_ps_mask): New intrinsics.
4364 2017-10-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
4366         * config/rs6000/aix.h (TARGET_IEEEQUAD_DEFAULT): Set long double
4367         default to IBM.
4368         * config/rs6000/darwin.h (TARGET_IEEEQUAD_DEFAULT): Likewise.
4369         * config/rs6000/rs6000.opt (-mabi=ieeelongdouble): Move the
4370         warning to rs6000.c.  Remove the Undocumented flag, since it has
4371         been documented.
4372         (-mabi=ibmlongdouble): Likewise.
4373         * config/rs6000/rs6000.c (TARGET_IEEEQUAD_DEFAULT): If it is not
4374         already set, set the default format for long double.
4375         (rs6000_debug_reg_global): Print whether long double is IBM or
4376         IEEE.
4377         (rs6000_option_override_internal): Rework setting long double
4378         format.  Only warn if the user is changing the long double default
4379         and they did not use -Wno-psabi.
4380         * doc/invoke.texi (PowerPC options): Update the documentation for
4381         -mabi=ieeelongdouble and -mabi=ibmlongdouble.
4383 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
4384             Alan Hayward  <alan.hayward@arm.com>
4385             David Sherwood  <david.sherwood@arm.com>
4387         * rtl.h (wider_subreg_mode): New function.
4388         * ira.h (ira_sort_regnos_for_alter_reg): Take a machine_mode *
4389         rather than an unsigned int *.
4390         * ira-color.c (regno_max_ref_width): Replace with...
4391         (regno_max_ref_mode): ...this new variable.
4392         (coalesced_pseudo_reg_slot_compare): Update accordingly.
4393         Use wider_subreg_mode.
4394         (ira_sort_regnos_for_alter_reg): Likewise.  Take a machine_mode *
4395         rather than an unsigned int *.
4396         * lra-constraints.c (uses_hard_regs_p): Use wider_subreg_mode.
4397         (process_alt_operands): Likewise.
4398         (invariant_p): Likewise.
4399         * lra-spills.c (assign_mem_slot): Likewise.
4400         (add_pseudo_to_slot): Likewise.
4401         * lra.c (collect_non_operand_hard_regs): Likewise.
4402         (add_regs_to_insn_regno_info): Likewise.
4403         * reload1.c (regno_max_ref_width): Replace with...
4404         (regno_max_ref_mode): ...this new variable.
4405         (reload): Update accordingly.  Update call to
4406         ira_sort_regnos_for_alter_reg.
4407         (alter_reg): Update to use regno_max_ref_mode.  Call wider_subreg_mode.
4408         (init_eliminable_invariants): Update to use regno_max_ref_mode.
4409         (scan_paradoxical_subregs): Likewise.
4411 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
4413         * config/aarch64/aarch64.h (EXIT_IGNORE_STACK): Set if alloca is used.
4414         (aarch64_frame): Add emit_frame_chain boolean.
4415         * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
4416         Move eh_return case to aarch64_layout_frame.
4417         (aarch64_layout_frame): Initialize emit_frame_chain.
4418         (aarch64_expand_prologue): Use emit_frame_chain.
4420 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
4422         * config/aarch64/aarch64.c (aarch64_layout_frame):
4423         Ensure LR is always stored at the bottom of the callee-saves.
4424         Remove rarely used frame layout which saves callee-saves at top of
4425         frame, so the store of LR can be used as a valid probe in all cases.
4427 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
4429         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
4430         Improve unaligned TImode/TFmode base/offset split.
4432 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
4433             Alan Hayward  <alan.hayward@arm.com>
4434             David Sherwood  <david.sherwood@arm.com>
4436         * caller-save.c (mark_referenced_regs):  Use read_modify_subreg_p.
4437         * combine.c (find_single_use_1): Likewise.
4438         (expand_field_assignment): Likewise.
4439         (move_deaths): Likewise.
4440         * lra-constraints.c (simplify_operand_subreg): Likewise.
4441         (curr_insn_transform): Likewise.
4442         * lra.c (collect_non_operand_hard_regs): Likewise.
4443         (add_regs_to_insn_regno_info): Likewise.
4444         * rtlanal.c (reg_referenced_p): Likewise.
4445         (covers_regno_no_parallel_p): Likewise.
4447 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
4449         * wide-int-print.cc (print_hex): Loop based on extract_uhwi.
4450         Don't print any bits outside the precision of the value.
4451         * wide-int.cc (test_printing): Add some new tests.
4453 2017-10-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4455         * configure.ac (gcc_cv_as_ix86_xbrace_comment): Check if assembler
4456         supports -xbrace_comment option.
4457         * configure: Regenerate.
4458         * config.in: Regenerate.
4459         * config/i386/sol2.h (ASM_XBRACE_COMMENT_SPEC): Define.
4460         (ASM_CPU_SPEC): Use it.
4462 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
4464         * target.def (static_rtx_alignment): New hook.
4465         * targhooks.h (default_static_rtx_alignment): Declare.
4466         * targhooks.c (default_static_rtx_alignment): New function.
4467         * doc/tm.texi.in (TARGET_STATIC_RTX_ALIGNMENT): New hook.
4468         * doc/tm.texi: Regenerate.
4469         * varasm.c (force_const_mem): Use targetm.static_rtx_alignment
4470         instead of targetm.constant_alignment.  Remove call to
4471         set_mem_attributes.
4472         * config/cris/cris.c (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
4473         (cris_preferred_mininum_alignment): New function, split out from...
4474         (cris_constant_alignment): ...here.
4475         (cris_static_rtx_alignment): New function.
4476         * config/i386/i386.c (ix86_static_rtx_alignment): New function,
4477         split out from...
4478         (ix86_constant_alignment): ...here.
4479         (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
4480         * config/mmix/mmix.c (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
4481         (mmix_static_rtx_alignment): New function.
4482         * config/spu/spu.c (spu_static_rtx_alignment): New function.
4483         (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
4485 2017-10-26  Tamar Christina  <tamar.christina@arm.com>
4487         PR target/81800
4488         * config/aarch64/aarch64.md (lrint<GPF:mode><GPI:mode>2):
4489         Add flag_trapping_math and flag_fp_int_builtin_inexact.
4491 2017-10-25  Palmer Dabbelt  <palmer@dabbelt.com>
4493         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Define.
4494         * config/riscv/pic.md (local_pic_load): Rename to local_pic_load_s,
4495         mark as a sign-extending load.
4496         (local_pic_load_u): Define.
4498 2017-10-25  Eric Botcazou  <ebotcazou@adacore.com>
4500         PR middle-end/82062
4501         * fold-const.c (operand_equal_for_comparison_p): Also return true
4502         if ARG0 is a simple variant of ARG1 with narrower precision.
4503         (fold_ternary_loc): Always pass unstripped operands to the predicate.
4505 2017-10-25  Jan Hubicka  <hubicka@ucw.cz>
4507         * i386.c (ix86_builtin_vectorization_cost): Compute scatter/gather
4508         cost correctly.
4509         * i386.h (processor_costs): Add gather_static, gather_per_elt,
4510         scatter_static, scatter_per_elt.
4511         * x86-tune-costs.h: Add new cost entries.
4513 2017-10-25  Richard Biener  <rguenther@suse.de>
4515         * tree-ssa-sccvn.h (vn_eliminate): Declare.
4516         * tree-ssa-pre.c (class eliminate_dom_walker, eliminate,
4517         class pass_fre): Move to ...
4518         * tree-ssa-sccvn.c (class eliminate_dom_walker, vn_eliminate,
4519         class pass_fre): ... here and adjust for statistics.
4521 2017-10-25  Jakub Jelinek  <jakub@redhat.com>
4523         PR libstdc++/81706
4524         * attribs.c (attribute_value_equal): Use omp_declare_simd_clauses_equal
4525         for comparison of OMP_CLAUSEs regardless of flag_openmp{,_simd}.
4526         (duplicate_one_attribute, copy_attributes_to_builtin): New functions.
4527         * attribs.h (duplicate_one_attribute, copy_attributes_to_builtin): New
4528         declarations.
4530 2017-10-25  Richard Biener  <rguenther@suse.de>
4532         * tree-ssa-pre.c (need_eh_cleanup, need_ab_cleanup, el_to_remove,
4533         el_to_fixup, el_todo, el_avail, el_avail_stack, eliminate_avail,
4534         eliminate_push_avail, eliminate_insert): Move inside...
4535         (class eliminate_dom_walker): ... this class in preparation
4536         of move.
4537         (fini_eliminate): Remove by merging with ...
4538         (eliminate): ... this function.  Adjust for class changes.
4539         (pass_pre::execute): Remove fini_eliminate call.
4540         (pass_fre::execute): Likewise.
4542 2017-10-24  Jakub Jelinek  <jakub@redhat.com>
4544         PR target/82460
4545         * config/i386/sse.md (UNSPEC_VPERMI2, UNSPEC_VPERMI2_MASK): Remove.
4546         (VPERMI2, VPERMI2I): New mode iterators.
4547         (<avx512>_vpermi2var<mode>3_maskz): Remove 3 define_expand patterns.
4548         (<avx512>_vpermi2var<mode>3<sd_maskz_name>): Remove 3 define_insn
4549         patterns.
4550         (<avx512>_vpermi2var<mode>3_mask): New define_expand using VPERMI2
4551         mode iterator.  Remove 3 old define_insn patterns.
4552         (*<avx512>_vpermi2var<mode>3_mask): 2 new define_insn patterns.
4553         (<avx512>_vpermt2var<mode>3_maskz): Adjust 1 define_expand to use
4554         VPERMI2 mode iterator, remove the other two expanders.
4555         (<avx512>_vpermt2var<mode>3<sd_maskz_name>): Adjust 1 define_insn
4556         to use VPERMI2 mode iterator, add another alternative for vpermi2*
4557         instructions, remove the other two patterns.
4558         (<avx512>_vpermt2var<mode>3_mask): Adjust 1 define_insn to use VPERMI2
4559         mode iterator, remove the other two patterns.
4560         * config/i386/i386.c (ix86_expand_vec_perm_vpermi2): Renamed to ...
4561         (ix86_expand_vec_perm_vpermt2): ... this.  Swap mask and op0
4562         arguments, use gen_*vpermt2* expanders instead of gen_*vpermi2*
4563         and adjust argument order accordingly.
4564         (ix86_expand_vec_perm): Adjust caller.
4565         (expand_vec_perm_1): Likewise.
4566         (expand_vec_perm_vpermi2_vpshub2): Rename to ...
4567         (expand_vec_perm_vpermt2_vpshub2): ... this.
4568         (ix86_expand_vec_perm_const_1): Adjust caller.
4569         (ix86_vectorize_vec_perm_const_ok): Adjust comments.
4571         PR target/82370
4572         * config/i386/sse.md (VIMAX_AVX2): Remove V4TImode.
4573         (VIMAX_AVX2_AVX512BW, VIMAX_AVX512VL): New mode iterators.
4574         (vec_shl_<mode>): Remove unused expander.
4575         (avx512bw_<shift_insn><mode>3): New define_insn.
4576         (<sse2_avx2>_ashl<mode>3, <sse2_avx2>_lshr<mode>3): Replaced by ...
4577         (<sse2_avx2>_<shift_insn><mode>3): ... this.  New define_insn.
4579 2017-10-24  Paolo Carlini  <paolo.carlini@oracle.com>
4581         PR c++/82466
4582         * doc/invoke.texi ([Wbuiltin-declaration-mismatch]): Extend
4583         description.
4585 2017-10-24  Wilco Dijkstra  <wdijkstr@arm.com>
4587         PR rtl-optimization/82396
4588         * gcc/haifa-sched.c (ready_sort_real): Remove qsort workaround.
4589         (autopref_multipass_init): Simplify initialization.
4590         (autopref_rank_data): Simplify sort order.
4591         * gcc/sched-int.h (autopref_multipass_data_): Remove
4592         multi_mem_insn_p, min_offset and max_offset.
4594 2017-10-24  Wilco Dijkstra  <wdijkstr@arm.com>
4596         PR middle-end/60580
4597         * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
4598         Check special value of flag_omit_frame_pointer.
4599         (aarch64_can_eliminate): Likewise.
4600         (aarch64_override_options_after_change_1): Simplify handling of
4601         -fomit-frame-pointer and -fomit-leaf-frame-pointer.
4603 2017-10-24  Richard Biener  <rguenther@suse.de>
4605         PR tree-optimization/82697
4606         * tree-ssa-phiopt.c (cond_store_replacement): Use alias-set
4607         zero for conditional load and unconditional store.
4609 2017-10-24  H.J. Lu  <hongjiu.lu@intel.com>
4611         * doc/install.texi: Document bootstrap-cet.
4613 2017-10-24  H.J. Lu  <hongjiu.lu@intel.com>
4615         PR target/82659
4616         * config/i386/i386.c (rest_of_insert_endbranch): Don't insert
4617         ENDBR instruction at function entrance if function is only
4618         called directly.
4620 2017-10-24  Jakub Jelinek  <jakub@redhat.com>
4622         PR target/82628
4623         * config/i386/i386.md (addcarry<mode>, subborrow<mode>): Change
4624         patterns to better describe from which operation the CF is computed.
4625         (addcarry<mode>_0, subborrow<mode>_0): New patterns.
4626         * config/i386/i386.c (ix86_expand_builtin) <case handlecarry>: Pass
4627         one LTU with [DT]Imode and another one with [SD]Imode.  If arg0
4628         is 0, use _0 suffixed expanders instead of emitting a comparison
4629         before it.
4631 2017-10-06  Sergey Shalnov  <Sergey.Shalnov@intel.com>
4633         * config/i386/i386.md(*movsf_internal, *movdf_internal):
4634         Avoid 512-bit AVX modes for TARGET_PREFER_AVX256.
4636 2017-10-24  Eric Botcazou  <ebotcazou@adacore.com>
4638         PR middle-end/82569
4639         * tree-outof-ssa.h (always_initialized_rtx_for_ssa_name_p): Delete.
4640         * expr.c (expand_expr_real_1) <expand_decl_rtl>: Revert latest change.
4641         * loop-iv.c (iv_get_reaching_def): Likewise.
4642         * cfgexpand.c (expand_one_ssa_partition): Initialize the RTX if the
4643         variable is promoted and the partition contains undefined values.
4645 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
4647         * config/nios2/nios2.c (nios2_rtx_costs): Make costs better
4648         reflect reality.
4649         (nios2_address_cost): Define.
4650         (nios2_legitimize_address): Recognize (exp + constant) directly.
4651         (TARGET_ADDRESS_COST): Define.
4653 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
4655         * config/nios2/nios2-protos.h (nios2_large_constant_p): Declare.
4656         (nios2_symbolic_memory_operand_p): Declare.
4657         (nios2_split_large_constant): Declare.
4658         (nios2_split_symbolic_memory_operand): Declare.
4659         * config/nios2/nios2.c: Adjust includes.
4660         (nios2_symbolic_constant_allowed): New.
4661         (nios2_symbolic_constant_p): New.
4662         (nios2_plus_symbolic_constant_p): New.
4663         (nios2_valid_addr_expr_p): Recognize addresses involving
4664         symbolic constants.
4665         (nios2_legitimate_address_p): Likewise, also LO_SUM.
4666         (nios2_symbolic_memory_operand_p): New.
4667         (nios2_large_constant_p): New.
4668         (nios2_split_large_constant): New.
4669         (nios2_split_plus_large_constant): New.
4670         (nios2_split_symbolic_memory_operand): New.
4671         (nios2_legitimize_address): Code refactoring.  Handle addresses
4672         involving symbolic constants.
4673         (nios2_emit_move_sequence): Likewise.
4674         (nios2_print_operand): Improve error output.
4675         (nios2_print_operand_address): Handle LO_SUM.
4676         (nios2_cdx_narrow_form_p): Likewise.
4677         * config/nios2/nios2.md (movqi_internal): Add splitter for memory
4678         operands involving symbolic constants.
4679         (movhi_internal, movsi_internal): Likewise.
4680         (zero_extendhisi2, zero_extendqi<mode>2): Likewise.
4681         (extendhisi2, extendqi<mode>2): Likewise.
4683 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
4685         * tree-pass.h (PROP_rtl_split_insns): Define.
4686         * recog.c (pass_data_split_all_insns): Provide PROP_rtl_split_insns.
4688 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
4690         * config/nios2/nios2.c (TARGET_LRA_P): Don't override.
4692 2017-10-23  Jakub Jelinek  <jakub@redhat.com>
4694         PR debug/82630
4695         * target.def (const_not_ok_for_debug_p): Default to
4696         default_const_not_ok_for_debug_p instead of hook_bool_rtx_false.
4697         * targhooks.h (default_const_not_ok_for_debug_p): New declaration.
4698         * targhooks.c (default_const_not_ok_for_debug_p): New function.
4699         * dwarf2out.c (const_ok_for_output_1): Only reject UNSPECs for
4700         which targetm.const_not_ok_for_debug_p returned true.
4701         * config/arm/arm.c (arm_const_not_ok_for_debug_p): Return true
4702         for UNSPECs.
4703         * config/powerpcspe/powerpcspe.c (rs6000_const_not_ok_for_debug_p):
4704         Likewise.
4705         * config/rs6000/rs6000.c (rs6000_const_not_ok_for_debug_p): Likewise.
4706         * config/i386/i386.c (ix86_delegitimize_address_1): Don't delegitimize
4707         UNSPEC_GOTOFF with addend into addend - _GLOBAL_OFFSET_TABLE_ + symbol
4708         if !base_term_p.
4709         (ix86_const_not_ok_for_debug_p): New function.
4710         (i386_asm_output_addr_const_extra): Handle UNSPEC_GOTOFF.
4711         (TARGET_CONST_NOT_OK_FOR_DEBUG_P): Redefine.
4713 2017-10-23  David Malcolm  <dmalcolm@redhat.com>
4715         PR bootstrap/82610
4716         * system.h: Conditionally include "unique-ptr.h" if
4717         INCLUDE_UNIQUE_PTR is defined.
4718         * unique-ptr-tests.cc: Remove include of "unique-ptr.h" in favor
4719         of defining INCLUDE_UNIQUE_PTR before including "system.h".
4721 2017-10-23  Sebastian Perta  <sebastian.perta@renesas.com>
4723         * config/rl78/rl78.md: New define_expand "subdi3".
4725 2017-10-23  H.J. Lu  <hongjiu.lu@intel.com>
4727         PR target/82673
4728         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Skip
4729         DF_REF_INSN if DF_REF_INSN_INFO is false.
4731 2017-10-23  Jan Hubicka  <hubicka@ucw.cz>
4733         * i386.c (dimode_scalar_chain::compute_convert_gain): Use
4734         xmm_move instead of sse_move.
4735         (sse_store_index): New function.
4736         (ix86_register_move_cost): Be more sensible about mismatch stall;
4737         model AVX moves correctly; make difference between sse->integer and
4738         integer->sse.
4739         (ix86_builtin_vectorization_cost): Model correctly aligned and unaligned
4740         moves; make difference between SSE and AVX.
4741         * i386.h (processor_costs): Remove sse_move; add xmm_move, ymm_move
4742         and zmm_move. Increase size of sse load and store tables;
4743         add unaligned load and store tables; add ssemmx_to_integer.
4744         * x86-tune-costs.h: Update all entries according to real
4745         move latencies from Agner Fog's manual and chip documentation.
4747 2017-10-23  Jakub Jelinek  <jakub@redhat.com>
4749         PR target/82628
4750         * config/i386/predicates.md (x86_64_dwzext_immediate_operand): New.
4751         * config/i386/constraints.md (Wf): New constraint.
4752         * config/i386/i386.md (UNSPEC_SBB): New unspec.
4753         (cmp<dwi>_doubleword): Removed.
4754         (sub<mode>3_carry_ccc, *sub<mode>3_carry_ccc_1): New patterns.
4755         (sub<mode>3_carry_ccgz): Use unspec instead of compare.
4756         * config/i386/i386.c (ix86_expand_branch) <case E_TImode>: Don't
4757         expand with cmp<dwi>_doubleword.  For LTU and GEU use
4758         sub<mode>3_carry_ccc instead of sub<mode>3_carry_ccgz and use CCCmode.
4760         * common.opt (gcolumn-info): Enable by default.
4761         * doc/invoke.texi (gcolumn-info): Document new default.
4763 2017-10-23  Richard Biener  <rguenther@suse.de>
4765         PR tree-optimization/82672
4766         * graphite-isl-ast-to-gimple.c (graphite_copy_stmts_from_block):
4767         Fold the stmt if we propagated into it.
4769 2017-10-23  Richard Biener  <rguenther@suse.de>
4771         * tree-ssa-pre.c (bitmap_remove_from_set): Rename to...
4772         (bitmap_remove_expr_from_set): ... this.  All callers call this
4773         for non-constant values.
4774         (bitmap_set_subtract): Rename to...
4775         (bitmap_set_subtract_expressions): ... this.  Adjust and
4776         optimize.
4777         (bitmap_set_contains_value): Remove superfluous check.
4778         (bitmap_set_replace_value): Inline into single caller ...
4779         (bitmap_value_replace_in_set): ... here and simplify.
4780         (dependent_clean): Merge into ...
4781         (clean): ... this using an overload.  Adjust.
4782         (prune_clobbered_mems): Adjust.
4783         (compute_antic_aux): Likewise.
4784         (compute_partial_antic_aux): Likewise.
4786 2017-10-23  Richard Biener  <rguenther@suse.de>
4788         PR tree-optimization/82129
4789         Revert
4790         2017-08-01  Richard Biener  <rguenther@suse.de>
4792         PR tree-optimization/81181
4793         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
4794         (compute_antic): ... end of iteration here.
4796 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
4798         * target.def (starting_frame_offset): New hook.
4799         * doc/tm.texi (STARTING_FRAME_OFFSET): Remove in favor of...
4800         (TARGET_STARTING_FRAME_OFFSET): ...this new hook.
4801         * doc/tm.texi.in: Regenerate.
4802         * hooks.h (hook_hwi_void_0): Declare.
4803         * hooks.c (hook_hwi_void_0): New function.
4804         * doc/rtl.texi: Refer to TARGET_STARTING_FRAME_OFFSET instead of
4805         STARTING_FRAME_OFFSET.
4806         * builtins.c (expand_builtin_setjmp_receiver): Likewise.
4807         * reload1.c (reload): Likewise.
4808         * cfgexpand.c (expand_used_vars): Use targetm.starting_frame_offset
4809         instead of STARTING_FRAME_OFFSET.
4810         * function.c (try_fit_stack_local): Likewise.
4811         (assign_stack_local_1): Likewise
4812         (instantiate_virtual_regs): Likewise.
4813         * rtlanal.c (rtx_addr_can_trap_p_1): Likewise.
4814         * config/avr/avr.md (nonlocal_goto_receiver): Likewise.
4815         * config/aarch64/aarch64.h (STARTING_FRAME_OFFSET): Delete.
4816         * config/alpha/alpha.h (STARTING_FRAME_OFFSET): Likewise.
4817         * config/arc/arc.h (STARTING_FRAME_OFFSET): Likewise.
4818         * config/arm/arm.h (STARTING_FRAME_OFFSET): Likewise.
4819         * config/bfin/bfin.h (STARTING_FRAME_OFFSET): Likewise.
4820         * config/c6x/c6x.h (STARTING_FRAME_OFFSET): Likewise.
4821         * config/cr16/cr16.h (STARTING_FRAME_OFFSET): Likewise.
4822         * config/cris/cris.h (STARTING_FRAME_OFFSET): Likewise.
4823         * config/fr30/fr30.h (STARTING_FRAME_OFFSET): Likewise.
4824         * config/frv/frv.h (STARTING_FRAME_OFFSET): Likewise.
4825         * config/ft32/ft32.h (STARTING_FRAME_OFFSET): Likewise.
4826         * config/h8300/h8300.h (STARTING_FRAME_OFFSET): Likewise.
4827         * config/i386/i386.h (STARTING_FRAME_OFFSET): Likewise.
4828         * config/ia64/ia64.h (STARTING_FRAME_OFFSET): Likewise.
4829         * config/m32c/m32c.h (STARTING_FRAME_OFFSET): Likewise.
4830         * config/m68k/m68k.h (STARTING_FRAME_OFFSET): Likewise.
4831         * config/mcore/mcore.h (STARTING_FRAME_OFFSET): Likewise.
4832         * config/mn10300/mn10300.h (STARTING_FRAME_OFFSET): Likewise.
4833         * config/moxie/moxie.h (STARTING_FRAME_OFFSET): Likewise.
4834         * config/msp430/msp430.h (STARTING_FRAME_OFFSET): Likewise.
4835         * config/nds32/nds32.h (STARTING_FRAME_OFFSET): Likewise.
4836         * config/nios2/nios2.h (STARTING_FRAME_OFFSET): Likewise.
4837         * config/nvptx/nvptx.h (STARTING_FRAME_OFFSET): Likewise.
4838         * config/pdp11/pdp11.h (STARTING_FRAME_OFFSET): Likewise.
4839         * config/riscv/riscv.h (STARTING_FRAME_OFFSET): Likewise.
4840         * config/rl78/rl78.h (STARTING_FRAME_OFFSET): Likewise.
4841         * config/rx/rx.h (STARTING_FRAME_OFFSET): Likewise.
4842         * config/s390/s390.h (STARTING_FRAME_OFFSET): Likewise.
4843         * config/sh/sh.h (STARTING_FRAME_OFFSET): Likewise.
4844         * config/sparc/sparc.c (sparc_compute_frame_size): Likewise.
4845         * config/sparc/sparc.h (STARTING_FRAME_OFFSET): Likewise.
4846         * config/spu/spu.h (STARTING_FRAME_OFFSET): Likewise.
4847         * config/stormy16/stormy16.h (STARTING_FRAME_OFFSET): Likewise.
4848         * config/tilegx/tilegx.h (STARTING_FRAME_OFFSET): Likewise.
4849         * config/tilepro/tilepro.h (STARTING_FRAME_OFFSET): Likewise.
4850         * config/v850/v850.h (STARTING_FRAME_OFFSET): Likewise.
4851         * config/visium/visium.h (STARTING_FRAME_OFFSET): Likewise.
4852         * config/avr/avr.h (STARTING_FRAME_OFFSET): Likewise.
4853         * config/avr/avr-protos.h (avr_starting_frame_offset): Likewise.
4854         * config/avr/avr.c (avr_starting_frame_offset): Make static and
4855         return a HOST_WIDE_INT.
4856         (avr_builtin_setjmp_frame_value): Use it instead of
4857         STARTING_FRAME_OFFSET.
4858         (TARGET_STARTING_FRAME_OFFSET): Redefine.
4859         * config/epiphany/epiphany.h (STARTING_FRAME_OFFSET): Delete.
4860         * config/epiphany/epiphany.c (epiphany_starting_frame_offset):
4861         New function.
4862         (TARGET_STARTING_FRAME_OFFSET): Redefine.
4863         * config/iq2000/iq2000.h (STARTING_FRAME_OFFSET): Delete.
4864         * config/iq2000/iq2000.c (iq2000_starting_frame_offset): New function.
4865         (TARGET_CONSTANT_ALIGNMENT): Redefine.
4866         * config/lm32/lm32.h (STARTING_FRAME_OFFSET): Delete.
4867         * config/lm32/lm32.c (lm32_starting_frame_offset): New function.
4868         (TARGET_STARTING_FRAME_OFFSET): Redefine.
4869         * config/m32r/m32r.h (STARTING_FRAME_OFFSET): Delete.
4870         * config/m32r/m32r.c (m32r_starting_frame_offset): New function.
4871         (TARGET_STARTING_FRAME_OFFSET): Redefine.
4872         * config/microblaze/microblaze.h (STARTING_FRAME_OFFSET): Delete.
4873         * config/microblaze/microblaze.c (microblaze_starting_frame_offset):
4874         New function.
4875         (TARGET_STARTING_FRAME_OFFSET): Redefine.
4876         * config/mips/mips.h (STARTING_FRAME_OFFSET): Delete.
4877         * config/mips/mips.c (mips_compute_frame_info): Refer to
4878         TARGET_STARTING_FRAME_OFFSET instead of STARTING_FRAME_OFFSET.
4879         (mips_starting_frame_offset): New function.
4880         (TARGET_STARTING_FRAME_OFFSET): Redefine.
4881         * config/mmix/mmix.h (STARTING_FRAME_OFFSET): Delete.
4882         * config/mmix/mmix-protos.h (mmix_starting_frame_offset): Delete.
4883         * config/mmix/mmix.c (mmix_starting_frame_offset): Make static
4884         and return a HOST_WIDE_INT.
4885         (TARGET_STARTING_FRAME_OFFSET): Redefine.
4886         (mmix_initial_elimination_offset): Refer to
4887         TARGET_STARTING_FRAME_OFFSET instead of STARTING_FRAME_OFFSET.
4888         * config/pa/pa.h (STARTING_FRAME_OFFSET): Delete.
4889         * config/pa/pa.c (pa_starting_frame_offset): New function.
4890         (pa_compute_frame_size): Use it instead of STARTING_FRAME_OFFSET.
4891         (pa_expand_prologue): Likewise.
4892         (TARGET_STARTING_FRAME_OFFSET): Redefine.
4893         * config/powerpcspe/aix.h (STARTING_FRAME_OFFSET): Split out
4894         !FRAME_GROWS_DOWNWARD handling to...
4895         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
4896         * config/powerpcspe/darwin.h (STARTING_FRAME_OFFSET): Split out
4897         !FRAME_GROWS_DOWNWARD handling to...
4898         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
4899         * config/powerpcspe/powerpcspe.h (STARTING_FRAME_OFFSET): Split out
4900         !FRAME_GROWS_DOWNWARD handling to...
4901         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
4902         * config/powerpcspe/powerpcspe.c (TARGET_STARTING_FRAME_OFFSET):
4903         Redefine.
4904         (rs6000_starting_frame_offset): New function.
4905         * config/rs6000/aix.h (STARTING_FRAME_OFFSET): Split out
4906         !FRAME_GROWS_DOWNWARD handling to...
4907         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
4908         * config/rs6000/darwin.h (STARTING_FRAME_OFFSET): Split out
4909         !FRAME_GROWS_DOWNWARD handling to...
4910         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
4911         * config/rs6000/rs6000.h (STARTING_FRAME_OFFSET): Split out
4912         !FRAME_GROWS_DOWNWARD handling to...
4913         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
4914         * config/rs6000/rs6000.c (TARGET_STARTING_FRAME_OFFSET): Refine.
4915         (rs6000_starting_frame_offset): New function.
4916         * config/vax/elf.h (STARTING_FRAME_OFFSET): Delete.
4917         * config/vax/vax.h (STARTING_FRAME_OFFSET): Delete.
4918         * config/vax/vax.c (vax_starting_frame_offset): New function.
4919         (vax_expand_prologue): Use it instead of STARTING_FRAME_OFFSET.
4920         (TARGET_STARTING_FRAME_OFFSET): Redefine.
4921         * config/xtensa/xtensa.h (STARTING_FRAME_OFFSET): Delete.
4922         * config/xtensa/xtensa.c (xtensa_starting_frame_offset): New function.
4923         (TARGET_STARTING_FRAME_OFFSET): Redefine.
4924         * system.h (STARTING_FRAME_OFFSET): Poison.
4926 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
4928         * tree-vect-loop.c (vect_create_epilog_for_reduction): Use
4929         SCALAR_TYPE_MODE instead of TYPE_MODE.
4931 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
4932             Alan Hayward  <alan.hayward@arm.com>
4933             David Sherwood  <david.sherwood@arm.com>
4935         * dwarf2out.c (loc_list_from_tree_1): Use SCALAR_INT_TYPE_MODE
4937 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
4938             Alan Hayward  <alan.hayward@arm.com>
4939             David Sherwood  <david.sherwood@arm.com>
4941         * expmed.c (expand_shift_1): Use scalar_mode for scalar_mode.
4943 2017-10-23  Richard Biener  <rguenther@suse.de>
4945         PR tree-optimization/82129
4946         * tree-ssa-pre.c (bitmap_set_and): Remove.
4947         (compute_antic_aux): Compute ANTIC_OUT intersection in a way
4948         canonicalizing expressions in the set to those with lowest
4949         ID rather than taking that from the first edge.
4951 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
4953         * combine.c (rtx_equal_for_field_assignment_p): Use
4954         byte_lowpart_offset.
4956 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
4957             Alan Hayward  <alan.hayward@arm.com>
4958             David Sherwood  <david.sherwood@arm.com>
4960         * internal-fn.c (expand_direct_optab_fn): Don't assign directly
4961         to a SUBREG_PROMOTED_VAR.
4963 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
4964             Alan Hayward  <alan.hayward@arm.com>
4965             David Sherwood  <david.sherwood@arm.com>
4967         * cfgexpand.c (expand_debug_expr): Use GET_MODE_UNIT_PRECISION.
4968         (expand_debug_source_expr): Likewise.
4969         * combine.c (combine_simplify_rtx): Likewise.
4970         * cse.c (fold_rtx): Likewise.
4971         * optabs.c (expand_float): Likewise.
4972         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
4973         (simplify_binary_operation_1): Likewise.
4975 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
4976             Alan Hayward  <alan.hayward@arm.com>
4977             David Sherwood  <david.sherwood@arm.com>
4979         * combine.c (simplify_comparison): Use HWI_COMPUTABLE_MODE_P.
4980         (record_promoted_value): Likewise.
4981         * expr.c (expand_expr_real_2): Likewise.
4982         * ree.c (update_reg_equal_equiv_notes): Likewise.
4983         (combine_set_extension): Likewise.
4984         * rtlanal.c (low_bitmask_len): Likewise.
4985         * simplify-rtx.c (neg_const_int): Likewise.
4986         (simplify_binary_operation_1): Likewise.
4988 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
4989             Alan Hayward  <alan.hayward@arm.com>
4990             David Sherwood  <david.sherwood@arm.com>
4992         * lra-spills.c (assign_mem_slot): Use subreg_size_lowpart_offset.
4993         * regcprop.c (maybe_mode_change): Likewise.
4994         * reload1.c (alter_reg): Likewise.
4996 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
4998         * inchash.h (inchash::hash::add_wide_int): New function.
4999         * lto-streamer-out.c (hash_tree): Use it.
5001 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
5003         * inchash.h (inchash::hash::add_wide_int): Rename to...
5004         (inchash::hash::add_hwi): ...this.
5005         * ipa-devirt.c (hash_odr_vtable): Update accordingly.
5006         (polymorphic_call_target_hasher::hash): Likewise.
5007         * ipa-icf.c (sem_function::get_hash, sem_function::init): Likewise.
5008         (sem_item::add_expr, sem_item::add_type, sem_variable::get_hash)
5009         (sem_item_optimizer::update_hash_by_addr_refs): Likewise.
5010         * lto-streamer-out.c (hash_tree): Likewise.
5011         * optc-save-gen.awk: Likewise.
5012         * tree.c (add_expr): Likewise.
5014 2017-10-22  Uros Bizjak  <ubizjak@gmail.com>
5016         PR target/52451
5017         * config/i386/i386.c (ix86_fp_compare_mode): Return CCFPmode
5018         for ordered inequality comparisons even with TARGET_IEEE_FP.
5020 2017-10-22  Uros Bizjak  <ubizjak@gmail.com>
5022         PR target/82628
5023         * config/i386/i386.md (cmp<dwi>_doubleword): New pattern.
5024         * config/i386/i386.c (ix86_expand_branch) <case E_TImode>:
5025         Expand with cmp<dwi>_doubleword.
5027 2017-10-21  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
5029         * extend.texi: Add x86 specific to 'nocf_check' attribute.
5030         List CET intrinsics.
5031         * invoke.texi: Add -mcet, -mibt, -mshstk options.  Add x86
5032         specific to -fcf-protection option.
5034 2017-10-21  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
5036         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET): New.
5037         (OPTION_MASK_ISA_SHSTK_SET): Likewise.
5038         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
5039         (OPTION_MASK_ISA_SHSTK_UNSET): Likewise.
5040         (ix86_handle_option): Add -mibt, -mshstk, -mcet handling.
5041         * config.gcc (extra_headers): Add cetintrin.h for x86 targets.
5042         (extra_objs): Add cet.o for Linux/x86 targets.
5043         (tmake_file): Add i386/t-cet for Linux/x86 targets.
5044         * config/i386/cet.c: New file.
5045         * config/i386/cetintrin.h: Likewise.
5046         * config/i386/t-cet: Likewise.
5047         * config/i386/cpuid.h (bit_SHSTK): New.
5048         (bit_IBT): Likewise.
5049         * config/i386/driver-i386.c (host_detect_local_cpu): Detect and
5050         pass IBT and SHSTK bits.
5051         * config/i386/i386-builtin-types.def
5052         (VOID_FTYPE_UNSIGNED_PVOID): New.
5053         (VOID_FTYPE_UINT64_PVOID): Likewise.
5054         * config/i386/i386-builtin.def: Add CET intrinsics.
5055         * config/i386/i386-c.c (ix86_target_macros_internal): Add
5056         OPTION_MASK_ISA_IBT, OPTION_MASK_ISA_SHSTK handling.
5057         * config/i386/i386-passes.def: Add pass_insert_endbranch pass.
5058         * config/i386/i386-protos.h (make_pass_insert_endbranch): New
5059         prototype.
5060         * config/i386/i386.c (rest_of_insert_endbranch): New.
5061         (pass_data_insert_endbranch): Likewise.
5062         (pass_insert_endbranch): Likewise.
5063         (make_pass_insert_endbranch): Likewise.
5064         (ix86_notrack_prefixed_insn_p): Likewise.
5065         (ix86_target_string): Add -mibt, -mshstk flags.
5066         (ix86_option_override_internal): Add flag_cf_protection
5067         processing.
5068         (ix86_valid_target_attribute_inner_p): Set OPT_mibt, OPT_mshstk.
5069         (ix86_print_operand): Add 'notrack' prefix output.
5070         (ix86_init_mmx_sse_builtins): Add CET intrinsics.
5071         (ix86_expand_builtin): Expand CET intrinsics.
5072         (x86_output_mi_thunk): Add 'endbranch' instruction.
5073         * config/i386/i386.h (TARGET_IBT): New.
5074         (TARGET_IBT_P): Likewise.
5075         (TARGET_SHSTK): Likewise.
5076         (TARGET_SHSTK_P): Likewise.
5077         * config/i386/i386.md (unspecv): Add UNSPECV_NOP_RDSSP,
5078         UNSPECV_INCSSP, UNSPECV_SAVEPREVSSP, UNSPECV_RSTORSSP,
5079         UNSPECV_WRSS, UNSPECV_WRUSS, UNSPECV_SETSSBSY, UNSPECV_CLRSSBSY.
5080         (builtin_setjmp_setup): New pattern.
5081         (builtin_longjmp): Likewise.
5082         (rdssp<mode>): Likewise.
5083         (incssp<mode>): Likewise.
5084         (saveprevssp): Likewise.
5085         (rstorssp): Likewise.
5086         (wrss<mode>): Likewise.
5087         (wruss<mode>): Likewise.
5088         (setssbsy): Likewise.
5089         (clrssbsy): Likewise.
5090         (nop_endbr): Likewise.
5091         * config/i386/i386.opt: Add -mcet, -mibt, -mshstk and -mcet-switch
5092         options.
5093         * config/i386/immintrin.h: Include <cetintrin.h>.
5094         * config/i386/linux-common.h
5095         (file_end_indicate_exec_stack_and_cet): New prototype.
5096         (TARGET_ASM_FILE_END): New.
5098 2017-10-20  Jan Hubicka  <hubicka@ucw.cz>
5100         * i386.c (ix86_builtin_vectorization_cost): Use existing rtx_cost
5101         latencies instead of having separate table; make difference between
5102         integer and float costs.
5103         * i386.h (processor_costs): Remove scalar_stmt_cost,
5104         scalar_load_cost, scalar_store_cost, vec_stmt_cost, vec_to_scalar_cost,
5105         scalar_to_vec_cost, vec_align_load_cost, vec_unalign_load_cost,
5106         vec_store_cost.
5107         * x86-tune-costs.h: Remove entries which has been removed in
5108         procesor_costs from all tables; make cond_taken_branch_cost
5109         and cond_not_taken_branch_cost COST_N_INSNS based.
5111 2017-10-20  Jan Hubicka  <hubicka@ucw.cz>
5113         * x86-tune-costs.h (intel_cost, generic_cost): Fix move costs.
5115 2017-10-20  Jakub Jelinek  <jakub@redhat.com>
5117         * config/i386/i386.md (isa): Remove fma_avx512f.
5118         * config/i386/sse.md (<avx512>_fmadd_<mode>_mask<round_name>,
5119         <avx512>_fmadd_<mode>_mask3<round_name>,
5120         <avx512>_fmsub_<mode>_mask<round_name>,
5121         <avx512>_fmsub_<mode>_mask3<round_name>,
5122         <avx512>_fnmadd_<mode>_mask<round_name>,
5123         <avx512>_fnmadd_<mode>_mask3<round_name>,
5124         <avx512>_fnmsub_<mode>_mask<round_name>,
5125         <avx512>_fnmsub_<mode>_mask3<round_name>,
5126         <avx512>_fmaddsub_<mode>_mask<round_name>,
5127         <avx512>_fmaddsub_<mode>_mask3<round_name>,
5128         <avx512>_fmsubadd_<mode>_mask<round_name>,
5129         <avx512>_fmsubadd_<mode>_mask3<round_name>): Remove isa attribute.
5130         (*vec_widen_umult_even_v16si<mask_name>,
5131         *vec_widen_smult_even_v16si<mask_name>): Likewise.
5132         (<mask_codefor>avx512bw_dbpsadbw<mode><mask_name>): Likewise.
5134 2017-10-20  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
5136         * extend.texi: Add 'nocf_check' documentation.
5137         * gimple.texi: Add second parameter to
5138         gimple_build_call_from_tree.
5139         * invoke.texi: Add -fcf-protection documentation.
5140         * rtl.texi: Add REG_CALL_NOTRACK documenation.
5142 2017-10-20  Richard Biener  <rguenther@suse.de>
5144         PR tree-optimization/82473
5145         * tree-vect-loop.c (vectorizable_reduction): Properly get at
5146         the largest input type.
5148 2017-10-20  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
5150         * c-attribs.c (handle_nocf_check_attribute): New function.
5151         (c_common_attribute_table): Add 'nocf_check' handling.
5152         * gimple-parser.c: Add second argument NULL to
5153         gimple_build_call_from_tree.
5154         * attrib.c (comp_type_attributes): Check nocf_check attribute.
5155         * cfgexpand.c (expand_call_stmt): Set REG_CALL_NOCF_CHECK for
5156         call insn.
5157         * combine.c (distribute_notes): Add REG_CALL_NOCF_CHECK handling.
5158         * common.opt: Add fcf-protection flag.
5159         * emit-rtl.c (try_split): Add REG_CALL_NOCF_CHECK handling.
5160         * flag-types.h: Add enum cf_protection_level.
5161         * gimple.c (gimple_build_call_from_tree): Add second parameter.
5162         Add 'nocf_check' attribute propagation to gimple call.
5163         * gimple.h (gf_mask): Add GF_CALL_NOCF_CHECK.
5164         (gimple_build_call_from_tree): Update prototype.
5165         (gimple_call_nocf_check_p): New function.
5166         (gimple_call_set_nocf_check): Likewise.
5167         * gimplify.c: Add second argument to gimple_build_call_from_tree.
5168         * ipa-icf.c: Add nocf_check attribute in statement hash.
5169         * recog.c (peep2_attempt): Add REG_CALL_NOCF_CHECK handling.
5170         * reg-notes.def: Add REG_NOTE (CALL_NOCF_CHECK).
5171         * toplev.c (process_options): Add flag_cf_protection handling.
5173 2017-10-19  Jan Hubicka  <hubicka@ucw.cz>
5175         * x86-tune-costs.h (core_cost): Fix div, move and sqrt latencies.
5177 2017-10-20  Richard Biener  <rguenther@suse.de>
5179         PR tree-optimization/82603
5180         * tree-if-conv.c (predicate_mem_writes): Make sure to only
5181         remove false predicated stores.
5183 2017-10-20  Richard Biener  <rguenther@suse.de>
5185         * graphite-isl-ast-to-gimple.c
5186         (translate_isl_ast_to_gimple::graphite_copy_stmts_from_block):
5187         Remove return value and simplify, dump copied stmt after lhs
5188         adjustment.
5189         (translate_isl_ast_to_gimple::translate_isl_ast_node_user):
5190         Reduce dump verbosity.
5191         (gsi_insert_earliest): Likewise.
5192         (translate_isl_ast_to_gimple::copy_bb_and_scalar_dependences): Adjust.
5193         * graphite.c (print_global_statistics): Adjust dumping.
5194         (print_graphite_scop_statistics): Likewise.
5195         (print_graphite_statistics): Do not dump loops here.
5196         (graphite_transform_loops): But here.
5198 2017-10-20  Nicolas Roche  <roche@adacore.com>
5200         * configure.ac (ACX_PROG_GNAT): Append "libgnat" to include search dir.
5201         * configure: Regenerate.
5203 2017-10-20  Jakub Jelinek  <jakub@redhat.com>
5205         PR target/82158
5206         * tree-cfg.c (pass_warn_function_return::execute): In noreturn
5207         functions when optimizing replace GIMPLE_RETURN stmts with
5208         calls to __builtin_unreachable ().
5210         PR sanitizer/82595
5211         * config/gnu-user.h (LIBTSAN_EARLY_SPEC): Add libtsan_preinit.o
5212         for -fsanitize=thread link of executables.
5213         (LIBLSAN_EARLY_SPEC): Add liblsan_preinit.o for -fsanitize=leak
5214         link of executables.
5216         PR target/82370
5217         * config/i386/sse.md (VI248_AVX2, VI248_AVX512BW, VI248_AVX512BW_2):
5218         New mode iterators.
5219         (<shift_insn><mode>3<mask_name>): Change the last of the 3
5220         define_insns for logical vector shifts to use VI248_AVX512BW
5221         iterator instead of VI48_AVX512, remove <mask_mode512bit_condition>
5222         condition, useless isa and prefix attributes.  Change the first
5223         2 of these define_insns to ...
5224         (<mask_codefor><shift_insn><mode>3<mask_name>): ... this, new
5225         define_insn for avx512vl.
5226         (<shift_insn><mode>3): ... and this, new define_insn without
5227         masking for non-avx512vl.
5229         PR target/82370
5230         * config/i386/sse.md (*andnot<mode>3,
5231         <mask_codefor><code><mode>3<mask_name>, *<code><mode>3): Split
5232         (=v,v,vm) alternative into (=x,x,xm) and (=v,v,vm), for 128-bit
5233         and 256-bit vectors, the (=x,x,xm) alternative and when mask is
5234         not applied use empty suffix even for TARGET_AVX512VL.
5235         * config/i386/subst.md (mask_prefix3, mask_prefix4): When mask
5236         is applied, supply evex,evex or evex,evex,evex instead of just
5237         evex.
5239 2017-10-20  Julia Koval  <julia.koval@intel.com>
5241         * common/config/i386/i386-common.c (OPTION_MASK_ISA_GFNI_SET,
5242         (OPTION_MASK_ISA_GFNI_UNSET): New.
5243         (ix86_handle_option): Handle OPT_mgfni.
5244         * config/i386/cpuid.h (bit_GFNI): New.
5245         * config/i386/driver-i386.c (host_detect_local_cpu): Detect gfni.
5246         * config/i386/i386-c.c (ix86_target_macros_internal): Define __GFNI__.
5247         * config/i386/i386.c (ix86_target_string): Add -mgfni.
5248         (ix86_valid_target_attribute_inner_p): Add OPT_mgfni.
5249         * config/i386/i386.h (TARGET_GFNI, TARGET_GFNI_P): New.
5250         * config/i386/i386.opt: Add mgfni.
5252 2017-10-20  Orlando Arias  <oarias@knights.ucf.edu>
5254         * config/msp430/msp430.c (msp430_option_override): Disable
5255         -fdelete-null-pointer-checks.
5256         * doc/invoke.text (-fdelete-null-pointer-checks): Document that.
5258 2017-10-19  Jan Hubicka  <hubicka@ucw.cz>
5260         * x86-tune-costs.h (generic_cost, core_cost): Correct costs
5261         of x87 and SSE instructions.
5263 2017-10-19  Jan Hubicka  <hubicka@ucw.cz>
5265         * asan.c (create_cond_insert_point): Do not update edge count.
5266         * auto-profile.c (afdo_propagate_edge): Update for edge count removal.
5267         (afdo_propagate_circuit): Likewise.
5268         (afdo_calculate_branch_prob): Likewise.
5269         (afdo_annotate_cfg): Likewise.
5270         * basic-block.h (struct edge_def): Remove count.
5271         (edge_def::count): New accessor.
5272         * bb-reorder.c (rotate_loop): Update.
5273         (find_traces_1_round): Update.
5274         (connect_traces): Update.
5275         (sanitize_hot_paths): Update.
5276         * cfg.c (unchecked_make_edge): Update.
5277         (make_single_succ_edge): Update.
5278         (check_bb_profile): Update.
5279         (dump_edge_info): Update.
5280         (update_bb_profile_for_threading): Update.
5281         (scale_bbs_frequencies_int): Update.
5282         (scale_bbs_frequencies_gcov_type): Update.
5283         (scale_bbs_frequencies_profile_count): Update.
5284         (scale_bbs_frequencies): Update.
5285         * cfganal.c (connect_infinite_loops_to_exit): Update.
5286         * cfgbuild.c (compute_outgoing_frequencies): Update.
5287         (find_many_sub_basic_blocks): Update.
5288         * cfgcleanup.c (try_forward_edges): Update.
5289         (try_crossjump_to_edge): Update
5290         * cfgexpand.c (expand_gimple_cond): Update
5291         (expand_gimple_tailcall): Update
5292         (construct_exit_block): Update
5293         * cfghooks.c (verify_flow_info): Update
5294         (redirect_edge_succ_nodup): Update
5295         (split_edge): Update
5296         (make_forwarder_block): Update
5297         (duplicate_block): Update
5298         (account_profile_record): Update
5299         * cfgloop.c (find_subloop_latch_edge_by_profile): Update.
5300         * cfgloopanal.c (expected_loop_iterations_unbounded): Update.
5301         * cfgloopmanip.c (scale_loop_profile): Update.
5302         (loopify): Update.
5303         (lv_adjust_loop_entry_edge): Update.
5304         * cfgrtl.c (try_redirect_by_replacing_jump): Update.
5305         (force_nonfallthru_and_redirect): Update.
5306         (purge_dead_edges): Update.
5307         (rtl_flow_call_edges_add): Update.
5308         * cgraphunit.c (init_lowered_empty_function): Update.
5309         (cgraph_node::expand_thunk): Update.
5310         * gimple-pretty-print.c (dump_probability): Update.
5311         (dump_edge_probability): Update.
5312         * gimple-ssa-isolate-paths.c (isolate_path): Update.
5313         * haifa-sched.c (sched_create_recovery_edges): Update.
5314         * hsa-gen.c (convert_switch_statements): Update.
5315         * ifcvt.c (dead_or_predicable): Update.
5316         * ipa-inline-transform.c (inline_transform): Update.
5317         * ipa-split.c (split_function): Update.
5318         * ipa-utils.c (ipa_merge_profiles): Update.
5319         * loop-doloop.c (add_test): Update.
5320         * loop-unroll.c (unroll_loop_runtime_iterations): Update.
5321         * lto-streamer-in.c (input_cfg): Update.
5322         (input_function): Update.
5323         * lto-streamer-out.c (output_cfg): Update.
5324         * modulo-sched.c (sms_schedule): Update.
5325         * postreload-gcse.c (eliminate_partially_redundant_load): Update.
5326         * predict.c (maybe_hot_edge_p): Update.
5327         (unlikely_executed_edge_p): Update.
5328         (probably_never_executed_edge_p): Update.
5329         (dump_prediction): Update.
5330         (drop_profile): Update.
5331         (propagate_unlikely_bbs_forward): Update.
5332         (determine_unlikely_bbs): Update.
5333         (force_edge_cold): Update.
5334         * profile.c (compute_branch_probabilities): Update.
5335         * reg-stack.c (better_edge): Update.
5336         * shrink-wrap.c (handle_simple_exit): Update.
5337         * tracer.c (better_p): Update.
5338         * trans-mem.c (expand_transaction): Update.
5339         (split_bb_make_tm_edge): Update.
5340         * tree-call-cdce.c: Update.
5341         * tree-cfg.c (gimple_find_sub_bbs): Update.
5342         (gimple_split_edge): Update.
5343         (gimple_duplicate_sese_region): Update.
5344         (gimple_duplicate_sese_tail): Update.
5345         (gimple_flow_call_edges_add): Update.
5346         (insert_cond_bb): Update.
5347         (execute_fixup_cfg): Update.
5348         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update.
5349         * tree-complex.c (expand_complex_div_wide): Update.
5350         * tree-eh.c (lower_resx): Update.
5351         (unsplit_eh): Update.
5352         (cleanup_empty_eh_move_lp): Update.
5353         * tree-inline.c (copy_edges_for_bb): Update.
5354         (freqs_to_counts): Update.
5355         (copy_cfg_body): Update.
5356         * tree-ssa-dce.c (remove_dead_stmt): Update.
5357         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
5358         * tree-ssa-loop-im.c (execute_sm_if_changed): Update.
5359         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update.
5360         (unloop_loops): Update.
5361         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
5362         * tree-ssa-loop-split.c (connect_loops): Update.
5363         (split_loop): Update.
5364         * tree-ssa-loop-unswitch.c (hoist_guard): Update.
5365         * tree-ssa-phionlycprop.c (propagate_rhs_into_lhs): Update.
5366         * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Update.
5367         * tree-ssa-reassoc.c (branch_fixup): Update.
5368         * tree-ssa-tail-merge.c (replace_block_by): Update.
5369         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Update.
5370         (compute_path_counts): Update.
5371         (update_profile): Update.
5372         (recompute_probabilities): Update.
5373         (update_joiner_offpath_counts): Update.
5374         (estimated_freqs_path): Update.
5375         (freqs_to_counts_path): Update.
5376         (clear_counts_path): Update.
5377         (ssa_fix_duplicate_block_edges): Update.
5378         (duplicate_thread_path): Update.
5379         * tree-switch-conversion.c (hoist_edge_and_branch_if_true): Update.
5380         (case_bit_test_cmp): Update.
5381         (collect_switch_conv_info): Update.
5382         (gen_inbound_check): Update.
5383         (do_jump_if_equal): Update.
5384         (emit_cmp_and_jump_insns): Update.
5385         * tree-tailcall.c (decrease_profile): Update.
5386         (eliminate_tail_call): Update.
5387         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
5388         (vect_do_peeling): Update.
5389         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
5390         * ubsan.c (ubsan_expand_null_ifn): Update.
5391         (ubsan_expand_ptr_ifn): Update.
5392         * value-prof.c (gimple_divmod_fixed_value): Update.
5393         (gimple_mod_pow2): Update.
5394         (gimple_mod_subtract): Update.
5395         (gimple_ic): Update.
5396         (gimple_stringop_fixed_value): Update.
5398 2017-10-19  Uros Bizjak  <ubizjak@gmail.com>
5400         PR target/82618
5401         * config/i386/i386.md (sub to cmp): New peephole2 pattern.
5403 2017-10-19  Alexander Monakov  <amonakov@ispras.ru>
5405         PR rtl-optimization/82395
5406         * ira-color.c (allocno_priority_compare_func): Fix comparison step
5407         based on non_spilled_static_chain_regno_p.
5409 2017-10-19  Uros Bizjak  <ubizjak@gmail.com>
5411         * config/i386/i386.c (output_387_binary_op): Rewrite SSE part.
5412         (ix86_emit_mode_set): Rewrite insn mnemonic construction.
5413         (ix86_prepare_fp_compare_args): Redefine is_sse as bool.
5415 2017-10-19  Martin Sebor  <msebor@redhat.com>
5417         PR tree-optimization/82596
5418         * tree.c (array_at_struct_end_p): Handle STRING_CST.
5420 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
5422         * asan.c (handle_builtin_alloca): Deal with all alloca variants.
5423         (get_mem_refs_of_builtin_call): Likewise.
5424         * builtins.c (expand_builtin_apply): Adjust call to
5425         allocate_dynamic_stack_space.
5426         (expand_builtin_alloca): For __builtin_alloca_with_align_and_max, pass
5427         the third argument to allocate_dynamic_stack_space, otherwise -1.
5428         (expand_builtin): Deal with all alloca variants.
5429         (is_inexpensive_builtin): Likewise.
5430         * builtins.def (BUILT_IN_ALLOCA_WITH_ALIGN_AND_MAX): New.
5431         * calls.c (special_function_p): Deal with all alloca variants.
5432         (initialize_argument_information): Adjust call to
5433         allocate_dynamic_stack_space.
5434         (expand_call): Likewise.
5435         * cfgexpand.c (expand_call_stmt): Deal with all alloca variants.
5436         * doc/extend.texi (Built-ins): Add __builtin_alloca_with_align_and_max
5437         * explow.c (allocate_dynamic_stack_space): Add MAX_SIZE parameter and
5438         use it for the stack usage computation.
5439         * explow.h (allocate_dynamic_stack_space): Adjust prototype.
5440         * function.c (gimplify_parameters): Call build_alloca_call_expr.
5441         * gimple-ssa-warn-alloca.c (alloca_call_type): Simplify control flow.
5442         Take into account 3rd argument of __builtin_alloca_with_align_and_max.
5443         (in_loop_p): Remove first argument and useless check.
5444         (pass_walloca::execute): Remove useless test and adjust call to above.
5445         * gimple.c (gimple_build_call_from_tree): Deal with all alloc variants
5446         * gimplify.c (gimplify_vla_decl): Call build_alloca_call_expr.
5447         (gimplify_call_expr): Deal with all alloca variants.
5448         * hsa-gen.c (gen_hsa_alloca): Likewise.
5449         (gen_hsa_insns_for_call): Likewise.
5450         * ipa-pure-const.c (special_builtin_state): Likewise.
5451         * tree-chkp.c (chkp_build_returned_bound): Likewise.
5452         * tree-object-size.c (alloc_object_size): Likewise.
5453         * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Likewise.
5454         (call_may_clobber_ref_p_1): Likewise.
5455         * tree-ssa-ccp.c (evaluate_stmt): Likewise.
5456         (ccp_fold_stmt): Likewise.
5457         (optimize_stack_restore): Likewise.
5458         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
5459         (mark_all_reaching_defs_necessary_1): Likewise.
5460         (propagate_necessity): Likewise.
5461         (eliminate_unnecessary_stmts): Likewise.
5462         * tree.c (build_common_builtin_nodes): Build
5463         BUILT_IN_ALLOCA_WITH_ALIGN_AND_MAX.
5464         (build_alloca_call_expr): New function.
5465         * tree.h (ALLOCA_FUNCTION_CODE_P): New macro.
5466         (CASE_BUILT_IN_ALLOCA): Likewise.
5467         (build_alloca_call_expr): Declare.
5468         * varasm.c (incorporeal_function_p): Deal with all alloca variants.
5470 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
5472         PR debug/82509
5473         * dwarf2out.c (new_die_raw): New static inline function.
5474         (new_die): Use it to create the DIE.
5475         (add_AT_external_die_ref): Likewise.
5476         (clone_die): Likewise.
5477         (clone_as_declaration): Likewise.
5478         (dwarf2out_vms_debug_main_pointer): Likewise.
5479         (base_type_die): Likewise.  Remove early return for corner cases.
5480         Do not call add_pubtype on the DIE here.
5481         (is_base_type): Remove ERROR_MARK and return 0 for VOID_TYPE.
5482         (modified_type_die): Adjust the lookup for reverse order DIEs.  Skip
5483         typedefs for base types with DW_AT_endianity.  Make sure a DIE with
5484         native order exists for base types, attach the DIE manually and call
5485         add_pubtype on it.  Do not equate a reverse order DIE to the type.
5487 2017-10-19  Richard Earnshaw  <rearnsha@arm.com>
5489         * config/arm/arm.c (align_ok_ldrd_strd): New function.
5490         (mem_ok_for_ldrd_strd): New parameter align.  Extract the alignment of
5491         the mem into it.
5492         (gen_operands_ldrd_strd): Validate the alignment of the accesses.
5494 2017-10-19  Jakub Jelinek  <jakub@redhat.com>
5496         * flag-types.h (enum sanitize_code): Add SANITIZE_BUILTIN.  Or
5497         SANITIZE_BUILTIN into SANITIZE_UNDEFINED.
5498         * sanitizer.def (BUILT_IN_UBSAN_HANDLE_INVALID_BUILTIN,
5499         BUILT_IN_UBSAN_HANDLE_INVALID_BUILTIN_ABORT): New builtins.
5500         * opts.c (sanitizer_opts): Add builtin.
5501         * ubsan.c (instrument_builtin): New function.
5502         (pass_ubsan::execute): Call it.
5503         (pass_ubsan::gate): Enable even for SANITIZE_BUILTIN.
5504         * doc/invoke.texi: Document -fsanitize=builtin.
5506         * ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch
5507         builtins, store max (log2 (align), 0) into uchar field instead of
5508         align into uptr field.
5509         (ubsan_expand_objsize_ifn): Use _v1 suffixed type mismatch builtins,
5510         store uchar 0 field instead of uptr 0 field.
5511         (instrument_nonnull_return): Use _v1 suffixed nonnull return builtin,
5512         instead of passing one address of struct with 2 locations pass
5513         two addresses of structs with 1 location each.
5514         * sanitizer.def (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH,
5515         BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_ABORT,
5516         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN,
5517         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_ABORT): Removed.
5518         (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1,
5519         BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1_ABORT,
5520         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1,
5521         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1_ABORT): New builtins.
5523 2017-10-19  Martin Liska  <mliska@suse.cz>
5525         PR driver/81829
5526         * file-find.c (remove_prefix): Remove.
5527         * file-find.h (remove_prefix): Likewise.
5528         * gcc-ar.c: Remove smartness of lookup.
5530 2017-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
5532         * config/rs6000/rs6000.md (*call_indirect_aix<mode>,
5533         *call_value_indirect_aix<mode>, *call_indirect_elfv2<mode>,
5534         *call_value_indirect_elfv2<mode>): Add correct mode to the unspec.
5536 2017-10-19  Jakub Jelinek  <jakub@redhat.com>
5538         PR target/82580
5539         * config/i386/i386.md (setcc + movzbl to xor + setcc): New peephole2.
5540         (setcc + and to xor + setcc): New peephole2.
5542 2017-10-19  Tom de Vries  <tom@codesourcery.com>
5544         * doc/sourcebuild.texi (Test Directives, Variants of
5545         dg-require-support): Add dg-require-stack-size.
5547 2017-10-19  Martin Liska  <mliska@suse.cz>
5549         PR sanitizer/82517
5550         * gimplify.c (gimplify_decl_expr): Do not instrument variables
5551         that have a large alignment.
5552         (gimplify_target_expr): Likewise.
5554 2017-10-18  Segher Boessenkool  <segher@kernel.crashing.org>
5556         PR rtl-optimization/82602
5557         * ira.c (rtx_moveable_p): Return false for volatile asm.
5559 2017-10-18  Uros Bizjak  <ubizjak@gmail.com>
5561         PR target/82580
5562         * config/i386/i386-modes.def (CCGZ): New CC mode.
5563         * config/i386/i386.md (sub<mode>3_carry_ccgz): New insn pattern.
5564         * config/i386/predicates.md (ix86_comparison_operator):
5565         Handle CCGZmode.
5566         * config/i386/i386.c (ix86_expand_branch) <case E_TImode>:
5567         Emulate LE, LEU, GT, GTU, LT, LTU, GE and GEU double-word comparisons
5568         with double-word subtraction.
5569         (put_condition_code): Handle CCGZmode.
5571 2017-10-18  Aldy Hernandez  <aldyh@redhat.com>
5573         * wide-int.cc (debug (const wide_int &)): New.
5574         (debug (const wide_int *)): New.
5575         (debug (const widest_int &)): New.
5576         (debug (const widest_int *)): New.
5578 2017-10-18  Vladimir Makarov  <vmakarov@redhat.com>
5580         PR middle-end/82556
5581         * lra-constraints.c (curr_insn_transform): Use non-input operand
5582         instead of output one for matched reload.
5584 2017-10-18  Bin Cheng  <bin.cheng@arm.com>
5586         * tree-loop-distribution.c (INCLUDE_ALGORITHM): New header file.
5587         (tree-ssa-loop-ivopts.h): New header file.
5588         (struct builtin_info): New fields.
5589         (classify_builtin_1): Compute and record base and offset parts for
5590         memset builtin partition by calling strip_offset.
5591         (offset_cmp, fuse_memset_builtins): New functions.
5592         (finalize_partitions): Fuse adjacent memset partitions by calling
5593         above function.
5594         * tree-ssa-loop-ivopts.c (strip_offset): Delete static declaration.
5595         Expose the interface.
5596         * tree-ssa-loop-ivopts.h (strip_offset): New declaration.
5598 2017-10-18  Bin Cheng  <bin.cheng@arm.com>
5600         PR tree-optimization/82574
5601         * tree-loop-distribution.c (find_single_drs): New parameter.  Check
5602         that data reference must be executed exactly once per iteration
5603         against the outermost loop in nest.
5604         (classify_partition): Update call to above function.
5606 2017-10-18  Richard Biener  <rguenther@suse.de>
5608         PR tree-optimization/82591
5609         * graphite.c (graphite_transform_loops): Move code gen message
5610         printing ...
5611         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
5612         Here.  Handle scop_to_isl_ast failing.
5613         (scop_to_isl_ast): Limit the number of ISL operations.
5615 2017-10-18  Richard Biener  <rguenther@suse.de>
5617         * graphite-isl-ast-to-gimple.c
5618         (translate_isl_ast_to_gimple::set_rename): Simplify.
5619         (translate_isl_ast_to_gimple::set_rename_for_each_def): Inline...
5620         (graphite_copy_stmts_from_block): ... here.
5621         (copy_bb_and_scalar_dependences): Simplify.
5622         (add_parameters_to_ivs_params): Canonicalize.
5623         (generate_entry_out_of_ssa_copies): Simplify.
5624         * graphite-sese-to-poly.c (extract_affine_name): Simplify
5625         by passing in ISL dimension.
5626         (parameter_index_in_region_1): Rename to ...
5627         (parameter_index_in_region): ... this.
5628         (extract_affine): Adjust assert, pass down parameter index.
5629         (add_param_constraints): Use range-info when available.
5630         (build_scop_context): Adjust.
5631         * sese.c (new_sese_info): Adjust.
5632         (free_sese_info): Likewise.
5633         * sese.h (bb_map_t, rename_map_t, phi_rename, init_back_edge_pair_t):
5634         Remove unused typedefs.
5635         (struct sese_info_t): Simplify rename_map, remove incomplete_phis.
5637 2017-10-18  Martin Liska  <mliska@suse.cz>
5639         * combine.c (simplify_compare_const): Add gcc_fallthrough.
5641 2017-10-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
5643         * config/s390/s390.c (s390_bb_fallthru_entry_likely): New function.
5644         (s390_sched_init): Do not reset s390_sched_state if we entered the
5645         current basic block via a fallthru edge and all others are unlikely.
5647 2017-10-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
5649         * config/s390/s390.c (NUM_SIDES): New variable.
5650         (LONGRUNNING_THRESHOLD): New variable.
5651         (LATENCY_FACTOR): New variable.
5652         (s390_sched_score): Decrease score for long-running instructions on
5653         wrong side.
5654         (s390_sched_variable_issue): Perform bookkeeping for long-running
5655         instructions.
5657 2017-10-18  Richard Biener  <rguenther@suse.de>
5659         * graphite-isl-ast-to-gimple.c (gcc_expression_from_isl_ast_expr_id):
5660         Simplify with removal of the parameter rename map.
5661         (set_rename): Likewise.
5662         (should_copy_to_new_region): Likewise.
5663         (graphite_copy_stmts_from_block): Likewise.
5664         (copy_bb_and_scalar_dependences): Remove initialization of
5665         unused copied_bb_map.
5666         (copy_def): Remove.
5667         (copy_internal_parameters): Likewise.
5668         (graphite_regenerate_ast_isl): Do not call copy_internal_parameters.
5669         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
5670         Use INTEGRAL_TYPE_P.
5671         (parameter_index_in_region_1): Rename to ...
5672         (assign_parameter_index_in_region): ... this.  Assert we have
5673         a parameter we handle.
5674         (scan_tree_for_params): Adjust.
5675         * sese.h (parameter_rename_map_t): Remove.
5676         (struct sese_info_t): Remove unused parameter_rename_map and
5677         copied_bb_map members.
5678         * sese.c (new_sese_info): Adjust.
5679         (free_sese_info): Likewise.
5681 2017-10-18  Martin Liska  <mliska@suse.cz>
5683         PR sanitizer/82545
5684         * asan.c (asan_expand_poison_ifn): Do not put gimple stmt
5685         on an abnormal edge.
5687 2017-10-18  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5689         * doc/invoke.texi (ffunction-sections and fdata-sections):
5690         Update.
5692 2017-10-17  Eric Botcazou  <ebotcazou@adacore.com>
5694         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Bail out only if
5695         the use statement can throw internally.
5697 2017-10-17  Eric Botcazou  <ebotcazou@adacore.com>
5699         * config/visium/visium.c (visium_select_cc_mode): Return CCmode for
5700         any RTX present on the RHS of a SET.
5701         * compare-elim.c (try_eliminate_compare): Restore comment.
5703 2017-10-17  Jakub Jelinek  <jakub@redhat.com>
5705         * langhooks.h (struct lang_hooks): Document that tree_size langhook
5706         may be also called on tcc_type nodes.
5707         * langhooks.c (lhd_tree_size): Likewise.
5709 2017-10-17  David Malcolm  <dmalcolm@redhat.com>
5711         * gimple-ssa-sprintf.c (fmtwarn): Update for changed signature of
5712         format_warning_at_substring.
5713         (maybe_warn): Convert source_range * param to a location_t.  Pass
5714         UNKNOWN_LOCATION rather than NULL to fmtwarn.
5715         (format_directive): Remove code to extract source_ranges and
5716         source_range * in favor of just a location_t.
5717         (parse_directive): Pass UNKNOWN_LOCATION rather than NULL to
5718         fmtwarn.
5719         * substring-locations.c (format_warning_va): Convert
5720         source_range * param to a location_t.
5721         (format_warning_at_substring): Likewise.
5722         * substring-locations.h (format_warning_va): Likewise.
5723         (format_warning_at_substring): Likewise.
5725 2017-10-17  Jan Hubicka  <hubicka@ucw.cz>
5727         * target.h (enum vect_cost_for_stmt): Add vec_gather_load and
5728         vec_scatter_store
5729         * tree-vect-stmts.c (record_stmt_cost): Make difference between normal
5730         and scatter/gather ops.
5732         * aarch64/aarch64.c (aarch64_builtin_vectorization_cost): Add
5733         vec_gather_load and vec_scatter_store.
5734         * arm/arm.c (arm_builtin_vectorization_cost): Likewise.
5735         * powerpcspe/powerpcspe.c (rs6000_builtin_vectorization_cost): Likewise.
5736         * rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Likewise.
5737         * s390/s390.c (s390_builtin_vectorization_cost): Likewise.
5738         * spu/spu.c (spu_builtin_vectorization_cost): Likewise.
5739         * i386/i386.c (x86_builtin_vectorization_cost): Likewise.
5741 2017-10-17  Uros Bizjak  <ubizjak@gmail.com>
5743         * reg-stack.c (compare_for_stack_reg): Add bool argument.
5744         Detect FTST instruction and handle its register pops.  Only pop
5745         second operand if can_pop_second_op is true.
5746         (subst_stack_regs_pat) <case COMPARE>: Detect FCOMI instruction to
5747         set can_pop_second_op to false in the compare_for_stack_reg call.
5749         * config/i386/i386.md (*cmpi<FPCMP:unord><MODEF:mode>): Only call
5750         output_fp_compare for stack register operands.
5751         * config/i386/i386.c (output_fp_compare): Do not output SSE compare
5752         instructions here.  Do not emit stack register pops here.  Assert
5753         that FCOMPP pops next to top stack register.  Rewrite function.
5755 2017-10-17  Nathan Sidwell  <nathan@acm.org>
5757         PR middle-end/82577
5758         * alias.c (compare_base_decls): Check HAS_DECL_ASSEMBLER_NAME_P,
5759         use DECL_ASSEMBLER_NAME_RAW.
5761         PR middle-end/82546
5762         * tree.c (tree_code_size): Reformat.  Punt to lang hook for unknown
5763         TYPE nodes.
5765 2017-10-17  Qing Zhao <qing.zhao@oracle.com>
5766             Wilco Dijkstra <wilco.dijkstra@arm.com>
5768         * builtins.c (expand_builtin_update_setjmp_buf): Add a
5769         converstion to Pmode from the buf_addr.
5771 2017-10-17  Richard Biener  <rguenther@suse.de>
5773         * graphite-dependences.c (scop_get_reads_and_writes): Change
5774         output parameters to references.
5776 2017-10-17  Jackson Woodruff  <jackson.woodruff@arm.com>
5778         PR 71026/tree-optimization
5779         * fold-const.c (distribute_real_division): Removed.
5780         (fold_binary_loc): Remove calls to distribute_real_divison.
5782 2017-10-17  Richard Biener  <rguenther@suse.de>
5784         * graphite-scop-detection.c
5785         (scop_detection::stmt_has_simple_data_refs_p): Always use
5786         the full nest as region.
5787         (try_generate_gimple_bb): Likewise.
5788         * sese.c (scalar_evolution_in_region): Simplify now that
5789         SCEV can handle instantiation in regions.
5790         * tree-scalar-evolution.c (instantiate_scev_name): Also instantiate
5791         in the non-loop part of a function if requested.
5793 2017-10-17  Richard Biener  <rguenther@suse.de>
5795         PR tree-optimization/82563
5796         * graphite-isl-ast-to-gimple.c (generate_entry_out_of_ssa_copies):
5797         New function.
5798         (graphite_regenerate_ast_isl): Call it.
5799         * graphite-scop-detection.c (build_scops): Remove entry edge split.
5801 2017-10-17  Jakub Jelinek  <jakub@redhat.com>
5803         PR tree-optimization/82549
5804         * fold-const.c (optimize_bit_field_compare, fold_truth_andor_1):
5805         Formatting fixes.  Instead of calling make_bit_field_ref with negative
5806         bitpos return 0.
5808 2017-10-17  Olga Makhotina  <olga.makhotina@intel.com>
5810         * config/i386/avx512dqintrin.h (_mm_mask_reduce_sd,
5811         _mm_maskz_reduce_sd, _mm_mask_reduce_ss,=20
5812         _mm_maskz_reduce_ss): New.
5813         * config/i386/i386-builtin.def (__builtin_ia32_reducesd_mask,
5814         __builtin_ia32_reducess_mask): Ditto..
5815         (__builtin_ia32_reducesd, __builtin_ia32_reducess): Remove.
5816         * config/i386/sse.md (reduces<mode>): Renamed to ...
5817         (reduces<mode><mask_scalar_name>): ... this.
5818         (vreduce<ssescalarmodesuffix>\t{%3, %2, %1, %0|%0, %1, %2, %3}):
5819         Changed to ...
5820         (vreduce<ssescalarmodesuffix>\t{%3, %2, %1, %0<mask_scalar_operand4>|
5821         %0<mask_scalar_operand4>, %1, %2, %3}): ... this.
5823 2017-10-16  David Malcolm  <dmalcolm@redhat.com>
5825         * Makefile.in (OBJS): Add unique-ptr-tests.o.
5826         * selftest-run-tests.c (selftest::run_tests): Call
5827         selftest::unique_ptr_tests_cc_tests.
5828         * selftest.h (selftest::unique_ptr_tests_cc_tests): New decl.
5829         * unique-ptr-tests.cc: New file.
5831 2017-10-16  Vladimir Makarov  <vmakarov@redhat.com>
5833         PR sanitizer/82353
5834         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
5835         locations.
5836         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
5837         (make_hard_regno_born, make_hard_regno_dead): Update
5838         bb_killed_pseudos and bb_gen_pseudos for fixed regs.
5840 2017-10-16  Jeff Law  <law@redhat.com>
5842         * tree-ssa-dse.c (live_bytes_read): Fix thinko.
5844 2017-10-16  Jan Hubicka  <hubicka@ucw.cz>
5846         * x86-tune-costs.h (znver1_cost): Fix move cost tables.
5848 2017-10-16  Olivier Hainque  <hainque@adacore.com>
5850         * gcc/config.gcc (powerpc*-*-*spe*): Pick 8548 as the default
5851         with_cpu if we were configured for an e500v2 target cpu name.
5853 2017-10-16  Thomas Preud'homme  <thomas.preudhomme@arm.com>
5855         * config/arm/arm-cpus.in (cortex-m33): Add nodsp option.
5856         * doc/invoke.texi: Document +nodsp as a valid extension for
5857         -mcpu=cortex-m33.
5859 2017-10-16  Martin Liska  <mliska@suse.cz>
5861         * sbitmap.c (bitmap_bit_in_range_p_checking): New function.
5862         (test_set_range): Likewise.
5863         (test_range_functions): Rename to ...
5864         (test_bit_in_range): ... this.
5865         (sbitmap_c_tests): Add new test.
5867 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
5869         * config/aarch64/arm_neon.h (vdot_u32, vdotq_u32, vdot_s32, vdotq_s32):
5870         New.
5871         (vdot_lane_u32, vdot_laneq_u32, vdotq_lane_u32, vdotq_laneq_u32): New.
5872         (vdot_lane_s32, vdot_laneq_s32, vdotq_lane_s32, vdotq_laneq_s32): New.
5874 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
5876         * config/aarch64/aarch64-builtins.c
5877         (aarch64_types_quadopu_lane_qualifiers): New.
5878         (TYPES_QUADOPU_LANE): New.
5879         * config/aarch64/aarch64-simd.md (aarch64_<sur>dot<vsi2qi>): New.
5880         (<sur>dot_prod<vsi2qi>, aarch64_<sur>dot_lane<vsi2qi>): New.
5881         (aarch64_<sur>dot_laneq<vsi2qi>): New.
5882         * config/aarch64/aarch64-simd-builtins.def (sdot, udot): New.
5883         (sdot_lane, udot_lane, sdot_laneq, udot_laneq): New.
5884         * config/aarch64/iterators.md (sur): Add UNSPEC_SDOT, UNSPEC_UDOT.
5885         (Vdottype, DOTPROD): New.
5886         (sur): Add SDOT and UDOT.
5888 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
5890         * config/aarch64/aarch64.h (AARCH64_FL_DOTPROD): New.
5891         (AARCH64_ISA_DOTPROD, TARGET_DOTPROD): New.
5892         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
5893         Add TARGET_DOTPROD.
5894         * config/aarch64/aarch64-option-extensions.def (dotprod): New.
5895         * config/aarch64/aarch64-cores.def (cortex-a55, cortex-a75):
5896         Enable TARGET_DOTPROD.
5897         (cortex-a75.cortex-a55): Likewise.
5898         * doc/invoke.texi (aarch64-feature-modifiers): Document dotprod.
5900 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
5902         * config/arm/arm-builtins.c (arm_unsigned_uternop_qualifiers): New.
5903         (UTERNOP_QUALIFIERS, arm_umac_lane_qualifiers, UMAC_LANE_QUALIFIERS):
5904         New.
5905         * config/arm/arm_neon_builtins.def (sdot, udot, sdot_lane, udot_lane):
5906         New.
5907         * config/arm/iterators.md (DOTPROD, VSI2QI, vsi2qi): New.
5908         (UNSPEC_DOT_S, UNSPEC_DOT_U, opsuffix): New.
5909         * config/arm/neon.md (neon_<sup>dot<vsi2qi>): New.
5910         (neon_<sup>dot_lane<vsi2qi>, <sup>dot_prod<vsi2qi>): New.
5911         * config/arm/types.md (neon_dot, neon_dot_q): New.
5912         * config/arm/unspecs.md (sup): Add UNSPEC_DOT_S, UNSPEC_DOT_U.
5914 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
5916         * config/arm/arm.h (TARGET_DOTPROD): New.
5917         * config/arm/arm.c (arm_arch_dotprod): New.
5918         (arm_option_reconfigure_globals): Add arm_arch_dotprod.
5919         * config/arm/arm-c.c (__ARM_FEATURE_DOTPROD): New.
5920         * config/arm/arm-cpus.in (armv8.2-a): Enabled +dotprod.
5921         (feature dotprod, group dotprod, ALL_SIMD_INTERNAL): New.
5922         (ALL_FPU_INTERNAL): Use ALL_SIMD_INTERNAL.
5923         * config/arm/t-multilib (v8_2_a_simd_variants): Add dotprod.
5924         * doc/invoke.texi (armv8.2-a): Document dotprod
5926 2017-10-14  Jan Hubicka  <hubicka@ucw.cz>
5928         * i386.c (ix86_vec_cost): New function.
5929         (ix86_rtx_costs): Handle vector operations better.
5930         * i386.h (struct processor_costs): Add sse_op, fmasd, fmass.
5931         * x86-tune-costs.h: Add new costs to all tables.
5933 2017-10-14  Jan Hubicka  <hubicka@ucw.cz>
5935         * i386.c (ix86_rtx_costs): Make difference between x87 and SSE
5936         operations.
5937         * i386.h (struct processor_costs): Add addss, mulss, mulsd, divss,
5938         divsd, sqrtss and sqrtsd
5939         * x86-tune-costs.h: Add new entries to all costs.
5940         (znver1_cost): Fix to match real instruction latencies.
5942 2017-10-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5943             Michael Collison <michael.collison@arm.com>
5945         * compare-elim.c: Include emit-rtl.h.
5946         (can_merge_compare_into_arith): New function.
5947         (try_validate_parallel): Likewise.
5948         (try_merge_compare): Likewise.
5949         (try_eliminate_compare): Call the above when no previous clobber
5950         is available.
5951         (execute_compare_elim_after_reload): Add DF_UD_CHAIN and DF_DU_CHAIN
5952         dataflow problems.
5954 2017-10-14  Jakub Jelinek  <jakub@redhat.com>
5956         PR middle-end/62263
5957         PR middle-end/82498
5958         * tree-ssa-phiopt.c (value_replacement): Comment fix.  Handle
5959         up to 2 preparation statements for ASSIGN in MIDDLE_BB.
5961         PR middle-end/62263
5962         PR middle-end/82498
5963         * tree-ssa-forwprop.c (simplify_rotate): Allow def_arg1[N]
5964         to be any operand_equal_p operands.  For & (B - 1) require
5965         B to be power of 2.  Recognize
5966         (X << (Y & (B - 1))) | (X >> ((-Y) & (B - 1))) and similar patterns.
5968 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
5970         PR bootstrap/82553
5971         * optabs.c (expand_memory_blockage): Fix call of
5972         targetm.have_memory_blockage.
5974 2017-10-14  Jakub Jelinek  <jakub@redhat.com>
5976         PR bootstrap/82548
5977         * config.gcc (*-*-solaris2*, i[34567]86-*-cygwin*,
5978         x86_64-*-cygwin*, i[34567]86-*-mingw* | x86_64-*-mingw*): Append
5979         objects to extra_objs instead of overwriting it.
5981 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
5983         * config/i386/sync.md (FILD_ATOMIC/FIST_ATOMIC FP load peephole2):
5984         Use any_fp_register_operand as operand[3] predicate.  Simplify
5985         equality test for operands[2] and operands[4] memory location.
5986         (LDX_ATOMIC/STX_ATOMIC FP load peephole2): Ditto.
5987         (FILD_ATOMIC/FIST_ATOMIC FP load peephole2 with mem blockage): New.
5988         (LDX_ATOMIC/LDX_ATOMIC FP load peephole2 with mem blockage): Ditto.
5989         (FILD_ATOMIC/FIST_ATOMIC FP store peephole2): Use
5990         any_fp_register_operand as operand[1] predicate.  Simplify
5991         equality test for operands[0] and operands[3] memory location.
5992         (LDX_ATOMIC/STX_ATOMIC FP store peephole2): Ditto.
5993         (FILD_ATOMIC/FIST_ATOMIC FP store peephole2 with mem blockage): New.
5994         (LDX_ATOMIC/LDX_ATOMIC FP storepeephole2 with mem blockage): Ditto.
5996 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
5998         * target-insns.def: Add memory_blockage.
5999         * optabs.c (expand_memory_blockage): New function.
6000         (expand_asm_memory_barrier): Rename ...
6001         (expand_asm_memory_blockage): ... to this.
6002         (expand_mem_thread_fence): Call expand_memory_blockage
6003         instead of expand_asm_memory_barrier.
6004         (expand_mem_singnal_fence): Ditto.
6005         (expand_atomic_load): Ditto.
6006         (expand_atomic_store): Ditto.
6007         * doc/md.texi (Standard Pattern Names For Generation):
6008         Document memory_blockage instruction pattern.
6010 2017-10-13  Sebastian Perta  <sebastian.perta@renesas.com>
6012         * config/rl78/rl78.c (rl78_emit_libcall): New function.
6013         * config/rl78/rl78-protos.h (rl78_emit_libcall): New function.
6014         * config/rl78/rl78.md: New define_expand "adddi3".
6016 2017-10-13  Jan Hubicka  <hubicka@ucw.cz>
6018         * cfghooks.c (verify_flow_info): Disable check that all probabilities
6019         are set correctly.
6021 2017-10-13  Jeff Law  <law@redhat.com>
6023         * tree-ssa-reassoc.c (reassociate_bb): Clarify code slighly.
6025 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
6027         PR target/82274
6028         * internal-fn.c (expand_mul_overflow): If both operands have
6029         the same highpart of -1 or 0 and the topmost bit of lowpart
6030         is different, overflow is if res <= 0 rather than res < 0.
6032 2017-10-13  Pat Haugen  <pthaugen@us.ibm.com>
6034         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Remove
6035         TARGET_P9_VECTOR code for unaligned_load case.
6037 2017-10-13  Jan Hubicka  <hubicka@ucw.cz>
6039         * cfghooks.c (verify_flow_info): Check that edge probabilities are set.
6041 2017-10-13  Nathan Sidwell  <nathan@acm.org>
6043         * tree-core.h (tree_contains_struct): Make bool.
6044         * tree.c (tree_contains_struct): Likewise.
6045         * tree.h (MARK_TS_BASE): Remove do ... while (0) idiom.
6046         (MARK_TS_TYPED, MARK_TS_COMMON, MARK_TS_TYPE_COMMON,
6047         MARK_TS_TYPE_WITH_LANG_SPECIFIC, MARK_TS_DECL_MINIMAL,
6048         MARK_TS_DECL_COMMON, MARK_TS_DECL_WRTL, MARK_TS_DECL_WITH_VIS,
6049         MARK_TS_DECL_NON_COMMON): Likewise, use comma operator.
6051 2017-10-13  Richard Biener  <rguenther@suse.de>
6053         * graphite-isl-ast-to-gimple.c
6054         (translate_isl_ast_to_gimple::get_rename_from_scev): Remove unused
6055         parameters and dominance check.
6056         (translate_isl_ast_to_gimple::graphite_copy_stmts_from_block): Adjust.
6057         (translate_isl_ast_to_gimple::copy_bb_and_scalar_dependences): Likewise.
6058         (translate_isl_ast_to_gimple::graphite_regenerate_ast_isl):
6059         Do not update SSA form here or do intermediate IL verification.
6060         * graphite.c: Include tree-ssa.h and tree-into-ssa.h.
6061         (graphite_initialize): Remove check on the number of loops in
6062         the function and inline into graphite_transform_loops.
6063         (graphite_finalize): Inline into graphite_transform_loops.
6064         (graphite_transform_loops): Perform SSA update and IL verification
6065         here.
6066         * params.def (PARAM_GRAPHITE_MIN_LOOPS_PER_FUNCTION): Remove.
6068 2017-10-13  Richard Biener  <rguenther@suse.de>
6070         * graphite-isl-ast-to-gimple.c (max_mode_int_precision,
6071         graphite_expression_type_precision): Avoid global constructor
6072         by moving ...
6073         (translate_isl_ast_to_gimple::translate_isl_ast_to_gimple): Here.
6074         (translate_isl_ast_to_gimple::graphite_expr_type): Add type member.
6075         (translate_isl_ast_to_gimple::translate_isl_ast_node_for): Use it.
6076         (translate_isl_ast_to_gimple::build_iv_mapping): Likewise.
6077         (translate_isl_ast_to_gimple::graphite_create_new_guard): Likewise.
6078         * graphite-sese-to-poly.c (build_original_schedule): Return nothing.
6080 2017-10-13  H.J. Lu  <hongjiu.lu@intel.com>
6082         PR target/82499
6083         * config/i386/i386.h (ix86_red_zone_size): New.
6084         * config/i386/i386.md (push peephole2s): Replace
6085         "!ix86_using_red_zone ()" with "ix86_red_zone_size == 0".
6087 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
6088             Alan Hayward  <alan.hayward@arm.com>
6089             David Sherwood  <david.sherwood@arm.com>
6091         * combine.c (can_change_dest_mode): Reject changes in
6092         REGMODE_NATURAL_SIZE.
6094 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
6095             Alan Hayward  <alan.hayward@arm.com>
6096             David Sherwood  <david.sherwood@arm.com>
6098         * cfgexpand.c (expand_debug_expr): Use GET_MODE_UNIT_BITSIZE.
6099         (expand_debug_source_expr): Likewise.
6100         * combine.c (combine_simplify_rtx): Likewise.
6101         * cse.c (fold_rtx): Likewise.
6102         * fwprop.c (canonicalize_address): Likewise.
6103         * targhooks.c (default_shift_truncation_mask): Likewise.
6105 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
6106             Alan Hayward  <alan.hayward@arm.com>
6107             David Sherwood  <david.sherwood@arm.com>
6109         * optabs.c (add_equal_note): Use GET_MODE_UNIT_SIZE.
6110         (widened_mode): Likewise.
6111         (expand_unop): Likewise.
6112         * ree.c (transform_ifelse): Likewise.
6113         (merge_def_and_ext): Likewise.
6114         (combine_reaching_defs): Likewise.
6115         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
6117 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
6118             Alan Hayward  <alan.hayward@arm.com>
6119             David Sherwood  <david.sherwood@arm.com>
6121         * caller-save.c (replace_reg_with_saved_mem): Use byte_lowpart_offset.
6122         * combine.c (gen_lowpart_for_combine): Likewise.
6123         * dwarf2out.c (rtl_for_decl_location): Likewise.
6124         * final.c (alter_subreg): Likewise.
6125         * rtlhooks.c (gen_lowpart_general): Likewise.
6126         (gen_lowpart_if_possible): Likewise.
6128 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
6129             Alan Hayward  <alan.hayward@arm.com>
6130             David Sherwood  <david.sherwood@arm.com>
6132         * calls.c (expand_call): Use subreg_lowpart_offset.
6133         * cse.c (cse_insn): Likewise.
6134         * regcprop.c (copy_value): Likewise.
6135         (copyprop_hardreg_forward_1): Likewise.
6137 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
6139         PR target/82524
6140         * config/i386/i386.md (addqi_ext_1, andqi_ext_1,
6141         *andqi_ext_1_cc, *<code>qi_ext_1, *xorqi_ext_1_cc): Change
6142         =Q constraints to +Q and into insn condition add check
6143         that operands[0] and operands[1] are equal.
6144         (*addqi_ext_2, *andqi_ext_2, *<code>qi_ext_2): Change
6145         =Q constraints to +Q and into insn condition add check
6146         that operands[0] is equal to either operands[1] or operands[2].
6148         PR target/82498
6149         * fold-const.c (fold_binary_loc) <bit_rotate>: Code cleanups,
6150         instead of handling MINUS_EXPR twice (once for each argument),
6151         canonicalize operand order and handle just once, use rtype where
6152         possible.  Handle (A << B) | (A >> (-B & (Z - 1))).
6154         PR target/82498
6155         * config/i386/ia32intrin.h (__rold, __rord, __rolq, __rorq): Allow
6156         any values of __C while still being pattern recognizable as a simple
6157         rotate instruction.
6159 2017-10-13  Richard Biener  <rguenther@suse.de>
6161         PR tree-optimization/82451
6162         Revert
6163         2017-10-02  Richard Biener  <rguenther@suse.de>
6165         PR tree-optimization/82355
6166         * graphite-isl-ast-to-gimple.c (build_iv_mapping): Also build
6167         a mapping for the enclosing loop but avoid generating one for
6168         the loop tree root.
6169         (copy_bb_and_scalar_dependences): Remove premature codegen
6170         error on PHIs in blocks duplicated into multiple places.
6171         * graphite-scop-detection.c
6172         (scop_detection::stmt_has_simple_data_refs_p): For a loop not
6173         in the region use it as loop and nest to analyze the DR in.
6174         (try_generate_gimple_bb): Likewise.
6175         * graphite-sese-to-poly.c (extract_affine_chrec): Adjust.
6176         (add_loop_constraints): For blocks in a loop not in the region
6177         create a dimension with a single iteration.
6178         * sese.h (gbb_loop_at_index): Remove assert.
6180         * cfgloop.c (loop_preheader_edge): For the loop tree root
6181         return the single successor of the entry block.
6182         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
6183         Reset the SCEV hashtable and niters.
6184         * graphite-scop-detection.c
6185         (scop_detection::graphite_can_represent_scev): Add SCOP parameter,
6186         assert that we only have POLYNOMIAL_CHREC that vary in loops
6187         contained in the region.
6188         (scop_detection::graphite_can_represent_expr): Adjust.
6189         (scop_detection::stmt_has_simple_data_refs_p): For loops
6190         not in the region set loop to NULL.  The nest is now the
6191         entry edge to the region.
6192         (try_generate_gimple_bb): Likewise.
6193         * sese.c (scalar_evolution_in_region): Adjust for
6194         instantiate_scev change.
6195         * tree-data-ref.h (graphite_find_data_references_in_stmt):
6196         Make nest parameter the edge into the region.
6197         (create_data_ref): Likewise.
6198         * tree-data-ref.c (dr_analyze_indices): Make nest parameter an
6199         entry edge into a region and adjust instantiate_scev calls.
6200         (create_data_ref): Likewise.
6201         (graphite_find_data_references_in_stmt): Likewise.
6202         (find_data_references_in_stmt): Pass the loop preheader edge
6203         from the nest argument.
6204         * tree-scalar-evolution.h (instantiate_scev): Make instantiate_below
6205         parameter the edge into the region.
6206         (instantiate_parameters): Use the loop preheader edge as entry.
6207         * tree-scalar-evolution.c (analyze_scalar_evolution): Handle
6208         NULL loop.
6209         (get_instantiated_value_entry): Make instantiate_below parameter
6210         the edge into the region.
6211         (instantiate_scev_name): Likewise.  Adjust dominance checks,
6212         when we cannot use loop-based instantiation instantiate by
6213         walking use-def chains.
6214         (instantiate_scev_poly): Adjust.
6215         (instantiate_scev_binary): Likewise.
6216         (instantiate_scev_convert): Likewise.
6217         (instantiate_scev_not): Likewise.
6218         (instantiate_array_ref): Remove.
6219         (instantiate_scev_3): Likewise.
6220         (instantiate_scev_2): Likewise.
6221         (instantiate_scev_1): Likewise.
6222         (instantiate_scev_r): Do not blindly handle N-operand trees.
6223         Do not instantiate array-refs.  Handle all constants and invariants.
6224         (instantiate_scev): Make instantiate_below parameter
6225         the edge into the region.
6226         (resolve_mixers): Use the loop preheader edge for the region
6227         parameter to instantiate_scev_r.
6228         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Adjust.
6230 2017-10-13  Richard Biener  <rguenther@suse.de>
6232         PR tree-optimization/82525
6233         * graphite-isl-ast-to-gimple.c
6234         (translate_isl_ast_to_gimple::widest_int_from_isl_expr_int): Split
6235         out from ...
6236         (translate_isl_ast_to_gimple::gcc_expression_from_isl_expr_int): Here.
6237         Fail code generation when we cannot represent the isl integer.
6238         (binary_op_to_tree): Elide modulo operations that are no-ops
6239         in the type we code generate.  Remove now superfluous code
6240         generation errors.
6242 2017-10-13  Richard Biener  <rguenther@suse.de>
6244         * graphite-scop-detection.c (loop_ivs_can_be_represented): Remove.
6245         (scop_detection::harmful_loop_in_region): Remove premature
6246         IV type restriction.
6247         (scop_detection::graphite_can_represent_scev): We can handle
6248         pointer IVs just fine.
6250 2017-10-13  Alan Modra  <amodra@gmail.com>
6252         * doc/extend.texi (Extended Asm <Clobbers>): Rename to
6253         "Clobbers and Scratch Registers".  Add paragraph on
6254         alternative to clobbers for scratch registers and OpenBLAS
6255         example.
6257 2017-10-13  Alan Modra  <amodra@gmail.com>
6259         * doc/extend.texi (Clobbers): Correct vax example.  Delete old
6260         example of a memory input for a string of known length.  Move
6261         commentary out of table.  Add a number of new examples
6262         covering array memory inputs.
6264 2017-10-12  Martin Liska  <mliska@suse.cz>
6266         PR tree-optimization/82493
6267         * sbitmap.c (bitmap_bit_in_range_p): Fix the implementation.
6268         (test_range_functions): New function.
6269         (sbitmap_c_tests): Likewise.
6270         * selftest-run-tests.c (selftest::run_tests): Run new tests.
6271         * selftest.h (sbitmap_c_tests): New function.
6273         * tree-ssa-dse.c (live_bytes_read): Fix thinko.
6275 2017-10-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
6277         * config/rs6000/amo.h: Fix spacing issue.
6279 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
6281         PR target/82498
6282         * config/i386/i386.md (*ashl<mode>3_mask_1,
6283         *<shift_insn><mode>3_mask_1, *<rotate_insn><mode>3_mask_1,
6284         *<btsc><mode>_mask_1, *btr<mode>_mask_1): New define_insn_and_split
6285         patterns.
6287 2017-10-12  Jan Hubicka  <hubicka@ucw.cz>
6289         * profile-count.h (safe_scale_64bit): Fix GCC4.x path.
6290         (profile_probability): Set max_probability
6291         to (uint32_t) 1 << (n_bits - 2) and update accessors to avoid overlfows
6292         in temporaries.
6293         * profile-count.c (profile_probability::differs_from_p): Do not
6294         rely on max_probaiblity == 10000
6296 2017-10-12  Jeff Law  <law@redhat.com>
6298         * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject ao_refs with
6299         negative offsets.
6301 2017-10-12  Martin Sebor  <msebor@redhat.com>
6303         PR other/82301
6304         PR c/82435
6305         * cgraphunit.c (maybe_diag_incompatible_alias): New function.
6306         (handle_alias_pairs): Call it.
6307         * common.opt (-Wattribute-alias): New option.
6308         * doc/extend.texi (ifunc attribute): Discuss C++ specifics.
6309         * doc/invoke.texi (-Wattribute-alias): Document.
6311 2017-10-12  Vladimir Makarov  <vmakarov@redhat.com>
6313         Revert
6314         2017-10-11  Vladimir Makarov  <vmakarov@redhat.com>
6315         PR sanitizer/82353
6316         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
6317         locations.
6318         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
6319         (make_hard_regno_born, make_hard_regno_dead): Update
6320         bb_killed_pseudos and bb_gen_pseudos.
6322 2017-10-12  Jan Hubicka  <hubicka@ucw.cz>
6324         * config/i386/x86-tune-sched.c (ix86_adjust_cost): Fix Zen support.
6326 2017-10-12  Uros Bizjak  <ubizjak@gmail.com>
6328         * config/alpha/alpha.c (alpha_split_conditional_move):
6329         Use std::swap instead of manually swapping.
6330         (alpha_stdarg_optimize_hook): Ditto.
6331         (alpha_canonicalize_comparison): Ditto.
6333 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
6335         * tree-loop-distribution.c (struct builtin_info): New struct.
6336         (struct partition): Refactor fields into struct builtin_info.
6337         (partition_free): Free struct builtin_info.
6338         (build_size_arg_loc, build_addr_arg_loc): Delete.
6339         (generate_memset_builtin, generate_memcpy_builtin): Get memory range
6340         information from struct builtin_info.
6341         (find_single_drs): New function refactored from classify_partition.
6342         Also moved builtin validity checks to this function.
6343         (compute_access_range, alloc_builtin): New functions.
6344         (classify_builtin_st, classify_builtin_ldst): New functions.
6345         (classify_partition): Refactor code into functions find_single_drs,
6346         classify_builtin_st and classify_builtin_ldst.
6347         (distribute_loop): Don't do runtime alias check when distributing
6348         loop nest.
6349         (find_seed_stmts_for_distribution): New function.
6350         (pass_loop_distribution::execute): Refactor code finding seed
6351         stmts into above function.  Support distribution for the innermost
6352         two-level loop nest.  Adjust dump information.
6354 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
6356         * tree-loop-distribution.c: Adjust the general comment.
6357         (NUM_PARTITION_THRESHOLD): New macro.
6358         (ssa_name_has_uses_outside_loop_p): Support loop nest distribution.
6359         (classify_partition): Skip builtin pattern of loop nest's inner loop.
6360         (merge_dep_scc_partitions): New parameter ignore_alias_p and use it
6361         in call to build_partition_graph.
6362         (finalize_partitions): New parameter.  Make loop distribution more
6363         conservative by fusing more partitions.
6364         (distribute_loop): Don't do runtime alias check in case of loop nest
6365         distribution.
6366         (find_seed_stmts_for_distribution): New function.
6367         (prepare_perfect_loop_nest): New function.
6368         (pass_loop_distribution::execute): Refactor code finding seed stmts
6369         and loop nest into above functions.  Support loop nest distribution.
6370         Adjust dump information accordingly.
6372 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
6374         * tree-loop-distribution.c (break_alias_scc_partitions): Add comment
6375         and set PTYPE_SEQUENTIAL for merged partition.
6377 2017-10-12  Richard Biener  <rguenther@suse.de>
6379         PR tree-optimization/69728
6380         Revert
6381         2017-09-19  Richard Biener  <rguenther@suse.de>
6383         PR tree-optimization/69728
6384         * graphite-sese-to-poly.c (schedule_error): New global.
6385         (add_loop_schedule): Handle empty domain by failing the
6386         schedule.
6387         (build_original_schedule): Handle schedule_error.
6389         * graphite-sese-to-poly.c (add_loop_schedule): Handle empty
6390         domain by returning an unchanged schedule.
6392 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
6394         * genrecog.c (validate_pattern): For VEC_SELECT verify that
6395         CONST_INT selectors are 0 to GET_MODE_NUNITS (imode) - 1.
6397 2017-10-12  Aldy Hernandez  <aldyh@redhat.com>
6399         * Makefile.in (TAGS): Merge all the *.def files into one pattern.
6400         Handle params.def.
6402 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
6404         PR c++/82159
6405         * expr.c (store_field): Don't optimize away bitsize == 0 store
6406         from CALL_EXPR with addressable return type.
6408 2017-10-11  Segher Boessenkool  <segher@kernel.crashing.org>
6410         * config/rs6000/rs6000.h (TARGET_ISEL64): Delete.
6411         * config/rs6000/rs6000.md (sel): Delete mode attribute.
6412         (mov<mode>cc, isel_signed_<mode>, isel_unsigned_<mode>,
6413         *isel_reversed_signed_<mode>, *isel_reversed_unsigned_<mode>): Use
6414         TARGET_ISEL instead of TARGET_ISEL<sel>.
6416 2017-10-11  David Edelsohn  <dje.gcc@gmail.com>
6418         * config/rs6000/rs6000.c
6419         (rs6000_xcoff_asm_output_aligned_decl_common): Test for NULL decl.
6421 2017-10-11  Segher Boessenkool  <segher@kernel.crashing.org>
6423         * config/rs6000/predicates.md (zero_constant, all_ones_constant):
6424         Move up in file.
6425         (reg_or_cint_operand): Fix comment.
6426         (reg_or_zero_operand): New predicate.
6427         * config/rs6000/rs6000-protos.h (output_isel): Delete.
6428         * config/rs6000/rs6000.c (output_isel): Delete.
6429         * config/rs6000/rs6000.md (isel_signed_<mode>): Use reg_or_zero_operand
6430         instead of reg_or_cint_operand.  Output instruction directly (not via
6431         output_isel).
6432         (isel_unsigned_<mode>): Ditto.
6433         (*isel_reversed_signed_<mode>): Use reg_or_zero_operand instead of
6434         gpc_reg_operand.  Add an instruction alternative for this.  Output
6435         instruction directly.
6436         (*isel_reversed_unsigned_<mode>): Ditto.
6438 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
6440         * config/i386/i386.c (ix86_canonicalize_comparison): New function.
6441         (TARGET_CANONICALIZE_COMPARISON): Define.
6443 2017-10-11  Qing Zhao  <qing.zhao@oracle.com>
6445         PR target/81422
6446         * config/aarch64/aarch64.c (aarch64_load_symref_appropriately):
6447         Check whether the dest is REG before adding REG_EQUIV note.
6449 2017-10-11  Vladimir Makarov  <vmakarov@redhat.com>
6451         PR sanitizer/82353
6452         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
6453         locations.
6454         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
6455         (make_hard_regno_born, make_hard_regno_dead): Update
6456         bb_killed_pseudos and bb_gen_pseudos.
6458 2017-10-11  Nathan Sidwell  <nathan@acm.org>
6460         * incpath.h (enum incpath_kind): Name enum, prefix values.
6461         (add_path, add_cpp_dir_path, get_added_cpp_dirs): Use incpath_kind.
6462         * incpath.c (heads, tails): Use INC_MAX.
6463         (add_env_var_paths, add_standard_paths): Use incpath_kind.
6464         (merge_include_chains, split_quote_chain,
6465         register_include_chains): Update incpath_kind names.
6466         (add_cpp_dir_path, add_path, get_added_cpp_dirs): Use incpath_kind.
6467         * config/darwin-c.c (add_system_framework_path): Update incpath_kind
6468         names.
6469         (add_framework_path, darwin_register_objc_includes): Likewise.
6470         * config/vms/vms-c.c (vms_c_register_includes): Likewise.
6472 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
6474         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
6475         Do not use float_operator operator predicate.
6476         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
6477         * config/i386/predicates.md (float_operator): Remove predicate.
6479 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
6481         * config/i386/i386.md (*jcc<mode>_0_i387): Remove insn pattern.
6482         (*jccxf_i387): Ditto.
6483         (*jcc<mode>_i387): Ditto.
6484         (*jccu<mode>_i387): Ditto.
6485         (*jcc<X87MODEF:mode>_<SWI24:mode>_i387): Ditto.
6486         (*jcc_*_i387 splitters): Remove.
6487         * config/i386/i386-protos.h (ix86_split_fp_branch): Remove prototype.
6488         * config/i386/i386.c (ix86_split_fp_branch): Remove.
6489         * config/i386/predicates.md (ix86_swapped_fp_comparison_operator):
6490         Remove predicate.
6492 2017-10-11  Jan Hubicka  <hubicka@ucw.cz>
6494         * profile-count.h (slow_safe_scale_64bit): New function.
6495         (safe_scale_64bit): New inline.
6496         (profile_count::max_safe_multiplier): Remove; use safe_scale_64bit.
6497         * profile-count.c: Include wide-int.h
6498         (slow_safe_scale_64bit): New.
6500 2017-10-11  Nathan Sidwell  <nathan@acm.org>
6502         * tree.h (DECL_ASSEMBLER_NAME_SET_P): Don't check
6503         HAS_DECL_ASSEMBLER_NAME_P.
6504         * gimple-expr.c (gimple_decl_printable_name: Check
6505         HAS_DECL_ASSEMBLER_NAME_P too.
6506         * ipa-utils.h (type_in_anonymous_namespace_p): Check
6507         DECL_ASSEMBLER_NAME_SET_P of TYPE_NAME.
6508         (odr_type_p): No need to assert TYPE_NAME is a TYPE_DECL.
6509         * passes.c (rest_of_decl_compilation): Check
6510         HAS_DECL_ASSEMBLER_NAME_P too.
6511         * recog.c (verify_changes): Likewise.
6512         * tree-pretty-print.c (dump_decl_name): Likewise.
6513         * tree-ssa-structalias.c (alias_get_name): Likewise.  Reimplement.
6515         * tree.h (DECL_ASSEMBLER_NAME_RAW): New.
6516         (SET_DECL_ASSEMBLER_NAME): Use it.
6517         (DECL_ASSEMBLER_NAME_SET_P): Likewise.
6518         (COPY_DECL_ASSEMBLER_NAME): Likewise.
6519         * tree.c (decl_assembler_name): Use DECL_ASSEMBLER_NAME_RAW.
6521 2017-10-11  Jan Hubicka  <hubicka@ucw.cz>
6523         * config.gcc (i386, x86_64): Add extra objects.
6524         * config/i386/i386-protos.h (ix86_rip_relative_addr_p): Declare.
6525         (ix86_min_insn_size): Declare.
6526         (ix86_issue_rate): Declare.
6527         (ix86_adjust_cost): Declare.
6528         (ia32_multipass_dfa_lookahead): Declare.
6529         (ix86_macro_fusion_p): Declare.
6530         (ix86_macro_fusion_pair_p): Declare.
6531         (ix86_bd_has_dispatch): Declare.
6532         (ix86_bd_do_dispatch): Declare.
6533         (ix86_core2i7_init_hooks): Declare.
6534         (ix86_atom_sched_reorder): Declare.
6535         * config/i386/i386.c Move all CPU cost tables to x86-tune-costs.h.
6536         (COSTS_N_BYTES): Move to x86-tune-costs.h.
6537         (DUMMY_STRINGOP_ALGS):Move to x86-tune-costs.h.
6538         (rip_relative_addr_p): Rename to ...
6539         (ix86_rip_relative_addr_p): ... this one; export.
6540         (memory_address_length): Update.
6541         (ix86_issue_rate): Move to x86-tune-sched.c.
6542         (ix86_flags_dependent): Move to x86-tune-sched.c.
6543         (ix86_agi_dependent): Move to x86-tune-sched.c.
6544         (exact_dependency_1): Move to x86-tune-sched.c.
6545         (exact_store_load_dependency): Move to x86-tune-sched.c.
6546         (ix86_adjust_cost): Move to x86-tune-sched.c.
6547         (ia32_multipass_dfa_lookahead): Move to x86-tune-sched.c.
6548         (ix86_macro_fusion_p): Move to x86-tune-sched.c.
6549         (ix86_macro_fusion_pair_p): Move to x86-tune-sched.c.
6550         (do_reorder_for_imul): Move to x86-tune-sched-atom.c.
6551         (swap_top_of_ready_list): Move to x86-tune-sched-atom.c.
6552         (ix86_sched_reorder): Move to x86-tune-sched-atom.c.
6553         (core2i7_first_cycle_multipass_init): Move to x86-tune-sched-core.c.
6554         (core2i7_dfa_post_advance_cycle): Move to x86-tune-sched-core.c.
6555         (min_insn_size): Rename to ...
6556         (ix86_min_insn_size): ... this one; export.
6557         (core2i7_first_cycle_multipass_begin): Move to x86-tune-sched-core.c.
6558         (core2i7_first_cycle_multipass_issue): Move to x86-tune-sched-core.c.
6559         (core2i7_first_cycle_multipass_backtrack): Move to
6560         x86-tune-sched-core.c.
6561         (core2i7_first_cycle_multipass_end): Move to x86-tune-sched-core.c.
6562         (core2i7_first_cycle_multipass_fini): Move to x86-tune-sched-core.c.
6563         (ix86_sched_init_global): Break up logic to ix86_core2i7_init_hooks.
6564         (ix86_avoid_jump_mispredicts): Update.
6565         (TARGET_SCHED_DISPATCH): Move to ix86-tune-sched-bd.c.
6566         (TARGET_SCHED_DISPATCH_DO): Move to ix86-tune-sched-bd.c.
6567         (TARGET_SCHED_REORDER): Move to ix86-tune-sched-bd.c.
6568         (DISPATCH_WINDOW_SIZE): Move to ix86-tune-sched-bd.c.
6569         (MAX_DISPATCH_WINDOWS): Move to ix86-tune-sched-bd.c.
6570         (MAX_INSN): Move to ix86-tune-sched-bd.c.
6571         (MAX_IMM): Move to ix86-tune-sched-bd.c.
6572         (MAX_IMM_SIZE): Move to ix86-tune-sched-bd.c.
6573         (MAX_IMM_32): Move to ix86-tune-sched-bd.c.
6574         (MAX_IMM_64): Move to ix86-tune-sched-bd.c.
6575         (MAX_LOAD): Move to ix86-tune-sched-bd.c.
6576         (MAX_STORE): Move to ix86-tune-sched-bd.c.
6577         (BIG): Move to ix86-tune-sched-bd.c.
6578         (enum dispatch_group): Move to ix86-tune-sched-bd.c.
6579         (enum insn_path): Move to ix86-tune-sched-bd.c.
6580         (get_mem_group): Move to ix86-tune-sched-bd.c.
6581         (is_cmp): Move to ix86-tune-sched-bd.c.
6582         (dispatch_violation): Move to ix86-tune-sched-bd.c.
6583         (is_branch): Move to ix86-tune-sched-bd.c.
6584         (is_prefetch): Move to ix86-tune-sched-bd.c.
6585         (init_window): Move to ix86-tune-sched-bd.c.
6586         (allocate_window): Move to ix86-tune-sched-bd.c.
6587         (init_dispatch_sched): Move to ix86-tune-sched-bd.c.
6588         (is_end_basic_block): Move to ix86-tune-sched-bd.c.
6589         (process_end_window): Move to ix86-tune-sched-bd.c.
6590         (allocate_next_window): Move to ix86-tune-sched-bd.c.
6591         (find_constant): Move to ix86-tune-sched-bd.c.
6592         (get_num_immediates): Move to ix86-tune-sched-bd.c.
6593         (has_immediate): Move to ix86-tune-sched-bd.c.
6594         (get_insn_path): Move to ix86-tune-sched-bd.c.
6595         (get_insn_group): Move to ix86-tune-sched-bd.c.
6596         (count_num_restricted): Move to ix86-tune-sched-bd.c.
6597         (fits_dispatch_window): Move to ix86-tune-sched-bd.c.
6598         (add_insn_window): Move to ix86-tune-sched-bd.c.
6599         (add_to_dispatch_window): Move to ix86-tune-sched-bd.c.
6600         (debug_dispatch_window_file): Move to ix86-tune-sched-bd.c.
6601         (debug_dispatch_window): Move to ix86-tune-sched-bd.c.
6602         (debug_insn_dispatch_info_file): Move to ix86-tune-sched-bd.c.
6603         (debug_ready_dispatch): Move to ix86-tune-sched-bd.c.
6604         (do_dispatch): Move to ix86-tune-sched-bd.c.
6605         (has_dispatch): Move to ix86-tune-sched-bd.c.
6606         * config/i386/t-i386: Add new object files.
6607         * config/i386/x86-tune-costs.h: New file.
6608         * config/i386/x86-tune-sched-atom.c: New file.
6609         * config/i386/x86-tune-sched-bd.c: New file.
6610         * config/i386/x86-tune-sched-core.c: New file.
6611         * config/i386/x86-tune-sched.c: New file.
6613 2017-10-11  Liu Hao  <lh_mouse@126.com>
6615         * pretty-print.c [_WIN32] (colorize_init): Remove.  Use
6616         the generic version below instead.
6617         (should_colorize): Recognize Windows consoles as terminals
6618         for MinGW targets.
6619         * pretty-print.c [__MINGW32__] (write_all): New function.
6620         [__MINGW32__] (find_esc_head): Likewise.
6621         [__MINGW32__] (find_esc_terminator): Likewise.
6622         [__MINGW32__] (eat_esc_sequence): Likewise.
6623         [__MINGW32__] (mingw_ansi_fputs): New function that handles
6624         ANSI escape codes.
6625         (pp_write_text_to_stream): Use mingw_ansi_fputs instead of fputs
6626         for MinGW targets.
6628 2017-10-11  Richard Biener  <rguenther@suse.de>
6630         * tree-ssa-loop-niter.c (infer_loop_bounds_from_pointer_arith):
6631         Properly call analyze_scalar_evolution with the loop of the stmt.
6633 2017-10-11  Richard Biener  <rguenther@suse.de>
6635         * tree.def (POLYNOMIAL_CHREC): Remove CHREC_VARIABLE tree operand.
6636         * tree-core.h (tree_base): Add chrec_var union member.
6637         * tree.h (CHREC_VAR): Remove.
6638         (CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): Adjust.
6639         * tree-chrec.h (build_polynomial_chrec): Adjust.
6640         * tree-chrec.c (reset_evolution_in_loop): Use build_polynomial_chrec.
6641         * tree-pretty-print.c (dump_generic_node): Use CHREC_VARIABLE.
6643 2017-10-11  Marc Glisse  <marc.glisse@inria.fr>
6645         * fold-const.c (fold_binary_loc) [X +- Y CMP X]: Move ...
6646         * match.pd: ... here.
6647         ((T) X == (T) Y): Relax condition.
6649 2017-10-11  Bin Cheng  <bin.cheng@arm.com>
6651         PR tree-optimization/82472
6652         * tree-loop-distribution.c (sort_partitions_by_post_order): Refine
6653         comment.
6654         (break_alias_scc_partitions): Update postorder number.
6656 2017-10-11  Martin Liska  <mliska@suse.cz>
6658         PR sanitizer/82490
6659         * opts.c (parse_no_sanitize_attribute): Do not use error_value
6660         variable.
6661         * opts.h (parse_no_sanitize_attribute): Remove last argument.
6663 2017-10-11  Martin Liska  <mliska@suse.cz>
6665         * print-rtl.c (print_insn): Move declaration of idbuf
6666         to same scope as name.
6668 2017-10-11  Martin Liska  <mliska@suse.cz>
6670         Revert r253637:
6672         PR sanitizer/82484
6673         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
6674         volatile arguments.
6676 2017-10-11  Martin Liska  <mliska@suse.cz>
6678         PR sanitizer/82484
6679         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
6680         volatile arguments.
6682 2017-10-11  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
6684         * config.gcc (default_gnu_indirect_function): Default to yes for
6685         arm*-*-linux* with glibc.
6687 2017-10-11  Richard Biener  <rguenther@suse.de>
6689         * tree-scalar-evolution.c (get_scalar_evolution): Handle
6690         default-defs and types we do not want to analyze.
6691         (interpret_loop_phi): Replace unreachable code with an assert.
6692         (compute_scalar_evolution_in_loop): Remove and inline ...
6693         (analyze_scalar_evolution_1): ... here, replacing condition with
6694         what makes the intent clearer.  Remove handling of cases
6695         get_scalar_evolution now handles.
6697 2017-10-10  Jim Wilson  <wilson@tuliptree.org>
6699         PR rtl-optimization/81434
6700         * haifa-sched.c (prune_ready_list): Init min_cost_group to 0.  Update
6701         comment for main loop.  In sched_group_found if, also add checks for
6702         pass and min_cost_group.
6704 2017-10-10  Segher Boessenkool  <segher@kernel.crashing.org>
6706         * config/rs6000/rs6000.c (TARGET_INSN_COST): New.
6707         (rs6000_insn_cost): New function.
6708         * config/rs6000/rs6000.md (cost): New attribute.
6710 2017-10-10  Jakub Jelinek  <jakub@redhat.com>
6711             H.J. Lu  <hongjiu.lu@intel.com>
6713         PR target/79565
6714         PR target/82483
6715         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Add
6716         OPTION_MASK_ISA_MMX for __builtin_ia32_maskmovq,
6717         __builtin_ia32_vec_ext_v4hi and __builtin_ia32_vec_set_v4hi.
6718         (ix86_expand_builtin): Treat OPTION_MASK_ISA_MMX similarly
6719         to OPTION_MASK_ISA_AVX512VL - builtins that have both
6720         OPTION_MASK_ISA_MMX and some other bit set require both
6721         mmx and the ISAs without the mmx bit.
6722         * config/i386/i386-builtin.def (__builtin_ia32_cvtps2pi,
6723         __builtin_ia32_cvttps2pi, __builtin_ia32_cvtpi2ps,
6724         __builtin_ia32_pavgb, __builtin_ia32_pavgw, __builtin_ia32_pmulhuw,
6725         __builtin_ia32_pmaxub, __builtin_ia32_pmaxsw, __builtin_ia32_pminub,
6726         __builtin_ia32_pminsw, __builtin_ia32_psadbw, __builtin_ia32_pmovmskb,
6727         __builtin_ia32_pshufw, __builtin_ia32_cvtpd2pi,
6728         __builtin_ia32_cvttpd2pi, __builtin_ia32_cvtpi2pd,
6729         __builtin_ia32_pmuludq, __builtin_ia32_pabsb, __builtin_ia32_pabsw,
6730         __builtin_ia32_pabsd, __builtin_ia32_phaddw, __builtin_ia32_phaddd,
6731         __builtin_ia32_phaddsw, __builtin_ia32_phsubw, __builtin_ia32_phsubd,
6732         __builtin_ia32_phsubsw, __builtin_ia32_pmaddubsw,
6733         __builtin_ia32_pmulhrsw, __builtin_ia32_pshufb, __builtin_ia32_psignb,
6734         __builtin_ia32_psignw, __builtin_ia32_psignd, __builtin_ia32_movntq,
6735         __builtin_ia32_paddq, __builtin_ia32_psubq, __builtin_ia32_palignr):
6736         Add OPTION_MASK_ISA_MMX.
6738 2017-10-10  Andreas Tobler  <andreast@gcc.gnu.org>
6740         * config.gcc (armv7*-*-freebsd*): New target.
6741         (armv6*-*-freebsd*): Remove obsolete TARGET_FREEBSD_ARMv6 define.
6743 2017-10-10  Jan Hubicka  <hubicka@ucw.cz>
6745         * x86-tune.def (X86_TUNE_AVOID_FALSE_DEP_FOR_BMI,
6746         X86_TUNE_ADJUST_UNROLL, X86_TUNE_ONE_IF_CONV_INSN): Move to right
6747         spot in the file.
6749 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
6751         * wide-int.h (wide_int_ref_storage): Make host_dependent_precision
6752         a template parameter.
6753         (WIDE_INT_REF_FOR): Update accordingly.
6754         * tree.h (wi::int_traits <const_tree>): Delete.
6755         (wi::tree_to_widest_ref, wi::tree_to_offset_ref): New typedefs.
6756         (wi::to_widest, wi::to_offset): Use them.  Expand commentary.
6757         (wi::tree_to_wide_ref): New typedef.
6758         (wi::to_wide): New function.
6759         * calls.c (get_size_range): Use wi::to_wide when operating on
6760         trees as wide_ints.
6761         * cgraph.c (cgraph_node::create_thunk): Likewise.
6762         * config/i386/i386.c (ix86_data_alignment): Likewise.
6763         (ix86_local_alignment): Likewise.
6764         * dbxout.c (stabstr_O): Likewise.
6765         * dwarf2out.c (add_scalar_info, gen_enumeration_type_die): Likewise.
6766         * expr.c (const_vector_from_tree): Likewise.
6767         * fold-const-call.c (host_size_t_cst_p, fold_const_call_1): Likewise.
6768         * fold-const.c (may_negate_without_overflow_p, negate_expr_p)
6769         (fold_negate_expr_1, int_const_binop_1, const_binop)
6770         (fold_convert_const_int_from_real, optimize_bit_field_compare)
6771         (all_ones_mask_p, sign_bit_p, unextend, extract_muldiv_1)
6772         (fold_div_compare, fold_single_bit_test, fold_plusminus_mult_expr)
6773         (pointer_may_wrap_p, expr_not_equal_to, fold_binary_loc)
6774         (fold_ternary_loc, multiple_of_p, fold_negate_const, fold_abs_const)
6775         (fold_not_const, round_up_loc): Likewise.
6776         * gimple-fold.c (gimple_fold_indirect_ref): Likewise.
6777         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Likewise.
6778         (alloca_call_type): Likewise.
6779         * gimple.c (preprocess_case_label_vec_for_gimple): Likewise.
6780         * godump.c (go_output_typedef): Likewise.
6781         * graphite-sese-to-poly.c (tree_int_to_gmp): Likewise.
6782         * internal-fn.c (get_min_precision): Likewise.
6783         * ipa-cp.c (ipcp_store_vr_results): Likewise.
6784         * ipa-polymorphic-call.c
6785         (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Likewise.
6786         * ipa-prop.c (ipa_print_node_jump_functions_for_edge): Likewise.
6787         (ipa_modify_call_arguments): Likewise.
6788         * match.pd: Likewise.
6789         * omp-low.c (scan_omp_1_op, lower_omp_ordered_clauses): Likewise.
6790         * print-tree.c (print_node_brief, print_node): Likewise.
6791         * stmt.c (expand_case): Likewise.
6792         * stor-layout.c (layout_type): Likewise.
6793         * tree-affine.c (tree_to_aff_combination): Likewise.
6794         * tree-cfg.c (group_case_labels_stmt): Likewise.
6795         * tree-data-ref.c (dr_analyze_indices): Likewise.
6796         (prune_runtime_alias_test_list): Likewise.
6797         * tree-dump.c (dequeue_and_dump): Likewise.
6798         * tree-inline.c (remap_gimple_op_r, copy_tree_body_r): Likewise.
6799         * tree-predcom.c (is_inv_store_elimination_chain): Likewise.
6800         * tree-pretty-print.c (dump_generic_node): Likewise.
6801         * tree-scalar-evolution.c (iv_can_overflow_p): Likewise.
6802         (simple_iv_with_niters): Likewise.
6803         * tree-ssa-address.c (addr_for_mem_ref): Likewise.
6804         * tree-ssa-ccp.c (ccp_finalize, evaluate_stmt): Likewise.
6805         * tree-ssa-loop-ivopts.c (constant_multiple_of): Likewise.
6806         * tree-ssa-loop-niter.c (split_to_var_and_offset)
6807         (refine_value_range_using_guard, number_of_iterations_ne_max)
6808         (number_of_iterations_lt_to_ne, number_of_iterations_lt)
6809         (get_cst_init_from_scev, record_nonwrapping_iv)
6810         (scev_var_range_cant_overflow): Likewise.
6811         * tree-ssa-phiopt.c (minmax_replacement): Likewise.
6812         * tree-ssa-pre.c (compute_avail): Likewise.
6813         * tree-ssa-sccvn.c (vn_reference_fold_indirect): Likewise.
6814         (vn_reference_maybe_forwprop_address, valueized_wider_op): Likewise.
6815         * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Likewise.
6816         * tree-ssa-uninit.c (is_pred_expr_subset_of): Likewise.
6817         * tree-ssanames.c (set_nonzero_bits, get_nonzero_bits): Likewise.
6818         * tree-switch-conversion.c (collect_switch_conv_info, array_value_type)
6819         (dump_case_nodes, try_switch_expansion): Likewise.
6820         * tree-vect-loop-manip.c (vect_gen_vector_loop_niters): Likewise.
6821         (vect_do_peeling): Likewise.
6822         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
6823         * tree-vect-stmts.c (vectorizable_load): Likewise.
6824         * tree-vrp.c (compare_values_warnv, vrp_int_const_binop): Likewise.
6825         (zero_nonzero_bits_from_vr, ranges_from_anti_range): Likewise.
6826         (extract_range_from_binary_expr_1, adjust_range_with_scev): Likewise.
6827         (overflow_comparison_p_1, register_edge_assert_for_2): Likewise.
6828         (is_masked_range_test, find_switch_asserts, maybe_set_nonzero_bits)
6829         (vrp_evaluate_conditional_warnv_with_ops, intersect_ranges): Likewise.
6830         (range_fits_type_p, two_valued_val_range_p, vrp_finalize): Likewise.
6831         (evrp_dom_walker::before_dom_children): Likewise.
6832         * tree.c (cache_integer_cst, real_value_from_int_cst, integer_zerop)
6833         (integer_all_onesp, integer_pow2p, integer_nonzerop, tree_log2)
6834         (tree_floor_log2, tree_ctz, mem_ref_offset, tree_int_cst_sign_bit)
6835         (tree_int_cst_sgn, get_unwidened, int_fits_type_p): Likewise.
6836         (get_type_static_bounds, num_ending_zeros, drop_tree_overflow)
6837         (get_range_pos_neg): Likewise.
6838         * ubsan.c (ubsan_expand_ptr_ifn): Likewise.
6839         * config/darwin.c (darwin_mergeable_constant_section): Likewise.
6840         * config/aarch64/aarch64.c (aapcs_vfp_sub_candidate): Likewise.
6841         * config/arm/arm.c (aapcs_vfp_sub_candidate): Likewise.
6842         * config/avr/avr.c (avr_fold_builtin): Likewise.
6843         * config/bfin/bfin.c (bfin_local_alignment): Likewise.
6844         * config/msp430/msp430.c (msp430_attr): Likewise.
6845         * config/nds32/nds32.c (nds32_insert_attributes): Likewise.
6846         * config/powerpcspe/powerpcspe-c.c
6847         (altivec_resolve_overloaded_builtin): Likewise.
6848         * config/powerpcspe/powerpcspe.c (rs6000_aggregate_candidate)
6849         (rs6000_expand_ternop_builtin): Likewise.
6850         * config/rs6000/rs6000-c.c
6851         (altivec_resolve_overloaded_builtin): Likewise.
6852         * config/rs6000/rs6000.c (rs6000_aggregate_candidate): Likewise.
6853         (rs6000_expand_ternop_builtin): Likewise.
6854         * config/s390/s390.c (s390_handle_hotpatch_attribute): Likewise.
6856 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
6858         * tree-vect-loop-manip.c (rename_variables_in_bb): Rename PHI nodes
6859         when copying loop nest with only one inner loop.
6861 2017-10-10  Richard Biener  <rguenther@suse.de>
6863         * tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Avoid compacting
6864         blocks if SCEV is active.
6865         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Remove
6866         dead code.
6867         (analyze_scalar_evolution): Handle cached evolutions the obvious way.
6868         (scev_initialize): Assert we are not yet initialized.
6870 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
6872         * tree-loop-distribution.c (generate_loops_for_partition): Remove
6873         inner loop's exit stmt by making it always exit the loop, otherwise
6874         we would generate an infinite empty loop.
6876 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
6878         * tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg): Skip
6879         renaming variables in new preheader if it's deleted.
6881 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
6883         * tree-loop-distribution.c (struct partition): Remove unused field
6884         loops of the structure.
6885         (partition_alloc, partition_free): Ditto.
6886         (build_rdg_partition_for_vertex): Ditto.
6888 2017-10-09  Jeff Law  <law@redhat.com>
6890         * targhooks.c (default_stack_clash_protection_final_dynamic_probe): Fix
6891         return type to match prototype and documentation.
6893 2010-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
6895         * config/rs6000/rs6000.c (processor_costs): Move to ...
6896         * config/rs6000/rs6000.h: ... here.
6897         (rs6000_cost): Declare.
6899 2017-10-09  Eric Botcazou  <ebotcazou@adacore.com>
6901         * except.c (setjmp_fn): New global variable.
6902         (init_eh): Initialize it if DONT_USE_BUILTIN_SETJMP is defined.
6903         (sjlj_emit_function_enter): Call it instead of BUILTIN_SETJMP
6904         if DONT_USE_BUILTIN_SETJMP is defined.
6906 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
6908         * target.def (insn_cost): New hook.
6909         * doc/tm.texi.in (TARGET_INSN_COST): New hook.
6910         * doc/tm.texi: Regenerate.
6911         * rtlanal.c (insn_cost): Use the new hook.
6913 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
6915         * combine.c (combine_validate_cost): Compute the new insn_cost,
6916         not just pattern_cost.
6917         (try_combine): Adjust comment.
6919 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
6921         * cfgrtl.c (rtl_account_profile_record): Replace insn_rtx_cost with
6922         insn_cost.
6923         * combine.c (uid_insn_cost): Adjust comment.
6924         (combine_validate_cost): Adjust comment.  Use pattern_cost instead
6925         of insn_rtx_cost
6926         (combine_instructions): Use insn_cost instead of insn_rtx_cost.
6927         * dse.c (find_shift_sequence): Ditto.
6928         * ifcvt.c (cheap_bb_rtx_cost_p): Ditto.
6929         (bb_valid_for_noce_process_p): Use pattern_cost.
6930         * rtl.h (insn_rtx_cost): Delete.
6931         (pattern_cost): New prototype.
6932         (insn_cost): New prototype.
6933         * rtlanal.c (insn_rtx_cost): Rename to...
6934         (pattern_cost): ... this.
6935         (insn_cost): New.
6937 2017-10-09  Uros Bizjak  <ubizjak@gmail.com>
6939         * config/i386/i386.md (*jcc_2): Remove insn pattern.
6940         (*jcc<mode>_0_r_i387): Ditto.
6941         (*jccxf_r_i387): Ditto.
6942         (*jcc<mode>_r_i387): Ditto.
6943         (*jccu<mode>_r_i387): Ditto.
6944         (*jcc<X87MODEF:mode>_<SWI24:mode>_r_i387): Ditto.
6945         (*jcc): Rename from *jcc_1.
6947 2017-10-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
6949         * config/rs6000/rs6000-p8swap.c (rs6000_analyze_swaps): Process
6950         deferred rescans after the lvx/stvx recombination pre-pass.
6952 2017-10-09  Michael Meissner  <meissner@linux.vnet.ibm.com>
6954         * config/rs6000/amo.h: New include file to provide ISA 3.0 atomic
6955         memory operation instruction support.
6956         * config.gcc (powerpc*-*-*): Include amo.h as an extra header.
6957         (rs6000-ibm-aix[789]*): Likewise.
6958         * doc/extend.texi (PowerPC Atomic Memory Operation Functions):
6959         Document new functions.
6961 2017-10-09  Richard Biener  <rguenther@suse.de>
6963         PR tree-optimization/82397
6964         * tree-data-ref.c (data_ref_compare_tree): Make sure to return
6965         equality only for semantically equal trees.
6967 2017-10-09  Richard Biener  <rguenther@suse.de>
6969         PR tree-optimization/82449
6970         * sese.c (scev_analyzable_p): Check whether the SCEV is linear.
6971         * tree-chrec.h (evolution_function_is_constant_p): Adjust to
6972         allow constant addresses.
6973         * tree-chrec.c (scev_is_linear_expression): Constant evolutions
6974         are linear.
6976 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
6978         * config/s390/s390-builtins.def (vec_nabs, vec_vfi): Fix builtin
6979         flags.
6981 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
6983         PR target/82463
6984         * config/s390/vecintrin.h (vec_madd, vec_msub): Fix macro
6985         definitions.
6987 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
6989         PR target/82465
6990         * config/s390/s390-builtins.def (vec_sqrt): Fix builtin flags.
6992 2017-10-09  Jakub Jelinek  <jakub@redhat.com>
6994         PR target/82464
6995         * config/s390/s390-builtins.def (s390_vec_xor_flt_a,
6996         s390_vec_xor_flt_b, s390_vec_xor_flt_c): New.
6998 2017-10-09  Richard Sandiford  <richard.sandiford@linaro.org>
7000         * wide-int.h (WI_BINARY_OPERATOR_RESULT): New macro.
7001         (WI_BINARY_PREDICATE_RESULT): Likewise.
7002         (wi::binary_traits::operator_result): New type.
7003         (wi::binary_traits::predicate_result): Likewise.
7004         (generic_wide_int::operator~, unary generic_wide_int::operator-)
7005         (generic_wide_int::operator==, generic_wide_int::operator!=)
7006         (generic_wide_int::operator&, generic_wide_int::and_not)
7007         (generic_wide_int::operator|, generic_wide_int::or_not)
7008         (generic_wide_int::operator^, generic_wide_int::operator+
7009         (binary generic_wide_int::operator-, generic_wide_int::operator*):
7010         Delete.
7011         (operator~, unary operator-, operator==, operator!=, operator&)
7012         (operator|, operator^, operator+, binary operator-, operator*): New
7013         functions.
7014         * expr.c (get_inner_reference): Use wi::bit_and_not.
7015         * fold-const.c (fold_binary_loc): Likewise.
7016         * ipa-prop.c (ipa_compute_jump_functions_for_edge): Likewise.
7017         * tree-ssa-ccp.c (get_value_from_alignment): Likewise.
7018         (bit_value_binop): Likewise.
7019         * tree-ssa-math-opts.c (find_bswap_or_nop_load): Likewise.
7020         * tree-vrp.c (zero_nonzero_bits_from_vr): Likewise.
7021         (extract_range_from_binary_expr_1): Likewise.
7022         (masked_increment): Likewise.
7023         (simplify_bit_ops_using_ranges): Likewise.
7025 2017-10-09  Martin Jambor  <mjambor@suse.cz>
7027         PR hsa/82416
7028         * hsa-common.h (hsa_op_with_type): New method extend_int_to_32bit.
7029         * hsa-gen.c (hsa_extend_inttype_to_32bit): New function.
7030         (hsa_type_for_scalar_tree_type): Use it.  Always force min32int for
7031         COMPLEX types.
7032         (hsa_fixup_mov_insn_type): New function.
7033         (hsa_op_with_type::get_in_type): Use it.
7034         (hsa_build_append_simple_mov): Likewise.  Allow sub-32bit
7035         immediates in an assert.
7036         (hsa_op_with_type::extend_int_to_32bit): New method.
7037         (gen_hsa_insns_for_bitfield): Fixup instruction and intermediary
7038         types.  Convert to dest type if necessary.
7039         (gen_hsa_insns_for_bitfield_load): Fixup load type if necessary.
7040         (reg_for_gimple_ssa): Pass false as min32int to
7041         hsa_type_for_scalar_tree_type.
7042         (gen_hsa_addr): Fixup type when creating addresable temporary.
7043         (gen_hsa_cmp_insn_from_gimple): Extend operands if necessary.
7044         (gen_hsa_unary_operation): Extend operands and convert to dest type if
7045         necessary.  Call hsa_fixup_mov_insn_type.
7046         (gen_hsa_binary_operation): Changed operand types to hsa_op_with_type,
7047         extend operands and convert to dest type if necessary.
7048         (gen_hsa_insns_for_operation_assignment): Extend operands and convert
7049         to dest type if necessary.
7050         (set_output_in_type): Call hsa_fixup_mov_insn_type.  Just ude dest
7051         if conversion nt necessary and size matches.
7052         (gen_hsa_insns_for_load): Call hsa_fixup_mov_insn_type, convert
7053         to dest type if necessary.
7054         (gen_hsa_insns_for_store): Call hsa_fixup_mov_insn_type.
7055         (gen_hsa_insns_for_switch_stmt): Likewise. Also extend operands if
7056         necessary.
7057         (gen_hsa_clrsb): Likewise.
7058         (gen_hsa_ffs): Likewise.
7059         (gen_hsa_divmod): Extend operands and convert to dest type if
7060         necessary.
7061         (gen_hsa_atomic_for_builtin): Change type of op to hsa_op_with_type.
7063 2017-10-08  Segher Boessenkool  <segher@kernel.crashing.org>
7065         * config/rs6000/rs6000.md (conditional branch): Clean up formatting.
7066         Remove empty default arguments.  Use a brace block as output
7067         statement.
7068         (conditional return): Ditto.
7069         (jump): Ditto.
7070         (indirect_jump): Ditto.  Use b%T0 instead of bctr/blr.
7071         (tablejump, tablejumpsi, tablejumpdi, *tablejump<mode>_internal1):
7072         Ditto.
7073         (group_ending_nop): Ditto.
7074         (doloop_end): Ditto.
7075         (ctr<mode>, ctr<mode>_internal1, ctr<mode>_internal2): Ditto.
7076         (splitters for those): Ditto.
7078 2017-10-08  Segher Boessenkool  <segher@kernel.crashing.org>
7080         * config/rs6000/rs6000-string.c (expand_strncmp_align_check): Invert
7081         a conditional jump (and the compare for it) so that pc_rtx is the
7082         last operand.
7083         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Adjust
7084         for the deleted and renamed ctr<mode>_internal[234] patterns.
7085         * config/rs6000/rs6000.md: Delete second conditional branch pattern.
7086         Delete second conditional return pattern.
7087         (ctr<mode>_internal2): Delete this second bdnz pattern.
7088         (ctr<mode>_internal3): Rename to ctr<mode>_internal2.
7089         (ctr<mode>_internal4): Delete this second bdz pattern.
7091 2017-10-08  Eric Botcazou  <ebotcazou@adacore.com>
7093         * tree-outof-ssa.h (ssaexpand): Add partitions_for_undefined_values.
7094         (always_initialized_rtx_for_ssa_name_p): New predicate.
7095         * tree-outof-ssa.c (remove_ssa_form): Initialize new field of SA.
7096         (finish_out_of_ssa): Free new field of SA.
7097         * tree-ssa-coalesce.h (get_undefined_value_partitions): Declare.
7098         * tree-ssa-coalesce.c: Include tree-ssa.h.
7099         (get_parm_default_def_partitions): Remove extern keyword.
7100         (get_undefined_value_partitions): New function.
7101         * expr.c (expand_expr_real_1) <expand_decl_rtl>: For a SSA_NAME, do
7102         not set SUBREG_PROMOTED_VAR_P on the sub-register if it may contain
7103         uninitialized bits.
7104         * loop-iv.c (iv_get_reaching_def): Disqualify all subregs.
7106 2017-10-08  Eric Botcazou  <ebotcazou@adacore.com>
7108         * builtins.def (BUILT_IN_SETJMP): Revert latest change.
7110 2017-10-08  Jan Hubicka  <hubicka@ucw.cz>
7112         * config/i386/i386.c (ix86_expand_set_or_movmem): Disable 512bit loops
7113         for targets that preffer 128bit.
7115 2017-10-08  Jan Hubicka  <hubicka@ucw.cz>
7117         * config/i386/i386.c (has_dispatch): Disable for Ryzen.
7119 2017-10-08  Olivier Hainque  <hainque@adacore.com>
7121         * config/arm/arm.c (arm_set_return_address): Use MEM_VOLATILE_P
7122         on the target mem instead of RTX_FRAME_RELATED_P on the insn to
7123         prevent DSE.
7124         (thumb_set_return_address): Likewise.
7126 2017-10-08  Olivier Hainque  <hainque@adacore.com>
7128         * common/config/arm/arm-common.c (arm_except_unwind_info):
7129         Handle DWARF2_UNWIND_INFO.
7131 2017-10-07  Michael Collison <michael.collison@arm.com>
7133         * config/aarch64/aarch64.md (*aarch64_reg_<optab>_minus<mode>3):
7134         New pattern.
7136 2017-10-07  Eric Botcazou  <ebotcazou@adacore.com>
7138         * builtins.def (BUILT_IN_SETJMP): Declare as library builtin instead
7139         of GCC builtin if DONT_USE_BUILTIN_SETJMP is defined.
7140         * except.c (sjlj_emit_function_enter): If DONT_USE_BUILTIN_SETJMP is
7141         defined, force the creation of a new block for a dispatch label.
7143 2017-10-07  Jan Hubicka  <hubicka@ucw.cz>
7145         * invoke.texi (Wsuggest-attribute=cold): Document.
7146         * common.opt (Wsuggest-attribute=cold): New
7147         * ipa-pure-const.c (warn_function_cold): New function.
7148         * predict.c (compute_function_frequency): Use it.
7149         * predict.h (warn_function_cold): Declare.
7151 2017-10-06  Jan Hubicka  <hubicka@ucw.cz>
7153         * tree-switch-conversion.c (do_jump_if_equal, emit_cmp_and_jump_insns):
7154         Update profile.
7156 2017-10-06  Martin Liska  <mliska@suse.cz>
7158         * sanopt.c (struct sanopt_tree_triplet_hash): Remove inline
7159         keyword for member functions.
7160         (struct sanopt_tree_couple): New struct.
7161         (struct sanopt_tree_couple_hash): New function.
7162         (struct sanopt_ctx): Add new hash_map.
7163         (has_dominating_ubsan_ptr_check): New function.
7164         (record_ubsan_ptr_check_stmt): Likewise.
7165         (maybe_optimize_ubsan_ptr_ifn): Likewise.
7166         (sanopt_optimize_walker): Handle IFN_UBSAN_PTR.
7167         (pass_sanopt::execute): Handle also SANITIZE_POINTER_OVERFLOW.
7169 2017-10-06  Sudakshina Das  <sudi.das@arm.com>
7171         PR target/82440
7172         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Only call
7173         aarch64_simd_valid_immediate on CONST_VECTORs.
7174         (aarch64_reg_or_bic_imm): Likewise.
7176 2017-10-06  Wilco Dijkstra  <wdijkstr@arm.com>
7178         PR rtl-optimization/82396
7179         * haifa-sched.c (ready_sort_real): Disable qsort checking.
7181 2017-10-06  Sebastian Pop  <sebpop@gmail.com>
7183         * graphite-dependences.c (scop_get_reads): Move code to...
7184         (scop_get_must_writes): Move code to...
7185         (scop_get_may_writes): Move code to...
7186         (scop_get_reads_and_writes): ... here.
7187         (scop_get_dependences): Call scop_get_reads_and_writes.
7189 2017-10-06  Jakub Jelinek  <jakub@redhat.com>
7191         PR tree-optimization/82434
7192         * fold-const.h (can_native_encode_type_p,
7193         can_native_encode_string_p): Remove.
7194         * fold-const.c (native_encode_int): Formatting fixes.  If ptr is NULL,
7195         don't encode anything, just return what would be otherwise returned.
7196         (native_encode_fixed, native_encode_complex, native_encode_vector):
7197         Likewise.
7198         (native_encode_string): Likewise.  Inline by hand
7199         can_native_encode_string_p.
7200         (can_native_encode_type_p): Remove.
7201         (can_native_encode_string_p): Remove.
7202         * tree-vect-stmts.c (vectorizable_store): Instead of testing just
7203         STRING_CSTs using can_native_encode_string_p, test all
7204         CONSTANT_CLASS_P values using native_encode_expr with NULL ptr.
7205         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Remove last
7206         argument from native_encode_expr.
7207         (rhs_valid_for_store_merging_p): Use native_encode_expr with NULL ptr.
7208         (pass_store_merging::execute): Don't unnecessarily look for 3 stmts,
7209         but just 2.
7211 2017-10-06  Richard Biener  <rguenther@suse.de>
7213         PR tree-optimization/82397
7214         * tree-vect-data-refs.c (dr_group_sort_cmp): Do not use
7215         operand_equal_p but rely on data_ref_compare_tree for detecting
7216         equalities.
7217         (vect_analyze_data_ref_accesses): Use data_ref_compare_tree
7218         to match up with dr_group_sort_cmp.
7220 2017-10-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7222         PR target/82322
7223         * config/s390/s390-builtins.def (s390_vfi): Define new overloaded
7224         builtin.
7225         * config/s390/s390-builtin-types.def: Regenerate.
7227 2017-10-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7229         PR target/82317
7230         * config/s390/s390-builtin-types.def: Regenerate.
7231         * config/s390/s390-builtins.def (s390_vfmaxdb_4, s390_vfmindb_4):
7232         Change flag from B_VXE to B_VX.
7233         (s390_vec_min_dbl): Remove B_VXE flag.
7235 2017-10-06  Richard Biener  <rguenther@suse.de>
7237         * graphite-isl-ast-to-gimple.c: Include ssa.h and tree-ssa.h.
7238         (translate_isl_ast_to_gimple::translate_pending_phi_nodes,
7239         translate_isl_ast_to_gimple::is_valid_rename,
7240         translate_isl_ast_to_gimple::get_rename,
7241         translate_isl_ast_to_gimple::get_def_bb_for_const,
7242         translate_isl_ast_to_gimple::get_new_name,
7243         translate_isl_ast_to_gimple::collect_all_ssa_names,
7244         translate_isl_ast_to_gimple::copy_loop_phi_args,
7245         translate_isl_ast_to_gimple::collect_all_ssa_names,
7246         translate_isl_ast_to_gimple::copy_loop_phi_args,
7247         translate_isl_ast_to_gimple::copy_loop_phi_nodes,
7248         translate_isl_ast_to_gimple::add_close_phis_to_merge_points,
7249         translate_isl_ast_to_gimple::add_close_phis_to_outer_loops,
7250         translate_isl_ast_to_gimple::copy_loop_close_phi_args,
7251         translate_isl_ast_to_gimple::copy_loop_close_phi_nodes,
7252         translate_isl_ast_to_gimple::copy_cond_phi_args,
7253         translate_isl_ast_to_gimple::copy_cond_phi_nodes,
7254         translate_isl_ast_to_gimple::edge_for_new_close_phis,
7255         translate_isl_ast_to_gimple::add_phi_arg_for_new_expr,
7256         translate_isl_ast_to_gimple::rename_uses,
7257         translate_isl_ast_to_gimple::rename_all_uses): Remove.
7258         (translate_isl_ast_to_gimple::get_rename_from_scev): Simplify.
7259         (set_rename_for_each_def): Likewise.
7260         (graphite_copy_stmts_from_block): Handle debug stmt resetting
7261         here.  Handle rewriting SCEV analyzable uses here.
7262         (copy_bb_and_scalar_dependences): Generate code for PHI
7263         copy-in/outs.
7264         (graphite_regenerate_ast_isl): Adjust.
7265         * graphite-scop-detection.c (trivially_empty_bb_p): Move to sese.[ch].
7266         (add_write, add_read): New functions.
7267         (build_cross_bb_scalars_def): Use it and simplify.
7268         (build_cross_bb_scalars_use): Likewise.
7269         (graphite_find_cross_bb_scalar_vars): Inline into...
7270         (try_generate_gimple_bb): ...here.  Add dependences for PHIs,
7271         simulating out-of-SSA.  Compute liveout and add dependencies.
7272         (build_scops): Force an empty entry block.
7273         * sese.h (sese_info_t::liveout, sese_info_t::debug_liveout): New
7274         members.
7275         (sese_build_liveouts): Declare.
7276         (sese_trivially_empty_bb_p): Likewise.
7277         * sese.c (sese_build_liveouts_bb): Properly handle PHIs,
7278         compute liveout and debug_liveout.
7279         (sese_bad_liveouts_use): Remove.
7280         (sese_reset_debug_liveouts_bb): Likewise.
7281         (sese_reset_debug_liveouts): Rewrite in terms of debug_liveout.
7282         (sese_build_liveouts): Build liveout and debug_liveout and store
7283         it in region.
7284         (new_sese_info): Adjust.
7285         (free_sese_info): Likewise.
7286         (sese_insert_phis_for_liveouts): Reset debug stmts from here,
7287         do not build liveout here.
7288         (move_sese_in_condition): Adjust region entry.
7289         (scev_analyzable_p): Match up with chrec_apply requirements.
7290         (sese_trivially_empty_bb_p): New.
7291         * tree-into-ssa.c (get_reaching_def): Properly support generating
7292         default-defs for incremental rewrite of anonymous names.
7294 2017-10-06  Richard Biener  <rguenther@suse.de>
7296         * graphite-sese-to-poly.c (extract_affine): For casts increasing
7297         precision do not perform modulo reduction.
7299 2017-10-06  Richard Biener  <rguenther@suse.de>
7301         PR tree-optimization/82436
7302         * tree-vect-slp.c (vect_supported_load_permutation_p): More
7303         conservatively choose the vectorization factor when checking
7304         whether we can perform the required load permutation.
7305         (vect_transform_slp_perm_load): Assert when we may not fail.
7307 2017-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
7309         * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Correct error
7310         message for incompatible -msdata=* and -mcall-* options.
7312 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
7314         * config/i386/i386.c (ia32_multipass_dfa_lookahead): Default to issue
7315         rate for post-reload scheduling.
7317 2017-10-05  Tamar Christina  <tamar.christina@arm.com>
7319         * doc/sourcebuild.texi (vect_sizes_16B_8B, vect_sizes_32B_16B): New.
7321 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
7323         * config/i386/i386.c (znver1_cost): Set branch_cost to 3 (instead of 2)
7324         to improve monte carlo in scimark.
7326 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
7328         * config/i386/i386.c (ix86_size_cost, i386_cost, i486_cost,
7329         pentium_cost, lakemont_cost, pentiumpro_cost, geode_cost, k6_cost,
7330         athlon_cost, k8_cost, amdfam10_cost, btver1_cost, btver2_cost,
7331         pentium4_cost, nocona_cost): Set reassociation width to 1.
7332         (bdver1_cost, bdver2_cost, bdver3_cost, bdver4_cost): Set reassociation
7333         width to 2 for fp operations and 1 otherwise.
7334         (znver1_cost): Set scalar reassoc width to 4 and vector to 3 and 6
7335         for int and fp.
7336         (atom_cost): Set reassociation width to 2.
7337         (slm_cost, generic_cost): Set fp reassociation width
7338         to 2 and 1 otherwise.
7339         (intel_cost): Set fp reassociation width to 4 and 1 otherwise.
7340         (core_cost): Set fp reassociation width to 4 and vector to 2.
7341         (ix86_reassociation_width): Rewrite using cost table; special case
7342         plus/minus on Zen; honor X86_TUNE_SSE_SPLIT_REGS
7343         and TARGET_AVX128_OPTIMAL.
7344         * config/i386/i386.h (processor_costs): Add
7345         reassoc_int, reassoc_fp, reassoc_vec_int, reassoc_vec_fp.
7346         (TARGET_VECTOR_PARALLEL_EXECUTION, TARGET_REASSOC_INT_TO_PARALLEL,
7347         TARGET_REASSOC_FP_TO_PARALLEL): Remove.
7348         * x86-tune.def (X86_TUNE_REASSOC_INT_TO_PARALLEL): Remove.
7349         (X86_TUNE_REASSOC_FP_TO_PARALLEL): Remove.
7350         (X86_TUNE_VECTOR_PARALLEL_EXECUTION):  Remove.
7352 2017-10-05  Nathan Sidwell  <nathan@acm.org>
7354         * doc/invoke.texi (Wparentheses): Document C++ MVP behaviour.
7356 2017-10-05  Tamar Christina  <tamar.christina@arm.com>
7358         * config/arm/arm.c (arm_test_fpu_data): New.
7359         (arm_run_selftests): Call arm_test_fpu_data.
7361 2017-10-04  Nathan Sidwell  <nathan@acm.org>
7363         * toplev.c (toplev::main): Remove excess parens on pretty_printer
7364         decl.
7365         * caller-save.c (insert_save): Remove excess parens on TO_SAVE parm.
7367 2017-10-04  Sudakshina Das  <sudi.das@arm.com>
7369         * config/aarch64/aarch64-protos.h (enum simd_immediate_check): New
7370         check type for aarch64_simd_valid_immediate.
7371         (aarch64_output_simd_mov_immediate): Update prototype.
7372         (aarch64_simd_valid_immediate): Update prototype.
7373         * config/aarch64/aarch64-simd.md (orr<mode>3): modified pattern to add
7374         support for ORR-immediate.
7375         (and<mode>3): modified pattern to add support for BIC-immediate.
7376         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Function
7377         now checks for valid immediate for BIC and ORR based on new enum
7378         argument.
7379         (aarch64_output_simd_mov_immediate): Function now used to output
7380         BIC/ORR imm as well based on new enum argument.
7381         * config/aarch64/constraints.md (Do): New vector immediate constraint.
7382         (Db) : Likewise.
7383         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): New predicate.
7384         (aarch64_reg_or_bic_imm): Likewise.
7386 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7388         * config/s390/vx-builtins.md ("vec_mergeh<mode>")
7389         ("vec_mergel<mode>"): Change mode iterator to V_128_NOSINGLE.
7391 2017-10-04  Wilco Dijkstra  <wdijkstr@arm.com>
7393         Revert r253399:
7395         PR rtl-optimization/82396
7396         * haifa-sched.c (autopref_multipass_init): Simplify
7397         initialization.
7398         (autopref_rank_data): Simplify sort order.
7399         * sched-int.h (autopref_multipass_data_): Remove
7400         multi_mem_insn_p, min_offset and max_offset.
7402 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7404         * doc/sourcebuild.texi: Document vect_peeling_profitable.
7406 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7408         * doc/sourcebuild.texi: Document vect_intdouble_cvt and
7409         vect_doubleint_cvt.
7411 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7413         * doc/sourcebuild.texi: Document vect_long_mult.
7415 2017-10-04  Richard Sandiford  <richard.sandiford@linaro.org>
7417         PR tree-optimization/82413
7418         * fold-const.c (build_range_check): Use widest_int when comparing
7419         the maximum ETYPE value with HIGH.
7421 2017-10-04  Wilco Dijkstra  <wdijkstr@arm.com>
7423         PR rtl-optimization/82396
7424         * haifa-sched.c (autopref_multipass_init): Simplify
7425         initialization.
7426         (autopref_rank_data): Simplify sort order.
7427         * sched-int.h (autopref_multipass_data_): Remove
7428         multi_mem_insn_p, min_offset and max_offset.
7430 2017-10-04  Jakub Jelinek  <jakub@redhat.com>
7432         PR tree-optimization/82381
7433         * tree-ssa-reassoc.c (sort_by_operand_rank): Check for different
7434         oeN->rank first.  Return 1 or -1 if one op is SSA_NAME and the other
7435         is not.
7437         PR tree-optimization/82374
7438         * omp-low.c (create_omp_child_function): Copy DECL_ATTRIBUTES,
7439         DECL_FUNCTION_SPECIFIC_OPTIMIZATION,
7440         DECL_FUNCTION_SPECIFIC_TARGET and DECL_FUNCTION_VERSIONED from
7441         current_function_decl to the new decl.
7443 2017-10-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
7445         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_2_HW): Define new
7446         helper macro for IEEE float128 hardware built-in functions.
7447         (SQRTF128_ODD): Add built-in functions with the round-to-odd
7448         semantics.
7449         (TRUNCF128_ODD): Likewise.
7450         (ADDF128_ODD): Likewise.
7451         (SUBF128_ODD): Likewise.
7452         (MULF128_ODD): Likewise.
7453         (DIVF128_ODD): Likewise.
7454         (FMAF128_ODD): Likewise.
7455         * config/rs6000/rs6000.md (UNSPEC_ROUND_TO_ODD): Rename to
7456         UNSPEC_TRUNC_ROUND_TO_ODD.
7457         (UNSPEC_TRUNC_ROUND_TO_ODD): Likewise.
7458         (UNSPEC_ADD_ROUND_TO_ODD): New unspec codes for the IEEE 128-bit
7459         floating point round to odd instructions.
7460         (UNSPEC_SUB_ROUND_TO_ODD): Likewise.
7461         (UNSPEC_MUL_ROUND_TO_ODD): Likewise.
7462         (UNSPEC_DIV_ROUND_TO_ODD): Likewise.
7463         (UNSPEC_FMA_ROUND_TO_ODD): Likewise.
7464         (UNSPEC_SQRT_ROUND_TO_ODD): Likewise.
7465         (trunc<mode>sf2_hw): Change the truncate with round to odd
7466         expansion to use UNSPEC_TRUNC_ROUND_TO_ODD.
7467         (add<mode>3_odd): Add insns for IEEE 128-bit floating point round
7468         to odd hardware instructions.
7469         (sub<mode>3_odd): Likewise.
7470         (mul<mode>3_odd): Likewise.
7471         (div<mode>3_odd): Likewise.
7472         (sqrt<mode>2_odd): Likewise.
7473         (fma<mode>4_odd): Likewise.
7474         (fms<mode>4_odd): Likewise.
7475         (nfma<mode>4_odd): Likewise.
7476         (nfms<mode>4_odd): Likewise.
7477         (trunc<mode>df2_odd): Change the truncate with round to odd
7478         expansion to use UNSPEC_TRUNC_ROUND_TO_ODD.  Add a generator
7479         function.
7480         * doc/extend.texi (PowerPC built-in functions): Update documentation
7481         for existing IEEE float128-bit built-in functions.  Add built-in
7482         functions that generate the IEEE 128-bit floating point round to
7483         odd instructions.
7485 2017-10-03  Segher Boessenkool  <segher@kernel.crashing.org>
7487         PR rtl-optimization/77729
7488         * simplify-rtx.c (simplify_binary_operation_1): Delete the (X&C1)|C2
7489         to (X&(C1&~C2))|C2 transformations.
7491 2017-10-03  Martin Jambor  <mjambor@suse.cz>
7493         PR tree-optimization/82363
7494         * tree-sra.c (propagate_subaccesses_across_link): In unrecoverable
7495         mismatch, mark lacc written regardless of racc.
7497 2017-10-03  Jakub Jelinek  <jakub@redhat.com>
7499         PR tree-optimization/82381
7500         * tree-ssa-reassoc.c (sort_by_operand_rank): Don't check
7501         stmt_to_insert nor wheather SSA_NAMEs are default defs.
7502         Return 1 or -1 if one of bba and bbb is NULL. If bb_rank is equal,
7503         fallthrough into reassoc_stmt_dominates_stmt_p.
7505         PR target/82386
7506         * combine.c (combine_instructions): Don't combine in unreachable
7507         basic blocks.
7509 2017-08-18  Peter Bergner  <bergner@vnet.ibm.com>
7511         PR target/80210
7512         * config/rs6000/rs6000.c (rs6000_option_override_internal): Rewrite
7513         function to not use the have_cpu variable.  Do not set cpu_index,
7514         rs6000_cpu_index or rs6000_tune_index if we end up using TARGET_DEFAULT
7515         or the default cpu.
7516         (rs6000_valid_attribute_p): Remove duplicate initializations of
7517         old_optimize and func_optimize.
7518         (rs6000_pragma_target_parse): Call rs6000_activate_target_options ().
7519         (rs6000_activate_target_options): Make global.
7520         * config/rs6000/rs6000-protos.h (rs6000_activate_target_options): Add
7521         prototype.
7523 2017-10-02  Jakub Jelinek  <jakub@redhat.com>
7525         * tree-dfa.c (get_ref_base_and_extent): Set *pmax_size to -1
7526         if *poffset + *pmax_size overflows in HOST_WIDE_INT.
7527         Set *poffset to 0 and *psize and *pmax_size to -1 if
7528         *poffset + *psize overflows in HOST_WIDE_INT.
7530         PR tree-optimization/82387
7531         PR tree-optimization/82388
7532         PR tree-optimization/82389
7533         * tree-ssa-dse.c (dse_classify_store): Test byte_tracking_enabled
7534         instead of live_bytes non-NULL.
7536 2017-10-02  Georg-Johann Lay  <avr@gjlay.de>
7538         PR target/41076
7539         * confg/avr/avr.md (*iorhi3.ashift8-ext.zerox): Add "r,r,0"
7540         alternative.
7542 2017-10-02  Richard Biener  <rguenther@suse.de>
7544         * graphite-isl-ast-to-gimple.c (set_codegen_error): With
7545         -fchecking and --param graphite-allow-codegen-errors=0 ICE.
7546         * params.def (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): New param.
7548 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
7550         * tree.h (wi::int_traits <const_tree>::decompose): Assert that the
7551         requested precision matches the type's.
7552         * calls.c (alloc_max_size): Calculate the new candidate size as
7553         a widest_int and use wi::to_widest when comparing it with the
7554         current candidate size.
7555         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Compare with
7556         zero rather than integer_zero_node.
7557         * match.pd: Check for a no-op conversion before using wi::add
7558         rather than after.  Use tree_to_uhwi when summing small shift
7559         counts into an unsigned int.
7561 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
7562             Alan Hayward  <alan.hayward@arm.com>
7563             David Sherwood  <david.sherwood@arm.com>
7565         PR target/71307
7566         * config/aarch64/aarch64.h (POINTER_AND_FP_REGS): New reg class.
7567         (REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update accordingly.
7568         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
7569         POINTER_AND_FP_REGS.
7571 2017-10-02  Richard Biener  <rguenther@suse.de>
7573         PR tree-optimization/82355
7574         * graphite-isl-ast-to-gimple.c (build_iv_mapping): Also build
7575         a mapping for the enclosing loop but avoid generating one for
7576         the loop tree root.
7577         (copy_bb_and_scalar_dependences): Remove premature codegen
7578         error on PHIs in blocks duplicated into multiple places.
7579         * graphite-scop-detection.c
7580         (scop_detection::stmt_has_simple_data_refs_p): For a loop not
7581         in the region use it as loop and nest to analyze the DR in.
7582         (try_generate_gimple_bb): Likewise.
7583         * graphite-sese-to-poly.c (extract_affine_chrec): Adjust.
7584         (add_loop_constraints): For blocks in a loop not in the region
7585         create a dimension with a single iteration.
7586         * sese.h (gbb_loop_at_index): Remove assert.
7588 2017-10-01  Kevin Buettner  <kevinb@redhat.com>
7590         * omp-expand.c (adjust_context_scope): New function.
7591         (expand_parallel_call): Call adjust_context_scope.
7593 2017-10-01  Jeff Law  <law@redhat.com>
7595         * tree-ssa-dom.c (optimize_stmt): Make this a method within the
7596         dom_opt_dom_walker class with direct access to private members.
7597         Add comments.  Call test_for_singularity.
7598         (dom_opt_dom_walker::before_dom_children): Corresponding changes.
7599         (dom_opt_dom_walker::after_dom_children): Do not lazily initialize
7600         m_dummy_cond anymore.
7601         (class dom_opt_dom_walker): Initialize m_dummy_cond member in the
7602         class ctor.
7603         (pass_dominator:execute): Build the dummy_cond here and pass it
7604         to the dom_opt_dom_walker ctor.
7605         (test_for_singularity): New function.
7607 2017-09-30  Krister Walfridsson  <krister.walfridsson@gmail.com>
7608             Maya Rashish  <coypu@sdf.org>
7610         * config.gcc (*-*-netbsd*): New variable nbsd_tm_file containing
7611         netbsd.h, netbsd-stdint.h, and netbsd-elf.h.
7612         (alpha*-*-netbsd*) Use nbsd_tm_file.
7613         (arm*-*-netbsdelf*) Likewise.
7614         (i[34567]86-*-netbsdelf*) Likewise.
7615         (x86_64-*-netbsd*) Likewise.
7616         (mips*-*-netbsd*) Likewise.
7617         (powerpc-*-netbsd*) Likewise.
7618         (sh*-*-netbsd*) Likewise.
7619         (sparc-*-netbsdelf*) Likewise.
7620         (sparc64-*-netbsd*) Likewise.
7621         (m68k*-*-netbsdelf*) Use nbsd_tm_file and add CHAR_FAST8/SHORT_FAST16
7622         to tm_defines.
7623         (vax-*-netbsdelf*) Likewise.
7624         * config/netbsd-stdint.h (INT_FAST8_TYPE): Check CHAR_FAST8.
7625         (UINT_FAST8_TYPE) Likewise.
7626         (INT_FAST16_TYPE) Check CHAR_FAST16.
7627         (UINT_FAST16_TYPE) Likewise.
7629 2017-09-30  Jakub Jelinek  <jakub@redhat.com>
7631         PR target/82361
7632         * config/i386/i386.md
7633         (TARGET_USE_8BIT_IDIV zext divmodsi4 splitter): New define_split.
7634         (divmodsi4_zext_1, divmodsi4_zext_2, *divmodsi4_zext_1,
7635         *divmodsi4_zext_2): New define_insn_and_split.
7636         (*divmodsi4_noext_zext_1, *divmodsi4_noext_zext_2): New define_insn.
7637         (TARGET_USE_8BIT_IDIV zext udivmodsi4 splitter): New define_split.
7638         (udivmodsi4_zext_1, udivmodsi4_zext_2, *udivmodsi4_zext_1,
7639         *udivmodsi4_zext_2, *udivmodsi4_pow2_zext_1, *udivmodsi4_pow2_zext_2):
7640         New define_insn_and_split.
7641         (*udivmodsi4_noext_zext_1, *udivmodsi4_noext_zext_2): New define_insn.
7642         * config/i386/i386.c (ix86_split_idivmod): Handle operands[0] or
7643         operands[1] having DImode when mode is SImode.
7645         * config/i386/i386.c (ix86_split_idivmod): Use mode instead of
7646         always SImode for DIV and MOD in REG_EQUAL notes.
7648 2017-09-29  Yury Gribov  <tetra2005@gmail.com>
7650         PR middle-end/82319
7651         * match.pd: Fix handling of NaNs in pattern.
7653 2017-09-29  Jeff Law  <law@redhat.com>
7655         * sbitmap.c (bitmap_bit_in_range_p): New function.
7656         * sbitmap.h (bitmap_bit_in_range_p): Prototype.
7657         * tree-ssa-dse.c (live_bytes_read): New function.
7658         (dse_classify_store): Ignore reads of dead bytes.
7660         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Fix
7661         typos and whitespace errors.
7662         * config/i386/predicates.md (address_no_seg_operand): Likewise.
7663         * config/s390/s390.c (s390_emit_prologue): Likewise.
7665 2017-09-29  Vladimir Makarov  <vmakarov@redhat.com>
7667         PR target/81481
7668         * ira-costs.c (scan_one_insn): Don't take into account PIC equiv
7669         with a symbol for LRA.
7671 2017-09-29  Vladimir Makarov  <vmakarov@redhat.com>
7673         PR rtl-optimization/82338
7674         * lra-constraints.c (inherit_in_ebb): Check usage_insns check.
7676 2017-09-29  Alexander Monakov  <amonakov@ispras.ru>
7678         * genmodes.c (calc_wider_mode): Suppress qsort macro.
7679         * system.h [CHECKING_P] (qsort): Redirect to qsort_chk.
7680         (qsort_chk): Declare.
7681         * vec.c [CHECKING_P] (qsort_chk_error): New static function.
7682         (qsort_chk): New function.
7684 2017-09-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
7686         PR tree-optimization/82337
7687         * gimple-ssa-strength-reduction.c (find_phi_def): Don't record a
7688         phi definition if the PHI result appears in an abnormal PHI.
7689         (find_basis_for_base_expr): Don't record a basis if the LHS of the
7690         basis appears in an abnormal PHI.
7692 2017-09-29  Richard Biener  <rguenther@suse.de>
7694         * graphite-isl-ast-to-gimple.c
7695         (translate_isl_ast_to_gimple::set_codegen_error): New function.
7696         (binary_op_to_tree): Use it.
7697         (get_rename_from_scev): Likewise.
7698         (copy_loop_phi_nodes): Likewise.
7699         (copy_bb_and_scalar_dependences): Likewise.
7700         (translate_pending_phi_nodes): Likewise.
7702 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
7704         PR target/82339
7705         * config/i386/i386.md (*movdi_internal peephole2): New -Os peephole
7706         for movabsq $(i32 << shift), r64.
7708 2017-09-28  Uros Bizjak  <ubizjak@gmail.com>
7710         * config/i386/i386.c (ix86_print_operand_address_as): Do not check
7711         index when encoding %esp as %rsp to avoid 0x67 prefix.
7713 2017-09-28  Sergey Shalnov  <Sergey.Shalnov@intel.com>
7715         * config/i386/i386.md (*movsf_internal, *movdf_internal):
7716         Return 256-bit AVX modes for TARGET_PREFER_AVX256.
7718 2017-09-28  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7720         * config/arm/arm.c (arm_option_override): Forbid ARMv8-M Security
7721         Extensions with more than 16 double VFP registers.
7722         (cmse_nonsecure_entry_clear_before_return): Remove second entry of
7723         to_clear_mask and all code related to it.  Replace the remaining
7724         entry by a sbitmap and adapt code accordingly.
7726 2017-09-28  Henry Linjamäki  <henry.linjamaki@parmance.com>
7728         * brig-builtins.def: Change pure attributes to const.
7730 2017-09-28  Joseph Myers  <joseph@codesourcery.com>
7732         * config.gcc (default_gnu_indirect_function): Default to yes for
7733         sparc*-*-linux* with glibc.
7735 2017-09-28  Joseph Myers  <joseph@codesourcery.com>
7737         * config/aarch64/aarch64.c (aarch64_elf_asm_constructor)
7738         (aarch64_elf_asm_destructor): Pass SECTION_NOTYPE to get_section
7739         when creating .init_array and .fini_array sections with priority
7740         specified.
7742 2017-09-27  Christophe Lyon  <christophe.lyon@linaro.org>
7744         PR target/71727
7745         * config/aarch64/aarch64.c
7746         (aarch64_builtin_support_vector_misalignment): Always return false
7747         when misalignment is unknown.
7749 2017-09-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7751         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Revise
7752         this function to return false if the definition used by the swap
7753         instruction is artificial, or if the memory address from which the
7754         constant value is loaded is not represented by a base address held
7755         in a register or if the base address register is a frame or stack
7756         pointer.  Additionally, return false if the base address of the
7757         loaded constant is a SYMBOL_REF but is not considered to be a
7758         constant.
7759         (replace_swapped_load_constant): New function.
7760         (rs6000_analyze_swaps): Add a new pass to replace a swap of a
7761         loaded constant vector with a load of a swapped constant vector.
7763 2017-09-27  Carl Love  <cel@us.ibm.com>
7765         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
7766         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
7767         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
7768         fctiw instruction.
7770 2017-09-27  Alexander Monakov  <amonakov@ispras.ru>
7772         * haifa-sched.c (autopref_rank_for_schedule): Order 'irrelevant' insns
7773         first, always call autopref_rank_data otherwise.
7775 2017-09-27  Richard Biener  <rguenther@suse.de>
7777         * graphite-scop-detection.c (find_scop_parameters): Move
7778         loop bound handling ...
7779         (gather_bbs::before_dom_children): ... here, avoiding the need
7780         to build scop_info->loop_nest.
7781         (record_loop_in_sese): Remove.
7782         * sese.h (sese_info_t::loop_nest): Remove.
7783         * sese.c (new_sese_info): Do not allocate loop_nest.
7784         (free_sese_info): Do not free loop_nest.
7786 2017-09-27  Jakub Jelinek  <jakub@redhat.com>
7788         PR c++/82159
7789         * gimplify.c (gimplify_modify_expr): Don't optimize away zero sized
7790         lhs from calls if the lhs has addressable type.
7792 2017-09-27  Richard Biener  <rguenther@suse.de>
7794         * graphite.h (scop::max_alias_set): New member.
7795         * graphite-scop-detection.c: Remove references to non-existing
7796         --param in comments.
7797         (build_alias_sets): Record the maximum alias set used for drs.
7798         (build_scops): Support zero as unlimited for
7799         --param graphite-max-arrays-per-scop.
7800         * graphite-sese-to-poly.c (add_scalar_version_numbers): Remove
7801         and inline into ...
7802         (build_poly_sr_1): ... here.  Compute alias set based on the
7803         maximum alias set used for drs rather than
7804         PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP
7806 2017-09-27  Richard Biener  <rguenther@suse.de>
7808         * graphite-optimize-isl.c (get_schedule_for_node_st): Allow
7809         --param loop-block-tile-size=0 to disable tiling.
7811 2017-09-27  Richard Biener  <rguenther@suse.de>
7813         * doc/invoke.texi (graphite-max-bbs-per-function): Remove.
7814         (graphite-max-nb-scop-params): Document special value zero.
7815         * domwalk.h (dom_walker::STOP): New symbolical constant.
7816         (dom_walker::dom_walker): Add optional parameter for bb to
7817         RPO mapping.
7818         (dom_walker::~dom_walker): Declare.
7819         (dom_walker::before_dom_children): Document STOP return value.
7820         (dom_walker::m_user_bb_to_rpo): New member.
7821         (dom_walker::m_bb_to_rpo): Likewise.
7822         * domwalk.c (dom_walker::dom_walker): Compute bb to RPO
7823         mapping here if not provided by the user.
7824         (dom_walker::~dom_walker): Free bb to RPO mapping if not
7825         provided by the user.
7826         (dom_walker::STOP): Define.
7827         (dom_walker::walk): Do not compute bb to RPO mapping here.
7828         Support STOP return value from before_dom_children to stop
7829         walking.
7830         * graphite-optimize-isl.c (optimize_isl): If the schedule
7831         is the same still generate code if -fgraphite-identity
7832         or -floop-parallelize-all are given.
7833         * graphite-scop-detection.c: Include cfganal.h.
7834         (gather_bbs::gather_bbs): Get and pass through bb to RPO
7835         mapping.
7836         (gather_bbs::before_dom_children): Return STOP for BBs
7837         not in the region.
7838         (build_scops): Compute bb to RPO mapping and pass it to
7839         the domwalk.  Treat --param graphite-max-nb-scop-params=0
7840         as not limiting the number of params.
7841         * graphite.c (graphite_initialize): Remove limit on the
7842         number of basic-blocks in a function.
7843         * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Remove.
7844         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Adjust to documented
7845         default value of 10.
7847 2017-09-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
7849         * config/rs6000/vsx.md (peephole for optimizing move SF to GPR):
7850         Adjust code to eliminate needing to do the shift right 32-bits
7851         operation after XSCVDPSPN.
7853 2017-09-26  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7855         * match.pd ((X / Y) == 0 -> X < Y): New pattern.
7856         ((X / Y) != 0 -> X >= Y): Likewise.
7858 2017-09-26  Carl Love  <cel@us.ibm.com>
7860         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_XL_LEN_R,
7861         P9V_BUILTIN_VEC_XST_LEN_R): Add support for builtins
7862         vector unsigned char vec_xl_len_r (unsigned char *, size_t);
7863         void vec_xst_len_r (vector unsigned char, unsigned char *, size_t);
7864         * config/rs6000/altivec.h (vec_xl_len_r, vec_xst_len_r): Add defines.
7865         * config/rs6000/rs6000-builtin.def (XL_LEN_R, XST_LEN_R): Add
7866         definitions and overloading.
7867         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case
7868         statement for P9V_BUILTIN_XST_LEN_R.
7869         (altivec_init_builtins): Add def_builtin for P9V_BUILTIN_STXVLL.
7870         * config/rs6000/vsx.md (lxvll, stxvll, xl_len_r, xst_len_r): Add
7871         define_expand and define_insn for the instructions and builtins.
7872         * doc/extend.texi: Update the built-in documentation file for the new
7873         built-in functions.
7874         * config/rs6000/altivec.md (altivec_lvsl_reg, altivec_lvsr_reg): Add
7875         define_insn for the instructions
7877 2017-09-26  Krister Walfridsson  <krister.walfridsson@gmail.com>
7879         PR target/39570
7880         * gcc/config/netbsd-protos.h: New file.
7881         * gcc/config/netbsd.c: New file.
7882         * gcc/config/netbsd.h (SUBTARGET_INIT_BUILTINS): Define.
7883         * gcc/config/t-netbsd: New file.
7884         * gcc/config.gcc (tm_p_file): Add netbsd-protos.h.
7885         (tmake_file) Add t-netbsd.
7886         (extra_objs) Add netbsd.o.
7888 2017-09-26  Janus Weil  <janus@gcc.gnu.org>
7890         PR fortran/82143
7891         PR fortran/82324
7892         * doc/sourcebuild.texi: Document fortran_real_10 and fortran_real_16.
7894 2017-09-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
7896         * config/rs6000/rs6000.md (extendsi<mode>2): Add a splitter to do
7897         sign extension from a vector register to a GPR by doing a 32-bit
7898         direct move and then an EXTSW.
7899         (extendsi<mode>2 splitter): Likewise.
7900         (movsi_from_sf): Adjust code to eliminate doing a 32-bit shift
7901         right or vector extract after doing XSCVDPSPN.  Use
7902         zero_extendsidi2 instead of p8_mfvsrd_4_disf to move the value to
7903         the GPRs.
7904         (movdi_from_sf_zero_ext): Likewise.
7905         (reload_gpr_from_vsxsf): Likewise.
7906         (p8_mfvsrd_4_disf): Delete, no longer used.
7907         (movsi_from_df): Optimize converting a DFmode to a SFmode, and
7908         then needing to move the SFmode to a GPR to use the XSCVDPSP
7909         instruction instead of FRSP and XSCVDPSPN.
7910         * config/rs6000/vsx.md (vsx_xscvspdp_scalar2): Move insn so that
7911         it is adjacent to the other XSCVSPDP insns.
7912         (vsx_xscvdpsp_scalar): Use "ww" constraint instead of "f" to allow
7913         SFmode to be in traditional Altivec registers.
7914         (vsx_xscvdpspn): Eliminate useless alternative constraint.
7915         (vsx_xscvspdpn): Likewise.
7916         (vsx_xscvspdpn_scalar): Likewise.
7918 2017-09-26  Martin Jambor  <mjambor@suse.cz>
7920         * tree-sra.c (compare_access_positions): Put integral types first,
7921         stabilize sorting of integral types, remove conditions putting
7922         non-full-precision integers last.
7923         (sort_and_splice_var_accesses): Disable scalarization if a
7924         non-integert would be represented by a non-full-precision integer.
7926 2017-09-26  Joseph Myers  <joseph@codesourcery.com>
7928         * config/microblaze/linux.h (TARGET_ASM_FILE_END): Likewise.
7929         * config/pa/pa.h (NEED_INDICATE_EXEC_STACK): Likewise.
7930         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Likewise.
7931         * config/pa/pa.c (pa_hpux_file_end): Rename to pa_file_end.
7932         Define unconditionally, with [ASM_OUTPUT_EXTERNAL_REAL]
7933         conditionals inside the function instead of around it.  Call
7934         file_end_indicate_exec_stack if NEED_INDICATE_EXEC_STACK.
7935         (TARGET_ASM_FILE_END): Define unconditionally to pa_file_end.
7937 2017-09-26  Richard Biener  <rguenther@suse.de>
7939         * graphite-scop-detection.c (scop_detection::build_scop_depth): Rewrite,
7940         fold in ...
7941         (scop_detection::build_scop_breadth): ... this.  Removed.
7942         (scop_detection::loop_is_valid_in_scop): Fold into single caller.
7943         (scop_detection::harmful_stmt_in_bb): Likewise.
7944         (scop_detection::graphite_can_represent_stmt): Likewise.
7945         (scop_detection::loop_body_is_valid_scop): Likewise.  Remove recursion.
7946         (scop_detection::can_represent_loop): Remove recursion, fold in ...
7947         (scop_detection::can_represent_loop_1): ... this.  Removed.
7948         (scop_detection::harmful_loop_in_region): Simplify after inlining
7949         the above and remove more quadraticness.
7950         (build_scops): Adjust.
7951         * tree-data-ref.c (loop_nest_has_data_refs): Remove pointless
7952         quadraticness.
7954 2017-09-26  Jakub Jelinek  <jakub@redhat.com>
7956         PR target/82267
7957         * config/i386/i386.c (ix86_print_operand_address_as): Only test
7958         REGNO (base) == SP_REG if base is a REG.
7960         PR middle-end/35691
7961         * tree-ssa-reassoc.c (update_range_test): Dump r->exp each time
7962         if it is different SSA_NAME.
7963         (optimize_range_tests_cmp_bitwise): New function.
7964         (optimize_range_tests): Call it.
7966 2017-09-26  Richard Biener  <rguenther@suse.de>
7968         PR tree-optimization/82321
7969         * graphite.c (canonicalize_loop_closed_ssa): Properly check
7970         for the def being inside the loop.
7972 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7974         * config/s390/vx-builtins.md ("vmslg"): Add missing operand in
7975         assembler output.
7976         * config/s390/s390-builtins.def: Fix constraint on op4.
7978 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7980         * config/s390/s390.c (s390_expand_vec_compare): Use the new mode
7981         independent expanders.
7982         * config/s390/vector.md ("vec_cmpuneq", "vec_cmpltgt")
7983         ("vec_ordered", "vec_unordered"): New expanders.
7985 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7987         * config/s390/s390.c (s390_preferred_simd_mode): Return V4SFmode
7988         for SFmode.
7990 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7992         * config/s390/vector.md ("vec_unpacks_low_v16qi"): Rename to
7993         vec_unpacks_lo_v16qi.
7994         ("vec_unpacku_low_v16qi"): Rename to vec_unpacku_lo_v16qi.
7996 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7998         * config/s390/vector.md ("vec_unpacks_lo_v4sf")
7999         ("vec_unpacks_hi_v4sf", "vec_unpacks_lo_v2df")
8000         ("vec_unpacks_hi_v2df", "vec_pack_trunc_v2df"): New expanders.
8002 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8004         * config/s390/predicates.md ("const_shift_by_byte_operand"): New
8005         predicate.
8006         * config/s390/vector.md ("*vec_srb<mode>"): Change modes to V_128
8007         and V16QI.
8008         ("*vec_slb<mode>"): New insn pattern.
8009         ("vec_shr_<mode>"): New expander.
8010         * config/s390/vx-builtins.md ("vec_slb<mode>"): Turn into expander
8011         and force the shift count operand to V16QImode.
8012         ("vec_srb<mode>"): Set shift count mode to V16QI.
8014 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8016         * config/s390/vector.md ("vec_widen_umult_lo_<mode>")
8017         ("vec_widen_umult_hi_<mode>", "vec_widen_smult_lo_<mode>")
8018         ("vec_widen_smult_hi_<mode>"): New expander definitions.
8020 2017-09-26  Richard Earnshaw  <rearnsha@arm.com>
8022         PR target/82175
8023         * config/arm/arm.h (DRIVER_SELF_SPECS): Separate sub-rules with commas.
8025 2017-09-26  Richard Biener  <rguenther@suse.de>
8027         PR tree-optimization/82320
8028         * tree-ssa-sccvn.c (set_ssa_val_to): Changing undef to undef
8029         isn't a change.
8031 2017-09-25  Jeff Law  <law@redhat.com>
8033         * config/rs6000/rs6000-protos.h (output_probe_stack_range): Update
8034         prototype for new argument.
8035         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack_1): New function,
8036         mostly extracted from rs6000_emit_allocate_stack.
8037         (rs6000_emit_probe_stack_range_stack_clash): New function.
8038         (rs6000_emit_allocate_stack): Call
8039         rs6000_emit_probe_stack_range_stack_clash as needed.
8040         (rs6000_emit_probe_stack_range): Add additional argument
8041         to call to gen_probe_stack_range{si,di}.
8042         (output_probe_stack_range): New.
8043         (output_probe_stack_range_1): Renamed from output_probe_stack_range.
8044         (output_probe_stack_range_stack_clash): New.
8045         (rs6000_emit_prologue): Emit notes into dump file as requested.
8046         * rs6000.md (allocate_stack): Handle -fstack-clash-protection.
8047         (probe_stack_range<P:mode>): Operand 0 is now early-clobbered.
8048         Add additional operand and pass it to output_probe_stack_range.
8050 2017-09-25  Bin Cheng  <bin.cheng@arm.com>
8052         PR tree-optimization/82163
8053         * tree-ssa-loop-manip.h (verify_loop_closed_ssa): New parameter.
8054         (checking_verify_loop_closed_ssa): New parameter.
8055         * tree-ssa-loop-manip.c (check_loop_closed_ssa_use): Delete.
8056         (check_loop_closed_ssa_stmt): Delete.
8057         (check_loop_closed_ssa_def, check_loop_closed_ssa_bb): New functions.
8058         (verify_loop_closed_ssa): Check loop closed ssa form for LOOP.
8059         (tree_transform_and_unroll_loop): Check loop closed ssa form only for
8060         changed loops.
8062 2017-09-25  Pekka Jaaskelainen <pekka@parmance.com>
8064         * brig-builtins.def: Treat HSAIL barrier builtins as
8065         setjmp/longjump style functions.
8067 2017-09-25  Richard Sandiford  <richard.sandiford@linaro.org>
8069         * target.def (constant_alignment): New hook.
8070         * defaults.h (CONSTANT_ALIGNMENT): Delete.
8071         * doc/tm.texi.in (CONSTANT_ALIGNMENT): Replace with...
8072         (TARGET_CONSTANT_ALIGNMENT): ...this new hook.
8073         * doc/tm.texi: Regenerate.
8074         * targhooks.h (default_constant_alignment): Declare.
8075         (constant_alignment_word_strings): Likewise.
8076         * targhooks.c (default_constant_alignment): New function.
8077         (constant_alignment_word_strings): Likewise.
8078         * builtins.c (get_object_alignment_2): Use targetm.constant_alignment
8079         instead of CONSTANT_ALIGNMENT.
8080         * varasm.c (align_variable, get_variable_align, build_constant_desc)
8081         (force_const_mem): Likewise.
8082         * config/aarch64/aarch64.h (CONSTANT_ALIGNMENT): Delete.
8083         * config/aarch64/aarch64.c (aarch64_constant_alignment): New function.
8084         (aarch64_classify_address): Call it instead of CONSTANT_ALIGNMENT.
8085         (TARGET_CONSTANT_ALIGNMENT): Redefine.
8086         * config/alpha/alpha.h (CONSTANT_ALIGNMENT): Delete commented-out
8087         definition.
8088         * config/arc/arc.h (CONSTANT_ALIGNMENT): Delete.
8089         * config/arc/arc.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
8090         constant_alignment_word_strings.
8091         * config/arm/arm.h (CONSTANT_ALIGNMENT_FACTOR): Delete.
8092         (CONSTANT_ALIGNMENT): Likewise.
8093         * config/arm/arm.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
8094         (arm_constant_alignment): New function.
8095         * config/bfin/bfin.h (CONSTANT_ALIGNMENT): Delete.
8096         * config/bfin/bfin.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
8097         constant_alignment_word_strings.
8098         * config/cr16/cr16.h (CONSTANT_ALIGNMENT): Delete.
8099         * config/cr16/cr16.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
8100         constant_alignment_word_strings.
8101         * config/cris/cris.h (CONSTANT_ALIGNMENT): Delete.
8102         * config/cris/cris.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
8103         (cris_constant_alignment): New function.
8104         * config/epiphany/epiphany.h (CONSTANT_ALIGNMENT): Delete.
8105         * config/epiphany/epiphany.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
8106         (epiphany_constant_alignment): New function.
8107         * config/fr30/fr30.h (CONSTANT_ALIGNMENT): Delete.
8108         * config/fr30/fr30.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
8109         constant_alignment_word_strings.
8110         * config/frv/frv.h (CONSTANT_ALIGNMENT): Delete.
8111         * config/frv/frv.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
8112         constant_alignment_word_strings.
8113         * config/ft32/ft32.h (CONSTANT_ALIGNMENT): Delete.
8114         * config/ft32/ft32.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
8115         constant_alignment_word_strings.
8116         * config/i386/i386.h (CONSTANT_ALIGNMENT): Delete.
8117         * config/i386/i386-protos.h (ix86_constant_alignment): Delete.
8118         * config/i386/i386.c (ix86_constant_alignment): Make static.
8119         Use the same interface as the target hook.
8120         (TARGET_CONSTANT_ALIGNMENT): Redefine.
8121         * config/ia64/ia64.h (CONSTANT_ALIGNMENT): Delete.
8122         * config/ia64/ia64.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
8123         constant_alignment_word_strings.
8124         * config/iq2000/iq2000.h (CONSTANT_ALIGNMENT): Delete.
8125         * config/iq2000/iq2000.c (iq2000_constant_alignment): New function.
8126         (TARGET_CONSTANT_ALIGNMENT): Redefine.
8127         * config/lm32/lm32.h (CONSTANT_ALIGNMENT): Delete.
8128         * config/lm32/lm32.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
8129         constant_alignment_word_strings.
8130         * config/m32r/m32r.h (CONSTANT_ALIGNMENT): Delete.
8131         * config/m32r/m32r.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
8132         constant_alignment_word_strings.
8133         * config/mcore/mcore.h (CONSTANT_ALIGNMENT): Delete.
8134         * config/mcore/mcore.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
8135         constant_alignment_word_strings.
8136         * config/microblaze/microblaze.h (CONSTANT_ALIGNMENT): Delete.
8137         * config/microblaze/microblaze.c (microblaze_constant_alignment):
8138         New function.
8139         (TARGET_CONSTANT_ALIGNMENT): Redefine.
8140         * config/mips/mips.h (CONSTANT_ALIGNMENT): Delete.
8141         * config/mips/mips.c (mips_constant_alignment): New function.
8142         (TARGET_CONSTANT_ALIGNMENT): Redefine.
8143         * config/mmix/mmix.h (CONSTANT_ALIGNMENT): Delete.
8144         * config/mmix/mmix-protos.h (mmix_constant_alignment): Delete.
8145         * config/mmix/mmix.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
8146         (mmix_constant_alignment): Make static.  Use the same interface
8147         as the target hook.
8148         * config/moxie/moxie.h (CONSTANT_ALIGNMENT): Delete.
8149         * config/moxie/moxie.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
8150         constant_alignment_word_strings.
8151         * config/nios2/nios2.h (CONSTANT_ALIGNMENT): Delete.
8152         * config/nios2/nios2.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
8153         constant_alignment_word_strings.
8154         * config/pa/pa.h (CONSTANT_ALIGNMENT): Delete.
8155         * config/pa/pa.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
8156         constant_alignment_word_strings.
8157         * config/powerpcspe/powerpcspe.h (CONSTANT_ALIGNMENT): Delete.
8158         * config/powerpcspe/powerpcspe.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
8159         (rs6000_constant_alignment): New function.
8160         * config/riscv/riscv.h (CONSTANT_ALIGNMENT): Delete.
8161         * config/riscv/riscv.c (riscv_constant_alignment): New function.
8162         (TARGET_CONSTANT_ALIGNMENT): Redefine.
8163         * config/rs6000/rs6000.h (CONSTANT_ALIGNMENT): Delete.
8164         * config/rs6000/rs6000.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
8165         (rs6000_constant_alignment): New function.
8166         * config/s390/s390.h (CONSTANT_ALIGNMENT): Delete.
8167         * config/s390/s390.c (s390_constant_alignment): New function.
8168         (TARGET_CONSTANT_ALIGNMENT): Redefine.
8169         * config/sh/sh.h (CONSTANT_ALIGNMENT): Delete.
8170         * config/sh/sh.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
8171         constant_alignment_word_strings.
8172         * config/sparc/sparc.h (CONSTANT_ALIGNMENT): Delete.
8173         * config/sparc/sparc.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
8174         (sparc_constant_alignment): New function.
8175         * config/spu/spu.h (CONSTANT_ALIGNMENT): Delete.
8176         * config/spu/spu.c (spu_constant_alignment): New function.
8177         (TARGET_CONSTANT_ALIGNMENT): Redefine.
8178         * config/stormy16/stormy16.h (CONSTANT_ALIGNMENT): Delete.
8179         * config/stormy16/stormy16.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
8180         constant_alignment_word_strings.
8181         * config/tilegx/tilegx.h (CONSTANT_ALIGNMENT): Delete.
8182         * config/tilegx/tilegx.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
8183         constant_alignment_word_strings.
8184         * config/tilepro/tilepro.h (CONSTANT_ALIGNMENT): Delete.
8185         * config/tilepro/tilepro.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
8186         constant_alignment_word_strings.
8187         * config/visium/visium.h (CONSTANT_ALIGNMENT): Delete.
8188         * config/visium/visium.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
8189         (visium_constant_alignment): New function.
8190         * config/xtensa/xtensa.h (CONSTANT_ALIGNMENT): Delete.
8191         * config/xtensa/xtensa.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
8192         (xtensa_constant_alignment): New function.
8193         * system.h (CONSTANT_ALIGNMENT): Poison.
8195 2017-09-25  Will Schmidt  <will_schmidt@vnet.ibm.com>
8197         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
8198         for early folding of vector stores (ALTIVEC_BUILTIN_ST_*).
8199         (rs6000_builtin_valid_without_lhs): New helper function.
8200         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
8201         Remove obsoleted code for handling ALTIVEC_BUILTIN_VEC_ST.
8203 2017-09-25  Richard Sandiford  <richard.sandiford@linaro.org>
8205         * target.h (vec_perm_indices): Use unsigned short rather than
8206         unsigned char.
8207         (auto_vec_perm_indices): Likewise.
8208         * config/aarch64/aarch64.c (aarch64_vectorize_vec_perm_const_ok):
8209         Use unsigned int rather than unsigned char.
8210         * config/arm/arm.c (arm_vectorize_vec_perm_const_ok): Likewise.
8212 2017-09-25  Richard Biener  <rguenther@suse.de>
8214         * cfgloop.h (sort_sibling_loops): Declare.
8215         * cfgloop.c (sort_sibling_loops_cmp): New helper.
8216         (sort_sibling_loops): New function sorting the sibling loop list
8217         in RPO order.
8218         * graphite.c (graphite_transform_loops): Sort sibling loops.
8220 2017-09-25  Richard Sandiford  <richard.sandifird@linaro.org>
8222         * target.def (vec_perm_const_ok): Change sel parameter to
8223         vec_perm_indices.
8224         * optabs-query.c (can_vec_perm_p): Update accordingly.
8225         * doc/tm.texi: Regenerate.
8226         * config/aarch64/aarch64.c (expand_vec_perm_d): Change perm to
8227         auto_vec_perm_indices and remove separate nelt field.
8228         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
8229         (aarch64_evpc_ext, aarch64_evpc_rev, aarch64_evpc_dup)
8230         (aarch64_evpc_tbl, aarch64_expand_vec_perm_const_1)
8231         (aarch64_expand_vec_perm_const): Update accordingly.
8232         (aarch64_vectorize_vec_perm_const_ok): Likewise.  Change sel
8233         to vec_perm_indices.
8234         * config/arm/arm.c (expand_vec_perm_d): Change perm to
8235         auto_vec_perm_indices and remove separate nelt field.
8236         (arm_evpc_neon_vuzp, arm_evpc_neon_vzip, arm_evpc_neon_vrev)
8237         (arm_evpc_neon_vtrn, arm_evpc_neon_vext, arm_evpc_neon_vtbl)
8238         (arm_expand_vec_perm_const_1, arm_expand_vec_perm_const): Update
8239         accordingly.
8240         (arm_vectorize_vec_perm_const_ok): Likewise.  Change sel
8241         to vec_perm_indices.
8242         * config/i386/i386.c (ix86_vectorize_vec_perm_const_ok): Change
8243         sel to vec_perm_indices.
8244         * config/ia64/ia64.c (ia64_vectorize_vec_perm_const_ok): Likewise.
8245         * config/mips/mips.c (mips_vectorize_vec_perm_const_ok): Likewise.
8246         * config/powerpcspe/powerpcspe.c (rs6000_vectorize_vec_perm_const_ok):
8247         Likewise.
8248         * config/rs6000/rs6000.c (rs6000_vectorize_vec_perm_const_ok):
8249         Likewise.
8251 2017-09-25  Pierre-Marie de Rodat  <derodat@adacore.com>
8253         PR debug/82155
8254         * dwarf2out.c (dwarf2out_early_global_decl): Call dwarf2out_decl
8255         on the FUNCTION_DECL function context if it has a DIE that is a
8256         declaration.
8258 2017-09-25  Richard Biener  <rguenther@suse.de>
8260         PR tree-optimization/82285
8261         * tree-vect-patterns.c (vect_recog_bool_pattern): Also handle
8262         enumeral types.
8264 2017-09-25  Tom de Vries  <tom@codesourcery.com>
8266         PR target/80035
8267         PR target/81069
8268         * config/nvptx/nvptx.c (nvptx_output_call_insn): Add exit after call to
8269         noreturn function.
8271 2017-09-25  Richard Biener  <rguenther@suse.de>
8273         * graphite-optimize-isl.c (optimize_isl): Fail and dump if
8274         ISL errors other than isl_error_quota happen.  Dump if the
8275         schedule is the same.
8276         * graphite-sese-to-poly.c (build_poly_scop): Fail on ISL
8277         errors instead of aborting inside ISL.
8279 2017-09-25  Iain Sandoe  <iain@codesourcery.com>
8281         PR target/80556
8282         * config/i386/darwin.h (REAL_LIB_SPEC): New; put libSystem ahead
8283         of libgcc_eh for m64.
8284         * config/i386/darwin64.h: Likewise.
8286 2017-09-25  Richard Biener  <rguenther@suse.de>
8288         PR middle-end/82144
8289         * dwarf2out.c (gen_enumeration_type_die): Do not add alignment
8290         attribute for incomplete types nor twice for complete ones.
8292 2017-09-24  Uros Bizjak  <ubizjak@gmail.com>
8294         PR target/82267
8295         * config/i386/i386.c (ix86_print_operand_address_as): Encode
8296         %esp as %rsp to avoid 0x67 prefix if there is no index or base
8297         register.
8299 2017-09-23  Uros Bizjak  <ubizjak@gmail.com>
8301         PR bootstrap/82306
8302         * config/i386/i386.opt (mprefer-avx256): Use
8303         ix86_target_flags variable.
8304         * config/i386/i386.c (ix86_target_string): Move
8305         -mprefer-avx256 to flag2_opts.
8307 2017-09-22  Jakub Jelinek  <jakub@redhat.com>
8309         PR middle-end/35691
8310         * match.pd: Simplify x == -1 & y == -1 into (x & y) == -1
8311         and x != -1 | y != -1 into (x & y) != -1.
8313 2017-09-22  Steve Ellcey  <sellcey@cavium.com>
8315         * config.gcc: Add new case statement to set
8316         default_gnu_indirect_function.  Remove it from x86_64-*-linux*,
8317         i[34567]86-*, powerpc*-*-linux*spe*, powerpc*-*-linux*, s390-*-linux*,
8318         s390x-*-linux* case statements.   Added aarch64 to the list of
8319         supported architectures.
8321 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
8323         PR tree-optimization/82289
8324         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Check
8325         STMT_VINFO_RELEVANT_P.
8327 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
8328             Alan Hayward  <alan.hayward@arm.com>
8329             David Sherwood  <david.sherwood@arm.com>
8331         * tree-vrp.c (extract_range_from_multiplicative_op_1): Assert
8332         for VR_RANGE only; don't allow VR_ANTI_RANGE.
8333         (extract_range_from_binary_expr_1): Don't call
8334         extract_range_from_multiplicative_op_1 if !range_int_cst_p.
8336 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
8337             Alan Hayward  <alan.hayward@arm.com>
8338             David Sherwood  <david.sherwood@arm.com>
8340         * target.def (preferred_vector_alignment): New hook.
8341         * doc/tm.texi.in (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): New
8342         hook.
8343         * doc/tm.texi: Regenerate.
8344         * targhooks.h (default_preferred_vector_alignment): Declare.
8345         * targhooks.c (default_preferred_vector_alignment): New function.
8346         * tree-vectorizer.h (dataref_aux): Add a target_alignment field.
8347         Expand commentary.
8348         (DR_TARGET_ALIGNMENT): New macro.
8349         (aligned_access_p): Update commentary.
8350         (vect_known_alignment_in_bytes): New function.
8351         * tree-vect-data-refs.c (vect_calculate_required_alignment): New
8352         function.
8353         (vect_compute_data_ref_alignment): Set DR_TARGET_ALIGNMENT.
8354         Calculate the misalignment based on the target alignment rather than
8355         the vector size.
8356         (vect_update_misalignment_for_peel): Use DR_TARGET_ALIGMENT
8357         rather than TYPE_ALIGN / BITS_PER_UNIT to update the misalignment.
8358         (vect_enhance_data_refs_alignment): Mask the byte misalignment with
8359         the target alignment, rather than masking the element misalignment
8360         with the number of elements in a vector.  Also use the target
8361         alignment when calculating the maximum number of peels.
8362         (vect_find_same_alignment_drs): Use vect_calculate_required_alignment
8363         instead of TYPE_ALIGN_UNIT.
8364         (vect_duplicate_ssa_name_ptr_info): Remove stmt_info parameter.
8365         Measure DR_MISALIGNMENT relative to DR_TARGET_ALIGNMENT.
8366         (vect_create_addr_base_for_vector_ref): Update call accordingly.
8367         (vect_create_data_ref_ptr): Likewise.
8368         (vect_setup_realignment): Realign by ANDing with
8369         -DR_TARGET_MISALIGNMENT.
8370         * tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Calculate
8371         the number of peels based on DR_TARGET_ALIGNMENT.
8372         * tree-vect-stmts.c (get_group_load_store_type): Compare the gap
8373         with the guaranteed alignment boundary when deciding whether
8374         overrun is OK.
8375         (vectorizable_mask_load_store): Interpret DR_MISALIGNMENT
8376         relative to DR_TARGET_ALIGNMENT instead of TYPE_ALIGN_UNIT.
8377         (ensure_base_align): Remove stmt_info parameter.  Get the
8378         target base alignment from DR_TARGET_ALIGNMENT.
8379         (vectorizable_store): Update call accordingly.   Interpret
8380         DR_MISALIGNMENT relative to DR_TARGET_ALIGNMENT instead of
8381         TYPE_ALIGN_UNIT.
8382         (vectorizable_load): Likewise.
8384 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
8385             Alan Hayward  <alan.hayward@arm.com>
8386             David Sherwood  <david.sherwood@arm.com>
8388         * tree-vectorizer.h (vect_get_scalar_dr_size): New function.
8389         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Use it.
8390         (vect_enhance_data_refs_alignment): Likewise.
8392 2017-09-22  Richard Earnshaw  <richard.earnshaw@arm.com>
8394         * config/arm/parsecpu.awk (fatal): Note that we've encountered an
8395         error.  Only quit immediately if parsing is complete.
8396         (BEGIN): Initialize fatal_err and parse_done.
8397         (begin fpu, end fpu): Check number of arguments.
8398         (begin arch, end arch): Likewise.
8399         (begin cpu, end cpu): Likewise.
8400         (cname, tune for, tune flags, architecture, fpu, option): Likewise.
8401         (optalias): Likewise.
8403 2017-09-22  Richard Earnshaw  <richard.earnshaw@arm.com>
8405         * config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.
8406         * config/arm/arm-isa.h: Delete.  Move definitions to ...
8407         * arm-cpus.in: ... here.  Use new feature and fgroup values.
8408         * config/arm/arm.c (arm_option_override): Use lower case for feature
8409         bit names.
8410         * config/arm/arm.h (TARGET_HARD_FLOAT): Likewise.
8411         (TARGET_VFP3, TARGET_VFP5, TARGET_FMA): Likewise.
8412         * config/arm/parsecpu.awk (END): Add new command 'isa'.
8413         (isa_pfx): Delete.
8414         (print_isa_bits_for): New function.
8415         (gen_isa): New function.
8416         (gen_comm_data): Use print_isa_bits_for.
8417         (define feature): New keyword.
8418         (define fgroup): New keyword.
8419         * config/arm/t-arm (TM_H): Remove.
8420         (GTM_H): Add arm-isa.h.
8421         (arm-isa.h): Add rule to generate file.
8422         * common/config/arm/arm-common.c: (arm_canon_arch_option): Use lower
8423         case for feature bit names.
8425 2017-09-22  Richard Biener  <rguenther@suse.de>
8427         * graphite-isl-ast-to-gimple.c (graphite_verify): Inline into
8428         single caller.
8429         (graphite_regenerate_ast_isl): Do not reset SCEV.  Move debug
8430         print of no dependency loops ...
8431         * graphite.c (graphite_transform_loops): ... here.
8432         (canonicalize_loop_closed_ssa_form): Work from inner to outer
8433         loops.
8434         (same_close_phi_node, remove_duplicate_close_phi,
8435         make_close_phi_nodes_unique, defined_in_loop_p): Fold into ...
8436         (canonicalize_loop_closed_ssa): ... here and simplify.
8437         * graphite-optimize-isl.c: Include tree-vectorizer.h.
8438         (optimize_isl): Use dump_printf_loc to tell when we stopped
8439         optimizing because of an ISL timeout.
8441 2017-09-22  Richard Biener  <rguenther@suse.de>
8443         PR tree-optimization/82291
8444         * tree-if-conv.c (predicate_mem_writes): Make sure to
8445         remove writes in blocks predicated with false.
8447 2017-09-22  Richard Biener  <rguenther@suse.de>
8449         * sese.c: Include cfganal.h.
8450         (if_region_set_false_region): Remove.
8451         (create_if_region_on_edge): Likewise.
8452         (move_sese_in_condition): Re-implement without destroying
8453         dominators.
8455 2017-09-22  Richard Biener  <rguenther@suse.de>
8457         * graphite-isl-ast-to-gimple.c (translate_pending_phi_nodes):
8458         Verify both BBs contain loop PHI nodes before dispatching to
8459         copy_loop_phi_args.
8460         (graphite_regenerate_ast_isl): Do not recompute dominators,
8461         do not verify three times.  Restructure for clarity.
8462         * graphite-scop-detection.c (same_close_phi_node,
8463         remove_duplicate_close_phi, make_close_phi_nodes_unique,
8464         defined_in_loop_p, canonicalize_loop_closed_ssa,
8465         canonicalize_loop_closed_ssa_form): Simplify, remove excess
8466         checking and SSA rewrite, move to ...
8467         * graphite.c: ... here.  Include ssa.h and tree-ssa-loop-manip.h.
8468         (graphite_initialize): Do not pass in ctx, do not reset the
8469         SCEV cache, compute only dominators.
8470         (graphite_transform_loops): Allocate ISL ctx after
8471         graphite_initialize.  Call canonicalize_loop_closed_ssa_form.
8472         Maintain post-dominators only around build_scops.
8473         * sese.c (if_region_set_false_region): Make static.  Free
8474         and recompute dominators.
8475         (move_sese_in_condition): Assert we don't get called with
8476         post-dominators computed.
8477         * sese.h (if_region_set_false_region): Remove.
8479 2017-09-22  Sergey Shalnov  <sergey.shalnov@intel.com>
8481         * config/i386/sse.md ("mov<mode>_internal"): Use <sseinsnmode>
8482         mode attribute for TARGET_AVX512VL.
8484 2017-09-21  Sergey Shalnov  <sergey.shalnov@intel.com>
8486         * config/i386/i386.opt (mprefer-avx256): New option.
8487         * config/i386/i386.c (ix86_target_string): Add -mprefer-avx256
8488         to flag_opts.
8489         (ix86_preferred_simd_mode): Return 256-bit AVX modes
8490         for TARGET_PREFER_AVX256.
8491         * doc/invoke.texi (x86 Options): Document -mprefer-avx256.
8493 2017-09-21  Jeff Law  <law@redhat.com>
8495         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash):
8496         Fix dump output if the only stack space is for pushed registers.
8498 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
8500         * config/spu/spu.c (spu_sched_adjust_cost): Update after renaming
8501         of insn_cost.
8503 2017-09-21  Martin Sebor  <msebor@redhat.com>
8505         PR c/81882
8506         * doc/extend.texi (attribute ifunc): Avoid relying on ill-formed
8507         code (in C++) or code that triggers warnings.
8509 2017-09-21  Eric Botcazou  <ebotcazou@adacore.com>
8511         * stor-layout.c (bit_from_pos): Do not distribute the conversion.
8513 2017-09-21  Segher Boessenkool  <segher@kernel.crashing.org>
8515         * haifa-sched.c: Rename insn_cost to insn_sched_cost.
8516         * sched-rgn.c: Ditto.
8517         * sel-sched-ir.c: Ditto.
8519 2017-09-21  Alexander Monakov  <amonakov@ispras.ru>
8521         * toplev.h (set_random_seed): Adjust return type.
8522         * toplev.c (init_local_tick): Move eager initialization of random_seed
8523         to get_random_seed.  Adjust comment.
8524         (init_random_seed): Inline to get_random_seed, delete.
8525         (get_random_seed): Initialize random_seed lazily.
8526         (set_random_seed): Do not return previous value.
8527         (print_switch_value): Do not call get_random_seed.
8529 2017-09-21  Evgeny Kudryashov  <kudryashov@ispras.ru>
8531         * cgraph.c (delete_function_version): New, broken out from...
8532         (cgraph_node::delete_function_version): ...here.  Rename to
8533         cgraph_node::delete_function_version_by_decl.  Update all uses.
8534         (cgraph_node::remove): Call delete_function_version.
8536 2017-09-21  Jakub Jelinek  <jakub@redhat.com>
8538         PR sanitizer/81715
8539         * tree-inline.c (expand_call_inline): Emit clobber stmts for
8540         VAR_DECLs to which addressable non-volatile parameters are mapped
8541         and for id->retvar after the return value assignment.  Clear
8542         id->retval and id->retbnd after inlining.
8544 2017-09-21  Richard Biener  <rguenther@suse.de>
8546         PR tree-optimization/82276
8547         PR tree-optimization/82244
8548         * tree-vrp.c (build_assert_expr_for): Set
8549         SSA_NAME_OCCURS_IN_ABNORMAL_PHI if the variable we assert on
8550         has it set.
8551         (remove_range_assertions): Revert earlier change.
8553 2017-09-21  Wilco Dijkstra  <wdijkstr@arm.com>
8555         PR target/71951
8556         * config/aarch64/aarch64.h (LIBGCC2_UNWIND_ATTRIBUTE): Define.
8558 2017-09-21  Richard Biener  <rguenther@suse.de>
8560         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
8561         Restore valid IL after code generation errors.
8562         * graphite.c (graphite_transform_loops): Diagnose code
8563         generation issues as MSG_MISSED_OPTIMIZATION and continue
8564         with processing SCOPs.
8566 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
8567             Alan Hayward  <alan.hayward@arm.com>
8568             David Sherwood  <david.sherwood@arm.com>
8570         * calls.c (compute_argument_addresses): Use simplify_gen_binary
8571         rather than choosing between plus_constant and gen_rtx_<CODE>.
8572         * expr.c (emit_push_insn): Likewise.
8573         (expand_expr_real_2): Likewise.
8575 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
8576             Alan Hayward  <alan.hayward@arm.com>
8577             David Sherwood  <david.sherwood@arm.com>
8579         * loop-unroll.c (split_iv): Call copy_rtx on the step.
8581 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
8582             Alan Hayward  <alan.hayward@arm.com>
8583             David Sherwood  <david.sherwood@arm.com>
8585         * tree.c (find_atomic_core_type): Check tree_fits_uhwi_p before
8586         calling tree_to_uhwi.
8588 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
8589             Alan Hayward  <alan.hayward@arm.com>
8590             David Sherwood  <david.sherwood@arm.com>
8592         * tree-ssa-ccp.c (get_value_for_expr): Use a positive test for
8593         INTEGER_CST rather than a negative test for ADDR_EXPR.
8595 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
8596             Alan Hayward  <alan.hayward@arm.com>
8597             David Sherwood  <david.sherwood@arm.com>
8599         * tree-vrp.c (extract_range_from_binary_expr_1): Check
8600         int_cst_rangeN before calling value_range_constant_singleton (&vrN).
8602 2017-09-21  Richard Biener  <rguenther@suse.de>
8604         PR tree-optimization/71351
8605         * graphite-isl-ast-to-gimple.c (translate_isl_ast_to_gimple::
8606         graphite_create_new_loop_guard): Remove, fold remaining parts
8607         into caller ...
8608         (translate_isl_ast_node_for): ... here and simplify.
8610 2017-09-21  Jakub Jelinek  <jakub@redhat.com>
8612         PR target/82260
8613         * config/i386/i386.md (*movqi_internal): Replace (=q,q) alternative
8614         with (=Q,Q), (=R,R) and (=r,r) alternatives, only enable the
8615         latter two for 64-bit, renumber alternatives, for -Os imov (=q,n)
8616         alternative always use QI mode, for -Os imov (=R,R) alternative
8617         always use SI mode, for imov (=Q,Q) or (=r,r) alternatives
8618         ignore -Os.
8620 2017-09-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8621             Jeff Law  <law@redhat.com>
8623         * config/s390/s390.c (MIN_UNROLL_PROBES): Define.
8624         (allocate_stack_space): New function, partially extracted from
8625         s390_emit_prologue.
8626         (s390_emit_prologue): Track offset to most recent stack probe.
8627         Code to allocate space moved into allocate_stack_space.
8628         Dump actions when no stack is allocated.
8629         (s390_prologue_plus_offset): New function.
8630         (s390_emit_stack_probe): Likewise.
8632 2017-09-20  Alexandre Oliva <aoliva@redhat.com>
8634         * common.opt (Wa, Wl, Wp, g, gz=): Add
8635         RejectNegative.
8636         (gno-column-info): Remove.
8637         (gcolumn-info): Drop RejectNegative.
8638         (gno-): New prefix.
8639         (gno-record-gcc-switches): Remove.
8640         (grecord-gcc-switches): Drop RejectNegative.
8641         (gno-split-dwarf): Remove.
8642         (gsplit-dwarf): Drop RejectNegative.
8643         (gno-strict-dwarf): Remove.
8644         (gstrict-dwarf): Drop RejectNegative.
8645         * config/darwin.opt (gfull, gused): Add RejectNegative.
8646         * dwarf2out.c (gen_producer_string): Drop
8647         gno-record-gcc-switches handler.
8648         * optc-gen.awk: Add g to prefixes with negative forms.
8649         * opts-common.c (remapping_prefix_p): New.
8650         (find_opt): Check it.
8651         (generate_canonical_option): Test g prefix.
8652         (option_map): Add -gno- mapping.
8653         (add_misspelling_candidates): Check remapping_prefix_p.
8655 2017-09-20  Jeff Law  <law@redhat.com>
8657         * config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Fix
8658         thinko in stack clash protection support.
8660         * explow.c (compute_stack_clash_protection_loop_data): Use
8661         CONST_INT_P instead of explicit test.  Verify object is a
8662         CONST_INT_P before looking at INTVAL.
8663         (anti_adjust_stack_and_probe_stack_clash): Use CONST_INT_P
8664         instead of explicit test.
8666 2017-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
8668         PR target/77687
8669         * config/rs6000/rs6000.md (stack_restore_tie): Store to a scratch
8670         address instead of to r1 and r11.
8672 2017-09-20  Sebastian Peryt  <sebastian.peryt@intel.com>
8674         * config.gcc: Support "knm".
8675         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "knm".
8676         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8677         PROCESSOR_KNM.
8678         * config/i386/i386.c (m_KNM): Define.
8679         (processor_target_table): Add "knm".
8680         (PTA_KNM): Define.
8681         (ix86_option_override_internal): Add "knm".
8682         (ix86_issue_rate): Add PROCESSOR_KNM.
8683         (ix86_adjust_cost): Ditto.
8684         (ia32_multipass_dfa_lookahead): Ditto.
8685         (get_builtin_code_for_version): Handle PROCESSOR_KNM.
8686         (fold_builtin_cpu): Add M_INTEL_KNM.
8687         * config/i386/i386.h (processor_costs): Define TARGET_KNM.
8688         (processor_type): Add PROCESSOR_KNM.
8689         * config/i386/x86-tune.def: Add m_KNM.
8690         * doc/invoke.texi: Add knm as x86 -march=/-mtune= CPU type.
8692 2017-09-20  Richard Biener  <rguenther@suse.de>
8694         PR tree-optimization/80213
8695         * graphite-scop-detection.c (trivially_empty_bb_p): Labels
8696         are allowed in empty BBs as well.
8697         (canonicalize_loop_closed_ssa): Also look for other complex
8698         edges.
8699         (scop_detection::get_sese): Include the loop-closed PHI block
8700         in loop SESEs.
8701         (scop_detection::merge_sese): Remove code adding extra blocks.
8702         (scop_detection::region_has_one_loop): Adjust for get_sese changes.
8703         (build_scops): Assert the final returned scop is invalid.
8705 2017-09-20  Richard Biener  <rguenther@suse.de>
8707         PR tree-optimization/82264
8708         * tree-ssa-sccvn.c (vn_phi_eq): Use safe_dyn_cast to check
8709         for GIMPLE_CONDs.
8710         (vn_phi_lookup): Likewise.
8711         (vn_phi_insert): Likewise.
8713 2017-09-20  Jakub Jelinek  <jakub@redhat.com>
8715         * dwarf2out.c (tree_add_const_value_attribute): For INTEGER_CST
8716         that fits into uhwi or shwi, add DW_AT_const_value regardless
8717         of early_dwarf without going through RTL, using add_AT_unsigned
8718         or add_AT_int.
8720         * dwarf2out.c (DEBUG_LTO_DWO_INFO_SECTION): Reorder defines.
8721         (DEBUG_LTO_ABBREV_SECTION): Likewise.
8722         (DEBUG_LTO_MACINFO_SECTION): Likewise.
8723         (DEBUG_MACRO_SECTION): Likewise.
8724         (DEBUG_LTO_MACRO_SECTION): Likewise.
8725         (DEBUG_STR_DWO_SECTION): Likewise.
8726         (DEBUG_LTO_STR_DWO_SECTION): Likewise.
8727         (DEBUG_LTO_LINE_SECTION): Drop .dwo suffix from the name.
8728         (DEBUG_LTO_DWO_LINE_SECTION): Define.
8729         (DEBUG_LTO_LINE_STR_SECTION): Define.
8730         (init_sections_and_labels): Initialize debug_line_str_section
8731         variable.  Initialize debug_loc_section for -gdwarf-5 to
8732         DEBUG_LOCLISTS_SECTION.  Formatting fixes.
8734 2017-09-20  Richard Biener  <rguenther@suse.de>
8736         * graphite-sese-to-poly.c (extract_affine): Properly handle
8737         POINTER_PLUS_EXPR, BIT_NOT_EXPR and conversion to signed.
8739 2017-09-20  Richard Biener  <rguenther@suse.de>
8741         PR tree-optimization/81373
8742         * graphite-scop-detection.c (build_cross_bb_scalars_def):
8743         Force SESE live-out defs to be handled even if they are
8744         scev_analyzable_p.
8746 2017-09-19  Jeff Law  <law@redhat.com>
8748         * combine-stack-adj.c (combine_stack_adjustments_for_block): Do
8749         nothing for stack adjustments with REG_STACK_CHECK.
8750         * sched-deps.c (parse_add_or_inc): Reject insns with
8751         REG_STACK_CHECK from dependency breaking.
8752         * config/i386/i386.c (pro_epilogue_adjust_stack): Return insn.
8753         (ix86_adjust_satck_and_probe_stack_clash): Add REG_STACK_NOTEs.
8754         * reg-notes.def (STACK_CHECK): New note.
8756         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): New.
8757         (ix86_expand_prologue): Dump stack clash info as needed.
8758         Call ix86_adjust_stack_and_probe_stack_clash as needed.
8760         * function.c (dump_stack_clash_frame_info): New function.
8761         * function.h (dump_stack_clash_frame_info): Prototype.
8762         (enum stack_clash_probes): New enum.
8764         * config/alpha/alpha.c (alpha_expand_prologue): Also check
8765         flag_stack_clash_protection.
8766         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Likewise.
8767         (arm_expand_prologue, thumb1_expand_prologue): Likewise.
8768         (arm_frame_pointer_required): Likewise.
8769         * config/ia64/ia64.c (ia64_compute_frame_size): Likewise.
8770         (ia64_expand_prologue): Likewise.
8771         * config/mips/mips.c (mips_expand_prologue): Likewise.
8772         * config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Likewise.
8773         * config/sparc/sparc.c (sparc_expand_prologue): Likewise.
8774         (sparc_flat_expand_prologue): Likewise.
8775         * config/spu/spu.c (spu_expand_prologue): Likewise.
8777         * explow.c: Include "params.h".
8778         (anti_adjust_stack_and_probe_stack_clash): New function.
8779         (get_stack_check_protect): Likewise.
8780         (compute_stack_clash_protection_loop_data): Likewise.
8781         (emit_stack_clash_protection_loop_start): Likewise.
8782         (emit_stack_clash_protection_loop_end): Likewise.
8783         (allocate_dynamic_stack_space): Use get_stack_check_protect.
8784         Use anti_adjust_stack_and_probe_stack_clash.
8785         * explow.h (compute_stack_clash_protection_loop_data): Prototype.
8786         (emit_stack_clash_protection_loop_start): Likewise.
8787         (emit_stack_clash_protection_loop_end): Likewise.
8788         * rtl.h (get_stack_check_protect): Prototype.
8789         * target.def (stack_clash_protection_final_dynamic_probe): New hook.
8790         * targhooks.c (default_stack_clash_protection_final_dynamic_probe): New.
8791         * targhooks.h (default_stack_clash_protection_final_dynamic_probe):
8792         Prototype.
8793         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE):
8794         Add @hook.
8795         * doc/tm.texi: Rebuilt.
8796         * config/aarch64/aarch64.c (aarch64_expand_prologue): Use
8797         get_stack_check_protect.
8798         * config/alpha/alpha.c (alpha_expand_prologue): Likewise.
8799         * config/arm/arm.c (arm_expand_prologue): Likewise.
8800         (arm_frame_pointer_required): Likewise.
8801         * config/i386/i386.c (ix86_expand_prologue): Likewise.
8802         * config/ia64/ia64.c (ia64_expand_prologue): Likewise.
8803         * config/mips/mips.c (mips_expand_prologue): Likewise.
8804         * config/powerpcspe/powerpcspe.c (rs6000_emit_prologue): Likewise.
8805         * config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise.
8806         * config/sparc/sparc.c (sparc_expand_prologue): Likewise.
8807         (sparc_flat_expand_prologue): Likewise.
8809         * common.opt (-fstack-clash-protection): New option.
8810         * flag-types.h (enum stack_check_type): Note difference between
8811         -fstack-check= and -fstack-clash-protection.
8812         * params.def (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE): New PARAM.
8813         (PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Likewise.
8814         * toplev.c (process_options): Issue warnings/errors for cases
8815         not handled with -fstack-clash-protection.
8816         * doc/invoke.texi (-fstack-clash-protection): Document new option.
8817         (-fstack-check): Note additional problem with -fstack-check=generic.
8818         Note that -fstack-check is primarily for Ada and refer users
8819         to -fstack-clash-protection for stack-clash-protection.
8820         Document new params for stack clash protection.
8822 2017-09-19  Uros Bizjak  <ubizjak@gmail.com>
8824         * config/i386/i386.c (ix86_split_long_move): Do not handle
8825         address used for LEA in a special way.
8827 2017-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
8829         * simplify-rtx.c (simplify_binary_operation_1): Fix typo in comment.
8831 2017-09-19  Martin Sebor  <msebor@redhat.com>
8833         PR c/81854
8834         * cgraphunit.c (handle_alias_pairs): Reject aliases between functions
8835         of incompatible types.
8837 2017-09-19  Will Schmidt  <will_schmidt@vnet.ibm.com>
8839         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
8840         for early folding of vector loads (ALTIVEC_BUILTIN_LVX_*).
8841         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
8842         Remove obsoleted code for handling ALTIVEC_BUILTIN_VEC_LD.
8844 2017-09-19  Richard Biener  <rguenther@suse.de>
8846         PR tree-optimization/82244
8847         * tree-vrp.c (remove_range_assertions): Do not propagate
8848         a constant to abnormals but replace the assert with a copy.
8850 2017-09-19  Alexander Monakov  <amonakov@ispras.ru>
8852         PR rtl-optimization/57878
8853         PR rtl-optimization/68988
8854         * lra-assigns.c (reload_pseudo_compare_func): Remove fragmentation
8855         avoidance test involving non_reload_pseudos.  Move frequency test
8856         below the general fragmentation avoidance test.
8858 2017-09-19  Richard Biener  <rguenther@suse.de>
8860         PR tree-optimization/69728
8861         * graphite-sese-to-poly.c (schedule_error): New global.
8862         (add_loop_schedule): Handle empty domain by failing the
8863         schedule.
8864         (build_original_schedule): Handle schedule_error.
8866 2017-09-19  Richard Biener  <rguenther@suse.de>
8868         * graphite-scop-detection.c (scop_detection::can_represent_loop):
8869         Do not iterate to sibling loops but only to siblings of inner
8870         loops.
8872 2017-09-18  Andreas Schwab  <schwab@linux-m68k.org>
8874         PR target/81613
8875         * config/m68k/m68k.md (moveq feeding equality comparison): Check
8876         that the registers are different.
8878 2017-09-18  Uros Bizjak  <ubizjak@gmail.com>
8880         * config/i386/i386.c (fold_builtin_cpu): Add M_AMDFAM17H
8881         to processor_model and "amdfam17h" to arch_names_table.
8882         * doc/extend.texi (__builtin_cpu_is): Document amdfam17h CPU name.
8884 2017-09-18  Jakub Jelinek  <jakub@redhat.com>
8886         PR c/82234
8887         * doc/extend.texi: Add @findex entry for __builtin_shuffle.
8889 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
8890             Alan Hayward  <alan.hayward@arm.com>
8891             David Sherwood  <david.sherwood@arm.com>
8893         * tree-vectorizer.h (vect_slp_analyze_operations): Replace parameters
8894         with a vec_info *.
8895         * tree-vect-loop.c (vect_analyze_loop_operations): Update call
8896         accordingly.
8897         * tree-vect-slp.c (vect_slp_analyze_node_operations): Add vec_info *
8898         parameter.  Set SLP_TREE_NUMBER_OF_VEC_STMTS here rather than in
8899         vect_schedule_slp_instance.
8900         (vect_slp_analyze_operations): Replace parameters with a vec_info *.
8901         Update call to vect_slp_analyze_node_operations.  Simplify return
8902         value.
8903         (vect_slp_analyze_bb_1): Update call accordingly.
8904         (vect_schedule_slp_instance): Remove vectorization_factor parameter.
8905         Don't calculate SLP_TREE_NUMBER_OF_VEC_STMTS here.
8906         (vect_schedule_slp): Update call accordingly.
8908 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
8909             Alan Hayward  <alan.hayward@arm.com>
8910             David Sherwood  <david.sherwood@arm.com>
8912         * tree-vect-data-refs.c (vect_get_smallest_scalar_type): Cope
8913         with types that aren't in fact scalar.
8915 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
8917         * tree-vect-slp.c (vect_record_max_nunits): New function,
8918         split out from...
8919         (vect_build_slp_tree_1): ...here.
8920         (vect_build_slp_tree_2): Call it for phis too.
8922 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
8924         * tree-vect-stmts.c (vectorizable_mask_load_store): Pass mask_vectype
8925         to vect_get_vec_def_for_operand when getting the mask operand.
8927 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
8928             Alan Hayward  <alan.hayward@arm.com>
8929             David Sherwood  <david.sherwood@arm.com>
8931         * tree-vect-loop.c (vectorizable_live_operation): Fix type of
8932         bitstart.
8934 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
8935             Alan Hayward  <alan.hayward@arm.com>
8936             David Sherwood  <david.sherwood@arm.com>
8938         * tree-vect-loop.c (vectorizable_live_operation): Fix element size
8939         calculation for vector booleans.
8941 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
8942             Alan Hayward  <alan.hayward@arm.com>
8943             David Sherwood  <david.sherwood@arm.com>
8945         * tree-vect-stmts.c (can_vectorize_live_stmts): New function,
8946         split out from...
8947         (vect_transform_stmt): ...here.
8948         (vect_analyze_stmt): Use it instead of calling
8949         vectorizable_live_operation directly.
8951 2017-09-18  Cesar Philippidis  <cesar@codesourcery.com>
8953         * omp-offload.c (oacc_xform_loop): Enable SIMD vectorization on
8954         non-SIMT targets in acc vector loops.
8956 2017-09-18  Claudiu Zissulescu  <claziss@synopsys.com>
8958         * configure.ac: Add arc and check if assembler supports gdwarf2.
8959         * configure: Regenerate.
8961 2017-09-18  Richard Biener  <rguenther@suse.de>
8963         PR tree-optimization/82220
8964         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Exclude
8965         epilogue niters from the min_profitable_iters compute.
8967 2017-09-18  Jakub Jelinek  <jakub@redhat.com>
8969         PR target/82145
8970         * config/i386/i386.c (ix86_init_large_pic_reg): Revert 2017-09-01
8971         changes.  Turn CODE_LABEL into NOTE_INSN_DELETED_LABEL immediately.
8972         (ix86_init_pic_reg): Revert 2017-09-01 changes.
8974 2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>
8976         PR target/81361
8977         * dwarf2cfi.c (add_cfis_to_fde): Do not generate DW_CFA_set_loc after
8978         switching to a new text section.
8980 2017-09-18  Richard Biener  <rguenther@suse.de>
8982         * graphite-scop-detection.c (scop_detection::stmt_has_simple_data_ref):
8983         Simplify.
8984         (build_alias_set): Reject aliases with no access function.
8986 2017-09-18  Richard Biener  <rguenther@suse.de>
8988         PR tree-optimization/79622
8989         * graphite-scop-detection.c (build_cross_bb_scalars_def): Properly
8990         handle PHIs.
8991         (build_cross_bb_scalars_use): Likewise.
8993 2017-09-18  Pierre-Marie de Rodat  <derodat@adacore.com>
8995         * cgraph.h (cgraph_thunk_info): Fix a typo in a comment.
8997 2017-09-18  Alan Modra  <amodra@gmail.com>
8999         PR target/81996
9000         * gcc/config/rs6000/rs6000.c (rs6000_return_addr): Use
9001         stack_pointer_rtx for count 0.  Update comments.  Break up
9002         large rtl expression.
9004 2017-09-17  Daniel Santos  <daniel.santos@pobox.com>
9006         * config/i386/i386.c (xlogue_layout::STUB_NAME_MAX_LEN):
9007         Increase to 20 bytes.
9008         (xlogue_layout::s_stub_names): Add an additional size-2 diminsion.
9009         (xlogue_layout::get_stub_name): Modify to select the appropairate sse
9010         or avx version of the stub.
9012 2017-09-17  H.J. Lu  <hongjiu.lu@intel.com>
9014         PR target/82166
9015         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Properly
9016         compute the minimum stack alignment.  Also update preferred stack
9017         boundary for leaf functions.
9019 2017-09-16  Richard Sandiford  <richard.sandiford@linaro.org>
9021         PR tree-optimization/82228
9022         * tree-vect-loop.c (vectorizable_live_operation): Move initialization
9023         of ncopies.
9025 2017-09-16  Chung-Ju Wu  <jasonwucj@gmail.com>
9027         * common/config/nds32/nds32-common.c
9028         (nds32_option_optimization_table): Refine formatting.
9029         (nds32_option_optimization_table): Use -fsched-pressure and
9030         -fomit-frame-pointer for specific optimization level.
9032 2017-09-16  Chung-Ju Wu  <jasonwucj@gmail.com>
9034         * config/nds32/nds32.c: Refine formatting and comments.
9035         * config/nds32/nds32.h: Likewise.
9036         * config/nds32/nds32.md: Likewise.
9037         * config/nds32/nds32-cost.c: Likewise.
9038         * config/nds32/nds32-isr.c: Likewise.
9039         * config/nds32/nds32-md-auxiliary.c: Likewise.
9040         * config/nds32/nds32-multiple.md: Likewise.
9041         * config/nds32/nds32-predicates.c: Likewise.
9043 2017-09-15  Andrew Sutton  <andrew.n.sutton@gmail.com>
9044             Jakub Jelinek  <jakub@redhat.com>
9046         Add support for -std=c++2a.
9047         * doc/cpp.texi (__cplusplus): Document value for -std=c++2a
9048         or -std=gnu+2a.
9049         * doc/invoke.texi: Document -std=c++2a and -std=gnu++2a.
9051 2017-09-15  Steve Ellcey  <sellcey@cavium.com>
9053         PR target/82066
9054         * doc/extend.texi (Common Function Attributes): Add 
9055         references to ARM, AArch64, and S/390 specific attributes.
9056         (Function Specific Option Pragmas): Add AArch64 and S/390
9057         to list of back ends that support the target pragma.
9059 2017-09-15  Nathan Sidwell  <nathan@acm.org>
9061         * doc/standards.texi: Fix C++17 description.  Update URLs for
9062         C++11 & 14.
9064 2017-09-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9066         * common.opt (Wcast-align=strict): New warning option.
9067         * doc/invoke.texi: Document -Wcast-align=strict. 
9069 2017-09-15  Pierre-Marie de Rodat  <derodat@adacore.com>
9071         * cgraph.h (cgraph_thunk_info): Add comments.
9072         * cgraph.c (cgraph_node::create_thunk): Adjust comment, make
9073         assert for VIRTUAL_* arguments stricter.
9075 2017-09-15  Jackson Woodruff  <jackson.woodruff@arm.com>
9077         PR tree-optimization/71026
9078         * match.pd: Move RDIV patterns from fold-const.c
9079         * fold-const.c (distribute_real_division): Removed.
9080         (fold_binary_loc): Remove calls to distribute_real_divison.
9082 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
9084         * doc/invoke.texi: Document -std=c++17 and -std=gnu++17 and document
9085         c++1z and gnu++1z as deprecated.  Change other references to
9086         -std=c++1z to -std=c++17 and -std=gnu++1z to -std=gnu++17.
9087         Change -Wc++1z-compat to -Wc++17-compat.
9088         * doc/cpp.texi: Document -std=c++17 defines __cplusplus 201703L.
9089         * dwarf2out.c (highest_c_language): Handle C++17.
9090         (gen_compile_unit_die): Likewise.
9092 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
9094         PR rtl-optimization/82192
9095         * combine.c (make_extraction): Don't look through non-paradoxical
9096         SUBREGs or TRUNCATE if pos + len is or might be bigger than
9097         inner's mode.
9099 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
9100             Alan Hayward  <alan.hayward@arm.com>
9101             David Sherwood  <david.sherwood@arm.com>
9103         * target.def (function_arg_offset): New hook.
9104         * targhooks.h (default_function_arg_offset): Declare.
9105         * targhooks.c (default_function_arg_offset): New function.
9106         * function.c (locate_and_pad_parm): Use
9107         targetm.calls.function_arg_offset instead of FUNCTION_ARG_OFFSET.
9108         * doc/tm.texi.in (FUNCTION_ARG_OFFSET): Replace with...
9109         (TARGET_FUNCTION_ARG_OFFSET): ...this.
9110         * doc/tm.texi: Regenerate.
9111         * config/spu/spu.h (FUNCTION_ARG_OFFSET): Delete.
9112         * config/spu/spu.c (spu_function_arg_offset): New function.
9113         (TARGET_FUNCTION_ARG_OFFSET): Redefine.
9114         * system.h (FUNCTION_ARG_OFFSET): Poison.
9116 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
9117             Alan Hayard  <alan.hayward@arm.com>
9118             David Sherwood  <david.sherwood@arm.com>
9120         * target.def (truly_noop_truncation): New hook.
9121         (mode_rep_extended): Refer to TARGET_TRULY_NOOP_TRUNCATION rather
9122         than TRULY_NOOP_TRUNCATION.
9123         * hooks.h (hook_bool_uint_uint_true): Declare.
9124         * hooks.c (hook_bool_uint_uint_true): New function.
9125         * doc/tm.texi.in (TRULY_NOOP_TRUNCATION): Replace with...
9126         (TARGET_TRULY_NOOP_TRUNCATION): ...this.
9127         * doc/tm.texi: Regenerate.
9128         * combine.c (make_extraction): Refer to TARGET_TRULY_NOOP_TRUNCATION
9129         rather than TRULY_NOOP_TRUNCATION in comments.
9130         (simplify_comparison): Likewise.
9131         (record_truncated_value): Likewise.
9132         * expmed.c (extract_bit_field_1): Likewise.
9133         (extract_split_bit_field): Likewise.
9134         * convert.c (convert_to_integer_1): Use targetm.truly_noop_truncation
9135         instead of TRULY_NOOP_TRUNCATION.
9136         * function.c (assign_parm_setup_block): Likewise.
9137         * machmode.h (TRULY_NOOP_TRUNCATION_MODES_P): Likewise.
9138         * rtlhooks.c: Include target.h.
9139         * config/aarch64/aarch64.h (TRULY_NOOP_TRUNCATION): Delete.
9140         * config/alpha/alpha.h (TRULY_NOOP_TRUNCATION): Delete.
9141         * config/arc/arc.h (TRULY_NOOP_TRUNCATION): Delete.
9142         * config/arm/arm.h (TRULY_NOOP_TRUNCATION): Delete.
9143         * config/avr/avr.h (TRULY_NOOP_TRUNCATION): Delete.
9144         * config/bfin/bfin.h (TRULY_NOOP_TRUNCATION): Delete.
9145         * config/c6x/c6x.h (TRULY_NOOP_TRUNCATION): Delete.
9146         * config/cr16/cr16.h (TRULY_NOOP_TRUNCATION): Delete.
9147         * config/cris/cris.h (TRULY_NOOP_TRUNCATION): Delete.
9148         * config/epiphany/epiphany.h (TRULY_NOOP_TRUNCATION): Delete.
9149         * config/fr30/fr30.h (TRULY_NOOP_TRUNCATION): Delete.
9150         * config/frv/frv.h (TRULY_NOOP_TRUNCATION): Delete.
9151         * config/ft32/ft32.h (TRULY_NOOP_TRUNCATION): Delete.
9152         * config/h8300/h8300.h (TRULY_NOOP_TRUNCATION): Delete.
9153         * config/i386/i386.h (TRULY_NOOP_TRUNCATION): Delete.
9154         * config/ia64/ia64.h (TRULY_NOOP_TRUNCATION): Delete.
9155         * config/iq2000/iq2000.h (TRULY_NOOP_TRUNCATION): Delete.
9156         * config/lm32/lm32.h (TRULY_NOOP_TRUNCATION): Delete.
9157         * config/m32c/m32c.h (TRULY_NOOP_TRUNCATION): Delete.
9158         * config/m32r/m32r.h (TRULY_NOOP_TRUNCATION): Delete.
9159         * config/m68k/m68k.h (TRULY_NOOP_TRUNCATION): Delete.
9160         * config/mcore/mcore.h (TRULY_NOOP_TRUNCATION): Delete.
9161         * config/microblaze/microblaze.h (TRULY_NOOP_TRUNCATION): Delete.
9162         * config/mips/mips.h (TRULY_NOOP_TRUNCATION): Delete.
9163         * config/mips/mips.c (mips_truly_noop_truncation): New function.
9164         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
9165         * config/mips/mips.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
9166         rather than TRULY_NOOP_TRUNCATION in comments.
9167         * config/mmix/mmix.h (TRULY_NOOP_TRUNCATION): Delete.
9168         * config/mn10300/mn10300.h (TRULY_NOOP_TRUNCATION): Delete.
9169         * config/moxie/moxie.h (TRULY_NOOP_TRUNCATION): Delete.
9170         * config/msp430/msp430.h (TRULY_NOOP_TRUNCATION): Delete.
9171         * config/nds32/nds32.h (TRULY_NOOP_TRUNCATION): Delete.
9172         * config/nios2/nios2.h (TRULY_NOOP_TRUNCATION): Delete.
9173         * config/nvptx/nvptx.h (TRULY_NOOP_TRUNCATION): Delete.
9174         * config/pa/pa.h (TRULY_NOOP_TRUNCATION): Delete.
9175         * config/pdp11/pdp11.h (TRULY_NOOP_TRUNCATION): Delete.
9176         * config/powerpcspe/powerpcspe.h (TRULY_NOOP_TRUNCATION): Delete.
9177         * config/riscv/riscv.h (TRULY_NOOP_TRUNCATION): Delete.
9178         * config/riscv/riscv.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
9179         rather than TRULY_NOOP_TRUNCATION in comments.
9180         * config/rl78/rl78.h (TRULY_NOOP_TRUNCATION): Delete.
9181         * config/rs6000/rs6000.h (TRULY_NOOP_TRUNCATION): Delete.
9182         * config/rx/rx.h (TRULY_NOOP_TRUNCATION): Delete.
9183         * config/s390/s390.h (TRULY_NOOP_TRUNCATION): Delete.
9184         * config/sh/sh.h (MAYBE_BASE_REGISTER_RTX_P): Remove
9185         TRULY_NOOP_TRUNCATION condition.
9186         (MAYBE_INDEX_REGISTER_RTX_P): Likewise.
9187         (TRULY_NOOP_TRUNCATION): Delete.
9188         * config/sparc/sparc.h (TRULY_NOOP_TRUNCATION): Delete.
9189         * config/spu/spu.h (TRULY_NOOP_TRUNCATION): Delete.
9190         * config/spu/spu.c (spu_truly_noop_truncation): New function.
9191         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
9192         * config/stormy16/stormy16.h (TRULY_NOOP_TRUNCATION): Delete.
9193         * config/tilegx/tilegx.h (TRULY_NOOP_TRUNCATION): Delete.
9194         * config/tilegx/tilegx.c (tilegx_truly_noop_truncation): New fuction.
9195         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
9196         * config/tilegx/tilegx.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
9197         rather than TRULY_NOOP_TRUNCATION in comments.
9198         * config/tilepro/tilepro.h (TRULY_NOOP_TRUNCATION): Delete.
9199         * config/v850/v850.h (TRULY_NOOP_TRUNCATION): Delete.
9200         * config/vax/vax.h (TRULY_NOOP_TRUNCATION): Delete.
9201         * config/visium/visium.h (TRULY_NOOP_TRUNCATION): Delete.
9202         * config/xtensa/xtensa.h (TRULY_NOOP_TRUNCATION): Delete.
9203         * system.h (TRULY_NOOP_TRUNCATION): Poison.
9205 2017-09-15  Christophe Lyon  <christophe.lyon@linaro.org>
9207         PR target/67591
9208         * config/arm/arm.md (*cmp_and): Add enabled_for_depr_it attribute.
9209         (*cmp_ior): Likewise.
9210         (*ior_scc_scc): Add alternative for enabled_for_depr_it attribute.
9211         (*ior_scc_scc_cmp): Likewise.
9212         (*and_scc_scc): Likewise.
9213         (*and_scc_scc_cmp): Likewise.
9215 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
9216             Alan Hayard  <alan.hayward@arm.com>
9217             David Sherwood  <david.sherwood@arm.com>
9219         * target.def (can_change_mode_class): New hook.
9220         (mode_rep_extended): Refer to it instead of CANNOT_CHANGE_MODE_CLASS.
9221         (hard_regno_nregs): Likewise.
9222         * hooks.h (hook_bool_mode_mode_reg_class_t_true): Declare.
9223         * hooks.c (hook_bool_mode_mode_reg_class_t_true): New function.
9224         * doc/tm.texi.in (CANNOT_CHANGE_MODE_CLASS): Replace with...
9225         (TARGET_CAN_CHANGE_MODE_CLASS): ...this.
9226         (LOAD_EXTEND_OP): Update accordingly.
9227         * doc/tm.texi: Regenerate.
9228         * doc/rtl.texi: Refer to TARGET_CAN_CHANGE_MODE_CLASS instead of
9229         CANNOT_CHANGE_MODE_CLASS.
9230         * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): Replace with...
9231         (REG_CAN_CHANGE_MODE_P): ...this new macro.
9232         * combine.c (simplify_set): Update accordingly.
9233         * emit-rtl.c (validate_subreg): Likewise.
9234         * recog.c (general_operand): Likewise.
9235         * regcprop.c (mode_change_ok): Likewise.
9236         * reload1.c (choose_reload_regs): Likewise.
9237         (inherit_piecemeal_p): Likewise.
9238         * rtlanal.c (simplify_subreg_regno): Likewise.
9239         * postreload.c (reload_cse_simplify_set): Use REG_CAN_CHANGE_MODE_P
9240         instead of CANNOT_CHANGE_MODE_CLASS.
9241         (reload_cse_simplify_operands): Likewise.
9242         * reload.c (push_reload): Use targetm.can_change_mode_class
9243         instead of CANNOT_CHANGE_MODE_CLASS.
9244         (push_reload): Likewise.  Also use REG_CAN_CHANGE_MODE_P instead of
9245         REG_CANNOT_CHANGE_MODE_P.
9246         * config/alpha/alpha.h (CANNOT_CHANGE_MODE_CLASS): Delete.
9247         * config/alpha/alpha.c (alpha_can_change_mode_class): New function.
9248         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
9249         * config/arm/arm.h (CANNOT_CHANGE_MODE_CLASS): Delete.
9250         * config/arm/arm.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
9251         (arm_can_change_mode_class): New function.
9252         * config/arm/neon.md: Refer to TARGET_CAN_CHANGE_MODE_CLASS rather
9253         than CANNOT_CHANGE_MODE_CLASS in comments.
9254         * config/i386/i386.h (CANNOT_CHANGE_MODE_CLASS): Delete.
9255         * config/i386/i386-protos.h (ix86_cannot_change_mode_class): Delete.
9256         * config/i386/i386.c (ix86_cannot_change_mode_class): Replace with...
9257         (ix86_can_change_mode_class): ...this new function, inverting the
9258         sense of the return value.
9259         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
9260         * config/ia64/ia64.h (CANNOT_CHANGE_MODE_CLASS): Delete.
9261         * config/ia64/ia64.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
9262         (ia64_can_change_mode_class): New function.
9263         * config/m32c/m32c.h (CANNOT_CHANGE_MODE_CLASS): Delete.
9264         * config/m32c/m32c-protos.h (m32c_cannot_change_mode_class): Delete.
9265         * config/m32c/m32c.c (m32c_cannot_change_mode_class): Replace with...
9266         (m32c_can_change_mode_class): ...this new function, inverting the
9267         sense of the return value.
9268         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
9269         * config/mips/mips.h (CANNOT_CHANGE_MODE_CLASS): Delete.
9270         * config/mips/mips-protos.h (mips_cannot_change_mode_class): Delete.
9271         * config/mips/mips.c (mips_cannot_change_mode_class): Replace with...
9272         (mips_can_change_mode_class): ...this new function, inverting the
9273         sense of the return value.
9274         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
9275         * config/msp430/msp430.h (CANNOT_CHANGE_MODE_CLASS): Delete.
9276         * config/msp430/msp430.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
9277         (msp430_can_change_mode_class): New function.
9278         * config/nvptx/nvptx.h (CANNOT_CHANGE_MODE_CLASS): Delete.
9279         * config/nvptx/nvptx.c (nvptx_can_change_mode_class): New function.
9280         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
9281         * config/pa/pa32-regs.h (CANNOT_CHANGE_MODE_CLASS): Delete.
9282         * config/pa/pa64-regs.h (CANNOT_CHANGE_MODE_CLASS): Delete.
9283         * config/pa/pa-protos.h (pa_cannot_change_mode_class): Delete.
9284         * config/pa/pa.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
9285         (pa_cannot_change_mode_class): Replace with...
9286         (pa_can_change_mode_class): ...this new function, inverting the
9287         sense of the return value.
9288         (pa_modes_tieable_p): Refer to TARGET_CAN_CHANGE_MODE_CLASS rather
9289         than CANNOT_CHANGE_MODE_CLASS in comments.
9290         * config/pdp11/pdp11.h (CANNOT_CHANGE_MODE_CLASS): Delete.
9291         * config/pdp11/pdp11-protos.h (pdp11_cannot_change_mode_class): Delete.
9292         * config/pdp11/pdp11.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
9293         (pdp11_cannot_change_mode_class): Replace with...
9294         (pdp11_can_change_mode_class): ...this new function, inverting the
9295         sense of the return value.
9296         * config/powerpcspe/powerpcspe.h (CANNOT_CHANGE_MODE_CLASS): Delete.
9297         * config/powerpcspe/powerpcspe-protos.h
9298         (rs6000_cannot_change_mode_class_ptr): Delete.
9299         * config/powerpcspe/powerpcspe.c
9300         (rs6000_cannot_change_mode_class_ptr): Delete.
9301         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
9302         (rs6000_option_override_internal): Assign to
9303         targetm.can_change_mode_class instead of
9304         rs6000_cannot_change_mode_class_ptr.
9305         (rs6000_cannot_change_mode_class): Replace with...
9306         (rs6000_can_change_mode_class): ...this new function, inverting the
9307         sense of the return value.
9308         (rs6000_debug_cannot_change_mode_class): Replace with...
9309         (rs6000_debug_can_change_mode_class): ...this new function.
9310         * config/riscv/riscv.h (CANNOT_CHANGE_MODE_CLASS): Delete.
9311         * config/riscv/riscv.c (riscv_can_change_mode_class): New function.
9312         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
9313         * config/rs6000/rs6000.h (CANNOT_CHANGE_MODE_CLASS): Delete.
9314         * config/rs6000/rs6000-protos.h (rs6000_cannot_change_mode_class_ptr):
9315         Delete.
9316         * config/rs6000/rs6000.c (rs6000_cannot_change_mode_class_ptr): Delete.
9317         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
9318         (rs6000_option_override_internal): Assign to
9319         targetm.can_change_mode_class instead of
9320         rs6000_cannot_change_mode_class_ptr.
9321         (rs6000_cannot_change_mode_class): Replace with...
9322         (rs6000_can_change_mode_class): ...this new function, inverting the
9323         sense of the return value.
9324         (rs6000_debug_cannot_change_mode_class): Replace with...
9325         (rs6000_debug_can_change_mode_class): ...this new function.
9326         * config/s390/s390.h (CANNOT_CHANGE_MODE_CLASS): Delete.
9327         * config/s390/s390-protos.h (s390_cannot_change_mode_class): Delete.
9328         * config/s390/s390.c (s390_cannot_change_mode_class): Replace with...
9329         (s390_can_change_mode_class): ...this new function, inverting the
9330         sense of the return value.
9331         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
9332         * config/sh/sh.h (CANNOT_CHANGE_MODE_CLASS): Delete.
9333         * config/sh/sh-protos.h (sh_cannot_change_mode_class): Delete.
9334         * config/sh/sh.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
9335         (sh_cannot_change_mode_class): Replace with...
9336         (sh_can_change_mode_class): ...this new function, inverting the
9337         sense of the return value.
9338         * config/sparc/sparc.h (CANNOT_CHANGE_MODE_CLASS): Delete.
9339         * config/sparc/sparc.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
9340         (sparc_can_change_mode_class): New function.
9341         * config/spu/spu.h (CANNOT_CHANGE_MODE_CLASS): Delete.
9342         * config/spu/spu.c (spu_can_change_mode_class): New function.
9343         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
9344         * config/visium/visium.h (CANNOT_CHANGE_MODE_CLASS): Delete.
9345         * config/visium/visium.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
9346         (visium_can_change_mode_class): New function.
9347         * system.h (CANNOT_CHANGE_MODE_CLASS): Poison.
9349 2017-09-15  Richard Biener  <rguenther@suse.de>
9351         PR tree-optimization/82217
9352         * tree-ssa-sccvn.c (visit_phi): Properly handle all VN_TOP
9353         but not undefined case.
9355 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
9357         PR target/82145
9358         * postreload.c (reload_cse_simplify_operands): Skip
9359         NOTE_INSN_DELETED_LABEL similarly to skipping CODE_LABEL.
9361 2017-09-15  Richard Biener  <rguenther@suse.de>
9363         PR tree-optimization/68823
9364         * graphite-scop-detection.c (build_alias_set): If we have a
9365         possible dependence check whether we can handle them by just
9366         looking at the DRs DR_ACCESS_FNs.
9367         (build_scops): If build_alias_set fails, fail the SCOP.
9369 2017-09-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
9371         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_1_HW): New macros
9372         to support float128 built-in functions that require the ISA 3.0
9373         hardware.
9374         (BU_FLOAT128_3_HW): Likewise.
9375         (SQRTF128): Add support for the IEEE 128-bit square root and fma
9376         built-in functions.
9377         (FMAF128): Likewise.
9378         (FMAQ): Likewise.
9379         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
9380         support for built-in functions that need the ISA 3.0 IEEE 128-bit
9381         floating point instructions.
9382         (rs6000_invalid_builtin): Likewise.
9383         (rs6000_builtin_mask_names): Likewise.
9384         * config/rs6000/rs6000.h (MASK_FLOAT128_HW): Likewise.
9385         (RS6000_BTM_FLOAT128_HW): Likewise.
9386         (RS6000_BTM_COMMON): Likewise.
9387         * config/rs6000/rs6000.md (fma<mode>4_hw): Add a generator
9388         function.
9389         * doc/extend.texi (RS/6000 built-in functions): Document the
9390         IEEE 128-bit floating point square root and fused multiply-add
9391         built-in functions.
9393 2017-09-14  Pat Haugen  <pthaugen@us.ibm.com>
9395         * config/rs6000/rs6000.c (rs6000_set_up_by_prologue): Make sure the TOC
9396         reg (r2) isn't in the set of registers defined in the prologue.
9398 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
9399             Alan Hayward  <alan.hayward@arm.com>
9400             David Sherwood  <david.sherwood@arm.com>
9402         * tree-vectorizer.h (_loop_vec_info): Add max_vectorization_factor.
9403         (LOOP_VINFO_MAX_VECT_FACTOR): New macro.
9404         (LOOP_VINFO_ORIG_VECT_FACTOR): Replace with...
9405         (LOOP_VINFO_ORIG_MAX_VECT_FACTOR): ...this new macro.
9406         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Update
9407         accordingly.
9408         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
9409         max_vectorization_factor.
9410         (vect_analyze_loop_2): Set LOOP_VINFO_MAX_VECT_FACTOR.
9412 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
9413             Alan Hayward  <alan.hayward@arm.com>
9414             David Sherwood  <david.sherwood@arm.com>
9416         * tree-vectorizer.h (vect_min_worthwhile_factor): Delete.
9417         (vect_worthwhile_without_simd_p): Declare.
9418         * tree-vect-loop.c (vect_worthwhile_without_simd_p): New function.
9419         (vectorizable_reduction): Use it.
9420         * tree-vect-stmts.c (vectorizable_shift): Likewise.
9421         (vectorizable_operation): Likewise.
9423 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
9424             Alan Hayward  <alan.hayward@arm.com>
9425             David Sherwood  <david.sherwood@arm.com>
9427         * tree-vectorizer.h (vect_get_num_copies): New function.
9428         * tree-vect-data-refs.c (vect_get_data_access_cost): Use it.
9429         * tree-vect-loop.c (vectorizable_reduction): Likewise.
9430         (vectorizable_induction): Likewise.
9431         (vectorizable_live_operation): Likewise.
9432         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
9433         (vectorizable_bswap): Likewise.
9434         (vectorizable_call): Likewise.
9435         (vectorizable_conversion): Likewise.
9436         (vectorizable_assignment): Likewise.
9437         (vectorizable_shift): Likewise.
9438         (vectorizable_operation): Likewise.
9439         (vectorizable_store): Likewise.
9440         (vectorizable_load): Likewise.
9441         (vectorizable_condition): Likewise.
9442         (vectorizable_comparison): Likewise.
9443         (vect_analyze_stmt): Pass the slp node to vectorizable_live_operation.
9445 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
9446             Alan Hayward  <alan.hayward@arm.com>
9447             David Sherwood  <david.sherwood@arm.com>
9449         * tree-vect-loop.c (vectorizable_induction): Use gimple_build instead
9450         of vect_init_vector.
9452 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
9453             Alan Hayward  <alan.hayward@arm.com>
9454             David Sherwood  <david.sherwood@arm.com>
9456         * gimple-fold.h (gimple_build_vector_from_val): Declare, and provide
9457         an inline wrapper that provides a location.
9458         (gimple_build_vector): Likewise.
9459         * gimple-fold.c (gimple_build_vector_from_val): New function.
9460         (gimple_build_vector): Likewise.
9461         * tree-vect-loop.c (get_initial_def_for_reduction): Use the new
9462         functions to build the initial value.  Always return a gimple value.
9463         (get_initial_defs_for_reduction): Likewise.  Only compute
9464         neutral_vec once.
9465         (vect_create_epilog_for_reduction): Don't call force_gimple_operand or
9466         vect_init_vector on the results from get_initial_def(s)_for_reduction.
9467         (vectorizable_induction): Use gimple_build_vector rather than
9468         vect_init_vector.
9470 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
9471             Alan Hayward  <alan.hayward@arm.com>
9472             David Sherwood  <david.sherwood@arm.com>
9474         * target.h (vec_perm_indices): New typedef.
9475         (auto_vec_perm_indices): Likewise.
9476         * optabs-query.h: Include target.h
9477         (can_vec_perm_p): Take a vec_perm_indices *.
9478         * optabs-query.c (can_vec_perm_p): Likewise.
9479         (can_mult_highpart_p): Update accordingly.  Use auto_vec_perm_indices.
9480         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
9481         * tree-vect-generic.c (lower_vec_perm): Likewise.
9482         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
9483         (vect_grouped_load_supported): Likewise.
9484         (vect_shift_permute_load_chain): Likewise.
9485         (vect_permute_store_chain): Use auto_vec_perm_indices.
9486         (vect_permute_load_chain): Likewise.
9487         * fold-const.c (fold_vec_perm): Take vec_perm_indices.
9488         (fold_ternary_loc): Update accordingly.  Use auto_vec_perm_indices.
9489         Update uses of can_vec_perm_p.
9490         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Replace the
9491         mode with a number of elements.  Take a vec_perm_indices *.
9492         (vect_create_epilog_for_reduction): Update accordingly.
9493         Use auto_vec_perm_indices.
9494         (have_whole_vector_shift): Likewise.  Update call to can_vec_perm_p.
9495         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
9496         (vect_transform_slp_perm_load): Likewise.
9497         (vect_schedule_slp_instance): Use auto_vec_perm_indices.
9498         * tree-vectorizer.h (vect_gen_perm_mask_any): Take a vec_perm_indices.
9499         (vect_gen_perm_mask_checked): Likewise.
9500         * tree-vect-stmts.c (vect_gen_perm_mask_any): Take a vec_perm_indices.
9501         (vect_gen_perm_mask_checked): Likewise.
9502         (vectorizable_mask_load_store): Use auto_vec_perm_indices.
9503         (vectorizable_store): Likewise.
9504         (vectorizable_load): Likewise.
9505         (perm_mask_for_reverse): Likewise.  Update call to can_vec_perm_p.
9506         (vectorizable_bswap): Likewise.
9508 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
9509             Alan Hayward  <alan.hayward@arm.com>
9510             David Sherwood  <david.sherwood@arm.com>
9512         * tree.h (build_vector): Take a vec<tree> instead of a tree *.
9513         * tree.c (build_vector): Likewise.
9514         (build_vector_from_ctor): Update accordingly.
9515         (build_vector_from_val): Likewise.
9516         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
9517         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
9518         * tree-vect-generic.c (add_rshift): Likewise.
9519         (expand_vector_divmod): Likewise.
9520         (optimize_vector_constructor): Likewise.
9521         * tree-vect-slp.c (vect_get_constant_vectors): Likewise.
9522         (vect_transform_slp_perm_load): Likewise.
9523         (vect_schedule_slp_instance): Likewise.
9524         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
9525         (vectorizable_call): Likewise.
9526         (vect_gen_perm_mask_any): Likewise.  Add elements in order.
9527         * expmed.c (make_tree): Likewise.
9528         * fold-const.c (fold_negate_expr_1): Use auto_vec<tree> when building
9529         a vector passed to build_vector.
9530         (fold_convert_const): Likewise.
9531         (exact_inverse): Likewise.
9532         (fold_ternary_loc): Likewise.
9533         (fold_relational_const): Likewise.
9534         (const_binop): Likewise.  Use VECTOR_CST_ELT directly when operating
9535         on VECTOR_CSTs, rather than going through vec_cst_ctor_to_array.
9536         (const_unop): Likewise.  Store the reduction accumulator in a
9537         variable rather than an array.
9538         (vec_cst_ctor_to_array): Take the number of elements as a parameter.
9539         (fold_vec_perm): Update calls accordingly.  Use auto_vec<tree> for
9540         the new vector, rather than constructing it after the input arrays.
9541         (native_interpret_vector): Use auto_vec<tree> when building
9542         a vector passed to build_vector.  Add elements in order.
9543         * tree-vect-loop.c (get_initial_defs_for_reduction): Use
9544         auto_vec<tree> when building a vector passed to build_vector.
9545         (vect_create_epilog_for_reduction): Likewise.
9546         (vectorizable_induction): Likewise.
9547         (get_initial_def_for_reduction): Likewise.  Fix indentation of
9548         case statements.
9549         * config/sparc/sparc.c (sparc_handle_vis_mul8x16): Change n_elts
9550         to a vec<tree> *.
9551         (sparc_fold_builtin): Use auto_vec<tree> when building a vector
9552         passed to build_vector.
9554 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
9555             Alan Hayward  <alan.hayward@arm.com>
9556             David Sherwood  <david.sherwood@arm.com>
9558         * tree-core.h (tree_base::u): Add an "nelts" field.
9559         (tree_vector): Use VECTOR_CST_NELTS as the length.
9560         * tree.c (tree_size): Likewise.
9561         (make_vector): Initialize VECTOR_CST_NELTS.
9562         * tree.h (VECTOR_CST_NELTS): Use the u.nelts field.
9563         * cfgexpand.c (expand_debug_expr): Use VECTOR_CST_NELTS instead of
9564         TYPE_VECTOR_SUBPARTS.
9565         * expr.c (const_vector_mask_from_tree): Consistently use "units"
9566         as the number of units, setting it from VECTOR_CST_NELTS.
9567         (const_vector_from_tree): Likewise.
9568         * fold-const.c (negate_expr_p): Use VECTOR_CST_NELTS instead of
9569         TYPE_VECTOR_SUBPARTS for the number of elements in a VECTOR_CST.
9570         (fold_negate_expr_1): Likewise.
9571         (fold_convert_const): Likewise.
9572         (const_binop): Likewise.  Differentiate the number of output and
9573         input elements.
9574         (const_unop): Likewise.
9575         (fold_ternary_loc): Use VECTOR_CST_NELTS for the number of elements
9576         in a VECTOR_CST, asserting that it is the same as TYPE_VECTOR_SUBPARTS
9577         in cases that did the opposite.
9579 2017-09-14  Richard Biener  <rguenther@suse.de>
9581         * tree-ssa-sccvn.c (visit_phi): Merge undefined values similar
9582         to VN_TOP.
9584 2017-09-14  Eric Botcazou  <ebotcazou@adacore.com>
9586         * dwarf2out.c (dwarf2out_source_line): Remove superfluous test.
9588 2017-09-14  Jakub Jelinek  <jakub@redhat.com>
9590         PR target/81325
9591         * cfgbuild.c (find_bb_boundaries): Ignore debug insns in decisions
9592         if and where to split a bb, except for splitting before debug insn
9593         sequences followed by non-label real insn.  Delete debug insns
9594         in between basic blocks.
9596         * combine.c (make_compound_operation_int): Formatting fixes.
9598         * config/alpha/elf.h (LINK_EH_SPEC): Add -static-pie support.
9599         * config/alpha/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
9600         * config/netbsd.h (LINK_EH_SPEC): Likewise.
9601         * config/sol2.h (LINK_EH_SPEC): Likewise.
9602         * config/arm/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
9603         * config/s390/linux.h (LINK_SPEC): Likewise.
9604         * config/freebsd.h (LINK_EH_SPEC): Likewise.
9605         * config/openbsd.h (LINK_EH_SPEC): Likewise.
9606         * config/lm32/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
9607         * config/aarch64/aarch64-linux.h (LINUX_TARGET_LINK_SPEC): Likewise.
9608         * config/powerpcspe/sysv4.h (LINK_EH_SPEC): Likewise.
9609         * config/bfin/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
9610         * config/i386/gnu-user64.h (GNU_USER_TARGET_LINK_SPEC): Fix a typo.
9611         * config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Formatting fix.
9613 2017-09-13  Jakub Jelinek  <jakub@redhat.com>
9615         * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Add -static-pie
9616         support.
9617         (ENDFILE_LINUX_SPEC): Likewise.
9618         (LINK_EH_SPEC): Likewise.
9619         * config/rs6000/linux64.h (LINK_SHLIB_SPEC): Likewise.
9620         (LINK_OS_LINUX_SPEC32): Likewise.
9621         (LINK_OS_LINUX_SPEC64): Likewise.
9622         * config/rs6000/linux.h (LINK_SHLIB_SPEC): Likewise.
9623         (LINK_OS_LINUX_SPEC): Likewise.
9625 2017-09-13  Martin Liska  <mliska@suse.cz>
9627         PR middle-end/82154
9628         * stmt.c (expand_sjlj_dispatch_table): Use CASE_LOW when
9629         CASE_HIGH is NULL_TREE.
9631 2017-09-13  Richard Sandiford  <richard.sandiford@linaro.org>
9632             Alan Hayward  <alan.hayward@arm.com>
9633             David Sherwood  <david.sherwood@arm.com>
9635         * target.def (secondary_memory_needed): New hook.
9636         (secondary_reload): Refer to TARGET_SECONDARY_MEMORY_NEEDED
9637         instead of SECONDARY_MEMORY_NEEDED.
9638         (secondary_memory_needed_mode): Likewise.
9639         * hooks.h (hook_bool_mode_reg_class_t_reg_class_t_false): Declare.
9640         * hooks.c (hook_bool_mode_reg_class_t_reg_class_t_false): New function.
9641         * doc/tm.texi.in (SECONDARY_MEMORY_NEEDED): Replace with...
9642         (TARGET_SECONDARY_MEMORY_NEEDED): ...this.
9643         (SECONDARY_MEMORY_NEEDED_RTX): Update reference accordingly.
9644         * doc/tm.texi: Regenerate.
9645         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED): Delete.
9646         * config/alpha/alpha.c (alpha_secondary_memory_needed): New function.
9647         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
9648         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED): Delete.
9649         * config/i386/i386-protos.h (ix86_secondary_memory_needed): Delete.
9650         * config/i386/i386.c (inline_secondary_memory_needed): Put the
9651         mode argument first and change the reg_class arguments to reg_class_t.
9652         (ix86_secondary_memory_needed): Likewise.  Remove the strict parameter.
9653         Make static.  Update the call to inline_secondary_memory_needed.
9654         (ix86_register_move_cost): Update the call to
9655         inline_secondary_memory_needed.
9656         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
9657         * config/ia64/ia64.h (SECONDARY_MEMORY_NEEDED): Delete commented-out
9658         definition.
9659         * config/ia64/ia64.c (spill_xfmode_rfmode_operand): Refer to
9660         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
9661         in comment.
9662         * config/mips/mips.h (SECONDARY_MEMORY_NEEDED): Delete.
9663         * config/mips/mips-protos.h (mips_secondary_memory_needed): Delete.
9664         * config/mips/mips.c (mips_secondary_memory_needed): Make static
9665         and match hook interface.  Add comment from mips.h.
9666         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
9667         * config/mmix/mmix.md (truncdfsf2): Refer to
9668         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
9669         in comment.
9670         * config/pa/pa-64.h (SECONDARY_MEMORY_NEEDED): Rename to...
9671         (PA_SECONDARY_MEMORY_NEEDED): ...this, and put the mode argument first.
9672         * config/pa/pa.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
9673         (pa_secondary_memory_needed): New function.
9674         * config/pdp11/pdp11.h (SECONDARY_MEMORY_NEEDED): Delete.
9675         * config/pdp11/pdp11-protos.h (pdp11_secondary_memory_needed): Delete.
9676         * config/pdp11/pdp11.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
9677         (pdp11_secondary_memory_needed): Make static and match hook interface.
9678         * config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED): Delete.
9679         * config/powerpcspe/powerpcspe-protos.h
9680         (rs6000_secondary_memory_needed_ptr): Delete.
9681         * config/powerpcspe/powerpcspe.c (rs6000_secondary_memory_needed_ptr):
9682         Delete.
9683         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
9684         (rs6000_option_override_internal): Assign to
9685         targetm.secondary_memory_needed rather than
9686         rs6000_secondary_memory_needed_ptr.
9687         (rs6000_secondary_memory_needed): Match hook interface.
9688         (rs6000_debug_secondary_memory_needed): Likewise.
9689         * config/riscv/riscv.h (SECONDARY_MEMORY_NEEDED): Delete.
9690         * config/riscv/riscv.c (riscv_secondary_memory_needed): New function.
9691         (riscv_register_move_cost): Use it instead of SECONDARY_MEMORY_NEEDED.
9692         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
9693         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED): Delete.
9694         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_ptr):
9695         Delete.
9696         * config/rs6000/rs6000.c (rs6000_secondary_memory_needed_ptr): Delete.
9697         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
9698         (rs6000_option_override_internal): Assign to
9699         targetm.secondary_memory_needed rather than
9700         rs6000_secondary_memory_needed_ptr.
9701         (rs6000_secondary_memory_needed): Match hook interface.
9702         (rs6000_debug_secondary_memory_needed): Likewise.
9703         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED): Delete.
9704         * config/s390/s390.c (s390_secondary_memory_needed): New function.
9705         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
9706         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED): Delete.
9707         * config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
9708         (sparc_secondary_memory_needed): New function.
9709         * lra-constraints.c (check_and_process_move): Refer to
9710         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
9711         in comment.
9712         (curr_insn_transform): Likewise.
9713         (process_alt_operands): Use targetm.secondary_memory_needed
9714         instead of TARGET_SECONDARY_MEMORY_NEEDED.
9715         (check_secondary_memory_needed_p): Likewise.
9716         (choose_split_class): Likewise.
9717         * reload.c: Unconditionally include code that was previously
9718         conditional on SECONDARY_MEMORY_NEEDED.
9719         (push_secondary_reload): Use targetm.secondary_memory_needed
9720         instead of TARGET_SECONDARY_MEMORY_NEEDED.
9721         (push_reload): Likewise.
9722         * reload1.c: Unconditionally include code that was previously
9723         conditional on SECONDARY_MEMORY_NEEDED.
9724         (choose_reload_regs): Use targetm.secondary_memory_needed
9725         instead of TARGET_SECONDARY_MEMORY_NEEDED.
9726         (gen_reload): Likewise.
9727         * system.h (SECONDARY_MEMORY_NEEDED): Poison.
9729 2017-09-13  Richard Sandiford  <richard.sandiford@linaro.org>
9730             Alan Hayward  <alan.hayward@arm.com>
9731             David Sherwood  <david.sherwood@arm.com>
9733         * target.def (secondary_memory_needed_mode): New hook:
9734         * targhooks.c (default_secondary_memory_needed_mode): Declare.
9735         * targhooks.h (default_secondary_memory_needed_mode): New function.
9736         * doc/tm.texi.in (SECONDARY_MEMORY_NEEDED_MODE): Replace with...
9737         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): ...this.
9738         * doc/tm.texi: Regenerate.
9739         * lra-constraints.c (check_and_process_move): Use
9740         targetm.secondary_memory_needed_mode instead of
9741         TARGET_SECONDARY_MEMORY_NEEDED_MODE.
9742         (curr_insn_transform): Likewise.
9743         * reload.c (get_secondary_mem): Likewise.
9744         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
9745         * config/alpha/alpha.c (alpha_secondary_memory_needed_mode): New
9746         function.
9747         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
9748         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
9749         * config/i386/i386.c (ix86_secondary_memory_needed_mode): New function.
9750         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
9751         * config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED_MODE):
9752         Delete.
9753         * config/powerpcspe/powerpcspe-protos.h
9754         (rs6000_secondary_memory_needed_mode): Delete.
9755         * config/powerpcspe/powerpcspe.c
9756         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
9757         (rs6000_secondary_memory_needed_mode): Make static.
9758         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
9759         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_mode):
9760         Delete.
9761         * config/rs6000/rs6000.c (TARGET_SECONDARY_MEMORY_NEEDED_MODE):
9762         Redefine.
9763         (rs6000_secondary_memory_needed_mode): Make static.
9764         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
9765         * config/s390/s390.c (s390_secondary_memory_needed_mode): New function.
9766         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
9767         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
9768         * config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED_MODE):
9769         Redefine.
9770         (sparc_secondary_memory_needed_mode): New function.
9771         * system.h (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Poison.
9773 2017-09-13  Jackson Woodruff  <jackson.woodruff@arm.com>
9775         * config/aarch64/constraints.md (Umq): New constraint.
9776         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>):
9777         Change to use Umq.
9778         (mov<mode>): Update condition.
9780 2017-09-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9782         * gimple-ssa-store-merging.c (sort_by_bitpos): Compare store order
9783         when bitposition is the same.
9785 2017-09-13  Richard Biener  <rguenther@suse.de>
9787         * dwarf2out.c (output_die_symbol): Remove.
9788         (output_die): Do not output a DIEs symbol.
9790 2017-09-13  Richard Biener  <rguenther@suse.de>
9792         PR middle-end/82128
9793         * gimple-fold.c (gimple_fold_call): Update SSA name in-place to
9794         default-def to avoid breaking iterator update with the weird
9795         interaction with cgraph_update_edges_for_call_stmt_node.
9797 2017-09-13  Richard Biener  <rguenther@suse.de>
9799         * tree-cfg.c (verify_gimple_assign_binary): Add verification
9800         for WIDEN_SUM_EXPR, VEC_WIDEN_MULT_{HI,LO,EVEN,ODD}_EXPR,
9801         VEC_PACK_{TRUNC,SAT,FIX_TRUNC}_EXPR.
9802         (verify_gimple_assign_ternary): Add verification for DOT_PROD_EXPR.
9804 2017-09-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
9806         * config/aarch64/aarch64.c (aarch64_override_options_after_change_1):
9807         Disable pc relative literal load irrespective of
9808         TARGET_FIX_ERR_A53_84341 for default.
9810 2017-09-12  Eric Botcazou  <ebotcazou@adacore.com>
9812         * config/sparc/sparc.c (output_return): Output the source location of
9813         the insn in the delay slot, if any.
9814         (output_sibcall): Likewise.
9816 2017-09-12  H.J. Lu  <hongjiu.lu@intel.com>
9818         PR driver/81498
9819         * common.opt (-static-pie): New alias.
9820         (shared): Negate static-pie.
9821         (-no-pie): Update help text.
9822         (-pie): Likewise.
9823         (static-pie): New option.
9824         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Add
9825         -static-pie support.
9826         (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
9827         (LINK_EH_SPEC): Likewise.
9828         (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
9829         * config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Likewise.
9830         * config/i386/gnu-user64.h (GNU_USER_TARGET_LINK_SPEC): Likewise.
9831         * gcc.c (LINK_COMMAND_SPEC): Likewise.
9832         (init_gcc_specs): Likewise.
9833         (init_spec): Likewise.
9834         (display_help): Update help message for -pie.
9835         * doc/invoke.texi: Update -pie, -no-pie and -static.  Document
9836         -static-pie.
9838 2017-09-12  Wilco Dijkstra  <wdijkstr@arm.com>
9840         * config/aarch64/aarch64.md (movsi_aarch64): Remove all '*'.
9841         (movdi_aarch64): Likewise.
9842         (movti_aarch64): Likewise.
9844 2017-09-12 Simon Wright <simon@pushface.org>
9846         PR target/80204
9847         * config/darwin-driver.c (darwin_find_version_from_kernel): Eliminate
9848         calculation of the minor version, always output as 0.
9850 2017-09-12  Jakub Jelinek  <jakub@redhat.com>
9852         PR target/82112
9853         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
9854         ALTIVEC_BUILTIN_VEC_LD if arg1 has array type call default_conversion
9855         on it early, rather than manual conversion late.  For
9856         ALTIVEC_BUILTIN_VEC_ST if arg2 has array type call default_conversion
9857         instead of performing manual conversion.
9859 2017-09-12  Carl Love  <cel@us.ibm.com>
9861         * config/rs6000/altivec.md (vec_widen_umult_even_v4si,
9862         vec_widen_smult_even_v4si): Add define expands for vmuleuw, vmulesw,
9863         vmulouw, vmulosw.
9864         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
9865         VMULOSW): Add definitions.
9866         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
9867         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
9868         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
9869         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
9870         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
9872 2017-09-12  James Greenhalgh  <james.greenhalgh@arm.com>
9874         * config/aarch64/aarch64.md (movdi_aarch64): Set load/store
9875         types correctly.
9876         (movti_aarch64): Likewise.
9877         (movdf_aarch64): Likewise.
9878         (movtf_aarch64): Likewise.
9879         (load_pairdi): Likewise.
9880         (store_pairdi): Likewise.
9881         (load_pairdf): Likewise.
9882         (store_pairdf): Likewise.
9883         (loadwb_pair<GPI:mode>_<P:mode>): Likewise.
9884         (storewb_pair<GPI:mode>_<P:mode>): Likewise.
9885         (ldr_got_small_<mode>): Likewise.
9886         (ldr_got_small_28k_<mode>): Likewise.
9887         (ldr_got_tiny): Likewise.
9888         * config/aarch64/iterators.md (ldst_sz): New.
9889         (ldpstp_sz): Likewise.
9890         * config/aarch64/thunderx.md (thunderx_storepair): Split store_8
9891         to store_16.
9892         (thunderx_load): Split load_8 to load_16.
9893         * config/aarch64/thunderx2t99.md (thunderx2t99_loadpair): Split
9894         load_8 to load_16.
9895         (thunderx2t99_storepair_basic): Split store_8 to store_16.
9896         * config/arm/xgene1.md (xgene1_load_pair): Split load_8 to load_16.
9897         (xgene1_store_pair): Split store_8 to store_16.
9898         * config/aarch64/falkor.md (falkor_ld_3_ld): Split load_8 to load_16.
9899         (falkor_st_0_st_sd): Split store_8 to store_16.
9901 2017-09-12  James Greenhalgh  <james.greenhalgh@arm.com>
9903         * config/arm/types.md (type): Rename load1/2/3/4 to load_4/8/12/16
9904         and store1/2/3/4 to store_4/8/12/16.
9905         * config/aarch64/aarch64.md: Update for rename.
9906         * config/arm/arm.md: Likewise.: Likewise.
9907         * config/arm/arm.c: Likewise.
9908         * config/arm/thumb1.md: Likewise.
9909         * config/arm/thumb2.md: Likewise.
9910         * config/arm/vfp.md: Likewise.
9911         * config/arm/arm-generic.md: Likewise.
9912         * config/arm/arm1020e.md: Likewise.
9913         * config/arm/arm1026ejs.md: Likewise.
9914         * config/arm/arm1136jfs.md: Likewise.
9915         * config/arm/arm926ejs.md: Likewise.
9916         * config/arm/cortex-a15.md: Likewise.
9917         * config/arm/cortex-a17.md: Likewise.
9918         * config/arm/cortex-a5.md: Likewise.
9919         * config/arm/cortex-a53.md: Likewise.
9920         * config/arm/cortex-a57.md: Likewise.
9921         * config/arm/cortex-a7.md: Likewise.
9922         * config/arm/cortex-a8.md: Likewise.
9923         * config/arm/cortex-a9.md: Likewise.
9924         * config/arm/cortex-m4.md: Likewise.
9925         * config/arm/cortex-m7.md: Likewise.
9926         * config/arm/cortex-r4.md: Likewise.
9927         * config/arm/exynos-m1.md: Likewise.
9928         * config/arm/fa526.md: Likewise.
9929         * config/arm/fa606te.md: Likewise.
9930         * config/arm/fa626te.md: Likewise.
9931         * config/arm/fa726te.md: Likewise.
9932         * config/arm/fmp626.md: Likewise.
9933         * config/arm/iwmmxt.md: Likewise.
9934         * config/arm/ldmstm.md: Likewise.
9935         * config/arm/marvell-pj4.md: Likewise.
9936         * config/arm/xgene1.md: Likewise.
9937         * config/aarch64/thunderx.md: Likewise.
9938         * config/aarch64/thunderx2t99.md: Likewise.
9939         * config/aarch64/falkor.md: Likewise.
9941 2017-09-12  Martin Liska  <mliska@suse.cz>
9943         * attribs.c (private_lookup_attribute): New function.
9944         * attribs.h (private_lookup_attribute): Declared here.
9945         (lookup_attribute): Called from this place.
9947 2017-09-12  Richard Biener  <rguenther@suse.de>
9949         PR tree-optimization/82157
9950         * tree-ssa-pre.c (remove_dead_inserted_code): Do not remove
9951         stmts with side-effects.
9953 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
9954             Alan Hayward  <alan.hayward@arm.com>
9955             David Sherwood <david.sherwood@arm.com>
9957         * target.def (hard_regno_nregs): New hook.
9958         (class_max_nregs): Refer to it instead of HARD_REGNO_NREGS.
9959         * targhooks.h (default_hard_regno_nregs): Declare.
9960         * targhooks.c (default_hard_regno_nregs): New function.
9961         * doc/tm.texi.in (HARD_REGNO_NREGS): Replace with...
9962         (TARGET_HARD_REGNO_NREGS): ...this hook.
9963         (HARD_REGNO_NREGS_HAS_PADDING): Update accordingly.
9964         (CLASS_MAX_NREGS): Likewise.
9965         * doc/tm.texi: Regenerate.
9966         * reginfo.c (init_reg_modes_target): Use targetm.hard_regno_nregs
9967         instead of HARD_REGNO_NREGS.
9968         * rtl.h (REG_NREGS): Refer to TARGET_HARD_REGNO_NREGS rather than
9969         HARD_REGNO_NREGS in the comment.
9970         * config/aarch64/aarch64.h (HARD_REGNO_NREGS): Delete.
9971         * config/aarch64/aarch64-protos.h (aarch64_hard_regno_nregs): Delete.
9972         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs): Make static.
9973         Return an unsigned int.
9974         (TARGET_HARD_REGNO_NREGS): Redefine.
9975         * config/alpha/alpha.h (HARD_REGNO_NREGS): Delete.
9976         * config/arc/arc.h (HARD_REGNO_NREGS): Delete.
9977         * config/arc/arc.c (TARGET_HARD_REGNO_NREGS): Redefine.
9978         (arc_hard_regno_nregs): New function.
9979         * config/arm/arm.h (HARD_REGNO_NREGS): Delete.
9980         * config/arm/arm.c (TARGET_HARD_REGNO_NREGS): Redefine.
9981         (arm_hard_regno_nregs): New function.
9982         * config/avr/avr.h (HARD_REGNO_NREGS): Delete.
9983         * config/bfin/bfin.h (HARD_REGNO_NREGS): Delete.
9984         * config/bfin/bfin.c (bfin_hard_regno_nregs): New function.
9985         (TARGET_HARD_REGNO_NREGS): Redefine.
9986         * config/c6x/c6x.h (HARD_REGNO_NREGS): Delete.
9987         * config/cr16/cr16.h (LONG_REG_P): Use targetm.hard_regno_nregs.
9988         (HARD_REGNO_NREGS): Delete.
9989         * config/cr16/cr16.c (TARGET_HARD_REGNO_NREGS): Redefine.
9990         (cr16_hard_regno_nregs): New function.
9991         (cr16_memory_move_cost): Use it instead of HARD_REGNO_NREGS.
9992         * config/cris/cris.h (HARD_REGNO_NREGS): Delete.
9993         * config/cris/cris.c (TARGET_HARD_REGNO_NREGS): Redefine.
9994         (cris_hard_regno_nregs): New function.
9995         * config/epiphany/epiphany.h (HARD_REGNO_NREGS): Delete.
9996         * config/fr30/fr30.h (HARD_REGNO_NREGS): Delete.
9997         (CLASS_MAX_NREGS): Use targetm.hard_regno_nregs.
9998         * config/frv/frv.h (HARD_REGNO_NREGS): Delete.
9999         (CLASS_MAX_NREGS): Remove outdated copy of documentation.
10000         * config/frv/frv-protos.h (frv_hard_regno_nregs): Delete.
10001         * config/frv/frv.c (TARGET_HARD_REGNO_NREGS): Redefine.
10002         (frv_hard_regno_nregs): Make static.  Take and return an
10003         unsigned int.
10004         (frv_class_max_nregs): Remove outdated copy of documentation.
10005         * config/ft32/ft32.h (HARD_REGNO_NREGS): Delete.
10006         * config/h8300/h8300.h (HARD_REGNO_NREGS): Delete.
10007         * config/h8300/h8300-protos.h (h8300_hard_regno_nregs): Delete.
10008         * config/h8300/h8300.c (h8300_hard_regno_nregs): Delete.
10009         * config/i386/i386.h (HARD_REGNO_NREGS): Delete.
10010         * config/i386/i386.c (ix86_hard_regno_nregs): New function.
10011         (TARGET_HARD_REGNO_NREGS): Redefine.
10012         * config/ia64/ia64.h (HARD_REGNO_NREGS): Delete.
10013         (CLASS_MAX_NREGS): Update comment.
10014         * config/ia64/ia64.c (TARGET_HARD_REGNO_NREGS): Redefine.
10015         (ia64_hard_regno_nregs): New function.
10016         * config/iq2000/iq2000.h (HARD_REGNO_NREGS): Delete.
10017         * config/lm32/lm32.h (HARD_REGNO_NREGS): Delete.
10018         * config/m32c/m32c.h (HARD_REGNO_NREGS): Delete.
10019         * config/m32c/m32c-protos.h (m32c_hard_regno_nregs): Delete.
10020         * config/m32c/m32c.c (m32c_hard_regno_nregs_1): Take and return
10021         an unsigned int.
10022         (m32c_hard_regno_nregs): Likewise.  Make static.
10023         (TARGET_HARD_REGNO_NREGS): Redefine.
10024         * config/m32r/m32r.h (HARD_REGNO_NREGS): Delete.
10025         * config/m68k/m68k.h (HARD_REGNO_NREGS): Delete.
10026         * config/m68k/m68k.c (TARGET_HARD_REGNO_NREGS): Redefine.
10027         (m68k_hard_regno_nregs): New function.
10028         * config/mcore/mcore.h (HARD_REGNO_NREGS): Delete.
10029         * config/microblaze/microblaze.h (HARD_REGNO_NREGS): Delete.
10030         * config/mips/mips.h (HARD_REGNO_NREGS): Delete.
10031         * config/mips/mips-protos.h (mips_hard_regno_nregs): Delete.
10032         * config/mips/mips.c (mips_hard_regno_nregs): Make static.
10033         Take and return an unsigned int.
10034         (TARGET_HARD_REGNO_NREGS): Redefine.
10035         * config/mmix/mmix.h (HARD_REGNO_NREGS): Delete.
10036         (CLASS_MAX_NREGS): Use targetm.hard_regno_nregs.
10037         * config/mn10300/mn10300.h (HARD_REGNO_NREGS): Delete.
10038         * config/moxie/moxie.h (HARD_REGNO_NREGS): Delete.
10039         * config/msp430/msp430.h (HARD_REGNO_NREGS): Delete.
10040         * config/msp430/msp430-protos.h (msp430_hard_regno_nregs): Delete.
10041         * config/msp430/msp430.c (TARGET_HARD_REGNO_NREGS): Redefine.
10042         (msp430_hard_regno_nregs): Make static.  Take and return an
10043         unsigned int.
10044         * config/nds32/nds32.h (HARD_REGNO_NREGS): Delete.
10045         * config/nds32/nds32-protos.h (nds32_hard_regno_nregs): Delete.
10046         * config/nds32/nds32.c (nds32_hard_regno_nregs): Delete.
10047         (nds32_hard_regno_mode_ok): Use targetm.hard_regno_nregs.
10048         * config/nios2/nios2.h (HARD_REGNO_NREGS): Delete.
10049         * config/nvptx/nvptx.h (HARD_REGNO_NREGS): Delete.
10050         * config/nvptx/nvptx.c (nvptx_hard_regno_nregs): New function.
10051         (TARGET_HARD_REGNO_NREGS): Redefine.
10052         * config/pa/pa32-regs.h (HARD_REGNO_NREGS): Rename to...
10053         (PA_HARD_REGNO_NREGS): ...this.
10054         * config/pa/pa64-regs.h (HARD_REGNO_NREGS): Rename to...
10055         (PA_HARD_REGNO_NREGS): ...this.
10056         * config/pa/pa.c (TARGET_HARD_REGNO_NREGS): Redefine.
10057         (pa_hard_regno_nregs): New function.
10058         * config/pdp11/pdp11.h (HARD_REGNO_NREGS): Delete.
10059         * config/pdp11/pdp11.c (TARGET_HARD_REGNO_NREGS): Redefine.
10060         (pdp11_hard_regno_nregs): New function.
10061         * config/powerpcspe/powerpcspe.h (HARD_REGNO_NREGS): Delete.
10062         * config/powerpcspe/powerpcspe.c (TARGET_HARD_REGNO_NREGS): Redefine.
10063         (rs6000_hard_regno_nregs_hook): New function.
10064         * config/riscv/riscv.h (HARD_REGNO_NREGS): Delete.
10065         * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): Delete.
10066         * config/riscv/riscv.c (riscv_hard_regno_nregs): Make static.
10067         Take and return an unsigned int.  Move earlier in file.
10068         (TARGET_HARD_REGNO_NREGS): Redefine.
10069         * config/rl78/rl78.h (HARD_REGNO_NREGS): Delete.
10070         * config/rl78/rl78-protos.h (rl78_hard_regno_nregs): Delete.
10071         * config/rl78/rl78.c (TARGET_HARD_REGNO_NREGS): Reefine.
10072         (rl78_hard_regno_nregs): Make static.  Take and return an
10073         unsigned int.
10074         * config/rs6000/rs6000.h (HARD_REGNO_NREGS): Delete.
10075         * config/rs6000/rs6000.c (TARGET_HARD_REGNO_NREGS): Redefine.
10076         (rs6000_hard_regno_nregs_hook): New function.
10077         * config/rx/rx.h (HARD_REGNO_NREGS): Delete.
10078         * config/rx/rx.c (rx_hard_regno_nregs): New function.
10079         (TARGET_HARD_REGNO_NREGS): Redefine.
10080         * config/s390/s390.h (HARD_REGNO_NREGS): Delete.
10081         * config/s390/s390.c (REGNO_PAIR_OK): Use s390_hard_regno_nregs
10082         instead of HARD_REGNO_NREGS.
10083         (s390_hard_regno_nregs): New function.
10084         (s390_hard_regno_mode_ok): Add comment from s390.h.
10085         (TARGET_HARD_REGNO_NREGS): Redefine.
10086         * config/sh/sh.h (HARD_REGNO_NREGS): Delete.
10087         * config/sh/sh.c (TARGET_HARD_REGNO_NREGS): Redefine.
10088         (sh_hard_regno_nregs): New function.
10089         (sh_pass_in_reg_p): Use it.
10090         * config/sparc/sparc.h (HARD_REGNO_NREGS): Delete.
10091         * config/sparc/sparc.c (TARGET_HARD_REGNO_NREGS): Redefine.
10092         (sparc_hard_regno_nregs): New function.
10093         * config/spu/spu.h (HARD_REGNO_NREGS): Delete.
10094         * config/spu/spu.c (spu_hard_regno_nregs): New function.
10095         (spu_function_arg_advance): Use it, supplying a valid register number.
10096         (TARGET_HARD_REGNO_NREGS): Redefine.
10097         * config/stormy16/stormy16.h (HARD_REGNO_NREGS): Delete.
10098         * config/tilegx/tilegx.h (HARD_REGNO_NREGS): Delete.
10099         * config/tilepro/tilepro.h (HARD_REGNO_NREGS): Delete.
10100         * config/v850/v850.h (HARD_REGNO_NREGS): Delete.
10101         * config/vax/vax.h (HARD_REGNO_NREGS): Delete.
10102         * config/visium/visium.h (HARD_REGNO_NREGS): Delete.
10103         (CLASS_MAX_NREGS): Remove copy of old documentation.
10104         * config/visium/visium.c (TARGET_HARD_REGNO_NREGS): Redefine.
10105         (visium_hard_regno_nregs): New function.
10106         (visium_hard_regno_mode_ok): Use it instead of HARD_REGNO_NREGS.
10107         * config/xtensa/xtensa.h (HARD_REGNO_NREGS): Delete.
10108         * config/xtensa/xtensa.c (TARGET_HARD_REGNO_NREGS): Redefine.
10109         xtensa_hard_regno_nregs): New function.
10110         * system.h (HARD_REGNO_NREGS): Poison.
10112 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
10114         * config/arm/arm.h (THUMB_SECONDARY_INPUT_RELOAD_CLASS): Use
10115         hard_regno_nregs instead of HARD_REGNO_NREGS.
10116         (THUMB_SECONDARY_OUTPUT_RELOAD_CLASS): Likewise.
10117         * config/c6x/c6x.c (c6x_expand_prologue): Likewise.
10118         (c6x_expand_epilogue): Likewise.
10119         * config/frv/frv.c (frv_alloc_temp_reg): Likewise.
10120         (frv_read_iacc_argument): Likewise.
10121         * config/sh/sh.c: Include regs.h.
10122         (sh_print_operand): Use hard_regno_nregs instead of HARD_REGNO_NREGS.
10123         (regs_used): Likewise.
10124         (output_stack_adjust): Likewise.
10125         * config/xtensa/xtensa.c (xtensa_copy_incoming_a7): Likewise.
10126         * expmed.c: Include regs.h.
10127         (store_bit_field_1): Use hard_regno_nregs instead of HARD_REGNO_NREGS.
10128         * ree.c: Include regs.h.
10129         (combine_reaching_defs): Use hard_regno_nregs instead of
10130         HARD_REGNO_NREGS.
10131         (add_removable_extension): Likewise.
10133 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
10135         * regs.h (hard_regno_nregs): Turn into a function.
10136         (end_hard_regno): Update accordingly.
10137         * caller-save.c (setup_save_areas): Likewise.
10138         (save_call_clobbered_regs): Likewise.
10139         (replace_reg_with_saved_mem): Likewise.
10140         (insert_restore): Likewise.
10141         (insert_save): Likewise.
10142         * combine.c (can_change_dest_mode): Likewise.
10143         (move_deaths): Likewise.
10144         (distribute_notes): Likewise.
10145         * config/mips/mips.c (mips_hard_regno_call_part_clobbered): Likewise.
10146         * config/powerpcspe/powerpcspe.c (rs6000_cannot_change_mode_class)
10147         (rs6000_split_multireg_move): Likewise.
10148         (rs6000_register_move_cost): Likewise.
10149         (rs6000_memory_move_cost): Likewise.
10150         * config/rs6000/rs6000.c (rs6000_cannot_change_mode_class): Likewise.
10151         (rs6000_split_multireg_move): Likewise.
10152         (rs6000_register_move_cost): Likewise.
10153         (rs6000_memory_move_cost): Likewise.
10154         * cselib.c (cselib_reset_table): Likewise.
10155         (cselib_lookup_1): Likewise.
10156         * emit-rtl.c (set_mode_and_regno): Likewise.
10157         * function.c (aggregate_value_p): Likewise.
10158         * ira-color.c (setup_profitable_hard_regs): Likewise.
10159         (check_hard_reg_p): Likewise.
10160         (calculate_saved_nregs): Likewise.
10161         (assign_hard_reg): Likewise.
10162         (improve_allocation): Likewise.
10163         (calculate_spill_cost): Likewise.
10164         * ira-emit.c (modify_move_list): Likewise.
10165         * ira-int.h (ira_hard_reg_set_intersection_p): Likewise.
10166         (ira_hard_reg_in_set_p): Likewise.
10167         * ira.c (setup_reg_mode_hard_regset): Likewise.
10168         (clarify_prohibited_class_mode_regs): Likewise.
10169         (check_allocation): Likewise.
10170         * lra-assigns.c (find_hard_regno_for_1): Likewise.
10171         (lra_setup_reg_renumber): Likewise.
10172         (setup_try_hard_regno_pseudos): Likewise.
10173         (spill_for): Likewise.
10174         (assign_hard_regno): Likewise.
10175         (setup_live_pseudos_and_spill_after_risky_transforms): Likewise.
10176         * lra-constraints.c (in_class_p): Likewise.
10177         (lra_constraint_offset): Likewise.
10178         (simplify_operand_subreg): Likewise.
10179         (lra_constraints): Likewise.
10180         (split_reg): Likewise.
10181         (split_if_necessary): Likewise.
10182         (invariant_p): Likewise.
10183         (inherit_in_ebb): Likewise.
10184         * lra-lives.c (process_bb_lives): Likewise.
10185         * lra-remat.c (reg_overlap_for_remat_p): Likewise.
10186         (get_hard_regs): Likewise.
10187         (do_remat): Likewise.
10188         * lra-spills.c (assign_spill_hard_regs): Likewise.
10189         * mode-switching.c (create_pre_exit): Likewise.
10190         * postreload.c (reload_combine_recognize_pattern): Likewise.
10191         * recog.c (peep2_find_free_register): Likewise.
10192         * regcprop.c (kill_value_regno): Likewise.
10193         (set_value_regno): Likewise.
10194         (copy_value): Likewise.
10195         (maybe_mode_change): Likewise.
10196         (find_oldest_value_reg): Likewise.
10197         (copyprop_hardreg_forward_1): Likewise.
10198         * regrename.c (check_new_reg_p): Likewise.
10199         (regrename_do_replace): Likewise.
10200         * reload.c (push_reload): Likewise.
10201         (combine_reloads): Likewise.
10202         (find_dummy_reload): Likewise.
10203         (operands_match_p): Likewise.
10204         (find_reloads): Likewise.
10205         (find_equiv_reg): Likewise.
10206         (reload_adjust_reg_for_mode): Likewise.
10207         * reload1.c (count_pseudo): Likewise.
10208         (count_spilled_pseudo): Likewise.
10209         (find_reg): Likewise.
10210         (clear_reload_reg_in_use): Likewise.
10211         (free_for_value_p): Likewise.
10212         (allocate_reload_reg): Likewise.
10213         (choose_reload_regs): Likewise.
10214         (reload_adjust_reg_for_temp): Likewise.
10215         (emit_reload_insns): Likewise.
10216         (delete_output_reload): Likewise.
10217         * rtlanal.c (subreg_get_info): Likewise.
10218         * sched-deps.c (sched_analyze_reg): Likewise.
10219         * sel-sched.c (init_regs_for_mode): Likewise.
10220         (mark_unavailable_hard_regs): Likewise.
10221         (choose_best_reg_1): Likewise.
10222         (verify_target_availability): Likewise.
10223         * valtrack.c (dead_debug_insert_temp): Likewise.
10224         * var-tracking.c (track_loc_p): Likewise.
10225         (emit_note_insn_var_location): Likewise.
10226         * varasm.c (make_decl_rtl): Likewise.
10227         * reginfo.c (choose_hard_reg_mode): Likewise.
10228         (init_reg_modes_target): Refer directly to
10229         this_target_regs->x_hard_regno_nregs.
10231 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
10233         * ira-costs.c (record_operand_costs): Use in_hard_reg_set_p
10234         instead of hard_regno_nregs.
10236 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
10238         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Use
10239         end_hard_regno instead of hard_regno_nregs.
10240         * config/s390/s390.c (s390_reg_clobbered_rtx): Likewise.
10241         * config/sparc/sparc.h (ASM_DECLARE_REGISTER_GLOBAL): Likewise.
10242         * config/visium/visium.c (visium_hard_regno_mode_ok): Likewise.
10243         * ira-color.c (improve_allocation): Likewise.
10244         * lra-assigns.c (find_hard_regno_for_1): Likewise.
10245         * lra-lives.c (mark_regno_live): Likewise.
10246         (mark_regno_dead): Likewise.
10247         * lra-remat.c (operand_to_remat): Likewise.
10248         * lra.c (collect_non_operand_hard_regs): Likewise.
10249         * postreload.c (reload_combine_note_store): Likewise.
10250         (move2add_valid_value_p): Likewise.
10251         * reload.c (regno_clobbered_p): Likewise.
10253 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
10255         * config/frv/frv.c (FOR_EACH_REGNO): Use END_REGNO instead of
10256         hard_regno_nregs.
10257         * config/v850/v850.c (v850_reorg): Likewise.
10258         * reload.c (refers_to_regno_for_reload_p): Likewise.
10259         (find_equiv_reg): Likewise.
10260         * reload1.c (reload_reg_reaches_end_p): Likewise.
10262 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
10264         * caller-save.c (add_used_regs): Use REG_NREGS instead of
10265         hard_regno_nregs.
10266         * config/aarch64/aarch64.c (aarch64_split_combinev16qi): Likewise.
10267         * config/arm/arm.c (output_move_neon): Likewise.
10268         (arm_attr_length_move_neon): Likewise.
10269         (neon_split_vcombine): Likewise.
10270         * config/c6x/c6x.c (c6x_mark_reg_read): Likewise.
10271         (c6x_mark_reg_written): Likewise.
10272         (c6x_dwarf_register_span): Likewise.
10273         * config/i386/i386.c (ix86_save_reg): Likewise.
10274         * config/ia64/ia64.c (mark_reg_gr_used_mask): Likewise.
10275         (rws_access_reg): Likewise.
10276         * config/s390/s390.c (s390_call_saved_register_used): Likewise.
10277         * mode-switching.c (create_pre_exit): Likewise.
10278         * ree.c (combine_reaching_defs): Likewise.
10279         (add_removable_extension): Likewise.
10280         * regcprop.c (find_oldest_value_reg): Likewise.
10281         (copyprop_hardreg_forward_1): Likewise.
10282         * reload.c (reload_inner_reg_of_subreg): Likewise.
10283         (push_reload): Likewise.
10284         (combine_reloads): Likewise.
10285         (find_dummy_reload): Likewise.
10286         (reload_adjust_reg_for_mode): Likewise.
10287         * reload1.c (find_reload_regs): Likewise.
10288         (forget_old_reloads_1): Likewise.
10289         (reload_reg_free_for_value_p): Likewise.
10290         (reload_adjust_reg_for_temp): Likewise.
10291         (emit_reload_insns): Likewise.
10292         (delete_output_reload): Likewise.
10293         * sel-sched.c (choose_best_reg_1): Likewise.
10294         (choose_best_pseudo_reg): Likewise.
10296 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
10297             Alan Hayward  <alan.hayward@arm.com>
10298             David Sherwood <david.sherwood@arm.com>
10300         * defaults.h (SLOW_UNALIGNED_ACCESS): Delete.
10301         * target.def (slow_unaligned_access): New hook.
10302         * targhooks.h (default_slow_unaligned_access): Declare.
10303         * targhooks.c (default_slow_unaligned_access): New function.
10304         * doc/tm.texi.in (SLOW_UNALIGNED_ACCESS): Replace with...
10305         (TARGET_SLOW_UNALIGNED_ACCESS): ...this.
10306         * doc/tm.texi: Regenerate.
10307         * config/alpha/alpha.h (SLOW_UNALIGNED_ACCESS): Delete.
10308         * config/arm/arm.h (SLOW_UNALIGNED_ACCESS): Delete.
10309         * config/i386/i386.h (SLOW_UNALIGNED_ACCESS): Delete commented-out
10310         definition.
10311         * config/powerpcspe/powerpcspe.h (SLOW_UNALIGNED_ACCESS): Delete.
10312         * config/powerpcspe/powerpcspe.c (TARGET_SLOW_UNALIGNED_ACCESS):
10313         Redefine.
10314         (rs6000_slow_unaligned_access): New function.
10315         (rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS.
10316         (expand_block_compare): Likewise.
10317         (expand_strn_compare): Likewise.
10318         (rs6000_rtx_costs): Likewise.
10319         * config/riscv/riscv.h (SLOW_UNALIGNED_ACCESS): Delete.
10320         (riscv_slow_unaligned_access): Likewise.
10321         * config/riscv/riscv.c (riscv_slow_unaligned_access): Rename to...
10322         (riscv_slow_unaligned_access_p): ...this and make static.
10323         (riscv_option_override): Update accordingly.
10324         (riscv_slow_unaligned_access): New function.
10325         (TARGET_SLOW_UNALIGNED_ACCESS): Redefine.
10326         * config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Delete.
10327         * config/rs6000/rs6000.c (TARGET_SLOW_UNALIGNED_ACCESS): Redefine.
10328         (rs6000_slow_unaligned_access): New function.
10329         (rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS.
10330         (rs6000_rtx_costs): Likewise.
10331         * config/rs6000/rs6000-string.c (expand_block_compare)
10332         (expand_strn_compare): Use targetm.slow_unaligned_access instead
10333         of SLOW_UNALIGNED_ACCESS.
10334         * config/tilegx/tilegx.h (SLOW_UNALIGNED_ACCESS): Delete.
10335         * config/tilepro/tilepro.h (SLOW_UNALIGNED_ACCESS): Delete.
10336         * calls.c (expand_call): Use targetm.slow_unaligned_access instead
10337         of SLOW_UNALIGNED_ACCESS.
10338         * expmed.c (simple_mem_bitfield_p): Likewise.
10339         * expr.c (alignment_for_piecewise_move): Likewise.
10340         (emit_group_load_1): Likewise.
10341         (emit_group_store): Likewise.
10342         (copy_blkmode_from_reg): Likewise.
10343         (emit_push_insn): Likewise.
10344         (expand_assignment): Likewise.
10345         (store_field): Likewise.
10346         (expand_expr_real_1): Likewise.
10347         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
10348         * lra-constraints.c (simplify_operand_subreg): Likewise.
10349         * stor-layout.c (bit_field_mode_iterator::next_mode): Likewise.
10350         * gimple-ssa-store-merging.c: Likewise in block comment at start
10351         of file.
10352         * tree-ssa-strlen.c: Include target.h.
10353         (handle_builtin_memcmp): Use targetm.slow_unaligned_access instead
10354         of SLOW_UNALIGNED_ACCESS.
10355         * system.h (SLOW_UNALIGNED_ACCESS): Poison.
10357 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
10359         PR rtl-optimization/82185
10360         * expmed.c (emit_store_flag_int): Only test tem if it has been
10361         initialized.
10363 2017-09-12  Richard Biener  <rguenther@suse.de>
10365         PR middle-end/82149
10366         * match.pd ((FTYPE) N CMP CST): Fix typo.
10368 2017-09-12  Simon Atanasyan  <simon.atanasyan@imgtec.com>
10370         * config/mips/mips.c (mips_attribute_table): Add 'short_call'
10371         attribute.
10372         (mips_near_type_p): Add 'short_call' attribute as a synonym
10373         for 'near'.
10374         * doc/extend.texi (short_call): Document new function attribute.
10376 2017-09-12  Jakub Jelinek  <jakub@redhat.com>
10378         PR target/82112
10379         * c-common.c (sync_resolve_size): Instead of c_dialect_cxx ()
10380         assertion check that in the condition.
10381         (get_atomic_generic_size): Likewise.  Before testing if parameter
10382         has pointer type, if it has array type, call for C++
10383         default_conversion to perform array-to-pointer conversion.
10385 2017-09-12  Richard Biener  <rguenther@suse.de>
10387         * tree-vect-generic.c (expand_vector_operations_1): Do nothing
10388         for operations we cannot scalarize.
10390 2017-09-12  Aldy Hernandez  <aldyh@redhat.com>
10392         * tree-ssa-threadbackward.c (fsm_find_thread_path): Make GC
10393         vectors heap vectors.  Clean up comments.
10394         Make visited_bbs a reference.
10395         (profitable_jump_thread_path): Make GC
10396         vectors heap vectors.  Clean up comments.
10397         Misc cleanups.
10398         (convert_and_register_jump_thread_path): Make GC vectors heap
10399         vectors.
10400         (check_subpath_and_update_thread_path): Same.  Clean up comments.
10401         Make visited_bbs a reference.
10402         (handle_phi): Abstract common code to to
10403         register_jump_thread_path_if_profitable.
10404         Rename VAR_BB to DEF_BB.
10405         Update comments.
10406         Make GC vectors heap vectors.
10407         Make visited_bbs a reference.
10408         (handle_assignment): Same.
10409         (register_jump_thread_path_if_profitable): New.
10410         (fsm_find_control_statement_thread_paths): Rename VAR_BB to
10411         DEF_BB.
10412         Make GC vectors heap vectors.  Clean up comments.
10413         Make visited_bbs a reference.
10414         (find_jump_threads_backwards): Make visited_bbs live in the stack.
10415         * tree-ssa-threadupdate.c (delete_jump_thread_path): Fix typo in
10416         comment.
10418 2017-09-11  Max Filippov  <jcmvbkbc@gmail.com>
10420         PR target/82181
10421         * config/xtensa/xtensa.c (xtensa_mem_offset): Check that both
10422         words of E_DImode object are reachable by xtensa_uimm8x4 access.
10424 2017-09-11  Vidya Praveen  <vidyapraveen@arm.com>
10426         Revert r251800 and r251799.
10428 2017-09-11  Martin Jambor  <mjambor@suse.cz>
10430         PR hsa/82119
10431         * hsa-gen.c (gen_hsa_phi_from_gimple_phi): Process ADDR_EXPRs in
10432         arguments in advance.
10433         * hsa-regalloc.c (naive_process_phi): New parameter predecessors,
10434         use it to find predecessor edges.
10435         (naive_outof_ssa): Collect vector of predecessors.
10437 2017-09-08  Jason Merrill  <jason@redhat.com>
10439         PR c++/70029 - ICE with ref-qualifier and -flto
10440         * langhooks.h (struct lang_hooks_for_types): Add
10441         copy_lang_qualifiers.
10442         * attribs.c (build_type_attribute_qual_variant): Use it.
10443         * langhooks-def.h (LANG_HOOKS_COPY_LANG_QUALIFIERS): Default to
10444         NULL.
10445         (LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it.
10446         * tree.c (verify_type): Re-enable TYPE_CANONICAL main variant check.
10448 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
10450         PR target/81988
10451         * config/sparc/sparc.md (mulsi3): Rename into *mulsi3_sp32.
10452         (*mulsi3_sp64): New instruction.
10453         (mulsi3): New expander.
10455 2017-09-08  Uros Bizjak  <ubizjak@gmail.com>
10457         * config/alpha/alpha.c (alpha_print_operand) <case 'S'>: Remove.
10459 2017-09-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10461         * sancov.c: Include memmodel.h.
10463 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
10465         PR target/80897
10466         * config/sparc/sparc.c (sparc_emit_set_symbolic_const64): Deal with too
10467         large offsets.
10469 2017-09-07  Carl Love  <cel@us.ibm.com>
10471         * config/rs6000/vsx.md (define_insn "*stxvl"): Add missing argument to
10472         the sldi instruction.
10474 2017-09-07  David Edelsohn  <dje.gcc@gmail.com>
10476         * sancov.c: Include tm_p.h.
10478 2017-09-07  Jakub Jelinek  <jakub@redhat.com>
10480         PR target/81979
10481         * output.h (switch_to_other_text_partition): New declaration.
10482         * varasm.c (switch_to_other_text_partition): New function.
10483         * config/rs6000/rs6000.c (uses_TOC): Return 2 if
10484         NOTE_INSN_SWITCH_TEXT_SECTIONS is seen before finding load_toc_* insn.
10485         (rs6000_elf_declare_function_name): If uses_TOC returned 2, switch
10486         to the other text partition before emitting LCL label and switch back
10487         after emitting the word after it.
10489 2017-09-07  Richard Biener  <rguenther@suse.de>
10491         * passes.def (pass_split_crit_edges): Remove instance before PRE.
10492         * tree-ssa-pre.c (pass_pre::execute): Instead manually split
10493         critical edges here, after loop init.
10494         (pass_data_pre): Remove PROP_no_crit_edges flags.
10495         * tree-ssa-sccvn.c (vn_reference_lookup_3): Use vn_valueize
10496         for valueization of call args to avoid leaking VN_TOP.
10497         (visit_use): Assert we do not visit default defs.
10498         (init_scc_vn): Use build_decl for VN_TOP to make name nicer.
10499         Use error_mark_node to more easily detect leaking VN_TOP.
10500         All default-defs are varying, not VN_TOP.  Mark them visited.
10501         (run_scc_vn): Make code match comment.
10503 2017-09-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
10505         * config/rs6000/rs6000-cpus.def (OTHER_VSX_VECTOR_MASKS): Delete
10506         OPTION_MASK_FLOAT128_KEYWORD.
10507         (POWERPC_MASKS): Likewise.
10508         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Delete
10509         support for the -mfloat128-type option, and make -mfloat128
10510         default on PowerPC Linux systems.  Define or undefine
10511         __FLOAT128__ and  __FLOAT128_HARDWARE__ for the current options.
10512         Define __float128 to be __ieee128 if IEEE 128-bit support is
10513         enabled, or undefine it.
10514         (rs6000_cpu_cpp_builtins): Delete defining __FLOAT128__ here.
10515         Delete defining __FLOAT128_TYPE__.
10516         * config/rs6000/rs6000.opt (x_TARGET_FLOAT128_TYPE): Delete the
10517         -mfloat128-type option and make -mfloat128 default on PowerPC
10518         Linux systems.
10519         (TARGET_FLOAT128_TYPE): Likewise.
10520         (-mfloat128-type): Likewise.
10521         * config/rs6000/rs6000.c (rs6000_option_override_internal):
10522         Delete the -mfloat128-type option and make -mfloat128 default on
10523         PowerPC Linux systems.  Always use __ieee128 to be the keyword for
10524         the IEEE 128-bit type, and map __float128 to __ieee128 if IEEE
10525         128-bit floating point is enabled.  Change tests from using
10526         -mfloat128-type to -mfloat128.
10527         (rs6000_mangle_type): Use the correct mangling for the __float128
10528         type even if normal long double is restricted to 64-bits.
10529         (floatn_mode): Enable the _Float128 type by default on VSX Linux
10530         systems.
10531         * config/rs6000/rs6000.h (MASK_FLOAT128_TYPE): Delete.
10532         (MASK_FLOAT128_KEYWORD): Define new shortcut macro.
10533         (RS6000BTM_FLOAT128): Define in terms of -mfloat128, not
10534         -mfloat128-type.
10535         * doc/invoke.texi (RS/6000 and PowerPC Options): Update
10536         documentation for -mfloat128.
10538 2017-09-06  Olivier Hainque  <hainque@adacore.com>
10540         * config.gcc (powerpc-wrs-vxworksspe): Now match as vxworks*spe.
10542 2017-09-06  Wish Wu  <wishwu007@gmail.com>
10543             Jakub Jelinek  <jakub@redhat.com>
10545         * asan.c (initialize_sanitizer_builtins): Add
10546         BT_FN_VOID_UINT8_UINT8, BT_FN_VOID_UINT16_UINT16,
10547         BT_FN_VOID_UINT32_UINT32, BT_FN_VOID_UINT64_UINT64,
10548         BT_FN_VOID_FLOAT_FLOAT, BT_FN_VOID_DOUBLE_DOUBLE and
10549         BT_FN_VOID_UINT64_PTR variables.
10550         * builtin-types.def (BT_FN_VOID_UINT8_UINT8): New fn type.
10551         (BT_FN_VOID_UINT16_UINT16): Likewise.
10552         (BT_FN_VOID_UINT32_UINT32): Likewise.
10553         (BT_FN_VOID_FLOAT_FLOAT): Likewise.
10554         (BT_FN_VOID_DOUBLE_DOUBLE): Likewise.
10555         (BT_FN_VOID_UINT64_PTR): Likewise.
10556         * common.opt (flag_sanitize_coverage): New variable.
10557         (fsanitize-coverage=trace-pc): Remove.
10558         (fsanitize-coverage=): Add.
10559         * flag-types.h (enum sanitize_coverage_code): New enum.
10560         * fold-const.c (fold_range_test): Disable non-short-circuit
10561         optimization if flag_sanitize_coverage.
10562         (fold_truth_andor): Likewise.
10563         * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
10564         * opts.c (COVERAGE_SANITIZER_OPT): Define.
10565         (coverage_sanitizer_opts): New array.
10566         (get_closest_sanitizer_option): Add OPTS argument, handle also
10567         OPT_fsanitize_coverage_.
10568         (parse_sanitizer_options): Adjusted to also handle
10569         OPT_fsanitize_coverage_.
10570         (common_handle_option): Add OPT_fsanitize_coverage_.
10571         * sancov.c (instrument_comparison, instrument_switch): New function.
10572         (sancov_pass): Add trace-cmp support.
10573         * sanitizer.def (BUILT_IN_SANITIZER_COV_TRACE_CMP1,
10574         BUILT_IN_SANITIZER_COV_TRACE_CMP2, BUILT_IN_SANITIZER_COV_TRACE_CMP4,
10575         BUILT_IN_SANITIZER_COV_TRACE_CMP8,
10576         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP1,
10577         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP2,
10578         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP4,
10579         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP8,
10580         BUILT_IN_SANITIZER_COV_TRACE_CMPF, BUILT_IN_SANITIZER_COV_TRACE_CMPD,
10581         BUILT_IN_SANITIZER_COV_TRACE_SWITCH): New builtins.
10582         * doc/invoke.texi: Document -fsanitize-coverage=trace-cmp.
10584 2017-09-06  Richard Earnshaw  <rearnsha@arm.com>
10586         * config/arm/parsecpu.awk (fatal): Note that we've encountered an
10587         error.  Only quit immediately if parsing is complete.
10588         (BEGIN): Initialize fatal_err and parse_done.
10589         (begin fpu, end fpu): Check number of arguments.
10590         (begin arch, end arch): Likewise.
10591         (begin cpu, end cpu): Likewise.
10592         (cname, tune for, tune flags, architecture, fpu, option): Likewise.
10593         (optalias): Likewise.
10595 2017-09-06  Richard Earnshaw  <rearnsha@arm.com>
10597         * config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.
10598         * config/arm/arm-isa.h: Delete.  Move definitions to ...
10599         * arm-cpus.in: ... here.  Use new feature and fgroup values.
10600         * config/arm/arm.c (arm_option_override): Use lower case for feature
10601         bit names.
10602         * config/arm/arm.h (TARGET_HARD_FLOAT): Likewise.
10603         (TARGET_VFP3, TARGET_VFP5, TARGET_FMA): Likewise.
10604         * config/arm/parsecpu.awk (END): Add new command 'isa'.
10605         (isa_pfx): Delete.
10606         (print_isa_bits_for): New function.
10607         (gen_isa): New function.
10608         (gen_comm_data): Use print_isa_bits_for.
10609         (define feature): New keyword.
10610         (define fgroup): New keyword.
10611         * config/arm/t-arm (OPTIONS_H_EXTRA): Add arm-isa.h
10612         (arm-isa.h): Add rule to generate file.
10613         * common/config/arm/arm-common.c: (arm_canon_arch_option): Use lower
10614         case for feature bit names.
10616 2017-09-06  Richard Biener  <rguenther@suse.de>
10618         * tree-ssa-pre.c (NECESSARY): Remove.
10619         (create_expression_by_pieces): Do not touch pass-local flags.
10620         (insert_into_preds_of_block): Likewise.
10621         (do_pre_regular_insertion): Likewise.
10622         (eliminate_insert): Likewise.
10623         (eliminate_dom_walker::before_dom_children): Likewise.
10624         (fini_eliminate): Do not look at inserted_exprs.
10625         (mark_operand_necessary): Remove.
10626         (remove_dead_inserted_code): Replace with simple work-list
10627         algorithm based on inserted_exprs and SSA uses.
10628         (pass_pre::execute): Re-order fini_eliminate and
10629         remove_dead_inserted_code.
10631 2017-09-06  Olivier Hainque  <hainque@adacore.com>
10633         * config/powerpcspe/vxworks.h (VXCPU_FOR_8548): Correct definition
10634         for VxWorks 7.  Adjust surrounding comments.
10636 2017-09-06  Richard Biener  <rguenther@suse.de>
10638         * gimple-ssa-strength-reduction.c
10639         (find_candidates_dom_walker::before_dom_children): Also allow
10640         pointer types.
10642 2017-09-06  Richard Biener  <rguenther@suse.de>
10644         PR tree-optimization/82108
10645         * tree-vect-stmts.c (vectorizable_load): Fix pointer adjustment
10646         for gap in the non-permutation SLP case.
10648 2017-09-06  Martin Jambor  <mjambor@suse.cz>
10650         PR tree-optimization/82078
10651         * tree-sra.c (sort_and_splice_var_accesses): Move call to
10652         add_access_to_work_queue...
10653         (build_accesses_from_assign): ...here.
10654         (propagate_all_subaccesses): Make sure racc is the group
10655         representative, if there is one.
10657 2017-09-06  Jakub Jelinek  <jakub@redhat.com>
10659         PR middle-end/82095
10660         * varasm.c (categorize_decl_for_section): Use SECCAT_TBSS for TLS vars with
10661         NULL DECL_INITIAL.
10663 2017-09-06  Richard Biener  <rguenther@suse.de>
10665         * gimple-ssa-strength-reduction.c
10666         (find_candidates_dom_walker::before_doom_children): Use a
10667         type and not a mode check.
10669 2017-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10671         PR target/77308
10672         * config/arm/predicates.md (arm_general_adddi_operand): Create new
10673         non-vfp predicate.
10674         * config/arm/arm.md (*arm_adddi3, *arm_subdi3): Use new predicates.
10676 2017-09-05  Jeff Law  <law@redhat.com>
10678         PR tree-optimization/64910
10679         * tree-ssa-reassoc.c (reassociate_bb): Restrict last change to
10680         cases where we have 3 or more operands.
10682 2017-09-05  Jakub Jelinek  <jakub@redhat.com>
10684         PR middle-end/81768
10685         * omp-low.c (lower_omp_for): Recompute tree invariant if
10686         gimple_omp_for_initial/final is ADDR_EXPR.
10688         PR middle-end/81768
10689         * omp-expand.c (expand_omp_simd): Force second operands of COND_EXPR
10690         into gimple val before gimplification fo the COND_EXPR.
10692 2017-09-05  Aldy Hernandez  <aldyh@redhat.com>
10694         * tree-ssa-threadupdate.c (duplicate_thread_path): Remove unused
10695         REGION_COPY argument.
10696         (thread_through_all_blocks): Remove unused argument to
10697         duplicate_thread_path.
10699 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
10700             Alan Hayward  <alan.hayward@arm.com>
10701             David Sherwood  <david.sherwood@arm.com>
10703         * config/aarch64/aarch64-protos.h (aarch64_gen_adjusted_ldpstp):
10704         Take a scalar_mode rather than a machine_mode.
10705         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
10706         * config/aarch64/aarch64.c (aarch64_simd_container_mode): Likewise.
10707         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
10708         (aarch64_gen_adjusted_ldpstp): Likewise.
10709         (aarch64_expand_vector_init): Use scalar_mode instead of machine_mode.
10711 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
10712             Alan Hayward  <alan.hayward@arm.com>
10713             David Sherwood  <david.sherwood@arm.com>
10715         * config/aarch64/aarch64-protos.h (aarch64_is_extend_from_extract):
10716         Take a scalar_int_mode instead of a machine_mode.
10717         (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
10718         (aarch64_output_scalar_simd_mov_immediate): Likewise.
10719         (aarch64_simd_scalar_immediate_valid_for_move): Likewise.
10720         (aarch64_simd_attr_length_rglist): Delete.
10721         * config/aarch64/aarch64.c (aarch64_is_extend_from_extract): Take
10722         a scalar_int_mode instead of a machine_mode.
10723         (aarch64_add_offset): Likewise.
10724         (aarch64_internal_mov_immediate): Likewise
10725         (aarch64_add_constant_internal): Likewise.
10726         (aarch64_add_constant): Likewise.
10727         (aarch64_movw_imm): Likewise.
10728         (aarch64_rtx_arith_op_extract_p): Likewise.
10729         (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
10730         (aarch64_simd_scalar_immediate_valid_for_move): Likewise.
10731         Remove assert that the mode isn't a vector.
10732         (aarch64_output_scalar_simd_mov_immediate): Likewise.
10733         (aarch64_expand_mov_immediate): Update calls after above changes.
10734         (aarch64_output_casesi): Use as_a <scalar_int_mode>.
10735         (aarch64_and_bitmask_imm): Check for scalar integer modes.
10736         (aarch64_move_imm): Likewise.
10737         (aarch64_can_const_movi_rtx_p): Likewise.
10738         (aarch64_strip_extend): Likewise.
10739         (aarch64_extr_rtx_p): Likewise.
10740         (aarch64_rtx_costs): Likewise, using wode_mode as the mode of
10741         a CONST_INT when the mode parameter is VOIDmode.
10742         (aarch64_float_const_rtx_p): Use scalar_int_mode for a temporary.
10744 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
10746         * machmode.h (bitwise_mode_for_mode): Return opt_mode.
10747         * stor-layout.c (bitwise_mode_for_mode): Likewise.
10748         (bitwise_type_for_mode): Update accordingly.
10750 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
10752         * stor-layout.h (mode_for_size_tree): Return an opt_mode.
10753         * stor-layout.c (mode_for_size_tree): Likewise.
10754         (mode_for_array): Update accordingly.
10755         (layout_decl): Likewise.
10756         (compute_record_mode): Likewise.  Only set the mode once.
10758 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
10760         * target.def (get_mask_mode): Change return type to opt_mode.
10761         Expand commentary.
10762         * doc/tm.texi: Regenerate.
10763         * targhooks.h (default_get_mask_mode): Return an opt_mode.
10764         * targhooks.c (default_get_mask_mode): Likewise.
10765         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
10766         * optabs-query.c (can_vec_mask_load_store_p): Update use of
10767         targetm.get_mask_mode.
10768         * tree.c (build_truth_vector_type): Likewise.
10770 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
10772         * machmode.h (mode_for_vector): Return an opt_mode.
10773         * stor-layout.c (mode_for_vector): Likewise.
10774         (mode_for_int_vector): Update accordingly.
10775         (layout_type): Likewise.
10776         * config/i386/i386.c (emit_memmov): Likewise.
10777         (ix86_expand_set_or_movmem): Likewise.
10778         (ix86_expand_vector_init): Likewise.
10779         (ix86_get_mask_mode): Likewise.
10780         * config/powerpcspe/powerpcspe.c (rs6000_expand_vec_perm_const_1):
10781         Likewise.
10782         * config/rs6000/rs6000.c (rs6000_expand_vec_perm_const_1): Likewise.
10783         * expmed.c (extract_bit_field_1): Likewise.
10784         * expr.c (expand_expr_real_2): Likewise.
10785         * optabs-query.c (can_vec_perm_p): Likewise.
10786         (can_vec_mask_load_store_p): Likewise.
10787         * optabs.c (expand_vec_perm): Likewise.
10788         * targhooks.c (default_get_mask_mode): Likewise.
10789         * tree-vect-stmts.c (vectorizable_store): Likewise.
10790         (vectorizable_load): Likewise.
10791         (get_vectype_for_scalar_type_and_size): Likewise.
10793 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
10795         * machmode.h (mode_for_int_vector): New function.
10796         * stor-layout.c (mode_for_int_vector): Likewise.
10797         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Use it.
10798         * config/powerpcspe/powerpcspe.c (rs6000_do_expand_vec_perm): Likewise.
10799         * config/rs6000/rs6000.c (rs6000_do_expand_vec_perm): Likewise.
10800         * config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
10801         (s390_expand_vcond): Likewise.
10803 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
10805         * machmode.h (opt_machine_mode): New type.
10806         (opt_mode<T>): Allow construction from anything that can be
10807         converted to a T.
10808         (is_a, as_a, dyn_cast): Add overloads for opt_mode.
10809         (mode_for_size): Return an opt_machine_mode.
10810         * stor-layout.c (mode_for_size): Likewise.
10811         (mode_for_size_tree): Update call accordingly.
10812         (bitwise_mode_for_mode): Likewise.
10813         (make_fract_type): Likewise.
10814         (make_accum_type): Likewise.
10815         * caller-save.c (replace_reg_with_saved_mem): Update call
10816         accordingly.
10817         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
10818         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
10819         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
10820         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
10821         * expmed.c (extract_bit_field_1): Likewise.
10822         * reload.c (get_secondary_mem): Likewise.
10823         * varasm.c (assemble_integer): Likewise.
10824         * lower-subreg.c (simplify_subreg_concatn): Likewise.  Move
10825         early-out.
10827 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
10829         * machmode.h (decimal_float_mode_for_size): New function.
10830         * real.h (REAL_VALUE_TO_TARGET_LONG_DOUBLE): Use float_mode_for_size.
10831         (REAL_VALUE_TO_TARGET_DOUBLE): Likewise.
10832         (REAL_VALUE_TO_TARGET_SINGLE): Likewise.
10833         (REAL_VALUE_TO_TARGET_DECIMAL128): Use decimal_float_mode_for_size.
10834         (REAL_VALUE_TO_TARGET_DECIMAL64): Likewise.
10835         (REAL_VALUE_TO_TARGET_DECIMAL32): Likewise.
10837 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
10839         * builtins.c (expand_builtin_powi): Use int_mode_for_size.
10840         (get_builtin_sync_mode): Likewise.
10841         (expand_ifn_atomic_compare_exchange): Likewise.
10842         (expand_builtin_atomic_clear): Likewise.
10843         (expand_builtin_atomic_test_and_set): Likewise.
10844         (fold_builtin_atomic_always_lock_free): Likewise.
10845         * calls.c (compute_argument_addresses): Likewise.
10846         (emit_library_call_value_1): Likewise.
10847         (store_one_arg): Likewise.
10848         * combine.c (combine_instructions): Likewise.
10849         * config/aarch64/aarch64.c (aarch64_function_value): Likewise.
10850         * config/arm/arm.c (arm_function_value): Likewise.
10851         (aapcs_allocate_return_reg): Likewise.
10852         * config/c6x/c6x.c (c6x_expand_movmem): Likewise.
10853         * config/i386/i386.c (construct_container): Likewise.
10854         (ix86_gimplify_va_arg): Likewise.
10855         (ix86_expand_sse_cmp): Likewise.
10856         (emit_memmov): Likewise.
10857         (emit_memset): Likewise.
10858         (expand_small_movmem_or_setmem): Likewise.
10859         (ix86_expand_pextr): Likewise.
10860         (ix86_expand_pinsr): Likewise.
10861         * config/lm32/lm32.c (lm32_block_move_inline): Likewise.
10862         * config/microblaze/microblaze.c (microblaze_block_move_straight):
10863         Likewise.
10864         * config/mips/mips.c (mips_function_value_1) Likewise.
10865         (mips_block_move_straight): Likewise.
10866         (mips_expand_ins_as_unaligned_store): Likewise.
10867         * config/powerpcspe/powerpcspe.c
10868         (rs6000_darwin64_record_arg_advance_flush): Likewise.
10869         (rs6000_darwin64_record_arg_flush): Likewise.
10870         * config/rs6000/rs6000.c
10871         (rs6000_darwin64_record_arg_advance_flush): Likewise.
10872         (rs6000_darwin64_record_arg_flush): Likewise.
10873         * config/sparc/sparc.c (sparc_function_arg_1): Likewise.
10874         (sparc_function_value_1): Likewise.
10875         * config/spu/spu.c (adjust_operand): Likewise.
10876         (spu_emit_branch_or_set): Likewise.
10877         (arith_immediate_p): Likewise.
10878         * emit-rtl.c (gen_lowpart_common): Likewise.
10879         * expr.c (expand_expr_real_1): Likewise.
10880         * function.c (assign_parm_setup_block): Likewise.
10881         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Likewise.
10882         * reload1.c (alter_reg): Likewise.
10883         * stor-layout.c (mode_for_vector): Likewise.
10884         (layout_type): Likewise.
10886 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
10888         * config/spu/spu.c (exp2_immediate_p): Use int_mode_for_mode.
10889         (spu_convert_move): Likewise.
10890         * lower-subreg.c (resolve_simple_move): Likewise.
10892 2017-09-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10894         PR target/81833
10895         * config/rs6000/altivec.md (altivec_vsum2sws): Convert from a
10896         define_insn to a define_expand.
10897         (altivec_vsum2sws_direct): New define_insn.
10898         (altivec_vsumsws): Convert from a define_insn to a define_expand.
10900 2017-09-05  Wilco Dijkstra  <wdijkstr@arm.com>
10902         * config/arm/arm.c (arm_option_params_internal): Improve setting of
10903         max_insns_skipped.
10905 2017-09-05  H.J. Lu  <hongjiu.lu@intel.com>
10907         PR target/59501
10908         PR target/81624
10909         PR target/81769
10910         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Don't
10911         realign stack if stack alignment needed is less than incoming
10912         stack boundary.
10914 2017-09-05  Marek Polacek  <polacek@redhat.com>
10916         PR sanitizer/82072
10917         * convert.c (convert_to_integer_1) <case NEGATE_EXPR>: Move the ubsan
10918         check earlier.
10920 2017-09-05  Wilco Dijkstra  <wdijkstr@arm.com>
10922         * explow.c (get_dynamic_stack_size): Improve dynamic alignment.
10924 2017-09-05  Richard Biener  <rguenther@suse.de>
10926         PR tree-optimization/82084
10927         * fold-const.c (can_native_encode_string_p): Handle wide characters.
10929 2017-09-05  Richard Biener  <rguenther@suse.de>
10931         PR tree-optimization/82102
10932         * tree-ssa-pre.c (fini_eliminate): Check if lhs is NULL.
10934 2017-09-05  Martin Liska  <mliska@suse.cz>
10936         PR tree-optimization/82032
10937         * tree-cfg.c (generate_range_test): New function.
10938         * tree-cfg.h (generate_range_test): Declared here.
10939         * tree-cfgcleanup.c (convert_single_case_switch): New function.
10940         (cleanup_control_expr_graph): Use it.
10941         * tree-switch-conversion.c (try_switch_expansion): Remove
10942         assert.
10943         (emit_case_nodes): Use generate_range_test.
10945 2017-09-04  Uros Bizjak  <ubizjak@gmail.com>
10947         PR target/82098
10948         * config/i386/i386.md (*<btsc><mode>_mask): Add
10949         TARGET_USE_BT to insn constraint.
10950         (*btr<mode>_mask): Ditto.
10952 2017-09-04  Wilco Dijkstra  <wdijkstr@arm.com>
10954         * config/arm/arm.c (arm_legitimate_index_p): Add comment.
10955         (thumb2_legitimate_index_p): Use correct range for DI/DF mode.
10957 2017-09-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10959         PR target/77308
10960         * config/arm/arm.md (*arm_adddi3, *arm_subdi3): Split early except for
10961         TARGET_NEON and TARGET_IWMMXT.
10962         (anddi3, iordi3, xordi3, one_cmpldi2): Split while expanding except for
10963         TARGET_NEON and TARGET_IWMMXT.
10964         (*one_cmpldi2_insn): Moved the body of one_cmpldi2 here.
10966 2017-09-04  Uros Bizjak  <ubizjak@gmail.com>
10968         * config/i386/i386-protos.h (ix86_tls_address_pattern_p) New prototype.
10969         (ix86_rewrite_tls_address): Ditto.
10970         * config/i386/i386.c (ix86_tls_address_pattern_p) New function.
10971         (ix86_rewrite_tls_address_1): Ditto.
10972         (ix86_rewrite_tls_address): Ditto.
10973         * config/i386/predicates.md (tls_address_pattern): New predicate.
10974         * config/i386/i386.md (TLS address splitter): New splitter.
10976 2017-09-04  Richard Biener  <rguenther@suse.de>
10978         PR tree-optimization/82084
10979         * fold-const.h (can_native_encode_string_p): Declare.
10980         * fold-const.c (can_native_encode_string_p): Factor out from ...
10981         (native_encode_string): ... here.
10982         * tree-vect-stmts.c (vectorizable_store): Call it to avoid
10983         vectorizing stores from constants we later cannot handle.
10985 2017-09-04  Marek Polacek  <polacek@redhat.com>
10987         PR c/81783
10988         * doc/invoke.texi: Update -Wtautological-compare documentation.
10990 2017-09-04  Jeff Law  <law@redhat.com>
10992         PR tree-optimization/64910
10993         * tree-ssa-reassoc.c (reassociate_bb): For bitwise binary ops,
10994         swap the first and last operand if the last is a constant.
10996 2017-09-04  Marek Polacek  <polacek@redhat.com>
10998         PR sanitizer/82072
10999         * convert.c (do_narrow): When sanitizing signed integer overflows,
11000         bail out for signed types.
11001         (convert_to_integer_1) <case NEGATE_EXPR>: Likewise.
11003 2017-09-04  Richard Biener  <rguenther@suse.de>
11005         PR tree-optimization/82060
11006         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
11007         Move devirtualization after stmt folding and before EH/AB/noreturn
11008         cleanup to get the stmt refs canonicalized.  Use a bool instead
11009         of gimple_modified_p since that doesn't work for NOPs.  Schedule
11010         NOPs generated by folding for removal.
11012 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
11013             Alan Hayward  <alan.hayward@arm.com>
11014             David Sherwood  <david.sherwood@arm.com>
11016         * coretypes.h (pad_direction): New enum.
11017         * defaults.h (DEFAULT_FUNCTION_ARG_PADDING): Delete.
11018         (FUNCTION_ARG_PADDING): Likewise.
11019         * target.def (function_arg_padding): New hook.
11020         * targhooks.h (default_function_arg_padding): Declare.
11021         * targhooks.c (default_function_arg_padding): New function.
11022         * doc/tm.texi.in (FUNCTION_ARG_PADDING): Replace with...
11023         (TARGET_FUNCTION_ARG_PADDING): ...this.
11024         * doc/tm.texi: Regenerate.
11025         * calls.c (store_unaligned_arguments_into_pseudos): Use pad_direction
11026         instead of direction.
11027         (compute_argument_addresses): Likewise.
11028         (load_register_parameters): Likewise.
11029         (emit_library_call_value_1): Likewise.
11030         (store_one_arg): Use targetm.calls.function_arg_padding instead
11031         of FUNCTION_ARG_PADDING.
11032         (must_pass_in_stack_var_size_or_pad): Likewise.
11033         * expr.c (emit_group_load_1): Use pad_direction instead of direction.
11034         (emit_group_store): Likewise.
11035         (emit_single_push_insn_1): Use targetm.calls.function_arg_padding
11036         instead of FUNCTION_ARG_PADDING.
11037         (emit_push_insn): Likewise, and propagate enum change throughout
11038         function.
11039         * function.h (direction): Delete.
11040         (locate_and_pad_arg_data::where_pad): Use pad_direction instead
11041         of direction.
11042         * function.c (assign_parm_find_stack_rtl): Likewise.
11043         (assign_parm_setup_block_p): Likewise.
11044         (assign_parm_setup_block): Likewise.
11045         (gimplify_parameters): Likewise.
11046         (locate_and_pad_parm): Use targetm.calls.function_arg_padding
11047         instead of FUNCTION_ARG_PADDING, and propagate enum change throughout
11048         function.
11049         * config/aarch64/aarch64.h (FUNCTION_ARG_PADDING): Delete.
11050         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
11051         * config/aarch64/aarch64-protos.h (aarch64_pad_arg_upward): Delete.
11052         * config/aarch64/aarch64.c (aarch64_pad_arg_upward): Replace with...
11053         (aarch64_function_arg_padding): ...this new function.
11054         (aarch64_gimplify_va_arg_expr): Use pad_direction instead of direction.
11055         (TARGET_FUNCTION_ARG_PADDING): Redefine.
11056         * config/arm/arm.h (FUNCTION_ARG_PADDING): Delete.
11057         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
11058         * config/arm/arm-protos.h (arm_pad_arg_upward): Delete.
11059         * config/arm/arm.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
11060         (arm_pad_arg_upward): Replace with...
11061         (arm_function_arg_padding): ...this new function.
11062         * config/c6x/c6x.h (BLOCK_REG_PADDING): Use pad_direction instead
11063         of direction.
11064         * config/ia64/hpux.h (FUNCTION_ARG_PADDING): Delete.
11065         * config/ia64/ia64-protos.h (ia64_hpux_function_arg_padding): Delete.
11066         * config/ia64/ia64.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
11067         (ia64_hpux_function_arg_padding): Replace with...
11068         (ia64_function_arg_padding): ...this new function.  Use pad_direction
11069         instead of direction.  Check for TARGET_HPUX.
11070         * config/iq2000/iq2000.h (FUNCTION_ARG_PADDING): Delete.
11071         * config/iq2000/iq2000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
11072         (iq2000_function_arg_padding): New function.
11073         * config/mips/mips-protos.h (mips_pad_arg_upward): Delete.
11074         * config/mips/mips.c (mips_pad_arg_upward): Replace with...
11075         (mips_function_arg_padding): ...this new function.
11076         (mips_pad_reg_upward): Update accordingly.
11077         (TARGET_FUNCTION_ARG_PADDING): Redefine.
11078         * config/mips/mips.h (PAD_VARARGS_DOWN): Use
11079         targetm.calls.function_arg_padding.
11080         (FUNCTION_ARG_PADDING): Delete.
11081         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
11082         * config/nios2/nios2.h (FUNCTION_ARG_PADDING): Delete.
11083         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
11084         * config/nios2/nios2-protos.h (nios2_function_arg_padding): Delete.
11085         (nios2_block_reg_padding): Return pad_direction instead of direction.
11086         * config/nios2/nios2.c (nios2_block_reg_padding): Return pad_direction
11087         instead of direction.
11088         (nios2_function_arg_padding): Likewise.  Make static.
11089         (TARGET_FUNCTION_ARG_PADDING): Redefine.
11090         * config/pa/pa.h (FUNCTION_ARG_PADDING): Delete.
11091         (BLOCK_REG_PADDING): Use targetm.calls.function_arg_padding.
11092         * config/pa/pa-protos.h (pa_function_arg_padding): Delete.
11093         * config/pa/pa.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
11094         (pa_function_arg_padding): Make static.  Return pad_direction instead
11095         of direction.
11096         * config/powerpcspe/powerpcspe.h (FUNCTION_ARG_PADDING): Delete.
11097         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
11098         * config/powerpcspe/aix.h (BLOCK_REG_PADDING): Use pad_direction
11099         instead of direction.  Use targetm.calls.function_arg_padding.
11100         * config/powerpcspe/darwin.h (BLOCK_REG_PADDING): Likewise.
11101         * config/powerpcspe/freebsd64.h (BLOCK_REG_PADDING): Likewise.
11102         * config/powerpcspe/linux64.h (BLOCK_REG_PADDING): Likewise.
11103         * config/powerpcspe/powerpcspe-protos.h (function_arg_padding): Delete.
11104         * config/powerpcspe/powerpcspe.c (TARGET_FUNCTION_ARG_PADDING):
11105         Redefine.
11106         (function_arg_padding): Rename to...
11107         (rs6000_function_arg_padding): ...this.  Make static.  Return
11108         pad_direction instead of direction.
11109         (rs6000_return_in_msb): Use rs6000_function_arg_padding.
11110         * config/rs6000/rs6000.h (FUNCTION_ARG_PADDING): Delete.
11111         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
11112         * config/rs6000/aix.h (BLOCK_REG_PADDING): Use pad_direction
11113         instead of direction.  Use targetm.calls.function_arg_padding.
11114         * config/rs6000/darwin.h (BLOCK_REG_PADDING): Likewise.
11115         * config/rs6000/freebsd64.h (BLOCK_REG_PADDING): Likewise.
11116         * config/rs6000/linux64.h (BLOCK_REG_PADDING): Likewise.
11117         * config/rs6000/rs6000-protos.h (function_arg_padding): Delete.
11118         * config/rs6000/rs6000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
11119         (function_arg_padding): Rename to...
11120         (rs6000_function_arg_padding): ...this.  Make static.  Return
11121         pad_direction instead of direction.
11122         (rs6000_return_in_msb): Use rs6000_function_arg_padding.
11123         * config/s390/s390.h (FUNCTION_ARG_PADDING): Delete.
11124         * config/s390/s390.c (s390_function_arg_padding): New function.
11125         (TARGET_FUNCTION_ARG_PADDING): Redefine.
11126         * config/sparc/sparc.h (FUNCTION_ARG_PADDING): Delete.
11127         * config/sparc/sparc-protos.h (function_arg_padding): Delete.
11128         * config/sparc/sparc.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
11129         (function_arg_padding): Rename to...
11130         (sparc_function_arg_padding): ...this.  Make static.  Return
11131         pad_direction instead of direction.
11132         * config/spu/spu.h (FUNCTION_ARG_PADDING): Delete.
11133         * config/spu/spu.c (spu_function_arg_padding): New function.
11134         (TARGET_FUNCTION_ARG_PADDING): Redefine.
11135         * system.h (FUNCTION_ARG_PADDING): Poison.
11137 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
11138             Alan Hayward  <alan.hayward@arm.com>
11139             David Sherwood  <david.sherwood@arm.com>
11141         * target.def (modes_tieable_p): New hook.
11142         * doc/tm.texi (MODES_TIEABLE_P): Replace with...
11143         (TARGET_MODES_TIEABLE_P): ...this.
11144         * doc/tm.texi.in: Regenerate.
11145         * hooks.h (hook_bool_mode_mode_true): Declare.
11146         * hooks.c (hook_bool_mode_mode_true): New function.
11147         * combine.c (subst): Use targetm.modes_tieable_p instead of
11148         MODES_TIEABLE_P.
11149         * dse.c (find_shift_sequence): Likewise.
11150         * expmed.c (extract_low_bits): Likewise.
11151         * lower-subreg.c: Include target.h.
11152         (find_decomposable_subregs): Use targetm.modes_tieable_p instead of
11153         MODES_TIEABLE_P.
11154         * rtlanal.c (rtx_cost): Likewise.
11155         * config/aarch64/aarch64.h (MODES_TIEABLE_P): Delete.
11156         * config/aarch64/aarch64-protos.h (aarch64_modes_tieable_p): Delete.
11157         * config/aarch64/aarch64.c (aarch64_modes_tieable_p): Make static.
11158         (TARGET_MODES_TIEABLE_P): Redefine.
11159         * config/alpha/alpha.h (MODES_TIEABLE_P): Delete.
11160         * config/alpha/alpha.c (alpha_modes_tieable_p): New function.
11161         (TARGET_MODES_TIEABLE_P): Redefine.
11162         * config/arc/arc.h (MODES_TIEABLE_P): Delete.
11163         * config/arc/arc.c (TARGET_MODES_TIEABLE_P): Redefine.
11164         (arc_modes_tieable_p): New function.
11165         * config/arm/arm.h (MODES_TIEABLE_P): Delete.
11166         * config/arm/arm-protos.h (arm_modes_tieable_p): Delete.
11167         * config/arm/arm.c (TARGET_MODES_TIEABLE_P): Redefine.
11168         (arm_modes_tieable_p): Make static.
11169         * config/avr/avr.h (MODES_TIEABLE_P): Delete.
11170         * config/bfin/bfin.h (MODES_TIEABLE_P): Delete.
11171         * config/bfin/bfin.c (bfin_modes_tieable_p): New function.
11172         (TARGET_MODES_TIEABLE_P): Redefine.
11173         * config/c6x/c6x.h (MODES_TIEABLE_P): Delete.
11174         * config/c6x/c6x.c (c6x_modes_tieable_p): New function.
11175         (TARGET_MODES_TIEABLE_P): Redefine.
11176         * config/cr16/cr16.h (MODES_TIEABLE_P): Delete.
11177         * config/cr16/cr16.c (TARGET_MODES_TIEABLE_P): Redefine.
11178         (cr16_modes_tieable_p): New function.
11179         * config/cris/cris.h (MODES_TIEABLE_P): Delete.
11180         * config/epiphany/epiphany.h (MODES_TIEABLE_P): Delete.
11181         * config/fr30/fr30.h (MODES_TIEABLE_P): Delete.
11182         (TRULY_NOOP_TRUNCATION): Update comment.
11183         * config/frv/frv.h (MODES_TIEABLE_P): Delete.
11184         (TRULY_NOOP_TRUNCATION): Update comment.
11185         * config/frv/frv.c (TARGET_MODES_TIEABLE_P): Redefine.
11186         (frv_modes_tieable_p): New function.
11187         * config/ft32/ft32.h (MODES_TIEABLE_P): Delete.
11188         * config/h8300/h8300.h (MODES_TIEABLE_P): Delete.
11189         * config/h8300/h8300.c (h8300_modes_tieable_p): New function.
11190         (TARGET_MODES_TIEABLE_P): Redefine.
11191         * config/i386/i386.h (MODES_TIEABLE_P): Delete.
11192         * config/i386/i386-protos.h (ix86_modes_tieable_p): Delete.
11193         * config/i386/i386.c (ix86_modes_tieable_p): Make static.
11194         (TARGET_MODES_TIEABLE_P): Redefine.
11195         * config/ia64/ia64.h (MODES_TIEABLE_P): Delete.
11196         * config/ia64/ia64.c (TARGET_MODES_TIEABLE_P): Redefine.
11197         (ia64_modes_tieable_p): New function.
11198         * config/iq2000/iq2000.h (MODES_TIEABLE_P): Delete.
11199         * config/iq2000/iq2000.c (TARGET_MODES_TIEABLE_P): Redefine.
11200         (iq2000_modes_tieable_p): New function.
11201         * config/lm32/lm32.h (MODES_TIEABLE_P): Delete.
11202         * config/lm32/lm32.c (TARGET_MODES_TIEABLE_P): Redefine.
11203         (lm32_modes_tieable_p): New function.
11204         * config/m32c/m32c.h (MODES_TIEABLE_P): Delete.
11205         * config/m32c/m32c-protos.h (m32c_modes_tieable_p): Delete.
11206         * config/m32c/m32c.c (m32c_modes_tieable_p): Make static.
11207         (TARGET_MODES_TIEABLE_P): Redefine.
11208         * config/m32r/m32r.h (MODES_TIEABLE_P): Delete.
11209         * config/m32r/m32r.c (TARGET_MODES_TIEABLE_P): Redefine.
11210         (m32r_modes_tieable_p): New function.
11211         * config/m68k/m68k.h (MODES_TIEABLE_P): Delete.
11212         * config/m68k/m68k.c (TARGET_MODES_TIEABLE_P): Redefine.
11213         (m68k_modes_tieable_p): New function.
11214         * config/mcore/mcore.h (MODES_TIEABLE_P): Delete.
11215         * config/mcore/mcore.c (TARGET_MODES_TIEABLE_P): Redefine.
11216         (mcore_modes_tieable_p): New function.
11217         * config/microblaze/microblaze.h (MODES_TIEABLE_P): Delete.
11218         * config/microblaze/microblaze.c (microblaze_modes_tieable_p): New
11219         function.
11220         (TARGET_MODES_TIEABLE_P): Redefine.
11221         * config/mips/mips.h (MODES_TIEABLE_P): Delete.
11222         * config/mips/mips-protos.h (mips_modes_tieable_p): Delete.
11223         * config/mips/mips.c (mips_modes_tieable_p): Make static.
11224         (TARGET_MODES_TIEABLE_P): Redefine.
11225         * config/mmix/mmix.h (MODES_TIEABLE_P): Delete.
11226         * config/mn10300/mn10300.h (MODES_TIEABLE_P): Delete.
11227         * config/mn10300/mn10300-protos.h (mn10300_modes_tieable): Delete.
11228         * config/mn10300/mn10300.c (mn10300_modes_tieable): Rename to...
11229         (mn10300_modes_tieable_p): ...this and make static.
11230         (TARGET_MODES_TIEABLE_P): Redefine.
11231         * config/moxie/moxie.h (MODES_TIEABLE_P): Delete.
11232         * config/msp430/msp430.h (MODES_TIEABLE_P): Delete.
11233         * config/msp430/msp430-protos.h (msp430_modes_tieable_p): Delete.
11234         * config/msp430/msp430.c (TARGET_MODES_TIEABLE_P): Redefine.
11235         (msp430_modes_tieable_p): Make static.
11236         * config/nds32/nds32.h (MODES_TIEABLE_P): Delete.
11237         * config/nds32/nds32.c (nds32_modes_tieable_p): New function.
11238         (TARGET_MODES_TIEABLE_P): Redefine.
11239         * config/nios2/nios2.h (MODES_TIEABLE_P): Delete.
11240         * config/nvptx/nvptx.h (MODES_TIEABLE_P): Delete.
11241         * config/nvptx/nvptx.c (nvptx_modes_tieable_p): New function.
11242         (TARGET_MODES_TIEABLE_P): Redefine.
11243         * config/pa/pa.h (MODES_TIEABLE_P): Delete.
11244         * config/pa/pa-protos.h (pa_modes_tieable_p): Delete.
11245         * config/pa/pa.c (pa_modes_tieable_p): Make static.
11246         (TARGET_MODES_TIEABLE_P): Redefine.
11247         * config/pdp11/pdp11.h (MODES_TIEABLE_P): Delete.
11248         * config/pdp11/pdp11.c (TARGET_MODES_TIEABLE_P): Redefine.
11249         (pdp11_modes_tieable_p): New function.
11250         * config/powerpcspe/powerpcspe.h (MODES_TIEABLE_P): Delete.
11251         * config/powerpcspe/powerpcspe.c (TARGET_MODES_TIEABLE_P): Redefine.
11252         (rs6000_modes_tieable_p): New function.
11253         (rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
11254         * config/powerpcspe/powerpcspe.md: Update comment.
11255         * config/riscv/riscv.h (MODES_TIEABLE_P): Delete.
11256         * config/riscv/riscv.c (riscv_modes_tieable_p): New function.
11257         (TARGET_MODES_TIEABLE_P): Redefine.
11258         * config/rl78/rl78.h (MODES_TIEABLE_P): Delete.
11259         * config/rl78/rl78.c (TARGET_MODES_TIEABLE_P): Redefine.
11260         (rl78_modes_tieable_p): New function.
11261         * config/rs6000/rs6000.h (MODES_TIEABLE_P): Delete.
11262         * config/rs6000/rs6000.c (TARGET_MODES_TIEABLE_P): Redefine.
11263         (rs6000_modes_tieable_p): New function.
11264         (rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
11265         * config/rs6000/rs6000.md: Update comment.
11266         * config/rx/rx.h (MODES_TIEABLE_P): Delete.
11267         * config/rx/rx.c (rx_modes_tieable_p): New function.
11268         (TARGET_MODES_TIEABLE_P): Redefine.
11269         * config/s390/s390.h (MODES_TIEABLE_P): Delete.
11270         * config/s390/s390.c (s390_modes_tieable_p): New function.
11271         (TARGET_MODES_TIEABLE_P): Redefine.
11272         * config/sh/sh.h (MODES_TIEABLE_P): Delete.
11273         * config/sh/sh.c (TARGET_MODES_TIEABLE_P): Redefine.
11274         (sh_modes_tieable_p): New function.
11275         * config/sparc/sparc.h (MODES_TIEABLE_P): Delete.
11276         * config/sparc/sparc-protos.h (sparc_modes_tieable_p): Delete.
11277         * config/sparc/sparc.c (TARGET_MODES_TIEABLE_P): Redefine.
11278         (sparc_modes_tieable_p): Make static.
11279         * config/spu/spu.h (MODES_TIEABLE_P): Delete.
11280         * config/spu/spu.c (spu_modes_tieable_p): New function.
11281         (TARGET_MODES_TIEABLE_P): Redefine.
11282         * config/stormy16/stormy16.h (MODES_TIEABLE_P): Delete.
11283         * config/stormy16/stormy16.c (xstormy16_modes_tieable_p): New function.
11284         (TARGET_MODES_TIEABLE_P): Redefine.
11285         * config/tilegx/tilegx.h (MODES_TIEABLE_P): Delete.
11286         * config/tilepro/tilepro.h (MODES_TIEABLE_P): Delete.
11287         * config/v850/v850.h (MODES_TIEABLE_P): Delete.
11288         * config/v850/v850.c (v850_modes_tieable_p): New function.
11289         (TARGET_MODES_TIEABLE_P): Redefine.
11290         * config/vax/vax.h (MODES_TIEABLE_P): Delete.
11291         * config/visium/visium.h (MODES_TIEABLE_P): Delete.
11292         * config/visium/visium.c (TARGET_MODES_TIEABLE_P): Redefine.
11293         (visium_modes_tieable_p): New function.
11294         * config/xtensa/xtensa.h (MODES_TIEABLE_P): Delete.
11295         * config/xtensa/xtensa.c (TARGET_MODES_TIEABLE_P): Redefine.
11296         (xtensa_modes_tieable_p): New function.
11297         * system.h (MODES_TIEABLE_P): Poison.
11299 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
11300             Alan Hayward  <alan.hayward@arm.com>
11301             David Sherwood  <david.sherwood@arm.com>
11303         * target.def (hard_regno_mode_ok): New hook.
11304         * doc/tm.texi (HARD_REGNO_MODE_OK): Replace with...
11305         (TARGET_HARD_REGNO_MODE_OK): ...this.
11306         * doc/tm.texi.in: Regenerate.
11307         * hooks.h (hook_bool_uint_mode_true): Declare.
11308         * hooks.c (hook_bool_uint_mode_true): New function.
11309         * doc/md.texi: Refer to targetm.hard_regno_mode_ok instead of
11310         HARD_REGNO_MODE_OK.
11311         * genpreds.c (write_insn_preds_c): Add an include of target.h.
11312         * alias.c (init_alias_target): Use targetm.hard_regno_mode_ok
11313         instead of HARD_REGNO_MODE_OK.
11314         * caller-save.c: Include target.h.
11315         (reg_save_code): Use targetm.hard_regno_mode_ok instead of
11316         HARD_REGNO_MODE_OK.
11317         * combine.c (can_combine_p): Likewise.
11318         (combinable_i3pat): Likewise.
11319         (can_change_dest_mode): Likewise.
11320         * expr.c (init_expr_target): Likewise.
11321         (convert_move): Likewise.
11322         (convert_modes): Likewise.
11323         * ira.c (setup_prohibited_class_mode_regs): Likewise.
11324         (setup_prohibited_mode_move_regs): Likewise.
11325         * ira.h (target_ira): Likewise.
11326         * lra-assigns.c (find_hard_regno_for_1): Likewise.
11327         * lra-constraints.c (process_alt_operands): Likewise.
11328         (split_reg): Likewise.
11329         * recog.c (peep2_find_free_register): Likewise.
11330         * ree.c (combine_reaching_defs): Likewise.
11331         * regcprop.c (maybe_mode_change): Likewise.
11332         * reginfo.c (init_reg_sets_1): Likewise.
11333         (choose_hard_reg_mode): Likewise.
11334         (simplifiable_subregs): Likewise.
11335         * regrename.c (check_new_reg_p): Likewise.
11336         * reload.c (find_valid_class): Likewise.
11337         (find_valid_class_1): Likewise.
11338         (reload_inner_reg_of_subreg): Likewise.
11339         (push_reload): Likewise.
11340         (combine_reloads): Likewise.
11341         (find_dummy_reload): Likewise.
11342         (find_reloads): Likewise.
11343         * reload1.c (find_reg): Likewise.
11344         (set_reload_reg): Likewise.
11345         (allocate_reload_reg): Likewise.
11346         (choose_reload_regs): Likewise.
11347         (reload_adjust_reg_for_temp): Likewise.
11348         * rtlanal.c (subreg_size_offset_from_lsb): Likewise.
11349         (simplify_subreg_regno): Likewise.
11350         * sel-sched.c (init_regs_for_mode): Likewise.
11351         * varasm.c (make_decl_rtl): Likewise.
11352         * config/aarch64/aarch64.h (HARD_REGNO_MODE_OK): Delete.
11353         (MODES_TIEABLE_P): Use targetm.hard_regno_mode_ok instead of
11354         HARD_REGNO_MODE_OK.
11355         * config/aarch64/aarch64-protos.h (aarch64_hard_regno_mode_ok): Delete.
11356         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Make static.
11357         (TARGET_HARD_REGNO_MODE_OK): Redefine.
11358         * config/alpha/alpha.h (HARD_REGNO_MODE_OK): Delete.
11359         * config/alpha/alpha.c (alpha_hard_regno_mode_ok): New function.
11360         (TARGET_HARD_REGNO_MODE_OK): Redefine.
11361         * config/arc/arc.h (arc_hard_regno_mode_ok): Delete.
11362         (arc_mode_class): Delete.
11363         (HARD_REGNO_MODE_OK): Delete.
11364         * config/arc/arc.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
11365         (arc_hard_regno_mode_ok): Rename old array to...
11366         (arc_hard_regno_mode_ok_modes): ...this.
11367         (arc_conditional_register_usage): Update accordingly.
11368         (arc_mode_class): Make static.
11369         (arc_hard_regno_mode_ok): New function.
11370         * config/arm/arm.h (HARD_REGNO_MODE_OK): Delete.
11371         * config/arm/arm-protos.h (arm_hard_regno_mode_ok): Delete.
11372         * config/arm/arm.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
11373         (arm_hard_regno_mode_ok): Make static.
11374         * config/arm/arm.md (movdi): Use targetm.hard_regno_mode_ok instead of
11375         HARD_REGNO_MODE_OK.
11376         * config/avr/avr-protos.h (avr_hard_regno_mode_ok): Delete.
11377         * config/avr/avr.h (HARD_REGNO_MODE_OK): Delete.
11378         * config/avr/avr.c (avr_hard_regno_mode_ok): Make static and
11379         return a bool.
11380         (TARGET_HARD_REGNO_MODE_OK): Redefine.
11381         * config/bfin/bfin-protos.h (hard_regno_mode_ok): Delete.
11382         * config/bfin/bfin.h (HARD_REGNO_MODE_OK): Delete.
11383         * config/bfin/bfin.c (hard_regno_mode_ok): Rename to...
11384         (bfin_hard_regno_mode_ok): ...this.  Make static and return a bool.
11385         (TARGET_HARD_REGNO_MODE_OK): Redefine.
11386         * config/bfin/predicates.md (valid_reg_operand): Use
11387         targetm.hard_regno_mode_ok instead of HARD_REGNO_MODE_OK.
11388         * config/c6x/c6x.h (HARD_REGNO_MODE_OK): Delete.
11389         * config/c6x/c6x.c (c6x_hard_regno_mode_ok): New function.
11390         (TARGET_HARD_REGNO_MODE_OK): Redefine.
11391         * config/cr16/cr16.h (HARD_REGNO_MODE_OK): Delete.
11392         * config/cr16/cr16-protos.h (cr16_hard_regno_mode_ok): Delete.
11393         * config/cr16/cr16.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
11394         (cr16_hard_regno_mode_ok): Make static and return a bool.
11395         * config/cris/cris.h (HARD_REGNO_MODE_OK): Delete.
11396         * config/cris/cris.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
11397         (cris_hard_regno_mode_ok): New function.
11398         * config/epiphany/epiphany.h (epiphany_hard_regno_mode_ok): Delete.
11399         (epiphany_mode_class): Delete.
11400         (HARD_REGNO_MODE_OK): Delete.
11401         * config/epiphany/epiphany-protos.h (hard_regno_mode_ok): Delete.
11402         * config/epiphany/epiphany.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
11403         (hard_regno_mode_ok): Rename to...
11404         (epiphany_hard_regno_mode_ok): ...this.  Make static and return a bool.
11405         * config/fr30/fr30.h (HARD_REGNO_MODE_OK): Delete.
11406         * config/fr30/fr30.md: Refer to targetm.hard_regno_mode_ok instead of
11407         HARD_REGNO_MODE_OK.
11408         * config/frv/frv.h (HARD_REGNO_MODE_OK): Delete.
11409         * config/frv/frv-protos.h (frv_hard_regno_mode_ok): Delete.
11410         * config/frv/frv.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
11411         (frv_hard_regno_mode_ok): Make static and return a bool.
11412         * config/frv/frv.md: Refer to targetm.hard_regno_mode_ok instead of
11413         HARD_REGNO_MODE_OK.
11414         * config/ft32/ft32.h (HARD_REGNO_MODE_OK): Delete.
11415         * config/h8300/h8300.h (HARD_REGNO_MODE_OK): Delete.
11416         * config/h8300/h8300-protos.h (h8300_hard_regno_mode_ok): Delete.
11417         * config/h8300/h8300.c (h8300_hard_regno_mode_ok): Make static
11418         and return a bool.
11419         (TARGET_HARD_REGNO_MODE_OK): Redefine.
11420         * config/i386/i386.h (HARD_REGNO_MODE_OK): Delete.
11421         * config/i386/i386-protos.h (ix86_hard_regno_mode_ok): Delete.
11422         * config/i386/i386.c (ix86_hard_regno_mode_ok): Make static and
11423         return a bool.
11424         (TARGET_HARD_REGNO_MODE_OK): Redefine.
11425         * config/ia64/ia64.h (HARD_REGNO_MODE_OK): Delete.
11426         * config/ia64/ia64.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
11427         (ia64_hard_regno_mode_ok): New function.
11428         * config/iq2000/iq2000.h (HARD_REGNO_MODE_OK): Delete.
11429         * config/iq2000/iq2000.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
11430         (iq2000_hard_regno_mode_ok): New function.
11431         * config/lm32/lm32.h (HARD_REGNO_MODE_OK): Delete.
11432         * config/lm32/lm32.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
11433         (lm32_hard_regno_mode_ok): New function.
11434         * config/m32c/m32c.h (HARD_REGNO_MODE_OK): Delete.
11435         * config/m32c/m32c-protos.h (m32c_hard_regno_ok): Delete.
11436         * config/m32c/m32c.c (class_can_hold_mode): Use m32c_hard_regno_mode_ok
11437         instead of HARD_REGNO_MODE_OK.
11438         (m32c_hard_regno_ok): Rename to...
11439         (m32c_hard_regno_mode_ok): ...this.  Make static and return a bool.
11440         (m32c_cannot_change_mode_class): Update accordingly.
11441         (TARGET_HARD_REGNO_MODE_OK): Redefine.
11442         * config/m32r/m32r.h (m32r_hard_regno_mode_ok): Delete.
11443         (m32r_mode_class): Delete.
11444         (HARD_REGNO_MODE_OK): Delete.
11445         * config/m32r/m32r.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
11446         (m32r_hard_regno_mode_ok): Rename to...
11447         (m32r_hard_regno_modes): ...this.
11448         (m32r_mode_class): Make static.
11449         (m32r_hard_regno_mode_ok): New function.
11450         * config/m68k/m68k.h (HARD_REGNO_MODE_OK): Delete.
11451         * config/m68k/m68k-protos.h (m68k_regno_mode_ok): Delete.
11452         * config/m68k/m68k.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
11453         (m68k_hard_regno_mode_ok): Make static.
11454         * config/mcore/mcore.h (HARD_REGNO_MODE_OK): Delete.
11455         * config/mcore/mcore.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
11456         (mcore_hard_regno_mode_ok): New function.
11457         * config/microblaze/microblaze.h (microblaze_hard_regno_mode_ok)
11458         (HARD_REGNO_MODE_OK): Delete.
11459         * config/microblaze/microblaze.c (microblaze_hard_regno_mode_ok):
11460         Rename to...
11461         (microblaze_hard_regno_mode_ok_p): ...this and make static.
11462         (microblaze_hard_regno_mode_ok): New function.
11463         (TARGET_HARD_REGNO_MODE_OK): Redefine.
11464         * config/mips/mips.h (HARD_REGNO_MODE_OK): Delete.
11465         (mips_hard_regno_mode_ok): Delete.
11466         * config/mips/mips.c (mips_hard_regno_mode_ok): Rename to...
11467         (mips_hard_regno_mode_ok_p): ...this and make static.
11468         (mips_hard_regno_mode_ok_p): Rename to...
11469         (mips_hard_regno_mode_ok_uncached): ...this.
11470         (mips_hard_regno_mode_ok): New function.
11471         (mips_class_max_nregs): Use mips_hard_regno_mode_ok instead
11472         of HARD_REGNO_MODE_OK.
11473         (mips_option_override): Update after above name changes.
11474         (TARGET_HARD_REGNO_MODE_OK): Redefine.
11475         * config/mmix/mmix.h (HARD_REGNO_MODE_OK): Delete.
11476         * config/mn10300/mn10300.h (HARD_REGNO_MODE_OK): Delete.
11477         * config/mn10300/mn10300-protos.h (mn10300_hard_regno_mode_ok): Delete.
11478         * config/mn10300/mn10300.c (mn10300_hard_regno_mode_ok): Make static.
11479         (TARGET_HARD_REGNO_MODE_OK): Redefine.
11480         * config/moxie/moxie.h (HARD_REGNO_MODE_OK): Delete.
11481         * config/msp430/msp430.h (HARD_REGNO_MODE_OK): Delete.
11482         * config/msp430/msp430-protos.h (msp430_hard_regno_mode_ok): Delete.
11483         * config/msp430/msp430.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
11484         (msp430_hard_regno_mode_ok): Make static and return a bool.
11485         * config/nds32/nds32.h (HARD_REGNO_MODE_OK): Delete.
11486         * config/nds32/nds32-protos.h (nds32_hard_regno_mode_ok): Delete.
11487         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Make static
11488         and return a bool.
11489         (TARGET_HARD_REGNO_MODE_OK): Redefine.
11490         * config/nios2/nios2.h (HARD_REGNO_MODE_OK): Delete.
11491         * config/nvptx/nvptx.h (HARD_REGNO_MODE_OK): Delete.
11492         * config/pa/pa.h (MODES_TIEABLE_P): Update commentary.
11493         * config/pa/pa32-regs.h (HARD_REGNO_MODE_OK): Rename to...
11494         (PA_HARD_REGNO_MODE_OK): ...this
11495         * config/pa/pa64-regs.h (HARD_REGNO_MODE_OK): Rename to...
11496         (PA_HARD_REGNO_MODE_OK): ...this.
11497         * config/pa/pa.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
11498         (pa_hard_regno_mode_ok): New function.
11499         * config/pdp11/pdp11.h (HARD_REGNO_MODE_OK): Delete.
11500         * config/pdp11/pdp11.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
11501         (pdp11_hard_regno_mode_ok): New function.
11502         * config/powerpcspe/powerpcspe.h (HARD_REGNO_MODE_OK): Delete.
11503         * config/powerpcspe/powerpcspe-protos.h (rs6000_hard_regno_mode_ok_p):
11504         Delete.
11505         * config/powerpcspe/powerpcspe.c (rs6000_hard_regno_mode_ok_p):
11506         Make static.
11507         (TARGET_HARD_REGNO_MODE_OK): Redefine.
11508         (rs6000_hard_regno_mode_ok): Rename to...
11509         (rs6000_hard_regno_mode_ok_uncached): ...this.
11510         (rs6000_init_hard_regno_mode_ok): Update accordingly.
11511         (rs6000_hard_regno_mode_ok): New function.
11512         * config/riscv/riscv.h (HARD_REGNO_MODE_OK): Delete.
11513         * config/riscv/riscv-protos.h (riscv_hard_regno_mode_ok_p): Delete.
11514         * config/riscv/riscv.c (riscv_hard_regno_mode_ok_p): Rename to...
11515         (riscv_hard_regno_mode_ok): ...this and make static.
11516         (TARGET_HARD_REGNO_MODE_OK): Redefine.
11517         * config/rl78/rl78.h (HARD_REGNO_MODE_OK): Delete.
11518         * config/rl78/rl78-protos.h (rl78_hard_regno_mode_ok): Delete.
11519         * config/rl78/rl78.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
11520         (rl78_hard_regno_mode_ok): Make static and return bool.
11521         * config/rs6000/rs6000.h (HARD_REGNO_MODE_OK): Delete.
11522         * config/rs6000/rs6000-protos.h (rs6000_hard_regno_mode_ok_p):
11523         Delete.
11524         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok_p): Make static.
11525         (TARGET_HARD_REGNO_MODE_OK): Redefine.
11526         (rs6000_hard_regno_mode_ok): Rename to...
11527         (rs6000_hard_regno_mode_ok_uncached): ...this.
11528         (rs6000_init_hard_regno_mode_ok): Update accordingly.
11529         (rs6000_hard_regno_mode_ok): New function.
11530         * config/rx/rx.h (HARD_REGNO_MODE_OK): Delete.
11531         * config/rx/rx.c (rx_hard_regno_mode_ok): New function.
11532         (TARGET_HARD_REGNO_MODE_OK): Redefine.
11533         * config/s390/s390.h (HARD_REGNO_MODE_OK): Delete.
11534         * config/s390/s390-protos.h (s390_hard_regno_mode_ok): Delete.
11535         * config/s390/s390.c (s390_hard_regno_mode_ok): Make static.
11536         (TARGET_HARD_REGNO_MODE_OK): Redefine.
11537         * config/sh/sh.h (HARD_REGNO_MODE_OK): Delete.
11538         * config/sh/sh-protos.h (sh_hard_regno_mode_ok): Delete.
11539         * config/sh/sh.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
11540         (sh_hard_regno_mode_ok): Make static.
11541         * config/sparc/constraints.md: Refer to targetm.hard_regno_mode_ok
11542         instead of HARD_REGNO_MODE_OK.
11543         * config/sparc/sparc.h (hard_regno_mode_classes): Delete.
11544         (sparc_mode_class): Delete.
11545         (HARD_REGNO_MODE_OK): Delete.
11546         * config/sparc/sparc.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
11547         (hard_regno_mode_classes): Make static.
11548         (sparc_mode_class): Likewise.
11549         (sparc_hard_regno_mode_ok): New function.
11550         * config/spu/spu.h (HARD_REGNO_MODE_OK): Delete.
11551         * config/stormy16/stormy16.h (HARD_REGNO_MODE_OK): Delete.
11552         * config/stormy16/stormy16.c (xstormy16_hard_regno_mode_ok): New
11553         function.
11554         (TARGET_HARD_REGNO_MODE_OK): Redefine.
11555         * config/tilegx/tilegx.h (HARD_REGNO_MODE_OK): Delete.
11556         * config/tilepro/tilepro.h (HARD_REGNO_MODE_OK): Delete.
11557         * config/v850/v850.h (HARD_REGNO_MODE_OK): Delete.
11558         * config/v850/v850.c (v850_hard_regno_mode_ok): New function.
11559         (TARGET_HARD_REGNO_MODE_OK): Redefine.
11560         * config/vax/vax.h (HARD_REGNO_MODE_OK): Delete.
11561         * config/visium/visium.h (HARD_REGNO_MODE_OK): Delete.
11562         * config/visium/visium.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
11563         (visium_hard_regno_mode_ok): New function.
11564         * config/visium/visium.md: Refer to targetm.hard_regno_mode_ok
11565         instead of HARD_REGNO_MODE_OK.
11566         * config/xtensa/xtensa.h (xtensa_hard_regno_mode_ok): Delete.
11567         (HARD_REGNO_MODE_OK): Delete.
11568         * config/xtensa/xtensa.c (xtensa_hard_regno_mode_ok): Rename to...
11569         (xtensa_hard_regno_mode_ok_p): ...this and make static.
11570         (xtensa_option_override): Update accordingly.
11571         (TARGET_HARD_REGNO_MODE_OK): Redefine.
11572         (xtensa_hard_regno_mode_ok): New function.
11573         * system.h (HARD_REGNO_MODE_OK): Poison.
11575 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
11576             Alan Hayward  <alan.hayward@arm.com>
11577             David Sherwood  <david.sherwood@arm.com>
11579         * target.def (hard_regno_call_part_clobbered): New hook.
11580         * doc/tm.texi.in (HARD_REGNO_CALL_PART_CLOBBERED): Replace with...
11581         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): ...this hook.
11582         * doc/tm.texi: Regenerate.
11583         * hooks.h (hook_bool_uint_mode_false): Declare.
11584         * hooks.c (hook_bool_uint_mode_false): New function.
11585         * regs.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
11586         * cselib.c (cselib_process_insn): Use
11587         targetm.hard_regno_call_part_clobbered instead of
11588         HARD_REGNO_CALL_PART_CLOBBERED.
11589         * ira-conflicts.c (ira_build_conflicts): Likewise.
11590         * ira-costs.c (ira_tune_allocno_costs): Likewise.
11591         * lra-constraints.c (need_for_call_save_p): Likewise.
11592         * lra-lives.c: Include target.h.
11593         (check_pseudos_live_through_calls): Use
11594         targetm.hard_regno_call_part_clobbered instead of
11595         HARD_REGNO_CALL_PART_CLOBBERED.
11596         * regcprop.c: Include target.h.
11597         (copyprop_hardreg_forward_1): Use
11598         targetm.hard_regno_call_part_clobbered instead of
11599         HARD_REGNO_CALL_PART_CLOBBERED.
11600         * reginfo.c (choose_hard_reg_mode): Likewise.
11601         * regrename.c (check_new_reg_p): Likewise.
11602         * reload.c (find_equiv_reg): Likewise.
11603         * reload1.c (emit_reload_insns): Likewise.
11604         * sched-deps.c (deps_analyze_insn): Likewise.
11605         * sel-sched.c (init_regs_for_mode): Likewise.
11606         (mark_unavailable_hard_regs): Likewise.
11607         * targhooks.c (default_dwarf_frame_reg_mode): Likewise.
11608         * config/aarch64/aarch64.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
11609         * config/aarch64/aarch64.c (aarch64_hard_regno_call_part_clobbered):
11610         New function.
11611         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
11612         * config/avr/avr.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
11613         * config/avr/avr-protos.h (avr_hard_regno_call_part_clobbered):
11614         Delete.
11615         * config/avr/avr.c (avr_hard_regno_call_part_clobbered): Make static
11616         and return a bool.
11617         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
11618         * config/i386/i386.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
11619         * config/i386/i386.c (ix86_hard_regno_call_part_clobbered): New
11620         function.
11621         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
11622         * config/mips/mips.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
11623         * config/mips/mips.c (mips_hard_regno_call_part_clobbered): New
11624         function.
11625         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
11626         * config/powerpcspe/powerpcspe.h (HARD_REGNO_CALL_PART_CLOBBERED):
11627         Delete.
11628         * config/powerpcspe/powerpcspe.c
11629         (rs6000_hard_regno_call_part_clobbered): New function.
11630         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
11631         * config/rs6000/rs6000.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
11632         * config/rs6000/rs6000.c (rs6000_hard_regno_call_part_clobbered):
11633         New function.
11634         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
11635         * config/s390/s390.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
11636         * config/s390/s390.c (s390_hard_regno_call_part_clobbered): New
11637         function.
11638         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
11639         * config/sh/sh.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
11640         * system.h (HARD_REGNO_CALL_PART_CLOBBERED): Poison.
11642 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
11643             Alan Hayward  <alan.hayward@arm.com>
11644             David Sherwood  <david.sherwood@arm.com>
11646         * rtl.h (subreg_memory_offset): Declare.
11647         * emit-rtl.c (subreg_memory_offset): New function.
11648         * expmed.c (store_bit_field_1): Use it.
11649         * expr.c (undefined_operand_subword_p): Likewise.
11650         * simplify-rtx.c (simplify_subreg): Likewise.
11652 2017-09-04  Alexander Monakov  <amonakov@ispras.ru>
11654         PR rtl-optimization/57448
11655         PR target/67458
11656         PR target/81316
11657         * optabs.c (expand_atomic_load): Place compiler memory barriers if
11658         using atomic_load pattern.
11659         (expand_atomic_store): Likewise.
11661 2017-09-04  Jakub Jelinek  <jakub@redhat.com>
11663         PR sanitizer/81981
11664         * gimple-fold.c (gimple_fold_call): Optimize away useless UBSAN_PTR
11665         and UBSAN_BOUNDS internal calls.  Clean up IFN_UBSAN_OBJECT_SIZE
11666         handling.  Use replace_call_with_value with NULL instead of
11667         gsi_replace, unlink_stmt_vdef and release_defs.
11669         * gdbhooks.py (OptMachineModePrinter.to_string): Use 8 spaces
11670         instead of tab.
11672         * lra-remat.c (reg_overlap_for_remat_p): Fix a pasto.
11674 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
11676         PR bootstrap/82045
11677         * rtl.h (emit_library_call_value_1): Declare.
11678         (emit_library_call): Replace declaration with a series of overloads.
11679         Remove the parameter count argument.
11680         (emit_library_call_value): Likewise.
11681         * calls.c (emit_library_call_value_1): Make global.  Replace varargs
11682         with an "rtx_mode_t *".
11683         (emit_library_call_value): Delete.
11684         (emit_library_call): Likewise.
11685         * asan.c (asan_emit_stack_protection): Update calls accordingly.
11686         (asan_emit_allocas_unpoison): Likewise.
11687         * builtins.c (expand_builtin_powi): Likewise.
11688         (expand_asan_emit_allocas_unpoison): Likewise.
11689         * cfgexpand.c (expand_main_function): Likewise.
11690         * config/aarch64/aarch64.c (aarch64_trampoline_init): Likewise.
11691         * config/aarch64/aarch64.h (PROFILE_HOOK): Likewise.
11692         * config/alpha/alpha.c (alpha_trampoline_init): Likewise.
11693         * config/arm/arm.c (arm_trampoline_init): Likewise.
11694         (arm_call_tls_get_addr): Likewise.
11695         (arm_expand_divmod_libfunc): Likewise.
11696         * config/bfin/bfin.md (umulsi3_highpart): Likewise.
11697         (smulsi3_highpart): Likewise.
11698         * config/c6x/c6x.c (c6x_initialize_trampoline): Likewise.
11699         (c6x_expand_compare): Likewise.
11700         (c6x_expand_movmem): Likewise.
11701         * config/frv/frv.c (frv_trampoline_init): Likewise.
11702         * config/i386/i386.c (ix86_trampoline_init): Likewise.
11703         (ix86_expand_divmod_libfunc): Likewise.
11704         * config/ia64/ia64.c (ia64_expand_tls_address): Likewise.
11705         (ia64_expand_compare): Likewise.
11706         (ia64_profile_hook): Likewise.
11707         * config/ia64/ia64.md (save_stack_nonlocal): Likewise.
11708         (nonlocal_goto): Likewise.
11709         (restore_stack_nonlocal): Likewise.
11710         * config/m32r/m32r.c (block_move_call): Likewise.
11711         (m32r_trampoline_init): Likewise.
11712         * config/m68k/linux.h (FINALIZE_TRAMPOLINE): Likewise.
11713         * config/m68k/m68k.c (m68k_call_tls_get_addr): Likewise.
11714         (m68k_call_m68k_read_tp): Likewise.
11715         * config/microblaze/microblaze.c (microblaze_call_tls_get_addr)
11716         (microblaze_expand_divide): Likewise.
11717         * config/mips/mips.h (mips_args): Likewise.
11718         * config/mips/sdemtk.h (mips_sync_icache): Likewise.
11719         (MIPS_ICACHE_SYNC): Likewise.
11720         * config/nios2/nios2.c (nios2_emit_expensive_div): Likewise.
11721         (nios2_trampoline_init): Likewise.
11722         * config/pa/pa.c (hppa_tls_call): Likewise.
11723         (pa_trampoline_init): Likewise.
11724         * config/pa/pa.md (canonicalize_funcptr_for_compare): Likewise.
11725         * config/powerpcspe/powerpcspe.c (rs6000_legitimize_tls_address)
11726         (expand_strn_compare): Likewise.
11727         (rs6000_generate_compare): Likewise.
11728         (rs6000_expand_float128_convert): Likewise.
11729         (output_profile_hook): Likewise.
11730         (rs6000_trampoline_init): Likewise.
11731         * config/powerpcspe/powerpcspe.md (neg<mode>2): Likewise.
11732         * config/riscv/riscv.h (PROFILE_HOOK): Likewise.
11733         * config/rs6000/rs6000-string.c (expand_strn_compare): Likewise.
11734         * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise.
11735         (rs6000_generate_compare): Likewise.
11736         (rs6000_expand_float128_convert): Likewise.
11737         (output_profile_hook): Likewise.
11738         (rs6000_trampoline_init): Likewise.
11739         * config/rs6000/rs6000.md (neg<mode>2): Likewise.
11740         * config/sh/sh.c (sh_trampoline_init): Likewise.
11741         * config/sparc/sparc.c (emit_soft_tfmode_libcall): Likewise.
11742         (sparc_emit_float_lib_cmp): Likewise.
11743         (sparc32_initialize_trampoline): Likewise.
11744         (sparc64_initialize_trampoline): Likewise.
11745         (sparc_profile_hook): Likewise.
11746         * config/spu/spu.c (ea_load_store): Likewise.
11747         * config/spu/spu.md (floatunssidf2): Likewise.
11748         * config/tilegx/tilegx.c (tilegx_trampoline_init): Likewise.
11749         * config/tilepro/tilepro.c (tilepro_trampoline_init): Likewise.
11750         * config/visium/visium.c (expand_block_move_4): Likewise.
11751         (expand_block_move_2): Likewise.
11752         (expand_block_move_1): Likewise.
11753         (expand_block_set_4): Likewise.
11754         (expand_block_set_2): Likewise.
11755         (expand_block_set_1): Likewise.
11756         (visium_trampoline_init): Likewise.
11757         (visium_profile_hook): Likewise.
11758         * config/xtensa/xtensa.c (xtensa_expand_nonlocal_goto): Likewise.
11759         (xtensa_setup_frame_addresses): Likewise.
11760         (xtensa_trampoline_init): Likewise.
11761         * except.c (sjlj_emit_function_enter): Likewise.
11762         (sjlj_emit_function_exit): Likewise.
11763         * explow.c (allocate_dynamic_stack_space): Likewise.
11764         (probe_stack_range): Likewise.
11765         * expr.c (convert_mode_scalar): Likewise.
11766         * optabs.c (expand_binop): Likewise.
11767         (expand_twoval_binop_libfunc): Likewise.
11768         (expand_unop): Likewise.
11769         (prepare_cmp_insn): Likewise.
11770         (prepare_float_lib_cmp): Likewise.
11771         (expand_float): Likewise.
11772         (expand_fix): Likewise.
11773         (expand_fixed_convert): Likewise.
11774         (maybe_emit_sync_lock_test_and_set): Likewise.
11775         (expand_atomic_compare_and_swap): Likewise.
11776         (expand_mem_thread_fence): Likewise.
11777         (expand_atomic_fetch_op): Likewise.
11779 2017-09-03  Gerald Pfeifer  <gerald@pfeifer.com>
11781         * doc/generic.texi (OpenACC): Adjust URL.
11782         * doc/invoke.texi (C Dialect Options): Ditto.
11784 2017-09-03  Uros Bizjak  <ubizjak@gmail.com>
11786         * config/i386/i386.md (*bt<mode>): Use nonimmediate_operand
11787         predicate for operand 1.  Add (m,<S>) constraint.
11788         (*jcc_bt<mode>): Use nonimmediate_operand predicate for operand 1.
11789         Prevent memory operand 1 with register operand 2.
11791 2017-09-01  Segher Boessenkool  <segher@kernel.crashing.org>
11793         PR rtl-optimization/82024
11794         * combine.c (try_combine): If the combination result is a PARALLEL,
11795         and we only need to retain the SET in there that would be placed
11796         at I2, check that we can place that at I3 instead, before doing so.
11798 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
11800         PR target/81766
11801         * config/i386/i386.c (ix86_init_large_pic_reg): Return label
11802         instead of void.
11803         (ix86_init_pic_reg): Remember label from ix86_init_large_pic_reg,
11804         if non-NULL and preceded by NOTE_INSN_BASIC_BLOCK, swap the note
11805         and label.
11807 2017-09-01  Joerg Sonnenberger  <joerg@bec.de>
11808             Jeff Law  <law@redhat.com>
11810         * varasm.c (bss_initializer_p): Do not put constants into .bss
11811         (categorize_decl_for_section): Handle bss_initializer_p returning
11812         false when DECL_INITIAL is NULL.
11814 2017-09-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11816         PR target/82012
11817         * config/s390/s390.c (s390_can_inline_p): New function.
11819 2017-09-01  Jeff Law  <law@redhat.com>
11821         PR tree-optimization/82052
11822         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
11823         Always initialize the returned slot after a hash table miss
11824         when INSERT is true.
11826 2017-09-01  Alexander Monakov  <amonakov@ispras.ru>
11828         * config/s390/s390.md (mem_signal_fence): Remove.
11829         * doc/md.texi (mem_signal_fence): Remove.
11830         * optabs.c (expand_mem_signal_fence): Remove uses of mem_signal_fence.
11831         Update comments.
11832         * target-insns.def (mem_signal_fence): Remove.
11834 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
11836         PR sanitizer/81902
11837         * doc/invoke.texi: Document -fsanitize=pointer-overflow.
11839         PR sanitizer/81923
11840         * asan.c (create_odr_indicator): Strip name encoding from assembler
11841         name before appending it after __odr_asan_.
11843 2017-09-01  Martin Liska  <mliska@suse.cz>
11845         PR tree-optimization/82059
11846         * gimple-ssa-isolate-paths.c (isolate_path): Add profile and
11847         frequency only when an edge is redirected.
11849 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
11851         * config/arc/arc-c.c (__ARC_LPC_WIDTH__): Add builtin define.
11852         * config/arc/arc.c (ARC_MAX_LOOP_LENGTH): Define.
11853         (arc_conditional_register_usage): Remove ARC600 lp_count
11854         exception.
11855         (arc_file_start): Emit Tag_ARC_CPU_variation.
11856         (arc_can_use_doloop_p): New conditions to use ZOLs.
11857         (hwloop_fail): New function.
11858         (hwloop_optimize): Likewise.
11859         (hwloop_pattern_reg): Likewise.
11860         (arc_doloop_hooks): New struct, to be used with reorg_loops.
11861         (arc_reorg_loops): New function, calls reorg_loops.
11862         (arc_reorg): Call arc_reorg_loops.  Remove old ZOL handling.
11863         (arc600_corereg_hazard): Remove ZOL checking, case handled by
11864         hwloop_optimize.
11865         (arc_loop_hazard): Remove function, functionality moved into
11866         hwloop_optimize.
11867         (arc_hazard): Remove arc_loop_hazard call.
11868         (arc_adjust_insn_length): Remove ZOL handling, functionality moved
11869         into hwloop_optimize.
11870         (arc_label_align): Remove ZOL handling.
11871         * config/arc/arc.h (LOOP_ALIGN): Changed to 0.
11872         * config/arc/arc.md (doloop_begin): Remove pattern.
11873         (doloop_begin_i): Likewise.
11874         (doloop_end_i): Likewise.
11875         (doloop_fallback): Likewise.
11876         (doloop_fallback_m): Likewise.
11877         (doloop_end): Reimplement expand.
11878         (arc_lp): New pattern for LP instruction.
11879         (loop_end): New pattern.
11880         (loop_fail): Likewise.
11881         (decrement_and_branch_until_zero): Likewise.
11882         * config/arc/arc.opt (mlpc-width): New option.
11883         * doc/invoke.texi (mlpc-width): Document option.
11885 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
11887         * config/arc/arc.c (arc_ifcvt): Remove use of merge_blocks call.
11888         (arc_ccfsm_advance): Fix checking for delay slots.
11889         (arc_reorg): Add rtl dump after each call to arc_ifcvt.
11891 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
11893         * config/arc/arc.md (movqi_insn): Add stores to save constant long
11894         immediates.
11895         (movhi_insn): Update store instruction constraint which are saving
11896         6-bit short immediates.
11897         (movsi_insn): Consider also short scaled load operations.
11898         (zero_extendhisi2_i): Use Usd constraint instead of T.
11899         (extendhisi2_i): Add q constraint.
11900         (arc_clzsi2): Add type and length attributes.
11901         (arc_ctzsi2): Likewise.
11902         * config/arc/constraints.md (Usc): Update constraint, the
11903         assembler can parse two relocations for a single instruction.
11905 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
11907         * config/arc/arc.c (arc_use_anchors_for_symbol_p): New function.
11908         (TARGET_USE_ANCHORS_FOR_SYMBOL_P): Define.
11910 2017-08-31  Olivier Hainque  <hainque@adacore.com>
11912         * config.gcc (powerpc-wrs-vxworks|vxworksae|vxworksmils): Now
11913         match as powerpc-wrs-vxworks*.
11915 2017-08-31  James Greenhalgh  <james.greenhalgh@arm.com>
11917         * config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): Fix
11918         register constraint for by-element operand.
11919         (aarch64_mls_elt_merge<mode>): Likewise.
11921 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
11923         * config/arc/arc.c (arc_can_follow_jump): Check for short
11924         branches.
11926 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
11928         * config.gcc: Use g.opt for arc.
11929         * config/arc/arc.c (LEGITIMATE_SCALED_ADDRESS_P): Deleted,
11930         functionality moved to ...
11931         (legitimate_scaled_address_p): New function, ...here.
11932         (LEGITIMATE_SMALL_DATA_OFFSET_P): New define.
11933         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Use the above define.
11934         (legitimate_offset_address_p): Delete TARGET_NO_SDATA_SET
11935         condition.
11936         (arc_override_options): Handle G option.
11937         (arc_output_pic_addr_const): Correct function definition.
11938         (arc_legitimate_address_p): Use legitimate_scaled_address_p.
11939         (arc_decl_anon_ns_mem_p): Delete.
11940         (arc_in_small_data_p): Overhaul this function to take into
11941         consideration the value given via G option.
11942         (arc_rewrite_small_data_1): Renamed and corrected old
11943         arc_rewrite_small_data function.
11944         (arc_rewrite_small_data): New function.
11945         (small_data_pattern): Don't use pic_offset_table_rtx.
11946         * config/arc/arc.h (CC1_SPEC): Recognize G option.
11947         * config/arc/simdext.md (movmisalignv2hi): Use
11948         prepare_move_operands function.
11949         (mov*): Likewise.
11950         (movmisalign*): Likewise.
11951         * doc/invoke.texi (ARC options): Document -G option.
11953 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
11955         * config/arc/arc-protos.h (compact_sda_memory_operand): Update
11956         prototype.
11957         * config/arc/arc.c (arc_print_operand): Output scalled address for
11958         sdata whenever is possible.
11959         (arc_in_small_data_p): Allow sdata for 64bit datum when double
11960         load/stores are available.
11961         (compact_sda_memory_operand): Check for the alignment required by
11962         code density instructions.
11963         * config/arc/arc.md (movsi_insn): Use newly introduced Us0
11964         constraint.
11965         * config/arc/constraints.md (Usd): Update constraint.
11966         (Us0): New constraint.
11967         (Usc): Update constraint.
11969 2017-08-31  Richard Biener  <rguenther@suse.de>
11971         PR middle-end/82054
11972         * dwarf2out.c (dwarf2out_early_global_decl): Process each
11973         function only once.
11975 2017-08-31  Tamar Christina  <tamar.christina@arm.com>
11977         * config/aarch64/aarch64-builtins.c (aarch64_init_simd_builtins):
11978         Resize type_signature.
11980 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
11981             Alan Hayward  <alan.hayward@arm.com>
11982             David Sherwood  <david.sherwood@arm.com>
11984         * config/aarch64/aarch64.c (aarch64_base_register_rtx_p): Only allow
11985         subregs whose inner modes can be stored in GPRs.
11986         (aarch64_classify_index): Likewise.
11988 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
11989             Alan Hayward  <alan.hayward@arm.com>
11990             David Sherwood  <david.sherwood@arm.com>
11992         * config/aarch64/iterators.md (V_cmp_result): Rename to...
11993         (V_INT_EQUIV): ...this.
11994         (v_cmp_result): Rename to...
11995         (v_int_equiv): ...this.
11996         * config/aarch64/aarch64.md (xorsign<mode>3): Update accordingly.
11997         * config/aarch64/aarch64-simd.md (xorsign<mode>3): Likewise.
11998         (copysign<mode>3): Likewise.
11999         (aarch64_simd_bsl<mode>_internal): Likewise.
12000         (aarch64_simd_bsl<mode>): Likewise.
12001         (vec_cmp<mode><mode>): Likewise.
12002         (vcond<mode><mode>): Likewise.
12003         (vcond<v_cmp_mixed><mode>): Likewise.
12004         (vcondu<mode><v_cmp_mixed>): Likewise.
12005         (aarch64_cm<optab><mode>): Likewise.
12006         (aarch64_cmtst<mode>): Likewise.
12007         (aarch64_fac<optab><mode>): Likewise.
12008         (vec_perm_const<mode>): Likewise.
12009         (vcond_mask_<mode><v_cmp_result>): Rename to...
12010         (vcond_mask_<mode><v_int_equiv>): ...this.
12011         (vec_cmp<mode><v_cmp_result>): Rename to...
12012         (vec_cmp<mode><v_int_equiv>): ...this.
12014 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
12015             Alan Hayward  <alan.hayward@arm.com>
12016             David Sherwood  <david.sherwood@arm.com>
12018         * config/aarch64/aarch64-modes.def: Remove 32-, 48- and 64-byte
12019         vector modes.
12020         * config/aarch64/iterators.md (VRL2, VRL3, VRL4): Delete.
12021         * config/aarch64/aarch64.md (UNSPEC_LD2_DREG, UNSPEC_LD3_DREG)
12022         (UNSPEC_LD4_DREG): New unspecs.
12023         * config/aarch64/aarch64-simd.md (aarch64_ld2<mode>_dreg_le)
12024         (aarch64_ld2<mode>_dreg_be): Replace with...
12025         (aarch64_ld2<mode>_dreg): ...this pattern and use the new DREG
12026         unspec.
12027         (aarch64_ld3<mode>_dreg_le)
12028         (aarch64_ld3<mode>_dreg_be): Replace with...
12029         (aarch64_ld3<mode>_dreg): ...this pattern and use the new DREG
12030         unspec.
12031         (aarch64_ld4<mode>_dreg_le)
12032         (aarch64_ld4<mode>_dreg_be): Replace with...
12033         (aarch64_ld4<mode>_dreg): ...this pattern and use the new DREG
12034         unspec.
12036 2017-08-30  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12038         PR tree-optimization/81987
12039         * gimple-ssa-strength-reduction.c (insert_initializers): Don't
12040         insert an initializer in a location not dominated by the stride
12041         definition.
12043 2017-08-30  Eric Botcazou  <ebotcazou@adacore.com>
12045         * tree-eh.c (lower_try_finally_switch): Set the location of the finally
12046         on the entire header of the finally block in the fallthru case.
12048 2017-08-30  Eric Botcazou  <ebotcazou@adacore.com>
12050         * varasm.c (decode_addr_const): Deal with INDIRECT_REF <INTEGER_CST>.
12052 2017-08-30  Pat Haugen  <pthaugen@us.ibm.com>
12054         * config/rs6000/rs6000.c (rs6000_emit_prologue_move_from_cr): Rename from
12055         rs6000_emit_move_from_cr and call renamed function.
12056         (rs6000_emit_prologue): Call renamed functions.
12057         * config/rs6000/rs6000.md (prologue_movesi_from_cr): Rename from
12058         movesi_from_cr, remove volatile CRs.
12060 2017-08-30  Jon Beniston  <jon@beniston.com>
12061             Richard Biener  <rguenther@suse.de>
12063         * tree-vect-patterns.c (vect_pattern_recog_1): Use VECTOR_TYPE_P instead
12064         of VECTOR_MODE_P check.
12065         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Allow single
12066         element vector types.
12068 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12070         * df.h (df_read_modify_subreg_p): Remove in favor of...
12071         * rtl.h (read_modify_subreg_p): ...this new function.  Take a
12072         const_rtx instead of an rtx.
12073         * cprop.c (local_cprop_find_used_regs): Update accordingly.
12074         * df-problems.c (df_word_lr_mark_ref): Likewise.
12075         * ira-lives.c (mark_pseudo_reg_live): Likewise.
12076         (mark_pseudo_reg_dead): Likewise.
12077         (mark_ref_dead): Likewise.
12078         * reginfo.c (init_subregs_of_mode): Likewise.
12079         * sched-deps.c (sched_analyze_1): Likewise.
12080         * df-scan.c (df_def_record_1): Likewise.
12081         (df_uses_record): Likewise.
12082         (df_read_modify_subreg_p): Remove in favor of...
12083         * rtlanal.c (read_modify_subreg_p): ...this new function.  Take a
12084         const_rtx instead of an rtx.
12086 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12087             Alan Hayward  <alan.hayward@arm.com>
12088             David Sherwood  <david.sherwood@arm.com>
12090         * rtl.h (partial_subreg_p): New function.
12091         * caller-save.c (save_call_clobbered_regs): Use it.
12092         * calls.c (expand_call): Likewise.
12093         * combine.c (combinable_i3pat): Likewise.
12094         (simplify_set): Likewise.
12095         (make_extraction): Likewise.
12096         (make_compound_operation_int): Likewise.
12097         (gen_lowpart_or_truncate): Likewise.
12098         (force_to_mode): Likewise.
12099         (make_field_assignment): Likewise.
12100         (reg_truncated_to_mode): Likewise.
12101         (record_truncated_value): Likewise.
12102         (move_deaths): Likewise.
12103         * cse.c (record_jump_cond): Likewise.
12104         (cse_insn): Likewise.
12105         * cselib.c (cselib_lookup_1): Likewise.
12106         * expmed.c (extract_bit_field_using_extv): Likewise.
12107         * function.c (assign_parm_setup_reg): Likewise.
12108         * ifcvt.c (noce_convert_multiple_sets): Likewise.
12109         * ira-build.c (create_insn_allocnos): Likewise.
12110         * lra-coalesce.c (merge_pseudos): Likewise.
12111         * lra-constraints.c (match_reload): Likewise.
12112         (simplify_operand_subreg): Likewise.
12113         (curr_insn_transform): Likewise.
12114         * lra-lives.c (process_bb_lives): Likewise.
12115         * lra.c (new_insn_reg): Likewise.
12116         (lra_substitute_pseudo): Likewise.
12117         * regcprop.c (mode_change_ok): Likewise.
12118         (maybe_mode_change): Likewise.
12119         (copyprop_hardreg_forward_1): Likewise.
12120         * reload.c (push_reload): Likewise.
12121         (find_reloads): Likewise.
12122         (find_reloads_subreg_address): Likewise.
12123         * reload1.c (alter_reg): Likewise.
12124         (eliminate_regs_1): Likewise.
12125         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
12127 2017-08-30  David Edelsohn  <dje.gcc@gmail.com>
12129         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Revert
12130         back to if statements, including unpack.
12132 2017-08-30  Martin Liska  <mliska@suse.cz>
12134         PR inline-asm/82001
12135         * ipa-icf-gimple.c (func_checker::compare_tree_list_operand):
12136         Rename to ...
12137         (func_checker::compare_asm_inputs_outputs): ... this function.
12138         (func_checker::compare_gimple_asm): Use the function to compare
12139         also ASM constrains.
12140         * ipa-icf-gimple.h: Rename the function.
12142 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12143             Alan Hayward  <alan.hayward@arm.com>
12144             David Sherwood  <david.sherwood@arm.com>
12146         * coretypes.h (complex_mode): New type.
12147         * gdbhooks.py (build_pretty_printer): Handle it.
12148         * machmode.h (complex_mode): New class.
12149         (complex_mode::includes_p): New function.
12150         (is_complex_int_mode): Likewise.
12151         (is_complex_float_mode): Likewise.
12152         * genmodes.c (get_mode_class): Handle complex mode classes.
12153         * function.c (expand_function_end): Use is_complex_int_mode.
12155 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12156             Alan Hayward  <alan.hayward@arm.com>
12157             David Sherwood  <david.sherwood@arm.com>
12159         * coretypes.h (scalar_mode_pod): New typedef.
12160         * gdbhooks.py (build_pretty_printer): Handle it.
12161         * machmode.h (gt_ggc_mx, gt_pch_nx): New functions.
12162         * fixed-value.h (fixed_value::mode): Change type to scalar_mode_pod.
12163         * fold-const.c (fold_convert_const_int_from_fixed): Use scalar_mode.
12164         * tree-streamer-in.c (unpack_ts_fixed_cst_value_fields): Use
12165         as_a <scalar_mode>.
12167 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12168             Alan Hayward  <alan.hayward@arm.com>
12169             David Sherwood  <david.sherwood@arm.com>
12171         * machmode.h (mode_for_vector): Take a scalar_mode instead
12172         of a machine_mode.
12173         * stor-layout.c (mode_for_vector): Likewise.
12174         * explow.c (promote_mode): Use as_a <scalar_mode>.
12175         * sdbout.c (sdbout_parms): Use is_a <scalar_mode>.
12177 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12178             Alan Hayward  <alan.hayward@arm.com>
12179             David Sherwood  <david.sherwood@arm.com>
12181         * target.def (preferred_simd_mode): Take a scalar_mode
12182         instead of a machine_mode.
12183         * targhooks.h (default_preferred_simd_mode): Likewise.
12184         * targhooks.c (default_preferred_simd_mode): Likewise.
12185         * config/arc/arc.c (arc_preferred_simd_mode): Likewise.
12186         * config/arm/arm.c (arm_preferred_simd_mode): Likewise.
12187         * config/c6x/c6x.c (c6x_preferred_simd_mode): Likewise.
12188         * config/epiphany/epiphany.c (epiphany_preferred_simd_mode): Likewise.
12189         * config/i386/i386.c (ix86_preferred_simd_mode): Likewise.
12190         * config/mips/mips.c (mips_preferred_simd_mode): Likewise.
12191         * config/nvptx/nvptx.c (nvptx_preferred_simd_mode): Likewise.
12192         * config/powerpcspe/powerpcspe.c (rs6000_preferred_simd_mode):
12193         Likewise.
12194         * config/rs6000/rs6000.c (rs6000_preferred_simd_mode): Likewise.
12195         * config/s390/s390.c (s390_preferred_simd_mode): Likewise.
12196         * config/sparc/sparc.c (sparc_preferred_simd_mode): Likewise.
12197         * config/aarch64/aarch64.c (aarch64_preferred_simd_mode): Likewise.
12198         (aarch64_simd_scalar_immediate_valid_for_move): Update accordingly.
12199         * doc/tm.texi: Regenerate.
12200         * optabs-query.c (can_vec_mask_load_store_p): Return false for
12201         non-scalar modes.
12203 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12204             Alan Hayward  <alan.hayward@arm.com>
12205             David Sherwood  <david.sherwood@arm.com>
12207         * target.def (scalar_mode_supported_p): Take a scalar_mode
12208         instead of a machine_mode.
12209         * targhooks.h (default_scalar_mode_supported_p): Likewise.
12210         * targhooks.c (default_scalar_mode_supported_p): Likewise.
12211         * config/aarch64/aarch64.c (aarch64_scalar_mode_supported_p): Likewise.
12212         * config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
12213         * config/arm/arm.c (arm_scalar_mode_supported_p): Likewise.
12214         * config/avr/avr.c (avr_scalar_mode_supported_p): Likewise.
12215         * config/c6x/c6x.c (c6x_scalar_mode_supported_p): Likewise.
12216         * config/i386/i386.c (ix86_scalar_mode_supported_p): Likewise.
12217         * config/ia64/ia64.c (ia64_scalar_mode_supported_p): Likewise.
12218         * config/mips/mips.c (mips_scalar_mode_supported_p): Likewise.
12219         * config/msp430/msp430.c (msp430_scalar_mode_supported_p): Likewise.
12220         * config/pa/pa.c (pa_scalar_mode_supported_p): Likewise.
12221         * config/pdp11/pdp11.c (pdp11_scalar_mode_supported_p): Likewise.
12222         * config/powerpcspe/powerpcspe.c (rs6000_scalar_mode_supported_p):
12223         Likewise.
12224         * config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p): Likewise.
12225         * config/s390/s390.c (s390_scalar_mode_supported_p): Likewise.
12226         * config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
12227         * config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
12228         * config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p):
12229         Likewise.
12230         * doc/tm.texi: Regenerate.
12232 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12233             Alan Hayward  <alan.hayward@arm.com>
12234             David Sherwood  <david.sherwood@arm.com>
12236         * coretypes.h (opt_scalar_mode): New typedef.
12237         * gdbhooks.py (build_pretty_printers): Handle it.
12238         * machmode.h (mode_iterator::get_2xwider): Add overload for
12239         opt_mode<T>.
12240         * emit-rtl.c (init_emit_once): Use opt_scalar_mode when iterating
12241         over scalar modes.
12242         * expr.c (convert_mode_scalar): Likewise.
12243         * omp-low.c (omp_clause_aligned_alignment): Likewise.
12244         * optabs.c (expand_float): Likewise.
12245         (expand_fix): Likewise.
12246         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
12248 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12249             Alan Hayward  <alan.hayward@arm.com>
12250             David Sherwood  <david.sherwood@arm.com>
12252         * optabs.c (expand_float): Explicitly check for scalars before
12253         using a branching expansion.
12254         (expand_fix): Likewise.
12256 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12257             Alan Hayward  <alan.hayward@arm.com>
12258             David Sherwood  <david.sherwood@arm.com>
12260         * expr.c (convert_mode): Split scalar handling out into...
12261         (convert_mode_scalar): ...this new function.  Treat the modes
12262         as scalar_modes.
12264 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12265             Alan Hayward  <alan.hayward@arm.com>
12266             David Sherwood  <david.sherwood@arm.com>
12268         * omp-expand.c (expand_omp_atomic): Use is_int_mode, is_float_mode
12269         and scalar_mode.
12270         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Likewise.
12272 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12273             Alan Hayward  <alan.hayward@arm.com>
12274             David Sherwood  <david.sherwood@arm.com>
12276         * fixed-value.h (fixed_from_double_int): Take a scalar_mode
12277         rather than a machine_mode.
12278         (fixed_from_string): Likewise.
12279         (fixed_convert): Likewise.
12280         (fixed_convert_from_int): Likewise.
12281         (fixed_convert_from_real): Likewise.
12282         (real_convert_from_fixed): Likewise.
12283         * fixed-value.c (fixed_from_double_int): Likewise.
12284         (fixed_from_string): Likewise.
12285         (fixed_convert): Likewise.
12286         (fixed_convert_from_int): Likewise.
12287         (fixed_convert_from_real): Likewise.
12288         (real_convert_from_fixed): Likewise.
12289         * config/avr/avr.c (avr_out_round): Use as_a <scalar_mode>.
12291 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12292             Alan Hayward  <alan.hayward@arm.com>
12293             David Sherwood  <david.sherwood@arm.com>
12295         * emit-rtl.c (immed_double_const): Use is_a <scalar_mode> instead
12296         of separate mode class checks.  Do not allow vector modes here.
12297         (immed_wide_int_const): Use as_a <scalar_mode>.
12298         * explow.c (trunc_int_for_mode): Likewise.
12299         * rtl.h (wi::int_traits<rtx_mode_t>::get_precision): Likewise.
12300         (wi::shwi): Likewise.
12301         (wi::min_value): Likewise.
12302         (wi::max_value): Likewise.
12303         * dwarf2out.c (loc_descriptor): Likewise.
12304         * simplify-rtx.c (simplify_immed_subreg): Fix rtx_mode_t argument
12305         for CONST_WIDE_INT.
12307 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12308             Alan Hayward  <alan.hayward@arm.com>
12309             David Sherwood  <david.sherwood@arm.com>
12311         * tree.h (SCALAR_TYPE_MODE): New macro.
12312         * expr.c (expand_expr_addr_expr_1): Use it.
12313         (expand_expr_real_2): Likewise.
12314         * fold-const.c (fold_convert_const_fixed_from_fixed): Likeise.
12315         (fold_convert_const_fixed_from_int): Likewise.
12316         (fold_convert_const_fixed_from_real): Likewise.
12317         (native_encode_fixed): Likewise
12318         (native_encode_complex): Likewise
12319         (native_encode_vector): Likewise.
12320         (native_interpret_fixed): Likewise.
12321         (native_interpret_real): Likewise.
12322         (native_interpret_complex): Likewise.
12323         (native_interpret_vector): Likewise.
12324         * omp-simd-clone.c (simd_clone_adjust_return_type): Likewise.
12325         (simd_clone_adjust_argument_types): Likewise.
12326         (simd_clone_init_simd_arrays): Likewise.
12327         (simd_clone_adjust): Likewise.
12328         * stor-layout.c (layout_type): Likewise.
12329         * tree.c (build_minus_one_cst): Likewise.
12330         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
12331         * tree-inline.c (estimate_move_cost): Likewise.
12332         * tree-ssa-math-opts.c (convert_plusminus_to_widen): Likewise.
12333         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise.
12334         (vectorizable_reduction): Likewise.
12335         * tree-vect-patterns.c (vect_recog_widen_mult_pattern): Likewise.
12336         (vect_recog_mixed_size_cond_pattern): Likewise.
12337         (check_bool_pattern): Likewise.
12338         (adjust_bool_pattern): Likewise.
12339         (search_type_for_mask_1): Likewise.
12340         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
12341         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
12342         (vectorizable_load): Likewise.
12343         (vectorizable_store): Likewise.
12344         * ubsan.c (ubsan_encode_value): Likewise.
12345         * varasm.c (output_constant): Likewise.
12347 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12348             Alan Hayward  <alan.hayward@arm.com>
12349             David Sherwood  <david.sherwood@arm.com>
12351         * coretypes.h (scalar_mode): New class.
12352         * machmode.h (scalar_mode): Likewise.
12353         (scalar_mode::includes_p): New function.
12354         (mode_to_inner): Return a scalar_mode rather than a machine_mode.
12355         * gdbhooks.py (build_pretty_printers): Handle scalar_mode.
12356         * genmodes.c (get_mode_class): Handle remaining scalar modes.
12357         * cfgexpand.c (expand_debug_expr): Use scalar_mode.
12358         * expmed.c (store_bit_field_1): Likewise.
12359         (extract_bit_field_1): Likewise.
12360         * expr.c (write_complex_part): Likewise.
12361         (read_complex_part): Likewise.
12362         (emit_move_complex_push): Likewise.
12363         (expand_expr_real_2): Likewise.
12364         * function.c (assign_parm_setup_reg): Likewise.
12365         (assign_parms_unsplit_complex): Likewise.
12366         * optabs.c (expand_binop): Likewise.
12367         * rtlanal.c (subreg_get_info): Likewise.
12368         * simplify-rtx.c (simplify_immed_subreg): Likewise.
12369         * varasm.c (output_constant_pool_2): Likewise.
12371 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12372             Alan Hayward  <alan.hayward@arm.com>
12373             David Sherwood  <david.sherwood@arm.com>
12375         * expmed.c (extract_high_half): Use scalar_int_mode and remove
12376         assertion.
12377         (expmed_mult_highpart_optab): Likewise.
12378         (expmed_mult_highpart): Likewise.
12380 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12381             Alan Hayward  <alan.hayward@arm.com>
12382             David Sherwood  <david.sherwood@arm.com>
12384         * builtins.h (builtin_strncpy_read_str): Take a scalar_int_mode
12385         instead of a machine_mode.
12386         (builtin_memset_read_str): Likewise.
12387         * builtins.c (c_readstr): Likewise.
12388         (builtin_memcpy_read_str): Likewise.
12389         (builtin_strncpy_read_str): Likewise.
12390         (builtin_memset_read_str): Likewise.
12391         (builtin_memset_gen_str): Likewise.
12392         (expand_builtin_signbit): Use scalar_int_mode for local variables.
12393         * cfgexpand.c (convert_debug_memory_address): Take a scalar_int_mode
12394         instead of a machine_mode.
12395         * combine.c (simplify_if_then_else): Use scalar_int_mode for local
12396         variables.
12397         (make_extraction): Likewise.
12398         (try_widen_shift_mode): Take and return scalar_int_modes instead
12399         of machine_modes.
12400         * config/aarch64/aarch64.c (aarch64_libgcc_cmp_return_mode): Return
12401         a scalar_int_mode instead of a machine_mode.
12402         * config/avr/avr.c (avr_addr_space_address_mode): Likewise.
12403         (avr_addr_space_pointer_mode): Likewise.
12404         * config/cr16/cr16.c (cr16_unwind_word_mode): Likewise.
12405         * config/msp430/msp430.c (msp430_addr_space_pointer_mode): Likewise.
12406         (msp430_unwind_word_mode): Likewise.
12407         * config/spu/spu.c (spu_unwind_word_mode): Likewise.
12408         (spu_addr_space_pointer_mode): Likewise.
12409         (spu_addr_space_address_mode): Likewise.
12410         (spu_libgcc_cmp_return_mode): Likewise.
12411         (spu_libgcc_shift_count_mode): Likewise.
12412         * config/rl78/rl78.c (rl78_addr_space_address_mode): Likewise.
12413         (rl78_addr_space_pointer_mode): Likewise.
12414         (fl78_unwind_word_mode): Likewise.
12415         (rl78_valid_pointer_mode): Take a scalar_int_mode instead of a
12416         machine_mode.
12417         * config/alpha/alpha.c (vms_valid_pointer_mode): Likewise.
12418         * config/ia64/ia64.c (ia64_vms_valid_pointer_mode): Likewise.
12419         * config/mips/mips.c (mips_mode_rep_extended): Likewise.
12420         (mips_valid_pointer_mode): Likewise.
12421         * config/tilegx/tilegx.c (tilegx_mode_rep_extended): Likewise.
12422         * config/ft32/ft32.c (ft32_valid_pointer_mode): Likewise.
12423         (ft32_addr_space_pointer_mode): Return a scalar_int_mode instead
12424         of a machine_mode.
12425         (ft32_addr_space_address_mode): Likewise.
12426         * config/m32c/m32c.c (m32c_valid_pointer_mode): Take a
12427         scalar_int_mode instead of a machine_mode.
12428         (m32c_addr_space_pointer_mode): Return a scalar_int_mode instead
12429         of a machine_mode.
12430         (m32c_addr_space_address_mode): Likewise.
12431         * config/powerpcspe/powerpcspe.c (rs6000_abi_word_mode): Likewise.
12432         (rs6000_eh_return_filter_mode): Likewise.
12433         * config/rs6000/rs6000.c (rs6000_abi_word_mode): Likewise.
12434         (rs6000_eh_return_filter_mode): Likewise.
12435         * config/s390/s390.c (s390_libgcc_cmp_return_mode): Likewise.
12436         (s390_libgcc_shift_count_mode): Likewise.
12437         (s390_unwind_word_mode): Likewise.
12438         (s390_valid_pointer_mode): Take a scalar_int_mode rather than a
12439         machine_mode.
12440         * target.def (mode_rep_extended): Likewise.
12441         (valid_pointer_mode): Likewise.
12442         (addr_space.valid_pointer_mode): Likewise.
12443         (eh_return_filter_mode): Return a scalar_int_mode rather than
12444         a machine_mode.
12445         (libgcc_cmp_return_mode): Likewise.
12446         (libgcc_shift_count_mode): Likewise.
12447         (unwind_word_mode): Likewise.
12448         (addr_space.pointer_mode): Likewise.
12449         (addr_space.address_mode): Likewise.
12450         * doc/tm.texi: Regenerate.
12451         * dojump.c (prefer_and_bit_test): Take a scalar_int_mode rather than
12452         a machine_mode.
12453         (do_jump): Use scalar_int_mode for local variables.
12454         * dwarf2cfi.c (init_return_column_size): Take a scalar_int_mode
12455         rather than a machine_mode.
12456         * dwarf2out.c (convert_descriptor_to_mode): Likewise.
12457         (scompare_loc_descriptor_wide): Likewise.
12458         (scompare_loc_descriptor_narrow): Likewise.
12459         * emit-rtl.c (adjust_address_1): Use scalar_int_mode for local
12460         variables.
12461         * except.c (sjlj_emit_dispatch_table): Likewise.
12462         (expand_builtin_eh_copy_values): Likewise.
12463         * explow.c (convert_memory_address_addr_space_1): Likewise.
12464         Take a scalar_int_mode rather than a machine_mode.
12465         (convert_memory_address_addr_space): Take a scalar_int_mode rather
12466         than a machine_mode.
12467         (memory_address_addr_space): Use scalar_int_mode for local variables.
12468         * expmed.h (expand_mult_highpart_adjust): Take a scalar_int_mode
12469         rather than a machine_mode.
12470         * expmed.c (mask_rtx): Likewise.
12471         (init_expmed_one_conv): Likewise.
12472         (expand_mult_highpart_adjust): Likewise.
12473         (extract_high_half): Likewise.
12474         (expmed_mult_highpart_optab): Likewise.
12475         (expmed_mult_highpart): Likewise.
12476         (expand_smod_pow2): Likewise.
12477         (expand_sdiv_pow2): Likewise.
12478         (emit_store_flag_int): Likewise.
12479         (adjust_bit_field_mem_for_reg): Use scalar_int_mode for local
12480         variables.
12481         (extract_low_bits): Likewise.
12482         * expr.h (by_pieces_constfn): Take a scalar_int_mode rather than
12483         a machine_mode.
12484         * expr.c (pieces_addr::adjust):  Likewise.
12485         (can_store_by_pieces): Likewise.
12486         (store_by_pieces): Likewise.
12487         (clear_by_pieces_1): Likewise.
12488         (expand_expr_addr_expr_1): Likewise.
12489         (expand_expr_addr_expr): Use scalar_int_mode for local variables.
12490         (expand_expr_real_1): Likewise.
12491         (try_casesi): Likewise.
12492         * final.c (shorten_branches): Likewise.
12493         * fold-const.c (fold_convert_const_int_from_fixed): Change the
12494         type of "mode" to machine_mode.
12495         * internal-fn.c (expand_arith_overflow_result_store): Take a
12496         scalar_int_mode rather than a machine_mode.
12497         (expand_mul_overflow): Use scalar_int_mode for local variables.
12498         * loop-doloop.c (doloop_modify): Likewise.
12499         (doloop_optimize): Likewise.
12500         * optabs.c (expand_subword_shift): Take a scalar_int_mode rather
12501         than a machine_mode.
12502         (expand_doubleword_shift_condmove): Likewise.
12503         (expand_doubleword_shift): Likewise.
12504         (expand_doubleword_clz): Likewise.
12505         (expand_doubleword_popcount): Likewise.
12506         (expand_doubleword_parity): Likewise.
12507         (expand_absneg_bit): Use scalar_int_mode for local variables.
12508         (prepare_float_lib_cmp): Likewise.
12509         * rtl.h (convert_memory_address_addr_space_1): Take a scalar_int_mode
12510         rather than a machine_mode.
12511         (convert_memory_address_addr_space): Likewise.
12512         (get_mode_bounds): Likewise.
12513         (get_address_mode): Return a scalar_int_mode rather than a
12514         machine_mode.
12515         * rtlanal.c (get_address_mode): Likewise.
12516         * stor-layout.c (get_mode_bounds): Take a scalar_int_mode rather
12517         than a machine_mode.
12518         * targhooks.c (default_mode_rep_extended): Likewise.
12519         (default_valid_pointer_mode): Likewise.
12520         (default_addr_space_valid_pointer_mode): Likewise.
12521         (default_eh_return_filter_mode): Return a scalar_int_mode rather
12522         than a machine_mode.
12523         (default_libgcc_cmp_return_mode): Likewise.
12524         (default_libgcc_shift_count_mode): Likewise.
12525         (default_unwind_word_mode): Likewise.
12526         (default_addr_space_pointer_mode): Likewise.
12527         (default_addr_space_address_mode): Likewise.
12528         * targhooks.h (default_eh_return_filter_mode): Likewise.
12529         (default_libgcc_cmp_return_mode): Likewise.
12530         (default_libgcc_shift_count_mode): Likewise.
12531         (default_unwind_word_mode): Likewise.
12532         (default_addr_space_pointer_mode): Likewise.
12533         (default_addr_space_address_mode): Likewise.
12534         (default_mode_rep_extended): Take a scalar_int_mode rather than
12535         a machine_mode.
12536         (default_valid_pointer_mode): Likewise.
12537         (default_addr_space_valid_pointer_mode): Likewise.
12538         * tree-ssa-address.c (addr_for_mem_ref): Use scalar_int_mode for
12539         local variables.
12540         * tree-ssa-loop-ivopts.c (get_shiftadd_cost): Take a scalar_int_mode
12541         rather than a machine_mode.
12542         * tree-switch-conversion.c (array_value_type): Use scalar_int_mode
12543         for local variables.
12544         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
12545         * var-tracking.c (use_narrower_mode): Take a scalar_int_mode rather
12546         than a machine_mode.
12548 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12549             Alan Hayward  <alan.hayward@arm.com>
12550             David Sherwood  <david.sherwood@arm.com>
12552         * dojump.c (do_jump_by_parts_greater_rtx): Change the type of
12553         the mode argument to scalar_int_mode.
12554         (do_jump_by_parts_zero_rtx): Likewise.
12555         (do_jump_by_parts_equality_rtx): Likewise.
12556         (do_jump_by_parts_greater): Take a mode argument.
12557         (do_jump_by_parts_equality): Likewise.
12558         (do_jump_1): Update calls accordingly.
12560 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12561             Alan Hayward  <alan.hayward@arm.com>
12562             David Sherwood  <david.sherwood@arm.com>
12564         * is-a.h (safe_dyn_cast): New function.
12565         * rtl.h (rtx_jump_table_data::get_data_mode): New function.
12566         (jump_table_for_label): Likewise.
12567         * final.c (final_addr_vec_align): Take an rtx_jump_table_data *
12568         instead of an rtx_insn *.
12569         (shorten_branches): Use dyn_cast instead of LABEL_P and
12570         JUMP_TABLE_DATA_P.  Use jump_table_for_label and
12571         rtx_jump_table_data::get_data_mode.
12572         (final_scan_insn): Likewise.
12574 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12575             Alan Hayward  <alan.hayward@arm.com>
12576             David Sherwood  <david.sherwood@arm.com>
12578         * combine.c (try_combine): Use is_a <scalar_int_mode> when
12579         trying to combine a full-register integer set with a subreg
12580         integer set.
12582 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12583             Alan Hayward  <alan.hayward@arm.com>
12584             David Sherwood  <david.sherwood@arm.com>
12586         * expr.c (expand_expr_addr_expr): Add a new_tmode local variable
12587         that is always either address_mode or pointer_mode.
12589 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12590             Alan Hayward  <alan.hayward@arm.com>
12591             David Sherwood  <david.sherwood@arm.com>
12593         * expr.c (expand_expr_real_2): Use word_mode instead of innermode
12594         when the two are known to be equal.
12596 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12597             Alan Hayward  <alan.hayward@arm.com>
12598             David Sherwood  <david.sherwood@arm.com>
12600         * simplify-rtx.c (simplify_const_unary_operation): Use
12601         is_a <scalar_int_mode> instead of checking for a nonzero
12602         precision.  Forcibly convert op_mode to a scalar_int_mode
12603         in that case.  More clearly differentiate the operand and
12604         result modes and use the former when deciding what the value
12605         of a count-bits operation should be.  Use is_int_mode instead
12606         of checking for a MODE_INT.  Remove redundant check for whether
12607         this mode has a zero precision.
12609 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12610             Alan Hayward  <alan.hayward@arm.com>
12611             David Sherwood  <david.sherwood@arm.com>
12613         * optabs.c (widen_leading): Change the type of the mode argument
12614         to scalar_int_mode.  Use opt_scalar_int_mode for the mode iterator.
12615         (widen_bswap): Likewise.
12616         (expand_parity): Likewise.
12617         (expand_ctz): Change the type of the mode argument to scalar_int_mode.
12618         (expand_ffs): Likewise.
12619         (epand_unop): Check for scalar integer modes before calling the
12620         above routines.
12622 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12623             Alan Hayward  <alan.hayward@arm.com>
12624             David Sherwood  <david.sherwood@arm.com>
12626         * expr.c (const_scalar_mask_from_tree): Add a mode argument.
12627         Expand commentary.
12628         (expand_expr_real_1): Update call accordingly.
12630 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12631             Alan Hayward  <alan.hayward@arm.com>
12632             David Sherwood  <david.sherwood@arm.com>
12634         * expmed.c (store_bit_field_using_insv): Add op0_mode and
12635         value_mode arguments.  Use scalar_int_mode internally.
12636         (store_bit_field_1): Rename the new integer mode from imode
12637         to op0_mode and use it instead of GET_MODE (op0).  Update calls
12638         to store_split_bit_field, store_bit_field_using_insv and
12639         store_fixed_bit_field.
12640         (store_fixed_bit_field): Add op0_mode and value_mode arguments.
12641         Use scalar_int_mode internally.  Use a bit count rather than a mode
12642         when calculating the largest bit size for get_best_mode.
12643         Update calls to store_split_bit_field and store_fixed_bit_field_1.
12644         (store_fixed_bit_field_1): Add mode and value_mode arguments.
12645         Remove assertion that OP0 has a scalar integer mode.
12646         (store_split_bit_field): Add op0_mode and value_mode arguments.
12647         Update calls to extract_fixed_bit_field.
12648         (extract_bit_field_using_extv): Add an op0_mode argument.
12649         Use scalar_int_mode internally.
12650         (extract_bit_field_1): Rename the new integer mode from imode to
12651         op0_mode and use it instead of GET_MODE (op0).  Update calls to
12652         extract_split_bit_field, extract_bit_field_using_extv and
12653         extract_fixed_bit_field.
12654         (extract_fixed_bit_field): Add an op0_mode argument.  Update calls
12655         to extract_split_bit_field and extract_fixed_bit_field_1.
12656         (extract_fixed_bit_field_1): Add a mode argument.  Remove assertion
12657         that OP0 has a scalar integer mode.  Use as_a <scalar_int_mode>
12658         on the target mode.
12659         (extract_split_bit_field): Add an op0_mode argument.  Update call
12660         to extract_fixed_bit_field.
12662 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12663             Alan Hayward  <alan.hayward@arm.com>
12664             David Sherwood  <david.sherwood@arm.com>
12666         * cse.c (cse_insn): Use opt_scalar_int_mode for the mode iterator.
12667         * explow.c (hard_function_value): Likewise.
12668         * expmed.c (extract_fixed_bit_field_1): Likewise.  Move the
12669         convert_to_mode call outside the loop.
12670         * expr.c (alignment_for_piecewise_move): Use opt_scalar_int_mode
12671         for the mode iterator.  Require the mode specified by max_pieces
12672         to exist.
12673         (emit_block_move_via_movmem): Use opt_scalar_int_mode for the
12674         mode iterator.
12675         (copy_blkmode_to_reg): Likewise.
12676         (set_storage_via_setmem): Likewise.
12677         * optabs.c (prepare_cmp_insn): Likewise.
12678         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
12679         * stor-layout.c (finish_bitfield_representative): Likewise.
12681 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12682             Alan Hayward  <alan.hayward@arm.com>
12683             David Sherwood  <david.sherwood@arm.com>
12685         * rtl.h (subreg_unpromoted_mode, subreg_promoted_mode): New functions.
12686         * expr.c (convert_move): Use them.
12687         (convert_modes): Likewise.
12688         (store_expr_with_bounds): Likewise.
12690 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12691             Alan Hayward  <alan.hayward@arm.com>
12692             David Sherwood  <david.sherwood@arm.com>
12694         * rtl.h (rtl_hooks::reg_nonzero_bits): Add a scalar_int_mode
12695         parameter for the mode of "x".  Remove the "known_x", "known_mode"
12696         and "known_ret" arguments.  Change the type of the mode argument
12697         to scalar_int_mode.
12698         (rtl_hooks:reg_num_sign_bit_copies): Likewise.
12699         * combine.c (reg_nonzero_bits_for_combine): Update accordingly.
12700         (reg_num_sign_bit_copies_for_combine): Likewise.
12701         * rtlanal.c (nonzero_bits1): Likewise.
12702         (num_sign_bit_copies1): Likewise.
12703         * rtlhooks-def.h (reg_nonzero_bits_general): Likewise.
12704         (reg_num_sign_bit_copies_general): Likewise.
12705         * rtlhooks.c (reg_num_sign_bit_copies_general): Likewise.
12706         (reg_nonzero_bits_general): Likewise.
12708 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12709             Alan Hayward  <alan.hayward@arm.com>
12710             David Sherwood  <david.sherwood@arm.com>
12712         * rtlanal.c (num_sign_bit_copies): Handle VOIDmode here rather
12713         than in subroutines.  Return 1 for non-integer modes.
12714         (cached_num_sign_bit_copies): Change the type of the mode parameter
12715         to scalar_int_mode.
12716         (num_sign_bit_copies1): Likewise.  Remove early exit for other mode
12717         classes.  Handle CONST_INT_P first and then check whether X also
12718         has a scalar integer mode.  Check the same thing for inner registers
12719         of a SUBREG and for values that are being extended or truncated.
12721 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12722             Alan Hayward  <alan.hayward@arm.com>
12723             David Sherwood  <david.sherwood@arm.com>
12725         * rtlanal.c (nonzero_bits): Handle VOIDmode here rather than
12726         in subroutines.  Return the mode mask for non-integer modes.
12727         (cached_nonzero_bits): Change the type of the mode parameter
12728         to scalar_int_mode.
12729         (nonzero_bits1): Likewise.  Remove early exit for other mode
12730         classes.  Handle CONST_INT_P first and then check whether X
12731         also has a scalar integer mode.
12733 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12734             Alan Hayward  <alan.hayward@arm.com>
12735             David Sherwood  <david.sherwood@arm.com>
12737         * expr.c (widest_int_mode_for_size): Make the comment match the code.
12738         Return a scalar_int_mode and assert that the size is greater than
12739         one byte.
12740         (by_pieces_ninsns): Update accordingly and remove VOIDmode handling.
12741         (op_by_pieces_d::op_by_pieces_d): Likewise.
12742         (op_by_pieces_d::run): Likewise.
12743         (can_store_by_pieces): Likewise.
12745 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12746             Alan Hayward  <alan.hayward@arm.com>
12747             David Sherwood  <david.sherwood@arm.com>
12749         * combine.c (extract_left_shift): Add a mode argument and update
12750         recursive calls.
12751         (make_compound_operation_int): Change the type of the mode parameter
12752         to scalar_int_mode and update the call to extract_left_shift.
12754 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12755             Alan Hayward  <alan.hayward@arm.com>
12756             David Sherwood  <david.sherwood@arm.com>
12758         * combine.c (simplify_and_const_int): Change the type of the mode
12759         parameter to scalar_int_mode.
12760         (simplify_and_const_int_1): Likewise.  Update recursive call.
12762 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12763             Alan Hayward  <alan.hayward@arm.com>
12764             David Sherwood  <david.sherwood@arm.com>
12766         * combine.c (simplify_compare_const): Check that the mode is a
12767         scalar_int_mode (rather than VOIDmode) before testing its
12768         precision.
12769         (simplify_comparison): Move COMPARISON_P handling out of the
12770         loop and restrict the latter part of the loop to scalar_int_modes.
12771         Check is_a <scalar_int_mode> before calling HWI_COMPUTABLE_MODE_P
12772         and when considering SUBREG_REGs.  Use is_int_mode instead of
12773         checking GET_MODE_CLASS against MODE_INT.
12775 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12776             Alan Hayward  <alan.hayward@arm.com>
12777             David Sherwood  <david.sherwood@arm.com>
12779         * combine.c (try_widen_shift_mode): Move check for equal modes to...
12780         (simplify_shift_const_1): ...here.  Use scalar_int_mode for
12781         shift_unit_mode and for modes involved in scalar shifts.
12783 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12784             Alan Hayward  <alan.hayward@arm.com>
12785             David Sherwood  <david.sherwood@arm.com>
12787         * combine.c (force_int_to_mode): New function, split out from...
12788         (force_to_mode): ...here.  Keep xmode up-to-date and use it
12789         instead of GET_MODE (x).
12791 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12792             Alan Hayward  <alan.hayward@arm.com>
12793             David Sherwood  <david.sherwood@arm.com>
12795         * optabs-query.h (extraction_insn::struct_mode): Change type to
12796         opt_scalar_int_mode and update comment.
12797         (extraction_insn::field_mode): Change type to scalar_int_mode.
12798         (extraction_insn::pos_mode): Likewise.
12799         * combine.c (make_extraction): Update accordingly.
12800         * optabs-query.c (get_traditional_extraction_insn): Likewise.
12801         (get_optab_extraction_insn): Likewise.
12802         * recog.c (simplify_while_replacing): Likewise.
12803         * expmed.c (narrow_bit_field_mem): Change the type of the mode
12804         parameter to opt_scalar_int_mode.
12806 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12807             Alan Hayward  <alan.hayward@arm.com>
12808             David Sherwood  <david.sherwood@arm.com>
12810         * machmode.h (bit_field_mode_iterator::next_mode): Take a pointer
12811         to a scalar_int_mode instead of a machine_mode.
12812         (bit_field_mode_iterator::m_mode): Change type to opt_scalar_int_mode.
12813         (get_best_mode): Return a boolean and use a pointer argument to store
12814         the selected mode.  Replace the limit mode parameter with a bit limit.
12815         * expmed.c (adjust_bit_field_mem_for_reg): Use scalar_int_mode
12816         for the values returned by bit_field_mode_iterator::next_mode.
12817         (store_bit_field): Update call to get_best_mode.
12818         (store_fixed_bit_field): Likewise.
12819         (extract_fixed_bit_field): Likewise.
12820         * expr.c (optimize_bitfield_assignment_op): Likewise.
12821         * fold-const.c (optimize_bit_field_compare): Likewise.
12822         (fold_truth_andor_1): Likewise.
12823         * stor-layout.c (bit_field_mode_iterator::next_mode): As above.
12824         Update for new type of m_mode.
12825         (get_best_mode): As above.
12827 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12828             Alan Hayward  <alan.hayward@arm.com>
12829             David Sherwood  <david.sherwood@arm.com>
12831         * expmed.c (strict_volatile_bitfield_p): Change the type of fieldmode
12832         to scalar_int_mode.  Remove check for SCALAR_INT_MODE_P.
12833         (store_bit_field): Check is_a <scalar_int_mode> before calling
12834         strict_volatile_bitfield_p.
12835         (extract_bit_field): Likewise.
12837 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12838             Alan Hayward  <alan.hayward@arm.com>
12839             David Sherwood  <david.sherwood@arm.com>
12841         * target.def (cstore_mode): Return a scalar_int_mode.
12842         * doc/tm.texi: Regenerate.
12843         * config/sparc/sparc.c (sparc_cstore_mode): Return a scalar_int_mode.
12844         * targhooks.h (default_cstore_mode): Likewise.
12845         * targhooks.c (default_cstore_mode): Likewise, using a forced
12846         conversion.
12847         * expmed.c (emit_cstore): Expect the target of the cstore to be
12848         a scalar_int_mode.
12850 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12851             Alan Hayward  <alan.hayward@arm.com>
12852             David Sherwood  <david.sherwood@arm.com>
12854         * cfgloop.h (rtx_iv): Change type of extend_mode and mode to
12855         scalar_int_mode.
12856         (niter_desc): Likewise mode.
12857         (iv_analyze): Add a mode parameter.
12858         (biv_p): Likewise.
12859         (iv_analyze_expr): Pass the mode paraeter before the rtx it describes
12860         and change its type to scalar_int_mode.
12861         * loop-iv.c: Update commentary at head of file.
12862         (iv_constant): Pass the mode paraeter before the rtx it describes
12863         and change its type to scalar_int_mode.  Remove VOIDmode handling.
12864         (iv_subreg): Change the type of the mode parameter to scalar_int_mode.
12865         (iv_extend): Likewise.
12866         (shorten_into_mode): Likewise.
12867         (iv_add): Use scalar_int_mode.
12868         (iv_mult): Likewise.
12869         (iv_shift): Likewise.
12870         (canonicalize_iv_subregs): Likewise.
12871         (get_biv_step_1): Pass the outer_mode parameter before the rtx
12872         it describes and change its mode to scalar_int_mode.   Also change
12873         the type of the returned inner_mode to scalar_int_mode.
12874         (get_biv_step): Likewise, turning outer_mode from a pointer
12875         into a direct parameter.  Update call to get_biv_step_1.
12876         (iv_analyze_biv): Add an outer_mode parameter.  Update calls to
12877         iv_constant and get_biv_step.
12878         (iv_analyze_expr): Pass the mode parameter before the rtx it describes
12879         and change its type to scalar_int_mode.  Don't initialise iv->mode
12880         to VOIDmode and remove later checks for its still being VOIDmode.
12881         Update calls to iv_analyze_op and iv_analyze_expr.  Check
12882         is_a <scalar_int_mode> when changing the mode under consideration.
12883         (iv_analyze_def): Ignore registers that don't have a scalar_int_mode.
12884         Update call to iv_analyze_expr.
12885         (iv_analyze_op): Add a mode parameter.  Reject subregs whose
12886         inner register is not also a scalar_int_mode.  Update call to
12887         iv_analyze_biv.
12888         (iv_analyze): Add a mode parameter.  Update call to iv_analyze_op.
12889         (biv_p): Add a mode parameter.  Update call to iv_analyze_biv.
12890         (iv_number_of_iterations): Use is_a <scalar_int_mode> instead of
12891         separate mode class checks.  Update calls to iv_analyze.  Remove
12892         fix-up of VOIDmodes after iv_analyze_biv.
12893         * loop-unroll.c (analyze_iv_to_split_insn): Reject registers that
12894         don't have a scalar_int_mode.  Update call to biv_p.
12896 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12897             Alan Hayward  <alan.hayward@arm.com>
12898             David Sherwood  <david.sherwood@arm.com>
12900         * cfgexpand.c (convert_debug_memory_address): Use
12901         as_a <scalar_int_mode>.
12902         * combine.c (expand_compound_operation): Likewise.
12903         (make_extraction): Likewise.
12904         (change_zero_ext): Likewise.
12905         (simplify_comparison): Likewise.
12906         * cse.c (cse_insn): Likewise.
12907         * dwarf2out.c (minmax_loc_descriptor): Likewise.
12908         (mem_loc_descriptor): Likewise.
12909         (loc_descriptor): Likewise.
12910         * expmed.c (init_expmed_one_mode): Likewise.
12911         (synth_mult): Likewise.
12912         (emit_store_flag_1): Likewise.
12913         (expand_divmod): Likewise.  Use HWI_COMPUTABLE_MODE_P instead
12914         of a comparison with size.
12915         * expr.c (expand_assignment): Use as_a <scalar_int_mode>.
12916         (reduce_to_bit_field_precision): Likewise.
12917         * function.c (expand_function_end): Likewise.
12918         * internal-fn.c (expand_arith_overflow_result_store): Likewise.
12919         * loop-doloop.c (doloop_modify): Likewise.
12920         * optabs.c (expand_binop): Likewise.
12921         (expand_unop): Likewise.
12922         (expand_copysign_absneg): Likewise.
12923         (prepare_cmp_insn): Likewise.
12924         (maybe_legitimize_operand): Likewise.
12925         * recog.c (const_scalar_int_operand): Likewise.
12926         * rtlanal.c (get_address_mode): Likewise.
12927         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
12928         (simplify_cond_clz_ctz): Likewise.
12929         * tree-nested.c (get_nl_goto_field): Likewise.
12930         * tree.c (build_vector_type_for_mode): Likewise.
12931         * var-tracking.c (use_narrower_mode): Likewise.
12933 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12934             Alan Hayward  <alan.hayward@arm.com>
12935             David Sherwood  <david.sherwood@arm.com>
12937         * tree.h (SCALAR_INT_TYPE_MODE): New macro.
12938         * builtins.c (expand_builtin_signbit): Use it.
12939         * cfgexpand.c (expand_debug_expr): Likewise.
12940         * dojump.c (do_jump): Likewise.
12941         (do_compare_and_jump): Likewise.
12942         * dwarf2cfi.c (expand_builtin_init_dwarf_reg_sizes): Likewise.
12943         * expmed.c (make_tree): Likewise.
12944         * expr.c (expand_expr_real_2): Likewise.
12945         (expand_expr_real_1): Likewise.
12946         (try_casesi): Likewise.
12947         * fold-const-call.c (fold_const_call_ss): Likewise.
12948         * fold-const.c (unextend): Likewise.
12949         (extract_muldiv_1): Likewise.
12950         (fold_single_bit_test): Likewise.
12951         (native_encode_int): Likewise.
12952         (native_encode_string): Likewise.
12953         (native_interpret_int): Likewise.
12954         * gimple-fold.c (gimple_fold_builtin_memset): Likewise.
12955         * internal-fn.c (expand_addsub_overflow): Likewise.
12956         (expand_neg_overflow): Likewise.
12957         (expand_mul_overflow): Likewise.
12958         (expand_arith_overflow): Likewise.
12959         * match.pd: Likewise.
12960         * stor-layout.c (layout_type): Likewise.
12961         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
12962         * tree-ssa-math-opts.c (convert_mult_to_widen): Likewise.
12963         * tree-ssanames.c (get_range_info): Likewise.
12964         * tree-switch-conversion.c (array_value_type) Likewise.
12965         * tree-vect-patterns.c (vect_recog_rotate_pattern): Likewise.
12966         (vect_recog_divmod_pattern): Likewise.
12967         (vect_recog_mixed_size_cond_pattern): Likewise.
12968         * tree-vrp.c (extract_range_basic): Likewise.
12969         (simplify_float_conversion_using_ranges): Likewise.
12970         * tree.c (int_fits_type_p): Likewise.
12971         * ubsan.c (instrument_bool_enum_load): Likewise.
12972         * varasm.c (mergeable_string_section): Likewise.
12973         (narrowing_initializer_constant_valid_p): Likewise.
12974         (output_constant): Likewise.
12976 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12977             Alan Hayward  <alan.hayward@arm.com>
12978             David Sherwood  <david.sherwood@arm.com>
12980         * machmode.h (NARROWEST_INT_MODE): New macro.
12981         * expr.c (alignment_for_piecewise_move): Use it instead of
12982         GET_CLASS_NARROWEST_MODE (MODE_INT).
12983         (push_block): Likewise.
12984         * stor-layout.c (bit_field_mode_iterator::bit_field_mode_iterator):
12985         Likewise.
12986         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
12988 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
12989             Alan Hayward  <alan.hayward@arm.com>
12990             David Sherwood  <david.sherwood@arm.com>
12992         * postreload.c (move2add_valid_value_p): Change the type of the
12993         mode parameter to scalar_int_mode.
12994         (move2add_use_add2_insn): Add a mode parameter and use it instead
12995         of GET_MODE (reg).
12996         (move2add_use_add3_insn): Likewise.
12997         (reload_cse_move2add): Update accordingly.
12999 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13000             Alan Hayward  <alan.hayward@arm.com>
13001             David Sherwood  <david.sherwood@arm.com>
13003         * expr.c (expand_expr_real_2): Use scalar_int_mode for the
13004         double-word mode.
13005         * lower-subreg.c (resolve_shift_zext): Use is_a <scalar_int_mode>.
13006         * optabs.c (expand_unop): Likewise.
13008 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13009             Alan Hayward  <alan.hayward@arm.com>
13010             David Sherwood  <david.sherwood@arm.com>
13012         * dwarf2out.c (typed_binop): Change mode parameter to scalar_int_mode.
13013         (clz_loc_descriptor): Likewise.  Remove SCALAR_INT_MODE_P check.
13014         (popcount_loc_descriptor): Likewise.
13015         (bswap_loc_descriptor): Likewise.
13016         (rotate_loc_descriptor): Likewise.
13017         (mem_loc_descriptor): Add is_a <scalar_int_mode> checks before
13018         calling the functions above.
13020 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13021             Alan Hayward  <alan.hayward@arm.com>
13022             David Sherwood  <david.sherwood@arm.com>
13024         * combine.c (sign_extend_short_imm): Add is_a <scalar_int_mode>
13025         checks.
13026         (try_combine): Likewise.
13027         (simplify_if_then_else): Likewise.
13028         * cse.c (cse_insn): Likewise.
13029         * dwarf2out.c (mem_loc_descriptor): Likewise.
13030         * emit-rtl.c (gen_lowpart_common): Likewise.
13031         * simplify-rtx.c (simplify_truncation): Likewise.
13032         (simplify_binary_operation_1): Likewise.
13033         (simplify_const_relational_operation): Likewise.
13034         (simplify_ternary_operation): Likewise.
13035         * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise.
13037 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13038             Alan Hayward  <alan.hayward@arm.com>
13039             David Sherwood  <david.sherwood@arm.com>
13041         * cse.c (cse_insn): Add is_a <scalar_int_mode> checks.
13042         * reload.c (push_reload): Likewise.
13043         (find_reloads): Likewise.
13045 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13046             Alan Hayward  <alan.hayward@arm.com>
13047             David Sherwood  <david.sherwood@arm.com>
13049         * combine.c (find_split_point): Add is_a <scalar_int_mode> checks.
13050         (make_compound_operation_int): Likewise.
13051         (change_zero_ext): Likewise.
13052         * expr.c (convert_move): Likewise.
13053         (convert_modes): Likewise.
13054         * fwprop.c (forward_propagate_subreg): Likewise.
13055         * loop-iv.c (get_biv_step_1): Likewise.
13056         * optabs.c (widen_operand): Likewise.
13057         * postreload.c (move2add_valid_value_p): Likewise.
13058         * recog.c (simplify_while_replacing): Likewise.
13059         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
13060         (simplify_binary_operation_1): Likewise.  Remove redundant
13061         mode equality check.
13063 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13064             Alan Hayward  <alan.hayward@arm.com>
13065             David Sherwood  <david.sherwood@arm.com>
13067         * combine.c (combine_simplify_rtx): Add checks for
13068         is_a <scalar_int_mode>.
13069         (simplify_if_then_else): Likewise.
13070         (make_field_assignment): Likewise.
13071         (simplify_comparison): Likewise.
13072         * ifcvt.c (noce_try_bitop): Likewise.
13073         * loop-invariant.c (canonicalize_address_mult): Likewise.
13074         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
13076 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13077             Alan Hayward  <alan.hayward@arm.com>
13078             David Sherwood  <david.sherwood@arm.com>
13080         * gimple-fold.c (gimple_fold_builtin_memory_op): Use
13081         is_a <scalar_int_mode> instead of != BLKmode.
13083 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13084             Alan Hayward  <alan.hayward@arm.com>
13085             David Sherwood  <david.sherwood@arm.com>
13087         * cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>
13088         instead of != VOIDmode.
13089         * combine.c (if_then_else_cond): Likewise.
13090         (change_zero_ext): Likewise.
13091         * dwarf2out.c (mem_loc_descriptor): Likewise.
13092         (loc_descriptor): Likewise.
13093         * rtlanal.c (canonicalize_condition): Likewise.
13094         * simplify-rtx.c (simplify_relational_operation_1): Likewise.
13096 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13097             Alan Hayward  <alan.hayward@arm.com>
13098             David Sherwood  <david.sherwood@arm.com>
13100         * simplify-rtx.c (simplify_binary_operation_1): Use
13101         is_a <scalar_int_mode> instead of !VECTOR_MODE_P.
13103 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13104             Alan Hayward  <alan.hayward@arm.com>
13105             David Sherwood  <david.sherwood@arm.com>
13107         * wide-int.h (int_traits<unsigned char>) New class.
13108         (int_traits<unsigned short>) Likewise.
13109         * cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>.
13110         Use GET_MODE_UNIT_PRECISION and remove redundant test for
13111         SCALAR_INT_MODE_P.
13112         * combine.c (set_nonzero_bits_and_sign_copies): Use
13113         is_a <scalar_int_mode>.
13114         (find_split_point): Likewise.
13115         (combine_simplify_rtx): Likewise.
13116         (simplify_logical): Likewise.
13117         (expand_compound_operation): Likewise.
13118         (expand_field_assignment): Likewise.
13119         (make_compound_operation): Likewise.
13120         (extended_count): Likewise.
13121         (change_zero_ext): Likewise.
13122         (simplify_comparison): Likewise.
13123         * dwarf2out.c (scompare_loc_descriptor): Likewise.
13124         (ucompare_loc_descriptor): Likewise.
13125         (minmax_loc_descriptor): Likewise.
13126         (mem_loc_descriptor): Likewise.
13127         (loc_descriptor): Likewise.
13128         * expmed.c (init_expmed_one_mode): Likewise.
13129         * lra-constraints.c (lra_constraint_offset): Likewise.
13130         * optabs.c (prepare_libcall_arg): Likewise.
13131         * postreload.c (move2add_note_store): Likewise.
13132         * reload.c (operands_match_p): Likewise.
13133         * rtl.h (load_extend_op): Likewise.
13134         * rtlhooks.c (gen_lowpart_general): Likewise.
13135         * simplify-rtx.c (simplify_truncation): Likewise.
13136         (simplify_unary_operation_1): Likewise.
13137         (simplify_binary_operation_1): Likewise.
13138         (simplify_const_binary_operation): Likewise.
13139         (simplify_const_relational_operation): Likewise.
13140         (simplify_subreg): Likewise.
13141         * stor-layout.c (bitwise_mode_for_mode): Likewise.
13142         * var-tracking.c (adjust_mems): Likewise.
13143         (prepare_call_arguments): Likewise.
13145 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13146             Alan Hayward  <alan.hayward@arm.com>
13147             David Sherwood  <david.sherwood@arm.com>
13149         * machmode.h (is_int_mode): New fuction.
13150         * combine.c (find_split_point): Use it.
13151         (combine_simplify_rtx): Likewise.
13152         (simplify_if_then_else): Likewise.
13153         (simplify_set): Likewise.
13154         (simplify_shift_const_1): Likewise.
13155         (simplify_comparison): Likewise.
13156         * config/aarch64/aarch64.c (aarch64_rtx_costs): Likewise.
13157         * cse.c (notreg_cost): Likewise.
13158         (cse_insn): Likewise.
13159         * cselib.c (cselib_lookup_1): Likewise.
13160         * dojump.c (do_jump_1): Likewise.
13161         (do_compare_rtx_and_jump): Likewise.
13162         * dse.c (get_call_args): Likewise.
13163         * dwarf2out.c (rtl_for_decl_init): Likewise.
13164         (native_encode_initializer): Likewise.
13165         * expmed.c (emit_store_flag_1): Likewise.
13166         (emit_store_flag): Likewise.
13167         * expr.c (convert_modes): Likewise.
13168         (store_field): Likewise.
13169         (expand_expr_real_1): Likewise.
13170         * fold-const.c (fold_read_from_constant_string): Likewise.
13171         * gimple-ssa-sprintf.c (get_format_string): Likewise.
13172         * optabs-libfuncs.c (gen_int_libfunc): Likewise.
13173         * optabs.c (expand_binop): Likewise.
13174         (expand_unop): Likewise.
13175         (expand_abs_nojump): Likewise.
13176         (expand_one_cmpl_abs_nojump): Likewise.
13177         * simplify-rtx.c (mode_signbit_p): Likewise.
13178         (val_signbit_p): Likewise.
13179         (val_signbit_known_set_p): Likewise.
13180         (val_signbit_known_clear_p): Likewise.
13181         (simplify_relational_operation_1): Likewise.
13182         * tree.c (vector_type_mode): Likewise.
13184 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13185             Alan Hayward  <alan.hayward@arm.com>
13186             David Sherwood  <david.sherwood@arm.com>
13188         * machmode.h (smallest_mode_for_size): Fix formatting.
13189         (smallest_int_mode_for_size): New function.
13190         * cfgexpand.c (expand_debug_expr): Use smallest_int_mode_for_size
13191         instead of smallest_mode_for_size.
13192         * combine.c (make_extraction): Likewise.
13193         * config/arc/arc.c (arc_expand_movmem): Likewise.
13194         * config/arm/arm.c (arm_expand_divmod_libfunc): Likewise.
13195         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
13196         * config/s390/s390.c (s390_expand_insv): Likewise.
13197         * config/sparc/sparc.c (assign_int_registers): Likewise.
13198         * config/spu/spu.c (spu_function_value): Likewise.
13199         (spu_function_arg): Likewise.
13200         * coverage.c (get_gcov_type): Likewise.
13201         (get_gcov_unsigned_t): Likewise.
13202         * dse.c (find_shift_sequence): Likewise.
13203         * expmed.c (store_bit_field_1): Likewise.
13204         * expr.c (convert_move): Likewise.
13205         (store_field): Likewise.
13206         * internal-fn.c (expand_arith_overflow): Likewise.
13207         * optabs-query.c (get_best_extraction_insn): Likewise.
13208         * optabs.c (expand_twoval_binop_libfunc): Likewise.
13209         * stor-layout.c (layout_type): Likewise.
13210         (initialize_sizetypes): Likewise.
13211         * targhooks.c (default_get_mask_mode): Likewise.
13212         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Likewise.
13214 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13215             Alan Hayward  <alan.hayward@arm.com>
13216             David Sherwood  <david.sherwood@arm.com>
13218         * machmode.h (opt_mode::else_blk): New function.
13219         (int_mode_for_mode): Declare.
13220         * stor-layout.c (int_mode_for_mode): Return an opt_scalar_int_mode.
13221         * builtins.c (expand_builtin_signbit): Adjust for new int_mode_for_mode
13222         return type.
13223         * cfgexpand.c (expand_debug_expr): Likewise.
13224         * combine.c (gen_lowpart_or_truncate): Likewise.
13225         (gen_lowpart_for_combine): Likewise.
13226         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Likewise.
13227         * config/avr/avr.c (avr_to_int_mode): Likewise.
13228         (avr_out_plus_1): Likewise.
13229         (avr_out_plus): Likewise.
13230         (avr_out_round): Likewise.
13231         * config/i386/i386.c (ix86_split_to_parts): Likewise.
13232         * config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
13233         (s390_expand_vcond): Likewise.
13234         * config/spu/spu.c (spu_split_immediate): Likewise.
13235         (spu_expand_mov): Likewise.
13236         * dse.c (get_stored_val): Likewise.
13237         * expmed.c (store_bit_field_1): Likewise.
13238         (convert_extracted_bit_field): Use int_mode_for_mode instead of
13239         int_mode_for_size.
13240         (extract_bit_field_1): Adjust for new int_mode_for_mode return type.
13241         (extract_low_bits): Likewise.
13242         * expr.c (emit_group_load_1): Likewise.  Separate out the BLKmode
13243         handling rather than repeating the check.
13244         (emit_group_store): Likewise.
13245         (emit_move_via_integer): Adjust for new int_mode_for_mode return type.
13246         * optabs.c (expand_absneg_bit): Likewise.
13247         (expand_copysign_absneg): Likewise.
13248         (expand_copysign_bit): Likewise.
13249         * tree-if-conv.c (ifcvt_can_use_mask_load_store): Likewise.
13250         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
13251         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
13252         * var-tracking.c (prepare_call_arguments):  Likewise.
13253         * config/powerpcspe/powerpcspe.c (rs6000_do_expand_vec_perm): Use
13254         int_mode_for_mode instead of mode_for_size.
13255         * config/rs6000/rs6000.c (rs6000_do_expand_vec_perm): Likewise.
13257 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13258             Alan Hayward  <alan.hayward@arm.com>
13259             David Sherwood  <david.sherwood@arm.com>
13261         * machmode.h (int_mode_for_size): New function.
13262         * builtins.c (set_builtin_user_assembler_name): Use int_mode_for_size
13263         instead of mode_for_size.
13264         * calls.c (save_fixed_argument_area): Likewise.  Make use of BLKmode
13265         explicit.
13266         * combine.c (expand_field_assignment): Use int_mode_for_size
13267         instead of mode_for_size.
13268         (make_extraction): Likewise.
13269         (simplify_shift_const_1): Likewise.
13270         (simplify_comparison): Likewise.
13271         * dojump.c (do_jump): Likewise.
13272         * dwarf2out.c (mem_loc_descriptor): Likewise.
13273         * emit-rtl.c (init_derived_machine_modes): Likewise.
13274         * expmed.c (flip_storage_order): Likewise.
13275         (convert_extracted_bit_field): Likewise.
13276         * expr.c (copy_blkmode_from_reg): Likewise.
13277         * graphite-isl-ast-to-gimple.c (max_mode_int_precision): Likewise.
13278         * internal-fn.c (expand_mul_overflow): Likewise.
13279         * lower-subreg.c (simple_move): Likewise.
13280         * optabs-libfuncs.c (init_optabs): Likewise.
13281         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
13282         * tree.c (vector_type_mode): Likewise.
13283         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
13284         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Likewise.
13285         * tree-vect-generic.c (expand_vector_parallel): Likewise.
13286         * tree-vect-stmts.c (vectorizable_load): Likewise.
13287         (vectorizable_store): Likewise.
13289 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13290             Alan Hayward  <alan.hayward@arm.com>
13291             David Sherwood  <david.sherwood@arm.com>
13293         * coretypes.h (pod_mode): New type.
13294         (scalar_int_mode_pod): New typedef.
13295         * machmode.h (pod_mode): New class.
13296         (int_n_data_t::m): Change type to scalar_int_mode_pod.
13297         * genmodes.c (emit_mode_int_n): Update accordingly.
13298         * lower-subreg.h (target_lower_subreg): Change type to
13299         scalar_int_mode_pod.
13300         * gdbhooks.py (build_pretty_printer): Handle pod_mode and
13301         scalar_int_mode_pod.
13303 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13304             Alan Hayward  <alan.hayward@arm.com>
13305             David Sherwood  <david.sherwood@arm.com>
13307         * config/powerpcspe/powerpcspe.h (rs6000_pmode): Change type from
13308         machine_mode to scalar_int_mode.
13309         * config/powerpcspe/powerpcspe.c (rs6000_pmode): Likewise.
13310         (rs6000_option_override_internal): Remove cast to int.
13311         * config/rs6000/rs6000.h (rs6000_pmode): Change type from
13312         machine_mode to scalar_int_mode.
13313         * config/rs6000/rs6000.c (rs6000_pmode): Likewise.
13314         (rs6000_option_override_internal): Remove cast to int.
13315         * config/s390/s390.h (Pmode): Remove cast to machine_mode.
13316         * config/epiphany/epiphany.h (RTX_OK_FOR_OFFSET_P): Add cast
13317         to machine_mode.
13318         * config/s390/s390.c (s390_expand_builtin): Likewise.
13319         * coretypes.h (scalar_int_mode): New type.
13320         (opt_scalar_int_mode): New typedef.
13321         * machmode.h (scalar_int_mode): New class.
13322         (scalar_int_mode::includes_p): New function.
13323         (byte_mode): Change type to scalar_int_mode.
13324         (word_mode): Likewise.
13325         (ptr_mode): Likewise.
13326         * emit-rtl.c (byte_mode): Likewise.
13327         (word_mode): Likewise.
13328         (ptr_mode): Likewise.
13329         (init_derived_machine_modes): Update accordingly.
13330         * genmodes.c (get_mode_class): Return scalar_int_mode for MODE_INT
13331         and MODE_PARTIAL_INT.
13332         * gdbhooks.py (build_pretty_printer): Handle scalar_int_mode and
13333         opt_scalar_int_mode.
13335 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13336             Alan Hayward  <alan.hayward@arm.com>
13337             David Sherwood  <david.sherwood@arm.com>
13339         * target.def (libgcc_floating_mode_supported_p): Take a
13340         scalar_float_mode.
13341         * doc/tm.texi: Regenerate.
13342         * targhooks.h (default_libgcc_floating_mode_supported_p): Take a
13343         scalar_float_mode.
13344         * targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.
13345         * config/aarch64/aarch64.c (aarch64_libgcc_floating_mode_supported_p):
13346         Likewise.
13348 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13349             Alan Hayward  <alan.hayward@arm.com>
13350             David Sherwood  <david.sherwood@arm.com>
13352         * target.def (default_floatn_mode): Return an opt_scalar_float_mode.
13353         * doc/tm.texi: Regenerate.
13354         * config/arm/arm.c (arm_floatn_mode): Return an opt_scalar_float_mode.
13355         * config/powerpcspe/powerpcspe.c (rs6000_floatn_mode): Likewise.
13356         * config/rs6000/rs6000.c (rs6000_floatn_mode): Likewise.
13357         * targhooks.h (default_floatn_mode): Likewise.
13358         * targhooks.c (default_floatn_mode): Likewise.
13359         * tree.c (build_common_tree_nodes): Update accordingly.
13361 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13362             Alan Hayward  <alan.hayward@arm.com>
13363             David Sherwood  <david.sherwood@arm.com>
13365         * machmode.h (mode_iterator::start): Provide overload for opt_modes.
13366         (mode_iterator::iterate_p): Likewise.
13367         (mode_iterator::get_wider): Likewise.
13368         * expr.c (init_expr_target): Use opt_scalar_float_mode.
13370 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13371             Alan Hayward  <alan.hayward@arm.com>
13372             David Sherwood  <david.sherwood@arm.com>
13374         * coretypes.h (opt_scalar_float_mode): New typedef.
13375         * machmode.h (float_mode_for_size): New function.
13376         * emit-rtl.c (double_mode): Delete.
13377         (init_emit_once): Use float_mode_for_size.
13378         * stor-layout.c (layout_type): Likewise.
13379         * gdbhooks.py (build_pretty_printer): Handle opt_scalar_float_mode.
13381 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13382             Alan Hayward  <alan.hayward@arm.com>
13383             David Sherwood  <david.sherwood@arm.com>
13385         * output.h (assemble_real): Take a scalar_float_mode.
13386         * config/arm/arm.c (arm_assemble_integer): Update accordingly.
13387         * config/arm/arm.md (consttable_4): Likewise.
13388         (consttable_8): Likewise.
13389         (consttable_16): Likewise.
13390         * config/mips/mips.md (consttable_float): Likewise.
13391         * config/s390/s390.c (s390_output_pool_entry): Likewise.
13392         * varasm.c (assemble_real): Take a scalar_float_mode.
13393         (output_constant_pool_2): Update accordingly.
13394         (output_constant): Likewise.
13396 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13397             Alan Hayward  <alan.hayward@arm.com>
13398             David Sherwood  <david.sherwood@arm.com>
13400         * tree.h (SCALAR_FLOAT_TYPE_MODE): New macro.
13401         * builtins.c (expand_builtin_signbit): Use it instead of TYPE_MODE.
13402         * fold-const.c (fold_convert_const_real_from_fixed): Likewise.
13403         (native_encode_real): Likewise.
13404         (native_interpret_real): Likewise.
13405         * hsa-brig.c (emit_immediate_scalar_to_buffer): Likewise.
13406         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
13408 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13409             Alan Hayward  <alan.hayward@arm.com>
13410             David Sherwood  <david.sherwood@arm.com>
13412         * optabs-libfuncs.c (gen_trunc_conv_libfunc): Use is_a
13413         <scalar_float_mode>.  Simplify.
13414         (gen_extend_conv_libfunc): Likewise.
13416 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13417             Alan Hayward  <alan.hayward@arm.com>
13418             David Sherwood  <david.sherwood@arm.com>
13420         * coretypes.h (scalar_float_mode): New type.
13421         * machmode.h (mode_traits::from_int): Use machine_mode if
13422         USE_ENUM_MODES is defined.
13423         (is_a): New function.
13424         (as_a): Likewise.
13425         (dyn_cast): Likewise.
13426         (scalar_float_mode): New class.
13427         (scalar_float_mode::includes_p): New function.
13428         (is_float_mode): Likewise.
13429         * gdbhooks.py (MachineModePrinter): New class.
13430         (build_pretty_printer): Use it for scalar_float_mode.
13431         * real.h (FLOAT_MODE_FORMAT): Use as_a <scalar_float_mode>.
13432         (format_helper::format_helper): Turn into a template.
13433         * genmodes.c (get_mode_class): New function.
13434         (emit_insn_modes_h): Give modes the class returned by get_mode_class,
13435         or machine_mode if none.
13436         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Use
13437         as_a <scalar_float_mode>.
13438         * dwarf2out.c (mem_loc_descriptor): Likewise.
13439         (insert_float): Likewise.
13440         (add_const_value_attribute): Likewise.
13441         * simplify-rtx.c (simplify_immed_subreg): Likewise.
13442         * optabs.c (expand_absneg_bit): Take a scalar_float_mode.
13443         (expand_unop): Update accordingly.
13444         (expand_abs_nojump): Likewise.
13445         (expand_copysign_absneg): Take a scalar_float_mode.
13446         (expand_copysign_bit): Likewise.
13447         (expand_copysign): Update accordingly.
13449 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13450             Alan Hayward  <alan.hayward@arm.com>
13451             David Sherwood  <david.sherwood@arm.com>
13453         * coretypes.h (opt_mode): New class.
13454         * machmode.h (opt_mode): Likewise.
13455         (opt_mode::else_void): New function.
13456         (opt_mode::require): Likewise.
13457         (opt_mode::exists): Likewise.
13458         (GET_MODE_WIDER_MODE): Turn into a function and return an opt_mode.
13459         (GET_MODE_2XWIDER_MODE): Likewise.
13460         (mode_iterator::get_wider): Update accordingly.
13461         (mode_iterator::get_2xwider): Likewise.
13462         (mode_iterator::get_known_wider): Likewise, turning into a template.
13463         * combine.c (make_extraction): Update use of GET_MODE_WIDER_MODE,
13464         forcing a wider mode to exist.
13465         * config/cr16/cr16.h (LONG_REG_P): Likewise.
13466         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
13467         * config/c6x/c6x.c (c6x_rtx_costs): Update use of
13468         GET_MODE_2XWIDER_MODE, forcing a wider mode to exist.
13469         * lower-subreg.c (init_lower_subreg): Likewise.
13470         * optabs-libfuncs.c (init_sync_libfuncs_1): Likewise, but not
13471         on the final iteration.
13472         * config/i386/i386.c (ix86_expand_set_or_movmem): Check whether
13473         a wider mode exists before asking for a move pattern.
13474         (get_mode_wider_vector): Update use of GET_MODE_WIDER_MODE,
13475         forcing a wider mode to exist.
13476         (expand_vselect_vconcat): Update use of GET_MODE_2XWIDER_MODE,
13477         returning false if no such mode exists.
13478         * config/ia64/ia64.c (expand_vselect_vconcat): Likewise.
13479         * config/mips/mips.c (mips_expand_vselect_vconcat): Likewise.
13480         * expmed.c (init_expmed_one_mode): Update use of GET_MODE_WIDER_MODE.
13481         Avoid checking for a MODE_INT if we already know the mode is not a
13482         SCALAR_INT_MODE_P.
13483         (extract_high_half): Update use of GET_MODE_WIDER_MODE,
13484         forcing a wider mode to exist.
13485         (expmed_mult_highpart_optab): Likewise.
13486         (expmed_mult_highpart): Likewise.
13487         * expr.c (expand_expr_real_2): Update use of GET_MODE_WIDER_MODE,
13488         using else_void.
13489         * lto-streamer-in.c (lto_input_mode_table): Likewise.
13490         * optabs-query.c (find_widening_optab_handler_and_mode): Likewise.
13491         * stor-layout.c (bit_field_mode_iterator::next_mode): Likewise.
13492         * internal-fn.c (expand_mul_overflow): Update use of
13493         GET_MODE_2XWIDER_MODE.
13494         * omp-low.c (omp_clause_aligned_alignment): Likewise.
13495         * tree-ssa-math-opts.c (convert_mult_to_widen): Update use of
13496         GET_MODE_WIDER_MODE.
13497         (convert_plusminus_to_widen): Likewise.
13498         * tree-switch-conversion.c (array_value_type): Likewise.
13499         * var-tracking.c (emit_note_insn_var_location): Likewise.
13500         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
13501         Return false inside rather than outside the loop if no wider mode
13502         exists
13503         * optabs.c (expand_binop): Update use of GET_MODE_WIDER_MODE
13504         and GET_MODE_2XWIDER_MODE
13505         (can_compare_p): Use else_void.
13506         * gdbhooks.py (OptMachineModePrinter): New class.
13507         (build_pretty_printer): Use it for opt_mode.
13509 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13510             Alan Hayward  <alan.hayward@arm.com>
13511             David Sherwood  <david.sherwood@arm.com>
13513         * tree-switch-conversion.c (array_value_type): Only read TYPE_MODE
13514         once.  Use get_narrowest_mode instead of GET_CLASS_NARROWEST_MODE.
13516 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13517             Alan Hayward  <alan.hayward@arm.com>
13518             David Sherwood  <david.sherwood@arm.com>
13520         * machmode.h (mode_traits): New structure.
13521         (get_narrowest_mode): New function.
13522         (mode_iterator::start): Likewise.
13523         (mode_iterator::iterate_p): Likewise.
13524         (mode_iterator::get_wider): Likewise.
13525         (mode_iterator::get_known_wider): Likewise.
13526         (mode_iterator::get_2xwider): Likewise.
13527         (FOR_EACH_MODE_IN_CLASS): New mode iterator.
13528         (FOR_EACH_MODE): Likewise.
13529         (FOR_EACH_MODE_FROM): Likewise.
13530         (FOR_EACH_MODE_UNTIL): Likewise.
13531         (FOR_EACH_WIDER_MODE): Likewise.
13532         (FOR_EACH_2XWIDER_MODE): Likewise.
13533         * builtins.c (expand_builtin_strlen): Use new mode iterators.
13534         * combine.c (simplify_comparison): Likewise
13535         * config/i386/i386.c (type_natural_mode): Likewise.
13536         * cse.c (cse_insn): Likewise.
13537         * dse.c (find_shift_sequence): Likewise.
13538         * emit-rtl.c (init_derived_machine_modes): Likewise.
13539         (init_emit_once): Likewise.
13540         * explow.c (hard_function_value): Likewise.
13541         * expmed.c (extract_fixed_bit_field_1): Likewise.
13542         (extract_bit_field_1): Likewise.
13543         (expand_divmod): Likewise.
13544         (emit_store_flag_1): Likewise.
13545         * expr.c (init_expr_target): Likewise.
13546         (convert_move): Likewise.
13547         (alignment_for_piecewise_move): Likewise.
13548         (widest_int_mode_for_size): Likewise.
13549         (emit_block_move_via_movmem): Likewise.
13550         (copy_blkmode_to_reg): Likewise.
13551         (set_storage_via_setmem): Likewise.
13552         (compress_float_constant): Likewise.
13553         * omp-low.c (omp_clause_aligned_alignment): Likewise.
13554         * optabs-query.c (get_best_extraction_insn): Likewise.
13555         * optabs.c (expand_binop): Likewise.
13556         (expand_twoval_unop): Likewise.
13557         (expand_twoval_binop): Likewise.
13558         (widen_leading): Likewise.
13559         (widen_bswap): Likewise.
13560         (expand_parity): Likewise.
13561         (expand_unop): Likewise.
13562         (prepare_cmp_insn): Likewise.
13563         (prepare_float_lib_cmp): Likewise.
13564         (expand_float): Likewise.
13565         (expand_fix): Likewise.
13566         (expand_sfix_optab): Likewise.
13567         * postreload.c (move2add_use_add2_insn): Likewise.
13568         * reg-stack.c (reg_to_stack): Likewise.
13569         * reginfo.c (choose_hard_reg_mode): Likewise.
13570         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
13571         * stor-layout.c (mode_for_size): Likewise.
13572         (smallest_mode_for_size): Likewise.
13573         (mode_for_vector): Likewise.
13574         (finish_bitfield_representative): Likewise.
13575         * tree-ssa-math-opts.c (target_supports_divmod_p): Likewise.
13576         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
13577         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
13578         * var-tracking.c (prepare_call_arguments): Likewise.
13580 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13581             Alan Hayward  <alan.hayward@arm.com>
13582             David Sherwood  <david.sherwood@arm.com>
13584         * genconditions.c (write_header): Add a "#define USE_ENUM_MODES".
13585         * genmodes.c (emit_insn_modes_h): Define FOOmode to E_FOOmode if
13586         USE_ENUM_MODES is defined and to ((void) 0, E_FOOmode) otherwise.
13587         * machmode.h (mode_size): Move earlier in file.
13588         (mode_precision): Likewise.
13589         (mode_inner): Likewise.
13590         (mode_nunits): Likewise.
13591         (mode_unit_size): Likewise.
13592         (unit_unit_precision): Likewise.
13593         (mode_wider): Likewise.
13594         (mode_2xwider): Likewise.
13595         (machine_mode): New class.
13596         (mode_to_bytes): New function.
13597         (mode_to_bits): Likewise.
13598         (mode_to_precision): Likewise.
13599         (mode_to_inner): Likewise.
13600         (mode_to_unit_size): Likewise.
13601         (mode_to_unit_precision): Likewise.
13602         (mode_to_nunits): Likewise.
13603         (GET_MODE_SIZE): Use mode_to_bytes.
13604         (GET_MODE_BITSIZE): Use mode_to_bits.
13605         (GET_MODE_PRECISION): Use mode_to_precision.
13606         (GET_MODE_INNER): Use mode_to_inner.
13607         (GET_MODE_UNIT_SIZE): Use mode_to_unit_size.
13608         (GET_MODE_UNIT_PRECISION): Use mode_to_unit_precision.
13609         (GET_MODE_NUNITS): Use mode_to_nunits.
13610         * system.h (ALWAYS_INLINE): New macro.
13611         * config/powerpcspe/powerpcspe-c.c
13612         (altivec_resolve_overloaded_builtin): Use machine_mode instead of
13613         int for arg1_mode and arg2_mode.
13615 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13616             Alan Hayward  <alan.hayward@arm.com>
13617             David Sherwood  <david.sherwood@arm.com>
13619         * config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type):
13620         Prefix mode names with E_ in case statements.
13621         * config/aarch64/aarch64-elf.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
13622         * config/aarch64/aarch64.c (aarch64_split_simd_combine): Likewise.
13623         (aarch64_split_simd_move): Likewise.
13624         (aarch64_gen_storewb_pair): Likewise.
13625         (aarch64_gen_loadwb_pair): Likewise.
13626         (aarch64_gen_store_pair): Likewise.
13627         (aarch64_gen_load_pair): Likewise.
13628         (aarch64_get_condition_code_1): Likewise.
13629         (aarch64_constant_pool_reload_icode): Likewise.
13630         (get_rsqrte_type): Likewise.
13631         (get_rsqrts_type): Likewise.
13632         (get_recpe_type): Likewise.
13633         (get_recps_type): Likewise.
13634         (aarch64_gimplify_va_arg_expr): Likewise.
13635         (aarch64_simd_container_mode): Likewise.
13636         (aarch64_emit_load_exclusive): Likewise.
13637         (aarch64_emit_store_exclusive): Likewise.
13638         (aarch64_expand_compare_and_swap): Likewise.
13639         (aarch64_gen_atomic_cas): Likewise.
13640         (aarch64_emit_bic): Likewise.
13641         (aarch64_emit_atomic_swap): Likewise.
13642         (aarch64_emit_atomic_load_op): Likewise.
13643         (aarch64_evpc_trn): Likewise.
13644         (aarch64_evpc_uzp): Likewise.
13645         (aarch64_evpc_zip): Likewise.
13646         (aarch64_evpc_ext): Likewise.
13647         (aarch64_evpc_rev): Likewise.
13648         (aarch64_evpc_dup): Likewise.
13649         (aarch64_gen_ccmp_first): Likewise.
13650         (aarch64_gen_ccmp_next): Likewise.
13651         * config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
13652         (alpha_emit_xfloating_libcall): Likewise.
13653         (emit_insxl): Likewise.
13654         (alpha_arg_type): Likewise.
13655         * config/arc/arc.c (arc_vector_mode_supported_p): Likewise.
13656         (arc_preferred_simd_mode): Likewise.
13657         (arc_secondary_reload): Likewise.
13658         (get_arc_condition_code): Likewise.
13659         (arc_print_operand): Likewise.
13660         (arc_legitimate_constant_p): Likewise.
13661         * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
13662         * config/arc/arc.md (casesi_load): Likewise.
13663         (casesi_compact_jump): Likewise.
13664         * config/arc/predicates.md (proper_comparison_operator): Likewise.
13665         (cc_use_register): Likewise.
13666         * config/arm/aout.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
13667         * config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise.
13668         (arm_init_iwmmxt_builtins): Likewise.
13669         * config/arm/arm.c (thumb1_size_rtx_costs): Likewise.
13670         (neon_expand_vector_init): Likewise.
13671         (arm_attr_length_move_neon): Likewise.
13672         (maybe_get_arm_condition_code): Likewise.
13673         (arm_emit_vector_const): Likewise.
13674         (arm_preferred_simd_mode): Likewise.
13675         (arm_output_iwmmxt_tinsr): Likewise.
13676         (thumb1_output_casesi): Likewise.
13677         (thumb2_output_casesi): Likewise.
13678         (arm_emit_load_exclusive): Likewise.
13679         (arm_emit_store_exclusive): Likewise.
13680         (arm_expand_compare_and_swap): Likewise.
13681         (arm_evpc_neon_vuzp): Likewise.
13682         (arm_evpc_neon_vzip): Likewise.
13683         (arm_evpc_neon_vrev): Likewise.
13684         (arm_evpc_neon_vtrn): Likewise.
13685         (arm_evpc_neon_vext): Likewise.
13686         (arm_validize_comparison): Likewise.
13687         * config/arm/neon.md (neon_vc<cmp_op><mode>): Likewise.
13688         * config/avr/avr-c.c (avr_resolve_overloaded_builtin): Likewise.
13689         * config/avr/avr.c (avr_rtx_costs_1): Likewise.
13690         * config/c6x/c6x.c (c6x_vector_mode_supported_p): Likewise.
13691         (c6x_preferred_simd_mode): Likewise.
13692         * config/epiphany/epiphany.c (get_epiphany_condition_code): Likewise.
13693         (epiphany_rtx_costs): Likewise.
13694         * config/epiphany/predicates.md (proper_comparison_operator):
13695         Likewise.
13696         * config/frv/frv.c (condexec_memory_operand): Likewise.
13697         (frv_emit_move): Likewise.
13698         (output_move_single): Likewise.
13699         (output_condmove_single): Likewise.
13700         (frv_hard_regno_mode_ok): Likewise.
13701         (frv_matching_accg_mode): Likewise.
13702         * config/h8300/h8300.c (split_adds_subs): Likewise.
13703         (h8300_rtx_costs): Likewise.
13704         (h8300_print_operand): Likewise.
13705         (compute_mov_length): Likewise.
13706         (output_logical_op): Likewise.
13707         (compute_logical_op_length): Likewise.
13708         (compute_logical_op_cc): Likewise.
13709         (h8300_shift_needs_scratch_p): Likewise.
13710         (output_a_shift): Likewise.
13711         (compute_a_shift_length): Likewise.
13712         (compute_a_shift_cc): Likewise.
13713         (expand_a_rotate): Likewise.
13714         (output_a_rotate): Likewise.
13715         * config/i386/i386.c (classify_argument): Likewise.
13716         (function_arg_advance_32): Likewise.
13717         (function_arg_32): Likewise.
13718         (function_arg_64): Likewise.
13719         (function_value_64): Likewise.
13720         (ix86_gimplify_va_arg): Likewise.
13721         (ix86_legitimate_constant_p): Likewise.
13722         (put_condition_code): Likewise.
13723         (split_double_mode): Likewise.
13724         (ix86_avx256_split_vector_move_misalign): Likewise.
13725         (ix86_expand_vector_logical_operator): Likewise.
13726         (ix86_split_idivmod): Likewise.
13727         (ix86_expand_adjust_ufix_to_sfix_si): Likewise.
13728         (ix86_build_const_vector): Likewise.
13729         (ix86_build_signbit_mask): Likewise.
13730         (ix86_match_ccmode): Likewise.
13731         (ix86_cc_modes_compatible): Likewise.
13732         (ix86_expand_branch): Likewise.
13733         (ix86_expand_sse_cmp): Likewise.
13734         (ix86_expand_sse_movcc): Likewise.
13735         (ix86_expand_int_sse_cmp): Likewise.
13736         (ix86_expand_vec_perm_vpermi2): Likewise.
13737         (ix86_expand_vec_perm): Likewise.
13738         (ix86_expand_sse_unpack): Likewise.
13739         (ix86_expand_int_addcc): Likewise.
13740         (ix86_split_to_parts): Likewise.
13741         (ix86_vectorize_builtin_gather): Likewise.
13742         (ix86_vectorize_builtin_scatter): Likewise.
13743         (avx_vpermilp_parallel): Likewise.
13744         (inline_memory_move_cost): Likewise.
13745         (ix86_tieable_integer_mode_p): Likewise.
13746         (x86_maybe_negate_const_int): Likewise.
13747         (ix86_expand_vector_init_duplicate): Likewise.
13748         (ix86_expand_vector_init_one_nonzero): Likewise.
13749         (ix86_expand_vector_init_one_var): Likewise.
13750         (ix86_expand_vector_init_concat): Likewise.
13751         (ix86_expand_vector_init_interleave): Likewise.
13752         (ix86_expand_vector_init_general): Likewise.
13753         (ix86_expand_vector_set): Likewise.
13754         (ix86_expand_vector_extract): Likewise.
13755         (emit_reduc_half): Likewise.
13756         (ix86_emit_i387_round): Likewise.
13757         (ix86_mangle_type): Likewise.
13758         (ix86_expand_round_sse4): Likewise.
13759         (expand_vec_perm_blend): Likewise.
13760         (canonicalize_vector_int_perm): Likewise.
13761         (ix86_expand_vec_one_operand_perm_avx512): Likewise.
13762         (expand_vec_perm_1): Likewise.
13763         (expand_vec_perm_interleave3): Likewise.
13764         (expand_vec_perm_even_odd_pack): Likewise.
13765         (expand_vec_perm_even_odd_1): Likewise.
13766         (expand_vec_perm_broadcast_1): Likewise.
13767         (ix86_vectorize_vec_perm_const_ok): Likewise.
13768         (ix86_expand_vecop_qihi): Likewise.
13769         (ix86_expand_mul_widen_hilo): Likewise.
13770         (ix86_expand_sse2_abs): Likewise.
13771         (ix86_expand_pextr): Likewise.
13772         (ix86_expand_pinsr): Likewise.
13773         (ix86_preferred_simd_mode): Likewise.
13774         (ix86_simd_clone_compute_vecsize_and_simdlen): Likewise.
13775         * config/i386/sse.md (*andnot<mode>3): Likewise.
13776         (<mask_codefor><code><mode>3<mask_name>): Likewise.
13777         (*<code><mode>3): Likewise.
13778         * config/ia64/ia64.c (ia64_expand_vecint_compare): Likewise.
13779         (ia64_expand_atomic_op): Likewise.
13780         (ia64_arg_type): Likewise.
13781         (ia64_mode_to_int): Likewise.
13782         (ia64_scalar_mode_supported_p): Likewise.
13783         (ia64_vector_mode_supported_p): Likewise.
13784         (expand_vec_perm_broadcast): Likewise.
13785         * config/iq2000/iq2000.c (iq2000_move_1word): Likewise.
13786         (iq2000_function_arg_advance): Likewise.
13787         (iq2000_function_arg): Likewise.
13788         * config/m32c/m32c.c (m32c_preferred_reload_class): Likewise.
13789         * config/m68k/m68k.c (output_dbcc_and_branch): Likewise.
13790         (m68k_libcall_value): Likewise.
13791         (m68k_function_value): Likewise.
13792         (sched_attr_op_type): Likewise.
13793         * config/mcore/mcore.c (mcore_output_move): Likewise.
13794         * config/microblaze/microblaze.c (microblaze_function_arg_advance):
13795         Likewise.
13796         (microblaze_function_arg): Likewise.
13797         * config/mips/mips.c (mips16_build_call_stub): Likewise.
13798         (mips_print_operand): Likewise.
13799         (mips_mode_ok_for_mov_fmt_p): Likewise.
13800         (mips_vector_mode_supported_p): Likewise.
13801         (mips_preferred_simd_mode): Likewise.
13802         (mips_expand_vpc_loongson_even_odd): Likewise.
13803         (mips_expand_vec_unpack): Likewise.
13804         (mips_expand_vi_broadcast): Likewise.
13805         (mips_expand_vector_init): Likewise.
13806         (mips_expand_vec_reduc): Likewise.
13807         (mips_expand_msa_cmp): Likewise.
13808         * config/mips/mips.md (casesi_internal_mips16_<mode>): Likewise.
13809         * config/mn10300/mn10300.c (mn10300_print_operand): Likewise.
13810         (cc_flags_for_mode): Likewise.
13811         * config/msp430/msp430.c (msp430_print_operand): Likewise.
13812         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Likewise.
13813         (nds32_output_casesi_pc_relative): Likewise.
13814         * config/nds32/nds32.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
13815         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Likewise.
13816         (nvptx_gen_unpack): Likewise.
13817         (nvptx_gen_pack): Likewise.
13818         (nvptx_gen_shuffle): Likewise.
13819         (nvptx_gen_wcast): Likewise.
13820         (nvptx_preferred_simd_mode): Likewise.
13821         * config/pa/pa.c (pa_secondary_reload): Likewise.
13822         * config/pa/predicates.md (base14_operand): Likewise.
13823         * config/powerpcspe/powerpcspe-c.c
13824         (altivec_resolve_overloaded_builtin): Likewise.
13825         * config/powerpcspe/powerpcspe.c (rs6000_setup_reg_addr_masks):
13826         Likewise.
13827         (rs6000_preferred_simd_mode): Likewise.
13828         (output_vec_const_move): Likewise.
13829         (rs6000_expand_vector_extract): Likewise.
13830         (rs6000_split_vec_extract_var): Likewise.
13831         (reg_offset_addressing_ok_p): Likewise.
13832         (rs6000_legitimate_offset_address_p): Likewise.
13833         (rs6000_legitimize_address): Likewise.
13834         (rs6000_emit_set_const): Likewise.
13835         (rs6000_const_vec): Likewise.
13836         (rs6000_emit_move): Likewise.
13837         (spe_build_register_parallel): Likewise.
13838         (rs6000_darwin64_record_arg_recurse): Likewise.
13839         (swap_selector_for_mode): Likewise.
13840         (spe_init_builtins): Likewise.
13841         (paired_init_builtins): Likewise.
13842         (altivec_init_builtins): Likewise.
13843         (do_load_for_compare): Likewise.
13844         (rs6000_generate_compare): Likewise.
13845         (rs6000_expand_float128_convert): Likewise.
13846         (emit_load_locked): Likewise.
13847         (emit_store_conditional): Likewise.
13848         (rs6000_output_function_epilogue): Likewise.
13849         (rs6000_handle_altivec_attribute): Likewise.
13850         (rs6000_function_value): Likewise.
13851         (emit_fusion_gpr_load): Likewise.
13852         (emit_fusion_p9_load): Likewise.
13853         (emit_fusion_p9_store): Likewise.
13854         * config/powerpcspe/predicates.md (easy_fp_constant): Likewise.
13855         (fusion_gpr_mem_load): Likewise.
13856         (fusion_addis_mem_combo_load): Likewise.
13857         (fusion_addis_mem_combo_store): Likewise.
13858         * config/rs6000/predicates.md (easy_fp_constant): Likewise.
13859         (fusion_gpr_mem_load): Likewise.
13860         (fusion_addis_mem_combo_load): Likewise.
13861         (fusion_addis_mem_combo_store): Likewise.
13862         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
13863         Likewise.
13864         * config/rs6000/rs6000-string.c (do_load_for_compare): Likewise.
13865         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
13866         (rs6000_preferred_simd_mode): Likewise.
13867         (output_vec_const_move): Likewise.
13868         (rs6000_expand_vector_extract): Likewise.
13869         (rs6000_split_vec_extract_var): Likewise.
13870         (reg_offset_addressing_ok_p): Likewise.
13871         (rs6000_legitimate_offset_address_p): Likewise.
13872         (rs6000_legitimize_address): Likewise.
13873         (rs6000_emit_set_const): Likewise.
13874         (rs6000_const_vec): Likewise.
13875         (rs6000_emit_move): Likewise.
13876         (rs6000_darwin64_record_arg_recurse): Likewise.
13877         (swap_selector_for_mode): Likewise.
13878         (paired_init_builtins): Likewise.
13879         (altivec_init_builtins): Likewise.
13880         (rs6000_expand_float128_convert): Likewise.
13881         (emit_load_locked): Likewise.
13882         (emit_store_conditional): Likewise.
13883         (rs6000_output_function_epilogue): Likewise.
13884         (rs6000_handle_altivec_attribute): Likewise.
13885         (rs6000_function_value): Likewise.
13886         (emit_fusion_gpr_load): Likewise.
13887         (emit_fusion_p9_load): Likewise.
13888         (emit_fusion_p9_store): Likewise.
13889         * config/rx/rx.c (rx_gen_move_template): Likewise.
13890         (flags_from_mode): Likewise.
13891         * config/s390/predicates.md (s390_alc_comparison): Likewise.
13892         (s390_slb_comparison): Likewise.
13893         * config/s390/s390.c (s390_handle_vectorbool_attribute): Likewise.
13894         (s390_vector_mode_supported_p): Likewise.
13895         (s390_cc_modes_compatible): Likewise.
13896         (s390_match_ccmode_set): Likewise.
13897         (s390_canonicalize_comparison): Likewise.
13898         (s390_emit_compare_and_swap): Likewise.
13899         (s390_branch_condition_mask): Likewise.
13900         (s390_rtx_costs): Likewise.
13901         (s390_secondary_reload): Likewise.
13902         (__SECONDARY_RELOAD_CASE): Likewise.
13903         (s390_expand_cs): Likewise.
13904         (s390_preferred_simd_mode): Likewise.
13905         * config/s390/vx-builtins.md (vec_packsu_u<mode>): Likewise.
13906         * config/sh/sh.c (sh_print_operand): Likewise.
13907         (dump_table): Likewise.
13908         (sh_secondary_reload): Likewise.
13909         * config/sh/sh.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
13910         * config/sh/sh.md (casesi_worker_1): Likewise.
13911         (casesi_worker_2): Likewise.
13912         * config/sparc/predicates.md (icc_comparison_operator): Likewise.
13913         (fcc_comparison_operator): Likewise.
13914         * config/sparc/sparc.c (sparc_expand_move): Likewise.
13915         (emit_soft_tfmode_cvt): Likewise.
13916         (sparc_preferred_simd_mode): Likewise.
13917         (output_cbranch): Likewise.
13918         (sparc_print_operand): Likewise.
13919         (sparc_expand_vec_perm_bmask): Likewise.
13920         (vector_init_bshuffle): Likewise.
13921         * config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
13922         (spu_vector_mode_supported_p): Likewise.
13923         (spu_expand_insv): Likewise.
13924         (spu_emit_branch_or_set): Likewise.
13925         (spu_handle_vector_attribute): Likewise.
13926         (spu_builtin_splats): Likewise.
13927         (spu_builtin_extract): Likewise.
13928         (spu_builtin_promote): Likewise.
13929         (spu_expand_sign_extend): Likewise.
13930         * config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
13931         (tilegx_simd_int): Likewise.
13932         * config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p): Likewise.
13933         (tilepro_simd_int): Likewise.
13934         * config/v850/v850.c (const_double_split): Likewise.
13935         (v850_print_operand): Likewise.
13936         (ep_memory_offset): Likewise.
13937         * config/vax/vax.c (vax_rtx_costs): Likewise.
13938         (vax_output_int_move): Likewise.
13939         (vax_output_int_add): Likewise.
13940         (vax_output_int_subtract): Likewise.
13941         * config/visium/predicates.md (visium_branch_operator): Likewise.
13942         * config/visium/visium.c (rtx_ok_for_offset_p): Likewise.
13943         (visium_print_operand_address): Likewise.
13944         * config/visium/visium.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
13945         * config/xtensa/xtensa.c (xtensa_mem_offset): Likewise.
13946         (xtensa_expand_conditional_branch): Likewise.
13947         (xtensa_copy_incoming_a7): Likewise.
13948         (xtensa_output_literal): Likewise.
13949         * dfp.c (decimal_real_maxval): Likewise.
13950         * targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.
13952 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
13953             Alan Hayward  <alan.hayward@arm.com>
13954             David Sherwood  <david.sherwood@arm.com>
13956         * genmodes.c (mode_size_inline): Add an E_ prefix to mode names.
13957         (mode_nunits_inline): Likewise.
13958         (mode_inner_inline): Likewise.
13959         (mode_unit_size_inline): Likewise.
13960         (mode_unit_precision_inline): Likewise.
13961         (emit_insn_modes_h): Likewise.  Also emit a #define of the
13962         unprefixed name.
13963         (emit_mode_wider): Add an E_ prefix to mode names.
13964         (emit_mode_complex): Likewise.
13965         (emit_mode_inner): Likewise.
13966         (emit_mode_adjustments): Likewise.
13967         (emit_mode_int_n): Likewise.
13968         * config/aarch64/aarch64-builtins.c (v8qi_UP, v4hi_UP, v4hf_UP)
13969         (v2si_UP, v2sf_UP, v1df_UP, di_UP, df_UP, v16qi_UP, v8hi_UP, v8hf_UP)
13970         (v4si_UP, v4sf_UP, v2di_UP, v2df_UP, ti_UP, oi_UP, ci_UP, xi_UP)
13971         (si_UP, sf_UP, hi_UP, hf_UP, qi_UP): Likewise.
13972         (CRC32_BUILTIN, ENTRY): Likewise.
13973         * config/aarch64/aarch64.c (aarch64_push_regs): Likewise.
13974         (aarch64_pop_regs): Likewise.
13975         (aarch64_process_components): Likewise.
13976         * config/alpha/alpha.c (alpha_emit_conditional_move): Likewise.
13977         * config/arm/arm-builtins.c (v8qi_UP, v4hi_UP, v4hf_UP, v2si_UP)
13978         (v2sf_UP, di_UP, v16qi_UP, v8hi_UP, v8hf_UP, v4si_UP, v4sf_UP)
13979         (v2di_UP, ti_UP, ei_UP, oi_UP, hf_UP, si_UP, void_UP): Likewise.
13980         * config/arm/arm.c (arm_init_libfuncs): Likewise.
13981         * config/i386/i386-builtin-types.awk (ix86_builtin_type_vect_mode):
13982         Likewise.
13983         * config/i386/i386-builtin.def (pcmpestr): Likewise.
13984         (pcmpistr): Likewise.
13985         * config/microblaze/microblaze.c (double_memory_operand): Likewise.
13986         * config/mmix/mmix.c (mmix_output_condition): Likewise.
13987         * config/powerpcspe/powerpcspe.c (rs6000_init_hard_regno_mode_ok):
13988         Likewise.
13989         * config/rl78/rl78.c (mduc_regs): Likewise.
13990         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
13991         (htm_expand_builtin): Likewise.
13992         * config/sh/sh.h (REGISTER_NATURAL_MODE): Likewise.
13993         * config/sparc/sparc.c (emit_save_or_restore_regs): Likewise.
13994         * config/xtensa/xtensa.c (print_operand): Likewise.
13995         * expmed.h (NUM_MODE_PARTIAL_INT): Likewise.
13996         (NUM_MODE_VECTOR_INT): Likewise.
13997         * genoutput.c (null_operand): Likewise.
13998         (output_operand_data): Likewise.
13999         * genrecog.c (print_parameter_value): Likewise.
14000         * lra.c (debug_operand_data): Likewise.
14002 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14004         * dwarf2out.c (scompare_loc_descriptor_wide)
14005         (scompare_loc_descriptor_narrow): New functions, split out from...
14006         (scompare_loc_descriptor): ...here.
14007         * expmed.c (emit_store_flag_int): New function, split out from...
14008         (emit_store_flag): ...here.
14010 2017-08-30  Richard Biener  <rguenther@suse.de>
14012         * dwarf2out.c (dwarf2out_finish): Remove setting AT_pubnames.
14013         (dwarf2out_early_finish): Move setting of AT_pubnames from
14014         early debug output to early finish.
14016 2017-08-30  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
14018         * gcc/config/msp430/msp430.h: Pass -mcode/data-region to the linker
14019         and -mdata-region to the assembler.
14021 2017-08-30  Richard Biener  <rguenther@suse.de>
14023         * dwarf2out.c (add_dwarf_attr): Check we don't add duplicate
14024         attributes.
14025         (gen_subprogram_die): Add DW_AT_object_pointer only early.
14026         (dwarf2out_early_global_decl): Only generate a DIE for the
14027         abstract origin if it doesn't already exist or is a declaration DIE.
14028         (resolve_addr): Do not add the linkage name twice when
14029         generating a stub DIE for the DW_TAG_GNU_call_site target.
14031 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
14033         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14034         Use machine_mode rather than int for arg1_mode.
14036 2017-08-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
14038         PR target/82015
14039         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Insure
14040         that the second argument of the built-in functions to unpack
14041         128-bit scalar types to 64-bit values is 0 or 1.  Change to use a
14042         switch statement instead a lot of if statements.
14043         * config/rs6000/rs6000.md (unpack<mode>, FMOVE128_VSX iterator):
14044         Allow 64-bit values to be in Altivec registers as well as
14045         traditional floating point registers.
14046         (pack<mode>, FMOVE128_VSX iterator): Likewise.
14048 2017-08-29  Alexander Monakov  <amonakov@ispras.ru>
14050         * ira-costs.c (record_address_regs): Handle both operands of PLUS for
14051         MAX_REGS_PER_ADDRESS == 1.
14053 2017-08-29  Uros Bizjak  <ubizjak@gmail.com>
14055         * config/i386/i386.opt (flag_fentry): Do not init to -1.
14056         * config/i386/i386.c (ix86_option_override_internal): Simplify
14057         setting of opts->x_flag_entry.
14059 2017-08-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14060             Jakub Jelinek  <jakub@redhat.com>
14061             Richard Biener  <rguenther@suse.de>
14063         PR tree-optimization/81503
14064         * gimple-ssa-strength-reduction.c (replace_mult_candidate): Ensure
14065         folded constant fits in the target type; reorder tests for clarity.
14067 2017-08-29  Martin Liska  <mliska@suse.cz>
14069         * passes.def: Include pass_lower_switch.
14070         * stmt.c (dump_case_nodes): Remove and move to
14071         tree-switch-conversion.
14072         (case_values_threshold): Likewise.
14073         (expand_switch_as_decision_tree_p): Likewise.
14074         (emit_case_decision_tree): Likewise.
14075         (expand_case): Likewise.
14076         (balance_case_nodes): Likewise.
14077         (node_has_low_bound): Likewise.
14078         (node_has_high_bound): Likewise.
14079         (node_is_bounded): Likewise.
14080         (emit_case_nodes): Likewise.
14081         (struct simple_case_node): New struct.
14082         (add_case_node): Remove.
14083         (emit_case_dispatch_table): Use vector instead of case_list.
14084         (reset_out_edges_aux): Remove.
14085         (compute_cases_per_edge): Likewise.
14086         (expand_case): Build list of simple_case_node.
14087         (expand_sjlj_dispatch_table): Use it.
14088         * tree-switch-conversion.c (struct case_node): Moved from
14089         stmt.c and adjusted.
14090         (emit_case_nodes): Likewise.
14091         (node_has_low_bound): Likewise.
14092         (node_has_high_bound): Likewise.
14093         (node_is_bounded): Likewise.
14094         (case_values_threshold): Likewise.
14095         (reset_out_edges_aux): Likewise.
14096         (compute_cases_per_edge): Likewise.
14097         (add_case_node): Likewise.
14098         (dump_case_nodes): Likewise.
14099         (balance_case_nodes): Likewise.
14100         (expand_switch_as_decision_tree_p): Likewise.
14101         (emit_jump): Likewise.
14102         (emit_case_decision_tree): Likewise.
14103         (try_switch_expansion): Likewise.
14104         (do_jump_if_equal): Likewise.
14105         (emit_cmp_and_jump_insns): Likewise.
14106         (fix_phi_operands_for_edge): New function.
14107         (record_phi_operand_mapping): Likewise.
14108         (class pass_lower_switch): New pass.
14109         (pass_lower_switch::execute): New function.
14110         (make_pass_lower_switch): Likewise.
14111         (conditional_probability):
14112         * timevar.def: Add TV_TREE_SWITCH_LOWERING.
14113         * tree-pass.h: Add make_pass_lower_switch.
14115 2017-08-29  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
14117         PR target/80993
14118         * gcc/config/msp430/msp430.c (msp430_attr): Mark interrupt
14119         handlers as used.
14121 2017-08-29  Richard Biener  <rguenther@suse.de>
14123         * dwarf2out.c (add_dwarf_attr): When checking is enabled verify
14124         we do not add a DW_AT_inline attribute twice.
14125         (gen_subprogram_die): Remove code setting DW_AT_inline on
14126         DECL_ABSTRACT_P nodes.
14128 2017-08-29  Richard Sandiford  <richard.sandiford@linaro.org>
14130         * gimplify.c (gimplify_call_expr): Copy the nothrow flag to
14131         calls to internal functions.
14132         (gimplify_modify_expr): Likewise.
14133         * tree-call-cdce.c (use_internal_fn): Likewise.
14134         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
14135         (convert_to_divmod): Set the nothrow flag.
14136         * tree-if-conv.c (predicate_mem_writes):  Likewise.
14137         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
14138         (vectorizable_call): Likewise.
14139         (vectorizable_store): Likewise.
14140         (vectorizable_load): Likewise.
14141         * tree-vect-patterns.c (vect_recog_pow_pattern): Likewise.
14142         (vect_recog_mask_conversion_pattern): Likewise.
14144 2017-08-29  Martin Liska  <mliska@suse.cz>
14146         PR other/39851
14147         * gcc.c (driver_handle_option): Add new argument.
14148         * opts-common.c (handle_option): Pass
14149         target_option_override_hook.
14150         * opts-global.c (lang_handle_option): Add new option.
14151         (set_default_handlers):  Add new argument.
14152         (decode_options): Likewise.
14153         * opts.c (target_handle_option): Likewise.
14154         (common_handle_option): Call target_option_override_hook.
14155         * opts.h (struct cl_option_handler_func): Add hook for
14156         target option override.
14157         (struct cl_option_handlers): Likewise.
14158         (set_default_handlers): Add new argument.
14159         (decode_options): Likewise.
14160         (common_handle_option): Likewise.
14161         (target_handle_option): Likewise.
14162         * toplev.c (toplev::main): Pass targetm.target_option.override
14163         hook.
14165 2017-08-29  Richard Biener  <rguenther@suse.de>
14166         Dominik Infuehr <dominik.infuehr@theobroma-systems.com>
14168         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Properly confine
14169         life to the active subtree.
14171 2017-08-28  Jeff Law  <law@redhat.com>
14173         * tree-ssa-dom.c (edge_info::record_simple_equiv): Call
14174         derive_equivalences.
14175         (derive_equivalences_from_bit_ior, record_temporary_equivalences):
14176         Code moved into....
14177         (edge_info::derive_equivalences): New private member function
14179         * tree-ssa-dom.c (class edge_info): Changed from a struct
14180         to a class.  Add ctor/dtor, methods and data members.
14181         (edge_info::edge_info): Renamed from allocate_edge_info.
14182         Initialize additional members.
14183         (edge_info::~edge_info): New.
14184         (free_dom_edge_info): Delete the edge info.
14185         (record_edge_info): Use new class & associated member functions.
14186         Tighten forms for testing for edge equivalences.
14187         (record_temporary_equivalences): Iterate over the simple
14188         equivalences rather than assuming there's only one per edge.
14189         (cprop_into_successor_phis): Iterate over the simple
14190         equivalences rather than assuming there's only one per edge.
14191         (optimize_stmt): Use operand_equal_p rather than pointer
14192         equality for mini-DSE code.
14194 2017-08-28  Nathan Sidwell  <nathan@acm.org>
14196         * gcc.c (execute): Fold SIGPIPE handling into switch
14197         statement.  Adjust internal error message.
14199 2017-08-28  Richard Biener  <rguenther@suse.de>
14201         PR debug/81993
14202         * dwarf2out.c (gen_remaining_tmpl_value_param_die_attributes):
14203         Do nothing for removed DIEs.
14205 2017-08-28  Richard Biener  <rguenther@suse.de>
14207         PR tree-optimization/81977
14208         * tree-ssa-sccvn.c (vn_reference_lookup_3): Fix look through
14209         memcpy.
14211 2017-08-28  Alexander Monakov  <amonakov@ispras.ru>
14213         PR target/80640
14214         * doc/md.texi (mem_thread_fence): Remove mention of mode.  Rewrite.
14215         * optabs.c (expand_mem_thread_fence): Emit a compiler barrier when
14216         using targetm.gen_mem_thread_fence.
14218 2017-08-27  Uros Bizjak  <ubizjak@gmail.com>
14220         PR target/81995
14221         * config/i386/i386.md (*<btsc><mode>): Change operand 2
14222         predicate to register_operand.  Reorder operands.
14223         (*btr<mode>): Ditto.
14224         (*<btsc><mode>_mask): Change operand 3 predicate to register_operand.
14225         (*btr<mode>_mask): Ditto.
14227 2017-08-25  Steven Munroe  <munroesj@gcc.gnu.org>
14229         * config.gcc (powerpc*-*-*): Add xmmintrin.h and mm_malloc.h.
14230         * config/rs6000/xmmintrin.h: New file.
14231         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include xmmintrin.h.
14233 2017-08-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14235         PR target/81504
14236         * config/rs6000/rs6000-p8swap.c (find_alignment_op): Add reference
14237         parameter and_insn and return it.
14238         (recombine_lvx_pattern): Insert a copy to ensure availability of
14239         the base register of the copied masking operation at the point of
14240         the instruction replacement.
14241         (recombine_stvx_pattern): Likewise.
14243 2017-08-25  Michael Meissner  <meissner@linux.vnet.ibm.com>
14245         * config/rs6000/rs6000.opt (-mpower9-dform-scalar): Delete
14246         undocumented switches.
14247         (-mpower9-dform-vector): Likewise.
14248         (-mpower9-dform): Likewise.
14249         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
14250         comments to delete references to -mpower9-dform* switches.
14251         * config/rs6000/predicates.md (vsx_quad_dform_memory_operand):
14252         Delete reference to -mpower9-dform* switches, test for
14253         -mpower9-vector instead.
14254         * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Likewise.
14255         (OTHER_P9_VECTOR_MASKS): Likewise.
14256         (POWERPC_MASKS): Likewise.
14257         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Change
14258         tests against -mpower9-dform* to -mpower9-vector.  Delete code
14259         that checked for -mpower9-dform* consistancy with other options.
14260         Add test for -mpower9-misc to enable other power9 switches.
14261         (rs6000_init_hard_regno_mode_ok): Likewise.
14262         (rs6000_option_override_internal): Likewise.
14263         (rs6000_emit_prologue): Likewise.
14264         (rs6000_emit_epilogue): Likewise.
14265         (rs6000_opt_masks): Delete -mpower9-dform-{scalar,vector}.
14266         (rs6000_disable_incompatiable_switches): Delete -mpower9-dform.
14267         (emit_fusion_p9_load): Change tests for -mpower9-dform-scalar
14268         -mpower9-vector.
14269         (emit_fusion_p9_store): Likewise.
14270         * config/rs6000/rs6000.h (TARGET_P9_DFORM_SCALAR): Delete
14271         resetting these macros if the assembler does not support ISA 3.0
14272         instructions.
14273         (TARGET_P9_DFORM_VECTOR): Likewise.
14274         * config/rs6000/rs6000.md (peepholes to optimize altivec memory):
14275         Change to use -mpower9-vector instead of -mpower9-dform-scalar.
14277 2017-08-25  Alan Modra  <amodra@gmail.com>
14279         PR rtl-optimization/81747
14280         * cse.c (cse_extended_basic_block): Don't attempt to record
14281         equivalences for degenerate conditional branches that branch
14282         to their fall-through.
14284 2017-08-24  Martin Sebor  <msebor@redhat.com>
14286         PR middle-end/81908
14287         * gimple-fold.c (size_must_be_zero_p): New function.
14288         (gimple_fold_builtin_memory_op): Call it.
14290 2017-08-24  Steven Munroe  <munroesj@gcc.gnu.org>
14292         * config/rs6000/mm_malloc.h: New file.
14294 2017-08-24  Bin Cheng  <bin.cheng@arm.com>
14296         PR tree-optimization/81913
14297         * tree-ssa-loop-niter.c (number_of_iterations_cond): Skip niter
14298         analysis when either IVs in condition can wrap.
14300 2017-08-24  Uros Bizjak  <ubizjak@gmail.com>
14302         * dwarf2out.c (MAX_ARTIFICIAL_LABEL_BYTES): Increase to 40.
14303         * dwarf2cfi.c (MAX_ARTIFICIAL_LABEL_BYTES): Remove.
14305 2017-08-24  Richard Biener  <rguenther@suse.de>
14307         PR target/81921
14308         * targhooks.c (default_target_can_inline_p): Properly
14309         use target_option_default_node when no DECL_FUNCTION_SPECIFIC_TARGET
14310         is present and always compare.
14311         * config/i386/i386.c (ix86_valid_target_attribute_tree): Do not
14312         infer -mfpmath=sse from TARGET_SSE_P.
14313         (ix86_can_inline_p): Properly use target_option_default_node when
14314         no DECL_FUNCTION_SPECIFIC_TARGET is present and always compare.
14316 2017-08-24  Richard Biener  <rguenther@suse.de>
14318         PR debug/81936
14319         * dwarf2out.c (output_die): Handle flag_generate_offload like
14320         flag_generate_lto.
14321         (output_comp_unit): Likewise.
14322         (gen_array_type_die): Likewise.
14323         (dwarf2out_early_finish): Likewise.
14324         (note_variable_value_in_expr): Likewise.
14325         (dwarf2out_finish): Likewise.  Adjust assert.
14326         * cgraphunit.c (symbol_table::compile): Move setting of
14327         flag_generate_offload earlier ...
14328         (symbol_table::finalize_compilation_unit): ... here, before
14329         early debug finalization.
14331 2017-08-24  Richard Biener  <rguenther@suse.de>
14333         * config/i386/i386.c: Include symbol-summary.h, ipa-prop.h
14334         and ipa-fnsummary.h.
14335         (ix86_can_inline_p): When ix86_fpmath flags do not match
14336         check whether the callee uses FP math at all.
14338 2017-08-24  Aldy Hernandez  <aldyh@redhat.com>
14340         PR middle-end/81931
14341         * tree-ssanames.c (get_nonzero_bits): Use element_precision
14342         instead of TYPE_PRECISION.
14344 2017-08-24  Richard Sandiford  <richard.sandiford@linaro.org>
14345             Alan Hayward  <alan.hayward@arm.com>
14346             David Sherwood  <david.sherwood@arm.com>
14348         * combine.c (make_extraction): Use subreg_offset_from_lsb.
14350 2017-08-23  Daniel Santos  <daniel.santos@pobox.com>
14352         * config/i386/i386.h (ix86_frame::stack_realign_allocate_offset):
14353         Remove field.
14354         (ix86_frame::stack_realign_allocate): New field.
14355         (struct machine_frame_state): Modify comments.
14356         (machine_frame_state::sp_realigned_fp_end): New field.
14357         * config/i386/i386.c (ix86_compute_frame_layout): Rework stack frame
14358         layout calculation.
14359         (sp_valid_at): Add assertion to assure no attempt to access invalid
14360         offset of a realigned stack.
14361         (fp_valid_at): Likewise.
14362         (choose_baseaddr): Modify comments.
14363         (ix86_emit_outlined_ms2sysv_save): Adjust to changes in
14364         ix86_expand_prologue.
14365         (ix86_expand_prologue): Modify stack realignment and allocation.
14366         (ix86_expand_epilogue): Modify comments.
14367         * doc/sourcebuild.texi: Add documentation for target selectors avx2,
14368         avx2_runtime, avx512f, and avx512f_runtime.
14370 2017-08-23  Uros Bizjak  <ubizjak@gmail.com>
14372         * config/i386/i386.opt: Remove unneeded Init(0) initializations.
14373         (mstackrealign): Do not init to -1.
14374         * config/i386/i386.c (ix86_option_override_internal):
14375         Check opts_set, not opts when setting default value of
14376         opts->x_ix86_force_align_arg_pointer.
14378 2017-08-23  Richard Biener  <rguenther@suse.de>
14380         * function.c (fndecl_name): Use verbosity 1 (no arguments) for
14381         lang_hooks.decl_printable_name.
14382         * print-rtl-function.c (print_rtx_function): Likewise.
14383         * tree-pretty-print.c (dump_function_header): Likewise.
14385 2017-08-23  Richard Biener  <rguenther@suse.de>
14387         PR lto/81940
14388         * dwarf2out.c (dwarf2out_abstract_function): Handle LTO with
14389         -g0 at compile-time.
14391 2017-08-23  Tamar Christina  <tamar.christina@arm.com>
14393         PR middle-end/19706
14394         * doc/sourcebuild.texi (Other hardware attributes):
14395         Document xorsign.
14397 2017-08-23  Tamar Christina  <tamar.christina@arm.com>
14399         PR middle-end/19706
14400         * tree-ssa-math-opts.c (convert_expand_mult_copysign):
14401         Fix single-use check.
14403 2017-08-23  Thomas Preud'homme  <thomas.preudhomme@arm.com>
14405         * gcc.c (execute): Only test for SIGKILL and SIGQUIT if available.
14407 2017-08-22  Daniel Santos  <daniel.santos@pobox.com>
14409         * doc/install.texi: Modify to add more details on running selected
14410         tests.
14412 2017-08-22  Daniel Santos  <daniel.santos@pobox.com>
14414         * config/i386/i386.c (ix86_option_override_internal): Error when -mx32
14415         is combined with -mabi=ms.
14416         (ix86_function_type_abi): Limit errors for mixing -mx32 with attribute
14417         ms_abi.
14419 2017-08-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14421         PR tree-optimization/81488
14422         * gimple-ssa-strength-reduction (struct slsr_cand_d): Add visited
14423         and cached_basis fields.
14424         (MAX_SPREAD): New constant.
14425         (alloc_cand_and_find_basis): Initialize new fields.
14426         (clear_visited): New function.
14427         (create_phi_basis_1): Rename from create_phi_basis, set visited
14428         and cached_basis fields.
14429         (create_phi_basis): New wrapper function.
14430         (phi_add_costs_1): Rename from phi_add_costs, add spread
14431         parameter, set visited field, short-circuit when limits reached.
14432         (phi_add_costs): New wrapper function.
14433         (record_phi_increments_1): Rename from record_phi_increments, set
14434         visited field.
14435         (record_phi_increments): New wrapper function.
14436         (phi_incr_cost_1): Rename from phi_incr_cost, set visited field.
14437         (phi_incr_cost): New wrapper function.
14438         (all_phi_incrs_profitable_1): Rename from
14439         all_phi_incrs_profitable, set visited field.
14440         (all_phi_incrs_profitable): New wrapper function.
14442 2017-08-22  Richard Sandiford  <richard.sandiford@linaro.org>
14443             Alan Hayward  <alan.hayward@arm.com>
14444             David Sherwood  <david.sherwood@arm.com>
14446         * rtl.h (paradoxical_subreg_p): Define inline, and add a version
14447         that takes the outer and inner modes.
14448         * doc/rtl.texi: Use paradoxical_subreg_p instead of a GET_MODE_SIZE
14449         comparison as the canonical test for a paradoxical subreg.
14450         * combine.c (simplify_set): Use paradoxical_subreg_p.
14451         (make_extraction): Likewise.
14452         (force_to_mode): Likewise.
14453         (rtx_equal_for_field_assignment_p): Likewise.
14454         (gen_lowpart_for_combine): Likewise.
14455         (simplify_comparison): Likewise.
14456         * cse.c (equiv_constant): Likewise.
14457         * expmed.c (store_bit_field_1): Likewise.
14458         * final.c (alter_subreg): Likewise.
14459         * fwprop.c (propagate_rtx): Likewise.
14460         (forward_propagate_subreg): Likewise.
14461         * ira-conflicts.c (ira_build_conflicts): Likewise.
14462         * lower-subreg.c (simplify_gen_subreg_concatn): Likewise.
14463         * lra-constraints.c (curr_insn_transform): Likewise.
14464         (split_reg): Likewise.
14465         * lra-eliminations.c (move_plus_up): Likewise.
14466         (lra_eliminate_regs_1): Likewise.
14467         * recog.c (general_operand): Likewise.
14468         * ree.c (combine_reaching_defs): Likewise.
14469         * reload.c (push_reload): Likewise.
14470         (find_reloads): Likewise.
14471         * reload1.c (elimination_effects): Likewise.
14472         (compute_reload_subreg_offset): Likewise.
14473         (choose_reload_regs): Likewise.
14474         * rtlanal.c (subreg_lsb_1): Likewise.
14475         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
14476         (simplify_subreg): Likewise.
14477         * var-tracking.c (track_loc_p): Likewise.
14478         * emit-rtl.c (byte_lowpart_offset): Likewise.
14479         (paradoxical_subreg_p): Delete out-of-line definition.
14481 2017-08-22  Jeff Law  <law@redhat.com>
14483         PR tree-optimization/81741
14484         PR tree-optimization/71947
14485         * tree-ssa-dom.c: Include tree-inline.h.
14486         (record_temporary_equivalences): Only record SSA_NAME = SSA_NAME
14487         equivalences if one is more expensive to compute than the other.
14488         * tree-ssa-scopedtables.h (class const_or_copies): Make
14489         record_const_or_copy_raw method private.
14490         (class avail_exprs_stack): New method simplify_binary_operation.
14491         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr): Call
14492         avail_exprs_stack::simplify_binary_operation as needed.
14493         (avail_exprs_stack::simplify_binary_operation): New function.
14495 2017-08-22  Sebastian Huber  <sebastian.huber@embedded-brains.de>
14497         * config.gcc (powerpc-*-rtems*): Add rs6000/linux64.opt.
14498         * config/rs6000/rtems.h (ASM_PREFERRED_EH_DATA_FORMAT): New define.
14499         (DOT_SYMBOLS): Likewise.
14500         (MINIMAL_TOC_SECTION_ASM_OP): Likewise.
14501         (RELOCATABLE_NEEDS_FIXUP): Likewise.
14502         (RS6000_ABI_NAME): Likewise.
14503         (TARGET_CMODEL): Likewise.
14504         (TOC_SECTION_ASM_OP): Likewise.
14505         (SET_CMODEL): New macro.
14506         (SUBSUBTARGET_OVERRIDE_OPTIONS): Evaluate cmodel options.
14508 2017-08-22  Richard Biener  <rguenther@suse.de>
14510         * tree-inline.c (remap_type_1): Change asserts on TYPE_SIZE[_UNIT]
14511         to allow for free-lang-data replacements similar to verify_type_variant.
14513 2017-08-22  Richard Sandiford  <richard.sandiford@linaro.org>
14514             Alan Hayward  <alan.hayward@arm.com>
14515             David Sherwood  <david.sherwood@arm.com>
14517         * config/aarch64/aarch64.md (casesi): Use DImode rather than
14518         VOIDmode for the LABEL_REF.
14520 2017-08-22  Richard Biener  <rguenther@suse.de>
14522         * tree-cfg.c (gimple_split_edge): Avoid reallocating target PHI nodes.
14524 2017-08-22  Richard Biener  <rguenther@suse.de>
14526         * common.opt (feliminate-dwarf2-dups): Ignore.
14527         * doc/invoke.texi (feliminate-dwarf2-dups): Remove documentation.
14528         * dwarf2out.c (push_new_compile_unit, pop_compile_unit,
14529         same_die_p_wrap, compute_section_prefix,
14530         is_symbol_die, assign_symbol_names, break_out_includes): Remove.
14531         (comdat_symbol_id, comdat_symbol_number): Likewise.
14532         (cu_hash_table_entry, cu_hash_table_entry_hasher, cu_hash_type):
14533         Likewise.
14534         (check_duplicate_cu, record_comdat_symbol_number): Likewise.
14535         (output_die): Mark unreachable path unreachable.
14536         (dwarf2out_start_source_file): Do not create DW_TAG_GNU_BINCL.
14537         (dwarf2out_end_source_file): Do not create DW_TAG_GNU_EINCL.
14538         (dwarf2out_init): Remove code handling flag_eliminate_dwarf2_dups.
14539         (dwarf2out_early_finish): Likewise.
14541 2017-08-22  Aldy Hernandez  <aldyh@redhat.com>
14543         * wide-int.h (hwi_with_prec::hwi_with_prec): Sign extend.
14545 2017-08-22  Georg-Johann Lay  <avr@gjlay.de>
14547         PR target/81910
14548         * config/avr/avr.c (avr_handle_addr_attribute): Early return if
14549         not VAR_P. Filter attribute warnings with OPT_Wattributes.
14550         (avr_attribute_table) <io, io_low, address>: Initialize
14551         .decl_required with true.
14553 2017-08-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
14555         * config/rs6000/rs6000-cpus.def (-mvsx-scalar-float): Delete
14556         undocumented debugging options.
14557         (-mvsx-scalar-double): Likewise.
14558         (-mallow-df-permute): Likewise.
14559         (-mvectorize-builtins): Likewise.
14560         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
14561         (rs6000_builtin_vectorized_function): Likewise.
14562         (rs6000_builtin_md_vectorized_function): Likewise.
14563         (rs6000_opt_vars): Likewise.
14565 2017-08-21  Uros Bizjak  <ubizjak@gmail.com>
14567         PR target/46091
14568         * config/i386/i386.md (*btsq_imm): Rename from *btsq.
14569         (*btrq_imm): Rename from *btrq.
14570         (*btcq_imm): Rename from *btcq.
14571         (btsc): New code attribute.
14572         (*<btsc><mode>): New insn pattern.
14573         (*btr<mode>): Ditto.
14574         (*<btsc><mode>_mask): New insn_and_split pattern.
14575         (*btr<mode>_mask): Ditto.
14577 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
14578             Alan Hayward  <alan.hayward@arm.com>
14579             David Sherwood  <david.sherwood@arm.com>
14581         * function.c (pad_below): Simplify padding calculation.
14583 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
14584             Alan Hayward  <alan.hayward@arm.com>
14585             David Sherwood  <david.sherwood@arm.com>
14587         * target.def (function_prologue): Remove frame size argument.
14588         (function_epilogue): Likewise.
14589         * doc/tm.texi: Regenerate.
14590         * final.c (final_start_function): Update call to function_prologue.
14591         (final_end_function): Update call to function_epilogue.
14592         (default_function_pro_epilogue): Remove frame size argument.
14593         * output.h (default_function_pro_epilogue): Likewise.
14594         * config/arm/arm.c (arm_output_function_epilogue): Likewise.
14595         (arm_output_function_prologue): Likewise.
14596         * config/frv/frv.c (frv_function_prologue): Likewise.
14597         (frv_function_epilogue): Likewise.
14598         * config/i386/i386.c (ix86_output_function_epilogue): Likewise.
14599         * config/ia64/ia64.c (ia64_output_function_prologue): Likewise.
14600         (ia64_output_function_epilogue): Likewise.
14601         * config/m32r/m32r.c (m32r_output_function_prologue): Likewise.
14602         (m32r_output_function_epilogue): Likewise.
14603         * config/microblaze/microblaze.c (microblaze_function_prologue)
14604         (microblaze_function_epilogue): Likewise.
14605         * config/mips/mips.c (mips_output_function_prologue): Likewise.
14606         (mips_output_function_epilogue): Likewise.
14607         * config/mmix/mmix.c (mmix_target_asm_function_prologue): Likewise.
14608         (mmix_target_asm_function_epilogue): Likewise.
14609         * config/msp430/msp430.c (msp430_start_function): Likewise.
14610         * config/nds32/nds32.c (nds32_asm_function_prologue): Likewise.
14611         (nds32_asm_function_epilogue): Likewise.
14612         * config/nios2/nios2.c (nios2_asm_function_prologue): Likewise.
14613         * config/pa/pa.c (pa_output_function_prologue): Likewise.
14614         (pa_output_function_epilogue): Likewise.
14615         * config/powerpcspe/powerpcspe.c (rs6000_output_function_prologue)
14616         (rs6000_output_function_epilogue): Likewise.
14617         * config/rl78/rl78.c (rl78_start_function): Likewise.
14618         * config/rs6000/rs6000.c (rs6000_output_function_prologue): Likewise.
14619         (rs6000_output_function_epilogue): Likewise.
14620         * config/rx/rx.c (rx_output_function_prologue): Likewise.
14621         * config/sh/sh.c (sh_output_function_epilogue): Likewise.
14622         * config/sparc/sparc.c (sparc_asm_function_prologue): Likewise.
14623         (sparc_asm_function_epilogue): Likewise.
14625 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
14627         * tree.h (type_has_mode_precision_p): New function.
14628         * convert.c (convert_to_integer_1): Use it.
14629         * expr.c (expand_expr_real_2): Likewise.
14630         (expand_expr_real_1): Likewise.
14631         * fold-const.c (fold_single_bit_test_into_sign_test): Likewise.
14632         * match.pd: Likewise.
14633         * tree-ssa-forwprop.c (simplify_rotate): Likewise.
14634         * tree-ssa-math-opts.c (convert_mult_to_fma): Likewise.
14635         * tree-tailcall.c (process_assignment): Likewise.
14636         * tree-vect-loop.c (vectorizable_reduction): Likewise.
14637         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern)
14638         (vect_recog_mult_pattern, vect_recog_divmod_pattern): Likewise.
14639         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
14640         (vectorizable_assignment): Likewise.
14641         (vectorizable_shift): Likewise.
14642         (vectorizable_operation): Likewise.
14643         * tree-vrp.c (register_edge_assert_for_2): Likewise.
14645 2017-08-21  Wilco Dijkstra  <wdijkstr@arm.com>
14647         * match.pd: Add pow (C, x) simplification.
14649 2017-08-21  Richard Biener  <rguenther@suse.de>
14651         PR tree-optimization/81900
14652         * tree-ssa-pre.c (compute_antic_aux): Properly compute changed
14653         for blocks with abnormal predecessors.
14654         (compute_antic): Do not set visited flag prematurely.
14656 2017-08-21  Georg-Johann Lay  <avr@gjlay.de>
14658         PR target/79883
14659         * config/avr/avr.c (avr_set_current_function): Typo in diagnostic.
14661 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
14663         * stor-layout.h (vector_type_mode): Move to...
14664         * tree.h (vector_type_mode): ...here.
14665         * stor-layout.c (vector_type_mode): Move to...
14666         * tree.c (vector_type_mode): ...here.  Include rtl.h and regs.h.
14668 2017-08-21  Richard Biener  <rguenther@suse.de>
14670         * debug.h (struct gcc_debug_hooks): Add die_ref_for_decl and
14671         register_external_die hooks.
14672         (debug_false_tree_charstarstar_uhwistar): Declare.
14673         (debug_nothing_tree_charstar_uhwi): Likewise.
14674         * debug.c (do_nothing_debug_hooks): Adjust.
14675         (debug_false_tree_charstarstar_uhwistar): New do nothing.
14676         (debug_nothing_tree_charstar_uhwi): Likewise.
14677         * dbxout.c (dbx_debug_hooks): Adjust.
14678         (xcoff_debug_hooks): Likewise.
14679         * sdbout.c (sdb_debug_hooks): Likewise.
14680         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
14681         * dwarf2out.c (macinfo_label_base): New global.
14682         (dwarf2out_register_external_die): New function for the
14683         register_external_die hook.
14684         (dwarf2out_die_ref_for_decl): Likewise for die_ref_for_decl.
14685         (dwarf2_debug_hooks): Use them.
14686         (dwarf2_lineno_debug_hooks): Adjust.
14687         (struct die_struct): Add with_offset flag.
14688         (DEBUG_LTO_DWO_INFO_SECTION, DEBUG_LTO_INFO_SECTION,
14689         DEBUG_LTO_DWO_ABBREV_SECTION, DEBUG_LTO_ABBREV_SECTION,
14690         DEBUG_LTO_DWO_MACINFO_SECTION, DEBUG_LTO_MACINFO_SECTION,
14691         DEBUG_LTO_DWO_MACRO_SECTION, DEBUG_LTO_MACRO_SECTION,
14692         DEBUG_LTO_LINE_SECTION, DEBUG_LTO_DWO_STR_OFFSETS_SECTION,
14693         DEBUG_LTO_STR_DWO_SECTION, DEBUG_STR_LTO_SECTION): New macros
14694         defining section names for the early LTO debug variants.
14695         (reset_indirect_string): New helper.
14696         (add_AT_external_die_ref): Helper for dwarf2out_register_external_die.
14697         (print_dw_val): Add support for offsetted symbol references.
14698         (get_ultimate_context): Split out from is_cxx.
14699         (is_cxx): Use get_ultimate_context.
14700         (is_fortran): Add decl overload.
14701         (compute_comp_unit_symbol): Split out worker from
14702         compute_section_prefix.
14703         (compute_section_prefix): Call compute_comp_unit_symbol and
14704         set comdat_type_p here.
14705         (output_die): Skip DIE symbol output for the LTO added one.
14706         Handle DIE symbol references with offset.
14707         (output_comp_unit): Guard section name mangling properly.
14708         For LTO debug sections emit a symbol at the section beginning
14709         which we use to refer to its DIEs.
14710         (add_abstract_origin_attribute): For DIEs registered via
14711         dwarf2out_register_external_die directly refer to the early
14712         DIE rather than indirectly through the shadow one we created.
14713         Remove obsolete call to dwarf2out_abstract_function for
14714         non-function/block origins.
14715         (gen_array_type_die): When generating early LTO debug do
14716         not emit DW_AT_string_length.
14717         (gen_formal_parameter_die): Do not re-create DIEs for PARM_DECLs
14718         late when in LTO.  As suggested place a gcc_unreachable for
14719         the DECL_ABSTRACT_P case.
14720         (gen_subprogram_die): Avoid another specification DIE
14721         for early built declarations/definitions for the late LTO case.
14722         (gen_variable_die): Add type references for late duplicated VLA dies
14723         when in late LTO.
14724         (gen_inlined_subroutine_die): Do not call dwarf2out_abstract_function,
14725         we have the abstract instance already.
14726         (process_scope_var): Adjust decl DIE contexts in LTO which
14727         first puts them in limbo.
14728         (gen_decl_die): Do not generate type DIEs late apart from
14729         types for VLAs or for decls we do not yet have a DIE.  Do not
14730         call dwarf2out_abstract_function late.
14731         (dwarf2out_early_global_decl): Make sure to create DIEs
14732         for abstract instances of a decl first.
14733         (dwarf2out_late_global_decl): Adjust comment.
14734         (output_macinfo_op): With multiple macro sections use
14735         macinfo_label_base to distinguish labels.
14736         (output_macinfo): Likewise.  Update macinfo_label_base.
14737         Pass in the line info label.
14738         (note_variable_value_in_expr): When generating LTO resolve
14739         all variable values here by generating DIEs as needed.
14740         (init_sections_and_labels): Add early LTO debug flag parameter
14741         and generate different sections and names if set.  Add generation
14742         counter for the labels so we can have multiple of them.
14743         (reset_dies): Helper to allow DIEs to be output multiple times.
14744         (dwarf2out_finish): When outputting DIEs to the fat part of an
14745         LTO object first reset DIEs.
14746         (dwarf2out_early_finish): Output early DIEs when generating LTO.
14747         (modified_type_die): Check for decl_ultimate_origin being self
14748         before recursing.
14749         (gen_type_die_with_usage): Likewise.
14750         (gen_typedef_die): Allow decl_ultimate_origin being self.
14751         (set_decl_abstract_flags): Remove.
14752         (set_block_abstract_flags): Likewise.
14753         (dwarf2out_abstract_function): Treat the early generated DIEs
14754         as the abstract copy and only add DW_AT_inline and
14755         DW_AT_artificial here and call set_decl_origin_self.
14756         If the DIE has an abstract origin don't do anything.
14757         * tree.c (free_lang_data): Build a dummy TRANSLATION_UNIT_DECL
14758         if we have none yet (Go fails to build one, PR78628).
14759         (variably_modified_type_p): Prevent endless recursion for Ada
14760         cyclic pointer types.
14761         * lto-streamer-in.c: Include debug.h.
14762         (dref_queue): New global.
14763         (lto_read_tree_1): Stream in DIE references.
14764         (lto_input_tree): Register DIE references.
14765         (input_function): Stream DECL_DEBUG_ARGS.
14766         * lto-streamer-out.c: Include debug.h.
14767         (lto_write_tree_1): Output DIE references.
14768         (DFS::DFS_write_tree_body): Follow DECL_ABSTRACT_ORIGIN.
14769         Force a TRANSLATION_UNIT_DECL DECL_CONTEXT for file-scope decls.
14770         (output_function): Stream DECL_DEBUG_ARGS.
14771         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
14772         Stream DECL_ABSTRACT_ORIGIN.
14773         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
14774         (write_ts_decl_minimal_tree_pointers): Force a TRANSLATION_UNIT_DECL
14775         DECL_CONTEXT for file-scope decls.
14776         * lto-streamer.h (struct dref_entry): Declare.
14777         (dref_queue): Likewise.
14778         * cfgexpand.c (pass_expand::execute): Do not call the
14779         outlining_inline_function hook here.
14780         * lto-wrapper.c (debug_obj): New global.
14781         (tool_cleanup): Unlink it if required.
14782         (debug_objcopy): New function.
14783         (run_gcc): Handle early debug sections in the IL files by
14784         extracting them to separate files, partially linkin them and
14785         feeding the result back as result to the linker.
14786         * config/darwin.h (DEBUG_LTO_INFO_SECTION, DEBUG_LTO_ABBREV_SECTION,
14787         DEBUG_LTO_MACINFO_SECTION, DEBUG_LTO_LINE_SECTION,
14788         DEBUG_STR_LTO_SECTION, DEBUG_LTO_MACRO_SECTION): Put early debug
14789         sections into a separate segment.
14790         * config/darwin.c (darwin_asm_named_section): Handle __GNU_DWARF_LTO
14791         segments.
14792         (darwin_asm_dwarf_section): Likewise.
14793         (darwin_asm_output_dwarf_offset): Likewise.
14794         * config/i386/i386.c (make_resolver_func): Set DECL_IGNORED_P.
14796 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
14797             Alan Hayward  <alan.hayward@arm.com>
14798             David Sherwood  <david.sherwood@arm.com>
14800         * read-md.h (md_reader::record_potential_iterator_use): Replace
14801         pointer argument with an rtx and an index.
14802         * read-rtl.c (iterator_group::apply_iterator): Likewise.
14803         (apply_mode_iterator): Likewise.
14804         (apply_code_iterator): Likewise.
14805         (apply_int_iterator): Likewise.
14806         (apply_subst_iterator): Likewise.
14807         (record_iterator_use): Likewise.
14808         (record_attribute_use): Likewise.
14809         (md_reader::record_potential_iterator_use): Likewise.  Update calls
14810         to record_iterator_use and apply_iterator.
14811         (iterator_use): Replace ptr with x and index.
14812         (attribute_use): Likewise.
14813         (apply_attribute_uses): Update calls to apply_iterator.
14814         (apply_iterators): Likewise.  Update initialization of iterator_use.
14815         (rtx_reader::read_rtx_code): Update calls to record_iterator_use
14816         and record_potential_iterator_use.
14817         (rtx_reader::read_rtx_operand): Likewise.
14819 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
14820             Alan Hayward  <alan.hayward@arm.com>
14821             David Sherwood  <david.sherwood@arm.com>
14823         * varasm.c (const_rtx_hash_1): Don't hash in the mode of a
14824         CONST_WIDE_INT.
14826 2017-08-21  Richard Biener  <rguenther@suse.de>
14828         PR middle-end/81884
14829         * tree-ssa-alias.c (stmt_kills_ref_p): Handle array accesses
14830         at struct end conservatively when comparing common bases.
14832 2017-08-21  Richard Biener  <rguenther@suse.de>
14834         * tree-ssa-loop-im.c (struct lim_aux_data): Add ref index member.
14835         (mem_ref_in_stmt): Remove.
14836         (determine_max_movement): Use ref index to get at the reference.
14837         (invariantness_dom_walker::before_dom_children): Deal with
14838         lim data already initialized.
14839         (gather_mem_refs_stmt): Initialize lim data and record ref index.
14841 2017-08-19  Uros Bizjak  <ubizjak@gmail.com>
14843         * config/i386/i386.h (OPTION_MASK_ISA_ROUND): Remove.
14844         (TARGET_ISA_ROUND): Ditto.
14845         (TARGET_ROUND): Ditto.
14846         * config/i386/i386.c: Substitute TARGET_ROUND with TARGET_SSE4_1.
14847         * config/i386/i386.md: Ditto.
14848         * config/i386/sse.md: Ditto.
14849         * config/i386/i386-builtin.def: Substitute OPTION_MASK_ISA_ROUND
14850         with OPTION_MASK_ISA_SSE4_1.
14852 2017-08-19  Uros Bizjak  <ubizjak@gmail.com>
14854         PR target/81894
14855         * doc/extend.texi (x86 Built-in Functions): Correct the name of
14856         __builtin_ia32_lzcnt_u16.
14858 2017-08-18  Peter Bergner  <bergner@vnet.ibm.com>
14860         PR target/80210
14861         * config/rs6000/rs6000.c (rs6000_activate_target_options): New function.
14862         (rs6000_set_current_function): Rewrite function to use it.
14864 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
14866         PR c/53037
14867         * print-tree.c (print_node): Support DECL_WARN_IF_NOT_ALIGN
14868         and TYPE_WARN_IF_NOT_ALIGN.
14869         * stor-layout.c (do_type_align): Merge DECL_WARN_IF_NOT_ALIGN.
14870         (handle_warn_if_not_align): New.
14871         (place_union_field): Call handle_warn_if_not_align.
14872         (place_field): Call handle_warn_if_not_align.
14873         Copy TYPE_WARN_IF_NOT_ALIGN.
14874         (finish_builtin_struct): Copy TYPE_WARN_IF_NOT_ALIGN.
14875         (layout_type): Likewise.
14876         * tree-core.h (tree_type_common): Add warn_if_not_align.  Set
14877         spare to 18.
14878         (tree_decl_common): Add warn_if_not_align.
14879         * tree.c (build_range_type_1): Copy TYPE_WARN_IF_NOT_ALIGN.
14880         * tree.h (TYPE_WARN_IF_NOT_ALIGN): New.
14881         (SET_TYPE_WARN_IF_NOT_ALIGN): Likewise.
14882         (DECL_WARN_IF_NOT_ALIGN): Likewise.
14883         (SET_DECL_WARN_IF_NOT_ALIGN): Likewise.
14884         * doc/extend.texi: Document warn_if_not_aligned attribute.
14885         * doc/invoke.texi: Document -Wif-not-aligned and -Wpacked-not-aligned.
14887 2017-08-17  Martin Liska  <mliska@suse.cz>
14889         PR bootstrap/81864
14890         * tree-loop-distribution.c (ddrs_table): Change type to pointer type.
14891         (get_data_dependence): Use it as pointer type.
14892         (distribute_loop): Likewise.
14894 2017-08-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14896         * config/rs6000/altivec.md (UNSPEC_VMRGOW_DIRECT): New constant.
14897         (p8_vmrgew_v4sf_direct): Generalize to p8_vmrgew_<mode>_direct.
14898         (p8_vmrgow_<mode>_direct): New define_insn.
14899         * config/rs6000/rs6000.c (altivec_expand_vec_perm_const): Properly
14900         handle endianness for vmrgew and vmrgow permute patterns.
14902 2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>
14904         * config/rs6000/altivec.md (VParity): Remove TARGET_VSX_TIMODE.
14905         * config/rs6000/rs6000-cpus.def: Remove comment.
14906         (ISA_2_7_MASKS_SERVER): Delete OPTION_MASK_VSX_TIMODE;
14907         (POWERPC_MASKS): Likewise.
14908         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Remove unneeded
14909         use of TARGET_VSX_TIMODE.
14910         (rs6000_setup_reg_addr_masks): Change TARGET_VSX_TIMODE to TARGET_VSX.
14911         (rs6000_init_hard_regno_mode_ok): Remove unneeded uses of
14912         TARGET_VSX_TIMODE.  Change use of TARGET_VSX_TIMODE to TARGET_VSX.
14913         (rs6000_option_override_internal): Remove dead code.
14914         (rs6000_legitimize_address): Change TARGET_VSX_TIMODE to TARGET_VSX.
14915         (rs6000_legitimize_reload_address): Likewise.
14916         (rs6000_legitimate_address_p): Likewise.
14917         (rs6000_opt_masks): Delete "vsx-timode".
14918         (rs6000_disable_incompatible_switches): Remove mention of -mvsx-timode
14919         from function comment.
14920         * config/rs6000/rs6000.h (MASK_VSX_TIMODE): Delete.
14921         * config/rs6000/rs6000.md (FMOVE128_GPR): Remove TARGET_VSX_TIMODE.
14922         (V16QI, V8HI, V4SI, V4SF, V2DI, V2DF, V1TI): Remove useless empty
14923         condition.
14924         * config/rs6000/rs6000.opt (mvsx-timode): Replace with stub.
14925         * config/rs6000/vector.md (VEC_IP): Remove TARGET_VSX_TIMODE.
14926         * config/rs6000/vsx.md (VSX_LE_128): Likewise.
14927         (VSX_TI): Likewise.
14928         (VSX_M): Likewise.
14929         (define_peephole2): Likewise.
14931 2017-08-17  Martin Sebor  <msebor@redhat.com>
14933         PR c/81859
14934         * pretty-print.c (pp_format): Use strnlen in %.*s to avoid reading
14935         past the end of an array.
14936         (test_pp_format): Add test cases.
14938 2017-08-17  Richard Sandiford  <richard.sandiford@linaro.org>
14940         * internal-fn.def (CLRSB, CLZ, CTZ, FFS, PARITY, POPCOUNT): Add
14941         missing ECF_NOTHROW flags.
14943 2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>
14945         PR target/72804
14946         * config/rs6000/vsx.md (*vsx_le_permute_<mode>): Add support for
14947         operands residing in integer registers.
14948         (*vsx_le_perm_load_<mode>): Likewise.
14949         (*vsx_le_perm_store_<mode>): Likewise.
14950         (define_peephole2): Add peepholes to optimize the above.
14952 2017-08-17  Marek Polacek  <polacek@redhat.com>
14954         PR middle-end/81814
14955         * fold-const.c (operand_equal_for_comparison_p): Remove code that used
14956         to mimic what shorten_compare did.  Change the return type to bool.
14957         (fold_cond_expr_with_comparison): Update call to
14958         operand_equal_for_comparison_p.
14959         (fold_ternary_loc): Likewise.
14961 2017-08-17  Jackson Woodruff  <jackson.woodruff@arm.com>
14963         * aarch64-simd.md (mov<mode>): No longer force zero immediate into
14964         register.
14965         (*aarch64_simd_mov<mode>): Add new case for stp using zero immediate.
14967 2017-08-17  Richard Biener  <rguenther@suse.de>
14969         * tree-ssa-structalias.c (solve_graph): When propagating
14970         to successors update the graphs succ edges and avoid duplicate work.
14972 2017-08-17  Maxim Ostapenko  <m.ostapenko@samsung.com>
14974         PR target/81861
14975         * config/i386/i386.c (ix86_option_override_internal): Save target
14976         specific options after ix86_stack_protector_guard_reg was changed.
14978 2017-08-17  Richard Biener  <rguenther@suse.de>
14980         PR tree-optimization/81827
14981         * tree-ssa-structalias.c (struct variable_info): Add is_reg_var flag.
14982         (new_var_info): Initialize it conservatively.
14983         (get_call_vi): Mark register vars.
14984         (new_scalar_tmp_constraint_exp): Likewise.
14985         (handle_rhs_call): Likewise.
14986         (handle_const_call): Likewise.
14987         (create_function_info_for): Likewise.
14988         (solve_constraints): Sort varinfos to separate register from
14989         non-register vars to pack points-to solution bitmaps during
14990         iteration.
14992 2017-08-17  Marek Polacek  <polacek@redhat.com>
14994         * gimplify.c (gimplify_adjust_omp_clauses): Compare with 0 instead of 1.
14996 2017-08-17  Richard Biener  <rguenther@suse.de>
14998         * tree-vrp.c (vrp_int_const_binop): Do not set *overflow_p
14999         to true when overflow is undefined and we saturated the result.
15001 2017-08-17  Alan Modra  <amodra@gmail.com>
15003         PR target/80938
15004         * config/rs6000/rs6000.c (rs6000_savres_strategy): Revert 2017-08-09.
15005         Don't use store multiple if only one reg needs saving.
15006         (interesting_frame_related_regno): New function.
15007         (rs6000_frame_related): Don't emit frame info for regs that
15008         don't need saving.
15009         (rs6000_emit_epilogue): Likewise.
15011 2017-08-16  Nathan Sidwell  <nathan@acm.org>
15013         * tree-core.h (tree_type_non_common): Rename binfo to lang_1.
15014         * tree.h (TYPE_BINFO): Use type_non_common.maxval.
15015         (TYPE_LANG_SLOT_1): Use type_non_common.lang_1, for any type.
15016         * tree.c (free_lang_data_in_type): Use else-if chain.  Always
15017         clear TYPE_LANG_1.  Remove obsolete member-function stripping.
15018         (find_decls_types_r): Comment about TYPE_MAX_VALUES_RAW.
15019         (verify_type): Adjust for TYPE_BINFO move.
15020         * lto-streamer-out.c (DFS::DFS_write_tree_body): No need to
15021         process TYPE_BINFO directly.
15022         (hash_tree): Likewise.
15023         * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
15024         Likewise.
15025         * tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
15026         Likewise.
15028 2017-08-16  David Malcolm  <dmalcolm@redhat.com>
15030         * diagnostic-show-locus.c (colorizer::m_caret): Remove unused field.
15032 2017-08-16  Uros Bizjak  <ubizjak@gmail.com>
15034         PR target/46091
15035         * config/i386/i386.md (*anddi_1_btr): Change predicates of
15036         operand 0 and operand 1 to nomimmediate_operand. Add "m" constraint.
15037         Add ix86_binary_operator_ok to insn constraint.
15038         (*iordi_1_bts): Ditto.
15039         (*xordi_1_btc): Ditto.
15040         (*btsq): Change predicate of operand 0 to nonimmediate_operand.
15041         Update corresponding peephole2 pattern.
15042         (*btrq): Ditto.
15043         (*btcq): Ditto.
15045 2017-08-16  Bin Cheng  <bin.cheng@arm.com>
15047         PR tree-optimization/81832
15048         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Don't
15049         copy loop header which has IFN_LOOP_DIST_ALIAS call.
15051 2017-08-16  Marek Polacek  <polacek@redhat.com>
15053         PR middle/81695
15054         * fold-const.c (fold_indirect_ref_1): Restore original behavior
15055         regarding size_zero_node.
15057 2017-08-16  Martin Liska  <mliska@suse.cz>
15059         PR target/81753
15060         * config.gcc: Respect previously set extra_objs in case
15061         of darwin target.
15063 2017-08-16  Richard Sandiford  <richard.sandiford@linaro.org>
15065         PR tree-optimization/81835
15066         * tree-vect-loop.c (vect_is_simple_reduction): Simply checks for
15067         the phi SSA_NAME.  Check that the condition in a COND_EXPR does
15068         not depend on the phi.
15070 2017-08-16  Alan Modra  <amodra@gmail.com>
15072         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Delete
15073         dead code.
15075 2017-08-16  Alan Modra  <amodra@gmail.com>
15077         * config/rs6000/rs6000.c (rs6000_reg_live_or_pic_offset_p): Merge..
15078         (save_reg_p): ..into this.  Update all callers.
15079         (first_reg_to_save): Simplify.
15081 2017-08-16  Alan Modra  <amodra@gmail.com>
15083         * config/rs6000/rs6000.c (rs6000_savres_strategy): Don't restore
15084         fixed regs.
15086 2017-08-15  Joseph Myers  <joseph@codesourcery.com>
15088         PR target/78460
15089         PR target/67712
15090         * config/sh/sh-mem.cc (sh_expand_cmpnstr): Only unroll for
15091         constant count if that count is less than 32.
15093 2017-08-15  Nathan Sidwell  <nathan@acm.org>
15095         * gcc.c (execute): Emit friendlier message if inferior is killed
15096         by an external cause.
15098 2017-08-15  Richard Biener  <rguenther@suse.de>
15100         PR tree-optimization/81790
15101         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Handle both
15102         CONSTRUCTORs from simplifying and VN.
15104 2017-08-14  Martin Sebor  <msebor@redhat.com>
15106         * builtin-attrs.def: Add comments.
15108 2017-08-14  Martin Sebor  <msebor@redhat.com>
15110         PR c/81117
15111         * doc/extend.texi (attribute nonstring): Document new attribute.
15113 2017-08-14  Martin Sebor  <msebor@redhat.com>
15115         PR c/81117
15116         * tree-diagnostic.c (default_tree_printer): Handle %G.
15117         * gimple-pretty-print.h (percent_G_format): Declare new function.
15118         * gimple-pretty-print.c (percent_G_format): Define.
15119         * tree-pretty-print.c (percent_K_format): Add argument.
15121 2017-08-14  Martin Sebor  <msebor@redhat.com>
15123         PR translation/79998
15124         * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call):
15125         Remove a stray space.
15127 2017-08-14  Uros Bizjak  <ubizjak@gmail.com>
15129         PR target/46091
15130         * config/i386/i386.md (*anddi_1_btr): New insn_and_split pattern.
15131         (*iordi_1_bts): Ditto.
15132         (*xordi_1_btc): Ditto.
15134 2017-08-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15136         PR target/79845
15137         * config/rs6000/linux64.h (INVALID_64BIT): Use quoted strings.
15138         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
15139         Likewise.
15140         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Use
15141         quoted strings, and make more translator-friendly.
15142         (darwin_rs6000_override_options): Likewise.
15143         (rs6000_option_override_internal): Likewise.
15144         (rs6000_return_in_memory): Fix overlong line.
15145         (init_cmulative_args): Use quoted strings, and make more
15146         translator-friendly.
15147         (rs6000_pass_by_reference): Fix overlong line.
15148         (def_builtin): Use quoted strings.
15149         (altivec_expand_predicate_builtin): Use quoted strings, and make
15150         more translator-friendly.
15151         (htm_expand_builtin): Use quoted strings.
15152         (cpu_expand_builtin): Use quoted strings, and make more
15153         translator-friendly.
15154         (altivec_expand_builtin): Likewise.
15155         (paired_expand_predicate_builtin): Likewise.
15156         (rs6000_invalid_builtin): Likewise.
15157         (builtin_function_type): Use quoted strings.
15158         (rs6000_expand_split_stack_prologue): Use quoted strings, and make
15159         more translator-friendly.
15160         (rs6000_trampoline_init): Likewise.
15161         (rs6000_handle_altivec_attribute): Likewise.
15162         (rs6000_inner_target_options): Use quoted strings.
15163         (rs6000_disable_incompatible_switches): Likewise.
15164         * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Use quoted
15165         strings, and make more translator-friendly.
15166         (SUBSUBTARGET_OVERRIDE_OPTIONS): Use quoted strings.
15168 2017-08-14  Bin Cheng  <bin.cheng@arm.com>
15170         PR tree-optimization/81799
15171         * tree-loop-distribution.c (version_loop_by_alias_check): Force
15172         cond_expr to simple gimple operand.
15174 2017-08-14  Wilco Dijkstra  <wdijkstr@arm.com>
15176         PR middle-end/46932
15177         * doc/sourcebuild.texi (autoincdec): Add autoincdec description.
15179 2017-08-14  Georg-Johann Lay  <avr@gjlay.de>
15181         PR target/81754
15182         PR target/81268
15183         * config/avr/avr.opt (mgas-isr-prologues): New Var avr_gasisr_prologues.
15184         * config/avr/avr.md (gasisr, *gasisr): Use it instead of
15185         TARGET_GASISR_PROLOGUES.
15186         * config/avr/avr.c (avr_option_override): Same.
15187         (avr_pass_pre_proep::execute): Same.
15189 2017-08-13  H.J. Lu  <hongjiu.lu@intel.com>
15191         PR target/81820
15192         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Replace
15193         frame pointer with stack pointer - UNITS_PER_WORD in debug insns.
15195 2017-08-13  Uros Bizjak  <ubizjak@gmail.com>
15197         * config/i386/i386.md (*load_tp_<mode>): Redefine as
15198         define_insn_and_split.  Split to a memory load from 0 in
15199         DEFAULT_TLS_SEG_REG address space.  Merge with *load_tp_x32
15200         using PTR mode iterator.
15201         (*load_tp_x32_zext"): Redefine as define_insn_and_split.
15202         Split to a memory load from 0 in DEFAULT_TLS_SEG_REG address space.
15203         (*add_tp_<mode>): Redefine as define_insn_and_split.
15204         Split to an add with a memory load from 0 in DEFAULT_TLS_SEG_REG
15205         address space.  Merge with *add_tp_x32 using PTR mode iterator.
15206         (*add_tp_x32_zext"): Redefine as define_insn_and_split.
15207         Split to an add with a  memory load from 0 in
15208         DEFAULT_TLS_SEG_REG address space.
15210 2017-08-12  Andrew Pinski  <apinski@cavium.com>
15212         * config/aarch64/aarch64-option-extensions.def (rdma):
15213         Fix feature string to what Linux prints out in /proc/cpuinfo.
15215 2017-08-12  Pierre-Marie de Rodat  <derodat@adacore.com>
15217         PR ada/79542
15218         * dwarf2out.c (modified_type_die): For C typedef types that have
15219         an ultimate origin, process the ultimate origin instead of the
15220         input type.
15221         (gen_typedef_die): Assert that input DECLs have no ultimate
15222         origin.
15223         (gen_type_die_with_usage): For typedef variants that have an
15224         ultimate origin, just call gen_decl_die on the original DECL.
15225         (process_scope_var): Avoid creating DIEs for local typedefs and
15226         concrete static variables.
15228 2017-08-12  Alan Modra  <amodra@gmail.com>
15230         PR target/81170
15231         PR target/81295
15232         * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to
15233         match gnu-user.h startfile.
15234         (ENDFILE_LINUX_SPEC): Similarly.
15236 2017-08-11  Thomas Schwinge  <thomas@codesourcery.com>
15238         PR lto/81430
15239         * config/nvptx/nvptx.c (nvptx_override_options_after_change):
15240         Remove function.
15241         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Remove definition.
15243 2017-08-11  Tamar Christina  <tamar.christina@arm.com>
15244         * config/aarch64/aarch64.md (mov<mode>): Change.
15245         (*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
15246         aarch64_reg_or_fp_float into aarch64_reg_or_fp_zero.
15247         * config/aarch64/predicates.md (aarch64_reg_or_fp_float): Removed.
15249 2017-08-11  Eric Botcazou  <ebotcazou@adacore.com>
15251         * tree-sra.c (build_access_from_expr_1): Use more precise diagnostics
15252         for storage order barriers.
15254 2017-08-11  Martin Liska  <mliska@suse.cz>
15256         PR tree-opt/79987
15257         * tree-chkp.c (chkp_get_bounds_for_decl_addr): Do not instrument
15258         variables of void type.
15260 2017-08-11  Martin Liska  <mliska@suse.cz>
15262         * asan.c (asan_protect_global): Replace ASM_OUTPUT_DEF with
15263         TARGET_SUPPORTS_ALIASES.
15264         * cgraph.c (cgraph_node::create_same_body_alias): Likewise.
15265         * ipa-visibility.c (can_replace_by_local_alias): Likewise.
15266         (optimize_weakref): Likewise.
15267         * symtab.c (symtab_node::noninterposable_alias): Likewise.
15268         * varpool.c (varpool_node::create_extra_name_alias): Likewise.
15269         * defaults.h: Introduce TARGET_SUPPORTS_ALIASES.
15271 2017-08-11  Martin Liska  <mliska@suse.cz>
15273         PR ipa/81213
15274         * config/i386/i386.c (make_resolver_func): Do complete
15275         refactoring of the function.
15277 2017-08-10  Uros Bizjak  <ubizjak@gmail.com>
15279         PR target/81708
15280         * config/i386/i386.opt (mstack-protector-guard-symbol=): New option
15281         * config/i386/i386.c (ix86_stack_protect_guard): Use
15282         ix86_stack_protect_guard_symbol_str to generate varible declaration.
15283         * doc/invoke.texi (x86 Options): Document
15284         -mstack-protector-guard-symbol= option.
15286 2017-08-10  Uros Bizjak  <ubizjak@gmail.com>
15288         * config/i386/i386-protos.h (ix86_split_stack_guard): New prototype.
15289         * config/i386/i386.c (ix86_split_stack_guard): New function.
15290         (ix86_xpand_split_stack_prologue): Call ix86_split_stack_guard.
15291         (ix86_legitimate_address_p) <case UNSPEC_STACK_CHECK>: Remove.
15292         (i386_asm_output_addr_const_extra) <case UNSPEC_STACK_CHECK>: Ditto.
15293         (optput_pic_addr_const): Remove UNSPEC_STACK_CHECK handling.
15294         * config/i386/i386.md (unspec): Remove UNSPEC_STACK_CHECK.
15295         (split_stack_space_check): Call ix86_split_stack_guard.
15297 2017-08-10  Martin Sebor  <msebor@redhat.com>
15299         * print-tree.c (print_node): Print location using the established
15300         format %s:%i%i.
15301         Replace spaces with colons.
15302         (debug_raw, debug): Ditto.
15304 2017-08-10  Martin Sebor  <msebor@redhat.com>
15306         PR c++/81586
15307         * pretty-print.c (pp_format): Correct the handling of %s precision.
15309 2017-08-10  H.J. Lu  <hongjiu.lu@intel.com>
15311         PR target/81736
15312         * config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
15313         to ...
15314         (ix86_finalize_stack_frame_flags): This.  Also clear
15315         frame_pointer_needed if -fno-omit-frame-pointer is used without
15316         stack access.
15317         (ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
15318         with ix86_finalize_stack_frame_flags.
15319         (ix86_expand_epilogue): Likewise.
15320         (ix86_expand_split_stack_prologue): Likewise.
15321         * doc/invoke.texi: Add a note for -fno-omit-frame-pointer.
15323 2017-08-10  Martin Liska  <mliska@suse.cz>
15325         PR c++/81355
15326         * c-attribs.c (handle_target_attribute):
15327         Report warning for an empty string argument of target attribute.
15329 2017-08-09  Jakub Jelinek  <jakub@redhat.com>
15331         PR c/81687
15332         * omp-low.c (omp_copy_decl): Don't remap FORCED_LABEL or DECL_NONLOCAL
15333         LABEL_DECLs.
15334         * tree-cfg.c (move_stmt_op): Don't adjust DECL_CONTEXT of FORCED_LABEL
15335         or DECL_NONLOCAL labels.
15336         (move_stmt_r) <case GIMPLE_LABEL>: Adjust DECL_CONTEXT of FORCED_LABEL
15337         or DECL_NONLOCAL labels here.
15339 2017-08-09  Will Schmidt  <will_schmidt@vnet.ibm.com>
15341         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add blurb
15342         to indicate when early gimple folding has been disabled.
15343         (rs6000_gimple_fold_builtin): Add debug content.
15344         (rs6000_invalid_builtin): Fix whitespace.
15345         (rs6000_expand_builtin): Fix whitespace.
15346         * config/rs6000/rs6000.opt: Add option for -mfold-gimple.
15348 2017-08-09  Segher Boessenkool  <segher@kernel.crashing.org>
15350         PR target/80938
15351         * config/rs6000/rs6000.c (rs6000_savres_strategy): Don't use
15352         SAVE_MULTIPLE if not all the registers that saves, should be saved.
15354 2017-08-09  Jim Wilson  <jim.wilson@linaro.org>
15356         * config/aarch64/aarch64-cores.def (falkor): Use falkor pipeline.
15357         (qdf24xx): Likewise.
15358         * config/aarch64/aarch64.md: Include falkor.md.
15359         * config/aarch64/falkor.md: New.
15361 2017-08-09  Marek Polacek  <polacek@redhat.com>
15363         PR c/81233
15364         * diagnostic-core.h (emit_diagnostic_valist): Add declaration.
15365         * diagnostic.c (emit_diagnostic): Add a comment.
15366         (emit_diagnostic_valist): New function.
15368 2017-08-09  Marek Polacek  <polacek@redhat.com>
15370         PR c/81417
15371         * input.c (make_location): New overload.
15372         * input.h (make_location): Declare.
15374 2017-08-08  Alan Modra  <amodra@gmail.com>
15375             H.J. Lu  <hongjiu.lu@intel.com>
15377         PR driver/81523
15378         * gcc.c (NO_PIE_SPEC): Delete.
15379         (PIE_SPEC): Define as !no-pie/pie.  Move static|shared|r
15380         exclusion..
15381         (LINK_PIE_SPEC): ..to here.
15382         (LINK_COMMAND_SPEC): Support -no-pie.
15383         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct
15384         chain of crtbegin*.o selection, update for PIE_SPEC changes and
15385         format.
15386         (GNU_USER_TARGET_ENDFILE_SPEC): Similarly.
15387         * config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly.
15388         (ENDFILE_CRTEND_SPEC): Similarly.
15390 2017-08-08  Uros Bizjak  <ubizjak@gmail.com>
15392         PR target/81708
15393         * config/i386/i386.opt (mstack-protector-guard-reg=): New option
15394         (mstack-protector-guard-offset=): Ditto.
15395         * config/i386/i386.c (ix86_option_override): Handle
15396         -mstack-protector-guard-reg= and -mstack-protector-guard-offset=
15397         options.
15398         (ix86_stack_protect_guard): Use ix86_stack_protect_guard_reg and
15399         ix86_stack_protect_guard_offset variables.
15400         (TARGET_STACK_PROTECT_GUARD): Always define.
15401         * doc/invoke.texi (x86 Options): Document -mstack-protector-guard-reg=
15402         and -mstack-protector-guard-offset= options.
15404 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
15406         * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): Handle
15407         boundary case for the last candidate.
15409 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
15411         * doc/invoke.texi: Document -ftree-loop-distribution for O3.
15412         * opts.c (default_options_table): Add OPT_ftree_loop_distribution.
15414 2017-08-08  Tamar Christina  <tamar.christina@arm.com>
15416         PR middle-end/19706
15417         * config/aarch64/aarch64.md (xorsign<mode>3): New optabs.
15418         * config/aarch64/aarch64-builtins.c
15419         (aarch64_builtin_vectorized_function): Added CASE_CFN_XORSIGN.
15420         * config/aarch64/aarch64-simd-builtins.def: Added xorsign BINOP.
15421         * config/aarch64/aarch64-simd.md: Added xorsign<mode>3
15423 2017-08-08  Tamar Christina  <tamar.christina@arm.com>
15424             Andrew Pinski <pinskia@gmail.com>
15426         PR middle-end/19706
15427         * internal-fn.def (XORSIGN): New.
15428         * optabs.def (xorsign_optab): New.
15429         * tree-ssa-math-opts.c (is_copysign_call_with_1): New.
15430         (convert_expand_mult_copysign): New.
15431         (pass_optimize_widening_mul::execute): Call
15432         convert_expand_mult_copysign.
15434 2017-08-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15436         PR tree-optimization/81354
15437         * gimple-ssa-strength-reduction.c (create_add_on_incoming_edge):
15438         Insert on edges rather than explicitly creating landing pads.
15439         (analyze_candidates_and_replace): Commit edge inserts.
15441 2017-08-08  Richard Biener  <rguenther@suse.de>
15443         PR middle-end/81719
15444         * tree-ssa-loop-niter.c: Include tree-dfa.h.
15445         (expand_simple_operations): Also look through ADDR_EXPRs with
15446         MEM_REF bases treating them as POINTER_PLUS_EXPR.
15448 2017-08-08  Richard Biener  <rguenther@suse.de>
15450         PR tree-optimization/81723
15451         * tree-vect-slp.c (struct bst_traits): New hash traits.
15452         (bst_fail): New global.
15453         (vect_build_slp_tree_2): New worker, split out from ...
15454         (vect_build_slp_tree): ... this now wrapping it with using
15455         bst_fail set to cache SLP tree build fails.  Properly handle
15456         max_tree_size.
15457         (vect_analyze_slp_instance): Allocate and free bst_fail.
15459 2017-08-08  Martin Liska  <mliska@suse.cz>
15461         PR tree-opt/81696
15462         * ipa-icf-gimple.c (func_checker::compare_cst_or_decl): Consider
15463         LABEL_DECLs that can be from a different function.
15465 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
15467         PR tree-optimization/81744
15468         * tree-predcom.c (prepare_finalizers_chain): Deep copy expr of
15469         loop's number of iterations.
15471 2017-08-08  Martin Liska  <mliska@suse.cz>
15473         * asan.c: Include header files.
15474         * attribs.c (build_decl_attribute_variant): New function moved
15475         from tree.[ch].
15476         (build_type_attribute_qual_variant): Likewise.
15477         (cmp_attrib_identifiers): Likewise.
15478         (simple_cst_list_equal): Likewise.
15479         (omp_declare_simd_clauses_equal): Likewise.
15480         (attribute_value_equal): Likewise.
15481         (comp_type_attributes): Likewise.
15482         (build_type_attribute_variant): Likewise.
15483         (lookup_ident_attribute): Likewise.
15484         (remove_attribute): Likewise.
15485         (merge_attributes): Likewise.
15486         (merge_type_attributes): Likewise.
15487         (merge_decl_attributes): Likewise.
15488         (merge_dllimport_decl_attributes): Likewise.
15489         (handle_dll_attribute): Likewise.
15490         (attribute_list_equal): Likewise.
15491         (attribute_list_contained): Likewise.
15492         * attribs.h (lookup_attribute): New function moved from tree.[ch].
15493         (lookup_attribute_by_prefix): Likewise.
15494         * bb-reorder.c: Include header files.
15495         * builtins.c: Likewise.
15496         * calls.c: Likewise.
15497         * cfgexpand.c: Likewise.
15498         * cgraph.c: Likewise.
15499         * cgraphunit.c: Likewise.
15500         * convert.c: Likewise.
15501         * dwarf2out.c: Likewise.
15502         * final.c: Likewise.
15503         * fold-const.c: Likewise.
15504         * function.c: Likewise.
15505         * gimple-expr.c: Likewise.
15506         * gimple-fold.c: Likewise.
15507         * gimple-pretty-print.c: Likewise.
15508         * gimple.c: Likewise.
15509         * gimplify.c: Likewise.
15510         * hsa-common.c: Likewise.
15511         * hsa-gen.c: Likewise.
15512         * internal-fn.c: Likewise.
15513         * ipa-chkp.c: Likewise.
15514         * ipa-cp.c: Likewise.
15515         * ipa-devirt.c: Likewise.
15516         * ipa-fnsummary.c: Likewise.
15517         * ipa-inline.c: Likewise.
15518         * ipa-visibility.c: Likewise.
15519         * ipa.c: Likewise.
15520         * lto-cgraph.c: Likewise.
15521         * omp-expand.c: Likewise.
15522         * omp-general.c: Likewise.
15523         * omp-low.c: Likewise.
15524         * omp-offload.c: Likewise.
15525         * omp-simd-clone.c: Likewise.
15526         * opts-global.c: Likewise.
15527         * passes.c: Likewise.
15528         * predict.c: Likewise.
15529         * sancov.c: Likewise.
15530         * sanopt.c: Likewise.
15531         * symtab.c: Likewise.
15532         * toplev.c: Likewise.
15533         * trans-mem.c: Likewise.
15534         * tree-chkp.c: Likewise.
15535         * tree-eh.c: Likewise.
15536         * tree-into-ssa.c: Likewise.
15537         * tree-object-size.c: Likewise.
15538         * tree-parloops.c: Likewise.
15539         * tree-profile.c: Likewise.
15540         * tree-ssa-ccp.c: Likewise.
15541         * tree-ssa-live.c: Likewise.
15542         * tree-ssa-loop.c: Likewise.
15543         * tree-ssa-sccvn.c: Likewise.
15544         * tree-ssa-structalias.c: Likewise.
15545         * tree-ssa.c: Likewise.
15546         * tree-streamer-in.c: Likewise.
15547         * tree-vectorizer.c: Likewise.
15548         * tree-vrp.c: Likewise.
15549         * tsan.c: Likewise.
15550         * ubsan.c: Likewise.
15551         * varasm.c: Likewise.
15552         * varpool.c: Likewise.
15553         * tree.c: Remove functions moved to attribs.[ch].
15554         * tree.h: Likewise.
15555         * config/aarch64/aarch64.c: Add attrs.h header file.
15556         * config/alpha/alpha.c: Likewise.
15557         * config/arc/arc.c: Likewise.
15558         * config/arm/arm.c: Likewise.
15559         * config/avr/avr.c: Likewise.
15560         * config/bfin/bfin.c: Likewise.
15561         * config/c6x/c6x.c: Likewise.
15562         * config/cr16/cr16.c: Likewise.
15563         * config/cris/cris.c: Likewise.
15564         * config/darwin.c: Likewise.
15565         * config/epiphany/epiphany.c: Likewise.
15566         * config/fr30/fr30.c: Likewise.
15567         * config/frv/frv.c: Likewise.
15568         * config/ft32/ft32.c: Likewise.
15569         * config/h8300/h8300.c: Likewise.
15570         * config/i386/winnt.c: Likewise.
15571         * config/ia64/ia64.c: Likewise.
15572         * config/iq2000/iq2000.c: Likewise.
15573         * config/lm32/lm32.c: Likewise.
15574         * config/m32c/m32c.c: Likewise.
15575         * config/m32r/m32r.c: Likewise.
15576         * config/m68k/m68k.c: Likewise.
15577         * config/mcore/mcore.c: Likewise.
15578         * config/microblaze/microblaze.c: Likewise.
15579         * config/mips/mips.c: Likewise.
15580         * config/mmix/mmix.c: Likewise.
15581         * config/mn10300/mn10300.c: Likewise.
15582         * config/moxie/moxie.c: Likewise.
15583         * config/msp430/msp430.c: Likewise.
15584         * config/nds32/nds32-isr.c: Likewise.
15585         * config/nds32/nds32.c: Likewise.
15586         * config/nios2/nios2.c: Likewise.
15587         * config/nvptx/nvptx.c: Likewise.
15588         * config/pa/pa.c: Likewise.
15589         * config/pdp11/pdp11.c: Likewise.
15590         * config/powerpcspe/powerpcspe.c: Likewise.
15591         * config/riscv/riscv.c: Likewise.
15592         * config/rl78/rl78.c: Likewise.
15593         * config/rx/rx.c: Likewise.
15594         * config/s390/s390.c: Likewise.
15595         * config/sh/sh.c: Likewise.
15596         * config/sol2.c: Likewise.
15597         * config/sparc/sparc.c: Likewise.
15598         * config/spu/spu.c: Likewise.
15599         * config/stormy16/stormy16.c: Likewise.
15600         * config/tilegx/tilegx.c: Likewise.
15601         * config/tilepro/tilepro.c: Likewise.
15602         * config/v850/v850.c: Likewise.
15603         * config/vax/vax.c: Likewise.
15604         * config/visium/visium.c: Likewise.
15605         * config/xtensa/xtensa.c: Likewise.
15607 2017-08-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
15609         PR target/81593
15610         * config/rs6000/vsx.md (vsx_concat_<mode>, VSX_D): Cleanup
15611         constraints since the -mupper-regs-* switches have been
15612         eliminated.
15613         (vsx_concat_<mode>_1): New combiner insns to recognize inserting
15614         into a vector from a double word element that was extracted from
15615         another vector, and eliminate extra XXPERMDI instructions.
15616         (vsx_concat_<mode>_2): Likewise.
15617         (vsx_concat_<mode>_3): Likewise.
15618         (vsx_set_<mode>, VSX_D): Rewrite vector set in terms of vector
15619         concat to allow optimizing inserts from previous extracts.
15621 2017-08-07  Uros Bizjak  <ubizjak@gmail.com>
15623         * config/i386/i386.c (ix86_stack_protect_guard): Generate
15624         memory reference to a SSP offset in TLS address space.
15625         (ix86_print_operand) <case '@'>: Remove.
15626         (ix86_print_operand_punct_valid_p): Remove '@' code.
15627         * config/i386/i386.md (unspec): Remove UNSPEC_SP_TLS_SET and
15628         UNSPEC_SP_TLS_TEST.
15629         (stack_tls_protect_set_<mode>): Remove.
15630         (stack_protect_set): Do not call gen_stack_tls_protect_set_<mode>.
15631         (stack_tls_protect_test_<mode>): Remove.
15632         (stack_protect_test): Do not call gen_stack_tls_protect_test_<mode>.
15634 2017-08-07  Olivier Hainque  <hainque@adacore.com>
15636         PR target/81755
15637         * config/vxworksae.h (VXWORKS_HAVE_TLS): Define.
15639 2017-08-07  Douglas Rupp  <rupp@adacore.com>
15641         * Makefile.in (install-mkheaders): Fix typo, where the multi_dir
15642         variable was referenced as multidir in command.
15644 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
15646         PR c/69389
15647         * gimplify.c (goa_stabilize_expr): Handle BIT_INSERT_EXPR and
15648         BIT_FIELD_REF.
15650 2017-08-07  Martin Liska  <mliska@suse.cz>
15652         * config/m32c/m32c.c: Add include of stringpool.h and attribs.h.
15653         * config/rl78/rl78.c: Add include of attribs.h.
15654         * config/sh/sh.c: Likewise.
15655         * config/v850/v850.c: Likewise.
15657 2017-08-07  Tom de Vries  <tom@codesourcery.com>
15659         PR middle-end/78266
15660         * omp-expand.c (expand_oacc_for): Ensure diff_type is large enough.
15662 2017-08-07  Martin Liska  <mliska@suse.cz>
15664         * config/mips/mips.c: Include attribs.h.
15666 2017-08-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
15668         PR fortran/68829
15669         * doc/invoke.texi: Document change in behvaior for -Ofast for
15670         Fortran.
15672 2017-08-07  Wilco Dijkstra  <wdijkstr@arm.com>
15674         * config/aarch64/aarch64.c (aarch64_pushwb_single_reg):
15675         Use gen_frame_mem.
15676         (aarch64_pop_regs): Likewise.
15677         (aarch64_gen_load_pair): Likewise.
15678         (aarch64_save_callee_saves): Likewise.
15679         (aarch64_restore_callee_saves): Likewise.
15681 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
15683         * config/i386/i386.c: Revert the last change.
15685 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
15687         PR target/81736
15688         * config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
15689         to ...
15690         (ix86_finalize_stack_frame_flags): This.  Also clear
15691         frame_pointer_needed if -fno-omit-frame-pointer is used without
15692         stack access.
15693         (ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
15694         with ix86_finalize_stack_frame_flags.
15695         (ix86_expand_epilogue): Likewise.
15696         (ix86_expand_split_stack_prologue): Likewise.
15698 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
15700         PR target/81743
15701         * config/i386/i386.c (get_builtin_code_for_version): Set priority
15702         to P_AES for Westmere.
15704 2017-08-07  Jonathan Yong  <10walls@gmail.com>
15706         * config/i386/mingw.opt (fset-stack-executable): Removed.
15707         * config/i386/cygming.opt (fset-stack-executable): Moved
15708         from mingw.opt.
15709         * config/i386/cygwin.h: Define CHECK_EXECUTE_STACK_ENABLED.
15711 2017-08-07  Segher Boessenkool  <segher@kernel.crashing.org>
15713         * print-rtl.c (print_exp): Print NOT as "~" instead of as "!".
15715 2017-08-07  Marek Polacek  <polacek@redhat.com>
15717         PR middle-end/81737
15718         * fold-const.c (fold_indirect_ref_1): Check type_domain.
15720 2017-08-07  Martin Liska  <mliska@suse.cz>
15722         * attribs.h (canonicalize_attr_name): New function.
15723         (cmp_attribs): Move from c-format.c and adjusted.
15724         (is_attribute_p): Moved from tree.h.
15725         * tree-inline.c: Add new includes.
15726         * tree.c (cmp_attrib_identifiers): Use cmp_attribs.
15727         (private_is_attribute_p): Remove.
15728         (private_lookup_attribute): Likewise.
15729         (private_lookup_attribute_by_prefix): Simplify.
15730         (remove_attribute): Use is_attribute_p.
15731         * tree.h: Remove removed declarations.
15733 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
15735         PR middle-end/81698
15736         * stmt.c (emit_case_dispatch_table): Add DEFAULT_EDGE argument,
15737         instead of computing it in the function.  Formatting fix.
15738         (expand_case): Don't rely on default_edge being the first edge,
15739         clear it if removing it, pass default_edge to
15740         emit_case_dispatch_table.
15741         (expand_sjlj_dispatch_table): Pass NULL as DEFAULT_EDGE, formatting
15742         fix.
15744 2017-08-06  Uros Bizjak  <ubizjak@gmail.com>
15746         * config/alpha/alpha.c (alpha_reorg): If trap is the last active
15747         insn in the function, emit NOP after the insn.
15749 2017-08-06  Tom de Vries  <tom@codesourcery.com>
15751         * omp-expand.c (expand_oacc_for): Add missing edge probability for tile
15752         and element loops.
15754 2017-08-06  Tom de Vries  <tom@codesourcery.com>
15756         * omp-expand.c (expand_oacc_for): Add missing edge probability for chunk
15757         loop.
15759 2017-08-04  Yury Gribov  <tetra2005@gmail.com>
15761         PR tree-optimization/57371
15762         * match.pd: New pattern.
15764 2017-08-04  Marek Polacek  <polacek@redhat.com>
15766         PR middle-end/81695
15767         * fold-const.c (fold_indirect_ref_1): For ((int *)&a + 4 -> a[1],
15768         perform the computation in offset_int.
15770 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
15772         PR tree-optimization/81136
15773         * tree-vectorizer.h: Include tree-hash-traits.h.
15774         (vec_base_alignments): New typedef.
15775         (vec_info): Add a base_alignments field.
15776         (vect_record_base_alignments): Declare.
15777         * tree-data-ref.h (data_reference): Add an is_conditional_in_stmt
15778         field.
15779         (DR_IS_CONDITIONAL_IN_STMT): New macro.
15780         (create_data_ref): Add an is_conditional_in_stmt argument.
15781         * tree-data-ref.c (create_data_ref): Likewise.  Use it to initialize
15782         the is_conditional_in_stmt field.
15783         (data_ref_loc): Add an is_conditional_in_stmt field.
15784         (get_references_in_stmt): Set the is_conditional_in_stmt field.
15785         (find_data_references_in_stmt): Update call to create_data_ref.
15786         (graphite_find_data_references_in_stmt): Likewise.
15787         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Likewise.
15788         * tree-vect-data-refs.c (vect_analyze_data_refs): Likewise.
15789         (vect_record_base_alignment): New function.
15790         (vect_record_base_alignments): Likewise.
15791         (vect_compute_data_ref_alignment): Adjust base_addr and aligned_to
15792         for nested statements even if we fail to compute a misalignment.
15793         Use pooled base alignments for unconditional references.
15794         (vect_find_same_alignment_drs): Compare base addresses instead
15795         of base objects.
15796         (vect_analyze_data_refs_alignment): Call vect_record_base_alignments.
15797         * tree-vect-slp.c (vect_slp_analyze_bb_1): Likewise.
15799 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
15801         * tree-vectorizer.h (vec_info): Add a constructor and destructor.
15802         Add an explicit name for the enum.  Use auto_vec for slp_instances
15803         and grouped_stores.
15804         (_loop_vec_info): Add a constructor and destructor.  Use auto_vec
15805         for all vectors.
15806         (_bb_vec_info): Add a constructor and destructor.
15807         (vinfo_for_stmt): Return NULL for uids of -1 as well.
15808         (destroy_loop_vec_info): Delete.
15809         (vect_destroy_datarefs): Likewise.
15810         * tree-vectorizer.c (vect_destroy_datarefs): Delete.
15811         (vec_info::vec_info): New function.
15812         (vec_info::~vec_info): Likewise.
15813         (vectorize_loops): Use delete instead of destroy_loop_vec_info.
15814         * tree-parloops.c (gather_scalar_reductions): Use delete instead of
15815         destroy_loop_vec_info.
15816         * tree-vect-loop.c (new_loop_vec_info): Replace with...
15817         (_loop_vec_info::_loop_vec_info): ...this.
15818         (destroy_loop_vec_info): Replace with...
15819         (_loop_vec_info::~_loop_vec_info): ...this.  Unconditionally delete
15820         the stmt_vec_infos.  Leave handling of vec_info information to its
15821         destructor.  Remove explicit vector releases.
15822         (vect_analyze_loop_form): Use new instead of new_loop_vec_info.
15823         (vect_analyze_loop): Use delete instead of destroy_loop_vec_info.
15824         * tree-vect-slp.c (new_bb_vec_info): Replace with...
15825         (_bb_vec_info::_bb_vec_info): ...this.  Don't reserve space in
15826         BB_VINFO_GROUPED_STORES or BB_VINFO_SLP_INSTANCES.
15827         (destroy_bb_vec_info): Replace with...
15828         (_bb_vec_info::~_bb_vec_info): ...this.  Leave handling of vec_info
15829         information to its destructor.
15830         (vect_slp_analyze_bb_1): Use new and delete instead of
15831         new_bb_vec_info and destroy_bb_vec_info.
15832         (vect_slp_bb): Replace 2 calls to destroy_bb_vec_info with a
15833         single delete.
15835 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
15837         * tree-data-ref.h (subscript): Add access_fn field.
15838         (data_dependence_relation): Add could_be_independent_p.
15839         (SUB_ACCESS_FN, DDR_COULD_BE_INDEPENDENT_P): New macros.
15840         (same_access_functions): Move to tree-data-ref.c.
15841         * tree-data-ref.c (ref_contains_union_access_p): New function.
15842         (access_fn_component_p): Likewise.
15843         (access_fn_components_comparable_p): Likewise.
15844         (dr_analyze_indices): Add a reference to access_fn_component_p.
15845         (dump_data_dependence_relation): Use SUB_ACCESS_FN instead of
15846         DR_ACCESS_FN.
15847         (constant_access_functions): Likewise.
15848         (add_other_self_distances): Likewise.
15849         (same_access_functions): Likewise.  (Moved from tree-data-ref.h.)
15850         (initialize_data_dependence_relation): Use XCNEW and remove
15851         explicit zeroing of DDR_REVERSED_P.  Look for a subsequence
15852         of access functions that have the same type.  Allow the
15853         subsequence to end with different bases in some circumstances.
15854         Record the chosen access functions in SUB_ACCESS_FN.
15855         (build_classic_dist_vector_1): Replace ddr_a and ddr_b with
15856         a_index and b_index.  Use SUB_ACCESS_FN instead of DR_ACCESS_FN.
15857         (subscript_dependence_tester_1): Likewise dra and drb.
15858         (build_classic_dist_vector): Update calls accordingly.
15859         (subscript_dependence_tester): Likewise.
15860         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Check
15861         DDR_COULD_BE_INDEPENDENT_P.
15862         * tree-vectorizer.h (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Test
15863         comp_alias_ddrs instead of may_alias_ddrs.
15864         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
15865         New function.
15866         (vect_analyze_data_ref_dependence): Use it if
15867         DDR_COULD_BE_INDEPENDENT_P, but fall back to using the recorded
15868         distance vectors if that fails.
15869         (dependence_distance_ge_vf): New function.
15870         (vect_prune_runtime_alias_test_list): Use it.  Don't clear
15871         LOOP_VINFO_MAY_ALIAS_DDRS.
15873 2017-08-04  Richard Biener  <rguenther@suse.de>
15875         PR middle-end/81705
15876         * fold-const.c (fold_binary_loc): Properly restrict
15877         minus_var0 && minus_var1 case when associating undefined overflow
15878         entities.
15880 2017-08-04  Tom de Vries  <tom@codesourcery.com>
15882         * omp-simd-clone.c (simd_clone_adjust): Add missing edge probability.
15884 2017-08-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15886         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
15887         Don't start diagnostic messages with a capital letter.
15888         * config/rs6000/rs6000.c (rs6000_option_override_internal):
15889         Likewise.
15890         (rs6000_invalid_builtin): Likewise.
15891         (rs6000_trampoline_init): Likewise.
15893 2017-08-03  Jakub Jelinek  <jakub@redhat.com>
15895         PR target/81621
15896         * bb-reorder.c (pass_partition_blocks::execute): Return TODO_df_finish
15897         after setting changeable df flags.
15899 2017-08-03  Richard Biener  <rguenther@suse.de>
15901         * tree-ssa-reassoc.c (should_break_up_subtract): Also break
15902         up if the use is in USE - X.
15904 2017-08-03  Alexander Monakov  <amonakov@ispras.ru>
15906         * toplev.c (dumpfile.h): New include.
15907         (internal_error_reentered): New static function.  Use it...
15908         (internal_error_function): ...here to handle reentered internal_error.
15910 2017-08-03  Richard Biener  <rguenther@suse.de>
15912         PR middle-end/81148
15913         * fold-const.c (split_tree): Add minus_var and minus_con
15914         arguments, remove unused loc arg.  Never generate NEGATE_EXPRs
15915         here but always use minus_*.
15916         (associate_trees): Assert we never associate with MINUS_EXPR
15917         and NULL first operand.  Do not recurse for PLUS_EXPR operands
15918         when associating as MINUS_EXPR either.
15919         (fold_binary_loc): Track minus_var and minus_con.
15921 2017-08-03  Tom de Vries  <tom@codesourcery.com>
15923         PR lto/81430
15924         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers): If
15925         ACCEL_COMPILER, apply finish_options on
15926         DECL_FUNCTION_SPECIFIC_OPTIMIZATION.
15928 2017-08-03  Tom de Vries  <tom@codesourcery.com>
15930         PR target/81662
15931         * config/nvptx/nvptx.c (nvptx_option_override): Emit sorry if
15932         function_entry_patch_area_size > 0.
15934 2017-08-03  Jakub Jelinek  <jakub@redhat.com>
15936         PR driver/81650
15937         * calls.c (alloc_max_size): Use HOST_WIDE_INT_UC (10??)
15938         instead of 10??LU, perform unit multiplication in wide_int,
15939         don't change alloc_object_size_limit if the limit is larger
15940         than SSIZE_MAX.
15942         PR tree-optimization/81655
15943         PR tree-optimization/81588
15944         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Handle also
15945         the case when ranges[i].low and high are 1 for unsigned type with
15946         precision 1.
15948         PR middle-end/81052
15949         * omp-low.c (diagnose_sb_0): Handle flag_openmp_simd like flag_openmp.
15950         (pass_diagnose_omp_blocks::gate): Enable also for flag_openmp_simd.
15952 2017-08-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15954         * tree-vrp.h: Add include guard.
15956 2017-08-02  Uros Bizjak  <ubizjak@gmail.com>
15958         PR target/81644
15959         * config/i386/i386.md (unspecv): Add UNSPECV_UD2.
15960         (ud2): New insn pattern.
15961         * config/i386/i386.c (ix86_expand_epilogue):
15962         For naked functions, generate ud2 instead of trap insn.
15964 2017-08-02  Marek Polacek  <polacek@redhat.com>
15966         PR other/81667
15967         * alloc-pool.h (base_pool_allocator): Initialize m_elt_size.
15969 2017-08-02  Tom de Vries  <tom@codesourcery.com>
15970             Cesar Philippidis  <cesar@codesourcery.com>
15972         * config/nvptx/nvptx.c (nvptx_lockless_update, nvptx_lockfull_update):
15973         Add missing edge probabilities.
15975 2017-08-02  Tamar Christina  <tamar.christina@arm.com>
15977         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
15978         Correct endianness.
15980 2017-08-02  Jakub Jelinek  <jakub@redhat.com>
15982         PR middle-end/79499
15983         * function.c (thread_prologue_and_epilogue_insns): Determine blocks
15984         for find_many_sub_basic_blocks bitmap by looking up BLOCK_FOR_INSN
15985         of first NONDEBUG_INSN_P in each of the split_prologue_seq and
15986         prologue_seq sequences - if any.
15988 2017-08-02  Richard Biener  <rguenther@suse.de>
15990         * tree-vect-stmts.c (vectorizable_store): Perform vector extracts
15991         via vectors if supported, integer extracts via punning if supported
15992         or otherwise vector extracts.
15994 2017-08-02  Richard Biener  <rguenther@suse.de>
15996         * tree-ssa-pre.c (bitmap_insert_into_set_1): Remove and inline
15997         into ...
15998         (bitmap_insert_into_set): ... this.
16000 2017-08-02  Richard Biener  <rguenther@suse.de>
16002         PR tree-optimization/81633
16003         Revert
16004         2015-08-17  Alan Hayward  <alan.hayward@arm.com>
16006         PR tree-optimization/71752
16007         * tree-vect-slp.c (vect_get_slp_defs): Handle null operands.
16009 2017-08-01  Daniel Santos  <daniel.santos@pobox.com>
16011         * config/i386/i386.h (ix86_frame::outlined_save_offset): Remove field.
16012         (machine_function::call_ms2sysv_pad_out): Remove field.
16013         * config/i386/i386.c (xlogue_layout::get_stack_space_used): Modify.
16014         (ix86_compute_frame_layout): Likewise.
16016 2017-08-01  H.J. Lu  <hongjiu.lu@intel.com>
16018         PR target/81654
16019         * config/i386/i386.c (ix86_set_func_type): Disallow naked
16020         attribute with interrupt attribute.
16022 2017-08-01  Andrew Pinski  <apinski@cavium.com>
16024         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Check
16025         BIT_INSERT_EXPR's operand 1
16026         to see if the types precision matches.
16028 2017-08-01  Martin Liska  <mliska@suse.cz>
16030         PR middle-end/70140
16031         * builtins.c (expand_builtin_memcpy_args): Remove.
16032         (expand_builtin_memcpy): Call newly added function
16033         expand_builtin_memory_copy_args.
16034         (expand_builtin_memcpy_with_bounds): Likewise.
16035         (expand_builtin_mempcpy): Remove last argument.
16036         (expand_builtin_mempcpy_with_bounds): Likewise.
16037         (expand_builtin_memory_copy_args): New function created from
16038         expand_builtin_mempcpy_args with small modifications.
16039         (expand_builtin_mempcpy_args): Remove.
16040         (expand_builtin_stpcpy): Remove unused argument.
16041         (expand_builtin): Likewise.
16042         (expand_builtin_with_bounds): Likewise.
16044 2017-08-01  Martin Liska  <mliska@suse.cz>
16046         Revert r250771
16047         Make mempcpy more optimal (PR middle-end/70140).
16049 2017-08-01  Jakub Jelinek  <jakub@redhat.com>
16051         PR target/81622
16052         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
16053         __builtin_vec_cmpne verify both arguments are compatible vectors
16054         before looking at TYPE_MODE on the element type.  For __builtin_vec_ld
16055         verify arg1_type is a pointer or array type.  For __builtin_vec_st,
16056         move computation of aligned to after checking the argument types.
16057         Formatting fixes.
16059         PR target/80846
16060         * config/rs6000/vsx.md (vextract_fp_from_shorth,
16061         vextract_fp_from_shortl): Add element mode after mode in gen_vec_init*
16062         calls.
16064 2017-08-01  Jerome Lambourg  <lambourg@adacore.com>
16065             Doug Rupp  <rupp@adacore.com>
16066             Olivier Hainque  <hainque@adacore.com>
16068         * config.gcc (arm-wrs-vxworks*): Rework to handle arm-wrs-vxworks7 as
16069         well as arm-wrs-vxworks. Update target_cpu_name from arm6 (arch v3) to
16070         arm8 (arch v4).
16071         * config/arm/vxworks.h (MAYBE_TARGET_BPABI_CPP_BUILTINS): New, helper
16072         for TARGET_OS_CPP_BUILTIN.
16073         (TARGET_OS_CPP_BUILTIN): Invoke MAYBE_TARGET_BPABI_CPP_BUILTINS(),
16074         refine CPU definitions for arm_arch5 and add those for arm_arch6 and
16075         arm_arch7.
16076         (MAYBE_ASM_ABI_SPEC): New, helper for SUBTARGET_EXTRA_ASM_SPEC,
16077         passing required abi options to the assembler for EABI configurations.
16078         (EXTRA_CC1_SPEC): New macro, to help prevent the implicit production
16079         of .text.hot and .text.unlikely sections for kernel modules when
16080         using ARM style exceptions.
16081         (CC1_SPEC): Remove obsolete attempt at mimicking Diab toolchain
16082         options. Add EXTRA_CC1_SPEC.
16083         (VXWORKS_ENDIAN_SPEC): Adjust comment and remove handling of Diab
16084         toolchain options.
16085         (DWARF2_UNWIND_INFO): Redefine to handle the pre/post VxWorks 7
16086         transition.
16087         (ARM_TARGET2_DWARF_FORMAT): Define.
16088         * config/arm/t-vxworks: Adjust multilib control to removal of the
16089         Diab command line options.
16091 2017-08-01  Martin Liska  <mliska@suse.cz>
16093         PR gcov-profile/81561
16094         * gcov.c (unblock): Make unblocking safe as we need to preserve
16095         index correspondence of blocks and block_lists.
16097 2017-08-01  Richard Biener  <rguenther@suse.de>
16099         PR tree-optimization/81181
16100         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
16101         (compute_antic): ... end of iteration here.
16103 2017-08-01  James Greenhalgh  <james.greenhalgh@arm.com>
16105         * common.opt (ftree-vectorize): No longer set flag_tree_vectorize.
16106         (ftree-loop-vectorize): Set as EnabledBy ftree-vectorize.
16107         (ftree-slp-vectorize): Likewise.
16108         * omp-expand (expand_omp_simd): Remove flag_tree_vectorize, as it
16109         can no longer be set independent of flag_tree_loop_vectorize.
16110         * omp-general.c (emp_max_vf): Likewise.
16111         * opts.c (enable_fdo_optimizations): Remove references to
16112         flag_tree_vectorize, these are now implicit.
16113         (common_handle_option): Remove handling for OPT_ftree_vectorize,
16114         and leave it for the options machinery.
16116 2017-08-01  Martin Liska  <mliska@suse.cz>
16118         PR middle-end/70140
16119         * builtins.c (expand_builtin_memcpy_args): Remove.
16120         (expand_builtin_memcpy): Call newly added function
16121         expand_builtin_memory_copy_args.
16122         (expand_builtin_memcpy_with_bounds): Likewise.
16123         (expand_builtin_mempcpy): Remove last argument.
16124         (expand_builtin_mempcpy_with_bounds): Likewise.
16125         (expand_builtin_memory_copy_args): New function created from
16126         expand_builtin_mempcpy_args with small modifications.
16127         (expand_builtin_mempcpy_args): Remove.
16128         (expand_builtin_stpcpy): Remove unused argument.
16129         (expand_builtin): Likewise.
16130         (expand_builtin_with_bounds): Likewise.
16132 2017-08-01  Uros Bizjak  <ubizjak@gmail.com>
16134         PR target/81641
16135         * config/i386/i386.c (ix86_print_operand_address_as): For -masm=intel
16136         print "ds:" only for immediates in generic address space.
16138 2017-08-01  Uros Bizjak  <ubizjak@gmail.com>
16140         PR target/81639
16141         * config/i386/i386.c (ix86_funciton_naked): New prototype.
16142         (ix86_function_ok_for_sibcall): Return false for naked functions.
16144 2017-08-01  Richard Biener  <rguenther@suse.de>
16146         * tree-ssa-pre.c (print_pre_expr): Handle NULL expr.
16147         (compute_antic): Seed worklist with exit block predecessors.
16148         * cfganal.c (dfs_find_deadend): For a cycle return the source
16149         of the edge closing it.
16151 2017-08-01  Tamar Christina  <tamar.christina@arm.com>
16153         * config/aarch64/aarch64.c
16154         (aarch64_can_const_movi_rtx_p): Move 0 check.
16156 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
16158         * tree.h (POINTER_TYPE_OVERFLOW_UNDEFINED): Delete.
16159         * fold-const.c (fold_comparison, fold_binary_loc): Delete use of
16160         above macro.
16161         * match.pd: Ditto in address comparison pattern.
16163 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
16165         PR tree-optimization/81627
16166         * tree-predcom.c (prepare_finalizers): Always rewrite into loop
16167         closed ssa form for store-store chain.
16169 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
16171         PR tree-optimization/81620
16172         * tree-predcom.c (add_ref_to_chain): Don't set has_max_use_after
16173         for store-store chain.
16175 2017-08-01  Jakub Jelinek  <jakub@redhat.com>
16177         PR tree-optimization/81588
16178         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If
16179         ranges[i].in_p, invert comparison code ccode.  For >/>=,
16180         swap rhs1 and rhs2 and comparison code unconditionally,
16181         for </<= don't do that.  Don't swap rhs1/rhs2 again if
16182         ranges[i].in_p, instead invert comparison code ccode if
16183         opcode or oe->rank is BIT_IOR_EXPR.
16185         PR target/80846
16186         * optabs.def (vec_extract_optab, vec_init_optab): Change from
16187         a direct optab to conversion optab.
16188         * optabs.c (expand_vector_broadcast): Use convert_optab_handler
16189         with GET_MODE_INNER as last argument instead of optab_handler.
16190         * expmed.c (extract_bit_field_1): Likewise.  Use vector from
16191         vector extraction if possible and optab is available.
16192         * expr.c (store_constructor): Use convert_optab_handler instead
16193         of optab_handler.  Use vector initialization from smaller
16194         vectors if possible and optab is available.
16195         * tree-vect-stmts.c (vectorizable_load): Likewise.
16196         * doc/md.texi (vec_extract, vec_init): Document that the optabs
16197         now have two modes.
16198         * config/i386/i386.c (ix86_expand_vector_init): Handle expansion
16199         of vec_init from half-sized vectors with the same element mode.
16200         * config/i386/sse.md (ssehalfvecmode): Add V4TI case.
16201         (ssehalfvecmodelower, ssescalarmodelower): New mode attributes.
16202         (reduc_plus_scal_v8df, reduc_plus_scal_v4df, reduc_plus_scal_v2df,
16203         reduc_plus_scal_v16sf, reduc_plus_scal_v8sf, reduc_plus_scal_v4sf,
16204         reduc_<code>_scal_<mode>, reduc_umin_scal_v8hi): Add element mode
16205         after mode in gen_vec_extract* calls.
16206         (vec_extract<mode>): Renamed to ...
16207         (vec_extract<mode><ssescalarmodelower>): ... this.
16208         (vec_extract<mode><ssehalfvecmodelower>): New expander.
16209         (rotl<mode>3, rotr<mode>3, <shift_insn><mode>3, ashrv2di3): Add
16210         element mode after mode in gen_vec_init* calls.
16211         (VEC_INIT_HALF_MODE): New mode iterator.
16212         (vec_init<mode>): Renamed to ...
16213         (vec_init<mode><ssescalarmodelower>): ... this.
16214         (vec_init<mode><ssehalfvecmodelower>): New expander.
16215         * config/i386/mmx.md (vec_extractv2sf): Renamed to ...
16216         (vec_extractv2sfsf): ... this.
16217         (vec_initv2sf): Renamed to ...
16218         (vec_initv2sfsf): ... this.
16219         (vec_extractv2si): Renamed to ...
16220         (vec_extractv2sisi): ... this.
16221         (vec_initv2si): Renamed to ...
16222         (vec_initv2sisi): ... this.
16223         (vec_extractv4hi): Renamed to ...
16224         (vec_extractv4hihi): ... this.
16225         (vec_initv4hi): Renamed to ...
16226         (vec_initv4hihi): ... this.
16227         (vec_extractv8qi): Renamed to ...
16228         (vec_extractv8qiqi): ... this.
16229         (vec_initv8qi): Renamed to ...
16230         (vec_initv8qiqi): ... this.
16231         * config/rs6000/vector.md (VEC_base_l): New mode attribute.
16232         (vec_init<mode>): Renamed to ...
16233         (vec_init<mode><VEC_base_l>): ... this.
16234         (vec_extract<mode>): Renamed to ...
16235         (vec_extract<mode><VEC_base_l>): ... this.
16236         * config/rs6000/paired.md (vec_initv2sf): Renamed to ...
16237         (vec_initv2sfsf): ... this.
16238         * config/rs6000/altivec.md (splitter, altivec_copysign_v4sf3,
16239         vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi,
16240         vec_unpacku_lo_v8hi, mulv16qi3, altivec_vreve<mode>2): Add
16241         element mode after mode in gen_vec_init* calls.
16242         * config/aarch64/aarch64-simd.md (vec_init<mode>): Renamed to ...
16243         (vec_init<mode><Vel>): ... this.
16244         (vec_extract<mode>): Renamed to ...
16245         (vec_extract<mode><Vel>): ... this.
16246         * config/aarch64/iterators.md (Vel): New mode attribute.
16247         * config/s390/s390.c (s390_expand_vec_strlen, s390_expand_vec_movstr):
16248         Add element mode after mode in gen_vec_extract* calls.
16249         * config/s390/vector.md (non_vec_l): New mode attribute.
16250         (vec_extract<mode>): Renamed to ...
16251         (vec_extract<mode><non_vec_l>): ... this.
16252         (vec_init<mode>): Renamed to ...
16253         (vec_init<mode><non_vec_l>): ... this.
16254         * config/s390/s390-builtins.def (s390_vlgvb, s390_vlgvh, s390_vlgvf,
16255         s390_vlgvf_flt, s390_vlgvg, s390_vlgvg_dbl): Add element mode after
16256         vec_extract mode.
16257         * config/arm/iterators.md (V_elem_l): New mode attribute.
16258         * config/arm/neon.md (vec_extract<mode>): Renamed to ...
16259         (vec_extract<mode><V_elem_l>): ... this.
16260         (vec_extractv2di): Renamed to ...
16261         (vec_extractv2didi): ... this.
16262         (vec_init<mode>): Renamed to ...
16263         (vec_init<mode><V_elem_l>): ... this.
16264         (reduc_plus_scal_<mode>, reduc_plus_scal_v2di, reduc_smin_scal_<mode>,
16265         reduc_smax_scal_<mode>, reduc_umin_scal_<mode>,
16266         reduc_umax_scal_<mode>, neon_vget_lane<mode>, neon_vget_laneu<mode>):
16267         Add element mode after gen_vec_extract* calls.
16268         * config/mips/mips-msa.md (vec_init<mode>): Renamed to ...
16269         (vec_init<mode><unitmode>): ... this.
16270         (vec_extract<mode>): Renamed to ...
16271         (vec_extract<mode><unitmode>): ... this.
16272         * config/mips/loongson.md (vec_init<mode>): Renamed to ...
16273         (vec_init<mode><unitmode>): ... this.
16274         * config/mips/mips-ps-3d.md (vec_initv2sf): Renamed to ...
16275         (vec_initv2sfsf): ... this.
16276         (vec_extractv2sf): Renamed to ...
16277         (vec_extractv2sfsf): ... this.
16278         (reduc_plus_scal_v2sf, reduc_smin_scal_v2sf, reduc_smax_scal_v2sf):
16279         Add element mode after gen_vec_extract* calls.
16280         * config/mips/mips.md (unitmode): New mode iterator.
16281         * config/spu/spu.c (spu_expand_prologue, spu_allocate_stack,
16282         spu_builtin_extract): Add element mode after gen_vec_extract* calls.
16283         * config/spu/spu.md (inner_l): New mode attribute.
16284         (vec_init<mode>): Renamed to ...
16285         (vec_init<mode><inner_l>): ... this.
16286         (vec_extract<mode>): Renamed to ...
16287         (vec_extract<mode><inner_l>): ... this.
16288         * config/sparc/sparc.md (veltmode): New mode iterator.
16289         (vec_init<VMALL:mode>): Renamed to ...
16290         (vec_init<VMALL:mode><VMALL:veltmode>): ... this.
16291         * config/ia64/vect.md (vec_initv2si): Renamed to ...
16292         (vec_initv2sisi): ... this.
16293         (vec_initv2sf): Renamed to ...
16294         (vec_initv2sfsf): ... this.
16295         (vec_extractv2sf): Renamed to ...
16296         (vec_extractv2sfsf): ... this.
16297         * config/powerpcspe/vector.md (VEC_base_l): New mode attribute.
16298         (vec_init<mode>): Renamed to ...
16299         (vec_init<mode><VEC_base_l>): ... this.
16300         (vec_extract<mode>): Renamed to ...
16301         (vec_extract<mode><VEC_base_l>): ... this.
16302         * config/powerpcspe/paired.md (vec_initv2sf): Renamed to ...
16303         (vec_initv2sfsf): ... this.
16304         * config/powerpcspe/altivec.md (splitter, altivec_copysign_v4sf3,
16305         vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi,
16306         vec_unpacku_lo_v8hi, mulv16qi3): Add element mode after mode in
16307         gen_vec_init* calls.
16309 2017-08-01  Richard Biener  <rguenther@suse.de>
16311         PR tree-optimization/81297
16312         * tree-vrp.c (get_single_symbol): Remove assert, instead drop
16313         TREE_OVERFLOW from INTEGER_CSTs.
16315 2017-07-31  Segher Boessenkool  <segher@kernel.crashing.org>
16317         * config/rs6000/rs6000.c (enum rs6000_reg_type): Delete trailing comma.
16319 2017-07-31  Carl Love  <cel@us.ibm.com>
16321         * config/rs6000/rs6000-c: Add support for built-in functions
16322         vector signed char vec_xl_be (signed long long, signed char *);
16323         vector unsigned char vec_xl_be (signed long long, unsigned char *);
16324         vector signed int vec_xl_be (signed long long, signed int *);
16325         vector unsigned int vec_xl_be (signed long long, unsigned int *);
16326         vector signed long long vec_xl_be (signed long long, signed long long *);
16327         vector unsigned long long vec_xl_be (signed long long, unsigned long long *);
16328         vector signed short vec_xl_be (signed long long, signed short *);
16329         vector unsigned short vec_xl_be (signed long long, unsigned short *);
16330         vector double vec_xl_be (signed long long, double *);
16331         vector float vec_xl_be (signed long long, float *);
16332         * config/rs6000/altivec.h (vec_xl_be): Add #define.
16333         * config/rs6000/rs6000-builtin.def (XL_BE_V16QI, XL_BE_V8HI, XL_BE_V4SI)
16334         XL_BE_V2DI, XL_BE_V4SF, XL_BE_V2DF, XL_BE): Add definitions
16335         for the builtins.
16336         * config/rs6000/rs6000.c (altivec_expand_xl_be_builtin): Add function.
16337         (altivec_expand_builtin): Add switch statement to call
16338         altivec_expand_xl_be for each builtin.
16339         (altivec_init_builtins): Add def_builtin for _builtin_vsx_le_be_v8hi,
16340         __builtin_vsx_le_be_v4si, __builtin_vsx_le_be_v2di,
16341         __builtin_vsx_le_be_v4sf, __builtin_vsx_le_be_v2df,
16342         __builtin_vsx_le_be_v16qi.
16343         * doc/extend.texi: Update the built-in documentation file for the
16344         new built-in functions.
16346 2017-07-31  Uros Bizjak  <ubizjak@gmail.com>
16348         PR target/25967
16349         * config/i386/i386.c (ix86_allocate_stack_slots_for_args):
16350         New function.
16351         (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
16353 2017-07-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16355         * config.gcc: Add z14.
16356         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
16357         CPU model numbers for z13s and z14.
16358         * config/s390/s390-c.c (s390_resolve_overloaded_builtin): Replace
16359         arch12 with z14.
16360         * config/s390/s390-opts.h (enum processor_type): Rename
16361         PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
16362         * config/s390/s390.c (processor_table): Add field for CPU name to
16363         be passed to Binutils.
16364         (s390_asm_output_machine_for_arch): Use the new field in
16365         processor_table for Binutils.
16366         (s390_expand_builtin): Replace arch12 with z14.
16367         (s390_issue_rate): Rename PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
16368         (s390_get_sched_attrmask): Likewise.
16369         (s390_get_unit_mask): Likewise.
16370         * config/s390/s390.opt: Add z14 to processor_type enum.
16372 2017-07-31  Martin Jambor  <mjambor@suse.cz>
16374         PR hsa/81477
16375         * ipa-fnsummary.c (ipa_fn_summary_generate): Set versionable
16376         regardless of optimization level.
16378 2017-07-31  Jan Hubicka <hubicka@ucw.cz>
16379             Martin Liska  <mliska@suse.cz>
16381         * predict.def: Remove old comment and adjust probability.
16382         * gimplify.c (should_warn_for_implicit_fallthrough): Ignore
16383         PREDICT statements.
16385 2017-07-31  Uros Bizjak  <ubizjak@gmail.com>
16387         PR target/25967
16388         * config/i386/i386.c (ix86_function_naked): New function.
16389         (ix86_can_use_return_insn_p): Return false for naked functions.
16390         (ix86_expand_prologue): Skip prologue for naked functions.
16391         (ix86_expand_epilogue): Skip epilogue for naked functions
16392         and emit trap instruction.
16393         (ix86_warn_func_return): New function.
16394         (ix86_attribute_table): Add "naked" attribute specification.
16395         (TARGET_WARN_FUNC_RETURN): Define.
16396         * doc/extend.texi (x86 Function Attributes) <naked>: Document it.
16398 2017-07-31  Martin Liska  <mliska@suse.cz>
16400         * gimple-pretty-print.c (dump_gimple_label): Never dump BB info.
16401         (dump_gimple_bb_header): Always dump BB info.
16402         (pp_cfg_jump): Do not append info about BB when dumping a jump.
16404 2017-07-31  Martin Liska  <mliska@suse.cz>
16406         PR sanitize/81530
16407         * convert.c (convert_to_integer_1): Guard condition with flag_sanitize_p
16408         also with current_function_decl non-null equality.
16410 2017-07-31  Jakub Jelinek  <jakub@redhat.com>
16412         PR sanitizer/81604
16413         * ubsan.c (ubsan_type_descriptor): For UBSAN_PRINT_ARRAY don't
16414         change type to the element type, instead add eltype variable and
16415         use it where we are interested in the element type.
16417         PR tree-optimization/81603
16418         * ipa-polymorphic-call.c
16419         (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Perform
16420         offset arithmetic in offset_int, bail out if the resulting bit offset
16421         doesn't fit into shwi.
16423 2017-07-31  Martin Liska  <mliska@suse.cz>
16425         * gimplify.c (mostly_copy_tree_r): Remove Java specific hunk.
16426         (gimplify_save_expr): Fix comment.
16428 2017-07-30  H.J. Lu  <hongjiu.lu@intel.com>
16430         PR target/79793
16431         * config/i386/i386.c (ix86_function_arg): Update arguments for
16432         exception handler.
16433         (ix86_compute_frame_layout): Set the initial stack offset to
16434         INCOMING_FRAME_SP_OFFSET.  Update red-zone offset with
16435         INCOMING_FRAME_SP_OFFSET.
16436         (ix86_expand_epilogue): Don't pop the 'ERROR_CODE' off the
16437         stack before exception handler returns.
16438         * config/i386/i386.h (INCOMING_FRAME_SP_OFFSET): Add the
16439         the 'ERROR_CODE' for exception handler.
16441 2017-07-30  Uros Bizjak  <ubizjak@gmail.com>
16443         * config/i386/i386.h (ASM_PRINTF_EXTENSIONS): New macro.
16444         (ASM_OUTPUT_REG_PUSH): Rewrite with new operand modifiers.
16445         (ASM_OUTPUT_REG_POP): Ditto.
16446         * config/i386/i386.c (ix86_asm_output_function_label): Use fputs
16447         instead of asm_fprintf to output pure string.
16449 2017-07-29  Jakub Jelinek  <jakub@redhat.com>
16451         * debug.h (struct gcc_debug_hooks): Add IMPLICIT argument
16452         to imported_module_or_decl hook.
16453         (debug_nothing_tree_tree_tree_bool): Remove.
16454         (debug_nothing_tree_tree_tree_bool_bool): New declaration.
16455         * debug.c (do_nothing_debug_hooks): Use
16456         debug_nothing_tree_tree_tree_bool_bool instead of
16457         debug_nothing_tree_tree_tree_bool.
16458         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
16459         * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
16460         * sdbout.c (sdb_debug_hooks): Likewise.
16461         * dwarf2out.c (dwarf2_lineno_debug_hooks): Likewise.
16462         (gen_namespace_die): Add DW_AT_export_symbols attribute if
16463         langhook wants it.
16464         (dwarf2out_imported_module_or_decl): Add IMPLICIT argument,
16465         if true, -gdwarf-5 and decl will have DW_AT_export_symbols
16466         attribute, don't add anything.
16468 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
16470         * fold-const.c (fold_build1_stat_loc): Remove _stat from name.
16471         (fold_build2_stat_loc): Likewise.
16472         (fold_build3_stat_loc): Likewise.
16473         * fold-const.h (fold_build1, fold_build2, fold_build3): Adjust.
16474         (fold_build1_loc): Remove macro.
16475         (fold_build2_loc): Likewise.
16476         (fold_build3_loc): Likewise.
16478 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
16480         * gimple.c (gimple_build_debug_bind_stat): Remove _stat from name.
16481         (gimple_build_debug_bind_source_stat): Likewise.
16482         * gimple.h (gimple_build_debug_bind): Remove macro.
16483         (gimple_build_debug_bind_source): Likewise.
16485 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
16487         * bitmap.c (bitmap_alloc): Adjust.
16488         (bitmap_gc_alloc): Likewise.
16489         * bitmap.h (bitmap_initialize_stat): Remove _stat from name.
16491 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
16493         * bitmap.c (bitmap_obstack_alloc_stat): Rename to bitmap_alloc.
16494         (bitmap_gc_alloc_stat): Rename to bitmap_gc_alloc.
16495         * bitmap.h (bitmap_obstack_alloc_stat): Adjust prototype.
16496         (bitmap_gc_alloc_stat): Likewise.
16497         (BITMAP_ALLOC, BITMAP_GGC_ALLOC): Adjust.
16499 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
16501         * rtl.c (shallow_copy_rtx_stat): Remove _stat from name.
16502         * rtl.h (shallow_copy_rtx): Remove macro.
16504 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
16506         * emit-rtl.c (gen_raw_REG): Adjust.
16507         * gengenrtl.c (gendef): Likewise.
16508         * rtl.c (rtx_alloc_stat): Remove _stat from name.
16509         * rtl.h (rtx_alloc): Remove macro.
16511 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
16513         * tree.c (build_tree_list_vec_stat): Remove _stat from name.
16514         (build_tree_list_stat): Likewise.
16515         * tree.h (build_tree_list): Remove macro.
16516         (build_tree_list_vec): Likewise.
16518 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
16520         * tree.c (make_vector_stat): Remove _stat from name.
16521         (build_vector_stat): Likewise.
16522         * tree.h (make_vector_stat): Remove macro.
16523         (build_vector_stat): Likewise.
16525 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
16527         * tree.h (build_var_debug_value): Remove prototype.
16529 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
16531         * tree.c (tree_cons_stat): Remove _stat from name.
16532         * tree.h (tree_cons): Remove macro.
16534 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
16536         * tree.c (build_vl_exp_stat): Remove _stat from name.
16537         * tree.h (build_vl_exp): Remove macro.
16539 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
16541         * tree.c (build_decl_stat): Remove _stat from name.
16542         * tree.h (build_decl): Remove macro.
16544 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
16546         * gimple.c (gimple_build_with_ops_stat): Adjust.
16547         (gimple_alloc_stat): Remove _stat from name.
16548         * gimple.h (gimple_alloc): Remove macro.
16550 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
16552         * tree.c (make_tree_vec_stat): Remove _stat from name.
16553         (grow_tree_vec_stat): Likewise.
16554         * tree.h (make_tree_vec_stat): Adjust prototype.
16555         (grow_tree_vec_stat): Likewise.
16556         (make_tree_vec): Remove macro.
16557         (grow_tree_vec): Likewise.
16559 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
16561         * fold-const.c (fold_build1_stat_loc): Adjust.
16562         (fold_build2_stat_loc): Likewise.
16563         (fold_build3_stat_loc): Likewise.
16564         * tree.c (build0_stat): Remove _stat from name.
16565         (build1_stat): Likewise.
16566         (build2_stat): Likewise.
16567         (build3_stat): Likewise.
16568         (build4_stat): Likewise.
16569         (build5_stat): Likewise.
16570         * tree.h (build1_loc): Remove macro, and rename _stat function
16571         to this.
16572         (build2_loc): Likewise.
16573         (build3_loc): Likewise.
16574         (build4_loc): Likewise.
16575         (build5_loc): Likewise.
16577 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
16579         * tree.c (make_int_cst_stat): Remove _stat from name.
16580         * tree.h (make_int_cst_stat): Adjust prototype.
16581         (make_int_cst): Remove macro.
16583 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
16585         * tree.c (make_tre_binfo_stat): Remove _stat from name.
16586         * tree.h (make_tree_binfo_stat): Adjust prototype.
16587         (make_tree_binfo): Remove.
16589 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
16591         * tree.c (copy_node_stat): Rename to copy_node.
16592         (build_distinct_type_copy): Adjust.
16593         * tree.h (copy_node_stat): Adjust prototype.
16594         (copy_node): Remove macro.
16596 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
16598         * tree.c (make_node_stat): rename to make_node.
16599         (build_tree_list_stat): Adjust.
16600         (build0_stat): Likewise.
16601         (build2_stat): Likewise.
16602         (build3_stat): Likewise.
16603         (build4_stat): Likewise.
16604         (build5_stat): Likewise.
16605         (build_decl_stat): Likewise.
16606         * tree.h (make_node_stat): Adjust prototype.
16607         (make_node): remove macro.
16609 2017-07-28  Peter Bergner  <bergner@vnet.ibm.com>
16611         * config/rs6000/ppc-auxv.h (PPC_FEATURE2_DARN): New define.
16612         (PPC_FEATURE2_SCV): Likewise.
16613         * config/rs6000/rs6000.c (cpu_supports_info): Use them.
16615 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
16617         * config/aarch64/aarch64.c
16618         (aarch64_internal_mov_immediate): Add new special pattern.
16619         * config/aarch64/aarch64.md (*movdi_aarch64):
16620         Add reg/32bit const mov case.
16622 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
16623             Richard Sandiford <richard.sandiford@linaro.org>
16625         * config/aarch64/aarch64.md (mov<mode>): Generalize.
16626         (*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
16627         Add integer and movi cases.
16628         (movi-split-hf-df-sf split, fp16): New.
16629         (enabled): Added TARGET_FP_F16INST.
16630         * config/aarch64/iterators.md (GPF_HF): New.
16631         * config/aarch64/predicates.md (aarch64_reg_or_fp_float): New.
16633 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
16635         * config/aarch64/aarch64.c
16636         (aarch64_simd_container_mode): Add prototype.
16637         (aarch64_expand_mov_immediate): Add HI support.
16638         (aarch64_reinterpret_float_as_int, aarch64_float_const_rtx_p: New.
16639         (aarch64_can_const_movi_rtx_p): New.
16640         (aarch64_preferred_reload_class):
16641         Remove restrictions of using FP registers for certain SIMD operations.
16642         (aarch64_rtx_costs): Added new cost for CONST_DOUBLE moves.
16643         (aarch64_valid_floating_const): Add integer move validation.
16644         (aarch64_simd_imm_scalar_p): Remove.
16645         (aarch64_output_scalar_simd_mov_immediate): Generalize function.
16646         (aarch64_legitimate_constant_p): Expand list of supported cases.
16647         * config/aarch64/aarch64-protos.h
16648         (aarch64_float_const_rtx_p, aarch64_can_const_movi_rtx_p): New.
16649         (aarch64_reinterpret_float_as_int): New.
16650         (aarch64_simd_imm_scalar_p): Remove.
16651         * config/aarch64/constraints.md (Uvi): New.
16652         (Dd): Split into Ds and new Dd.
16653         * config/aarch64/aarch64.md (*movsi_aarch64):
16654         Add SIMD mov case.
16655         (*movdi_aarch64): Add SIMD mov case.
16657 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
16659         * tree-predcom.c: (struct chain): Handle store-store chain in which
16660         stores for elimination only store loop invariant values.
16661         (execute_pred_commoning_chain): Ditto.
16662         (prepare_initializers_chain_store_elim): Ditto.
16663         (prepare_finalizers): Ditto.
16664         (is_inv_store_elimination_chain): New function.
16665         (initialize_root_vars_store_elim_1): New function.
16667 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
16669         * tree-predcom.c: Revise general description of the pass.
16670         (enum chain_type): New enum type for store elimination.
16671         (struct chain): New field supporting store elimination.
16672         (struct component): Ditto.
16673         (dump_chain): Dump store-stores chain.
16674         (release_chain): Release resources.
16675         (split_data_refs_to_components): Compute and create component
16676         contains only stores for elimination.
16677         (get_chain_last_ref_at): New function.
16678         (make_invariant_chain): Initialization.
16679         (make_rooted_chain): Specify chain type in parameter and record it.
16680         (add_looparound_copies): Skip for store-stores chain.
16681         (determine_roots_comp): Compute type of chain and pass it to
16682         make_rooted_chain.
16683         (initialize_root_vars_store_elim_2): New function.
16684         (finalize_eliminated_stores): New function.
16685         (remove_stmt): Handle store for elimination.
16686         (execute_pred_commoning_chain): Execute predictive commoning on
16687         store-store chains.
16688         (determine_unroll_factor): Skip unroll for store-stores chain.
16689         (prepare_initializers_chain_store_elim): New function.
16690         (prepare_initializers_chain): Hanlde store-store chain.
16691         (prepare_finalizers_chain, prepare_finalizers): New function.
16692         (tree_predictive_commoning_loop): Return integer value indicating
16693         if loop is unrolled or lcssa form is corrupted.
16694         (tree_predictive_commoning): Rewrite for lcssa form if necessary.
16696 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
16698         * tree-predcom.c (initialize_root): Delete.
16699         (execute_pred_commoning_chain): Initialize root vars and replace
16700         reference of non-combined chain directly, rather than call above
16701         function.
16703 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
16705         * tree-predcom.c (ref_at_iteration): Add parameter NITERS.  Compute
16706         memory reference to DR at (NITERS + ITERS)-th iteration of loop.
16708 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
16710         * tree-predcom.c (struct chain): New field init_seq.
16711         (release_chain): Release init_seq.
16712         (prepare_initializers_chain): Record intialization stmts in above
16713         field.
16714         (insert_init_seqs): New function.
16715         (tree_predictive_commoning_loop): Call insert_init_seqs.
16717 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
16719         * tree-predcom.c (determine_roots_comp): Skip trivial components.
16721 2017-07-28  Richard Biener  <rguenther@suse.de>
16723         * match.pd: Remove superfluous :c.
16724         * genmatch.c (simplify::id): Add member.
16725         (lower_commutative, lower_opt_convert, lower_cond, lower_for):
16726         Copy id.
16727         (current_id): New global.
16728         (dt_node::parent): Move from ...
16729         (dt_operand::parent): ... here.  Add for_id member.
16730         (is_a_helper <dt_operand *>::test): DT_TRUE is also a dt_operand.
16731         (decision_tree::find_node): Relax order requirement when
16732         merging DT_TRUE nodes to ones inbetween the current simplify
16733         and the one we try to merge with.  Add diagnostic whenever
16734         we need to enforce pattern order by not merging.
16735         (decision_tree::insert): Set current_id.
16736         (decision_tree::print_node): Dump parent node and for_id.
16737         (parser::last_id): Add member.
16738         (parser::push_simplify): Assign unique id.
16739         (parser::parser): Initialize last_id.
16741 2017-07-28  Martin Liska  <mliska@suse.cz>
16743         PR sanitizer/81340
16744         * sanopt.c (sanitize_rewrite_addressable_params): Set VALUE_EXPR after
16745         gimple_build_debug_bind.
16747 2017-07-28  Richard Biener  <rguenther@suse.de>
16749         PR tree-optimization/81502
16750         * match.pd: Add pattern combining BIT_INSERT_EXPR with
16751         BIT_FIELD_REF.
16752         * tree-cfg.c (verify_expr): Verify types of BIT_FIELD_REF
16753         size/pos operands.
16754         (verify_gimple_assign_ternary): Likewise for BIT_INSERT_EXPR pos.
16755         * gimple-fold.c (maybe_canonicalize_mem_ref_addr): Use bitsizetype
16756         for BIT_FIELD_REF args.
16757         * fold-const.c (make_bit_field_ref): Likewise.
16758         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
16760 2017-07-28  Jakub Jelinek  <jakub@redhat.com>
16762         PR sanitizer/80998
16763         * sanopt.c (pass_sanopt::execute): Handle IFN_UBSAN_PTR.
16764         * tree-ssa-alias.c (call_may_clobber_ref_p_1): Likewise.
16765         * flag-types.h (enum sanitize_code): Add SANITIZER_POINTER_OVERFLOW.
16766         Or it into SANITIZER_UNDEFINED.
16767         * ubsan.c: Include gimple-fold.h and varasm.h.
16768         (ubsan_expand_ptr_ifn): New function.
16769         (instrument_pointer_overflow): New function.
16770         (maybe_instrument_pointer_overflow): New function.
16771         (instrument_object_size): Formatting fix.
16772         (pass_ubsan::execute): Call instrument_pointer_overflow
16773         and maybe_instrument_pointer_overflow.
16774         * internal-fn.c (expand_UBSAN_PTR): New function.
16775         * ubsan.h (ubsan_expand_ptr_ifn): Declare.
16776         * sanitizer.def (__ubsan_handle_pointer_overflow,
16777         __ubsan_handle_pointer_overflow_abort): New builtins.
16778         * tree-ssa-tail-merge.c (merge_stmts_p): Handle IFN_UBSAN_PTR.
16779         * internal-fn.def (UBSAN_PTR): New internal function.
16780         * opts.c (sanitizer_opts): Add pointer-overflow.
16781         * lto-streamer-in.c (input_function): Handle IFN_UBSAN_PTR.
16782         * fold-const.c (build_range_check): Compute pointer range check in
16783         integral type if pointer arithmetics would be needed.  Formatting
16784         fixes.
16786 2017-07-28  Martin Liska  <mliska@suse.cz>
16788         PR sanitizer/81460
16789         * sanopt.c (sanitize_rewrite_addressable_params): Do not rewrite
16790         parameters that are of a variable-length.
16792 2017-07-28  Sebastian Huber  <sebastian.huber@embedded-brains.de>
16794         * config.gcc (powerpc-*-rtems*): Remove rs6000/eabi.h.  Add
16795         rs6000/biarch64.h.
16796         * config/rs6000/rtems.h (ASM_DECLARE_FUNCTION_SIZE): New macro.
16797         (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise.
16798         (CRT_CALL_STATIC_FUNCTION): Likewise.
16799         (ASM_DEFAULT_SPEC): New define.
16800         (ASM_SPEC32): Likewise.
16801         (ASM_SPEC64): Likewise.
16802         (ASM_SPEC_COMMON): Likewise.
16803         (ASM_SPEC): Likewise.
16804         (INVALID_64BIT): Likewise.
16805         (LINK_OS_DEFAULT_SPEC): Likewise.
16806         (LINK_OS_SPEC32): Likewise.
16807         (LINK_OS_SPEC64): Likewise.
16808         (POWERPC_LINUX): Likewise.
16809         (PTRDIFF_TYPE): Likewise.
16810         (RESTORE_FP_PREFIX): Likewise.
16811         (RESTORE_FP_SUFFIX): Likewise.
16812         (SAVE_FP_PREFIX): Likewise.
16813         (SAVE_FP_SUFFIX): Likewise.
16814         (SIZE_TYPE): Likewise.
16815         (SUBSUBTARGET_OVERRIDE_OPTIONS): Likewise.
16816         (TARGET_64BIT): Likewise.
16817         (TARGET_64BIT): Likewise.
16818         (TARGET_AIX): Likewise.
16819         (WCHAR_TYPE_SIZE): Likewise.
16820         (WCHAR_TYPE): Undefine.
16821         (TARGET_OS_CPP_BUILTINS): Add 64-bit PowerPC defines.
16822         (CPP_OS_DEFAULT_SPEC): Use previous CPP_OS_RTEMS_SPEC.
16823         (CPP_OS_RTEMS_SPEC): Delete.
16824         (SUBSUBTARGET_EXTRA_SPECS): Remove cpp_os_rtems.  Add
16825         asm_spec_common, asm_spec32, asm_spec64, link_os_spec32, and
16826         link_os_spec64.
16827         * config/rs6000/t-rtems: Add mcpu=e6500/m64 multilibs.
16829 2017-07-28  Jakub Jelinek  <jakub@redhat.com>
16831         PR tree-optimization/81578
16832         * tree-parloops.c (build_new_reduction): Bail out if
16833         reduction_code isn't one of the standard OpenMP reductions.
16834         Move the details printing after that decision.
16836 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
16838         * config/rs6000/predicates.md (volatile_mem_operand): Remove code
16839         related to reload_in_progress.
16840         (splat_input_operand): Likewise.
16841         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_rtx):
16842         Delete prototype.
16843         * config/rs6000/rs6000.c (machine_function): Remove sdmode_stack_slot
16844         field.
16845         (TARGET_EXPAND_TO_RTL_HOOK): Delete.
16846         (TARGET_INSTANTIATE_DECLS): Likewise.
16847         (legitimate_indexed_address_p): Delete reload_in_progress code.
16848         (rs6000_debug_legitimate_address_p): Likewise.
16849         (rs6000_eliminate_indexed_memrefs): Likewise.
16850         (rs6000_emit_le_vsx_store): Likewise.
16851         (rs6000_emit_move_si_sf_subreg): Likewise.
16852         (rs6000_emit_move): Likewise.
16853         (register_to_reg_type): Likewise.
16854         (rs6000_pre_atomic_barrier): Likewise.
16855         (rs6000_machopic_legitimize_pic_address): Likewise.
16856         (rs6000_allocate_stack_temp): Likewise.
16857         (rs6000_address_for_fpconvert): Likewise.
16858         (rs6000_address_for_altivec): Likewise.
16859         (rs6000_secondary_memory_needed_rtx): Delete function.
16860         (rs6000_check_sdmode): Likewise.
16861         (rs6000_alloc_sdmode_stack_slot): Likewise.
16862         (rs6000_instantiate_decls): Likewise.
16863         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED_RTX): Delete.
16864         * config/rs6000/rs6000.md (splitter for *movsi_got_internal):
16865         Delete reload_in_progress.
16866         (*vec_reload_and_plus_<mptrsize>): Likewise.
16867         * config/rs6000/vsx.md (vsx_mul_v2di): Likewise.
16868         (vsx_div_v2di): Likewise.
16869         (vsx_udiv_v2di): Likewise.
16871 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
16873         * config/rs6000/rs6000.opt (mlra): Replace with stub.
16874         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete OPTION_MASK_LRA.
16875         * config/rs6000/rs6000.c (TARGET_LRA_P): Delete.
16876         (rs6000_debug_reg_global): Delete print of LRA status.
16877         (rs6000_option_override_internal): Delete dead LRA related code.
16878         (rs6000_lra_p): Delete function.
16879         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mlra.
16881 2017-07-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
16883         * config.gcc (riscv*-*-elf*): Add (riscv*-*-rtems*).
16884         * config/riscv/rtems.h: New file.
16886 2017-07-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16887             Sudakshina Das  <sudi.das@arm.com>
16889         * config/aarch64/aarch64.md
16890         (define_split for and<mode>3nr_compare): Move
16891         non aarch64_logical_operand to a register.
16892         (define_split for and_<SHIFT:optab><mode>3nr_compare0): Move non
16893         register immediate operand to a register.
16894         * config/aarch64/predicates.md (aarch64_mov_imm_operand): New.
16896 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
16898         PR middle-end/81564
16899         * tree-cfg.c (group_case_labels_stmt): Handle already deleted blocks.
16901 2017-07-27  Richard Biener  <rguenther@suse.de>
16903         PR tree-optimization/81573
16904         PR tree-optimization/81494
16905         * tree-vect-loop.c (vect_create_epilog_for_reduction): Handle
16906         multi defuse cycle case.
16908 2017-07-27  Richard Biener  <rguenther@suse.de>
16910         PR tree-optimization/81571
16911         * tree-vect-slp.c (vect_build_slp_tree): Properly verify reduction
16912         PHIs.
16914 2017-07-27  Eric Botcazou  <ebotcazou@adacore.com>
16916         * config/sparc/sparc.c (sparc_option_override): Set MASK_FSMULD flag
16917         earlier and only if MASK_FPU is set.  Adjust formatting.
16919 2017-07-27  Martin Liska  <mliska@suse.cz>
16921         * opt-functions.awk: Add validation of value of Init.
16922         * optc-gen.awk: Pass new argument.
16924 2017-07-27  Martin Liska  <mliska@suse.cz>
16926         * auto-profile.c (autofdo_source_profile::update_inlined_ind_target):
16927         Fix wrong condition.
16929 2017-07-27  Martin Liska  <mliska@suse.cz>
16931         * auto-profile.c (afdo_annotate_cfg): Assign zero counts to
16932         BBs and edges seen by autoFDO.
16934 2017-07-27  Richard Biener  <rguenther@suse.de>
16936         PR tree-optimization/81502
16937         * tree-ssa.c (non_rewritable_lvalue_p): Handle BIT_INSERT_EXPR
16938         with incompatible but same sized type.
16939         (execute_update_addresses_taken): Likewise.
16941 2017-07-27  James Greenhalgh  <james.greenhalgh@arm.com>
16943         * tree-ssa-loop-ch.c (pass_ch::process_loop_p): Guard on
16944         flag_tree_loop_vectorize rather than flag_tree_vectorize.
16946 2017-07-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16948         PR target/81534
16949         * config/s390/s390.md ("*atomic_compare_and_swap<mode>_1")
16950         ("*atomic_compare_and_swapdi_2", "*atomic_compare_and_swapsi_3"):
16951         Change s_operand to memory_operand.
16953 2017-07-27  Richard Sandiford  <richard.sandiford@linaro.org>
16955         * config/rs6000/rs6000-protos.h (rs6000_emit_le_vsx_permute): Declare.
16956         * config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Replace with...
16957         (rs6000_emit_le_vsx_permute): ...this.  Take the destination as input.
16958         Emit instructions rather than returning an expression.  Handle TFmode
16959         and KFmode by casting to TImode.
16960         (rs6000_emit_le_vsx_load): Update to use rs6000_emit_le_vsx_permute.
16961         (rs6000_emit_le_vsx_store): Likewise.
16962         * config/rs6000/vsx.md (VSX_TI): New iterator.
16963         (*vsx_le_permute_<mode>): Use it instead of VSX_LE_128.
16964         (*vsx_le_undo_permute_<mode>): Likewise.
16965         (*vsx_le_perm_load_<mode>): Use rs6000_emit_le_vsx_permute to
16966         emit the split sequence.
16967         (*vsx_le_perm_store_<mode>): Likewise.
16969 2017-07-27  Jakub Jelinek  <jakub@redhat.com>
16971         PR tree-optimization/81555
16972         PR tree-optimization/81556
16973         * tree-ssa-reassoc.c (rewrite_expr_tree): Add NEXT_CHANGED argument,
16974         if true, force CHANGED for the recursive invocation.
16975         (reassociate_bb): Remember original length of ops array, pass
16976         len != orig_len as NEXT_CHANGED in rewrite_expr_tree call.
16978         * attribs.c (decl_attributes): Imply noinline, noclone and no_icf
16979         attributes for noipa attribute.  For naked attribute use
16980         lookup_attribute first before lookup_attribute_spec.
16981         * final.c (rest_of_handle_final): Disable IPA RA for functions with
16982         noipa attribute.
16983         * ipa-visibility.c (non_local_p): Fix comment typos.  Return true
16984         for functions with noipa attribute.
16985         (cgraph_externally_visible_p): Return true for functions with noipa
16986         attribute.
16987         * cgraph.c (cgraph_node::get_availability): Return AVAIL_INTERPOSABLE
16988         for functions with noipa attribute.
16989         * doc/extend.texi: Document noipa function attribute.
16990         * tree-ssa-structalias.c (refered_from_nonlocal_fn): Set *nonlocal_p
16991         also for functions with noipa attribute.
16992         (ipa_pta_execute): Set nonlocal_p also for nodes with noipa attribute.
16994 2017-07-26  Andrew Pinski  <apinski@cavium.com>
16996         * config/aarch64/aarch64.c (thunderx_vector_cost): Decrease cost of
16997         vec_unalign_load_cost and vec_unalign_store_cost.
16999 2017-07-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
17001         * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Delete
17002         -mvsx-small-integer option.
17003         (ISA_3_0_MASKS_IEEE): Likewise.
17004         (OTHER_VSX_VECTOR_MASKS): Likewise.
17005         (POWERPC_MASKS): Likewise.
17006         * config/rs6000/rs6000.opt (-mvsx-small-integer): Likewise.
17007         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Simplify
17008         code, only testing for DImode being allowed in non-VSX floating
17009         point registers.
17010         (rs6000_init_hard_regno_mode_ok): Change TARGET_VSX_SMALL_INTEGER
17011         to TARGET_P8_VECTOR test.  Remove redundant VSX test inside of
17012         another VSX test.
17013         (rs6000_option_override_internal): Delete -mvsx-small-integer.
17014         (rs6000_expand_vector_set): Change TARGET_VSX_SMALL_INTEGER to
17015         TARGET_P8_VECTOR test.
17016         (rs6000_secondary_reload_simple_move): Likewise.
17017         (rs6000_preferred_reload_class): Delete TARGET_VSX_SMALL_INTEGER,
17018         since TARGET_P9_VECTOR was already tested.
17019         (rs6000_opt_masks): Remove -mvsx-small-integer.
17020         * config/rs6000/vsx.md (vsx_extract_<mode>): Delete
17021         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
17022         used.
17023         (vsx_extract_<mode>_p9): Delete TARGET_VSX_SMALL_INTEGER, since a
17024         test for TARGET_VEXTRACTUB was used, and that uses
17025         TARGET_P9_VECTOR.
17026         (p9 extract splitter): Likewise.
17027         (vsx_extract_<mode>_di_p9): Likewise.
17028         (vsx_extract_<mode>_store_p9): Likewise.
17029         (vsx_extract_si): Delete TARGET_VSX_SMALL_INTEGER, since a test
17030         for TARGET_P9_VECTOR was used.  Delete code that is now dead with
17031         the elimination of TARGET_VSX_SMALL_INTEGER.
17032         (vsx_extract_<mode>_p8): Likewise.
17033         (vsx_ext_<VSX_EXTRACT_I:VS_scalar>_fl_<FL_CONV:mode>): Likewise.
17034         (vsx_ext_<VSX_EXTRACT_I:VS_scalar>_ufl_<FL_CONV:mode>): Likewise.
17035         (vsx_set_<mode>_p9): Likewise.
17036         (vsx_set_v4sf_p9): Likewise.
17037         (vsx_set_v4sf_p9_zero): Likewise.
17038         (vsx_insert_extract_v4sf_p9): Likewise.
17039         (vsx_insert_extract_v4sf_p9_2): Likewise.
17040         * config/rs6000/rs6000.md (sign extend splitter): Change
17041         TARGET_VSX_SMALL_INTEGER to TARGET_P8_VECTOR test.
17042         (floatsi<mode>2_lfiwax_mem): Likewise.
17043         (floatunssi<mode>2_lfiwzx_mem): Likewise.
17044         (float<QHI:mode><FP_ISA3:mode>2): Delete TARGET_VSX_SMALL_INTEGER,
17045         since a test for TARGET_P9_VECTOR was used.
17046         (float<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
17047         (floatuns<QHI:mode><FP_ISA3:mode>2): Likewise.
17048         (floatuns<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
17049         (fix_trunc<mode>si2): Change TARGET_VSX_SMALL_INTEGER to
17050         TARGET_P8_VECTOR test.
17051         (fix_trunc<mode>si2_stfiwx): Likewise.
17052         (fix_trunc<mode>si2_internal): Likewise.
17053         (fix_trunc<SFDF:mode><QHI:mode>2): Delete
17054         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
17055         used.
17056         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
17057         (fixuns_trunc<mode>si2): Change TARGET_VSX_SMALL_INTEGER to
17058         TARGET_P8_VECTOR test.
17059         (fixuns_trunc<mode>si2_stfiwx): Likewise.
17060         (fixuns_trunc<SFDF:mode><QHI:mode>2): Delete
17061         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
17062         used.
17063         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
17064         (fctiw<u>z_<mode>_smallint): Delete TARGET_VSX_SMALL_INTEGER,
17065         since a test for TARGET_P9_VECTOR was used.
17066         (splitter for loading small constants): Likewise.
17068 2017-07-26  Andrew Pinski  <apinski@cavium.com>
17070         * config/aarch64/aarch64.c (thunderx_vector_cost): Fix
17071         vec_fp_stmt_cost.
17073 2017-07-26  H.J. Lu  <hongjiu.lu@intel.com>
17075         PR target/81563
17076         * config/i386/i386.c (sp_valid_at): Properly check CFA offset.
17077         (fp_valid_at): Likewise.
17079 2017-07-26  James Greenhalgh  <james.greenhalgh@arm.com>
17081         * config/aarch64/aarch64.c (cortexa57_addrcost_table): Remove.
17082         (qdf24xx_addrcost_table): Likewise.
17083         (cortexa57_tunings): Update to use generic_branch_cost.
17084         (cortexa72_tunings): Likewise.
17085         (cortexa73_tunings): Likewise.
17086         (qdf24xx_tunings): Likewise.
17088 2017-07-26  James Greenhalgh  <james.greenhalgh@arm.com>
17090         * config/aarch64/aarch64.c (cortexa57_branch_cost): Remove.
17091         (thunderx2t99_branch_cost): Likewise.
17092         (cortexa35_tunings): Update to use generic_branch_cost.
17093         (cortexa53_tunings): Likewise.
17094         (cortexa57_tunings): Likewise.
17095         (cortexa72_tunings): Likewise.
17096         (cortexa73_tunings): Likewise.
17097         (thunderx2t99_tunings): Likewise.
17099 2017-07-26  Sebastian Huber  <sebastian.huber@embedded-brains.de>
17101         * config/sparc/sparc.c (dump_target_flag_bits): Dump MASK_FSMULD.
17102         (sparc_option_override): Honour MASK_FSMULD.
17103         * config/sparc/sparc.h (MASK_FEATURES): Add MASK_FSMULD.
17104         * config/sparc/sparc.md (muldf3_extend): Use TARGET_FSMULD.
17105         * config/sparc/sparc.opt (mfsmuld): New option.
17106         * doc/invoke.texi (mfsmuld): Document option.
17108 2017-07-26  Marek Polacek  <polacek@redhat.com>
17110         PR middle-end/70992
17111         * tree.c (build2_stat): Don't set TREE_CONSTANT on divisions by zero.
17113 2017-07-26  Richard Biener  <rguenther@suse.de>
17115         * gimple-match-head.c (do_valueize): Return OP if valueize
17116         returns NULL_TREE.
17117         (get_def): New helper to get at the def stmt of a SSA name
17118         if valueize allows.
17119         * genmatch.c (dt_node::gen_kids_1): Use get_def instead of
17120         do_valueize to get at the def stmt.
17121         (dt_operand::gen_gimple_expr): Simplify do_valueize calls.
17123 2017-07-26  Wilco Dijkstra  <wdijkstr@arm.com>
17125         PR middle-end/46932
17126         * auto-inc-dec.c (parse_add_or_inc): Block autoinc on sfp.
17128 2017-07-26  Martin Liska  <mliska@suse.cz>
17130         PR sanitize/81186
17131         * function.c (expand_function_start): Make expansion of
17132         nonlocal_goto_save_area after parm_birth_insn.
17134 2017-07-26  Sebastian Huber  <sebastian.huber@embedded-brains.de>
17136         * config/sparc/sparc.c (sparc_option_override): Remove MASK_FPU
17137         from all CPU target flags enable members.
17139 2017-07-26  Richard Biener  <rguenther@suse.de>
17141         * genmatch.c (dt_simplify::gen): Make iterator vars const.
17142         (decision_tree::gen): Make 'type' const.
17143         (write_predicate): Likewise.
17145 2017-07-24  Michael Meissner  <meissner@linux.vnet.ibm.com>
17147         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok):
17148         Eliminate TARGET_UPPER_REGS_{DF,DI,SF} usage.
17149         (rs6000_option_override_internal): Likewise.
17150         (rs6000_expand_vector_set): Likewise.
17151         * config/rs6000/rs6000.h (TARGET_UPPER_REGS_DF): Delete.
17152         (TARGET_UPPER_REGS_SF): Likewise.
17153         (TARGET_UPPER_REGS_DI): Likewise.
17154         (TARGET_VEXTRACTUB): Eliminate TARGET_UPPER_REGS_{DF,DI,SF}.
17155         (TARGET_DIRECT_MOVE_64BIT): Likewise.
17156         * config/rs6000/rs6000.md (ALTIVEC_DFORM): Likewise.
17157         (float<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
17158         (Splitters for DI constants in Altivec registers): Likewise.
17159         * config/rs6000/vsx.md (vsx_set_<mode>_p9): Likewise.
17160         (vsx_set_v4sf_p9): Likewise.
17161         (vsx_set_v4sf_p9_zero): Likewise.
17162         (vsx_insert_extract_v4sf_p9): Likewise.
17163         (vsx_insert_extract_v4sf_p9_2): Likewise.
17165 2017-07-25  Carl Love  <cel@us.ibm.com>
17167         * doc/extend.texi: Update the built-in documentation file for the
17168         existing built-in functions
17169         vector signed char vec_cnttz (vector signed char);
17170         vector unsigned char vec_cnttz (vector unsigned char);
17171         vector signed short vec_cnttz (vector signed short);
17172         vector unsigned short vec_cnttz (vector unsigned short);
17173         vector signed int vec_cnttz (vector signed int);
17174         vector unsigned int vec_cnttz (vector unsigned int);
17175         vector signed long long vec_cnttz (vector signed long long);
17176         vector unsigned long long vec_cnttz (vector unsigned long long);
17178 2017-07-25  Andrew Pinski  <apinski@cavium.com>
17180         * tree-ssa-uninit.c (warn_uninitialized_vars): Don't warn about memory
17181         accesses where the use is for the first operand of a BIT_INSERT.
17183 2017-07-25  Jim Wilson  <jim.wilson@linaro.org>
17185         PR bootstrap/81521
17186         * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
17187         for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
17189 2017-07-25  Jim Wilson  <jim.wilson@linaro.org>
17191         * config/i386/gstabs.h: Delete.
17192         * config/i386/openbsd.h, config/i386/t-openbsd: Likewise.
17194 2017-07-25  Uros Bizjak  <ubizjak@gmail.com>
17196         * config/i386/i386.c (ix86_decompose_address): Do not check for
17197         register RTX when looking at index_reg or base_reg.
17198         * config/i386/i386.h (INCOMING_RETURN_ADDR_RTX): Use stack_pointer_rtx.
17200 2017-07-25  Eric Botcazou  <ebotcazou@adacore.com>
17202         * gimple.c (gimple_assign_set_rhs_with_ops): Do not ask gsi_replace
17203         to update EH info here.
17205 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
17207         * match.pd ((X * CST1) * CST2): Simplify to X * (CST1 * CST2).
17209 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
17211         * match.pd ((X * CST) * Y): Reassociate to (X * Y) * CST.
17213 2017-07-25  Torsten Duwe  <duwe@suse.de>
17215         * common.opt: Introduce -fpatchable-function-entry
17216         command line option, and its variables function_entry_patch_area_size
17217         and function_entry_patch_area_start.
17218         * opts.c (common_handle_option): Add -fpatchable_function_entry_ case,
17219         including a two-value parser.
17220         * target.def (print_patchable_function_entry): New target hook.
17221         * targhooks.h (default_print_patchable_function_entry): New function.
17222         * targhooks.c (default_print_patchable_function_entry): Likewise.
17223         * toplev.c (process_options): Switch off IPA-RA if
17224         patchable function entries are being generated.
17225         * varasm.c (assemble_start_function): Look at the
17226         patchable-function-entry command line switch and current
17227         function attributes and maybe generate NOP instructions by
17228         calling the print_patchable_function_entry hook.
17229         * doc/extend.texi: Document patchable_function_entry attribute.
17230         * doc/invoke.texi: Document -fpatchable_function_entry
17231         command line option.
17232         * doc/tm.texi.in (TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY):
17233         New target hook.
17234         * doc/tm.texi: Re-generate.
17236 2017-07-25  Jakub Jelinek  <jakub@redhat.com>
17238         PR target/81532
17239         * config/i386/constraints.md (Yd, Ye): Use ALL_SSE_REGS for
17240         TARGET_AVX512DQ rather than TARGET_AVX512BW.
17242 2017-07-25  Tamar Christina  <tamar.christina@arm.com>
17244         * config/arm/parsecpu.awk (all_cores): Remove duplicates.
17246 2017-07-25  Richard Biener  <rguenther@suse.de>
17248         PR tree-optimization/81455
17249         * tree-ssa-loop-unswitch.c (find_loop_guard): Make sure to
17250         not walk in cycles when looking for guards.
17252 2017-07-25  Richard Biener  <rguenther@suse.de>
17254         PR tree-optimization/81529
17255         * tree-vect-stmts.c (process_use): Disregard live induction PHIs
17256         when optimizing backedge uses.
17258 2017-07-25  David Edelsohn  <dje.gcc@gmail.com>
17260         * dwarf2asm.c (dw2_asm_output_nstring): Encode double quote
17261         character for AIX.
17262         * dwarf2out.c (output_macinfo): Copy debug_line_section_label
17263         to dl_section_ref.  On AIX, append an expression to subtract
17264         the size of the section length to dl_section_ref.
17266 2017-07-25  Segher Boessenkool  <segher@kernel.crashing.org>
17268         * configure.ac: If any of the config.* scripts fail, exit 1.
17269         * configure: Regenerate.
17271 2017-07-25  Richard Biener  <rguenther@suse.de>
17273         PR middle-end/81546
17274         * tree-ssa-operands.c (verify_imm_links): Remove cap on number
17275         of immediate uses, be more verbose on errors.
17277 2017-07-25  Richard Biener  <rguenther@suse.de>
17279         PR tree-optimization/81510
17280         * tree-vect-loop.c (vect_is_simple_reduction): When the
17281         reduction stmt is not inside the loop bail out.
17283 2017-07-25  Richard Biener  <rguenther@suse.de>
17285         PR tree-optimization/81303
17286         * tree-vect-loop-manip.c (vect_loop_versioning): Build
17287         profitability check against LOOP_VINFO_NITERSM1.
17289 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
17291         * domwalk.c (cmp_bb_postorder): Simplify.
17292         (sort_bbs_postorder): New function.  Use it...
17293         (dom_walker::walk): ...here to optimize common cases.
17295 2017-07-25  Martin Liska  <mliska@suse.cz>
17297         PR ipa/81520
17298         * ipa-visibility.c (function_and_variable_visibility): Make the
17299         redirection just on target that supports aliasing.
17300         Fix GNU coding style.
17302 2017-07-25  Sebastian Huber  <sebastian.huber@embedded-brains.de>
17304         PR libgcc/61152
17305         * config/aarch64/rtems.h: Add GCC Runtime Library Exception.
17306         Format changes.
17307         * config/arm/rtems.h: Likewise.
17308         * config/bfin/rtems.h: Likewise.
17309         * config/i386/rtemself.h: Likewise.
17310         * config/lm32/rtems.h: Likewise.
17311         * config/m32c/rtems.h: Likewise.
17312         * config/m68k/rtemself.h: Likewise.
17313         * config/microblaze/rtems.h: Likewise.
17314         * config/mips/rtems.h: Likewise.
17315         * config/moxie/rtems.h: Likewise.
17316         * config/nios2/rtems.h: Likewise.
17317         * config/powerpcspe/rtems.h: Likewise.
17318         * config/rs6000/rtems.h: Likewise.
17319         * config/rtems.h: Likewise.
17320         * config/sh/rtems.h: Likewise.
17321         * config/sh/rtemself.h: Likewise.
17322         * config/sparc/rtemself.h: Likewise.
17324 2017-07-25  Georg-Johann Lay  <avr@gjlay.de>
17326         PR 81487
17327         * hsa-brig.c (brig_init): Use xasprintf instead of asprintf.
17328         * gimple-pretty-print.c (dump_profile, dump_probability): Same.
17329         * tree-ssa-structalias.c (alias_get_name): Same.
17331 2017-07-25  Bin Cheng  <bin.cheng@arm.com>
17333         PR target/81414
17334         * config/aarch64/cortex-a57-fma-steering.c (analyze): Skip fmul/fmac
17335         instructions if no du chain is found.
17337 2017-07-25  Georg-Johann Lay  <avr@gjlay.de>
17339         * config/avr/avr-log.c (avr_log_vadump) ['T']: Print NULL-TREE.
17341 2017-07-25  Richard Biener  <rguenther@suse.de>
17343         PR middle-end/81505
17344         * fold-const.c (fold_negate_const): TREE_OVERFLOW should be
17345         sticky.
17347 2017-07-24  Michael Meissner  <meissner@linux.vnet.ibm.com>
17349         * config/rs6000/rs6000-cpus.def (ISA_2_6_MASKS_SERVER): Delete
17350         upper-regs options.
17351         (ISA_2_7_MASKS_SERVER): Likewise.
17352         (ISA_3_0_MASKS_IEEE): Likewise.
17353         (OTHER_P8_VECTOR_MASKS): Likewise.
17354         (OTHER_VSX_VECTOR_MASKS): Likewise.
17355         (POWERPC_MASKS): Likewise.
17356         (power7 cpu): Use ISA_2_6_MASKS_SERVER instead of using a
17357         duplicate list of options.
17358         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove
17359         explicit -mupper-regs options.
17360         * config/rs6000/rs6000.opt (-mvsx-scalar-memory): Delete
17361         -mupper-regs* options.  Delete -mvsx-scalar-memory, which was an
17362         alias for -mupper-regs-df.
17363         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
17364         (rs6000_init_hard_regno_mode_ok): Likewise.
17365         (rs6000_option_override_internal): Likewise.
17366         (rs6000_opt_masks): Likewise.
17367         * config/rs6000/rs6000.h (TARGET_UPPER_REGS_DF): Define upper regs
17368         options in terms of whether -mvsx or -mpower8-vector was used.
17369         (TARGET_UPPER_REGS_DI): Likewise.
17370         (TARGET_UPPER_REGS_SF): Likewise.
17371         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete the
17372         -mupper-regs-* options.
17374 2017-07-24  Segher Boessenkool  <segher@kernel.crashing.org>
17376         * passes.c (emergency_dump_function): Print some empty lines and a
17377         header before the RTL dump.
17379 2017-07-24  Segher Boessenkool  <segher@kernel.crashing.org>
17381         * cfgrtl.c (rtl_dump_bb): Don't call NEXT_INSN on NULL.
17383 2017-07-24  Wilco Dijkstra  <wdijkstr@arm.com>
17385         PR target/79041
17386         * config/aarch64/aarch64.c (aarch64_classify_symbol):
17387         Avoid SYMBOL_SMALL_ABSOLUTE for literals with pc-relative literals.
17389 2017-07-24  Carl Love  <cel@us.ibm.com>
17391         * config/rs6000/rs6000-c.c: Add support for built-in functions
17392         vector float vec_extract_fp32_from_shorth (vector unsigned short);
17393         vector float vec_extract_fp32_from_shortl (vector unsigned short);
17394         * config/rs6000/altivec.h (vec_extract_fp_from_shorth,
17395         vec_extract_fp_from_shortl): Add defines for the two builtins.
17396         * config/rs6000/rs6000-builtin.def (VEXTRACT_FP_FROM_SHORTH,
17397         VEXTRACT_FP_FROM_SHORTL): Add BU_P9V_OVERLOAD_1 and BU_P9V_VSX_1
17398         new builtins.
17399         * config/rs6000/vsx.md vsx_xvcvhpsp): Add define_insn.
17400         (vextract_fp_from_shorth, vextract_fp_from_shortl): Add define_expands.
17401         * doc/extend.texi: Update the built-in documentation file for the
17402         new built-in function.
17404 2017-07-24  Jakub Jelinek  <jakub@redhat.com>
17406         PR bootstrap/81521
17407         * tree.def: Remove TYPE_METHODS documentation, adjust TYPE_FIELDS
17408         documentation.
17409         * doc/generic.texi: Likewise.
17410         * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
17411         for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
17413 2017-07-24  Jackson Woodruff  <jackson.woodruff@arm.com>
17415         * config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): New.
17416         (aarch64_mls_elt_merge<mode>): Likewise.
17418 2017-07-23  Krister Walfridsson  <krister.walfridsson@gmail.com>
17420         * config.gcc (*-*-netbsd*): Remove check for NetBSD versions not
17421         having __cxa_atexit.
17423 2017-07-23  Michael Collison  <michael.collison@arm.com>
17425         * config/arm/arm.c (arm_option_override): Deprecate
17426         use of -mstructure-size-boundary.
17427         * config/arm/arm.opt: Deprecate -mstructure-size-boundary.
17428         * doc/invoke.texi: Deprecate -mstructure-size-boundary.
17430 2017-07-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17432         PR target/80695
17433         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
17434         Reduce cost estimate for direct moves.
17436 2017-07-23  Uros Bizjak  <ubizjak@gmail.com>
17438         PR target/80569
17439         * config/i386/i386.c (ix86_option_override_internal): Disable
17440         BMI, BMI2 and TBM instructions for -m16.
17442 2017-07-21  Carl Love  <cel@us.ibm.com>
17444         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
17445         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
17446         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
17447         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
17448         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
17449         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
17450         VMULOSW): New enum "unspec" values.
17451         (altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
17452         altivec_vmulosw): New patterns.
17453         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
17454         VMULOSW): Add definitions.
17456 2017-07-21  Jim Wilson  <jim.wilson@linaro.org>
17458         * config/aarch64/aarch64-cores.def (falkor): Add AARCH64_FL_RDMA.
17459         (qdf24xx): Likewise.
17460         * config/aarch64/aarch64-options-extensions.def (rdma); New.
17461         * config/aarch64/aarch64.h (AARCH64_FL_RDMA): New.
17462         (AARCH64_FL_V8_1): Renumber.
17463         (AARCH64_FL_FOR_ARCH8_1): Add AARCH64_FL_RDMA.
17464         (AARCH64_ISA_RDMA): Use AARCH64_FL_RDMA.
17465         * config/aarch64/arm_neon.h: Use +rdma instead of arch=armv8.1-a.
17466         * doc/invoke.texi (AArch64 Options): Mention +rmda in -march docs.  Add
17467         rdma to feature modifiers list.
17469 2017-07-21  Yury Gribov  <tetra2005@gmail.com>
17471         PR middle-end/56727
17472         * ipa-visibility (function_and_variable_visibility): Convert
17473         recursive PLT call to direct call if appropriate.
17475 2017-07-21  Andrew Pinski  <apinski@cavium.com>
17477         * tree-ssa-sccvn.c (vn_nary_op_eq): Check BIT_INSERT_EXPR's
17478         operand 1 to see if the types precision matches.
17479         * fold-const.c (operand_equal_p): Likewise.
17481 2017-07-21  Richard Biener  <rguenther@suse.de>
17483         PR tree-optimization/81303
17484         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Pass
17485         in datarefs vector.  Allow NULL dr0 for no peeling cost estimate.
17486         (vect_peeling_hash_get_lowest_cost): Adjust.
17487         (vect_enhance_data_refs_alignment): Likewise.  Use
17488         vect_get_peeling_costs_all_drs to compute the penalty for no
17489         peeling to match up costs.
17491 2017-07-21  Richard Biener  <rguenther@suse.de>
17493         PR tree-optimization/81500
17494         * tree-vect-loop.c (vect_is_simple_reduction): Properly fail if
17495         we didn't identify a reduction path.
17497 2017-07-21  Tom de Vries  <tom@codesourcery.com>
17498             Cesar Philippidis  <cesar@codesourcery.com>
17500         PR gcov-profile/81442
17501         * config/nvptx/nvptx.c (nvptx_goacc_reduction_init): Add missing edge
17502         probabilities.
17504 2017-07-21  Tom de Vries  <tom@codesourcery.com>
17506         PR lto/81430
17507         * config/nvptx/nvptx.c (nvptx_override_options_after_change): New
17508         function.
17509         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define to
17510         nvptx_override_options_after_change.
17512 2017-07-21  Ulrich Drepper  <drepper@redhat.com>
17514         * dwarf2out.c (output_file_names): Avoid double testing for
17515         dwarf_version >= 5.
17517 2017-07-21  Georg-Johann Lay  <avr@gjlay.de>
17519         * doc/invoke.texi (AVR Built-in Functions): Re-layout section.
17521 2016-07-21  Jan Hubicka  <hubicka@ucw.cz>
17523         * cfgcleanup.c (flow_find_cross_jump): Do not crossjump across
17524         hot/cold regions.
17525         (try_crossjump_to_edge): Do not punt on partitioned functions.
17527 2016-07-21  Jan Hubicka  <hubicka@ucw.cz>
17529         * bb-reorder.c (find_rarely_executed_basic_blocks_and_crossing_edges):
17530         Put all BBs reachable only via paths crossing cold region to cold
17531         region.
17532         * cfgrtl.c (find_bbs_reachable_by_hot_paths): New function.
17534 2016-07-21  Richard Biener  <rguenther@suse.de>
17536         PR tree-optimization/81303
17537         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Take
17538         into account prologue and epilogue iterations when raising
17539         min_profitable_iters to sth at least covering one vector iteration.
17541 2017-07-21  Tamar Christina  <tamar.christina@arm.com>
17543         * config/arm/arm.c (arm_test_cpu_arch_dat):
17544         Check for overlap.
17546 2017-07-20  Nathan Sidwell  <nathan@acm.org>
17548         Remove TYPE_METHODS.
17549         * tree.h (TYPE_METHODS): Delete.
17550         * dwarf2out.c (gen_member_die): Member fns are on TYPE_FIELDS.
17551         * dbxout.c (dbxout_type_fields): Ignore FUNCTION_DECLs.
17552         (dbxout_type_methods): Scan TYPE_FIELDS.
17553         (dbxout_type): Don't check TYPE_METHODS here.
17554         * function.c (use_register_for_decl): Always ignore register for
17555         class types when not optimizing.
17556         * ipa-devirt.c (odr_types_equivalent_p): Delete TYPE_METHODS scan.
17557         * tree.c (free_lang_data_in_type): Stitch out member functions and
17558         templates from TYPE_FIELDS.
17559         (build_distinct_type_copy, verify_type_variant,
17560         verify_type): Member fns are on TYPE_FIELDS.
17561         * tree-dump.c (dequeue_and_dump): No TYPE_METHODS.
17562         * tree-pretty-print.c (dump_generic_node): Likewise.
17564 2017-07-20  Jakub Jelinek  <jakub@redhat.com>
17566         PR target/80846
17567         * config/i386/i386.c (ix86_expand_vector_init_general): Handle
17568         V2TImode and V4TImode.
17569         (ix86_expand_vector_extract): Likewise.
17570         * config/i386/sse.md (VMOVE): Enable V4TImode even for just
17571         TARGET_AVX512F, instead of only for TARGET_AVX512BW.
17572         (ssescalarmode): Handle V4TImode and V2TImode.
17573         (VEC_EXTRACT_MODE): Add V4TImode and V2TImode.
17574         (*vec_extractv2ti, *vec_extractv4ti): New insns.
17575         (VEXTRACTI128_MODE): New mode iterator.
17576         (splitter for *vec_extractv?ti first element): New.
17577         (VEC_INIT_MODE): New mode iterator.
17578         (vec_init<mode>): Consolidate 3 expanders into one using
17579         VEC_INIT_MODE mode iterator.
17581 2017-07-20  Alexander Monakov  <amonakov@ispras.ru>
17583         * lra-assigns.c (pseudo_compare_func): Fix comparison step based on
17584         non_spilled_static_chain_regno_p.
17586 2017-07-20  Alexander Monakov  <amonakov@ispras.ru>
17588         * gimple-ssa-store-merging.c (sort_by_bitpos): Return 0 on equal bitpos.
17590 2017-07-20  Jan Hubicka  <hubicka@ucw.cz>
17592         * bb-reorder.c (connect_traces): Allow copying of blocks within
17593         single partition.
17595 2017-07-20  Richard Biener  <rguenther@suse.de>
17597         * gimple.h (gimple_phi_result): Add gphi * overload.
17598         (gimple_phi_result_ptr): Likewise.
17599         (gimple_phi_arg): Likewise.  Adjust index assert to only
17600         allow actual argument accesses rather than all slots available
17601         by capacity.
17602         (gimple_phi_arg_def): Add gphi * overload.
17603         * tree-phinodes.c (make_phi_node): Initialize only actual
17604         arguments.
17605         (resize_phi_node): Clear memory not covered by old node,
17606         do not initialize excess argument slots.
17607         (reserve_phi_args_for_new_edge): Initialize new argument slot
17608         completely.
17610 2017-07-20  Bin Cheng  <bin.cheng@arm.com>
17612         PR tree-optimization/81388
17613         Revert r238585:
17614         2016-07-21  Bin Cheng  <bin.cheng@arm.com>
17616         * tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Clean up
17617         by removing computation of may_be_zero.
17619 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
17620             Tom de Vries  <tom@codesourcery.com>
17622         PR middle-end/81030
17623         * cfgbuild.c (find_many_sub_basic_blocks): Update REG_BR_PROB note
17624         when gimple level profile disagrees with what RTL expander did.
17626 2017-07-20  Richard Biener  <rguenther@suse.de>
17628         PR tree-optimization/61171
17629         * tree-vectorizer.h (slp_instance): Add reduc_phis member.
17630         (vect_analyze_stmt): Add slp instance parameter.
17631         (vectorizable_reduction): Likewise.
17632         * tree-vect-loop.c (vect_analyze_loop_operations): Adjust.
17633         (vect_is_simple_reduction): Deal with chains not detected
17634         as SLP reduction chain, specifically not properly associated
17635         chains containing a mix of plus/minus.
17636         (get_reduction_op): Remove.
17637         (get_initial_defs_for_reduction): Simplify, pass in whether
17638         this is a reduction chain, pass in the SLP node for the PHIs.
17639         (vect_create_epilog_for_reduction): Get the SLP instance as
17640         arg and adjust.
17641         (vectorizable_reduction): Get the SLP instance as arg.
17642         During analysis remember the SLP node with the PHIs in the
17643         instance.  Simplify getting at the vectorized reduction PHIs.
17644         * tree-vect-slp.c (vect_slp_analyze_node_operations): Pass
17645         through SLP instance.
17646         (vect_slp_analyze_operations): Likewise.
17647         * tree-vect-stms.c (vect_analyze_stmt): Likewise.
17648         (vect_transform_stmt): Likewise.
17650 2017-07-20  Tom de Vries  <tom@codesourcery.com>
17652         PR tree-optimization/81489
17653         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Move
17654         read of phi arg location to before loop that modifies phi.
17656 2017-07-20  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
17658         * match.pd (((m1 >/</>=/<= m2) * d -> (m1 >/</>=/<= m2) ? d : 0):
17659         New pattern.
17661 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
17663         PR middle-end/81331
17664         * except.c (execute): Fix ordering issue.
17666 2018-07-19  Segher Boessenkool  <segher@kernel.crashing.org>
17668         PR rtl-optimization/81423
17669         * combine.c (make_compound_operation_int): Don't try to optimize
17670         the AND of a SUBREG of an LSHIFTRT if that SUBREG is paradoxical.
17672 2017-07-19  Segher Boessenkool  <segher@kernel.crashing.org>
17674         PR rtl-optimization/81423
17675         * simplify-rtx.c (simplify_truncation): Handle truncating an IOR
17676         with a constant that is -1 in the truncated to mode.
17678 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
17680         * predict.c (propagate_unlikely_bbs_forward): Break out from ...
17681         (determine_unlikely_bbs): ... here.
17682         * predict.h (propagate_unlikely_bbs_forward): Declare.
17683         * cfgexpand.c (pass_expand::execute): Use it.
17684         * bb-reorder.c (sanitize_hot_paths): Do not consider known to be
17685         unlikely edges.
17686         (find_rarely_executed_basic_blocks_and_crossing_edges): Use
17687         propagate_unlikely_bbs_forward.
17689 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
17691         PR middle-end/81331
17692         * except.c (maybe_add_nop_after_section_switch): New function.
17693         (execute): Use it.
17695 2017-07-19  Tom de Vries  <tom@codesourcery.com>
17697         * gimple.h (gimple_phi_set_arg): Make assert more strict.
17699 2017-07-19  Tom de Vries  <tom@codesourcery.com>
17701         * gimple.h (gimple_phi_arg): Make assert more strict.
17703 2017-07-19  Steven Munroe  <munroesj@gcc.gnu.org>
17705         * config.gcc (powerpc*-*-*): Add mmintrin.h.
17706         * config/rs6000/mmintrin.h: New file.
17707         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include mmintrin.h.
17709 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
17711         PR tree-optimization/81346
17712         * match.pd: Optimize (X - 1U) <= INT_MAX-1U into (int) X > 0.
17714 2017-07-19  Tom de Vries  <tom@codesourcery.com>
17716         * config/nvptx/nvptx.md (VECIM): Add V2DI.
17718 2017-07-19  Tom de Vries  <tom@codesourcery.com>
17720         * config/nvptx/nvptx-modes.def: Add V2DImode.
17721         * config/nvptx/nvptx-protos.h (nvptx_data_alignment): Declare.
17722         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2DImode.
17723         (nvptx_output_mov_insn): Handle lack of mov.b128.
17724         (nvptx_print_operand): Handle 'H' and 'L' codes.
17725         (nvptx_vector_mode_supported): Allow V2DImode.
17726         (nvptx_preferred_simd_mode): New function.
17727         (nvptx_data_alignment): New function.
17728         (TARGET_VECTORIZE_PREFERRED_SIMD_MODE): Redefine to
17729         nvptx_preferred_simd_mode.
17730         * config/nvptx/nvptx.h (STACK_BOUNDARY, BIGGEST_ALIGNMENT): Change from
17731         64 to 128 bits.
17732         (DATA_ALIGNMENT): Define.  Set to nvptx_data_alignment.
17734 2017-07-19  Tom de Vries  <tom@codesourcery.com>
17736         * config/nvptx/nvptx-modes.def: New file.  Add V2SImode.
17737         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2SImode.
17738         (nvptx_vector_mode_supported): New function.  Allow V2SImode.
17739         (TARGET_VECTOR_MODE_SUPPORTED_P): Redefine to nvptx_vector_mode_supported.
17740         * config/nvptx/nvptx.md (VECIM): New mode iterator. Add V2SI.
17741         (mov<VECIM>_insn): New define_insn.
17742         (define_expand "mov<VECIM>): New define_expand.
17744 2017-07-19  Tom de Vries  <tom@codesourcery.com>
17746         * config/nvptx/nvptx.c (nvptx_print_operand): Handle v2 vector mode.
17748 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
17750         PR tree-optimization/81346
17751         * fold-const.h (fold_div_compare, range_check_type): Declare.
17752         * fold-const.c (range_check_type): New function.
17753         (build_range_check): Use range_check_type.
17754         (fold_div_compare): No longer static, rewritten into
17755         a match.pd helper function.
17756         (fold_comparison): Don't call fold_div_compare here.
17757         * match.pd (X / C1 op C2): New optimization using fold_div_compare
17758         as helper function.
17760 2017-07-19  Nathan Sidwell  <nathan@acm.org>
17762         * tree.h (TYPE_MINVAL, TYPE_MAXVAL): Rename to ...
17763         (TYPE_MIN_VALUE_RAW, TYPE_MAX_VALUE_RAW): ... these.
17764         * tree.c (find_decls_types_r, verify_type): Use
17765         TYPE_{MIN,MAX}_VALUE_RAW.
17766         * lto-streamer-out.c (DFS::DFS_write_tree_body): Likewise.
17767         (hash_tree): Likewise.
17768         * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
17769         Likewise.
17770         * tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
17771         Likewise.
17773 2017-07-18  Tom de Vries  <tom@codesourcery.com>
17775         PR middle-end/81464
17776         * omp-expand.c (expand_omp_for_static_chunk): Handle
17777         equal-argument loop exit phi.
17779 2017-07-18  Uros Bizjak  <ubizjak@gmail.com>
17781         PR target/81471
17782         * config/i386/i386.md (rorx_immediate_operand): New mode attribute.
17783         (*bmi2_rorx<mode>3_1): Use rorx_immediate_operand as
17784         operand 2 predicate.
17785         (*bmi2_rorxsi3_1_zext): Use const_0_to_31_operand as
17786         operand 2 predicate.
17787         (ror,rol -> rorx splitters): Use const_int_operand as
17788         operand 2 predicate.
17790 2017-06-18  Richard Biener  <rguenther@suse.de>
17792         PR tree-optimization/81410
17793         * tree-vect-stmts.c (vectorizable_load): Properly adjust for
17794         the gap in the ! slp_perm SLP case after each group.
17796 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
17798         PR middle-end/81463
17799         * cfgloopmanip.c (scale_loop_profile): Watch out for zero frequency
17800         again.
17802 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
17804         PR middle-end/81462
17805         * predict.c (set_even_probabilities): Cleanup; do not affect
17806         probabilities that are already known.
17807         (combine_predictions_for_bb): Call even when count is set.
17809 2017-07-18  Nathan Sidwell  <nathan@acm.org>
17811         * tree-parloops.c (try_transform_to_exit_first_loop_alt): Use
17812         TYPE_MAX_VALUE.
17814 2017-07-18  Bin Cheng  <bin.cheng@arm.com>
17816         PR target/81408
17817         * tree-ssa-loop-niter.c (number_of_iterations_exit): Dump missed
17818         optimization for loop niter analysis.
17820 2017-07-18  Georg-Johann Lay  <avr@gjlay.de>
17822         PR target/81473
17823         * config/avr/avr.c (avr_optimize_casesi): Don't use
17824         INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX.
17826 2017-07-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
17828         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Remove
17829         body_cost_vec from _vect_peel_extended_info.
17830         (vect_peeling_hash_get_lowest_cost): Do not set body_cost_vec.
17831         (vect_peeling_hash_choose_best_peeling): Remove body_cost_vec and
17832         npeel.
17834 2017-07-18  Bin Cheng  <bin.cheng@arm.com>
17836         * config/arm/arm.c (emit_unlikely_jump): Remove unused var.
17838 2017-07-18  Richard Biener  <rguenther@suse.de>
17840         PR tree-optimization/80620
17841         PR tree-optimization/81403
17842         * tree-ssa-pre.c (phi_translate_1): Clear range and points-to
17843         info when re-using a VN table entry.
17845 2017-07-18  Richard Biener  <rguenther@suse.de>
17847         PR tree-optimization/81418
17848         * tree-vect-loop.c (vectorizable_reduction): Properly compute
17849         vectype_in.  Verify that with lane-reducing reduction operations
17850         we have a single def-use cycle.
17852 2017-07-17  Carl Love  <cel@us.ibm.com>
17854         Revert commit r249424   2017-06-20  Carl Love  <cel@us.ibm.com>
17856         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
17857         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
17858         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
17859         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
17860         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
17861         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
17862         VMULOSW): New enum "unspec" values.
17863         (vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
17864         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
17865         altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
17866         altivec_vmulosw): New patterns.
17867         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
17868         VMULOSW): Add definitions.
17869 2017-07-17  Uros Bizjak  <ubizjak@gmail.com>
17871         * config/alpha/alpha.c: Include predict.h.
17873 2017-07-17  Yury Gribov  <tetra2005@gmail.com>
17875         * tree-vrp.c (compare_assert_loc): Fix comparison function
17876         to return predictable results.
17878 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
17880         * config/arc/arc.md (adddi3): Remove support for mexpand-adddi
17881         option.
17882         (subdi3): Likewise.
17883         * config/arc/arc.opt (mexpand-adddi): Deprecate it.
17884         * doc/invoke.texi (mexpand-adddi): Update text.
17886 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
17888         * config/arc/arc.md (clzsi2): Expand to an arc_clzsi2 instruction
17889         that also clobbers the CC register. The old expand code is moved
17890         to ...
17891         (*arc_clzsi2): ... here.
17892         (ctzsi2): Expand to an arc_ctzsi2 instruction that also clobbers
17893         the CC register. The old expand code is moved to ...
17894         (arc_ctzsi2): ... here.
17896 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
17898         * config/arc/arc.opt (mindexed-loads): Use initial value
17899         TARGET_INDEXED_LOADS_DEFAULT.
17900         (mauto-modify-reg): Use initial value
17901         TARGET_AUTO_MODIFY_REG_DEFAULT.
17902         * config/arc/elf.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
17903         (TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
17904         * config/arc/linux.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
17905         (TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
17907 2017-07-17  Martin Liska  <mliska@suse.cz>
17909         PR sanitizer/81302
17910         * opts.c (finish_options): Do not allow -fgnu-tm
17911         w/ -fsanitize={kernel-,}address.  Say sorry.
17913 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
17915         PR target/81369
17916         * tree-loop-distribution.c (classify_partition): Only assert on
17917         numer of iterations.
17918         (merge_dep_scc_partitions): Delete prameter.  Update function call.
17919         (distribute_loop): Remove code handling loop with unknown niters.
17920         (pass_loop_distribution::execute): Skip loop with unknown niters.
17922 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
17924         PR target/81369
17925         * tree-loop-distribution.c (merge_dep_scc_partitions): Sink call to
17926         function sort_partitions_by_post_order.
17928 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
17930         PR tree-optimization/81374
17931         * tree-loop-distribution.c (pass_loop_distribution::execute): Record
17932         the max index of basic blocks, rather than number of basic blocks.
17934 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
17936         * config/arc/arc-protos.h (arc_legitimate_pc_offset_p): Remove
17937         proto.
17938         (arc_legitimate_pic_operand_p): Likewise.
17939         * config/arc/arc.c (arc_legitimate_pic_operand_p): Remove
17940         function.
17941         (arc_needs_pcl_p): Likewise.
17942         (arc_legitimate_pc_offset_p): Likewise.
17943         (arc_legitimate_pic_addr_p): Remove LABEL_REF case, as this
17944         function is also used in constrains.md.
17945         (arc_legitimate_constant_p): Use arc_legitimate_pic_addr_p to
17946         validate pic constants. Handle CONST_INT, CONST_DOUBLE, MINUS and
17947         PLUS.  Only return true/false in known cases, otherwise assert.
17948         (arc_legitimate_address_p): Remove arc_legitimate_pic_addr_p as it
17949         is already called in arc_legitimate_constant_p.
17950         * config/arc/arc.h (CONSTANT_ADDRESS_P): Consider also LABEL for
17951         pic addresses.
17952         (LEGITIMATE_PIC_OPERAND_P): Use
17953         arc_raw_symbolic_reference_mentioned_p function.
17954         * config/arc/constraints.md (Cpc): Use arc_legitimate_pic_addr_p
17955         function.
17956         (Cal): Likewise.
17957         (C32): Likewise.
17959 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
17960         Andrew Burgess  <andrew.burgess@embecosm.com>
17962         * config/arc/arc-protos.h (arc_compute_function_type): Change prototype.
17963         (arc_return_address_register): New function.
17964         * config/arc/arc.c (arc_handle_fndecl_attribute): New function.
17965         (arc_handle_fndecl_attribute): Add naked attribute.
17966         (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
17967         (TARGET_WARN_FUNC_RETURN): Likewise.
17968         (arc_allocate_stack_slots_for_args): New function.
17969         (arc_warn_func_return): Likewise.
17970         (machine_function): Change type fn_type.
17971         (arc_compute_function_type): Consider new naked function type,
17972         change function return type.
17973         (arc_must_save_register): Adapt to handle new
17974         arc_compute_function_type's return type.
17975         (arc_expand_prologue): Likewise.
17976         (arc_expand_epilogue): Likewise.
17977         (arc_return_address_regs): Delete.
17978         (arc_return_address_register): New function.
17979         (arc_epilogue_uses): Use above function.
17980         * config/arc/arc.h (arc_return_address_regs): Delete prototype.
17981         (arc_function_type): Change encoding, add naked type.
17982         (ARC_INTERRUPT_P): Change to handle the new encoding.
17983         (ARC_FAST_INTERRUPT_P): Likewise.
17984         (ARC_NORMAL_P): Define.
17985         (ARC_NAKED_P): Likewise.
17986         (arc_compute_function_type): Delete prototype.
17987         * config/arc/arc.md (in_ret_delay_slot): Use
17988         arc_return_address_register function.
17989         (simple_return): Likewise.
17990         (p_return_i): Likewise.
17992 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
17994         PR tree-optimization/81428
17995         * match.pd (X / X -> one): Don't optimize _Fract divisions, as 1
17996         can't be built for those types.
17998 2017-07-17  Georg-Johann Lay  <avr@gjlay.de>
18000         Remove stuff dead since r239246.
18002         * config/avr/avr-arch.h (avr_inform_devices): Remove dead proto.
18003         * config/avr/avr-devices.c (mcu_name, comparator, avr_mcus_str)
18004         (avr_inform_devices): Remove dead stuff.
18006 2017-07-17  Tamar Christina  <tamar.christina@arm.com>
18008         * config/arm/arm_neon.h: Fix softp typo.
18010 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
18012         PR tree-optimization/81365
18013         * tree-ssa-phiprop.c (propagate_with_phi): When considering hoisting
18014         aggregate moves onto bb predecessor edges, make sure there are no
18015         loads that could alias the lhs in between the start of bb and the
18016         loads from *phi.
18018 2017-07-17  Georg-Johann Lay  <avr@gjlay.de>
18020         PR 80929
18021         * config/avr/avr.c (avr_mul_highpart_cost): New static function.
18022         (avr_rtx_costs_1) [TRUNCATE]: Use it to compute mul_highpart cost.
18023         [LSHIFTRT, outer_code = TRUNCATE]: Same.
18025 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
18027         PR tree-optimization/81396
18028         * tree-ssa-math-opts.c (struct symbolic_number): Add n_ops field.
18029         (init_symbolic_number): Initialize it to 1.
18030         (perform_symbolic_merge): Add n_ops from both operands into the new
18031         n_ops.
18032         (find_bswap_or_nop): Don't consider n->n == cmpnop computations
18033         without base_addr as useless if they need more than one operation.
18034         (bswap_replace): Handle !bswap case for NULL base_addr.
18036 2017-07-17  Tom de Vries  <tom@codesourcery.com>
18038         PR target/81069
18039         * config/nvptx/nvptx.c (nvptx_single): Insert diverging branch as late
18040         as possible.
18042 2017-07-17  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18044         * config/sparc/rtemself.h (TARGET_OS_CPP_BUILTINS): Add
18045         conditional builtin define __FIX_LEON3FT_B2BST.
18047 2017-07-17  Daniel Cederman  <cederman@gaisler.com>
18049         * config/sparc/t-rtems: Add mfix-gr712rc multilibs. Replace
18050         MULTILIB_EXCEPTIONS with MULTILIB_REQUIRED. Match -mfix-gr712rc
18051         with -mfix-ut700.
18053 2017-07-16  Eric Botcazou  <ebotcazou@adacore.com>
18055         PR rtl-optimization/81424
18056         * optabs.c (prepare_cmp_insn): Use copy_to_reg instead of force_reg
18057         to remove potential trapping from operands if -fnon-call-exceptions.
18059 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
18061         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Use
18062         profile_proability for scalling.
18063         * scale_profile_for_vect_loop.c (scale_profile_for_vect_loop): Likewise.
18065 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
18067         * cgraph.c (cgraph_edge::redirect_call_stmt_to_caller): Cleanup.
18069 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
18071         * cfgloopmanip.c (scale_loop_profile): Avoid use of REG_BR_PROB_BASE
18072         fixpoint arithmetics.
18074 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
18076         * tree-ssa-loop-unswitch.c (hoist_guard): Avoid use of REG_BR_PROB_BASE
18077         fixpoint arithmetics.
18079 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
18081         * asan.c (create_cond_insert_point): Avoid use of REG_BR_PROB_BASE
18082         fixpoint arithmetics.
18084 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
18086         * profile-count.h (profile_probability::from_reg_br_prob_note,
18087         profile_probability::to_reg_br_prob_note): New functions.
18088         * doc/rtl.texi (REG_BR_PROB_NOTE): Update documentation.
18089         * reg-notes.h (REG_BR_PROB, REG_BR_PRED): Update docs.
18090         * predict.c (probability_reliable_p): Update.
18091         (edge_probability_reliable_p): Update.
18092         (br_prob_note_reliable_p): Update.
18093         (invert_br_probabilities): Update.
18094         (add_reg_br_prob_note): New function.
18095         (combine_predictions_for_insn): Update.
18096         * asan.c (asan_clear_shadow): Update.
18097         * cfgbuild.c (compute_outgoing_frequencies): Update.
18098         * cfgrtl.c (force_nonfallthru_and_redirect): Update.
18099         (update_br_prob_note): Update.
18100         (rtl_verify_edges): Update.
18101         (purge_dead_edges): Update.
18102         (fixup_reorder_chain): Update.
18103         * emit-rtl.c (try_split): Update.
18104         * ifcvt.c (cond_exec_process_insns): Update.
18105         (cond_exec_process_if_block): Update.
18106         (dead_or_predicable): Update.
18107         * internal-fn.c (expand_addsub_overflow): Update.
18108         (expand_neg_overflow): Update.
18109         (expand_mul_overflow): Update.
18110         * loop-doloop.c (doloop_modify): Update.
18111         * loop-unroll.c (compare_and_jump_seq): Update.
18112         * optabs.c (emit_cmp_and_jump_insn_1): Update.
18113         * predict.h: Update.
18114         * reorg.c (mostly_true_jump): Update.
18115         * rtl.h: Update.
18116         * config/aarch64/aarch64.c (aarch64_emit_unlikely_jump): Update.
18117         * config/alpha/alpha.c (emit_unlikely_jump): Update.
18118         * config/arc/arc.c: (emit_unlikely_jump): Update.
18119         * config/arm/arm.c: (emit_unlikely_jump): Update.
18120         * config/bfin/bfin.c (cbranch_predicted_taken_p): Update.
18121         * config/frv/frv.c (frv_print_operand_jump_hint): Update.
18122         * config/i386/i386.c (ix86_expand_split_stack_prologue): Update.
18123         (ix86_print_operand): Update.
18124         (ix86_split_fp_branch): Update.
18125         (predict_jump): Update.
18126         * config/ia64/ia64.c (ia64_print_operand): Update.
18127         * config/mmix/mmix.c (mmix_print_operand): Update.
18128         * config/powerpcspe/powerpcspe.c (output_cbranch): Update.
18129         (rs6000_expand_split_stack_prologue): Update.
18130         * config/rs6000/rs6000.c: Update.
18131         * config/s390/s390.c (s390_expand_vec_strlen): Update.
18132         (s390_expand_vec_movstr): Update.
18133         (s390_expand_cs_tdsi): Update.
18134         (s390_expand_split_stack_prologue): Update.
18135         * config/sh/sh.c (sh_print_operand): Update.
18136         (expand_cbranchsi4): Update.
18137         (expand_cbranchdi4): Update.
18138         * config/sparc/sparc.c (output_v9branch): Update.
18139         * config/spu/spu.c (get_branch_target): Update.
18140         (ea_load_store_inline): Update.
18141         * config/tilegx/tilegx.c (cbranch_predicted_p): Update.
18142         * config/tilepro/tilepro.c: Update.
18144 2017-07-16  Eric Botcazou  <ebotcazou@adacore.com>
18146         * gimplify.c (mostly_copy_tree_r): Revert latest change.
18147         (gimplify_save_expr): Likewise.
18149 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
18151         * ipa-visibility.c (function_and_variable_visibility): Fix pasto.
18153 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
18155         * ipa-fnsummary.c (pass_data_ipa_fn_summary): Use
18156         TV_IPA_FNSUMMARY.
18157         * timevar.def (TV_IPA_FNSUMMARY): Define.
18159 2017-07-16  Daniel Cederman  <cederman@gaisler.com>
18161         * config/sparc/sparc.md (divdf3_fix): Add NOP to prevent back
18162         to back store errata sensitive sequence from being generated.
18163         (sqrtdf2_fix): Likewise.
18165 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
18167         * tree-ssa-threadupdate.c (compute_path_counts,
18168         update_joiner_offpath_counts): Use profile_probability.
18170 2017-07-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
18172         Revert:
18173         2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
18175         * config/arm/arm-c.c (arm_cpu_builtins): Define
18176         __ARM_FEATURE_NUMERIC_MAXMIN solely based on TARGET_VFP5.
18178 2017-07-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18180         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
18181         array entries to represent __ieee128 versions of the
18182         scalar_test_data_class, scalar_test_neg, scalar_extract_exp,
18183         scalar_extract_sig, and scalar_insert_exp built-in functions.
18184         (altivec_resolve_overloaded_builtin): Add special case handling
18185         for the __builtin_scalar_insert_exp function, as represented by
18186         the P9V_BUILTIN_VEC_VSIEDP constant.
18187         * config/rs6000/rs6000-builtin.def (VSEEQP): Add scalar extract
18188         exponent support for __ieee128 argument.
18189         (VSESQP): Add scalar extract signature support for __ieee128
18190         argument.
18191         (VSTDCNQP): Add scalar test negative support for __ieee128
18192         argument.
18193         (VSIEQP): Add scalar insert exponent support for __int128 argument
18194         with __ieee128 result.
18195         (VSIEQPF): Add scalar insert exponent support for __ieee128
18196         argument with __ieee128 result.
18197         (VSTDCQP): Add scalar test data class support for __ieee128
18198         argument.
18199         (VSTDCNQP): Add overload support for scalar test negative with
18200         __ieee128 argument.
18201         (VSTDCQP): Add overload support for scalar test data class
18202         __ieee128 argument.
18203         * config/rs6000/vsx.md (UNSPEC_VSX_SXSIG) Replace
18204         UNSPEC_VSX_SXSIGDP.
18205         (UNSPEC_VSX_SIEXPQP): New constant.
18206         (xsxexpqp): New insn for VSX scalar extract exponent quad
18207         precision.
18208         (xsxsigqp): New insn for VSX scalar extract significand quad
18209         precision.
18210         (xsiexpqpf): New insn for VSX scalar insert exponent quad
18211         precision with floating point argument.
18212         (xststdcqp): New expand for VSX scalar test data class quad
18213         precision.
18214         (xststdcnegqp): New expand for VSX scalar test negative quad
18215         precision.
18216         (xststdcqp): New insn to match expansions for VSX scalar test data
18217         class quad precision and VSX scalar test negative quad precision.
18218         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Add
18219         special case operand checking to enforce that second operand of
18220         VSX scalar test data class with quad precision argument is a 7-bit
18221         unsigned literal.
18222         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
18223         prototypes and descriptions of __ieee128 versions of
18224         scalar_extract_exp, scalar_extract_sig, scalar_insert_exp,
18225         scalar_test_data_class, and scalar_test_neg built-in functions.
18227 2016-07-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18229         PR tree-optimization/81162
18230         * gimple-ssa-strength-reduction.c (replace_mult_candidate): Don't
18231         replace a negate with an add.
18233 2017-07-14  James Greenhalgh  <james.greenhalgh@arm.com>
18235         * doc/invoke.texi (arm/-mcpu): Document +crypto.
18237 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
18239         * config/arm/arm-c.c (arm_cpu_builtins): Define
18240         __ARM_FEATURE_NUMERIC_MAXMIN solely based on TARGET_VFP5.
18242 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
18244         * config/arm/arm-cpus.in (cortex-r52): Add new entry.
18245         (armv8-r): Set ARM Cortex-R52 as default CPU.
18246         * config/arm/arm-tables.opt: Regenerate.
18247         * config/arm/arm-tune.md: Regenerate.
18248         * config/arm/driver-arm.c (arm_cpu_table): Add entry for ARM
18249         Cortex-R52.
18250         * doc/invoke.texi: Mention -mtune=cortex-r52 and availability of fp.dp
18251         extension for -mcpu=cortex-r52.
18253 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
18255         * config/arm/arm-isa.h (isa_bit_FP_ARMv8): Delete enumerator.
18256         (ISA_FP_ARMv8): Define as ISA_FPv5 and ISA_FP_D32.
18257         * config/arm/arm-cpus.in (armv8-r): Define fp.sp as enabling FPv5.
18258         (fp-armv8): Define it as FP_ARMv8 only.
18259         config/arm/arm.h (TARGET_FPU_ARMV8): Delete.
18260         (TARGET_VFP_FP16INST): Define using TARGET_VFP5 rather than
18261         TARGET_FPU_ARMV8.
18262         config/arm/arm.c (arm_rtx_costs_internal): Replace checks against
18263         TARGET_FPU_ARMV8 by checks against TARGET_VFP5.
18264         * config/arm/arm-builtins.c (arm_builtin_vectorized_function): Define
18265         first ARM_CHECK_BUILTIN_MODE definition using TARGET_VFP5 rather
18266         than TARGET_FPU_ARMV8.
18267         * config/arm/arm-c.c (arm_cpu_builtins): Likewise for
18268         __ARM_FEATURE_NUMERIC_MAXMIN macro definition.
18269         * config/arm/arm.md (cmov<mode>): Condition on TARGET_VFP5 rather than
18270         TARGET_FPU_ARMV8.
18271         * config/arm/neon.md (neon_vrint): Likewise.
18272         (neon_vcvt): Likewise.
18273         (neon_<fmaxmin_op><mode>): Likewise.
18274         (<fmaxmin><mode>3): Likewise.
18275         * config/arm/vfp.md (l<vrint_pattern><su_optab><mode>si2): Likewise.
18276         * config/arm/predicates.md (arm_cond_move_operator): Check against
18277         TARGET_VFP5 rather than TARGET_FPU_ARMV8 and fix spacing.
18279 2017-07-14  Jackson Woodruff  <jackson.woodruff@arm.com>
18281         * config/aarch64/aarch64.c (aarch64_print_operand): Move comments
18282         to top of function.
18284 2017-07-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18286         * gimple-ssa-store-merging.c (clear_bit_region): Replace reference to
18287         loop in comment with memset.
18289 2017-07-14  Martin Liska  <mliska@suse.cz>
18291         * cfgexpand.c (expand_gimple_basic_block): Remove dead comment.
18292         * dwarf2out.c (is_java): Remove the function.
18293         (output_pubname): Remove usage of the function.
18294         (lower_bound_default): Remove usage of DW_LANG_Java.
18295         (gen_compile_unit_die): Likewise.
18296         * gcc.c: Remove compiler defaults for .java and .zip files.
18297         * gimple-expr.c (remove_suffix): Change as there's no longer
18298         extension than 4-letter one.
18299         * gimplify.c (mostly_copy_tree_r): Remove Java-special part.
18300         (gimplify_save_expr): Likewise.
18301         * ipa-utils.h (polymorphic_type_binfo_p): Remove the comment
18302         as it's possible even for other languages than Java.
18303         * langhooks.h (struct lang_hooks): Remove Java from a comment.
18304         * lto-opts.c (lto_write_options): Remove reference to Java.
18305         * opts.c (strip_off_ending): Update file extension handling.
18306         * tree-cfg.c (verify_gimple_call): Remove comment with Java.
18307         * tree-eh.c (lower_resx): Likewise.
18308         * tree.c (free_lang_data_in_type): Remove dead code.
18309         (find_decls_types_r): Likewise.
18310         (build_common_builtin_nodes): Remove Java from a comment.
18311         (verify_type): Remove dead code.
18312         * varasm.c (assemble_external): Remove Java from a comment.
18314 2017-07-14  Martin Liska  <mliska@suse.cz>
18316         * opts.c (finish_options): Add quotes.
18317         (common_handle_option): Likewise.
18319 2017-07-14  Martin Liska  <mliska@suse.cz>
18321         * dbxout.c (get_lang_number): Do not handle GNU Pascal.
18322         * dbxout.h (extern void dbxout_stab_value_internal_label_diff):
18323         Remove N_SO_PASCAL.
18324         * dwarf2out.c (lower_bound_default): Do not handle
18325         DW_LANG_Pascal83.
18326         (gen_compile_unit_die): Likewise.
18327         * gcc.c: Remove default extension binding for GNU Pascal.
18328         * stmt.c: Remove Pascal language from a comment.
18329         * xcoffout.c: Likewise.
18331 2017-07-13  David Malcolm  <dmalcolm@redhat.com>
18333         PR c/81405
18334         * diagnostic-show-locus.c (fixit_cmp): New function.
18335         (layout::layout): Sort m_fixit_hints.
18336         (column_range::column_range): Assert that the values are valid.
18337         (struct char_span): New struct.
18338         (correction::overwrite): New method.
18339         (struct source_line): New struct.
18340         (line_corrections::add_hint): Add assertions.  Reimplement memcpy
18341         calls in terms of classes source_line and char_span, and
18342         correction::overwrite.
18343         (selftest::test_overlapped_fixit_printing_2): New function.
18344         (selftest::diagnostic_show_locus_c_tests): Call it.
18346 2017-07-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
18348         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Return
18349         early if there is no lhs.
18351 2017-07-13  Martin Liska  <mliska@suse.cz>
18353         * dwarf2out.c (gen_pointer_type_die): Remove dead code.
18354         (gen_reference_type_die): Likewise.
18355         * stor-layout.c: Remove Pascal-related comment.
18357 2017-07-13  Martin Liska  <mliska@suse.cz>
18359         * opts.c (finish_options): Add quotes to error messages.
18360         (parse_sanitizer_options): Likewise.
18362 2017-07-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
18364         * doc/invoke.texi (armv8-r): Document +fp.sp ARMv8-R extension.
18366 2017-07-13  Richard Earnshaw  <rearnsha@arm.com>
18368         * config/arm/vxworks.h (TARGET_ENDIAN_DEFAULT): Define.
18370 2017-07-13  Maxim Ostapenko  <m.ostapenko@samsung.com>
18372         * asan.c (asan_emit_allocas_unpoison): Use ptr_mode for arguments
18373         during expansion.
18374         * builtins.c (expand_asan_emit_allocas_unpoison): Likewise.
18376 2017-07-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
18378         PR target/81193
18379         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If GLIBC
18380         provides the hardware capability bits, define the macro
18381         __BUILTIN_CPU_SUPPORTS__.
18382         * config/rs6000/rs6000.c (cpu_expand_builtin): Generate a warning
18383         if GLIBC does not provide the hardware capability bits.  Add a
18384         gcc_unreachable call if the built-in cpu function is neither
18385         __builtin_cpu_is nor __builtin_cpu_supports.
18386         (rs6000_get_function_versions_dispatcher): Change the warning
18387         that an old GLIBC is used which does not export the capability
18388         bits to be an error.
18389         * doc/extend.texi (target_clones attribute): Document the
18390         restriction that GLIBC 2.23 or newer is needed on the PowerPC.
18391         (PowerPC built-in functions): Document that GLIBC 2.23 or newer is
18392         needed by __builtin_cpu_is and __builtin_cpu_supports.  Document
18393         the macros defined by GCC if the newer GLIBC is available.
18395 2017-07-12  Jeff Law  <law@redhat.com>
18397         * config/riscv/riscv.c: Remove unnecessary includes.  Reorder
18398         remaining includes slightly.
18399         * config/riscv/riscv-builtins.c: Include profile-count.h.
18401 2017-07-12  Georg-Johann Lay  <avr@gjlay.de>
18403         PR target/79883
18404         * config/avr/avr.c (avr_set_current_function): In diagnostic
18405         messages: Quote keywords and (parts of) identifiers.
18406         [WITH_AVRLIBC]: Warn for functions named "ISR", "SIGNAL" or
18407         "INTERUPT".
18409 2017-07-12  Carl Love  <cel@us.ibm.com>
18411         * config/rs6000/rs6000-c.c: Add support for built-in functions
18412         vector bool char vec_revb (vector bool char);
18413         vector bool short vec_revb (vector short char);
18414         vector bool int vec_revb (vector bool int);
18415         vector bool long long vec_revb (vector bool long long);
18416         * doc/extend.texi: Update the built-in documentation file for the
18417         new built-in functions.
18419 2017-07-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18421         * config/s390/s390.md: Remove movcc splitter.
18423 2017-07-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18425         * config/s390/s390.c (s390_rtx_costs): Return proper costs for
18426         load/store on condition.
18428 2017-07-12  Georg-Johann Lay  <avr@gjlay.de>
18430         PR target/81407
18431         * config/avr/avr.c (avr_encode_section_info)
18432         [progmem && !TREE_READONLY]: Error if progmem object needs
18433         constructing.
18435 2017-07-11  Michael Collison  <michael.collison@arm.com>
18437         * config/aarch64/aarch64-simd.md (aarch64_sub<mode>_compare0):
18438         New pattern.
18440 2017-07-11  Carl Love  <cel@us.ibm.com>
18442         * config/rs6000/rs6000-c.c: Add support for builtins
18443         vector unsigned int vec_parity_lsbb (vector signed int);
18444         vector unsigned int vec_parity_lsbb (vector unsigned int);
18445         vector unsigned __int128 vec_parity_lsbb (vector signed __int128);
18446         vector unsigned __int128 vec_parity_lsbb (vector unsigned __int128);
18447         vector unsigned long long vec_parity_lsbb (vector signed long long);
18448         vector unsigned long long vec_parity_lsbb (vector unsigned long long);
18449         * config/rs6000/rs6000-builtin.def (VPARITY_LSBB): Add BU_P9V_OVERLOAD1.
18450         * config/rs6000/altivec.h (vec_parity_lsbb): Add define.
18451         * doc/extend.texi: Update the built-in documentation file for the
18452         new built-in functions.
18454 2017-07-11  David Malcolm  <dmalcolm@redhat.com>
18456         * diagnostic-show-locus.c: Include "gcc-rich-location.h".
18457         (layout::m_primary_loc): New field.
18458         (layout::layout): Initialize new field.  Move location filtering
18459         logic from here to...
18460         (layout::maybe_add_location_range): ...this new method.  Add
18461         support for filtering to just the lines already specified by other
18462         locations.
18463         (layout::will_show_line_p): New method.
18464         (gcc_rich_location::add_location_if_nearby): New method.
18465         (selftest::test_add_location_if_nearby): New test function.
18466         (selftest::diagnostic_show_locus_c_tests): Call it.
18467         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
18468         New method.
18470 2017-07-11  Tom de Vries  <tom@codesourcery.com>
18472         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG): New macro.
18473         (bb_first_real_insn): New function.
18474         (nvptx_single): Add extra initialization of broadcasted condition
18475         variables.
18477 2017-07-11  Nathan Sidwell  <nathan@acm.org>
18479         * dwarf2out.c (gen_member_die): Remove useless check for anon ctors.
18481 2017-07-11  Georg-Johann Lay  <avr@gjlay.de>
18483         * doc/extend.texi (AVR Function Attributes): Remove weblink to
18484         Binutils doc as TEXI will mess them up.
18485         * doc/invoke.texi (AVR Options): Same here.
18487 2017-07-11  Daniel Cederman  <cederman@gaisler.com>
18489         * config/sparc/sparc.opt (mfix-ut700): New option.
18490         (mfix-gr712rc): Likewise.
18491         (sparc_fix_b2bst): New variable.
18492         * doc/invoke.texi (SPARC options): Document them.
18493         (ARM options): Fix warnings.
18494         * config/sparc/sparc.c (sparc_do_work_around_errata): Insert NOP
18495         instructions to prevent sequences that can trigger the store-store
18496         errata for certain LEON3FT processors.
18497         (pass_work_around_errata::gate): Also test sparc_fix_b2bst.
18498         (sparc_option_override): Set sparc_fix_b2bst appropriately.
18499         * config/sparc/sparc.md (fix_b2bst): New attribute.
18500         (in_branch_delay): Prevent stores in delay slot if fix_b2bst.
18502 2017-07-10  Uros Bizjak  <ubizjak@gmail.com>
18504         PR target/81375
18505         * config/i386/i386.md (divsf3): Add TARGET_SSE to TARGET_SSE_MATH.
18506         (rcpps): Ditto.
18507         (*rsqrtsf2_sse): Ditto.
18508         (rsqrtsf2): Ditto.
18509         (div<mode>3): Macroize insn from divdf3 and divsf3
18510         using MODEF mode iterator.
18512 2017-07-10  Martin Sebor  <msebor@redhat.com>
18514         PR tree-optimization/80397
18515         * gimple-ssa-sprintf.c (format_integer): Use INTEGRAL_TYPE_P()
18516         instead of testing for equality to INTEGER_TYPE.
18518 2017-07-10  Vineet Gupta <vgupta@synopsys.com>
18520         * config.gcc: Remove uclibc from arc target spec.
18522 2017-07-10  Claudiu Zissulescu  <claziss@synopsys.com>
18524         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Define.
18526 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
18528         PR lto/80838
18529         * lto-wrapper.c (remove_option): New function.
18530         (merge_and_complain): Merge PIC/PIE options more realistically.
18532 2017-07-10  Georg-Johann Lay  <avr@gjlay.de>
18534         Better ISR prologues by supporting GASes __gcc_isr pseudo insn.
18536         PR target/20296
18537         PR target/81268
18538         * configure.ac [target=avr]: Add GAS check for -mgcc-isr.
18539         (HAVE_AS_AVR_MGCCISR_OPTION):  If so, AC_DEFINE it.
18540         * config.in: Regenerate.
18541         * configure: Regenerate.
18542         * doc/extend.texi (AVR Function Attributes) <no_gccisr>: Document it.
18543         * doc/invoke.texi (AVR Options) <-mgas-isr-prologues>: Document it.
18544         * config/avr/avr.opt (-mgas-isr-prologues): New option and...
18545         (TARGET_GASISR_PROLOGUES): ...target mask.
18546         * common/config/avr/avr-common.c
18547         (avr_option_optimization_table) [OPT_LEVELS_1_PLUS_NOT_DEBUG]:
18548         Set -mgas-isr-prologues.
18549         * config/avr/avr-passes.def (avr_pass_pre_proep): Add
18550         INSERT_PASS_BEFORE for it.
18551         * config/avr/avr-protos.h (make_avr_pass_pre_proep): New proto.
18552         * config/avr/avr.c (avr_option_override)
18553         [!HAVE_AS_AVR_MGCCISR_OPTION]: Unset TARGET_GASISR_PROLOGUES.
18554         (avr_no_gccisr_function_p, avr_hregs_split_reg): New static functions.
18555         (avr_attribute_table) <no_gccisr>: Add new function attribute.
18556         (avr_set_current_function) <is_no_gccisr>: Init machine field.
18557         (avr_pass_data_pre_proep, avr_pass_pre_proep): New pass data
18558         and rtl_opt_pass.
18559         (make_avr_pass_pre_proep): New function.
18560         (emit_push_sfr) <treg>: Add argument to function and use it
18561         instead of TMP_REG.
18562         (avr_expand_prologue) [machine->gasisr.maybe]: Emit gasisr insn
18563         and set machine->gasisr.yes.
18564         (avr_expand_epilogue) [machine->gasisr.yes]: Similar.
18565         (avr_asm_function_end_prologue) [machine->gasisr.yes]: Add
18566         __gcc_isr.n_pushed to .L__stack_usage.
18567         (TARGET_ASM_FINAL_POSTSCAN_INSN): Define to...
18568         (avr_asm_final_postscan_insn): ...this new static function.
18569         * config/avr/avr.h (machine_function)
18570         <is_no_gccisr, use_L__stack_usage>: New fields.
18571         <gasisr, gasisr.yes, gasisr.maybe, gasisr.regno>: New fields.
18572         * config/avr/avr.md (UNSPECV_GASISR): Add unspecv enum.
18573         (GASISR_Prologue, GASISR_Epilogue, GASISR_Done): New define_constants.
18574         (gasisr, *gasisr): New expander and insn.
18575         * config/avr/gen-avr-mmcu-specs.c (print_mcu)
18576         [HAVE_AS_AVR_MGCCISR_OPTION]: Print asm_gccisr spec.
18577         * config/avr/specs.h (ASM_SPEC) <asm_gccisr>: Add sub spec.
18579 2017-07-10  Richard Earnshaw  <rearnsha@arm.com>
18581         * config/arm/parsecpu.awk (gen_comm_data): Do not escape single quotes
18582         in quoted strings.
18584 2017-07-10  Georg-Johann Lay  <avr@gjlay.de>
18586         Move jump-tables out of .text again.
18588         PR target/81075
18589         * config/avr/avr.c (ASM_OUTPUT_ADDR_VEC_ELT): Remove function.
18590         (ASM_OUTPUT_ADDR_VEC): New function.
18591         (avr_adjust_insn_length) [JUMP_TABLE_DATA_P]: Return 0.
18592         (avr_final_prescan_insn) [avr_log.insn_addresses]: Dump
18593         INSN_ADDRESSes as asm comment.
18594         * config/avr/avr.h (JUMP_TABLES_IN_TEXT_SECTION): Adjust comment.
18595         (ASM_OUTPUT_ADDR_VEC_ELT): Remove define.
18596         (ASM_OUTPUT_ADDR_VEC): Define to avr_output_addr_vec.
18597         * config/avr/avr.md (*tablejump): Adjust comment.
18598         * config/avr/elf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove.
18599         * config/avr/avr-log.c (avr_log_set_avr_log) <insn_addresses>:
18600         New detail.
18601         * config/avr/avr-protos.h (avr_output_addr_vec_elt): Remove proto.
18602         (avr_output_addr_vec): New proto.
18603         (avr_log_t) <insn_addresses>: New field.
18605 2017-07-09  H.J. Lu  <hongjiu.lu@intel.com>
18607         PR target/81313
18608         * config/i386/i386.c (ix86_function_arg_advance): Set
18609         outgoing_args_on_stack to true if there are outgoing arguments
18610         on stack.
18611         (ix86_function_arg): Likewise.
18612         (ix86_get_drap_rtx): Use DRAP only if there are outgoing
18613         arguments on stack and ACCUMULATE_OUTGOING_ARGS is false.
18614         * config/i386/i386.h (machine_function): Add
18615         outgoing_args_on_stack.
18617 2017-07-09  Krister Walfridsson  <krister.walfridsson@gmail.com>
18619         * config.gcc (*-*-netbsd*): Remove check for NetBSD versions not
18620         supporting pthreds.
18621         * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always enable pthreads.
18623 2017-07-08  Richard Sandiford  <richard.sandiford@linaro.org>
18625         * Makefile.in (HOOKS_H, RTL_BASE_H, FUNCTION_H, EXPR_H, REGS_H)
18626         (REAL_H): Remove $(MACHMODE_H).
18627         (FIXED_VALUE_H, TREE_CORE_H, CFGLOOP_H): Remove $(MACHMODE_H) and
18628         double-int.h.
18629         (CORETYPES_H): Add signop.h, wide-int.h, wide-int-print.h,
18630         $(MACHMODE_H) and double-int.h.
18631         (build/min-insn-modes.o): Depend on $(CORETYPES_H) rather than
18632         $(MACHMODE_H).
18633         (gengtype-state.o, gengtype.o, build/gengtype.o): Don't depend on
18634         double-int.h.
18636 2017-07-07  Andrew Pinski  <apinski@cavium.com>
18638         * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Check
18639         prev_set and curr_set for AARCH64_FUSE_ALU_BRANCH.
18641 2017-07-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
18643         * config/rs6000/rs6000.c (rs6000_get_function_versions_dispatcher):
18644         Add warning if GCC was not configured to link against a GLIBC that
18645         exports the hardware capability bits.
18646         (make_resolver_func): Make resolver function private and not a
18647         COMDAT function.  Create the name with clone_function_name instead
18648         of make_unique_name.
18650         PR target/81348
18651         * config/rs6000/rs6000.md (HI sign_extend splitter): Use the
18652         correct operand in doing the split.
18654 2017-07-07 Carl Love  <cel@us.ibm.com>
18656         * config/rs6000/rs6000-c: Add support for built-in function
18657         vector unsigned short vec_pack_to_short_fp32 (vector float,
18658                                                       vector float).
18659         * config/rs6000/rs6000-builtin.def (CONVERT_4F32_8I16): Add
18660         BU_P9V_AV_2 and BU_P9V_OVERLOAD_2 definitions.
18661         * config/rs6000/altivec.h (vec_pack_to_short_fp32): Add define.
18662         * config/rs6000/altivec.md(UNSPEC_CONVERT_4F32_8I16): Add UNSPEC.
18663         (convert_4f32_8i16): Add define_expand.
18664         * doc/extend.texi: Update the built-in documentation file for the
18665         new built-in function.
18667 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
18669         * config/sparc/m8.md: New file.
18670         * config/sparc/sparc.md: Include m8.md.
18672 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
18674         * config/sparc/sparc.opt: New option -mvis4b.
18675         * config/sparc/sparc.c (dump_target_flag_bits): Handle MASK_VIS4B.
18676         (sparc_option_override): Handle VIS4B.
18677         (enum sparc_builtins): Define
18678         SPARC_BUILTIN_DICTUNPACK{8,16,32},
18679         SPARC_BUILTIN_FPCMP{LE,GT,EQ,NE}{8,16,32}SHL,
18680         SPARC_BUILTIN_FPCMPU{LE,GT}{8,16,32}SHL,
18681         SPARC_BUILTIN_FPCMPDE{8,16,32}SHL and
18682         SPARC_BUILTIN_FPCMPUR{8,16,32}SHL.
18683         (check_constant_argument): New function.
18684         (sparc_vis_init_builtins): Define builtins
18685         __builtin_vis_dictunpack{8,16,32},
18686         __builtin_vis_fpcmp{le,gt,eq,ne}{8,16,32}shl,
18687         __builtin_vis_fpcmpu{le,gt}{8,16,32}shl,
18688         __builtin_vis_fpcmpde{8,16,32}shl and
18689         __builtin_vis_fpcmpur{8,16,32}shl.
18690         (sparc_expand_builtin): Check that the constant operands to
18691         __builtin_vis_fpcmp*shl and _builtin_vis_dictunpack* are indeed
18692         constant and in range.
18693         * config/sparc/sparc-c.c (sparc_target_macros): Handle
18694         TARGET_VIS4B.
18695         * config/sparc/sparc.h (SPARC_IMM2_P): Define.
18696         (SPARC_IMM5_P): Likewise.
18697         * config/sparc/sparc.md (cpu_feature): Add new feagure "vis4b".
18698         (enabled): Handle vis4b.
18699         (UNSPEC_DICTUNPACK): New unspec.
18700         (UNSPEC_FPCMPSHL): Likewise.
18701         (UNSPEC_FPUCMPSHL): Likewise.
18702         (UNSPEC_FPCMPDESHL): Likewise.
18703         (UNSPEC_FPCMPURSHL): Likewise.
18704         (cpu_feature): New CPU feature `vis4b'.
18705         (dictunpack{8,16,32}): New insns.
18706         (FPCSMODE): New mode iterator.
18707         (fpcscond): New code iterator.
18708         (fpcsucond): Likewise.
18709         (fpcmp{le,gt,eq,ne}{8,16,32}{si,di}shl): New insns.
18710         (fpcmpu{le,gt}{8,16,32}{si,di}shl): Likewise.
18711         (fpcmpde{8,16,32}{si,di}shl): Likewise.
18712         (fpcmpur{8,16,32}{si,di}shl): Likewise.
18713         * config/sparc/constraints.md: Define constraints `q' for unsigned
18714         2-bit integer constants and `t' for unsigned 5-bit integer
18715         constants.
18716         * config/sparc/predicates.md (imm5_operand_dictunpack8): New
18717         predicate.
18718         (imm5_operand_dictunpack16): Likewise.
18719         (imm5_operand_dictunpack32): Likewise.
18720         (imm2_operand): Likewise.
18721         * doc/invoke.texi (SPARC Options): Document -mvis4b.
18722         * doc/extend.texi (SPARC VIS Built-in Functions): Document the
18723         ditunpack* and fpcmp*shl builtins.
18725 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
18727         * config.gcc: Handle m8 in --with-{cpu,tune} options.
18728         * config.in: Add HAVE_AS_SPARC6 define.
18729         * config/sparc/driver-sparc.c (cpu_names): Add entry for the SPARC
18730         M8.
18731         * config/sparc/sol2.h (CPP_CPU64_DEFAULT_SPEC): Define for
18732         TARGET_CPU_m8.
18733         (ASM_CPU32_DEFAUILT_SPEC): Likewise.
18734         (CPP_CPU_SPEC): Handle m8.
18735         (ASM_CPU_SPEC): Likewise.
18736         * config/sparc/sparc-opts.h (enum processor_type): Add
18737         PROCESSOR_M8.
18738         * config/sparc/sparc.c (m8_costs): New struct.
18739         (sparc_option_override): Handle TARGET_CPU_m8.
18740         (sparc32_initialize_trampoline): Likewise.
18741         (sparc64_initialize_trampoline): Likewise.
18742         (sparc_issue_rate): Likewise.
18743         (sparc_register_move_cost): Likewise.
18744         * config/sparc/sparc.h (TARGET_CPU_m8): Define.
18745         (CPP_CPU64_DEFAULT_SPEC): Define for M8.
18746         (ASM_CPU64_DEFAULT_SPEC): Likewise.
18747         (CPP_CPU_SPEC): Handle M8.
18748         (ASM_CPU_SPEC): Likewise.
18749         (AS_M8_FLAG): Define.
18750         * config/sparc/sparc.md: Add m8 to the cpu attribute.
18751         * config/sparc/sparc.opt: New option -mcpu=m8 for sparc targets.
18752         * configure.ac (HAVE_AS_SPARC6): Check for assembler support for
18753         M8 instructions.
18754         * configure: Regenerate.
18755         * doc/invoke.texi (SPARC Options): Document -mcpu=m8 and
18756         -mtune=m8.
18758 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
18760         * config/sparc/niagara7.md: Rework the DFA scheduler to use insn
18761         subtypes.
18762         * config/sparc/sparc.md: Remove the `v3pipe' insn attribute.
18763         ("*movdi_insn_sp32"): Do not set v3pipe.
18764         ("*movsi_insn"): Likewise.
18765         ("*movdi_insn_sp64"): Likewise.
18766         ("*movsf_insn"): Likewise.
18767         ("*movdf_insn_sp32"): Likewise.
18768         ("*movdf_insn_sp64"): Likewise.
18769         ("*zero_extendsidi2_insn_sp64"): Likewise.
18770         ("*sign_extendsidi2_insn"): Likewise.
18771         ("*mov<VM32:mode>_insn"): Likewise.
18772         ("*mov<VM64:mode>_insn_sp64"): Likewise.
18773         ("*mov<VM64:mode>_insn_sp32"): Likewise.
18774         ("<plusminus_insn><VADDSUB:mode>3"): Likewise.
18775         ("<vlop:code><VL:mode>3"): Likewise.
18776         ("*not_<vlop:code><VL:mode>3"): Likewise.
18777         ("*nand<VL:mode>_vis"): Likewise.
18778         ("*<vlnotop:code>_not1<VL:mode>_vis"): Likewise.
18779         ("*<vlnotop:code>_not2<VL:mode>_vis"): Likewise.
18780         ("one_cmpl<VL:mode>2"): Likewise.
18781         ("faligndata<VM64:mode>_vis"): Likewise.
18782         ("alignaddrsi_vis"): Likewise.
18783         ("alignaddrdi_vis"): Likweise.
18784         ("alignaddrlsi_vis"): Likewise.
18785         ("alignaddrldi_vis"): Likewise.
18786         ("fcmp<gcond:code><GCM:gcm_name><P:mode>_vis"): Likewise.
18787         ("bmaskdi_vis"): Likewise.
18788         ("bmasksi_vis"): Likewise.
18789         ("bshuffle<VM64:mode>_vis"): Likewise.
18790         ("cmask8<P:mode>_vis"): Likewise.
18791         ("cmask16<P:mode>_vis"): Likewise.
18792         ("cmask32<P:mode>_vis"): Likewise.
18793         ("pdistn<P:mode>_vis"): Likewise.
18794         ("<vis3_addsub_ss_patname><VASS:mode>3"): Likewise.
18796 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
18798         * config/sparc/sparc.md ("subtype"): New insn attribute.
18799         ("*wrgsr_sp64"): Set insn subtype.
18800         ("*rdgsr_sp64"): Likewise.
18801         ("alignaddrsi_vis"): Likewise.
18802         ("alignaddrdi_vis"): Likewise.
18803         ("alignaddrlsi_vis"): Likewise.
18804         ("alignaddrldi_vis"): Likewise.
18805         ("<plusminus_insn><VADDSUB:mode>3"): Likewise.
18806         ("fexpand_vis"): Likewise.
18807         ("fpmerge_vis"): Likewise.
18808         ("faligndata<VM64:mode>_vis"): Likewise.
18809         ("bshuffle<VM64:mode>_vis"): Likewise.
18810         ("cmask8<P:mode>_vis"): Likewise.
18811         ("cmask16<P:mode>_vis"): Likewise.
18812         ("cmask32<P:mode>_vis"): Likewise.
18813         ("fchksm16_vis"): Likewise.
18814         ("v<vis3_shift_patname><GCM:mode>3"): Likewise.
18815         ("fmean16_vis"): Likewise.
18816         ("fp<plusminus_insn>64_vis"): Likewise.
18817         ("<plusminus_insn>v8qi3"): Likewise.
18818         ("<vis3_addsub_ss_patname><VASS:mode>3"): Likewise.
18819         ("<vis4_minmax_patname><VMMAX:mode>3"): Likewise.
18820         ("<vis4_uminmax_patname><VMMAX:mode>3"): Likewise.
18821         ("<vis3_addsub_ss_patname>v8qi3"): Likewise.
18822         ("<vis4_addsub_us_patname><VAUS:mode>3"): Likewise.
18823         ("*movqi_insn"): Likewise.
18824         ("*movhi_insn"): Likewise.
18825         ("*movsi_insn"): Likewise.
18826         ("movsi_pic_gotdata_op"): Likewise.
18827         ("*movdi_insn_sp32"): Likewise.
18828         ("*movdi_insn_sp64"): Likewise.
18829         ("movdi_pic_gotdata_op"): Likewise.
18830         ("*movsf_insn"): Likewise.
18831         ("*movdf_insn_sp32"): Likewise.
18832         ("*movdf_insn_sp64"): Likewise.
18833         ("*zero_extendhisi2_insn"): Likewise.
18834         ("*zero_extendqihi2_insn"): Likewise.
18835         ("*zero_extendqisi2_insn"): Likewise.
18836         ("*zero_extendqidi2_insn"): Likewise.
18837         ("*zero_extendhidi2_insn"): Likewise.
18838         ("*zero_extendsidi2_insn_sp64"): Likewise.
18839         ("ldfsr"): Likewise.
18840         ("prefetch_64"): Likewise.
18841         ("prefetch_32"): Likewise.
18842         ("tie_ld32"): Likewise.
18843         ("tie_ld64"): Likewise.
18844         ("*tldo_ldub_sp32"): Likewise.
18845         ("*tldo_ldub1_sp32"): Likewise.
18846         ("*tldo_ldub2_sp32"): Likewise.
18847         ("*tldo_ldub_sp64"): Likewise.
18848         ("*tldo_ldub1_sp64"): Likewise.
18849         ("*tldo_ldub2_sp64"): Likewise.
18850         ("*tldo_ldub3_sp64"): Likewise.
18851         ("*tldo_lduh_sp32"): Likewise.
18852         ("*tldo_lduh1_sp32"): Likewise.
18853         ("*tldo_lduh_sp64"): Likewise.
18854         ("*tldo_lduh1_sp64"): Likewise.
18855         ("*tldo_lduh2_sp64"): Likewise.
18856         ("*tldo_lduw_sp32"): Likewise.
18857         ("*tldo_lduw_sp64"): Likewise.
18858         ("*tldo_lduw1_sp64"): Likewise.
18859         ("*tldo_ldx_sp64"): Likewise.
18860         ("*mov<VM32:mode>_insn"): Likewise.
18861         ("*mov<VM64:mode>_insn_sp64"): Likewise.
18862         ("*mov<VM64:mode>_insn_sp32"): Likewise.
18864 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
18866         * config/sparc/sparc.md ("type"): New insn type viscmp.
18867         ("fcmp<gcond:code><GCM:gcm_name><P:mode>_vis"): Set insn type to
18868         viscmp.
18869         ("fpcmp<gcond:code>8<P:mode>_vis"): Likewise.
18870         ("fucmp<gcond:code>8<P:mode>_vis"): Likewise.
18871         ("fpcmpu<gcond:code><GCM:gcm_name><P:mode>_vis"): Likewise.
18872         * config/sparc/niagara7.md ("n7_vis_logical_v3pipe"): Handle
18873         viscmp.
18874         ("n7_vis_logical_11cycle"): Likewise.
18875         * config/sparc/niagara4.md ("n4_vis_logical"): Likewise.
18876         * config/sparc/niagara2.md ("niag3_vis": Likewise.
18877         * config/sparc/niagara.md ("niag_vis"): Likewise.
18878         * config/sparc/ultra3.md ("us3_fga"): Likewise.
18879         * config/sparc/ultra1_2.md ("us1_fga_double"): Likewise.
18881 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
18883         * config/sparc/sparc.md: New instruction type `bmask'.
18884         (bmaskdi_vis): Use the `bmask' type.
18885         (bmasksi_vis): Likewise.
18886         * config/sparc/ultra3.md (us3_array): Likewise.
18887         * config/sparc/niagara7.md (n7_array): Likewise.
18888         * config/sparc/niagara4.md (n4_array): Likewise.
18889         * config/sparc/niagara2.md (niag2_vis): Likewise.
18890         (niag3_vis): Likewise.
18891         * config/sparc/niagara.md (niag_vis): Likewise.
18893 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
18895         * ipa-comdats.c: Remove optimize check from gate.
18896         * ipa-fnsummary.c (ipa_fn_summary_generate): do not generate summary
18897         for functions not optimized.
18898         (ipa_fn_summary_read): Skip optimize check.
18899         (ipa_fn_summary_write): Likewise.
18900         * ipa-inline-analysis.c (do_estimate_growth_1): Check that caller
18901         is optimized.
18902         * ipa-inline.c (can_inline_edge_p): Not optimized functions are
18903         uninlinable.
18904         (can_inline_edge_p): Check flag_pcc_struct_return for match.
18905         (check_callers): Give up on caller which is not optimized.
18906         (inline_small_functions): Likewise.
18907         (ipa_inline): Do not give up when not optimizing.
18908         * ipa-visbility.c (function_and_variable_visibility): Do not optimize
18909         away unoptimizes cdtors.
18910         (whole_program_function_and_variable_visibility): Do
18911         ipa_discover_readonly_nonaddressable_vars in LTO mode.
18912         * ipa.c (process_references): Do not check optimize.
18913         (symbol_table::remove_unreachable_nodes): Update optimize check.
18914         (set_writeonly_bit): Update optimize check.
18915         (pass_ipa_cdtor_merge::gate): Do not check optimize.
18916         (pass_ipa_single_use::gate): Remove.
18918 2017-07-06  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18920         * config/rs6000/rs6000.c (union_defs, union_uses, insn_is_load_p,
18921         insn_is_store_p, insn_is_swap_p, const_load_sequence_p, v2df_reduction_p,
18922         rtx_is_swappable_p, insn_is_swappable_p, chain_contains_only_swaps,
18923         mark_swaps_for_removal, swap_const_vector_halves, adjust_subreg_index,
18924         permute_load, permute_store, adjust_extract, adjust_splat,
18925         adjust_xxpermdi, adjust_concat, adjust_vperm, handle_special_swappables,
18926         replace_swap_with_copy, dump_swap_insn_table,
18927         alignment_with_canonical_addr, alignment_mask, find_alignment_op,
18928         recombine_lvx_pattern, recombine_stvx_pattern,
18929         recombine_lvx_stvx_patterns, rs6000_analyze_swaps,
18930         make_pass_analyze_swaps): Move all code related to p8 swap optimizations
18931         to file rs6000-p8swap.c.
18932         * config/rs6000/rs6000-p8swap.c: New file.
18933         * config/rs6000/t-rs6000: Add rule to build rs6000-p8swap.o.
18934         * config.gcc: Add rs6000-p8swap.o to extra_objs for powerpc*-*-*
18935         and rs6000*-*-* targets.
18937 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
18939         * Makefile.in (selftest): Remove dependency on s-selftest-c++.
18941 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
18943         * lto-wrapper.c (merge_and_complain): Do not merge
18944         fexceptions, fnon_call_exceptions, ftrapv, ffp_contract_, fmath_errno,
18945         fsigned_zeros, ftrapping_math, fwrapv.
18946         (append_compiler_options): Do not track these options.
18947         (append_linker_options): Likewie
18949 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
18951         * cgraphunit.c (cgraph_node::finalize_function): When
18952         !flag_toplevel_reorde set no_reorder flag.
18953         (varpool_node::finalize_decl): Likewise.
18954         (symbol_table::compile): Drop no toplevel reorder path.
18956 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
18958         * bb-reorder.c (better_edge_p): Do not build traces across abnormal/eh
18959         edges; zero probability is not better than uninitialized.
18961 2017-07-06  Maxim Ostapenko  <m.ostapenko@samsung.com>
18963         * asan.h (asan_sanitize_allocas_p): Declare.
18964         * asan.c (asan_sanitize_allocas_p): New function.
18965         (handle_builtin_stack_restore): Bail out if !asan_sanitize_allocas_p.
18966         (handle_builtin_alloca): Likewise.
18967         * cfgexpand.c (expand_used_vars): Do not add allocas unpoisoning stuff
18968         if !asan_sanitize_allocas_p.
18969         * params.def (asan-instrument-allocas): Add new option.
18970         * params.h (ASAN_PROTECT_ALLOCAS): Define.
18971         * opts.c (common_handle_option): Disable allocas sanitization for
18972         KASan by default.
18974 2017-07-06  Maxim Ostapenko  <m.ostapenko@samsung.com>
18976         * asan.c: Include gimple-fold.h.
18977         (get_last_alloca_addr): New function.
18978         (handle_builtin_stackrestore): Likewise.
18979         (handle_builtin_alloca): Likewise.
18980         (asan_emit_allocas_unpoison): Likewise.
18981         (get_mem_refs_of_builtin_call): Add new parameter, remove const
18982         quallifier from first paramerer. Handle BUILT_IN_ALLOCA,
18983         BUILT_IN_ALLOCA_WITH_ALIGN and BUILT_IN_STACK_RESTORE builtins.
18984         (instrument_builtin_call): Pass gimple iterator to
18985         get_mem_refs_of_builtin_call.
18986         (last_alloca_addr): New global.
18987         * asan.h (asan_emit_allocas_unpoison): Declare.
18988         * builtins.c (expand_asan_emit_allocas_unpoison): New function.
18989         (expand_builtin): Handle BUILT_IN_ASAN_ALLOCAS_UNPOISON.
18990         * cfgexpand.c (expand_used_vars): Call asan_emit_allocas_unpoison
18991         if function calls alloca.
18992         * gimple-fold.c (replace_call_with_value): Remove static keyword.
18993         * gimple-fold.h (replace_call_with_value): Declare.
18994         * internal-fn.c: Include asan.h.
18995         * sanitizer.def (BUILT_IN_ASAN_ALLOCA_POISON,
18996         BUILT_IN_ASAN_ALLOCAS_UNPOISON): New builtins.
18998 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
19000         * Makefile.in (SELFTEST_FLAGS): Drop "-x c", moving it to...
19001         (C_SELFTEST_FLAGS): New.
19002         (CPP_SELFTEST_FLAGS): New.
19003         (SELFTEST_DEPS): New, from deps of s-selftest.
19004         (C_SELFTEST_DEPS): New, from deps of s-selftest.
19005         (CPP_SELFTEST_DEPS): New.
19006         (selftest): Add dependency on s-selftest-c++.
19007         (s-selftest): Rename to...
19008         (s-selftest-c): ...this, moving deps to SELFTEST_DEPS
19009         and C_SELFTEST_DEPS, and using C_SELFTEST_FLAGS rather
19010         than SELFTEST_FLAGS.
19011         (selftest-gdb): Rename to...
19012         (selftest-c-gdb): ...this, using C_SELFTEST_DEPS and
19013         C_SELFTEST_FLAGS.
19014         (selftest-gdb): Reintroduce as an alias for selftest-c-gdb.
19015         (selftest-valgrind): Rename to...
19016         (selftest-c-valgrind): ...this, using C_SELFTEST_DEPS and
19017         C_SELFTEST_FLAGS.
19018         (selftest-valgrind): Reintroduce as an alias for
19019         selftest-c-valgrind.
19020         (s-selftest-c++): New.
19021         (selftest-c++-gdb): New.
19022         (selftest-c++-valgrind): New.
19024 2017-07-06  Olivier Hainque  <hainque@adacore.com>
19026         * gcc.c (process_command): When deciding if undefined variables
19027         should be ignored when processing specs, accept "gcc -v" as well.
19029 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
19031         * auto-profile.c (afdo_set_bb_count, afdo_propagate_edge,
19032         afdo_annotate_cfg): Set counts/probabilities as determined by afdo.
19034 2017-07-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19036         * config/arm/arm-cpus.in (armv8-r): Add new entry.
19037         * config/arm/arm-isa.h (ISA_ARMv8r): Define macro.
19038         * config/arm/arm-tables.opt: Regenerate.
19039         * config/arm/arm.h (enum base_architecture): Add BASE_ARCH_8R
19040         enumerator.
19041         * doc/invoke.texi: Mention -march=armv8-r and its extensions.
19043 2017-07-06  Carl Love  <cel@us.ibm.com>
19045         * ChangeLog: Clean up from mid air collision
19047 2017-07-06  Carl Love  <cel@us.ibm.com>
19049         * config/rs6000/rs6000-c.c: Add support for built-in functions
19050         vector signed int vec_subc (vector signed int, vector signed int);
19051         vector signed __int128 vec_subc (vector signed __int128,
19052                                          vector signed __int128);
19053         vector unsigned __int128 vec_subc (vector unsigned __int128,
19054                                            vector unsigned __int128);
19055         vector signed int vec_sube (vector signed int, vector signed int,
19056                                     vector signed int);
19057         vector unsigned int vec_sube (vector unsigned int,
19058                                       vector unsigned int,
19059                                       vector unsigned int);
19060         vector signed __int128 vec_sube (vector signed __int128,
19061                                          vector signed __int128,
19062                                          vector signed__int128);
19063         vector unsigned __int128 vec_sube (vector unsigned __int128,
19064                                            vector unsigned __int128,
19065                                            vector unsigned __int128);
19066         vector signed int vec_subec (vector signed int, vector signed int,
19067                                      vector signed int);
19068         vector unsigned int vec_subec (vector unsigned int,
19069                                        vector unsigned int,
19070                                        vector unsigned int);
19071         vector signed __int128 vec_subec (vector signed __int128,
19072                                           vector signed __int128,
19073                                           vector signed__int128);
19074         vector unsigned __int128 vec_subec (vector unsigned __int128,
19075                                             vector unsigned __int128,
19076                                             vector unsigned __int128);
19077         * config/rs6000/rs6000.c (ALTIVEC_BUILTIN_VEC_SUBE,
19078         ALTIVEC_BUILTIN_VEC_SUBEC): Add ef_builtins.
19079         * config/rs6000/rs6000-builtin.def (SUBE, SUBEC): Add
19080         BU_ALTIVEC_OVERLOAD_X definitions.
19081         * config/rs6000/altivec.h (vec_sube, vec_subec): Add builtin defines.
19082         * doc/extend.texi: Update the built-in documentation file for the new
19083         built-in functions.
19085 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
19087         PR c++/79300
19088         * diagnostic-show-locus.c (layout::layout): Use start and finish
19089         spelling location for the start and finish of each range.
19090         * genmatch.c (linemap_client_expand_location_to_spelling_point):
19091         Add unused aspect param.
19092         * input.c (expand_location_1): Add "aspect" param, and use it
19093         to access the correct part of the location.
19094         (expand_location): Pass LOCATION_ASPECT_CARET to new param of
19095         expand_location_1.
19096         (expand_location_to_spelling_point): Likewise.
19097         (linemap_client_expand_location_to_spelling_point): Add "aspect"
19098         param, and pass it to expand_location_1.
19100 2017-07-06  Sebastian Peryt  <sebastian.peryt@intel.com>
19102         * config/i386/avx512fintrin.h (_mm_mask_getexp_round_ss,
19103         _mm_maskz_getexp_round_ss, _mm_mask_getexp_round_sd,
19104         _mm_maskz_getexp_round_sd, _mm_mask_getmant_round_sd,
19105         _mm_maskz_getmant_round_sd, _mm_mask_getmant_round_ss,
19106         _mm_maskz_getmant_round_ss, _mm_mask_getexp_ss, _mm_maskz_getexp_ss,
19107         _mm_mask_getexp_sd, _mm_maskz_getexp_sd, _mm_mask_getmant_sd,
19108         _mm_maskz_getmant_sd, _mm_mask_getmant_ss,
19109         _mm_maskz_getmant_ss): New intrinsics.
19110         (__builtin_ia32_getexpss128_mask): Changed to ...
19111         __builtin_ia32_getexpss128_round ... this.
19112         (__builtin_ia32_getexpsd128_mask): Changed to ...
19113         __builtin_ia32_getexpsd128_round ... this.
19114         * config/i386/i386-builtin-types.def
19115         ((V2DF, V2DF, V2DF, INT, V2DF, UQI, INT),
19116         (V4SF, V4SF, V4SF, INT, V4SF, UQI, INT)): New function type aliases.
19117         * config/i386/i386-builtin.def (__builtin_ia32_getexpsd_mask_round,
19118         __builtin_ia32_getexpss_mask_round,     __builtin_ia32_getmantsd_mask_round,
19119         __builtin_ia32_getmantss_mask_round): New builtins.
19120         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_INT_V2DF_UQI_INT,
19121         V4SF_FTYPE_V4SF_V4SF_INT_V4SF_UQI_INT): Handle new types.
19122         (CODE_FOR_avx512f_vgetmantv2df_mask_round,
19123         CODE_FOR_avx512f_vgetmantv4sf_mask_round): New cases.
19124         * config/i386/sse.md
19125         (avx512f_sgetexp<mode><round_saeonly_name>): Changed to ...
19126         avx512f_sgetexp<mode><mask_scalar_name>
19127         <round_saeonly_scalar_name> ... this.
19128         (vgetexp<ssescalarmodesuffix>\t{<round_saeonly_op3>%2, %1, %0|
19129         %0, %1, %2<round_saeonly_op3>}): Changed to ...
19130         vgetexp<ssescalarmodesuffix>
19131         \t{<round_saeonly_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
19132         %0<mask_scalar_operand3>, %1, %2<round_saeonly_scalar_mask_op3>} ... this.
19133         (avx512f_vgetmant<mode><round_saeonly_name>): Changed to ...
19134         avx512f_vgetmant<mode><mask_scalar_name>
19135         <round_saeonly_scalar_name> ... this.
19136         (vgetmant<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
19137         %0, %1, %2<round_saeonly_op4>, %3}): Changed to ...
19138         vgetmant<ssescalarmodesuffix>
19139         \t{%3, <round_saeonly_scalar_mask_op4>%2, %1, %0<mask_scalar_operand4>|
19140         %0<mask_scalar_operand4>, %1, %2
19141         <round_saeonly_scalar_mask_op4>, %3} ... this.
19142         * config/i386/subst.md (mask_scalar_operand4,
19143         round_saeonly_scalar_mask_operand4,     round_saeonly_scalar_mask_op4,
19144         round_saeonly_scalar_nimm_predicate): New subst attributes.
19146 2017-07-06  Julia Koval  <julia.koval@intel.com>
19148         * config/i386/i386.c (ix86_erase_embedded_rounding):
19149         Remove code for old rounding pattern.
19151 2017-07-06  Richard Earnshaw  <rearnsha@arm.com>
19153         * config/arm/t-arm (GTM_H): Add arm-cpu.h.
19155 2017-07-06  Christophe Lyon  <christophe.lyon@linaro.org>
19157         * doc/sourcebuild.texi (Test Directives, Variants of
19158         dg-require-support): Add documentation for dg-require-stack-check.
19160 2017-07-05  Sebastian Peryt  <sebastian.peryt@intel.com>
19162         * config/i386/subst.md (mask_scalar, round_scalar,
19163         round_saeonly_scalar): New meta-templates.
19164         (mask_scalar_name, mask_scalar_operand3, round_scalar_name,
19165         round_scalar_mask_operand3, round_scalar_mask_op3,
19166         round_scalar_constraint, round_scalar_prefix, round_saeonly_scalar_name,
19167         round_saeonly_scalar_mask_operand3, round_saeonly_scalar_mask_op3,
19168         round_saeonly_scalar_constraint,
19169         round_saeonly_scalar_prefix): New subst attribute.
19170         * config/i386/sse.md
19171         (<sse>_vm<plusminus_insn><mode>3<mask_name><round_name>): Renamed to ...
19172         <sse>_vm<plusminus_insn><mode>3<mask_scalar_name>
19173         <round_scalar_name> ... this.
19174         (<sse>_vm<multdiv_mnemonic><mode>3<mask_name><round_name>): Renamed to ...
19175         <sse>_vm<multdiv_mnemonic><mode>3<mask_scalar_name>
19176         <round_scalar_name> ... this.
19177         (<sse>_vm<code><mode>3<mask_name><round_saeonly_name>): Renamed to ...
19178         <sse>_vm<code><mode>3<mask_scalar_name>
19179         <round_saeonly_scalar_name> ... this.
19180         (v<plusminus_mnemonic><ssescalarmodesuffix>
19181         \t{<round_mask_op3>%2, %1, %0<mask_operand3>|
19182         %0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}): Changed to ...
19183         v<plusminus_mnemonic><ssescalarmodesuffix>
19184         \t{<round_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
19185         %0<mask_scalar_operand3>, %1, %<iptr>2<round_scalar_mask_op3>} ... this.
19186         (v<multdiv_mnemonic><ssescalarmodesuffix>
19187         \t{<round_mask_op3>%2, %1, %0<mask_operand3>|
19188         %0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}): Changed to ...
19189         v<multdiv_mnemonic><ssescalarmodesuffix>
19190         \t{<round_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
19191         %0<mask_scalar_operand3>, %1, %<iptr>2<round_scalar_mask_op3>} ... this.
19192         (v<maxmin_float><ssescalarmodesuffix>
19193         \t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|
19194         %0<mask_operand3>, %1, %<iptr>2<round_saeonly_mask_op3>}): Changed to ...
19195         v<maxmin_float><ssescalarmodesuffix>
19196         \t{<round_saeonly_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
19197         %0<mask_scalar_operand3>, %1, %<iptr>2
19198         <round_saeonly_scalar_mask_op3>} ... this.
19200 2017-07-05  Richard Earnshaw  <rearnsha@arm.com>
19202         * config/arm/arm.c (arm_fixed_condition_code_regs): New function.
19203         (TARGET_FIXED_CONDITION_CODE_REGS): Redefine.
19205 2017-07-05  Richard Sandiford  <richard.sandiford@linaro.org>
19206             Alan Hayward  <alan.hayward@arm.com>
19207             David Sherwood  <david.sherwood@arm.com>
19209         * combine.c (simplify_if_then_else): Remove "enum" before
19210         "machine_mode".
19211         * compare-elim.c (can_eliminate_compare): Likewise.
19212         * config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type):
19213         Likewise.
19214         (aarch64_lookup_simd_builtin_type): Likewise.
19215         (aarch64_simd_builtin_type): Likewise.
19216         (aarch64_init_simd_builtin_types): Likewise.
19217         (aarch64_simd_expand_args): Likewise.
19218         * config/aarch64/aarch64-protos.h (aarch64_simd_attr_length_rglist):
19219         Likewise.
19220         (aarch64_reverse_mask): Likewise.
19221         (aarch64_simd_emit_reg_reg_move): Likewise.
19222         (aarch64_gen_adjusted_ldpstp): Likewise.
19223         (aarch64_ccmp_mode_to_code): Likewise.
19224         (aarch64_operands_ok_for_ldpstp): Likewise.
19225         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
19226         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
19227         Likewise.
19228         (aarch64_min_divisions_for_recip_mul): Likewise.
19229         (aarch64_reassociation_width): Likewise.
19230         (aarch64_get_condition_code_1): Likewise.
19231         (aarch64_simd_emit_reg_reg_move): Likewise.
19232         (aarch64_simd_attr_length_rglist): Likewise.
19233         (aarch64_reverse_mask): Likewise.
19234         (aarch64_operands_ok_for_ldpstp): Likewise.
19235         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
19236         (aarch64_gen_adjusted_ldpstp): Likewise.
19237         * config/aarch64/cortex-a57-fma-steering.c (fma_node::rename):
19238         Likewise.
19239         * config/arc/arc.c (legitimate_offset_address_p): Likewise.
19240         * config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise.
19241         (arm_lookup_simd_builtin_type): Likewise.
19242         (arm_simd_builtin_type): Likewise.
19243         (arm_init_simd_builtin_types): Likewise.
19244         (arm_expand_builtin_args): Likewise.
19245         * config/arm/arm-protos.h (arm_expand_builtin): Likewise.
19246         * config/ft32/ft32.c (ft32_libcall_value): Likewise.
19247         (ft32_setup_incoming_varargs): Likewise.
19248         (ft32_function_arg): Likewise.
19249         (ft32_function_arg_advance): Likewise.
19250         (ft32_pass_by_reference): Likewise.
19251         (ft32_arg_partial_bytes): Likewise.
19252         (ft32_valid_pointer_mode): Likewise.
19253         (ft32_addr_space_pointer_mode): Likewise.
19254         (ft32_addr_space_legitimate_address_p): Likewise.
19255         * config/i386/i386-protos.h (ix86_operands_ok_for_move_multiple):
19256         Likewise.
19257         * config/i386/i386.c (ix86_setup_incoming_vararg_bounds): Likewise.
19258         (ix86_emit_outlined_ms2sysv_restore): Likewise.
19259         (iamcu_alignment): Likewise.
19260         (canonicalize_vector_int_perm): Likewise.
19261         (ix86_noce_conversion_profitable_p): Likewise.
19262         (ix86_mpx_bound_mode): Likewise.
19263         (ix86_operands_ok_for_move_multiple): Likewise.
19264         * config/microblaze/microblaze-protos.h
19265         (microblaze_expand_conditional_branch_reg): Likewise.
19266         * config/microblaze/microblaze.c
19267         (microblaze_expand_conditional_branch_reg): Likewise.
19268         * config/powerpcspe/powerpcspe.c (rs6000_init_hard_regno_mode_ok):
19269         Likewise.
19270         (rs6000_reassociation_width): Likewise.
19271         (rs6000_invalid_binary_op): Likewise.
19272         (fusion_p9_p): Likewise.
19273         (emit_fusion_p9_load): Likewise.
19274         (emit_fusion_p9_store): Likewise.
19275         * config/riscv/riscv-protos.h (riscv_regno_mode_ok_for_base_p):
19276         Likewise.
19277         (riscv_hard_regno_mode_ok_p): Likewise.
19278         (riscv_address_insns): Likewise.
19279         (riscv_split_symbol): Likewise.
19280         (riscv_legitimize_move): Likewise.
19281         (riscv_function_value): Likewise.
19282         (riscv_hard_regno_nregs): Likewise.
19283         (riscv_expand_builtin): Likewise.
19284         * config/riscv/riscv.c (riscv_build_integer_1): Likewise.
19285         (riscv_build_integer): Likewise.
19286         (riscv_split_integer): Likewise.
19287         (riscv_legitimate_constant_p): Likewise.
19288         (riscv_cannot_force_const_mem): Likewise.
19289         (riscv_regno_mode_ok_for_base_p): Likewise.
19290         (riscv_valid_base_register_p): Likewise.
19291         (riscv_valid_offset_p): Likewise.
19292         (riscv_valid_lo_sum_p): Likewise.
19293         (riscv_classify_address): Likewise.
19294         (riscv_legitimate_address_p): Likewise.
19295         (riscv_address_insns): Likewise.
19296         (riscv_load_store_insns): Likewise.
19297         (riscv_force_binary): Likewise.
19298         (riscv_split_symbol): Likewise.
19299         (riscv_force_address): Likewise.
19300         (riscv_legitimize_address): Likewise.
19301         (riscv_move_integer): Likewise.
19302         (riscv_legitimize_const_move): Likewise.
19303         (riscv_legitimize_move): Likewise.
19304         (riscv_address_cost): Likewise.
19305         (riscv_subword): Likewise.
19306         (riscv_output_move): Likewise.
19307         (riscv_canonicalize_int_order_test): Likewise.
19308         (riscv_emit_int_order_test): Likewise.
19309         (riscv_function_arg_boundary): Likewise.
19310         (riscv_pass_mode_in_fpr_p): Likewise.
19311         (riscv_pass_fpr_single): Likewise.
19312         (riscv_pass_fpr_pair): Likewise.
19313         (riscv_get_arg_info): Likewise.
19314         (riscv_function_arg): Likewise.
19315         (riscv_function_arg_advance): Likewise.
19316         (riscv_arg_partial_bytes): Likewise.
19317         (riscv_function_value): Likewise.
19318         (riscv_pass_by_reference): Likewise.
19319         (riscv_setup_incoming_varargs): Likewise.
19320         (riscv_print_operand): Likewise.
19321         (riscv_elf_select_rtx_section): Likewise.
19322         (riscv_save_restore_reg): Likewise.
19323         (riscv_for_each_saved_reg): Likewise.
19324         (riscv_register_move_cost): Likewise.
19325         (riscv_hard_regno_mode_ok_p): Likewise.
19326         (riscv_hard_regno_nregs): Likewise.
19327         (riscv_class_max_nregs): Likewise.
19328         (riscv_memory_move_cost): Likewise.
19329         * config/rl78/rl78-protos.h (rl78_split_movsi): Likewise.
19330         * config/rl78/rl78.c (rl78_split_movsi): Likewise.
19331         (rl78_addr_space_address_mode): Likewise.
19332         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
19333         Likewise.
19334         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
19335         (rs6000_reassociation_width): Likewise.
19336         (rs6000_invalid_binary_op): Likewise.
19337         (fusion_p9_p): Likewise.
19338         (emit_fusion_p9_load): Likewise.
19339         (emit_fusion_p9_store): Likewise.
19340         * config/visium/visium-protos.h (prepare_move_operands): Likewise.
19341         (ok_for_simple_move_operands): Likewise.
19342         (ok_for_simple_move_strict_operands): Likewise.
19343         (ok_for_simple_arith_logic_operands): Likewise.
19344         (visium_legitimize_reload_address): Likewise.
19345         (visium_select_cc_mode): Likewise.
19346         (output_cbranch): Likewise.
19347         (visium_split_double_move): Likewise.
19348         (visium_expand_copysign): Likewise.
19349         (visium_expand_int_cstore): Likewise.
19350         (visium_expand_fp_cstore): Likewise.
19351         * config/visium/visium.c (visium_pass_by_reference): Likewise.
19352         (visium_function_arg): Likewise.
19353         (visium_function_arg_advance): Likewise.
19354         (visium_libcall_value): Likewise.
19355         (visium_setup_incoming_varargs): Likewise.
19356         (visium_legitimate_constant_p): Likewise.
19357         (visium_legitimate_address_p): Likewise.
19358         (visium_legitimize_address): Likewise.
19359         (visium_secondary_reload): Likewise.
19360         (visium_register_move_cost): Likewise.
19361         (visium_memory_move_cost): Likewise.
19362         (prepare_move_operands): Likewise.
19363         (ok_for_simple_move_operands): Likewise.
19364         (ok_for_simple_move_strict_operands): Likewise.
19365         (ok_for_simple_arith_logic_operands): Likewise.
19366         (visium_function_value_1): Likewise.
19367         (rtx_ok_for_offset_p): Likewise.
19368         (visium_legitimize_reload_address): Likewise.
19369         (visium_split_double_move): Likewise.
19370         (visium_expand_copysign): Likewise.
19371         (visium_expand_int_cstore): Likewise.
19372         (visium_expand_fp_cstore): Likewise.
19373         (visium_split_cstore): Likewise.
19374         (visium_select_cc_mode): Likewise.
19375         (visium_split_cbranch): Likewise.
19376         (output_cbranch): Likewise.
19377         (visium_print_operand_address): Likewise.
19378         * expmed.c (flip_storage_order): Likewise.
19379         * expmed.h (emit_cstore): Likewise.
19380         (flip_storage_order): Likewise.
19381         * genrecog.c (validate_pattern): Likewise.
19382         * hsa-gen.c (gen_hsa_addr): Likewise.
19383         * internal-fn.c (expand_arith_overflow): Likewise.
19384         * ira-color.c (allocno_copy_cost_saving): Likewise.
19385         * lra-assigns.c (find_hard_regno_for_1): Likewise.
19386         * lra-constraints.c (prohibited_class_reg_set_mode_p): Likewise.
19387         (process_invariant_for_inheritance): Likewise.
19388         * lra-eliminations.c (move_plus_up): Likewise.
19389         * omp-low.c (lower_oacc_reductions): Likewise.
19390         * simplify-rtx.c (simplify_subreg): Likewise.
19391         * target.def (TARGET_SETUP_INCOMING_VARARG_BOUNDS): Likewise.
19392         (TARGET_CHKP_BOUND_MODE): Likewise..
19393         * targhooks.c (default_chkp_bound_mode): Likewise.
19394         (default_setup_incoming_vararg_bounds): Likewise.
19395         * targhooks.h (default_chkp_bound_mode): Likewise.
19396         (default_setup_incoming_vararg_bounds): Likewise.
19397         * tree-ssa-math-opts.c (divmod_candidate_p): Likewise.
19398         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
19399         (have_whole_vector_shift): Likewise.
19400         * tree-vect-stmts.c (vectorizable_load): Likewise.
19401         * doc/tm.texi: Regenerate.
19403 2017-07-05  Georg-Johann Lay  <avr@gjlay.de>
19405         Graceful degrade if Binutils PR21472 is not available.
19407         PR target/81072
19408         * configure.ac [target=avr]: WARN instead of ERROR if avrxmega3
19409         .rodata in flash test fails.
19410         (HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH): Define it if test passes.
19411         * confgure: Regenerate.
19412         * config.in: Regenerate.
19413         * config/avr/avr.c (avr_asm_named_section)
19414         [HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH]: Only trigger
19415         __do_copy_data for stuff in .rodata if flash_pm_offset = 0.
19416         (avr_asm_init_sections): Same.
19418 2017-07-05  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
19420         * config/arm/neon.md (fma<VCVTF:mode>4): Remove %?.
19421         (fma<VH:mode>4_intrinsic): Likewise.
19422         (*fmsub<VCVTF:mode>4): Likewise.
19423         (*fmsub<VH:mode>4_intrinsic): Likewise.
19425 2017-07-05  Georg-Johann Lay  <avr@gjlay.de>
19427         PR target/81305
19428         * config/avr/avr.c (avr_out_movhi_mr_r_xmega) [CONSTANT_ADDRESS_P]:
19429         Don't depend on "optimize > 0".
19430         (out_movhi_r_mr, out_movqi_mr_r): Same.
19431         (out_movhi_mr_r, out_movqi_r_mr): Same.
19432         (avr_address_cost) [CONSTANT_ADDRESS_P]: Don't depend cost for
19433         io_address_operand on "optimize > 0".
19435 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
19437         * tree-loop-distribution.c: Add general explanantion on the pass.
19438         (generate_loops_for_partition): Mark distributed loop.
19439         (pg_add_dependence_edges): New parameter.  Handle alias data
19440         dependence specially and record it in the parameter if asked.
19441         (struct pg_vdata, pg_edata, pg_edge_callback_data): New structs.
19442         (init_partition_graph_vertices, add_partition_graph_edge): New.
19443         (pg_skip_alias_edge, free_partition_graph_edata_cb): New.
19444         (free_partition_graph_vdata, build_partition_graph): New.
19445         (sort_partitions_by_post_order, merge_dep_scc_partitions): New.
19446         (pg_collect_alias_ddrs, break_alias_scc_partitions): New.
19447         (data_ref_segment_size, latch_dominated_by_data_ref): New.
19448         (compute_alias_check_pairs, version_loop_by_alias_check): New.
19449         (version_for_distribution_p, finalize_partitions): New.
19450         (distribute_loop): Handle alias data dependence specially.  Factor
19451         out loop fusion code as functions and call these functions.
19453 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
19455         * tree-loop-distribution.c (classify_partition): New parameter and
19456         better handle reduction statement.
19457         (rdg_build_partitions): Revise comment.
19458         (distribute_loop): Compute statements in all partitions and pass it
19459         to classify_partition.
19461 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
19463         * tree-loop-distribution.c (enum partition_type): New.
19464         (struct partition): New field type.
19465         (partition_merge_into): Add parameter.  Update partition type.
19466         (data_dep_in_cycle_p, update_type_for_merge): New functions.
19467         (build_rdg_partition_for_vertex): Compute partition type.
19468         (rdg_build_partitions): Dump partition type.
19469         (distribute_loop): Update calls to partition_merge_into.
19471 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
19473         * tree-loop-distribution.c (struct ddr_hasher): New.
19474         (ddr_hasher::hash, ::equal, get_data_dependence): New function.
19475         (ddrs_table): New.
19476         (classify_partition): Call get_data_dependence.
19477         (pg_add_dependence_edges): Ditto.
19478         (distribute_loop): Release data dependence hash table.
19480 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
19482         * tree-loop-distribution.c (ref_base_address): Delete.
19483         (similar_memory_accesses): Rename ...
19484         (share_memory_accesses): ... to this.  Check if partitions access
19485         the same memory reference.
19486         (distribute_loop): Call share_memory_accesses.
19488 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
19490         * tree-loop-distribution.c (struct partition): New field recording
19491         its data reference.
19492         (partition_alloc, partition_free): Init and release data refs.
19493         (partition_merge_into): Merge data refs.
19494         (build_rdg_partition_for_vertex): Collect data refs for partition.
19495         (pg_add_dependence_edges): Change parameters from vector to bitmap.
19496         Update uses.
19497         (distribute_loop): Remve data refs from vertice data of partition
19498         graph.
19500 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
19502         * tree-loop-distribution.c (params.h): Include header file.
19503         (MAX_DATAREFS_NUM, DR_INDEX): New macro.
19504         (datarefs_vec): New global var.
19505         (create_rdg_vertices): Use datarefs_vec directly.
19506         (free_rdg): Don't free data references.
19507         (build_rdg): Update use.  Don't free data references.
19508         (distribute_loop): Compute global variable for data references.
19509         Bail out if there are too many data references.
19511 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
19513         * tree-loop-distribution.c (loop_nest): New global var.
19514         (build_rdg): Use loop directly, rather than loop nest.
19515         (pg_add_dependence_edges): Remove loop nest parameter.  Use global
19516         variable directly.
19517         (distribute_loop): Compute global variable loop nest.  Update use.
19519 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
19521         * tree-loop-distribution.c (enum fuse_type, fuse_message): New.
19522         (partition_merge_into): New parameter.  Dump reason for fusion.
19523         (distribute_loop): Update use of partition_merge_into.
19525 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
19527         * tree-loop-distribution.c (bb_top_order_index): New.
19528         (bb_top_order_index_size, bb_top_order_cmp): New.
19529         (stmts_from_loop): Use topological order.
19530         (pass_loop_distribution::execute): Compute and release topological
19531         order for basic blocks.
19533 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
19535         * tree-loop-distribution.c (pass_loop_distribution::execute): Skip
19536         if no loops.
19538 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
19540         * cfgloop.h (struct loop): Add comment.  New field orig_loop_num.
19541         * cfgloopmanip.c (lv_adjust_loop_entry_edge): Comment change.
19542         * internal-fn.c (expand_LOOP_DIST_ALIAS): New function.
19543         * internal-fn.def (LOOP_DIST_ALIAS): New.
19544         * tree-vectorizer.c (fold_loop_vectorized_call): Rename to ...
19545         (fold_loop_internal_call): ... this.
19546         (vect_loop_dist_alias_call): New function.
19547         (set_uid_loop_bbs): Call fold_loop_internal_call.
19548         (vectorize_loops): Fold IFN_LOOP_VECTORIZED and IFN_LOOP_DIST_ALIAS
19549         internal calls.
19551 2017-07-04  Uros Bizjak  <ubizjak@gmail.com>
19553         PR target/81300
19554         * config/i386/i386.md (setcc + movzbl/and to xor + setcc peepholes):
19555         Require dead FLAGS_REG at the beginning of a peephole.
19557 2017-07-04  Uros Bizjak  <ubizjak@gmail.com>
19559         PR target/81294
19560         * config/i386/adxintrin.h (_subborrow_u32): Swap _X and _Y
19561         arguments in the call to __builtin_ia32_sbb_u32.
19562         (_subborrow_u64): Swap _X and _Y arguments in the call to
19563         __builtin_ia32_sbb_u64.
19565 2017-07-04  Jakub Jelinek  <jakub@redhat.com>
19567         PR debug/81278
19568         * tree-vrp.c (compare_assert_loc): Turn into a function template
19569         with stable template parameter.  Only test if a->e is NULL,
19570         !a->e == !b->e has been verified already.  Use e == NULL or
19571         e != NULL instead of e or ! e tests.  If stable is true, don't use
19572         iterative_hash_expr, on the other side allow a or b or both NULL
19573         and sort the NULLs last.
19574         (process_assert_insertions): Sort using compare_assert_loc<false>
19575         instead of compare_assert_loc, later sort using
19576         compare_assert_loc<true> before calling process_assert_insertions_for
19577         in a loop.  Use break instead of continue once seen NULL pointer.
19579 2017-07-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19581         * config/arm/driver-arm.c (arm_cpu_table): Add entry for ARM
19582         Cortex-R7 and Cortex-R8 processors.
19584 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
19586         * ipa-utils.c (ipa_merge_profiles): Fix merging when dst is
19587         uninitialized while src is not.
19589 2017-07-04  Richard Earnshaw  <rearnsha@arm.com>
19591         * common/config/arm/arm-common.c: Adjust include path for
19592         arm-cpu-cdata.h
19593         * config/arm/t-arm (TM_H): Adjust path for arm-cpu.h.
19594         (arm-cpu.h): Create in build directory.  Adjust dependency rules.
19595         (arm-cpu-data.h): Likewise.
19596         (arm-cpu-cdata.h): Likewise.
19597         * config/arm/arm-cpu.h: Delete.
19598         * config/arm/arm-cpu-cdata.h: Delete.
19599         * config/arm/arm-cpu-data.h: Delete.
19601 2017-07-04  James Greenhalgh  <james.greenhalgh@arm.com>
19603         * config/arm/arm-cpus.in (cortex-a55): New.
19604         (cortex-a75): Likewise.
19605         (cortex-a75.cortex-a55): Likewise.
19606         * config/arm/driver-arm.c (arm_cpu_table): Add cortex-a55 and
19607         cortex-a75.
19608         * doc/invoke.texi (-mcpu): Document cortex-a55 and cortex-a75.
19609         * config/arm/arm-cpu-cdata.h: Regenerate.
19610         * config/arm/arm-cpu-data.h: Regenerate.
19611         * config/arm/arm-cpu.h: Regenerate.
19612         * config/arm/arm-tables.opt: Regenerate.
19613         * config/arm/arm-tune.md: Regenerate.
19615 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
19617         * haifa-sched.c (sched_create_recovery_edges): Update profile.
19619 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
19621         * bb-reorder.c (better_edge_p): Fix handling of uninitialized
19622         probability.
19624 2017-07-04  Richard Sandiford  <richard.sandiford@linaro.org>
19626         PR tree-optimization/81292
19627         * tree-ssa-strlen.c (handle_builtin_strlen): When setting
19628         full_string_p, also call adjust_related_strinfos if the adjustment
19629         is simple, otherwise invalidate related strinfos.
19631 2017-07-04  Martin Liska  <mliska@suse.cz>
19633         PR sanitizer/81040
19634         * sanopt.c (sanitize_rewrite_addressable_params): Mark the
19635         newly created variable as DECL_IGNORED_P.
19637 2017-07-04  Martin Liska  <mliska@suse.cz>
19639         PR ipa/81293
19640         * ipa-inline.c (inline_small_functions):
19641         Use xstrdup_for_dump.
19643 2017-07-04  Tom de Vries  <tom@codesourcery.com>
19645         * graph.c (draw_cfg_edges): Save and restore EDGE_DFS_BACK.
19647 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
19649         PR target/81033
19650         * config/darwin.c (darwin_function_switched_text_sections):
19651         Fix spaces.
19653 2017-07-03  Jan Hubicka  <hubicka@ucw.cz>
19655         * tree-vect-loop-manip.c (vect_do_peeling): Fix scaling up.
19657 2017-07-03  Richard Earnshaw  <rearnsha@arm.com>
19659         * doc/invoke.texi (ARM Options): Add -mbe8 and -mbe32 to option summary.
19661 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
19663         * tree-vect-loop.c (vect_analyze_loop_2): Treat min_scalar_loop_bound,
19664         min_profitable_iters, and th as inclusive lower bounds.
19665         Fix LOOP_VINFO_PEELING_FOR_GAPS condition.
19666         (vect_estimate_min_profitable_iters): Return inclusive lower bounds
19667         for min_profitable_iters and min_profitable_estimate.
19668         (vect_transform_loop): Treat th as an inclusive lower bound.
19669         * tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
19671 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
19673         PR target/81033
19674         * config/darwin.c (darwin_function_switched_text_sections):
19675         Replace DECL_NAME with DECL_ASSEMBLER_NAME, split assemble_name_raw
19676         in two pieces, and suppress the use of buf.
19678 2017-07-03  Nathan Sidwell  <nathan@acm.org>
19680         * hash-table.h (hash_table_mod1): Fix indentation.
19682 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
19684         PR middle-end/81290
19685         * predict.c (force_edge_cold): Be more careful about propagation
19686         backward.
19687         * profile-count.h (profile_probability::guessed,
19688         profile_probability::fdo, profile_count::guessed, profile_count::fdo):
19689         New.
19690         * tree-ssa-threadupdate.c (recompute_probabilities): Result is guessed.
19692 2017-07-03  James Greenhalgh  <james.greenhalgh@arm.com>
19694         * doc/invoke.texi (rcpc architecture extension): Document it.
19696 2017-07-03  Richard Biener  <rguenther@suse.de>
19698         PR tree-optimization/60510
19699         * tree-vect-loop.c (vect_create_epilog_for_reduction): Pass in
19700         the scalar reduction PHI and use it.
19701         (vectorizable_reduction): Properly guard the single_defuse_cycle
19702         path for non-SLP reduction chains where we cannot use it.
19703         Rework reduc_def/index and vector type deduction.  Rework
19704         vector operand gathering during reduction op code-gen.
19705         * tree-vect-slp.c (vect_analyze_slp): For failed SLP reduction
19706         chains dissolve the chain and leave it to non-SLP reduction
19707         handling.
19709 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
19711         * tree-data-ref.h (dr_alignment): Declare.
19712         * tree-data-ref.c (dr_alignment): New function.
19713         * tree-vectorizer.h (dataref_aux): Remove base_element_aligned.
19714         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
19715         set it.
19716         * tree-vect-stmts.c (vectorizable_store): Use dr_alignment.
19718 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
19720         * tree-data-ref.h (innermost_loop_behavior): Add base_alignment
19721         and base_misalignment fields.
19722         (DR_BASE_ALIGNMENT, DR_BASE_MISALIGNMENT): New macros.
19723         * tree-data-ref.c: Include builtins.h.
19724         (dr_analyze_innermost): Set up the new innmost_loop_behavior fields.
19725         * tree-vectorizer.h (STMT_VINFO_DR_BASE_ALIGNMENT): New macro.
19726         (STMT_VINFO_DR_BASE_MISALIGNMENT): Likewise.
19727         * tree-vect-data-refs.c: Include tree-cfg.h.
19728         (vect_compute_data_ref_alignment): Use the new innermost_loop_behavior
19729         fields instead of calculating an alignment here.
19730         (vect_analyze_data_refs): Use dr_analyze_innermost.  Dump the new
19731         innermost_loop_behavior fields.
19733 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
19735         * tree-data-ref.h (innermost_loop_behavior): Add a step_alignment
19736         field.
19737         (DR_STEP_ALIGNMENT): New macro.
19738         * tree-vectorizer.h (STMT_VINFO_DR_STEP_ALIGNMENT): Likewise.
19739         * tree-data-ref.c (dr_analyze_innermost): Initalize step_alignment.
19740         (create_data_ref): Print it.
19741         * tree-vect-stmts.c (vectorizable_load): Use the step alignment
19742         to tell whether the step preserves vector (mis)alignment.
19743         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
19744         Move the check for an integer step and generalise to all INTEGER_CST.
19745         (vect_analyze_data_refs): Set DR_STEP_ALIGNMENT when setting DR_STEP.
19746         Print the outer step alignment.
19748 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
19750         * tree-data-ref.h (innermost_loop_behavior): Replace aligned_to
19751         with offset_alignment.
19752         (DR_ALIGNED_TO): Delete.
19753         (DR_OFFSET_ALIGNMENT): New macro.
19754         * tree-vectorizer.h (STMT_VINFO_DR_ALIGNED_TO): Delete.
19755         (STMT_VINFO_DR_OFFSET_ALIGNMENT): New macro.
19756         * tree-data-ref.c (dr_analyze_innermost): Update after above changes.
19757         (create_data_ref): Likewise.
19758         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
19759         (vect_analyze_data_refs): Likewise.
19760         * tree-if-conv.c (if_convertible_loop_p_1): Use memset before
19761         creating dummy innermost behavior.
19763 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
19765         * tree-data-ref.h (dr_analyze_innermost): Replace the dr argument
19766         with a "innermost_loop_behavior *" and refeence tree.
19767         * tree-data-ref.c (dr_analyze_innermost): Likewise.
19768         (create_data_ref): Update call accordingly.
19769         * tree-predcom.c (find_looparound_phi): Likewise.
19771 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
19773         * tree-vectorizer.h (_stmt_vec_info): Replace individual dr_*
19774         fields with dr_wrt_vec_loop.
19775         (STMT_VINFO_DR_BASE_ADDRESS, STMT_VINFO_DR_INIT, STMT_VINFO_DR_OFFSET)
19776         (STMT_VINFO_DR_STEP, STMT_VINFO_DR_ALIGNED_TO): Update accordingly.
19777         (STMT_VINFO_DR_WRT_VEC_LOOP): New macro.
19778         (vect_dr_behavior): New function.
19779         (vect_create_addr_base_for_vector_ref): Remove loop parameter.
19780         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
19781         vect_dr_behavior.  Use a step_preserves_misalignment_p boolean to
19782         track whether the step preserves the misalignment.
19783         (vect_create_addr_base_for_vector_ref): Remove loop parameter.
19784         Use vect_dr_behavior.
19785         (vect_setup_realignment): Update call accordingly.
19786         (vect_create_data_ref_ptr): Likewise.  Use vect_dr_behavior.
19787         * tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Update
19788         call to vect_create_addr_base_for_vector_ref.
19789         (vect_create_cond_for_align_checks): Likewise.
19790         * tree-vect-patterns.c (vect_recog_bool_pattern): Copy
19791         STMT_VINFO_DR_WRT_VEC_LOOP as a block.
19792         (vect_recog_mask_conversion_pattern): Likewise.
19793         * tree-vect-stmts.c (compare_step_with_zero): Use vect_dr_behavior.
19794         (new_stmt_vec_info): Remove redundant zeroing.
19796 2017-07-03  Richard Earnshaw  <rearnsha@arm.com>
19798         * common/config/arm/arm-common.c (arm_be8_option): New function.
19799         * config/arm/arm-isa.h (isa_feature): Add new feature bit isa_bit_be8.
19800         (ISA_ARMv6): Add isa_bit_be8.
19801         * config/arm/arm.h (arm_be8_option): Add prototype.
19802         (BE8_SPEC_FUNCTION): New define.
19803         (EXTRA_SPEC_FUNCTIONS): Add BE8_SPEC_FUNCTION.
19804         * config/arm/arm.opt (mbig-endian): Mark as Negative of mlittle-endian.
19805         (mlittle-endian): Similarly.
19806         (mbe8, mbe32): New options.
19807         * config/arm/bpabi.h (BE8_LINK_SPEC): Call arm_be8_option.
19808         * doc/invoke.texi (ARM Options): Document -mbe8 and -mbe32.
19810 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
19812         * tree-cfg.c (gimple_find_sub_bbs): Fix profile updating.
19814 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
19816         * tree-cfgcleanup.c (want_merge_blocks_p): New function.
19817         (cleanup_tree_cfg_bb): Use it.
19818         * profile-count.h (profile_count::of_for_merging, profile_count::merge):
19819         New functions.
19820         * tree-cfg.c (gimple_merge_blocks): Use profile_count::merge.
19822 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
19824         PR bootstrap/81285
19825         * loop-doloop.c (add_test): Update profile.
19827 2017-07-03  Martin Liska  <mliska@suse.cz>
19829         PR sanitize/81040
19830         * sanopt.c (rewrite_usage_of_param): New function.
19831         (sanitize_rewrite_addressable_params): Likewise.
19832         (pass_sanopt::execute): Call rewrite_usage_of_param.
19834 2017-07-03  Richard Biener  <rguenther@suse.de>
19836         * tree-vect-loop.c (vect_create_epilog_for_reduction): Revert
19837         back to using VIEW_CONVERT_EXPR.
19839 2017-07-03  Martin Liska  <mliska@suse.cz>
19841         PR other/78366
19842         * doc/extend.texi: Document when a resolver function is
19843         generated for target_clones.
19845 2017-07-03  Martin Liska  <mliska@suse.cz>
19847         * asan.c (asan_emit_stack_protection): Unpoison just red zones
19848         and shadow memory of auto variables which are subject of
19849         use-after-scope sanitization.
19850         (asan_expand_mark_ifn): Add do set only when is_poison.
19852 2016-07-03  Richard Biener  <rguenther@suse.de>
19854         * tree-vect-loop.c (vect_analyze_loop_operations): Also analyze
19855         reduction PHIs.
19856         (vect_force_simple_reduction): Record reduction def -> phi mapping.
19857         (vectorizable_reduction): Perform reduction PHI creation when
19858         visiting a reduction PHI and adjust and simplify code generation
19859         phase of the reduction op.  Cache dts, use fold_binary, not fold_build2.
19860         (vect_transform_loop): Visit reduction PHIs.
19861         * tree-vect-slp.c (vect_get_and_check_slp_defs): Record reduction
19862         defs into the SLP tree.
19863         (vect_build_slp_tree): Reduction defs terminate the recursion.
19864         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Allow lookup
19865         of reduction defs.
19866         (vect_get_vec_defs_for_stmt_copy): Export.
19867         (vect_get_vec_defs): Likewise.
19868         * tree-vectorizer.h (struct _stmt_vec_info): Amend reduc_def
19869         purpose.
19870         (vect_get_vec_defs_for_stmt_copy): Declare.
19871         (vect_get_vec_defs): Likewise.
19873 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
19875         * tree-data-ref.c (dr_analyze_innermost): Replace the "nest"
19876         parameter with a "loop" parameter and use it instead of the
19877         loop containing DR_STMT.  Don't check simple_iv when doing
19878         BB analysis.  Describe the two analysis modes in the comment.
19880 2017-07-03  Tom de Vries  <tom@codesourcery.com>
19882         PR tree-optimization/69468
19883         * tree-ssa-tail-merge.c (ignore_edge_flags): New constant.
19884         (find_same_succ_bb): Handle ignore_edge_flags.
19886 2017-07-03  Tom de Vries  <tom@codesourcery.com>
19888         PR tree-optimization/81192
19889         * tree-ssa-tail-merge.c (same_succ_hash): Use bb->loop_father->num in
19890         hash.
19891         (same_succ::equal): Don't find bbs to be equal if bb->loop_father
19892         differs.
19893         (find_same_succ_bb): Remove obsolete test on bb->loop_father->latch.
19895 2017-07-03  Tom de Vries  <tom@codesourcery.com>
19897         PR tree-optimization/81192
19898         * tree-ssa-tail-merge.c (same_succ_flush_bb): Handle
19899         BB_SAME_SUCC (bb) == NULL.
19901 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
19903         * cfgrtl.c (rtl_verify_edges): Enable checking of profile_probability
19904         consistency.
19906 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
19908         * dumpfile.c: Include profile-count.h
19909         * tree-cfg.c (gimple_duplicate_sese_tail): Drop UNUSED attributes;
19910         update profile.
19911         (insert_cond_bb): Update profile.
19912         * tree-cfg.h (insert_cond_bb): Update prototype.
19913         * tree-chkp-opt.c (chkp_optimize_string_function_calls): Update.
19914         * tree-dump.c: Do not include tree-cfg.
19916 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
19918         * bb-reorder.c (fix_up_crossing_landing_pad): Update profile.
19920 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
19922         * expect.c (dw2_build_landing_pads): Update profile of the landing pad
19923         bb.
19925 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
19927         * tree-complex.c (expand_complex_div_wide): update profile.
19929 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
19930             Alan Hayward  <alan.hayward@arm.com>
19931             David Sherwood  <david.sherwood@arm.com>
19933         * Makefile.in (MACHMODE_H): Remove insn-modes.h
19934         (CORETYPES_H): New define.
19935         (MOSTLYCLEANFILES): Add insn-modes-inline.h.
19936         (insn-modes-inline.h, s-modes-inline-h): New rules.
19937         (generated_files): Add insn-modes-inline.h.
19938         (RTL_BASE_H, TREE_CORE_H): Use CORETYPES_H instead of coretypes.h.
19939         (build/gensupport.o, build/ggc-none.o, build/print-rtl.o): Likewise.
19940         (build/read-md.o, build/read-rtl.o, build/rtl.o): Likewise.
19941         (build/vec.o, build/hash-table.o, build/inchash.o): Likewise.
19942         (build/gencondmd.o, build/genattr.o, build/genattr-common.o): Likewise.
19943         (build/genattrtab.o, build/genautomata.o, build/gencheck.o): Likewise.
19944         (build/gencodes.o, build/genconditions.o): Likewise.
19945         (build/genconfig.o, build/genconstants.o, build/genemit.o): Likewise.
19946         (build/genenums.o, build/genextract.o, build/genflags.o): Likewise.
19947         (build/gentarget-def.o, build/genmddeps.o, build/genopinit.o)
19948         (build/genoutput.o, build/genpeep.o, build/genpreds.o): Likewise.
19949         (build/genrecog.o, build/genmddump.o, build/genmatch.o): Likewise.
19950         (build/gencfn-macros.o, build/gcov-iov.o): Likewise.
19951         * coretypes.h: Include everything up to real.h for generators.
19952         Include insn-modes.h first.  Include wide-int-print.h after
19953         wide-int.h.  Include insn-modes-inline.h and then machmode.h.
19954         * machmode.h: Don't include insn-modes.h here.
19955         * function-tests.c: Remove includes of signop.h, machmode.h,
19956         double-int.h and wide-int.h.
19957         * rtl.h: Likewise.
19958         * gcc-rich-location.c: Remove includes of machmode.h, double-int.h
19959         and wide-int.h.
19960         * optc-save-gen.awk: Likewise.
19961         * gencheck.c (BITS_PER_UNIT): Delete dummy definition.
19962         * godump.c: Remove include of wide-int-print.h.
19963         * pretty-print.h: Likewise.
19964         * wide-int-print.cc: Likewise.
19965         * wide-int.cc: Likewise.
19966         * hash-map-tests.c: Remove include of signop.h.
19967         * hash-set-tests.c: Likewise.
19968         * rtl-tests.c: Likewise.
19969         * mkconfig.sh: Remove include of machmode.h.
19970         * genmodes.c (emit_insn_modes_h): Split emission of inline functions
19971         into...
19972         (emit_insn_modes_inline_h): ...this new function.  Emit the code
19973         into an insn-modes-inline.h header file, adding appropriate
19974         include guards and end comments.
19975         (emit_insn_modes_c_header): Remove include of machmode.h.
19976         (emit_min_insn_modes_c_header): Include coretypes.h rather than
19977         machmode.h.
19978         (main): Handle -i flag and call emit_insn_modes_inline_h when
19979         it is passed.
19981 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
19983         * tree-ssa-strlen.c (strinfo): Rename the length field to
19984         nonzero_chars.  Add a full_string_p field.
19985         (compare_nonzero_chars, zero_length_string_p): New functions.
19986         (get_addr_stridx): Add an offset_out parameter.
19987         Use compare_nonzero_chars.
19988         (get_stridx): Update accordingly.  Use compare_nonzero_chars.
19989         (new_strinfo): Update after above changes to strinfo.
19990         (set_endptr_and_length): Set full_string_p.
19991         (get_string_length): Update after above changes to strinfo.
19992         (unshare_strinfo): Update call to new_strinfo.
19993         (maybe_invalidate): Likewise.
19994         (get_stridx_plus_constant): Change off to unsigned HOST_WIDE_INT.
19995         Use compare_nonzero_chars and zero_string_p.  Treat nonzero_chars
19996         as a uhwi instead of an shwi.  Update after above changes to
19997         strinfo and new_strinfo.
19998         (zero_length_string): Assert that chainsi contains full strings.
19999         Use zero_length_string_p.  Update call to new_strinfo.
20000         (adjust_related_strinfos): Update after above changes to strinfo.
20001         Copy full_string_p from origsi.
20002         (adjust_last_stmt): Use zero_length_string_p.
20003         (handle_builtin_strlen): Update after above changes to strinfo and
20004         new_strinfo.  Install the lhs as the string length if the previous
20005         entry didn't describe a full string.
20006         (handle_builtin_strchr): Update after above changes to strinfo
20007         and new_strinfo.
20008         (handle_builtin_strcpy): Likewise.
20009         (handle_builtin_strcat): Likewise.
20010         (handle_builtin_malloc): Likewise.
20011         (handle_pointer_plus): Likewise.
20012         (handle_builtin_memcpy): Likewise.  Track nonzero characters
20013         that aren't necessarily followed by a nul terminator.
20014         (handle_char_store): Likewise.
20016 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
20018         PR tree-optimization/80769
20019         * tree-ssa-strlen.c (strinfo): Document that "stmt" is also used
20020         for malloc and calloc.  Document the new invariant that all related
20021         strinfos have delayed lengths or none do.
20022         (verify_related_strinfos): Move earlier in file.
20023         (set_endptr_and_length): New function, split out from...
20024         (get_string_length): ...here.  Also set the lengths of related
20025         strinfos.
20026         (zero_length_string): Assert that chainsi has known (rather than
20027         delayed) lengths.
20028         (adjust_related_strinfos): Likewise.
20030 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
20032         PR tree-optimization/81136
20033         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Only
20034         assert that two references with the same misalignment have the same
20035         compile-time misalignment if those compile-time misalignments
20036         are known.
20038 2017-07-01  Andi Kleen  <ak@linux.intel.com>
20040         * print-tree.c (print_node): Print all attributes.
20042 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
20044         * cfg.c (scale_bbs_frequencies): New function.
20045         * cfg.h (scale_bbs_frequencies): Declare it.
20046         * cfgloopanal.c (single_likely_exit): Cleanup.
20047         * cfgloopmanip.c (scale_loop_frequencies): Take profile_probability
20048         as parameter.
20049         (scale_loop_profile): Likewise.
20050         (loop_version): Likewise.
20051         (create_empty_loop_on_edge): Update.
20052         * cfgloopmanip.h (scale_loop_frequencies, scale_loop_profile,
20053         scale_loop_frequencies, scale_loop_profile, loopify,
20054         loop_version): Update prototypes.
20055         * modulo-sched.c (sms_schedule): Update.
20056         * predict.c (unlikely_executed_edge_p): Also check probability.
20057         (probably_never_executed_edge_p): Fix typo.
20058         * tree-if-conv.c (version_loop_for_if_conversion): Update.
20059         * tree-parloops.c (gen_parallel_loop): Update.
20060         * tree-ssa-loop-ivcanon.c (try_peel_loop): Update.
20061         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
20062         * tree-ssa-loop-split.c (split_loop): Update.
20063         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
20064         * tree-vect-loop-manip.c (vect_do_peeling): Update.
20065         (vect_loop_versioning): Update.
20066         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
20068 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
20070         * trans-mem.c (split_bb_make_tm_edge): Update profile.
20072 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
20074         * tree-if-conv.c (combine_blocks): Use make_single_succ_edge
20075         to keep profile consistent.
20077 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
20079         * cfgrtl.c (rtl_flow_call_edges_add): Update profile.
20080         * tree-cfg.c (gimple_flow_call_edges_add): Likewise.
20081         * profile-count.h (max_safe_multiplier): Make unsigned.
20082         (profile_count::guessed_zero): New.
20084 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
20086         * bb-reorder.c (fix_up_crossing_landing_pad,
20087         fix_crossing_conditional_branches): Use make_single_succ_edge
20088         to keep profile consistent.
20090 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
20092         * tree-vect-loop.c (optimize_mask_stores): Use make_single_succ_edge
20093         to update profile.
20095 2017-07-01  Jakub Jelinek  <jakub@redhat.com>
20097         PR sanitizer/81262
20098         * bb-reorder.c (fix_up_fall_thru_edges): Move variable declarations to
20099         the right scopes, make sure cond_jump isn't preserved between multiple
20100         iterations.  Search for fallthru edge whenever there are 3+ edges and
20101         use find_fallthru_edge for it.
20103 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
20105         Patch by Alexander Monakov <amonakov@ispras.ru>
20106         * sel-sched-ir.c (compute_succs_info): Handle uninitialized
20107         probabilities consistently.
20109 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
20111         * pa.c (pa_expand_compare_and_swap_loop): Update call of
20112         emit_cmp_and_jump_insns.
20114 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
20116         PR ipa/81261
20117         * tree-inline.c (expand_call_inline): Combine profile statuses.
20119 2017-06-30  Andrew Pinski  <apinski@cavium.com>
20121         * tree-if-conv.c (predicate_scalar_phi): Update new_stmt if
20122         fold_stmt returned true.
20124 2017-06-30  Nathan Sidwell  <nathan@acm.org>
20126         * ggc.h (empty_string): Delete.
20127         * cfgexpand.c (expand_asm_stmt): Use plain "".
20128         * optabs.c (expand_asm_memory_barrier): Likewise.
20129         * stringpool.c (empty_string): Delete.
20130         (digit_vector, digit_string): Delete.
20131         (ggc_alloc_string): Use plain "", don't optimize single digit
20132         strings.  Use ggc_alloc_atomic.
20134 2017-06-30  Richard Earnshaw  <rearnsha@arm.com>
20136         * rtlanal.c (insn_rtx_cost): If a parallel contains exactly one
20137         comparison set and one other set, use the cost of the non-comparison
20138         set.
20140 2017-06-30  Nathan Sidwell  <nathan@acm.org>
20142         * ggc.h: Replace all 'static inline' with plain 'inline'.  Fix
20143         some formatting.
20145 2017-06-30  Peter Bergner  <bergner@vnet.ibm.com>
20147         * tree-cfg.c (group_case_labels_stmt): Merge scanning and compressing
20148         loops.  Remove now unneeded calls to gimple_switch_set_label() that
20149         just set removed labels to NULL_TREE.
20151 2017-06-30  Aldy Hernandez  <aldyh@redhat.com>
20153         * tree-ssanames.c (set_range_info_raw): Abstract from ...
20154         (set_range_info): ...here.  Only call set_range_info_raw if domain
20155         is useful.
20156         (set_nonzero_bits): Call set_range_info_raw.
20157         * tree-ssanames.h (set_range_info_raw): New.
20159 2017-06-30  Jakub Jelinek  <jakub@redhat.com>
20161         PR target/81225
20162         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): For V8FI,
20163         V16FI and VI8F_256 iterators, use <store_mask_predicate> instead
20164         of nonimmediate_operand and <store_mask_constraint> instead of m
20165         for the input operand.  For V8FI iterator, always split if input
20166         is a MEM.  For V16FI and V8SF_256 iterators, don't test if both
20167         operands are MEM if <mask_applied>.  For VI4F_256 iterator, use
20168         <store_mask_predicate> instead of register_operand and
20169         <store_mask_constraint> instead of v for the input operand.  Make
20170         sure both operands aren't MEMs for if not <mask_applied>.
20172 2017-06-30  Sylvestre Ledru  <sylvestre@debian.org>
20174         * lto-wrapper.c (copy_file) Close both file descriptors before
20175         exiting normally.
20177 2017-06-30  Martin Liska  <mliska@suse.cz>
20179         PR ipa/81214
20180         * multiple_target.c (create_dispatcher_calls): Make ifunc
20181         also for function that don't have calls or are not referenced.
20183 2017-06-30  Richard Biener  <rguenther@suse.de>
20185         * tree-vect-slp.c (vect_slp_analyze_node_operations): Only
20186         analyze the first scalar stmt.  Move vector type computation
20187         for the BB case here from ...
20188         * tree-vect-stmts.c (vect_analyze_stmt): ... here.  Guard
20189         live operation processing in the SLP case properly.
20191 2017-06-30  Richard Biener  <rguenther@suse.de>
20193         * graph.c (draw_cfg_node_succ_edges): Fix broken dot syntax.
20195 2017-06-30  Martin Liska  <mliska@suse.cz>
20197         PR sanitizer/81021
20198         * tree-eh.c (lower_resx): Call BUILT_IN_ASAN_HANDLE_NO_RETURN
20199         before BUILT_IN_UNWIND_RESUME when ASAN is used.
20201 2017-06-30  Yvan Roux  <yvan.roux@linaro.org>
20203         * doc/invoke.texi (AArch64): Add missing options and remove redundant
20204         ones.
20206 2017-06-30  Richard Biener  <rguenther@suse.de>
20208         PR tree-optimization/81249
20209         * tree-vect-loop.c (vect_create_epilog_for_reduction): Convert
20210         condition reduction result to original scalar type.
20212 2017-06-30  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
20214         * profile-count.h (enum profile_quality): Fix typos and whitespace
20215         issues.
20217 2017-06-30  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
20219         * config/s390/s390.c (s390_expand_setmem): Adjust to the new data
20220         type for branch probabilities.
20222 2017-06-29  Julian Brown  <julian@codesourcery.com>
20223             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
20225         * config/aarch64/aarch64-fusion-pairs.def: Add ALU_BRANCH entry.
20226         * config/aarch64/aarch64.c (AARCH64_FUSE_ALU_BRANCH): New fusion type.
20227         (thunderx2t99_tunings): Set AARCH64_FUSE_ALU_BRANCH flag.
20228         (aarch_macro_fusion_pair_p): Add support for AARCH64_FUSE_ALU_BRANCH.
20230 2017-06-29  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
20232         * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Push the
20233         check for CC usage into AARCH64_FUSE_CMP_BRANCH.
20234         * config/i386/i386.c (ix86_macro_fusion_pair_p): Push the check for
20235         CC usage from generic code to here.
20236         * sched-deps.c (sched_macro_fuse_insns): Move the condition for
20237         CC usage into the target macros.
20239 2017-06-29  Maya Rashish  <coypu@sdf.org>
20241         * config/netbsd.h (NETBSD_LIB_SPEC): Add -lc when creating shared
20242         objects.
20244 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
20246         * arm/arm-builtins.c: Include profile-count.h
20247         * except.c (sjlj_emit_function_enter): Use
20248         profile_probability::unlikely.
20250 2017-06-29  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20252         * config/rs6000/rs6000.c (toc_relative_expr_p): Make tocrel_base
20253         and tocrel_offset be pointer args rather than implicitly using
20254         static versions.
20255         (legitimate_constant_pool_address_p, rs6000_emit_move,
20256         const_load_sequence_p, adjust_vperm): Add local tocrel_base and
20257         tocrel_offset and use in toc_relative_expr_p call.
20258         (print_operand, print_operand_address): Use static tocrel_base_oac
20259         and tocrel_offset_oac.
20260         (rs6000_output_addr_const_extra): Use static tocrel_base_oac and
20261         tocrel_offset_oac.
20263 2017-06-29  Maya Rashish  <coypu@sdf.org>
20265         * config/vax/builtins.md (ffssi2_internal): Correct constraint.
20267 2017-06-29  Eric Botcazou  <ebotcazou@adacore.com>
20269         * expr.c (expand_expr) <normal_inner_ref>: When testing for unaligned
20270         objects, take into account only the alignment of 'op0' and 'mode1' if
20271         'op0' is a MEM.
20273 2017-06-29  Steve Ellcey  <sellcey@cavium.com>
20275         * ccmp.c (ccmp_tree_comparison_p): New function.
20276         (ccmp_candidate_p): Update to use above function.
20277         (get_compare_parts): New function.
20278         (expand_ccmp_next): Update to use new functions.
20279         (expand_ccmp_expr_1): Take tree arg instead of gimple, update to use
20280         new functions.
20281         (expand_ccmp_expr): Pass tree instead of gimple to expand_ccmp_expr_1,
20282         take mode as argument.
20283         * ccmp.h (expand_ccmp_expr): Add mode as argument.
20284         * expr.c (expand_expr_real_1): Pass mode as argument.
20286 2017-06-29  Segher Boessenkool  <segher@kernel.crashing.org>
20288         * combine.c (combine_instructions): Print insns to dump_file, together
20289         with their costs.
20291 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
20293         * asan.c (asan_emit_stack_protection): Update.
20294         (create_cond_insert_point): Update.
20295         * auto-profile.c (afdo_propagate_circuit): Update.
20296         * basic-block.h (struct edge_def): Turn probability to
20297         profile_probability.
20298         (EDGE_FREQUENCY): Update.
20299         * bb-reorder.c (find_traces_1_round): Update.
20300         (better_edge_p): Update.
20301         (sanitize_hot_paths): Update.
20302         * cfg.c (unchecked_make_edge): Initialize probability to uninitialized.
20303         (make_single_succ_edge): Update.
20304         (check_bb_profile): Update.
20305         (dump_edge_info): Update.
20306         (update_bb_profile_for_threading): Update.
20307         * cfganal.c (connect_infinite_loops_to_exit): Initialize new edge
20308         probabilitycount to 0.
20309         * cfgbuild.c (compute_outgoing_frequencies): Update.
20310         * cfgcleanup.c (try_forward_edges): Update.
20311         (outgoing_edges_match): Update.
20312         (try_crossjump_to_edge): Update.
20313         * cfgexpand.c (expand_gimple_cond): Update make_single_succ_edge.
20314         (expand_gimple_tailcall): Update.
20315         (construct_init_block): Use make_single_succ_edge.
20316         (construct_exit_block): Use make_single_succ_edge.
20317         * cfghooks.c (verify_flow_info): Update.
20318         (redirect_edge_succ_nodup): Update.
20319         (split_edge): Update.
20320         (account_profile_record): Update.
20321         * cfgloopanal.c (single_likely_exit): Update.
20322         * cfgloopmanip.c (scale_loop_profile): Update.
20323         (set_zero_probability): Remove.
20324         (duplicate_loop_to_header_edge): Update.
20325         * cfgloopmanip.h (loop_version): Update prototype.
20326         * cfgrtl.c (try_redirect_by_replacing_jump): Update.
20327         (force_nonfallthru_and_redirect): Update.
20328         (update_br_prob_note): Update.
20329         (rtl_verify_edges): Update.
20330         (purge_dead_edges): Update.
20331         (rtl_lv_add_condition_to_bb): Update.
20332         * cgraph.c: (cgraph_edge::redirect_call_stmt_to_calle): Update.
20333         * cgraphunit.c (init_lowered_empty_function): Update.
20334         (cgraph_node::expand_thunk): Update.
20335         * cilk-common.c: Include profile-count.h
20336         * dojump.c (inv): Remove.
20337         (jumpifnot): Update.
20338         (jumpifnot_1): Update.
20339         (do_jump_1): Update.
20340         (do_jump): Update.
20341         (do_jump_by_parts_greater_rtx): Update.
20342         (do_compare_rtx_and_jump): Update.
20343         * dojump.h (jumpifnot, jumpifnot_1, jumpif_1, jumpif, do_jump,
20344         do_jump_1. do_compare_rtx_and_jump): Update prototype.
20345         * dwarf2cfi.c: Include profile-count.h
20346         * except.c (dw2_build_landing_pads): Use make_single_succ_edge.
20347         (sjlj_emit_dispatch_table): Likewise.
20348         * explow.c: Include profile-count.h
20349         * expmed.c (emit_store_flag_force): Update.
20350         (do_cmp_and_jump): Update.
20351         * expr.c (compare_by_pieces_d::generate): Update.
20352         (compare_by_pieces_d::finish_mode): Update.
20353         (emit_block_move_via_loop): Update.
20354         (store_expr_with_bounds): Update.
20355         (store_constructor): Update.
20356         (expand_expr_real_2): Update.
20357         (expand_expr_real_1): Update.
20358         * expr.h (try_casesi, try_tablejump): Update prototypes.
20359         * gimple-pretty-print.c (dump_probability): Update.
20360         (dump_profile): New.
20361         (dump_gimple_label): Update.
20362         (dump_gimple_bb_header): Update.
20363         * graph.c (draw_cfg_node_succ_edges): Update.
20364         * hsa-gen.c (convert_switch_statements): Update.
20365         * ifcvt.c (cheap_bb_rtx_cost_p): Update.
20366         (find_if_case_1): Update.
20367         (find_if_case_2): Update.
20368         * internal-fn.c (expand_arith_overflow_result_store): Update.
20369         (expand_addsub_overflow): Update.
20370         (expand_neg_overflow): Update.
20371         (expand_mul_overflow): Update.
20372         (expand_vector_ubsan_overflow): Update.
20373         * ipa-cp.c (good_cloning_opportunity_p): Update.
20374         * ipa-split.c (split_function): Use make_single_succ_edge.
20375         * ipa-utils.c (ipa_merge_profiles): Update.
20376         * loop-doloop.c (add_test): Update.
20377         (doloop_modify): Update.
20378         * loop-unroll.c (compare_and_jump_seq): Update.
20379         (unroll_loop_runtime_iterations): Update.
20380         * lra-constraints.c (lra_inheritance): Update.
20381         * lto-streamer-in.c (input_cfg): Update.
20382         * lto-streamer-out.c (output_cfg): Update.
20383         * mcf.c (adjust_cfg_counts): Update.
20384         * modulo-sched.c (sms_schedule): Update.
20385         * omp-expand.c (expand_omp_for_init_counts): Update.
20386         (extract_omp_for_update_vars): Update.
20387         (expand_omp_ordered_sink): Update.
20388         (expand_omp_for_ordered_loops): Update.
20389         (expand_omp_for_generic): Update.
20390         (expand_omp_for_static_nochunk): Update.
20391         (expand_omp_for_static_chunk): Update.
20392         (expand_cilk_for): Update.
20393         (expand_omp_simd): Update.
20394         (expand_omp_taskloop_for_outer): Update.
20395         (expand_omp_taskloop_for_inner): Update.
20396         * omp-simd-clone.c (simd_clone_adjust): Update.
20397         * optabs.c (expand_doubleword_shift): Update.
20398         (expand_abs): Update.
20399         (emit_cmp_and_jump_insn_1): Update.
20400         (expand_compare_and_swap_loop): Update.
20401         * optabs.h (emit_cmp_and_jump_insns): Update prototype.
20402         * predict.c (predictable_edge_p): Update.
20403         (edge_probability_reliable_p): Update.
20404         (set_even_probabilities): Update.
20405         (combine_predictions_for_insn): Update.
20406         (combine_predictions_for_bb): Update.
20407         (propagate_freq): Update.
20408         (estimate_bb_frequencies): Update.
20409         (force_edge_cold): Update.
20410         * profile-count.c (profile_count::dump): Add missing space into dump.
20411         (profile_count::debug): Add newline.
20412         (profile_count::differs_from_p): Explicitly convert to unsigned.
20413         (profile_count::stream_in): Update.
20414         (profile_probability::dump): New member function.
20415         (profile_probability::debug): New member function.
20416         (profile_probability::differs_from_p): New member function.
20417         (profile_probability::differs_lot_from_p): New member function.
20418         (profile_probability::stream_in): New member function.
20419         (profile_probability::stream_out): New member function.
20420         * profile-count.h (profile_count_quality): Rename to ...
20421         (profile_quality): ... this one.
20422         (profile_probability): New.
20423         (profile_count): Update.
20424         * profile.c (compute_branch_probabilities): Update.
20425         * recog.c (peep2_attempt): Update.
20426         * sched-ebb.c (schedule_ebbs): Update.
20427         * sched-rgn.c (find_single_block_region): Update.
20428         (compute_dom_prob_ps): Update.
20429         (schedule_region): Update.
20430         * sel-sched-ir.c (compute_succs_info): Update.
20431         * stmt.c (struct case_node): Update.
20432         (do_jump_if_equal): Update.
20433         (get_outgoing_edge_probs): Update.
20434         (conditional_probability): Update.
20435         (emit_case_dispatch_table): Update.
20436         (expand_case): Update.
20437         (expand_sjlj_dispatch_table): Update.
20438         (emit_case_nodes): Update.
20439         * targhooks.c: Update.
20440         * tracer.c (better_p): Update.
20441         (find_best_successor): Update.
20442         * trans-mem.c (expand_transaction): Update.
20443         * tree-call-cdce.c: Update.
20444         * tree-cfg.c (gimple_split_edge): Upate.
20445         (move_sese_region_to_fn): Upate.
20446         * tree-cfgcleanup.c (cleanup_control_expr_graph): Upate.
20447         * tree-eh.c (lower_resx): Upate.
20448         (cleanup_empty_eh_move_lp): Upate.
20449         * tree-if-conv.c (version_loop_for_if_conversion): Update.
20450         * tree-inline.c (copy_edges_for_bb): Update.
20451         (copy_cfg_body): Update.
20452         * tree-parloops.c (gen_parallel_loop): Update.
20453         * tree-profile.c (gimple_gen_ic_func_profiler): Update.
20454         (gimple_gen_time_profiler): Update.
20455         * tree-ssa-dce.c (remove_dead_stmt): Update.
20456         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
20457         * tree-ssa-loop-im.c (execute_sm_if_changed): Update.
20458         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update.
20459         (unloop_loops): Update.
20460         (try_peel_loop): Update.
20461         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
20462         * tree-ssa-loop-split.c (connect_loops): Update.
20463         (split_loop): Update.
20464         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
20465         (hoist_guard): Update.
20466         * tree-ssa-phionlycprop.c (propagate_rhs_into_lhs): Update.
20467         * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Update.
20468         (value_replacement): Update.
20469         * tree-ssa-reassoc.c (branch_fixup): Update.
20470         * tree-ssa-tail-merge.c (replace_block_by): Update.
20471         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Update.
20472         (create_edge_and_update_destination_phis): Update.
20473         (compute_path_counts): Update.
20474         (recompute_probabilities): Update.
20475         (update_joiner_offpath_counts): Update.
20476         (freqs_to_counts_path): Update.
20477         (duplicate_thread_path): Update.
20478         * tree-switch-conversion.c (hoist_edge_and_branch_if_true): Update.
20479         (struct switch_conv_info): Update.
20480         (gen_inbound_check): Update.
20481         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
20482         (vect_do_peeling): Update.
20483         (vect_loop_versioning): Update.
20484         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
20485         (optimize_mask_stores): Update.
20486         * ubsan.c (ubsan_expand_null_ifn): Update.
20487         * value-prof.c (gimple_divmod_fixed_value): Update.
20488         (gimple_divmod_fixed_value_transform): Update.
20489         (gimple_mod_pow2): Update.
20490         (gimple_mod_pow2_value_transform): Update.
20491         (gimple_mod_subtract): Update.
20492         (gimple_mod_subtract_transform): Update.
20493         (gimple_ic): Update.
20494         (gimple_stringop_fixed_value): Update.
20495         (gimple_stringops_transform): Update.
20496         * value-prof.h: Update.
20498 2017-06-29  Carl Love  <cel@us.ibm.com>
20500         * config/rs6000/rs6000-c.c: Add support for built-in functions
20501         vector signed int vec_signed (vector float);
20502         vector signed long long vec_signed (vector double);
20503         vector signed int vec_signed2 (vector double, vector double);
20504         vector signed int vec_signede (vector double);
20505         vector signed int vec_signedo (vector double);
20506         * config/rs6000/rs6000.c (rs6000_generate_vsigned2_code): Add
20507         instruction generator.
20508         * config/rs6000/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
20509         UNSPEC_VSX_VSIGNED2): Add UNSPECS.
20510         (vsx_xvcvspsxws, vsx_xvcvdpuxds_scale, vsx_xvcvspuxws, vsigned2_v2df):
20511         Add define_insn.
20512         (vsignedo_v2df, vsignede_v2df, vunsigned2_v2df, vunsignedo_v2df,
20513         vunsignede_v2df): Add define_expands.
20514         * config/rs6000/rs6000-builtin.def (VEC_SIGNED, VEC_UNSIGNED,
20515         VEC_SIGNED2, VEC_UNSIGNED2, VEC_SIGNEDE, VEC_UNSIGNEDE, VEC_SIGNEDO,
20516         VEC_UNSIGNEDO): Add definitions.
20517         * config/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
20518         UNSPEC_VSX_VSIGNED2): Add UNSPECs.
20519         (vsx_xvcvspsxws, vsx_xvcvspuxws): Add define_insn.
20520         (vsigned2_v2df, vsigendo_v2df, vsignede_v2df,
20521         vunsigned2_v2df, vunsignedo_v2df, vunsignede_v2df): Add define_expands.
20522         * config/rs6000/altivec.h (vec_signed, vec_signed2,
20523         vec_signede and vec_signedo, vec_unsigned, vec_unsigned2,
20524         vec_unsignede, vec_unsignedo): Add builtin defines.
20525         * config/rs6000-protos.h (rs6000_generate_vsigned2_code): Add extern
20526         declaration.
20527         * doc/extend.texi: Update the built-in documentation file for the
20528         new built-in functions.
20530 2017-06-29  Richard Biener  <rguenther@suse.de>
20532         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Do not add
20533         reduction chains to LOOP_VINFO_REDUCTIONS.
20534         * tree-vect-slp.c (vect_analyze_slp): Continue looking for
20535         SLP reductions after processing reduction chains.
20537 2017-06-29  Nathan Sidwell  <nathan@acm.org>
20539         * builtins.c (fold_builtin_FUNCTION): Use
20540         lang_hooks.decl_printable_name.
20542 2017-06-29  Peter Bergner  <bergner@vnet.ibm.com>
20544         PR middle-end/81194
20545         * cfgexpand.c (expand_gimple_stmt_1): Handle switch statements
20546         with only one label.
20547         * stmt.c (expand_case): Assert NCASES is greater than one.
20549 2017-06-29  Richard Biener  <rguenther@suse.de>
20551         * tree-cfg.c (group_case_labels_stmt): Return whether we changed
20552         anything.
20553         (group_case_labels): Likewise.
20554         (find_taken_edge): Push sanity checking on val to workers...
20555         (find_taken_edge_cond_expr): ... here
20556         (find_taken_edge_switch_expr): ... and here, handle cases
20557         with just a default label.
20558         * tree-cfg.h (group_case_labels_stmt): Adjust prototype.
20559         (group_case_labels): Likewise.
20560         * tree-cfgcleanup.c (execute_cleanup_cfg_post_optimizing): When
20561         group_case_labels does anything cleanup the CFG again.
20563 2017-06-29  Bin Cheng  <bin.cheng@arm.com>
20565         PR tree-optimization/81196
20566         * tree-ssa-loop-niter.c (number_of_iterations_cond): Handle loop
20567         exit condition comparing two IVs.
20569 2017-06-29  Richard Earnshaw  <rearnsha@arm.com>
20571         * config/arm/parsecpu.awk (gen_comm_data): Add initializer for
20572         profile to the dummy entry at the end of the list of architectures.
20573         * config/arm/arm-cpu-cdata.h: Regenerated.
20575 2017-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20576             Michael Collison <michael.collison@arm.com>
20578         PR target/70119
20579         * config/aarch64/aarch64.md (*aarch64_<optab>_reg_<mode>3_mask1):
20580         New pattern.
20581         (*aarch64_reg_<mode>3_neg_mask2): New pattern.
20582         (*aarch64_reg_<mode>3_minus_mask): New pattern.
20583         (*aarch64_<optab>_reg_di3_mask2): New pattern.
20584         * config/aarch64/aarch64.c (aarch64_rtx_costs): Account for cost
20585         of shift when the shift amount is masked with constant equal to
20586         the size of the mode.
20587         * config/aarch64/predicates.md (subreg_lowpart_operator): New
20588         predicate.
20590 2017-06-29  Martin Liska  <mliska@suse.cz>
20592         * config/i386/i386.opt: Change range from [1,5] to [0,5].
20594 2017-06-29  Yury Gribov  <tetra2005@gmail.com>
20596         PR bootstrap/80565
20597         * ipa-cp.c (allocate_and_init_ipcp_value): Add initialization
20598         code.
20599         * ipa-inline.h
20600         (edge_growth_cache_entry::edge_growth_cache_entry): New
20601         function.
20602         (reset_edge_growth_cache): Update to use constructor.
20604 2017-06-28  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
20606         * config/aarch64/aarch64.h (AARCH64_EXPAND_ALIGNMENT): New.
20607         (DATA_ALIGNMENT): Update to use AARCH64_EXPAND_ALIGNMENT.
20608         (LOCAL_ALIGNMENT): Update to use AARCH64_EXPAND_ALIGNMENT.
20610 2017-06-28  Sebastian Peryt  <sebastian.peryt@intel.com>
20612         * config/i386/avx512vlintrin.h (_mm256_permutexvar_epi64)
20613         (_mm256_permutexvar_epi32, _mm256_permutex_epi64): New intrinsics.
20615 2017-06-28  Szabolcs Nagy  <szabolcs.nagy@arm.com>
20617         * config.gcc (*-linux-musl*): Add t-musl tmake_file.
20618         (*-linux-uclibc*): Add t-uclibc tmake_file.
20619         * config/t-musl: New.
20620         * config/t-uclibc: New.
20622 2017-06-28  Richard Earnshaw  <rearnsha@arm.com>
20624         * config/arm/parsecpu.awk (profile): Parse new keyword in an arch
20625         context.
20626         (gen_comm_data): Emit architectural setting of arch_prof.
20627         * config/arm/arm-cpus.in (armv6-m, armv6s-m, armv7-a, armv7ve): Set the
20628         profile.
20629         (armv7-r, armv7-m, armv7e-m, armv8-a, armv8.1-a, armv8.2-a): Likewise.
20630         (armv8-m.base, armv8-m.main): Likewise.
20631         * arm-protos.h (arm_build_target): Add profile field.
20632         (arch_option): Likewise.
20633         * config/arm/arm.c (arm_configure_build_target): Copy the profile to
20634         the active target.
20635         * config/arm/arm.h (TARGET_ARM_ARCH_PROFILE): Use
20636         arm_active_target.profile.
20638 2017-06-28  Richard Biener  <rguenther@suse.de>
20640         PR middle-end/81227
20641         * fold-const.c (negate_expr_p): Use TYPE_UNSIGNED, not
20642         TYPE_OVERFLOW_WRAPS.
20643         * match.pd (negate_expr_p): Likewise.
20644         * tree-ssa-reassoc.c (optimize_range_tests_diff): Use
20645         fold_build2, not fold_binary.
20647 2017-06-28  Wilco Dijkstra  <wdijkstr@arm.com>
20649         * config/aarch64/aarch64 (aarch64_expand_mov_immediate):
20650         Convert memory address to Pmode.
20651         (aarch64_print_operand): Assert MEM operands are always Pmode.
20653 2017-06-28  Wilco Dijkstra  <wdijkstr@arm.com>
20655         PR target/79665
20656         * config/arm/aarch-common.c (arm_no_early_alu_shift_dep):
20657         Remove redundant if.
20658         (aarch_forward_to_shift_is_not_shifted_reg): Remove.
20659         * config/arm/aarch-common-protos.h
20660         (aarch_forward_to_shift_is_not_shifted_re): Remove.
20661         * config/arm/cortex-a53.md: Use arm_no_early_alu_shift_dep in bypass.
20663 2017-06-28  Michael Meissner  <meissner@linux.vnet.ibm.com>
20665         PR ipa/81238
20666         * multiple_target.c (create_dispatcher_calls): Set the default
20667         clone to be static, not public.
20669 2017-06-28  Richard Biener  <rguenther@suse.de>
20671         * tree-vect-loop.c (vectorizable_reduction): Move special
20672         cond reduction IV var creation ...
20673         (vect_create_epilog_for_reduction): ... here.  Remove induction_index
20674         parameter.  Use STMT_VINFO_VECTYPE.
20675         * tree-vect-slp.c (vect_get_constant_vectors): Properly reset
20676         constant_p.
20678 2017-06-28  Martin Liska  <mliska@suse.cz>
20680         PR ipa/81128
20681         * ipa-visibility.c (non_local_p): Handle visibility.
20683 2017-06-28  Martin Liska  <mliska@suse.cz>
20685         PR driver/79659
20686         * common.opt: Add IntegerRange to various options.
20687         * opt-functions.awk (integer_range_info): New function.
20688         * optc-gen.awk: Add integer_range_info to cl_options struct.
20689         * opts-common.c (decode_cmdline_option): Handle
20690         CL_ERR_INT_RANGE_ARG.
20691         (cmdline_handle_error): Likewise.
20692         * opts.c (print_filtered_help): Show valid interval in
20693         when --help is provided.
20694         * opts.h (struct cl_option): Add range_min and range_max fields.
20695         * config/i386/i386.opt: Add IntegerRange for -mbranch-cost.
20697 2017-06-28  Marc Glisse  <marc.glisse@inria.fr>
20699         * match.pd ((X & ~Y) | (~X & Y)): Generalize to + and ^.
20700         (x * C EQ/NE y * C): New transformation.
20702 2017-06-28  Christophe Lyon  <christophe.lyon@linaro.org>
20704         * genmultilib (combination_space): Accept '+' in option names.
20706 2017-06-28  Martin Liska  <mliska@suse.cz>
20708         PR sanitizer/81224
20709         * asan.c (instrument_derefs): Bail out inner references
20710         that are hard register variables.
20712 2017-06-28  Jakub Jelinek  <jakub@redhat.com>
20714         PR target/81175
20715         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Use def_builtin
20716         rather than def_builtin_pure for __builtin_ia32_gatherpf*.
20718 2017-06-28  Richard Biener  <rguenther@suse.de>
20720         * tree-vectorizer.h (vect_get_vec_defs): Remove.
20721         (vect_get_slp_defs): Adjust.
20722         * tree-vect-loop.c (get_initial_defs_for_reduction): Split
20723         out from ...
20724         * tree-vect-slp.c (vect_get_constant_vectors): ... here and
20725         simplify.
20726         * tree-vect-loop.c (vect_create_epilog_for_reduction): Use
20727         get_initial_defs_for_reduction instead of vect_get_vec_defs.
20728         (vectorizable_reduction): Adjust.
20729         * tree-vect-slp.c (vect_get_constant_vectors): Remove reduction
20730         handling.
20731         (vect_get_slp_defs): Likewise.
20732         * tree-vect-stmts.c (vect_get_vec_defs): Make static and adjust.
20733         (vectorizable_bswap): Adjust.
20734         (vectorizable_call): Likewise.
20735         (vectorizable_conversion): Likewise.
20736         (vectorizable_assignment): Likewise.
20737         (vectorizable_shift): Likewise.
20738         (vectorizable_operation): Likewise.
20739         (vectorizable_store): Likewise.
20740         (vectorizable_condition): Likewise.
20741         (vectorizable_comparison): Likewise.
20743 2017-06-28  Michael Collison  <michael.collison@arm.com>
20745         PR target/68535
20746         * config/arm/arm.c (gen_ldm_seq): Remove last unnecessary
20747         set of base_reg
20748         (arm_gen_movmemqi): Removed unused variable 'i'.
20749         Convert 'for' loop into 'while' loop.
20750         (arm_expand_prologue): Remove last unnecessary set of insn.
20751         (thumb_pop): Remove unused variable 'pushed_words'.
20752         (thumb_exit): Remove last unnecessary set of regs_to_pop.
20754 2017-06-28  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
20756         * config/s390/predicates.md: Use s390_rel_address_ok_p.
20757         * config/s390/s390-protos.h: Add prototype of
20758         s390_rel_address_ok_p.
20759         * config/s390/s390.c (s390_got_symbol): New function.
20760         (s390_rel_address_ok_p): New function.
20761         (legitimize_pic_address): Use s390_rel_address_ok_p.
20762         (s390_load_got): Use s390_got_symbol.
20763         (s390_option_override): Issue error if
20764         -mno-pic-data-is-text-relative is used without -fpic/-fPIC.
20765         * config/s390/s390.h (TARGET_DEFAULT_PIC_DATA_IS_TEXT_RELATIVE):
20766         New macro.
20767         * config/s390/s390.opt: New option mpic-data-is-text-relative.
20769 2017-06-27  Andrew Pinski  <apinski@cavium.com>
20771         * match.pd (X >/>=/</<= 0 ? 1.0 : -1.0): New patterns.
20772         (X * copysign (1.0, X)): New pattern.
20773         (X * copysign (1.0, -X)): New pattern.
20774         (copysign (-1.0, CST)): New pattern.
20776 2017-06-27  Joseph Myers  <joseph@codesourcery.com>
20778         * genmultilib (combination_space): Remove variable.
20779         Validate reuse rules against regular expression for any sequence
20780         of multilib options in any order.
20782 2017-06-27  Michael Collison  <michael.collison@arm.com>
20784         * config/aarch64/aarch64-simd.md (aarch64_combine<mode>): Directly
20785         call aarch64_split_simd_combine.
20786         * (aarch64_combine_internal<mode>): Delete pattern.
20787         * config/aarch64/aarch64.c (aarch64_split_simd_combine):
20788         Allow register and subreg operands.
20790 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
20792         * config/i386/vxworks.h (ASM_SPEC): Remove definition. No target
20793         specific need, just fallback on defaults.
20794         (ASM_OUTPUT_ALIGNED_BSS): Add #undef before #define.
20796 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
20797             Olivier Hainque  <hainque@adacore.com>
20799         * config/i386/vxworks.h (DBX_REGISTER_NUMBER): Pick distinct
20800         map for 64bits.
20801         (TARGET_OS_CPP_BUILTINS): builtin_define CPU to X86_64 for 64bit
20802         targets. Pick a default if no particular attempt applied.
20803         (STACK_CHECK_PROTECT): Double for 64bit targets, which have
20804         larger contexts.
20806 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
20808         * config.gcc (i*86-wrs-vxworks7): Handle new acceptable triplet.
20809         (x86_64-wrs-vxworks7): Likewise.
20811 2017-06-27  Marek Polacek  <polacek@redhat.com>
20813         PR sanitizer/81223
20814         * ubsan.c (instrument_null): Check get_base_address's result for null.
20816 2017-06-27  Marc Glisse  <marc.glisse@inria.fr>
20818         * match.pd ((A+-B)+(C-A), (A+B)-(A-C)): New transformations.
20820 2017-06-27  Marc Glisse  <marc.glisse@inria.fr>
20822         * builtin-types.def (BT_FENV_T_PTR, BT_CONST_FENV_T_PTR,
20823         BT_FEXCEPT_T_PTR, BT_CONST_FEXCEPT_T_PTR): New primitive types.
20824         (BT_FN_INT_FENV_T_PTR, BT_FN_INT_CONST_FENV_T_PTR,
20825         BT_FN_INT_FEXCEPT_T_PTR_INT, BT_FN_INT_CONST_FEXCEPT_T_PTR_INT):
20826         New function types.
20827         * builtins.def (BUILT_IN_FECLEAREXCEPT, BUILT_IN_FEGETENV,
20828         BUILT_IN_FEGETEXCEPTFLAG, BUILT_IN_FEGETROUND,
20829         BUILT_IN_FEHOLDEXCEPT, BUILT_IN_FERAISEEXCEPT,
20830         BUILT_IN_FESETENV, BUILT_IN_FESETEXCEPTFLAG,
20831         BUILT_IN_FESETROUND, BUILT_IN_FETESTEXCEPT,
20832         BUILT_IN_FEUPDATEENV): New builtins.
20833         * tree-core.h (TI_FENV_T_PTR_TYPE, TI_CONST_FENV_T_PTR_TYPE,
20834         TI_FEXCEPT_T_PTR_TYPE, TI_CONST_FEXCEPT_T_PTR_TYPE): New entries.
20835         * tree.h (fenv_t_ptr_type_node, const_fenv_t_ptr_type_node,
20836         fexcept_t_ptr_type_node, const_fexcept_t_ptr_type_node): New
20837         macros.
20838         (builtin_structptr_types): Adjust size.
20839         * tree.c (builtin_structptr_types): Add four entries.
20841 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
20842             Olivier Hainque  <hainque@adacore.com>
20844         * config/vxworks.h (VXWORKS_LIB_SPEC): Incorporate ...
20845         (TLS_SYM): New local macro, forcing reference to __tls__ on
20846         link command lines for VxWorks 7 RTPs, triggering initialization
20847         of tlsLib.
20848         (VXWORKS_HAVE_TLS): New macro. State whether the target VxWorks
20849         OS features TLS support, true for RTPs on VxWorks 7.
20850         * config/vxworks.c (vxworks_override_options): Setup emutls
20851         accordingly.
20853 2017-06-27  Jakub Jelinek  <jakub@redhat.com>
20855         * predict.c (test_prediction_value_range): Use -1U instead of -1
20856         to avoid narrowing conversion warning.
20857         * dumpfile.c (dump_options): Wrap all value into dump_flags_t cast
20858         to avoid narrowing conversion warning.
20859         * opt-functions.awk (var_ref): Return (unsigned short) -1 instead of
20860         -1.
20861         * optc-gen.awk (END): Expect (unsigned short) -1 instead of -1.
20863 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
20865         * config/vxworks.h (VXWORKS_LIBS_RTP): Alternative definition for
20866         64bit configurations.
20867         (PTR_DIFF_TYPE): Alternative definition for TARGET_LP64.
20868         (SIZE_TYPE): Likewise.
20869         * config/vxworks.c (vxworks_emutls_var_fields): Use
20870         long_unsigned_type_node instead of unsigned_type_node as the offset
20871         field type, which is "pointer" mode in emutls.c.
20873 2017-06-27  Jakub Jelinek  <jakub@redhat.com>
20875         PR sanitizer/81209
20876         * ubsan.c (ubsan_encode_value): Initialize DECL_CONTEXT on var.
20878         PR middle-end/81207
20879         * gimple-fold.c (replace_call_with_call_and_fold): Handle
20880         gimple_vuse copying separately from gimple_vdef copying.
20882 2017-06-27  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20884         * value-prof.c (free_hist): Remove call to memset and the enclosing if
20885         condition.
20887 2017-06-26  Jerome Lambourg  <lambourg@adacore.com>
20888             Olivier Hainque  <hainque@adacore.com>
20890         * config.gcc (*-*-vxworks*): Add TARGET_VXWORKS7=1 to tm_defines
20891         for all vxworks7 targets.
20892         * config/vxworks.h (TARGET_VXWORKS7): If not defined, define to 0.
20893         (VXWORKS_ADDITIONAL_CPP_SPEC): Alternative definition for VXWORKS7.
20894         (VXWORKS_LIBS_RTP, VXWORKS_LIBS_RTP_DIR): New macros, allowing
20895         variations for VX6/VX7 and 32/64bits later on in ...
20896         (VXWORKS_LIB_SPEC): Leverage new macros.
20897         (VXWORKS_OS_CPP_BUILTINS): Define _VSB_CONFIG_FILE for VXWORKS7,
20898         as well as _ALLOW_KEYWORD_MACROS when "inline" is not a keyword.
20900 2017-06-26  Jerome Lambourg  <lambourg@adacore.com>
20902         * config/vxworks.h (VXWORKS_OS_CPP_BUILTINS): builtin_define
20903         _VX_TOOL_FAMILY and _VX_TOOL to gnu.
20905 2017-06-26  Carl Love  <cel@us.ibm.com>
20907         * config/rs6000/rs6000-c.c: Add support for built-in functions
20908         vector bool char vec_reve (vector bool char);
20909         vector signed char vec_reve (vector signed char);
20910         vector unsigned char vec_reve (vector unsigned char);
20911         vector bool int vec_reve (vector bool int);
20912         vector signed int vec_reve (vector signed int);
20913         vector unsigned int vec_reve (vector unsigned int);
20914         vector bool long long vec_reve (vector bool long long);
20915         vector signed long long vec_reve (vector signed long long);
20916         vector unsigned long long vec_reve (vector unsigned long long);
20917         vector bool short vec_reve (vector bool short);
20918         vector signed short vec_reve (vector signed short);
20919         vector double vec_reve (vector double);
20920         vector float vec_reve (vector float);
20921         * config/rs6000/rs6000-builtin.def (VREVE_V2DI, VREVE_V4SI,
20922         VREVE_V8HI, VREVE_V16QI, VREVE_V2DF, VREVE_V4SF, VREVE): New builtin.
20923         * config/rs6000/altivec.md (UNSPEC_VREVEV): New UNSPEC.
20924         (altivec_vreve): New pattern.
20925         * config/rs6000/altivec.h (vec_reve): New define.
20926         * doc/extend.texi (vec_rev): Update the built-in documentation file
20927         for the new built-in functions.
20929 2016-06-26  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20931         PR tree-optimization/71815
20932         * gimple-ssa-strength-reduction.c (uses_consumed_by_stmt): New
20933         function.
20934         (find_basis_for_candidate): Call uses_consumed_by_stmt rather than
20935         has_single_use.
20936         (slsr_process_phi): Likewise.
20937         (replace_uncond_cands_and_profitable_phis): Don't replace a
20938         multiply candidate with a stride of 1 (copy or cast).
20939         (phi_incr_cost): Call uses_consumed_by_stmt rather than
20940         has_single_use.
20941         (lowest_cost_path): Likewise.
20942         (total_savings): Likewise.
20944 2017-06-26  Richard Biener  <rguenther@suse.de>
20946         PR target/81175
20947         * config/i386/i386.c (ix86_init_mmx_sse_builtins):
20948         Use def_builtin_pure for all gather builtins.
20950 2017-06-26  Richard Biener  <rguenther@suse.de>
20952         PR tree-optimization/81203
20953         * tree-tailcall.c (find_tail_calls): Do not move stmts into
20954         non-dominating BBs.
20956 2017-06-26  Marek Polacek  <polacek@redhat.com>
20958         PR c/80116
20959         * doc/invoke.texi: Document -Wmultistatement-macros.
20961 2017-06-26  Christophe Lyon  <christophe.lyon@linaro.org>
20963         * doc/sourcebuild.texi (ARM-specific attributes): Document new
20964         arm_neon_ok_no_float_abi effective target.
20966 2017-06-26  Richard Biener  <rguenther@suse.de>
20968         PR tree-optimization/80928
20969         * cfghooks.c (duplicate_block): Do not copy BB_DUPLICATED flag.
20970         (copy_bbs): Set BB_DUPLICATED flag early.
20971         (execute_on_growing_pred): Do not execute for BB_DUPLICATED
20972         marked blocks.
20973         (execute_on_shrinking_pred): Likewise.
20974         * tree-ssa.c (ssa_redirect_edge): Do not look for PHI args in
20975         BB_DUPLICATED blocks.
20976         * tree-ssa-phionlycoprop.c (eliminate_degenerate_phis_1): Properly
20977         iterate over all PHIs considering removal of *gsi.
20979 2017-06-23  Jim Wilson  <jim.wilson@linaro.org>
20981         * doc/invoke.texi (AArch64 Options, -mtune): Re-add falkor and
20982         qdf24xx.
20984 2017-06-23  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20986         * config/rs6000/rs6000-string.c: (expand_block_clear,
20987         do_load_for_compare, select_block_compare_mode,
20988         compute_current_alignment, expand_block_compare,
20989         expand_strncmp_align_check, expand_strn_compare,
20990         expand_block_move, rs6000_output_load_multiple)
20991         Move functions related to string/block move/compare
20992         to a separate file.
20993         * config/rs6000/rs6000.c: Move above functions to rs6000-string.c.
20994         * config/rs6000/rs6000-protos.h (rs6000_emit_dot_insn): Add prototype
20995         for this function which is now used in two files.
20996         * config/rs6000/t-rs6000: Add rule to compile rs6000-string.o.
20997         * config.gcc: Add rs6000-string.o to extra_objs for
20998         targets powerpc*-*-* and rs6000*-*-*.
21000 2017-06-23  Michael Meissner  <meissner@linux.vnet.ibm.com>
21002         PR target/80510
21003         * config/rs6000/rs6000.md (ALTIVEC_DFORM): Do not allow DImode in
21004         32-bit, since indexed is not valid for DImode.
21005         (mov<mode>_hardfloat32): Reorder ISA 2.07 load/stores before ISA
21006         3.0 d-form load/stores to be the same as mov<mode>_hardfloat64.
21007         (define_peephole2 for Altivec d-form load): Add 32-bit support.
21008         (define_peephole2 for Altivec d-form store): Likewise.
21010         PR ipa/81185
21011         * multiple_target.c (create_dispatcher_calls): Only create the
21012         dispatcher call if the function is the default clone of a
21013         versioned function.
21015 2017-06-23  Segher Boessenkool  <segher@kernel.crashing.org>
21017         PR middle-end/80902
21018         * builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
21019         a call, force the call to not be a tail call.
21021 2017-06-23  Jeff Law  <law@redhat.com>
21023         * doc/contrib.texi: Add entry for Steven Pemberton's work on
21024         enquire.
21026 2017-06-23  Will Schmidt  <will_schmidt@vnet.ibm.com>
21028         * config/rs6000/rs6000.c: Add include of ssa-propagate.h for
21029         update_call_from_tree().  (rs6000_gimple_fold_builtin): Add
21030         handling for early expansion of vector shifts (sl,sr,sra,rl).
21031         (builtin_function_type): Add vector shift right instructions
21032         to the unsigned argument list.
21034 2017-06-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
21036         rtl-optimizatoin/79286
21037         * ira.c (update_equiv_regs): Revert to using may_trap_or_fault_p again.
21038         * rtlanal.c (rtx_addr_can_trap_p_1): SYMBOL_REF_FUNCTION_P can never
21039         trap.  PIC register plus a const unspec without offset can never trap.
21041 2017-06-23  Marc Glisse  <marc.glisse@inria.fr>
21043         * tree.h (builtin_structptr_type): New type.
21044         (builtin_structptr_types): Declare new array.
21045         * tree.c (builtin_structptr_types): New array.
21046         (free_lang_data, build_common_tree_nodes): Use it.
21048 2017-06-23  Jonathan Wakely  <jwakely@redhat.com>
21050         PR c++/81187
21051         * doc/invoke.texi (-Wnoexcept-type): Fix name of option, from
21052         -Wnoexcept.
21054 2017-06-22  Matt Turner  <mattst88@gmail.com>
21056         * config/i386/driver-i386.c (host_detect_local_cpu): Add Kaby
21057         Lake models to skylake case.  Assume skylake for unknown
21058         models with clflushopt.
21060 2017-06-22  Jeff Law  <law@redhat.com>
21062         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Handle
21063         frame sizes that do not satisfy aarch64_uimm12_shift.
21065 2017-06-22  Jan Hubicka <hubicka@ucw.cz>
21067         * profile-count.h (apply_probability,
21068         apply_scale, probability_in): Fix checks for zero.
21070 2017-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21072         * incpath.c (add_sysroot_to_chain): Allow for $SYSROOT prefix.
21073         * doc/cppdiropts.texi (-I @var{dir}): Document it.
21075 2016-06-22  Richard Biener  <rguenther@suse.de>
21077         * tree-vect-loop.c (vect_model_reduction_cost): Handle
21078         COND_REDUCTION and INTEGER_INDUC_COND_REDUCTION without
21079         REDUC_MAX_EXPR support.
21080         (vectorizable_reduction): Likewise.
21081         (vect_create_epilog_for_reduction): Likewise.
21083 2017-06-22  James Greenhalgh  <james.greenhalgh@arm.com>
21085         * match.pd (A / (1 << B) -> A >> B): New.
21086         * generic-match-head.c: Include optabs-tree.h.
21087         * gimple-match-head.c: Likewise.
21088         * optabs-tree.h (target_supports_op_p): New.
21089         * optabs-tree.c (target_supports_op_p): New.
21091 2017-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21093         * configure.ac (gcc_cv_ld_static_dynamic): Also check stderr for
21094         $gcc_cv_ld --help output.
21095         (gcc_cv_ld_demangle): Likewise.
21096         (gcc_cv_ld_eh_frame_hdr): Likewise.
21097         (gcc_cv_ld_pie): Likewise.
21098         (gcc_cv_ld_as_needed): Likewise.  Prefer native forms unless $gnu_ld.
21099         (gcc_cv_ld_buildid): Likewise.
21100         (gcc_cv_ld_sysroot): Likewise.
21101         (ld_bndplt_support): Likewise.
21102         (ld_pushpopstate_support): Likewise.
21103         * configure: Regenerate.
21104         * config/sol2.h [!USE_GLD] (SYSROOT_SPEC): Define.
21106 2017-06-21  Jakub Jelinek  <jakub@redhat.com>
21108         PR target/81151
21109         * config/i386/sse.md (round<mode>2): Renumber match_dup and
21110         operands indexes to avoid gap between operands and match_dups.
21112 2017-06-21  Andrew Pinski  <apinski@cavium.com>
21114         * config/aarch64/aarch64-cost-tables.h (thunderx_extra_costs):
21115         Increment Arith_shift and Arith_shift_reg by 1.
21116         * config/aarch64/aarch64-tuning-flags.def (cheap_shift_extend):
21117         New tuning flag.
21118         * config/aarch64/aarch64.c (thunderx_tunings): Enable
21119         AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND.
21120         (aarch64_strip_extend): Add new argument and test for it.
21121         (aarch64_cheap_mult_shift_p): New function.
21122         (aarch64_rtx_mult_cost): Call aarch64_cheap_mult_shift_p and don't
21123         add a cost if it is true.
21124         Update calls to aarch64_strip_extend.
21125         (aarch64_rtx_costs): Update calls to aarch64_strip_extend.
21127 2017-06-21  Andrew Pinski  <apinski@cavium.com>
21129         * config/aarch64/aarch64-cores.def (thunderxt88p1): Use thunderxt88
21130         tunings.
21131         (thunderxt88): Likewise.
21132         * config/aarch64/aarch64.c (thunderxt88_prefetch_tune): New variable.
21133         (thunderx_prefetch_tune): New variable.
21134         (thunderx2t99_prefetch_tune): Update for the correct values.
21135         (thunderxt88_tunings): New variable.
21136         (thunderx_tunings): Use thunderx_prefetch_tune instead of
21137         generic_prefetch_tune.
21138         (thunderx2t99_tunings): Use AUTOPREFETCHER_WEAK.
21140 2017-06-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21142         * config/aarch64/atomics.md (aarch64_compare_and_swap<mode>_lse,
21143         SHORT): Relax operand 3 to aarch64_reg_or_zero and constraint to Z.
21144         (aarch64_compare_and_swap<mode>_lse, GPI): Likewise.
21145         (aarch64_atomic_cas<mode>, SHORT): Likewise for operand 2.
21146         (aarch64_atomic_cas<mode>, GPI): Likewise.
21148 2017-06-21  Martin Liska  <mliska@suse.cz>
21150         * gimplify.c (gimplify_label_expr): Insert GIMPLE_PREDICT
21151         statements on cold and hot labels.
21152         * predict.c (tree_estimate_probability_bb): Remove the
21153         prediction from this place.
21155 2017-06-21  Martin Liska  <mliska@suse.cz>
21157         PR tree-optimization/79489
21158         * gimplify.c (maybe_add_early_return_predict_stmt): New
21159         function.
21160         (gimplify_return_expr): Call the function.
21161         * predict.c (tree_estimate_probability_bb): Remove handling
21162         of early return.
21163         * predict.def: Update comment about early return predictor.
21164         * gimple-predict.h (is_gimple_predict): New function.
21165         * predict.def: Change default value of early return to 66.
21166         * tree-tailcall.c (find_tail_calls): Skip GIMPLE_PREDICT
21167         statements.
21168         * passes.def: Put pass_strip_predict_hints to the beginning of
21169         IPA passes.
21171 2017-06-21  Pierre-Marie de Rodat  <derodat@adacore.com>
21173         * dwarf2out.c (gen_decl_die): Remove the guard to skip file-scope
21174         FUNCTION_DECL declarations.
21175         (dwarf2out_early_global_decl): Remove the guard to skip FUNCTION_DECL
21176         declarations.
21177         (dwaf2out_decl): Likewise.
21178         * godump.c (go_early_global_decl): Skip call to the real debug hook
21179         for FUNCTION_DECL declarations.
21180         * passes.c (rest_of_decl_compilation): Skip call to the
21181         early_global_decl debug hook for FUNCTION_DECL declarations, unless
21182         -fdump-go-spec is passed.
21184 2017-06-21  Marc Glisse  <marc.glisse@inria.fr>
21186         * config/i386/i386.c (struct builtin_isa): New field pure_p.
21187         Reorder for compactness.
21188         (def_builtin, def_builtin2, ix86_add_new_builtins): Handle pure_p.
21189         (def_builtin_pure, def_builtin_pure2): New functions.
21190         (ix86_init_mmx_sse_builtins) [__builtin_ia32_stmxcsr]: Mark as pure.
21192 2017-06-21  Marc Glisse  <marc.glisse@inria.fr>
21194         * match.pd (nop_convert): New predicate.
21195         ((A +- CST1) +- CST2): Allow some NOP conversions.
21197 2017-06-21  Jakub Jelinek  <jakub@redhat.com>
21199         PR c++/81130
21200         * gimplify.c (omp_add_variable): Don't force GOVD_SEEN for types
21201         with ctors/dtors if GOVD_SHARED is set.
21203 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
21205         * config/aarch64/aarch64.md (movti_aarch64):
21206         Emit mov rather than orr.
21207         (movtf_aarch64): Likewise.
21208         * config/aarch64/aarch64-simd.md (aarch64_simd_mov):
21209         Emit mov rather than orr.
21211 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
21213         * config/aarch64/aarch64-simd.md (aarch64_simd_dup):
21214         Swap alternatives, make integer dup more expensive.
21216 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
21218         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
21219         Return true for non-tls symbols.
21221 2017-06-21  James Greenhalgh  <james.greenhalgh@arm.com>
21223         * config/aarch64/aarch64-cores.def (cortex-a55): New.
21224         (cortex-a75): Likewise.
21225         (cortex-a75.cortex-a55): Likewise.
21226         * config/aarch64/aarch64-tune.md: Regenerate.
21227         * doc/invoke.texi (-mtune): Document new values for -mtune.
21229 2017-06-21  Tom de Vries  <tom@codesourcery.com>
21231         * doc/sourcebuild.texi (Add Options, Features for dg-add-options): Add
21232         stack_size feature.
21233         (Effective-Target Keywords, Other attributes): Suggest using
21234         dg-add-options stack_size feature to get stack limit in stack_size
21235         effective target documentation.
21237 2017-06-21  Julian Brown  <julian@codesourcery.com>
21238             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
21240         * config/aarch64/aarch64-simd.md (aarch64_crypto_pmulldi)
21241         (aarch64_crypto_pmullv2di): Change type attribute to crypto_pmull.
21242         * config/aarch64/thunderx2t99.md (thunderx2t99_pmull): New
21243         reservation.
21244         * config/arm/cortex-a53.md (cortex_a53_advsimd_type): Add crypto_pmull to
21245         attribute type list for neon_multiply.
21246         * config/arm/cortex-a57.md (cortex_a57_neon_type): Add crypto_pmull to
21247         attribute type list for neon_multiply.
21248         * config/arm/crypto.md (crypto_vmullp64): Change type to crypto_pmull.
21249         * config/arm/exynos-m1.md (exynos_m1_neon_type): Add crypto_pmull to
21250         attribute type list for neon_multiply.
21251         * config/arm/types.md (crypto_pmull): Add.
21252         * config/arm/xgene1.md (xgene1_neon_pmull): Add crypto_pmull to
21253         attribute type list.
21255 2017-06-20  Andreas Tobler  <andreast@gcc.gnu.org>
21257         * config.gcc (armv6*-*-freebsd*): Change the target_cpu_cname to
21258         arm1176jzf-s.
21260 2017-06-20  Jakub Jelinek  <jakub@redhat.com>
21262         * ira-costs.c (find_costs_and_classes): Initialize cost_classes later
21263         to make sure not to dereference a NULL cost_classes_ptr pointer.
21265 2017-06-20  Carl Love  <cel@us.ibm.com>
21267         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
21268         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
21269         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
21270         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
21271         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
21272         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
21273         VMULOSW): New enum "unspec" values.
21274         (vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
21275         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
21276         altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
21277         altivec_vmulosw): New patterns.
21278         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
21279         VMULOSW): Add definitions.
21281 2017-06-20  Julia Koval  <julia.koval@intel.com>
21283         * config/i386/i386.c: Fix rounding expand for new pattern.
21284         * config/i386/subst.md: Fix pattern (parallel -> unspec).
21286 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
21288         * config/aarch64/aarch64-option-extensions.def (rcpc): New.
21289         * config/aarch64/aarch64.h (AARCH64_FL_RCPC): New.
21291 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
21293         * config/aarch64/aarch64-option-extensions.def (fp16): Fix expected
21294         feature string.
21296 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
21298         * config/aarch64/aarch64-cores.def: Rearrange to sort by
21299         architecture, then by implementer ID.
21300         * config/aarch64/aarch64-tune.md: Regenerate.
21302 2017-06-20  Richard Biener  <rguenther@suse.de>
21304         PR middle-end/81097
21305         * fold-const.c (split_tree): Fold to type before negating.
21307 2017-06-20  David Malcolm  <dmalcolm@redhat.com>
21309         * diagnostic-show-locus.c
21310         (selftest::test_fixit_deletion_affecting_newline): New function.
21311         (selftest::diagnostic_show_locus_c_tests): Call it.
21313 2017-06-20  Andreas Schwab  <schwab@suse.de>
21315         PR target/80970
21316         * config/m68k/m68k.md (bsetdreg, bchgdreg, bclrdreg): Use "=d"
21317         instead of "+d".
21319 2017-06-20  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
21321         * config/arm/arm-c.c (arm_cpu_builtins): New block to define
21322         __ARM_FEATURE_COPROC according to support.
21324 2017-06-20  Jakub Jelinek  <jakub@redhat.com>
21326         * tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
21327         Rewritten to avoid overflow for > 32-bit pointers.
21329         PR sanitizer/81125
21330         * ubsan.h (ubsan_encode_value): Workaround buggy clang++ parser
21331         by removing enum keyword.
21332         (ubsan_type_descriptor): Likewise.  Formatting fix.
21334         PR target/81121
21335         * config/i386/i386.md (TARGET_USE_VECTOR_CONVERTS float si->{sf,df}
21336         splitter): Require TARGET_SSE2 in the condition.
21338 2017-06-20  Michael Meissner  <meissner@linux.vnet.ibm.com>
21340         PR target/79799
21341         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Add support
21342         for doing vector set of SFmode on ISA 3.0.
21343         * config/rs6000/vsx.md (vsx_set_v4sf_p9): Likewise.
21344         (vsx_set_v4sf_p9_zero): Special case setting 0.0f to a V4SF
21345         element.
21346         (vsx_insert_extract_v4sf_p9): Add an optimization for inserting a
21347         SFmode value into a V4SF variable that was extracted from another
21348         V4SF variable without converting the element to double precision
21349         and back to single precision vector format.
21350         (vsx_insert_extract_v4sf_p9_2): Likewise.
21352 2017-06-19  Jakub Jelinek  <jakub@redhat.com>
21354         * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Multiply
21355         in UWHI to avoid undefined overflow.
21357         PR sanitizer/81125
21358         * ubsan.h (enum ubsan_encode_value_phase): New.
21359         (ubsan_encode_value): Change second argument to
21360         enum ubsan_encode_value_phase with default value of
21361         UBSAN_ENCODE_VALUE_GENERIC.
21362         * ubsan.c (ubsan_encode_value): Change second argument to
21363         enum ubsan_encode_value_phase PHASE from bool IN_EXPAND_P,
21364         adjust uses, for UBSAN_ENCODE_VALUE_GENERIC use just
21365         create_tmp_var_raw instead of create_tmp_var and use a
21366         TARGET_EXPR.
21367         (ubsan_expand_bounds_ifn, ubsan_build_overflow_builtin,
21368         instrument_bool_enum_load, ubsan_instrument_float_cast): Adjust
21369         ubsan_encode_value callers.
21371         PR sanitizer/81111
21372         * ubsan.c (ubsan_encode_value): If current_function_decl is NULL,
21373         use create_tmp_var_raw instead of create_tmp_var, mark it addressable
21374         just by setting TREE_ADDRESSABLE on the result and use a TARGET_EXPR.
21376 2017-06-19  Richard Biener  <rguenther@suse.de>
21378         PR middle-end/81118
21379         * tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Clear niter
21380         estimates if we changed anything.
21382 2017-06-19  Richard Biener  <rguenther@suse.de>
21384         PR tree-optimization/80887
21385         * tree-ssa-sccvn.c (mprts_hook_cnt): New global.
21386         (vn_lookup_simplify_result): Allow only mprts_hook_cnt succesful
21387         simplified lookups, then reset mprts_hook.
21388         (vn_nary_build_or_lookup_1): Set mprts_hook_cnt to 9 before
21389         simplifying.
21390         (try_to_simplify): Likewise.
21392 2017-06-19  Martin Liska  <mliska@suse.cz>
21394         PR sanitizer/80879
21395         * gimplify.c (gimplify_switch_expr):
21396         Initialize live_switch_vars for SWITCH_BODY == STATEMENT_LIST.
21398 2017-06-19  Martin Liska  <mliska@suse.cz>
21400         * doc/install.texi: Document that PGO runs in 4 stages.
21402 2017-06-19  Martin Liska  <mliska@suse.cz>
21404         PR ipa/80732
21405         * attribs.c (make_dispatcher_decl): Do not append '.ifunc'
21406         to dispatcher function name.
21407         * multiple_target.c (replace_function_decl): New function.
21408         (create_dispatcher_calls): Redirect both edges and references.
21410 2017-06-19  Jan Hubicka <hubicka@ucw.cz>
21412         * profile-count.c (profile_count::dump): Dump quality.
21413         (profile_count::differs_from_p): Update for unsigned val.
21414         * profile-count.h (profile_count_quality): New enum.
21415         (profile_count): Turn m_val to 62bit unsigned, add quality tracking.
21417 2017-06-19  Richard Biener  <rguenther@suse.de>
21419         * tree-ssa-loop-niter.h (estimate_numbers_of_iterations): Take
21420         struct function as arg.
21421         (estimate_numbers_of_iterations): Export overload with loop arg.
21422         (free_numbers_of_iterations_estimates_loop): Use an overload of
21423         free_numbers_of_iterations_estimates instead.
21424         * tree-cfg.c (remove_bb): Adjust.
21425         * tree-cfgcleanup.c (remove_forwarder_block_with_phi): Likewise.
21426         * tree-parloops.c (gen_parallel_loop): Likewise.
21427         * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables):
21428         Likewise.
21429         (tree_unroll_loops_completely): Likewise.
21430         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop):
21431         Use an overload instead and export.
21432         (estimated_loop_iterations): Adjust.
21433         (max_loop_iterations): Likewise.
21434         (likely_max_loop_iterations): Likewise.
21435         (estimate_numbers_of_iterations): Take struct function as arg
21436         and adjust.
21437         (loop_exits_before_overflow): Adjust.
21438         (free_numbers_of_iterations_estimates_loop): Use an overload.
21439         * tree-vect-loop.c (vect_analyze_loop_form): Adjust.
21440         * tree-vectorizer.c (vect_free_loop_info_assumptions): Likewise.
21442 2017-06-19  Richard Biener  <rguenther@suse.de>
21444         PR ipa/81112
21445         * ipa-prop.c (find_constructor_constant_at_offset): Handle
21446         RANGE_EXPR conservatively.
21448 2017-06-16  Carl Love  <cel@us.ibm.com>
21450         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
21451         definitions for vec_float, vec_float2, vec_floato,
21452         vec_floate built-ins.
21453         * config/rs6000/vsx.md (define_c_enum "unspec"): Add RTL code
21454         for instructions vsx_xvcvsxws vsx_xvcvuxwsp, float2, floato and
21455         floate.
21456         * config/rs6000/rs6000-builtin.def (FLOAT2_V2DI, FLOATE_V2DF,
21457         FLOATE_2DI, FLOATO_V2DF, FLOATEE_V2DI, XVCVSXWSP_V4SF,
21458         UNS_FLOATO_V2DI, UNS_FLOATE_V2DI): Add definitions.
21459         * config/altivec.md (define_insn "p8_vmrgew_<mode>",
21460         define_mode_attr VF_sxddp): Add V4SF type to p8_vmrgew.
21461         * config/rs6000/altivec.h (vec_float, vec_float2, vec_floate,
21462         vec_floato): Add builtin defines.
21463         * doc/extend.texi (vec_float, vec_float2, vec_floate, vec_floato):
21464         Update the built-in documentation file for the new built-in
21465         functions.
21467 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21469         * config/arm/arm.opt (marm): Mark as the negative of of -mthumb.
21470         (mthumb): Mark as the negative of -marm.
21472 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21474         * doc/invoke.texi (ARM Options, -mcpu): Document supported
21475         extension options.
21476         (ARM Options, -mtune): Document that this accepts the same
21477         extension options as -mcpu.
21478         (ARM Options, -mfpu): Document addition of -mfpu=auto.
21480 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21482         * doc/invoke.texi (ARM Options, -march=): Document new syntax and
21483         permitted extensions.
21485 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21487         * config/arm/arm-cpus.in (armv7): Add extension +nofp.
21488         (armv7-r): Add aliases vfpv3xd and vfpv3-d16.
21489         (armv8-m.main): Add option +nodsp.
21490         * config/arm/arm-cpu-cdata.h: Regenerated.
21492 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21494         * config/arm/t-fuchsia: New file.
21495         * config.gcc (arm*-*-fuchsia*): Use it.
21497 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21499         * config/arm/t-symbian: Rewrite for new option infrastructure.
21501 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21503         * config/arm/t-phoenix (MULTILIB_REUSE): Clear variable.
21504         (MULTILIB_REQUIRED): Likewise.
21506 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21508         * config/arm/t-linux-eabi (MULTILIB_EXCEPTIONS): Set to empty.
21509         (MULTILIB_RESUE): Likewise.
21510         (MULTILIB_MATCHES): Likewise.
21511         (MULTLIB_REQUIRED): Likewise.
21513 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21515         * config/arm/t-rtems: Rewrite for new option framework.
21517 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21519         * config/arm/t-aprofile (v7_a_nosimd_variants, v7_a_simd_variants)
21520         (v7ve_nosimd_variatns, v7ve_vfpv3_simd_variants)
21521         (v7ve_vfpv4_simd_variants, v8_a_nosimd_variants, v8_a_simd_variants)
21522         (v8_1_a_simd_variants, v8_2_a_simd_variants): Move to ...
21523         * config/arm/t-multilib: ... here.
21524         (MULTILIB_OPTIONS): Add armv7 and armv7+fp architectures.
21525         (MULTILIB_MATCHES): Use armv7 libraries for armv7-r.  Also use for
21526         armv7-a and armv8*-a when A-profile libraries have not been built.
21527         * config/arm/t-rmprofile: Rewrite.
21529 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21531         * genmultilib (multilib_reuse): Allow an explicit period to be escaped
21532         with a backslash.  Remove the backslash after substituting unescaped
21533         periods.
21534         * doc/fragments.texi (MULTILIB_REUSE): Document it.
21536 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21538         * config.gcc: (arm*-*-*): When building a-profile libraries, force
21539         the driver to pass through the default setting of -mfloat-abi.
21540         * common/config/arm/arm-common.c (arm_target_thumb_only): Return -marm
21541         rather than NULL.
21542         * config/arm/t-multilib (MULTILIB_REUSE): Initialize to empty.
21543         (all_feat_combs): New rule.
21544         (MULTILIB_OPTIONS): Use explicit ARM and Thumb directories.  Rework
21545         default libraries.
21546         * config/arm/t-aprofile: Rewrite.
21548 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21550         * config/arm/arm.h (FPUTYPE_AUTO): Define.
21551         * config/arm/arm.c (arm_option_override): Use FPUTYPE_AUTO if the
21552         fpu is not specified by the user/command-line.
21553         * config/arm/bpabi.h (FPUTYPE_DEFAULT): Delete.
21554         * config/arm/netbsd-elf.h (FPUTYPE_DEFAULT): Delete.
21555         * config/arm/linux-elf.h (FPUTYPE_DEFAULT): Delete.
21556         * config/arm/vxworks.h (FPUTYPE_DEFAULT): Delete.
21557         * common/config/arm/arm-common.c (arm_canon_arch_option): Use
21558         FPUTYPE_AUTO insted of FPUTYPE_DEFAULT.
21560 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21562         * config/arm/elf.h (MULTILIB_DEFAULTS): Delete.
21563         * config/arm/t-arm-elf: Rewritten.
21565 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21567         * config/arm/arm.h (TARGET_HARD_FLOAT): Also check that we
21568         have some floating-point instructions.
21569         (TARGET_SOFT_FLOAT): Define as inverse of TARGET_HARD_FLOAT.
21570         (TARGET_MAYBE_HARD_FLOAT): New macro.
21571         * config/arm/arm-builtins.c (arm_init_builtins): Use
21572         TARGET_MAYBE_HARD_FLOAT.
21573         * config/arm/arm.c (arm_option_override): Use TARGET_HARD_FLOAT_ABI.
21575 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21577         * common/config/arm/arm-common.c: Define INCLUDE_LIST.
21578         (configargs.h): Include it.
21579         (arm_print_hint_for_fpu_option): New function.
21580         (arm_parse_fpu_option): New function.
21581         (candidate_extension): New class.
21582         (arm_canon_for_multilib): New function.
21583         * config/arm/arm.h (CANON_ARCH_SPEC_FUNCTION): New macro.
21584         (EXTRA_SPEC_FUNCTIONS): Add CANON_ARCH_SPEC_FUNCTION.
21585         (ARCH_CANONICAL_SPECS): New macro.
21586         (DRIVER_SELF_SPECS): Add ARCH_CANONICAL_SPECS.
21588 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21590         * config.gcc (arm*-*-*): Ensure both target_cpu_cname and with_cpu
21591         are set after handling multilib fragments.  Set target_cpu_default2
21592         from with_cpu.
21594 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21596         * config.gcc (arm*-*-fucshia*): Set target_cpu_cname to the real
21597         cpu name.
21598         (arm*-*-*): Set target_cpu_default2 to a quoted string.
21599         * config/arm/parsecpu.awk (check_cpu): Validate any extension
21600         options.
21601         (check_arch): Likewise.
21602         * config/arm/arm.c (arm_configure_build_target): Handle
21603         TARGET_CPU_DEFAULT being a string constant.  Scan any feature
21604         options in the default.
21606 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21608         * config/arm/arm-protos.h (cpu_arch_extension): Add field to record
21609         when an option is an alias of another.
21610         * config/arm/parsecpu.awk (optalias): New parser token.
21611         (gen_comm_data): Mark non-alias options as such.  Emit entries
21612         for extension aliases.
21613         * config/arm/arm-cpus.in (armv5e): Make vfpv2 an alias.
21614         (armv5te, armv5tej, armv6, armv6j, armv6k, armv6z): Likewise.
21615         (armv6kz, armv6zk, armv6t2): Likewise.
21616         (armv7): Make vfpv3-d16 an alias.
21617         (armv7-a): Make vfpv3-d16, neon and neon-vfpv3 aliases.  Sort in
21618         canonical order.
21619         (armv7ve): Make vfpv4-d16, neon-vfpv3 and neon-vfpv4 aliases.
21620         Sort in canonical order.
21621         (armv8-a): Sort in canonical order.
21622         (armv8.1-a, armv8.2-a):  Likewise.
21623         (generic-armv7-a): Make neon and neon-vfpv3 aliases.  Sort in
21624         canonical order.
21625         (cortex-a9): Sort in canonical order.
21626         * config/arm/arm.c (selftests.h): Include it.
21627         (arm_test_cpu_arch_data): New function.
21628         (arm_run_self_tests): New function.
21629         (TARGET_RUN_TARGET_SELFTESTS): Redefine.
21630         (targetm): Move declaration to the end of the file.
21631         * arm-cpu-cdata.h: Regenerated.
21633 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21635         * config/arm/arm.h (TARGET_MODE_SPECS): Add additional parameter to
21636         call to target_mode_check describing the type of option passed.
21637         * common/config/arm/arm-common.c (arm_arch_core_flag): Delete.
21638         (arm_target_thumb_only): Use arm_parse_arch_option_name or
21639         arm_parse_cpu_option_name to match parameters against list of
21640         available targets.
21641         * config/arm/parsecpu.awk (gen_comm_data): Don't generate
21642         arm_arch_core_flags data structure.
21643         * config/arm/arm-cpu_cdata.h: Regenerated.
21645 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21647         * common/config/arm/arm-common.c (arm_initialize_isa): Moved here from
21648         config/arm/arm.c.
21649         (arm_print_hint_for_cpu_option): Likewise.
21650         (arm_print_hint_for_arch_option): Likewise.
21651         (arm_parse_cpu_option_name): Likewise.
21652         (arm_parse_arch_option_name): Likewise.
21653         * config/arm/arm.c (arm_identify_fpu_from_isa): Use the computed number
21654         of entries in the all_fpus list.
21655         * config/arm/arm-protos.h (all_architectures, all_cores): Declare.
21656         (arm_parse_cpu_option_name): Declare.
21657         (arm_parse_arch_option_name): Declare.
21658         (arm_parse_option_features): Declare.
21659         (arm_intialize_isa): Declare.
21660         * config/arm/parsecpu.awk (gen_data): Move CPU and architecture
21661         data tables to ...
21662         (gen_comm_data): ... here.  Make definitions non-static.
21663         * config/arm/arm-cpu-data.h: Regenerated.
21664         * config/arm/arm-cpu-cdata.h: Regenerated.
21666 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21668         * config/arm/arm-protos.h (arm_build_target): Remove arch_core.
21669         (cpu_arch_extension): New structure.
21670         (cpu_arch_option, arch_option, cpu_option): New structures.
21671         * config/arm/parsecpu.awk (gen_headers): Build an enumeration of
21672         architecture types.
21673         (gen_data): Generate new format data tables.
21674         * config/arm/arm.c (cpu_tune): New structure.
21675         (cpu_option, processors): Delete.
21676         (arm_print_hint_for_core_or_arch): Delete.  Replace with ...
21677         (arm_print_hint_for_cpu_option): ... this and ...
21678         (arm_print_hint_for_arch_option): ... this.
21679         (arm_parse_arch_cpu_name): Delete.  Replace with ...
21680         (arm_parse_cpu_option_name): ... this and ...
21681         (arm_parse_arch_option_name): ... this.
21682         (arm_unrecognized_feature): Change type of target parameter to
21683         cpu_arch_option.
21684         (arm_parse_arch_cpu_features): Delete.  Replace with ...
21685         (arm_parse_option_features): ... this.
21686         (arm_configure_build_target): Rework to use new configuration data
21687         tables.
21688         (arm_print_tune_info): Rework for new configuration data tables.
21689         * config/arm/arm-cpu-data.h: Regenerated.
21690         * config/arm/arm-cpu.h: Regenerated.
21692 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21694         * Makefile.in (OBJS): Move sbitmap.o from here ...
21695         (OBJS-libcommon): ... to here.
21697 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21699         * config/arm/arm-isa.h (ISA_ALL_FPU_INTERNAL): Renamed from ISA_ALL_FPU.
21700         (ISA_ALL_CRYPTO): New macro.
21701         (ISA_ALL_SIMD): New macro
21702         (ISA_ALL_FP): New macro.
21703         * config/arm/arm.c (fpu_bitlist): Update initializer.
21704         * config/arm/arm-cpus.in: Use new ISA_ALL macros to disable crypto,
21705         simd or fp.
21706         (arm9e): Add fpu.  Add option for nofp
21707         (arm946e-s, arm966e-s, arm968e-s, arm10e, arm1020e, arm1022e): Likewise.
21708         (arm926ej-s, arm1026ej-s): Likewise.
21709         (generic-armv7-a): Add fpu.  Add options for simd, vfpv3, vfpv3-d16,
21710         vfpv3-fp16, vfpv3-d16-fp16, vfpv4, vfpv4-d16, neon, neon-vfp3,
21711         neon-fp16, neon-vfpv4, nofp and nosimd.
21712         (cortex-a5, cortex-a7): Add fpu.  Add options for nosimd and nofp.
21713         (cortex-a8): Add fpu.  Add option for nofp.
21714         (cortex-a9): Add fpu.  Add options for nosimd and nofp.
21715         (cortex-a12, cortex-a15, cortex-a17): Add fpu.  Add option for nofp.
21716         (cortex-r4f): Add fpu.
21717         (cortex-r5): Add fpu.  Add options for nofp.dp and nofp.
21718         (cortex-r7): Use idiv option from architecture.  Add fpu.  Add option
21719         for nofp.
21720         (cortex-r8): Likewise.
21721         (cortex-m4): Add fpu.  Add option for nofp.
21722         (cortex-a15.cortex-a7): Add fpu.  Add option for nofp.
21723         (cortex-a17.cortex-a7): Likewise.
21724         (cortex-a32): Add fpu.  Add options for crypto and nofp.
21725         (cortex-a35, cortex-a53): Likewise.
21726         (cortex-a57): Add fpu.  Add option for crypto.
21727         (cortex-a72, cortex-a73): Likewise.
21728         (exynos-m1): Likewise.
21729         (cortex-a57.cortex-a53, cortex-a72.cortex-a53): Likewise.
21730         (cortex-a73.cortex-a35, cortex-a73.cortex-a53): Likewise.
21731         (cortex-m33): Add fpu.  Add option for nofp.
21732         * config/arm/arm-cpu-cdata.h: Regenerated
21733         * config/arm/arm-cpu-data.h: Regenerated.
21735 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21737         * arm-cpus.in (armv5e): Add options fp, vfpv2 and nofp.
21738         (armv5te, armv5tej): Likewise.
21739         (armv6, armv6j, armv6k, armv6z, armv6kz, armv6zk, armv6t2): Likewise.
21740         (armv7): Add options fp and vfpv3-d16.
21741         (armv7-a): Add options fp, simd, vfpv3, vfpv3-d16, vfpv3-d16-fp16,
21742         vfpv3-fp16, vfpv4, vfpv4-d16, neon, neon-vfpv3, neon-fp16, neon-vfpv4,
21743         nofp and nosimd.
21744         (armv7ve): Likewise.
21745         (armv7-r): Add options fp, fp.sp, idiv, nofp and noidiv.
21746         (armv7e-m): Add options fp, fpv5, fp.dp and nofp.
21747         (armv8-a): Add nocrypto option.
21748         (armv8.1-a, armv8.2-a): Likewise.
21749         (armv8-m.main): add options fp, fp.dp and nofp.
21751 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21753         * config/arm/arm-cpus.in (armv8-a): Add options crc, simd crypto and
21754         nofp.
21755         (armv8-a+crc): Delete.
21756         (armv8.1-a): Add options simd, crypto and nofp.
21757         (armv8.2-a): Add options fp16, simd, crypto and nofp.
21758         (armv8.2-a+fp16): Delete.
21759         (armv8-m.main): Add option dsp.
21760         (armv8-m.main+dsp): Delete.
21761         (cortex-a8): Add fpu.  Add nofp option.
21762         (cortex-a9): Add fpu.  Add nofp and nosimd options.
21763         * config/arm/parsecpu.awk (gen_data): Generate option tables and
21764         link to main cpu and architecture data structures.
21765         (gen_comm_data): Only put isa attributes from the main architecture
21766         in common tables.
21767         (option): New statement for architecture and CPU entries.
21768         * arm.c (struct cpu_option): New structure.
21769         (struct processors): Add entry for options.
21770         (arm_unrecognized_feature): New function.
21771         (arm_parse_arch_cpu_name): Ignore any characters after the first
21772         '+' character.
21773         (arm_parse_arch_cpu_feature): New function.
21774         (arm_configure_build_target): Separate out any CPU and architecture
21775         features and parse separately.  Don't error out if -mfpu=auto is
21776         used with only an architecture string.
21777         (arm_print_asm_arch_directives): New function.
21778         (arm_file_start): Call it.
21779         * config/arm/arm-cpu-cdata.h: Regenerated.
21780         * config/arm/arm-cpu-data.h: Likewise.
21781         * config/arm/arm-tables.opt: Likewise.
21783 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21785         * config/arm/elf.h (ASM_SPEC): Only pass -mfpu through to the
21786         assembler when it is not -mfpu=auto.
21788 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21790         * config/arm/arm.h (BIG_LITTLE_SPEC): Delete macro.
21791         (ASM_REWRITE_SPEC_FUNCTIONS): New macro.
21792         (BIG_LITTLE_CPU_SPEC_FUNCTIONS): Delete macro.
21793         (ASM_CPU_SPEC): Rewrite.
21794         (MCPU_MTUNE_NATIVE_FUNCTIONS): New macro.
21795         (EXTRA_SPEC_FUNCTIONS): Move outside of ifdef.  Use
21796         MCPU_MTUNE_NATIVE_FUNCTIONS and ASM_REWRITE_SPEC_FUNCTIONS.  Remove
21797         reference to BIG_LITTLE_CPU_SPEC_FUNCTIONS.
21798         * common/config/arm/arm-common.c (arm_rewrite_selected_cpu): Ensure
21799         copied string is NUL-terminated.  Also strip any characters prefixed
21800         by '+'.
21801         (arm_rewrite_selected_arch): New function.
21802         (arm_rewrite_march): New function.
21804 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
21806         * config/arm/arm.opt (x_arm_arch_string): New TargetSave option.
21807         (x_arm_cpu_string, x_arm_tune_string): Likewise.
21808         (march, mcpu, mtune): Convert to string-based options.
21809         * config/arm/arm.c (arm_print_hint_for_core_or_arch): New function.
21810         (arm_parse_arch_cpu_name): New function.
21811         (arm_configure_build_target): Use arm_parse_arch_cpu_name to
21812         identify selected architecture or CPU.
21813         (arm_option_save): New function.
21814         (TARGET_OPTION_SAVE): Redefine.
21815         (arm_option_restore): Restore string options.
21816         (arm_option_print): Print string options.
21818 2017-06-16  Martin Sebor  <msebor@redhat.com>
21820         PR tree-optimization/80933
21821         PR tree-optimization/80934
21822         * builtins.c (fold_builtin_3): Do not handle bcmp here.
21823         * gimple-fold.c (gimple_fold_builtin_bcmp): New function.
21824         (gimple_fold_builtin_bcopy, gimple_fold_builtin_bzero): Likewise.
21825         (gimple_fold_builtin): Call them.
21827 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
21829         * gimple-ssa-isolate-paths.c (isolate_path): Set edge leading to path
21830         as unlikely; update profile.
21832 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
21834         * predict.c (force_edge_cold): Handle declaring edges impossible
21835         more aggresively.
21837 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
21839         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update
21840         profile.
21841         (try_unroll_loop_completely): Fix reporting.
21843 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
21845         * tree-ssa-tail-merge.c (replace_block_by): Fix profile updating.
21847 2017-06-16  James Greenhalgh  <james.greenhalgh@arm.com>
21849         PR target/71778
21850         * config/arm/arm-builtins.c (arm_expand_builtin_args): Return TARGET
21851         if given a non-constant argument for an intrinsic which requires a
21852         constant.
21854 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
21856         * profile.c (compare_freqs): New function.
21857         (branch_prob): Sort edge list.
21858         (find_spanning_tree): Assume that the list is priority sorted.
21860 2017-06-16  Richard Biener  <rguenther@suse.de>
21862         PR tree-optimization/81090
21863         * passes.def (pass_record_bounds): Remove.
21864         * tree-pass.h (make_pass_record_bounds): Likewise.
21865         * tree-ssa-loop.c (pass_data_record_bounds, pass_record_bounds,
21866         make_pass_record_bounds): Likewise.
21867         * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables): Do
21868         not free niter estimates at the beginning but at the end.
21869         * tree-scalar-evolution.c (scev_finalize): Free niter estimates.
21871 2017-06-16  Richard Biener  <rguenther@suse.de>
21873         * tree-switch-conversion.c (emit_case_bit_tests): Adjust
21874         initializer to workaround ICE in host GCC 4.8.
21876 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
21878         * ipa-inline-transform.c (update_noncloned_frequencies): Update also
21879         counts.
21880         (clone_inlined_nodes): Update.
21882 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
21884         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune): Update
21885         prefetch settings, and enable prefetching by default at -O3.
21887 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
21889         * config/aarch64/aarch64.c (aarch64_override_options_internal):
21890         Set flag_prefetch_loop_arrays according to tuning data.
21892 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
21894         * config/aarch64/aarch64-protos.h (struct cpu_prefetch_tune):
21895         New tune structure.
21896         (struct tune_params): Use cpu_prefetch_tune instead of cache_line_size.
21897         [Unrelated to main purpose of the patch] Place the pointer field last
21898         to enable type checking errors when tune structure are wrongly merged.
21899         * config/aarch64/aarch64.c (generic_prefetch_tune,)
21900         (exynosm1_prefetch_tune, qdf24xx_prefetch_tune,)
21901         (thunderx2t99_prefetch_tune): New tune constants.
21902         (tune_params *_tunings): Update all tunings (no functional change).
21903         (aarch64_override_options_internal): Set PARAM_SIMULTANEOUS_PREFETCHES,
21904         PARAM_L1_CACHE_SIZE, PARAM_L1_CACHE_LINE_SIZE, and PARAM_L2_CACHE_SIZE
21905         from tunings structures.
21907 2017-06-16  Jakub Jelinek  <jakub@redhat.com>
21909         PR sanitizer/81094
21910         * ubsan.c (instrument_null): Add T argument, use it instead
21911         of computing it based on IS_LHS.
21912         (instrument_object_size): Likewise.
21913         (pass_ubsan::execute): Adjust instrument_null and
21914         instrument_object_size callers to pass gimple_get_lhs or
21915         gimple_assign_rhs1 result to it.  Use instrument_null instead of
21916         calling get_base_address and instrument_mem_ref.  Handle
21917         aggregate call arguments for object-size sanitization.
21919 2017-06-16  Yury Gribov  <tetra2005@gmail.com>
21921         PR tree-optimization/81089
21922         * tree-vrp.c (is_masked_range_test): Validate operands of
21923         subexpression.
21925 2017-06-15  Martin Sebor  <msebor@redhat.com>
21927         PR c++/80560
21928         * dumpfile.c (dump_register): Avoid calling memset to initialize
21929         a class with a default ctor.
21930         * gcc.c (struct compiler): Remove const qualification.
21931         * genattrtab.c (gen_insn_reserv): Replace memset with initialization.
21932         * hash-table.h: Ditto.
21933         * ipa-cp.c (allocate_and_init_ipcp_value): Replace memset with
21934           assignment.
21935         * ipa-prop.c (ipa_free_edge_args_substructures): Ditto.
21936         * omp-low.c (lower_omp_ordered_clauses): Replace memset with
21937         default ctor.
21938         * params.h (struct param_info): Make struct members non-const.
21939         * tree-switch-conversion.c (emit_case_bit_tests): Replace memset
21940         with default initialization.
21941         * vec.h (vec_copy_construct, vec_default_construct): New helper
21942         functions.
21943         (vec<T>::copy, vec<T>::splice, vec<T>::reserve): Replace memcpy
21944         with vec_copy_construct.
21945         (vect<T>::quick_grow_cleared): Replace memset with default ctor.
21946         (vect<T>::vec_safe_grow_cleared, vec_safe_grow_cleared): Same.
21947         * doc/invoke.texi (-Wclass-memaccess): Document.
21949 2017-06-15  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
21951         * emit-rtl.h (is_leaf): Update comment about local
21952         register allocator.
21954 2017-06-15  Jozef Lawrynowicz   <jozef.l@somniumtech.com>
21956         PR target/78818
21957         * config/msp430/msp430.c (msp430_data_attr): Check that it's possible
21958         for a variable to have a section before checking if the section has a
21959         name.
21960         Set section to.persistent if persistent attribute is set.
21961         Warn if .persistent attribute is used on an automatic variable.
21963 2017-06-15  Eric Botcazou  <ebotcazou@adacore.com>
21965         PR rtl-optimization/80474
21966         * reorg.c (update_block): Do not ignore instructions in a delay slot.
21968 2017-06-15  Segher Boessenkool  <segher@kernel.crashing.org>
21970         * config/rs6000/rs6000.md (add<mode>3): Use reg_or_subregno instead
21971         of REGNO.
21973 2017-06-14  Maciej W. Rozycki  <macro@imgtec.com>
21975         * config/mips/mips.md (MIPS16_T_REGNUM): Remove constant.
21976         (casesi): Emit bounds checking as RTL.
21977         (casesi_internal_mips16_<mode>): Remove bounds checking.
21979 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
21981         * config/xtensa/xtensa.c (xtensa_option_override): Append
21982         MASK_CONST16 to target_flags in the absence of TARGET_L32R.
21983         (hwloop_optimize, hwloop_fail, hwloop_pattern_reg,
21984          xtensa_doloop_hooks): Define unconditionally.
21985         (xtensa_reorg_loops): Only call reorg_loops in the presence of
21986         TARGET_LOOPS.
21987         * config/xtensa/xtensa.h (TARGET_L32R): New definition.
21988         (TARGET_DEFAULT): Remove XCHAL_HAVE_L32R condition and account
21989         for it in xtensa_option_override.
21990         (HARD_FRAME_POINTER_IS_FRAME_POINTER,
21991          HARD_FRAME_POINTER_IS_ARG_POINTER): New definitions.
21993 2017-06-14  Boris Kolpackov  <boris@codesynthesis.com>
21995         * doc/cppopts.texi: Document '-' special value to -MF.
21997 2017-06-14  Wilco Dijkstra  <wdijkstr@arm.com>
21999         * config/arm/cortex-a53.md (cortex_a53_fpalu) Adjust latency.
22000         (cortex_a53_fconst): Likewise.
22001         (cortex_a53_fpmul): Likewise.
22002         (cortex_a53_f_load_64): Likewise.
22003         (cortex_a53_f_load_many): Likewise.
22004         (cortex_a53_advsimd_alu): Likewise.
22005         (cortex_a53_advsimd_alu_q): Likewise.
22006         (cortex_a53_advsimd_mul): Likewise.
22007         (cortex_a53_advsimd_mul_q): Likewise.
22008         (fpmac bypass): Add new bypass for fpmac-fpmac case.
22009         Add missing fmul, r2f_cvt and fconst cases.
22011 2017-06-14  Richard Biener  <rguenther@suse.de>
22013         PR middle-end/81088
22014         * fold-const.c (split_tree): Drop TREE_OVERFLOW flag from
22015         literal constants.
22016         (fold_binary_loc): When associating do not treat pre-existing
22017         TREE_OVERFLOW on literal constants as a reason to allow
22018         TREE_OVERFLOW on associated literal constants.
22020 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
22022         * config/sparc/sparc.h (MASK_ISA): Add MASK_LEON and MASK_LEON3.
22023         (MASK_FEATURES): New macro.
22024         * config/sparc/sparc.c (sparc_option_override): Remove the special
22025         handling of -mfpu and generalize it to all MASK_FEATURES switches.
22027 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
22029         * simplify-rtx.c (simplify_binary_operation_1) <UDIV>: Do not simplify
22030         a division of 0 if non-call exceptions are enabled.
22032 2017-06-14  Andrew Pinski  <apinski@cavium.com>
22033             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
22035         PR target/71663
22036         * config/aarch64/aarch64.c (aarch64_expand_vector_init):
22037         Improve vector initialization code gen for only variable case.
22039 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
22041         * config/sparc/driver-sparc.c (cpu_names): Add SPARC-T5 entry.
22043 2017-06-14  Richard Biener  <rguenther@suse.de>
22045         PR tree-optimization/81083
22046         * tree-ssa-sccvn.c (vn_reference_lookup_3): Do not use abnormals
22047         as values.
22049 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
22051         * config/rs6000/rs6000.c: Update all comments that mentioned SPE.
22052         (rs6000_expand_builtin): Remove RS6000_BTC_EVSEL.
22053         * config/rs6000/rs6000.h (RS6000_BTC_EVSEL): Delete.
22054         * config/rs6000/vxworks.h (VXCPU_FOR_8548): Delete.  Adjust former use.
22055         * config/rs6000/vxworksae.h (VXCPU_FOR_8548): Delete.
22056         * config/rs6000/vxworksmils.h (VXCPU_FOR_8548): Delete.
22058 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
22060         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete VECTOR_SPE.
22061         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete VECTOR_SPE.
22063 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
22065         * config/rs6000/rs6000.h (FIXED_SCRATCH): Delete.
22067 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
22069         * config/rs6000/t-rtems: Don't handle SPE.
22071 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
22073         * config/rs6000/t-linux: Don't handle SPE.
22075 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
22077         * config/rs6000/eabispe.h: Delete file.
22079 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
22081         * config/rs6000/t-spe: Delete file.
22083 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
22085         * config/rs6000/rs6000.c (SPE_CONST_OFFSET_OK): Delete.
22086         (rs6000_legitimate_offset_address_p): Return false for anything in
22087         V2SImode or V2SFmode.
22089 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
22091         * config/rs6000/rs6000-modes.def: Remove all 8-byte vector modes
22092         except V2SF and V2SI.  Rearrange the vector modes, and add comments.
22093         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove V8QImode
22094         and V4HImode.
22095         (reg_offset_addressing_ok_p): Remove V4HImode and V1DImode.
22096         (rs6000_legitimate_offset_address_p): Ditto.
22097         (rs6000_emit_move): Ditto.
22098         (rs6000_init_builtins): Remove V4HI_type_node.
22100 2017-06-13  Martin Liska  <mliska@suse.cz>
22102         PR sanitize/78204
22103         * asan.c (asan_sanitize_stack_p): Use sanitize_flags_p.
22104         (gate_asan): Likewise.
22105         * asan.h (asan_no_sanitize_address_p): Remove the function.
22106         (sanitize_flags_p): New function.
22107         * builtins.def: Fix coding style.
22108         * common.opt: Use renamed enum value.
22109         * convert.c (convert_to_integer_1): Use sanitize_flags_p.
22110         * doc/extend.texi: Document no_sanitize attribute.
22111         * flag-types.h (enum sanitize_code): Rename SANITIZE_NONDEFAULT
22112         to SANITIZE_UNDEFINED_NONDEFAULT.
22113         * gcc.c (sanitize_spec_function): Use the renamed enum value.
22114         * gimple-fold.c (optimize_atomic_compare_exchange_p):
22115         Use sanitize_flags_p.
22116         * gimplify.c (gimplify_function_tree): Likewise.
22117         * ipa-inline.c (sanitize_attrs_match_for_inline_p): Likewise.
22118         * opts.c (parse_no_sanitize_attribute): New function.
22119         (common_handle_option): Use renamed enum value.
22120         * opts.h (parse_no_sanitize_attribute): Declare.
22121         * tree.c (sanitize_flags_p): New function.
22122         * tree.h: Declared here.
22123         * tsan.c: Use sanitize_flags_p.
22124         * ubsan.c (ubsan_expand_null_ifn): Likewise.
22125         (instrument_mem_ref): Likewise.
22126         (instrument_bool_enum_load): Likewise.
22127         (do_ubsan_in_current_function): Remove the function.
22128         (pass_ubsan::execute): Use sanitize_flags_p.
22129         * ubsan.h: Remove do_ubsan_in_current_function
22130         * tree-cfg.c (print_no_sanitize_attr_value): New function.
22131         (dump_function_to_file): Use it here.
22133 2017-06-13  Martin Jambor  <mjambor@suse.cz>
22135         PR tree-optimization/80803
22136         PR tree-optimization/81063
22137         * tree-sra.c (subtree_mark_written_and_enqueue): Move up in the file.
22138         (propagate_subaccesses_across_link): Enqueue subtree whenever
22139         necessary instead of relying on the caller.
22141 2017-06-13  Martin Jambor  <mjambor@suse.cz>
22143         * tree-sra.c (add_access_to_work_queue): Only enqueue accesses
22144         that have a first_link.
22145         (sort_and_splice_var_accesses): Do not check first_link before
22146         enquing.
22147         (subtree_mark_written_and_enqueue): Likewise.
22148         (propagate_all_subaccesses): Likewise and do not stop at first
22149         parent with a first_link.
22151 2017-06-13  Martin Jambor  <mjambor@suse.cz>
22153         * tree-sra.c (dump_access_tree_1): Fix accidental dumping to stderr
22154         instead of f.
22156 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
22158         * match.pd: New pattern.
22160 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
22162         * tree-vrp.c (is_masked_range_test): New function.
22163         (register_edge_assert_for): Determine ranges for
22164         some bit tests.
22166 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
22168         PR tree-optimization/67328
22169         * fold-const.c (maskable_range_p): New function.
22170         (build_range_check): Generate bittests if possible.
22172 2017-06-13  Martin Liska  <mliska@suse.cz>
22174         * gimple-pretty-print.c (dump_probability): Add new argument.
22175         (dump_edge_probability): Dump both probability and count.
22176         (dump_gimple_label): Likewise.
22177         (dump_gimple_bb_header): Likewise.
22179 2017-06-13  Georg-Johann Lay  <avr@gjlay.de>
22181         PR target/81072
22182         * config/avr/avr-devices.c: Fix indentation.
22183         * config/avr/gen-avr-mmcu-specs.c: Dito.
22185 2017-06-13  Richard Biener  <rguenther@suse.de>
22187         * tree-vect-loop.c (vect_model_reduction_cost): Do not fail,
22188         instead get vector type from stmt_info.
22189         (vectorizable_reduction): Adjust.  Remove dead code.
22191 2017-06-13  Richard Biener  <rguenther@suse.de>
22193         PR middle-end/81065
22194         * fold-const.c (extract_muldiv_1): Remove bogus distribution
22195         case of C * (x * C2 + C3).
22196         (fold_addr_of_array_ref_difference): Properly fold index difference.
22198 2017-06-12  David S. Miller  <davem@davemloft.net>
22200         PR target/80968
22201         * config/sparc/sparc.md (return expander): Emit frame blockage if
22202         function uses alloca.
22204 2017-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
22206         * combine.c (make_field_assignment): Check len rather than the mode
22207         precision when calling force_to_mode.
22209 2017-06-12  Georg-Johann Lay  <avr@gjlay.de>
22211         Support multilibs and devices that see flash in RAM address range.
22213         PR target/81072
22214         * config/avr/avr-arch.h (avr_arch_id) <ARCH_AVRXMEGA3>: New enum.
22215         (avr_mcu_t) <flash_pm_offset>: New field.
22216         (avr_device_specific_features) <AVR_ISA_RCALL>: New enum.
22217         * config/avr/avr.h (AVR_SHORT_CALLS): New define.
22218         (AVR_HAVE_JMP_CALL): Don't set if AVR_SHORT_CALLS.
22219         (AVR_TINY_PM_OFFSET): Remove macro.
22220         * config/avr/avr.opt (-mshort-calls): New option.
22221         * config/avr/gen-avr-mmcu-specs.c (print_mcu)
22222         [*self_spec]: Add / remove -mshort-calls depending on AVR_ISA_RCALL.
22223         * config/avr/avr-c.c (avr_cpu_cpp_builtins)
22224         <__AVR_SHORT_CALLS__>: Built-in define if AVR_SHORT_CALLS.
22225         <__AVR_HAVE_JMP_CALL__>: Use AVR_HAVE_JMP_CALL as condition
22226         instead of avr_arch->have_jmp_call.
22227         <__AVR_PM_BASE_ADDRESS__>: Built-in define if avr_arch->flash_pm_offset.
22228         [AVR_TINY] <__AVR_TINY_PM_BASE_ADDRESS__>: Use
22229         avr_arch->flash_pm_offset to define.
22230         * config/avr/avr-devices.c (avr_arch_types): Add initializers for
22231         new field flash_pm_offset.  Add entry for avrxmega3.
22232         (avr_texinfo): Add entry for avrxmega3.
22233         * config/avr/avr-mcus.def: Add entries for: avrxmega3,
22234         attiny212, attiny214,
22235         attiny412, attiny414, attiny416, attiny417,
22236         attiny814, attiny816, attiny817,
22237         attiny1614, attiny1616, attiny1617,
22238         attiny3214, attiny3216, attiny3217.
22239         * config/avr/avr.c (avr_assemble_integer)[AVR_TINY]: Use
22240         avr_arch->flash_pm_offset instead of AVR_TINY_PM_OFFSET.
22241         (avr_print_operand_address) [AVR_TINY]: Same.
22242         (avr_asm_init_sections) <readonly_data_section>: Only patch
22243         callback if avr_arch->flash_pm_offset = 0.
22244         (avr_asm_named_section) <avr_need_copy_data_p>: Skip setting it
22245         for rodata if avr_arch->flash_pm_offset != 0.
22246         (avr_encode_section_info) [AVR_TINY]: Adjust comment.
22247         * config/avr/genmultilib.awk (dir_rcall, opt_rcall): New vars.
22248         (opts) [AVR_ISA_RCALL]: Append opt_rcall.
22249         (m_options): Append opt_rcall.
22250         (m_dirnames): Append dir_rcall.
22251         * config/avr/t-multilib: Regenerate.
22253         * configure.ac [target=avr]: Check whether avrxmega3 default
22254         linker description file works as needed.
22255         * configure: Regenerate.
22256         * doc/avr-mmcu.texi: Regenerate.
22257         * doc/invoke.texi (AVR Options) <-mshort-calls>: Document it.
22258         <__AVR_ARCH__>: Document avrxmega3 and 103.
22259         <__AVR_HAVE_JMP_CALL__>: Adjust documentation.
22260         <__AVR_SHORT_CALLS__>: Document it.
22261         <__AVR_PM_BASE_ADDRESS__>: Document it.
22262         * doc/extend.texi (AVR Options) <-mshort-calls>: Document it.
22263         (AVR Variable Attributes) <progmem>: Document this is
22264         not needed for avrxmega3.
22265         (AVR Named Address Spaces) <__flash>: Dito.
22267 2017-06-12  Jan Hubicka  <hubicka@ucw.cz>
22269         * cgraph.c (cgraph_node::dump): Complain about profile insanities.
22271 2017-06-12  Doug Rupp  <rupp@adacore.com>
22273         * config.gcc (*-*-vxworks*): Set use_gcc_stdint to "provide".
22274         Append vxworks-stdint.h to the tm_file list.
22275         * config/vxworks-stdint.h: New file.
22277 2017-06-12  Martin Liska  <mliska@suse.cz>
22279         PR tree-optimization/81041
22280         * tree-profile.c (gimple_gen_ic_func_profiler):
22281         Create an extra BB in profile-generate
22282         (gimple_gen_time_profiler): Likewise.
22284 2017-06-12  Jakub Jelinek  <jakub@redhat.com>
22286         PR tree-optimization/81003
22287         * tree-ssa-reassoc.c (force_into_ssa_name): New function.
22288         (update_range_test): Use it instead of force_gimple_operand_gsi.
22290 2017-06-12  Richard Biener  <rguenther@suse.de>
22292         PR tree-optimization/81053
22293         * tree-vect-loop.c (vect_is_simple_reduction): Handle PHI
22294         with backedge value not defined in loop.  Simplify def stmt
22295         compute.
22297 2017-06-11  Tom de Vries  <tom@codesourcery.com>
22299         PR target/79939
22300         * config/nvptx/nvptx.c (nvptx_cannot_force_const_mem): New function.
22301         Return true.
22302         (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to
22303         nvptx_cannot_force_const_mem.
22305 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
22307         * opts.c (finish_options): Move test for flag_split_stack after
22308         it has been initialized.
22310 2017-06-11  Jason Merrill  <jason@redhat.com>
22312         * tree.h (id_equal): New.
22313         * dwarf2out.c, hsa-gen.c, ipa-devirt.c, omp-expand.c,
22314         omp-simd-clone.c, read-rtl-function.c, tree-chkp.c, tree.c: Use it
22315         instead of strcmp of IDENTIFIER_POINTER.
22317 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
22319         * ipa-inline-transform.c: Include function.h, cfg.h and basic-block.h
22320         (mark_all_inlined_calls_cdtor): Fix formating.
22321         (inline_transform): Rescale profile before inlining.
22323 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
22325         * cgraph.h (cgraph_edge::clone): Update prototype.
22326         * cgraphclones.c (cgraph_edge::clone): Update profile scaling.
22327         (cgraph_node::create_clone): Update.
22328         (cgraph_node::create_version_clone): Update.
22329         * tree-inline.c (copy_bb): Update.
22330         (expand_call_inline): Update.
22332 2017-06-10  Segher Boessenkool  <segher@kernel.crashing.org>
22334         * config/rs6000/rs6000.c (emit_vrsave_prologue): New function,
22335         factored out from ...
22336         (rs6000_emit_prologue): ... here.
22338 2017-06-10  Segher Boessenkool  <segher@kernel.crashing.org>
22340         * config/rs6000/rs6000.c (emit_split_stack_prologue): New function,
22341         factored out from ...
22342         (rs6000_emit_prologue): ... here.
22344 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
22346         * predict.c (drop_profile): Also drop individual bb/edge and cgraph
22347         edge counts.
22348         (handle_missing_profiles): Fix computation of tp_first_run.
22349         (counts_to_freqs): Do not touch freqs when count is 0.
22351 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
22353         * cgraphbuild.c (cgraph_edge::rebuild_references): Do not touch
22354         profile.
22356 2017-06-10  Tom de Vries  <tom@codesourcery.com>
22358         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
22359         attributes): Document signal effective target.
22361 2017-06-10  Tom de Vries  <tom@codesourcery.com>
22363         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22364         Document effective target stack_size.
22366 2017-06-09  David Malcolm  <dmalcolm@redhat.com>
22368         * diagnostic.c (diagnostic_report_diagnostic): Only add fixits
22369         to the edit_context if they can be auto-applied.
22371 2017-06-9  Ian Lance Taylor  <iant@golang.org>
22373         * opts.c (finish_options): If -fsplit-stack, disable implicit
22374         -forder-blocks-and-partition.
22375         * doc/invoke.texi (Optimize Options): Document that when using
22376         -fsplit-stack -forder-blocks-and-partition is not implicitly
22377         enabled.
22379 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
22381         * builtin-attrs.def (ATTR_NORETURN_NOTHROW_LEAF_COLD_LIST,
22382         ATTR_CONST_NORETURN_NOTHROW_LEAF_COLD_LIST,
22383         ATTR_TMPURE_NORETURN_NOTHROW_LEAF_COLD_LIST): New.
22384         * builtins.def (abort, trap, unreachable): Declare cold.
22385         * calls.c (flags_from_decl_or_type): Lookup ECF_COLD.
22386         * tree-core.h (ECF_COLD): New.
22387         * tree.c (set_call_expr_flags): Handle ECF_COLD.
22388         (build_common_builtin_nodes): Mark unreachable and abort as cold.
22390 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
22392         * predict.c (unlikely_executed_stmt_p): Cleanup.
22394 2017-06-09  Richard Biener  <rguenther@suse.de>
22396         * tree-ssa-loop-im.c (execute_sm): Do not force multi-threaded
22397         model if the ref is always written to.
22399 2017-06-09  Tamar Christina  <tamar.christina@arm.com>
22401         * config/aarch64/aarch64.md (lrint<GPF:mode><GPI:mode>2): New.
22403 2017-06-09  Tamar Christina  <tamar.christina@arm.com>
22405         * config/arm/arm.c (arm_rtx_costs_internal): Make sdiv more expensive
22406         than udiv.
22408 2017-06-09  Tom de Vries  <tom@codesourcery.com>
22410         PR target/80855
22411         * config/nvptx/nvptx.md (define_expand "mov<QHSDISDFM>"): Error out with
22412         "target cannot support label values" when encountering LABEL_REF.
22414 2017-06-09  Martin Liska  <mliska@suse.cz>
22416         * tree-profile.c (gimple_gen_ic_profiler): Update comment.
22417         (gimple_gen_ic_func_profiler): Emit direct comparison
22418         of __gcov_indirect_call_callee with NULL.
22419         (gimple_gen_time_profiler): Change probability from
22420         PROB_VERY_UNLIKELY to PROB_UNLIKELY.
22422 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
22424         * profile.c (edge_gcov_counts): Turn to pointer.
22425         (compute_branch_probabilities, compute_branch_probabilities): Update.
22426         (branch_prob): Do not clear edge_gcov_count.
22427         * profile.h (edge_gcov_counts): Turn to pointer.
22428         (edge_gcov_count): Update.
22430 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
22432         * gimple.h (gimple_check_failed): Mark cold.
22434 2017-06-09  Richard Biener  <rguenther@suse.de>
22436         PR tree-optimization/66623
22437         * tree-vect-loop.c (vect_is_simple_reduction): Cleanup,
22438         refactor check_reduction into two parts, properly computing
22439         whether we have to check reduction validity for outer loop
22440         vectorization.
22442 2017-06-09  Richard Biener  <rguenther@suse.de>
22444         PR tree-optimization/79483
22445         * graphite-scop-detection.c (order): New global.
22446         (get_order): Compute bb to order mapping that satisfies code
22447         generation constraints.
22448         (cmp_pbbs): New helper.
22449         (build_scops): Start domwalk at entry block, sort generated
22450         pbbs.
22452 2017-06-09  Richard Biener  <rguenther@suse.de>
22454         PR middle-end/81007
22455         * ipa-polymorphic-call.c
22456         (ipa_polymorphic_call_context::restrict_to_inner_class):
22457         Skip FIELD_DECLs with error_mark_node type.
22458         * passes.def (all_lowering_passes): Run pass_build_cgraph_edges
22459         last again.
22461 2017-06-09  Martin Liska  <mliska@suse.cz>
22463         * predict.c (struct branch_predictor): New struct.
22464         (test_prediction_value_range): New test.
22465         (predict_c_tests): New function.
22466         * selftest-run-tests.c (selftest::run_tests): Run the function.
22467         * selftest.h: Declare new tests.
22469 2017-06-09  Segher Boessenkool  <segher@kernel.crashing.org>
22471         PR target/80966
22472         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
22473         gen_add3_insn did not fail.
22474         * config/rs6000/rs6000.md (add<mode>3): If asked to add a constant to
22475         r0, construct that number in a temporary reg and add that reg to r0.
22476         If asked to put the result in r0 as well, fail.
22478 2017-06-08  Will Schmidt  <will_schmidt@vnet.ibm.com>
22480         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
22481         for early expansion of vec_eqv.
22483 2017-06-08  Jakub Jelinek  <jakub@redhat.com>
22485         PR middle-end/81005
22486         * ubsan.c (instrument_null): Avoid pointless code temporary.
22487         (pass_ubsan::execute): Instrument aggregate arguments of calls.
22489 2017-06-08  Uros Bizjak  <ubizjak@gmail.com>
22491         PR target/81015
22492         Revert:
22493         2016-12-14  Uros Bizjak  <ubizjak@gmail.com>
22495         PR target/59874
22496         * config/i386/i386.md (*ctzhi2): New insn_and_split pattern.
22497         (*clzhi2): Ditto.
22499 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
22501         * predict.c (unlikely_executed_edge_p): Move ahead.
22502         (probably_never_executed_edge_p): Use it.
22504 2017-06-08  Alexander Ivchenko  <alexander.ivchenko@intel.com>
22506         PR middle-end/79988
22507         * tree-chkp.c (chkp_gimple_call_builtin_p): Remove
22508         gimple_call_builtin_p call.
22510 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
22512         * system.h (fancy_abort): Annotate by ATTRIBUTE_COLD.
22513         * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1,
22514         rtl_check_failed_type2, rtl_check_failed_code1,
22515         rtl_check_failed_code2, rtl_check_failed_code_mode,
22516         rtl_check_failed_block_symbol, cwi_check_failed_bounds,
22517         rtvec_check_failed_bounds, rtl_check_failed_flag,
22518         _fatal_insn_not_found, _fatal_insn): Likewise.
22519         * tree.h (tree_contains_struct_check_failed,
22520         tree_check_failed, tree_not_check_failed,
22521         tree_class_check_failed, tree_range_check_failed,
22522         tree_not_class_check_failed, tree_int_cst_elt_check_failed,
22523         tree_vec_elt_check_failed, phi_node_elt_check_failed,
22524         tree_operand_check_failed, omp_clause_check_failed,
22525         omp_clause_operand_check_failed, omp_clause_range_check_failed):
22526         Likewise.
22528 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
22530         * cgraph.c (cgraph_edge::maybe_hot_p): Do not check
22531         flag_branch_probabilities.
22532         * ipa-inline.c (edge_badness): Likewise.
22533         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
22534         * postreload-gcse.c (eliminate_partially_redundant_load): Likewise.
22535         * predict.c (maybe_hot_frequency_p): Likewise.
22536         (probably_never_executed): Likewise.
22537         * sched-ebb.c (schedule_ebbs): Likewise.
22538         * sched-rgn.c (find_single_block_region): Likewise.
22539         * tracer.c (tail_duplicate): Likewise.
22541 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
22543         * opts.c (finish_options): x_flag_reorder_blocks_and_partition no
22544         longer requires x_flag_profile_use.
22546 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
22548         * cfgrtl.c (cfg_layout_initialize): Check crtl->has_bb_partition
22549         instead of flag_reorder_blocks_and_partition.
22550         * dbxout.c (dbxout_function_end): Likewise.
22551         * dwarf2out.c (gen_subprogram_die): Likewise.
22552         * haifa-sched.c (sched_create_recovery_edges): Likewise.
22553         * hw-doloop.c (reorg_loops): Likewise.
22554         * varasm.c (assemble_start_function,
22555         assemble_end_function): Likewise.
22556         (decide_function_section): Do not check for
22557         flag_reorder_blocks_and_partition.
22559 2017-06-08  Alexander Ivchenko  <alexander.ivchenko@intel.com>
22561         * tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
22562         New function.
22563         (chkp_get_hard_register_fake_addr_expr): Ditto.
22564         (chkp_build_addr_expr): Add check for hard reg case.
22565         (chkp_parse_array_and_component_ref): Ditto.
22566         (chkp_find_bounds_1): Ditto.
22567         (chkp_process_stmt): Don't generate bounds store for
22568         hard reg case.
22570 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
22572         * predict.c (maybe_hot_bb_p): Do not check profile status.
22573         (maybe_hot_edge_p): Likewise.
22574         (probably_never_executed): Check for zero counts even if profile
22575         is not read.
22576         (unlikely_executed_edge_p): New function.
22577         (unlikely_executed_stmt_p): New function.
22578         (unlikely_executed_bb_p): New function.
22579         (set_even_probabilities): Use unlikely predicates.
22580         (combine_predictions_for_bb): Likewise.
22581         (predict_paths_for_bb): Likewise.
22582         (predict_paths_leading_to_edge): Likewise.
22583         (determine_unlikely_bbs): New function.
22584         (estimate_bb_frequencies): Use it.
22585         (compute_function_frequency): Use zero counts even if profile is
22586         not read.
22587         * profile-count.h: Fix typo.
22589 2017-08-08  Julia Koval  <julia.koval@intel.com>
22591         * config/i386/avx512bwintrin.h (_mm512_mask_cvtepi16_storeu_epi8,
22592         _mm512_mask_cvtsepi16_storeu_epi8,
22593         _mm512_mask_cvtusepi16_storeu_epi8): New intrinsics.
22594         * config/i386/avx512vlbwintrin.h (_mm256_mask_cvtepi16_storeu_epi8,
22595         _mm_mask_cvtsepi16_storeu_epi8, _mm256_mask_cvtsepi16_storeu_epi8,
22596         _mm_mask_cvtusepi16_storeu_epi8, _mm256_mask_cvtusepi16_storeu_epi8,
22597         _mm_mask_cvtepi16_storeu_epi8): New intrinsics.
22598         * config/i386/i386-builtin-types.def (PV8Q, V8QI): New pointer type.
22599         (VOID_FTYPE_PV32QI_V32HI_USI, VOID_FTYPE_PV8QI_V8HI_UQI,
22600         VOID_FTYPE_PV16QI_V16HI_UHI): New function types.
22601         * config/i386/i386-builtin.def (__builtin_ia32_pmovwb128mem_mask,
22602         __builtin_ia32_pmovwb256mem_mask, __builtin_ia32_pmovswb128mem_mask,
22603         __builtin_ia32_pmovswb256mem_mask, __builtin_ia32_pmovuswb128mem_mask,
22604         __builtin_ia32_pmovuswb256mem_mask,
22605         __builtin_ia32_pmovuswb512mem_mask, __builtin_ia32_pmovswb512mem_mask)
22606         __builtin_ia32_pmovwb512mem_mask): New builtins.
22608 2017-08-08  Julia Koval  <julia.koval@intel.com>
22610         PR target/73350,80862
22611         * config/i386/subst.md (round): Fix round pattern.
22612         * config/i386/i386.c (ix86_erase_embedded_rounding):
22613         Fix erasing rounding for the fixed pattern.
22615 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
22617         * cfgbuild.c (find_many_sub_basic_blocks): Fix thinko.
22619 2017-06-08  Martin Liska  <mliska@suse.cz>
22621         PR gcov-profile/80911
22622         * gcov.c (block_info::block_info): New constructor.
22624 2017-06-07  Carl Love  <cel@us.ibm.com>
22626         * config/rs6000/rs6000-c: The return type of the following
22627         built-in functions was implemented as int not long long.  Fix sign
22628         of return value for the unsigned version of vec_mulo and vec_mule.
22629         vector unsigned long long vec_bperm (vector unsigned long long,
22630                                              vector unsigned char)
22631         vector signed long long vec_mule (vector signed int,
22632                                           vector signed int)
22633         vector unsigned long long vec_mule (vector unsigned int,
22634                                             vector unsigned int)
22635         vector signed long long vec_mulo (vector signed int,
22636                                           vector signed int)
22637         vector unsigned long long vec_mulo (vector unsigned int,
22638                                             vector unsigned int)
22639         * doc/extend.texi: Fix the documentation for the built-in
22640         functions.
22642 2017-06-07  Carl Love  <cel@us.ibm.com>
22644         PR target/80982
22645         * config/rs6000/altivec.md (double<mode>2): Fix the implementation of
22646         for BE.
22648 2017-06-07  Carl Love  <cel@us.ibm.com>
22650         * config/rs6000/altivec.md: Fix argument swizzle in vec_doublel
22651         support, Generate       doublehv for signed int/float for BE case only.
22653 2017-06-07  Alexander Monakov  <amonakov@ispras.ru>
22655         * doc/invoke.texi (mcx16): Rewrite.
22657 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
22659         * config/rs6000/predicates.md (rs6000_nonimmediate_operand): Delete.
22660         * config/rs6000/rs6000.md (*movsi_internal1, movsi_from_sf,
22661         *mov<mode>_softfloat, and an anonymous splitter): Use
22662         nonimmediate_operand instead of rs6000_nonimmediate_operand.
22664 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
22666         * config/rs6000/darwin.h (REGISTER_NAMES): Delete the SPE_ACC and
22667         SPEFSCR registers.
22668         * config/rs6000/rs6000.c (rs6000_reg_names, alt_reg_names): Ditto.
22669         (enum rs6000_reg_type): Delete SPE_ACC_TYPE and SPEFSCR_REG_TYPE.
22670         (rs6000_debug_reg_global): Adjust.
22671         (rs6000_init_hard_regno_mode_ok): Adjust.
22672         (rs6000_dbx_register_number): Adjust.
22673         * config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Change to 115.
22674         (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
22675         Remove SPE_ACC and SPEFSCR.
22676         (REG_ALLOC_ORDER): Ditto.
22677         (FRAME_POINTER_REGNUM): Change to 111.
22678         (enum reg_class): Remove the SPE_ACC and SPEFSCR registers.
22679         (REG_CLASS_NAMES): Ditto.
22680         (REG_CLASS_CONTENTS): Delete the SPE_ACC and SPEFSCR registers.
22681         (REGISTER_NAMES): Ditto.
22682         (ADDITIONAL_REG_NAMES): Ditto.
22683         (rs6000_reg_names): Ditto.
22684         * config/rs6000/rs6000.md: Renumber some register number
22685         define_constants.
22687 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
22689         * config/rs6000/darwin.h (REGISTER_NAMES): Delete the SPE high
22690         registers.
22691         * config/rs6000/rs6000.c (rs6000_reg_names, alt_reg_names): Ditto.
22692         * config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Change from 149
22693         to 117.
22694         (DWARF_REG_TO_UNWIND_COLUMN): Do not define.
22695         (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
22696         Delete the SPE high registers.
22697         (REG_ALLOC_ORDER): Ditto.
22698         (enum reg_class): Remove SPE_HIGH_REGS.
22699         (REG_CLASS_NAMES): Ditto.
22700         (REG_CLASS_CONTENTS): Delete the SPE high registers.
22701         (REGISTER_NAMES): Ditto.
22702         (rs6000_reg_names): Ditto.
22703         * doc/tm.texi.in: Remove SPE as example.
22704         * doc/tm.texi: Regenerate.
22706 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
22708         * config/rs6000/8540.md (ppc8540_brinc): Delete.
22709         * config/rs6000/e500mc.md (e500mc_brinc): Delete.
22710         * config/rs6000/e500mc64.md (e500mc64_brinc): Delete.
22711         * config/rs6000/rs6000.md (type): Remove "brinc".
22713 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
22715         * config.gcc (powerpc*-*-*): Don't add spe.h to extra_headers.
22716         (powerpc*-linux*spe*): Use ${cpu_type} instead of rs6000.
22717         * config/rs6000/linuxspe.h: Delete file.
22718         * config/rs6000/rs6000.md: Don't include spe.md.
22719         * config/rs6000/spe.h: Delete file.
22720         * config/rs6000/spe.md: Delete file.
22721         * config/rs6000/t-rs6000: Remove spe.md.
22723 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
22725         * config/rs6000/predicates.md (reg_or_mem_operand): Reformat.
22726         (reg_or_none500mem_operand): Delete.
22727         * config/rs6000/rs6000.md (extendsfdf2): Use reg_or_mem_operand
22728         instead of reg_or_none500mem_operand.
22730 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
22732         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
22733         handling of SPE flags.
22734         * config/rs6000/rs6000.opt (-mspe, -mspe=no, -mspe=yes): Delete.
22736 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
22738         * config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
22739         SPE ABI handling.
22740         * config/rs6000/paired.md (paired_negv2sf2): Rename to negv2sf2.
22741         (paired_absv2sf2, paired_addv2sf3, paired_subv2sf3, paired_mulv2sf3,
22742         paired_divv2sf3): Similar.
22743         * config/rs6000/predicates.md: Replace TARGET_SPE, TARGET_SPE_ABI,
22744         SPE_VECTOR_MODE and SPE_HIGH_REGNO_P by 0; simplify.
22745         * config/rs6000/rs6000-builtin.def: Delete RS6000_BUILTIN_E and
22746         RS6000_BUILTIN_S.
22747         Delete BU_SPE_1, BU_SPE_2, BU_SPE_3, BU_SPE_E, BU_SPE_P, and BU_SPE_X.
22748         Rename the paired_* instruction patterns.
22749         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Do not
22750         define __SPE__.
22751         * config/rs6000/rs6000-protos.h (invalid_e500_subreg): Delete.
22752         * config/rs6000/rs6000.c: Delete RS6000_BUILTIN_E and RS6000_BUILTIN_S.
22753         (struct rs6000_stack): Delete fields spe_gp_save_offset, spe_gp_size,
22754         spe_padding_size, and spe_64bit_regs_used.  Replace TARGET_SPE and
22755         TARGET_SPE_ABI with 0, simplify.  Replace SPE_VECTOR_MODE with
22756         PAIRED_VECTOR_MODE.
22757         (struct machine_function): Delete field spe_insn_chain_scanned_p.
22758         (spe_func_has_64bit_regs_p): Delete.
22759         (spe_expand_predicate_builtin): Delete.
22760         (spe_expand_evsel_builtin): Delete.
22761         (TARGET_DWARF_REGISTER_SPAN): Do not define.
22762         (TARGET_MEMBER_TYPE_FORCES_BLK): Do not define.
22763         (invalid_e500_subreg): Delete.
22764         (rs6000_legitimize_address): Always force_reg op2 as well, for
22765         paired single memory accesses.
22766         (rs6000_member_type_forces_blk): Delete.
22767         (rs6000_spe_function_arg): Delete.
22768         (rs6000_expand_unop_builtin): Delete SPE handling.
22769         (rs6000_expand_binop_builtin): Ditto.
22770         (spe_expand_stv_builtin): Delete.
22771         (bdesc_2arg_spe): Delete.
22772         (spe_expand_builtin): Delete.
22773         (spe_expand_predicate_builtin): Delete.
22774         (spe_expand_evsel_builtin): Delete.
22775         (rs6000_invalid_builtin): Remove RS6000_BTM_SPE handling.
22776         (spe_init_builtins): Delete.
22777         (spe_func_has_64bit_regs_p): Delete.
22778         (savres_routine_name): Delete "info" parameter.  Adjust callers.
22779         (rs6000_emit_stack_reset): Ditto.
22780         (rs6000_dwarf_register_span): Delete.
22781         * config/rs6000/rs6000.h (TARGET_SPE_ABI, TARGET_SPE,
22782         UNITS_PER_SPE_WORD, SPE_HIGH_REGNO_P, SPE_SIMD_REGNO_P,
22783         SPE_VECTOR_MODE, RS6000_BTM_SPE, RS6000_BUILTIN_E, RS6000_BUILTIN_S):
22784         Delete.
22785         * config/rs6000/rs6000.md (FIRST_SPE_HIGH_REGNO, LAST_SPE_HIGH_REGNO):
22786         Delete.
22787         * config/rs6000/rs6000.opt (-mabi=spe, -mabi=no-spe): Delete.
22788         * config/rs6000/spe.md: Delete every pattern that uses TARGET_SPE.
22789         * config/rs6000/vector.md (absv2sf2, negv2sf2, addv2sf3, subv2sf3,
22790         mulv2sf3, divv2sf3): Delete expanders.
22792 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
22794         config/rs6000/rs6000.md (UNSPEC_MV_CR_GT): Delete.
22796 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
22798         * config/rs6000/rs6000-protos.h (output_e500_flip_gt_bit): Delete.
22799         * config/rs6000/rs6000.c: Ditto.
22801 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
22803         * config/rs6000/predicated.md (rs6000_cbranch_operator): Delete.
22804         * config/rs6000/rs6000.md: Replace rs6000_cbranch_operator by
22805         comparison_operator.
22807 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
22809         * config/rs6000/rs6000.c: Remove everything related to -mfloat-gprs.
22810         * config/rs6000/rs6000.opt: Ditto.
22811         * config/rs6000/t-rtems: Ditto.
22813 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
22815         * config/rs6000/predicates.md: Replace TARGET_E500_DOUBLE and
22816         TARGET_E500_SINGLE by 0, simplify.
22817         * config/rs6000/rs6000.c: Ditto.
22818         (rs6000_option_override_internal): Delete CHECK_E500_OPTIONS.
22819         (spe_build_register_parallel): Delete.
22820         * config/rs6000/rs6000.h: Delete TARGET_E500_SINGLE,
22821         TARGET_E500_DOUBLE, and CHECK_E500_OPTIONS.
22822         * config/rs6000/rs6000.md: Replace TARGET_E500_DOUBLE,
22823         TARGET_E500_SINGLE, and <E500_CONVERT> by 0, simplify.
22824         (E500_CONVERT): Delete.
22825         * config/rs6000/spe.md: Remove many patterns and all define_constants.
22827 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
22829         * config/rs6000/darwin.md: Replace TARGET_FPRS by 1 and simplify.
22830         * config/rs6000/dfp.md: Ditto.
22831         (negdd2, *negdd2_fpr): Merge.
22832         (absdd2, *absdd2_fpr): Merge.
22833         (negtd2, *negtd2_fpr): Merge.
22834         (abstd2, *abstd2_fpr): Merge.
22835         * config/rs6000/e500.h: Delete file.
22836         * config/rs6000/predicates.md (rs6000_cbranch_operator): Replace
22837         TARGET_FPRS by 1 and simplify.
22838         * config/rs6000/rs6000-c.c: Ditto.
22839         * config/rs6000/rs6000.c: Ditto.  Also replace TARGET_SF_SPE and
22840         TARGET_DF_SPE by 0.
22841         * config/rs6000/rs6000.h: Ditto.  Delete TARGET_SF_SPE and
22842         TARGET_DF_SPE.
22843         * config/rs6000/rs6000.md: Ditto.
22844         (floatdidf2, *floatdidf2_fpr): Merge.
22845         (move_from_CR_gt_bit): Delete.
22846         * config/rs6000/spe.md: Replace TARGET_FPRS by 1 and simplify.
22847         (E500_CR_IOR_COMPARE): Delete.
22848         (All patterns that require !TARGET_FPRS): Delete.
22849         * config/rs6000/vsx.md: Replace TARGET_FPRS by 1 and simplify.
22851 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
22853         * passes.def (pass_iv_canon): Move before pass_loop_distribution.
22855 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
22857         * graphds.c (add_edge): Intitialize edge's attached data.
22858         (foll_in_subgraph, dfs_fst_edge, dfs_next_edge): New function
22859         pointer parameter.  Call pointed function on each edge during
22860         graph traversing.  Skip traversing the edge when the function
22861         returns true.
22862         (graphds_dfs, graphds_scc): Ditto.
22863         (for_each_edge): New parameter.  Pass the new parameter to callback
22864         function.
22865         * graphds.h (skip_edge_callback): New function pointer type.
22866         (graphds_dfs, graphds_scc): New function pointer parameter.
22867         (graphds_edge_callback, for_each_edge): New parameter.
22869 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
22871         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test): Factor
22872         out code checking if runtime alias check is possible to below ...
22873         Call the new function.
22874         * tree-data-ref.c (runtime_alias_check_p): ... to new function.
22875         * tree-data-ref.h (runtime_alias_check_p): New decalaration.
22877 2017-06-07  Marek Polacek  <polacek@redhat.com>
22879         PR sanitizer/80932
22880         * fold-const.c (extract_muldiv_1) <case MINUS_EXPR>: Add
22881         TYPE_OVERFLOW_WRAPS check.
22883 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
22885         * tree-vect-loop-manip.c (vect_do_peeling): Don't skip vector loop
22886         if versioning is required.
22887         * tree-vect-loop.c (vect_analyze_loop_2): Merge niter check for loop
22888         peeling with the check for versioning.
22890 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
22892         * tree-vectorizer.h (vect_build_loop_niters): New parameter.
22893         * tree-vect-loop-manip.c (vect_build_loop_niters): New parameter.
22894         Set true to new parameter if new ssa variable is defined.
22895         (vect_gen_vector_loop_niters): Refactor.  Set range information
22896         for the new vector loop bound variable.
22897         (vect_do_peeling): Ditto.
22899 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
22901         * tree-affine.c (ssa.h): Include header file.
22902         (tree_to_aff_combination): Handle (T1)(X - CST) when inner type
22903         has wrapping overflow behavior.
22905 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
22907         * tree-affine.c (tree_to_aff_combination): Handle (T1)(X + X).
22909 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
22911         (aff_combination_expand): Move (T1)(X *+- CST) simplification to ...
22912         (tree_to_aff_combination): ... here.
22914 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
22916         * tree-ssa-loop-ivopts.c (ivopts_estimate_reg_pressure): New
22917         reg_pressure model function.
22918         (ivopts_global_cost_for_size): Delete.
22919         (determine_set_costs, iv_ca_recount_cost): Call new model function
22920         ivopts_estimate_reg_pressure.
22922 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
22924         * config/aarch64/aarch64.c (aarch64_rtx_costs): Make sdiv more
22925         expensive than udiv.  Remove floating point cases from mod.
22927 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
22929         * config/arm/aarch-cost-tables.h (cortexa53_extra_cost):
22930         Increase idiv cost.
22932 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
22934         * config/aarch64/aarch64.md
22935         (copysignsf3): Fix mask generation.
22937 2017-06-07  Jakub Jelinek  <jakub@redhat.com>
22939         * dumpfile.h (enum tree_dump_index): Rename TDI_generic to
22940         TDI_gimple.
22941         (class dump_manager): Add register_dumps method.
22942         * dumpfile.c: Include langhooks.h.
22943         (dump_files): Use 0 instead of 3/4/5 for TDI_{original,gimple,nested}.
22944         (FIRST_AUTO_NUMBERED_DUMP): Decrease to 1.
22945         (FIRST_ME_AUTO_NUMBERED_DUMP): Define.
22946         (dump_manager::dump_register): Start with 512 entries instead of 32.
22947         (dump_manager::register_dumps): New method.
22948         * toplev.c (general_init): Instead of invoking register_dumps
22949         langhook, invoke register_dumps method on the dump manager.
22950         * gimplify.c (gimplify_function_tree): Use TDI_gimple instead of
22951         TDI_generic.
22953 2017-06-07  Richard Sandiford  <richard.sandiford@linaro.org>
22955         * doc/md.texi: Clarify the restrictions on a define_insn condition.
22956         Say that # requires an associated define_split to exist, and that
22957         the define_split must be suitable for use after register allocation.
22959 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
22961         * cfgbuild.c (find_bb_boundaries): Initialize profile of split blocks.
22962         (compute_outgoing_frequencies): Also initialize zero counts.
22963         (find_many_sub_basic_blocks): Do not produce uninitialized profile
22964         around loops; preserve more of profile when nothing changes.
22966 2017-06-06  Jim Wilson  <jim.wilson@linaro.org>
22968         * config/aarch64/aarch64-cost-tables.h (qdf24xx_extra_costs): Move to
22969         here.
22970         * config/arm/aarch-cost-tables.h (qdf24xx_extra_costs): From here.
22971         * config/arm/arm-cpu-cdata.h: Regenerate.
22972         * config/arm/arm-cpu-data.h, config/arm/arm-cpu.h: Likewise.
22973         * config/arm/arm-tables.opt, config/arm/arm-tune.md: Likewise.
22974         * config/arm/arm-cpus.in: Delete falkor and qdf24xx entries.
22975         * config/arm/arm.c (arm_qdf24xx_tune): Delete.
22976         * config/arm/bpabi.h (BE8_LINK_SPEC): Delete falkor and qdf24xx
22977         support.
22978         * config/arm/t-aprofile (MULTILIB_MATCHES): Delete falkor and qdf24xx
22979         support.
22980         * config/arm/t-rmprofile: Likewise.
22981         * doc/invoke.texi (ARM Options): Drop falkor and qdf24xx support.
22983 2017-06-06  David S. Miller  <davem@davemloft.net>
22985         PR target/80968
22986         * config/sparc/sparc.c (sparc_expand_prologue): Emit frame
22987         blockage if function uses alloca.
22989 2017-06-06  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
22991         * tree-ssa-loop-prefetch.c (struct mem_ref_group, struct mem_ref):
22992         New "uid" fields to hold pretty-print IDs of group and ref.
22993         Memory references are now identified as <group_id>:<ref_id>
22994         instead of using [random] addresses.
22995         (dump_mem_details): Simplify, no functional change.
22996         (dump_mem_ref): Simplify and make output more concise.
22997         Replace couple of fprintf's throughout code with calls to dump_mem_ref.
22998         (find_or_create_group): Initialize group uid.
22999         (record_ref): Initialize ref uid.  Improve debug output.
23000         (prune_group_by_reuse, should_issue_prefetch_p,)
23001         (should_issue_prefetch_p, schedule_prefetches, issue_prefetch_ref,)
23002         (mark_nontemporal_store, determine_loop_nest_reuse):
23003         Improve debug output.
23005 2017-06-06  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
23007         * dbgcnt.def (prefetch): New debug counter.
23008         * tree-ssa-loop-prefetch.c (dbgcnt.h): New include.
23009         (schedule_prefetches): Stop issueing prefetches if debug counter
23010         tripped.
23012 2017-06-06  Tom de Vries  <tom@codesourcery.com>
23014         * doc/sourcebuild.texi (Testsuites, C Language Testsuites,
23015         gcc.c-torture/compile): Remove mention of NO_LABEL_VALUES in fixme.
23017 2017-06-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23019         * config/aarch64/atomics.md (atomic_compare_and_swap<mode> expander):
23020         Use aarch64_reg_or_zero predicate for operand 4.
23021         (aarch64_compare_and_swap<mode> define_insn_and_split):
23022         Use aarch64_reg_or_zero predicate for operand 3.  Add 'Z' constraint.
23023         (aarch64_store_exclusive<mode>): Likewise for operand 2.
23025 2017-06-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
23027         * config/arm/arm.c (arm_compute_save_reg_mask): Rename into ...
23028         (arm_compute_save_core_reg_mask): This.
23029         (thumb1_compute_save_reg_mask): Rename into ...
23030         (thumb1_compute_save_core_reg_mask): This.
23031         (arm_compute_save_reg0_reg12_mask): Adapt comment.
23032         (arm_compute_frame_layout): Likewise.
23034 2017-06-06  Richard Biener  <rguenther@suse.de>
23036         PR tree-optimization/80974
23037         * tree-ssa-sccvn.c (set_ssa_val_to): Do not change but only
23038         keep or clear leaders SSA info.
23040 2017-06-06  Tom de Vries  <tom@codesourcery.com>
23042         * config/nvptx/nvptx.c (split_mode_p): New function.
23043         (nvptx_declare_function_name, nvptx_print_operand): Use split_mode_p.
23045 2017-06-06  Tom de Vries  <tom@codesourcery.com>
23047         * config/nvptx/nvptx.c (nvptx_print_operand): Use maybe_split_mode.
23049 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
23051         PR bootstrap/80978
23052         * tree-cfg.c (execute_fixup_cfg): Fix condition on when to rescale
23053         profile.
23055 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
23057         * shrink-wrap.c (handle_simple_exit): Update profile.
23058         (try_shrink_wrapping): Upate profile.
23060 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
23062         * predict.c (tree_estimate_probability_bb): Add LOCAL_ONLY.
23063         (tree_guess_outgoing_edge_probabilities): New.
23064         * predict.h (tree_guess_outgoing_edge_probabilities): Declare.
23065         * tree-cfg.c (gimple_find_sub_bbs): Propagate profile.
23067 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
23069         * ipa-split.c (split_function): Initialize return bb profile.
23071 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
23073         * profile.c (compute_branch_probabilities): Also initialize
23074         EXIT_BLOCK profile.
23076 2017-06-06  Richard Biener  <rguenther@suse.de>
23078         PR tree-optimization/80928
23079         * tree-vect-loop.c (vect_update_vf_for_slp): Amend dumps.
23080         (vect_analyze_loop_operations): Properly guard analysis for
23081         pure SLP case.
23082         (vect_transform_loop): Likewise.
23083         (vect_analyze_loop_2): Also reset SLP type on PHIs.
23084         (vect_model_induction_cost): Do not cost for pure SLP.
23085         (vectorizable_induction): Pass in SLP node, implement SLP vectorization
23086         of induction in inner loop vectorization.
23087         * tree-vect-slp.c (vect_create_new_slp_node): Handle PHIs.
23088         (vect_get_and_check_slp_defs): Handle vect_induction_def.
23089         (vect_build_slp_tree): Likewise.  Handle PHIs as terminating the
23090         recursion.
23091         (vect_analyze_slp_cost_1): Cost induction.
23092         (vect_detect_hybrid_slp_stmts): Handle PHIs.
23093         (vect_get_slp_vect_defs): Likewise.
23094         * tree-vect-stmts.c (vect_analyze_stmt): Handle induction.
23095         (vect_transform_stmt): Handle SLP reductions.
23096         * tree-vectorizer.h (vectorizable_induction): Adjust.
23098 2017-06-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
23100         * config/rs6000/rs6000.c (make_resolver_func): Update
23101         init_lowered_empty_function call.
23103 2017-06-05  Bernd Edlinger  <bernd.edlinger@hotmail.de>
23105         * doc/invoke.texi: Document the -fprofile-abs-path option.
23106         * common.opt (fprofile-abs-path): New option.
23107         * gcov-io.h (gcov_write_filename): Declare.
23108         * gcov-io.c (gcov_write_filename): New function.
23109         * coverage.c (coverage_begin_function): Use gcov_write_filename.
23110         * profile.c (output_location): Likewise.
23112 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
23114         * shring-wrap.c: Revert accidental commit.
23116 2017-06-05  Volker Reichelt  <v.reichelt@netcologne.de>
23118         * doc/invoke.texi (-Wduplicated-branches): Add to warning list.
23120 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
23122         * cfgexpand.c (expand_gimple_tailcall): Initialize profile of
23123         new edge.
23124         * ipa-inline.c (want_inline_self_recursive_call_p): Watch for missing
23125         profile in callgraph edge.
23126         * profile-count.h (apply_probability): If THIS is 0, then result is 0
23127         (apply_scale): Likewise.
23128         * tree-inline.c (copy_bb, copy_edges_for_bb, copy_cfg_body):
23129         Also scale profile when inlining function with zero profile.
23130         (initialize_cfun): Update exit block profile even when it is zero.
23131         * tree-ssa-threadupdate.c (clear_counts_path): Handle correctly case
23132         when profile is read.
23134 2017-06-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
23136         * config/rs6000/rs6000.c (toplevel): Include attribs.h.
23137         (CLONE_*): New constants to define the processors we can generate
23138         code for with the target_clone attribute.
23139         (rs6000_clone_map): New array to identify which clone processors
23140         the current program is running on.
23141         (TARGET_COMPARE_VERSION_PRIORITY): Define to enable the
23142         target_clone attribute.
23143         (TARGET_GENERATE_VERSION_DISPATCHER_BODY): Likewise.
23144         (TARGET_GET_FUNCTION_VERSIONS_DISPATCHER): Likewise.
23145         (TARGET_OPTION_FUNCTION_VERSIONS): Likewise.
23146         (cpu_expand_builtin): Add support for target_clone attribute.
23147         (rs6000_valid_attribute_p): Allow "default" attribute.
23148         (get_decl_name): New debug function to simplify printing the
23149         current function name in debugging statements.
23150         (rs6000_clone_priority): New functions to support the target_clone
23151         attribute, and be able to generate code to switch between ISA 2.05
23152         through ISA 3.0 (power6 through power9).
23153         (rs6000_compare_version_priority): Likewise.
23154         (rs6000_get_function_versions_dispatcher): Likewise.
23155         (make_resolver_func): Likewise.
23156         (add_condition_to_bb): Likewise.
23157         (dispatch_function_versions): Likewise.
23158         (rs6000_generate_version_dispatcher_body): Likewise.
23159         (rs6000_can_inline_p): Call get_decl_name for debugging usage.
23160         (fusion_gpr_load_p): Fix a spacing issue.
23161         * doc/extend.texi (Common Function Attributes): Document that the
23162         PowerPC supports the target_clone attribute.
23164 2017-06-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>
23166         * config/arm/arm.h: explain F symbol found in description of ARM
23167         register allocation in its legend.
23169 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
23171         * config/mips/frame-header-opt.c: Include profile-count.h.
23172         * config/riscv/riscv.c: Include profile-count.h
23174 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
23176         * tree-ssa-loop-im.c (execute_sm_if_changed): Add FLAG_BBS parameter;
23177         update profile.
23178         (sm_set_flag_if_changed): Add bbs field.
23179         (execute_sm_if_changed_flag_set): Pass BBS.
23180         (execute_sm): Update.
23182 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23184         * config/aarch64/aarch64-simd.md (aarch64_store_lane0<mode>):
23185         New pattern.
23187 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23189         * config/aarch64/aarch64.md (sub<mode>3_compare1_imm): New define_insn.
23190         (peephole2): New peephole2 to emit the above.
23191         * config/aarch64/predicates.md (aarch64_sub_immediate): New predicate.
23193 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23195         * config/aarch64/aarch64.c (define_peephole2 above
23196         *sub_<shift>_<mode>): New peephole.
23198 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
23200         * config/i386/i386.c (make_resolver_func): Update.
23201         * Makefile.in: Add profile-count.h and profile-count.o
23202         * auto-profile.c (afdo_indirect_call): Update to new API.
23203         (afdo_set_bb_count): Update.
23204         (afdo_propagate_edge): Update.
23205         (afdo_propagate_circuit): Update.
23206         (afdo_calculate_branch_prob): Update.
23207         (afdo_annotate_cfg): Update.
23208         * basic-block.h: Include profile-count.h
23209         (struct edge_def): Turn count to profile_count.
23210         (struct basic_block_def): Likewie.
23211         (REG_BR_PROB_BASE): Move to profile-count.h
23212         (RDIV): Move to profile-count.h
23213         * bb-reorder.c (max_entry_count): Turn to profile_count.
23214         (find_traces): Update.
23215         (rotate_loop):Update.
23216         (connect_traces):Update.
23217         (sanitize_hot_paths):Update.
23218         * bt-load.c (migrate_btr_defs): Update.
23219         * cfg.c (RDIV): Remove.
23220         (init_flow): Use alloc_block.
23221         (alloc_block): Uninitialize count.
23222         (unchecked_make_edge): Uninitialize count.
23223         (check_bb_profile): Update.
23224         (dump_edge_info): Update.
23225         (dump_bb_info): Update.
23226         (update_bb_profile_for_threading): Update.
23227         (scale_bbs_frequencies_int): Update.
23228         (scale_bbs_frequencies_gcov_type): Update.
23229         (scale_bbs_frequencies_profile_count): New.
23230         * cfg.h (update_bb_profile_for_threading): Update.
23231         (scale_bbs_frequencies_profile_count): Declare.
23232         * cfgbuild.c (compute_outgoing_frequencies): Update.
23233         (find_many_sub_basic_blocks): Update.
23234         * cfgcleanup.c (try_forward_edges): Update.
23235         (try_crossjump_to_edge): Update.
23236         * cfgexpand.c (expand_gimple_tailcall): Update.
23237         (construct_exit_block): Update.
23238         * cfghooks.c (verify_flow_info): Update.
23239         (dump_bb_for_graph): Update.
23240         (split_edge): Update.
23241         (make_forwarder_block): Update.
23242         (duplicate_block): Update.
23243         (account_profile_record): Update.
23244         * cfgloop.c (find_subloop_latch_edge_by_profile): Update.
23245         (get_estimated_loop_iterations): Update.
23246         * cfgloopanal.c (expected_loop_iterations_unbounded): Update.
23247         (single_likely_exit): Update.
23248         * cfgloopmanip.c (scale_loop_profile): Update.
23249         (loopify): Update.
23250         (set_zero_probability): Update.
23251         (lv_adjust_loop_entry_edge): Update.
23252         * cfgrtl.c (force_nonfallthru_and_redirect): Update.
23253         (purge_dead_edges): Update.
23254         (rtl_account_profile_record): Update.
23255         * cgraph.c (cgraph_node::create): Uninitialize count.
23256         (symbol_table::create_edge): Uninitialize count.
23257         (cgraph_update_edges_for_call_stmt_node): Update.
23258         (cgraph_edge::dump_edge_flags): Update.
23259         (cgraph_node::dump): Update.
23260         (cgraph_edge::maybe_hot_p): Update.
23261         * cgraph.h: Include profile-count.h
23262         (create_clone), create_edge, create_indirect_edge): Update.
23263         (cgraph_node): Turn count to profile_count.
23264         (cgraph_edge0: Likewise.
23265         (make_speculative, clone): Update.
23266         (create_edge): Update.
23267         (init_lowered_empty_function): Update.
23268         * cgraphclones.c (cgraph_edge::clone): Update.
23269         (duplicate_thunk_for_node): Update.
23270         (cgraph_node::create_clone): Update.
23271         * cgraphunit.c (cgraph_node::analyze): Update.
23272         (cgraph_node::expand_thunk): Update.
23273         * final.c (dump_basic_block_info): Update.
23274         * gimple-streamer-in.c (input_bb): Update.
23275         * gimple-streamer-out.c (output_bb): Update.
23276         * graphite.c (print_global_statistics): Update.
23277         (print_graphite_scop_statistics): Update.
23278         * hsa-brig.c: Include basic-block.h.
23279         * hsa-dump.c: Include basic-block.h.
23280         * hsa-gen.c (T sum_slice): Update.
23281         (convert_switch_statements):Update.
23282         * hsa-regalloc.c: Include basic-block.h.
23283         * ipa-chkp.c (chkp_produce_thunks): Update.
23284         * ipa-cp.c (struct caller_statistics): Update.
23285         (init_caller_stats): Update.
23286         (gather_caller_stats): Update.
23287         (ipcp_cloning_candidate_p): Update.
23288         (good_cloning_opportunity_p): Update.
23289         (get_info_about_necessary_edges): Update.
23290         (dump_profile_updates): Update.
23291         (update_profiling_info): Update.
23292         (update_specialized_profile): Update.
23293         (perhaps_add_new_callers): Update.
23294         (decide_about_value): Update.
23295         (ipa_cp_c_finalize): Update.
23296         * ipa-devirt.c (struct odr_type_warn_count): Update.
23297         (struct decl_warn_count): Update.
23298         (struct final_warning_record): Update.
23299         (possible_polymorphic_call_targets): Update.
23300         (ipa_devirt): Update.
23301         * ipa-fnsummary.c (redirect_to_unreachable): Update.
23302         * ipa-icf.c (sem_function::merge): Update.
23303         * ipa-inline-analysis.c (do_estimate_edge_time): Update.
23304         * ipa-inline.c (compute_uninlined_call_time): Update.
23305         (compute_inlined_call_time): Update.
23306         (want_inline_small_function_p): Update.
23307         (want_inline_self_recursive_call_p): Update.
23308         (edge_badness): Update.
23309         (lookup_recursive_calls): Update.
23310         (recursive_inlining): Update.
23311         (inline_small_functions): Update.
23312         (dump_overall_stats): Update.
23313         (dump_inline_stats): Update.
23314         * ipa-profile.c (ipa_profile_generate_summary): Update.
23315         (ipa_propagate_frequency): Update.
23316         (ipa_profile): Update.
23317         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
23318         * ipa-utils.c (ipa_merge_profiles): Update.
23319         * loop-doloop.c (doloop_modify): Update.
23320         * loop-unroll.c (report_unroll): Update.
23321         (unroll_loop_runtime_iterations): Update.
23322         * lto-cgraph.c (lto_output_edge): Update.
23323         (lto_output_node): Update.
23324         (input_node): Update.
23325         (input_edge): Update.
23326         (merge_profile_summaries): Update.
23327         * lto-streamer-in.c (input_cfg): Update.
23328         * lto-streamer-out.c (output_cfg): Update.
23329         * mcf.c (create_fixup_graph): Update.
23330         (adjust_cfg_counts): Update.
23331         (sum_edge_counts): Update.
23332         * modulo-sched.c (sms_schedule): Update.
23333         * postreload-gcse.c (eliminate_partially_redundant_load): Update.
23334         * predict.c (maybe_hot_count_p): Update.
23335         (probably_never_executed): Update.
23336         (dump_prediction): Update.
23337         (combine_predictions_for_bb): Update.
23338         (propagate_freq): Update.
23339         (handle_missing_profiles): Update.
23340         (counts_to_freqs): Update.
23341         (rebuild_frequencies): Update.
23342         (force_edge_cold): Update.
23343         * predict.h: Include profile-count.h
23344         (maybe_hot_count_p, counts_to_freqs): UPdate.
23345         * print-rtl-function.c: Do not include cfg.h
23346         * print-rtl.c: Include basic-block.h
23347         * profile-count.c: New file.
23348         * profile-count.h: New file.
23349         * profile.c (is_edge_inconsistent): Update.
23350         (correct_negative_edge_counts): Update.
23351         (is_inconsistent): Update.
23352         (set_bb_counts): Update.
23353         (read_profile_edge_counts): Update.
23354         (compute_frequency_overlap): Update.
23355         (compute_branch_probabilities): Update; Initialize and deinitialize
23356         gcov_count tables.
23357         (branch_prob): Update.
23358         * profile.h (bb_gcov_counts, edge_gcov_counts): New.
23359         (edge_gcov_count): New.
23360         (bb_gcov_count): New.
23361         * shrink-wrap.c (try_shrink_wrapping): Update.
23362         * tracer.c (better_p): Update.
23363         * trans-mem.c (expand_transaction): Update.
23364         (ipa_tm_insert_irr_call): Update.
23365         (ipa_tm_insert_gettmclone_call): Update.
23366         * tree-call-cdce.c: Update.
23367         * tree-cfg.c (gimple_duplicate_sese_region): Update.
23368         (gimple_duplicate_sese_tail): Update.
23369         (gimple_account_profile_record): Update.
23370         (execute_fixup_cfg): Update.
23371         * tree-inline.c (copy_bb): Update.
23372         (copy_edges_for_bb): Update.
23373         (initialize_cfun): Update.
23374         (freqs_to_counts): Update.
23375         (copy_cfg_body): Update.
23376         (expand_call_inline): Update.
23377         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
23378         * tree-ssa-loop-ivcanon.c (unloop_loops): Update.
23379         (try_unroll_loop_completely): Update.
23380         (try_peel_loop): Update.
23381         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
23382         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop): Update.
23383         * tree-ssa-loop-split.c (connect_loops): Update.
23384         * tree-ssa-loop-unswitch.c (hoist_guard): Update.
23385         * tree-ssa-reassoc.c (branch_fixup): Update.
23386         * tree-ssa-tail-merge.c (replace_block_by): Update.
23387         * tree-ssa-threadupdate.c (create_block_for_threading): Update.
23388         (compute_path_counts): Update.
23389         (update_profile): Update.
23390         (recompute_probabilities): Update.
23391         (update_joiner_offpath_counts): Update.
23392         (estimated_freqs_path): Update.
23393         (freqs_to_counts_path): Update.
23394         (clear_counts_path): Update.
23395         (ssa_fix_duplicate_block_edges): Update.
23396         (duplicate_thread_path): Update.
23397         * tree-switch-conversion.c (case_bit_test_cmp): Update.
23398         (struct switch_conv_info): Update.
23399         * tree-tailcall.c (decrease_profile): Update.
23400         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
23401         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
23402         * value-prof.c (check_counter): Update.
23403         (gimple_divmod_fixed_value): Update.
23404         (gimple_mod_pow2): Update.
23405         (gimple_mod_subtract): Update.
23406         (gimple_ic_transform): Update.
23407         (gimple_stringop_fixed_value): Update.
23408         * value-prof.h (gimple_ic): Update.
23410 2017-06-02  Carl Love  <cel@us.ibm.com>
23412         * config/rs6000/rs6000-c: Add support for built-in functions
23413         vector double vec_doublee (vector signed int);
23414         vector double vec_doublee (vector unsigned int);
23415         vector double vec_doublee (vector float);
23416         vector double vec_doubleh (vector signed int);
23417         vector double vec_doubleh (vector unsigned int);
23418         vector double vec_doubleh (vector float);
23419         vector double vec_doublel (vector signed int);
23420         vector double vec_doublel (vector unsigned int);
23421         vector double vec_doublel (vector float);
23422         vector double vec_doubleo (vector signed int);
23423         vector double vec_doubleo (vector unsigned int);
23424         vector double vec_doubleo (vector float);.
23425         * config/rs6000/rs6000-builtin.def: Add definitions for DOUBLEE,
23426         DOUBLEO, DOUBLEH, DOUBLEL, UNS_DOUBLEO, UNS_DOUBLEE, UNS_DOUBLEH,
23427         UNS_DOUBLEL.
23428         * config/rs6000/altivec.md: Add code generator for doublee<mode>2,
23429         unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2, doubleh<mode>2,
23430         unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2, add mode attribute
23431         VS_sxwsp.
23432         * config/rs6000/altivec.h: Add define for vec_doublee, vec_doubleo,
23433         vec_doublel, vec_doubleh.
23434         * doc/extend.texi: Update the built-in documentation file for the
23435         new built-in functions.
23437 2017-06-02  David Malcolm  <dmalcolm@redhat.com>
23439         PR jit/80954
23440         * ipa-inline-analysis.c (free_growth_caches): Set
23441         edge_removal_hook_holder to NULL after removing it.
23443 2017-06-02  Sudakshina Das  <sudi.das@arm.com>
23445         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Return CC_SWP for
23446         comparision with zero.
23448 2017-06-02  Will Schmidt  <will_schmidt@vnet.ibm.com>
23449         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
23450         for early expansion of vec_min and vec_max builtins.
23451         (builtin_function_type): Add min/max unsigned variants to those
23452         identified as having unsigned arguments.
23454 2017-06-02  Olivier Hainque  <hainque@adacore.com>
23456         * config/vx-common.h (DWARF_UNWIND_INFO): Switch #define to 1.
23458 2017-06-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23460         * config/aarch64/aarch64-simd.md (*aarch64_simd_vec_copy_lane<mode>):
23461         Use VALL_F16 iterator rather than VALL.
23463 2017-06-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23465         * config/aarch64/aarch64.c (aarch64_split_compare_and_swap):
23466         Emit CBNZ inside loop when doing a strong exchange and comparing
23467         against zero.  Generate the CC flags after the loop.
23469 2017-06-02  David Edelsohn  <dje.gcc@gmail.com>
23471         * dwarf2out.c (DWARF_INITIAL_LENGTH_SIZE_STR): New.
23472         (dl_section_ref): New.
23473         (dwarf2out_finish): Copy debug_line_section_label to dl_section_ref.
23474         On AIX, append an expression to subtract the size of the
23475         section length to dl_section_ref.
23477 2017-06-02  Will Schmidt  <will_schmidt@vnet.ibm.com>
23479         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
23480         for early expansion of vector absolute builtins.
23482 2017-06-02  Richard Biener  <rguenther@suse.de>
23484         * tree-vect-slp.c (vect_detect_hybrid_slp_2): Match up
23485         what we consider a relevant use stmt with vect_detect_hybrid_slp_stmts.
23487 2017-06-02  Richard Biener  <rguenther@suse.de>
23489         PR tree-optimization/80948
23490         * tree-tailcall.c (find_tail_calls): Track stmts to move in
23491         stmt order as well.
23493 2017-06-02  Richard Biener  <rguenther@suse.de>
23495         * tree-vect-loop.c (vect_analyze_loop_operations): Not relevant
23496         PHIs are ok.
23497         * tree-vect-stmts.c (process_use): Do not mark backedge defs
23498         for inductions as relevant.
23500 2017-06-02  Richard Biener  <rguenther@suse.de>
23502         * tree-vect-loop.c (get_initial_def_for_induction): Inline into ...
23503         (vectorizable_induction): ... this.  Remove dead code.
23505 2017-06-02  Eric Botcazou  <ebotcazou@adacore.com>
23507         * builtins. (expand_builtin_alloca): Remove second parameter and
23508         infer its value from the first parameter instead.
23509         (expand_builtin) <BUILT_IN_ALLOCA>: Adjust call to above.
23511 2017-06-02  Jakub Jelinek  <jakub@redhat.com>
23513         PR rtl-optimization/80903
23514         * loop-doloop.c (add_test): Unshare sequence.
23516 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
23518         * doc/invoke.texi: Document the -Wsizeof-pointer-div warning.
23520 2017-06-01  Bernd Edlinger  <bernd.edlinger@hotmail.de>
23522         * config/i386/i386.c (x86_64_ms_sysv_extra_clobbered_registers): Make
23523         static.
23524         (xlogue_layout::get_stack_space_used, xlogue_layout::s_instances,
23525         xlogue_layout::get_instance, logue_layout::xlogue_layout,
23526         sp_valid_at, fp_valid_at, choose_basereg): Formatting.
23527         (xlogue_layout::get_stub_rtx): Make static.
23528         (xlogue_layout::get_stub_name): Avoid const-cast, make static.
23529         (xlogue_layout::compute_stub_managed_regs): Rename to...
23530         (xlogue_layout::count_stub_managed_regs): ...this.
23531         (xlogue_layout::is_stub_managed_reg): New function.
23532         (xlogue_layout::m_stub_names): Rename to...
23533         (xlogue_layout::s_stub_names): ...this, make static.
23534         (xlogue_layout::STUB_INDEX_OFFSET, xlogue_layout::MIN_REGS,
23535         xlogue_layout::MAX_REGS, xlogue_layout::MAX_EXTRA_REGS,
23536         xlogue_layout::VARIANT_COUNT, xlogue_layout::STUB_NAME_MAX_LEN,
23537         xlogue_layout::s_stub_names): Instantiate statics.
23538         (stub_managed_regs): Remove.
23539         (ix86_save_reg): Use xlogue_layout::compute_stub_managed_regs.
23540         (disable_call_ms2sysv_xlogues): Rename to...
23541         (warn_once_call_ms2sysv_xlogues): ...this, and warn only once.
23542         (ix86_initial_elimination_offset, ix86_expand_call): Fix call_ms2sysv
23543         warning logic.
23544         (ix86_static_chain): Make sure that ix86_static_chain_on_stack can't
23545         change after reload_completed.
23546         (ix86_can_use_return_insn_p): Use the ix86_frame data structure
23547         directly.
23548         (ix86_expand_prologue): Likewise.
23549         (ix86_expand_epilogue): Likewise.
23550         (ix86_expand_split_stack_prologue): Likewise.
23551         (ix86_compute_frame_layout): Remove frame parameter ...
23552         (TARGET_COMPUTE_FRAME_LAYOUT): ... and export it as a target hook.
23553         (ix86_finalize_stack_realign_flags): Call ix86_compute_frame_layout
23554         only if necessary.
23555         (ix86_init_machine_status): Don't set use_fast_prologue_epilogue_nregs.
23556         (ix86_frame): Move from here ...
23557         * config/i386/i386.h (ix86_frame): ... to here.
23558         (machine_function): Remove use_fast_prologue_epilogue_nregs, cache the
23559         complete ix86_frame data structure instead.  Remove some_ld_name.
23561 2017-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
23563         * dwarf2out.c (dwarf2out_late_global_decl): Add locations for
23564         symbols that hold a DECL_VALUE_EXPR.
23566 2017-06-01  Martin Jambor  <mjambor@suse.cz>
23568         PR tree-optimization/80898
23569         * tree-sra.c (process_subtree_disqualification): Removed.
23570         (disqualify_candidate): Do not acll
23571         process_subtree_disqualification.
23572         (subtree_mark_written_and_enqueue): New function.
23573         (propagate_all_subaccesses): Set grp_write of LHS subtree if the
23574         RHS has been disqualified and re-queue LHS if necessary.  Apart
23575         from that, ignore disqualified RHS.
23577 2017-06-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23579         * config/s390/s390.c (s390_emit_epilogue): Disable early return
23580         address fetch for z10 or later.
23582 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
23584         * config/arc/arc.md (tst_movb): Add guard when splitting.
23586 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
23588         * config/arc/arc.c (arc_can_eliminate): Test against
23589         arc_frame_pointer_needed.
23591 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
23593         * config/arc/arc.c (arc_expand_prologue): Emit a special barrier
23594         to prevent store reordering.
23595         * config/arc/arc.md (UNSPEC_ARC_STKTIE): Define.
23596         (type): Add block type.
23597         (stack_tie): Define special instruction to be used in
23598         expand_prologue.
23600 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
23602         * config/arc/arc.md (commutative_binary_comparison): Remove 'I'
23603         constraint. It is not valid for the pattern.
23604         (noncommutative_binary_comparison): Likewise.
23606 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
23608         * config/arc/simdext.md (movv2hi_insn): Change predicate to avoid
23609         scaled addresses.
23611 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
23613         * config/arc/arc.c (arc_conditional_register_usage): Allow r30 to
23614         be used by the reg-alloc.
23616 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
23618         * config/arc/arc.md (mulsi3): Avoid use of hard registers before
23619         reg-alloc when having mul64 or mul32x16 instructions.
23620         (mulsidi3): Likewise.
23621         (umulsidi3): Likewise.
23622         (mulsi32x16): New pattern.
23623         (mulsi64): Likewise.
23624         (mulsidi64): Likewise.
23625         (umulsidi64): Likewise.
23626         (MUL32x16_REG): Define.
23627         (mul64_600): Use MUL32x16_REG.
23628         (mac64_600): Likewise.
23629         (umul64_600): Likewise.
23630         (umac64_600): Likewise.
23632 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
23634         * config/arc/arc.md (mulsi3_700): Make it commutative.
23636 2017-06-01  Jose E. Marchesi  <jose.marchesi@oracle.com>
23638         * config/sparc/sparc.md (*zero_extendsidi2_insn_sp64): Set insn
23639         type for movstouw.
23640         (*sign_extendsidi2_insn): Likewise for movstosw.
23642 2017-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
23644         * dwarf2out.c (get_discr_value): Call the get_debug_type hook on
23645         the type of the input discriminant value.  Convert the
23646         discriminant value of signedness vary.
23648 2017-06-01  Volker Reichelt  <v.reichelt@netcologne.de>
23650         * doc/invoke.texi (-Wcatch-value): Document new shortcut.
23651         Add to -Wall section.
23653 2017-06-01  Richard Biener  <rguenther@suse.de>
23655         PR middle-end/66313
23656         * fold-const.c (fold_plusminus_mult_expr): If the factored
23657         factor may be zero use a wrapping type for the inner operation.
23658         * tree-tailcall.c (independent_of_stmt_p): Pass in to_move bitmap
23659         and handle moved defs.
23660         (process_assignment): Properly guard the unary op case.  Return a
23661         tri-state indicating that moving the stmt before the call may allow
23662         to continue.  Pass through to_move.
23663         (find_tail_calls): Handle moving unrelated defs before
23664         the call.
23666 2017-05-31  Segher Boessenkool  <segher@kernel.crashing.org>
23668         PR target/80618
23669         * config/rs6000/vector.md (*vector_uneq<mode>): Write the nor in the
23670         splitter result in the canonical way.
23672 2017-05-31  Uros Bizjak  <ubizjak@gmail.com>
23674         * config/i386/i386.md (*zero_extendsidi2): Enable alternative (?r, *Yj)
23675         also for 32bit target.  Update insn attributes.
23676         (zero-extendsidi2 splitter): Allow all registers for operand 1.
23678 2017-05-31  Sebastian Peryt  <sebastian.peryt@intel.com>
23680         * config/i386/avx512fintrin.h (_mm_mask_max_sd)
23681         (_mm_maskz_max_sd, _mm_mask_max_ss, _mm_maskz_max_ss)
23682         (_mm_mask_min_sd, _mm_maskz_min_sd, _mm_mask_min_ss)
23683         (_mm_maskz_min_ss): New intrinsics.
23685 2017-05-31  Martin Liska  <mliska@suse.cz>
23687         * tree-vect-loop.c (vect_create_epilog_for_reduction):
23688         Change comment style to one we normally use.
23689         (vectorizable_reduction): Likewise.
23690         (vectorizable_induction): Likewise.
23691         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
23692         (vectorizable_call): Likewise.
23693         (vectorizable_simd_clone_call): Likewise.
23694         (vectorizable_conversion): Likewise.
23695         (vectorizable_assignment): Likewise.
23696         (vectorizable_shift): Likewise.
23697         (vectorizable_operation): Likewise.
23698         (vectorizable_store): Likewise.
23699         (vectorizable_load): Likewise.
23700         * tree-vectorizer.h: Likewise.
23702 2017-05-31  Alexander Monakov  <amonakov@ispras.ru>
23704         * passes.c (emergency_dump_function): New.
23705         * tree-pass.h (emergency_dump_function): Declare.
23706         * plugin.c (plugins_internal_error_function): Remove.
23707         * plugin.h (plugins_internal_error_function): Remove declaration.
23708         * toplev.c (internal_error_function): New static function.  Use it...
23709         (general_init): ...here.
23711 2017-05-31  Graham Markall  <graham.markall@embecosm.com>
23713         * config/arc/arc.c (arc_print_operand): Handle constant operands.
23714         (arc_rtx_costs): Add costs for new patterns.
23715         * config/arc/arc.md: Additional *add_n and *sub_n patterns.
23716         * config/arc/predicates.md: Add _1_2_3_operand predicate.
23718 2017-05-31  Richard Sandiford  <richard.sandiford@linaro.org>
23720         * tree-ssa-strlen.c (get_next_strinfo): New function.
23721         (get_stridx_plus_constant): Use it.
23722         (zero_length_string): Likewise.
23723         (adjust_related_strinfos): Likewise.
23724         (adjust_last_stmt): Likewise.
23726 2017-05-31  Richard Biener  <rguenther@suse.de>
23728         PR target/80880
23729         * config/i386/i386.c (ix86_expand_builtin): Remove assert
23730         for arg being an SSA name when expanding IX86_BUILTIN_BNDRET.
23732 2017-05-31  Richard Sandiford  <richard.sandiford@linaro.org>
23734         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Remove
23735         loop_vinfo argument and use of dependence distance vectors.
23736         Check instead whether the two references differ only in their
23737         initial value and assume that they have the same alignment if the
23738         difference is a multiple of the vector alignment.
23739         (vect_analyze_data_refs_alignment): Update call accordingly.
23741 2017-05-31  Martin Liska  <mliska@suse.cz>
23743         PR target/79155
23744         * config/i386/cpuid.h: Fix typo in a comment in cpuid.h.
23746 2017-05-31  Bin Cheng  <bin.cheng@arm.com>
23748         * tree-vect-loop-manip.c (create_intersect_range_checks_index)
23749         (create_intersect_range_checks): Move from ...
23750         * tree-data-ref.c (create_intersect_range_checks_index)
23751         (create_intersect_range_checks): ... to here.
23752         (create_runtime_alias_checks): New function factored from ...
23753         * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): ...
23754         here.  Call above function.
23755         * tree-data-ref.h (create_runtime_alias_checks): New function.
23757 2017-05-31  Bin Cheng  <bin.cheng@arm.com>
23759         * tree-data-ref.c (prune_runtime_alias_test_list): Relax minimal
23760         segment length for dr_b and compute it in wide_int.
23762 2017-05-31  Richard Biener  <rguenther@suse.de>
23764         PR tree-optimization/80906
23765         * graphite-isl-ast-to-gimple.c (copy_loop_close_phi_nodes): Get
23766         and pass through iv_map.
23767         (copy_bb_and_scalar_dependences): Adjust.
23768         (translate_pending_phi_nodes): Likewise.
23769         (copy_loop_close_phi_args): Handle code-generating IVs instead
23770         of ICEing.
23772 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
23774         * diagnostic-color.c (color_dict): Add "type-diff".
23775         (parse_gcc_colors): Update comment.
23776         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
23777         -fdiagnostics-show-template-tree and -fno-elide-type.
23778         (GCC_COLORS): Add type-diff to example.
23779         (type-diff=): New.
23780         (-fdiagnostics-show-template-tree): New.
23781         (-fno-elide-type): New.
23782         * pretty-print.c (pp_format): Pass quote and formatters[argno] to
23783         the pp_format_decoder callback.  Call any m_format_postprocessor's
23784         "handle" method.
23785         (pretty_printer::pretty_printer): Initialize
23786         m_format_postprocessor.
23787         (pretty_printer::~pretty_printer): Delete any
23788         m_format_postprocessor.
23789         * pretty-print.h (printer_fn): Add bool and const char ** parameters.
23790         (class format_postprocessor): New class.
23791         (struct pretty_printer::format_decoder): Document the new parameters.
23792         (struct pretty_printer::m_format_postprocessor): New field.
23793         * tree-diagnostic.c (default_tree_printer): Update for new
23794         bool and const char ** params.
23795         * tree-diagnostic.h (default_tree_printer): Likewise.
23797 2017-05-30  Segher Boessenkool  <segher@kernel.crashing.org>
23799         * config/rs6000/predicates.md (cc_reg_not_micro_cr0_operand): Delete.
23800         (lwa_operand): Delete rs6000_gen_cell_microcode test.
23801         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
23802         rs6000_gen_cell_microcode code.
23803         (rs6000_final_prescan_insn): Delete.
23804         (rs6000_opt_vars): Delete the "gen-cell-microcode" and
23805         "warn-cell-microcode" entries.
23806         * config/rs6000/rs6000.h (FINAL_PRESCAN_INSN): Delete.
23807         * config/rs6000/rs6000.md: Delete rs6000_gen_cell_microcode tests
23808         throughout.  Change cc_reg_not_micro_cr0_operand to
23809         cc_reg_not_cr0_operand throughout.
23810         (*extendhi<mode>2_noload): Delete.
23811         * config/rs6000/rs6000.opt (mgen-cell-microcode): Replace by stub.
23812         (mwarn-cell-microcode): Delete.
23813         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete
23814         -mgen-cell-microcode and -mwarn-cell-microcode.
23816 2017-05-30  Uros Bizjak  <ubizjak@gmail.com>
23818         PR target/80833
23819         * config/i386/constraints.md (Yd): New constraint.
23820         (Ye): Ditto.
23821         * config/i386/i386.md (*movti_internal): Add (?r, Ye)
23822         and (?Yd, r) alternatives.  Update insn attributes.
23823         * config/i386/i386.md (*movti_internal): Add (?r, *Ye)
23824         and (?*Yd, r) alternatives.  Update insn attributes.
23825         (double-mode inter-unit splitters): Add new GR<->XMM splitters.
23827 2017-05-30  Pierre-Marie de Rodat  <derodat@adacore.com>
23829         * gimplify.c (gimplify_modify_expr): Don't create a
23830         DECL_DEBUG_EXPR link if *FROM_P does not belong to the current
23831         function.
23833 2017-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
23835         * config/arm/arm-builtins.c (arm_expand_builtin): Remove const.
23837 2017-05-30  Richard Biener  <rguenther@suse.de>
23839         * tree-vectorizer.h (struct _stmt_vec_info): Add reduc_type
23840         and reduc_def fields.
23841         (STMT_VINFO_REDUC_TYPE): New define.
23842         (STMT_VINFO_REDUC_DEF): Likewise.
23843         (vect_force_simple_reduction): Adjust prototype.
23844         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Adjust.
23845         (vect_is_simple_reduction): Remove check_reduction argument.
23846         (vect_force_simple_reduction): Adjust and set
23847         STMT_VINFO_REDUC_TYPE and STMT_VINFO_REDUC_DEF.
23848         (vectorizable_reduction): Do not re-do reduction analysis
23849         but use STMT_VINFO_REDUC_TYPE and STMT_VINFO_REDUC_DEF.
23850         * tree-parloops.c (gather_scalar_reductions): Adjust.
23852 2017-05-30  Richard Biener  <rguenther@suse.de>
23854         PR middle-end/80901
23855         * cfgexpand.c (expand_gimple_cond): Match up loop fixup with
23856         split_edge code.
23858 2017-05-24  Robin Dapp  <rdapp@linux.vnet.ibm.com>
23860         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs):
23861         Introduce unknown_misalignment parameter and remove vf.
23862         (vect_peeling_hash_get_lowest_cost):
23863         Pass unknown_misalignment parameter.
23864         (vect_enhance_data_refs_alignment):
23865         Fix unsupportable data ref treatment.
23867 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
23869         * tree-vect-data-refs.c (vect_get_data_access_cost):
23870         Workaround for SLP handling.
23871         (vect_enhance_data_refs_alignment):
23872         Compute costs for doing no peeling at all, compare to the best
23873         peeling costs so far and avoid peeling if cheaper.
23875 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
23877         * tree-vect-data-refs.c (vect_peeling_hash_choose_best_peeling):
23878         Return peeling info and set costs to zero for unlimited cost
23879         model.
23880         (vect_enhance_data_refs_alignment): Also inspect all datarefs
23881         with unknown misalignment. Compute and costs for unknown
23882         misalignment, compare them to the costs for known misalignment
23883         and choose the cheapest for peeling.
23885 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
23887         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Rename.
23888         (vect_get_peeling_costs_all_drs): Create function.
23889         (vect_peeling_hash_get_lowest_cost):
23890         Use vect_get_peeling_costs_all_drs.
23891         (vect_peeling_supportable): Create function.
23892         (vect_enhance_data_refs_alignment): Use vect_peeling_supportable.
23894 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
23896         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Create
23897         DR_HAS_NEGATIVE_STEP.
23898         (vect_update_misalignment_for_peel): Define DR_MISALIGNMENT.
23899         (vect_enhance_data_refs_alignment): Use.
23900         (vect_duplicate_ssa_name_ptr_info): Use.
23901         * tree-vectorizer.h (dr_misalignment): Use.
23902         (known_alignment_for_access_p): Use.
23904 2017-05-30  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
23906         PR target/78838
23907         * config/msp430/msp430.c (gen_prefix): Return NULL when section name is
23908         .lowtext.
23909         (has_section_name): New function.
23911 2017-05-30  Martin Liska  <mliska@suse.cz>
23913         PR other/80909
23914         * auto-profile.c (get_function_decl_from_block): Fix
23915         parenthesis.
23917 2017-05-30  Richard Biener  <rguenther@suse.de>
23919         PR middle-end/80876
23920         * cfgexpand.c (expand_gimple_cond): Fixup preserving loops again.
23922 2017-05-30  Martin Liska  <mliska@suse.cz>
23924         * dumpfile.c: Use newly added macro DUMP_FILE_INFO.
23925         * dumpfile.h (struct dump_file_info): Remove ctors.
23927 2017-05-30  Martin Liska  <mliska@suse.cz>
23929         * predict.def: Fix GNU coding style.
23931 2017-05-29  Max Filippov  <jcmvbkbc@gmail.com>
23933         * config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
23934         Mark 'to' argument with ATTRIBUTE_UNUSED.
23936 2017-05-29  Max Filippov  <jcmvbkbc@gmail.com>
23938         * config/xtensa/xtensa.c (xtensa_emit_call): Use
23939         HOST_WIDE_INT_PRINT_HEX instead of 0x%lx format string.
23940         (print_operand): Use HOST_WIDE_INT_PRINT_DEC instead of %ld
23941         format string.
23943 2017-05-29  Eric Botcazou  <ebotcazou@adacore.com>
23945         * doc/install.texi (Options specification): Restore entry of
23946         --enable-sjlj-exceptions.
23948 2017-05-27  Michael Eager  <eager@eagercon.com>
23950         Revert:
23951         2016-01-21  Ajit Agarwal  <ajitkum@xilinx.com>
23953         See https://gcc.gnu.org/ml/gcc/2017-05/msg00221.html.
23955         * config/microblaze/microblaze.h
23956         (FIXED_REGISTERS): Update in macro.
23957         (CALL_USED_REGISTERS): Update in macro.
23959 2017-05-27  François-Xavier Coudett  <fxcoudert@gcc.gnu.org>
23961         * doc/install.texi: Add links to macOS binary distributions.
23963 2017-05-27  Jakub Jelinek  <jakub@redhat.com>
23965         PR bootstrap/80887
23966         Revert:
23967         2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
23969         * match.pd ((A +- CST1) +- CST2): Allow some conversions.
23971 2017-05-26  Martin Liska  <mliska@suse.cz>
23973         * dumpfile.h (enum dump_kind): Renumber TDF_* flags to be contiguous.
23975 2017-05-26  Martin Liska  <mliska@suse.cz>
23977         * cfg.c (check_bb_profile): Do not use TDF_COMMENT and print
23978         always leading ';; '.
23979         (dump_bb_info): Likewise.
23980         (brief_dump_cfg): Likewise.
23981         * cfgrtl.c (print_rtl_with_bb): Do not use TDF_COMMENT.
23982         * dumpfile.c: Remove usage of TDF_VERBOSE.
23983         * dumpfile.h (enum dump_kind): Likewise.
23984         (dump_gimple_bb_header): Do not use TDF_COMMENT.
23985         * print-tree.c (debug_verbose): Remove.
23986         * tree-cfg.c (gimple_dump_cfg): Do not use TDF_COMMENT.
23987         (dump_function_to_file): Remove dumps guarded with TDF_VERBOSE.
23988         * tree-diagnostic.c (default_tree_printer): Replace
23989         TDF_DIAGNOSTIC with TDF_SLIM.
23991 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
23993         * tree-vect-loop-manip.c (create_intersect_range_checks_index): Pass
23994         in parameter loop, rather than loop_vinfo.
23995         (create_intersect_range_checks): Ditto.
23996         (vect_create_cond_for_alias_checks): Update call to above functions.
23998 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
24000         PR tree-optimization/80815
24001         * tree-data-ref.c (prune_runtime_alias_test_list): Simplify condition
24002         for merging runtime alias checks.  Handle negative DR_STEPs.
24004 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
24006         * tree-vect-data-refs.c (Operator==, comp_dr_with_seg_len_pair):
24007         Move from ...
24008         * tree-data-ref.c (Operator==, comp_dr_with_seg_len_pair): To here.
24009         * tree-vect-data-refs.c (vect_prune_runtime_alias_test_list): Factor
24010         out code pruning runtime alias checks.
24011         * tree-data-ref.c (prune_runtime_alias_test_list): New function
24012         factored out from above.
24013         * tree-vectorizer.h (struct dr_with_seg_len, dr_with_seg_len_pair_t):
24014         Move from ...
24015         * tree-data-ref.h (struct dr_with_seg_len, dr_with_seg_len_pair_t):
24016         ... to here.
24017         (prune_runtime_alias_test_list): New decalaration.
24019 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
24021         * tree-vect-data-refs.c (compare_tree): Rename and move ...
24022         * tree-data-ref.c (data_ref_compare_tree): ... to here.
24023         * tree-data-ref.h (data_ref_compare_tree): New decalaration.
24024         * tree-vect-data-refs.c (dr_group_sort_cmp): Update uses.
24025         (operator==, comp_dr_with_seg_len_pair): Ditto.
24026         (vect_prune_runtime_alias_test_list): Ditto.
24028 2017-05-26  Martin Liska  <mliska@suse.cz>
24030         PR ipa/80663
24031         * params.def: Bound partial-inlining-entry-probability param.
24033 2017-05-26  Marek Polacek  <polacek@redhat.com>
24035         PR sanitizer/80875
24036         * fold-const.c (fold_binary_loc) <case MULT_EXPR>: Check if OP1
24037         can be negated.
24039 2017-05-26  Richard Biener  <rguenther@suse.de>
24041         PR tree-optimization/80842
24042         * tree-ssa-ccp.c (set_lattice_value): Always meet with the old
24043         value.
24045 2017-05-26  Richard Biener  <rguenther@suse.de>
24047         PR tree-optimization/80844
24048         * tree-vectorizer.c (adjust_simduid_builtins): Propagate results.
24050 2017-05-25  Sebastian Peryt  <sebastian.peryt@intel.com>
24052         * doc/md.texi (Machine Constraints): Update x86 family
24053         machine constraints section to match 'config/i386/constraints.md'.
24055 2017-05-25  Volker Reichelt  <v.reichelt@netcologne.de>
24057         * doc/invoke.texi (-Wcatch-value=): Document new warning option.
24059 2017-05-25  Nathan Sidwell  <nathan@acm.org>
24061         * doc/invoke.texi (--enable-languages): Update documentation.
24063 2017-05-25  Martin Liska  <mliska@suse.cz>
24065         * dumpfile.c: Add TDF_FOLDING.
24066         * dumpfile.h (enum dump_kind): Likewise.
24067         * genmatch.c (dt_simplify::gen_1): Use it.
24069 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
24071         * match.pd (view_convert (convert@0 @1)): Handle zero-extension.
24073 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
24075         * match.pd ((A +- CST1) +- CST2): Allow some conversions.
24076         * tree.c (drop_tree_overflow): Handle COMPLEX_CST and VECTOR_CST.
24078 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
24080         * fold-const.c (fold_binary_loc) [(A & C) == D]: Remove transformation.
24081         * match.pd (X == C): Rewrite it here.
24082         (with_possible_nonzero_bits, with_possible_nonzero_bits2,
24083         with_certain_nonzero_bits2): New predicates.
24084         * tree-ssanames.c (get_nonzero_bits): Handle INTEGER_CST.
24086 2017-05-24  Nathan Sidwell  <nathan@acm.org>
24088         * lto-streamer-in.c (lto_input_data_block): Adjust T const cast to
24089         avoid warning.
24091         * auto-profile.c (afdo_propagate): Adjust T const cast to avoid
24092         warning.
24094 2017-05-24  Segher Boessenkool  <segher@kernel.crashing.org>
24096         * config/powerpcspe: New port.  Files are copied from the rs6000
24097         port, with "rs6000" in filenames replaced by "powerpcspe".
24099 2017-05-24  Wilco Dijkstra  <wdijkstr@arm.com>
24101         PR rtl-optimization/80754
24102         * lra-remat.c (do_remat): Add overlap checks for dst_regno.
24104 2017-05-24  Sheldon Lobo  <smlobo@sheldon.us.oracle.com>
24106         * config/sparc/sparc.md (length): Return the correct value for -mflat
24107         sibcalls to match output_sibcall.
24109 2017-05-24  Segher Boessenkool  <segher@kernel.crashing.org>
24111         PR bootstrap/80860
24112         PR bootstrap/80843
24113         * config/rs6000/rs6000.c (struct machine_function): Add new field
24114         n_components.
24115         (rs6000_get_separate_components): Init that field, use it.
24116         (rs6000_components_for_bb): Use the field.
24118 2017-05-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>
24120         * config/arm/arm.c (arm_expand_prologue): Fix typo in comment.
24122 2017-05-24  Peter Bergner  <bergner@vnet.ibm.com>
24124         PR middle-end/80823
24125         * tree-cfg.c (group_case_labels_stmt): Delete increment of "i";
24127 2017-05-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24129         PR target/80725
24130         * config/s390/s390.c (s390_check_qrst_address): Check incoming
24131         address against address_operand predicate.
24132         * config/s390/s390.md ("*indirect_jump"): Swap alternatives.
24134 2017-05-24  Eric Botcazou  <ebotcazou@adacore.com>
24136         * var-tracking.c (track_expr_p): Do not return 0 for tracked record
24137         parameters passed indirectly.
24139 2017-05-23  Uros Bizjak  <ubizjak@gmail.com>
24141         * config/i386/i386.md (*movdi_internal): Remove SSE4
24142         alternative 18 (?r, *v).  Update insn attributes.
24143         (*movsi_internal): Remove SSE4 alternative 13 (?r, *v).
24144         Update insn attributes.
24145         (*zero_extendsidi2): Remove SSE4 alternative (?r, *x).
24146         Update insn attributes.
24147         * config/i386/sse.md (vec_extract<ssevecmodelower>_0): Remove SSE4
24148         alternative 1 (r, v). Remove isa attribute.
24149         * config/i386/i386.c (dimode_scalar_chain::make_vector_copies):
24150         Always move value through stack for !TARGET_INTER_UNIT_MOVES_TO_VEC
24151         and !TARGET_INTER_UNIT_MOVES_TO_VEC targets.
24153 2017-05-23  Tom de Vries  <tom@codesourcery.com>
24155         * doc/sourcebuild.texi (Directives, Verify compiler message): Document
24156         dg-line directive.
24158 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
24160         * cgraphunit.c (symbol_table::process_new_functions): Update.
24161         * ipa-fnsummary.c (pass_data_inline_parameters): Remove.
24162         (inline_generate_summary): Rename to ...
24163         (ipa_fn_summary_generate): ... this one.
24164         (inline_read_summary): Rename to ...
24165         (ipa_fn_summary_read): ... this one.
24166         (inline_write_summary): Rename to ...
24167         (ipa_fn_summary_write): ... this one.
24168         (inline_free_summary): Rename to ...
24169         (ipa_free_fn_summary): ... this one.
24170         (pass_data_local_fn_summary, pass_local_fn_summary,
24171         make_pass_local_fn_summary, pass_data_ipa_free_fn_summary,
24172         pass_ipa_free_fn_summary, make_pass_ipa_free_fn_summary,
24173         pass_data_ipa_fn_summary, pass_ipa_fn_summary,
24174         make_pass_ipa_fn_summary): New.
24175         * ipa-fnsummary.h (inline_generate_summary, inline_read_summary,
24176         inline_write_summary, inline_free_summary): Remove.
24177         (ipa_free_fn_summary) : New.
24178         * ipa-inline.c (ipa_inline): Update.
24179         (pass_ipa_inline): Do not generate summaries.
24180         * ipa.c (pass_data_ipa_free_fn_summary, pass_ipa_free_fn_summary):
24181         Remove.
24182         * passes.def: Replace pass_inline_parameters by pass_local_fn_summary
24183         and add pass_ipa_fn_summary.
24184         * tree-pass.h (make_pass_ipa_fn_summary, make_pass_local_fn_summary):
24185         New.
24186         (make_pass_inline_parameters): Remove.
24188 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
24190         * omp-low.c (struct omp_context): Remove "default_kind" member.
24191         Adjust all users.
24193         * omp-offload.c (execute_oacc_device_lower): Remove the
24194         parallelism dimensions function attributes for unparallelized
24195         OpenACC kernels constructs.
24197 2017-05-23  Martin Liska  <mliska@suse.cz>
24199         * cgraph.c (cgraph_node::get_create): Use symtab_node::dump_{asm_,}name
24200         functions.
24201         (cgraph_edge::make_speculative): Likewise.
24202         (cgraph_edge::resolve_speculation): Likewise.
24203         (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
24204         (cgraph_node::dump): Likewise.
24205         * cgraph.h: Likewise.
24206         * cgraphunit.c (analyze_functions): Likewise.
24207         (symbol_table::compile): Likewise.
24208         * ipa-cp.c (print_all_lattices): Likewise.
24209         (determine_versionability): Likewise.
24210         (initialize_node_lattices): Likewise.
24211         (ipcp_verify_propagated_values): Likewise.
24212         (estimate_local_effects): Likewise.
24213         (update_profiling_info): Likewise.
24214         (create_specialized_node): Likewise.
24215         (perhaps_add_new_callers): Likewise.
24216         (decide_about_value): Likewise.
24217         (decide_whether_version_node): Likewise.
24218         (identify_dead_nodes): Likewise.
24219         (ipcp_store_bits_results): Likewise.
24220         * ipa-devirt.c (dump_targets): Likewise.
24221         (ipa_devirt): Likewise.
24222         * ipa-icf.c (sem_item::dump): Likewise.
24223         (sem_function::equals): Likewise.
24224         (sem_variable::equals): Likewise.
24225         (sem_item_optimizer::read_section): Likewise.
24226         (sem_item_optimizer::execute): Likewise.
24227         (congruence_class::dump): Likewise.
24228         * ipa-inline-analysis.c (dump_ipa_call_summary): Likewise.
24229         (dump_inline_summary): Likewise.
24230         (estimate_node_size_and_time): Likewise.
24231         (inline_analyze_function): Likewise.
24232         * ipa-inline-transform.c (inline_call): Likewise.
24233         * ipa-inline.c (report_inline_failed_reason): Likewise.
24234         (want_early_inline_function_p): Likewise.
24235         (edge_badness): Likewise.
24236         (update_edge_key): Likewise.
24237         (inline_small_functions): Likewise.
24238         * ipa-profile.c (ipa_profile): Likewise.
24239         * ipa-prop.c (ipa_print_node_jump_functions): Likewise.
24240         (ipa_make_edge_direct_to_target): Likewise.
24241         (remove_described_reference): Likewise.
24242         (ipa_impossible_devirt_target): Likewise.
24243         (propagate_controlled_uses): Likewise.
24244         (ipa_print_node_params): Likewise.
24245         (ipcp_transform_function): Likewise.
24246         * ipa-pure-const.c (pure_const_read_summary): Likewise.
24247         (propagate_pure_const): Likewise.
24248         * ipa-reference.c (generate_summary): Likewise.
24249         (read_write_all_from_decl): Likewise.
24250         (propagate): Likewise.
24251         (ipa_reference_read_optimization_summary): Likewise.
24252         * ipa-utils.c (ipa_merge_profiles): Likewise.
24253         * ipa.c (walk_polymorphic_call_targets): Likewise.
24254         (symbol_table::remove_unreachable_nodes): Likewise.
24255         (ipa_single_use): Likewise.
24256         * passes.c (execute_todo): Likewise.
24257         * predict.c (drop_profile): Likewise.
24258         * symtab.c (symtab_node::get_dump_name): New function.
24259         (symtab_node::dump_name): Likewise.
24260         (symtab_node::dump_asm_name): Likewise.
24261         (symtab_node::dump_references): Likewise.
24262         (symtab_node::dump_referring): Likewise.
24263         (symtab_node::dump_base): Likewise.
24264         (symtab_node::debug_symtab): Likewise.
24265         * tree-sra.c (convert_callers_for_node): Likewise.
24266         * tree-ssa-structalias.c (ipa_pta_execute): Likewise.
24267         * value-prof.c (init_node_map): Likewise.
24269 2017-05-23  Martin Liska  <mliska@suse.cz>
24271         * cgraph.h: Move symtab_node::dump_table to symbol_table::dump
24272         and symtab_node::debug_symtab to symbol_table::debug.
24273         * cgraphunit.c (analyze_functions): Use the renamed function.
24274         (symbol_table::compile): Likewise.
24275         * ipa-cp.c (ipcp_verify_propagated_values): Likewise.
24276         * ipa-icf.c (sem_item_optimizer::execute): Likewise.
24277         * passes.c (execute_todo): Likewise.
24278         * symtab.c (symbol_table::dump): New function.
24279         * tree-ssa-structalias.c (ipa_pta_execute): Use the renamed function.
24281 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
24283         * ipa-fnsummary.c (estimate_node_size_and_time): Do not sanity check
24284         that nonconst implies exec.
24286 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
24288         * ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list,
24289         inline_edge_removal_hook, inline_edge_duplication_hook): Remove.
24290         (inline_edge_summary_vec): Turn into ...
24291         (ipa_call_summaries): ... this one.
24292         (redirect_to_unreachable, edge_set_predicate,
24293         evaluate_properties_for_edge, inline_summary_alloc,
24294         reset_ipa_call_summary, reset_inline_summary,
24295         inline_summary_t::duplicate): Update.
24296         (inline_edge_duplication_hook): Turn to ...
24297         (ipa_call_summary_t::duplicate): ... this one.
24298         (inline_edge_removal_hook): Turn to ...
24299         (ipa_call_summary_t::remove): ... this one.
24300         (dump_inline_edge_summary): Turn to ...
24301         (dump_ipa_call_summary): ... this one.
24302         (estimate_function_body_sizes): Update.
24303         (inline_update_callee_summaries): Update.
24304         (remap_edge_change_prob): Update.
24305         (remap_edge_summaries): Update.
24306         (inline_merge_summary): Update.
24307         (do_estimate_edge_time): Update.
24308         (inline_generate_summary): Update.
24309         (inline_read_section): Update.
24310         (inline_read_summary): Update.
24311         (inline_free_summary): Update.
24312         * ipa-inline.c (can_inline_edge_p): Update.
24313         (compute_inlined_call_time): Update.
24314         (want_inline_small_function_p): Update.
24315         (edge_badness): Update.
24316         (early_inliner): Update.
24317         * ipa-inline.h (inline_edge_summary): Turn to ...
24318         (ipa_call_summary): ... this one.
24319         (ipa_call_summary_t): New class.
24320         (inline_edge_summary_t, inline_edge_summary_vec): Remove.
24321         (ipa_call_summaries): New.
24322         (inline_edge_summary): Remove.
24323         (estimate_edge_growth): Update.
24324         * ipa-profile.c (ipa_propagate_frequency_1): Update.
24325         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
24326         * ipa-split.c (execute_split_functions): Update.
24327         * ipa.c (symbol_table::remove_unreachable_nodes): Update.
24329 2017-05-23  Tom de Vries  <tom@codesourcery.com>
24331         * doc/sourcebuild.texi (Effective-Target Keywords, Other hardware
24332         attributes): Document rdrand effective target.
24334 2017-05-23  Tom de Vries  <tom@codesourcery.com>
24336         * doc/sourcebuild.texi (Effective-Target Keywords, Other hardware
24337         attributes): Sort alphabetically.
24339 2017-05-23  Georg-Johann Lay  <avr@gjlay.de>
24341         * config/avr/genmultilib.awk: Use gsub instead of gensub.
24343 2017-05-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
24345         PR target/80718
24346         * config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Split
24347         V2DF/V2DI splat into two separate patterns, one that handles
24348         registers, and the other that only handles memory.  Drop support
24349         for splatting from a GPR on ISA 2.07 and then splitting the
24350         splat into direct move and splat.
24351         (vsx_splat_<mode>_reg): Likewise.
24352         (vsx_splat_<mode>_mem): Likewise.
24354 2017-05-22  Segher Boessenkool  <segher@kernel.crashing.org>
24356         * cfgcleanup.c (bb_is_just_return): Allow CLOBBERs.
24358 2017-05-22  Jakub Jelinek  <jakub@redhat.com>
24360         PR middle-end/80809
24361         * omp-low.c (finish_taskreg_remap): New function.
24362         (finish_taskreg_scan): If unit size of ctx->record_type
24363         is non-constant, unshare the size expression and replace
24364         decls in it with possible outer var refs.
24366         PR middle-end/80809
24367         * gimplify.c (omp_add_variable): For GOVD_DEBUG_PRIVATE use
24368         GOVD_SHARED rather than GOVD_PRIVATE with it.
24369         (gimplify_adjust_omp_clauses_1, gimplify_adjust_omp_clauses): Expect
24370         GOVD_SHARED rather than GOVD_PRIVATE with GOVD_DEBUG_PRIVATE.
24372         PR middle-end/80853
24373         * omp-low.c (lower_reduction_clauses): Pass OMP_CLAUSE_PRIVATE
24374         as last argument to build_outer_var_ref for pointer bases of array
24375         section reductions.
24377 2017-05-19  Martin Sebor  <msebor@redhat.com>
24379         * print-tree.c (print_node): Print DECL_READ_P flag.
24381 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
24383         * Makefile.in: Add ipa-fnsummary.o and ipa-fnsummary.h
24384         * auto-profile.c: Replace ipa-inline.h by ipa-fnsummary.h
24385         * cgraph.c: Likewise.
24386         * cgraphunit.c: Likewise.
24387         * gengtype.c: Likewise.
24388         * ipa-cp.c: Likewise.
24389         * ipa-devirt.c: Likewise.
24390         * ipa-icf.c: Likewise.
24391         * ipa-predicate.c: Likewise.
24392         * ipa-profile.c: Likewise.
24393         * ipa-prop.c: Likewise.
24394         * ipa-split.c: Likewise.
24395         * ipa.c: Likewise.
24396         * ipa-inline-analysis.c (inline_summaries, ipa_call_summaries,
24397         edge_predicate_pool, dump_inline_hints,
24398         inline_summary::account_size_time, redirect_to_unreachable,
24399         edge_set_predicate, set_hint_predicate,
24400         evaluate_conditions_for_known_args, evaluate_properties_for_edge,
24401         inline_summary_alloc, ipa_call_summary::reset, inline_summary::reset,
24402         inline_summary_t::remove, remap_hint_predicate_after_duplication,
24403         inline_summary_t::duplicate, ipa_call_summary_t::duplicate,
24404         ipa_call_summary_t::remove, initialize_growth_caches,
24405         free_growth_caches, dump_ipa_call_summary, dump_inline_summary,
24406         debug_inline_summary, dump_inline_summaries, initialize_inline_failed,
24407         mark_modified, unmodified_parm_1, unmodified_parm,
24408         unmodified_parm_or_parm_agg_item, eliminated_by_inlining_prob,
24409         set_cond_stmt_execution_predicate, set_switch_stmt_execution_predicate,
24410         compute_bb_predicates, will_be_nonconstant_expr_predicate,
24411         will_be_nonconstant_predicate, record_modified_bb_info,
24412         get_minimal_bb, record_modified, param_change_prob,
24413         phi_result_unknown_predicate, predicate_for_phi_result,
24414         array_index_predicate, clobber_only_eh_bb_p, fp_expression_p,
24415         estimate_function_body_sizes, compute_inline_parameters,
24416         compute_inline_parameters_for_curren, pass_data_inline_parameters,
24417         estimate_node_size_and_time, estimate_ipcp_clone_size_and_time,
24418         inline_update_callee_summaries, remap_edge_change_prob,
24419         remap_edge_summaries, remap_hint_predicate, inline_merge_summary,
24420         inline_update_overall_summary, inline_indirect_intraprocedural_analysis,
24421         inline_analyze_function, inline_summary_t::insert,
24422         inline_generate_summary, read_ipa_call_summary, inline_read_section,
24423         inline_read_summary, write_ipa_call_summary, inline_write_summary,
24424         inline_free_summary): Move to ipa-fnsummary.h
24425         (predicate_t): Remove.
24426         * ipa-fnsummary.c: New file.
24427         * ipa-inline.h:  Do not include sreal.h and ipa-predicate.h
24428         (enum inline_hints_vals, inline_hints, agg_position_info,
24429         INLINE_SIZE_SCALE, size_time_entry, inline_summary, inline_summary_t,
24430         inline_summaries, ipa_call_summary, ipa_call_summary_t,
24431         ipa_call_summaries, debug_inline_summary, dump_inline_summaries,
24432         dump_inline_summary, dump_inline_hints, inline_generate_summary,
24433         inline_read_summary, inline_write_summary, inline_free_summary,
24434         inline_analyze_function, initialize_inline_failed,
24435         inline_merge_summary, inline_update_overall_summary,
24436         compute_inline_parameters): Move to ipa-fnsummary.h
24437         * ipa-fnsummary.h: New file.
24438         * ipa-inline-transform.h: Include ipa-inline.h.
24439         * ipa-inline.c: LIkewise.
24441 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
24443         * ipa-inline.c (edge_badness): Use inlined_time instead of
24444         inline_summaries->get.
24446 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
24448         * ipa-inline.c (edge_badness): Use estimate_size_after_inlining.
24450 2017-05-22  Nathan Sidwell  <nathan@acm.org>
24452         * doc/invoke.texi (fdump-translation-unit): Delete documentation.
24453         (fdump-lang): Document 'raw' option.
24454         * dumpfile.h (TDI_tu): Delete.
24455         * dumpfile.c (dump_files): Remove translation-unit.
24456         (FIRST_AUTO_NUMBERED_DUMP): Decrement.
24458 2017-05-22  Georg-Johann Lay  <avr@gjlay.de>
24460         * config/avr/t-avr (AWK) [t-multilib]: Remove "-v FORMAT=Makefile"
24461         command option from $(AWK) call.
24462         * config/avr/genmultilib.awk: Simplify and rewrite so that it
24463         generates MULTILIB_REQUIRED instead of MULTILIB_EXCEPTIONS.
24464         [FORMAT]: Remove handling of variable.
24465         * config/avr/t-multilib: Regenerate.
24467 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
24469         * ipa-inline-analysis.c (inline_summary::reset): Do not reset
24470         self_time.
24471         (dump_inline_summary): Do not print self_time.
24472         (estimate_function_body_sizes): Do not set self_time.
24473         (compute_inline_parameters): Likewise.
24474         (inline_read_section, inline_write_summary): Do not stream self_time.
24475         * ipa-inline.h (inline_summary): Drop self_time.
24477 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
24479         * ipa-inline-analysis.c (account_size_time): Rename to ...
24480         (inline_summary::account_size_time): ... this one.
24481         (reset_ipa_call_summary): Turn to ...
24482         (ipa_call_summary::reset): ... this one.
24483         (reset_inline_summary): Turn to ...
24484         (inline_summary::reset): ... this one.
24485         (inline_summary_t::remove): Update.
24486         (inline_summary_t::duplicate): Update.
24487         (ipa_call_summary_t::remove): Update.
24488         (dump_inline_summary): Update.
24489         (estimate_function_body_sizes): Update.
24490         (compute_inline_parameters): Update.
24491         (estimate_node_size_and_time): Update.
24492         (inline_merge_summary): Update.
24493         (inline_update_overall_summary): Update.
24494         (inline_read_section): Update.
24495         (inline_write_summary): Update.
24496         * ipa-inline.h (inline_summary): Rename entry to size_time_table;
24497         add account_size_time and reset member functions.
24498         (ipa_call_summary): Add reset function.
24499         * ipa-predicate.h (predicate::operator &): Constify.
24501 2017-05-22  Richard Biener  <rguenther@suse.de>
24503         * df-scan.c (df_insn_refs_verify): Speedup when not verifying.
24505 2017-05-19  Jason Merrill  <jason@redhat.com>
24507         * tree.c (make_tree_vec_stat, grow_tree_vec_stat): Use size_t.
24509 2017-05-19  Marek Polacek  <polacek@redhat.com>
24511         PR sanitizer/80800
24512         * fold-const.c (extract_muldiv_1) <case TRUNC_DIV_EXPR>: Add
24513         TYPE_OVERFLOW_WRAPS checks.
24515 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
24517         * tree-core.h (enum omp_clause_default_kind): Add
24518         "OMP_CLAUSE_DEFAULT_PRESENT".
24519         * tree-pretty-print.c (dump_omp_clause): Handle it.
24520         * gimplify.c (enum gimplify_omp_var_data): Add
24521         "GOVD_MAP_FORCE_PRESENT".
24522         (gimplify_adjust_omp_clauses_1): Map it to
24523         "GOMP_MAP_FORCE_PRESENT".
24524         (oacc_default_clause): Handle "OMP_CLAUSE_DEFAULT_PRESENT".
24526         * gimplify.c (oacc_default_clause): Clarify.
24528 2017-05-19  Nathan Sidwell  <nathan@acm.org>
24530         LANG_HOOK_REGISTER_DUMPS
24531         * toplev.c (general_init): Call register dump lang hook.
24532         * doc/invoke.texi: Document -fdump-lang option family.
24533         * dumpfile.c (dump_files): Remove class dump here.
24534         (FIRST_AUTO_NUMBERED_DUMP): Adjust.
24535         * dumpfile.h (tree_dump_index): Remove TDI_class.
24536         * langhooks-def.h (lhd_register_dumps): Declare.
24537         (LANG_HOOKS_REGISTER_DUMPS): Define.
24538         (LANG_HOOKS_INITIALIZER): Add it.
24539         * langhooks.c (lhd_register_dumps): Define.
24540         * langhooks.h (struct lang_hooks): Add register_dumps.
24542 2017-05-19  Nathan Sidwell  <nathan@acm.org>
24544         * context.h (context::set_passes): New.
24545         * context.c (context::context): Do not create pass manager.
24546         * toplev.c (general_init): Create pass manager here.
24548 2017-05-19  Segher Boessenkool  <segher@kernel.crashing.org>
24550         * config/rs6000/rs6000.md (splitter to load of -1 and mask): Don't
24551         use this splitter if two add or or instructions would also work for
24552         the constant we want to generate.
24554 2017-05-19  Richard Biener  <rguenther@suse.de>
24556         PR build/80821
24557         * genmatch.c (dt_node::gen_kids_1): Add missing scope around
24558         predicate evaluation.
24560 2017-05-19  Jan Hubicka  <hubicka@ucw.cz>
24562         * ipa-inline.h (ipa_call_summary): Turn sizes into signed;
24563         add ctor.
24564         * ipa-inline.c (want_inline_small_function_p): Do not cast to
24565         unsigned.
24567 2017-05-19  Jan Hubicka  <hubicka@ucw.cz>
24569         * ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list,
24570         inline_edge_removal_hook, inline_edge_duplication_hook): Remove.
24571         (inline_edge_summary_vec): Turn into ...
24572         (ipa_call_summaries): ... this one.
24573         (redirect_to_unreachable, edge_set_predicate,
24574         evaluate_properties_for_edge, inline_summary_alloc,
24575         reset_ipa_call_summary, reset_inline_summary,
24576         inline_summary_t::duplicate): Update.
24577         (inline_edge_duplication_hook): Turn to ...
24578         (ipa_call_summary_t::duplicate): ... this one.
24579         (inline_edge_removal_hook): Turn to ...
24580         (ipa_call_summary_t::remove): ... this one.
24581         (dump_inline_edge_summary): Turn to ...
24582         (dump_ipa_call_summary): ... this one.
24583         (estimate_function_body_sizes): Update.
24584         (inline_update_callee_summaries): Update.
24585         (remap_edge_change_prob): Update.
24586         (remap_edge_summaries): Update.
24587         (inline_merge_summary): Update.
24588         (do_estimate_edge_time): Update.
24589         (inline_generate_summary): Update.
24590         (inline_read_section): Update.
24591         (inline_read_summary): Update.
24592         (inline_free_summary): Update.
24593         * ipa-inline.c (can_inline_edge_p): Update.
24594         (compute_inlined_call_time): Update.
24595         (want_inline_small_function_p): Update.
24596         (edge_badness): Update.
24597         (early_inliner): Update.
24598         * ipa-inline.h (inline_edge_summary): Turn to ...
24599         (ipa_call_summary): ... this one.
24600         (ipa_call_summary_t): New class.
24601         (inline_edge_summary_t, inline_edge_summary_vec): Remove.
24602         (ipa_call_summaries): New.
24603         (inline_edge_summary): Remove.
24604         (estimate_edge_growth): Update.
24605         * ipa-profile.c (ipa_propagate_frequency_1): Update.
24606         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
24607         * ipa-split.c (execute_split_functions): Update.
24608         * ipa.c (symbol_table::remove_unreachable_nodes): Update.
24610 2017-05-19  Richard Biener  <rguenther@suse.de>
24612         PR middle-end/80764
24613         * cfgexpand.c (expand_gimple_cond): Fix loop fixup.
24615 2017-05-18  Segher Boessenkool  <segher@kernel.crashing.org>
24617         * config/rs6000/rs6000.c (struct machine_function): Add field
24618         fpr_is_wrapped_separately.
24619         (rs6000_get_separate_components): Use 64 components.  Handle the
24620         new FPR components.
24621         (rs6000_components_for_bb): Handle the FPR components.
24622         (rs6000_emit_prologue_components): Handle the FPR components.
24623         (rs6000_emit_epilogue_components): Handle the FPR components.
24624         (rs6000_set_handled_components): Handle the FPR components.
24625         (rs6000_emit_prologue): Don't output prologue code for those FPRs
24626         that are already separately shrink-wrapped.
24627         (rs6000_emit_epilogue): Don't output epilogue code for those FPRs
24628         that are already separately shrink-wrapped.
24630 2017-05-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
24632         PR target/80510
24633         * config/rs6000/predicates.md (simple_offsettable_mem_operand):
24634         New predicate.
24636         * config/rs6000/rs6000.md (ALTIVEC_DFORM): New iterator.
24637         (define_peephole2 for Altivec d-form load): Add peepholes to catch
24638         cases where the register allocator uses a move and an offsettable
24639         memory operation to/from a FPR register on ISA 2.06/2.07.
24640         (define_peephole2 for Altivec d-form store): Likewise.
24642 2017-05-18  Uros Bizjak  <ubizjak@gmail.com>
24644         PR target/80799
24645         * config/i386/mmx.md (*mov<mode>_internal): Enable
24646         alternatives 11, 12, 13 and 14 also for 32bit targets.
24647         Remove alternatives 15, 16, 17 and 18.
24648         * config/i386/sse.md (vec_concatv2di): Change
24649         alternative (!x, *y) to (x, ?!*Yn).
24651 2017-05-18  Paolo Carlini  <paolo.carlini@oracle.com>
24653         * dumpfile.h (enum dump_kind): Remove stray comma.
24655 2017-05-18  Jan Hubicka  <hubicka@ucw.cz>
24657         * Makefile.in: Add ipa-predicate.o and ipa-predicate.h
24658         * ipa-inline-analysis.c (NUM_CONDITIONS): turn into
24659         predicate::num_conditions
24660         (IS_NOT_CONSTANT): turn into predicate::is_not_constant.
24661         (CHANGED): turn into predicate::changed.
24662         (agg_position_info): Move to ipa-predicate.h
24663         (add_condition, predicate::add_clause, predicate::operator &=,
24664         predicate::or_with, predicate::evaluate, predicate::probability,
24665         dump_condition, dump_clause, predicate::dump,
24666         predicate::remap_after_duplication, predicate::remap_after_inlining,
24667         predicate::stream_in, predicate::stream_out): Move to ipa-predicate.c
24668         (evaluate_conditions_for_known_args): Update.
24669         (set_cond_stmt_execution_predicate): Update.
24670         * ipa-inline.h: Include ipa-predicate.h
24671         (condition, inline_param_summary, conditions, agg_position_info,
24672         predicate): Move to ipa-predicate.h
24673         * ipa-predicate.c: New file.
24674         * ipa-predicate.h: New file.
24676 2017-05-18  Wilco Dijkstra  <wdijkstr@arm.com>
24678         * final.c (leaf_function_p): Check we are not in a sequence.
24680 2017-05-18  Martin Liska  <mliska@suse.cz>
24682         * cfgrtl.c (rtl_verify_edges): Remove usage of TDF_RTL.
24683         * dumpfile.c (dump_register): Use new enum dump_kind.
24684         (get_dump_file_name): Likewise.
24685         (dump_enable_all): Likewise.
24686         (dump_switch_p_1): Likewise.
24687         (enable_rtl_dump_file): Remove usage of TDF_RTL.
24688         * dumpfile.h (enum dump_kind): New enum type.
24689         (struct dump_file_info): Create constructor and
24690         format fields and comments.
24691         * passes.c (pass_manager::register_one_dump_file):
24692         Use num dump_kind.
24693         * statistics.c (statistics_early_init): Likewise.
24694         * tree-ssa-loop-prefetch.c (dump_mem_details): Replace
24695         TDF_TREE with TDF_SLIM.
24696         (gather_memory_references_ref): Likewise.
24698 2017-05-18  Martin Liska  <mliska@suse.cz>
24700         * vec.h (struct vnull): Use it.
24702 2017-05-18  Jan Hubicka  <hubicka@ucw.cz>
24704         * ipa-inline-analysis.c (predicate_conditions): Move to ipa-inline.h
24705         (true_predicate, false_predicate, true_predicate_p,
24706         false_predicate_p): Remove.
24707         (single_cond_predicate, not_inlined_predicate): Turn to member function
24708         in ipa-inline.h
24709         (add_condition): Update.
24710         (add_clause): Turn to...
24711         (predicate::add_clause): ... this one; update; allow passing NULL
24712         as parameter.
24713         (and_predicates): Turn to ...
24714         (predicate::operator &=): ... this one.
24715         (predicates_equal_p): Move to predicate::operator == in ipa-inline.h
24716         (or_predicates): Turn to ...
24717         (predicate::or_with): ... this one.
24718         (evaluate_predicate): Turn to ...
24719         (predicate::evaluate): ... this one.
24720         (predicate_probability): Turn to ...
24721         (predicate::probability): ... this one.
24722         (dump_condition): Update.
24723         (dump_predicate): Turn to ...
24724         (predicate::dump): ... this one.
24725         (account_size_time): Update.
24726         (edge_set_predicate): Update.
24727         (set_hint_predicate): UPdate.
24728         (evaluate_conditions_for_known_args): Update.
24729         (evaluate_properties_for_edge): Update.
24730         (remap_predicate_after_duplication): Turn to...
24731         (predicate::remap_after_duplication): ... this one.
24732         (remap_hint_predicate_after_duplication): Update.
24733         (inline_summary_t::duplicate): UPdate.
24734         (dump_inline_edge_summary): Update.
24735         (dump_inline_summary): Update.
24736         (set_cond_stmt_execution_predicate): Update.
24737         (set_switch_stmt_execution_predicate): Update.
24738         (compute_bb_predicates): Update.
24739         (will_be_nonconstant_expr_predicate): Update.
24740         (will_be_nonconstant_predicate): Update.
24741         (phi_result_unknown_predicate): Update.
24742         (predicate_for_phi_result): Update.
24743         (array_index_predicate): Update.
24744         (estimate_function_body_sizes): Update.
24745         (estimate_node_size_and_time): Update.
24746         (estimate_ipcp_clone_size_and_time): Update.
24747         (remap_predicate): Rename to ...
24748         (predicate::remap_after_inlining): ... this one.
24749         (remap_hint_predicate): Update.
24750         (inline_merge_summary): Update.
24751         (inline_update_overall_summary): Update.
24752         (estimate_size_after_inlining): Update.
24753         (read_predicate): Rename to ...
24754         (predicate::stream_in): ... this one.
24755         (read_inline_edge_summary): Update.
24756         (write_predicate): Rename to ...
24757         (predicate::stream_out): ... this one.
24758         (write_inline_edge_summary): Update.
24759         * ipa-inline.h (MAX_CLAUSES): Turn to predicate::max_clauses.
24760         (clause_t): Turn to uint32_t
24761         (predicate): Turn to class; implement constructor and operators
24762         ==, !=, &
24763         (size_time_entry): Update.
24764         (inline_summary): Update.
24765         (inline_edge_summary): Update.
24767 2017-05-18  Marc Glisse  <marc.glisse@inria.fr>
24769         * fold-const.c (fold_binary_loc): Move transformation...
24770         * match.pd (C - X CMP X): ... here.
24772 2017-05-18  Sheldon Lobo  <sheldon.lobo@oracle.com>
24774         * config/sparc/sparc.c (sparc_option_override): Set function
24775         alignment for -mcpu=niagara7 to 64 to match the I$ line.
24776         * config/sparc/sparc.h (BRANCH_COST): Set the SPARC M7 branch
24777         latency to 1.
24778         * config/sparc/sparc.h (BRANCH_COST): Set the SPARC T4 branch
24779         latency to 2.
24780         * config/sparc/sol2.h: Fix a ASM_CPU32_DEFAULT_SPEC typo.
24782 2017-05-18  Marek Polacek  <polacek@redhat.com>
24784         PR sanitizer/80797
24785         * ubsan.c (instrument_null): Unwrap ADDR_EXPRs.
24786         (pass_ubsan::execute): Call gimple_assign_single_p instead of
24787         gimple_assign_load_p.
24789 2017-05-17  Segher Boessenkool  <segher@kernel.crashing.org>
24791         PR middle-end/80692
24792         * real.c (do_compare): Give decimal_do_compare preference over
24793         comparing just the signs.
24795 2017-05-17  Uros Bizjak  <ubizjak@gmail.com>
24797         * doc/md.texi (Canonicalization of Instructions): Describe the
24798         canonical form of instructions that inherently set a condition
24799         code register.
24801 2017-05-17  Peter Bergner  <bergner@vnet.ibm.com>
24803         PR middle-end/80775
24804         * tree-cfg.c: Move deletion of unreachable case statements to after
24805         the merging of consecutive case labels.
24807 2017-05-17  Thomas Preud'homme  <thomas.preudhomme@arm.com>
24809         * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Refer
24810         readers to __gnu_cmse_nonsecure_call libcall for saving, clearing and
24811         restoring of callee-saved registers.
24813 2017-05-17  Eric Botcazou  <ebotcazou@adacore.com>
24815         * compare-elim.c (equivalent_reg_at_start): Adjust outdated comment.
24816         * config/visium/visium.c (single_set_and_flags): Likewise.
24817         * config/visium/visium.md (Substitutions): Likewise.
24819 2017-05-17  Martin Liska  <mliska@suse.cz>
24821         * cfg.c: Introduce dump_flags_t type and
24822         use it instead of int type.
24823         * cfg.h: Likewise.
24824         * cfghooks.c: Likewise.
24825         * cfghooks.h (struct cfg_hooks): Likewise.
24826         * cfgrtl.c: Likewise.
24827         * cfgrtl.h: Likewise.
24828         * cgraph.c (cgraph_node::get_body): Likewise.
24829         * coretypes.h: Likewise.
24830         * domwalk.c: Likewise.
24831         * domwalk.h: Likewise.
24832         * dumpfile.c (struct dump_option_value_info): Likewise.
24833         (dump_enable_all): Likewise.
24834         (dump_switch_p_1): Likewise.
24835         (opt_info_switch_p): Likewise.
24836         * dumpfile.h (enum tree_dump_index): Likewise.
24837         (struct dump_file_info): Likewise.
24838         * genemit.c: Likewise.
24839         * generic-match-head.c: Likewise.
24840         * gengtype.c (open_base_files): Likewise.
24841         * gimple-pretty-print.c: Likewise.
24842         * gimple-pretty-print.h: Likewise.
24843         * graph.c (print_graph_cfg): Likewise.
24844         * graphite-scop-detection.c (dot_all_sese): Likewise.
24845         * ipa-devirt.c (build_type_inheritance_graph): Likewise.
24846         * loop-unroll.c (report_unroll): Likewise.
24847         * passes.c (pass_manager::register_one_dump_file): Likewise.
24848         * print-tree.c: Likewise.
24849         * statistics.c: Likewise.
24850         * tree-cfg.c: Likewise.
24851         * tree-cfg.h: Likewise.
24852         * tree-dfa.c: Likewise.
24853         * tree-dfa.h: Likewise.
24854         * tree-dump.c (dump_function): Likewise.
24855         * tree-dump.h (struct dump_info): Likewise.
24856         * tree-pretty-print.c: Likewise.
24857         * tree-pretty-print.h: Likewise.
24858         * tree-ssa-live.c: Likewise.
24859         * tree-ssa-live.h: Likewise.
24860         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Likewise.
24861         * tree-vect-loop.c: Likewise.
24862         * tree-vect-slp.c: Likewise.
24864 2017-05-16  James Greenhalgh  <james.greenhalgh@arm.com>
24865             Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24867         PR tree-optimization/80457
24868         * tree-vect-stmts.c (vect_model_simple_cost): Model the cost
24869         of all arguments to a statement as scalar_to_vec operations.
24870         (vectorizable_call): Adjust call to vect_model_simple_cost for
24871         new parameter.
24872         (vectorizable_conversion): Likewise.
24873         (vectorizable_assignment): Likewise.
24874         (vectorizable_shift): Likewise.
24875         (vectorizable_operation): Likewise.
24876         (vectorizable_comparison): Likewise.
24877         (vect_is_simple_cond): Record the def types for operands.
24878         (vectorizable_condition): Likewise, call vect_model_simple_cost.
24879         * tree-vectorizer.h (vect_model_simple_cost): Add new parameter
24880         for statement argument count.
24882 2017-05-16  Carl Love  <cel@us.ibm.com>
24884         * config/rs6000/rs6000-c: Add support for built-in functions
24885         vector unsigned long long vec_bperm (vector unsigned long long,
24886                                              vector unsigned char)
24887         vector signed long long vec_mule (vector signed int,
24888                                           vector signed int)
24889         vector unsigned long long vec_mule (vector unsigned int,
24890                                             vector unsigned int)
24891         vector signed long long vec_mulo (vector signed int,
24892                                           vector signed int)
24893         vector unsigned long long vec_mulo (vector unsigned int,
24894                                             vector unsigned int)
24895         vector signed char vec_sldw (vector signed char,
24896                                      vector signed char,
24897                                      const int)
24898         vector unsigned char vec_sldw (vector unsigned char,
24899                                        vector unsigned char,
24900                                        const int)
24901         vector signed short vec_sldw (vector signed short,
24902                                       vector signed short,
24903                                       const int)
24904         vector unsigned short vec_sldw (vector unsigned short,
24905                                         vector unsigned short,
24906                                         const int)
24907         vector signed int vec_sldw (vector signed int,
24908                                     vector signed int,
24909                                     const int)
24910         vector unsigned int vec_sldw (vector unsigned int,
24911                                       vector unsigned int,
24912                                       const int)
24913         vector signed long long vec_sldw (vector signed long long,
24914                                           vector signed long long,
24915                                           const int)
24916         vector unsigned long long vec_sldw (vector unsigned long long,
24917                                             vector unsigned long long,
24918                                             const int)
24919         * config/rs6000/rs6000-c: Add support for built-in functions
24920         * config/rs6000/rs6000-builtin.def: Add definition for SLDW.
24921         * config/rs6000/altivec.h: Add defintion for vec_sldw.
24922         * doc/extend.texi: Update the built-in documentation for the
24923         new built-in functions.
24925 2017-05-16  Marek Polacek  <polacek@redhat.com>
24927         PR sanitizer/80536
24928         PR sanitizer/80386
24929         * tree.c (save_expr): Don't fold the expression.
24931 2017-05-16  Uros Bizjak  <ubizjak@gmail.com>
24933         * config/i386/i386.md (*movsi_internal): Split (?rm,*y) alternative
24934         to (?r,*Yn) and (?m,*y) alternatives, and (?*y,rm) to (?*Ym,r)
24935         and (?*y,m).  Update insn attributes.
24937 2017-05-16  Martin Liska  <mliska@suse.cz>
24939         * cgraph.c (cgraph_edge::resolve_speculation): Add default value for
24940         flags argument of print_gimple_stmt, print_gimple_expr,
24941         print_generic_stmt and print_generic_expr.
24942         * cgraphclones.c (symbol_table::materialize_all_clones): Likewise.
24943         * coretypes.h: Likewise.
24944         * except.c (dump_eh_tree): Likewise.
24945         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
24946         * gimple-pretty-print.h: Likewise.
24947         * gimple-ssa-backprop.c (dump_usage_prefix): Likewise.
24948         (backprop::push_to_worklist): Likewise.
24949         (backprop::pop_from_worklist): Likewise.
24950         (backprop::process_use): Likewise.
24951         (backprop::intersect_uses): Likewise.
24952         (note_replacement): Likewise.
24953         * gimple-ssa-store-merging.c
24954         (pass_store_merging::terminate_all_aliasing_chains): Likewise.
24955         (imm_store_chain_info::coalesce_immediate_stores): Likewise.
24956         (pass_store_merging::execute): Likewise.
24957         * gimple-ssa-strength-reduction.c (dump_candidate): Likewise.
24958         (ssa_base_cand_dump_callback): Likewise.
24959         (dump_incr_vec): Likewise.
24960         (replace_refs): Likewise.
24961         (replace_mult_candidate): Likewise.
24962         (create_add_on_incoming_edge): Likewise.
24963         (create_phi_basis): Likewise.
24964         (insert_initializers): Likewise.
24965         (all_phi_incrs_profitable): Likewise.
24966         (introduce_cast_before_cand): Likewise.
24967         (replace_one_candidate): Likewise.
24968         * gimplify.c (gimplify_expr): Likewise.
24969         * graphite-isl-ast-to-gimple.c (is_valid_rename): Likewise.
24970         (set_rename): Likewise.
24971         (rename_uses): Likewise.
24972         (copy_loop_phi_nodes): Likewise.
24973         (add_close_phis_to_merge_points): Likewise.
24974         (copy_loop_close_phi_args): Likewise.
24975         (copy_cond_phi_args): Likewise.
24976         (graphite_copy_stmts_from_block): Likewise.
24977         (translate_pending_phi_nodes): Likewise.
24978         * graphite-poly.c (print_pdr): Likewise.
24979         (dump_gbb_cases): Likewise.
24980         (dump_gbb_conditions): Likewise.
24981         (print_scop_params): Likewise.
24982         * graphite-scop-detection.c (build_cross_bb_scalars_def): Likewise.
24983         (build_cross_bb_scalars_use): Likewise.
24984         (gather_bbs::before_dom_children): Likewise.
24985         * hsa-dump.c (dump_hsa_immed): Likewise.
24986         * ipa-cp.c (print_ipcp_constant_value): Likewise.
24987         (get_replacement_map): Likewise.
24988         * ipa-inline-analysis.c (dump_condition): Likewise.
24989         (estimate_function_body_sizes): Likewise.
24990         * ipa-polymorphic-call.c (check_stmt_for_type_change): Likewise.
24991         (ipa_polymorphic_call_context::get_dynamic_type): Likewise.
24992         * ipa-prop.c (ipa_dump_param): Likewise.
24993         (ipa_print_node_jump_functions_for_edge): Likewise.
24994         (ipa_modify_call_arguments): Likewise.
24995         (ipa_modify_expr): Likewise.
24996         (ipa_dump_param_adjustments): Likewise.
24997         (ipa_dump_agg_replacement_values): Likewise.
24998         (ipcp_modif_dom_walker::before_dom_children): Likewise.
24999         * ipa-pure-const.c (check_stmt): Likewise.
25000         (pass_nothrow::execute): Likewise.
25001         * ipa-split.c (execute_split_functions): Likewise.
25002         * omp-offload.c (dump_oacc_loop_part): Likewise.
25003         (dump_oacc_loop): Likewise.
25004         * trans-mem.c (tm_log_emit): Likewise.
25005         (tm_memopt_accumulate_memops): Likewise.
25006         (dump_tm_memopt_set): Likewise.
25007         (dump_tm_memopt_transform): Likewise.
25008         * tree-cfg.c (gimple_verify_flow_info): Likewise.
25009         (print_loop): Likewise.
25010         * tree-chkp-opt.c (chkp_print_addr): Likewise.
25011         (chkp_gather_checks_info): Likewise.
25012         (chkp_get_check_result): Likewise.
25013         (chkp_remove_check_if_pass): Likewise.
25014         (chkp_use_outer_bounds_if_possible): Likewise.
25015         (chkp_reduce_bounds_lifetime): Likewise.
25016         * tree-chkp.c (chkp_register_addr_bounds): Likewise.
25017         (chkp_mark_completed_bounds): Likewise.
25018         (chkp_register_incomplete_bounds): Likewise.
25019         (chkp_mark_invalid_bounds): Likewise.
25020         (chkp_maybe_copy_and_register_bounds): Likewise.
25021         (chkp_build_returned_bound): Likewise.
25022         (chkp_get_bound_for_parm): Likewise.
25023         (chkp_build_bndldx): Likewise.
25024         (chkp_get_bounds_by_definition): Likewise.
25025         (chkp_generate_extern_var_bounds): Likewise.
25026         (chkp_get_bounds_for_decl_addr): Likewise.
25027         * tree-chrec.c (chrec_apply): Likewise.
25028         * tree-data-ref.c (dump_data_reference): Likewise.
25029         (dump_subscript): Likewise.
25030         (dump_data_dependence_relation): Likewise.
25031         (analyze_overlapping_iterations): Likewise.
25032         * tree-inline.c (expand_call_inline): Likewise.
25033         (tree_function_versioning): Likewise.
25034         * tree-into-ssa.c (dump_defs_stack): Likewise.
25035         (dump_currdefs): Likewise.
25036         (dump_names_replaced_by): Likewise.
25037         (dump_update_ssa): Likewise.
25038         (update_ssa): Likewise.
25039         * tree-object-size.c (pass_object_sizes::execute): Likewise.
25040         * tree-parloops.c (build_new_reduction): Likewise.
25041         (try_create_reduction_list): Likewise.
25042         (ref_conflicts_with_region): Likewise.
25043         (oacc_entry_exit_ok_1): Likewise.
25044         (oacc_entry_exit_single_gang): Likewise.
25045         * tree-pretty-print.h: Likewise.
25046         * tree-scalar-evolution.c (set_scalar_evolution): Likewise.
25047         (get_scalar_evolution): Likewise.
25048         (add_to_evolution): Likewise.
25049         (get_loop_exit_condition): Likewise.
25050         (analyze_evolution_in_loop): Likewise.
25051         (analyze_initial_condition): Likewise.
25052         (analyze_scalar_evolution): Likewise.
25053         (instantiate_scev): Likewise.
25054         (number_of_latch_executions): Likewise.
25055         (gather_chrec_stats): Likewise.
25056         (final_value_replacement_loop): Likewise.
25057         (scev_const_prop): Likewise.
25058         * tree-sra.c (dump_access): Likewise.
25059         (disqualify_candidate): Likewise.
25060         (create_access): Likewise.
25061         (reject): Likewise.
25062         (maybe_add_sra_candidate): Likewise.
25063         (create_access_replacement): Likewise.
25064         (analyze_access_subtree): Likewise.
25065         (analyze_all_variable_accesses): Likewise.
25066         (sra_modify_assign): Likewise.
25067         (initialize_constant_pool_replacements): Likewise.
25068         (find_param_candidates): Likewise.
25069         (decide_one_param_reduction): Likewise.
25070         (replace_removed_params_ssa_names): Likewise.
25071         * tree-ssa-ccp.c (ccp_fold_stmt): Likewise.
25072         * tree-ssa-copy.c (dump_copy_of): Likewise.
25073         (copy_prop_visit_cond_stmt): Likewise.
25074         * tree-ssa-dce.c (mark_operand_necessary): Likewise.
25075         * tree-ssa-dom.c (pass_dominator::execute): Likewise.
25076         (record_equivalences_from_stmt): Likewise.
25077         * tree-ssa-dse.c (compute_trims): Likewise.
25078         (delete_dead_call): Likewise.
25079         (delete_dead_assignment): Likewise.
25080         * tree-ssa-forwprop.c (forward_propagate_into_gimple_cond): Likewise.
25081         (forward_propagate_into_cond): Likewise.
25082         (pass_forwprop::execute): Likewise.
25083         * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
25084         * tree-ssa-loop-im.c (invariantness_dom_walker::before_dom_children):
25085         Likewise.
25086         (move_computations_worker): Likewise.
25087         (execute_sm): Likewise.
25088         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Likewise.
25089         (remove_exits_and_undefined_stmts): Likewise.
25090         (remove_redundant_iv_tests): Likewise.
25091         * tree-ssa-loop-ivopts.c (dump_use): Likewise.
25092         (adjust_iv_update_pos): Likewise.
25093         * tree-ssa-math-opts.c (bswap_replace): Likewise.
25094         * tree-ssa-phiopt.c (factor_out_conditional_conversion): Likewise.
25095         (value_replacement): Likewise.
25096         * tree-ssa-phiprop.c (phiprop_insert_phi): Likewise.
25097         * tree-ssa-pre.c (print_pre_expr): Likewise.
25098         (get_representative_for): Likewise.
25099         (create_expression_by_pieces): Likewise.
25100         (insert_into_preds_of_block): Likewise.
25101         (eliminate_insert): Likewise.
25102         (eliminate_dom_walker::before_dom_children): Likewise.
25103         (eliminate): Likewise.
25104         (remove_dead_inserted_code): Likewise.
25105         * tree-ssa-propagate.c (substitute_and_fold): Likewise.
25106         * tree-ssa-reassoc.c (get_rank): Likewise.
25107         (eliminate_duplicate_pair): Likewise.
25108         (eliminate_plus_minus_pair): Likewise.
25109         (eliminate_not_pairs): Likewise.
25110         (undistribute_ops_list): Likewise.
25111         (eliminate_redundant_comparison): Likewise.
25112         (update_range_test): Likewise.
25113         (optimize_range_tests_var_bound): Likewise.
25114         (optimize_vec_cond_expr): Likewise.
25115         (rewrite_expr_tree): Likewise.
25116         (rewrite_expr_tree_parallel): Likewise.
25117         (linearize_expr): Likewise.
25118         (break_up_subtract): Likewise.
25119         (linearize_expr_tree): Likewise.
25120         (attempt_builtin_powi): Likewise.
25121         (attempt_builtin_copysign): Likewise.
25122         (transform_stmt_to_copy): Likewise.
25123         (transform_stmt_to_multiply): Likewise.
25124         (dump_ops_vector): Likewise.
25125         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Likewise.
25126         (print_scc): Likewise.
25127         (set_ssa_val_to): Likewise.
25128         (visit_reference_op_store): Likewise.
25129         (visit_use): Likewise.
25130         (sccvn_dom_walker::before_dom_children): Likewise.
25131         (run_scc_vn): Likewise.
25132         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
25133         Likewise.
25134         (expr_hash_elt::print): Likewise.
25135         (const_and_copies::pop_to_marker): Likewise.
25136         (const_and_copies::record_const_or_copy_raw): Likewise.
25137         * tree-ssa-structalias.c (compute_dependence_clique): Likewise.
25138         * tree-ssa-uninit.c (collect_phi_def_edges): Likewise.
25139         (dump_predicates): Likewise.
25140         (find_uninit_use): Likewise.
25141         (warn_uninitialized_phi): Likewise.
25142         (pass_late_warn_uninitialized::execute): Likewise.
25143         * tree-ssa.c (verify_vssa): Likewise.
25144         (verify_ssa): Likewise.
25145         (maybe_optimize_var): Likewise.
25146         * tree-vrp.c (dump_value_range): Likewise.
25147         (dump_all_value_ranges): Likewise.
25148         (dump_asserts_for): Likewise.
25149         (register_edge_assert_for_2): Likewise.
25150         (vrp_visit_cond_stmt): Likewise.
25151         (vrp_visit_switch_stmt): Likewise.
25152         (vrp_visit_stmt): Likewise.
25153         (vrp_visit_phi_node): Likewise.
25154         (simplify_cond_using_ranges_1): Likewise.
25155         (fold_predicate_in): Likewise.
25156         (evrp_dom_walker::before_dom_children): Likewise.
25157         (evrp_dom_walker::push_value_range): Likewise.
25158         (evrp_dom_walker::pop_value_range): Likewise.
25159         (execute_early_vrp): Likewise.
25161 2017-05-16  Richard Biener  <rguenther@suse.de>
25163         * dwarf2out.c (loc_list_from_tree_1): Do not create
25164         DW_OP_GNU_variable_value for DECL_IGNORED_P decls.
25166 2017-05-16  Richard Biener  <rguenther@suse.de>
25168         * dwarf2out.c (resolve_variable_value_in_expr): Lookup DIE
25169         just generated.
25170         (note_variable_value_in_expr): If we resolved the decl ref
25171         do not push to the stack.
25173 2017-05-16  Matthew Wahab  <matthew.wahab@arm.com>
25175         * config/arm/arm_neon.h (vadd_f16): Use standard arithmetic
25176         operations in fast-math mode.
25177         (vaddq_f16): Likewise.
25178         (vmul_f16): Likewise.
25179         (vmulq_f16): Likewise.
25180         (vsub_f16): Likewise.
25181         (vsubq_f16): Likewise.
25182         * config/arm/neon.md (add<mode>3): New.
25183         (sub<mode>3): New.
25184         (fma:<VH:mode>3): New.  Also remove outdated comment.
25185         (mul<mode>3): New.
25187 2017-05-16  Martin Liska  <mliska@suse.cz>
25189         PR ipa/79849.
25190         PR ipa/79850.
25191         * ipa-devirt.c (warn_types_mismatch): Fix typo.
25192         (odr_types_equivalent_p): Likewise.
25194 2017-05-15  Sylvestre Ledru  <sylvestre@debian.org>
25196         * plugin.c (try_init_one_plugin): Fix ressource leaks (CID 726637).
25198 2017-05-15  Uros Bizjak  <ubizjak@gmail.com>
25200         PR target/80425
25201         * config/i386.i386.md (*zero_extendsidi2): Do not penalize
25202         non-interunit SSE move alternatives with '?'.
25203         (zero-extendsidi peephole2): New peephole to skip intermediate
25204         general register in SSE zero-extend sequence.
25206 2017-05-15  Jeff Law  <law@redhat.com>
25208         * reorg.c (relax_delay_slots): Create a new variable to hold
25209         the temporary target rather than clobbering TARGET_LABEL.
25211         * config/tilegx/tilegx.c (tilegx_expand_unaligned_load): Add
25212         missing argument to extract_bit_field call.
25213         * config/tilepro/tilepro.c (tilepro_expand_unaligned_load): Likewise.
25215 2017-05-15  Martin Liska  <mliska@suse.cz>
25217         PR driver/31468
25218         * gcc.c (process_command): Do not allow empty argument of -o option.
25220 2017-05-15  Renlin Li  <renlin.li@arm.com>
25222         * config/aarch64/aarch64-protos.h (aarch64_expand_call): Declare.
25223         * config/aarch64/aarch64.c (aarch64_expand_call): Define.
25224         * config/aarch64/constraints.md (Usf): Add long call check.
25225         * config/aarch64/aarch64.md (call): Use aarch64_expand_call.
25226         (call_value): Likewise.
25227         (sibcall): Likewise.
25228         (sibcall_value): Likewise.
25229         (call_insn): New.
25230         (call_value_insn): New.
25231         (sibcall_insn): Update rtx pattern.
25232         (sibcall_value_insn): Likewise.
25233         (call_internal): Remove.
25234         (call_value_internal): Likewise.
25235         (sibcall_internal): Likewise.
25236         (sibcall_value_internal): Likewise.
25237         (call_reg): Likewise.
25238         (call_symbol): Likewise.
25239         (call_value_reg): Likewise.
25240         (call_value_symbol): Likewise.
25242 2017-05-14  Krister Walfridsson  <krister.walfridsson@gmail.com>
25244         PR target/80600
25245         * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always add -lgcc.
25247 2017-05-14  Uros Bizjak  <ubizjak@gmail.com>
25249         * config/i386.i386.c (ix86_cc_modes_compatible): CCNOmode is
25250         compatible with CCGOCmode and with CCZmode.
25252 2017-05-14  Martin Sebor  <msebor@redhat.com>
25254         PR middle-end/77671
25255         * gimple-fold.c (gimple_fold_builtin_sprintf): Make extern.
25256         (gimple_fold_builtin_snprintf): Same.
25257         * gimple-fold.h (gimple_fold_builtin_sprintf): Declare.
25258         (gimple_fold_builtin_snprintf): Same.
25259         * gimple-ssa-sprintf.c (get_format_string): Correct the detection
25260         of character types.
25261         (is_call_safe): New function.
25262         (try_substitute_return_value): Call it.
25263         (try_simplify_call): New function.
25264         (pass_sprintf_length::handle_gimple_call): Call it.
25266 2017-05-14  Martin Sebor  <msebor@redhat.com>
25268         PR middle-end/80669
25269         * builtins.c (expand_builtin_stpncpy): Simplify.
25271 2017-05-14  Daniel Santos  <daniel.santos@pobox.com>
25273         * config/i386/i386.opt: Add option -mcall-ms2sysv-xlogues.
25274         * config/i386/i386.h
25275         (x86_64_ms_sysv_extra_clobbered_registers): Change type to unsigned.
25276         (NUM_X86_64_MS_CLOBBERED_REGS): New macro.
25277         (struct machine_function): Add new members call_ms2sysv,
25278         call_ms2sysv_pad_in, call_ms2sysv_pad_out and call_ms2sysv_extra_regs.
25279         (struct machine_frame_state): New fields sp_realigned and
25280         sp_realigned_offset.
25281         * config/i386/i386.c
25282         (enum xlogue_stub): New enum.
25283         (enum xlogue_stub_sets): New enum.
25284         (class xlogue_layout): New class.
25285         (struct ix86_frame): New fields stack_realign_allocate_offset,
25286         stack_realign_offset and outlined_save_offset.  Modify comments to
25287         detail stack layout when using out-of-line stubs.
25288         (ix86_target_string): Add -mcall-ms2sysv-xlogues option.
25289         (ix86_option_override_internal): Add sorry() for TARGET_SEH and
25290         -mcall-ms2sysv-xlogues.
25291         (stub_managed_regs): New static variable.
25292         (ix86_save_reg): Add new parameter ignore_outlined to optionally omit
25293         registers managed by out-of-line stub.
25294         (disable_call_ms2sysv_xlogues): New function.
25295         (ix86_compute_frame_layout): Modify re-alignment calculations, disable
25296         m->call_ms2sysv when appropriate and compute frame layout for
25297         out-of-line stubs.
25298         (sp_valid_at, fp_valid_at): New inline functions.
25299         (choose_basereg): New function.
25300         (choose_baseaddr): Add align parameter, use choose_basereg and modify
25301         all callers.
25302         (ix86_emit_save_reg_using_mov, ix86_emit_restore_sse_regs_using_mov):
25303         Use align parameter of choose_baseaddr to generated aligned SSE movs
25304         when possible.
25305         (pro_epilogue_adjust_stack): Modify to track
25306         machine_frame_state::sp_realigned.
25307         (ix86_nsaved_regs): Modify to accommodate changes to ix86_save_reg.
25308         (ix86_nsaved_sseregs): Likewise.
25309         (ix86_emit_save_regs): Likewise.
25310         (ix86_emit_save_regs_using_mov): Likewise.
25311         (ix86_emit_save_sse_regs_using_mov): Likewise.
25312         (get_scratch_register_on_entry): Likewise.
25313         (gen_frame_set): New function.
25314         (gen_frame_load): Likewise.
25315         (gen_frame_store): Likewise.
25316         (emit_outlined_ms2sysv_save): Likewise.
25317         (emit_outlined_ms2sysv_restore): Likewise.
25318         (ix86_expand_prologue): Modify stack re-alignment code and call
25319         emit_outlined_ms2sysv_save when appropriate.
25320         (ix86_emit_leave): Clear machine_frame_state::sp_realigned.  Add
25321         parameter rtx_insn *insn, which allows the function to be used to only
25322         generate the notes.
25323         (ix86_expand_epilogue): Modify validity checks of frame and stack
25324         pointers, and call emit_outlined_ms2sysv_restore when appropriate.
25325         (ix86_expand_call): Modify to enable m->call_ms2sysv when appropriate.
25326         * config/i386/predicates.md
25327         (save_multiple): New predicate.
25328         (restore_multiple): Likewise.
25329         * config/i386/sse.md
25330         (save_multiple<mode>): New pattern.
25331         (save_multiple_realign<mode>): Likewise.
25332         (restore_multiple<mode>): Likewise.
25333         (restore_multiple_and_return<mode>): Likewise.
25334         (restore_multiple_leave_return<mode>): Likewise.
25335         * Makefile.in: Export HOSTCXX and HOSTCXXFLAGS to site.exp
25337 2017-05-14  Julia Koval  <julia.koval@intel.com>
25339         * config/i386/i386-builtin-types.def (VOID_FTYPE_INT_INT64): New type.
25340         * config/i386/i386-builtin.def (__builtin_ia32_xgetbv)
25341         (__builtin_ia32_xsetbv): New builtins.
25342         * config/i386/i386.c (ix86_expand_special_args_builtin):
25343         Process new types.
25344         (ix86_expand_builtin): Special expand for new intrinsics.
25345         * config/i386/i386.md (UNSPECV_XGETBV, UNSPECV_XSETBV): New.
25346         (xsetbv, xsetbv_rex64, xgetbv, xgetbv_rex64): New insn patterns.
25347         * config/i386/xsaveintrin.h (_xsetbv, _getbv): New intrinsics.
25349 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
25351         * cfganal.c (inverted_post_order_compute): Change argument type
25352         to vec *.
25353         * cfganal.h (inverted_post_order_compute): Adjust prototype.
25354         * df-core.c (rest_of_handle_df_initialize): Adjust.
25355         (rest_of_handle_df_finish): Likewise.
25356         (df_analyze_1): Likewise.
25357         (df_analyze): Likewise.
25358         (loop_inverted_post_order_compute): Change argument to be a vec *.
25359         (df_analyze_loop): Adjust.
25360         (df_get_n_blocks): Likewise.
25361         (df_get_postorder): Likewise.
25362         * df.h (struct df_d): Change field to be a vec.
25363         * lcm.c (compute_laterin): Adjust.
25364         (compute_available): Likewise.
25365         * lra-lives.c (lra_create_live_ranges_1): Likewise.
25366         * tree-ssa-dce.c (remove_dead_stmt): Likewise.
25367         * tree-ssa-pre.c (compute_antic): Likewise.
25369 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
25371         * cfganal.c (connect_infinite_loops_to_exit): Adjust.
25372         (depth_first_search::depth_first_search): Change structure init
25373         function to this constructor.
25374         (depth_first_search::add_bb): Rename function to this member.
25375         (depth_first_search::execute): Likewise.
25376         (flow_dfs_compute_reverse_finish): Adjust.
25378 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
25380         * ddg.c (find_nodes_on_paths): Use auto_sbitmap.
25381         (longest_simple_path): Likewise.
25382         * shrink-wrap.c (spread_components): Likewise.
25383         (disqualify_problematic_components): Likewise.
25384         (emit_common_heads_for_components): Likewise.
25385         (emit_common_tails_for_components): Likewise.
25386         (insert_prologue_epilogue_for_components): Likewise.
25388 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
25390         * tree-ssa-dse.c (dse_dom_walker): Make m_live_byes a
25391         auto_sbitmap.
25393 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
25395         * df-core.c (df_set_blocks): Start using auto_bitmap.
25396         (df_compact_blocks): Likewise.
25397         * df-problems.c (df_rd_confluence_n): Likewise.
25398         * df-scan.c (df_insn_rescan_all): Likewise.
25399         (df_process_deferred_rescans): Likewise.
25400         (df_update_entry_block_defs): Likewise.
25401         (df_update_exit_block_uses): Likewise.
25402         (df_entry_block_bitmap_verify): Likewise.
25403         (df_exit_block_bitmap_verify): Likewise.
25404         (df_scan_verify): Likewise.
25405         * lra-constraints.c (lra_constraints): Likewise.
25406         (undo_optional_reloads): Likewise.
25407         (lra_undo_inheritance): Likewise.
25408         * lra-remat.c (calculate_gen_cands): Likewise.
25409         (do_remat): Likewise.
25410         * lra-spills.c (assign_spill_hard_regs): Likewise.
25411         (spill_pseudos): Likewise.
25412         * tree-ssa-pre.c (bitmap_set_and): Likewise.
25413         (bitmap_set_subtract_values): Likewise.
25415 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
25417         * haifa-sched.c (estimate_shadow_tick): Replace manual bitmap
25418         management with auto_bitmap.
25419         (fix_inter_tick): Likewise.
25420         (fix_recovery_deps): Likewise.
25421         * ira.c (add_store_equivs): Likewise.
25422         (find_moveable_pseudos): Likewise.
25423         (split_live_ranges_for_shrink_wrap): Likewise.
25424         * print-rtl.c (rtx_reuse_manager::rtx_reuse_manager): Likewise.
25425         (rtx_reuse_manager::seen_def_p): Likewise.
25426         (rtx_reuse_manager::set_seen_def): Likewise.
25427         * print-rtl.h (class rtx_reuse_manager): Likewise.
25429 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
25431         * bt-load.c (combine_btr_defs): Use auto_bitmap to manage bitmap
25432         lifetime.
25433         (migrate_btr_def): Likewise.
25434         * cfgloop.c (get_loop_body_in_bfs_order): Likewise.
25435         * df-core.c (loop_post_order_compute): Likewise.
25436         (loop_inverted_post_order_compute): Likewise.
25437         * hsa-common.h: Likewise.
25438         * hsa-gen.c (hsa_bb::~hsa_bb): Likewise.
25439         * init-regs.c (initialize_uninitialized_regs): Likewise.
25440         * ipa-inline.c (resolve_noninline_speculation): Likewise.
25441         (inline_small_functions): Likewise.
25442         * ipa-reference.c (ipa_reference_write_optimization_summary): Likewise.
25443         * ira.c (combine_and_move_insns): Likewise.
25444         (build_insn_chain): Likewise.
25445         * loop-invariant.c (find_invariants): Likewise.
25446         * lower-subreg.c (propagate_pseudo_copies): Likewise.
25447         * predict.c (tree_predict_by_opcode): Likewise.
25448         (predict_paths_leading_to): Likewise.
25449         (predict_paths_leading_to_edge): Likewise.
25450         (estimate_loops_at_level): Likewise.
25451         (estimate_loops): Likewise.
25452         * shrink-wrap.c (try_shrink_wrapping): Likewise.
25453         (spread_components): Likewise.
25454         * tree-cfg.c (remove_edge_and_dominated_blocks): Likewise.
25455         * tree-loop-distribution.c (rdg_build_partitions): Likewise.
25456         * tree-predcom.c (tree_predictive_commoning_loop): Likewise.
25457         * tree-ssa-coalesce.c (coalesce_ssa_name): Likewise.
25458         * tree-ssa-phionlycprop.c (pass_phi_only_cprop::execute): Likewise.
25459         * tree-ssa-pre.c (remove_dead_inserted_code): Likewise.
25460         * tree-ssa-sink.c (nearest_common_dominator_of_uses): Likewise.
25461         * tree-ssa-threadupdate.c (compute_path_counts): Likewise.
25462         (mark_threaded_blocks): Likewise.
25463         (thread_through_all_blocks): Likewise.
25464         * tree-ssa.c (verify_ssa): Likewise.
25465         (execute_update_addresses_taken): Likewise.
25466         * tree-ssanames.c (verify_ssaname_freelists): Likewise.
25468 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
25470         * cfganal.c (mark_dfs_back_edges): Replace manual stack with
25471         auto_vec.
25472         (post_order_compute): Likewise.
25473         (inverted_post_order_compute): Likewise.
25474         (pre_and_rev_post_order_compute_fn): Likewise.
25476 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
25478         * genrecog.c (int_set::int_set): Explicitly construct our
25479         auto_vec base class.
25480         * vec.h (auto_vec::auto_vec): New constructor.
25482 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
25484         * bitmap.h (class auto_bitmap): New constructor taking
25485         bitmap_obstack * argument.
25487 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
25489         * bitmap.h (class auto_bitmap): Change type of m_bits to
25490         bitmap_head, and adjust ctor / dtor and member operators.
25492 2017-05-13  Uros Bizjak  <ubizjak@gmail.com>
25494         * compare-elim.c (equivalent_reg_at_start): Return NULL_RTX
25495         when returned register mode doesn't match original mode.
25497 2017-05-12  Jeff Law  <law@redhat.com>
25498             Jakub Jelinek  <jakub@redhat.com>
25500         * config/mn10300/mn10300.c (mn10300_match_ccmode): Fix where
25501         we look for cc setter after the compare-elim changes.
25502         * config/mn10300/mn10300.md (addsi3_flags): Fix order of patterns
25503         within the vector to match what compare-elim now expects.
25504         (subsi3_flags, andsi3_flags, iorsi3_flags): Likewise.
25505         (xorsi3_flags, one_cmplsi2_flags): Likewise.
25507         * config/rx/rx.c (rx_match_ccmode): Fix where we look cc setter
25508         after the compare-elim changes.
25509         * config/rx/rx.md (abssi2_flags): Fix order of patterns within
25510         the vector to match what compare-elim now expects.
25511         (addsi3_flags, adc_flags, addsi3_flags peepholes): Likewise.
25512         (andsi3_flags, negsi2_flags, one_cmplsi2_flags): Likewise.
25513         (iorsi3_flags, rotlsi3_flags, rotrsi3_flags): Likewise.
25514         (ashrsi3_flags, lshrsi3_flags, ashlsi3_flags): Likewise.
25515         (ssaddsi3, subsi3_flags, sbb_flags, xorsi3_flags): Likewise.
25517         * config/visium/visium.c (single_set_and_flags): Fix where
25518         we look for cc setter after the compare-elim changes.
25519         * config/visium/visium.md (flags_subst_logic): Fix order of patterns
25520         with the vector to match what compare-elim now expects.
25521         (flags_subst_arith, add<mode>3_insn_set_carry): Likewise.
25522         (add<mode>3_insn_set_overflow, addsi3_insn_set_carry): Likewise.
25523         (addsi3_insn_set_overflow, sub<mode>3_insn_set_carry): Likewise.
25524         (sub<mode>3_insn_set_overflow, subsi3_insn_set_carry): Likewise.
25525         (subsi3_insn_set_overflow, negsi2_insn_set_carry): Likewise.
25526         (neg<mode>2_insn_set_overflow): Likewise.
25528 2017-05-12  Jim Wilson  <jim.wilson@linaro.org>
25530         PR middle-end/79794
25531         * expmed.c (extract_bit_field_1): Add alt_rtl argument.  Before
25532         maybe_expand_insn call, set ops[0].target.  If still set after call,
25533         set alt_rtl.  Add extra arg to recursive calls.
25534         (extract_bit_field): Add alt_rtl argument.  Pass to
25535         extract_bit_field.
25536         * expmed.h (extract_bit_field): Fix prototype.
25537         * expr.c (emit_group_load_1, copy_blkmode_from_reg)
25538         (copy_blkmode_to_reg, read_complex_part, store_field): Pass extra NULL
25539         to extract_bit_field_calls.
25540         (expand_expr_real_1): Pass alt_rtl to expand_expr_real instead of 0.
25541         Pass alt_rtl to extract_bit_field calls.
25542         * calls.c (store_unaligned_arguments_into_psuedos)
25543         load_register_parameters): Pass extra NULL to extract_bit_field calls.
25544         * optabs.c (maybe_legitimize_operand): Clear op->target when call
25545         gen_reg_rtx.
25546         * optabs.h (struct expand_operand): Add target bitfield.
25548 2017-05-12  Uros Bizjak  <ubizjak@gmail.com>
25550         * compare-elim.c (try_eliminate_compare): Canonicalize
25551         operation with embedded compare to
25552         [(set (reg:CCM) (compare:CCM (operation) (immediate)))
25553          (set (reg) (operation)].
25555         * config/i386/i386.c (TARGET_FLAGS_REGNUM): New define.
25557 2017-05-12  Uros Bizjak  <ubizjak@gmail.com>
25559         PR target/80723
25560         * config/i386/i386.c (ix86_rtx_cost) [case PLUS]: Ignore the
25561         cost of adding a carry flag for ADC instruction.
25562         [case MINUS]: Ignore the cost of subtracting a carry flag
25563         for SBB instruction.
25565 2017-05-12  Steven Munroe  <munroesj@gcc.gnu.org>
25567         * config.gcc (powerpc*-*-*): Add bmi2intrin.h, bmiintrin.h,
25568         and x86intrin.h
25569         * config/rs6000/bmiintrin.h: New file.
25570         * config/rs6000/bmi2intrin.h: New file.
25571         * config/rs6000/x86intrin.h: New file.
25573 2017-05-12  Jeff Law  <law@redhat.com>
25575         * tree-vrp.c (vrp_dom_walker::before_dom_children): Push unwinding
25576         markers.
25578 2017-05-12  Peter Bergner  <bergner@vnet.ibm.com>
25580         PR middle-end/80707
25581         * tree-cfg.c: Remove cfg edges of unreachable case statements.
25583 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
25585         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
25586         early expansion of vector divide builtins.
25587         (builtin_function_type): Add VSX_BUILTIN_UDIV_V2DI to the list of
25588         builtins identified as having unsigned arguments.
25590 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
25592         * config/rs6000/rs6000.c (gimple-fold.h): New #include.
25593         (rs6000_gimple_fold_builtin): Add handling for early GIMPLE
25594         expansion of vector logical operations (and, andc, or, xor,
25595         nor, orc, nand).
25597 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
25599         * gimple-fold.c (create_tmp_reg_or_ssa_name): Remove static declaration.
25600         * gimple-fold.h (create_tmp_reg_or_ssa_name): New prototype.
25602 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
25604         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
25605         early GIMPLE expansion of vector multiplies.
25607 2017-05-12  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
25609         * config/arm/arm.md (movsi): Add TARGET_32BIT in addition to the
25610         TARGET_HAVE_MOVT conditional.
25611         (movt splitter): Likewise.
25613 2017-05-12  Richard Biener  <rguenther@suse.de>
25615         * tree-ssa-sccvn.h (has_VN_INFO): Declare.
25616         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
25617         Fold all stmts not inplace.
25619 2017-05-12  Richard Biener  <rguenther@suse.de>
25621         PR tree-optimization/80713
25622         * tree-ssa-pre.c (remove_dead_inserted_code): Clear
25623         inserted_exprs bit for not removed stmts.
25625 2017-05-12  Thomas Schwinge  <thomas@codesourcery.com>
25627         PR middle-end/69921
25628         * tree-parloops.c (create_parallel_loop): Set "oacc kernels
25629         parallelized" attribute for parallelized OpenACC kernels.
25630         * omp-offload.c (execute_oacc_device_lower): Use it.
25632         * omp-expand.c (expand_omp_target) <GF_OMP_TARGET_KIND_OACC_KERNELS>:
25633         Set "oacc kernels" attribute.
25634         * omp-general.c (oacc_set_fn_attrib): Remove is_kernel formal
25635         parameter.  Adjust all users.
25636         (oacc_fn_attrib_kernels_p): Remove function.
25637         * omp-offload.c (execute_oacc_device_lower): Look for "oacc
25638         kernels" attribute instead of calling oacc_fn_attrib_kernels_p.
25639         * tree-ssa-loop.c (gate_oacc_kernels): Likewise.
25640         * tree-parloops.c (create_parallel_loop): If oacc_kernels_p,
25641         assert "oacc kernels" attribute is set.
25643 2017-05-11  Carl Love  <cel@us.ibm.com>
25645         * config/rs6000/rs6000-c: Add support for built-in functions
25646         vector unsigned char vec_popcnt (vector signed char)
25647         vector unsigned char vec_popcnt (vector unsigned char)
25648         vector unsigned short vec_popcnt (vector signed short)
25649         vector unsigned short vec_popcnt (vector unsigned short)
25650         vector unsigned int vec_popcnt (vector signed int)
25651         vector unsigned int vec_popcnt (vector unsigned int)
25652         vector unsigned long long vec_popcnt (vector signed long long)
25653         vector unsigned long long vec_popcnt (vector unsigned long long)
25654         vector signed long long vec_slo (vector signed long long,
25655                                          vector signed char)
25656         vector signed long long vec_slo (vector signed long long,
25657                                          vector unsigned char)
25658         vector unsigned long long vec_slo (vector unsigned long long,
25659                                            vector signed char)
25660         vector unsigned long long vec_slo (vector unsigned long long,
25661                                            vector unsigned char)
25662         * config/rs6000/rs6000-builtin.def: Add definitions for VPOPCNTUB,
25663         VPOPCNTUH, VPOPCNTUW, and VPOPCNTUD overloads.
25664         * config/rs6000/altivec.h: Add define for vec_popcnt, vec_popcntb,
25665         vec_popcnth, vec_popcntw and vec_popcntd built-in functions.
25666         * doc/extend.texi: Update the built-in documentation file for the
25667         new built-in functions.
25669 2017-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
25671         * attribs.h (sorted_attr_string): Move machine independent
25672         functions for target clone support from the i386 port to common
25673         code.  Rename ix86_function_versions to common_function_versions.
25674         Rename make_name to make_unique_name.
25675         (common_function_versions): Likewise.
25676         (make_unique_name): Likewise.
25677         (make_dispatcher_decl): Likewise.
25678         (is_function_default_version): Likewise.
25679         * attribs.c (attr_strcmp): Likewise.
25680         (sorted_attr_string): Likewise.
25681         (common_function_versions): Likewise.
25682         (make_unique_name): Likewise.
25683         (make_dispatcher_decl): Likewise.
25684         (is_function_default_version): Likewise.
25685         * config/i386/i386.c (attr_strcmp): Likewise.
25686         (sorted_attr_string): Likewise.
25687         (ix86_function_versions): Likewise.
25688         (make_name): Likewise.
25689         (make_dispatcher_decl): Likewise.
25690         (is_function_default_version): Likewise.
25691         (TARGET_OPTION_FUNCTION_VERSIONS): Update target function hook.
25693 2017-05-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25695         PR target/80695
25696         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
25697         Account for direct move costs for vec_construct of integer
25698         vectors.
25700 2017-05-11  Uros Bizjak  <ubizjak@gmail.com>
25702         PR target/80706
25703         * config/i386/sync.md (UNSPEC_LDX_ATOMIC): New unspec.
25704         (UNSPEC_STX_ATOMIC): Ditto.
25705         (loaddi_via_sse): New insn.
25706         (storedi_via_sse): Ditto.
25707         (atomic_loaddi_fpu): Emit loaddi_via_sse and storedi_via_sse.
25708         Update corresponding peephole2 patterns.
25709         (atomic_storedi_fpu): Ditto.
25711 2017-05-11  Julia Koval  <julia.koval@intel.com>
25713         * config/i386/avx512fintrin.h (_mm_mask_rsqrt14_sd)
25714         (_mm_maskz_rsqrt14_sd, _mm_mask_rsqrt14_ss, _mm_maskz_rsqrt14_ss):
25715         New intrinsics.
25716         * config/i386/i386-builtin.def (__builtin_ia32_rsqrt14sd_mask)
25717         (__builtin_ia32_rsqrt14ss_mask): New builtins.
25718         * config/i386/sse.md (rsqrt14_<mode>_mask): New pattern.
25720 2017-05-11  Nathan Sidwell  <nathan@acm.org>
25722         * graphite-poly.c: Include dumpfile.h.
25724         * dumpfle.h (dump_function): Declare here ...
25725         * tree-dump.h (dump_function): ... not here.
25726         * dumpfile.c: #include tree-cfg.h.
25727         (dump_function): Move here from ...
25728         * tree-dump.c (dump_function): ... here.
25729         * gimplify.c: #include splay-tree.h, not tree-dump.h.
25730         * graphite-poly.c: Don't include tree-dump.h.
25731         * cgraphclones.c: Include dumpfile.h not tree-dump.h.
25732         * print-tree.c: Likewise.
25733         * stor-layout.c: Likewise.
25734         * tree-nested.c: Likewise.
25736         * dumpfile.c (dump_start): Use TDF_FLAGS.
25737         (dump_enable_all): Fix TDF_KIND check thinko.
25739 2017-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25741         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
25742         array entries to represent two legal parameterizations of the
25743         overloaded __builtin_cmpb function, as represented by the
25744         P6_OV_BUILTIN_CMPB constant.
25745         (altivec_resolve_overloaded_builtin): Add special case handling
25746         for the __builtin_cmpb function, as represented by the
25747         P6_OV_BUILTIN_CMPB constant.
25748         * config/rs6000/rs6000-builtin.def (BU_P6_2): New macro.
25749         (BU_P6_64BIT_2): New macro.
25750         (BU_P6_OVERLOAD_2): New macro
25751         (CMPB_32): Add 32-bit compare-bytes support for 32-bit only targets.
25752         (CMPB): Add 64-bit compare-bytes support for 32-bit and 64-bit targets.
25753         (CMPB): Add overload support to represent both 32-bit and 64-bit
25754         compare-bytes function.
25755         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
25756         support for TARGET_CMPB.
25757         * config/rs6000/rs6000.h: Add support for RS6000_BTM_CMPB.
25758         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
25759         documentation of the __builtin_cmpb overloaded built-in function.
25761 2017-05-11  Richard Biener  <rguenther@suse.de>
25763         PR tree-optimization/80705
25764         * tree-vect-data-refs.c (vect_analyze_data_refs): DECL_NONALIASED
25765         bases are not vectorizable.
25767 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
25769         * tree-ssa-loop-ivopts.c (determine_set_costs): Skip non-interger
25770         when counting register pressure.
25772 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
25774         * tree-ssa-loop-ivopts.c (compare_cost_pair): New.
25775         (iv_ca_more_deps): Renamed to ...
25776         (iv_ca_compare_deps): ... this.
25777         (iv_ca_extend): Extend iv_ca if NEW_CP is cheaper than OLD_CP.
25779 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
25781         * tree-ssa-loop-ivopts.c (find_interesting_uses): Move inv vars dump
25782         to ...
25783         (determine_group_iv_costs): ... here.
25784         (find_inv_vars_cb): Record inv var if it's not recorded before.
25786 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
25788         * tree-ssa-loop-ivopts.c (allow_ip_end_pos_p): Refine comments.
25789         (get_shiftadd_cost): Ditto.
25791 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
25793         * tree-ssa-address.c: Include header file.
25794         (move_hint_to_base): Return TRUE if BASE_HINT is moved to memory
25795         address.
25796         (add_to_parts): Refactor.
25797         (addr_to_parts): New parameter.  Update use of move_hint_to_base.
25798         (create_mem_ref): Update use of addr_to_parts.  Re-associate addr
25799         in new order.
25801 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
25803         PR tree-optimization/53090
25804         * tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New enum value
25805         COMP_IV_EXPR_2.
25806         (extract_cond_operands): Detect condition with IV on both sides
25807         and return COMP_IV_EXPR_2.
25808         (find_interesting_uses_cond): Add iv_use for both IVs in condition.
25809         (rewrite_use_compare): Simplify by removing call to function
25810         extract_cond_operands.
25812 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
25814         * tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New.
25815         (extract_cond_operands): Detect condition comparing against non-
25816         invariant bound and return appropriate enum value.
25817         (find_interesting_uses_cond): Update use of extract_cond_operands.
25818         Handle its return value accordingly.
25819         (determine_group_iv_cost_cond, rewrite_use_compare): Ditto.
25821 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
25823         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Re-associate
25824         nonlinear iv_use computation in loop invariant sensitive way.
25826 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
25828         * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): New.
25829         (find_iv_candidates): Call relate_compare_use_with_all_cands.
25831 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
25833         * tree-ssa-loop-ivopts.c (struct iv_cand): New field inv_exprs.
25834         (dump_cand): Support iv_cand.inv_exprs.
25835         (add_candidate_1): Record invariant exprs in iv_cand.inv_exprs
25836         for candidates.
25837         (iv_ca_set_no_cp, iv_ca_set_cp, free_loop_data): Support
25838         iv_cand.inv_exprs.
25840 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
25842         * tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Move
25843         from ...
25844         * tree-ssa-address.c (multiplier_allowed_in_address_p): ... to here
25845         as local function.  Include necessary header files.
25846         * tree-ssa-loop-ivopts.h (multiplier_allowed_in_address_p): Delete.
25848 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
25850         * tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify.
25852 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
25854         * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Handle more
25855         operators: TRUNC_DIV_EXPR, BIT_AND_EXPR, BIT_IOR_EXPR, LSHIFT_EXPR,
25856         RSHIFT_EXPR and BIT_NOT_EXPR.
25858 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
25860         * tree-ssa-loop-ivopts.c (get_loop_invariant_expr): Simplify.
25861         (adjust_setup_cost): New parameter supporting round up adjustment.
25862         (struct address_cost_data): Delete.
25863         (force_expr_to_var_cost): Don't bound cost with spill_cost.
25864         (split_address_cost, ptr_difference_cost): Delete.
25865         (difference_cost, compare_aff_trees, record_inv_expr): Delete.
25866         (struct ainc_cost_data): New struct.
25867         (get_address_cost_ainc): New function.
25868         (get_address_cost, get_computation_cost): Reimplement.
25869         (determine_group_iv_cost_address): Record inv_expr for all uses of
25870         a group.
25871         (determine_group_iv_cost_cond): Call get_loop_invariant_expr.
25872         (iv_ca_has_deps): Reimplemented to ...
25873         (iv_ca_more_deps): ... this.  Check if NEW_CP introduces more deps
25874         than OLD_CP.
25875         (iv_ca_extend): Call iv_ca_more_deps.
25877 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
25879         * tree-ssa-address.c (struct mem_address): Move to header file.
25880         (valid_mem_ref_p, move_fixed_address_to_symbol): Make it global.
25881         * tree-ssa-address.h (struct mem_address): Move from C file.
25882         (valid_mem_ref_p, move_fixed_address_to_symbol): Declare.
25884 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
25886         * tree-affine.h (aff_combination_type): New interface.
25887         (aff_combination_zero_p): Remove static.
25888         (aff_combination_const_p): New interface.
25889         (aff_combination_singleton_var_p): New interfaces.
25891 2017-05-11  Richard Biener  <rguenther@suse.de>
25893         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
25894         Skip unreachable blocks and destinations.
25895         (eliminate): Move stmt removal and fixup ...
25896         (fini_eliminate): ... here.  Skip inserted exprs.
25897         (pass_pre::execute): Move fini_pre after fini_eliminate.
25898         * tree-ssa-tailmerge.c: Include tree-cfgcleanup.h.
25899         (tail_merge_optimize): Run cleanup_tree_cfg if requested by
25900         PRE to get rid of dead code that has invalid SSA form and
25901         split critical edges again.
25903 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
25905         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
25907 2017-05-11  Richard Biener  <rguenther@suse.de>
25909         * passes.c (execute_function_todo): Verify loops if they are
25910         said to be up-to-date.
25911         * cfgexpand.c (pass_expand::execute): Discard loops for -dx.
25912         * trans-mem.c (pass_tm_edges::execute): Mark loops for fixup.
25914 2017-05-10  John David Anglin  <danglin@gcc.gnu.org>
25916         PR target/80090
25917         * config/pa/pa.c (pa_assemble_integer): When outputting a SYMBOL_REF,
25918         handle calling assemble_external ourself.
25920         PR target/79027
25921         * config/pa/pa.c (pa_cannot_change_mode_class): Reject changes to/from
25922         modes with zero size.  Enhance comment.
25924 2017-05-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25926         * config/rs6000/rs6000.c (altivec_init_builtins): Define POWER8
25927         built-ins for vec_xl and vec_xst with short and char pointer
25928         arguments.
25930 2017-05-10  Sebastian Peryt  <sebastian.peryt@intel.com>
25932         * config/i386/avx512fintrin.h (_mm_mask_max_round_sd)
25933         (_mm_maskz_max_round_sd, _mm_mask_max_round_ss)
25934         (_mm_maskz_max_round_ss, _mm_mask_min_round_sd)
25935         (_mm_maskz_min_round_sd, _mm_mask_min_round_ss)
25936         (_mm_maskz_min_round_ss): New intrinsics.
25937         * config/i386/i386-builtin-types.def (V2DF, V2DF, V2DF, V2DF, UQI, INT)
25938         (V4SF, V4SF, V4SF, V4SF, UQI, INT): New function type aliases.
25939         * config/i386/i386-builtin.def (__builtin_ia32_maxsd_mask_round)
25940         (__builtin_ia32_maxss_mask_round, __builtin_ia32_minsd_mask_round)
25941         (__builtin_ia32_minss_mask_round): New builtins.
25942         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
25943         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
25944         * config/i386/sse.md (<sse>_vm<code><mode>3<round_saeonly_name>):
25945         Rename to ...
25946         (<sse>_vm<code><mode>3<mask_name><round_saeonly_name>): ... this.
25947         (v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_op3>%2, %1, %0|%0, %1, %<iptr>2<round_saeonly_op3>}):
25948         Change to ...
25949         (v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_saeonly_mask_op3>}):
25950         ... this.
25952 2017-05-10  Sebastian Peryt  <sebastian.peryt@intel.com>
25954         * config/i386/avx512fintrin.h (_mm_mask_mul_round_sd)
25955         (_mm_maskz_mul_round_sd, _mm_mask_mul_round_ss)
25956         (_mm_maskz_mul_round_ss, _mm_mask_div_round_sd)
25957         (_mm_maskz_div_round_sd, _mm_mask_div_round_ss)
25958         (_mm_maskz_div_round_ss, _mm_mask_mul_sd, _mm_maskz_mul_sd)
25959         (_mm_mask_mul_ss, _mm_maskz_mul_ss, _mm_mask_div_sd)
25960         (_mm_maskz_div_sd, _mm_mask_div_ss, _mm_maskz_div_ss): New intrinsics.
25961         * config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
25962         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
25963         * config/i386/i386-builtin.def (__builtin_ia32_divsd_mask_round)
25964         (__builtin_ia32_divss_mask_round, __builtin_ia32_mulsd_mask_round)
25965         (__builtin_ia32_mulss_mask_round): New builtins.
25966         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
25967         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
25968         * config/i386/sse.md (<sse>_vm<multdiv_mnemonic><mode>3<round_name>):
25969         Rename to ...
25970         (<sse>_vm<multdiv_mnemonic><mode>3<mask_name><round_name>): ... this.
25971         (v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
25972         Change to ...
25973         (v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
25974         ... this.
25976 2017-05-10  Julia Koval  <julia.koval@intel.com>
25978         * config/i386/avxintrin.h (_mm256_set_m128, _mm256_set_m128d)
25979         (_mm256_set_m128i, _mm256_setr_m128, _mm256_setr_m128d)
25980         (_mm256_setr_m128i): New intrinsics.
25982 2017-05-10  Julia Koval  <julia.koval@intel.com>
25984         * config/i386/avx512fintrin.h (_mm_mask_rcp14_sd)
25985         (_mm_maskz_rcp14_sd, _mm_mask_rcp14_ss)
25986         (_mm_maskz_rcp14_ss): New intrinsics.
25987         * config/i386/i386-builtin.def (__builtin_ia32_rcp14sd_mask)
25988         (__builtin_ia32_rcp14ss_mask): New builtins.
25989         * config/i386/sse.md (srcp14<mode>_mask): New pattern.
25991 2017-05-10  Peter Bergner  <bergner@vnet.ibm.com>
25993         PR tree-optimization/51513
25994         * tree-cfg.c (gimple_seq_unreachable_p): New function.
25995         (assert_unreachable_fallthru_edge_p): Use it.
25996         (group_case_labels_stmt): Likewise.
25997         * tree-cfg.h: Prototype it.
25998         * stmt.c: Include cfghooks.h and tree-cfg.h.
25999         (emit_case_dispatch_table) <gap_label>: New local variable.
26000         Use it to fill dispatch table gaps.
26001         Test for default_label before updating probabilities.
26002         (expand_case) <default_label>: Remove unneeded initialization.
26003         Test for unreachable default case statement and remove its edge.
26004         Set default_label accordingly.
26005         * tree-ssa-ccp.c (optimize_unreachable): Update comment.
26007 2017-05-10  Carl Love  <cel@us.ibm.com>
26009         * config/rs6000/rs6000-c: Add support for built-in functions
26010         vector signed char      vec_neg (vector signed char)
26011         vector signed short int vec_neg (vector short int)
26012         vector signed int       vec_neg (vector signed int)
26013         vector signed long long vec_neg (vector signed long long)
26014         vector float            vec_neg (vector float)
26015         vector double           vec_neg (vector double)
26016         * config/rs6000/rs6000-builtin.def: Add definitions for NEG function
26017         overload.
26018         * config/rs6000/altivec.h: Add define for vec_neg
26019         * doc/extend.texi: Update the built-in documentation for the
26020         new built-in functions.
26022 2017-05-10  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
26024         PR tree-optimization/77644
26025         * match.pd (sqrt(x) cmp sqrt(y) -> x cmp y): New pattern.
26027 2017-05-10  Nathan Sidwell  <nathan@acm.org>
26029         * dumpfile.h (TDI_lang_all): New.
26030         (TDF_KIND): New. Renumber others
26031         (TDF_LANG, TDF_TREE, TDF_RTL, TDF_IPA): Enumerate value, rather
26032         than bits.
26033         * dumpfile.c (dump_files): Mark language dumps as TDF_LANG.  add
26034         lang-all.
26035         (get_dump_file_name): Adjust suffix generation.
26036         (dump_enable_all): Use TDF_KIND.
26037         * doc/invoke.texi (-fdump-lang-all): Document.
26039         * dumpfile.h: Tabify.
26041 2017-05-10  Wilco Dijkstra  <wdijkstr@arm.com>
26043         PR target/80671
26044         * config/aarch64/cortex-a57-fma-steering.c (merge_forest):
26045         Move member access before delete.
26047 2017-05-10  Alexandre Oliva <aoliva@redhat.com>
26049         * tree-inline.c (expand_call_inline): Split block at stmt
26050         before the call.
26052 2017-05-09  Michael Meissner  <meissner@linux.vnet.ibm.com>
26054         PR target/68163
26055         * config/rs6000/rs6000.md (f32_lr): Delete mode attributes that
26056         are now unused after splitting mov{sf,sd}_hardfloat.
26057         (f32_lr2): Likewise.
26058         (f32_lm): Likewise.
26059         (f32_lm2): Likewise.
26060         (f32_li): Likewise.
26061         (f32_li2): Likewise.
26062         (f32_lv): Likewise.
26063         (f32_sr): Likewise.
26064         (f32_sr2): Likewise.
26065         (f32_sm): Likewise.
26066         (f32_sm2): Likewise.
26067         (f32_si): Likewise.
26068         (f32_si2): Likewise.
26069         (f32_sv): Likewise.
26070         (f32_dm): Likewise.
26071         (f32_vsx): Likewise.
26072         (f32_av): Likewise.
26073         (mov<mode>_hardfloat): Split into separate movsf and movsd pieces.
26074         For movsf, order stores so the VSX stores occur before the GPR
26075         store which encourages the register allocator to use a traditional
26076         FPR instead of a GPR.  For movsd, order the stores so that the GPR
26077         store comes before the VSX stores to allow the power6 to work.
26078         This is due to the power6 not having a 32-bit integer store
26079         instruction from a FPR.
26080         (movsf_hardfloat): Likewise.
26081         (movsd_hardfloat): Likewise.
26083 2017-05-09  Martin Sebor  <msebor@redhat.com>
26085         PR translation/80280
26086         * config/sol2-c.c (cmn_err_flag_specs): Initialize new data member
26087         added in r247778.
26089         PR translation/80280
26090         * config/i386/msformat-c.c (ms_printf_flag_specs): Initialize new
26091         data member added in r247778.
26092         (ms_scanf_flag_specs, ms_strftime_flag_specs): Same.
26094 2017-05-09  Nathan Sidwell  <nathan@acm.org>
26096         * tree.h (tree_fits_shwi_p, tree_fits_uhwi_p): Unconditionally pure.
26098         * ipa-devirt.c (default_hash_traits<type_pair>): Skip struct-scope
26099         typedefs.
26101 2017-05-09  Marek Polacek  <polacek@redhat.com>
26103         * doc/invoke.texi: Fix typo.
26105 2017-05-09  Richard Biener  <rguenther@suse.de>
26107         * tree-vrp.c (vrp_val_is_max): Adjust comment.
26108         (vrp_val_is_min): Likewise.
26109         (set_value_range_to_value): Likewise.
26110         (set_value_range_to_nonnegative): Likewise.
26111         (gimple_assign_nonzero_p): Likewise.
26112         (gimple_stmt_nonzero_p): Likewise.
26113         (vrp_int_const_binop): Likewise.  Remove unreachable case.
26114         (adjust_range_with_scev): Adjust comments.
26115         (compare_range_with_value): Likewise.
26116         (extract_range_from_phi_node): Likewise.
26117         (test_for_singularity): Likewise.
26119 2017-05-09  Richard Biener  <rguenther@suse.de>
26121         * tree-vrp.c (get_single_symbol): Add assert that we don't
26122         get overflowed constants as invariant part.
26123         (compare_values_warnv): Add comment before the TREE_NO_WARNING
26124         checks.  Use wi::cmp instead of recursing for integer constants.
26125         (compare_values): Just ignore whether we assumed undefined
26126         overflow instead of failing the compare.
26127         (extract_range_for_var_from_comparison_expr): Add comment before the
26128         TREE_NO_WARNING sets.
26129         (test_for_singularity): Likewise.
26130         (extract_range_from_comparison): Do not disable optimization
26131         when we assumed undefined overflow.
26132         (extract_range_basic): Remove init of unused var.
26134 2017-05-09  Richard Biener  <rguenther@suse.de>
26136         * tree-vrp.c (vrp_int_const_binop): Use wide-ints and simplify.
26137         (extract_range_from_multiplicative_op_1): Adjust.
26138         (extract_range_from_binary_expr_1): Use int_const_binop.
26140 2017-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
26142         PR target/80101
26143         * config/rs6000/power6.md: Replace store_data_bypass_p calls with
26144         rs6000_store_data_bypass_p in seven define_bypass directives and
26145         in several comments.
26146         * config/rs6000/rs6000-protos.h: Add prototype for
26147         rs6000_store_data_bypass_p function.
26148         * config/rs6000/rs6000.c (rs6000_store_data_bypass_p): New
26149         function implements slightly different (rs6000-specific) semantics
26150         than store_data_bypass_p, returning false rather than aborting
26151         with assertion error when arguments do not satisfy the
26152         requirements of store data bypass.
26153         (rs6000_adjust_cost): Replace six calls of store_data_bypass_p with
26154         rs6000_store_data_bypass_p.
26156 2017-05-08  Max Filippov  <jcmvbkbc@gmail.com>
26158         * config/xtensa/xtensa-protos.h
26159         (xtensa_initial_elimination_offset): New declaration.
26160         * config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
26161         New function. Move its body from the INITIAL_ELIMINATION_OFFSET
26162         macro definition, add case for FRAME_POINTER_REGNUM when
26163         FRAME_GROWS_DOWNWARD.
26164         * config/xtensa/xtensa.h (FRAME_GROWS_DOWNWARD): New macro definition.
26165         (INITIAL_ELIMINATION_OFFSET): Replace body with call to
26166         xtensa_initial_elimination_offset.
26168 2017-05-08  Nathan Sidwell  <nathan@acm.org>
26170         * doc/invoke.texi: Alphabetize -fdump options.
26172 2017-05-08  Martin Sebor  <msebor@redhat.com>
26174         PR translation/80280
26175         * config/sol2-c.c (solaris_pragma_align): Correct quoting.
26177 2017-05-08  Bernd Edlinger  <bernd.edlinger@hotmail.de>
26179         * target.def (compute_frame_layout): New optional target hook.
26180         * doc/tm.texi.in (TARGET_COMPUTE_FRAME_LAYOUT): Add hook.
26181         * doc/tm.texi (TARGET_COMPUTE_FRAME_LAYOUT): Add documentation.
26182         * lra-eliminations.c (update_reg_eliminate): Call compute_frame_layout
26183         target hook.
26184         * reload1.c (verify_initial_elim_offsets): Likewise.
26185         * config/arm/arm.c (TARGET_COMPUTE_FRAME_LAYOUT): Define.
26186         (use_simple_return_p): Call arm_compute_frame_layout if needed.
26187         (arm_get_frame_offsets): Split up into this ...
26188         (arm_compute_frame_layout): ... and this function.
26190 2017-05-08  Richard Sandiford  <richard.sandiford@arm.com>
26192         * config/aarch64/constraints.md (Usa): New constraint.
26193         * config/aarch64/aarch64.md (*movsi_aarch64, *movdi_aarch64): Use it.
26195 2017-05-08  Thomas Preud'homme  <thomas.preudhomme@arm.com>
26197         * config.gcc (arm*-*-*): Set TM_MULTILIB_CONFIG from
26198         with_multilib_list after it has been checked.
26200 2017-05-08  Richard Biener  <rguenther@suse.de>
26202         * tree-ssa-pre.c (bitmap_set_and): Avoid bitmap copy.
26203         (bitmap_set_subtract_values): Likewise.
26205 2017-05-08  Richard Biener  <rguenther@suse.de>
26207         * tree-vrp.c (gimple_assign_nonzero_warnv_p): Rename to ...
26208         (gimple_assign_nonzero): ... this and remove strict_overflow_p
26209         argument.
26210         (gimple_stmt_nonzero_warnv_p): Rename to ...
26211         (gimple_stmt_nonzero_p): ... this and remove strict_overflow_p
26212         argument.
26213         (vrp_stmt_computes_nonzero): Remove strict_overflow_p argument.
26214         (extract_range_basic): Adjust, do not disable propagation on
26215         strict overflow sensitive simplification.
26216         (vrp_visit_cond_stmt): Likewise.
26218 2017-05-05  Jan Hubicka  <hubicka@ucw.cz>
26220         * ipa-inline-analysis.c (estimate_function_body_sizes): Recompute
26221         body size unconditionally.
26223 2017-05-07  Jeff Law  <law@redhat.com>
26225         Revert:
26226         2017-05-06  Jeff Law  <law@redhat.com>
26227         PR tree-optimization/78496
26228         * tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
26229         code.
26231         PR tree-optimization/78496
26232         * tree-vrp.c (simplify_assert_expr_using_ranges): New function.
26233         (simplify_stmt_using_ranges): Call it.
26234         (vrp_dom_walker::before_dom_children): Extract equivalences
26235         from an ASSERT_EXPR with an equality comparison against a
26236         constant.
26238 2017-05-06  Jeff Law  <law@redhat.com>
26240         PR tree-optimization/78496
26241         * tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
26242         code.
26244         PR tree-optimization/78496
26245         * tree-vrp.c (simplify_assert_expr_using_ranges): New function.
26246         (simplify_stmt_using_ranges): Call it.
26247         (vrp_dom_walker::before_dom_children): Extract equivalences
26248         from an ASSERT_EXPR with an equality comparison against a
26249         constant.
26251 2017-05-06  Richard Sandiford  <richard.sandiford@linaro.org>
26253         * lra-constraints.c (lra_copy_reg_equiv): New function.
26254         (split_reg): Use it to copy equivalence information from the
26255         original register to the spill register.
26257 2017-05-06  Richard Sandiford  <richard.sandiford@linaro.org>
26259         PR rtl-optimization/75964
26260         * simplify-rtx.c (simplify_const_relational_operation): Remove
26261         invalid handling of comparisons of integer ABS.
26263 2017-05-06  Uros Bizjak  <ubizjak@gmail.com>
26265         * config/i386/i386.c (ext_80387_constant_init): Do not explicitly
26266         initialize to zero.
26267         (init_regs): Remove declaration.
26268         (function_arg_advance_32): Initialize error_p as boolean variable.
26270 2017-05-05  Nathan Sidwell  <nathan@acm.org>
26272         * store-motion.c (remove_reachable_equiv_notes): Reformat long
26273         lines.  Use for (;;).
26275 2017-05-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26277         * config/rs6000/rs6000.c (rs6000_vect_nonmem): New static var.
26278         (rs6000_init_cost): Initialize rs6000_vect_nonmem.
26279         (rs6000_add_stmt_cost): Update rs6000_vect_nonmem.
26280         (rs6000_finish_cost): Avoid vectorizing simple copy loops with
26281         VF=2 that require versioning.
26283 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
26285         * diagnostic.h (CARET_LINE_MARGIN): Convert from macro to const
26286         int.
26288 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
26290         * diagnostic.h (diagnostic_override_option_index): Convert from
26291         macro to inline function.
26293 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
26295         * diagnostic.c (last_module_changed_p): New function.
26296         (set_last_module): New function.
26297         (diagnostic_report_current_module): Convert macro usage to
26298         the above functions.
26299         * diagnostic.h (diagnostic_context::last_module): Strengthen
26300         from const line_map * to const line_map_ordinary *.
26301         (diagnostic_last_module_changed): Delete macro.
26302         (diagnostic_set_last_module): Delete macro.
26304 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
26306         * diagnostic.c (diagnostic_impl): Replace report_diagnostic
26307         with diagnostic_report_diagnostic.
26308         (diagnostic_n_impl_richloc): Likewise.
26309         * diagnostic.h (report_diagnostic): Delete macro.
26310         * rtl-error.c (diagnostic_for_asm): Replace report_diagnostic
26311         with diagnostic_report_diagnostic.
26312         * substring-locations.c (format_warning_va): Likewise.
26314 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
26316         * diagnostic.c (diagnostic_report_diagnostic): Eliminate
26317         save/restor of format_spec.  Move option-printing code to...
26318         (print_option_information): ...this new function, and
26319         reimplement by simply printing to the pretty_printer,
26320         rather than appending to the format string.
26322 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
26324         * diagnostic.c (diagnostic_report_diagnostic): Split out pragma
26325         handling logic into...
26326         (update_effective_level_from_pragmas): ...this new function.
26328 2017-05-04  Andrew Waterman  <andrew@sifive.com>
26330         * config/riscv/riscv.opt (mstrict-align): New option.
26331         * config/riscv/riscv.h (STRICT_ALIGNMENT): Use it.  Update comment.
26332         (SLOW_UNALIGNED_ACCESS): Define.
26333         (riscv_slow_unaligned_access): Declare.
26334         * config/riscv/riscv.c (riscv_tune_info): Add slow_unaligned_access
26335         field.
26336         (riscv_slow_unaligned_access): New variable.
26337         (rocket_tune_info): Set slow_unaligned_access to true.
26338         (optimize_size_tune_info): Set slow_unaligned_access to false.
26339         (riscv_cpu_info_table): Add entry for optimize_size_tune_info.
26340         (riscv_valid_lo_sum_p): Use TARGET_STRICT_ALIGN.
26341         (riscv_option_override): Set riscv_slow_unaligned_access.
26342         * doc/invoke.texi: Add -mstrict-align to RISC-V.
26344 2017-05-04  Kito Cheng  <kito.cheng@gmail.com>
26346         * config/riscv/riscv.md: Unify indentation.
26348 2017-05-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
26350         PR target/79038
26351         PR target/79202
26352         PR target/79203
26353         * config/rs6000/rs6000.md (u code attribute): Add FIX and
26354         UNSIGNED_FIX.
26355         (extendsi<mode>2): Add support for doing sign extension via
26356         VUPKHSW and XXPERMDI if the value is in Altivec registers and we
26357         don't have ISA 3.0 instructions.
26358         (extendsi<mode>2 splitter): Likewise.
26359         (fix_trunc<mode>si2): If we are at ISA 2.07 (VSX small integer),
26360         generate the normal insns since SImode can now go in vector
26361         registers.  Disallow the special UNSPECs needed for previous
26362         machines to hide SImode being used.  Add new insns
26363         fctiw{,w}_<mode>_smallint if SImode can go in vector registers.
26364         (fix_trunc<mode>si2_stfiwx): Likewise.
26365         (fix_trunc<mode>si2_internal): Likewise.
26366         (fixuns_trunc<mode>si2): Likewise.
26367         (fixuns_trunc<mode>si2_stfiwx): Likewise.
26368         (fctiw<u>z_<mode>_smallint): Likewise.
26369         (fctiw<u>z_<mode>_mem): New combiner pattern to prevent conversion
26370         of floating point to 32-bit integer from doing a direct move to
26371         the GPR registers to do a store.
26372         (fctiwz_<mode>): Break long line.
26374 2017-05-05  Bin Cheng  <bin.cheng@arm.com>
26376         * Makefile.in (GTFILES): Add tree-ssa-loop-ivopts.c.
26377         * tree-ssa-loop-ivopts.c (compute_max_addr_offset): Delete.
26378         (addr_list, addr_offset_valid_p): New.
26379         (split_address_groups): Check offset validity with above function.
26380         (gt-tree-ssa-loop-ivopts.h): Include header file.
26382 2017-05-05  Nathan Sidwell  <nathan@acm.org>
26384         * config.gcc (arm*-*-*): Add missing 'fi'.
26386 2017-05-05  Steve Ellcey  <sellcey@cavium.com>
26388         * doc/invoke.texi (-fopt-info): Explicitly say order of options
26389         included in -fopt-info does not matter.
26390         * doc/optinfo.texi (-fopt-info): Fix description of default
26391         behavour. Explicitly say order of options included in -fopt-info
26392         does not matter.
26394 2017-05-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>
26396         * config.gcc: Allow combinations of aprofile and rmprofile values for
26397         --with-multilib-list.
26398         * config/arm/t-multilib: New file.
26399         * config/arm/t-aprofile: Remove initialization of MULTILIB_*
26400         variables.  Remove setting of ISA and floating-point ABI in
26401         MULTILIB_OPTIONS and MULTILIB_DIRNAMES.  Set architecture and FPU in
26402         MULTI_ARCH_OPTS_A and MULTI_ARCH_DIRS_A rather than MULTILIB_OPTIONS
26403         and MULTILIB_DIRNAMES respectively.  Add comment to introduce all
26404         matches.  Add architecture matches for marvel-pj4 and generic-armv7-a
26405         CPU options.
26406         * config/arm/t-rmprofile: Likewise except for the matches changes.
26407         * doc/install.texi (--with-multilib-list): Document the combination of
26408         aprofile and rmprofile values and warn about pitfalls in doing that.
26410 2017-05-05  Wilco Dijkstra  <wdijkstr@arm.com>
26412         * config/aarch64/aarch64.md (movsi_aarch64): Remove '*' from r=w.
26413         (movdi_aarch64): Likewise.
26415 2017-05-05  Jakub Jelinek  <jakub@redhat.com>
26417         PR tree-optimization/80632
26418         * tree-switch-conversion.c (struct switch_conv_info): Add target_vop
26419         field.
26420         (build_arrays): Initialize it for virtual phis.
26421         (fix_phi_nodes): Use it for virtual phis.
26423         PR tree-optimization/80558
26424         * tree-vrp.c (extract_range_from_binary_expr_1): Optimize
26425         [x, y] op z into [x op, y op z] for op & or | if conditions
26426         are met.
26428 2017-05-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
26429             Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
26431         PR target/71607
26432         * config/arm/arm.md (use_literal_pool): Remove.
26433         (64-bit immediate split): No longer takes cost into consideration
26434         if arm_disable_literal_pool is enabled.
26435         * config/arm/arm.c (arm_tls_referenced_p): Add diagnostic if TLS is
26436         used when arm_disable_literal_pool is enabled.
26437         (arm_max_const_double_inline_cost): Remove use of
26438         arm_disable_literal_pool.
26439         (push_minipool_fix): Add assert.
26440         (arm_reorg): Add return if arm_disable_literal_pool is enabled.
26441         * config/arm/vfp.md (no_literal_pool_df_immediate): New.
26442         (no_literal_pool_sf_immediate): New.
26444 2017-05-05  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
26446         PR tree-optimization/80613
26447         * tree-ssa-dce.c (propagate_necessity): Remove cases for
26448         BUILT_IN_STRDUP and BUILT_IN_STRNDUP.
26450 2017-05-05  Richard Biener  <rguenther@suse.de>
26452         * tree-ssa-pre.c (get_or_alloc_expr_for): Simplify.
26454 2017-05-05  Georg-Johann Lay  <avr@gjlay.de>
26456         * config/avr/avr.md [flag_strict_overflow]: Remove any occurence
26457         of this flag from insn conditions due to removal from r247495.
26459 2017-05-05  Wilco Dijkstra  <wdijkstr@arm.com>
26461         * config/arm/aarch-common.c (arm_early_load_addr_dep_ptr):
26462         New function.
26463         (arm_early_store_addr_dep_ptr): Likewise.
26464         * config/arm/aarch-common-protos.h
26465         (arm_early_load_addr_dep_ptr): Add prototype.
26466         (arm_early_store_addr_dep_ptr): Likewise.
26467         * config/arm/cortex-a53.md: Add new bypasses.
26469 2017-05-05  Jakub Jelinek  <jakub@redhat.com>
26471         * tree.c (next_type_uid): Change type to unsigned.
26472         (type_hash_canon): Decrement back next_type_uid if
26473         freeing a type node with the highest TYPE_UID.  For INTEGER_TYPEs
26474         also ggc_free TYPE_MIN_VALUE, TYPE_MAX_VALUE and TYPE_CACHED_VALUES
26475         if possible.
26477 2017-05-04  Martin Sebor  <msebor@redhat.com>
26479         * builtins.c: Fix a trivial typo in a comment.
26481         PR middle-end/79234
26482         * builtins.c (check_sizes): Adjust to handle reading past the end.
26483         Avoid printing excessive upper bound of ranges.  Use %E to print
26484         tree nodes instead of converting them to %wu.
26485         (expand_builtin_memchr): New function.
26486         (compute_dest_size): Rename...
26487         (compute_objsize): ...to this.
26488         (expand_builtin_memcpy): Adjust.
26489         (expand_builtin_mempcpy): Adjust.
26490         (expand_builtin_strcat): Adjust.
26491         (expand_builtin_strcpy): Adjust.
26492         (check_strncat_sizes): Adjust.
26493         (expand_builtin_strncat): Adjust.
26494         (expand_builtin_strncpy): Adjust and simplify.
26495         (expand_builtin_memset): Adjust.
26496         (expand_builtin_bzero): Adjust.
26497         (expand_builtin_memcmp): Adjust.
26498         (expand_builtin): Handle memcmp.
26499         (maybe_emit_chk_warning): Check strncat just once.
26501 2017-05-04  Martin Sebor  <msebor@redhat.com>
26503         PR preprocessor/79214
26504         PR middle-end/79222
26505         PR middle-end/79223
26506         * builtins.c (check_sizes): Add inlining context and issue
26507         warnings even when -Wno-system-headers is set.
26508         (check_strncat_sizes): Same.
26509         (expand_builtin_strncat): Same.
26510         (expand_builtin_memmove): New function.
26511         (expand_builtin_stpncpy): Same.
26512         (expand_builtin): Handle memmove and stpncpy.
26514 2017-05-04  Bin Cheng  <bin.cheng@arm.com>
26516         * tree-ssa-loop-ivopts.c (struct cost_pair): Remove field inv_expr
26517         which is not used any more.
26519 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
26521         * config/aarch64/aarch64.c (generic_tunings): Update prefetch model.
26523 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
26525         * config/aarch64/aarch64.c (cortexa35_tunings): Set jump alignment to 4.
26526         (cortexa53_tunings): Likewise.
26527         (cortexa57_tunings): Likewise.
26528         (cortexa72_tunings): Likewise.
26529         (cortexa73_tunings): Likewise.
26531 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
26533         * config/aarch64/aarch64.c (generic_tunings): Set jump alignment to 4.
26534         Set loop alignment to 8.
26536 2017-05-04  Martin Sebor  <msebor@redhat.com>
26538         PR translation/80280
26539         * builtins.c (expand_builtin_object_size): Add missing quoting to
26540         %D and like directives.
26541         * hsa-gen.c (hsa_type_for_scalar_tree_type): Same.
26542         (hsa_type_for_tree_type): Same.
26543         (verify_function_arguments): Same.
26544         * symtab.c (symbol_table::change_decl_assembler_name): Same.
26545         * varasm.c (get_section): Same.
26546         (mark_weak): Same.
26548 2017-05-04  Martin Sebor  <msebor@redhat.com>
26550         PR translation/80280
26551         * config/i386/i386.c (ix86_function_versions): Quote a %D directive.
26553 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
26555         * config/aarch64/aarch64.c (generic_addrcost_table):
26556         Change HI/TI mode setting.
26558 2017-05-04  Martin Jambor  <mjambor@suse.cz>
26560         PR tree-optimization/80622
26561         * tree-sra.c (comes_initialized_p): New function.
26562         (build_accesses_from_assign): Only set write lazily when
26563         comes_initialized_p is false.
26564         (analyze_access_subtree): Use comes_initialized_p.
26565         (propagate_subaccesses_across_link): Assert !comes_initialized_p
26566         instead of testing for PARM_DECL.
26568 2017-05-04  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26570         * config/aarch64/aarch64.md (prefetch); Adjust predicate and
26571         constraint on operand 0 to allow more general addressing modes.
26572         Adjust output template.
26573         * config/aarch64/aarch64.c (aarch64_address_valid_for_prefetch_p):
26574         New function.
26575         * config/aarch64/aarch64-protos.h
26576         (aarch64_address_valid_for_prefetch_p): Declare prototype.
26577         * config/aarch64/constraints.md (Dp): New address constraint.
26578         * config/aarch64/predicates.md (aarch64_prefetch_operand): New
26579         predicate.
26581 2017-05-04  Jan Hubicka  <hubicka@ucw.cz>
26583         * ipa-cp.c (perform_estimation_of_a_value): Drop base_time parameter;
26584         update use of estimate_ipcp_clone_size_and_time.
26585         (estimate_local_effects): Update use of
26586         estimate_ipcp_clone_size_and_time and perform_estimation_of_a_value.
26587         * ipa-inline.h (estimate_ipcp_clone_size_and_time): Update prototype.
26588         * ipa-inline-analysis.c (estimate_ipcp_clone_size_and_time):
26589         Return nonspecialized time.
26591 2017-05-04  Richard Biener  <rguenther@suse.de>
26593         * tree-ssa-alias.c (get_continuation_for_phi): Improve looking
26594         for the last VUSE which def dominates the PHI.  Directly call
26595         maybe_skip_until.
26596         (get_continuation_for_phi_1): Remove.
26598 2017-05-04  Richard Sandiford  <richard.sandiford@linaro.org>
26600         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): Add commentary
26601         to explain the use of truncating division.  Cap the number of
26602         iterations to the maximum given by nb_iterations_upper_bound,
26603         if defined.
26605 2017-05-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
26607         * configure.ac (--enable-mingw-wildcard): Add new configurable feature.
26608         * configure: Regenerate.
26609         * config.in: Regenerate.
26610         * config/i386/driver-mingw32.c: new file.
26611         * config/i386/x-mingw32: Add rule to build driver-mingw32.o.
26612         * config.host: Link driver-mingw32.o on MinGW host.
26613         * doc/install.texi: Document new --enable-mingw-wildcard configure
26614         option.
26616 2017-05-04  Marek Polacek  <polacek@redhat.com>
26618         PR tree-optimization/80612
26619         * calls.c (get_size_range): Check for INTEGRAL_TYPE_P.
26621 2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
26622             Andre Simoes Dias Vieira  <andre.simoesdiasvieira@arm.com>
26624         * config/arm/arm.md (movsi): Change TARGET_32BIT to TARGET_HAVE_MOVT.
26625         (movt splitter): Likewise.
26626         * config/arm/arm.c (arm_option_check_internal): Change arm_arch_thumb2
26627         to TARGET_HAVE_MOVT, and merge with -mslow-flash-data check.
26628         (const_ok_for_arm): Change else to else if (TARGET_THUMB2) and add else
26629         block for Thumb-1 with MOVT.
26630         (thumb2_legitimate_address_p): Move code block ...
26631         (can_avoid_literal_pool_for_label_p): ... into this new function.
26632         (thumb1_legitimate_address_p): Add check for TARGET_HAVE_MOVT and
26633         literal pool.
26634         (thumb_legitimate_constant_p): Add conditional on TARGET_HAVE_MOVT
26635         * doc/invoke.texi (-mpure-code): Change "ARMv7-M targets" for
26636         "M-profile targets with the MOVT instruction".
26638 2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
26640         * config/arm/arm-builtins.c (arm_init_builtins): Rename
26641         __builtin_arm_ldfscr to __builtin_arm_get_fpscr, and rename
26642         __builtin_arm_stfscr to __builtin_arm_set_fpscr.
26644 2017-05-04  Martin Liska  <mliska@suse.cz>
26646         * tree-vrp.c (simplify_cond_using_ranges_2): Remove unused
26647         variable cond_code.
26649 2017-05-04  Richard Biener  <rguenther@suse.de>
26651         * tree.c (array_at_struct_end_p): Handle arrays at struct
26652         end with flexarrays more conservatively.  Refactor and treat
26653         arrays of arrays or aggregates more strict.  Fix
26654         VIEW_CONVERT_EXPR handling.  Remove allow_compref argument.
26655         * tree.c (array_at_struct_end_p): Adjust prototype.
26656         * emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust.
26657         * gimple-fold.c (get_range_strlen): Likewise.
26658         * tree-chkp.c (chkp_may_narrow_to_field): Likewise.
26660 2017-05-04  Richard Biener  <rguenther@suse.de>
26662         PR tree-optimization/31130
26663         * tree-vrp.c (needs_overflow_infinity): Remove as always returning
26664         false.
26665         (supports_overflow_infinity): Likewise.
26666         (is_negative_overflow_infinity): Likewise.
26667         (is_positive_overflow_infinity): Likewise.
26668         (is_overflow_infinity): Likewise.
26669         (stmt_overflow_infinity): Likewise.
26670         (overflow_infinity_range_p): Likewise.
26671         (usable_range_p): Remove as always returning true.
26672         (make_overflow_infinity): Remove.
26673         (negative_overflow_infinity): Likewise.
26674         (positive_overflow_infinity): Likewise.
26675         (avoid_overflow_infinity): Likewise.
26676         (set_value_range): Adjust accordingly.
26677         (set_value_range_to_nonnegative): Likewise, remove now unused
26678         overflow_infinity arg.
26679         (vrp_operand_equal_p): Adjust.
26680         (update_value_range): Likewise.
26681         (range_int_cst_singleton_p): Likewise.
26682         (operand_less_p): Likewise.
26683         (compare_values_warnv): Likewise.
26684         (extract_range_for_var_from_comparison_expr): Likewise.
26685         (vrp_int_const_binop): Likewise.
26686         (zero_nonzero_bits_from_vr): Likewise.
26687         (extract_range_from_multiplicative_op_1): Likewise.
26688         (extract_range_from_binary_expr_1): Likewise.
26689         (extract_range_from_unary_expr): Likewise.
26690         (extract_range_from_comparison): Likewise.
26691         (extract_range_basic): Likewise.
26692         (adjust_range_with_scev): Likewise.
26693         (compare_ranges): Likewise.
26694         (compare_range_with_value): Likewise.
26695         (dump_value_range): Likewise.
26696         (test_for_singularity): Likewise, remove strict_overflow_p parameter
26697         never used.
26698         (simplify_cond_using_ranges): Adjust.
26700 2017-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
26702         * brig-builtins.def: Added a builtin for class_f64.
26703         * builtin-types.def: Added a builtin type needed by class_f64.
26705 2017-05-03  Jason Merrill  <jason@redhat.com>
26707         * timevar.def: Add TV_CONSTEXPR.
26709 2017-05-03  David Malcolm  <dmalcolm@redhat.com>
26711         * common.opt (fdiagnostics-parseable-fixits): Fix typo.
26713 2017-05-03  Martin Jambor  <mjambor@suse.cz>
26715         * ipa-prop.c (ipa_update_after_lto_read): Removed.
26716         * ipa-prop.h (ipa_update_after_lto_read): Remove declaration.
26717         * ipa-cp.c (ipcp_propagate_stage): Do not call
26718         ipa_update_after_lto_read.
26719         * ipa-inline.c (ipa_inline): Likewise.
26721 2017-05-03  Martin Jambor  <mjambor@suse.cz>
26723         * ipa-prop.h (ipa_edge_args): Make a class.  Mark with for_user GTY
26724         tag.  Added a default constructor and a destructor.
26725         (ipa_edge_args_sum_t): New class;
26726         (ipa_edge_args_sum): Declare.
26727         (ipa_edge_args_vector): Remove declaration.
26728         (IPA_EDGE_REF): Use ipa_edge_args_sum.
26729         (ipa_free_edge_args_substructures): Remove declaration.
26730         (ipa_check_create_edge_args): Use ipa_edge_args_sum.
26731         (ipa_edge_args_info_available_for_edge_p): Likewise.
26732         * ipa-prop.c (ipa_edge_args_vector): Removed.
26733         (edge_removal_hook_holder): Likewise.
26734         (edge_duplication_hook_holder): Likewise.
26735         (ipa_edge_args_sum): New variable.
26736         (ipa_propagate_indirect_call_infos): Test ipa_edge_args_sum instead of
26737         ipa_edge_args_vector.
26738         (ipa_free_edge_args_substructures): Likewise.
26739         (ipa_free_all_edge_args): Free ipa_edge_args_sum instead of
26740         ipa_edge_args_vector.
26741         (ipa_edge_removal_hook): Turned into method
26742         ipa_edge_args_sum_t::remove.
26743         (ipa_edge_duplication_hook): Turned into method
26744         ipa_edge_args_sum_t::duplicate.
26745         (ipa_register_cgraph_hooks): Create ipa_edge_args_sum instead of
26746         registering edge hooks.
26747         (ipa_unregister_cgraph_hooks): Do not unregister edge hooks.
26748         * ipa-inline-analysis.c (estimate_function_body_sizes): Test
26749         ipa_edge_args_sum instead of ipa_edge_args_vector.
26750         * ipa-profile.c (ipa_profile): Likewise.
26752 2017-05-03  Martin Jambor  <mjambor@suse.cz>
26754         * symbol-summary.h (function_summary): New method exists.
26755         (function_summary::symtab_removal): Deallocate through release.
26756         (call_summary): New class.
26757         (gt_ggc_mx): New overload.
26758         (gt_pch_nx): Likewise.
26759         (gt_pch_nx): Likewise.
26761 2017-05-03  Jeff Law  <law@redhat.com>
26763         PR tree-optimization/78496
26764         * tree-vrp.c (simplify_cond_using_ranges_1): Renamed
26765         from simplify_cond_using_ranges.  Split off code to walk
26766         backwards through casts into ...
26767         (simplify_cond_using_ranges_2): New function.
26768         (simplify_stmt_using_ranges): Call simplify_cond_using_ranges_1.
26769         (execute_vrp): After identifying jump threads, call
26770         simplify_cond_using_ranges_2.
26772 2017-05-03  Jan Hubicka  <hubicka@ucw.cz>
26774         PR bootstrap/80609
26775         * ipa-inline.h (inline_summary): Add ctor.
26776         (create_ggc): Do not use ggc_cleared_alloc.
26778 2017-05-03  Jeff Downs  <heydowns@somuchpressure.net>
26779             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26781         * gcc.c (handle_braces): Support escaping in switch matching
26782         text.
26783         * doc/invoke.texi (Spec Files): Document it.
26784         Remove superfluous @code markup in items.
26786 2017-05-03  David Malcolm  <dmalcolm@redhat.com>
26788         * diagnostic-show-locus.c (struct column_range): New struct.
26789         (get_affected_columns): New function.
26790         (get_printed_columns): New function.
26791         (struct correction): New struct.
26792         (correction::ensure_capacity): New function.
26793         (correction::ensure_terminated): New function.
26794         (struct line_corrections): New struct.
26795         (line_corrections::~line_corrections): New dtor.
26796         (line_corrections::add_hint): New function.
26797         (layout::print_trailing_fixits): Reimplement in terms of the new
26798         classes.
26799         (selftest::test_overlapped_fixit_printing): New function.
26800         (selftest::diagnostic_show_locus_c_tests): Call it.
26802 2017-05-03  Nathan Sidwell  <nathan@acm.org>
26804         Canonicalize canonical type hashing
26805         * tree.h (type_hash_canon_hash): Declare.
26806         * tree.c (type_hash_list, attribute_hash_list): Move into
26807         type_hash_canon_hash.
26808         (build_type_attribute_qual_variant): Break out hash code calc into
26809         type_hash_canon_hash.
26810         (type_hash_canon_hash): New.  Generic type hash computation.
26811         (build_range_type_1, build_array_type_1, build_function_type,
26812         build_method_type_directly, build_offset_type, build_complex_type,
26813         make_vector_type): Call it.
26815 2017-05-03  Richard Biener  <rguenther@suse.de>
26817         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
26818         When all DRs have unknown misaligned do not always peel
26819         when there is a store but apply the same costing model as if
26820         there were only loads.
26822 2017-05-03  Richard Biener  <rguenther@suse.de>
26824         Revert
26825         PR tree-optimization/80492
26826         * tree-ssa-alias.c (decl_refs_may_alias_p): Handle
26827         compare_base_decls returning dont-know properly.
26829 2017-05-03  Thomas Preud'homme  <thomas.preudhomme@arm.com>
26831         * config/arm/iterators.md (CCSI): New mode iterator.
26832         (arch): New mode attribute.
26833         * config/arm/sync.md (atomic_compare_and_swap<mode>_1): Rename into ...
26834         (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1): This and ...
26835         (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): This.  Use CCSI
26836         code iterator for success result mode.
26837         * config/arm/arm.c (arm_expand_compare_and_swap): Adapt code to use
26838         the corresponding new insn generators.
26840 2017-05-03  Bin Cheng  <bin.cheng@arm.com>
26842         Revert r247509
26843         2017-05-02  Bin Cheng  <bin.cheng@arm.com>
26844         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
26846 2017-05-03  Richard Sandiford  <richard.sandiford@linaro.org>
26848         * tree-data-ref.h (SUB_CONFLICTS_IN_A): Wrap SUB argument in brackets.
26849         (SUB_CONFLICTS_IN_B, SUB_LAST_CONFLICT, SUB_DISTANCE): Likewise.
26850         (DDR_A): Wrap DDR argument in brackets.
26851         (DDR_B, DDR_AFFINE_P, DDR_ARE_DEPENDENT, DDR_SUBSCRIPTS): Likewise.
26852         (DDR_LOOP_NEST, DDR_INNER_LOOP, DDR_SELF_REFERENCE): Likewise.
26853         (DDR_REVERSED_P): Likewise.
26855 2017-05-03  Jakub Jelinek  <jakub@redhat.com>
26857         PR tree-optimization/79472
26858         * tree-switch-conversion.c (struct switch_conv_info): Add
26859         contiguous_range and default_case_nonstandard fields.
26860         (collect_switch_conv_info): Compute contiguous_range and
26861         default_case_nonstandard fields, don't clear final_bb if
26862         contiguous_range and only the default case doesn't have the required
26863         structure.
26864         (check_all_empty_except_final): Set default_case_nonstandard instead
26865         of failing if contiguous_range and the default case doesn't have empty
26866         block.
26867         (check_final_bb): Add SWTCH argument, don't fail if contiguous_range
26868         and only the default case doesn't have the required constants.  Skip
26869         virtual phis.
26870         (gather_default_values): Skip virtual phis.  Allow non-NULL CASE_LOW
26871         if default_case_nonstandard.
26872         (build_constructors): Build constant 1 just once.  Assert that default
26873         values aren't inserted in between cases if contiguous_range.  Skip
26874         virtual phis.
26875         (build_arrays): Skip virtual phis.
26876         (prune_bbs): Add DEFAULT_BB argument, don't remove that bb.
26877         (fix_phi_nodes): Don't add e2f phi arg if default_case_nonstandard.
26878         Handle virtual phis.
26879         (gen_inbound_check): Handle default_case_nonstandard case.
26880         (process_switch): Adjust check_final_bb caller.  Call
26881         gather_default_values with the first non-default case instead of
26882         default case if default_case_nonstandard.
26884 2017-05-02  Nathan Sidwell  <nathan@acm.org>
26886         * ggc-page.c (move_ptes_to_front): Replace unsigned >0 with i--
26887         check.  Fix formatting.
26889 2017-05-02  Jan Hubicka  <hubicka@ucw.cz>
26891         * ipa-inline-analysis.c (estimate_node_size_and_time): Allow roundoff
26892         errors when comparing specialized and unspecialized times.
26894 2017-05-02  David Malcolm  <dmalcolm@redhat.com>
26896         * diagnostic-show-locus.c
26897         (layout::should_print_annotation_line_p): Make private.
26898         (layout::print_annotation_line): Make private.
26899         (layout::annotation_line_showed_range_p): Make private.
26900         (layout::show_ruler): Make private.
26901         (layout::print_source_line): Make private.  Pass in line and
26902         line_width, rather than calling location_get_source_line.  Drop
26903         returned value.
26904         (layout::print_leading_fixits): New method.
26905         (layout::print_any_fixits): Rename to...
26906         (layout::print_trailing_fixits): ...this, and make private.
26907         Don't print newline fixits.
26908         (diagnostic_show_locus): Move logic for printing one row into...
26909         (layout::print_line): ...this new function.  Move the
26910         location_get_source_line call and error-handling from
26911         print_source_line to here.  Call print_leading_fixits, and rename
26912         print_any_fixits to print_trailing_fixits.
26913         (selftest::test_fixit_insert_containing_newline): Update now that
26914         newlines are partially supported.
26915         (selftest::test_fixit_insert_containing_newline_2): New test.
26916         (selftest::test_fixit_replace_containing_newline): Update comments.
26917         (selftest::diagnostic_show_locus_c_tests): Call the new test.
26918         * edit-context.c (class added_line): New class.
26919         (class edited_line): Describe newline handling in comment.
26920         (edited_line::actually_edited_p): New method.
26921         (edited_line::print_content): Delete redundant decl.
26922         (edited_line::m_predecessors): New field.
26923         (edited_file::print_content): Call edited_line::print_content.
26924         (edited_file::print_diff): Update to support newlines.
26925         (edited_file::print_diff_hunk): Likewise.
26926         (edited_file::print_run_of_changed_lines): New function.
26927         (edited_file::print_diff_line): Convert to...
26928         (print_diff_line): ...this.
26929         (edited_file::get_effective_line_count): New function.
26930         (edited_line::edited_line): Initialize new field m_predecessors.
26931         (edited_line::~edited_line): Clean up m_predecessors.
26932         (edited_line::apply_fixit): Handle newlines.
26933         (edited_line::get_effective_line_count): New function.
26934         (edited_line::print_content): New function.
26935         (edited_line::print_diff_lines): New function.
26936         (selftest::test_applying_fixits_insert_containing_newline): New
26937         test.
26938         (selftest::test_applying_fixits_replace_containing_newline): New
26939         test.
26940         (selftest::insert_line): New function.
26941         (selftest::test_applying_fixits_multiple_lines): Add example of
26942         inserting a line.
26943         (selftest::edit_context_c_tests): Call the new tests.
26945 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
26947         * tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Delete
26948         parameter cand.  Update dump information.
26949         (get_computation_cost): Update uses.
26951 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
26953         * tree-ssa-loop-ivopts.c (get_computation_aff_1): New.
26954         (get_computation_aff): Reorder parameters.  Use get_computation_aff_1.
26955         (get_computation_at, rewrite_use_address): Update use of
26956         get_computation_aff.
26958 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
26960         * tree-ssa-loop-ivopts.c (get_computation_at): Reorder parameters.
26961         (get_computation): Delete.
26962         (get_computation_cost): Implement like get_computation_cost_at.
26963         Use get_computation_at.
26964         (get_computation_cost_at): Delete.
26965         (rewrite_use_nonlinear_expr): Use get_computation_at.
26966         (rewrite_use_compare, remove_unused_ivs): Ditto.
26968 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
26970         * tree-ssa-loop-ivopts.c (rewrite_use_address): Simple refactor.
26972 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
26974         * tree-ssa-loop-ivopts.c (struct iv_ca): Rename n_regs to n_invs.
26975         (ivopts_global_cost_for_size): Rename parameter and update uses.
26976         (iv_ca_recount_cost): Update uses.
26977         (iv_ca_set_remove_invs, iv_ca_set_no_cp): Record invariants and
26978         candidates seperately in n_invs and n_cands.
26979         (iv_ca_set_add_invs, iv_ca_set_cp, iv_ca_new): Ditto.
26981 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
26983         * tree-ssa-loop-ivopts.c (struct walk_tree_data): New.
26984         (find_inv_vars_cb): New.
26985         (find_depends): Renamed to ...
26986         (find_inv_vars): ... this.
26987         (add_candidate_1, force_var_cost): Call find_inv_vars.
26988         (split_address_cost, determine_group_iv_cost_cond): Ditto.
26990 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
26992         * tree-ssa-loop-ivopts.c (struct cost_pair): Rename depends_on to
26993         inv_vars.  Add inv_exprs.
26994         (struct iv_cand): Rename depends_on to inv_vars.
26995         (struct ivopts_data): Rename max_inv_id/n_invariant_uses to
26996         max_inv_var_id/n_inv_var_uses.  Move max_inv_expr_id around.
26997         Refactor field used_inv_exprs from has_map to array n_inv_expr_uses.
26998         (dump_cand): Dump inv_vars.
26999         (tree_ssa_iv_optimize_init): Support inv_vars and inv_exprs.
27000         (record_invariant, find_depends, add_candidate_1): Ditto.
27001         (set_group_iv_cost, force_var_cost): Ditto.
27002         (split_address_cost, ptr_difference_cost, difference_cost): Ditto.
27003         (get_computation_cost_at, get_computation_cost): Ditto.
27004         (determine_group_iv_cost_generic): Ditto.
27005         (determine_group_iv_cost_address): Ditto.
27006         (determine_group_iv_cost_cond, autoinc_possible_for_pair): Ditto.
27007         (determine_group_iv_costs): Ditto.
27008         (iv_ca_recount_cost): Update call to ivopts_global_cost_for_size.
27009         (iv_ca_set_remove_invariants): Renamed to ...
27010         (iv_ca_set_remove_invs): ... this.  Support inv_vars and inv_exprs.
27011         (iv_ca_set_no_cp): Use iv_ca_set_remove_invs.
27012         (iv_ca_set_add_invariants):  Renamed to ...
27013         (iv_ca_set_add_invs): ... this.  Support inv_vars and inv_exprs.
27014         (iv_ca_set_cp): Use iv_ca_set_add_invs.
27015         (iv_ca_has_deps): Support inv_vars and inv_exprs.
27016         (iv_ca_new, iv_ca_free, iv_ca_dump, free_loop_data): Ditto.
27017         (create_new_ivs): Remove useless dump.
27019 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
27021         * tree-ssa-loop-ivopts.c (get_computation_cost_at): Remove pseudo
27022         iv_cand code.
27023         (determine_group_iv_cost_cond, determine_iv_cost): Ditto.
27024         (iv_ca_set_no_cp, create_new_iv): Ditto.
27026 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
27028         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
27030 2017-05-02  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
27032         * tree.h (EXPR_CILK_SPAWN): Use macro TREE_CHECK2 instead of
27033         function tree_check2.
27035 2017-05-02  Martin Liska  <mliska@suse.cz>
27037         * doc/gcov.texi: Add missing preposition.
27038         * gcov.c (function_info::function_info): Properly fill up
27039         all member variables.
27041 2017-05-02  Tamar Christina  <tamar.christina@arm.com>
27043         * expr.c (expand_expr_real_2): Re-cost if previous costs are the same.
27045 2017-05-02  Tamar Christina  <tamar.christina@arm.com>
27047         * simplify-rtx.c (simplify_binary_operation_1): Add LSHIFTRT case.
27049 2017-05-02  Martin Liska  <mliska@suse.cz>
27051         PR lto/77954.
27052         * lto-streamer-in.c (lto_read_tree_1): Remove
27053         LTO_STREAMER_DEBUG.
27054         * lto-streamer.c (struct tree_hash_entry): Likewise.
27055         (struct tree_entry_hasher): Likewise.
27056         (tree_entry_hasher::hash): Likewise.
27057         (tree_entry_hasher::equal): Likewise.
27058         (lto_streamer_init): Likewise.
27059         (lto_orig_address_map): Likewise.
27060         (lto_orig_address_get): Likewise.
27061         (lto_orig_address_remove): Likewise.
27062         * lto-streamer.h: Likewise.
27063         * tree-streamer-in.c (streamer_alloc_tree): Likewise.
27064         * tree-streamer-out.c (streamer_write_tree_header): Likewise.
27066 2017-05-02  Sebastian Peryt  <sebastian.peryt@intel.com>
27068         * config/i386/avx512fintrin.h (_mm_mask_add_round_sd)
27069         (_mm_maskz_add_round_sd, _mm_mask_add_round_ss)
27070         (mm_maskz_add_round_ss, _mm_mask_sub_round_sd)
27071         (mm_maskz_sub_round_sd, _mm_mask_sub_round_ss)
27072         (mm_maskz_sub_round_ss, _mm_mask_add_sd)
27073         (mm_maskz_add_sd, _mm_mask_add_ss, _mm_maskz_add_ss)
27074         (mm_mask_sub_sd, _mm_maskz_sub_sd, _mm_mask_sub_ss)
27075         (mm_maskz_sub_ss): New intrinsics.
27076         * config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
27077         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
27078         * config/i386/i386-builtin.def (__builtin_ia32_addsd_mask_round)
27079         (__builtin_ia32_addss_mask_round, __builtin_ia32_subsd_mask_round)
27080         (__builtin_ia32_subss_mask_round): New builtins.
27081         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
27082         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
27083         * config/i386/sse.md (<sse>_vm<plusminus_insn><mode>3<round_name>):
27084         Renamed to ...
27085         (<sse>_vm<plusminus_insn><mode>3<mask_name><round_name>): ... this.
27086         (v<plusminus_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
27087         Changed to ...
27088         (v<plusminus_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
27089         ... this.
27091 2017-05-02  Martin Jambor  <mjambor@suse.cz>
27093         PR tree-optimization/78687
27094         * tree-sra.c (access): New field parent.
27095         (process_subtree_disqualification): New function.
27096         (disqualify_candidate): Call it.
27097         (build_accesses_from_assign): Reset write flag if creating an
27098         assighnment link.
27099         (build_access_subtree): Fill in parent field and also prpagate
27100         down grp_write flag.
27101         (create_artificial_child_access): New parameter set_grp_write, set
27102         grp_write to its value.
27103         (propagate_subaccesses_across_link): Also propagate grp_write flag
27104         values.
27105         (propagate_all_subaccesses): Push the closest parent back to work
27106         queue if add_access_to_work_queue returned true.
27108 2017-05-02  Richard Biener  <rguenther@suse.de>
27110         * common.opt (fstrict-overflow): Alias negative to fwrapv.
27111         * doc/invoke.texi (fstrict-overflow): Remove all traces of
27112         -fstrict-overflow documentation.
27113         * tree.h (TYPE_OVERFLOW_UNDEFINED): Do not test flag_strict_overflow.
27114         (POINTER_TYPE_OVERFLOW_UNDEFINED): Test !flag_wrapv instead of
27115         flag_strict_overflow.
27116         * ipa-inline.c (can_inline_edge_p): Do not test flag_strict_overflow.
27117         * lto-opts.c (lto_write_options): Do not stream it.
27118         * lto-wrapper.c (merge_and_complain): Do not handle it.
27119         * opts.c (default_options_table): Do not set -fstrict-overflow.
27120         (finish_options): Likewise do not clear it when sanitizing.
27121         * simplify-rtx.c (simplify_const_relational_operation): Do not
27122         test flag_strict_overflow.
27124 2017-05-02  Uros Bizjak  <ubizjak@gmail.com>
27126         * config/alpha/alpha.md (*add<mode>3_ieee): Merge to add<mode>3
27127         using enabled attribute.
27128         (*sub<mode>3_ieee): Merge to sub<mode>3 using enabled attribute.
27129         (*mul<mode>3_ieee): Merge to mul<mode>3 using enabled attribute.
27130         (*div<mode>3_ieee): Merge to div<mode>3 using enabled attribute.
27131         (*sqrt<mode>2_ieee): Merge to sqrt<mode>2 using enabled attribute.
27132         (*fix_truncdfdi_ieee): Merge to *fix_truncdfdi2 using enabled attribute.
27133         (*fix_truncsfdi_ieee): Merge to *fix_truncsfdi2 using enabled attribute.
27134         (*floatdisf_ieee): Merge to floatdisf2 using enabled attribute.
27135         (*floatdidf_ieee): Merge to floatdidf2 using enabled attribute.
27136         (*truncdfsf2_ieee): Merge to truncdfsf2 using enabled attribute.
27137         (*cmpdf_ieee): Merge to *cmpdf_internal using enabled attribute.
27139 2017-05-02  Uros Bizjak  <ubizjak@gmail.com>
27141         * config/i386/i386.c (ix86_code_end): Use {FIRST,LAST}_INT_REG.
27143 2017-05-02  Richard Biener  <rguenther@suse.de>
27145         PR tree-optimization/80591
27146         Revert
27147         2017-04-10  Richard Biener  <rguenther@suse.de>
27149         * tree-ssa-structalias.c (find_func_aliases): Properly handle
27150         asm inputs.
27152 2017-05-02  Richard Biener  <rguenther@suse.de>
27154         PR tree-optimization/80549
27155         * tree-cfgcleanup.c (mfb_keep_latches): New helper.
27156         (cleanup_tree_cfg_noloop): Create forwarders to known loop
27157         headers if they do not have a preheader.
27159 2017-05-02  Martin Liska  <mliska@suse.cz>
27161         PR other/80589
27162         * common.opt: Fix typo.
27163         * doc/invoke.texi: Likewise.
27165 2017-05-01  Jan Beulich  <jbeulich@suse.com>
27167         * config/i386/sse.md (xop_vpermil2<mode>3): Do not allow operand
27168         swapping, add (x,x,m,x,n) alternative.
27170 2017-05-01  Nathan Sidwell  <nathan@acm.org>
27172         * calls.c (combine_pending_stack_adjustment_and_call): Remove
27173         unnecessary unadjusted_alignment check.
27175 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
27177         PR c++/80038
27178         * cilk_common.c (expand_builtin_cilk_detach): Move pedigree
27179         operations here.
27180         * gimplify.c (gimplify_cilk_detach): New function.
27181         (gimplify_call_expr, gimplify_modify_expr): Call it as needed.
27182         * tree-core.h: Document EXPR_CILK_SPAWN.
27183         * tree.h (EXPR_CILK_SPAWN): Define.
27185 2017-05-01  David Malcolm  <dmalcolm@redhat.com>
27187         * diagnostic-show-locus.c (layout::get_expanded_location): Rewrite
27188         to use new fixit_hint representation, using the "replace" logic.
27189         (get_line_span_for_fixit_hint): Likewise.
27190         (layout::print_any_fixits): Likewise.
27191         (selftest::test_one_liner_many_fixits): Rename to...
27192         (selftest::test_one_liner_many_fixits_1): ...this, and update
27193         comment and expected output to reflect that the multiple fix-it
27194         hints are now consolidated into one insertion.
27195         (selftest::test_one_liner_many_fixits_2): New test.
27196         (selftest::test_diagnostic_show_locus_one_liner): Update for
27197         above.
27198         (selftest::test_fixit_consolidation): Update for fix-it API
27199         change.
27200         * diagnostic.c (print_parseable_fixits): Likewise.
27201         * edit-context.c (edited_line::m_line_events): Convert from
27202         auto_vec <line_event *> to auto_vec <line_event>.
27203         (class line_event): Convert from abstract base class to a concrete
27204         class, taking over the role of replace_event.
27205         (class insert_event): Delete.
27206         (class replace_event): Rename to class line_event.  Convert to
27207         half-open range.
27208         (edit_context::add_fixits): Reimplement.
27209         (edit_context::apply_insert): Delete.
27210         (edit_context::apply_replace): Rename to...
27211         (edit_context::apply_fixit): ...this.  Convert to half-open range.
27212         (edited_file::apply_insert): Delete.
27213         (edited_file::apply_replace): Rename to...
27214         (edited_file::apply_fixit): ...this.
27215         (edited_line::~edited_line): Drop deletion of events.
27216         (edited_line::apply_insert): Delete.
27217         (edited_line::apply_replace): Rename to...
27218         (edited_line::apply_fixit): ...this.  Convert to half-open range.
27219         Update for change to type of m_line_events.
27220         * edit-context.h (edit_context::apply_insert): Delete.
27221         (edit_context::apply_replace): Rename to...
27222         (edit_context::apply_fixit): ...this.
27224 2017-05-01  Martin Sebor  <msebor@redhat.com>
27226         * gimple-ssa-sprintf.c (format_integer): Set knownrange when it's
27227         known.
27229 2017-05-01  Uros Bizjak  <ubizjak@gmail.com>
27231         PR target/68491
27232         * config/i386/cpuid.h (__get_cpuid): Always return 0 when
27233         __get_cpuid_max returns 0.
27234         (__get_cpuid_count): Ditto.
27236 2017-05-01  Eric Botcazou  <ebotcazou@adacore.com>
27238         * tree.c (substitute_in_expr) <tcc_vl_exp>: Also inline a call if the
27239         replacement expression is another instance of one of its arguments.
27241 2017-05-01  Jakub Jelinek  <jakub@redhat.com>
27243         PR target/79430
27244         * rtlanal.c (reg_set_p): If reg is a stack_pointer_rtx, also
27245         check for stack push/pop autoinc.
27246         * config/i386/i386.c (ix86_agi_dependent): Return false
27247         if the only reason why modified_in_p returned true is that
27248         addr is SP based and set_insn is a push or pop.
27250 2017-04-29  Jan Hubicka  <hubicka@ucw.cz>
27252         * ipa-inline.c (compute_inlined_call_time): Remove now unnecesary
27253         overflow check.
27255 2017-04-29  Jan Hubicka  <hubicka@ucw.cz>
27257         PR ipa/79224
27258         * ipa-inline-analysis.c (dump_predicate): Add optional parameter NL.
27259         (account_size_time): Use two predicates - exec_pred and
27260         nonconst_pred_ptr.
27261         (evaluate_conditions_for_known_args): Compute both clause and
27262         nonspec_clause.
27263         (evaluate_properties_for_edge): Evaulate both clause and nonspec_clause.
27264         (inline_summary_t::duplicate): Update.
27265         (estimate_function_body_sizes): Caluculate exec and nonconst predicates
27266         separately.
27267         (compute_inline_parameters): Likewise.
27268         (estimate_edge_size_and_time): Update caluclation of time.
27269         (estimate_node_size_and_time): Compute both time and nonspecialized
27270         time.
27271         (estimate_ipcp_clone_size_and_time): Update.
27272         (inline_merge_summary): Update.
27273         (do_estimate_edge_time): Update.
27274         (do_estimate_edge_size): Update.
27275         (do_estimate_edge_hints): Update.
27276         (inline_read_section, inline_write_summary): Stream both new predicates.
27277         * ipa-inline.c (compute_uninlined_call_time): Take uninlined_call_time
27278         as argument.
27279         (compute_inlined_call_time): Cleanup.
27280         (big_speedup_p): Update.
27281         (edge_badness): Update.
27282         * ipa-inline.h (INLINE_TIME_SCALE): Remove.
27283         (size_time_entry): Replace predicate by exec_predicate and
27284         nonconst_predicate.
27285         (edge_growth_cache_entry): Cache both time nad nonspecialized time.
27286         (estimate_edge_time): Return also nonspec_time.
27287         (reset_edge_growth_cache): Update.
27289 2017-04-29  Jakub Jelinek  <jakub@redhat.com>
27291         PR rtl-optimization/80491
27292         * ifcvt.c (noce_process_if_block): When looking for x setter
27293         with missing else_bb, don't check only the insn right before
27294         cond_earliest, but look for the last insn that x is modified in
27295         within the same bb.
27297         PR rtl-optimization/80491
27298         * alias.c (memory_modified_in_insn_p): Return true for CALL_INSNs.
27300 2017-04-29  Marc Glisse  <marc.glisse@inria.fr>
27302         PR tree-optimization/80487
27303         * tree-ssa-alias.c (stmt_kills_ref_p): Handle stpncpy and strncpy.
27305 2017-04-29  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
27307         PR tree-optimization/79697
27308         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Check if callee
27309         is BUILT_IN_STRDUP, BUILT_IN_STRNDUP, BUILT_IN_REALLOC.
27310         (propagate_necessity): Check if def_callee is BUILT_IN_STRDUP or
27311         BUILT_IN_STRNDUP.
27312         * gimple-fold.c (gimple_fold_builtin_realloc): New function.
27313         (gimple_fold_builtin): Call gimple_fold_builtin_realloc.
27315 2017-04-28  Martin Sebor  <msebor@redhat.com>
27317         PR tree-optimization/80523
27318         * gimple-ssa-sprintf.c (target_to_host_charmap): New global variable.
27319         (init_target_to_host_charmap, target_to_host, target_strtol10): New
27320         functions.
27321         (maybe_warn, format_directive, parse_directive): Use new functions.
27322         (pass_sprintf_length::execute): Call init_target_to_host_charmap.
27324 2017-04-28  Marc Glisse  <marc.glisse@inria.fr>
27326         * match.pd (X+Z OP Y+Z, X-Z OP Y-Z, Z-X OP Z-Y): New transformations.
27328 2017-04-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
27330         * configure.ac (SYSTEM_HEADER_DIR, BUILD_SYSTEM_HEADER_DIR,
27331         target_header_dir): Set correctly.
27332         * configure: Regenerated.
27333         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
27334         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
27335         instead of SYSTEM_HEADER_DIR.
27337 2017-04-28  Jan Hubicka  <hubicka@ucw.cz>
27339         * ipa-cp.c (perform_estimation_of_a_value): Turn time to sreal.
27340         (estimate_local_effects): Likewise.
27341         * ipa-inline.c (compute_inlined_call_time, want_inline_small_function_p,
27342         edge_badness, inline_small_functions, dump_overall_stats): LIkewise.
27343         * ipa-inline.h (edge_growth_cache_entry, estimate_time_after_inlining,
27344         estimate_ipcp_clone_size_and_time, do_estimate_edge_time,
27345         do_estimate_edge_time, estimate_edge_time): Likewise.
27346         * ipa-inline-analysis.c (estimate_node_size_and_time,
27347         estimate_ipcp_clone_size_and_time, do_estimate_edge_time): Likewise.
27348         (estimate_time_after_inlining): Remove.
27350 2017-04-28  Martin Liska  <mliska@suse.cz>
27352         * doc/gcov.texi: Enhance documentation of gcov.
27354 2017-04-28  Martin Liska  <mliska@suse.cz>
27356         * doc/gcov.texi: Sort options in alphabetic order.
27357         * doc/gcov-dump.texi: Likewise.
27358         * doc/gcov-tool.texi: Likewise.
27359         * gcov.c (print_usage): Likewise.
27360         * gcov-dump.c (print_usage): Likewise.
27361         * gcov-tool.c (print_merge_usage_message): Likewise.
27362         (print_rewrite_usage_message): Likewise.
27363         (print_overlap_usage_message): Likewise.
27365 2017-04-28  Martin Liska  <mliska@suse.cz>
27367         PR gcov-profile/53915
27368         * gcov.c (format_gcov): Print 'NAN %' when top > bottom.
27370 2017-04-28  Martin Liska  <mliska@suse.cz>
27372         PR gcov-profile/79891
27373         * gcov.c (add_line_counts): Assign BBs to lines just if the BB
27374         is marked by compiler as living on a line.
27375         (get_cycles_count): Remove usage of the union.
27376         (output_intermediate_file): Likewise.
27377         (find_source): Fix GNU coding style.
27378         (accumulate_line_counts): Remove old non-all block mode.
27379         (output_lines): Remove usage of the union.
27380         * profile.c (output_location): Include all BBs, even if
27381         belonging to a same line (and file) as a previous BB.
27383 2017-04-28  Martin Liska  <mliska@suse.cz>
27385         * gcov.c (process_args): Handle new argument 'w'.
27386         (read_graph_file): Assign ID to BBs.
27387         (output_branch_count): Display BB # if verbose flag is set.
27388         (output_lines): Likewise for arcs.
27389         (print_usage): Add '--verbose' option help.
27390         * doc/gcov.texi: Document --verbose (-w) option.
27392 2017-04-28  Martin Liska  <mliska@suse.cz>
27394         * gcov.c (struct block_location_info): New struct.
27395         (process_file): Fill up the new structure.
27396         (read_graph_file): Replace usage of encoding by the newly added
27397         struct.
27398         (add_line_counts): Likewise.
27399         (accumulate_line_counts): Remove usage of the union.
27400         (function_info::function_info): New function.
27401         (function_info::~function_info): Likewise.
27402         (process_file): Call delete instead of release_function.
27403         (release_function): Release the function.
27404         (release_structures): Call delete instead of release_function.
27405         (solve_flow_graph): Replace usage of num_blocks.
27406         (find_exception_blocks): Likewise.
27407         (output_lines): Fix GNU coding style.
27409 2017-04-28  Martin Liska  <mliska@suse.cz>
27411         PR driver/56469
27412         * coverage.c (coverage_remove_note_file): New function.
27413         * coverage.h: Declare the function.
27414         * toplev.c (finalize): Clean if an error has been seen.
27416 2017-04-28  Martin Liska  <mliska@suse.cz>
27418         PR gcov-profile/80031
27419         * gcov-dump.c (tag_blocks): Just print number of basic blocks.
27420         * gcov-io.h (GCOV_TAG_BLOCKS_NUM): Remove unused macro.
27421         * gcov.c (read_graph_file): Read just number of blocks.
27422         * profile.c (branch_prob): Do not stream 0 flags per a basic
27423         block.
27425 2017-04-28  Martin Liska  <mliska@suse.cz>
27427         * gcov-dump.c (tag_*): Add new argument to declarations.
27428         (dump_gcov_file): Likewise.
27429         (tag_blocks): Add and use new argument depth.
27430         (tag_arcs): Likewise.
27431         (tag_lines): Likewise.
27432         (tag_counters): Likewise.
27433         (tag_summary): Likewise.
27434         (dump_working_sets): Use depth to do a proper indentation.
27436 2017-04-28  Jakub Jelinek  <jakub@redhat.com>
27438         PR bootstrap/80531
27439         * cgraph.h (symtab_node::debug_symtab): No longer inline.
27440         * symtab.c (symtab_node::debug_symtab): Move definition here.
27442 2017-04-28  Richard Biener  <rguenther@suse.de>
27444         * lto-streamer.h (LTO_major_version): Bump to 7.
27446 2017-04-28  Richard Biener  <rguenther@suse.de>
27448         * tree-vrp.c (assert_info): New struct.
27449         (add_assert_info): New helper.
27450         (register_edge_assert_for_2): Refactor to add asserts to a vector
27451         of assert_info.
27452         (register_edge_assert_for_1): Likewise.
27453         (register_edge_assert_for): Likewise.
27454         (finish_register_edge_assert_for): New helper actually registering
27455         asserts where live on edge.
27456         (find_conditional_asserts): Adjust.
27457         (find_switch_asserts): Likewise.
27458         (evrp_dom_walker::try_find_new_range): Generalize.
27459         (evrp_dom_walker::before_dom_children): Use register_edge_assert_for.
27461 2017-04-27  Marek Polacek  <polacek@redhat.com>
27463         PR sanitizer/80349
27464         * fold-const.c (fold_binary_loc) <case EQ_EXPR, NE_EXPR>: Convert
27465         arg10 and arg11 to itype.
27467 2017-04-27  Jonathan Wakely  <jwakely@redhat.com>
27469         * doc/extend.texi (Object Size Checking): Improve grammar.
27471 2017-04-27  Richard Earnshaw  <rearnsha@arm.com>
27473         PR target/80530
27474         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Ensure
27475         that the logic for permitting reciprocal estimates matches that
27476         in use_rsqrt_p.
27478 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
27480         PR c++/80534
27481         * tree.c (type_cache_hasher::equal): Only compare
27482         TYPE_TYPELESS_STORAGE flag on non-aggregate element types.
27483         (build_array_type_1): Only hash TYPE_TYPELESS_STORAGE flag on
27484         non-aggregate element types.
27485         * tree.h (TYPE_TYPELESS_STORAGE): Fix comment typo, add more details
27486         about the flag on ARRAY_TYPEs in the comment, formatting fix.
27488 2017-04-27  Richard Biener  <rguenther@suse.de>
27490         PR middle-end/80533
27491         * emit-rtl.c (set_mem_attributes_minus_bitpos): When
27492         stripping ARRAY_REFs from MEM_EXPR make sure we're not
27493         keeping a reference to a trailing array.
27495 2017-04-27  Richard Biener  <rguenther@suse.de>
27497         PR middle-end/80539
27498         * tree-chrec.c (chrec_fold_plus_poly_poly): Deal with not
27499         being in loop-closed SSA form conservatively.
27500         (chrec_fold_multiply_poly_poly): Likewise.
27502 2017-04-27  Tamar Christina  <tamar.christina@arm.com>
27504         PR middle-end/79665
27505         * expr.c (expand_expr_real_2): Move TRUNC_MOD_EXPR, FLOOR_MOD_EXPR,
27506         CEIL_MOD_EXPR, ROUND_MOD_EXPR cases.
27508 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
27510         PR target/77728
27511         * config/aarch64/aarch64.c (struct aarch64_fn_arg_alignment): Remove.
27512         (aarch64_function_arg_alignment): Return unsigned int again, but still
27513         ignore TYPE_FIELDS chain decls other than FIELD_DECLs.
27514         (aarch64_layout_arg): Adjust aarch64_function_arg_alignment caller.
27515         Don't emit -Wpsabi note.
27516         (aarch64_function_arg_boundary): Likewise.
27517         (aarch64_gimplify_va_arg_expr): Adjust aarch64_function_arg_alignment
27518         caller.
27520 2017-04-26  Nathan Sidwell  <nathan@acm.org>
27522         * tree.h (crc32_unsigned_n): Declare.
27523         (crc32_unsigned, crc32_unsigned): Make inline.
27524         * tree.c (crc32_unsigned_bits): Replace with ...
27525         (crc32_unsigned_n): ... this.
27526         (crc32_unsigned, crc32_byte): Remove.
27527         (crc32_string): Remove unnecessary braces.
27529 2017-04-25  Jan Hubicka  <hubicka@ucw.cz>
27531         * ipa-cp.c (estimate_local_effects): Convert sreal to int.
27532         * ipa-inline-analysis.c (MAX_TIME): Remove.
27533         (account_size_time): Use sreal for time.
27534         (dump_inline_summary): Update.
27535         (estimate_function_body_sizes): Update.
27536         (estimate_edge_size_and_time): Update.
27537         (estimate_calls_size_and_time): Update.
27538         (estimate_node_size_and_time): Update.
27539         (inline_merge_summary): Update.
27540         (inline_update_overall_summary): Update.
27541         (estimate_time_after_inlining): Update.
27542         (inline_read_section): Update.
27543         (inline_write_summary): Update.
27544         * ipa-inline.c (compute_uninlined_call_time): Update.
27545         (compute_inlined_call_time): Update.
27546         (recursive_inlining): Update.
27547         (inline_small_functions): Update.
27548         (dump_overall_stats): Update.
27549         * ipa-inline.h: Include sreal.h.
27550         (size_time_entry): Turn time to sreal.
27551         (inline_summary): Turn self_time nad time to sreal.
27553 2017-04-25  Jan Hubicka  <hubicka@ucw.cz>
27555         * sreal.c: Include backend.h, tree.h, gimple.h, cgraph.h and
27556         data-streamer.h
27557         (sreal::stream_out, sreal::stream_in): New.
27558         * sreal.h (sreal::stream_out, sreal::stream_in): Declare.
27560 2017-04-25  Jakub Jelinek  <jakub@redhat.com>
27562         * Makefile.in (s-options): Invoke opt-gather.awk with LC_ALL=C in the
27563         environment.
27565 2017-04-25  Uros Bizjak  <ubizjak@gmail.com>
27567         PR target/70799
27568         * config/i386/i386.c (dimode_scalar_to_vector_candidate_p):
27569         Handle ASHIFTRT.
27570         (dimode_scalar_chain::compute_convert_gain): Ditto.
27571         (dimode_scalar_chain::make_vector_copies): Ditto.
27572         (dimode_scalar_chain::convert_reg): Ditto.
27573         (dimode_scalar_chain::convert_insn): Ditto.
27574         * config/i386/sse.md (VI24_AVX512BW_1): Remove mode iterator.
27575         (VI248_AVX512BW_1): New mode iterator.
27576         (<mask_codefor>ashr<mode>3<mask_name>): Merge insn pattern with
27577         <mask_codefor>ashrv2di3<mask_name> insn using VI248_AVX512BW_1
27578         mode iterator.
27580 2017-04-25  Martin Sebor  <msebor@redhat.com>
27582         PR tree-optimization/80497
27583         * gimple-ssa-sprintf.c (get_int_range): Avoid assuming all integer
27584         constants are representable in HOST_WIDE_INT.
27585         (parse_directive): Ditto.
27587 2017-04-25  Martin Sebor  <msebor@redhat.com>
27589         PR bootstrap/80486
27590         * dominance.c (dom_info::m_n_basic_blocks): Change type to unsigned.
27591         (new_zero_array): Adjust signature.
27592         (dom_info::dom_init): Used unsigned rather that size_t.
27593         (dom_info::dom_info): Same.
27595 2017-04-25  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
27596             Jakub Jelinek  <jakub@redhat.com>
27598         PR target/77728
27599         * config/arm/arm.c: Include gimple.h.
27600         (aapcs_layout_arg): Emit -Wpsabi note if arm_needs_doubleword_align
27601         returns negative, increment ncrn only if it returned positive.
27602         (arm_needs_doubleword_align): Return int instead of bool,
27603         ignore DECL_ALIGN of non-FIELD_DECL TYPE_FIELDS chain
27604         members, but if there is any such non-FIELD_DECL
27605         > PARM_BOUNDARY aligned decl, return -1 instead of false.
27606         (arm_function_arg): Emit -Wpsabi note if arm_needs_doubleword_align
27607         returns negative, increment nregs only if it returned positive.
27608         (arm_setup_incoming_varargs): Likewise.
27609         (arm_function_arg_boundary): Emit -Wpsabi note if
27610         arm_needs_doubleword_align returns negative, return
27611         DOUBLEWORD_ALIGNMENT only if it returned positive.
27613 2017-04-25  Marek Polacek  <polacek@redhat.com>
27615         PR sanitizer/80349
27616         * fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
27617         first argument to type.
27619 2017-04-25  Bill Seurer  <seurer@linux.vnet.ibm.com>
27621         PR target/80482
27622         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Change
27623         type checks to test for compatibility instead of equality.
27625 2017-04-25  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
27626             Jakub Jelinek  <jakub@redhat.com>
27628         PR target/77728
27629         * config/aarch64/aarch64.c (struct aarch64_fn_arg_alignment): New
27630         type.
27631         (aarch64_function_arg_alignment): Return aarch64_fn_arg_alignment
27632         struct.  Ignore DECL_ALIGN of decls other than FIELD_DECL for
27633         the alignment computation, but return their maximum in warn_alignment.
27634         (aarch64_layout_arg): Adjust aarch64_function_arg_alignment caller.
27635         Emit a -Wpsabi note if warn_alignment is 16 bytes, but alignment
27636         is smaller.
27637         (aarch64_function_arg_boundary): Likewise.  Simplify using MIN/MAX.
27638         (aarch64_gimplify_va_arg_expr): Adjust aarch64_function_arg_alignment
27639         caller.
27641 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
27643         * config/arc/simdext.md (dmpyh): Fix typo.
27645 2017-04-25  Richard Biener  <rguenther@suse.de>
27647         PR tree-optimization/80492
27648         * alias.c (compare_base_decls): Handle registers with asm
27649         specification conservatively.
27650         * tree-ssa-alias.c (decl_refs_may_alias_p): Handle
27651         compare_base_decls returning dont-know properly.
27653 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
27655         * config/arc/arc.c (LEGITIMATE_OFFSET_ADDRESS_P): Delete macro.
27656         (legitimate_offset_address_p): New function.
27657         (arc_legitimate_address_p): Use above function.
27659 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
27661         * config/arc/arc.c (arc_output_mi_thunk): Emit PIC calls.
27663 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
27665         * config/arc/arc.c (arc_conditional_register_usage): Use ACCL,
27666         ACCH registers whenever they are available.
27668 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
27670         * config/arc/arc.c (arc_conditional_register_usage): Make D0, D1
27671         double regs fix when not used.
27673 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
27675         * config/arc/arc.h (REGNO_OK_FOR_BASE_P): Consider also extension
27676         core registers.
27677         (REG_OK_FOR_INDEX_P_NONSTRICT): Likewise.
27678         (REG_OK_FOR_BASE_P_NONSTRICT): Likewise.
27680 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
27682         * config/arc/arc.c (arc_output_addsi): Check for h-register class
27683         when emitting short ADD instructions.
27685 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
27687         * config/arc/arc.md (cmpsi_cc_insn_mixed): Use 'h' register
27688         constraint.
27689         (cmpsi_cc_c_insn): Likewise.
27690         (cbranchsi4_scratch): Compute proper instruction length using
27691         compact_hreg_operand.
27692         * config/arc/predicates.md (compact_hreg_operand): New predicate.
27694 2017-04-25  Richard Biener  <rguenther@suse.de>
27696         PR middle-end/80509
27697         * passes.c (pass_manager::pass_manager): Initialize
27698         m_name_to_pass_map.
27700 2017-04-25  Richard Biener  <rguenther@suse.de>
27702         PR tree-optimization/79201
27703         * tree-ssa-sink.c (statement_sink_location): Handle calls.
27705 2017-04-25  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27707         PR target/80464
27708         * config/s390/vector.md: Split MEM->GPR vector moves for
27709         non-s_operand addresses.
27711 2017-04-25  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27713         PR target/79895
27714         * config/s390/predicates.md (reload_const_wide_int_operand): New
27715         predicate.
27716         * config/s390/s390.md ("movti"): Remove d/P alternative.
27717         ("movti_bigconst"): New pattern definition.
27719 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
27721         PR target/80080
27722         * s390-protos.h (s390_expand_cs_hqi): Removed.
27723         (s390_expand_cs, s390_expand_atomic_exchange_tdsi): New prototypes.
27724         * config/s390/s390.c (s390_emit_compare_and_swap): Handle all integer
27725         modes as well as CCZ1mode and CCZmode.
27726         (s390_expand_atomic_exchange_tdsi, s390_expand_atomic): Adapt to new
27727         signature of s390_emit_compare_and_swap.
27728         (s390_expand_cs_hqi): Likewise, make static.
27729         (s390_expand_cs_tdsi): Generate an explicit compare before trying
27730         compare-and-swap, in some cases.
27731         (s390_expand_cs): Wrapper function.
27732         (s390_expand_atomic_exchange_tdsi): New backend specific expander for
27733         atomic_exchange.
27734         (s390_match_ccmode_set): Allow CCZmode <-> CCZ1 mode.
27735         * config/s390/s390.md ("atomic_compare_and_swap<mode>"): Merge the
27736         patterns for small and large integers.  Forbid symref memory operands.
27737         Move expander to s390.c.  Require cc register.
27738         ("atomic_compare_and_swap<DGPR:mode><CCZZ1:mode>_internal")
27739         ("*atomic_compare_and_swap<TDI:mode><CCZZ1:mode>_1")
27740         ("*atomic_compare_and_swapdi<CCZZ1:mode>_2")
27741         ("*atomic_compare_and_swapsi<CCZZ1:mode>_3"): Use s_operand to forbid
27742         symref memory operands.  Remove CC mode and call s390_match_ccmode
27743         instead.
27744         ("atomic_exchange<mode>"): Allow and implement all integer modes.
27746 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
27748         * config/s390/s390.md (define_peephole2): New peephole to help
27749         combining the load-and-test pattern with volatile memory.
27751 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
27753         * config/s390/s390.md ("cstorecc4"): Use load-on-condition and deal
27754         with CCZmode for TARGET_Z196.
27756 2017-04-25  Jakub Jelinek  <jakub@redhat.com>
27758         PR rtl-optimization/80501
27759         * combine.c (make_compound_operation_int): Set subreg_code to SET
27760         even for AND with mask of the sign bit of mode.
27762         PR rtl-optimization/80500
27763         * loop-unroll.c (combine_var_copies_in_loop_exit): Call copy_rtx on
27764         sum's initial value.
27766 2017-04-25  Julian Brown  <julian@codesourcery.com>
27767             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
27769         * config/aarch64/thunderx2t99.md (thunderx2t99_crc): New Reservation.
27771 2017-04-25  Marc Glisse  <marc.glisse@inria.fr>
27773         * fold-const.c (tree_single_nonzero_warnv_p): Handle SSA_NAME.
27775 2017-04-25  Julian Brown  <julian@codesourcery.com>
27776             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
27778         * config/aarch64/thunderx2t99.md (thunderx2t99_aes): New Reservation.
27779         (thunderx2t99_sha): New Reservation.
27781 2017-04-25  Julian Brown  <julian@codesourcery.com>
27782             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
27784         * config/aarch64/aarch64-simd.md (aarch64_simd_vec_set<mode>): Fix
27785         type for 1-element load.
27787 2017-04-24  Marc Glisse  <marc.glisse@inria.fr>
27789         * match.pd (X/[ex]C CMP Y/[ex]C): New transformation.
27791 2017-04-24  Martin Jambor  <mjambor@suse.cz>
27793         PR tree-optimization/80293
27794         * tree-sra.c (scalarizable_type_p): New parameter const_decl, make
27795         char arrays not totally scalarizable if it is false.
27796         (analyze_all_variable_accesses): Pass correct value in the new
27797         parameter.  Add a statistics counter.
27799 2017-04-24  Jan Hubicka  <hubicka@ucw.cz>
27801         PR middle-end/79931
27802         * ipa-devirt.c (dump_possible_polymorphic_call_targets): Fix ICE.
27804 2017-04-24  Richard Biener  <rguenther@suse.de>
27806         PR tree-optimization/80494
27807         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Bail
27808         out for complex types.
27810 2017-04-24  Richard Biener  <rguenther@suse.de>
27812         * tree-ssa-sccvn.h (run_scc_vn): Adjust prototype.
27813         * tree-ssa-sccvn.c (print_scc): Print SCC size.
27814         (extract_and_process_scc_for_name): Never fail but drop SCC to varying.
27815         (DFS): Adjust and never fail.
27816         (sccvn_dom_walker::fail): Remove.
27817         (sccvn_dom_walker::before_dom_children): Adjust.
27818         (run_scc_vn): Likewise and never fail.
27819         * tree-ssa-pre.c (pass_pre::execute): Adjust.
27820         (pass_fre::execute): Likewise.
27822 2017-04-24  Richard Biener  <rguenther@suse.de>
27824         PR tree-optimization/79725
27825         * tree-ssa-sink.c (statement_sink_location): Return whether
27826         failure reason was zero uses.  Move that check later.
27827         (sink_code_in_bb): Deal with zero uses by removing the stmt
27828         if possible.
27830 2017-04-24  Richard Biener  <rguenther@suse.de>
27832         PR c++/2972
27833         * tree-ssa-uninit.c (warn_uninitialized_vars): Handle some
27834         pointer-based references.
27836 2017-04-24  Richard Biener  <rguenther@suse.de>
27838         PR bootstrap/79814
27839         * pass_manager.h (pass_manager::operator new): Remove.
27840         (pass_manager::operator delete): Likewise.
27841         * passes.c (pass_manager::operator new): Remove.
27842         (pass_manager::operator delete): Likewise.
27843         (pass_manager::pass_manager): Zero individual pass members.
27845 2017-04-23  Uros Bizjak  <ubizjak@gmail.com>
27847         PR target/70799
27848         * config/i386/i386.c (dimode_scalar_to_vector_candidate_p)
27849         <case ASHIFT, case LSHIFTRT>: Also consider variable shifts.
27850         Check "XEXP (src, 1)" operand here.
27851         <case PLUS, case MINUS, case IOR, case XOR, case AND>:
27852         Check "XEXP (src, 1)" operand here.
27853         (dimode_scalar_chain::make_vector_copies): Detect count register
27854         of a shift instruction.  Zero extend count register from QImode
27855         to DImode to satisfy vector shift pattern count operand predicate.
27856         Substitute vector shift count operand with a DImode copy.
27857         (dimode_scalar_chain::convert_reg): Ditto, zero-extend from
27858         vector register.
27860 2017-04-21  Uros Bizjak  <ubizjak@gmail.com>
27862         * config/i386/i386.md (*extzvqi_mem_rex64): Move above *extzv<mode>.
27863         Remove UNSPEC_NOREX_MEM tag.  Update corresponding peephole2 pattern.
27864         (*insvqi_1_mem_rex64): Move above insv<mode>_1.  Remove
27865         UNSPEC_NOREX_MEM tag.  Update corresponding peephole2 pattern.
27866         (UNSPEC_NOREX_MEM): Remove definition.
27868 2017-04-21  Richard Biener  <rguenther@suse.de>
27870         PR tree-optimization/79547
27871         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
27872         Handle strlen, strcmp, strncmp, strcasecmp, strncasecmp, memcmp,
27873         bcmp, strspn, strcspn, __builtin_object_size and __builtin_constant_p
27874         without any constraints.
27876 2017-04-21  Richard Biener  <rguenther@suse.de>
27878         PR tree-optimization/78847
27879         * fold-const.c (split_tree): Handle POINTER_PLUS_EXPR.
27881 2017-04-21  Richard Biener  <rguenther@suse.de>
27883         * tree.h (build_qualified_type): Annotate with CXX_MEM_STAT_INFO.
27884         (build_distinct_type_copy): Likewise.
27885         (build_variant_type_copy): Likewise.
27886         * tree.c (build_qualified_type): Pass down mem-stat info.
27887         (build_distinct_type_copy): Likewise.
27888         (build_variant_type_copy): Likewise.
27890 2017-04-21  Richard Biener  <rguenther@suse.de>
27892         PR tree-optimization/80237
27893         * tree-ssa-pre.c (find_leader_in_sets): Add third set argument,
27894         defaulted to NULL.
27895         (phi_translate_1): Also allow a leader in AVAIL_OUT of pred
27896         for a simplified result.
27898 2016-04-21  Richard Biener  <rguenther@suse.de>
27900         * tree-ssa-loop-ivcanon.c (constant_after_peeling): Do not require
27901         sth as strict as a simple_iv but a chrec without symbols and an
27902         operand defined in the loop we are peeling (and not some subloop).
27903         (propagate_constants_for_unrolling): Propagate all constants.
27905 2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
27907         PR target/79804
27908         * config/i386/i386.c (print_reg): Remove assert for disalowed
27909         regno values, call output_operand_lossage instead.
27911 2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
27913         PR target/78090
27914         * config/i386/constraints.md (Yc): New register constraint.
27915         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
27916         Use Yc constraint for alternative 2 of operand 0.  Remove
27917         preferred_for_speed attribute.
27919 2017-04-20  Alexander Monakov  <amonakov@ispras.ru>
27921         * omp-low.c (lower_lastprivate_clauses): Correct handling of linear and
27922         lastprivate clauses in SIMT case.
27924 2017-04-20  Volker Reichelt  <v.reichelt@netcologne.de>
27926         * doc/invoke.texi (-Wextra-semi): Document new warning option.
27928 2017-04-20  Richard Biener  <rguenther@suse.de>
27930         PR tree-optimization/57796
27931         * tree-vect-stmts.c (vect_model_store_cost): Cost scatters
27932         as N scalar stores.
27933         (vect_model_load_cost): Cost gathers as N scalar loads.
27935 2017-04-20  Richard Biener  <rguenther@suse.de>
27937         * ggc-page.c (ggc_allocated_p): Rename to ...
27938         (safe_lookup_page_table_entry): ... this and return the lookup
27939         result.
27940         (gt_ggc_m_S): Use safe_lookup_page_table_entry.
27942 2017-04-20  Richard Biener  <rguenther@suse.de>
27944         PR tree-optimization/80453
27945         * tree-ssa-sccvn.h (struct vn_phi_s): Add cclhs and ccrhs members.
27946         * tree-ssa-sccvn.c (cond_stmts_equal_p): Use recorded lhs and rhs
27947         from the conditions.
27948         (vn_phi_eq): Pass them down.
27949         (vn_phi_lookup): Record them.
27950         (vn_phi_insert): Likewise.
27952 2017-04-20  Matthew Fortune  <matthew.fortune@imgtec.com>
27954         * config/mips/mips.c (mips_expand_vec_perm_const): Re-fix
27955         uninitialized variable warning to avoid buffer overrun.
27957 2017-04-20  Alexander Monakov  <amonakov@ispras.ru>
27959         PR other/71250
27960         * doc/invoke.texi (-Wmissing-field-initializers): Mention that warning
27961         is suppressed for '{ 0 }' in C.
27963 2017-04-20  Jakub Jelinek  <jakub@redhat.com>
27965         * BASE-VER: Set to 8.0.0.
27967 2017-04-20  Thomas Preud'homme  <thomas.preudhomme@arm.com>
27969         * config/arm/arm.c (arm_elf_asm_cdtor): Create non-default
27970         priority .init_array and .fini_array section with SECTION_NOTYPE
27971         flag.
27973 2017-04-20  Jakub Jelinek  <jakub@redhat.com>
27975         PR middle-end/80423
27976         * tree.h (build_array_type): Add typeless_storage default argument.
27977         * tree.c (type_cache_hasher::equal): Also compare
27978         TYPE_TYPELESS_STORAGE flag for ARRAY_TYPEs.
27979         (build_array_type): Add typeless_storage argument, set
27980         TYPE_TYPELESS_STORAGE to it, if shared also hash it, and pass to
27981         recursive call.
27982         (build_nonshared_array_type): Adjust build_array_type_1 caller.
27983         (build_array_type): Likewise.  Add typeless_storage argument.
27985 2017-04-19  Eric Botcazou  <ebotcazou@adacore.com>
27986             Jakub Jelinek  <jakub@redhat.com>
27988         PR tree-optimization/80426
27989         * tree-vrp.c (extract_range_from_binary_expr_1): For an additive
27990         operation on symbolic operands, also compute the overflow for the
27991         invariant part when the operation degenerates into a negation.
27993 2017-04-19  Jakub Jelinek  <jakub@redhat.com>
27995         PR debug/80461
27996         * dwarf2out.c (modified_type_die, gen_type_die_with_usage):
27997         Check for t with zero TYPE_QUALS_NO_ADDR_SPACE.
27999         PR debug/80436
28000         * tree-ssa-loop-manip.c (find_uses_to_rename_def): Ignore debug uses.
28002 2017-04-19  Georg-Johann Lay  <avr@gjlay.de>
28004         PR target/80462
28005         * config/avr/avr.c (tree.h): Include it.
28006         (cgraph.h): Include it.
28007         (avr_encode_section_info): Don't warn for uninitialized progmem
28008         variable if it's just an alias.
28010 2017-04-19  Richard Biener  <rguenther@suse.de>
28012         PR ipa/65972
28013         * auto-profile.c (afdo_vpt_for_early_inline): Update SSA
28014         when needed by AutoPGO.
28016 2017-04-19  Paulo J. Matos  <paulo@matos-sorge.com>
28018         PR lto/50345
28019         * doc/lto.texi: Remove an extra 'that'.
28021 2017-04-19  Segher Boessenkool  <segher@kernel.crashing.org>
28023         PR rtl-optimization/80429
28024         * ira.c (split_live_ranges_for_shrink_wrap): Don't split regs that
28025         are only used in debug insns.
28027 2017-04-19  Eric Botcazou  <ebotcazou@adacore.com>
28028             Vladimir Makarov  <vmakarov@redhat.com>
28030         * config/sparc/predicates.md (input_operand): Add comment.  Return
28031         true for any memory operand when LRA is in progress.
28032         * config/sparc/sparc.c (sparc_expand_move): Minor formatting fix.
28034 2017-04-18  Jeff Law  <law@redhat.com>
28036         PR target/74563
28037         * mips.md ({return,simple_return}_internal): Do not overwrite
28038         operands[0].
28040 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
28042         PR tree-optimization/80443
28043         * tree-vrp.c (intersect_ranges): For signed 1-bit precision type,
28044         instead of adding 1, subtract -1 and similarly instead of subtracting
28045         1 add -1.
28047 2017-04-18  Richard Sandiford  <richard.sandiford@arm.com>
28049         PR rtl-optimization/80357
28050         * haifa-sched.c (tmp_bitmap): New variable.
28051         (model_recompute): Handle duplicate use records.
28052         (alloc_global_sched_pressure_data): Initialize tmp_bitmap.
28053         (free_global_sched_pressure_data): Free it.
28055 2017-04-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
28057         Revert:
28058         2017-02-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
28059         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
28060         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
28061         instead of SYSTEM_HEADER_DIR.
28063 2017-04-18  Jeff Law  <law@redhat.com>
28065         PR middle-end/80422
28066         * cfgcleanup.c (try_crossjump_to_edge): Verify SRC1 and SRC2 have
28067         predecessors after walking up the insn chain.
28069 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
28071         PR debug/80263
28072         * dwarf2out.c (modified_type_die): Try harder not to emit internal
28073         sizetype type into debug info.
28075 2017-04-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
28077         PR target/80099
28078         * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Eliminate
28079         unneeded test for TARGET_UPPER_REGS_SF.
28080         * config/rs6000/vsx.md (vsx_extract_v4sf_var): Likewise.
28082 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
28084         PR sanitizer/80444
28085         * sancov.c (sancov_pass): Use gsi_start_nondebug_after_labels_bb
28086         instead of gsi_after_labels.
28088 2017-04-18  Jeff Law  <law@redhat.com>
28090         * regcprop.c (maybe_mode_change): Avoid creating copies of the
28091         stack pointer.
28093         Revert:
28094         2017-04-13  Jeff Law  <law@redhat.com>
28095         * config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
28096         in operands[1] if it is a MEM and TARGET_MIPS16 is active.
28098 2017-04-18  Georg-Johann Lay  <avr@gjlay.de>
28100         PR target/79453
28101         * config/avr/avr.c (intl.h): Include it.
28102         (avr_pgm_check_var_decl) [reason]: Wrap diagnostic snippets into _().
28104 2017-04-18  Martin Liska  <mliska@suse.cz>
28106         PR gcov-profile/78783
28107         * gcov-tool.c (gcov_output_files): Validate that destination
28108         file is either removed by the tool or by a user.
28110 2017-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
28111             Guy Benyei  <guybe@mellanox.com>
28113         * config/arc/arc.c (arc_reorg): Move loop_end_id into a more local
28114         block, and do not negate it, the stored id is already negative.
28116 2017-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
28118         * config/arc/arc.md (doloop_begin_i): Use @pcl assembler syntax.
28120 2017-04-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
28122         PR target/80098
28123         * config/rs6000/rs6000-cpus.def (OTHER_P9_VECTOR_MASKS): Define
28124         masks of options that should be turned off if the VSX vector
28125         options are turned off.
28126         (OTHER_P8_VECTOR_MASKS): Likewise.
28127         (OTHER_VSX_VECTOR_MASKS): Likewise.
28128         * config/rs6000/rs6000.c (rs6000_option_override_internal): Call
28129         rs6000_disable_incompatible_switches to validate no type switches
28130         like -mvsx.
28131         (rs6000_incompatible_switch): New function to disallow turning on
28132         other vector options if -mno-vsx, -mno-power8-vector, or
28133         -mno-power9-vector are specified.
28135 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
28137         * config/arc/arc.h (CRT_CALL_STATIC_FUNCTION): Use long calls.
28139 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
28141         * config/arc/arc-protos.h (arc_decl_pretend_args): Remove.
28142         * config/arc/arc.c (arc_decl_pretend_args): Likewise.
28143         * config/arc/arc.h (CFA_FRAME_BASE_OFFSET): Likewise.
28144         (ARG_POINTER_CFA_OFFSET): Likewise.
28146 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
28148         * config/arc/arc.c (arc_mode_dependent_address_p): Relax
28149         conditions to take advantage of various optimizations.
28151 2017-04-13  Jeff Law  <law@redhat.com>
28153         * config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
28154         in operands[1] if it is a MEM and TARGET_MIPS16 is active.
28155         (zero_extendsidi2_dext): Likewise.
28157 2017-04-13  Jakub Jelinek  <jakub@redhat.com>
28159         PR sanitizer/80403
28160         * fold-const.c (fold_ternary_loc): Revert
28161         use op0 instead of fold_convert_loc (loc, type, arg0) part of
28162         2017-04-12 change.
28164 2017-04-13  Vladimir Makarov  <vmakarov@redhat.com>
28166         PR rtl-optimization/80343
28167         * lra-remat.c (update_scratch_ops): Assign original hard reg to
28168         new scratch pseudo.
28170 2017-04-13  Denis Khalikov <d.khalikov@partner.samsung.com>
28172         PR sanitizer/80414
28173         * ubsan.c (ubsan_expand_bounds_ifn): Pass original index
28174         to ubsan_encode_value.
28176 2017-04-13  Jeff Law  <law@redhat.com>
28178         * reload1.c (eliminate_regs_1): Call gen_rtx_raw_SUBREG for SUBREGs
28179         appearing in DEBUG_INSNs.
28181 2017-04-13  Martin Liska  <mliska@suse.cz>
28183         PR gcov-profile/80413
28184         * gcov-io.c (gcov_write_string): Copy to buffer just when
28185         allocated size is greater than zero.
28187 2017-04-13  Jakub Jelinek  <jakub@redhat.com>
28189         PR debug/80321
28190         * dwarf2out.c (decls_for_scope): Ignore declarations of
28191         current_function_decl in BLOCK_NONLOCALIZED_VARS.
28193 2017-04-12  Jan Hubicka  <hubicka@ucw.cz>
28195         PR lto/69953
28196         * ipa-visibility.c (non_local_p): Fix typos.
28197         (localize_node): When localizing symbol in same comdat group,
28198         dissolve the group only when we know external symbols are going
28199         to be privatized.
28200         (function_and_variable_visibility): Do not localize DECL_EXTERNAL.
28202 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
28204         PR tree-optimization/79390
28205         * optabs.c (emit_conditional_move): If the preferred op2/op3 operand
28206         order does not result in usable sequence, retry with reversed operand
28207         order.
28209         PR sanitizer/80403
28210         PR sanitizer/80404
28211         PR sanitizer/80405
28212         * fold-const.c (fold_ternary_loc): Use op1 instead of arg1 as argument
28213         to fold_build2_loc.  Convert TREE_OPERAND (tem, 0) to type.  Use
28214         op0 instead of fold_convert_loc (loc, type, arg0).
28216 2017-04-12  Jeff Law  <law@redhat.com>
28218         * genattrtab.c (write_eligible_delay): Verify DELAY_INSN still
28219         has a delay slot in the generated code.
28221         * config/cris/cris.md (cris_preferred_reload_class): Return
28222         GENNONACR_REGS rather than GENERAL_REGS.
28224 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
28226         PR c/80163
28227         * expr.c <CASE_CONVERT>: For EXPAND_INITIALIZER determine SIGN_EXTEND
28228         vs. ZERO_EXTEND based on signedness of treeop0's type rather than
28229         signedness of the result type.
28231 2017-04-12  Richard Biener  <rguenther@suse.de>
28232             Jeff Law  <law@redhat.com>
28234         PR tree-optimization/80359
28235         * tree-ssa-dse.c (maybe_trim_partially_dead_store): Do not
28236         trim stores to TARGET_MEM_REFs.
28238 2017-04-12  Richard Biener  <rguenther@suse.de>
28240         PR tree-optimization/79390
28241         * gimple-ssa-split-paths.c (is_feasible_trace): Restrict
28242         threading case even more.
28244 2017-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
28246         PR target/80382
28247         * config/rs6000/sync.md (atomic_load<mode>, atomic_store<mode): Test
28248         for quad_address_p for TImode, instead of just not indexed_address.
28250 2017-04-12  Richard Biener  <rguenther@suse.de>
28251             Bernd Edlinger  <bernd.edlinger@hotmail.de>
28253         PR middle-end/79671
28254         * alias.c (component_uses_parent_alias_set_from): Handle
28255         TYPE_TYPELESS_STORAGE.
28256         (get_alias_set): Likewise.
28257         * tree-core.h (tree_type_common): Add typeless_storage flag.
28258         * tree.h (TYPE_TYPELESS_STORAGE): New macro.
28259         * stor-layout.c (place_union_field): Set TYPE_TYPELESS_STORAGE
28260         for types containing members with TYPE_TYPELESS_STORAGE.
28261         (place_field): Likewise.
28262         (layout_type): Likewise for ARRAY_TYPE.
28263         * lto-streamer-out.c (hash_tree): Hash TYPE_TYPELESS_STORAGE.
28264         * tree-streamer-in.c (unpack_ts_type_common_value_fields): Stream
28265         TYPE_TYPELESS_STORAGE.
28266         * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
28268 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
28270         PR sanitizer/80349
28271         * fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
28272         first argument to type.
28274 2017-04-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28276         PR target/80376
28277         PR target/80315
28278         * config/rs6000/rs6000.c (rs6000_expand_unop_builtin): Return
28279         CONST0_RTX (mode) rather than const0_rtx where appropriate.
28280         (rs6000_expand_binop_builtin): Likewise.
28281         (rs6000_expand_ternop_builtin): Likewise; also add missing
28282         vsx_xxpermdi_* variants; also fix typo (arg1 => arg2) for
28283         vshasigma built-ins.
28284         * doc/extend.texi: Document that vec_xxpermdi's third argument
28285         must be a constant.
28287 2017-04-11  Uros Bizjak  <ubizjak@gmail.com>
28289         * config/i386/i386.c (dimode_scalar_chain::compute_convert_gain):
28290         Use shift_const cost parameter when calculating gain of STV shifts.
28292 2017-04-11  Vladimir Makarov  <vmakarov@redhat.com>
28294         PR rtl-optimization/70478
28295         * lra-constraints.c (process_alt_operands): Check memory for
28296         disfavoring memory insn operand.
28298 2017-04-11  Jakub Jelinek  <jakub@redhat.com>
28300         PR middle-end/80100
28301         * simplify-rtx.c (simplify_binary_operation_1) <case IOR>: Perform
28302         left shift in unsigned HOST_WIDE_INT type.
28304         PR rtl-optimization/80385
28305         * simplify-rtx.c (simplify_unary_operation_1): Don't transform
28306         (not (neg X)) into (plus X -1) for complex or non-integral modes.
28308         PR libgomp/80394
28309         * omp-low.c (scan_omp_task): Don't optimize away empty tasks
28310         if they have any depend clauses.
28312 2017-04-11  Martin Liska  <mliska@suse.cz>
28314         PR ipa/80212
28315         * cgraph.c (cgraph_node::dump): Dump calls_comdat_local.
28316         * ipa-split.c (split_function): Create a local comdat symbol
28317         if caller is in a comdat group.
28319 2017-04-11  Martin Liska  <mliska@suse.cz>
28321         PR ipa/80212
28322         * ipa-cp.c (determine_versionability): Handle calls_comdat_local
28323         flags.
28325 2017-04-11  Martin Sebor  <msebor@redhat.com>
28327         PR middle-end/80364
28328         * gimple-ssa-sprintf.c (get_int_range): Remove second argument and
28329         always use the int type.  Use INTEGRAL_TYPE_P() rather than testing
28330         for INTEGER_TYPE.
28331         (directive::set_width, directive::set_precision, format_character):
28332         Adjust.
28333         (parse_directive): Use INTEGRAL_TYPE_P() rather than testing for
28334         INTEGER_TYPE.
28336 2017-04-11  Richard Earnshaw  <rearnsha@arm.com>
28338         PR target/80389
28339         * config/arm/arm.c (arm_configure_build_target): When -mcpu and -arch
28340         conflict, set target->arch_name instead of target->cpu_name.
28342 2017-04-11  Richard Biener  <rguenther@suse.de>
28344         PR tree-optimization/80374
28345         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Use
28346         build_zero_cst, remove fold_convertible_p check again.
28348 2017-04-11  Martin Liska  <mliska@suse.cz>
28350         PR sanitizer/70878
28351         * ubsan.c (instrument_object_size): Do not instrument register
28352         variables.
28354 2017-04-11  Jakub Jelinek  <jakub@redhat.com>
28356         PR target/80381
28357         * config/i386/i386-builtin-types.def
28358         (V16HI_FTYPE_V16HI_INT_V16HI_UHI_COUNT,
28359         V16HI_FTYPE_V16HI_V8HI_V16HI_UHI_COUNT,
28360         V16SI_FTYPE_V16SI_INT_V16SI_UHI_COUNT,
28361         V16SI_FTYPE_V16SI_V4SI_V16SI_UHI_COUNT,
28362         V2DI_FTYPE_V2DI_INT_V2DI_UQI_COUNT,
28363         V2DI_FTYPE_V2DI_V2DI_V2DI_UQI_COUNT,
28364         V32HI_FTYPE_V32HI_INT_V32HI_USI_COUNT,
28365         V32HI_FTYPE_V32HI_V8HI_V32HI_USI_COUNT,
28366         V4DI_FTYPE_V4DI_INT_V4DI_UQI_COUNT,
28367         V4DI_FTYPE_V4DI_V2DI_V4DI_UQI_COUNT,
28368         V4SI_FTYPE_V4SI_INT_V4SI_UQI_COUNT,
28369         V4SI_FTYPE_V4SI_V4SI_V4SI_UQI_COUNT,
28370         V8DI_FTYPE_V8DI_INT_V8DI_UQI_COUNT,
28371         V8DI_FTYPE_V8DI_V2DI_V8DI_UQI_COUNT,
28372         V8HI_FTYPE_V8HI_INT_V8HI_UQI_COUNT,
28373         V8HI_FTYPE_V8HI_V8HI_V8HI_UQI_COUNT,
28374         V8SI_FTYPE_V8SI_INT_V8SI_UQI_COUNT,
28375         V8SI_FTYPE_V8SI_V4SI_V8SI_UQI_COUNT): New function type aliases.
28376         * config/i386/i386-builtin.def (__builtin_ia32_pslld512_mask,
28377         __builtin_ia32_pslldi512_mask, __builtin_ia32_psllq512_mask,
28378         __builtin_ia32_psllqi512_mask, __builtin_ia32_psrad512_mask,
28379         __builtin_ia32_psradi512_mask, __builtin_ia32_psraq512_mask,
28380         __builtin_ia32_psraqi512_mask, __builtin_ia32_psrld512_mask,
28381         __builtin_ia32_psrldi512_mask, __builtin_ia32_psrlq512_mask,
28382         __builtin_ia32_psrlqi512_mask, __builtin_ia32_psllwi128_mask,
28383         __builtin_ia32_pslldi128_mask, __builtin_ia32_psllqi128_mask,
28384         __builtin_ia32_psllw128_mask, __builtin_ia32_pslld128_mask,
28385         __builtin_ia32_psllq128_mask, __builtin_ia32_psllwi256_mask,
28386         __builtin_ia32_psllw256_mask, __builtin_ia32_pslldi256_mask,
28387         __builtin_ia32_pslld256_mask, __builtin_ia32_psllqi256_mask,
28388         __builtin_ia32_psllq256_mask, __builtin_ia32_psradi128_mask,
28389         __builtin_ia32_psrad128_mask, __builtin_ia32_psradi256_mask,
28390         __builtin_ia32_psrad256_mask, __builtin_ia32_psraqi128_mask,
28391         __builtin_ia32_psraq128_mask, __builtin_ia32_psraqi256_mask,
28392         __builtin_ia32_psraq256_mask, __builtin_ia32_psrldi128_mask,
28393         __builtin_ia32_psrld128_mask, __builtin_ia32_psrldi256_mask,
28394         __builtin_ia32_psrld256_mask, __builtin_ia32_psrlqi128_mask,
28395         __builtin_ia32_psrlq128_mask, __builtin_ia32_psrlqi256_mask,
28396         __builtin_ia32_psrlq256_mask, __builtin_ia32_psrawi256_mask,
28397         __builtin_ia32_psraw256_mask, __builtin_ia32_psrawi128_mask,
28398         __builtin_ia32_psraw128_mask, __builtin_ia32_psrlwi256_mask,
28399         __builtin_ia32_psrlw256_mask, __builtin_ia32_psrlwi128_mask,
28400         __builtin_ia32_psrlw128_mask, __builtin_ia32_psllwi512_mask,
28401         __builtin_ia32_psllw512_mask, __builtin_ia32_psrawi512_mask,
28402         __builtin_ia32_psraw512_mask, __builtin_ia32_psrlwi512_mask,
28403         __builtin_ia32_psrlw512_mask): Use _COUNT suffixed function type
28404         aliases.
28405         * config/i386/i386.c (ix86_expand_args_builtin): Rename last_arg_count
28406         flag to second_arg_count, handle 4 argument function type _COUNT
28407         aliases, handle second_arg_count on second argument rather than last.
28409 2017-04-10  Jeff Law  <law@redhat.com>
28411         PR tree-optimization/80374
28412         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Do not try to
28413         record anything if we can not convert integer_zero_node to the
28414         desired type.
28416 2017-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
28418         PR target/80108
28419         * config/rs6000/rs6000.c (rs6000_option_override_internal):
28420         Enhance special handling given to the TARGET_P9_MINMAX option in
28421         relation to certain other options.
28423 2017-04-10  Bin Cheng  <bin.cheng@arm.com>
28425         PR tree-optimization/80153
28426         * tree-ssa-loop-ivopts.c (add_iv_candidate_for_use): Check and
28427         remove POINTER_PLUS_EXPR's base part directly, rather than through
28428         aff_tree.
28430 2017-04-10  Richard Biener  <rguenther@suse.de>
28431             Bin Cheng  <bin.cheng@arm.com>
28433         PR tree-optimization/80153
28434         * tree-affine.c (aff_combination_to_tree): Get base pointer from
28435         the first element of pointer type aff_tree.  Build result expr in
28436         aff_tree's type.
28437         (add_elt_to_tree): Convert to type unconditionally.  Remove other
28438         fold_convert calls.
28439         * tree-ssa-loop-ivopts.c (alloc_iv): Pass in consistent types.
28440         (rewrite_use_nonlinear_expr): Check invariant using iv information.
28442 2017-04-10  Richard Biener  <rguenther@suse.de>
28444         * tree-ssa-structalias.c (find_func_aliases): Properly handle
28445         asm inputs.
28447 2017-04-10  Vladimir Makarov  <vmakarov@redhat.com>
28449         PR rtl-optimization/70478
28450         * lra-constraints.c (curr_small_class_check): New.
28451         (update_and_check_small_class_inputs): New.
28452         (process_alt_operands): Update curr_small_class_check.  Disfavor
28453         alternative insn memory operands.  Check available regs for small
28454         class operands.
28456 2017-03-31  Matthew Fortune  <matthew.fortune@imgtec.com>
28458         PR target/80057
28459         * config/mips/mips.opt (-mvirt): Update description.
28460         * doc/invoke.texi (-mvirt): Likewise.
28462 2017-04-10  Richard Biener  <rguenther@suse.de>
28464         PR middle-end/80362
28465         * fold-const.c (fold_binary_loc): Look at unstripped ops when
28466         looking for NEGATE_EXPR in -A / -B to A / B folding.
28468 2017-04-10  Martin Liska  <mliska@suse.cz>
28470         PR gcov-profile/80224
28471         * gcov.c (print_usage): Fix usage string.
28472         (get_gcov_intermediate_filename): Remove.
28473         (output_gcov_file): Use both for normal and intermediate format.
28474         (generate_results): Do not initialize special file for
28475         intermediate format.
28477 2017-04-10  Richard Biener  <rguenther@suse.de>
28479         PR tree-optimization/80304
28480         * tree-ssa-loop-im.c (ref_indep_loop_p_1): Also recurse
28481         for safelen.
28483 2017-04-10  Nathan Sidwell  <nathan@acm.org>
28485         PR target/79905
28486         * config/rs6000/rs6000.c (rs6000_vector_type): New.
28487         (rs6000_init_builtins): Use it.
28489 2016-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28491         * config/arm/arm.md (<mrc>): Add mode to SET source.
28492         (<mrrc>): Likewise.
28494 2017-04-10  Richard Biener  <rguenther@suse.de>
28496         PR middle-end/80344
28497         * gimplify.c (is_gimple_mem_rhs_or_call): Allow CLOBBERs.
28499 2017-04-10  Jakub Jelinek  <jakub@redhat.com>
28501         PR target/80324
28502         * config/i386/avx512fintrin.h (_mm512_reduce_add_epi32,
28503         _mm512_reduce_mul_epi32, _mm512_reduce_and_epi32,
28504         _mm512_reduce_or_epi32, _mm512_mask_reduce_add_epi32,
28505         _mm512_mask_reduce_mul_epi32, _mm512_mask_reduce_and_epi32,
28506         _mm512_mask_reduce_or_epi32, _mm512_reduce_min_epi32,
28507         _mm512_reduce_max_epi32, _mm512_reduce_min_epu32,
28508         _mm512_reduce_max_epu32, _mm512_mask_reduce_min_epi32,
28509         _mm512_mask_reduce_max_epi32, _mm512_mask_reduce_min_epu32,
28510         _mm512_mask_reduce_max_epu32, _mm512_reduce_add_ps,
28511         _mm512_reduce_mul_ps, _mm512_mask_reduce_add_ps,
28512         _mm512_mask_reduce_mul_ps, _mm512_reduce_min_ps, _mm512_reduce_max_ps,
28513         _mm512_mask_reduce_min_ps, _mm512_mask_reduce_max_ps,
28514         _mm512_reduce_add_epi64, _mm512_reduce_mul_epi64,
28515         _mm512_reduce_and_epi64, _mm512_reduce_or_epi64,
28516         _mm512_mask_reduce_add_epi64, _mm512_mask_reduce_mul_epi64,
28517         _mm512_mask_reduce_and_epi64, _mm512_mask_reduce_or_epi64,
28518         _mm512_reduce_min_epi64, _mm512_reduce_max_epi64,
28519         _mm512_mask_reduce_min_epi64, _mm512_mask_reduce_max_epi64,
28520         _mm512_reduce_min_epu64, _mm512_reduce_max_epu64,
28521         _mm512_mask_reduce_min_epu64, _mm512_mask_reduce_max_epu64,
28522         _mm512_reduce_add_pd, _mm512_reduce_mul_pd, _mm512_mask_reduce_add_pd,
28523         _mm512_mask_reduce_mul_pd, _mm512_reduce_min_pd, _mm512_reduce_max_pd,
28524         _mm512_mask_reduce_min_pd, _mm512_mask_reduce_max_pd): New intrinsics.
28526 2017-04-08  Vladimir Makarov  <vmakarov@redhat.com>
28528         PR rtl-optimization/70478
28529         * lra-constraints.c: Reverse the last patch.
28531 2017-04-08  Andreas Tobler  <andreast@gcc.gnu.org>
28533         * config/aarch64/aarch64-freebsd.h: Define MCOUNT_NAME.
28534         Add comment for WCHAR_T.
28536 2017-04-08  Martin Liska  <mliska@suse.cz>
28538         Revert:
28539         2017-04-07  Martin Liska  <mliska@suse.cz>
28541         PR ipa/80212
28542         * ipa-split.c (split_function): Add function part to a same comdat
28543         group.
28545 2017-04-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
28547         PR target/80358
28548         * config/rs6000/rs6000.c (expand_block_compare): Fix boundary check.
28550 2017-04-07  Pat Haugen  <pthaugen@us.ibm.com>
28552         * rs6000/rs6000.c (vec_load_pendulum): Rename...
28553         (vec_pairing): ...to this.
28554         (power9_sched_reorder2): Rewrite code for pairing vector/vecload insns.
28555         (rs6000_sched_init): Adjust for name change.
28556         (struct rs6000_sched_context): Likewise.
28557         (rs6000_init_sched_context): Likewise.
28558         (rs6000_set_sched_context): Likewise.
28560 2017-04-07  Jakub Jelinek  <jakub@redhat.com>
28562         PR target/80322
28563         PR target/80323
28564         PR target/80325
28565         PR target/80326
28566         * config/i386/avxintrin.h (_mm256_cvtsd_f64, _mm256_cvtss_f32): New
28567         intrinsics.
28568         * config/i386/avx512fintrin.h (_mm512_int2mask, _mm512_mask2int,
28569         _mm512_abs_ps, _mm512_mask_abs_ps, _mm512_abs_pd, _mm512_mask_abs_pd,
28570         _mm512_cvtsd_f64, _mm512_cvtss_f32): Likewise.
28572 2017-04-07  Andreas Tobler  <andreast@gcc.gnu.org>
28574         * config/aarch64/aarch64-freebsd.h: Define WCHAR_TYPE.
28576 2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>
28578         PR rtl-optimization/70703
28579         * ira-color.c (update_conflict_hard_regno_costs): Use
28580         int64_t instead of HOST_WIDE_INT.
28582 2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>
28584         PR rtl-optimization/70478
28585         * lra-constraints.c (process_alt_operands): Disfavor alternative
28586         insn memory operands.
28588 2017-04-07  Jeff Law  <law@redhat.com>
28590         * config/iq2000/iq2000.c (final_prescan_insn): Do not separate a
28591         CALL and NOTE_INSN_CALL_ARG_LOCATION.
28593 2017-04-07  Martin Liska  <mliska@suse.cz>
28595         PR target/79889
28596         * config/aarch64/aarch64.c (aarch64_process_target_attr):
28597         Show error message instead of an ICE.
28599 2017-04-07  Martin Liska  <mliska@suse.cz>
28601         PR ipa/80212
28602         * ipa-split.c (split_function): Add function part to a same comdat
28603         group.
28605 2017-04-07  Richard Biener  <rguenther@suse.de>
28607         PR middle-end/80341
28608         * tree.c (get_unwidened): Also handle ! for_type case for
28609         INTEGER_CSTs.
28610         * convert.c (do_narrow): Split out from ...
28611         (convert_to_integer_1): ... here.  Do not pass final truncation
28612         type to get_unwidened for TRUNC_DIV_EXPR.
28614 2017-04-07  Richard Biener  <rguenther@suse.de>
28616         * tree-affine.c (wide_int_ext_for_comb): Take type rather
28617         than aff_tree.
28618         (aff_combination_const): Adjust.
28619         (aff_combination_scale): Likewise.
28620         (aff_combination_add_elt): Likewise.
28621         (aff_combination_add_cst): Likewise.
28622         (aff_combination_convert): Likewise.
28623         (add_elt_to_tree): Likewise.  Remove unused argument.
28624         (aff_combination_to_tree): Adjust calls to add_elt_to_tree.
28626 2017-04-07  Sebastian Huber  <sebastian.huber@embedded-brains.de>
28628         * config/arm/arm.h (ARM_DEFAULT_SHORT_ENUMS): Provide default
28629         definition.
28630         * config/arm/arm.c (arm_default_short_enums): Use
28631         ARM_DEFAULT_SHORT_ENUMS.
28632         * config/arm/rtems.h (ARM_DEFAULT_SHORT_ENUMS): Define.
28634 2017-04-06  Jakub Jelinek  <jakub@redhat.com>
28636         PR debug/80234
28637         * dwarf2out.c (gen_member_die): Handle C++17 inline static data
28638         members with redundant out-of-class redeclaration.
28640 2017-04-06  Uros Bizjak  <ubizjak@gmail.com>
28642         PR target/80286
28643         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): New pattern.
28644         * config/i386/i386.md (*zero_extendsidi2):
28645         Add (?*x,*x) and (?*v,*v) alternatives.
28647 2017-04-06  Uros Bizjak  <ubizjak@gmail.com>
28649         PR target/79733
28650         * config/i386/i386.c (ix86_expand_builtin)
28651         <case IX86_BUILTIN_K{,OR}TEST{C,Z}{8,16,32,64}>: Determine insn operand
28652         mode from insn data. Convert operands to insn operand mode.
28653         Copy operands that don't satisfy insn predicate to a register.
28655 2017-04-06  Sam Thursfield  <sam.thursfield@codethink.co.uk>
28657         * config/rs6000/x-aix: Increase memory limit for genautomata on AIX.
28658         Update comments.
28660 2017-04-06  Richard Biener  <rguenther@suse.de>
28662         PR tree-optimization/80334
28663         * tree-ssa-loop-ivopts.c (rewrite_use_address): Properly
28664         preserve alignment of accesses.
28666 2017-04-06  Richard Biener  <rguenther@suse.de>
28668         PR tree-optimization/80262
28669         * tree-sra.c (build_ref_for_offset): Preserve address-space
28670         information.
28671         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address):
28672         Drop useless address-space information on MEM_REF offsets.
28674 2017-04-05  Andreas Schwab  <schwab@linux-m68k.org>
28676         * builtins.def (BUILT_IN_UPDATE_SETJMP_BUF): Fix type.
28678 2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>
28680         PR rtl-optimization/70703
28681         * ira-color.c (update_conflict_hard_regno_costs): Use
28682         HOST_WIDE_INT instead of long.
28684 2017-04-05  Uros Bizjak  <ubizjak@gmail.com>
28686         PR target/80298
28687         * config/i386/mmintrin.h: Add -msse target option when __SSE__ is
28688         not defined for x86_64 target.  Add -mmmx target option when __SSE2__
28689         is not defined.
28690         * config/i386/mm3dnow.h: Add -msse target when __SSE__ is not defined
28691         for x86_64 target.  Handle -m3dnowa option.
28693 2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>
28695         PR rtl-optimization/70703
28696         * ira-color.c (update_costs_from_allocno): Use the smallest mode.
28697         (update_conflict_hard_regno_costs): Use long instead of unsigned
28698         arithmetic for cost calculation.
28700 2017-04-05  Jakub Jelinek  <jakub@redhat.com>
28701             Bernd Edlinger  <bernd.edlinger@hotmail.de>
28703         PR sanitizer/80308
28704         * asan.c (asan_store_shadow_bytes): Fix location of last_chunk_value
28705         for big endian.
28707 2017-04-05  Eric Botcazou  <ebotcazou@adacore.com>
28709         PR target/78002
28710         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Replace
28711         ptr_mode with Pmode throughout.
28712         * config/aarch64/aarch64.md (probe_stack_range_<PTR:mode): Rename
28713         into probe_stack_range and use DImode.
28715 2017-04-05  Dominik Vogt  <vogt@linux.vnet.ibm.com>
28717         PR target/79890
28718         * config/s390/s390.c (s390_register_info_gprtofpr): Return if
28719         call_eh_return is true.
28721 2017-04-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
28723         * config/s390/s390-c.c (s390_resolve_overloaded_builtin):
28724         Initialize last_match_fntype_index.
28726 2017-04-05  Jakub Jelinek  <jakub@redhat.com>
28728         PR target/80310
28729         * tree-nvr.c: Include internal-fn.h.
28730         (pass_return_slot::execute): Ignore internal calls without
28731         direct optab.
28733 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
28734             Richard Biener  <rguenther@suse.de>
28736         PR c++/80297
28737         * genmatch.c (capture::gen_transform): For GENERIC unshare_expr
28738         captures used multiple times, except for the last use.
28739         * generic-match-head.c: Include gimplify.h.
28741 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
28743         PR tree-optimization/79390
28744         * target.h (struct noce_if_info): Declare.
28745         * targhooks.h (default_noce_conversion_profitable_p): Declare.
28746         * target.def (noce_conversion_profitable_p): New target hook.
28747         * ifcvt.h (struct noce_if_info): New type, moved from ...
28748         * ifcvt.c (struct noce_if_info): ... here.
28749         (noce_conversion_profitable_p): Renamed to ...
28750         (default_noce_conversion_profitable_p): ... this.  No longer
28751         static nor inline.
28752         (noce_try_store_flag_constants, noce_try_addcc,
28753         noce_try_store_flag_mask, noce_try_cmove, noce_try_cmove_arith,
28754         noce_convert_multiple_sets): Use targetm.noce_conversion_profitable_p
28755         instead of noce_conversion_profitable_p.
28756         * config/i386/i386.c: Include ifcvt.h.
28757         (ix86_option_override_internal): Don't override
28758         PARAM_MAX_RTL_IF_CONVERSION_INSNS default.
28759         (ix86_noce_conversion_profitable_p): New function.
28760         (TARGET_NOCE_CONVERSION_PROFITABLE_P): Redefine.
28761         * config/i386/x86-tune.def (X86_TUNE_ONE_IF_CONV_INSN): Adjust comment.
28762         * doc/tm.texi.in (TARGET_NOCE_CONVERSION_PROFITABLE_P): Add.
28763         * doc/tm.texi: Regenerated.
28765 2017-04-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28767         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Grammar
28768         correction.
28770 2017-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
28772         PR target/80307
28773         * config/arm/arm.c (thumb1_rtx_costs): Give a cost of 32
28774         instructions for small multiply cores.
28776 2017-04-04  Jeff Law  <law@redhat.com>
28778         * config/mips/mips.c (mips_multi_add): Zero initialize the newly
28779         added member.
28780         (mips_expand_vec_perm_const): Initialize elements in orig_perm
28781         that are not set by the loop over the elements.
28783 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
28785         PR target/80286
28786         * config/i386/i386.c (ix86_expand_args_builtin): If op has scalar
28787         int mode, convert_modes it to mode as unsigned, otherwise use
28788         lowpart_subreg to mode rather than SImode.
28789         * config/i386/sse.md (<mask_codefor>ashr<mode>3<mask_name>,
28790         ashr<mode>3, ashr<mode>3<mask_name>, <shift_insn><mode>3<mask_name>):
28791         Use DImode instead of SImode for the shift count operand.
28792         * config/i386/mmx.md (mmx_ashr<mode>3, mmx_<shift_insn><mode>3):
28793         Likewise.
28795 2017-04-04  Richard Biener  <rguenther@suse.de>
28797         PR middle-end/80281
28798         * match.pd (A + (-B) -> A - B): Make sure to preserve unsigned
28799         arithmetic done for the negate or the plus.  Simplify.
28800         (A - (-B) -> A + B): Likewise.
28801         * fold-const.c (split_tree): Make sure to not negate pointers.
28803 2017-04-04  Segher Boessenkool  <segher@kernel.crashing.org>
28805         PR rtl-optimization/60818
28806         * simplify-rtx.c (simplify_binary_operation_1): Do not replace
28807         a compare of comparisons with the thing compared if this results
28808         in a different machine mode.
28810 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
28812         * alias.c (base_alias_check): Fix typo in comment.
28813         * cgraph.h (class ipa_polymorphic_call_context): Likewise.
28814         * cgraphunit.c (symbol_table::compile): Likewise.
28815         * collect2.c (maybe_run_lto_and_relink): Likewise.
28816         * config/arm/arm.c (arm_thumb1_mi_thunk): Likewise.
28817         * config/avr/avr-arch.h (avr_arch_info_t): Likewise.
28818         * config/avr/avr.c (avr_map_op_t): Likewise.
28819         * config/cr16/cr16.h (DATA_ALIGNMENT): Likewise.
28820         * config/epiphany/epiphany.c (TARGET_ARG_PARTIAL_BYTES): Likewise.
28821         * config/epiphany/epiphany.md (movcc): Likewise.
28822         * config/i386/i386.c (legitimize_pe_coff_extern_decl): Likewise.
28823         * config/m68k/m68k.c (struct _sched_ib, m68k_sched_variable_issue):
28824         Likewise.
28825         * config/mips/mips.c (mips_save_restore_reg): Likewise.
28826         * config/rx/rx.c (rx_is_restricted_memory_address): Likewise.
28827         * config/s390/s390.c (Z10_EARLYLOAD_DISTANCE): Likewise.
28828         * config/sh/sh.c (sh_rtx_costs): Likewise.
28829         * fold-const.c (fold_truth_andor): Likewise.
28830         * genautomata.c (collapse_flag): Likewise.
28831         * gengtype.h (struct type::u::s): Likewise.
28832         * gensupport.c (has_subst_attribute, add_mnemonic_string): Likewise.
28833         * input.c (FORMAT_AMOUNT): Likewise.
28834         * ipa-cp.c (class ipcp_lattice, agg_replacements_to_vector)
28835         (known_aggs_to_agg_replacement_list): Likewise.
28836         * ipa-inline-analysis.c: Likewise.
28837         * ipa-inline.h (estimate_edge_time, estimate_edge_hints): Likewise.
28838         * ipa-polymorphic-call.c
28839         (ipa_polymorphic_call_context::restrict_to_inner_class): Likewise.
28840         * loop-unroll.c (analyze_insn_to_expand_var): Likewise.
28841         * lra.c (lra_optional_reload_pseudos, lra_subreg_reload_pseudos):
28842         Likewise.
28843         * modulo-sched.c (apply_reg_moves): Likewise.
28844         * omp-expand.c (build_omp_regions_1): Likewise.
28845         * trans-mem.c (struct tm_wrapper_hasher): Likewise.
28846         * tree-ssa-loop-ivopts.c (may_eliminate_iv): Likewise.
28847         * tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Likewise.
28848         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
28849         * value-prof.c: Likewise.
28850         * var-tracking.c (val_reset): Likewise.
28852 2017-04-03  Richard Biener  <rguenther@suse.de>
28854         PR tree-optimization/80275
28855         * fold-const.c (split_address_to_core_and_offset): Handle
28856         POINTER_PLUS_EXPR.
28858 2017-04-03  Eric Botcazou  <ebotcazou@adacore.com>
28860         * tree-nested.c (get_descriptor_type): Make sure that the alignment of
28861         descriptors is at least equal to that of functions.
28863 2017-04-02  Uros Bizjak  <ubizjak@gmail.com>
28865         * config/i386/sse.md (movdi_to_sse): Add missing DONE.
28867 2017-04-02  Uros Bizjak  <ubizjak@gmail.com>
28869         PR target/80250
28870         * config/i386/sse.md (mov<IMOD4:mode>): Remove insn pattern.
28871         (mov<IMOD4:mode>): New expander.
28872         (*mov<IMOD4:mode>_internal): New insn and split pattern.
28874 2017-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
28876         PR rtl-optimization/79405
28877         * fwprop.c (propagations_left): New variable.
28878         (forward_propagate_into): Decrement it.
28879         (fwprop_init): Initialize it.
28880         (fw_prop): If the variable has reached zero, stop propagating.
28881         (fwprop_addr): Ditto.
28883 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
28885         PR debug/79255
28886         * dwarf2out.c (decls_for_scope): If BLOCK_NONLOCALIZED_VAR is
28887         a FUNCTION_DECL, pass it as decl instead of origin to
28888         process_scope_var.
28890 2017-03-31  Alexander Monakov  <amonakov@ispras.ru>
28892         * config/nvptx/nvptx.c (nvptx_output_softstack_switch): Correct format
28893         string.
28895 2017-03-31  Pat Haugen  <pthaugen@us.ibm.com>
28897         PR target/80107
28898         * config/rs6000/rs6000.md (extendhi<mode>2): Add test for
28899         TARGET_VSX_SMALL_INTEGER.
28901 2017-03-31  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28903         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
28904         reference to the OpenPOWER 64-Bit ELF V2 ABI Specification.
28906 2017-03-31  Matthew Fortune  <matthew.fortune@imgtec.com>
28908         * config/mips/mips-msa.md (msa_vec_extract_<msafmt_f>): Update
28909         extraction from odd-numbered MSA register.
28911 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
28913         PR middle-end/80173
28914         * expmed.c (store_bit_field_1): Don't attempt to create
28915         a word subreg out of hard registers wider than word if they
28916         have HARD_REGNO_NREGS of 1 for their mode.
28918         PR middle-end/80163
28919         * varasm.c (initializer_constant_valid_p_1): Disallow sign-extending
28920         conversions to integer types wider than word and pointer.
28922         PR debug/80025
28923         * cselib.h (rtx_equal_for_cselib_1): Add depth argument.
28924         (rtx_equal_for_cselib_p): Pass 0 to it.
28925         * cselib.c (cselib_hasher::equal): Likewise.
28926         (rtx_equal_for_cselib_1): Add depth argument.  If depth
28927         is 128, don't look up VALUE locs and punt.  Increment
28928         depth in recursive calls when walking VALUE locs.
28930 2017-03-31  Bernd Edlinger  <bernd.edlinger@hotmail.de>
28932         * gcov.c (md5sum_to_hex): Fix output of MD5 hex bytes.
28933         (make_gcov_file_name): Use the canonical path name for generating
28934         the MD5 value.
28935         (read_line): Fix handling of files with ascii null bytes.
28937 2017-03-30  Matthew Fortune  <matthew.fortune@imgtec.com>
28939         * config/mips/mips.c (mips_expand_vector_init): Create a const_vector
28940         to initialise a vector register instead
28941         of using a const_int.
28943 2017-03-30  Jakub Jelinek  <jakub@redhat.com>
28945         PR translation/80189
28946         * gimplify.c (omp_default_clause): Use %qs instead of %s in
28947         diagnostic messages.
28949 2017-03-30  Peter Bergner  <bergner@vnet.ibm.com>
28951         PR target/80246
28952         * config/rs6000/dfp.md (dfp_dxex_<mode>): Update mode of operand 0.
28953         (dfp_diex_<mode>): Update mode of operand 1.
28954         * doc/extend.texi (dxex, dxexq): Document change to return type.
28955         (diex, diexq): Document change to argument type.
28957 2017-03-30  Martin Jambor  <mjambor@suse.cz>
28959         PR ipa/77333
28960         * cgraph.h (cgraph_build_function_type_skip_args): Declare.
28961         * cgraph.c (redirect_call_stmt_to_callee): Set gimple fntype so that
28962         it reflects the signature changes performed at the callee side.
28963         * cgraphclones.c (build_function_type_skip_args): Make public, renamed
28964         to cgraph_build_function_type_skip_args.
28965         (build_function_decl_skip_args): Adjust call to the above function.
28967 2017-03-30  Jakub Jelinek  <jakub@redhat.com>
28969         PR target/80206
28970         * config/i386/sse.md
28971         (<extract_type>_vextract<shuffletype><extract_suf>_mask): Use
28972         register as dest whenever it is a MEM not rtx_equal_p to the
28973         corresponding dup operand, and when forcing into reg move the
28974         reg into the memory afterwards.
28975         (<extract_type_2>_vextract<shuffletype><extract_suf_2>_mask):
28976         Likewise.  Use <ssehalfvecmode> instead of <ssequartermode>
28977         for the force_reg mode.
28978         (avx512vl_vextractf128<mode>): Use register as dest either
28979         always when a MEM, or when it is a MEM not rtx_equal_p to the
28980         corresponding dup operand, or even not when it is a CONST_VECTOR
28981         depending on the mode and lo vs. hi.
28982         (avx512dq_vextract<shuffletype>64x2_1_maskm): Remove extraneous
28983         parens.
28984         (avx512f_vextract<shuffletype>32x4_1_maskm): Likewise.
28985         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name>):
28986         Likewise.  Require that operands[2] is even.
28987         (<mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name>):
28988         Remove extraneous parens.  Require that operands[2] is a multiple
28989         of 4.
28990         (vec_extract_lo_<mode><mask_name>): Don't bother testing if
28991         operands[0] is a MEM if <mask_applied>, the predicates/constraints
28992         disallow memory then.
28994 2017-03-30  Richard Biener  <rguenther@suse.de>
28996         PR tree-optimization/77498
28997         * tree-ssa-pre.c (phi_translate_1): Do not allow simplifications
28998         to non-constants over backedges.
29000 2017-03-29  Segher Boessenkool  <segher@kernel.crashing.org>
29002         PR rtl-optimization/80233
29003         * combine.c (combine_instructions): Only take NONDEBUG_INSN_P insns
29004         as last_combined_insn.  Do not test for BARRIER_P separately.
29006 2017-03-29  Andreas Schwab  <schwab@suse.de>
29008         PR ada/80146
29009         * calls.c (prepare_call_address): Convert funexp to Pmode before
29010         copying to temp reg.
29012 2017-03-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29014         PR tree-optimization/80158
29015         * gimple-ssa-strength-reduction.c (replace_mult_candidate):
29016         Handle possible future case of more than one alternate
29017         interpretation.
29018         (replace_rhs_if_not_dup): Likewise.
29019         (replace_one_candidate): Likewise.
29021 2017-03-28  Vladimir Makarov  <vmakarov@redhat.com>
29023         PR rtl-optimization/80193
29024         * ira.c (ira): Do not check allocation for LRA.
29026 2017-03-28  Alexander Monakov  <amonakov@ispras.ru>
29028         * config/nvptx/nvptx-protos.h (nvptx_output_simt_enter): Declare.
29029         (nvptx_output_simt_exit): Declare.
29030         * config/nvptx/nvptx.c (nvptx_init_unisimt_predicate): Use
29031         cfun->machine->unisimt_location.  Handle NULL unisimt_predicate.
29032         (init_softstack_frame): Move initialization of crtl->is_leaf to...
29033         (nvptx_declare_function_name): ...here.  Emit declaration of local
29034         memory space buffer for omp_simt_enter insn.
29035         (nvptx_output_unisimt_switch): New.
29036         (nvptx_output_softstack_switch): New.
29037         (nvptx_output_simt_enter): New.
29038         (nvptx_output_simt_exit): New.
29039         * config/nvptx/nvptx.h (struct machine_function): New fields
29040         has_simtreg, unisimt_location, simt_stack_size, simt_stack_align.
29041         * config/nvptx/nvptx.md (UNSPECV_SIMT_ENTER): New unspec.
29042         (UNSPECV_SIMT_EXIT): Ditto.
29043         (omp_simt_enter_insn): New insn.
29044         (omp_simt_enter): New expansion.
29045         (omp_simt_exit): New insn.
29046         * config/nvptx/nvptx.opt (msoft-stack-reserve-local): New option.
29048         * internal-fn.c (expand_GOMP_SIMT_ENTER): New.
29049         (expand_GOMP_SIMT_ENTER_ALLOC): New.
29050         (expand_GOMP_SIMT_EXIT): New.
29051         * internal-fn.def (GOMP_SIMT_ENTER): New internal function.
29052         (GOMP_SIMT_ENTER_ALLOC): Ditto.
29053         (GOMP_SIMT_EXIT): Ditto.
29054         * target-insns.def (omp_simt_enter): New insn.
29055         (omp_simt_exit): Ditto.
29056         * omp-low.c (struct omplow_simd_context): New fields simt_eargs,
29057         simt_dlist.
29058         (lower_rec_simd_input_clauses): Implement SIMT privatization.
29059         (lower_rec_input_clauses): Likewise.
29060         (lower_lastprivate_clauses): Handle SIMT privatization.
29062         * omp-offload.c: Include langhooks.h, tree-nested.h, stor-layout.h.
29063         (ompdevlow_adjust_simt_enter): New.
29064         (find_simtpriv_var_op): New.
29065         (execute_omp_device_lower): Handle IFN_GOMP_SIMT_ENTER,
29066         IFN_GOMP_SIMT_ENTER_ALLOC, IFN_GOMP_SIMT_EXIT.
29068         * tree-inline.h (struct copy_body_data): New field dst_simt_vars.
29069         * tree-inline.c (expand_call_inline): Handle SIMT privatization.
29070         (copy_decl_for_dup_finish): Ditto.
29072         * tree-ssa.c (execute_update_addresses_taken): Handle GOMP_SIMT_ENTER.
29074 2017-03-28  Uros Bizjak  <ubizjak@gmail.com>
29076         PR target/53383
29077         * config/i386/i386.c (ix86_option_override_internal): Always
29078         allow -mpreferred-stack-boundary=3 for 64-bit targets.
29080 2017-03-28  Bin Cheng  <bin.cheng@arm.com>
29082         * tree-vect-loop.c (optimize_mask_stores): Add bb to the right loop.
29084 2017-03-28  Bin Cheng  <bin.cheng@arm.com>
29086         * tree-vect-loop-manip.c (slpeel_add_loop_guard): New param and
29087         mark new edge's irreducible flag accordign to it.
29088         (vect_do_peeling): Check loop preheader edge's irreducible flag
29089         and pass it to function slpeel_add_loop_guard.
29091 2017-03-28  Richard Sandiford  <richard.sandiford@arm.com>
29093         PR tree-optimization/80218
29094         * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
29095         Update block frequencies and counts.
29097 2017-03-28  Richard Biener  <rguenther@suse.de>
29099         PR tree-optimization/78644
29100         * tree-ssa-ccp.c (evaluate_stmt): When we may not use the value
29101         of a simplification result we may not use it at all.
29103 2017-03-28  Richard Biener  <rguenther@suse.de>
29105         PR ipa/80205
29106         * tree-inline.c (copy_phis_for_bb): Do not create PHI node
29107         without arguments, generate default definition of a SSA name.
29109 2017-03-28  Richard Biener  <rguenther@suse.de>
29111         PR middle-end/80222
29112         * gimple-fold.c (gimple_fold_indirect_ref): Do not touch
29113         TYPE_REF_CAN_ALIAS_ALL references.
29114         * fold-const.c (fold_indirect_ref_1): Likewise.
29116 2017-03-28  Martin Liska  <mliska@suse.cz>
29118         PR ipa/80104
29119         * cgraphunit.c (cgraph_node::expand_thunk): Mark argument of a
29120         thunk call as DECL_GIMPLE_REG_P when vector or complex type.
29122 2017-03-28  Claudiu Zissulescu  <claziss@synopsys.com>
29123             Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
29125         * config/arc/arc.h (CPP_SPEC): Add subtarget_cpp_spec.
29126         (EXTRA_SPECS): Define.
29127         (SUBTARGET_EXTRA_SPECS): Likewise.
29128         (SUBTARGET_CPP_SPEC): Likewise.
29129         * config/arc/elf.h (EXTRA_SPECS): Renamed to
29130         SUBTARGET_EXTRA_SPECS.
29131         * config/arc/linux.h (SUBTARGET_CPP_SPEC): Define.
29133 2017-03-28  Claudiu Zissulescu  <claziss@synopsys.com>
29135         * config/arc/simdext.md (vst64_insn): Update pattern.
29136         (vld32wh_insn): Likewise.
29137         (vld32wl_insn): Likewise.
29138         (vld64_insn): Likewise.
29139         (vld32_insn): Likewise.
29141 2017-03-28  Marek Polacek  <polacek@redhat.com>
29143         PR sanitizer/80067
29144         * fold-const.c (fold_comparison): Use protected_set_expr_location
29145         instead of SET_EXPR_LOCATION.
29147 2017-03-28  Markus Trippelsdorf  <markus@trippelsdorf.de>
29149         * tree.c (add_expr): Avoid name lookup warning.
29151 2017-03-27  Jeff Law  <law@redhat.com>
29153         PR tree-optimization/80216
29154         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Fix typo in
29155         function name.  Limit recursion depth.
29156         (record_temporary_equivalences): Corresponding changes.
29158 2017-03-27  Jonathan Wakely  <jwakely@redhat.com>
29160         * doc/invoke.texi (-Wno-narrowing): Reorder so default behavior is
29161         covered first.
29163 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
29165         PR target/80102
29166         * reg-notes.def (REG_CFA_NOTE): Define.  Use it for CFA related
29167         notes.
29168         * cfgcleanup.c (reg_note_cfa_p): New array.
29169         (insns_have_identical_cfa_notes): New function.
29170         (old_insns_match_p): Don't cross-jump in between /f
29171         and non-/f instructions.  If both i1 and i2 are frame related,
29172         verify all CFA notes, their order and content.
29174 2017-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
29176         PR target/78543
29177         * config/rs6000/rs6000.md (bswaphi2_extenddi): Combine bswap
29178         HImode and SImode with zero extend to DImode to one insn.
29179         (bswap<mode>2_extenddi): Likewise.
29180         (bswapsi2_extenddi): Likewise.
29181         (bswaphi2_extendsi): Likewise.
29182         (bswaphi2): Combine bswap HImode and SImode into one insn.
29183         Separate memory insns from swapping register.
29184         (bswapsi2): Likewise.
29185         (bswap<mode>2): Likewise.
29186         (bswaphi2_internal): Delete, no longer used.
29187         (bswapsi2_internal): Likewise.
29188         (bswap<mode>2_load): Split bswap HImode/SImode into separate load,
29189         store, and gpr<-gpr swap insns.
29190         (bswap<mode>2_store): Likewise.
29191         (bswaphi2_reg): Register only splitter, combine with the splitter.
29192         (bswaphi2 splitter): Likewise.
29193         (bswapsi2_reg): Likewise.
29194         (bswapsi2 splitter): Likewise.
29195         (bswapdi2): If we have the LDBRX and STDBRX instructions, split
29196         the insns into load, store, and register/register insns.
29197         (bswapdi2_ldbrx): Likewise.
29198         (bswapdi2_load): Likewise.
29199         (bswapdi2_store): Likewise.
29200         (bswapdi2_reg): Likewise.
29202 2017-03-27  Gunther Nikl  <gnikl@users.sourceforge.net>
29204         * system.h (HAVE_DESIGNATED_INITIALIZERS): Fix non C++ case.
29205         (HAVE_DESIGNATED_UNION_INITIALIZERS): Likewise.
29207 2017-03-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
29209         PR target/80103
29210         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Edit and
29211         add comments.
29212         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
29213         special handling for target option conflicts between dform
29214         options (-mpower9-dform, -mpower9-dform-vector,
29215         -mpower9-dform-scalar) and -mno-direct-move.
29217 2017-03-27  Richard Biener  <rguenther@suse.de>
29219         PR tree-optimization/80181
29220         * tree-ssa-ccp.c (likely_value): UNDEFINED ^ X is UNDEFINED.
29222 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
29224         * config/arc/predicates.md (move_double_src_operand): Replace the
29225         call to move_double_src_operand with a call to address_operand.
29227 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
29229         * config/arc/elf.h (ARGET_ARC_TP_REGNO_DEFAULT): Define.
29230         * config/arc/linux.h (ARGET_ARC_TP_REGNO_DEFAULT): Likewise.
29231         * config/arc/arc.opt (mtp-regno): Use ARGET_ARC_TP_REGNO_DEFAULT.
29233 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
29235         * config/arc/predicates.md (long_immediate_loadstore_operand):
29236         Consider scaled addresses cases.
29238 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
29240         * config/arc/arc.c (arc_epilogue_uses): BLINK should be also
29241         restored when in interrupt.
29242         * config/arc/arc.md (simple_return): ARCv2 rtie instruction
29243         doesn't have delay slot.
29245 2017-03-27  Richard Biener  <rguenther@suse.de>
29247         PR ipa/79776
29248         * tree-ssa-structalias.c (associate_varinfo_to_alias): Skip
29249         inlined thunk clones.
29251 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
29253         PR sanitizer/80168
29254         * asan.c (instrument_derefs): Copy over last operand from
29255         original COMPONENT_REF to the new COMPONENT_REF with
29256         DECL_BIT_FIELD_REPRESENTATIVE.
29257         * ubsan.c (instrument_object_size): Likewise.
29259 2017-03-27  Richard Biener  <rguenther@suse.de>
29261         PR tree-optimization/80170
29262         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Make
29263         sure DR/SCEV didnt fold in constants we do not see when looking
29264         at the reference base alignment.
29266 2017-03-27  Richard Biener  <rguenther@suse.de>
29268         PR middle-end/80171
29269         * gimple-fold.c (fold_ctor_reference): Properly guard against
29270         NULL return value from canonicalize_constructor_val.
29272 2017-03-25  Uros Bizjak  <ubizjak@gmail.com>
29274         PR target/80180
29275         * config/i386/i386.c (ix86_expand_builtin)
29276         <IX86_BUILTIN_RDSEED{16,32,64}_STEP>: Do not expand arg0 between
29277         flags reg setting and flags reg using instructions.
29278         <IX86_BUILTIN_RDRAND{16,32,64}_STEP>: Ditto.  Use non-flags reg
29279         clobbering instructions to zero extend op2.
29281 2017-03-25  Gerald Pfeifer  <gerald@pfeifer.com>
29283         * doc/install.texi (Configuration) <--with-aix-soname>:
29284         Update link to AIX ld.
29286 2017-03-25  Bernd Schmidt  <bschmidt@redhat.com>
29288         PR rtl-optimization/80160
29289         PR rtl-optimization/80159
29290         * lra-assigns.c (must_not_spill_p): Tighten new test to also take
29291         reg_alternate_class into account.
29293 2017-03-24  Vladimir Makarov  <vmakarov@redhat.com>
29295         PR target/80148
29296         * lra-assigns.c (assign_by_spills): Add spilled non-reload pseudos
29297         to consider in curr_insn_transform.
29299 2017-03-24  Jakub Jelinek  <jakub@redhat.com>
29301         * genrecog.c (validate_pattern): Add VEC_SELECT validation.
29302         * genmodes.c (emit_min_insn_modes_c): Call emit_mode_nunits
29303         and emit_mode_inner.
29305 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29307         * config/s390/s390-builtins.def: Add VXE builtins.  Add a flags
29308         argument to the overloaded builtin variants.  Use the new flag to
29309         deprecate certain builtin variants.
29310         * config/s390/s390-builtin-types.def: Add new builtin types.
29311         * config/s390/s390-builtins.h: Support new flags field for
29312         overloaded builtins.
29313         * config/s390/s390-c.c (OB_DEF_VAR): New flags field.
29314         (s390_macro_to_expand): Enable vector float data type.
29315         (s390_cpu_cpp_builtins_internal): Indicate support of the new
29316         builtins by incrementing the __VEC__ version number.
29317         (s390_expand_overloaded_builtin): Support expansion of vec_xl and
29318         vec_xst.
29319         (s390_resolve_overloaded_builtin): Emit error messages depending
29320         on the builtin flags.
29321         * config/s390/s390.c (s390_expand_builtin): Support additional
29322         flags argument.  Change error message to match the messages
29323         emitted in s390-c.c.
29324         * config/s390/s390.md: New UNSPEC_* constants.
29325         (op_type): Add new instruction types.
29326         * config/s390/vecintrin.h: Add new builtins and test data class
29327         constants.
29328         * config/s390/vx-builtins.md (V_HW_32_64): Add V4SF.
29329         (V_HW_4, VEC_HW, VECF_HW): New mode iterators.
29330         (VEC_INEXACT, VEC_NOINEXACT): New constants.
29331         ("vec_splats<mode>", "vec_insert<mode>", "vec_promote<mode>")
29332         ("vec_insert_and_zero<mode>", "vec_mergeh<mode>")
29333         ("vec_mergel<mode>"): V_HW -> VEC_HW.
29335         ("vlrlrv16qi", "vstrlrv16qi", "vbpermv16qi", "vec_msumv2di")
29336         ("vmslg", "*vftci<mode>_cconly", "vftci<mode>_intcconly")
29337         ("*vftci<mode>", "vftci<mode>_intcc", "vec_double_s64")
29338         ("vec_double_u64", "vfmin<mode>", "vfmax<mode>"): New definition.
29340         ("and_av2df3", "and_cv2df3", "vec_andc_av2df3")
29341         ("vec_andc_cv2df3", "xor_av2df3", "xor_cv2df3", "vec_nor_av2df3")
29342         ("vec_nor_cv2df3", "ior_av2df3", "ior_cv2df3", "vec_nabs")
29343         ("*vftcidb", "*vftcidb_cconly", "vftcidb"): Remove definition.
29345         ("vec_all_<fpcmpcc:code>v2df", "vec_any_<fpcmpcc:code>v2df")
29346         ("vec_scatter_elementv4si_DI", "vec_cmp<fpcmp:code>v2df")
29347         ("vec_di_to_df_s64", "vec_di_to_df_u64", "vec_df_to_di_u64")
29348         ("vfidb", "*vldeb", "*vledb", "*vec_cmp<insn_cmp>v2df_cconly")
29349         ("vec_cmpeqv2df_cc", "vec_cmpeqv2df_cc", "vec_cmphv2df_cc")
29350         ("vec_cmphev2df_cc", "*vec_cmpeqv2df_cc")
29351         ("*vec_cmphv2df_cc", "*vec_cmphev2df_cc"): Enable new modes as ...
29353         ("vec_all_<fpcmpcc:code><mode>", "vec_any_<fpcmpcc:code><mode>")
29354         ("vec_scatter_element<V_HW_4:mode>_DI")
29355         ("vec_cmp<fpcmp:code><mode>", "vcdgb", "vcdlgb", "vclgdb")
29356         ("vec_fpint<mode>", "vflls")
29357         ("vflrd", "*vec_cmp<insn_cmp><mode>_cconly", "vec_cmpeq<mode>_cc")
29358         ("vec_cmpeq<mode>_cc", "vec_cmph<mode>_cc", "vec_cmphe<mode>_cc")
29359         ("*vec_cmpeq<mode>_cc", "*vec_cmph<mode>_cc")
29360         ("*vec_cmphe<mode>_cc"): ... these.
29362         ("vec_ctd_s64", "vec_ctsl", "vec_ctul", "vec_st2f"): Use rounding
29363         mode constant instead of magic value.
29365 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29367         * config/s390/s390.c (s390_expand_vec_compare): Support other
29368         vector floating point modes than just V2DF.
29369         (s390_expand_vcond): Likewise.
29370         (s390_hard_regno_mode_ok): Allow SFmode values in VRs.
29371         (s390_cannot_change_mode_class): Prevent mode changes between TF
29372         and V1TF in vector registers.
29373         * config/s390/s390.md (DF, SF): New mode attributes.
29374         ("*cmp<mode>_ccs", "add<mode>3", "sub<mode>3", "mul<mode>3")
29375         ("fma<mode>4", "fms<mode>4", "div<mode>3", "*neg<mode>2"): Add
29376         SFmode support for VRs.
29377         * config/s390/vector.md (V_HW, V_HW2, VT_HW, ti*, nonvec): Add new
29378         vector fp modes.
29379         (VFT, VF_HW): New mode iterators.
29380         (vw, sdx): New mode attributes.
29381         ("addv2df3", "subv2df3", "mulv2df3", "divv2df3", "sqrtv2df2")
29382         ("fmav2df4","fmsv2df4", "negv2df2", "absv2df2", "*negabsv2df2")
29383         ("smaxv2df3", "sminv2df3", "*vec_cmp<VFCMP_HW_OP:code>v2df_nocc")
29384         ("vec_cmpuneqv2df", "vec_cmpltgtv2df", "vec_orderedv2df")
29385         ("vec_unorderedv2df"): Adjust the v2df only patterns to support
29386         also the new vector floating point modes.  Renaming to ...
29388         ("add<mode>3", "sub<mode>3", "mul<mode>3", "div<mode>3")
29389         ("sqrt<mode>2", "fma<mode>4", "fms<mode>4", "neg<mode>2")
29390         ("abs<mode>2", "negabs<mode>2", "smax<mode>3")
29391         ("smin<mode>3", "*vec_cmp<VFCMP_HW_OP:code><mode>_nocc")
29392         ("vec_cmpuneq<mode>", "vec_cmpltgt<mode>", "vec_ordered<mode>")
29393         ("vec_unordered<mode>"): ... these.
29395         ("neg_fma<mode>4", "neg_fms<mode>4", "*smax<mode>3_vxe")
29396         ("*smin<mode>3_vxe", "*sminv2df3_vx", "*vec_extendv4sf")
29397         ("*vec_extendv2df"): New insn definitions.
29399 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29401         * config/s390/s390.md ("*adddi3_sign", "*subdi3_sign", "mulditi3")
29402         ("mulditi3_2", "*muldi3_sign"): New patterns.
29403         ("muldi3", "*muldi3", "mulsi3", "*mulsi3"): Add an expander and
29404         rename the pattern definition.
29406 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29408         * config/s390/s390.md ("indirect_jump"): Turn insn definition into
29409         expander.
29410         ("*indirect_jump", "*indirect2_jump"): New pattern definitions.
29412 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29414         * config/s390/s390.c (s390_expand_vec_init): Use vllezl
29415         instruction if possible.
29416         * config/s390/vector.md (vec_halfnumelts): New mode
29417         attribute.
29418         ("*vec_vllezlf<mode>"): New pattern.
29420 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29422         * config/s390/vector.md ("popcountv16qi2", "popcountv8hi2")
29423         ("popcountv4si2", "popcountv2di2"): Rename to ...
29424         ("popcount<mode>2", "popcountv8hi2_vx", "popcountv4si2_vx")
29425         ("popcountv2di2_vx"): ... these and add !TARGET_VXE to the
29426         condition.
29427         ("popcount<mode>2_vxe"): New pattern.
29429 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29431         * common/config/s390/s390-common.c (processor_flags_table): Add
29432         arch12.
29433         * config.gcc: Add arch12.
29434         * config/s390/driver-native.c (s390_host_detect_local_cpu):
29435         Default to arch12 for unknown CPU model numbers.
29436         * config/s390/s390-builtins.def: Add B_VXE builtin flag.
29437         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Adjust
29438         PROCESSOR_max sanity check.
29439         * config/s390/s390-opts.h (enum processor_type): Add
29440         PROCESSOR_ARCH12.
29441         * config/s390/s390.c (processor_table): Add arch12.
29442         (s390_expand_builtin): Add check for B_VXE flag.
29443         (s390_issue_rate): Add PROCESSOR_ARCH12.
29444         (s390_get_sched_attrmask): Likewise.
29445         (s390_get_unit_mask): Likewise.
29446         (s390_sched_score): Enable z13 scheduling for arch12.
29447         (s390_sched_reorder): Likewise.
29448         (s390_sched_variable_issue): Likewise.
29449         * config/s390/s390.h (enum processor_flags): Add PF_ARCH12 and
29450         PF_VXE.
29451         (s390_tune_attr): Use z13 scheduling also for arch12.
29452         (TARGET_CPU_ARCH12, TARGET_CPU_ARCH12_P, TARGET_CPU_VXE)
29453         (TARGET_CPU_VXE_P, TARGET_ARCH12, TARGET_ARCH12_P, TARGET_VXE)
29454         (TARGET_VXE_P): New macros.
29455         * config/s390/s390.md: Add arch12 to cpu attribute.  Add arch12
29456         and vxe to cpu_facility.  Add arch12 and vxe to enabled attribute.
29457         * config/s390/s390.opt: Add arch12 as processor_type.
29459 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29461         * config/s390/s390.md
29462         ("fixuns_truncdddi2", "fixuns_trunctddi2")
29463         ("fixuns_trunc<BFP:mode><GPR:mode>2"): Merge into ...
29464         ("fixuns_trunc<FP:mode><GPR:mode>2"): New expander.
29466         ("fixuns_trunc<BFP:mode><GPR:mode>2", "fixuns_trunc<mode>si2"):
29467         Rename expanders to ...
29469         ("fixuns_trunc<BFP:mode><GPR:mode>2_emu")
29470         ("fixuns_truncdddi2_emu"): ... these.
29472         ("fixuns_trunc<mode>si2_emu"): New expander.
29474         ("*fixuns_truncdfdi2_z13"): Rename to ...
29475         ("*fixuns_truncdfdi2_vx"): ... this.
29477 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29479         * config/s390/2964.md: Remove the single element vector compare
29480         instructions which are no longer used.
29481         * config/s390/s390.c (s390_select_ccmode): Remove handling of
29482         vector CCmodes.
29483         (s390_canonicalize_comparison): Remove handling of DFmode
29484         compares.
29485         (s390_expand_vec_compare_scalar): Remove function.
29486         (s390_emit_compare): Don't call s390_expand_vec_compare_scalar.
29487         * config/s390/s390.md ("*vec_cmp<insn_cmp>df_cconly"): Remove
29488         pattern.
29489         ("*cmp<mode>_ccs"): Add wfcdb instruction.
29491 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29493         * config/s390/s390.md ("mov<mode>_64dfp" DD_DF): Use vleig for loading a
29494         FP zero.
29495         ("*mov<mode>_64" DD_DF): Remove the vector instructions. These
29496         will anyway by matched by mov<mode>_64dfp.
29498 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29500         * config/s390/s390.md ("mov<mode>" SD_SF): Change vleg/vsteg to
29501         vlef/vstef.  Add missing operand to vleif.
29503 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29505         * config/s390/s390.c (s390_expand_vec_init): Enable vector load
29506         pair for all vector types with 64 bit elements.
29507         * config/s390/vx-builtins.md (V_HW_64): Move mode iterator to ...
29508         * config/s390/vector.md (V_HW_64): ... here.
29509         (V_128_NOSINGLE): New mode iterator.
29510         ("vec_init<V_HW:mode>"): Use V_128 as mode iterator.
29511         ("*vec_splat<mode>"): Use V_128_NOSINGLE mode iterator.
29512         ("*vec_tf_to_v1tf", "*vec_ti_to_v1ti"): New pattern definitions.
29513         ("*vec_load_pairv2di"): Change to ...
29514         ("*vec_load_pair<mode>"): ... this one.
29516 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29518         * config/s390/constraints.md: Add comments.
29519         (jKK): Reject element sizes > 8 bytes.
29520         * config/s390/s390.c (s390_split_ok_p): Enable splitting also for
29521         s_operands.
29522         * config/s390/s390.md: Add the s_operand checks formerly in
29523         s390_split_ok_p to various splitters where they are still
29524         required.
29525         * config/s390/vector.md ("mov<mode>" V_128): Add GPR alternatives
29526         for 128 bit vectors.  Plus two splitters.
29528 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29530         * config/s390/s390.md: Rename the cpu facilty vec to vx throughout
29531         the file.
29533 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29535         PR target/79893
29536         * config/s390/s390-c.c (s390_adjust_builtin_arglist): Issue an
29537         error if the boundary argument is not constant.
29539 2017-03-24  Jakub Jelinek  <jakub@redhat.com>
29541         PR rtl-optimization/80112
29542         * loop-doloop.c (doloop_condition_get): Don't check condition
29543         if cmp isn't SET with IF_THEN_ELSE src.
29545 2017-03-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29547         PR tree-optimization/80158
29548         * gimple-ssa-strength-reduction.c (replace_mult_candidate): When
29549         replacing a candidate statement, also replace it for the
29550         candidate's alternate interpretation.
29551         (replace_rhs_if_not_dup): Likewise.
29552         (replace_one_candidate): Likewise.
29554 2017-03-24  Richard Biener  <rguenther@suse.de>
29556         PR tree-optimization/80167
29557         * graphite-isl-ast-to-gimple.c
29558         (translate_isl_ast_to_gimple::is_valid_rename): Handle default-defs
29559         properly.
29560         (translate_isl_ast_to_gimple::get_rename): Likewise.
29562 2017-03-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>
29564         * config/rs6000/rs6000.c (rs6000_option_override_internal): Change
29565         handling of certain combinations of target options, including the
29566         combinations -mpower8-vector vs. -mno-vsx, -mpower9-vector vs.
29567         -mno-power8-vector, and -mpower9_dform vs. -mno-power9-vector.
29569 2017-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29571         PR target/71436
29572         * config/arm/arm.md (*load_multiple): Add reload_completed to
29573         matching condition.
29575 2017-03-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29576             Richard Biener  <rguenth@suse.de>
29578         PR tree-optimization/79908
29579         PR tree-optimization/80136
29580         * tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
29581         been cast away, gimplify_and_add suffices.
29583 2017-03-23  Markus Trippelsdorf  <markus@trippelsdorf.de>
29585         * tree-vrp.c (identify_jump_threads): Delete avail_exprs.
29587 2017-03-23  Richard Biener  <rguenther@suse.de>
29589         PR tree-optimization/80032
29590         * gimplify.c (gimple_push_cleanup): Forced unconditional
29591         cleanups still have to go to the conditional_cleanups
29592         sequence.
29594 2017-03-22  Jakub Jelinek  <jakub@redhat.com>
29596         PR tree-optimization/80072
29597         * tree-ssa-reassoc.c (struct operand_entry): Change id field type
29598         to unsigned int.
29599         (next_operand_entry_id): Change type to unsigned int.
29600         (sort_by_operand_rank): Make sure to return the right return value
29601         even if unsigned fields are bigger than INT_MAX.
29602         (struct oecount): Change cnt and id type to unsigned int.
29603         (oecount_hasher::equal): Formatting fix.
29604         (oecount_cmp): Make sure to return the right return value
29605         even if unsigned fields are bigger than INT_MAX.
29606         (undistribute_ops_list): Change next_oecount_id type to unsigned int.
29608         PR c++/80129
29609         * gimplify.c (gimplify_modify_expr_rhs) <case COND_EXPR>: Clear
29610         TREE_READONLY on result if writing it more than once.
29612         PR sanitizer/80110
29613         * doc/invoke.texi (-fsanitize=thread): Document that with
29614         -fnon-call-exceptions atomics are not able to throw
29615         exceptions.
29617         PR sanitizer/80110
29618         * tsan.c: Include tree-eh.h.
29619         (instrument_builtin_call): Call maybe_clean_eh_stmt or
29620         maybe_clean_or_replace_eh_stmt where needed.
29621         (instrument_memory_accesses): Add cfg_changed argument.
29622         Call gimple_purge_dead_eh_edges on each block and set *cfg_changed
29623         if it returned true.
29624         (tsan_pass): Adjust caller.  Return TODO_cleanup_cfg if cfg_changed.
29626         PR rtl-optimization/63191
29627         * config/i386/i386.c (ix86_delegitimize_address): Turn into small
29628         wrapper function, moved the whole old content into ...
29629         (ix86_delegitimize_address_1): ... this.  New inline function.
29630         (ix86_find_base_term): Use ix86_delegitimize_address_1 with
29631         true as last argument instead of ix86_delegitimize_address.
29633 2017-03-22  Wilco Dijkstra  <wdijkstr@arm.com>
29635         * config/aarch64/aarch64.c (generic_branch_cost): Copy
29636         cortexa57_branch_cost.
29638 2017-03-22  Wilco Dijkstra  <wdijkstr@arm.com>
29640         * config/aarch64/aarch64.c (generic_tunings): Add AES fusion.
29642 2017-03-21  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
29644         PR target/80123
29645         * doc/md.texi (Constraints): Document wA constraint.
29646         * config/rs6000/constraints.md (wA): New.
29647         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Add wA reg_class.
29648         (rs6000_init_hard_regno_mode_ok): Init wA constraint.
29649         * config/rs6000/rs6000.h (RS6000_CONSTRAINT_wA): New.
29650         * config/rs6000/vsx.md (vsx_splat_<mode>): Use wA constraint.
29652 2017-03-22  Cesar Philippidis  <cesar@codesourcery.com>
29654         PR c++/80029
29655         * gimplify.c (is_oacc_declared): New function.
29656         (oacc_default_clause): Use it to set default flags for acc declared
29657         variables inside parallel regions.
29658         (gimplify_scan_omp_clauses): Strip firstprivate pointers for acc
29659         declared variables.
29660         (gimplify_oacc_declare): Gimplify the declare clauses.  Add the
29661         declare attribute to any decl as necessary.
29663 2017-03-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
29665         PR target/80082
29666         * config/arm/arm-isa.h (isa_bit_lpae): New feature bit.
29667         (ISA_ARMv7ve): Add isa_bit_lpae to the definition.
29668         * config/arm/arm-protos.h (arm_arch7ve): Rename into ...
29669         (arm_arch_lpae): This.
29670         * config/arm/arm.c (arm_arch7ve): Rename into ...
29671         (arm_arch_lpae): This.  Define it in term of isa_bit_lpae.
29672         * config/arm/arm.h (TARGET_HAVE_LPAE): Redefine in term of
29673         arm_arch_lpae.
29675 2017-03-22  Martin Liska  <mliska@suse.cz>
29677         PR target/79906
29678         * config/rs6000/rs6000.c (rs6000_inner_target_options): Show
29679         error message instead of an ICE.
29681 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29683         * doc/extend.texi (6.11 Additional Floating Types): Revise.
29685 2017-03-21  Kelvin Nilsen  <kelvin@gcc.gnu.org>
29687         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Add
29688         comments.
29689         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
29690         comments.
29692 2017-03-21  Martin Sebor  <msebor@redhat.com>
29694         * doc/extend.texi: Use "cannot" instead of "can't."
29695         * doc/hostconfig.texi: Same.
29696         * doc/install.texi: Same.
29697         * doc/invoke.texi: Same.
29698         * doc/loop.texi: Same.
29699         * doc/md.texi: Same.
29700         * doc/objc.texi: Same.
29701         * doc/rtl.texi: Same.
29702         * doc/tm.texi: Same.
29703         * doc/tm.texi.in: Same.
29704         * doc/trouble.texi: Same.
29706 2017-03-21  Alexandre Oliva <aoliva@redhat.com>
29708         PR debug/63238
29709         * dwarf2out.c (struct checksum_attributes): Add at_alignment.
29710         (collect_checksum_attributes): Set it.
29711         (die_checksum_ordered): Use it.
29713 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29715         PR tree-optimization/79908
29716         * tree-stdarg.c (expand_ifn_va_arg_1): Revert the following
29717         change: For a VA_ARG whose LHS has been cast away, use
29718         force_gimple_operand to construct the side effects.
29720 2017-03-21  David Malcolm  <dmalcolm@redhat.com>
29722         PR translation/80001
29723         * omp-offload.c (oacc_loop_fixed_partitions): Make diagnostics
29724         more amenable to translation.
29725         (oacc_loop_auto_partitions): Likewise.
29727 2017-03-21  Marek Polacek  <polacek@redhat.com>
29728             Martin Sebor  <msebor@redhat.com>
29730         PR tree-optimization/80109
29731         * gimple-ssa-warn-alloca.c (alloca_call_type): Only call get_range_info
29732         on INTEGRAL_TYPE_P.
29734 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
29735             Segher Boessenkool  <segher@kernel.crashing.org>
29737         PR target/80125
29738         * combine.c (can_combine_p): Revert the 2017-03-20 change, only
29739         check reg_used_between_p between insn and one of succ or succ2
29740         depending on if succ is artificial insn not inserted into insn
29741         stream.
29743 2017-03-21  Martin Liska  <mliska@suse.cz>
29745         PR gcov-profile/80081
29746         * Makefile.in: Add gcov-dump and fix installation of gcov-tool.
29747         * doc/gcc.texi: Include gcov-dump stuff.
29748         * doc/gcov-dump.texi: New file.
29750 2017-03-21  Toma Tabacu  <toma.tabacu@imgtec.com>
29752         PR rtl-optimization/79150
29753         * config/mips/mips.c (mips_block_move_loop): Emit a NOP after the
29754         conditional jump, if the jump is the last insn of the loop.
29756 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29757             Richard Biener  <rguenth@suse.de>
29759         PR tree-optimization/79908
29760         * tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
29761         been cast away, use force_gimple_operand to construct the side
29762         effects.
29764 2017-03-21  Martin Liska  <mliska@suse.cz>
29766         PR libfortran/79956
29767         * simplify-rtx.c (simplify_immed_subreg): Initialize a variable
29768         to NULL.
29770 2017-03-21  Brad Spengler <spender@grsecurity.net>
29772         PR plugins/80094
29773         * plugin.c (htab_hash_plugin): New function.
29774         (add_new_plugin): Use it and adjust.
29775         (parse_plugin_arg_opt): Adjust.
29776         (init_one_plugin): Likewise.
29778 2017-03-21  Richard Biener  <rguenther@suse.de>
29780         PR tree-optimization/80032
29781         * gimplify.c (gimple_push_cleanup): Add force_uncond parameter,
29782         if set force the cleanup to happen unconditionally.
29783         (gimplify_target_expr): Push inserted clobbers with force_uncond
29784         to avoid them being removed by control-dependent DCE.
29786 2017-03-21  Richard Biener  <rguenther@suse.de>
29788         PR tree-optimization/80122
29789         * tree-inline.c (copy_bb): Do not expans va-arg packs or
29790         va_arg_pack_len when the inlined call stmt requires pack
29791         expansion itself.
29792         * tree-inline.h (struct copy_body_data): Make call_stmt a gcall *.
29794 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
29796         PR sanitizer/78158
29797         * tsan.c (instrument_builtin_call): If the memory model argument
29798         is not a constant, assume it is valid.
29800         PR c/67338
29801         * fold-const.c (round_up_loc): Negate divisor in unsigned type to
29802         avoid UB.
29804 2017-03-20  Segher Boessenkool  <segher@kernel.crashing.org>
29806         PR rtl-optimization/79910
29807         * combine.c (can_combine_p): Do not allow combining an I0 or I1
29808         if its dest is used by an insn before I2 (other than the combined
29809         insns themselves, which are properly handled already).
29811 2017-03-20  Segher Boessenkool  <segher@kernel.crashing.org>
29813         Revert:
29814         2017-03-17  Bernd Schmidt  <bschmidt@redhat.com>
29816         * combine.c (record_used_regs): New static function.
29817         (try_combine): Handle situations where there is an additional
29818         instruction between I2 and I3 which needs to have a LOG_LINK
29819         updated.
29821         Revert:
29822         2017-03-17  Jim Wilson  <jim.wilson@linaro.org>
29824         * combine.c (try_combine): Delete redundant i1 test.  Call
29825         prev_nonnote_nondebug_insn instead of prev_nonnote_insn.
29827 2017-03-20  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
29829         PR target/80083
29830         * config/rs6000/rs6000.md (*movsi_internal1): Fix constraints for
29831         alternatives 13/14.
29833 2017-03-20  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29835         PR tree-optimization/80054
29836         * gimple-ssa-strength-reduction.c (all_phi_incrs_profitable): Fail
29837         the optimization if a PHI or any of its arguments is not dominated
29838         by the candidate's basis.  Use gphi* rather than gimple* as
29839         appropriate.
29840         (replace_profitable_candidates): Clean up a gimple* variable that
29841         should be a gphi* variable.
29843 2017-03-20  Martin Sebor  <msebor@redhat.com>
29845         PR c++/52477
29846         * doc/extend.texi (attribute constructor): Document present limitation.
29848 2017-03-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
29850         PR target/79963
29851         * config/rs6000/altivec.h (vec_all_ne): Under __cplusplus__ and
29852         __POWER9_VECTOR__ #ifdef control, change template definition to
29853         use Power9-specific built-in function.
29854         (vec_any_eq): Likewise.
29855         * config/rs6000/vector.md (vector_ae_v2di_p): Change the flag used
29856         to control outcomes from this test.
29857         (vector_ae_<mode>p): For VEC_F modes, likewise.
29859 2017-03-20  Ian Lance Taylor  <iant@google.com>
29861         * config/i386/i386.c (ix86_function_regparm): Save an extra
29862         register for -fsplit-stack with DECL_STATIC_CHAIN.
29864 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com>
29866         PR target/79912
29867         * config/riscv/riscv.c (riscv_preferred_reload_class): Remove.
29868         (TARGET_PREFERRED_RELOAD_CLASS): Likewise.
29870 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com>
29872         * config/riscv/riscv.c (riscv_print_operand): Use "fence
29873         iorw,ow".
29874         * config/riscv/sync.mc (mem_thread_fence_1): Use "fence
29875         iorw,iorw".
29877 2017-03-20  Marek Polacek  <polacek@redhat.com>
29879         PR sanitizer/80063
29880         * asan.c (DEF_SANITIZER_BUILTIN): Use do { } while (0).
29882 2017-03-20  Richard Biener  <rguenther@suse.de>
29884         PR tree-optimization/80113
29885         * graphite-isl-ast-to-gimple.c (copy_loop_phi_nodes): Do not
29886         allocate extra SSA name for PHI def.
29887         (add_close_phis_to_outer_loops): Likewise.
29888         (add_close_phis_to_merge_points): Likewise.
29889         (copy_loop_close_phi_args): Likewise.
29890         (copy_cond_phi_nodes): Likewise.
29892 2017-03-20  Martin Liska  <mliska@suse.cz>
29894         PR middle-end/79753
29895         * tree-chkp.c (chkp_build_returned_bound): Do not build
29896         returned bounds for a LHS that's not a BOUNDED_P type.
29898 2017-03-20  Martin Liska  <mliska@suse.cz>
29900         PR target/79769
29901         PR target/79770
29902         * tree-chkp.c (chkp_find_bounds_1): Handle REAL_CST,
29903         COMPLEX_CST and VECTOR_CST.
29905 2017-03-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29907         PR target/78857
29908         * config/s390/s390.md ("cmp<mode>_ccs_0"): Add a clobber of the
29909         target operand.  A new splitter adds the clobber statement in case
29910         the target operand is dead anyway.
29912 2017-03-19  Gerald Pfeifer  <gerald@pfeifer.com>
29914         * doc/install.texi (Specific) <sparc-*-linux*>: No longer refer
29915         to age-old versions of binutils and glibc.
29917 2017-03-18  Segher Boessenkool  <segher@kernel.crashing.org>
29919         * doc/contrib.texi (Contributors): Remove duplicate entry for myself.
29921 2017-03-18  Gerald Pfeifer  <gerald@pfeifer.com>
29923         * doc/contrib.texi (Contributors): Add Segher Boessenkool.
29925 2017-03-18  Gerald Pfeifer  <gerald@pfeifer.com>
29927         * doc/install.texi (Specific) <arm-*-eabi>: Remove old
29928         requirement for binutils 2.13.
29930 2017-03-17  Jim Wilson  <jim.wilson@linaro.org>
29932         * combine.c (try_combine): Delete redundant i1 test.  Call
29933         prev_nonnote_nondebug_insn instead of prev_nonnote_insn.
29935 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com
29937         * doc/install.texi (Specific) <riscv32-*-elf>: Add riscv32-*-elf,
29938         riscv32-*-linux, riscv64-*-elf, riscv64-*-linux to the table of
29939         contents.
29940         <riscv64-*-elf>: Re-arrange section
29941         <riscv32-*-elf>: Add a note about requiring binutils 2.28.
29942         <riscv32-*-linux>: Likewise.
29943         <riscv64-*-elf>: Likewise
29944         <riscv64-*-linux>: Likewise.
29946 2017-03-17  Richard Earnshaw  <rearnsha@arm.com>
29948         PR target/80052
29949         * aarch64.opt(verbose-cost-dump): Fix typo.
29951 2017-03-17  Pat Haugen  <pthaugen@us.ibm.com>
29953         PR target/79951
29954         * config/rs6000/rs6000.md (copysign<mode>3_fcpsgn): Test
29955         for VECTOR_UNIT_VSX_P (<MODE>mode) too.
29957 2017-03-17  Bernd Schmidt  <bschmidt@redhat.com>
29959         * reload.c (find_reloads): When reloading a nonoffsettable address,
29960         use RELOAD_OTHER for it and its address reloads.
29962         PR rtl-optimization/79910
29963         * combine.c (record_used_regs): New static function.
29964         (try_combine): Handle situations where there is an additional
29965         instruction between I2 and I3 which needs to have a LOG_LINK
29966         updated.
29968 2017-03-17  Jeff Law  <law@redhat.com>
29970         PR tree-optimization/71437
29971         * tree-vrp.c (simplify_stmt_for_jump_threading): Lookup the
29972         conditional in the hash table first.
29973         (vrp_dom_walker::before_dom_children): Extract condition from
29974         ASSERT_EXPR.  Record condition, its inverion and any implied
29975         conditions as well.
29977 2017-03-17  Marek Polacek  <polacek@redhat.com>
29978             Markus Trippelsdorf  <markus@trippelsdorf.de>
29980         PR tree-optimization/80079
29981         * gimple-ssa-store-merging.c (class pass_store_merging): Initialize
29982         m_stores_head.
29984 2017-03-17  Richard Biener  <rguenther@suse.de>
29986         PR middle-end/80075
29987         * tree-eh.c (stmt_could_throw_1_p): Only handle gimple assigns.
29988         Properly verify the LHS before the RHS possibly claims to be
29989         handled.
29990         (stmt_could_throw_p): Hande gimple conds fully here.  Clobbers
29991         do not throw.
29993 2017-03-17  Martin Jambor  <mjambor@suse.cz>
29995         * doc/invoke.texi (Option Options): Include -fipa-vrp in the list.
29996         (List of -O2 options): Likewise.
29997         (-fipa-bit-cp): Replace "ipa" with "interprocedural."
29998         (-fipa-vrp) New.
30000 2017-03-17  Tom de Vries  <tom@codesourcery.com>
30002         * gcov-dump.c (print_usage): Print bug_report_url.
30004 2017-03-17  Richard Biener  <rguenther@suse.de>
30006         PR middle-end/80050
30007         * genmatch.c (parser::next): Remove pointless check for CPP_EOF.
30008         (parser::peek): Likewise.
30010 2017-03-17  Richard Biener  <rguenther@suse.de>
30012         PR tree-optimization/80048
30013         * sese.c (free_sese_info): Properly release rename_map and
30014         copied_bb_map elements.
30016 2017-03-16  Alexandre Oliva <aoliva@redhat.com>
30018         * gimple-ssa-store-merging.c (struct imm_store_chain_info):
30019         Add linked-list forward and backlinks.  Insert on
30020         construction, remove on destruction.
30021         (class pass_store_merging): Add m_stores_head field.
30022         (pass_store_merging::terminate_and_process_all_chains):
30023         Iterate over m_stores_head list.
30024         (pass_store_merging::terminate_all_aliasing_chains):
30025         Likewise.
30026         (pass_store_merging::execute): Check for debug stmts first.
30027         Push new chains onto the m_stores_head stack.
30029 2017-03-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
30031         PR target/71294
30032         * config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Allow a
30033         SPLAT operation on ISA 2.07 64-bit systems that have direct move,
30034         but no MTVSRDD support, by doing MTVSRD and XXPERMDI.
30036 2017-03-16  Jeff Law  <law@redhat.com>
30038         PR tree-optimization/71437
30039         * tree-ssa-dom.c (dom_opt_dom_walker): Remove thread_across_edge
30040         member function.  Implementation moved into after_dom_children
30041         member function and into the threader's thread_outgoing_edges
30042         function.
30043         (dom_opt_dom_walker::after_dom_children): Simplify by moving
30044         some code into new thread_outgoing_edges.
30045         * tree-ssa-threadedge.c (thread_across_edge): Make static and simplify
30046         definition.  Simplify marker handling (do it here).   Assume we always
30047         have the available expression and the const/copies tables.
30048         (thread_outgoing_edges): New function extracted from tree-ssa-dom.c
30049         and tree-vrp.c
30050         * tree-ssa-threadedge.h (thread_outgoing_edges): Declare.
30051         * tree-vrp.c (equiv_stack): No longer file scoped.
30052         (vrp_dom_walker): New class.
30053         (vrp_dom_walker::before_dom_children): New member function.
30054         (vrp_dom_walker::after_dom_children): Likewise.
30055         (identify_jump_threads):  Setup domwalker.  Use it rather than
30056         walking edges in a random order by hand.  Simplify setup/finalization.
30057         (finalize_jump_threads): Remove.
30058         (vrp_finalize): Do not call identify_jump_threads here.
30059         (execute_vrp): Do it here instead and call thread_through_all_blocks
30060         here too.
30062         PR tree-optimization/71437
30063         * tree-ssa-dom.c (pfn_simplify): Add basic_block argument.  All
30064         callers changed.
30065         (simplify_stmt_for_jump_threading): Add basic_block argument.  All
30066         callers changed.
30067         (lhs_of_dominating_assert): Moved from here into tree-vrp.c.
30068         (dom_opt_dom_walker::thread_across_edge): Remove
30069         handle_dominating_asserts argument.  All callers changed.
30070         (record_temporary_equivalences_from_stmts_at_dest): Corresponding
30071         changes.  Remove calls to lhs_of_dominating_assert.  Other
30072         uses of handle_dominating_asserts turn into unconditional code
30073         (simplify_control_stmt_condition_1): Likewise.
30074         (simplify_control_stmt_condition): Likewise.
30075         (thread_through_normal_block, thread_across_edge): Likewise.
30076         * tree-ssa-threadedge.h (thread_across_edge): Corresponding changes.
30077         * tree-vrp.c (lhs_of_dominating_assert): Move here.  Return original
30078         object if it is not an SSA_NAME.
30079         (simplify_stmt_for_jump_threading): Call lhs_of_dominating_assert
30080         before calling into the VRP specific simplifiers.
30081         (identify_jump_threads): Remove handle_dominating_asserts
30082         argument.
30084 2017-03-16  Jakub Jelinek  <jakub@redhat.com>
30086         PR fortran/79886
30087         * tree-diagnostic.c (default_tree_printer): No longer static.
30088         * tree-diagnostic.h (default_tree_printer): New prototype.
30090 2017-03-16  Tamar Christina  <tamar.christina@arm.com>
30092         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>)
30093         Change ins into fmov.
30095 2017-03-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
30097         * config/aarch64/iterators.md (h_con): Return "x" for V4HF and V8HF.
30098         * config/aarch64/aarch64-simd.md (*aarch64_fma4_elt_from_dup<mode>):
30099         Use h_con constraint for operand 1.
30100         (*aarch64_fnma4_elt_from_dup<mode>): Likewise.
30101         (*aarch64_mulx_elt_from_dup<mode>): Likewise for operand 2.
30103 2017-03-15  Jeff Law  <law@redhat.com>
30105         PR tree-optimization/71437
30106         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): New function.
30107         (record_temporary_equivalences): Use it.
30109         PR tree-optimization/71437
30110         * tree-ssa-dom.c (struct cond_equivalence): Moved from here into
30111         tree-ssa-scopedtables.
30112         (lookup_avail_expr, build_and_record_new_cond): Likewise.
30113         (record_conditions, record_cond, vuse_eq): Likewise.
30114         (record_edge_info): Adjust to API tweak of record_conditions.
30115         (simplify_stmt_for_jump_threading): Similarly for lookup_avail_expr.
30116         (record_temporary_equivalences, optimize_stmt): Likewise.
30117         (eliminate_redundant_computations): Likewise.
30118         (record_equivalences_from_stmt): Likewise.
30119         * tree-ssa-scopedtables.c: Include options.h and params.h.
30120         (vuse_eq): New function, moved from tree-ssa-dom.c
30121         (build_and_record_new_cond): Likewise.
30122         (record_conditions): Likewise.  Accept vector of conditions rather
30123         than edge_equivalence structure for first argument.
30124         for the first argument.
30125         (avail_exprs_stack::lookup_avail_expr): New member function, moved
30126         from tree-ssa-dom.c.
30127         (avail_exprs_stack::record_cond): Likewise.
30128         * tree-ssa-scopedtables.h (struct cond_equivalence): Moved here
30129         from tree-ssa-dom.c.
30130         (avail_exprs_stack): Add new member functions lookup_avail_expr
30131         and record_cond.
30132         (record_conditions): Declare.
30134 2017-03-15  Vladimir Makarov  <vmakarov@redhat.com>
30136         PR target/80017
30137         * lra-constraints.c (process_alt_operands): Increase reject for
30138         reloading an input/output operand.
30140 2017-03-15  Michael Meissner  <meissner@linux.vnet.ibm.com>
30142         PR target/79038
30143         * config/rs6000/rs6000.md (float<QHI:mode><IEEE128:mode>2): Define
30144         insns to convert from signed/unsigned char/short to IEEE 128-bit
30145         floating point.
30146         (floatuns<QHI:mode><IEEE128:mode>2): Likewise.
30148 2017-03-15  Uros Bizjak  <ubizjak@gmail.com>
30150         PR target/80019
30151         * config/i386/i386.c (ix86_vector_duplicate_value): Create
30152         subreg of inner mode for values already in registers.
30154 2017-03-15  Bernd Schmidt  <bschmidt@redhat.com>
30156         * config/c6x/c6x.c (hwloop_optimize): Handle case where the old
30157         iteration reg is used after the loop.
30159 2017-03-14  Martin Sebor  <msebor@redhat.com>
30161         PR tree-optimization/79800
30162         * gimple-ssa-sprintf.c (format_floating: Add argument.  Handle
30163         precision in negative-positive range.
30164         (format_floating): Call non-const overload with adjusted precision.
30166 2017-03-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
30168         PR target/79947
30169         * config/rs6000/rs6000.h (TARGET_FRSQRTES): Add check for
30170         -mpowerpc-gfxopt.
30172 2017-03-14  Martin Sebor  <msebor@redhat.com>
30174         PR middle-end/80020
30175         * builtin-attrs.def (ATTR_ALLOC_SIZE_2_NOTHROW_LIST): New macro.
30176         * builtins.def (aligned_alloc): Use it.
30178         PR c/79936
30179         * Makefile.in (GTFILES): Add calls.c.
30180         * calls.c: Include "gt-calls.h".
30182 2017-03-14  Bernd Schmidt  <bschmidt@redhat.com>
30184         PR rtl-optimization/79728
30185         * regs.h (struct target_regs): New field
30186         x_contains_allocatable_regs_of_mode.
30187         (contains_allocatable_regs_of_mode): New macro.
30188         * reginfo.c (init_reg_sets_1): Initialize it, and change
30189         contains_reg_of_mode so it includes global regs as well.
30190         * reload.c (push_reload): Use contains_allocatable_regs_of_mode
30191         rather than contains_regs_of_mode.
30193 2017-03-14  Martin Liska  <mliska@suse.cz>
30195         * doc/invoke.texi: Document options that can't be combined with
30196         -fcheck-pointer-bounds.
30198 2017-03-14  Martin Liska  <mliska@suse.cz>
30200         PR middle-end/79831
30201         * doc/invoke.texi (-Wchkp): Document the option.
30203 2017-03-14  Martin Liska  <mliska@suse.cz>
30205         * Makefile.in: Install gcov-dump.
30207 2017-03-14  Martin Liska  <mliska@suse.cz>
30209         * multiple_target.c (expand_target_clones): Bail out for
30210         an invalid attribute.
30212 2017-03-14  Richard Biener  <rguenther@suse.de>
30214         * alias.c (struct alias_set_entry): Pack properly.
30215         * cfgloop.h (struct loop): Likewise.
30216         * cse.c (struct set): Likewise.
30217         * ipa-utils.c (struct searchc_env): Likewise.
30218         * loop-invariant.c (struct invariant): Likewise.
30219         * lra-remat.c (struct cand): Likewise.
30220         * recog.c (struct change_t): Likewise.
30221         * rtl.h (struct address_info): Likewise.
30222         * symbol-summary.h (function_summary): Likewise.
30223         * tree-loop-distribution.c (struct partition): Likewise.
30224         * tree-object-size.c (struct object_size_info): Likewise.
30225         * tree-ssa-loop-ivopts.c (struct cost_pair): Likewise.
30226         * tree-ssa-threadupdate.c (struct ssa_local_info_t): Likewise.
30227         * tree-vect-data-refs.c (struct _vect_peel_info): Likewise.
30228         * tree-vect-slp.c (struct _slp_oprnd_info): Likewise.
30229         * tree-vect-stmts.c (struct simd_call_arg_info): Likewise.
30230         * tree-vectorizer.h (struct _loop_vec_info): Likewise.
30231         (struct _stmt_vec_info): Likewise.
30233 2017-03-14  Martin Liska  <mliska@suse.cz>
30235         PR target/79892
30236         * multiple_target.c (create_dispatcher_calls): Check that
30237         a target can create a function dispatcher.
30239 2017-03-14  Martin Liska  <mliska@suse.cz>
30241         PR lto/66295
30242         * multiple_target.c (expand_target_clones): Drop local.local
30243         flag for default implementation.
30245 2017-03-14  Richard Biener  <rguenther@suse.de>
30247         PR tree-optimization/80030
30248         * tree-vect-stmts.c (vectorizable_store): Plug memleak.
30250 2017-03-13  Kito Cheng  <kito.cheng@gmail.com>
30252         * config/riscv/riscv.c (riscv_emit_float_compare>: Use
30253         gcc_fallthrough() instead of __attribute__((fallthrough));
30255 2017-03-13  Gerald Pfeifer  <gerald@pfeifer.com>
30257         * doc/gcc.texi: Remove "up" link to (DIR).
30258         * doc/gccint.texi: Ditto.
30260 2017-03-13  Gerald Pfeifer  <gerald@pfeifer.com>
30262         * doc/install.texi (Specific) <avr>: Remove reference to
30263         binutils 2.13.
30265 2017-03-13  Jeff Law  <law@redhat.com>
30267         * config/riscv/riscv.c (riscv_emit_float_compare): Use fallthru
30268         attribute rather than comments.
30270         * config/pdp11/pdp11.md (movmemhi): Adjust operand numbers to
30271         match_scratch operand is highest.
30273 2017-03-13  Martin Liska  <mliska@suse.cz>
30275         PR middle-end/78339
30276         * ipa-pure-const.c (warn_function_noreturn): If the declarations
30277         is a CHKP clone, use original declaration.
30279 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
30281         * config/arc/arc.c (arc_init): Use multiplier whenever we have it.
30282         (arc_conditional_register_usage): Use a different allocation order
30283         when optimizing for size.
30284         * common/config/arc/arc-common.c (arc_option_optimization_table):
30285         Section anchors default on when optimizing for size.
30287 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
30289         * config/arc/arc.md (*tst_bitfield_tst): Fix pattern.
30291 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
30293         * config/arc/arc.c (arc_output_addsi): Emit code density adds.
30294         * config/arc/arc.md (cpu_facility): Add cd variant.
30295         (*movqi_insn): Add code density variant.
30296         (*movhi_insn): Likewise.
30297         (*movqi_insn): Likewise.
30298         (*addsi3_mixed): Likewise.
30299         (subsi3_insn): Likewise.
30301 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
30303         * config/arc/arc.md (movsi_cond_exec): Update constraint.
30305 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
30307         * config/arc/arc.c (arc_legitimize_pic_address): Handle PIC
30308         expressions with MINUS and UNARY ops.
30310 2017-03-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
30312         PR target/79911
30313         * config/arm/neon.md (vec_sel_widen_ssum_lo<VQI:mode><VW:mode>3):
30314         Rename to...
30315         (vec_sel_widen_ssum_lo<mode><V_half>3): ... This. Avoid mismatch
30316         between vec_select and vector argument.
30317         (vec_sel_widen_ssum_hi<VQI:mode><VW:mode>3): Rename to...
30318         (vec_sel_widen_ssum_hi<mode><V_half>3): ... This. Likewise.
30319         (vec_sel_widen_usum_lo<VQI:mode><VW:mode>3): Rename to...
30320         (vec_sel_widen_usum_lo<mode><V_half>3): ... This.
30321         (vec_sel_widen_usum_hi<VQI:mode><VW:mode>3): Rename to...
30322         (vec_sel_widen_usum_hi<mode><V_half>3): ... This.
30324 2017-03-13  Richard Biener  <rguenther@suse.de>
30326         PR other/79991
30327         * params.def (vect-max-peeling-for-alignment): Fix typo.
30329 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
30331         * doc/install.texi (Specific) <mips-*-*>: Remove description of
30332         issue that only occurred with binutils below 2.18.
30334 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
30336         * doc/install.texi (Specific) <cris-axis-elf>: No longer
30337         refer to binutils 2.11/2.12 minimum.
30339 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
30341         * doc/install.texi (Specific) <powerpc-*-*>: Remove link to
30342         ftp.kernel.org and simplify binutils requirement.
30344 2017-03-11  Gerald Pfeifer  <gerald@pfeifer.com>
30346         * doc/invoke.texi (Warning Options): Fix spelling of link-time
30347         optimization.
30348         (Optimize Options): Ditto.  Also remove redundancy.
30350 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
30352         PR translation/79848
30353         * ipa-devirt.c (warn_types_mismatch): Simplify uses of "%<%s%>" to
30354         "%qs".
30355         * ipa-pure-const.c (suggest_attribute): Likewise.  Convert _
30356         to G_ to avoid double translation.
30358 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
30360         PR translation/79923
30361         * auto-profile.c (get_combined_location): Convert leading
30362         character of diagnostics to lower case and remove trailing period.
30363         (read_profile): Likewise for various diagnostics.
30364         * config/arm/arm.c (arm_option_override): Remove trailing period
30365         from various diagnostics.
30366         * config/msp430/msp430.c (msp430_expand_delay_cycles): Likewise.
30367         (msp430_expand_delay_cycles): Likewise.
30369 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
30371         PR target/79925
30372         * config/aarch64/aarch64.c (aarch64_validate_mcpu): Quote the
30373         full command-line argument, rather than just "str".
30374         (aarch64_validate_march): Likewise.
30375         (aarch64_validate_mtune): Likewise.
30377 2017-03-10  Bernd Schmidt  <bschmidt@redhat.com>
30379         PR rtl-optimization/78911
30380         * lra-assigns.c (must_not_spill_p): New function.
30381         (spill_for): Use it.
30383 2017-03-10  Jakub Jelinek  <jakub@redhat.com>
30385         PR tree-optimization/79981
30386         * tree-vrp.c (extract_range_basic): Handle IMAGPART_EXPR of
30387         ATOMIC_COMPARE_EXCHANGE ifn result.
30388         (stmt_interesting_for_vrp, vrp_visit_stmt): Handle
30389         IFN_ATOMIC_COMPARE_EXCHANGE.
30391 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
30393         PR driver/79875
30394         * opts.c (parse_sanitizer_options): Add missing question mark to
30395         "did you mean" message.
30397 2017-03-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30399         * config/rs6000/rs6000-builtin.def (VMULEUB_UNS): Remove orphaned
30400         built-in.
30401         (VMULEUH_UNS): Likewise.
30402         (VMULOUB_UNS): Likewise.
30403         (VMULOUH_UNS): Likewise.
30404         * config/rs6000/rs6000.c (builtin_function_type): Remove
30405         references to ALTIVEC_BUILTIN_VMUL[EO]U[BH]_UNS.
30407 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
30409         PR bootstrap/79952
30410         * read-rtl-function.c (function_reader::read_rtx_operand): Update
30411         x with result of extra_parsing_for_operand_code_0.
30412         (function_reader::extra_parsing_for_operand_code_0): Convert
30413         return type from void to rtx, returning x.  When reading
30414         SYMBOL_REF with SYMBOL_FLAG_HAS_BLOCK_INFO, reallocate x to the
30415         larger size containing struct block_symbol.
30417 2017-03-10  Segher Boessenkool  <segher@kernel.crashing.org>
30419         * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
30420         -mfloat128-hardware without -m64.
30422 2017-03-10  Will Schmidt <will_schmidt@vnet.ibm.com>
30424         PR target/79941
30425         * config/rs6000/rs6000.c (builtin_function_type): Add VMUL*U[HB]
30426         entries to the case statement that marks unsigned arguments to
30427         overloaded functions.
30429 2017-03-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
30431         * config/rs6000/rs6000.c (rs6000_option_override_internal): Fix
30432         two typographic errors in the handling of TARGET_UPPER_REGS_DI.
30434 2017-03-10  Pat Haugen  <pthaugen@us.ibm.com>
30436         PR target/79907
30437         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Test
30438         TARGET_UPPER_REGS_DI when setting 'wi' constraint regclass.
30440 2017-03-10  Martin Liska  <mliska@suse.cz>
30442         PR target/65705
30443         PR target/69804
30444         * toplev.c (process_options): Enable MPX with LSAN and UBSAN.
30445         * tree-chkp.c (chkp_walk_pointer_assignments): Verify that
30446         FIELD != NULL.
30448 2017-03-10  Olivier Hainque  <hainque@adacore.com>
30450         * tree-switch-conversion (array_value_type): Start by resetting
30451         candidate type to it's main variant.
30453 2017-03-10  Jakub Jelinek  <jakub@redhat.com>
30455         PR rtl-optimization/79909
30456         * combine.c (try_combine): Use simplify_replace_rtx on individual
30457         CALL_INSN_FUNCTION_USAGE elements instead of replace_rtx on copy_rtx
30458         of the whole CALL_INSN_FUNCTION_USAGE.
30460         PR tree-optimization/79972
30461         * gimple-ssa-warn-alloca.c (alloca_call_type): Only call
30462         get_range_info on SSA_NAMEs.  Formatting fixes.
30464 2017-03-10  Richard Biener  <rguenther@suse.de>
30465             Jakub Jelinek  <jakub@redhat.com>
30467         PR tree-optimization/77975
30468         * tree-ssa-loop-niter.c (get_base_for): Allow phi argument from latch
30469         edge to be constant.
30470         (get_val_for): For constant x return it.  Formatting fix.
30471         (loop_niter_by_eval): Avoid pointless looping if the next iteration
30472         would use the same bases as the current one.
30474 2017-03-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30476         * config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Use rotate
30477         instead of vec_select for V1TImode.
30478         * conifg/rs6000/vsx.md (VSX_LE): Remove mode iterator that is no
30479         longer needed.
30480         (VSX_LE_128): Add V1TI to this mode iterator.
30481         (*vsx_le_perm_load_<mode>): Change to use VSX_D mode iterator.
30482         (*vsx_le_perm_store_<mode>): Likewise.
30483         (pre-reload splitter for VSX stores): Likewise.
30484         (post-reload splitter for VSX stores): Likewise.
30485         (*vsx_xxpermdi2_le_<mode>): Likewise.
30486         (*vsx_lxvd2x2_le_<mode>): Likewise.
30487         (*vsx_stxvd2x2_le_<mode>): Likewise.
30489 2017-03-09  Michael Eager  <eager@eagercon.com>
30491         Correct failures with --enable-checking=yes,rtl.
30493         * config/microblaze/microblaze.c (microblaze_expand_shift):
30494         Replace GET_CODE test with CONST_INT_P and INTVAL test with
30495         test for const0_rtx.
30496         * config/microblaze/microblaze.md (ashlsi3_byone, ashrsi3_byone,
30497         lshrsi3_byone): Replace INTVAL with test for const1_rtx.
30499 2017-03-09  Richard Biener  <rguenther@suse.de>
30501         PR tree-optimization/79977
30502         * graphite-scop-detection.c (scop_detection::merge_sese):
30503         Handle the case of extra exits to blocks dominating the entry.
30505 2017-03-09  Toma Tabacu  <toma.tabacu@imgtec.com>
30507         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
30508         Document rdynamic.
30510 2017-03-09  Vladimir Makarov  <vmakarov@redhat.com>
30512         PR rtl-optimization/79949
30513         * lra-constraints.c (process_alt_operands): Check memory when
30514         trying to predict a cycle.  Print about the overall increase.
30516 2017-03-09  Richard Biener  <rguenther@suse.de>
30518         PR middle-end/79971
30519         * gimple-expr.c (useless_type_conversion_p): Preserve
30520         TYPE_SATURATING for fixed-point types.
30522 2017-03-09  Richard Biener  <rguenther@suse.de>
30524         PR ipa/79970
30525         * ipa-prop.c (ipa_modify_formal_parameters): Avoid changing
30526         alignment of BLKmode params.
30528 2017-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
30530         PR target/79913
30531         * config/aarch64/iterators.md (VALL_F16_NO_V2Q): New mode iterator.
30532         (VALL_NO_V2Q): Likewise.
30533         (VDQF_DF): Delete.
30534         * config/aarch64/aarch64-simd.md
30535         (aarch64_dup_lane_<vswap_width_name><mode>): Use VALL_F16_NO_V2Q
30536         iterator.
30537         (*aarch64_simd_vec_copy_lane_<vswap_width_name><mode>): Use
30538         VALL_NO_V2Q mode iterator.
30539         (*aarch64_vgetfmulx<mode>): Use VDQF iterator.
30541 2017-03-09  Martin Liska  <mliska@suse.cz>
30543         PR tree-optimization/79631
30544         * tree-chkp-opt.c (chkp_is_constant_addr): Call
30545         tree_int_cst_sign_bit just for INTEGER constants.
30547 2017-03-09  Martin Liska  <mliska@suse.cz>
30549         PR target/65705
30550         PR target/69804
30551         * toplev.c (process_options): Disable -fcheck-pointer-bounds with
30552         sanitizers.
30554 2017-03-09  Marek Polacek  <polacek@redhat.com>
30556         PR c++/79672
30557         * tree.c (inchash::add_expr): Handle TREE_VEC.
30559 2017-03-09  Martin Liska  <mliska@suse.cz>
30561         PR ipa/79764
30562         (chkp_narrow_size_and_offset): New function.
30563         (chkp_parse_array_and_component_ref): Support BIT_FIELD_REF.
30564         (void chkp_parse_bit_field_ref): New function.
30565         (chkp_make_addressed_object_bounds): Add case for BIT_FIELD_REF.
30566         (chkp_process_stmt): Use chkp_parse_bit_field_ref.
30568 2017-03-09  Martin Liska  <mliska@suse.cz>
30570         PR ipa/79761
30571         * tree-chkp.c (chkp_get_bound_for_parm): Get bounds for a param.
30572         (chkp_find_bounds_1): Remove gcc_unreachable.
30574 2017-03-09  Jakub Jelinek  <jakub@redhat.com>
30576         PR sanitizer/79944
30577         * asan.c (get_mem_refs_of_builtin_call): For BUILT_IN_ATOMIC* and
30578         BUILT_IN_SYNC*, determine the access type from the size suffix and
30579         always build a MEM_REF with that type.  Handle forgotten
30580         BUILT_IN_SYNC_FETCH_AND_NAND_16 and BUILT_IN_SYNC_NAND_AND_FETCH_16.
30582         PR target/79932
30583         * config/i386/avx512vlintrin.h (_mm256_cmpge_epi32_mask,
30584         _mm256_cmpge_epi64_mask, _mm256_cmpge_epu32_mask,
30585         _mm256_cmpge_epu64_mask, _mm256_cmple_epi32_mask,
30586         _mm256_cmple_epi64_mask, _mm256_cmple_epu32_mask,
30587         _mm256_cmple_epu64_mask, _mm256_cmplt_epi32_mask,
30588         _mm256_cmplt_epi64_mask, _mm256_cmplt_epu32_mask,
30589         _mm256_cmplt_epu64_mask, _mm256_cmpneq_epi32_mask,
30590         _mm256_cmpneq_epi64_mask, _mm256_cmpneq_epu32_mask,
30591         _mm256_cmpneq_epu64_mask, _mm256_mask_cmpge_epi32_mask,
30592         _mm256_mask_cmpge_epi64_mask, _mm256_mask_cmpge_epu32_mask,
30593         _mm256_mask_cmpge_epu64_mask, _mm256_mask_cmple_epi32_mask,
30594         _mm256_mask_cmple_epi64_mask, _mm256_mask_cmple_epu32_mask,
30595         _mm256_mask_cmple_epu64_mask, _mm256_mask_cmplt_epi32_mask,
30596         _mm256_mask_cmplt_epi64_mask, _mm256_mask_cmplt_epu32_mask,
30597         _mm256_mask_cmplt_epu64_mask, _mm256_mask_cmpneq_epi32_mask,
30598         _mm256_mask_cmpneq_epi64_mask, _mm256_mask_cmpneq_epu32_mask,
30599         _mm256_mask_cmpneq_epu64_mask, _mm_cmpge_epi32_mask,
30600         _mm_cmpge_epi64_mask, _mm_cmpge_epu32_mask, _mm_cmpge_epu64_mask,
30601         _mm_cmple_epi32_mask, _mm_cmple_epi64_mask, _mm_cmple_epu32_mask,
30602         _mm_cmple_epu64_mask, _mm_cmplt_epi32_mask, _mm_cmplt_epi64_mask,
30603         _mm_cmplt_epu32_mask, _mm_cmplt_epu64_mask, _mm_cmpneq_epi32_mask,
30604         _mm_cmpneq_epi64_mask, _mm_cmpneq_epu32_mask, _mm_cmpneq_epu64_mask,
30605         _mm_mask_cmpge_epi32_mask, _mm_mask_cmpge_epi64_mask,
30606         _mm_mask_cmpge_epu32_mask, _mm_mask_cmpge_epu64_mask,
30607         _mm_mask_cmple_epi32_mask, _mm_mask_cmple_epi64_mask,
30608         _mm_mask_cmple_epu32_mask, _mm_mask_cmple_epu64_mask,
30609         _mm_mask_cmplt_epi32_mask, _mm_mask_cmplt_epi64_mask,
30610         _mm_mask_cmplt_epu32_mask, _mm_mask_cmplt_epu64_mask,
30611         _mm_mask_cmpneq_epi32_mask, _mm_mask_cmpneq_epi64_mask,
30612         _mm_mask_cmpneq_epu32_mask, _mm_mask_cmpneq_epu64_mask): Move
30613         definitions outside of __OPTIMIZE__ guarded section.
30615         PR target/79932
30616         * config/i386/avx512bwintrin.h (_mm512_packs_epi32,
30617         _mm512_maskz_packs_epi32, _mm512_mask_packs_epi32,
30618         _mm512_packus_epi32, _mm512_maskz_packus_epi32,
30619         _mm512_mask_packus_epi32): Move definitions outside of __OPTIMIZE__
30620         guarded section.
30622 2017-03-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
30624         * config/s390/vx-builtins.md ("vfee<mode>", "vfeez<mode>")
30625         ("vfenez<mode>"): Add missing constraints.
30627 2017-03-08  Martin Sebor  <msebor@redhat.com>
30629         PR target/79928
30630         * config/nds32/nds32.c (nds32_option_override):
30631         Fix misspelled diagnostic.
30633 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
30635         PR c/79940
30636         * gimplify.c (gimplify_omp_for): Replace index var in outer
30637         taskloop statement with an artificial variable and add
30638         OMP_CLAUSE_PRIVATE clause for it.
30640 2017-03-08  Richard Biener  <rguenther@suse.de>
30642         PR tree-optimization/79955
30643         * tree-ssa-uninit.c (warn_uninitialized_vars): Do not warn
30644         for accesses that are completely outside of the variable.
30646 2017-03-08  Andrew Haley  <aph@redhat.com>
30648         PR tree-optimization/79943
30649         * tree-ssa-loop-split.c (compute_new_first_bound): When
30650         calculating the new upper bound, (END-BEG) should be added, not
30651         subtracted.
30653 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
30655         * config/avr/avr.md (setmemhi): Make sure match_dup
30656         operand number comes before match_scratch.
30658 2017-03-08  Richard Biener  <rguenther@suse.de>
30660         PR tree-optimization/79920
30661         * tree-vect-slp.c (vect_create_mask_and_perm): Remove and inline
30662         with ncopies == 1 to ...
30663         (vect_transform_slp_perm_load): ... here.  Properly compute
30664         all element loads by iterating VF times over the group.  Do
30665         not handle ncopies (computed in a broken way) in
30666         vect_create_mask_and_perm.
30668 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
30670         PR sanitizer/79904
30671         * internal-fn.c (expand_vector_ubsan_overflow): If arg0 or arg1
30672         is a uniform vector, use uniform_vector_p return value instead of
30673         building ARRAY_REF on folded VIEW_CONVERT_EXPR to array type.
30675 2017-03-07  Marek Polacek  <polacek@redhat.com>
30677         PR middle-end/79809
30678         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Use HOST_WIDE_INT.
30679         (alloca_call_type): Likewise.
30681 2017-03-07  Martin Liska  <mliska@suse.cz>
30683         * gcov.c (process_args): Put comment to correct location.
30685 2017-03-07  Martin Liska  <mliska@suse.cz>
30687         PR middle-end/68270
30688         * tree-chkp.c (chkp_may_narrow_to_field): Add new argument ref.
30689         Use array_at_struct_end_p instead of DECL_CHAIN (field).
30690         (chkp_narrow_bounds_for_field): Likewise.
30691         (chkp_parse_array_and_component_ref): Pass one more argument to
30692         call.
30694 2017-03-07  Richard Biener  <rguenther@suse.de>
30696         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve
30697         preheaders.
30699 2017-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
30701         * config/i386/i386.c (ix86_local_alignment): Align most aggregates
30702         of 16 bytes and more to 16 bytes, not those of 16 bits and more.
30704 2017-03-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
30706         PR c/79855
30707         * params.def (PARAM_STORE_MERGING_ALLOW_UNALIGNED): Add full stop
30708         to end of description.
30709         (PARAM_MAX_STORES_TO_MERGE): Likewise.
30711 2017-03-07  Jakub Jelinek  <jakub@redhat.com>
30713         PR rtl-optimization/79901
30714         * config/i386/sse.md (*avx512bw_<code><mode>3<mask_name>): Renamed to
30715         ...
30716         (*avx512f_<code><mode>3<mask_name>): ... this.
30717         (<code><mode>3 with maxmin code iterator): Use VI8_AVX2_AVX512F
30718         iterator instead of VI8_AVX2_AVX512BW.
30720         PR rtl-optimization/79901
30721         * expr.c (expand_expr_real_2): For vector MIN/MAX, if there is no
30722         min/max expander, expand it using expand_vec_cond_expr.
30724         PR sanitizer/79897
30725         * ubsan.c (ubsan_encode_value): Call mark_addressable on the
30726         temporary.
30728 2017-03-06  Jakub Jelinek  <jakub@redhat.com>
30730         PR c++/79821
30731         * dwarf2out.h (dw_vec_const): Change array type from unsigned char *
30732         to void * for PCH reasons.
30733         * dwarf2out.c (output_loc_operands, output_die): Cast
30734         v.val_vec.array to unsigned char *.
30736 2017-03-06  John David Anglin  <danglin@gcc.gnu.org>
30738         PR target/77850
30739         * config/pa/pa-64.h (PAD_VARARGS_DOWN): Don't pad down complex and
30740         vector types.
30742 2017-03-06  Vladimir Makarov  <vmakarov@redhat.com>
30744         PR rtl-optimization/79571
30745         * lra-constraints.c (process_alt_operands): Calculate static
30746         reject and subtract it from overall when only addresses will be
30747         reloaded.
30749 2017-03-06  Julia Koval  <julia.koval@intel.com>
30751         PR target/79793
30752         * config/i386/i386.c (ix86_minimum_incoming_stack_boundary): Set
30753         incoming stack boundary to 128 for 64-bit targets.
30755 2017-03-06  Richard Biener  <rguenther@suse.de>
30757         PR tree-optimization/79894
30758         * tree-vectorizer.c (vectorize_loops): Set loop_vectorized_call
30759         to NULL after folding it.
30761 2017-03-06  Richard Biener  <rguenther@suse.de>
30763         PR tree-optimization/79824
30764         * tree-vect-stmts.c (get_group_load_store_type): Fix alignment
30765         check disabling peeling for gaps.
30767 2017-03-06  Toma Tabacu  <toma.tabacu@imgtec.com>
30769         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
30770         attributes): Document gettimeofday.
30772 2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>
30774         * config/s390/s390.c (s390_option_override_internal): Set
30775         PARAM_MIN_VECT_LOOP_BOUND
30777 2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>
30779         * config/s390/s390.c (s390_asm_output_function_label): Use nopr %r0.
30780         * config/s390/s390.md: Likewise.
30782 2017-03-06  Jakub Jelinek  <jakub@redhat.com>
30784         PR target/79812
30785         * config/i386/sse.md (VI8F_256_512): Remove mode iterator.
30786         (<avx2_avx512>_perm<mode>): Rename to ...
30787         (avx2_perm<mode>): ... this.  Use VI8F_256 iterator instead
30788         of VI8F_256_512.
30789         (<avx512>_perm<mode>_mask): Rename to ...
30790         (avx512vl_perm<mode>_mask): ... this.  Use VI8F_256 iterator instead
30791         of VI8F_256_512.
30792         (<avx2_avx512>_perm<mode>_1<mask_name>): Rename to ...
30793         (avx2_perm<mode>_1<mask_name): ... this.  Use VI8F_256 iterator
30794         instead of VI8F_256_512.
30795         (avx512f_perm<mode>): New define_expand.
30796         (avx512f_perm<mode>_mask): Likewise.
30797         (avx512f_perm<mode>_1<mask_name>): New define_insn.
30798         (<avx512>_vec_dup<mode>_1): Fix up vec_select mode.
30800 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
30802         * config/mips/mips-msa.md (msa_fmax_a_<msafmt>, msa_fmin_a_<msafmt>,
30803         msa_max_a_<msafmt>, msa_min_a_<msafmt>): Introduce mode interator for
30804         if_then_else.
30805         (smin<mode>3, smax<mode>3): Change operand print code from 'B' to 'E'.
30807 2017-03-06  Martin Liska  <mliska@suse.cz>
30809         PR sanitize/79783
30810         * asan.c (asan_expand_poison_ifn): Do not expand ASAN_POISON
30811         when having a SSA NAME w/o VAR_DECL assigned to it.
30813 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
30815         * config/mips/mips-msa.md (msa_dotp_<su>_d, msa_dpadd_<su>_d,
30816         msa_dpsub_<su>_d): Fix MODE for vec_select.
30818 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
30820         * config/mips/mips.c (mips_gen_const_int_vector): Change type of last
30821         argument.
30822         * config/mips/mips-protos.h (mips_gen_const_int_vector): Likewise.
30824 2017-03-06  Richard Biener  <rguenther@suse.de>
30826         * lto-streamer.c (lto_check_version): Use %qs in diagnostics.
30827         * plugin.c (register_plugin_info): Likewise.
30828         * tree-chkp.c (chkp_make_static_const_bounds): Likewise.
30830 2017-03-05  Jakub Jelinek  <jakub@redhat.com>
30832         * config/i386/sse.md (sse_storehps, sse_storelps,
30833         avx_<castmode><avxsizesuffix>_<castmode>,
30834         avx512f_<castmode><avxsizesuffix>_<castmode>,
30835         avx512f_<castmode><avxsizesuffix>_256<castmode>): Require
30836         in condition that at least one operand is not a MEM.
30838 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
30840         PR middle-end/79805
30841         * internal-fn.def (ATOMIC_BIT_TEST_AND_SET, ATOMIC_BIT_TEST_AND_RESET,
30842         ATOMIC_BIT_TEST_AND_COMPLEMENT, ATOMIC_COMPARE_EXCHANGE): Remove
30843         ECF_NOTHROW.
30844         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Set
30845         gimple_call_nothrow_p flag based on whether original builtin can throw.
30846         If it can, emit following stmts on the fallthrough edge.
30847         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Similarly, except
30848         don't create new bb if inserting just debug stmts on the edge, try to
30849         insert them on the fallthru bb or just reset debug stmts.
30851 2017-03-03  Segher Boesssenkool  <segher@kernel.crashing.org>
30853         PR target/43763
30854         * config/rs6000/rs6000.c (rs6000_final_prescan_insn): Save and
30855         restore recog_data (including the operand rtxes inside it) around
30856         the call to get_insn_template.
30858 2017-03-03  Martin Sebor  <msebor@redhat.com>
30860         PR tree-optimization/79699
30861         * context.c (context::~context): Free MPFR caches to avoid
30862         a memory leak on program exit.
30864 2017-03-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
30866         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
30867         Use wide_int::ulow () instead of .elt (0).
30869 2017-03-03  Uros Bizjak  <ubizjak@gmail.com>
30871         * config/i386/i386.md (*pushtf): Change *roF constraint to *roC.
30872         (*pushxf): Limit oF constraint to 32bit targets and add oC
30873         constraint for 64bit targets.
30874         (pushxf splitter): Use PUSH_ROUNDING to calculate stack adjustment.
30875         (*pushdf): Change rmF constraint to rmC.
30877 2017-03-03  Martin Liska  <mliska@suse.cz>
30879         * tree-ssa-loop-prefetch.c (pass_loop_prefetch::execute):
30880         Remove unused variable.
30882 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
30884         PR target/79807
30885         * config/i386/i386.c (ix86_expand_multi_arg_builtin): If target
30886         is a memory operand, increase num_memory.
30887         (ix86_expand_args_builtin): Likewise.
30889 2017-03-03  Jan Hubicka  <jh@suse.cz>
30891         PR lto/79760
30892         * ipa-devirt.c (maybe_record_node): Properly handle
30893         __cxa_pure_virtual visibility.
30895 2017-03-03  Martin Liska  <mliska@suse.cz>
30897         PR tree-optimization/79803
30898         * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Remove
30899         assert.
30900         (pass_loop_prefetch::execute): Disabled optimization if an
30901         assumption about L1 cache size is not met.
30903 2017-03-03  Martin Liska  <mliska@suse.cz>
30905         PR rtl-optimization/79574
30906         * gcse.c (struct gcse_expr): Use HOST_WIDE_INT instead of int.
30907         (hash_scan_set): Likewise.
30908         (dump_hash_table): Likewise.
30909         (hoist_code): Likewise.
30911 2017-03-03  Richard Biener  <rguenther@suse.de>
30913         * fixed-value.c (fixed_from_string): Restore use of elt (1)
30914         in place of uhigh ().
30915         (fixed_convert_from_real): Likewise.
30917 2017-03-03  Uros Bizjak  <ubizjak@gmail.com>
30919         PR target/79514
30920         * config/i386/i386.md (*pushxf_rounded): Use Pmode instead of DImode.
30922 2017-03-03  Richard Biener  <rguenther@suse.de>
30924         PR middle-end/79818
30925         * match.pd ( X +- C1 CMP C2 -> X CMP C2 -+ C1): Add missing
30926         TYPE_OVERFLOW_UNDEFINED check.
30928 2017-03-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30930         * config/rs6000/vector.md (vector_ne_<mode>_p): Correct operand
30931         numbers.
30932         (vector_ae_<mode>_p): Likewise.
30933         (vector_nez_<mode>_p): Likewise.
30934         (vector_ne_v2di_p): Likewise.
30935         (vector_ae_v2di_p): Likewise.
30936         (vector_ne_<mode>_p): Likewise.
30937         * config/rs6000/vsx.md (vsx_tsqrt<mode>2_fg): Correct operand
30938         numbers.
30939         (vsx_tsqrt<mode>2_fe): Likewise.
30941 2017-03-02  Uros Bizjak  <ubizjak@gmail.com>
30943         PR target/79514
30944         * config/i386/i386.md (*pushxf_rounded): New insn_and_split pattern.
30946 2017-03-02  Jakub Jelinek  <jakub@redhat.com>
30948         PR rtl-optimization/79780
30949         * cprop.c (one_cprop_pass): When second and further conditional trap
30950         in a single basic block is turned into an unconditional trap, turn it
30951         into a deleted note to avoid RTL verification failures.
30953 2017-03-02  Richard Biener  <rguenther@suse.de>
30955         * fold-const.c (const_binop): Use ulow () instead of elt (0).
30957 2017-03-02  Richard Biener  <rguenther@suse.de>
30959         PR tree-optimization/79345
30960         PR c++/42000
30961         * tree-ssa-alias.c (walk_aliased_vdefs_1): Take a limit
30962         param and abort the walk, returning -1 if it is hit.
30963         (walk_aliased_vdefs): Take a limit param and pass it on.
30964         * tree-ssa-alias.h (walk_aliased_vdefs): Add a limit param,
30965         defaulting to 0 and return a signed int.
30966         * tree-ssa-uninit.c (struct check_defs_data): New struct.
30967         (check_defs): New helper.
30968         (warn_uninitialized_vars): Use walk_aliased_vdefs to warn
30969         about uninitialized memory.
30970         * fixed-value.c (fixed_from_string): Use ulow/uhigh to avoid
30971         bogus uninitialized warning.
30972         (fixed_convert_from_real): Likewise.
30974 2017-03-02  Bin Cheng  <bin.cheng@arm.com>
30976         PR tree-optimization/66768
30977         * tree-ssa-loop-ivopts.c (find_interesting_uses_address): Skip addr
30978         iv_use if base object can't be determined.
30980 2017-03-02  Jakub Jelinek  <jakub@redhat.com>
30982         PR tree-optimization/79345
30983         * gensupport.h (struct pattern_stats): Add min_scratch_opno field.
30984         * gensupport.c (get_pattern_stats_1) <case MATCH_SCRATCH>: Update it.
30985         (get_pattern_stats): Initialize it.
30986         * genemit.c (gen_expand): Verify match_scratch numbers come after
30987         match_operand/match_dup numbers.
30988         * config/i386/i386.md (<s>mul<mode>3_highpart): Swap match_dup and
30989         match_scratch numbers.
30990         * config/i386/sse.md (avx2_gathersi<mode>, avx2_gatherdi<mode>):
30991         Likewise.
30992         * config/s390/s390.md (trunctdsd2): Likewise.
30994 2017-03-02  Richard Biener  <rguenther@suse.de>
30996         * wide-int.h (wide_int_storage::operator=): Implement in terms
30997         of wi::copy.
30999 2017-03-02  Richard Biener  <rguenther@suse.de>
31001         PR tree-optimization/79777
31002         * tree-ssa-pre.c (eliminate_insert): Give up if we simplify
31003         the to insert expression to sth existing.
31005 2017-03-01  Martin Sebor  <msebor@redhat.com>
31007         PR middle-end/79692
31008         * gimple-ssa-sprintf.c
31009         (directive::known_width_and_precision): New function.
31010         (format_integer): Use it.
31011         (get_mpfr_format_length): Consider the full range of precision
31012         when computing %g output with the # flag.  Set the likely byte
31013         count to 3 rather than 1 when precision is indeterminate.
31014         (format_floating): Correct the lower bound of precision.
31016 2017-03-01  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31018         * doc/invoke.texi: Document default code model for 64-bit Linux.
31020 2017-03-01  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
31022         PR target/79752
31023         * config/rs6000/rs6000.md (peephole2 for udiv/umod): Should emit
31024         udiv rather than div since input pattern is unsigned.
31026 2017-03-01  Uros Bizjak  <ubizjak@gmail.com>
31028         * config/i386/i386.c (print_reg): Warn for values of
31029         unsupported size in integer register.
31031 2017-03-01  Michael Meissner  <meissner@linux.vnet.ibm.com>
31033         PR target/79439
31034         * config/rs6000/predicates.md (current_file_function_operand): Do
31035         not allow self calls to be local if the function is replaceable.
31037 2017-03-01  Kelvin Nilsen  <kelvin@gcc.gnu.org>
31039         PR target/79395
31040         * config/rs6000/altivec.h (vec_ctz and others): Change the
31041         preprocessor macro that controls conditional compilation from
31042         _ARCH_PWR9 to __POWER9_VECTOR__.
31043         (vec_all_ne): Change parameterization of __altivec_scalar_pred
31044         macro expansion under preprocessor #ifdef __POWER9_VECTOR__
31045         control (instead of _ARCH_PWR9 control) so that template
31046         definition uses power9-specific function.
31047         (vec_any_eq): Likewise.
31048         (vec_all_ne): Change macro definition to use a power9-specific
31049         expansion under #ifdef __POWER9_VECTOR__ control (instead of
31050         _ARCH_PWR9 control).
31051         (vec_any_eq) Likewise.
31052         * config/rs6000/rs6000-builtin.def (CMPNEF): Remove BU_P9V_AV_2
31053         expansion for CMPNEF to remove support for xvcmpnesp instruction.
31054         (CMPNED): Remove BU_P9V_AV2 expansion for CMPNED to remove
31055         support for xvcmpnedp instruction.
31056         (VCMPNEB_P): Replace BU_P9V_AV_P macro expansion with BU_P9V_AV_2
31057         macro expansion so that Power9 implementation of vec_all_ne does
31058         not use the AltiVec predicate framework.
31059         (VCMPNEH_P): Likewise.
31060         (VCMPNEW_P): Likewise.
31061         (VCMPNED_P): Likewise.
31062         (VCMPNEFP_P): Likewise.
31063         (VCMPNEDP_P): Likewise.
31064         (VCMPAEB_P): Add BU_P9V_AV_2 macro expansion to change
31065         implementation of vec_any_eq to not use AltiVec predicate
31066         framework.
31067         (VCMPAEH_P): Likewise.
31068         (VCMPAEW_P): Likewise.
31069         (VCMPAED_P): Likewise.
31070         (VCMPAEFP_P): Likewise.
31071         (VCMPAEDP_P): Likewise.
31072         (VCMPNE_P): Replace BU_P9V_OVERLOAD_P macro expansion with
31073         BU_P9V_OVERLOAD_2 so that Power9 implementation of vec_all_ne does
31074         not use the AltiVec predicate framework.
31075         (VCMPAE_P): Add BU_P9V_OVERLOAD_2 macro to change implementation
31076         of vec_any_eq to not use AltiVec predicate framework.
31077         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Add
31078         support for predefined __POWER9_VECTOR__ macro to indicate that
31079         Power9 instruction selection is enabled.
31080         (altivec_overloaded_builtins): Remove extraneous
31081         ALTIVEC_BUILTIN_VEC_CMPNE entry for overloaded
31082         function argument types RS6000_BTI_bool_V16QI and
31083         RS6000_BTI_bool_V16QI.  Remove erroneous ALTIVEC_BUILTIN_VEC_CMPNE
31084         entry for overloaded function argument types RS6000_BTI_bool_V4SI
31085         andRS6000_BTI_bool_V4SI, mapping to P9V_BUILTIN_CMPNEB.  Remove
31086         two entries mapping to P9V_BUITIN_CMPNED and one entry mapping to
31087         P9V_BUILTIN_CMPNEF to force use of instructions not specific to
31088         Power9 for implementations of vec_cmpne.  Change the signature for
31089         all definitions of the overloaded P9V_BUILTIN_VEC_CMPNE_P function
31090         (representing vec_all_ne) to remove the previously described first
31091         argument of type RS6000_BTI_INTSI, as this was an artifact of
31092         reliance on the AltiVec predicate framework, which is no longer
31093         used in the implementation of these functions.  Add
31094         P9V_BUILTIN_VEC_VCMPAE_P entries (representing the vec_anyeq
31095         function) to match all of the P9V_BUILTIN_VEC_VCMNE_P entries
31096         since, unlike the AltiVec predicate framework implementation, we
31097         do not share function descriptors between vec_alle and vec_anyeq.
31098         (altivec_resolve_overloaded_builtin): Add SFmode and DFmode to the
31099         set of modes that receive special treatment even when
31100         TARGET_P9_VECTOR is true.  The special treatment emits code that
31101         does not depend on Power9 instructions.
31102         * config/rs6000/vector.md (vector_ne_<mode>_p): Change this
31103         define_expand to not rely on AltiVec predicate framework.
31104         (vector_ae_<mode>p): New define_expand to represent vec_any_eq
31105         function.
31106         (vector_ne_v2di_p): Change this define_expand to not rely on
31107         AltiVec predicate framework.
31108         (vector_ae_v2di_p): New define_expand to represent vec_any_eq
31109         function.
31110         (vector_ne_<mode>_p): Change this define_expand to not rely on
31111         AltiVec predicate framework.
31112         (vector_ae_<mode>p): New define_expand to represent vec_any_eq
31113         function.
31114         * config/rs6000/vsx.md (*vsx_ne_<mode>_p): For modes VSX_EXTRACT_I
31115         (V16QI, V8HI, V4SI), correct a typo in the code emitted for this
31116         define_insn pattern.
31117         (*vsx_ne_<mode>_p): For modes VSX_F (V4SF and V2DF), remove this
31118         define_insn pattern because the xvcmpne<VSs>. instruction is not
31119         supported.
31120         (vcmpne<VSs>): Remove this define_insn because xvcmpne<VSs>
31121         instruction is not supported.
31123 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
31125         * config/nvptx/nvptx.c: Include intl.h.
31127 2017-03-01  Martin Jambor  <mjambor@suse.cz>
31129         PR lto/78140
31130         * ipa-prop.h (ipa_bits): Removed field known.
31131         (ipa_jump_func): Removed field vr_known.  Changed fields bits and m_vr
31132         to pointers.  Adjusted their comments to warn about their sharing.
31133         (ipcp_transformation_summary): Change bits to a vector of pointers.
31134         (ipa_check_create_edge_args): Moved to ipa-prop.c, declare.
31135         (ipa_get_ipa_bits_for_value): Declare.
31136         * tree-vrp.h (value_range): Mark as GTY((for_user)).
31137         * ipa-prop.c (ipa_bit_ggc_hash_traits): New.
31138         (ipa_bits_hash_table): Likewise.
31139         (ipa_vr_ggc_hash_traits): Likewise.
31140         (ipa_vr_hash_table): Likewise.
31141         (ipa_print_node_jump_functions_for_edge): Adjust for bits and m_vr
31142         being pointers and vr_known being removed.
31143         (ipa_set_jf_unknown): Likewise.
31144         (ipa_get_ipa_bits_for_value): New function.
31145         (ipa_set_jfunc_bits): Likewise.
31146         (ipa_get_value_range): New overloaded functions.
31147         (ipa_set_jfunc_vr): Likewise.
31148         (ipa_compute_jump_functions_for_edge): Use the above functions to
31149         construct bits and vr parts of jump functions.
31150         (ipa_check_create_edge_args): Move here from ipa-prop.h, also allocate
31151         ipa_bits_hash_table and ipa_vr_hash_table if they do not already
31152         exist.
31153         (ipcp_grow_transformations_if_necessary): Also allocate
31154         ipa_bits_hash_table and ipa_vr_hash_table if they do not already
31155         exist.
31156         (ipa_node_params_t::duplicate): Do not copy bits, just pointers to
31157         them.  Fix too long lines.
31158         (ipa_write_jump_function): Adjust for bits and m_vr being pointers and
31159         vr_known being removed.
31160         (ipa_read_jump_function): Use new setter functions to construct bits
31161         and vr parts of jump functions or set them to NULL.
31162         (write_ipcp_transformation_info): Adjust for bits being pointers.
31163         (read_ipcp_transformation_info): Likewise.
31164         (ipcp_update_bits): Likewise.  Fix excessively long lines a trailing
31165         space.
31166         Include gt-ipa-prop.h.
31167         * ipa-cp.c (propagate_bits_across_jump_function): Adjust for bits
31168         being pointers.
31169         (ipcp_store_bits_results): Likewise.
31170         (propagate_vr_across_jump_function): Adjust for m_vr being a pointer.
31171         Do not write to existing jump functions but use a temporary instead.
31173 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
31175         PR c++/79681
31176         * fold-const.c (make_bit_field_ref): If orig_inner is COMPONENT_REF,
31177         attempt to use its first operand as BIT_FIELD_REF base.
31179 2017-03-01  Richard Biener  <rguenther@suse.de>
31181         PR middle-end/79721
31182         * tree-chrec.c (chrec_evaluate): Perform computation of Newtons
31183         interpolating formula in wrapping arithmetic.
31184         (chrec_apply): Convert chrec_evaluate return value to wanted type.
31186 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
31188         PR tree-optimization/79734
31189         * tree-vect-generic.c (expand_vector_condition): Optimize
31190         AVX512 vector boolean VEC_COND_EXPRs into bitwise operations.
31191         Handle VEC_COND_EXPR where comparison has different inner width from
31192         type's inner width.
31194 2017-02-28  Sandra Loosemore  <sandra@codesourcery.com>
31196         * doc/invoke.texi (ARC Options): Copy-edit to fix punctuation,
31197         markup, and similar issues.  Remove @opindex entries for things
31198         that aren't options.  Add missing -mmpy-option entries.
31200 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
31202         PR tree-optimization/79737
31203         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): If bitlen is
31204         a multiple of BITS_PER_UNIT and !BYTES_BIG_ENDIAN, clear
31205         tmpbuf[byte_size - 1].  Call natice_encode_expr with byte_size - 1
31206         instead of byte_size.  Formatting fix.
31207         (shift_bytes_in_array_right): Formatting fix.
31209 2017-02-28  Eric Botcazou  <ebotcazou@adacore.com>
31211         PR target/79749
31212         * config/sparc/sparc.c (sparc_frame_pointer_required): Add missing
31213         condition on optimize for the leaf function test.
31215 2017-02-28  Martin Liska  <mliska@suse.cz>
31217         PR lto/79625
31218         * read-rtl-function.c (function_reader::handle_unknown_directive):
31219         Bail out when one uses -flto.
31221 2017-02-28  Martin Liska  <mliska@suse.cz>
31223         * common.opt: Replace space with tabular for options of <number>
31224         type.
31225         * config/i386/i386.opt: Show <number> value for
31226         -mlarge-data-threshold.
31227         * opts.c (print_filtered_help): Do not display number in hexadecimal
31228         format.
31230 2017-02-28  Martin Liska  <mliska@suse.cz>
31232         * common.opt: Fix --help=option -Q for options which are of
31233         an enum type.
31235 2017-02-28  Uros Bizjak  <ubizjak@gmail.com>
31237         * config/i386/i386.c (print_reg): Error out for values
31238         of 8-bit size in invalid integer register.
31240 2017-02-28  Martin Sebor  <msebor@redhat.com>
31242         PR tree-optimization/79691
31243         * passes.def (pass_all_optimizations_g): Enable pass_sprintf_length.
31245 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
31247         PR target/79729
31248         * config/i386/i386.c (ix86_print_operand) <case 'R'>: Replace
31249         gcc_unreachable with output_operand_lossage.
31251 2017-02-28  Richard Biener  <rguenther@suse.de>
31253         PR tree-optimization/79740
31254         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Allow redundant
31255         inserts.
31256         (visit_nary_op): Insert the nary into the hashtable if we
31257         pattern-matched sth.
31258         * tree-ssa-pre.c (eliminate_insert): Robustify.
31260 2017-02-28  Richard Biener  <rguenther@suse.de>
31262         PR middle-end/79731
31263         * fold-const.c (decode_field_reference): Reject out-of-bound
31264         accesses.
31266 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
31268         * config/i386/i386.c: Include intl.h.
31269         (ix86_option_override_internal): Use cond ? G_("...") : G_("...")
31270         instead of just cond ? "..." : "...".
31271         * config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Likewise.
31272         * coverage.c (read_counts_file): Likewise.
31273         * omp-offload.c: Include intl.h.
31274         (oacc_loop_fixed_partitions): Use cond ? G_("...") : G_("...") instead
31275         of just cond ? "..." : "...".
31276         * gcov.c (read_count_file): Use cond ? N_("...") : N_("...") instead
31277         of just cond ? "..." : "...".
31279 2017-02-28  Richard Earnshaw  <rearnsha@arm.com>
31281         PR target/79742
31282         * config/arm/parsecpu.awk (gen_data): Set tuning target to 'tune for'
31283         entry, if present.
31284         * config/arm/arm-cpus.in (cortex-m0plus.small-multiply): Correct
31285         'tune for' CPU name.
31286         * config/arm/arm-cpu-data.h: Regenerated.
31288 2017-02-28  Richard Biener  <rguenther@suse.de>
31290         PR tree-optimization/79732
31291         * tree-inline.c (expand_call_inline): Do not shadow var.
31293 2017-02-28  Richard Biener  <rguenther@suse.de>
31295         PR tree-optimization/79723
31296         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Preserve
31297         address-space properly.
31299 2017-02-28  Thomas Schwinge  <thomas@codesourcery.com>
31301         * doc/optinfo.texi (Optimization groups): Fix option used for
31302         OPTGROUP_ALL.
31303         * doc/invoke.texi (-fopt-info): Document "omp".
31304         * dumpfile.h: Sort OPTGROUP_OMP before OPTGROUP_VEC.
31305         (OPTGROUP_ALL): Add OPTGROUP_OMP.
31306         * hsa-gen.c (pass_data_gen_hsail): Use OPTGROUP_OMP.
31307         * ipa-hsa.c (pass_data_ipa_hsa): Likewise.
31308         * omp-simd-clone.c (pass_data_omp_simd_clone): Likewise.
31310         * dumpfile.h (OPTGROUP_OPENMP): Rename to OPTGROUP_OMP.  Adjust
31311         all users.
31312         * dumpfile.c (optgroup_options): Instead of "openmp", associate
31313         OPTGROUP_OMP with "omp".
31315 2017-02-27  Pat Haugen  <pthaugen@us.ibm.com>
31317         PR target/79544
31318         * config/rs6000/rs6000-c.c (struct altivec_builtin_types): Use VSRAD
31319         for arithmetic shift of unsigned V2DI.
31321 2017-02-27  Claudiu Zissulescu  <claziss@synopsys.com>
31323         * config.gcc (arc*-): Clean up, use arc/big.h, arc/elf.h, and
31324         arc/linux.h headers.
31325         * config/arc/arc.h (TARGET_OS_CPP_BUILTINS): Remove.
31326         (LINK_SPEC): Likewise.
31327         (ARC_TLS_EXTRA_START_SPEC): Likewise.
31328         (EXTRA_SPECS): Likewise.
31329         (STARTFILE_SPEC): Likewise.
31330         (ENDFILE_SPEC): Likewise.
31331         (LIB_SPEC): Likewise.
31332         (TARGET_SDATA_DEFAULT): Likewise.
31333         (TARGET_MMEDIUM_CALLS_DEFAULT): Likewise.
31334         (MULTILIB_DEFAULTS): Likewise.
31335         (DWARF2_UNWIND_INFO): Likewise.
31336         * config/arc/big.h: New file.
31337         * config/arc/elf.h: Likewise.
31338         * config/arc/linux.h: Likewise.
31339         * config/arc/t-uClibc: Remove.
31341 2017-02-27  Bin Cheng  <bin.cheng@arm.com>
31343         PR tree-optimization/77536
31344         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): New function.
31345         (tree_transform_and_unroll_loop): Use above function to compute the
31346         estimated niter of unrolled loop and use it when scaling profile.
31347         Also use count info rather than frequency if it's non-zero.
31348         * tree-ssa-loop-manip.h niter_for_unrolled_loop(): New declaration.
31349         * tree-vect-loop.c (scale_profile_for_vect_loop): New function.
31350         (vect_transform_loop): Call above function.
31352 2017-02-27  Richard Biener  <rguenther@suse.de>
31354         PR tree-optimization/45397
31355         * tree-ssa-pre.c (eliminate_insert): Handle BIT_AND_EXPR.
31356         * tree-ssa-sccvn.c (valueized_wider_op): New helper.
31357         (visit_nary_op): Add pattern matching for CSEing sign-changed
31358         or truncated operations with wider ones.
31360 2017-02-27  Richard Biener  <rguenther@suse.de>
31362         PR tree-optimization/79690
31363         * tree-vect-stmts.c (vectorizable_store): Use vector type
31364         built from the DR with address-space.
31366 2017-02-26  Gerald Pfeifer  <gerald@pfeifer.com>
31368         * doc/invoke.texi (Optimize Options): Refine the description
31369         of asan-use-after-return.
31371 2017-02-25  Alan Modra  <amodra@gmail.com>
31373         PR rtl-optimization/79584
31374         * lra-constraints.c (base_to_reg): Reload ad->base, the entire
31375         base, not ad->base_term, the reg within base.  Remove assertion
31376         that ad->base == ad->base_term.  Replace gen_int_mode using
31377         bogus mode with const0_rtx.
31379 2017-02-25  Jakub Jelinek  <jakub@redhat.com>
31381         PR middle-end/79396
31382         * tree-eh.c (operation_could_trap_p, stmt_could_throw_1_p): Handle
31383         FMA_EXPR like tcc_binary or tcc_unary.
31385         * tree-ssa-loop-niter.c (number_of_iterations_exit): Simplify warning.
31387         PR debug/77589
31388         * dwarf2out.c (struct dw_loc_list_struct): Add noted_variable_value
31389         bitfield.
31390         (size_of_loc_descr): Handle DW_OP_GNU_variable_value.
31391         (output_loc_operands): Handle DW_OP_call_ref and
31392         DW_OP_GNU_variable_value.
31393         (struct variable_value_struct): New type.
31394         (struct variable_value_hasher): Likewise.
31395         (variable_value_hash): New variable.
31396         (string_types): Remove.
31397         (copy_loc_descr): New function.
31398         (add_loc_descr_to_each): Clarify comment.  Use copy_loc_descr.
31399         (prepend_loc_descr_to_each): New function.
31400         (add_loc_list): Fix comment typo.  Use prepend_loc_descr_to_each
31401         instead of add_loc_descr_to_each if the first argument is single
31402         location list and the second has multiple.
31403         (resolve_args_picking_1): Handle DW_OP_GNU_variable_value.
31404         (loc_list_from_tree_1): For early_dwarf, emit DW_OP_GNU_variable_value
31405         when looking for variable value which doesn't have other location info.
31406         (loc_list_from_tree): Formatting fix.
31407         (gen_array_type_die): Simplify DW_AT_string_length handling.
31408         (adjust_string_types): Remove.
31409         (gen_subprogram_die): Don't call adjust_string_types nor test/set
31410         string_types.  Call resolve_variable_values.
31411         (prune_unused_types_walk_loc_descr): Handle DW_OP_GNU_variable_value.
31412         (resolve_addr_in_expr): Likewise.  Add A argument.
31413         (copy_deref_exprloc): Remove deref argument.  Adjust for the
31414         original expression being DW_OP_GNU_variable_value with optionally
31415         DW_OP_stack_value after it instead of DW_OP_call4 with DW_OP_deref
31416         optionally after it.
31417         (optimize_string_length): Rework for DW_OP_GNU_variable_value.
31418         (resolve_addr): Adjust optimize_string_length and resolve_addr_in_expr
31419         callers.  Set remove_AT_byte_size if removing DW_AT_string_length.
31420         (variable_value_hasher::hash, variable_value_hasher::equal): New
31421         methods.
31422         (resolve_variable_value_in_expr, resolve_variable_value,
31423         resolve_variable_values, note_variable_value_in_expr,
31424         note_variable_value): New functions.
31425         (dwarf2out_early_finish): Call note_variable_value on all toplevel
31426         DIEs.
31428 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
31430         PR c/79677
31431         * opts.h (handle_generated_option): Add GENERATED_P argument.
31432         * opts-common.c (handle_option): Adjust function comment.
31433         (handle_generated_option): Add GENERATED_P argument, pass it to
31434         handle_option.
31435         (control_warning_option): Pass false to handle_generated_option
31436         GENERATED_P.
31437         * opts.c (maybe_default_option): Pass true to handle_generated_option
31438         GENERATED_P.
31439         * optc-gen.awk: Likewise.
31441 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
31443         * config/sh/sh.md (tstsi_t): If operands[0] is a SUBREG instead of
31444         a REG, look at the REG it is a SUBREG of.
31445         (splitter for cmpeqsi_t): Ditto.
31447 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
31449         * config/pa/pa.c (pa_combine_instructions): Do not share RTL.  Make
31450         the special USEs with the pattern of the insn, not the insn itself.
31452 2017-02-24  Matthew Fortune  <matthew.fortune@imgtec.com>
31454         PR target/79473
31455         * doc/invoke.texi: Document -mload-store-pairs.
31457 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
31458             Sandra Loosemore  <sandra@codesourcery.com>
31460         * config/nios2/nios2.c (nios2_simple_const_p): Returns false if the
31461         argument isn't a CONST_INT.
31462         (nios2_alternate_compare_const): Assert op is a CONST_INT.
31463         (nios2_valid_compare_const_p): Assert op is a CONST_INT.
31464         (nios2_validate_compare): Bypass alternate compare logic if *op2
31465         is not a CONST_INT.
31466         (ldstwm_operation_p): Return false if first_base is not a REG or
31467         if first_offset is not a CONST_INT.
31469 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
31471         * config/cris/cris.md: Use correct operand in a define_peephole2.
31473 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
31475         * config/c6x/c6x.c (predicate_insn): Do not incorrectly share RTL.
31477 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
31479         * config/arc/arc.c (arc_ccfsm_advance): Only take the PATTERN of
31480         this_insn if it is an INSN or JUMP_INSN.
31481         (force_offsettable): Look at base, not at addr.
31482         * config/arc/predicates.md (brcc_nolimm_operator): Don't call INTVAL
31483         on things that aren't necessarily CONST_INTs.
31485 2017-02-24  Uros Bizjak  <ubizjak@gmail.com>
31487         * doc/invoke.texi (x86 Options, -mfpmath=sse): Mention that
31488         -mfpmath=sse is the default also for x86-32 targets with SSE2
31489         instruction set when @option{-ffast-math} is enabled
31491 2017-02-24  Jeff Law  <law@redhat.com>
31493         PR rtl-optimizatoin/79286
31494         * ira.c (update_equiv_regs): Drop may_trap_p exception to
31495         dominance test.
31497 2017-02-24  Richard Biener  <rguenther@suse.de>
31499         PR tree-optimization/79389
31500         * gimple-ssa-split-paths.c (is_feasible_trace): Properly skip
31501         debug insns.
31503 2017-02-24  Aldy Hernandez  <aldyh@redhat.com>
31505         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update
31506         function comment to reflect reality.
31507         (loop_exits_before_overflow): Fix typo in function description.
31509 2017-02-24  Richard Biener  <rguenther@suse.de>
31511         PR tree-optimization/79389
31512         * gimple-ssa-split-paths.c (is_feasible_trace): Verify more
31513         properly that a threading opportunity exists.  Detect conditional
31514         copy/constant propagation opportunities.
31516 2017-02-23  Eric Botcazou  <ebotcazou@adacore.com>
31518         * config/visium/visium.md (type): Add trap.
31519         (b): New mode attribute.
31520         (*btst): Rename into...
31521         (*btst<mode>): ...this and adjust.
31522         (*cbranchsi4_btst_insn): Rename into...
31523         (*cbranch<mode>4_btst_insn): ...this and adjust.
31524         (trap): New define_insn.
31526 2017-02-23  Jakub Jelinek  <jakub@redhat.com>
31528         PR tree-optimization/79389
31529         * ifcvt.c (struct noce_if_info): Add rev_cond field.
31530         (noce_reversed_cond_code): New function.
31531         (noce_emit_store_flag): Use rev_cond if non-NULL instead of
31532         reversed_comparison_code.  Formatting fix.
31533         (noce_try_store_flag): Test rev_cond != NULL in addition to
31534         reversed_comparison_code.
31535         (noce_try_store_flag_constants): Likewise.
31536         (noce_try_store_flag_mask): Likewise.
31537         (noce_try_addcc): Use rev_cond if non-NULL instead of
31538         reversed_comparison_code.
31539         (noce_try_cmove_arith): Likewise.  Formatting fixes.
31540         (noce_try_minmax, noce_try_abs): Clear rev_cond.
31541         (noce_find_if_block): Initialize rev_cond.
31542         (find_cond_trap): Call noce_get_condition with then_bb == trap_bb
31543         instead of false as last argument never attempt to reverse it
31544         afterwards.
31546 2017-02-23  Bin Cheng  <bin.cheng@arm.com>
31548         PR tree-optimization/79663
31549         * tree-predcom.c (combine_chains): Process refs in reverse order
31550         only for ZERO length chains, and add explaining comment.
31552 2017-02-23  Jeff Law  <law@redhat.com>
31554         PR tree-optimization/79578
31555         * tree-ssa-dse.c (clear_bytes_written_by): Use OEP_ADDRESS_OF
31556         in call to operand_equal_p.
31558 2017-01-23  Dominique d'Humieres  <dominiq@lps.ens.fr>
31560         PR target/71017
31561         * config/i386/cpuid.h: Fix another undefined behavior.
31563 2017-02-23  Richard Biener  <rguenther@suse.de>
31565         PR tree-optimization/79683
31566         * tree-vect-stmts.c (vect_analyze_stmt): Do not overwrite
31567         vector types for data-refs.
31569 2017-02-23  Martin Liska  <mliska@suse.cz>
31571         * params.def (PARAM_MIN_NONDEBUG_INSN_UID): Change default to 0.
31573 2017-02-23  Jakub Jelinek  <jakub@redhat.com>
31575         PR middle-end/79665
31576         * internal-fn.c (get_range_pos_neg): Moved to ...
31577         * tree.c (get_range_pos_neg): ... here.  No longer static.
31578         * tree.h (get_range_pos_neg): New prototype.
31579         * expr.c (expand_expr_real_2) <case TRUNC_DIV_EXPR>: If both arguments
31580         are known to be in between 0 and signed maximum inclusive, try to
31581         expand both unsigned and signed divmod and use the cheaper one from
31582         those.
31584 2017-02-22  Jeff Law  <law@redhat.com>
31586         PR tree-optimization/79578
31587         * tree-ssa-dse.c (clear_bytes_written_by): Use operand_equal_p
31588         to compare base operands.
31590 2017-02-22  Segher Boessenkool  <segher@kernel.crashing.org>
31592         PR target/79211
31593         * config/rs6000/rs6000.md (*fsel<SFDF:mode><SFDF2:mode>4): Use
31594         gpc_reg_operand instead of fpr_reg_operand.
31596 2017-02-22  Sameera Deshpande  <sameera.deshpande@imgtec.com>
31598         * config/mips/mips.c (mips_return_in_memory): Force FP
31599         vector types to be returned in memory for o32 ABI.
31601 2017-02-22  Jakub Jelinek  <jakub@redhat.com>
31603         * dwarf2out.c (gen_variable_die): For -gdwarf-5, use DW_TAG_variable
31604         instead of DW_TAG_member for static data member declarations and don't
31605         set no_linkage_name for static inline data members.
31606         (gen_member_die): For -gdwarf-5 don't change DW_TAG_variable
31607         to DW_TAG_member.
31609 2017-02-22  Martin Liska  <mliska@suse.cz>
31611         * doc/invoke.texi: Replace inequality signs with square brackets
31612         for -Wnormalized.
31614 2017-02-22  Matthew Fortune  <matthew.fortune@imgtec.com>
31616         PR target/78660
31617         * lra-constraints.c (simplify_operand_subreg): Handle
31618         WORD_REGISTER_OPERATIONS targets.
31620 2017-02-22  Jakub Jelinek  <jakub@redhat.com>
31622         PR target/70465
31623         * reg-stack.c (emit_swap_insn): Treat (float_extend:?F (mem:?F))
31624         and (const_double:?F) like (mem:?F) for the purpose of fxch %st(1)
31625         elimination by swapping fld*.
31627 2017-02-22  Richard Biener  <rguenther@suse.de>
31629         PR tree-optimization/79673
31630         * tree-ssa-pre.c (compute_avail): Use wide_int_to_tree to
31631         convert the [TARGET_]MEM_REF offset INTEGER_CST, scrapping off
31632         irrelevant address-space qualifiers and avoiding a
31633         ADDR_SPACE_CONVERT_EXPR from fold_convert.
31635 2017-02-22  Richard Biener  <rguenther@suse.de>
31637         PR tree-optimization/79666
31638         * tree-vrp.c (extract_range_from_binary_expr_1): Make sure
31639         to not symbolically negate if that may introduce undefined
31640         overflow.
31642 2017-02-22  Martin Liska  <mliska@suse.cz>
31644         PR lto/79587
31645         * data-streamer-in.c (streamer_read_gcov_count): Remove assert.
31646         * data-streamer-out.c (streamer_write_gcov_count_stream):
31647         Likewise.
31648         * value-prof.c (stream_out_histogram_value): Make assert more
31649         precise based on type of counter.
31651 2017-02-21  Uros Bizjak  <ubizjak@gmail.com>
31653         PR target/79593
31654         * config/i386/i386.md (standard_x87sse_constant_load splitter):
31655         Use nonimmediate_operand instead of memory_operand for operand 1.
31656         (float-extend standard_x87sse_constant_load splitter): Ditto.
31658 2017-02-21  Jeff Law  <law@redhat.com>
31660         PR tree-optimization/79621
31661         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Ignore
31662         blocks with edges to themselves.
31664 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
31666         PR target/79633
31667         * tree-chkp-opt.c (chkp_optimize_string_function_calls): Use
31668         is_gimple_call instead of comparing gimple_code with GIMPLE_CALL.
31669         Use gimple_call_builtin_p.
31671         PR target/79570
31672         * sel-sched.c (moveup_expr_cached): Don't call sel_bb_head
31673         on temporarily removed DEBUG_INSNs.
31675         PR tree-optimization/79649
31676         * tree-loop-distribution.c (classify_partition): Give up on
31677         non-generic address space loads/stores.
31679 2017-02-21  Aldy Hernandez  <aldyh@redhat.com>
31681         * doc/loop.texi (Loop manipulation): Remove nonexistent
31682         tree_ssa_loop_version from the documentation.
31683         * cfgloopmanip.c (loop_version): Document CONDITION_BB argument.
31685 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
31687         PR target/79494
31688         * config/i386/i386.c (ix86_expand_split_stack_prologue): Call
31689         make_reg_eh_region_note_nothrow_nononlocal on call_insn.
31690         * config/rs6000/rs6000.c: Include except.h.
31691         (rs6000_expand_split_stack_prologue): Call
31692         make_reg_eh_region_note_nothrow_nononlocal on the call insn.
31694 2017-02-21  Martin Jambor  <mjambor@suse.cz>
31696         PR lto/79579
31697         * ipa-prop.c (ipa_prop_write_jump_functions): Bail out if no edges
31698         have been analyzed.
31700 2017-02-21  Martin Jambor  <mjambor@suse.cz>
31702         * common.opt (-fipa-cp-alignment): Mark as ignored and preserved
31703         for backward compatibility only.
31704         * doc/invoke.texi (Option Summary): Remove all references to
31705         -fipa-cp-alignment.
31707 2017-02-21  Matthew Fortune  <matthew.fortune@imgtec.com>
31709         PR target/78660
31710         Revert:
31711         2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
31713         * lra-constraints.c (curr_insn_transform): Handle
31714         WORD_REGISTER_OPERATIONS requirements when reloading SUBREGs.
31716 2017-02-21  Martin Liska  <mliska@suse.cz>
31718         * config/i386/i386.opt: Replace -masm-dialect with -masm.
31720 2017-02-21  Thomas Schwinge  <thomas@codesourcery.com>
31722         PR translation/79638
31723         * config/nvptx/nvptx.c (ENTRY_TEMPLATE): Single out "%ntid.y".
31725 2017-02-21  Eric Botcazou  <ebotcazou@adacore.com>
31727         PR ada/67205
31728         * config/arm/arm.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define.
31729         (arm_function_ok_for_sibcall): Return false for an indirect call by
31730         descriptor if all the argument registers are used.
31731         (arm_relayout_function): Use FUNCTION_ALIGNMENT macro to adjust the
31732         alignment of the function.
31734 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
31736         PR tree-optimization/61441
31737         * simplify-rtx.c (simplify_const_unary_operation): For
31738         -fsignaling-nans and sNaN operand, return NULL_RTX rather than
31739         the sNaN unmodified.
31741 2017-02-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
31743         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
31744         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
31745         instead of SYSTEM_HEADER_DIR.
31747 2017-02-20  Gerald Pfeifer  <gerald@pfeifer.com>
31748             Martin LiÅ¡ka  <mliska@suse.cz>
31750         * doc/invoke.texi (use-after-scope-direct-emission-threshold):
31751         Fix typos and grammar, use active voice, and clarify.
31753 2017-02-20  Marek Polacek  <polacek@redhat.com>
31755         PR middle-end/79537
31756         * gimplify.c (gimplify_expr): Handle unused *&&L;.
31758         PR sanitizer/79558
31759         * ubsan.c (ubsan_type_descriptor): Check if TYPE_MAX_VALUE is null.
31761 2017-02-20  Jakub Jelinek  <jakub@redhat.com>
31763         PR target/79568
31764         * config/i386/i386.c (ix86_expand_builtin): Handle
31765         OPTION_MASK_ISA_AVX512VL and OPTION_MASK_ISA_64BIT in
31766         ix86_builtins_isa[fcode].isa as a requirement of those
31767         flags and any other flag in the bitmask.
31768         (ix86_init_mmx_sse_builtins): Use 0 instead of
31769         ~OPTION_MASK_ISA_64BIT as mask.
31770         * config/i386/i386-builtin.def (__builtin_ia32_rdtsc,
31771         __builtin_ia32_rdtscp, __builtin_ia32_pause, __builtin_ia32_bsrsi,
31772         __builtin_ia32_rdpmc, __builtin_ia32_rolqi, __builtin_ia32_rolhi,
31773         __builtin_ia32_rorqi, __builtin_ia32_rorhi): Likewise.
31775 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
31777         PR target/78012
31778         * lra-constraints.c (split_reg): Check requested split mode
31779         is supported by the register.
31781 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
31783         * lra-constraints.c (simplify_operand_subreg): Remove early
31784         return false.
31786 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
31788         PR target/78660
31789         * lra-constraints.c (curr_insn_transform): Tighten condition
31790         for converting SUBREG reloads from OP_OUT to OP_INOUT.
31792 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
31794         PR target/78660
31795         * lra-constraints.c (curr_insn_transform): Handle
31796         WORD_REGISTER_OPERATIONS requirements when reloading SUBREGs.
31798 2017-02-19  Uros Bizjak  <ubizjak@gmail.com>
31800         Revert:
31801         2016-05-30  Uros Bizjak  <ubizjak@gmail.com>
31803         * config/i386/sync.md (mfence_nosse): Use "lock orl $0, -4(%esp)".
31805 2017-02-19  Jonathan Wakely  <jwakely@redhat.com>
31807         PR c++/69523
31808         * doc/invoke.texi (C++ Dialect Options) [-Wliteral-suffix]: Update
31809         description.
31811 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
31813         * gimple-pretty-print.c (dump_ternary_rhs): Adjust gimple dump format
31814         for FMA_EXPR.
31816 2017-02-18  Jakub Jelinek  <jakub@redhat.com>
31818         * final.c (last_columnnum, override_columnnum): New variables.
31819         (final_start_function): Set last_columnnum, pass it to begin_prologue
31820         hook and pass 0 to dwarf2out_begin_prologue.
31821         (final_scan_insn): Update override_columnnum.  Pass last_columnnum
31822         to source_line debug hook.
31823         (notice_source_line): Compute last_columnnum and for debug_column_info
31824         return true on column changes.
31825         * debug.h (struct gcc_debug_hooks): Add column argument to
31826         source_line and begin_prologue hooks.
31827         (debug_nothing_int_charstar_int_bool): Remove prototype.
31828         (debug_nothing_int_int_charstar,
31829         debug_nothing_int_int_charstar_int_bool): New prototypes.
31830         (dwarf2out_begin_prologue): Add column argument.
31831         * debug.c (do_nothing_debug_hooks): Adjust source_line and
31832         begin_prologue hooks.
31833         (debug_nothing_int_charstar_int_bool): Remove.
31834         (debug_nothing_int_int_charstar,
31835         debug_nothing_int_int_charstar_int_bool): New functions.
31836         * dwarf2out.c (dwarf2out_begin_prologue): Add column argument, pass it
31837         through to dwarf2out_source_line.
31838         (dwarf2_lineno_debug_hooks): Adjust begin_prologue hook.
31839         (dwarf2out_source_line): Add column argument, emit it if requested.
31840         * sdbout.c (sdbout_source_line, sdbout_begin_prologue): Add column
31841         arguments.
31842         * xcoffout.h (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
31843         * xcoffout.c (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
31844         * vmsdbgout.c (vmsdbgout_begin_prologue): Add column argument, pass it
31845         through to dwarf2out_begin_prologue.
31846         (vmsdbgout_source_line): Add column argument, pass it through to
31847         dwarf2out_source_line.
31848         * dbxout.c (dbxout_begin_prologue): Add column argument, adjust
31849         dbxout_source_line caller.
31850         (dbxout_source_line): Add column argument.
31852         * common.opt (gno-column-info, gcolumn-info): New options.
31853         * dwarf2out.c (dwarf2_lineno_debug_hooks): Formatting fix.
31854         (check_die): Also test for multiple DW_AT_decl_column attributes.
31855         (add_src_coords_attributes, dwarf2out_imported_module_or_decl_1): Add
31856         DW_AT_decl_column if requested.
31857         (gen_subprogram_die): Compare and/or add also DW_AT_decl_column
31858         if requested.
31859         (gen_variable_die): Likewise.
31860         (add_call_src_coords_attributes): Add DW_AT_call_column if requested.
31861         * doc/invoke.texi (-gcolumn-info, -gno-column-info): Document.
31863         PR target/79569
31864         * config/i386/i386.opt (m3dnowa): Replace Undocumented with Report.
31865         * common/config/i386/i386-common.c (OPTION_MASK_ISA_3DNOW_A_SET): Define.
31866         (ix86_handle_option): Handle OPT_m3dnowa.
31867         * doc/invoke.texi (-m3dnowa): Document.
31868         * doc/extend.texi (__builtin_ia32_pmulhuw, __builtin_ia32_pf2iw): Use
31869         -m3dnowa instead of -m3dnow -march=athlon.
31871         PR target/79559
31872         * config/i386/i386.c (ix86_print_operand): Use output_operand_lossage
31873         instead of gcc_assert for K, r and R code checks.  Formatting fixes.
31875 2017-02-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31877         PR target/79261
31878         * config/rs6000/rs6000.c (rs6000_expand_ternop_builtin): Add
31879         support for CODE_FOR_vsx_xxpermdi_v2d[fi]_be.
31880         * config/rs6000/rs6000.md (reload_gpr_from_vsx<mode>): Call
31881         generator for vsx_xxpermdi_<mode>_be.
31882         * config/rs6000/vsx.md (vsx_xxpermdi_<mode>): Remove logic to
31883         force big-endian semantics.
31884         (vsx_xxpermdi_<mode>_be): New define_expand with same
31885         implementation as previous version of vsx_xxpermdi_<mode>.
31887 2017-02-17  Jakub Jelinek  <jakub@redhat.com>
31889         PR tree-optimization/79327
31890         * gimple-ssa-sprintf.c (format_integer): Remove likely_adjust
31891         variable, its initialization and use.
31893 2017-02-17  Julia Koval  <julia.koval@intel.com>
31895         * common/config/i386/i386-common.c (OPTION_MASK_ISA_RDPID_SET): New.
31896         (OPTION_MASK_ISA_PKU_UNSET): New.
31897         (ix86_handle_option): Handle -mrdpid.
31898         * config/i386/cpuid.h (bit_RDPID): New.
31899         * config/i386/driver-i386.c (host_detect_local_cpu):
31900         Detect RDPID feature.
31901         * config/i386/i386-builtin.def (__builtin_ia32_rdpid): New.
31902         * config/i386/i386-c.c (ix86_target_macros_internal):
31903         Handle RDPID flag.
31904         * config/i386/i386.c (ix86_target_string): Add -mrdpid to isa2_opts.
31905         (ix86_valid_target_attribute_inner_p): Add "rdpid".
31906         (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
31907         * config/i386/i386.h (TARGET_RDPID, TARGET_RDPID_P): New.
31908         * config/i386/i386.md (define_insn "rdpid"): New.
31909         * config/i386/i386.opt Add -mrdpid.
31910         * config/i386/immintrin.h (_rdpid_u32): New.
31912 2017-02-17  Vladimir Makarov  <vmakarov@redhat.com>
31914         PR rtl-optimization/79541
31915         * lra-constraints.c (curr_insn_transform): Remove wrong asm insn
31916         instead of transforming it into USE.
31918 2017-02-17  Segher Boessenkool  <segher@kernel.crashing.org>
31920         * config/rs6000/rs6000.md (extendsfdf2): Remove default arguments.
31921         If HONOR_SNANS (SFmode) force the input to a register.
31922         (*extendsfdf2_fpr): Add !HONOR_SNANS (SFmode) condition.
31923         (*extendsfdf2_snan): New pattern, used when using SNaNs; it generates
31924         an frsp or similar insn.
31926 2017-02-17  Martin Liska  <mliska@suse.cz>
31928         PR rtl-optimization/79577
31929         * params.def (selsched-max-sched-times): Increase minimum to 1.
31931 2017-02-17  Martin Liska  <mliska@suse.cz>
31933         PR rtl-optimization/79574
31934         * gcse.c (want_to_gcse_p): Prevent integer overflow.
31936 2017-02-17  Martin Liska  <mliska@suse.cz>
31938         PR tree-optimization/79529
31939         * tree-ssa-loop-unswitch.c (is_maybe_undefined): Use
31940         ssa_defined_default_def_p to handle cases which are implicitly
31941         defined.
31942         * tree-ssa.c (ssa_defined_default_def_p): New function.
31943         (ssa_undefined_value_p): Use ssa_defined_default_def_p to handle cases
31944         which are implicitly defined.
31945         * tree-ssa.h (ssa_defined_default_def_p): Declare.
31947 2017-02-17  Richard Biener  <rguenther@suse.de>
31949         PR middle-end/79576
31950         * params.def (max-ssa-name-query-depth): Limit to 10.
31952 2017-02-17  Richard Biener  <rguenther@suse.de>
31954         PR tree-optimization/79552
31955         * tree-ssa-structalias.c (visit_loadstore): Properly verify
31956         default defs.
31958 2017-02-17  Richard Biener  <rguenther@suse.de>
31960         PR bootstrap/79567
31961         * genmatch.c (output_line_directive): Handle DIR_SEPARATOR_2.
31963 2017-02-17  Marek Polacek  <polacek@redhat.com>
31965         PR middle-end/79536
31966         * fold-const.c (fold_negate_expr_1): Renamed from fold_negate_expr.
31967         (fold_negate_expr): New wrapper.
31969 2017-02-16  Sandra Loosemore  <sandra@codesourcery.com>
31971         * doc/invoke.texi (C++ Dialect Options) [-Wno-non-template-friend]: 
31972         Correct terminology and de-emphasize pre-standard behavior.
31974 2017-02-16  Alan Modra  <amodra@gmail.com>
31976         PR rtl-optimization/79286
31977         * ira.c (def_dominates_uses): New function.
31978         (update_equiv_regs): Don't create an equivalence for insns that
31979         may trap where the register def does not dominate the use.
31981 2017-02-16  Vladimir Makarov  <vmakarov@redhat.com>
31983         PR rtl-optimization/78127
31984         * lra.c (lra): Call lra_eliminate before finish the loop after
31985         lra_constraint.
31987 2017-02-16  Richard Biener  <rguenther@suse.de>
31989         * graphite.h: Do not include isl/isl_val_gmp.h, instead include
31990         isl/isl_val.h.
31991         * graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): Remove.
31992         (gcc_expression_from_isl_expr_int): Use generic isl_val interface.
31993         * graphite-sese-to-poly.c: Do not include isl/isl_val_gmp.h.
31994         (isl_val_int_from_wi): New function.
31995         (extract_affine_gmp): Rename to ...
31996         (extract_affine_wi): ... this, take a widest_int.
31997         (extract_affine_int): Just wrap extract_affine_wi.
31998         (add_param_constraints): Use isl_val_int_from_wi.
31999         (add_loop_constraints): Likewise, and extract_affine_wi.
32001 2017-02-15  Jeff Law  <law@redhat.com>
32003         PR middle-end/79521
32004         * ira-costs.c (scan_one_insn): Check have_regs_of_mode before calling
32005         ira_init_register_move_cost_if_necessary.
32007 2017-02-15  Martin Sebor  <msebor@redhat.com>
32009         PR middle-end/32003
32010         * doc/invoke.texi (-fdump-final-insns): Replace option accidentally
32011         removed in a prior commit.
32013 2017-02-15  Bin Cheng  <bin.cheng@arm.com>
32015         PR tree-optimization/79347
32016         * tree-vect-loop-manip.c (vect_do_peeling): Maintain profile
32017         counters during peeling.
32019 2017-02-15  Thomas Schwinge  <thomas@codesourcery.com>
32021         * Makefile.in (site.exp): Remove "set ISLVER".
32023 2017-02-15  Jakub Jelinek  <jakub@redhat.com>
32025         PR target/79487
32026         * real.c (real_from_integer): Call real_convert even for decimal.
32028 2017-02-15  Dominik Vogt  <vogt@linux.vnet.ibm.com>
32030         PR target/79421
32031         * config/s390/s390.c: define TARGET_CUSTOM_FUNCTION_DESCRIPTORS.
32033 2017-02-14  Andrew Pinski  <apinski@cavium.com>
32035         * config/aarch64/aarch64-cores.def (thunderx2t99): Move to under 'C"
32036         cores and change the partno/implementer to be correct.
32037         (thunderx2t99p1): New core which replaces thunderx2t99 and still has
32038         the 'B" as the implementer.
32039         * config/aarch64/aarch64-tune.md: Regenerate.
32041 2017-02-14  Carl Love  <cel@us.ibm.com>
32043         * config/rs6000/rs6000.c: Add case statement entry to make the
32044         xvcvuxdsp built-in argument unsigned.
32045         * config/rs6000/vsx.md: Fix the source and return operand types so they
32046         match the instruction definitions from the ISA document.  Fix typo
32047         in the instruction generation for the (define_insn "vsx_xvcvuxdsp"
32048         statement.
32050 2017-02-14  Vladimir Makarov  <vmakarov@redhat.com>
32052         PR target/79282
32053         * lra-int.h (struct lra_operand_data, struct lra_insn_reg): Add
32054         member early_clobber_alts.
32055         * lra-lives.c (reg_early_clobber_p): New.
32056         (process_bb_lives): Use it.
32057         * lra.c (new_insn_reg): New arg early_clobber_alts.  Use it.
32058         (debug_operand_data): Initialize early_clobber_alts.
32059         (setup_operand_alternative): Set up early_clobber_alts.
32060         (collect_non_operand_hard_regs): Ditto.  Pass early clobber
32061         alternatives to new_insn_reg.
32062         (add_regs_to_insn_regno_info): Add arg early_clobber_alts.  Use
32063         it.
32064         (lra_update_insn_regno_info): Pass the new arg.
32066 2017-02-14  Jakub Jelinek  <jakub@redhat.com>
32068         PR middle-end/79505
32069         * omp-offload.c (free_oacc_loop): Release loop->ifns vector.
32070         (new_oacc_loop_raw): Don't clear already cleared fields.
32072         PR target/79481
32073         * config/i386/avx512pfintrin.h (_mm512_prefetch_i32gather_pd,
32074         _mm512_prefetch_i32gather_ps, _mm512_prefetch_i64gather_pd,
32075         _mm512_prefetch_i64gather_ps): New inline functions and macros.
32077 2017-02-14  Uros Bizjak  <ubizjak@gmail.com>
32079         PR target/79495
32080         * config/i386/i386.md (*movxf_internal): Add (o,rC) alternative.
32082 2017-02-14  H.J. Lu  <hongjiu.lu@intel.com>
32084         PR target/79498
32085         * config/i386/i386.c (timode_scalar_chain::convert_insn): Insert
32086         the extra instruction to the right place to store 128-bit constant
32087         when needed.
32089 2017-02-14  Martin Sebor  <msebor@redhat.com>
32091         PR middle-end/79448
32092         * gimple-ssa-sprintf.c (format_directive): Avoid issuing INT_MAX
32093           warning for strings of unknown length.
32095 2017-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
32097         * config.gcc (supported_defaults) [powerpc*-*-*]: Update.
32099 2017-02-14  Jeff Law  <law@redhat.com>
32101         PR target/79404
32102         * ira-costs.c (scan_one_insn): Initialize register move costs
32103         for pseudos seen in USE/CLOBBER insns.
32105         PR tree-optimization/79095
32106         * tree-vrp.c (extract_range_from_binary_expr_1): For EXACT_DIV_EXPR,
32107         if the numerator has the range ~[0,0] make the resultant range ~[0,0].
32108         (extract_range_from_binary_expr): For MINUS_EXPR with no derived range,
32109         if the operands are known to be not equal, then the resulting range
32110         is ~[0,0].
32111         (intersect_ranges): If the new range is ~[0,0] and the old range is
32112         wide, then prefer ~[0,0].
32113         * tree-vrp.c (overflow_comparison_p_1): New function.
32114         (overflow_comparison_p): New function.
32115         * tree-vrp.c (register_edge_assert_for_2): Register additional asserts
32116         if NAME is used in an overflow test.
32117         (vrp_evaluate_conditional_warnv_with_ops): If the ops represent an
32118         overflow check that can be expressed as an equality test, then adjust
32119         ops to be that equality test.
32121 2017-02-14  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32123         * config/s390/s390-builtin-types.def: Remove flags argument.
32124         * config/s390/s390.c (s390_init_builtins): Likewise.
32126 2017-02-14  Martin Liska  <mliska@suse.cz>
32128         * tree-ssa-loop-unswitch.c (hoist_guard): Release get_loop_body
32129         vector.  Fix trailing white spaces.
32131 2017-02-14  James Greenhalgh  <james.greenhalgh@arm.com>
32133         * config/aarch64/aarch64.c (aarch64_simd_container_mode): Handle
32134         HFmode.
32136 2017-02-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
32138         PR rtl-optimization/68664
32139         * config/arm/arm.c (arm_sched_can_speculate_insn):
32140         New function.  Declare prototype.
32141         (TARGET_SCHED_CAN_SPECULATE_INSN): Define.
32143 2017-02-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
32145         PR rtl-optimization/68664
32146         * config/aarch64/aarch64.c (aarch64_sched_can_speculate_insn):
32147         New function.
32148         (TARGET_SCHED_CAN_SPECULATE_INSN): Define.
32150 2017-02-14  Amit Pawar  <amit.pawar@amd.com>
32152         * config/i386/i386.c (znver1_cost): Fix the alignment for function and
32153         max skip bytes for function, loop and jump.
32155 2017-02-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
32157         * gimple-pretty-print.c (dump_unary_rhs): Adjust dump format for
32158         ABS_EXPR for gimple dump.
32160 2017-02-14  Jakub Jelinek  <jakub@redhat.com>
32162         PR target/79462
32163         * config/sh/sh.c (expand_cbranchdi4): Don't clear operands[4].
32165         PR tree-optimization/79408
32166         * tree-vrp.c (simplify_div_or_mod_using_ranges): Handle also the
32167         case when on TRUNC_MOD_EXPR op0 is INTEGER_CST.
32168         (simplify_stmt_using_ranges): Call simplify_div_or_mod_using_ranges
32169         also if rhs1 is INTEGER_CST.
32171 2017-02-14  Richard Biener  <rguenther@suse.de>
32173         PR middle-end/79432
32174         * tree-into-ssa.c (insert_phi_nodes): When the function can
32175         have abnormal edges rewrite SSA names with broken use-def
32176         dominance out of SSA and register them for PHI insertion.
32178 2017-02-13  Martin Sebor  <msebor@redhat.com>
32180         PR middle-end/79496
32181         * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call): Avoid
32182         clearing info.nowrite flag when snprintf size argument is a range.
32184 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
32186         * cprop.c (cprop_jump): Add missing space in string literal.
32187         * tree-ssa-structalias.c (rewrite_constraints): Likewise.
32188         (get_constraint_for_component_ref): Likewise.
32189         * df-core.c (df_worklist_dataflow_doublequeue): Likewise.
32190         * tree-outof-ssa.c (insert_partition_copy_on_edge): Likewise.
32191         * lra-constraints.c (process_alt_operands): Likewise.
32192         * ipa-inline.c (inline_small_functions): Likewise.
32193         * tree-ssa-sccvn.c (visit_reference_op_store): Likewise.
32194         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
32195         * trans-mem.c (diagnose_tm_1_op): Likewise.
32196         * omp-grid.c (grid_find_single_omp_among_assignments): Likewise.
32197         (grid_parallel_clauses_gridifiable): Likewise.
32199         * config/nvptx/mkoffload.c (process): Add space in between
32200         , and %d.
32202         * config/i386/i386.h (REG_CLASS_NAMES): Add , in between
32203         "MOD4_SSE_REGS" and "ALL_REGS".
32205         * spellcheck.c (test_data): Add , in between "foo" and "food".
32207 2017-02-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
32209         PR target/79449
32210         * config/rs6000/rs6000.c (expand_block_compare): Make sure runtime
32211         boundary crossing check and subsequent code generation agree.
32213 2017-02-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
32215         * config/aarch64/aarch64.c (has_memory_op): Delete.
32216         (aarch64_madd_needs_nop): Use contains_mem_rtx_p instead of
32217         has_memory_op.
32219 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
32221         PR rtl-optimization/79388
32222         PR rtl-optimization/79450
32223         * combine.c (distribute_notes): When removing TEM_INSN for which
32224         corresponding dest has last value recorded, invalidate that last
32225         value.
32227 2017-02-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
32229         * config/arm/arm.c (arm_print_tune_info): Use ASM_COMMENT_START instead
32230         of explicit '@'.  Add missing assembly comment marker on branch costs
32231         printout.
32233 2017-02-13  Nathan Sidwell  <nathan@acm.org>
32235         * gengtype-lex.l (<in_struct>): Add '/'.
32237 2017-02-13  Martin Liska  <mliska@suse.cz>
32239         PR c/79471
32240         * calls.c (expand_call): Replace XALLOCAVEC with XCNEWVEC.
32242 2017-02-13  Richard Biener  <rguenther@suse.de>
32244         * configure.ac (HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS):
32245         Remove.
32246         * configure: Re-generate.
32247         * config.in: Likewise.
32248         * graphite-dependences.c: Simplify as if
32249         HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS was defined.
32250         * graphite-isl-ast-to-gimple.c: Likewise.
32251         * graphite-optimize-isl.c: Likewise.
32252         * graphite-poly.c: Likewise.
32253         * graphite-sese-to-poly.c: Likewise.
32254         * graphite.h: Likewise.
32255         * toplev.c: Include isl/version.h and use isl_version () for
32256         printing the ISL version.
32257         * doc/install.texi: Update ISL requirement.
32259 2017-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
32261         * doc/standards.texi (Standards): Update reference to
32262         Objective-C 2.0.
32264 2017-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
32266         * doc/extend.texi (Named Address Spaces): sourceware.org now
32267         defaults to https.
32268         * doc/install.texi (Binaries): Ditto.
32269         (Specific): Ditto.
32271 2017-02-11  Sandra Loosemore  <sandra@codesourcery.com>
32273         * doc/cpp.texi: Replace "stringify"/"stringification" with C
32274         standard terminology "stringize"/"stringizing" throughout.
32275         * doc/cppinternals.texi: Likewise.
32277 2017-02-11  Sandra Loosemore  <sandra@codesourcery.com>
32279         * doc/extend.texi: Fix some spelling mistakes and typos.
32280         * doc/invoke.texi: Likewise.
32282 2017-02-11  Jan Hubicka  <hubicka@ucw.cz>
32284         PR ipa/79224
32285         * params.def (inline-min-speedup) Change from 10 to 8.
32287 2017-02-11  Jakub Jelinek  <jakub@redhat.com>
32289         * doc/invoke.texi (fopenmp): Bump OpenMP version from 4.0 to
32290         4.5.
32292 2017-02-11  Jan Hubicka  <hubicka@ucw.cz>
32294         PR ipa/79224
32295         * ipa-inline-analysis.c (get_minimal_bb): New function.
32296         (record_modified): Use it.
32297         (remap_edge_change_prob): Handle also ancestor functions.
32299 2017-02-11  Gerald Pfeifer  <gerald@pfeifer.com>
32301         * doc/contrib.texi (Contributors): Remove broken link into
32302         the Mauve CVS repository.
32304 2017-02-11  Jakub Jelinek  <jakub@redhat.com>
32306         PR middle-end/79454
32307         * internal-fn.c (expand_vector_ubsan_overflow): Use piece-wise
32308         result computation whenever lhs doesn't have vector mode, not
32309         just when it has BLKmode.
32311 2017-02-10  Gerald Pfeifer  <gerald@pfeifer.com>
32313         * doc/makefile.texi (profiledbootstrap): Refer to the
32314         installation instructions only in textual form.
32316 2017-02-10  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
32318         PR target/79295
32319         * config/rs6000/altivec.md (bcd<bcd_add_sub>): Fix constraints.
32321 2017-02-10  Gerald Pfeifer  <gerald@pfeifer.com>
32323         * doc/install.texi (Specific): Use https for blackfin.uclinux.org.
32324         (Specific): Update mingw-w64 reference.
32325         (Binaries): Ditto.
32326         (Specific): Remove broken link to Renesas RX processor.
32328 2017-02-10  Richard Biener  <rguenther@suse.de>
32330         * toplev.c (process_options): Do not mention obsolete graphite
32331         options when printing sorry message about missing graphite support.
32332         Mention -floop-nest-optimize.
32334 2017-02-10  Christophe Lyon  <christophe.lyon@linaro.org>
32336         * config/aarch64/arm_neon.h (vtst_p8): Rewrite without asm.
32337         (vtst_p16): Likewise.
32338         (vtstq_p8): Likewise.
32339         (vtstq_p16): Likewise.
32340         (vtst_p64): New.
32341         (vtstq_p64): Likewise.
32342         * config/arm/arm_neon.h (vgetq_lane_p64): New.
32343         (vset_lane_p64): New.
32344         (vsetq_lane_p64): New.
32346 2017-02-10  Jakub Jelinek  <jakub@redhat.com>
32348         PR tree-optimization/79411
32349         * tree-ssa-reassoc.c (is_reassociable_op): Return false if
32350         stmt operands are SSA_NAMEs used in abnormal phis.
32351         (can_reassociate_p): Return false if op is SSA_NAME used in abnormal
32352         phis.
32354 2017-02-09  Jan Hubicka  <hubicka@ucw.cz>
32356         PR ipa/70795
32357         * cgraphunit.c (cgraph_node::add_new_function): Set externally_visible
32358         flag if needed.
32360 2017-02-09  Jan Hubicka  <hubicka@ucw.cz>
32362         * tree-ssa-loop-unswitch.c (hoist_guard): Update profile.
32364 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
32366         * omp-offload.c (oacc_loop_auto_partitions): Use || instead of |
32367         to avoid warning.
32369         PR c/79413
32370         * gimplify.h (is_gimple_sizepos): Only test for INTEGER_CST constants,
32371         not arbitrary TREE_CONSTANT.
32373         PR c/79431
32374         * gimplify.c (gimplify_adjust_omp_clauses): Ignore
32375         "omp declare target link" attribute unless is_global_var.
32376         * omp-offload.c (find_link_var_op): Likewise.
32378 2017-02-09  Nathan Sidwell  <nathan@codesourcery.com>
32379             Chung-Lin Tang  <cltang@codesourcery.com>
32381         * gimplify.c (gimplify_scan_omp_clauses): No special handling for
32382         OMP_CLAUSE_TILE.
32383         (gimplify_adjust_omp_clauses): Don't delete TILE.
32384         (gimplify_omp_for): Deal with TILE.
32385         * internal-fn.c (expand_GOACC_TILE): New function.
32386         * internal-fn.def (GOACC_DIM_POS): Comment may be overly conservative.
32387         (GOACC_TILE): New.
32388         * omp-expand.c (struct oacc_collapse): Add tile and outer fields.
32389         (expand_oacc_collapse_init): Add LOC paramter.  Initialize tile
32390         element fields.
32391         (expand_oacc_collapse_vars): Add INNER parm, adjust for tiling,
32392         avoid DIV for outermost collapse var.
32393         (expand_oacc_for): Insert tile element loop as needed.  Adjust.
32394         Remove out of date comments, fix whitespace.
32395         * omp-general.c (omp_extract_for_data): Deal with tiling.
32396         * omp-general.h (enum oacc_loop_flags): Add OLF_TILE flag,
32397         adjust OLF_DIM_BASE value.
32398         (struct omp_for_data): Add tiling field.
32399         * omp-low.c (scan_sharing_clauses): Allow OMP_CLAUSE_TILE.
32400         (lower_oacc_head_mark): Add OLF_TILE as appropriate.  Ensure 2 levels
32401         for auto loops.  Remove default auto determining, moved to
32402         oacc_loop_fixed_partitions.
32403         * omp-offload.c (struct oacc_loop): Change 'ifns' to vector of call
32404         stmts, add e_mask field.
32405         (oacc_dim_call): New function, abstracted out from oacc_thread_numbers.
32406         (oacc_thread_numbers): Use oacc_dim_call.
32407         (oacc_xform_tile): New.
32408         (new_oacc_loop_raw): Initialize e_mask, adjust for ifns vector.
32409         (finish_oacc_loop): Adjust for ifns vector.
32410         (oacc_loop_discover_walk): Append loop abstraction sites to list,
32411         add case for GOACC_TILE fns.
32412         (oacc_loop_xform_loop): Delete.
32413         (oacc_loop_process): Iterate over call list directly, and add
32414         handling for GOACC_TILE fns.
32415         (oacc_loop_fixed_partitions): Determine default auto, deal with TILE,
32416         dump partitioning.
32417         (oacc_loop_auto_partitions): Add outer_assign parm. Assign all but
32418         vector partitioning to outer loops.  Assign 2 partitions to loops
32419         when available. Add TILE handling.
32420         (oacc_loop_partition): Adjust oacc_loop_auto_partitions call.
32421         (execite_oacc_device_lower): Process GOACC_TILE fns,
32422         ignore unknown specs.
32423         * tree-nested.c (convert_nonlocal_omp_clauses): Allow OMP_CLAUSE_TILE.
32424         * tree.c (omp_clause_num_ops): Adjust TILE ops.
32425         * tree.h (OMP_CLAUSE_TILE_ITERVAR, OMP_CLAUSE_TILE_COUNT): New.
32427 2017-02-09  Gerald Pfeifer  <gerald@pfeifer.com>
32429         * configure.ac (ACX_BUGURL): Update.
32430         * configure: Regenerate.
32432 2017-02-09  Richard Biener  <rguenther@suse.de>
32434         PR tree-optimization/69823
32435         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
32436         Properly enumerate all BBs in the region.  Use auto_vec/auto_bitmap.
32438 2017-02-09  Andrew Burgess  <andrew.burgess@embecosm.com>
32440         * config/arc/arc-c.def: Add __NPS400__ definition.
32441         * config/arc/arc.h (CPP_SPEC): Don't define __NPS400__ here.
32442         (TARGET_NPS400): Define.
32444 2017-02-09  Andrew Burgess  <andrew.burgess@embecosm.com>
32446         * config/arc/arc-arch.h (arc_arch_t): Move unchanged to earlier in
32447         file.
32448         (arc_cpu_t): Change base_architecture field, arch, to a arc_arc_t
32449         pointer, arch_info.
32450         (arc_cpu_types): Fill the arch_info field with a pointer into the
32451         arc_arch_types table.
32452         (arc_selected_cpu): Declare.
32453         * config/arc/arc.c (arc_selected_cpu): Make global.
32454         (arc_selected_arch): Delete.
32455         (arc_base_cpu): Delete.
32456         (arc_override_options): Remove references to deleted variables,
32457         update access to arch information.
32458         (ARC_OPT): Update access to arch information.
32459         (ARC_OPTX): Likewise.
32460         * config/arc/arc.h (arc_base_cpu): Remove declaration.
32461         (TARGET_ARC600): Update access to arch information.
32462         (TARGET_ARC601): Likewise.
32463         (TARGET_ARC700): Likewise.
32464         (TARGET_EM): Likewise.
32465         (TARGET_HS): Likewise.
32466         * config/arc/driver-arc.c (arc_cpu_to_as): Update access to arch
32467         information.
32469 2017-02-08  Pat Haugen  <pthaugen@us.ibm.com>
32471         PR target/78604
32472         * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Invert
32473         condition/operands for integer GE/LE/GEU/LEU operations.
32475 2017-02-08  Segher Boessenkool  <segher@kernel.crashing.org>
32477         PR translation/79397
32478         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Fix spelling
32479         of AltiVec.
32481 2017-02-08  Martin Jambor  <mjambor@suse.cz>
32483         PR ipa/79375
32484         * ipa-prop.c (ipa_alloc_node_params): Make static, return bool
32485         whether allocation happened.
32486         (ipa_initialize_node_params): Do not call ipa_alloc_node_params if
32487         nothing was allocated.
32489 2017-02-08  Jakub Jelinek  <jakub@redhat.com>
32491         PR tree-optimization/79408
32492         * tree-vrp.c (simplify_div_or_mod_using_ranges): If op1 is not
32493         constant, but SSA_NAME with a known integer range, use the minimum
32494         of that range instead of op1 to determine if modulo can be replaced
32495         with its first operand.
32497 2016-02-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
32499         * config/riscv/riscv.c (riscv_build_integer_1): Avoid use of INT16_MAX.
32501 2017-02-08  Richard Biener  <rguenther@suse.de>
32503         PR tree-optimization/71824
32504         * graphite-scop-detection.c (scop_detection::build_scop_breadth):
32505         Check all loops contained in the merged region.
32507 2017-02-07  Andrew Pinski  <apinski@cavium.com>
32509         * config/aarch64/aarch64.md (popcount<mode>2): New pattern.
32511 2017-02-07  Andrew Pinski  <apinski@cavium.com>
32513         * config/aarch64/aarch64-cores.def (thunderx): Disable LSE.
32514         (thunderxt88): Likewise.
32515         (thunderxt81): Disable LSE and change v8.1 to v8.
32516         (thunderxt83): Likewise.
32518 2017-02-07  Jakub Jelinek  <jakub@redhat.com>
32519             Richard Biener  <rguenther@suse.de>
32521         PR middle-end/79399
32522         * ira-int.h (struct target_ira_int): Change x_max_struct_costs_size
32523         type from int to size_t.
32524         * ira-costs.c (struct_costs_size): Change type from int to size_t.
32526 2017-02-07  Jakub Jelinek  <jakub@redhat.com>
32528         PR rtl-optimization/79386
32529         * cprop.c (bypass_conditional_jumps): Initialize
32530         bypass_last_basic_block already before splitting bbs after
32531         unconditional traps...
32532         (bypass_conditional_jumps): ... rather than here.
32534         PR target/79299
32535         * config/i386/sse.md (xtg_mode, gatherq_mode): New mode attrs.
32536         (*avx512f_gathersi<mode>, *avx512f_gathersi<mode>_2,
32537         *avx512f_gatherdi<mode>, *avx512f_gatherdi<mode>_2): Use them,
32538         fix -masm=intel patterns.
32540 2017-02-07  Richard Biener  <rguenther@suse.de>
32542         PR tree-optimization/79256
32543         PR middle-end/79278
32544         * builtins.c (get_object_alignment_2): Use min_align_of_type
32545         to extract alignment for MEM_REFs to honor BIGGEST_FIELD_ALIGNMENT
32546         and ADJUST_FIELD_ALIGN.
32548         * doc/tm.texi.in (ADJUST_FIELD_ALIGN): Adjust to take additional
32549         type parameter.
32550         * doc/tm.texi: Regenerate.
32551         * stor-layout.c (layout_decl): Adjust.
32552         (update_alignment_for_field): Likewise.
32553         (place_field): Likewise.
32554         (min_align_of_type): Likewise.
32555         * config/arc/arc.h (ADJUST_FIELD_ALIGN): Adjust.
32556         * config/epiphany/epiphany.h (ADJUST_FIELD_ALIGN): Likewise.
32557         * config/epiphany/epiphany.c (epiphany_adjust_field_align): Likewise.
32558         * config/frv/frv.h (ADJUST_FIELD_ALIGN): Likewise.
32559         * config/frv/frv.c (frv_adjust_field_align): Likewise.
32560         * config/i386/i386.h (ADJUST_FIELD_ALIGN): Likewise.
32561         * config/i386/i386.c (x86_field_alignment): Likewise.
32562         * config/rs6000/aix.h (ADJUST_FIELD_ALIGN): Likewise.
32563         * config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Likewise.
32564         * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
32565         * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
32566         * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Likewise.
32567         * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p):
32568          Likewise.
32570         Revert
32571         2017-01-30  Richard Biener  <rguenther@suse.de>
32573         PR tree-optimization/79256
32574         * targhooks.c (default_builtin_vector_alignment_reachable): Honor
32575         BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus
32576         alignment on TYPE.
32578 2017-02-07  Toma Tabacu  <toma.tabacu@imgtec.com>
32580         * config/mips/mips.c (mips_expand_builtin_insn): Convert the QImode
32581         argument of the pshufh, psllh, psllw, psrah, psraw, psrlh, psrlw
32582         builtins to SImode and emit a zero-extend, if necessary.
32584 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
32586         * docs/invoke.texi (RISC-V Options): Alphabetize.
32588 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
32590         * doc/invoke.texi (RISC-V Options): Use two spaces to separate
32591         options.
32593 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
32595         * config/riscv/riscv.c: New file.
32596         * common/config/riscv/riscv-common.c: Likewise.
32597         * config.gcc: Likewise.
32598         * config/riscv/constraints.md: Likewise.
32599         * config/riscv/elf.h: Likewise.
32600         * config/riscv/generic.md: Likewise.
32601         * config/riscv/linux.h: Likewise.
32602         * config/riscv/multilib-generator: Likewise.
32603         * config/riscv/peephole.md: Likewise.
32604         * config/riscv/pic.md: Likewise.
32605         * config/riscv/predicates.md: Likewise.
32606         * config/riscv/riscv-builtins.c: Likewise.
32607         * config/riscv/riscv-c.c: Likewise.
32608         * config/riscv/riscv-ftypes.def: Likewise.
32609         * config/riscv/riscv-modes.def: Likewise.
32610         * config/riscv/riscv-opts.h: Likewise.
32611         * config/riscv/riscv-protos.h: Likewise.
32612         * config/riscv/riscv.h: Likewise.
32613         * config/riscv/riscv.md: Likewise.
32614         * config/riscv/riscv.opt: Likewise.
32615         * config/riscv/sync.md: Likewise.
32616         * config/riscv/t-elf-multilib: Likewise.
32617         * config/riscv/t-linux: Likewise.
32618         * config/riscv/t-linux-multilib: Likewise.
32619         * config/riscv/t-riscv: Likewise.
32620         * configure.ac: Likewise.
32621         * doc/contrib.texi: Add Kito Cheng, Palmer Dabbelt, and Andrew
32622         Waterman as RISC-V maintainers.
32623         * doc/install.texi: Add RISC-V entries.
32624         * doc/invoke.texi: Add RISC-V options section.
32625         * doc/md.texi: Add RISC-V constraints section.
32626         * configure: Regenerated.
32628 2017-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
32630         PR target/66144
32631         * config/rs6000/vector.md (vcond<mode><mode>): Allow the true and
32632         false values to be constant vectors with all 0 or all 1 bits set.
32633         (vcondu<mode><mode>): Likewise.
32634         * config/rs6000/predicates.md (vector_int_reg_or_same_bit): New
32635         predicate.
32636         (fpmask_comparison_operator): Update comment.
32637         (vecint_comparison_operator): New predicate.
32638         * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Optimize
32639         vector conditionals when the true and false values are constant
32640         vectors with all 0 bits or all 1 bits set.
32642 2017-02-06  Martin Sebor  <msebor@redhat.com>
32644         PR  tree-optimization/79376
32645         * gimple-fold.c (get_range_strlen): Set the minimum length to zero.
32647 2017-02-06  Uros Bizjak  <ubizjak@gmail.com>
32649         * config/i386/sse.md (vector modes -> vec_extract* splitter): Use
32650         explicit subreg RTX with operand 1.  Use VECTOR_MODE_P predicate
32651         to simplify split condition.
32653 2017-02-06  Jakub Jelinek  <jakub@redhat.com>
32655         * omp-expand.c (oxpand_omp_atomic_fetch_op,
32656         expand_omp_atomic_pipeline): Return false if can_atomic_load_p is
32657         false.
32659 2017-02-06  Segher Boessenkool  <segher@kernel.crashing.org>
32661         PR rtl-optimization/68664
32662         * target.def (can_speculate_insn): New hook.
32663         * doc/tm.texi.in (TARGET_SCHED_CAN_SPECULATE_INSN): New hook.
32664         * doc/tm.texi: Regenerate.
32665         * sched-rgn.c (can_schedule_ready_p): Use the new hook.
32666         * config/rs6000/rs6000.c (TARGET_SCHED_CAN_SPECULATE_INSN): New macro.
32667         (rs6000_sched_can_speculate_insn): New function.
32669 2017-02-06  Jakub Jelinek  <jakub@redhat.com>
32671         PR tree-optimization/79284
32672         * tree-vectorizer.h (VECT_SCALAR_BOOLEAN_TYPE_P): Define.
32673         * tree-vect-stmts.c (vect_get_vec_def_for_operand,
32674         vectorizable_mask_load_store, vectorizable_operation,
32675         vect_is_simple_cond, get_same_sized_vectype): Use it instead
32676         of comparing TREE_CODE of a type against BOOLEAN_TYPE.
32677         * tree-vect-patterns.c (check_bool_pattern, search_type_for_mask_1,
32678         vect_recog_bool_pattern, vect_recog_mask_conversion_pattern): Likewise.
32679         * tree-vect-slp.c (vect_get_constant_vectors): Likewise.
32680         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
32681         Remove redundant gimple_code (stmt) == GIMPLE_ASSIGN test after
32682         is_gimple_assign (stmt).  Replace another such test with
32683         is_gimple_assign (stmt).
32685 2017-02-06  Georg-Johann Lay  <avr@gjlay.de>
32687         PR target/78883
32688         * config/avr/avr.c (rtl-iter.h): Include it.
32689         (TARGET_LEGITIMATE_COMBINED_INSN): New hook define...
32690         (avr_legitimate_combined_insn): ...and implementation.
32692 2017-02-06  Dominik Vogt  <vogt@linux.vnet.ibm.com>
32694         * config/s390/predicates.md ("larl_operand"): Use macros from hwint.h.
32695         * config/s390/s390.c (s390_const_operand_ok)
32696         (s390_canonicalize_comparison, s390_extract_part)
32697         (s390_single_part, s390_contiguous_bitmask_nowrap_p)
32698         (s390_contiguous_bitmask_p, s390_rtx_costs)
32699         (legitimize_pic_address): Likewise.
32700         * config/s390/s390.md ("clzdi2", "clztidi2"): Likewise.
32701         * config/s390/vx-builtins.md ("vec_genbytemaskv16qi")
32702         ("vec_permi<mode>", "vfae<mode>", "*vfaes<mode>", "vstrc<mode>")
32703         ("*vstrcs<mode>"): Use UINTVAL() to set unsigned HOST_WIDE_INT.
32704         * config/s390/vector.md ("vec_vfenes<mode>"): Likewise.
32706 2017-02-06  Georg-Johann Lay  <avr@gjlay.de>
32708         * config/avr/avr.md (*addhi3_zero_extend): Add alternative where
32709         REGNO($0) == REGNO($1).
32711 2017-02-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32713         * config/s390/linux.h(SIZE_TYPE): Add comment.
32715 2017-02-06  Julian Brown  <julian@codesourcery.com>
32716             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
32717             Virendra Pathak  <virendra.pathak@broadcom.com>
32719         * config/aarch64/aarch64-cores.def: Change the scheduler
32720         to Thunderx2t99.
32721         * config/aarch64/aarch64.md: Include thunderx2t99.md.
32722         * config/aarch64/thunderx2t99.md: New file.
32724 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
32726         * doc/standards.texi (Go Language): Update link to language
32727         standard.
32729 2017-02-05  Jan Hubicka  <hubicka@ucw.cz>
32731         * tree-eh.c (lower_resx): Sanitize profile.
32732         (cleanup_empty_eh_move_lp): Likewise.
32734 2017-02-05  Jan Hubicka  <hubicka@ucw.cz>
32736         PR tree-ssa/79347
32737         * cfgloopmanip.c (lv_adjust_loop_entry_edge, loop_version): Add
32738         ELSE_PROB.
32739         * cfgloopmanip.h (loop_version): Update prototype.
32740         * modulo-sched.c (sms_schedule): Update call of loop_version.
32741         * tree-if-conv.c(version_loop_for_if_conversion): Likewise.
32742         * tree-parloops.c (gen_parallel_loop): Likewise.
32743         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Likewise.
32744         * tree-ssa-loop-split.c (split_loop): Likewise.
32745         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Likewise.
32746         * tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
32748 2017-02-05  Martin Liska  <mliska@suse.cz>
32750         PR bootstrap/78985
32751         * config/s390/s390.c (s390_gimplify_va_arg): Initialize local
32752         variable to NULL.
32753         (print_operand_address): Initialize a struct to zero.
32755 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
32757         * doc/contrib.texi (Contributors): Refer to Hans Boehm's
32758         garbage collector only in textual form.
32760 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
32762         * doc/extend.texi (x86 specific memory model extensions for
32763         transactional memory): Simplify a phrase.
32765 2017-02-05  Eric Botcazou  <ebotcazou@adacore.com>
32767         PR target/79353
32768         * config/sparc/sync.md (atomic_loaddi_1): Replace 'U' constraint with
32769         'r', 'm' constraint with 'T' and !TARGET_ARCH64 with TARGET_ARCH32.
32770         (atomic_storedi_1): Likewise.
32772 2017-02-04  Jakub Jelinek  <jakub@redhat.com>
32774         PR tree-optimization/79338
32775         * tree-parloops.c (gather_scalar_reductions): Don't call
32776         vect_analyze_loop_form for loop->inner before destroying loop's
32777         loop_vinfo.
32779 2017-02-03  Martin Sebor  <msebor@redhat.com>
32781         PR tree-optimization/79327
32782         * gimple-ssa-sprintf.c (tree_digits): Avoid adding the base prefix
32783         when precision has resulted in leading zeros.
32784         (format_integer): Adjust the likely counter to assume an unknown
32785         argument that may be zero is non-zero.
32787 2017-02-03  Jason Merrill  <jason@redhat.com>
32789         PR c++/78689
32790         * tree-inline.c (copy_tree_body_r) [COND_EXPR]: Revert change to
32791         avoid copying non-taken branch.
32793 2017-02-03  Jakub Jelinek  <jakub@redhat.com>
32795         PR tree-optimization/79340
32796         * tree-vect-loop.c (vectorizable_reduction): Release
32797         vec_defs elements after safe_splicing them into other vectors.
32798         Formatting fixes.
32800         PR tree-optimization/79327
32801         * gimple-ssa-sprintf.c (adjust_range_for_overflow): If returning
32802         true, always set *argmin and *argmax to TYPE_{MIN,MAX}_VALUE of
32803         dirtype.
32804         (format_integer): Use wide_int_to_tree instead of build_int_cst
32805         + to_?hwi.  If argmin is NULL, just set argmin and argmax to
32806         TYPE_{MIN,MAX}_VALUE of argtype.  Simplify and fix computation
32807         of shortest and longest sequence.
32809 2017-02-03  Uros Bizjak  <ubizjak@gmail.com>
32811         * config/i386/i386.c (dimode_scalar_chain::convert_reg):
32812         Use pextrd for TARGET_SSE4_1 when creating scalar copy.
32814 2017-02-03  Walter Lee  <walt@tilera.com>
32816         PR target/78862
32817         * config/tilegx/tilegx.md (tilegx_expand_prologue): Add blockage
32818         after initial stackframe link reg save.
32819         * config/tilepro/tilepro.md (tilepro_expand_prologue): Likewise.
32821 2017-02-03  Jakub Jelinek  <jakub@redhat.com>
32823         PR target/79354
32824         * config/rs6000/rs6000.md (movsi_from_sf): Use wb constraint instead of
32825         wu for stxssp alternative.
32827 2017-02-03  Martin Sebor  <msebor@redhat.com>
32829         PR tree-optimization/79352
32830         * gimple-fold.c (get_range_strlen): Add argument.
32831         (get_range_strlen): Change return type to bool.
32832         (get_maxval_strlen): Pass in a dummy argument.
32833         * gimple-fold.h (get_range_strlen): Change return type to bool.
32834         * gimple-ssa-sprintf.c (get_string_length): Set unlikely counter.
32835         * tree.h (array_at_struct_end_p): Add argument.
32836         * tree.c (array_at_struct_end_p): Handle it.
32838 2017-02-03  Martin Liska  <mliska@suse.cz>
32840         PR lto/66295
32841         * multiple_target.c (create_dispatcher_calls): Redirect edge
32842         from a caller of a dispatcher.
32843         (expand_target_clones): Make the clones local.
32844         (ipa_target_clone): Do both target clones and resolvers.
32845         (ipa_dispatcher_calls): Remove the pass.
32846         (pass_dispatcher_calls::gate): Likewise.
32847         (make_pass_dispatcher_calls): Likewise.
32848         * passes.def (pass_target_clone): Put as very first IPA early
32849         pass.
32851 2017-02-03  Martin Liska  <mliska@suse.cz>
32853         * symtab.c (symtab_node::binds_to_current_def_p): Bail out
32854         in case of a function with ifunc attribute.
32856 2017-02-03  Martin Liska  <mliska@suse.cz>
32858         * cgraph.c (cgraph_node::dump): Dump function version info.
32859         * symtab.c (symtab_node::dump_base): Add missing new line.
32861 2017-02-02  Jan Hubicka  <hubicka@ucw.cz>
32863         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): New function.
32864         (ifcombine_ifandif): Use it.
32866 2017-02-03  Martin Liska  <mliska@suse.cz>
32868         * doc/invoke.texi: Document default value for
32869         use-after-scope-direct-emission-threshold.
32871 2017-02-03  Martin Liska  <mliska@suse.cz>
32873         PR tree-optimization/79339
32874         * gimple-ssa-sprintf.c (format_floating_max): Call mpfr_clear.
32875         (format_floating): Likewise.
32877 2017-02-03  Martin Liska  <mliska@suse.cz>
32879         PR ipa/79337
32880         * ipa-prop.c (ipa_node_params_t::insert): Remove current
32881         implementation.
32882         (ipa_node_params_t::remove): Likewise.
32883         * ipa-prop.h (ipa_node_params::ipa_node_params): Make default
32884         initialization from removed ipa_node_params_t::insert.
32885         (ipa_node_params::~ipa_node_params): Move from removed
32886         ipa_node_params_t::release.
32887         * symbol-summary.h (symbol_summary::m_released): New member.
32888         Do not release a summary twice.  Do not allow to call finalizer
32889         for types of a summary that live in GGC memory.
32891 2017-02-02  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
32893         * config/aarch64/aarch64.c (thunderx2t99_tunings): Enable AES and
32894         cmp_branch fusion.
32896 2017-02-02  Martin Sebor  <msebor@redhat.com>
32898         PR middle-end/79275
32899         * gimple-ssa-sprintf.c (get_string_length): Set lower bound to zero.
32900         (format_string): Tighten up the range of output for non-constant
32901         strings and correct the expected range for wide non-constant strings.
32903 2017-02-02  Martin Sebor  <msebor@redhat.com>
32905         * doc/invoke.texi (-maccumulate-args): Fix bad grammar.
32907         PR middle-end/32003
32908         * doc/invoke.texi (-fdump-tree-): Remove pass-specific options from
32909         index.
32910         (-fdump-tree-@var): Add to index and document how to come up
32911         with pass-specific option and dump file names.
32912         (-fdump-passes): Clarify where to look for output.
32914 2017-02-02  Jan Hubicka  <hubicka@ucw.cz>
32916         PR middle-end/77445
32917         * tree-ssa-threadbackward.c (profitable_jump_thread_path): Dump
32918         statistics of the analyzed path; allow threading for speed when
32919         any of BBs along the path are optimized for speed.
32921 2017-02-02  Eric Botcazou  <ebotcazou@adacore.com>
32923         PR middle-end/78468
32924         * emit-rtl.c (init_emit): Add ??? comment for problematic alignment
32925         settings of the virtual registers.
32927         Revert again
32928         2016-08-23  Dominik Vogt  <vogt@linux.vnet.ibm.com>
32930         * explow.c (get_dynamic_stack_size): Take known alignment of stack
32931         pointer + STACK_DYNAMIC_OFFSET into account when calculating the size
32932         needed.
32934 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32936         * config/s390/vx-builtins.md ("vec_ceil", "vec_floor")
32937         ("vec_trunc", "vec_roundc", "vec_round"): Remove expanders.
32939 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32941         * config/s390/s390.md: Add missing comments with the expanded
32942         mnemonics.
32943         * config/s390/vector.md: Likewise.
32944         * config/s390/vx-builtins.md: Likewise.
32946 2017-02-02  Jakub Jelinek  <jakub@redhat.com>
32948         PR target/79197
32949         * config/rs6000/rs6000.md (*fixuns_trunc<mode>di2_fctiduz): Rename to ...
32950         (fixuns_trunc<mode>di2): ... this, remove previous expander.  Put all
32951         conditions on a single line.
32953 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32955         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename
32956         __S390_VX__ to __VX__.
32958 2017-02-01  Andrew Pinski  <apinski@cavium.com>
32960         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost): Pass
32961         stmt_info to record_stmt_cost.
32962         (vect_get_known_peeling_cost): Pass stmt_info if known to
32963         record_stmt_cost.
32964         * config/aarch64/aarch64-protos.h (cpu_vector_cost): Split
32965         cpu_vector_cost field into
32966         scalar_int_stmt_cost and scalar_fp_stmt_cost.  Split vec_stmt_cost
32967         field into vec_int_stmt_cost and vec_fp_stmt_cost.
32968         * config/aarch64/aarch64.c (generic_vector_cost): Update for the
32969         splitting of scalar_stmt_cost and vec_stmt_cost.
32970         (thunderx_vector_cost): Likewise.
32971         (cortexa57_vector_cost): LIkewise.
32972         (exynosm1_vector_cost): Likewise.
32973         (xgene1_vector_cost): Likewise.
32974         (thunderx2t99_vector_cost): Improve after the splitting of the two
32975         fields.
32976         (aarch64_builtin_vectorization_cost): Update for the splitting of
32977         scalar_stmt_cost and vec_stmt_cost.
32979 2017-02-01  Torvald Riegel  <triegel@redhat.com>
32980             Richard Henderson  <rth@redhat.com>
32982         * builtins.c (fold_builtin_atomic_always_lock_free): Make "lock-free"
32983         conditional on existance of a fast atomic load.
32984         * optabs-query.c (can_atomic_load_p): New function.
32985         * optabs-query.h (can_atomic_load_p): Declare it.
32986         * optabs.c (expand_atomic_exchange): Always delegate to libatomic if
32987         no fast atomic load is available for the particular size of access.
32988         (expand_atomic_compare_and_swap): Likewise.
32989         (expand_atomic_load): Likewise.
32990         (expand_atomic_store): Likewise.
32991         (expand_atomic_fetch_op): Likewise.
32992         * testsuite/lib/target-supports.exp
32993         (check_effective_target_sync_int_128): Remove x86 because it provides
32994         no fast atomic load.
32995         (check_effective_target_sync_int_128_runtime): Likewise.
32997 2017-02-01  Richard Biener  <rguenther@suse.de>
32999         * graphite.c: Include tree-vectorizer.h for find_loop_location.
33000         (graphite_transform_loops): Provide opt-info for optimized nests.
33001         * tree-parloop.c (parallelize_loops): Provide opt-info for
33002         parallelized loops.
33004 2017-02-01  Richard Biener  <rguenther@suse.de>
33006         PR middle-end/79315
33007         * tree-cfg.c (move_stmt_op): Never set TREE_BLOCK when it
33008         was not set before.
33010 2017-02-01  Richard Biener  <rguenther@suse.de>
33012         PR tree-optimization/71824
33013         * graphite-scop-detection.c (scop_detection::build_scop_breadth):
33014         Verify the loops are valid in the merged SESE region.
33015         (scop_detection::can_represent_loop_1): Check analyzing the
33016         evolution of the number of iterations in the region succeeds.
33018 2017-01-31  Ian Lance Taylor  <iant@golang.org>
33020         * config/i386/i386.c (ix86_expand_split_stack_prologue): Add
33021         REG_ARGS_SIZE note to 32-bit push insns and call insn.
33023 2017-01-31  David Malcolm  <dmalcolm@redhat.com>
33025         PR preprocessor/79210
33026         * input.c (get_substring_ranges_for_loc): Replace line_width
33027         assertion with error-handling.
33029 2017-01-31  Richard Biener  <rguenther@suse.de>
33031         PR tree-optimization/77318
33032         * graphite-sese-to-poly.c (extract_affine): Fix assert.
33033         (create_pw_aff_from_tree): Take loop parameter.
33034         (add_condition_to_pbb): Pass loop of the condition to
33035         create_pw_aff_from_tree.
33037 2017-01-31  Jakub Jelinek  <jakub@redhat.com>
33039         * config/s390/s390.c (s390_asan_shadow_offset): New function.
33040         (TARGET_ASAN_SHADOW_OFFSET): Redefine.
33042 2017-01-31  Michael Meissner  <meissner@linux.vnet.ibm.com>
33044         PR target/78597
33045         PR target/79038
33046         * config/rs6000/rs6000-protos.h (convert_float128_to_int): Delete,
33047         no longer used.
33048         (convert_int_to_float128): Likewise.
33049         * config/rs6000/rs6000.c (convert_float128_to_int): Likewise.
33050         (convert_int_to_float128): Likewise.
33051         * config/rs6000/rs6000.md (UNSPEC_IEEE128_MOVE): Likewise.
33052         (UNSPEC_IEEE128_CONVERT): Likewise.
33053         (floatsi<mode>2, FLOAT128 iterator): Bypass calling
33054         rs6000_expand_float128_convert if we have IEEE 128-bit hardware.
33055         Use local variables for IBM extended format.
33056         (fix_trunc<mode>si2, FLOAT128 iterator): Likewise.
33057         (fix_trunc<mode>si2_fprs): Likewise.
33058         (fixuns_trunc<IEEE128:mode><SDI:mode>2): Likewise.
33059         (floatuns<IEEE128:mode>2, IEEE128 iterator): Likewise.
33060         (fix<uns>_<mode>si2_hw): Rework the IEEE 128-bt hardware support
33061         to know that we can now have integers of all sizes in vector
33062         registers.
33063         (fix<uns>_<mode>di2_hw): Likewise.
33064         (float<uns>_<mode>si2_hw): Likewise.
33065         (fix_<mode>si2_hw): Likewise.
33066         (fixuns_<mode>si2_hw): Likewise.
33067         (float<uns>_<mode>di2_hw): Likewise.
33068         (float_<mode>di2_hw): Likewise.
33069         (float_<mode>si2_hw): Likewise.
33070         (floatuns_<mode>di2_hw): Likewise.
33071         (floatuns_<mode>si2_hw): Likewise.
33072         (xscvqp<su>wz_<mode>): Delete, no longer used.
33073         (xscvqp<su>dz_<mode>): Likewise.
33074         (xscv<su>dqp_<mode>): Likewise.
33075         (ieee128_mfvsrd_64bit): Likewise.
33076         (ieee128_mfvsrd_32bit): Likewise.
33077         (ieee128_mfvsrwz): Likewise.
33078         (ieee128_mtvsrw): Likewise.
33079         (ieee128_mtvsrd_64bit): Likewise.
33080         (ieee128_mtvsrd_32bit): Likewise.
33082 2017-01-31  Martin Liska  <mliska@suse.cz>
33084         PR ipa/79285
33085         * ipa-prop.c (ipa_free_all_node_params): Call release method
33086         instead of ~sumbol_summary to not to trigger double times
33087         dtor of hash_map.
33089 2017-01-31  Aldy Hernandez  <aldyh@redhat.com>
33091         PR tree-optimization/71691
33092         * bitmap.h (class auto_bitmap): New.
33093         * tree-ssa-loop-unswitch.c (tree_may_unswitch_on): Call
33094         is_maybe_undefined instead of ssa_undefined_value_p.
33096 2017-01-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
33098         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename
33099         __S390_ARCH_LEVEL__ to __ARCH__.
33101 2017-01-31  Jakub Jelinek  <jakub@redhat.com>
33103         PR tree-optimization/79267
33104         * value-prof.c (gimple_ic): Only drop lhs for noreturn calls
33105         if should_remove_lhs_p is true.
33107 2017-01-30  Alexandre Oliva <aoliva@redhat.com>
33109         PR debug/63238
33110         * dwarf2out.c (clone_as_declaration): Drop DW_AT_alignment.
33111         (add_alignment_attribute): New.
33112         (base_type_die): Add alignment attribute.
33113         (subrange_type_die): Likewise.
33114         (modified_type_die): Likewise.
33115         (gen_array_type_die): Likewise.
33116         (gen_descr_array_type_die: Likewise.
33117         (gen_enumeration_type_die): Likewise.
33118         (gen_subprogram_die): Likewise.
33119         (gen_variable_die): Likewise.
33120         (gen_field_die): Likewise.
33121         (gen_ptr_to_mbr_type_die): Likewise.
33122         (gen_struct_or_union_type_die): Likewise.
33123         (gen_subroutine_type_die): Likewise.
33124         (gen_typedef_die): Likewise.
33125         (base_type_cmp): Compare alignment attribute.
33127 2017-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
33129         PR target/79170
33130         * config/rs6000/altivec.md (*setb_internal): Rename to setb_signed.
33131         (setb_unsigned) New pattern for setb with CCUNS.
33132         * config/rs6000/rs6000.c (expand_block_compare): Use a different
33133         subfc./subfe sequence to avoid overflow problems.  Generate a
33134         shorter sequence with cmpld/setb for power9.
33135         * config/rs6000/rs6000.md (subf<mode>3_carry_dot2): Add a new pattern
33136         for generating subfc. instruction.
33137         (cmpstrsi): Add TARGET_POPCNTD predicate as the generate sequence
33138         now uses this instruction.
33140 2017-01-30  Ian Lance Taylor  <iant@google.com>
33142         PR debug/79289
33143         * dwarf2out.c (gen_type_die_with_usage): When picking a variant
33144         for FUNCTION_TYPE/METHOD_TYPE, use the first matching one.
33146 2017-01-30  Martin Sebor  <msebor@redhat.com>
33148         * gimple-ssa-sprintf.c (fmtresult::adjust_for_width_or_precision):
33149         Move constant to the right of a relational operator.
33150         (get_mpfr_format_length, format_character, format_string): Ditto.
33151         (should_warn_p, maybe_warn): Same.
33153         * doc/invoke.texi (-Wformat-truncation=1): Fix typo.
33155 2017-01-30  Maxim Ostapenko  <m.ostapenko@samsung.com>
33157         PR lto/79061
33158         * asan.c (get_translation_unit_decl): Remove function.
33159         (asan_add_global): Force has_dynamic_init to zero in LTO mode.
33161 2017-01-30  Martin Liska  <mliska@suse.cz>
33163         PR gcov-profile/79259
33164         * opts.c (common_handle_option): Enable flag_ipa_bit_cp w/
33165         -fprofile-generate.
33167 2017-01-30  Martin Liska  <mliska@suse.cz>
33169         PR bootstrap/78985
33170         * config/aarch64/cortex-a57-fma-steering.c (func_fma_steering::analyze):
33171         Initialize variables with NULL value.
33173 2017-01-30  Richard Earnshaw  <rearnsh@arm.com>
33175         PR target/79260
33176         * config.gcc (arm*-*-*): Add arm/arm-flags.h and arm/arm-isa.h to
33177         tm_p_file.
33178         * arm/arm-protos.h: Don't directly include arm-flags.h and arm-isa.h.
33180 2017-01-30  Richard Biener  <rguenther@suse.de>
33182         PR tree-optimization/79276
33183         * tree-vrp.c (process_assert_insertions): Properly adjust common
33184         when removing a duplicate.
33186 2017-01-30  Richard Biener  <rguenther@suse.de>
33188         PR tree-optimization/79256
33189         * targhooks.c (default_builtin_vector_alignment_reachable): Honor
33190         BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus
33191         alignment on TYPE.
33192         * tree.c (build_aligned_type): Set TYPE_USER_ALIGN.
33194 2017-01-30  Dominik Vogt  <vogt@linux.vnet.ibm.com>
33196         PR target/79240
33197         * config/s390/s390.md ("*r<noxa>sbg_<mode>_srl_bitmask")
33198         ("*r<noxa>sbg_<mode>_sll_bitmask")
33199         ("*extzv_<mode>_srl<clobbercc_or_nocc>")
33200         ("*extzv_<mode>_sll<clobbercc_or_nocc>"):
33201         Use contiguous_bitmask_nowrap_operand.
33203 2017-01-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
33205         PR target/79268
33206         * config/rs6000/altivec.h (vec_xl): Revise #define.
33207         (vec_xst): Likewise.
33209 2017-01-27  Uros Bizjak  <ubizjak@gmail.com>
33211         * config/i386/i386.c (print_reg): Use REGNO instead of true_regnum.
33213 2017-01-27  Bernd Schmidt  <bschmidt@redhat.com>
33215         PR rtl-optimization/79194
33216         * cprop.c (one_cprop_pass): Move deletion of code after unconditional
33217         traps before call to bypass_conditional_jumps.
33219 2017-01-27  Vladimir Makarov  <vmakarov@redhat.com>
33221         PR tree-optimization/71374
33222         * lra-constraints.c (check_conflict_input_operands): New.
33223         (match_reload): Use it.
33225 2017-01-27  Vladimir Makarov  <vmakarov@redhat.com>
33227         PR target/79131
33228         * lra-assigns.c (find_hard_regno_for_1): Take endianess for into
33229         account to calculate conflict_set.
33231 2017-01-27  Bin Cheng  <bin.cheng@arm.com>
33233         PR rtl-optimization/78559
33234         * combine.c (try_combine): Discard REG_EQUAL and REG_EQUIV for
33235         other_insn in combine.
33237 2017-01-27  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
33239         * builtin-types.def: Use unsigned_char_type_node for BT_UINT8.  Use
33240         uint16_type_node for BT_UINT16.
33242 2017-01-27  David Malcolm  <dmalcolm@redhat.com>
33244         * doc/sourcebuild.texi (Testsuites): Add "GIMPLE Tests" and
33245         "RTL Tests" to menu.
33246         (GIMPLE Tests): New node.
33247         (RTL Tests): New node.
33249 2017-01-27  Richard Biener  <rguenther@suse.de>
33251         PR tree-optimization/79245
33252         * tree-loop-distribution.c (distribute_loop): Apply cost
33253         modeling also to detected patterns.
33255 2017-01-27  Richard Biener  <rguenther@suse.de>
33257         PR tree-optimization/71433
33258         * tree-vrp.c (register_new_assert_for): Revert earlier changes.
33259         (compare_assert_loc): New function.
33260         (process_assert_insertions): Sort and optimize assert locations
33261         to remove duplicates and push down identical assertions on
33262         edges to their destination block.
33264 2017-01-27  Richard Biener  <rguenther@suse.de>
33266         PR tree-optimization/79244
33267         * tree-vrp.c (remove_range_assertions): Forcefully propagate
33268         out SSA names even if abnormal.
33270 2017-01-27  Jakub Jelinek  <jakub@redhat.com>
33272         * realmpfr.h: Poison MPFR_RND{N,Z,U,D}.
33273         * gimple-ssa-sprintf.c (format_floating_max): Use GMP_RNDN
33274         instead of MPFR_RNDN.
33276 2017-01-27  Richard Earnshaw  <rearnsha@arm.com>
33278         PR target/79239
33279         * arm.c (arm_option_override): Don't call build_target_option_node
33280         until after doing all option overrides.
33281         (arm_valid_target_attribute_tree): Likewise.
33283 2017-01-27  Martin Liska  <mliska@suse.cz>
33285         * doc/invoke.texi (-fprofile-arcs): Document profiling support
33286         for {cd}tors and C++ {cd}tors.
33288 2017-01-27  Dominik Vogt  <vogt@linux.vnet.ibm.com>
33290         * config/s390/s390.md ("*setmem_long_and")
33291         ("*setmem_long_and_31z"): Use zero_extend instead of and.
33293 2017-01-26  Martin Sebor  <msebor@redhat.com>
33295         * gimple-ssa-sprintf.c (format_floating): Simplify the computation
33296         of precision.
33298 2017-01-26  Martin Sebor  <msebor@redhat.com>
33300         * gimple-ssa-sprintf.c (format_floating): Test HAVE_XFmode and
33301         HAVE_DFmode before using XFmode or DFmode.
33302         (parse_directive): Avoid using the z length modifier to avoid
33303         the ISO C++98 does not support the â€˜z’ gnu_printf length modifier.
33305         PR middle-end/78703
33306         * gimple-ssa-sprintf.c (adjust_for_width_or_precision): Change
33307         to accept adjustment as an array.
33308         (get_int_range): New function.
33309         (struct directive): Make width and prec arrays.
33310         (directive::set_width, directive::set_precision): Call get_int_range.
33311         (format_integer, format_floating): Handle width and precision ranges.
33312         (format_string, parse_directive): Same.
33314 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
33316         PR debug/79129
33317         * dwarf2out.c (generate_skeleton_bottom_up): For children with
33318         comdat_type_p set, just clone them, but keep the children in the
33319         original DIE.
33321         PR debug/78835
33322         * dwarf2out.c (prune_unused_types): Mark all functions with DIEs
33323         which have direct callers with -fvar-tracking-assignments enabled
33324         in the current TU.
33325         (resolve_addr): Avoid adding skeleton DIEs for DW_AT_call_origin
33326         inside of type units.
33328 2017-01-26  Martin Sebor  <msebor@redhat.com>
33330         PR middle-end/78703
33331         * gimple-ssa-sprintf.c (struct result_range): Add likely and
33332         unlikely counters.
33333         (struct format_result): Replace number_chars, number_chars_min,
33334         and number_chars_max with a single member of struct result_range.
33335         Remove bounded.
33336         (format_result::operator+=): Adjust.
33337         (struct fmtresult): Remove bounded.  Handle likely and unlikely
33338         counters.
33339         (fmtresult::adjust_for_width_or_precision): New function.
33340         (fmtresult:type_max_digits): New function.
33341         (bytes_remaining): Handle likely and unlikely counters.
33342         (min_bytes_remaining): Remove.
33343         (format_percent): Simplify.
33344         (format_integer, format_floating): Set likely and unlikely counters.
33345         (get_string_length, format_character, format_string): Same.
33346         (format_plain, should_warn_p): New function.
33347         (maybe_warn): Call should_warn_p.  Update diagnostic messages
33348         and handle those for all directives, including plain strings.
33349         (format_directive): Handle likely and unlikely counters.
33350         Remove unnecessary quoting from diagnostics.  Add an informational
33351         note.
33352         (add_bytes): Remove.
33353         (pass_sprintf_length::compute_format_length): Simplify.
33354         (try_substitute_return_value): Handle likely and unlikely counters.
33356 2017-01-26  Carl Love  <cel@us.ibm.com>
33358         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Remove
33359         bogus entries for the P8V_BUILTIN_VEC_VGBBD built-ins
33361 2017-01-26  Vladimir Makarov  <vmakarov@redhat.com>
33363         PR target/79131
33364         * lra-assigns.c (setup_live_pseudos_and_spill_after_risky): Take
33365         endianess for subregs into account.
33366         * lra-constraints.c (lra_constraints): Do risky transformations
33367         always on the first iteration.
33368         * lra-lives.c (check_pseudos_live_through_calls): Add arg
33369         last_call_used_reg_set.
33370         (process_bb_lives): Define and use last_call_used_reg_set.
33371         * lra.c (lra): Always continue after lra_constraints on the first
33372         iteration.
33374 2017-01-26  Kirill Yukhin  <kirill.yukhin@gmail.com>
33376         * gcc.target/i386/avx512bw-kshiftlq-2.c: Use unsigned long long
33377         constant.
33378         * gcc.target/i386/avx512bw-kshiftrq-2.c: Ditto.
33380 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
33382         * config/i386/avx512fintrin.h (_ktest_mask16_u8,
33383         _ktestz_mask16_u8, _ktestc_mask16_u8, _kadd_mask16): Move to ...
33384         * config/i386/avx512dqintrin.h (_ktest_mask16_u8,
33385         _ktestz_mask16_u8, _ktestc_mask16_u8, _kadd_mask16): ... here.
33386         * config/i386/i386-builtin.def (__builtin_ia32_ktestchi,
33387         __builtin_ia32_ktestzhi, __builtin_ia32_kaddhi): Use
33388         OPTION_MASK_ISA_AVX512DQ instead of OPTION_MASK_ISA_AVX512F.
33389         * config/i386/sse.md (SWI1248_AVX512BWDQ2): New mode iterator.
33390         (kadd<mode>, ktest<mode>): Use it instead of SWI1248_AVX512BWDQ.
33392 2017-01-26  Marek Polacek  <polacek@redhat.com>
33394         PR c/79199
33395         * fold-const.c (operand_equal_p) [COND_EXPR]: Use OP_SAME_WITH_NULL
33396         for the third operand.
33398 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
33400         PR middle-end/79236
33401         * omp-low.c (struct omp_context): Add simt_stmt field.
33402         (scan_omp_for): Return omp_context *.
33403         (scan_omp_simd): Set simt_stmt on the non-_simt_ SIMD
33404         context to the _simt_ SIMD stmt.
33405         (lower_omp_for): For combined SIMD with sibling _simt_
33406         SIMD, make sure to use the same decls in _looptemp_
33407         clauses as in the sibling.
33409 2017-01-26  David Sherwood  <david.sherwood@arm.com>
33411         PR middle-end/79212
33412         * gimplify.c (omp_notice_variable): Add GOVD_SEEN flag to variables in
33413         all contexts.
33415 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
33417         PR target/70465
33418         * reg-stack.c (emit_swap_insn): Instead of fld a; fld b; fxchg %st(1);
33419         emit fld b; fld a; if possible.
33421         * brig-builtins.def: Update copyright years.
33422         * config/arm/arm_acle_builtins.def: Update copyright years.
33424 2017-01-25  Michael Meissner  <meissner@linux.vnet.ibm.com>
33426         PR target/79179
33427         * config/rs6000/vsx.md (vsx_extract_<mode>_store): Use wY
33428         constraint instead of o for the stxsd instruction.
33430 2017-01-25  Carl Love  <cel@us.ibm.com>
33432         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Fix order
33433         of entries for ALTIVEC_BUILTIN_VEC_PACKS and P8V_BUILTIN_VEC_VGBBD.
33435 2017-01-25  Jonathan Wakely  <jwakely@redhat.com>
33437         * doc/invoke.texi (C++ Dialect Options): Fix typo.
33439 2017-01-25  Richard Biener  <rguenther@suse.de>
33441         PR tree-optimization/69264
33442         * target.def (vector_alignment_reachable): Improve documentation.
33443         * doc/tm.texi: Regenerate.
33444         * targhooks.c (default_builtin_vector_alignment_reachable): Simplify
33445         and add a comment.
33446         * tree-vect-data-refs.c (vect_supportable_dr_alignment): Revert
33447         earlier changes with respect to TYPE_USER_ALIGN.
33448         (vector_alignment_reachable_p): Likewise.  Improve dumping.
33450 2016-01-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
33452         PR target/79145
33453         * config/arm/arm.md (xordi3): Force constant operand into a register
33454         for TARGET_IWMMXT.
33456 2016-01-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
33458         * doc/invoke.texi (-fstore-merging): Correct default optimization
33459         levels at which it is enabled.
33460         (-O): Move -fstore-merging from list to...
33461         (-O2): ... Here.
33463 2017-01-25  Richard Biener  <rguenther@suse.de>
33465         PR debug/78363
33466         * omp-expand.c: Include debug.h.
33467         (expand_omp_taskreg): Make sure to generate early debug before
33468         outlining anything from a function.
33469         (expand_omp_target): Likewise.
33470         (grid_expand_target_grid_body): Likewise.
33472 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
33474         PR lto/79061
33475         * asan.c (get_translation_unit_decl): New function.
33476         (asan_add_global): Extract modules file name from globals
33477         TRANSLATION_UNIT_DECL name.
33479 2017-01-24  Eric Botcazou  <ebotcazou@adacore.com>
33481         PR target/77439
33482         * config/arm/arm.c (arm_function_ok_for_sibcall): Add back restriction
33483         for long calls with APCS frame and VFP.
33485 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
33487         * cfg.c (original_copy_tables_initialized_p): New function.
33488         * cfg.h (original_copy_tables_initialized_p): New decl.
33489         * cfgrtl.c (relink_block_chain): Guard the call to
33490         free_original_copy_tables with a call to
33491         original_copy_tables_initialized_p.
33492         * cgraph.h (symtab_node::native_rtl_p): New decl.
33493         * cgraphunit.c (symtab_node::native_rtl_p): New function.
33494         (symtab_node::needed_p): Don't assert for early assembly output
33495         for __RTL functions.
33496         (cgraph_node::finalize_function): Set "force_output" for __RTL
33497         functions.
33498         (cgraph_node::analyze): Bail out early for __RTL functions.
33499         (analyze_functions): Update assertion to support __RTL functions.
33500         (cgraph_node::expand): Bail out early for __RTL functions.
33501         * final.c (rest_of_clean_state): Don't call delete_tree_ssa for
33502         __RTL functions.
33503         * function.h (struct function): Update comment for field
33504         "pass_startwith".
33505         * gimple-expr.c: Include "tree-pass.h".
33506         (gimple_has_body_p): Return false for __RTL functions.
33507         * Makefile.in (OBJS): Add run-rtl-passes.o.
33508         * pass_manager.h (gcc::pass_manager::get_rest_of_compilation): New
33509         accessor.
33510         (gcc::pass_manager::get_clean_slate): New accessor.
33511         * passes.c: Include "insn-addr.h".
33512         (should_skip_pass_p): Add logging.  Update logic for running
33513         "expand" to be compatible with both __GIMPLE and __RTL.  Guard
33514         property-provider override so it is only done for gimple passes.
33515         Don't skip dfinit.
33516         (skip_pass): New function.
33517         (execute_one_pass): Call skip_pass when skipping passes.
33518         * read-md.c (md_reader::read_char): Support filtering
33519         the input to a subset of line numbers.
33520         (md_reader::md_reader): Initialize fields
33521         m_first_line and m_last_line.
33522         (md_reader::read_file_fragment): New function.
33523         * read-md.h (md_reader::read_file_fragment): New decl.
33524         (md_reader::m_first_line): New field.
33525         (md_reader::m_last_line): New field.
33526         * read-rtl-function.c (function_reader::create_function): Only
33527         create cfun if it doesn't already exist.  Set PROP_rtl on cfun's
33528         curr_properties.  Set DECL_INITIAL to a dummy block.
33529         (read_rtl_function_body_from_file_range): New function.
33530         * read-rtl-function.h (read_rtl_function_body_from_file_range):
33531         New decl.
33532         * run-rtl-passes.c: New file.
33533         * run-rtl-passes.h: New file.
33535 2017-01-24  Jeff Law  <law@redhat.com>
33537         * config/microblaze/microblaze.h (ASM_FORMAT_PRIVATE_NAME): Increase
33538         buffer size.
33540 2017-01-24  Bin Cheng  <bin.cheng@arm.com>
33542         PR tree-optimization/79159
33543         * tree-ssa-loop-niter.c (get_cst_init_from_scev): New function.
33544         (record_nonwrapping_iv): Improve boundary using above function if no
33545         value range information.
33547 2017-01-24  Pekka Jääskeläinen  <pekka@parmance.com>
33548             Martin Jambor  <mjambor@suse.cz>
33550         * brig-builtins.def: New file.
33551         * builtins.def (DEF_HSAIL_BUILTIN): New macro.
33552         (DEF_HSAIL_ATOMIC_BUILTIN): Likewise.
33553         (DEF_HSAIL_SAT_BUILTIN): Likewise.
33554         (DEF_HSAIL_INTR_BUILTIN): Likewise.
33555         (DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN): Likewise.
33556         * builtin-types.def (BT_INT8): New.
33557         (BT_INT16): Likewise.
33558         (BT_UINT8): Likewise.
33559         (BT_UINT16): Likewise.
33560         (BT_FN_ULONG): Likewise.
33561         (BT_FN_UINT_INT): Likewise.
33562         (BT_FN_UINT_ULONG): Likewise.
33563         (BT_FN_UINT_LONG): Likewise.
33564         (BT_FN_UINT_PTR): Likewise.
33565         (BT_FN_ULONG_PTR): Likewise.
33566         (BT_FN_INT8_FLOAT): Likewise.
33567         (BT_FN_INT16_FLOAT): Likewise.
33568         (BT_FN_UINT32_FLOAT): Likewise.
33569         (BT_FN_UINT16_FLOAT): Likewise.
33570         (BT_FN_UINT8_FLOAT): Likewise.
33571         (BT_FN_UINT64_FLOAT): Likewise.
33572         (BT_FN_UINT16_UINT32): Likewise.
33573         (BT_FN_UINT32_UINT16): Likewise.
33574         (BT_FN_UINT16_UINT16_UINT16): Likewise.
33575         (BT_FN_INT_PTR_INT): Likewise.
33576         (BT_FN_UINT_PTR_UINT): Likewise.
33577         (BT_FN_LONG_PTR_LONG): Likewise.
33578         (BT_FN_ULONG_PTR_ULONG): Likewise.
33579         (BT_FN_VOID_UINT64_UINT64): Likewise.
33580         (BT_FN_UINT8_UINT8_UINT8): Likewise.
33581         (BT_FN_INT8_INT8_INT8): Likewise.
33582         (BT_FN_INT16_INT16_INT16): Likewise.
33583         (BT_FN_INT_INT_INT): Likewise.
33584         (BT_FN_UINT_FLOAT_UINT): Likewise.
33585         (BT_FN_FLOAT_UINT_UINT): Likewise.
33586         (BT_FN_ULONG_UINT_UINT): Likewise.
33587         (BT_FN_ULONG_UINT_PTR): Likewise.
33588         (BT_FN_ULONG_ULONG_ULONG): Likewise.
33589         (BT_FN_UINT_UINT_UINT): Likewise.
33590         (BT_FN_VOID_UINT_PTR): Likewise.
33591         (BT_FN_UINT_UINT_PTR: Likewise.
33592         (BT_FN_UINT32_UINT64_PTR): Likewise.
33593         (BT_FN_INT_INT_UINT_UINT): Likewise.
33594         (BT_FN_UINT_UINT_UINT_UINT): Likewise.
33595         (BT_FN_UINT_UINT_UINT_PTR): Likewise.
33596         (BT_FN_UINT_ULONG_ULONG_UINT): Likewise.
33597         (BT_FN_ULONG_ULONG_ULONG_ULONG): Likewise.
33598         (BT_FN_LONG_LONG_UINT_UINT): Likewise.
33599         (BT_FN_ULONG_ULONG_UINT_UINT): Likewise.
33600         (BT_FN_VOID_UINT32_UINT64_PTR): Likewise.
33601         (BT_FN_VOID_UINT32_UINT32_PTR): Likewise.
33602         (BT_FN_UINT_UINT_UINT_UINT_UINT): Likewise.
33603         (BT_FN_UINT_FLOAT_FLOAT_FLOAT_FLOAT): Likewise.
33604         (BT_FN_ULONG_ULONG_ULONG_UINT_UINT): Likewise.
33605         * doc/frontends.texi: List BRIG FE.
33606         * doc/install.texi (Testing): Add BRIG tesring requirements.
33607         * doc/invoke.texi (Overall Options): Mention BRIG.
33608         * doc/standards.texi (Standards): Doucment BRIG HSA version.
33610 2017-01-24  Richard Biener  <rguenther@suse.de>
33612         PR translation/79208
33613         * ipa-devirt.c (odr_types_equivalent_p): Fix typo in diagnostic.
33615 2017-01-24  Martin Jambor  <mjambor@suse.cz>
33617         PR bootstrap/79198
33618         * ipa-prop.c (ipa_free_all_node_params): Call summary destructor.
33619         * ipa-prop.c (ipa_node_params_t::insert): Initialize fields known_csts
33620         and known_contexts.
33622 2017-01-24  Aldy Hernandez  <aldyh@redhat.com>
33624         PR middle-end/79123
33625         * gimple-ssa-warn-alloca.c (alloca_call_type): Make sure
33626         casts from signed to unsigned really don't have a range.
33628 2017-01-24  Markus Trippelsdorf  <markus@trippelsdorf.de>
33630         * gimple-ssa-sprintf.c (format_floating): Change MPFR_RNDx to
33631         GMP_RNDx for compatiblity.
33633 2017-01-24  Martin Liska  <mliska@suse.cz>
33635         PR bootstrap/79132
33636         * tree-ssa-reassoc.c (rewrite_expr_tree_parallel): Insert assert
33637         that would prevent us to call alloca with -1 as argument.
33639 2017-01-24  Jakub Jelinek  <jakub@redhat.com>
33641         * dwarf2out.c (output_compilation_unit_header, output_file_names):
33642         Avoid -Wformat-security warning.
33644 2017-01-23  Andrew Pinski  <apinski@cavium.com>
33646         * config/aarch64/aarch64.c (thunderx2t99_addrcost_table): Improve
33647         cost table.
33649 2017-01-23  Martin Sebor  <msebor@redhat.com>
33651         PR middle-end/78703
33652         * gimple-ssa-sprintf.c (warn_level): New global.
33653         (format_integer): Use it here and throughout the rest of the file.
33654         Use the same switch to compute sign as base.
33655         (maybe_warn): New function.
33656         (format_directive): Factor out warnings into maybe_warn.
33657         Add debugging output.  Use warn_level.
33658         (add_bytes): Use warn_level.
33659         (pass_sprintf_length::compute_format_length): Add debugging output.
33660         (try_substitute_return_value): Same.
33661         (pass_sprintf_length::handle_gimple_call): Set and use warn_level.
33663         PR middle-end/78703
33664         * gimple-ssa-sprintf.c (struct format_result): Remove constant member.
33665         (struct fmtresult, format_integer, format_floating): Adjust.
33666         (fmtresult::fmtresult): Set max correctly in two argument ctor.
33667         (get_string_length, format_string,format_directive): Same.
33668         (pass_sprintf_length::compute_format_length): Same.
33669         (try_substitute_return_value): Simplify slightly.
33671         PR middle-end/78703
33672         * gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust formatting.
33673         (fmtresult::operator+=): Outlined.
33674         (struct fmtresult): Add ctors.
33675         (struct conversion_spec): Rename...
33676         (struct directive): ...to this.  Add and remove data members.
33677         (directive::set_width, directive::set_precision): New functions.
33678         (format_percent): Use fmtresult ctor.
33679         (get_width_and_precision): Remove.
33680         (format_integer): Make naming changes.  Avoid computing width and
33681         precision.
33682         (format_floating): Same.  Adjust indentation.
33683         (format_character, format_none): New functions.
33684         (format_string): Moved character handling to format_character.
33685         (format_directive): Remove arguments, change return type.
33686         (parse_directive): New function.
33687         (pass_sprintf_length::compute_format_length): Move directive
33688         parsing to parse_directive.
33690 2017-01-23  Jakub Jelinek  <jakub@redhat.com>
33692         * tree.h (assign_assembler_name_if_neeeded): Rename to ...
33693         (assign_assembler_name_if_needed): ... this.
33694         * tree.c (assign_assembler_name_if_neeeded): Rename to ...
33695         (assign_assembler_name_if_needed): ... this.
33696         (free_lang_data_in_cgraph): Adjust callers.
33697         * cgraphunit.c (cgraph_node::analyze): Likewise.
33698         * omp-expand.c (expand_omp_taskreg, expand_omp_target):
33699         Likewise.
33701 2017-01-23  Richard Biener  <rguenther@suse.de>
33703         PR tree-optimization/79088
33704         PR tree-optimization/79188
33705         * tree-ssa-threadupdate.c (mark_threaded_blocks): Move code
33706         resetting loop bounds after last path deletion.  Reset loop
33707         bounds of the target loop, make code match the comments.
33708         * tree-ssa-threadbackwards.c (pass_early_thread_jumps::execute):
33709         Make sure loops need no fixups.
33711 2017-01-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>
33713         * config/rs6000/rs6000-builtin.def (VSIEDPF): Add scalar insert
33714         exponent support with double type for first argument.
33715         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Changed
33716         type returned by __builtin_vec_extract_sig,
33717         __builtin_vec_extract_sig_sp, and __builtin_vec_extract_sig_dp
33718         functions from "vector int" to "vector unsigned int" or from
33719         "vector long long int" to "vector unsigned long long int".
33720         Changed type returned by __builtin_vec_extract_exp,
33721         __builtin_vec_extract_exp_sp, and __builtin_vec_extract_exp_dp
33722         functions from "vector int" to "vector unsigned int" or from
33723         "vector long long int" to "vector unsigned long long int".
33724         Changed return type of __builtin_vec_test_data_class,
33725         __builtin_vec_test_data_class_sp, and
33726         __builtin_vec_test_data_class_dp from "vector int" to
33727         "vector bool int" or from "vector long long int" to "vector bool
33728         long long int" and changed second argument type from "unsigned
33729         int" to "int".  Added new overloaded function forms "vector float
33730         __builtin_vec_insert_exp (vector float, vector unsigned int)" and
33731         "vector float __builtin_vec_insert_exp_sp (vector float, vector
33732         unsigned int)" and "vector double __builtin_vec_insert_exp (vector
33733         double, vector unsigned long long int)" and "vector double
33734         __builtin_vec_insert_exp_dp (vector double, vector unsigned long
33735         long int)".  Changed return type of
33736         __builtin_scalar_test_data_class and
33737         __builtin_scalar_test_data_class_sp and
33738         __builtin_scalar_test_data_class_dp from "unsigned int" to "bool
33739         int" and changed second argument from "unsigned int" to "int".
33740         Changed type returned by __builtin_scalar_test_neg,
33741         __builtin_scalar_test_neg_sp, and __builtin_scalar_test_neg_dp
33742         from "int" to "bool int".  Added new overloaded function form
33743         "double __builtin_scalar_insert_exp (double, unsigned long long int)".
33744         * config/rs6000/vsx.md (xsiexpdpf): New insn for scalar insert
33745         exponent double-precision with floating point first argument.
33746         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
33747         documentation of scalar_test_data_class, scalar_test_neg,
33748         scalar_extract_sig, scalar_extract_exp, scalar_insert_exp,
33749         vector_extract_exp, vec_extract_sig, vec_insert_exp, and
33750         vec_test_data_class built-in functions to reflect refinements in
33751         their type signatures.
33753 2017-01-23  Andreas Tobler  <andreast@gcc.gnu.org>
33755         * config/aarch64/aarch64.c (aarch64_elf_asm_constructor): Increase
33756         size of buf.
33757         (aarch64_elf_asm_destructor): Likewise.
33759 2017-01-23  Bernd Schmidt  <bschmidt@redhat.com>
33761         PR rtl-optimization/78634
33762         * config/i386/i386.c (ix86_max_noce_ifcvt_seq_cost): New function.
33763         (TARGET_MAX_NOCE_IFCVT_SEQ_COST): Define.
33764         * ifcvt.c (noce_try_cmove): Add missing cost check.
33766         PR rtl-optimization/71724
33767         * combine.c (if_then_else_cond): Look for situations where it is
33768         beneficial to undo the work of one of the recursive calls.
33770 2017-01-23  Bin Cheng  <bin.cheng@arm.com>
33772         PR tree-optimization/70754
33773         * tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE.
33774         (reassociate_to_the_same_stmt): New parameter INSERT_BEFORE.  Insert
33775         combined stmt before it if not NULL.
33776         (combine_chains): Process refs reversely and compute dominance point
33777         for root ref.
33779 2017-01-23  Martin Liska  <mliska@suse.cz>
33781         PR tree-optimization/79196
33782         * tree-ssa-strlen.c (fold_strstr_to_memcmp): Rename to ...
33783         (fold_strstr_to_strncmp): ... this.  Fold the pattern to strncmp
33784         instead of memcmp.
33785         (strlen_optimize_stmt): Call the renamed function.
33787 2017-01-23  Michael Matz  <matz@suse.de>
33789         PR tree-optimization/78384
33790         * tree-ssa-loop-split.c (patch_loop_exit): Use correct edge.
33792 2017-01-23  Richard Biener  <rguenther@suse.de>
33794         PR tree-optimization/79186
33795         * tree-vrp.c (register_new_assert_for): Make sure we've seen
33796         both incoming edges before moving an assert.
33798 2017-01-23  Martin Jambor  <mjambor@suse.cz>
33800         * ipa-prop.c (load_from_param_1): Removed.
33801         (load_from_unmodified_param): Bits from load_from_param_1 put back
33802         here.
33803         (load_from_param): Removed.
33804         (compute_complex_assign_jump_func): Removed stmt2 and just replaced it
33805         with stmt.  Reverted back to use of load_from_unmodified_param.
33807 2017-01-23  Martin Jambor  <mjambor@suse.cz>
33809         PR ipa/79108
33810         * ipa-prop.h (ipa_param_descriptor): Anotate with with GTY(()).
33811         (ipa_node_params): Annotate with GTY((for_user)).  Make descriptors
33812         field a pointer to garbage collected vector, mark lattices and
33813         ipcp_orig_node with GTY((skip)).
33814         (ipa_get_param_count): Adjust to descriptors being a pointer.
33815         (ipa_get_param): Likewise.
33816         (ipa_get_type): Likewise.
33817         (ipa_get_param_move_cost): Likewise.
33818         (ipa_set_param_used): Likewise.
33819         (ipa_get_controlled_uses): Likewise.
33820         (ipa_set_controlled_uses): Likewise.
33821         (ipa_is_param_used): Likewise.
33822         (ipa_node_params_t): Move into garbage collector.  New methods insert
33823         and remove.
33824         (ipa_node_params_sum): Annotate wth GTY(()).
33825         (ipa_check_create_node_params): Adjust to ipa_node_params_sum being
33826         garbage collected.
33827         (ipa_load_from_parm_agg): Adjust declaration.
33828         * ipa-icf.c (param_used_p): Adjust to descriptors being a pointer.
33829         * ipa-profile.c (ipa_profile): Likewise.
33830         * ipa-prop.c (ipa_get_param_decl_index_1): Likewise.
33831         (ipa_populate_param_decls): Make descriptors parameter garbage
33832         collected.
33833         (ipa_dump_param): Adjust to descriptors being a pointer.
33834         (ipa_alloc_node_params): Likewise.
33835         (ipa_initialize_node_params): Likewise.
33836         (load_from_param_1): Make descriptors parameter garbage collected.
33837         (load_from_unmodified_param): Likewise.
33838         (load_from_param): Likewise.
33839         (ipa_load_from_parm_agg): Likewise.
33840         (ipa_node_params::~ipa_node_params): Removed.
33841         (ipa_free_all_node_params): Remove call to delete operator.
33842         (ipa_node_params_t::insert): New.
33843         (ipa_node_params_t::remove): Likewise.
33844         (ipa_node_params_t::duplicate): Adjust to descriptors being a pointer,
33845         copy known_csts and known_contexts vectors.
33846         (ipa_read_node_info): Adjust to descriptors being a pointer.
33847         (ipcp_modif_dom_walker): Make m_descriptors field garbage
33848         collected.
33849         (ipcp_transform_function): Make descriptors variable garbage
33850         collected.
33852 2017-01-23  Andrew Senkevich  <andrew.senkevich@intel.com>
33854         * config/i386/avx512bwintrin.h: Add k-mask test, kortest intrinsics.
33855         * config/i386/avx512dqintrin.h: Ditto.
33856         * config/i386/avx512fintrin.h: Ditto.
33857         * config/i386/i386.c: Handle new builtins.
33858         * config/i386/i386-builtin.def: Add new builtins.
33859         * config/i386/sse.md (ktest<mode>, kortest<mode>): New.
33860         (UNSPEC_KORTEST, UNSPEC_KTEST): New.
33862 2017-01-23  Jakub Jelinek  <jakub@redhat.com>
33863             Martin Liska  <mliska@suse.cz>
33865         * asan.h: Define ASAN_USE_AFTER_SCOPE_ATTRIBUTE.
33866         * asan.c (asan_expand_poison_ifn): Support stores and use
33867         appropriate ASAN report function.
33868         * internal-fn.c (expand_ASAN_POISON_USE): New function.
33869         * internal-fn.def (ASAN_POISON_USE): Declare.
33870         * tree-into-ssa.c (maybe_add_asan_poison_write): New function.
33871         (maybe_register_def): Create ASAN_POISON_USE when sanitizing.
33872         * tree-ssa-dce.c (eliminate_unnecessary_stmts): Remove
33873         ASAN_POISON calls w/o LHS.
33874         * tree-ssa.c (execute_update_addresses_taken): Create clobber
33875         for ASAN_MARK (UNPOISON, &x, ...) in order to prevent usage of a LHS
33876         from ASAN_MARK (POISON, &x, ...) coming to a PHI node.
33877         * gimplify.c (asan_poison_variables): Add attribute
33878         use_after_scope_memory to variables that really needs to live
33879         in memory.
33880         * tree-ssa.c (is_asan_mark_p): Do not rewrite into SSA when
33881         having the attribute.
33883 2017-01-23  Martin Liska  <mliska@suse.cz>
33885         * asan.c (create_asan_shadow_var): New function.
33886         (asan_expand_poison_ifn): Likewise.
33887         * asan.h (asan_expand_poison_ifn): New declaration.
33888         * internal-fn.c (expand_ASAN_POISON): Likewise.
33889         * internal-fn.def (ASAN_POISON): New builtin.
33890         * sanopt.c (pass_sanopt::execute): Expand
33891         asan_expand_poison_ifn.
33892         * tree-inline.c (copy_decl_for_dup_finish): Make function
33893         external.
33894         * tree-inline.h (copy_decl_for_dup_finish): Likewise.
33895         * tree-ssa.c (is_asan_mark_p): New function.
33896         (execute_update_addresses_taken): Rewrite local variables
33897         (identified just by use-after-scope as addressable) into SSA.
33899 2017-01-22  Gerald Pfeifer  <gerald@pfeifer.com>
33901         * doc/install.texi (Specific): opensource.apple.com uses https
33902         now. Remove trailing slash.
33904 2017-01-22  Gerald Pfeifer  <gerald@pfeifer.com>
33906         * README.Portability: Remove note on an Irix compatibility issue.
33908 2017-01-22  Dimitry Andric <dim@FreeBSD.org>
33910         * gcov.c (INCLUDE_ALGORITHM): Define.
33911         (INCLUDE_VECTOR): Define.
33912         No longer include <vector> and <algorithm> directly.
33914 2017-01-21  Gerald Pfeifer  <gerald@pfeifer.com>
33916         * doc/extend.texi (Thread-Local): Change www.akkadia.org reference
33917         to https.
33918         * doc/invoke.texi (Code Gen Options): Ditto.
33920 2017-01-21  Jan Hubicka  <hubicka@ucw.cz>
33922         PR lto/78407
33923         * cfg.c (update_bb_profile_for_threading): Fix updating of probablity.
33925 2017-01-21  Bernd Schmidt  <bschmidt@redhat.com>
33927         rtl-optimization/79125
33928         * cprop.c (local_cprop_pass): Handle cases where we make an
33929         unconditional trap.
33931 2017-01-20  Segher Boessenkool  <segher@kernel.crashing.org>
33933         PR target/61729
33934         PR target/77850
33935         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
33936         read from, for big endian.
33938 2017-01-20  Jiong Wang  <jiong.wang@arm.com>
33940         * config/aarch64/aarch64-builtins.c (aarch64_init_builtins): Register
33941         register pauth builtins for LP64 only.
33943 2017-01-20  Marek Polacek  <polacek@redhat.com>
33945         PR c/79152
33946         * gimplify.c (should_warn_for_implicit_fallthrough): Handle consecutive
33947         non-case labels.
33949 2017-01-20  Alexander Monakov  <amonakov@ispras.ru>
33951         * omp-expand.c (expand_omp_simd): Clear PROP_gimple_lomp_dev regardless
33952         of safelen status.
33953         * omp-offload.c (pass_omp_device_lower::gate): Use PROP_gimple_lomp_dev.
33954         * passes.c (dump_properties): Handle PROP_gimple_lomp_dev.
33955         * tree-inline.c (expand_call_inline): Propagate PROP_gimple_lomp_dev.
33957 2017-01-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
33959         PR target/71270
33960         * config/arm/arm.c (neon_valid_immediate): Reject vector constants
33961         in big-endian mode when they are not a single duplicated value.
33963 2017-01-20  Richard Biener  <rguenther@suse.de>
33965         * BASE-VER: Bump to 7.0.1.
33967 2017-01-20  Alexander Monakov  <amonakov@ispras.ru>
33969         * omp-low.c (omplow_simd_context): New struct.  Use it...
33970         (lower_rec_simd_input_clauses): ...here and...
33971         (lower_rec_input_clauses): ...here to hold common data.  Adjust all
33972         references to idx, lane, max_vf, is_simt.
33974 2017-01-20  Graham Markall  <graham.markall@embecosm.com>
33976         * config/arc/arc.h (LINK_SPEC): Use arclinux_nps emulation when
33977         mcpu=nps400.
33979 2017-01-20  Martin Jambor  <mjambor@suse.cz>
33981         * hsa.h: Renaed to hsa-common.h.  Adjusted a comment.
33982         * hsa.c: Renaed to hsa-common.c.  Change include of gt-hsa.h to
33983         gt-hsa-common.h.
33984         * Makefile.in (OBJS): Rename hsa.o to hsa-common.o.
33985         (GTFILES): Rename hsa.c to hsa-common.c.
33986         * hsa-brig.c: Change include of hsa.h to hsa-common.h.
33987         * hsa-dump.c: Likewise.
33988         * hsa-gen.c: Likewise.
33989         * hsa-regalloc.c: Likewise.
33990         * ipa-hsa.c: Likewise.
33991         * omp-expand.c: Likewise.
33992         * omp-low.c: Likewise.
33993         * toplev.c: Likewise.
33995 2017-01-20  Marek Polacek  <polacek@redhat.com>
33997         PR c/64279
33998         * doc/invoke.texi: Document -Wduplicated-branches.
33999         * fold-const.c (operand_equal_p): Handle MODIFY_EXPR, INIT_EXPR,
34000         COMPOUND_EXPR, PREDECREMENT_EXPR, PREINCREMENT_EXPR,
34001         POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, CLEANUP_POINT_EXPR, EXPR_STMT,
34002         STATEMENT_LIST, and RETURN_EXPR.  For non-pure non-const functions
34003         return 0 only when not OEP_LEXICOGRAPHIC.
34004         (fold_build_cleanup_point_expr): Use the expression
34005         location when building CLEANUP_POINT_EXPR.
34006         * tree-core.h (enum operand_equal_flag): Add OEP_LEXICOGRAPHIC.
34007         * tree.c (add_expr): Handle error_mark_node.
34009 2017-01-20  Martin Liska  <mliska@suse.cz>
34011         PR lto/69188
34012         * tree-profile.c (init_ic_make_global_vars): Do not call
34013         finalize_decl.
34014         (gimple_init_gcov_profiler): Likewise.
34016 2017-01-20  Martin Liska  <mliska@suse.cz>
34018         PR ipa/71190
34019         * cgraph.h (maybe_create_reference): Remove argument and
34020         update comment.
34021         * cgraphclones.c (cgraph_node::create_virtual_clone): Remove one
34022         argument.
34023         * ipa-cp.c (create_specialized_node): Likewise.
34024         * symtab.c (symtab_node::maybe_create_reference): Handle
34025         VAR_DECLs and ADDR_EXPRs and select ipa_ref_use type.
34027 2017-01-20  Martin Liska  <mliska@suse.cz>
34029         * read-rtl-function.c (function_reader::create_function): Use
34030         build_decl instread of build_decl_stat.
34032 2017-01-20  Andrew Senkevich  <andrew.senkevich@intel.com>
34034         * config/i386/avx512bwintrin.h: Add k-mask registers shift intrinsics.
34035         * config/i386/avx512dqintrin.h: Ditto.
34036         * config/i386/avx512fintrin.h: Ditto.
34037         * config/i386/i386-builtin-types.def: Add new types.
34038         * config/i386/i386.c: Handle new types.
34039         * config/i386/i386-builtin.def (__builtin_ia32_kshiftliqi)
34040         (__builtin_ia32_kshiftlihi, __builtin_ia32_kshiftlisi)
34041         (__builtin_ia32_kshiftlidi, __builtin_ia32_kshiftriqi)
34042         (__builtin_ia32_kshiftrihi, __builtin_ia32_kshiftrisi)
34043         (__builtin_ia32_kshiftridi): New.
34044         * config/i386/sse.md (k<code><mode>): Rename *k<code><mode>.
34046 2017-01-19  Segher Boessenkool  <segher@kernel.crashing.org>
34048         PR target/78875
34049         PR target/79140
34050         * config/rs6000/rs6000.c (TARGET_STACK_PROTECT_GUARD): Unconditionally
34051         define to rs6000_init_stack_protect_guard.
34052         (rs6000_init_stack_protect_guard): New function.
34054 2017-01-19  Matthew Fortune  <matthew.fortune@imgtec.com>
34055             Yunqiang Su  <yunqiang.su@imgtec.com>
34057         * config.gcc (supported_defaults): Add madd4.
34058         (with_madd4): Add validation.
34059         (all_defaults): Add madd4.
34060         * config/mips/mips.opt (mmadd4): New option.
34061         * config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
34062         mmadd4.
34063         (TARGET_CPU_CPP_BUILTINS): Add builtin_define for
34064         __mips_no_madd4.
34065         (ISA_HAS_UNFUSED_MADD4): Gate with mips_madd4.
34066         (ISA_HAS_FUSED_MADD4): Likewise.
34067         * doc/invoke.texi (-mmadd4): Document the new option.
34068         * doc/install.texi (--with-madd4): Document the new option.
34070 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
34072         * config/aarch64/aarch64-builtins.c (enum aarch64_builtins): New
34073         entries for AARCH64_PAUTH_BUILTIN_XPACLRI,
34074         AARCH64_PAUTH_BUILTIN_PACIA1716, AARCH64_PAUTH_BUILTIN_AUTIA1716.
34075         (aarch64_init_pauth_hint_builtins): New.
34076         (aarch64_init_builtins): Call aarch64_init_pauth_hint_builtins.
34077         (aarch64_expand_builtin): Expand new builtins.
34079 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
34081         * reg-notes.def (CFA_TOGGLE_RA_MANGLE): New reg-note.
34082         * combine-stack-adj.c (no_unhandled_cfa): Handle
34083         REG_CFA_TOGGLE_RA_MANGLE.
34084         * dwarf2cfi.c (dwarf2out_frame_debug): Handle REG_CFA_TOGGLE_RA_MANGLE.
34085         * config/aarch64/aarch64.c (aarch64_expand_prologue): Generates DWARF
34086         info for return address signing.
34087         (aarch64_expand_epilogue): Likewise.
34089 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
34091         * config/aarch64/aarch64-opts.h (aarch64_function_type): New enum.
34092         * config/aarch64/aarch64-protos.h
34093         (aarch64_return_address_signing_enabled): New declaration.
34094         * config/aarch64/aarch64.c (aarch64_return_address_signing_enabled):
34095         New function.
34096         (aarch64_expand_prologue): Sign return address before it's pushed onto
34097         stack.
34098         (aarch64_expand_epilogue): Authenticate return address fetched from
34099         stack.
34100         (aarch64_override_options): Sanity check for ILP32 and ISA level.
34101         (aarch64_attributes): New function attributes for "sign-return-address".
34102         * config/aarch64/aarch64.md (UNSPEC_AUTI1716, UNSPEC_AUTISP,
34103         UNSPEC_PACI1716, UNSPEC_PACISP, UNSPEC_XPACLRI): New unspecs.
34104         ("*do_return"): Generate combined instructions according to key index.
34105         ("<pauth_mnem_prefix>sp", "<pauth_mnem_prefix1716", "xpaclri"): New.
34106         * config/aarch64/iterators.md (PAUTH_LR_SP, PAUTH_17_16): New integer
34107         iterators.
34108         (pauth_mnem_prefix, pauth_hint_num_a): New integer attributes.
34109         * config/aarch64/aarch64.opt (msign-return-address=): New.
34110         * doc/extend.texi (AArch64 Function Attributes): Documents
34111         "sign-return-address=".
34112         * doc/invoke.texi (AArch64 Options): Documents "-msign-return-address=".
34114 2017-01-19  Matthew Fortune  <matthew.fortune@imgtec.com>
34116         * doc/invoke.texi: Add missing -mlxc1-sxc1 options to
34117         overall option summary.
34119 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
34121         * config/aarch64/aarch64-arches.def: New entry for "armv8.3-a".
34122         * config/aarch64/aarch64.h (AARCH64_FL_V8_3, AARCH64_FL_FOR_ARCH8_3,
34123         AARCH64_ISA_V8_3, TARGET_ARMV8_3): New.
34124         * doc/invoke.texi (AArch64 Options): Document "armv8.3-a".
34126 2017-01-19  Michael Meissner  <meissner@linux.vnet.ibm.com>
34128         * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Enable
34129         -mpower9-minmax by default for -mcpu=power9.
34130         (ISA_3_MASKS_IEEE): Require -mvsx-small-integer to enable IEEE
34131         128-bit floating point.
34133 2017-01-20  Alan Modra  <amodra@gmail.com>
34135         * config/rs6000/rs6000.md (cmpstrnsi, cmpstrsi): Fail if
34136         optimizing for size.
34138 2017-01-20  Alan Modra  <amodra@gmail.com>
34140         PR target/79144
34141         * config/rs6000/rs6000.c (expand_strn_compare): Get the asm name
34142         for strcmp and strncmp from corresponding builtin decl.
34144 2017-01-19  Uros Bizjak  <ubizjak@gmail.com>
34146         * config.gcc (x86_64-*-rtems*): Use i386/rtemself.h
34147         instead of i386/rtems-64.h.
34148         * config/i386/rtems-64.h: Remove.
34150 2017-01-19  Uros Bizjak  <ubizjak@gmail.com>
34152         PR target/78478
34153         Revert:
34154         2013-11-05  Uros Bizjak  <ubizjak@gmail.com>
34156         * config/i386/rtemself.h (LONG_DOUBLE_TYPE_SIZE): New define.
34158 2017-01-19  Tamar Christina  <tamar.christina@arm.com>
34160         * config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup):
34161         Change int to HOST_WIDE_INT.
34162         * config/aarch64/aarch64-protos.h
34163         (aarch64_simd_gen_const_vector_dup): Likewise.
34164         * config/aarch64/aarch64-simd.md: Add copysign<mode>3.
34166 2017-01-19  David Malcolm  <dmalcolm@redhat.com>
34168         * langhooks-def.h (lhd_type_for_size): New decl.
34169         (LANG_HOOKS_TYPE_FOR_SIZE): Define as lhd_type_for_size.
34170         * langhooks.c (lhd_type_for_size): New function, taken from
34171         lto_type_for_size.
34173 2017-01-19  Pat Haugen  <pthaugen@us.ibm.com>
34175         * config/rs6000/power9.md (power9-alu): Remove 'cmp' type and add
34176         define_bypass for CR latency.
34177         (power9-cracked-alu): Update bypass latency and remove power9-branch.
34178         (power9-alu2): Add define_bypass for CR latency.
34179         (power9-cmp): New.
34180         (power9-mul): Update insn latency.
34181         (power9-mul-compare): Update insn latency, bypass latency and remove
34182         power9-branch.
34184 2016-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
34186         * config/aarch64/aarch64-protos.h (aarch64_nopcrelative_literal_loads):
34187         Delete.
34188         * config/aarch64/aarch64.md
34189         (aarch64_reload_movcp<GPF_TF:mode><P:mode>): Delete reference to
34190         aarch64_nopcrelative_literal_loads.
34191         (aarch64_reload_movcp<VALL:mode><P:mode>): Likewise.
34193 2017-01-19  Chenghua Xu  <paul.hua.gm@gmail.com>
34195         * config/mips/mips.h (ISA_HAS_FUSED_MADD4): Enable for
34196         TARGET_LOONGSON_3A.
34197         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_LOONGSON_3A.
34199 2017-01-19  Doug Gilmore  <doug.gilmore@imgtec.com>
34201         PR target/78176
34202         * config.gcc (supported_defaults): Add lxc1-sxc1.
34203         (with_lxc1_sxc1): Add validation.
34204         (all_defaults): Add lxc1-sxc1.
34205         * config/mips/mips.opt (mlxc1-sxc1): New option.
34206         * config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
34207         mlxc1-sxc1.
34208         (TARGET_CPU_CPP_BUILTINS): Add builtin_define for
34209         __mips_no_lxc1_sxc1.
34210         (ISA_HAS_LXC1_SXC1): Gate with mips_lxc1_sxc1.
34211         * doc/invoke.texi (-mlxc1-sxc1): Document the new option.
34212         * doc/install.texi (--with-lxc1-sxc1): Document the new option.
34214 2017-01-19  Richard Biener  <rguenther@suse.de>
34216         PR tree-optimization/72488
34217         * tree-ssa-sccvn.c (run_scc_vn): When we abort the VN make
34218         sure to restore SSA info.
34219         * tree-ssa.c (verify_ssa): Verify SSA info is not shared.
34221 2017-01-19  Richard Earnshaw  <rearnsha@arm.com>
34223         PR rtl-optimization/79121
34224         * expr.c (expand_expr_real_2, case LSHIFT_EXPR): Look at the signedness
34225         of the inner type when shifting an extended value.
34227 2017-01-17  Jan Hubicka  <hubicka@ucw.cz>
34229         PR lto/78407
34230         * symtab.c (symtab_node::equal_address_to): Fix comparing of
34231         interposable aliases.
34233 2017-01-18  Peter Bergner  <bergner@vnet.ibm.com>
34235         PR target/78516
34236         * config/rs6000/spe.md (mov_si<mode>_e500_subreg0): Fix constraints.
34237         Use the evmergelohi instruction.
34238         (mov_si<mode>_e500_subreg4_2_le): Likewise.
34239         (mov_sitf_e500_subreg8_2_be): Likewise.
34240         (mov_sitf_e500_subreg12_2_le): Likewise.
34241         (mov_si<mode>_e500_subreg0_2_le): Fix constraints.
34242         (mov_si<mode>_e500_subreg4_2_be): Likewise.
34243         (mov_sitf_e500_subreg8_2_le): Likewise.
34244         (mov_sitf_e500_subreg12_2_be): Likewise.
34246 2017-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
34248         * config/rs6000/altivec.md (altivec_vbpermq): Change "type"
34249         attribute from vecsimple to vecperm.
34250         (altivec_vbpermq2): Likewise.
34252 2017-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
34254         PR target/79040
34255         * config/rs6000/altivec.h: Fix typo of vec_cntlz to vec_cnttz.
34257 2017-01-18  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
34258         * config/rs6000/rs6000-protos.h (expand_strn_compare): Add arg.
34259         * config/rs6000/rs6000.c (expand_strn_compare): Add ability to expand
34260         strcmp. Fix bug where comparison didn't stop with zero byte. Fix
34261         case where N arg is SIZE_MAX.
34262         * config/rs6000/rs6000.md (cmpstrnsi): Args to expand_strn_compare.
34263         (cmpstrsi): Add pattern.
34265 2017-01-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
34267         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
34268         __builtin_vec_revb builtins.
34269         * config/rs6000/rs6000-builtins.def (P9V_BUILTIN_XXBRQ_V16QI): Add
34270         built-in functions to support generation of the ISA 3.0 XXBR<x>
34271         vector byte reverse instructions.
34272         (P9V_BUILTIN_XXBRQ_V1TI): Likewise.
34273         (P9V_BUILTIN_XXBRD_V2DI): Likewise.
34274         (P9V_BUILTIN_XXBRD_V2DF): Likewise.
34275         (P9V_BUILTIN_XXBGW_V4SI): Likewise.
34276         (P9V_BUILTIN_XXBGW_V4SF): Likewise.
34277         (P9V_BUILTIN_XXBGH_V8HI): Likewise.
34278         (P9V_BUILTIN_VEC_REVB): Likewise.
34279         * config/rs6000/vsx.md (p9_xxbrq_v1ti): New insns/expanders to
34280         generate the ISA 3.0 XXBR<x> vector byte reverse instructions.
34281         (p9_xxbrq_v16qi): Likewise.
34282         (p9_xxbrd_<mode>, VSX_D iterator): Likewise.
34283         (p9_xxbrw_<mode>, VSX_W iterator): Likewise.
34284         (p9_xxbrh_v8hi): Likewise.
34285         * config/rs6000/altivec.h (vec_revb): Define if ISA 3.0.
34286         * doc/extend.texi (RS/6000 Altivec Built-ins): Document the
34287         vec_revb built-in functions.
34289 2017-01-18  Uros Bizjak  <ubizjak@gmail.com>
34291         PR rtl-optimization/78952
34292         * config/i386/i386.md (any_extract): New code iterator.
34293         (*insvqi_2): Use any_extract for source operand.
34294         (*insvqi_3): Use any_shiftrt for source operand.
34296 2017-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
34298         * config/aarch64/aarch64.c (aarch64_sched_adjust_priority)
34299         New function.
34300         (TARGET_SCHED_ADJUST_PRIORITY): Define target hook.
34302 2017-01-18  Matthias Klose  <doko@ubuntu.com>
34304         * doc/install.texi: Allow default for --with-target-bdw-gc-include.
34306 2016-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
34308         * config/rs6000/altivec.h (vec_bperm): Change #define.
34309         * config/rs6000/altivec.md (UNSPEC_VBPERMD): New enum constant.
34310         (altivec_vbpermq2): New define_insn.
34311         (altivec_vbpermd): Likewise.
34312         * config/rs6000/rs6000-builtin.def (VBPERMQ2): New monomorphic
34313         function interface.
34314         (VBPERMD): Likewise.
34315         (VBPERM): New polymorphic function interface.
34316         * config/rs6000/r6000-c.c (altivec_overloaded_builtins_table):
34317         Add entries for P9V_BUILTIN_VEC_VBPERM.
34318         * doc/extend.texi: Add interfaces for vec_bperm.
34320 2017-01-18  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34322         * config/s390/s390-c.c (s390_expand_overloaded_builtin): Downcase
34323         first letter of error messages.
34324         (s390_resolve_overloaded_builtin): Likewise.
34325         * config/s390/s390.c (s390_expand_builtin): Likewise.
34326         (s390_invalid_arg_for_unprototyped_fn): Likewise.
34327         (s390_valid_target_attribute_inner_p): Likewise.
34328         * config/s390/s390.md ("tabort"): Likewise.
34330 2017-01-18  Toma Tabacu  <toma.tabacu@imgtec.com>
34332         * config/mips/mips.h (ISA_HAS_DIV3): Remove unused macro.
34333         (ISA_AVOID_DIV_HILO): New macro.
34334         (ISA_HAS_DIV): Use new ISA_AVOID_DIV_HILO macro.
34335         (ISA_HAS_DDIV): Likewise.
34337 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
34339         * doc/invoke.texi (fabi-version): Correct number of occurrences.
34341 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
34343         * doc/invoke.texi (fabi-version): Spelling fix.
34345 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
34347         PR c++/70182
34348         * doc/invoke.texi (fabi-version): Mention mangling fix for
34349         operator names.
34351 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
34353         PR c++/77489
34354         * doc/invoke.texi (fabi-version): Document discriminator mangling.
34356 2017-01-17  Segher Boessenkool  <segher@kernel.crashing.org>
34358         PR target/78875
34359         * config/rs6000/rs6000-opts.h (stack_protector_guard): New enum.
34360         * config/rs6000/rs6000.c (rs6000_option_override_internal): Handle
34361         the new options.
34362         * config/rs6000/rs6000.md (stack_protect_set): Handle the new more
34363         flexible settings.
34364         (stack_protect_test): Ditto.
34365         * config/rs6000/rs6000.opt (mstack-protector-guard=,
34366         mstack-protector-guard-reg=, mstack-protector-guard-offset=): New
34367         options.
34368         * doc/invoke.texi (Option Summary) [RS/6000 and PowerPC Options]:
34369         Add -mstack-protector-guard=, -mstack-protector-guard-reg=, and
34370         -mstack-protector-guard-offset=.
34371         (RS/6000 and PowerPC Options): Ditto.
34373 2017-01-17  Uros Bizjak  <ubizjak@gmail.com>
34375         * config/i386/i386.h (MASK_CLASS_P): New define.
34376         * config/i386/i386.c (inline_secondary_memory_needed): Ensure that
34377         there are no registers from different register sets also when
34378         mask registers are used.  Update function comment.
34379         * config/i386/i386.md (*movsi_internal): Split (*k/*krm) alternative
34380         to (*k/*r) and (*k/*km) alternatives.
34382 2017-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
34384         * config/aarch64/aarch64.md (eh_return): Remove pattern and splitter.
34385         * config/aarch64/aarch64.h (AARCH64_EH_STACKADJ_REGNUM): Remove.
34386         (EH_RETURN_HANDLER_RTX): New define.
34387         * config/aarch64/aarch64.c (aarch64_frame_pointer_required):
34388         Force frame pointer in EH return functions.
34389         (aarch64_expand_epilogue): Add barrier for eh_return.
34390         (aarch64_final_eh_return_addr): Remove.
34391         (aarch64_eh_return_handler_rtx): New function.
34392         * config/aarch64/aarch64-protos.h (aarch64_final_eh_return_addr):
34393         Remove.
34394         (aarch64_eh_return_handler_rtx): New prototype.
34396 2017-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
34398         * config/rs6000/altivec.h (vec_rlmi): New #define.
34399         (vec_vrlnm): Likewise.
34400         (vec_rlnm): Likewise.
34401         * config/rs6000/altivec.md (UNSPEC_VRLMI): New UNSPEC enum value.
34402         (UNSPEC_VRLNM): Likewise.
34403         (VIlong): New mode iterator.
34404         (altivec_vrl<VI_char>mi): New define_insn.
34405         (altivec_vrl<VI_char>nm): Likewise.
34406         * config/rs6000/rs6000-builtin.def (VRLWNM): New monomorphic
34407         function entry.
34408         (VRLDNM): Likewise.
34409         (RLNM): New polymorphic function entry.
34410         (VRLWMI): New monomorphic function entry.
34411         (VRLDMI): Likewise.
34412         (RLMI): New polymorphic function entry.
34413         * config/rs6000/r6000-c.c (altivec_overloaded_builtin_table): Add
34414         new entries for P9V_BUILTIN_VEC_RLMI and P9V_BUILTIN_VEC_RLNM.
34415         * doc/extend.texi: Add description of vec_rlmi, vec_rlnm, and
34416         vec_vrlnm.
34418 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
34420         PR debug/78839
34421         * dwarf2out.c (field_byte_offset): Restore the
34422         PCC_BITFIELD_TYPE_MATTERS behavior for INTEGER_CST DECL_FIELD_OFFSET
34423         and DECL_FIELD_BIT_OFFSET.  Use fold_build2 instead of build2 + fold.
34424         (analyze_variants_discr, gen_variant_part): Use fold_build2 instead
34425         of build2 + fold.
34427 2017-01-17  Eric Botcazou  <ebotcazou@adacore.com>
34429         PR ada/67205
34430         * config/aarch64/aarch64.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define
34432 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
34434         PR debug/71669
34435         * dwarf2out.c (add_data_member_location_attribute): For constant
34436         offset bitfield emit for -gdwarf-5 DW_AT_data_bit_offset attribute
34437         instead of DW_AT_data_member_location, DW_AT_bit_offset and
34438         DW_AT_byte_size attributes.
34440 2017-01-17  Eric Botcazou  <ebotcazou@adacore.com>
34442         * config/rs6000/rs6000.c (rs6000_emit_move): Also use a TOC reference
34443         after forcing to constant memory when the code model is medium.
34445 2017-01-17  Julia Koval  <julia.koval@intel.com>
34447         PR target/76731
34448         * config/i386/avx512fintrin.h
34449         (_mm512_i32gather_ps): Change __addr type to void const*.
34450         (_mm512_mask_i32gather_ps): Ditto.
34451         (_mm512_i32gather_pd): Ditto.
34452         (_mm512_mask_i32gather_pd): Ditto.
34453         (_mm512_i64gather_ps): Ditto.
34454         (_mm512_mask_i64gather_ps): Ditto.
34455         (_mm512_i64gather_pd): Ditto.
34456         (_mm512_mask_i64gather_pd): Ditto.
34457         (_mm512_i32gather_epi32): Ditto.
34458         (_mm512_mask_i32gather_epi32): Ditto.
34459         (_mm512_i32gather_epi64): Ditto.
34460         (_mm512_mask_i32gather_epi64): Ditto.
34461         (_mm512_i64gather_epi32): Ditto.
34462         (_mm512_mask_i64gather_epi32): Ditto.
34463         (_mm512_i64gather_epi64): Ditto.
34464         (_mm512_mask_i64gather_epi64): Ditto.
34465         (_mm512_i32scatter_ps): Change __addr type to void*.
34466         (_mm512_mask_i32scatter_ps): Ditto.
34467         (_mm512_i32scatter_pd): Ditto.
34468         (_mm512_mask_i32scatter_pd): Ditto.
34469         (_mm512_i64scatter_ps): Ditto.
34470         (_mm512_mask_i64scatter_ps): Ditto.
34471         (_mm512_i64scatter_pd): Ditto.
34472         (_mm512_mask_i64scatter_pd): Ditto.
34473         (_mm512_i32scatter_epi32): Ditto.
34474         (_mm512_mask_i32scatter_epi32): Ditto.
34475         (_mm512_i32scatter_epi64): Ditto.
34476         (_mm512_mask_i32scatter_epi64): Ditto.
34477         (_mm512_i64scatter_epi32): Ditto.
34478         (_mm512_mask_i64scatter_epi32): Ditto.
34479         (_mm512_i64scatter_epi64): Ditto.
34480         (_mm512_mask_i64scatter_epi64): Ditto.
34481         * config/i386/avx512pfintrin.h
34482         (_mm512_mask_prefetch_i32gather_pd): Change __addr type to void const*.
34483         (_mm512_mask_prefetch_i32gather_ps): Ditto.
34484         (_mm512_mask_prefetch_i64gather_pd): Ditto.
34485         (_mm512_mask_prefetch_i64gather_ps): Ditto.
34486         (_mm512_prefetch_i32scatter_pd): Change __addr type to void*.
34487         (_mm512_prefetch_i32scatter_ps): Ditto.
34488         (_mm512_mask_prefetch_i32scatter_pd): Ditto.
34489         (_mm512_mask_prefetch_i32scatter_ps): Ditto.
34490         (_mm512_prefetch_i64scatter_pd): Ditto.
34491         (_mm512_prefetch_i64scatter_ps): Ditto.
34492         (_mm512_mask_prefetch_i64scatter_pd): Ditto.
34493         (_mm512_mask_prefetch_i64scatter_ps): Ditto.
34494         * config/i386/avx512vlintrin.h
34495         (_mm256_mmask_i32gather_ps): Change __addr type to void const*.
34496         (_mm_mmask_i32gather_ps): Ditto.
34497         (_mm256_mmask_i32gather_pd): Ditto.
34498         (_mm_mmask_i32gather_pd): Ditto.
34499         (_mm256_mmask_i64gather_ps): Ditto.
34500         (_mm_mmask_i64gather_ps): Ditto.
34501         (_mm256_mmask_i64gather_pd): Ditto.
34502         (_mm_mmask_i64gather_pd): Ditto.
34503         (_mm256_mmask_i32gather_epi32): Ditto.
34504         (_mm_mmask_i32gather_epi32): Ditto.
34505         (_mm256_mmask_i32gather_epi64): Ditto.
34506         (_mm_mmask_i32gather_epi64): Ditto.
34507         (_mm256_mmask_i64gather_epi32): Ditto.
34508         (_mm_mmask_i64gather_epi32): Ditto.
34509         (_mm256_mmask_i64gather_epi64): Ditto.
34510         (_mm_mmask_i64gather_epi64): Ditto.
34511         (_mm256_i32scatter_ps): Change __addr type to void*.
34512         (_mm256_mask_i32scatter_ps): Ditto.
34513         (_mm_i32scatter_ps): Ditto.
34514         (_mm_mask_i32scatter_ps): Ditto.
34515         (_mm256_i32scatter_pd): Ditto.
34516         (_mm256_mask_i32scatter_pd): Ditto.
34517         (_mm_i32scatter_pd): Ditto.
34518         (_mm_mask_i32scatter_pd): Ditto.
34519         (_mm256_i64scatter_ps): Ditto.
34520         (_mm256_mask_i64scatter_ps): Ditto.
34521         (_mm_i64scatter_ps): Ditto.
34522         (_mm_mask_i64scatter_ps): Ditto.
34523         (_mm256_i64scatter_pd): Ditto.
34524         (_mm256_mask_i64scatter_pd): Ditto.
34525         (_mm_i64scatter_pd): Ditto.
34526         (_mm_mask_i64scatter_pd): Ditto.
34527         (_mm256_i32scatter_epi32): Ditto.
34528         (_mm256_mask_i32scatter_epi32): Ditto.
34529         (_mm_i32scatter_epi32): Ditto.
34530         (_mm_mask_i32scatter_epi32): Ditto.
34531         (_mm256_i32scatter_epi64): Ditto.
34532         (_mm256_mask_i32scatter_epi64): Ditto.
34533         (_mm_i32scatter_epi64): Ditto.
34534         (_mm_mask_i32scatter_epi64): Ditto.
34535         (_mm256_i64scatter_epi32): Ditto.
34536         (_mm256_mask_i64scatter_epi32): Ditto.
34537         (_mm_i64scatter_epi32): Ditto.
34538         (_mm_mask_i64scatter_epi32): Ditto.
34539         (_mm256_i64scatter_epi64): Ditto.
34540         (_mm256_mask_i64scatter_epi64): Ditto.
34541         (_mm_i64scatter_epi64): Ditto.
34542         (_mm_mask_i64scatter_epi64): Ditto.
34543         * config/i386/i386-builtin-types.def (V16SF_V16SF_PCFLOAT_V16SI_HI_INT)
34544         (V8DF_V8DF_PCDOUBLE_V8SI_QI_INT, V8SF_V8SF_PCFLOAT_V8DI_QI_INT)
34545         (V8DF_V8DF_PCDOUBLE_V8DI_QI_INT, V16SI_V16SI_PCINT_V16SI_HI_INT)
34546         (V8DI_V8DI_PCINT64_V8SI_QI_INT, V8SI_V8SI_PCINT_V8DI_QI_INT)
34547         (V8DI_V8DI_PCINT64_V8DI_QI_INT, V2DF_V2DF_PCDOUBLE_V4SI_QI_INT)
34548         (V4DF_V4DF_PCDOUBLE_V4SI_QI_INT, V2DF_V2DF_PCDOUBLE_V2DI_QI_INT)
34549         (V4DF_V4DF_PCDOUBLE_V4DI_QI_INT, V4SF_V4SF_PCFLOAT_V4SI_QI_INT)
34550         (V8SF_V8SF_PCFLOAT_V8SI_QI_INT, V4SF_V4SF_PCFLOAT_V2DI_QI_INT)
34551         (V4SF_V4SF_PCFLOAT_V4DI_QI_INT, V2DI_V2DI_PCINT64_V4SI_QI_INT)
34552         (V4DI_V4DI_PCINT64_V4SI_QI_INT, V2DI_V2DI_PCINT64_V2DI_QI_INT)
34553         (V4DI_V4DI_PCINT64_V4DI_QI_INT, V4SI_V4SI_PCINT_V4SI_QI_INT)
34554         (V8SI_V8SI_PCINT_V8SI_QI_INT, V4SI_V4SI_PCINT_V2DI_QI_INT)
34555         (V4SI_V4SI_PCINT_V4DI_QI_INT, VOID_PFLOAT_HI_V16SI_V16SF_INT)
34556         (VOID_PFLOAT_QI_V8SI_V8SF_INT, VOID_PFLOAT_QI_V4SI_V4SF_INT)
34557         (VOID_PDOUBLE_QI_V8SI_V8DF_INT, VOID_PDOUBLE_QI_V4SI_V4DF_INT)
34558         (VOID_PDOUBLE_QI_V4SI_V2DF_INT, VOID_PFLOAT_QI_V8DI_V8SF_INT)
34559         (VOID_PFLOAT_QI_V4DI_V4SF_INT, VOID_PFLOAT_QI_V2DI_V4SF_INT)
34560         (VOID_PDOUBLE_QI_V8DI_V8DF_INT, VOID_PDOUBLE_QI_V4DI_V4DF_INT)
34561         (VOID_PDOUBLE_QI_V2DI_V2DF_INT, VOID_PINT_HI_V16SI_V16SI_INT)
34562         (VOID_PINT_QI_V8SI_V8SI_INT, VOID_PINT_QI_V4SI_V4SI_INT)
34563         (VOID_PLONGLONG_QI_V8SI_V8DI_INT, VOID_PLONGLONG_QI_V4SI_V4DI_INT)
34564         (VOID_PLONGLONG_QI_V4SI_V2DI_INT, VOID_PINT_QI_V8DI_V8SI_INT)
34565         (VOID_PINT_QI_V4DI_V4SI_INT, VOID_PINT_QI_V2DI_V4SI_INT)
34566         (VOID_PLONGLONG_QI_V8DI_V8DI_INT, VOID_QI_V8SI_PCINT64_INT_INT)
34567         (VOID_PLONGLONG_QI_V4DI_V4DI_INT, VOID_PLONGLONG_QI_V2DI_V2DI_INT)
34568         (VOID_HI_V16SI_PCINT_INT_INT, VOID_QI_V8DI_PCINT64_INT_INT)
34569         (VOID_QI_V8DI_PCINT_INT_INT): Remove.
34570         (V16SF_V16SF_PCVOID_V16SI_HI_INT,  V8DF_V8DF_PCVOID_V8SI_QI_INT)
34571         (V8SF_V8SF_PCVOID_V8DI_QI_INT, V8DF_V8DF_PCVOID_V8DI_QI_INT)
34572         (V16SI_V16SI_PCVOID_V16SI_HI_INT, V8DI_V8DI_PCVOID_V8SI_QI_INT)
34573         (V8SI_V8SI_PCVOID_V8DI_QI_INT, V8DI_V8DI_PCVOID_V8DI_QI_INT)
34574         (VOID_PVOID_HI_V16SI_V16SF_INT, VOID_PVOID_QI_V8SI_V8DF_INT)
34575         (VOID_PVOID_QI_V8DI_V8SF_INT, VOID_PVOID_QI_V8DI_V8DF_INT)
34576         (VOID_PVOID_HI_V16SI_V16SI_INT, VOID_PVOID_QI_V8SI_V8DI_INT)
34577         (VOID_PVOID_QI_V8DI_V8SI_INT, VOID_PVOID_QI_V8DI_V8DI_INT)
34578         (V2DF_V2DF_PCVOID_V4SI_QI_INT, V4DF_V4DF_PCVOID_V4SI_QI_INT)
34579         (V2DF_V2DF_PCVOID_V2DI_QI_INT, V4DF_V4DF_PCVOID_V4DI_QI_INT
34580         (V4SF_V4SF_PCVOID_V4SI_QI_INT, V8SF_V8SF_PCVOID_V8SI_QI_INT)
34581         (V4SF_V4SF_PCVOID_V2DI_QI_INT, V4SF_V4SF_PCVOID_V4DI_QI_INT)
34582         (V2DI_V2DI_PCVOID_V4SI_QI_INT, V4DI_V4DI_PCVOID_V4SI_QI_INT)
34583         (V2DI_V2DI_PCVOID_V2DI_QI_INT, V4DI_V4DI_PCVOID_V4DI_QI_INT)
34584         (V4SI_V4SI_PCVOID_V4SI_QI_INT, V8SI_V8SI_PCVOID_V8SI_QI_INT)
34585         (V4SI_V4SI_PCVOID_V2DI_QI_INT, V4SI_V4SI_PCVOID_V4DI_QI_INT)
34586         (VOID_PVOID_QI_V8SI_V8SF_INT, VOID_PVOID_QI_V4SI_V4SF_INT)
34587         (VOID_PVOID_QI_V4SI_V4DF_INT, VOID_PVOID_QI_V4SI_V2DF_INT)
34588         (VOID_PVOID_QI_V4DI_V4SF_INT, VOID_PVOID_QI_V2DI_V4SF_INT)
34589         (VOID_PVOID_QI_V4DI_V4DF_INT, VOID_PVOID_QI_V2DI_V2DF_INT)
34590         (VOID_PVOID_QI_V8SI_V8SI_INT, VOID_PVOID_QI_V4SI_V4SI_INT)
34591         (VOID_PVOID_QI_V4SI_V4DI_INT, VOID_PVOID_QI_V4SI_V2DI_INT)
34592         (VOID_PVOID_QI_V4DI_V4SI_INT, VOID_PVOID_QI_V2DI_V4SI_INT)
34593         (VOID_PVOID_QI_V4DI_V4DI_INT, VOID_PVOID_QI_V2DI_V2DI_INT)
34594         (VOID_QI_V8SI_PCVOID_INT_INT, VOID_HI_V16SI_PCVOID_INT_INT)
34595         (VOID_QI_V8DI_PCVOID_INT_INT): Add.
34596         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Adjust builtin
34597         definitions accordingly.
34599 2017-01-17  Kito Cheng  <kito.cheng@gmail.com>
34600             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
34602         PR target/79079
34603         * internal-fn.c (expand_mul_overflow): Use convert_modes instead of
34604         gen_lowpart.
34606 2017-01-17  Vladimir Makarov  <vmakarov@redhat.com>
34608         PR target/79058
34609         * ira-conflicts.c (ira_build_conflicts): Update total conflict
34610         hard regs for inner regno.
34612 2017-01-17  Martin Liska  <mliska@suse.cz>
34614         PR ipa/71207
34615         * ipa-polymorphic-call.c (contains_type_p): Fix wrong
34616         assumption and add comment.
34618 2017-01-17  Nathan Sidwell  <nathan@acm.org>
34620         * ipa-visibility.c (localize_node): New function, broken out of ...
34621         (function_and_variable_visibility): ... here. Call it.
34623 2017-01-17  Jan Hubicka  <hubicka@ucw.cz>
34625         PR middle-end/77445
34626         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges):
34627         correctly set frequency of oudgoing edge.
34628         (duplicate_thread_path): Fix profile updating.
34630 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
34632         PR other/79046
34633         * configure.ac: Add GCC_BASE_VER.
34634         * Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
34635         version from BASE-VER file.
34636         (CFLAGS-gcc.o): Add -DBASEVER=$(BASEVER_s).
34637         (gcc.o): Depend on $(BASEVER).
34638         * common.opt (dumpfullversion): New option.
34639         * gcc.c (driver_handle_option): Handle OPT_dumpfullversion.
34640         * doc/invoke.texi: Document -dumpfullversion.
34641         * doc/install.texi: Document --with-gcc-major-version-only.
34642         * configure: Regenerated.
34644 2017-01-17  Richard Biener  <rguenther@suse.de>
34646         PR tree-optimization/71433
34647         * tree-vrp.c (register_new_assert_for): Merge same asserts
34648         on all incoming edges.
34649         (process_assert_insertions_for): Handle insertions at the
34650         beginning of BBs.
34652 2017-01-17  Gerald Pfeifer  <gerald@pfeifer.com>
34654         * config/i386/cygwin.h (LIBGCJ_SONAME): Remove.
34655         * config/i386/mingw32.h (LIBGCJ_SONAME): Remove.
34657 2017-01-17  Kaz Kojima  <kkojima@gcc.gnu.org>
34659         PR target/78633
34660         * config/sh/sh.md (cmpeqsi_t+1): Call copy_rtx to avoid invalid
34661         RTL sharing.
34663 2017-01-17  Alan Modra  <amodra@gmail.com>
34665         PR target/79066
34666         * config/rs6000/rs6000.md (elf_high, elf_low): Disable when pic.
34667         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Don't allow
34668         symbolic stack limit when pic.
34670 2017-01-16  Martin Sebor  <msebor@redhat.com>
34672         PR tree-optimization/78608
34673         * gimple-ssa-sprintf.c (tree_digits): Avoid negating TYPE_MIN.
34675 2017-01-16  Jeff Law  <law@redhat.com>
34677         Revert:
34678         2016-12-02  Tadek Kijkowski  <tkijkowski@gmail.com>
34679         * Makefile.in (PREPROCESSOR_DEFINES): Add a level of indirection
34680         for several include directories that may be relative to sysroot.
34681         * config/i386/x-mingw32 (gplus_includedir): Define.
34682         (gplus_tool_includedir, gplus_backward_include_dir): Likewise.
34683         (native_system_includedir): Likewise.
34684         * config/i386/mingw32.h (STANDARD_STARTFILE_PREFIX_1): Do not
34685         override if TARGET_SYSTEM_ROOT is defined.
34686         (NATIVE_SYSTEM_HEADER_DIR): Likewise.
34688         PR tree-optimization/79090
34689         PR tree-optimization/33562
34690         PR tree-optimization/61912
34691         PR tree-optimization/77485
34692         * tree-ssa-dse.c (compute_trims): Accept STMT argument.  Dump STMT
34693         and computed trims into the dump file.
34695 2017-01-17  Uros Bizjak  <ubizjak@gmail.com>
34697         * config/i386/i386.h (LIMIT_RELOAD_CLASS): Remove.
34699 2017-01-16  Jakub Jelinek  <jakub@redhat.com>
34701         PR c/79089
34702         * gimplify.c (gimplify_init_constructor): If want_value and
34703         object == lhs, unshare lhs to avoid invalid tree sharing.  Formatting
34704         fix.
34706         PR target/79080
34707         * loop-doloop.c (doloop_modify): Call unshare_all_rtl_in_chain on
34708         sequence.  Formatting fixes.
34709         (doloop_optimize): Formatting fixes.
34711         PR driver/49726
34712         * gcc.c (debug_level_greater_than_spec_func): New function.
34713         (static_spec_functions): Add debug-level-gt spec function.
34714         (ASM_DEBUG_SPEC, cpp_options): Use %:debug-level-gt(0) instead of
34715         !g0.
34716         * config/darwin.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
34717         * config/darwin9.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
34718         * common.opt (g, gcoff, gdwarf, gdwarf-, ggdb, gno-pubnames,
34719         gpubnames, ggnu-pubnames, gno-record-gcc-switches,
34720         grecord-gcc-switches, gno-strict-dwarf, gstrict-dwarf, gstabs,
34721         gstabs+, gtoggle, gvms, gxcoff, gxcoff+): Add Driver flag.
34723 2017-01-16  Uros Bizjak  <ubizjak@gmail.com>
34725         * config/i386/i386.h (HARD_REGNO_CALLER_SAVE_MODE): Apply HImode and
34726         QImode fixups to general and mask registers only.
34728 2017-01-16  Carl Love  <cel@us.ibm.com>
34730         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Add support
34731         for built-in functions
34732         vector signed char vec_nabs (vector signed char)
34733         vector signed short vec_nabs (vector signed short)
34734         vector signed int vec_nabs (vector signed int)
34735         vector signed long long vec_nabs (vector signed long long)
34736         vector float vec_nabs (vector float)
34737         vector double vec_nabs (vector double)
34738         * config/rs6000/rs6000-builtin.def: Add definitions for NABS functions
34739         and NABS overload.
34740         * config/rs6000/altivec.md: New define_expand nabs<mode>2 types
34741         * config/rs6000/altivec.h: New define for vec_nabs built-in function.
34742         * doc/extend.texi: Update the documentation file for the new built-in
34743         functions.
34745 2017-01-16  Martin Sebor  <msebor@redhat.com>
34747         * gimple-ssa-sprintf.c (format_directive): Correct a typo in a warning
34748         message.
34750 2017-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
34752         * config/rs6000/rs6000.c (rtx_is_swappable_p): Change
34753         UNSPEC_VSX__XXSPLTD to require special splat handling.
34755 2017-01-16  David Malcolm  <dmalcolm@redhat.com>
34757         PR bootstrap/78616
34758         * system.h: Poison strndup.
34760 2017-01-16  Alan Modra  <amodra@gmail.com>
34762         PR target/79098
34763         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Don't
34764         use a switch.
34766 2017-01-16  Georg-Johann Lay  <avr@gjlay.de>
34768         * config/avr/avr.h (BRANCH_COST) [reload_completed]: Increase by 4.
34770 2017-01-15  Uros Bizjak  <ubizjak@gmail.com>
34772         * config/i386/i386.c (ix86_legitimate_combined_insn): Do not
34773         call recog here.  Assert that INSN_CODE (insn) is non-negative.
34775 2017-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
34777         PR target/72749
34778         * cfgrtl.c (rtl_split_edge): Also patch jump insns that jump to the
34779         fallthrough.
34780         * haifa-sched.c (dump_insn_stream): Don't crash if there is a label
34781         in the currently scheduled RTL fragment.
34783 2017-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
34785         PR rtl-optimization/78751
34786         * ifcvt.c (find_cond_trap): If we generated a non-existing insn,
34787         give up.
34789 2017-01-14  Jeff Law  <law@redhat.com>
34791         PR tree-optimization/79090
34792         * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject zero length and
34793         variable length stores.
34794         (compute_trims): Delete dead assignment to *trim_tail.
34795         (dse_dom_walker::dse_optimize_stmt): Optimize mem* calls with
34796         zero length.
34798 2017-01-14  Bernd Schmidt  <bschmidt@redhat.com>
34800         PR rtl-optimization/78626
34801         PR rtl-optimization/78727
34802         * cprop.c (one_cprop_pass): Collect unconditional traps in the middle
34803         of a block, and split such blocks after everything else is finished.
34805 2017-01-14  Alan Modra  <amodra@gmail.com>
34807         PR target/72749
34808         * combine.c (recog_for_combine_1): Set INSN_CODE before calling
34809         target legitimate_combined_insn.
34810         * config/rs6000/rs6000.c (TARGET_LEGITIMATE_COMBINED_INSN): Define.
34811         (rs6000_legitimate_combined_insn): New function.
34812         * config/rs6000/rs6000.md (UNSPEC_DOLOOP): Delete, and remove
34813         all uses.
34814         (ctr<mode>_internal3): Rename from *ctr<mode>_internal5.
34815         (ctr<mode>_internal4): Rename from *ctr<mode>_internal6.
34816         (ctr<mode>_internal1, ctr<mode>_internal2): Remove '*' from name.
34818 2017-01-14  Gerald Pfeifer  <gerald@pfeifer.com>
34820         * doc/frontends.texi (G++ and GCC): Remove references to Java.
34822 2017-01-13  Jeff Law  <law@redhat.com>
34824         PR tree-optimization/33562
34825         PR tree-optimization/61912
34826         PR tree-optimization/77485
34827         * tree-ssa-dse.c (delete_dead_call): Accept gsi rather than
34828         a statement.
34829         (delete_dead_assignment): Likewise.
34830         (dse_dom_walker::dse_optimize_stmt): Pass in the gsi rather than
34831         statement to delete_dead_call and delete_dead_assignment.
34833 2017-01-13  David Malcolm  <dmalcolm@redhat.com>
34835         PR c/78304
34836         * substring-locations.c (format_warning_va): Strengthen case 1 so
34837         that both endpoints of the substring must be within the format
34838         range for just the substring to be printed.
34840 2017-01-13  Uros Bizjak  <ubizjak@gmail.com>
34842         * config/i386/i386.opt (msgx): Use ix86_isa_flags2 variable.
34843         * config/i386/i386.c (ix86_target_string): Add missing options
34844         to isa_opts and reorder options by implied ISAs.  Rename isa_opts2 to
34845         isa2_opts, ix86_flag_opts to flag2_opts, ix86_target_other to
34846         flags_other and ix86_target_other to flags2_other.  Display unknown
34847         isa2 options.
34848         (ix86_valid_target_attribute_inner_p): Add missing options and
34849         reorder options by implied ISAs, as in ix86_target_string.
34851 2017-01-13  Richard Sandiford  <richard.sandiford@arm.com>
34853         * hash-table.h (hash_table::too_empty_p): New function.
34854         (hash_table::expand): Use it.
34855         (hash_table::traverse): Likewise.
34856         (hash_table::empty_slot): Use sizeof (value_type) instead of
34857         sizeof (PTR) to convert bytes to elements.  Shrink the table
34858         if the current size is excessive for the current number of
34859         elements.
34861 2017-01-13  Richard Sandiford  <richard.sandiford@arm.com>
34863         * ira-costs.c (record_reg_classes): Break from the inner loop
34864         early once alt_fail is known to be true.  Update outer loop
34865         handling accordingly.
34867 2017-01-13  Jeff Law  <law@redhat.com>
34869         * tree-ssa-dse.c (decrement_count): New function.
34870         (increment_start_addr, maybe_trim_memstar_call): Likewise.
34871         (dse_dom_walker::optimize_stmt): Call maybe_trim_memstar_call directly
34872         when we know the partially dead statement is a mem* function.
34874         PR tree-optimization/61912
34875         PR tree-optimization/77485
34876         * tree-ssa-dse.c: Include expr.h.
34877         (maybe_trim_constructor_store): New function.
34878         (maybe_trim_partially_dead_store): Call maybe_trim_constructor_store.
34880         PR tree-optimization/33562
34881         PR tree-optimization/61912
34882         PR tree-optimization/77485
34883         * doc/invoke.texi: Document new dse-max-object-size param.
34884         * params.def (PARM_DSE_MAX_OBJECT_SIZE): New PARAM.
34885         * tree-ssa-dse.c: Include params.h.
34886         (dse_store_status): New enum.
34887         (initialize_ao_ref_for_dse): New, partially extracted from
34888         dse_optimize_stmt.
34889         (valid_ao_ref_for_dse, normalize_ref): New.
34890         (setup_live_bytes_from_ref, compute_trims): Likewise.
34891         (clear_bytes_written_by, maybe_trim_complex_store): Likewise.
34892         (maybe_trim_partially_dead_store): Likewise.
34893         (maybe_trim_complex_store): Likewise.
34894         (dse_classify_store): Renamed from dse_possibly_dead_store_p.
34895         Track what bytes live from the original store.  Return tri-state
34896         for dead, partially dead or live.
34897         (dse_dom_walker): Add constructor, destructor and new private members.
34898         (delete_dead_call, delete_dead_assignment): New extracted from
34899         dse_optimize_stmt.
34900         (dse_optimize_stmt): Make a member of dse_dom_walker.
34901         Use initialize_ao_ref_for_dse.
34903         PR tree-optimization/33562
34904         PR tree-optimization/61912
34905         PR tree-optimization/77485
34906         * sbitmap.h (bitmap_count_bits): Prototype.
34907         (bitmap_clear_range, bitmap_set_range): Likewise.
34908         * sbitmap.c (bitmap_clear_range): New function.
34909         (bitmap_set_range, sbitmap_popcount, bitmap_count_bits): Likewise.
34911 2017-01-13  Martin Liska  <mliska@suse.cz>
34913         PR ipa/79043
34914         * function.c (set_cfun): Add new argument force.
34915         * function.h (set_cfun): Likewise.
34916         * ipa-inline-transform.c (inline_call): Use the function when
34917         strict alising from is dropped for function we inline to.
34919 2017-01-13  Richard Biener  <rguenther@suse.de>
34921         * tree-pretty-print.c (dump_generic_node): Fix inverted condition
34922         for dumping GIMPLE INTEGER_CSTs.
34924 2017-01-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
34926         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define __STDC_VERSION__
34927         to 201112L since C++17.
34929 2017-01-13  Maxim Ostapenko  <m.ostapenko@samsung.com>
34931         PR sanitizer/78887
34932         * asan.c (asan_needs_odr_indicator_p): Don't emit ODR indicators
34933         if -fsanitize=kernel-address is present.
34935 2017-01-13  Richard Biener  <rguenther@suse.de>
34937         * tree-pretty-print.c (dump_generic_node): Dump INTEGER_CSTs
34938         as _Literal ( type ) number in case usual suffixes do not
34939         preserve all information.
34941 2017-01-13  Richard Biener  <rguenther@suse.de>
34943         PR tree-optimization/77283
34944         * gimple-ssa-split-paths.c: Include gimple-ssa.h, tree-phinodes.h
34945         and ssa-iterators.h.
34946         (is_feasible_trace): Implement a cost model based on joiner
34947         PHI node uses.
34949 2017-01-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
34951         PR target/79004
34952         * config/rs6000/rs6000.md (FP_ISA3): Do not optimize converting
34953         char or short to __float128/_Float128 directly.
34955 2017-01-12  Martin Sebor  <msebor@redhat.com>
34957         to -Wformat-overflow.
34958         * gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust.
34959         (min_bytes_remaining): Same.
34960         (get_string_length): Same.
34961         (format_string): Same.
34962         (format_directive): Same.
34963         (add_bytes): Same.
34964         (pass_sprintf_length::handle_gimple_call): Same.
34966 2017-01-12  Jakub Jelinek  <jakub@redhat.com>
34968         * gimple-ssa-sprintf.c (try_substitute_return_value): Remove
34969         info.nowrite calls with no lhs that can't throw.  Return bool
34970         whether gsi_remove has been called or not.
34971         (pass_sprintf_length::handle_gimple_call): Return bool whether
34972         try_substitute_return_value called gsi_remove.  Formatting fix.
34973         (pass_sprintf_length::execute): Don't use gsi_remove if
34974         handle_gimple_call returned true.
34976         PR bootstrap/79069
34977         * cfgrtl.c (rtl_tidy_fallthru_edge): For any_uncondjump_p that can't
34978         be removed due to side-effects, don't remove following barrier nor
34979         turn the successor edge into fallthru edge.
34981 2017-01-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
34983         PR target/79044
34984         * config/rs6000/rs6000.c (insn_is_swappable_p): Mark
34985         element-reversing loads and stores as not swappable.
34987 2017-01-12  Nathan Sidwell  <nathan@acm.org>
34988             Nicolai Stange  <nicstange@gmail.com>
34990         * combine.c (try_combine): Don't ignore result of overlap checking
34991         loop.  Combine overlap & asm check into single loop.
34993 2017-01-12  Richard Biener  <rguenther@suse.de>
34995         * tree-pretty-print.c (dump_generic_node): Provide -gimple
34996         variant for MEM_REF.  Sanitize INTEGER_CST for -gimple.
34998 2017-01-12  Richard Biener  <rguenther@suse.de>
35000         * tree.c (initialize_tree_contains_struct): Make TS_OPTIMIZATION
35001         and TS_TARGET_OPTION directly derive from TS_BASE.
35002         * tree-core.h (tree_optimization_option): Derive from tree_base.
35003         (tree_target_option): Likewise.
35005 2017-01-11  Uros Bizjak  <ubizjak@gmail.com>
35007         * config/i386/i386.c (memory_address_length): Increase len
35008         only when rip_relative_addr_p returns false.
35010 2017-01-11  Julia Koval  <julia.koval@intel.com>
35012         * common/config/i386/i386-common.c (OPTION_MASK_ISA_SGX_UNSET): New.
35013         (OPTION_MASK_ISA_SGX_SET): New.
35014         (ix86_handle_option): Handle OPT_msgx.
35015         * config.gcc: Added sgxintrin.h.
35016         * config/i386/driver-i386.c (host_detect_local_cpu): Detect sgx.
35017         * config/i386/i386-c.c (ix86_target_macros_internal): Define __SGX__.
35018         * config/i386/i386.c (ix86_target_string): Add -msgx.
35019         (PTA_SGX): New.
35020         (ix86_option_override_internal): Handle new options.
35021         (ix86_valid_target_attribute_inner_p): Add sgx.
35022         * config/i386/i386.h (TARGET_SGX, TARGET_SGX_P): New.
35023         * config/i386/i386.opt: Add msgx.
35024         * config/i386/sgxintrin.h: New file.
35025         * config/i386/x86intrin.h: Add sgxintrin.h.
35027 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
35029         PR c++/71537
35030         * fold-const.c (maybe_nonzero_address): Return 1 for function
35031         local objects.
35032         (tree_single_nonzero_warnv_p): Don't handle function local objects
35033         here.
35035         PR c++/72813
35036         * gcc.c (default_compilers): Don't add -o %g.s for -S -save-temps
35037         of c-header.
35039 2017-01-11  David Malcolm  <dmalcolm@redhat.com>
35041         PR driver/78877
35042         * opts.c: Include "spellcheck.h"
35043         (struct string_fragment): New struct.
35044         (struct edit_distance_traits<const string_fragment &>): New
35045         struct.
35046         (get_closest_sanitizer_option): New function.
35047         (parse_sanitizer_options): Offer suggestions for unrecognized arguments.
35049 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
35051         * dwarf2out.c (DWARF_COMPILE_UNIT_HEADER_SIZE): For DWARF5 decrease
35052         by 12.
35053         (DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE): Always
35054         DWARF_COMPILE_UNIT_HEADER_SIZE plus 12.
35055         (DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE): Define.
35056         (calc_base_type_die_sizes): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE
35057         for initial die_offset if dwarf_split_debug_info.
35058         (output_comp_unit): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE for
35059         initial next_die_offset if dwo_id is non-NULL.  Don't emit padding
35060         fields.
35061         (output_skeleton_debug_sections): Formatting fix.  Use
35062         DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE instead of
35063         DWARF_COMPILE_UNIT_HEADER_SIZE.  Don't emit padding.
35065 2017-01-11  Wilco Dijkstra  <wdijkstr@arm.com>
35067         * config/arm/cortex-a53.md: Add bypasses for
35068         cortex_a53_r2f_cvt.
35069         (cortex_a53_r2f): Only use for transfers.
35070         (cortex_a53_f2r): Likewise.
35071         (cortex_a53_r2f_cvt): Add reservation for conversions.
35072         (cortex_a53_f2r_cvt): Likewise.
35074 2017-01-11  Tamar Christina  <tamar.christina@arm.com>
35076         * config/arm/arm_neon.h: Add __artificial__ and gnu_inline
35077         to all inlined functions, change static to extern.
35079 2017-01-11  Christophe Lyon  <christophe.lyon@linaro.org>
35081         PR target/78253
35082         * config/arm/arm.c (legitimize_pic_address): Handle reference to
35083         weak symbol.
35084         (arm_assemble_integer): Likewise.
35086 2017-01-11  Richard Earnshaw  <rearnsha@arm.com>
35088         * config.gcc: Use new awk script to check CPU, FPU and architecture
35089         parameters for --with-... options.
35090         * config/arm/parsecpu.awk: New file
35091         * config/arm/arm-cpus.in: New file.
35092         * config/arm/arm-opts.h: Include arm-cpu.h instead of processing .def
35093         files.
35094         * config/arm/arm.c: Include arm-cpu-data.h instead of processing .def
35095         files.
35096         * config/arm/t-arm: Update dependency rules.
35097         * common/config/arm/arm-common.c: Include arm-cpu-cdata.h instead
35098         of processing .def files.
35099         * config/arm/genopt.sh: Deleted.
35100         * config/arm/gentune.sh: Deleted.
35101         * config/arm/arm-cores.def: Deleted.
35102         * config/arm/arm-arches.def: Deleted.
35103         * config/arm/arm-fpus.def: Deleted.
35104         * config/arm/arm-tune.md: Regenerated.
35105         * config/arm/arm-tables.opt: Regenerated.
35106         * config/arm/arm-cpu.h: New generated file.
35107         * config/arm/arm-cpu-data.h: New generated file.
35108         * config/arm/arm-cpu-cdata.h: New generated file.
35110 2017-01-11  Maxim Ostapenko  <m.ostapenko@samsung.com>
35112         PR lto/79042
35113         * lto-cgraph.c (lto_output_varpool_node): Pack dynamically_initialized
35114         bit.
35115         (input_varpool_node): Unpack dynamically_initialized bit.
35117 2017-01-11  Eric Botcazou  <ebotcazou@adacore.com>
35119         PR rtl-optimization/79032
35120         * lra-constraints.c (simplify_operand_subreg): In the MEM case, test
35121         the alignment of the adjusted memory reference against that of MODE,
35122         instead of the alignment of the original memory reference.
35124 2017-01-11  Martin Jambor  <mjambor@suse.cz>
35126         * hsa.c (hsa_callable_function_p): Revert addition of DECL_ARTIFICIAL
35127         test.
35128         * ipa-hsa.c (process_hsa_functions): Only duplicate non-artificial
35129         decorated functions.
35131 2017-01-11  Richard Biener  <rguenther@suse.de>
35133         * tree-vrp.c (evrp_dom_walker::before_dom_children): Also
35134         set range/nonnull info for PHI results.  Do not set it on
35135         stmts marked for removal.
35137 2017-01-10  Eric Botcazou  <ebotcazou@adacore.com>
35139         * expr.c (store_field): In the bitfield case, fetch the return value
35140         from the registers before applying a single big-endian adjustment.
35141         Always do a final load for a BLKmode value not larger than a word.
35143 2017-01-10  David Malcolm  <dmalcolm@redhat.com>
35145         PR c++/77949
35146         * input.c (selftest::test_accessing_ordinary_linemaps): Verify
35147         that we correctly handle column numbers greater than
35148         LINE_MAP_MAX_COLUMN_NUMBER.
35150 2017-01-10  Martin Sebor  <msebor@redhat.com>
35152         PR middle-end/78245
35153         * gimple-ssa-sprintf.c (get_destination_size): Call
35154         {init,fini}object_sizes.
35155         * tree-object-size.c (addr_object_size): Adjust.
35156         (pass_through_call): Adjust.
35157         (pass_object_sizes::execute): Adjust.
35158         * tree-object-size.h (fini_object_sizes): Declare.
35160 2017-01-10  Martin Sebor  <msebor@redhat.com>
35162         PR tree-optimization/78775
35163         * builtins.c (get_size_range): Move...
35164         * calls.c: ...to here.
35165         (alloc_max_size): Accept zero argument.
35166         (operand_signed_p): Remove.
35167         (maybe_warn_alloc_args_overflow): Call get_size_range.
35168         * calls.h (get_size_range): Declare.
35170 2017-01-10  Joe Seymour  <joe.s@somniumtech.com>
35172         * config/msp430/driver-msp430.c (msp430_mcu_data): Sync with data
35173         from TI's devices.csv file as of September 2016.
35174         * config/msp430/msp430.c (msp430_mcu_data): Likewise.
35176 2017-01-10  Sandra Loosemore  <sandra@codesourcery.com>
35178         * doc/extend.texi: Tweak formatting to fix overfull hbox warnings.
35179         * doc/invoke.texi: Likewise.
35180         * doc/md.texi: Likewise.
35181         * doc/objc.texi: Likewise.
35183 2017-01-10  Joshua Conner  <joshconner@google.com>
35185         * config/arm/fuchsia-elf.h: New file.
35186         * config/fuchsia.h: New file.
35187         * config.gcc (*-*-fuchsia*): Set native_system_header_dir.
35188         (aarch64*-*-fuchsia*, arm*-*-fuchsia*, x86_64-*-fuchsia*): Add to
35189         targets.
35190         * config.host: (aarch64*-*-fuchsia*, arm*-*-fuchsia*): Add to hosts.
35192 2016-01-10  Richard Biener  <rguenther@suse.de>
35194         PR tree-optimization/79034
35195         * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
35196         Propagate out degenerate PHIs in the joiner.
35198 2017-01-10  Martin Liska  <mliska@suse.cz>
35200         * ipa-icf.c (sort_sem_items_by_decl_uid): New function.
35201         (sort_congruence_classes_by_decl_uid): Likewise.
35202         (sort_congruence_class_groups_by_decl_uid): Likewise.
35203         (sem_item_optimizer::merge_classes): Sort class, groups in these
35204         classes and members in the groups by DECL_UID of declarations.
35205         This would make merge operations stable.
35207 2017-01-10  Martin Liska  <mliska@suse.cz>
35209         * ipa-icf.c (sem_item_optimizer::sem_item_optimizer): Remove
35210         usage of m_classes_vec.
35211         (sem_item_optimizer::~sem_item_optimizer):  Likewise.
35212         (sem_item_optimizer::get_group_by_hash): Likewise.
35213         (sem_item_optimizer::subdivide_classes_by_equality): Likewise.
35214         (sem_item_optimizer::subdivide_classes_by_sensitive_refs): Likewise.
35215         (sem_item_optimizer::verify_classes): Likewise.
35216         (sem_item_optimizer::process_cong_reduction): Likewise.
35217         (sem_item_optimizer::dump_cong_classes): Likewise.
35218         (sem_item_optimizer::merge_classes): Likewise.
35219         * ipa-icf.h (congruence_class_hash): Rename from
35220         congruence_class_group_hash.  Remove declaration of m_classes_vec.
35222 2017-01-10  Andrew Senkevich  <andrew.senkevich@intel.com>
35224         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VPOPCNTDQ_SET,
35225         OPTION_MASK_ISA_AVX512VPOPCNTDQ_UNSET): New.
35226         * config.gcc: Add avx512vpopcntdqintrin.h.
35227         * config/i386/avx512vpopcntdqintrin.h: New.
35228         * config/i386/cpuid.h (bit_AVX512VPOPCNTDQ): New.
35229         * config/i386/i386-builtin-types.def: Add new types.
35230         * config/i386/i386-builtin.def (__builtin_ia32_vpopcountd_v16si,
35231         __builtin_ia32_vpopcountd_v16si_mask, __builtin_ia32_vpopcountq_v8di,
35232         __builtin_ia32_vpopcountq_v8di_mask): New.
35233         * config/i386/i386-c.c (ix86_target_macros_internal): Define
35234         __AVX512VPOPCNTDQ__.
35235         * config/i386/i386.c (ix86_target_string): Add -mavx512vpopcntdq.
35236         (PTA_AVX512VPOPCNTDQ): Define.
35237         * config/i386/i386.h (TARGET_AVX512VPOPCNTDQ,
35238         TARGET_AVX512VPOPCNTDQ_P): Define.
35239         * config/i386/i386.opt: Add mavx512vpopcntdq.
35240         * config/i386/immintrin.h: Include avx512vpopcntdqintrin.h.
35241         * config/i386/sse.md (define_insn "vpopcount<mode><mask_name>"): New.
35243 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
35245         PR middle-end/77484
35246         * predict.def (PRED_CALL): Set to 67.
35248 2017-01-09  Eric Botcazou  <ebotcazou@adacore.com>
35250         * expr.c (store_field): In the bitfield case, if the value comes from
35251         a function call and is of an aggregate type returned in registers, do
35252         not modify the field mode; extract the value in all cases if the mode
35253         is BLKmode and the size is not larger than a word.
35255 2017-01-09  Dominique d'Humieres  <dominiq@lps.ens.fr>
35257         PR target/71017
35258         * config/i386/cpuid.h: Fix undefined behavior.
35260 2017-01-04  Jeff Law  <law@redhat.com>
35262         PR tree-optimization/79007
35263         PR tree-optimization/67955
35264         * tree-ssa-alias.c (same_addr_size_stores_p): Only need to be
35265         conservative for pt.null when flag_non_call_exceptions is on.
35267 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
35269         PR translation/79019
35270         PR translation/79020
35271         * params.def (PARAM_INLINE_MIN_SPEEDUP,
35272         PARAM_IPA_CP_SINGLE_CALL_PENALTY,
35273         PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD): Fix typos
35274         in descriptions.
35275         * config/avr/avr.opt (maccumulate-args): Likewise.
35276         * config/msp430/msp430.opt (mwarn-mcu): Likewise.
35277         * common.opt (freport-bug): Likewise.
35278         * cif-code.def (CIF_FINAL_ERROR): Likewise.
35279         * doc/invoke.texi (ipa-cp-single-call-penalty): Likewise.
35280         * config/s390/s390.c (s390_invalid_binary_op): Fix spelling in
35281         translatable string.
35282         * config/i386/i386.c (function_value_32): Likewise.
35283         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Likewise.
35284         * config/msp430/msp430.c (msp430_option_override, msp430_attr):
35285         Likewise.
35286         * config/msp430/driver-msp430.c (msp430_select_hwmult_lib): Likewise.
35287         * common/config/msp430/msp430-common.c (msp430_handle_option):
35288         Likewise.
35289         * symtab.c (symtab_node::verify_base): Likewise.
35290         * opts.c (set_debug_level): Likewise.
35291         * tree.c (verify_type_variant): Likewise.  Fix typo in comment.
35292         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add
35293         missing whitespace to translatable strings.
35294         * config/avr/avr.md (bswapsi2): Fix typo in comment.
35295         * config/sh/superh.h: Likewise.
35296         * config/i386/xopintrin.h: Likewise.
35297         * config/i386/znver1.md: Likewise.
35298         * config/rs6000/rs6000.c (struct rs6000_opt_mask): Likewise.
35299         * ipa-inline-analysis.c (compute_inline_parameters): Likewise.
35300         * double-int.h (struct double_int): Likewise.
35301         * double-int.c (div_and_round_double): Likewise.
35302         * wide-int.cc: Likewise.
35303         * tree-ssa.c (non_rewritable_mem_ref_base): Likewise.
35304         * tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise.
35305         * cfgcleanup.c (crossjumps_occured): Renamed to ...
35306         (crossjumps_occurred): ... this.
35307         (try_crossjump_bb, try_head_merge_bb, try_optimize_cfg, cleanup_cfg):
35308         Adjust all uses.
35310         PR tree-optimization/78899
35311         * tree-if-conv.c (version_loop_for_if_conversion): Instead of
35312         returning bool return struct loop *, NULL for failure and the new
35313         loop on success.
35314         (versionable_outer_loop_p): Don't version outer loop if it has
35315         dont_vectorized bit set.
35316         (tree_if_conversion): When versioning outer loop, ensure
35317         tree_if_conversion is performed also on the inner loop of the
35318         non-vectorizable outer loop copy.
35319         * tree-vectorizer.c (set_uid_loop_bbs): Formatting fix.  Fold
35320         LOOP_VECTORIZED in inner loop of the scalar outer loop and
35321         prevent vectorization of it.
35322         (vectorize_loops): For outer + inner LOOP_VECTORIZED, ensure
35323         the outer loop vectorization of the non-scalar version is attempted
35324         before vectorization of the inner loop in scalar version.  If
35325         outer LOOP_VECTORIZED guarded loop is not vectorized, prevent
35326         vectorization of its inner loop.
35327         * tree-vect-loop-manip.c (rename_variables_in_bb): If outer_loop
35328         has 2 inner loops, rename also on edges from bb whose single pred
35329         is outer_loop->header.  Fix typo in function comment.
35331 2017-01-09  Martin Sebor  <msebor@redhat.com>
35333         PR bootstrap/79033
35334         * asan.c (asan_emit_stack_protection): Increase local buffer size
35335         to avoid snprintf truncation warning.
35337 2017-01-09  Andrew Pinski  <apinski@cavium.com>
35339         * config/aarch64/aarch64-cores.def: Add thunderx2t99.  Change vulcan
35340         to reference thunderx2t99 for the tuning structure
35341         * config/aarch64/aarch64-cost-tables.h (vulcan_extra_costs):
35342         Rename to ...
35343         (thunderx2t99_extra_costs): This.
35344         * config/aarch64/aarch64-tune.md: Regenerate.
35345         * config/aarch64/aarch64.c (vulcan_addrcost_table): Rename to ...
35346         (vulcan_addrcost_table): This.
35347         (vulcan_regmove_cost): Rename to ...
35348         (thunderx2t99_regmove_cost): This.
35349         (vulcan_vector_cost): Rename to ...
35350         (thunderx2t99_vector_cost): this.
35351         (vulcan_branch_cost): Rename to ...
35352         (thunderx2t99_branch_cost): This.
35353         (vulcan_tunings): Rename to ...
35354         (thunderx2t99_tunings): This and s/vulcan/thunderx2t99 .
35355         * doc/invoke.texi (AARCH64/mtune): Add thunderx2t99.
35357 2017-01-09  Martin Jambor  <mjambor@suse.cz>
35359         PR ipa/78365
35360         PR ipa/78599
35361         * ipa-prop.h (ipa_jump_func): Swap positions of vr_known and m_vr.
35362         * ipa-cp.c (ipa_vr_operation_and_type_effects): New function.
35363         (propagate_vr_accross_jump_function): Use the above function for all
35364         value range computations for pass-through jump functions and type
35365         converasion from explicit value range values.
35366         (ipcp_propagate_stage): Do not attempt to deduce types of formal
35367         parameters from TYPE_ARG_TYPES.
35368         * ipa-prop.c (ipa_write_jump_function): Remove trailing whitespace.
35369         (ipa_write_node_info): Stream type of the actual argument.
35370         (ipa_read_node_info): Likewise. Also remove trailing whitespace.
35372 2017-01-09  Martin Liska  <mliska@suse.cz>
35374         PR pch/78970
35375         * gcc.c (driver_handle_option): Handle OPT_E and set have_E.
35376         (lookup_compiler): Do not show error message with have_E.
35378 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
35380         PR tree-optimization/78938
35381         * tree-vect-stmts.c (vectorizable_condition): For non-masked COND_EXPR
35382         where comp_vectype is VECTOR_BOOLEAN_TYPE_P, use
35383         BIT_{NOT,XOR,AND,IOR}_EXPR on the comparison operands instead of
35384         {EQ,NE,GE,GT,LE,LT}_EXPR directly inside of VEC_COND_EXPR.  Formatting
35385         fixes.
35387 2017-01-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
35389         * tree-ssa-address.c (gen_addr_rtx): Don't handle index if it
35390         is const0_rtx.
35392 2017-01-09  Richard Biener  <rguenther@suse.de>
35394         PR tree-optimization/78997
35395         * tree-vect-slp.c (vect_mask_constant_operand_p): Handle SSA
35396         name condition properly.
35398 2017-01-09  Richard Biener  <rguenther@suse.de>
35400         PR debug/79000
35401         * dwarf2out.c (is_cxx): New overload with context.
35402         (is_naming_typedef_decl): Use it.
35404 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
35406         * invoke.texi (Option Summary): Correct spacing in option lists
35407         and add line breaks to fix over-long lines.
35409 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
35411         PR middle-end/17660
35413         * extend.texi (Common Variable Attributes): Add xref to GCC
35414         Internals manual to explain mode attribute keywords.
35416 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
35418         PR other/16519
35419         * doc/invoke.texi (Option Summary): Move -pthread to Linker Options
35420         and Preprocessor Options.
35421         (Options for Linking): Document -pthread here....
35422         (RS/6000 and PowerPC Options): ...not here.
35423         (Solaris 2 Options): ...or here.
35424         * doc/cppopts.texi: Document -pthread.
35426 2017-01-08  Martin Sebor  <msebor@redhat.com>
35428         PR middle-end/77708
35429         * doc/invoke.texi (Warning Options): Document -Wformat-truncation.
35430         * gimple-ssa-sprintf.c (call_info::reval_used, call_info::warnopt):
35431         New member functions.
35432         (format_directive): Used them.
35433         (add_bytes): Same.
35434         (pass_sprintf_length::handle_gimple_call): Same.
35435         * graphite-sese-to-poly.c (tree_int_to_gmp): Increase buffer size
35436         to avoid truncation for any argument.
35437         (extract_affine_mul): Same.
35438         * tree.c (get_file_function_name): Same.
35440 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
35442         PR middle-end/77484
35443         * predict.def (PRED_INDIR_CALL): Set to 86.
35445 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
35447         PR preprocessor/54124
35448         * doc/cppopts.texi: Reformat -d subtable to list the full name
35449         of the options.  Add cross-reference to the docs for the general
35450         compiler -d options.
35451         * doc/invoke.texi (Developer Options): Add cross-reference to the
35452         preprocessor-specific -d option documentation.
35454 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
35456         PR preprocessor/13498
35457         * doc/cpp.texi (Search Path): Rewrite to remove obsolete and
35458         redudant material, and reflect new command-line options.
35459         (System Headers): Likewise.
35461 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
35463         * doc/cppdiropts.texi: Merge documentation of -I, -iquote,
35464         -isystem, and -idirafter.  Copy-edit.
35465         * doc/cppopts.texi: Copy-edit.  Remove contradiction about
35466         default for -ftrack-macro-expansion.  Delete obsolete and
35467         badly-formatted implementation details about -fdebug-cpp output.
35468         * doc/cppwarnopts.texi: Copy-edit.
35470 2017-01-07  David Malcolm  <dmalcolm@redhat.com>
35472         PR c++/72803
35473         * input.c (selftest::test_accessing_ordinary_linemaps): Verify
35474         that the transition from a max line width >= 1<<10 to narrower
35475         lines works correctly.
35477 2017-01-07  Alexandre Oliva <aoliva@redhat.com>
35479         * doc/options.texi (PerFunction): New.
35480         * opt-functions.awk (switch_flags): Map both Optimization and
35481         PerFunction to CL_OPTIMIZATION.
35482         * opth-gen.awk: Test for PerFunction flag along with
35483         Optimization.
35484         * optc-save-gen.awk: Likewise.  Introduce var_opt_hash and set
35485         it only when the latter is present.  Skip those that don't in
35486         the hash function generator.
35487         * common.opt (fvar-tracking): Mark as PerFunction instead of
35488         Optimization.
35489         (fvar-tracking-assignments): Likewise.
35490         (fvar-tracking-assignments-toggle): Likewise.
35491         (fvar-tracking-uninit): Likewise.
35493 2017-01-07  Jakub Jelinek  <jakub@redhat.com>
35495         PR translation/79018
35496         * params.def (PARAM_MAX_STORES_TO_MERGE): Add missing space between
35497         the and store.
35499 2017-01-06  Mikael Pettersson  <mikpelinux@gmail.com>
35501         PR target/57583
35502         * config/m68k/m68k.opt (LONG_JUMP_TABLE_OFFSETS): New option.
35503         * config/m68k/linux.h (ASM_RETURN_CASE_JUMP): Handle
35504         TARGET_LONG_JUMP_TABLE_OFFSETS.
35505         * config/m68k/m68kelf.h (ASM_RETURN_CASE_JUMP): Likewise.
35506         * config/m68k/netbsd-elf.h (ASM_RETURN_CASE_JUMP): Likewise.
35507         * config/m68k/m68k.h (CASE_VECTOR_MODE): Likewise.
35508         (ASM_OUTPUT_ADDR_DIFF_ELF): Likewise.
35509         * config/m68k/m68k.md (tablejump expander): Likewise.
35510         (*tablejump_pcrel_hi): Renamed from unnamed insn, reject
35511         TARGET_LONG_JUMP_TABLE_OFFSETS.
35512         (*tablejump_pcrel_si): New insn, handle TARGET_LONG_JUMP_TABLE_OFFSETS.
35513         * doc/invoke.texi (M68K options): Add -mlong-jump-table-offsets.
35515 2017-01-06  Edgar E. Iglesias <edgar.iglesias@xilinx.com>
35516             David Holsgrove <david.holsgrove@xilinx.com>
35518         * common/config/microblaze/microblaze-common.c
35519         (TARGET_EXCEPT_UNWIND_INFO): Remove.
35520         * config/microblaze/microblaze-protos.h (microblaze_eh_return):
35521         New prototype.
35522         * config/microblaze/microblaze.c (microblaze_must_save_register)
35523         (microblaze_expand_epilogue, microblaze_return_addr): Handle
35524         calls_eh_return.
35525         (microblaze_eh_return): New function.
35526         * config/microblaze/microblaze.h (RETURN_ADDR_OFFSET)
35527         (EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM)
35528         (EH_RETURN_STACKADJ_RTX, ASM_PREFERRED_EH_DATA_FORMAT): New macros.
35529         * config/microblaze/microblaze.md (eh_return): New pattern.
35531 2017-01-06  Jakub Jelinek  <jakub@redhat.com>
35533         * system.h (GCC_DIAGNOSTIC_PUSH_IGNORED, GCC_DIAGNOSTIC_POP,
35534         GCC_DIAGNOSTIC_STRINGIFY): Define.
35536         * read-rtl.c (rtx_reader::read_rtx_code): Avoid -Wsign-compare warning.
35538 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
35540         * config/arm/arm.md (<mcrr>): New.
35541         (<mrrc>): New.
35542         * config/arm/arm.c (arm_arch5te): New.
35543         (arm_option_override): Set arm_arch5te.
35544         (arm_coproc_builtin_available): Add support for mcrr, mcrr2, mrrc
35545         and mrrc2.
35546         * config/arm/arm-builtins.c (MCRR_QUALIFIERS): Define to...
35547         (arm_mcrr_qualifiers): ... this. New.
35548         (MRRC_QUALIFIERS): Define to...
35549         (arm_mrrc_qualifiers): ... this. New.
35550         * config/arm/arm_acle.h (__arm_mcrr, __arm_mcrr2, __arm_mrrc,
35551         __arm_mrrc2): New.
35552         * config/arm/arm_acle_builtins.def (mcrr, mcrr2, mrrc, mrrc2): New.
35553         * config/arm/iterators.md (MCRRI, mcrr, MCRR): New.
35554         (MRRCI, mrrc, MRRC): New.
35555         * config/arm/unspecs.md (VUNSPEC_MCRR, VUNSPEC_MCRR2, VUNSPEC_MRRC,
35556         VUNSPEC_MRRC2): New.
35558 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
35560         * config/arm/arm.md (<mcr>): New.
35561         (<mrc>): New.
35562         * config/arm/arm.c (arm_coproc_builtin_available): Add
35563         support for mcr, mrc, mcr2 and mrc2.
35564         * config/arm/arm-builtins.c (MCR_QUALIFIERS): Define to...
35565         (arm_mcr_qualifiers): ... this. New.
35566         (MRC_QUALIFIERS): Define to ...
35567         (arm_mrc_qualifiers): ... this. New.
35568         (MCR_QUALIFIERS): Define to ...
35569         (arm_mcr_qualifiers): ... this. New.
35570         * config/arm/arm_acle.h (__arm_mcr, __arm_mrc, __arm_mcr2,
35571         __arm_mrc2): New.
35572         * config/arm/arm_acle_builtins.def (mcr, mcr2, mrc, mrc2): New.
35573         * config/arm/iterators.md (MCRI, mcr, MCR, MRCI, mrc, MRC): New.
35574         * config/arm/unspecs.md (VUNSPEC_MCR, VUNSPEC_MCR2, VUNSPEC_MRC,
35575         VUNSPEC_MRC2): New.
35577 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
35579         * config/arm/arm.md (*ldc): New.
35580         (*stc): New.
35581         (<ldc>): New.
35582         (<stc>): New.
35583         * config/arm/arm.c (arm_coproc_builtin_available): Add
35584         support for ldc,ldcl,stc,stcl,ldc2,ldc2l,stc2 and stc2l.
35585         (arm_coproc_ldc_stc_legitimate_address): New.
35586         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
35587         'qualifier_const_pointer'.
35588         (LDC_QUALIFIERS): Define to...
35589         (arm_ldc_qualifiers): ... this. New.
35590         (STC_QUALIFIERS): Define to...
35591         (arm_stc_qualifiers): ... this. New.
35592         * config/arm/arm-protos.h
35593         (arm_coproc_ldc_stc_legitimate_address): New.
35594         * config/arm/arm_acle.h (__arm_ldc, __arm_ldcl, __arm_stc,
35595         __arm_stcl, __arm_ldc2, __arm_ldc2l, __arm_stc2, __arm_stc2l): New.
35596         * config/arm/arm_acle_builtins.def (ldc, ldc2, ldcl, ldc2l, stc,
35597         stc2, stcl, stc2l): New.
35598         * config/arm/constraints.md (Uz): New.
35599         * config/arm/iterators.md (LDCI, STCI, ldc, stc, LDC STC): New.
35600         * config/arm/unspecs.md (VUNSPEC_LDC, VUNSPEC_LDC2, VUNSPEC_LDCL,
35601         VUNSPEC_LDC2L, VUNSPEC_STC, VUNSPEC_STC2, VUNSPEC_STCL,
35602         VUNSPEC_STC2L): New.
35604 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
35606         * config/arm/arm.md (<cdp>): New.
35607         * config/arm/arm.c (neon_const_bounds): Rename this ...
35608         (arm_const_bounds): ... this.
35609         (arm_coproc_builtin_available): New.
35610         * config/arm/arm-builtins.c (SIMD_MAX_BUILTIN_ARGS): Increase.
35611         (arm_type_qualifiers): Add 'qualifier_unsigned_immediate'.
35612         (CDP_QUALIFIERS): Define to...
35613         (arm_cdp_qualifiers): ... this. New.
35614         (void_UP): Define.
35615         (arm_expand_builtin_args): Add case for 6 arguments.
35616         * config/arm/arm-protos.h (neon_const_bounds): Rename this ...
35617         (arm_const_bounds): ... this.
35618         (arm_coproc_builtin_available): New.
35619         * config/arm/arm_acle.h (__arm_cdp): New.
35620         (__arm_cdp2): New.
35621         * config/arm/arm_acle_builtins.def (cdp): New.
35622         (cdp2): New.
35623         * config/arm/iterators.md (CDPI,CDP,cdp): New.
35624         * config/arm/neon.md: Rename all 'neon_const_bounds' to
35625         'arm_const_bounds'.
35626         * config/arm/types.md (coproc): New.
35627         * config/arm/unspecs.md (VUNSPEC_CDP, VUNSPEC_CDP2): New.
35628         * doc/extend.texi (ACLE): Add a mention of Coprocessor intrinsics.
35629         * doc/sourcebuild.texi (arm_coproc1_ok, arm_coproc2_ok,
35630         arm_coproc3_ok, arm_coproc4_ok): Document new effective targets.
35632 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
35634         * config/arm/arm-builtins.c (arm_unsigned_binop_qualifiers): New.
35635         (UBINOP_QUALIFIERS): New.
35636         (si_UP): Define.
35637         (acle_builtin_data): New. Change comment.
35638         (arm_builtins): Remove ARM_BUILTIN_CRC32B, ARM_BUILTIN_CRC32H,
35639         ARM_BUILTIN_CRC32W, ARM_BUILTIN_CRC32CB, ARM_BUILTIN_CRC32CH,
35640         ARM_BUILTIN_CRC32CW. Add ARM_BUILTIN_ACLE_BASE and include
35641         arm_acle_builtins.def.
35642         (ARM_BUILTIN_ACLE_PATTERN_START): Define.
35643         (arm_init_acle_builtins): New.
35644         (CRC32_BUILTIN): Remove.
35645         (bdesc_2arg): Remove entries for crc32b, crc32h, crc32w,
35646         crc32cb, crc32ch and crc32cw.
35647         (arm_init_crc32_builtins): Remove.
35648         (arm_init_builtins): Use arm_init_acle_builtins rather
35649         than arm_init_crc32_builtins.
35650         (arm_expand_acle_builtin): New.
35651         (arm_expand_builtin): Use 'arm_expand_acle_builtin'.
35652         * config/arm/arm_acle_builtins.def: New.
35654 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
35656         * config/arm/arm-builtins.c (neon_builtin_datum): Rename to ..
35657         (arm_builtin_datum): ... this.
35658         (arm_init_neon_builtin): Rename to ...
35659         (arm_init_builtin): ... this. Add a new parameters PREFIX
35660         and USE_SIG_IN_NAME.
35661         (arm_init_neon_builtins): Replace 'arm_init_neon_builtin' with
35662         'arm_init_builtin'. Replace type 'neon_builtin_datum' with
35663         'arm_builtin_datum'.
35664         (arm_init_vfp_builtins): Likewise.
35665         (builtin_arg): Rename enum's replacing 'NEON_ARG' with
35666         'ARG_BUILTIN' and add a 'ARG_BUILTIN_NEON_MEMORY.
35667         (arm_expand_neon_args): Rename to ...
35668         (arm_expand_builtin_args): ... this. Rename builtin_arg
35669         enum values and differentiate between ARG_BUILTIN_MEMORY
35670         and ARG_BUILTIN_NEON_MEMORY.
35671         (arm_expand_neon_builtin_1): Rename to ...
35672         (arm_expand_builtin_1): ... this. Rename builtin_arg enum
35673         values, arm_expand_builtin_args and add bool parameter NEON.
35674         (arm_expand_neon_builtin): Use arm_expand_builtin_1.
35675         (arm_expand_vfp_builtin): Likewise.
35676         (NEON_MAX_BUILTIN_ARGS): Remove, it was unused.
35678 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
35680         PR middle-end/77484
35681         * predict.def (PRED_POLYMORPHIC_CALL): Set to 59.
35682         * predict.c (tree_estimate_probability_bb): Reverse direction of
35683         polymorphic call predictor.
35685 2017-01-06  David Malcolm  <dmalcolm@redhat.com>
35687         * passes.c (execute_one_pass): Split out pass-skipping logic into...
35688         (determine_pass_name_match): ...this new function and...
35689         (should_skip_pass_p): ...this new function.
35691 2017-01-06  Nathan Sidwell  <nathan@acm.org>
35693         * ipa-visibility.c (function_and_variable_visibility): Reformat
35694         comments and long lines.  Remove extrneous if.
35695         * symtab.c (symtab_node::make_decl_local): Fix code format.
35696         (symtab_node::set_section_for_node): Fix comment typo.
35698 2017-01-06  Martin Liska  <mliska@suse.cz>
35700         PR bootstrap/79003
35701         * lra-constraints.c: Rename invariant to lra_invariant.
35702         * predict.c (set_even_probabilities): Initialize e to NULL.
35704 2017-01-05  Martin Sebor  <msebor@redhat.com>
35706         PR tree-optimization/78910
35707         * gimple-ssa-sprintf.c (tree_digits): Add an argument.
35708         (format_integer): Correct off-by-one error in the handling
35709         of precision with negative numbers in signed conversions..
35711 2017-01-05  Eric Botcazou  <ebotcazou@adacore.com>
35713         * doc/invoke.texi (C Dialect Options): Adjust -fsso-struct entry.
35715 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
35717         PR tree-optimization/71016
35718         * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Pass cond_stmt to
35719         factor_out_conditional_conversion.  Formatting fix.
35720         (factor_out_conditional_conversion): Add cond_stmt argument.
35721         If arg1 is INTEGER_CST, punt if new_arg0 is not any operand of
35722         cond_stmt and if arg0_def_stmt is not the only stmt in its bb.
35723         Formatting fix.
35725 2017-01-05  David Malcolm  <dmalcolm@redhat.com>
35727         * Makefile.in (OBJS): Add read-md.o, read-rtl.o,
35728         read-rtl-function.o, and selftest-rtl.o.
35729         * config/aarch64/aarch64.c: Include selftest.h and selftest-rtl.h.
35730         (selftest::aarch64_test_loading_full_dump): New function.
35731         (selftest::aarch64_run_selftests): New function.
35732         (TARGET_RUN_TARGET_SELFTESTS): Wire it up to
35733         selftest::aarch64_run_selftests.
35734         * config/i386/i386.c
35735         (selftest::ix86_test_loading_dump_fragment_1): New function.
35736         (selftest::ix86_test_loading_call_insn): New function.
35737         (selftest::ix86_test_loading_full_dump): New function.
35738         (selftest::ix86_test_loading_unspec): New function.
35739         (selftest::ix86_run_selftests): Call the new functions.
35740         * emit-rtl.c (maybe_set_max_label_num): New function.
35741         * emit-rtl.h (maybe_set_max_label_num): New decl.
35742         * function.c (instantiate_decls): Guard call to
35743         instantiate_decls_1 with if (DECL_INITIAL (fndecl)).
35744         * function-tests.c (selftest::verify_three_block_rtl_cfg): Remove
35745         "static".
35746         * gensupport.c (gen_reader::gen_reader): Pass "false"
35747         for new "compact" param of rtx_reader.
35748         * print-rtl.c (rtx_writer::print_rtx_operand): Print "(nil)"
35749         rather than an empty string for NULL strings.
35750         * read-md.c: Potentially include config.h rather than bconfig.h.
35751         Wrap include of errors.h with #ifdef GENERATOR_FILE.
35752         (have_error): New global, copied from errors.c.
35753         (md_reader::read_name): Rename to...
35754         (md_reader::read_name_1): ...this, adding "out_loc" param,
35755         and converting "missing name or number" to returning false, rather
35756         than failing.
35757         (md_reader::read_name): Reimplement in terms of read_name_1.
35758         (md_reader::read_name_or_nil): New function.
35759         (md_reader::read_string): Handle "(nil)" by returning NULL.
35760         (md_reader::md_reader): Add new param "compact".
35761         (md_reader::read_md_files): Wrap with #ifdef GENERATOR_FILE.
35762         (md_reader::read_file): New method.
35763         * read-md.h (md_reader::md_reader): Add new param "compact".
35764         (md_reader::read_file): New method.
35765         (md_reader::is_compact): New accessor.
35766         (md_reader::read_name): Convert return type from void to file_location.
35767         (md_reader::read_name_or_nil): New decl.
35768         (md_reader::read_name_1): New decl.
35769         (md_reader::m_compact): New field.
35770         (noop_reader::noop_reader): Pass "false" for new "compact" param
35771         of rtx_reader.
35772         (rtx_reader::rtx_reader): Add new "compact" param.
35773         (rtx_reader::read_rtx_operand): Make virtual and convert return
35774         type from void to rtx.
35775         (rtx_reader::read_until): New decl.
35776         (rtx_reader::handle_any_trailing_information): New virtual function.
35777         (rtx_reader::postprocess): New virtual function.
35778         (rtx_reader::finalize_string): New virtual function.
35779         (rtx_reader::m_in_call_function_usage): New field.
35780         (rtx_reader::m_reuse_rtx_by_id): New field.
35781         * read-rtl-function.c: New file.
35782         * selftest-rtl.c (selftest::assert_rtx_ptr_eq_at): New function.
35783         * selftest-rtl.h (ASSERT_RTX_PTR_EQ): New macro.
35784         (selftest::verify_three_block_rtl_cfg): New decl.
35785         * read-rtl-function.h: New file.
35786         * read-rtl.c: Potentially include config.h rather than bconfig.h.
35787         For host, include function.h, memmodel.h, and emit-rtl.h.
35788         (one_time_initialization): New function.
35789         (struct compact_insn_name): New struct.
35790         (compact_insn_names): New array.
35791         (find_code): Handle insn codes in compact dumps.
35792         (apply_subst_iterator): Wrap with #ifdef GENERATOR_FILE.
35793         (bind_subst_iter_and_attr): Likewise.
35794         (add_condition_to_string): Likewise.
35795         (add_condition_to_rtx): Likewise.
35796         (apply_attribute_uses): Likewise.
35797         (add_current_iterators): Likewise.
35798         (apply_iterators): Likewise.
35799         (initialize_iterators): Guard usage of apply_subst_iterator with
35800         #ifdef GENERATOR_FILE.
35801         (read_conditions): Wrap with #ifdef GENERATOR_FILE.
35802         (md_reader::read_mapping): Likewise.
35803         (add_define_attr_for_define_subst): Likewise.
35804         (add_define_subst_attr): Likewise.
35805         (read_subst_mapping): Likewise.
35806         (check_code_iterator): Likewise.
35807         (rtx_reader::read_rtx): Likewise.  Move one-time initialization
35808         logic to...
35809         (one_time_initialization): New function.
35810         (rtx_reader::read_until): New method.
35811         (read_flags): New function.
35812         (parse_reg_note_name): New function.
35813         (rtx_reader::read_rtx_code): Initialize "iterator" to NULL.
35814         Handle reuse_rtx ids.
35815         Wrap iterator lookup within #ifdef GENERATOR_FILE.
35816         Add parsing support for RTL dumps, mirroring the special-cases in
35817         print_rtx, by calling read_flags, reading REG_NOTE names, INSN_UID
35818         values, and calling handle_any_trailing_information.
35819         (rtx_reader::read_rtx_operand): Convert return type from void
35820         to rtx, returning return_rtx.  Handle case 'e'.  Call
35821         finalize_string on XSTR and XTMPL fields.
35822         (rtx_reader::read_nested_rtx):  Handle dumps in which trailing
35823          "(nil)" values were omitted.  Call the postprocess vfunc on the
35824         return_rtx.
35825         (rtx_reader::rtx_reader): Add new "compact" param and pass to base
35826         class ctor.  Initialize m_in_call_function_usage.  Call
35827         one_time_initialization.
35828         * rtl-tests.c (selftest::test_uncond_jump): Call
35829         set_new_first_and_last_insn.
35830         * rtl.h (read_rtx): Wrap decl with #ifdef GENERATOR_FILE.
35831         * selftest-rtl.c: New file.
35832         * selftest-rtl.h (class selftest::rtl_dump_test): New class.
35833         (selftest::get_insn_by_uid): New decl.
35834         * selftest-run-tests.c (selftest::run_tests): Call
35835         read_rtl_function_c_tests.
35836         * selftest.h  (selftest::read_rtl_function_c_tests): New decl.
35837         * tree-dfa.c (ssa_default_def): Return NULL_TREE for rtl function
35838         dumps.
35840 2017-01-05  Uros Bizjak  <ubizjak@gmail.com>
35842         * config/i386/i386.md (*testqi_ext_3): No need to handle memory
35843         operands in a special way.  Assert that pos+len <= mode precision.
35845 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
35847         * common.opt (fvect-cost-model): Remove RejectNegative flag, use
35848         3 argument Alias with unlimited for the negative form.
35849         (fno-vect-cost-model): Removed.
35851 2017-01-05  Martin Liska  <mliska@suse.cz>
35853         * hsa-gen.c (gen_hsa_divmod): New function.
35854         (gen_hsa_insn_for_internal_fn_call): Use the function for IFN_DIVMOD.
35856 2017-01-05  Martin Liska  <mliska@suse.cz>
35858         PR pch/78970
35859         * gcc.c (lookup_compiler): Reject '-' filename for a precompiled
35860         header.
35862 2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
35864         * config/s390/s390.c (s390_expand_setmem): Unroll the loop for
35865         small constant length operands.
35867 2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
35869         * config/s390/s390.c (s390_expand_setmem): Avoid overlapping bytes
35870         between loop iterations.
35872 2017-01-05  Martin Liska  <mliska@suse.cz>
35874         PR sanitizer/78815
35875         * gimplify.c (gimplify_decl_expr): Compare to
35876         asan_poisoned_variables instread of checking flags.
35877         (gimplify_target_expr): Likewise.
35878         (gimplify_expr): Likewise.
35879         (gimplify_function_tree): Conditionally initialize
35880         asan_poisoned_variables.
35882 2017-01-04  Jeff Law  <law@redhat.com>
35884         PR tree-optimizatin/78812
35885         * rtl.h (contains_mem_rtx_p): Prototype.
35886         * ifcvt.c (containts_mem_rtx_p): Move from here to...
35887         * rtlanal.c (contains_mem_rtx_p): Here and remove static linkage.
35888         * gcse.c (prune_expressions): Use contains_mem_rtx_p to discover
35889         and prune MEMs that are not at the toplevel of a SET_SRC rtx.  Look
35890         through ZERO_EXTEND and SIGN_EXTEND when trying to avoid pruning MEMs.
35892 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
35894         * input.c (assert_char_at_range): Default-initialize actual_range.
35896 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
35898         * df-scan.c (df_ref_create_structure): Make regno unsigned,
35899         to match the caller.
35901 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
35903         * cfgexpand.c (expand_gimple_basic_block): Disregard debug
35904         insns after final jump in test to emit dummy move.
35906 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
35908         * gimple-iterator.h (gsi_one_nondebug_before_end_p): New.
35909         * tree-eh.c (cleanup_empty_eh): Skip more debug stmts.
35911 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
35913         * multiple_target.c (create_dispatcher_calls): Init e_next.
35914         * tree-ssa-loop-split.c (split_loop): Init border.
35915         * tree-vect-loop.c (vect_determine_vectorization_factor): Init
35916         scalar_type.
35918 2017-01-04  Michael Meissner  <meissner@linux.vnet.ibm.com>
35920         PR target/71977
35921         PR target/70568
35922         PR target/78823
35923         * config/rs6000/predicates.md (sf_subreg_operand): New predicate.
35924         (altivec_register_operand): Do not return true if the operand
35925         contains a SUBREG mixing SImode and SFmode.
35926         (vsx_register_operand): Likewise.
35927         (vsx_reg_sfsubreg_ok): New predicate.
35928         (vfloat_operand): Do not return true if the operand contains a
35929         SUBREG mixing SImode and SFmode.
35930         (vint_operand): Likewise.
35931         (vlogical_operand): Likewise.
35932         (gpc_reg_operand): Likewise.
35933         (int_reg_operand): Likewise.
35934         * config/rs6000/rs6000-protos.h (valid_sf_si_move): Add declaration.
35935         * config/rs6000/rs6000.c (valid_sf_si_move): New function to
35936         determine if a MOVSI or MOVSF operation contains SUBREGs that mix
35937         SImode and SFmode.
35938         (rs6000_emit_move_si_sf_subreg): New helper function.
35939         (rs6000_emit_move): Call rs6000_emit_move_si_sf_subreg to possbily
35940         fixup SUBREGs involving SImode and SFmode.
35941         * config/rs6000/vsx.md (SFBOOL_*): New constants that are operand
35942         numbers for the new peephole2 optimization.
35943         (peephole2 for SFmode unions): New peephole2 to optimize cases in
35944         the GLIBC math library that do AND/IOR/XOR operations on single
35945         precision floating point.
35946         * config/rs6000/rs6000.h (TARGET_NO_SF_SUBREG): New internal
35947         target macros to say whether we need to avoid SUBREGs mixing
35948         SImode and SFmode.
35949         (TARGET_ALLOW_SF_SUBREG): Likewise.
35950         * config/rs6000/rs6000.md (UNSPEC_SF_FROM_SI): New unspecs.
35951         (UNSPEC_SI_FROM_SF): Likewise.
35952         (iorxor): Change spacing.
35953         (and_ior_xor): New iterator for AND, IOR, and XOR.
35954         (movsi_from_sf): New insns for SImode/SFmode SUBREG support.
35955         (movdi_from_sf_zero_ext): Likewise.
35956         (mov<mode>_hardfloat, FMOVE32 iterator): Use register_operand
35957         instead of gpc_reg_operand.  Add SImode/SFmode SUBREG support.
35958         (movsf_from_si): New insn for SImode/SFmode SUBREG support.
35959         (fma<mode>4): Use gpc_reg_operand instead of register_operand.
35960         (fms<mode>4): Likewise.
35961         (fnma<mode>4): Likewise.
35962         (fnms<mode>4): Likewise.
35963         (nfma<mode>4): Likewise.
35964         (nfms<mode>4): Likewise.
35966 2017-01-04  Marek Polacek  <polacek@redhat.com>
35968         PR c++/64767
35969         * doc/invoke.texi: Document -Wpointer-compare.
35971 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
35973         * optc-gen.awk: Emit #error for -W*/-f*/-m* Enum without
35974         RejectNegative.
35976         * dwarf2out.c (output_loc_list): Don't throw away 64K+ location
35977         descriptions for -gdwarf-5 and emit them as uleb128 instead of
35978         2-byte data.
35980 2017-01-04  Kelvin Nilsen  <kelvin@gcc.gnu.org>
35982         PR target/78056
35983         * doc/sourcebuild.texi (PowerPC-specific attributes): Add
35984         documentation of the powerpc_popcntb_ok attribute.
35985         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
35986         code to issue warning messages if a requested CPU configuration is
35987         not supported by the binary (assembler and loader) toolchain.
35988         (spe_init_builtins): Add two assertions to prevent ICE if attempt is
35989         made to define a built-in function that has been disabled.
35990         (paired_init_builtins): Add assertion to prevent ICE if attempt is
35991         made to define a built-in function that has been disabled.
35992         (altivec_init_builtins): Add comment explaining why definition
35993         of the DST built-in functions is not preceded by an assertion
35994         check.  Add assertions to prevent ICE if attempts are made to
35995         define an altivec predicate or an abs* built-in function that has
35996         been disabled.
35997         (htm_init_builtins): Add comment explaining why definition of the
35998         htm built-in functions is not preceded by an assertion check.
36000 2017-01-04  Jeff Law  <law@redhat.com>
36002         PR tree-optimizatin/67955
36003         * tree-ssa-alias.c (same_addr_size_stores_p): Check offsets first.
36004         Allow any SSA_VAR_P as the base objects.  Use integer_zerop.  Verify
36005         the points-to solution does not include pt_null.  Use DECL_PT_UID
36006         unconditionally.
36008 2017-01-04  Uros Bizjak  <ubizjak@gmail.com>
36010         * config/i386/i386.md (HI/SImode test with imm to QImode splitters):
36011         Use gen_int_mode instead of gen_lopwart for const_int operands.
36013 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
36015         PR tree-optimization/71563
36016         * match.pd: Simplify X << Y into X if Y is known to be 0 or
36017         out of range value - has low bits known to be zero.
36019 2017-01-04  Alan Modra  <amodra@gmail.com>
36021         * Makefile.in (aclocal_deps): Update and order as per aclocal.m4.
36022         * configure: Regenerate.
36023         * config.in: Regenerate.
36025 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
36027         PR bootstrap/77569
36028         * input.c (ebcdic_execution_charset::on_error): Don't use strstr for
36029         a substring of the message, but strcmp with the whole message.  Ifdef
36030         ENABLE_NLS, translate the message first using dgettext.
36032 2017-01-03  Jeff Law  <law@redhat.com>
36034         PR tree-optimizatin/78856
36035         * tree-ssa-threadupdate.c: Include tree-vectorizer.h.
36036         (mark_threaded_blocks): Remove code to truncate thread paths that
36037         cross multiple loop headers.  Instead invalidate the cached loop
36038         iteration information and handle case of a thread path walking
36039         into an irreducible region.
36041 2017-01-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
36043         PR target/78900
36044         * config/rs6000/rs6000.c (rs6000_split_signbit): Change some
36045         assertions.  Add support for doing the signbit if the IEEE 128-bit
36046         floating point value is in a GPR.
36047         * config/rs6000/rs6000.md (Fsignbit): Delete.
36048         (signbit<mode>2_dm): Delete using <Fsignbit> and just use "wa".
36049         Update the length attribute if the value is in a GPR.
36050         (signbit<mode>2_dm_<su>ext): Add combiner pattern to eliminate
36051         the sign or zero extension instruction, since the value is always 0/1.
36052         (signbit<mode>2_dm2): Delete using <Fsignbit>.
36054         PR target/78953
36055         * config/rs6000/vsx.md (vsx_extract_<mode>_store_p9): If we are
36056         extracting SImode to a GPR register so that we can generate a
36057         store, limit the vector to be in a traditional Altivec register
36058         for the vextuwrx instruction.
36060 2017-01-03  Ian Lance Taylor  <iant@google.com>
36062         * godump.c (go_format_type): Treat ENUMERAL_TYPE like INTEGER_TYPE.
36064 2017-01-03  Martin Sebor  <msebor@redhat.com>
36066         PR tree-optimization/78696
36067         * gimple-ssa-sprintf.c (format_floating): Correct handling of
36068         precision.  Use MPFR for %f for greater fidelity.  Correct handling
36069         of %g.
36070         (pass_sprintf_length::compute_format_length): Set width and precision
36071         specified by asrerisk to void_node for vararg functions.
36072         (try_substitute_return_value): Adjust dump output.
36074 2017-01-03  David Edelsohn  <dje.gcc@gmail.com>
36076         * doc/invoke.texi (RS6000 options): LRA is enabled by default.
36078 2017-01-03  Eric Botcazou  <ebotcazou@adacore.com>
36080         * doc/invoke.texi (SPARC options): Document -mlra as the default.
36081         * config/sparc/sparc.c (sparc_option_override): Force LRA unless
36082         -mlra/-mno-lra was passed to the compiler.
36084 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
36086         PR rtl-optimization/65618
36087         * emit-rtl.c (try_split): Move initialization of "before" and
36088         "after" to just before the call to emit_insn_after_setloc.
36090 2017-01-03  Gerald Pfeifer  <gerald@pfeifer.com>
36092         * doc/md.texi (Standard Names): Remove reference to Java frontend.
36094 2017-01-03  Pierre-Marie de Rodat  <derodat@adacore.com>
36096         * dwarf2out.c (gen_enumeration_type_die): When
36097         -gno-strict-dwarf, add a DW_AT_encoding attribute.
36099 2017-01-03  Jakub Jelinek  <jakub@redhat.com>
36101         PR tree-optimization/78965
36102         * gimple-ssa-sprintf.c (pass_sprintf_length::compute_format_length):
36103         Change first argument from const call_info & to call_info &.  For %n
36104         set info.nowrite to false.
36106         PR middle-end/78901
36107         * gimple-ssa-sprintf.c (try_substitute_return_value): Don't change
36108         possibly throwing calls.
36110         * genmatch.c (dt_node::gen_kids_1): If generic_exprs include SSA_NAME
36111         and exprs_len || fns_len, emit the code for SSA_NAME next to the exprs
36112         and fns handling, rather than in a separate case SSA_NAME.
36114 2017-01-02  Jeff Law  <law@redhat.com>
36116         * config/darwin-driver.c (darwin_driver_init): Const-correctness
36117         fixes for first_period and second_period variables.
36119 2017-01-02  Uros Bizjak  <ubizjak@gmail.com>
36121         PR target/78967
36122         * config/i386/i386.md (UNSPEC_NOREX_MEM): New unspec.
36123         (*insvqi_1): New insn pattern.
36124         (*insvqi_1_mem_rex64): Ditto.
36125         (*insvqi_2): Ditto.
36126         (*insvqi_3): Rename from *insvqi.
36128         (*extzvqi_mem_rex64): Add UNSPEC_NOREX_MEM tag.
36130 2017-01-02  Gerald Pfeifer  <gerald@pfeifer.com>
36132         * doc/cfg.texi (Edges): Remove reference to Java.
36133         (Maintaining the CFG): Ditto.
36135 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
36137         PR middle-end/77674
36138         * symtab.c (symtab_node::binds_to_current_def_p): Fix handling of
36139         transparent aliases.
36141 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
36143         PR middle-end/77484
36144         * predict.def (PRED_CALL): Update hitrate.
36145         (PRED_INDIR_CALL, PRED_POLYMORPHIC_CALL): New predictors.
36146         * predict.c (tree_estimate_probability_bb): Split CALL predictor
36147         into direct/indirect/polymorphic variants.
36149 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
36151         Update copyright years.
36153         * gcc.c (process_command): Update copyright notice dates.
36154         * gcov-dump.c (print_version): Ditto.
36155         * gcov.c (print_version): Ditto.
36156         * gcov-tool.c (print_version): Ditto.
36157         * gengtype.c (create_file): Ditto.
36158         * doc/cpp.texi: Bump @copying's copyright year.
36159         * doc/cppinternals.texi: Ditto.
36160         * doc/gcc.texi: Ditto.
36161         * doc/gccint.texi: Ditto.
36162         * doc/gcov.texi: Ditto.
36163         * doc/install.texi: Ditto.
36164         * doc/invoke.texi: Ditto.
36166 Copyright (C) 2017 Free Software Foundation, Inc.
36168 Copying and distribution of this file, with or without modification,
36169 are permitted in any medium without royalty provided the copyright
36170 notice and this notice are preserved.